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
| #!/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 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 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 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
| # coding: utf-8 | |
| # In[1]: | |
| import math | |
| import torch | |
| from torch.nn.parameter import Parameter | |
| import torch.nn.functional as F |
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 | |
| 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 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 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 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 | |
| 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 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
| 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 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
| { | |
| "description": "Basic client-server edition", | |
| "plugins": [ | |
| "tiddlywiki/tiddlyweb", | |
| "tiddlywiki/filesystem", | |
| "tiddlywiki/highlight" | |
| ], | |
| "themes": [ | |
| "tiddlywiki/vanilla", | |
| "tiddlywiki/snowwhite", |
NewerOlder