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
" This scheme was created by CSApproxSnapshot | |
" on Sun, 12 Feb 2012 | |
hi clear | |
if exists("syntax_on") | |
syntax reset | |
endif | |
if v:version < 700 | |
let g:colors_name = expand("<sfile>:t:r") |
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 matplotlib.pyplot as plt | |
from matplotlib.ticker import StrMethodFormatter | |
darkgray = "#4c4c4c" | |
def barh( | |
series, | |
label_fmt, |
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
from lxml import etree | |
import re | |
# Export thesaurus pages from <https://en.wiktionary.org/wiki/Special:Export> | |
infile = "Wiktionary-20200814035046.xml" | |
outfile = "/home/alex/.vim/wikisaurus-2020-08-13.txt" | |
entries = [] | |
def iterate_xml(xml_file): |
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 python3 | |
import pandas as pd | |
import matplotlib.pyplot as plt | |
from matplotlib.dates import MonthLocator | |
plt.style.use("alex") | |
# Read in & parse data | |
nyt = pd.read_csv("https://raw.githubusercontent.com/nytimes/covid-19-data/master/us-counties.csv", parse_dates=["date"]) |
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
# To use: | |
# 1. Place in ~/.config/matplotlib/stylelib/ | |
# 2. In Python file: plt.style.use("alex") | |
# Text formatting | |
font.family : Linux Libertine O | |
axes.unicode_minus : True | |
figure.titlesize : 12 | |
axes.titlesize : 12 | |
axes.labelsize : 12 |
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 Rscript | |
library(ggplot2) | |
library(dplyr) | |
library(lubridate) | |
library(moments) | |
pdf("test.pdf", width=7, height=5) | |
kickstarter <- read.csv("DSI_kickstarterscrape_dataset.csv", header=T) |
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
% PDF output: http://people.fas.harvard.edu/~klapheke/pythagorean.pdf | |
% Sources: | |
% 1. <https://en.wikipedia.org/wiki/Pythagorean_theorem> | |
% 2. <http://www.faculty.umb.edu/gary_zabel/Courses/Phil%20281b/Philosophy%20of%20Magic/Arcana/Neoplatonism/Pythagoras/index.shtml.html> | |
% 3. <https://www.cut-the-knot.org/pythagoras/index.shtml> | |
% 4. <https://math.stackexchange.com/questions/803/what-is-the-most-elegant-proof-of-the-pythagorean-theorem> | |
% 5. <https://math.stackexchange.com/questions/540415/what-is-the-simplest-proof-of-the-pythagorean-theorem-you-know?noredirect=1> | |
% 6. <https://math.stackexchange.com/questions/675522/whats-the-intuition-behind-pythagoras-theorem?noredirect=1> | |
% 7. Mathologer: <https://www.youtube.com/watch?v=p-0SOWbzUYI> |
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 runhaskell | |
import Control.Applicative | |
import System.Environment | |
-- Usage: $ ./rowbalance.hs ./items | |
-- Writes file ./items-balanced.csv | |
main :: IO () | |
main = do arg <- head <$> getArgs | |
file <- lines <$> readFile arg | |
items <- return $ case square $ length file of |
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
#!/bin/bash | |
# Template for Nemo scripts. | |
# Place in $HOME/.local/share/nemo/scripts/ | |
# For Nautilus: s/NEMO/NAUTILUS/g | |
export IFS=$'\n' | |
curpath=${NEMO_SCRIPT_CURRENT_URI#file://} | |
files=$NEMO_SCRIPT_SELECTED_FILE_PATHS | |
cd "$curpath" |
NewerOlder