Skip to content

Instantly share code, notes, and snippets.

@Tormyst
Tormyst / algorithm.tex
Created October 18, 2017 21:40
a cheat sheet
\documentclass[10pt,landscape]{article}
\usepackage{multicol}
\usepackage{enumitem}
\usepackage{calc}
\usepackage{ifthen}
\usepackage{listings}
\usepackage[landscape]{geometry}
\usepackage{hyperref}
\usepackage{graphicx}
\usepackage{booktabs}
@Tormyst
Tormyst / fix_ragraph.md
Last active October 18, 2017 17:25
Fix that worked for me to install ragraph

install packages

sudo apt-get install librrds-perl libcgi-pm-perl

sudo edit the file located at which ragraph

Make these changes near the top of the file:

...
 # Used modules
@Tormyst
Tormyst / mark_chain.py
Created September 19, 2017 02:51
Basic version of mark_chain. I will get it ready for git hub probably soon.
import sys
import re
import random
regex = re.compile(r"[\w'’]+ ?|Mr\.|[\".!?]+", re.IGNORECASE & re.UNICODE)
punc = re.compile(r"[.!?]+", re.UNICODE)
def process_word(last, word, chain, totals):
if last not in chain:
chain[last] = {}
@Tormyst
Tormyst / help.md
Last active January 25, 2017 19:29
A handy guide to the most basic commands of git that you might find yourself in need of.

clone

git clone <URL>

Gets a local copy of a repository from the web.

log

git log

Shows a list of all commits to get to where you are now.

git checkout

git checkout <commit number>