There are 28 static site generators that support AsciiDoc sourcing.
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 sys | |
import subprocess | |
import re | |
def convert_to(folder, source, timeout=None): | |
args = [libreoffice_exec(), '--headless', '--convert-to', 'pdf', '--outdir', folder, source] | |
process = subprocess.run(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=timeout) | |
filename = re.search('-> (.*?) using filter', process.stdout.decode()) |
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 a directory of text files as google keep notes. | |
#Text Filename is used for the title of the note. | |
import gkeepapi, os | |
username = 'username@gmail.com' | |
password = 'your app password' | |
keep = gkeepapi.Keep() | |
success = keep.login(username,password) |
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
# Editors | |
.vscode/ | |
.idea/ | |
# Vagrant | |
.vagrant/ | |
# Mac/OSX | |
.DS_Store |
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 | |
def crappyhist(a, bins=50, width=140): | |
h, b = np.histogram(a, bins) | |
for i in range (0, bins): | |
print('{:12.5f} | {:{width}s} {}'.format( | |
b[i], | |
'#'*int(width*h[i]/np.amax(h)), | |
h[i], |
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
# first: mkdir user && cd user && cp /path/to/get_gists.py . | |
# python3 get_gists.py user | |
import requests | |
import sys | |
from subprocess import call | |
user = sys.argv[1] | |
r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
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
############################################################################# | |
# Full Imports | |
from __future__ import division | |
import math | |
import random | |
""" | |
This is a pure Python implementation of the K-means Clustering algorithmn. The | |
original can be found here: |
- Install cmder_mini (msysgit is already installed, so no need for full version)
- In Cmder, open settings:
Win + Alt + P
- Under Startup > Tasks, add a task called
{bash}
with the following settings:- Task parameters (set icon):
- For Cmder icon:
/icon "%CMDER_ROOT%\cmder.exe"
- For Git icon:
/icon "C:\Program Files (x86)\Git\etc\git.ico"
- For Cmder icon:
- Commands (open Git's bash shell):
- Task parameters (set icon):
"C:\Program Files (x86)\Git\bin\sh.exe" -l -new_console:d:%USERPROFILE%