Skip to content

Instantly share code, notes, and snippets.

mihkell

Block or report user

Report or block mihkell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mihkell
mihkell / floydhub-push.sh
Last active Dec 12, 2018
FloydHub workflow supporting script. Allows me to run code on floydhub while developing in jupyter notebook and with low power computer.
View floydhub-push.sh
notebook_name=$1
project_name=$2
hostname=$3
if [ $(hostname) == $hostname ];
then
echo "worked"
clear
jupyter nbconvert --ClearOutputPreprocessor.enabled=True --inplace $notebook_name.ipynb
floyd run --gpu --env pytorch-0.4.0 --follow "jupyter nbconvert --execute --ExecutePreprocessor.timeout=-1 $notebook_name.ipynb"
floyd data clone dasmus/projects/$project_name/
@mihkell
mihkell / pytorch.py
Created Jun 23, 2018
Not working model
View pytorch.py
import numpy as np
import torch
import torch.nn as nn
import torchvision.transforms as transforms
from torchvision import datasets
torch.manual_seed(1)
class MnistModel(nn.Module):
View Tensorflow hashmap example.py
import numpy as np
import tensorflow as tf
input_tensor = tf.constant(1, dtype=tf.int64)
keys = tf.constant(np.array([1,2,3]), dtype=tf.int64)
values = tf.constant(np.array([4,5,6]), dtype=tf.int64)
default_value = tf.constant(-1, dtype=tf.int64)
table = tf.contrib.lookup.HashTable(
View .gitignore
.DS_Store
.idea
View dlnd_imageClassification.html
<!DOCTYPE html>
<html>
<head><meta charset="utf-8" />
<title>dlnd_image_classification</title><script src="https://unpkg.com/jupyter-js-widgets@2.0.*/dist/embed.js"></script><script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>
<style type="text/css">
/*!
*
* Twitter Bootstrap
@mihkell
mihkell / gist:408ccbeae8da0ee7366e22a2ece93c41
Last active Feb 20, 2017
Example of diagonal swap of graph
View gist:408ccbeae8da0ee7366e22a2ece93c41
import pandas as pd
import matplotlib.pyplot as plt
pd.set_option('display.max_columns', 500)
pd.set_option('display.width', 100000)
price = 'Price'
quantity = 'Quantity'
def make_table():
global price, quantity
table = pd.DataFrame({price:[1,3,3,2,5,6], quantity:[1,2,3,4,5,6]})
You can’t perform that action at this time.