Skip to content

Instantly share code, notes, and snippets.

View draperjames's full-sized avatar

James Draper draperjames

View GitHub Profile
@draperjames
draperjames / how_to_change_grub_default.txt
Created August 27, 2017 16:26
How to change grub default settings.
# First navigate to the /ect/default
cd /ect/default
# Then open grub in nano
sudo nano grub
# Change the defaults then press command X save and exit nano.
sudo update-grub
@draperjames
draperjames / py27.yml
Created August 22, 2017 20:13
Python 2.7 conda env
name: py27
channels:
- conda-forge
- anaconda-fusion
- defaults
dependencies:
- backports=1.0=py27_0
- backports_abc=0.5=py27_0
- colorama=0.3.9=py27_0
- cycler=0.10.0=py27_0
@draperjames
draperjames / .gitconfig
Last active August 17, 2017 16:50 — forked from phproberto/.gitconfig
My git config file
[color]
status = auto
diff = auto
branch = auto
interactive = auto
ui = true
[alias]
amend = !"git commit --amend -C HEAD"
st = status
ci = commit
@draperjames
draperjames / README.md
Created August 14, 2017 15:05 — forked from hofmannsven/README.md
My simply Git Cheatsheet
@draperjames
draperjames / ipywidgets_selection_container_as_dict.ipynb
Created August 8, 2017 20:52
ipywidgets _SelectionContainer.as_dict
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@draperjames
draperjames / jslinked_upload_and_run_widgets.ipynb
Created August 3, 2017 21:59
ipywidgets upload files and run somekind of process on them
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@draperjames
draperjames / jslink_cant_sync_subclassed_button_widgets.ipynb
Last active August 3, 2017 21:30
jslink cant sync subclassed button widgets
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@draperjames
draperjames / timestamp_widget.py
Created June 15, 2017 14:55
ipywidgets timestamp for your Jupyter Notebook
from datetime import datetime
from ipywidgets import widgets
from dominate import tags
def timestamp():
"""Return a ipywidget timestamp."""
ts = tags.h4("{:%I:%M:%S %p %A %B %d %Y}".format(datetime.now()))
ts_widget = widgets.HTML(ts.render())
return ts_widget
@draperjames
draperjames / jupyter_notebook_select_files_button.py
Created May 22, 2017 14:00
Select files button for Jupyter notebook
import traitlets
from IPython.display import display
from ipywidgets import widgets
from tkinter import Tk, filedialog
class SelectFilesButton(widgets.Button):
"""A file widget that leverages tkinter.filedialog."""
def __init__(self, *args, **kwargs):