- Scott Chacon on the Interwebs(リンク切れ)
- Scott Chacon on the Interwebs
- GitHub Flow - The best way to use Git and GitHub
31 Aug 2011
| import torch | |
| import torch.optim as optim | |
| import matplotlib.pyplot as plt | |
| # 2d Rosenbrock function | |
| def f(x): | |
| return (1 - x[0])**2 + 100 * (x[1] - x[0]**2)**2 |
| """ | |
| Copyright (c) 2017 Arthur Mensch | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| using UnityEngine; | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| using System.Linq; | |
| //================================================================================ | |
| // Unity用 汎用ライブラリ | |
| //================================================================================ |
| import os | |
| import scipy.io.wavfile as wav | |
| # install lame | |
| # install bleeding edge scipy (needs new cython) | |
| fname = 'XC135672-Red-winged\ Blackbird1301.mp3' | |
| oname = 'temp.wav' | |
| cmd = 'lame --decode {0} {1}'.format( fname,oname ) | |
| os.system(cmd) | |
| data = wav.read(oname) | |
| # your code goes here |