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 | |
from datetime import datetime | |
word = { | |
1: 'one', | |
2: 'two', | |
3: 'three', | |
4: 'four', | |
5: 'five', | |
6: 'six', |
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 argparse | |
from glob import glob | |
import os | |
import re | |
import sys | |
def parse_args(): | |
parser = argparse.ArgumentParser('Rename files using regex') |
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 | |
from imapclient import IMAPClient, SEEN | |
auth = { | |
# Enter your user name and password between the quotes below. | |
'username': 'USERNAME', | |
'password': 'PASSWORD', | |
'host': 'imap.gmail.com', | |
} |
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
(use format) | |
(define (beer-song n) | |
(format #t "~A bottle~:P of beer on the wall.~%" n) | |
(format #t "~A bottle~:P of beer.~%" n) | |
(print "Take one down.") | |
(print "Pass it around.") | |
(let ((n (- n 1))) | |
(if (> n 0) | |
(begin |
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/python3 | |
import random | |
import string | |
import argparse | |
parser = argparse.ArgumentParser(description='Random password generator. Defaults to 8 character passwords composed of alphanumeric characters') | |
parser.add_argument('passwd_length', type=int, default=8, nargs='?', | |
help='Length of password. Defaults to 8') | |
parser.add_argument('-s', '--special', action='store_true', | |
help='Use special characters') |
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
set nocompatible | |
syntax on | |
set background=dark | |
filetype off | |
set rtp+=~/.vim/bundle/Vundle.vim | |
call vundle#begin() | |
Plugin 'VundleVim/Vundle.vim' | |
" Plugin 'wincent/command-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
#!/usr/bin/python3 | |
import os | |
if os.geteuid() != 0: | |
print("It's a weird tree.") | |
else: | |
print(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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
if ($<) { | |
print "It's a weird tree.\n"; | |
} else { | |
print <<'EOF'; | |
_ __ | |
/ `\ (~._ ./ ) |
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 python | |
from heapq import * | |
import string | |
import sys | |
class WordNode: | |
def __init__(self, word, goal, distance, parent): | |
self.word = word | |
self.distance = distance |
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 perl | |
use strict; | |
use warnings; | |
my $string = "array downto function of repeat until begin else goto packed set var case end if procedure then while const file label program to with do for nil record type"; | |
my @reserved = split /\s+/, $string; | |
my $array = join ",", map { '"'.$_.'"' } @reserved; | |
$array = "{" . $array . "}"; |