Skip to content

Instantly share code, notes, and snippets.

@ruxi
ruxi / .gitignore
Created November 3, 2019 09:21 — forked from smoser/.gitignore
cloud-init ubuntu nocloud example with network config
*.img
*.raw
@ruxi
ruxi / FlowLayoutGist.py
Last active April 16, 2018 19:34
Plot horizontally in jupyter notebooks. source: https://stackoverflow.com/questions/21754976/
# source: https://stackoverflow.com/questions/21754976/
import numpy as np
from IPython.display import HTML
import io
import base64
class FlowLayout(object):
''' A class / object to display plots in a horizontal / flow layout below a cell '''
def __init__(self):
# source: https://stackoverflow.com/questions/21754976/
import numpy as np
from IPython.display import HTML
import io
import base64
class FlowLayout(object):
''' A class / object to display plots in a horizontal / flow layout below a cell '''
def __init__(self):
# source: https://stackoverflow.com/questions/21754976/
import numpy as np
from IPython.display import HTML
import io
import base64
class FlowLayout(object):
''' A class / object to display plots in a horizontal / flow layout below a cell '''
def __init__(self):
# source: https://stackoverflow.com/questions/21754976/
import numpy as np
from IPython.display import HTML
import io
import base64
class FlowLayout(object):
''' A class / object to display plots in a horizontal / flow layout below a cell '''
def __init__(self):
@ruxi
ruxi / opendata_liesure_winnipeg2018.ipynb
Created March 3, 2018 22:52
opendata hackathon 2018 (rough draft)
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ruxi
ruxi / jointplot_w_hue.py
Last active March 13, 2021 23:39
jointplot_w_hue
__author__ = "lewis.r.liu@gmail.com"
__copyright__ = "Copyright 2020, 2018, https://gist.github.com/ruxi/ff0e9255d74a3c187667627214e1f5fa"
__license__ = "MIT"
__version__ = "0.0.2"
# update: June 13, 2020
# created: Feb 19, 2018
# desc: seaborn jointplot with 'hue'
# prepared for issue: https://github.com/mwaskom/seaborn/issues/365
# resolved (22 Aug 2020): https://github.com/mwaskom/seaborn/pull/2210
@ruxi
ruxi / xgboost_gpu_build.txt
Last active December 5, 2020 08:08
how to build xgboost with gpu support
# install latest nvidia driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
# then go to device manager and dl newest driver
# nvidia-390 for linux >4.13.32 | there is a bug with <nvidia-390 & >linux 4.13.25
"""gitpath v2, modified
Copyright (c) 2017 github.com/ruxi
Copyright (c) 2015 Maximilian Nöthe
Licensed under the MIT
"""
import subprocess
import os.path
def gitpath(chdir = False):
"""change dirpath to git root directory, or use-rdefined path
@ruxi
ruxi / DictOptions2Combos.py
Last active September 26, 2017 07:08
combinations (tuple of dicts) from possible options (dict with lists)
#!/usr/bin/env python
"""
Author: https://github.com/ruxi
Date Created: Tuesday, 26 Sep 2017
last updated: Tuesday, 26 Sep 2017
Python Version: 3.6
"""
__author__ = "https://github.com/ruxi"
__date_created__ = "Tuesday, 26 Sep 2017"