This file contains hidden or 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 __future__ import print_function | |
| class Word(object): | |
| def __init__(self, word): | |
| self.word = word | |
| def __str__(self): | |
| return str(self.word) | |
This file contains hidden or 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
| n=0 | |
| while n<101:n+=1;print('FizzBuzz'[n%-3&4:12&8-n%5]or n) |
This file contains hidden or 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
| """ | |
| A 3x3 Jeu-de-tacquin puzzle solver | |
| """ | |
| import sys | |
| import heapq | |
| WINNING_POS = "123456780" | |
This file contains hidden or 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 | |
| import numba | |
| MAX_ITER = 32 | |
| x_min, x_max = -2, 1 | |
| y_min, y_max = -2, 2 | |
| resolution_along_axis = 2 ** 13 | |
| # Note that the final image size will be resolution_along_axis ** 2 |
This file contains hidden or 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
| "Vundle Setup | |
| filetype off | |
| set rtp+=~/.vim/bundle/Vundle.vim | |
| call vundle#begin() | |
| Plugin 'christoomey/vim-tmux-navigator' | |
| call vundle#end() | |
| filetype plugin indent on | |
| set autoread | |
| """"""""""""""""""""" |
This file contains hidden or 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
| """ | |
| Implementation of a discrete quantum random walk | |
| Inspired by "Quantum Walks and their Algorithmic Applications" by Andris | |
| Ambainis, which you can find here: https://arxiv.org/abs/quant-ph/0403120 | |
| """ | |
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| def flip(state, parameters): |
This file contains hidden or 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 | |
| """ | |
| Implements a simple Markov text generator | |
| """ | |
| from __future__ import print_function | |
| from collections import Counter | |
| from string import ascii_uppercase as AU | |
| from sys import argv |