start new:
tmux
start new with session name:
tmux new -s myname
| """ | |
| "PyTorch must serve man, not rule over him" (c) DAO | |
| A module for simple conversion between numpy and torch types. | |
| Created out of frustration from lines like: | |
| - x = Variable(torch.FloatTensor(x)).cuda() # now var(x, 'float32') | |
| - (model(x).max(1)[1].data.cpu().numpy() == y).mean() # now numpy(x) | |
| """ | |
| import torch | 
| """Simple example on how to log scalars and images to tensorboard without tensor ops. | |
| License: BSD License 2.0 | |
| """ | |
| __author__ = "Michael Gygli" | |
| import tensorflow as tf | |
| from StringIO import StringIO | |
| import matplotlib.pyplot as plt | |
| import numpy as np | 
| import pandas as pd | |
| def _map_to_pandas(rdds): | |
| """ Needs to be here due to pickling issues """ | |
| return [pd.DataFrame(list(rdds))] | |
| def toPandas(df, n_partitions=None): | |
| """ | |
| Returns the contents of `df` as a local `pandas.DataFrame` in a speedy fashion. The DataFrame is | |
| repartitioned if `n_partitions` is passed. | 
| #!/bin/bash | |
| ##################################################### | |
| # Name: Bash CheatSheet for Mac OSX | |
| # | |
| # A little overlook of the Bash basics | |
| # | |
| # Usage: | |
| # | |
| # Author: J. Le Coupanec | |
| # Date: 2014/11/04 | 
| toJson --- | |
| Original Java object : ModelObject [name=myname, val=12, status=true, f=2.3] | |
| Converted JSON string is : {"name":"myname","val":12,"status":true,"f":2.3} | |
| fromJson---- | |
| Original JSON string is : {"name":"myname","val":12,"status":true,"f":2.3} | |
| Converted Java object : ModelObject [name=myname, val=12, status=true, f=2.3] |