Skip to content

Instantly share code, notes, and snippets.

View 3m3x's full-sized avatar

3m3x 3m3x

View GitHub Profile
@3m3x
3m3x / tidbits.py
Last active October 13, 2019 17:13
A motley crew of useful things you might want to do (in Python)
#
# Make 1024 binary numbers
#
import itertools
binary_numbers = [''.join(digits)
for digits in itertools.product(*[['0', '1'] for _ in range(10)])]
print(binary_numbers)
#
# Use types to enforce types of values used in an LRU cache
@3m3x
3m3x / useful_code_jupyter.py
Created August 26, 2019 10:05
Useful code for use in Jupyter
# Display more rows than the limit from a dataframe
with pd.option_context("display.max_rows", 1000):
display(my_data_frame)
@3m3x
3m3x / development.sh
Last active October 20, 2019 12:09
Setup scripts for my Ubuntu workstation
#!/bin/bash
set -euo pipefail # https://vaneyckt.io/posts/safer_bash_scripts_with_set_euxo_pipefail/
mkdir ~/src ~/bin
cd ~/src
#
# General tools
#
sudo add-apt-repository ppa:neovim-ppa/unstable