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
{ | |
"description": "Basic client-server edition", | |
"plugins": [ | |
"tiddlywiki/tiddlyweb", | |
"tiddlywiki/filesystem", | |
"tiddlywiki/highlight" | |
], | |
"themes": [ | |
"tiddlywiki/vanilla", | |
"tiddlywiki/snowwhite", |
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
function res = dydt(t,y,S, w) | |
indices2={[1,5], [11], [11], [2,5], [12], [12], [5,13], [12,6], [3,9], [14], [14], [4,9], [15], [15], [7,7], [12], [2,6], [13], [10,6], [16], [10,13], [17], [17], [8], [7], [6], [4], [3]}; | |
% w=ones(28,1); | |
% w=randn(28,1); | |
v = w; | |
for j=1:28 | |
for i=indices2{j} | |
v(j) = v(j) * y(i); | |
end | |
end |
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 gym | |
import matplotlib.pyplot | |
from math import * | |
import tensorflow as tf | |
from keras.layers import Input, Dense, concatenate | |
from keras.models import Sequential, Model | |
env = gym.make('CartPole-v1') |
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 random | |
from deap import creator, base, tools, algorithms | |
from scoop import futures | |
toolbox = base.Toolbox() | |
toolbox.register("map", futures.map) | |
creator.create("FitnessMax", base.Fitness, weights=(1.0,)) | |
creator.create("Individual", list, fitness=creator.FitnessMax) | |
number_of_parameters = 100 | |
size_of_population = 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 matplotlib.pyplot as plt | |
import numpy as np | |
from matplotlib.collections import LineCollection | |
%matplotlib inline | |
def find_intersection(p1,p2,coord): | |
if coord == 1: coord2 = 2 | |
if coord == 2: coord2 = 1 |
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 | |
import sys | |
# os.environ["PYSPARK_PYTHON"]="/usr/local/shared/python/3.6.3/bin/python3" | |
# os.environ["PYSPARK_DRIVER_PYTHON"]="/usr/local/shared/python/3.6.3/bin/python3" | |
#pip3 install pyspark | |
from pyspark import SparkContext | |
sc = SparkContext.getOrCreate() | |
print(sc._jsc.sc().getExecutorMemoryStatus()) |
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
#!/bin/bash | |
comp=$(hostname) | |
url=$(curl -s 127.0.0.1:4040/api/tunnels | jq -r '.tunnels[0].public_url') | |
curl -X POST -H "Content-Type: application/json" -d '{"value1":"'${url}'","value2":"'${comp}'"}' https://maker.ifttt.com/trigger/ngrok_url/with/key/[iftt key] | |
echo |
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 | |
import sys | |
import pandas as pd | |
if not os.path.exists("floofs"): | |
os.mkdir("floofs") | |
d = pd.read_csv("e621_"+sys.argv[1]+".csv") | |
d=d[d["rating"]=="s"] | |
import urllib.request |
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
sudo apt-get update | |
sudo apt-get install libcr-dev mpich | |
#apt install python3-pip | |
#pip3 install tensorflow | |
pip3 install mpi4py pandas torch torchvision GPy matplotlib tensorflow_probability==0.7 keras | |
sudo apt-get install htop | |
#then edit the GPy file. should send them a pull request.. |
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 plotly.plotly as py | |
from plotly.graph_objs import * | |
def nice_2dhist(x,y,nbins,title='title',xlabel='x',ylabel='y',filename='nice-hist.png'): | |
py.sign_in(username='guillefix', api_key='mflFpFhvUHtAfpGXbKkv') | |
trace1 = { | |
"x": x, | |
"y": y, | |
"marker": { |
OlderNewer