Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
from scipy import integrate | |
from numpy import array, linspace | |
from matplotlib import pyplot as plt | |
%matplotlib inline | |
xi = -0.1+1/3 | |
k1=0.1 | |
k_ggw=2**2*xi**3/((1/3-xi)*(2/3-2*xi)**2) | |
k2=k1/k_ggw | |
print('xi={:f}'.format(xi)) | |
print('K={:f}'.format(k_ggw)) |
This file contains hidden or 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
#include <time.h> | |
#include <stdlib.h> | |
#include <stdio.h> | |
#include <sys/stat.h> | |
int file_exists(const char *filename){ | |
struct stat buffer; | |
return (stat (filename, &buffer) == 0); | |
} |
This file contains hidden or 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
t=linspace(-5,5,30); | |
plot(... | |
t,mean(diff(t))*conv(... | |
heaviside(t-1), 2*exp(-t).*heaviside(t),'same'),... | |
t,2*heaviside(t-1).*(1-exp(1-t).*heaviside(t-1))); |
This file contains hidden or 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 matplotlib.pyplot as plt | |
import numpy as np | |
t=np.linspace(2,7,20) | |
plt.plot(t, -1-np.exp(-t/2)+2*np.exp(-(t-2)/2)-(1-1/np.exp(1)), | |
'o', t, (1/(2*np.exp(1))-1)*(t-2), '.', [min(t),max(t)],[-2+1/np.exp(1)]*2,'-') |
This file contains hidden or 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
x=1 | |
file=open('Daten.csv', mode='w') | |
file.write('sep= \n') | |
for line in open('Kalibrierung Spektren.Master.Absorbance'): | |
if x>19 and x<2068: | |
file.write(line.replace('.',',')) | |
x+=1 | |
file.close() |
This file contains hidden or 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 re | |
import os | |
import datetime | |
import time | |
from shutil import copyfile | |
regex_filename = \ | |
r'([0-9]{4})([0-9]{2})([0-9]{2})' + \ | |
'[\_|\-]([0-9]{2})([0-9]{2})([0-9]{2})' + \ | |
'.*(\.jpe?g|\.png)' + \ |
This file contains hidden or 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
for i in range(0,88): | |
print('In['+str(i)+']: '+In[i]) | |
if i in Out.keys(): | |
print('Out['+str(i)+']: '+str(Out[i])) |
This file contains hidden or 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 matplotlib import pyplot as plt | |
from scipy.integrate import odeint | |
from scipy.integrate import ode | |
def dydx(y, t0, epsilon): | |
dy0_dx = y[1] | |
dy1_dx = ((1-y[0]**2)*y[1]-y[0])/epsilon | |
return np.array([ | |
dy0_dx, |
This file contains hidden or 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
Show hidden characters
{ | |
"cmd": ["g++","-std=c++11","-Wall","*.cpp", "-I", | |
"../header","-o", "${file_path}/${file_base_name}", | |
"&&", | |
"${file_path}/${file_base_name}"], | |
"selector": "source.c++", | |
"shell": true | |
} |