This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from pandas import * | |
from pylab import * | |
import matplotlib.pyplot as plt | |
from numpy.random import randn | |
fig,ax1=plt.subplots() | |
df = read_csv('cldata.csv') | |
x=df['wavelength'] | |
y500=df['500'] | |
y600=df['600'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
X = np.linspace(-4,4, 2560, endpoint=True) | |
f=0.5 | |
print 'set Approximation order' | |
n=int(raw_input()) | |
for i in range(1,n): | |
f+=2*np.sin(i/2.0*np.pi)/(i*np.pi)*np.cos(i*np.pi*X) | |
plt.plot(X, f) | |
plt.ylim((-1,4)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from pandas import * | |
from pylab import * | |
import matplotlib.pyplot as plt | |
from numpy.random import randn | |
x=[i for i in range(100)] | |
y1=[i**2 for i in range(100)] | |
y2=[-i**2+10000 for i in range(100)] | |
y3=[5000 for i in range(100)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.optimize import curve_fit | |
import matplotlib.pyplot as plt | |
import scipy as sp | |
def errorfunc(x,a,b): | |
return a*sp.special.erf(x)+b | |
xdata=np.linspace(0,4,50) | |
y=errorfunc(xdata,1.0,1.0) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.ndimage as ndimage | |
import skimage.filter as skif | |
from PIL import Image | |
import numpy as np | |
from matplotlib import pylab as plt | |
#open image and convert fromRGB to mono_color | |
img =Image.open('sudoku.jpg') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import matplotlib.pyplot as plt | |
import scipy.ndimage as ndimage | |
import skimage.filter as skif | |
# Creating image with non-uniform background | |
func = lambda x, y: x * 2 + y ** 2 | |
grid_x, grid_y = np.mgrid[-1:1:100j, -2:2:100j] | |
bkg = func(grid_x, grid_y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import os | |
import requests | |
import datetime | |
import os.path | |
import datetime | |
import smtplib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scipy.stats | |
import scipy.spatial | |
from numpy.random import RandomState | |
import matplotlib.pyplot as plt | |
rv=RandomState(123456789) | |
locations=rv.randint(0,511,size=(2,128)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from scipy.io import wavfile | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from keras.layers import Conv2D, MaxPool2D, Flatten, LSTM | |
from keras.layers import Dropout, Dense, TimeDistributed | |
from keras.models import Sequential | |
from keras.utils import to_categorical | |
from sklearn.utils.class_weight import compute_class_weight |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
from scipy.io import wavfile | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
import numpy as np | |
from keras.layers import Conv2D, MaxPool2D, Flatten, LSTM | |
from keras.layers import Dropout, Dense, TimeDistributed | |
from keras.models import load_model | |
from keras.utils import to_categorical | |
from sklearn.utils.class_weight import compute_class_weight |
OlderNewer