View mutual_info.py
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
''' | |
Non-parametric computation of entropy and mutual-information | |
Adapted by G Varoquaux for code created by R Brette, itself | |
from several papers (see in the code). | |
These computations rely on nearest-neighbor statistics | |
''' | |
import numpy as np |
View onstart.py
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
def monkey_patch_pandas(): | |
import pandas as pd | |
import functools | |
@functools.wraps(pd.Series.str.contains) | |
def _grep(self, *args, **kwargs): | |
if not hasattr(self, '_greppable'): | |
self._greppable = pd.Series(self.to_csv().split('\n')[1:-1]) | |
i = self._greppable.str.contains(*args, **kwargs) | |
return self.iloc[i.values] | |
pd.DataFrame.grep = _grep |
View deep_quantile_regression.py
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 functools | |
import numpy as np | |
import pandas as pd | |
import tensorflow as tf | |
import tensorflow.keras as keras | |
from pylab import * | |
ion() |
View deep_quantile_regression.py
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 functools | |
import numpy as np | |
import pandas as pd | |
import tensorflow as tf | |
import tensorflow.keras as keras | |
from pylab import * | |
ion() |
View ray_example.py
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 pandas as pd | |
import ray | |
import ray.tune | |
import ray.tune.track | |
import tensorflow as tf | |
import tensorflow.keras | |
def ray_init(load_code_from_local=False): | |
if not ray.is_initialized(): |
View pyarrow_memory_leak.py
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
""" | |
$ uname -a | |
Linux ip-??? ???-aws #53-Ubuntu SMP Wed Sep 18 13:35:53 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux | |
$ python --version | |
Python 3.7.3 | |
$ pip list | |
Package Version Location | |
--------------- --------- ----------------------------- | |
certifi 2019.9.11 | |
memory-profiler 0.55.0 |
View minimal_example.py
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
seed = 10 | |
import random | |
random.seed(seed) | |
import numpy as np | |
np.random.seed(seed) | |
import tensorflow as tf | |
tf.reset_default_graph() | |
tf.random.set_random_seed(seed) | |
import tensorflow.keras.backend as K |
View server.py
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
#!/usr/bin/env python | |
import tornado.ioloop | |
import tornado.web | |
import threading | |
import time | |
LISTEN_PORT = 8000 | |
class FancyStaticFileHandler(tornado.web.StaticFileHandler): |
View ipython deps
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
https://pypi.python.org/packages/source/a/appnope/appnope-0.1.0.tar.gz | |
https://pypi.python.org/packages/source/d/decorator/decorator-4.0.4.tar.gz | |
https://pypi.python.org/packages/source/f/filename_to_pypi.py/filename_to_pypi.py | |
https://pypi.python.org/packages/source/g/gnureadline/gnureadline-6.3.3.tar.gz | |
https://pypi.python.org/packages/source/i/ipython/ipython-4.0.0.tar.gz | |
https://pypi.python.org/packages/source/i/ipython_genutils/ipython_genutils-0.1.0.tar.gz | |
https://pypi.python.org/packages/source/p/path.py/path.py-8.1.2.tar.gz | |
https://pypi.python.org/packages/source/p/pexpect/pexpect-4.0.1.tar.gz | |
https://pypi.python.org/packages/source/p/pickleshare/pickleshare-0.5.tar.gz | |
https://pypi.python.org/packages/source/p/ptyprocess/ptyprocess-0.5.tar.gz |
View screenrc_a
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
# tabbing like terminal | |
bindkey -d \0331 select 0 | |
bindkey -d \0332 select 1 | |
bindkey -d \0333 select 2 | |
bindkey -d \0334 select 3 | |
bindkey -d \0335 select 4 | |
bindkey -d \0336 select 5 | |
bindkey -d \0337 select 6 | |
bindkey -d \0338 select 7 | |
bindkey -d \0339 select 8 |
NewerOlder