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/sh | |
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc | |
case "$1" in | |
start) | |
echo "Starting noip2." | |
/usr/local/bin/noip2 | |
;; | |
stop) | |
echo -n "Shutting down noip2." |
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 tensorflow as tf | |
import time | |
# Import MNIST data | |
from tensorflow.examples.tutorials.mnist import input_data | |
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True) | |
# Parameters | |
learning_rate = 0.001 | |
training_iters = 200000 |
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/sh | |
# . /etc/rc.d/init.d/functions # uncomment/modify for your killproc | |
case "$1" in | |
start) | |
echo "Starting noip2." | |
/usr/local/bin/noip2 | |
;; | |
stop) | |
echo -n "Shutting down noip2." | |
killproc -TERM /usr/local/bin/noip2 |
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
mask_img = np.array(Image.open(mask.file, mode='r').convert('1')) | |
# Absolute WSI coordinates | |
dx = max(patch_x, mask.x) | |
dx2 = min(patch_x + self.crop_size, mask.x + mask.width) | |
dy = max(patch_y, mask.y) | |
dy2 = min(patch_y + self.crop_size, mask.y + mask.height) | |
# Make the coordinates relative to the mask position | |
dx = dx - mask.x |
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
Traceback (most recent call last): | |
File "/Users/Ekami/Programs/anaconda/envs/dl/lib/python3.6/site-packages/django/core/handlers/exception.py", line 35, in inner | |
response = get_response(request) | |
File "/Users/Ekami/Programs/anaconda/envs/dl/lib/python3.6/site-packages/django/core/handlers/base.py", line 128, in _get_response | |
response = self.process_exception_by_middleware(e, request) | |
File "/Users/Ekami/Programs/anaconda/envs/dl/lib/python3.6/site-packages/django/core/handlers/base.py", line 126, in _get_response | |
response = wrapped_callback(request, *callback_args, **callback_kwargs) | |
File "/Users/Ekami/Programs/anaconda/envs/dl/lib/python3.6/site-packages/django/views/generic/base.py", line 69, in view | |
return self.dispatch(request, *args, **kwargs) | |
File "/Users/Ekami/Programs/anaconda/envs/dl/lib/python3.6/site-packages/django/views/generic/base.py", line 89, in dispatch |
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
Error: Failed to start algorithm - Traceback (most recent call last): | |
File "/opt/algorithm/bin/pipe.py", line 14, in <module> | |
algorithm = __import__('src.'+config['algoname'], fromlist=["apply"]) | |
File "/opt/algorithm/src/srgan_algorithmia.py", line 6, in <module> | |
from torchlite.eval import eval | |
File "/opt/algorithm/dependencies/torchlite/eval/eval.py", line 5, in <module> | |
from torchlite.data.datasets.srgan import EvalDataset | |
File "/opt/algorithm/dependencies/torchlite/data/datasets/srgan.py", line 3, in <module> | |
import torchlite.nn.transforms as ttransforms | |
File "/opt/algorithm/dependencies/torchlite/nn/transforms.py", line 20, in <module> |
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 requests | |
from io import BytesIO | |
import Algorithmia | |
from Algorithmia.acl import ReadAcl | |
from torchlite.eval import eval | |
from pathlib import Path | |
from PIL import Image | |
import uuid |
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 requests | |
from io import BytesIO | |
import Algorithmia | |
from Algorithmia.acl import ReadAcl | |
from torchlite.eval import eval | |
from pathlib import Path | |
from PIL import Image | |
import uuid |
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 gym | |
from gym import wrappers | |
env = gym.make('CartPole-v0') | |
env = wrappers.Monitor(env, '/tmp/cartpole-experiment-1', force=True) | |
for i_episode in range(20): | |
observation = env.reset() | |
for t in range(100): | |
env.render() |
NewerOlder