Skip to content

Instantly share code, notes, and snippets.

View oivvio's full-sized avatar

Oivvio Polite oivvio

View GitHub Profile
import curses
from random import choice
class Field:
def __init__(self, cols, rows):
self.cols = cols
self.rows = rows
self.data = [[0 for col in range(cols)] for row in range(rows)]
Traggla
TodayStartScreen
start -> PonderQuestion
PonderQuestion
wrongAnswer -> YouGotItWrong
rightAnswer -> YouNailedIt
noMoreQuestions -> DoneForToday
outOfTime -> DoneForToday
DoneForToday
@oivvio
oivvio / README.md
Last active April 23, 2018 08:06
Backspace does not work in nosetests/pdb when run with invoke

Backspace does not work in nosetests/pdb when run with invoke

I'm using python 3.6.5 on Ubuntu 18.04

I've created a virtualenviroment with the packages in requirements.txt.

I have a function to unittest in lib.py that drops into pdb.

When I start my unittest from the cli directly with nosetests --nocapture the pdb session works as expected.

def myadd(a, b):
print("Now when we drop into pdb, backspace will not work")
import pdb
pdb.set_trace()
return a + b
# Loop five second sample from a random mp3 in a folder you specify
# Needs sox and coreutils that you can install with http://brew.sh/ (if you're on a mac)
# so you need to run theses two:
# brew install sox
# brew install coreutils
#
# run in terminal like so
# bash ./playrandomaudio.sh "/path/to/folder/with/mp3s"
#
@oivvio
oivvio / .gitignore
Last active April 7, 2016 14:22
minimal typings electron
app.js
main.js
typings
node_modules
bundle.js
@oivvio
oivvio / .gitignore
Last active April 5, 2016 18:55
Minimal example with node and typings
typings
app.js
@oivvio
oivvio / .gitignore
Last active April 5, 2016 18:02
minimal example with node and tsd
typings
app.js
@oivvio
oivvio / gist:10852251
Created April 16, 2014 10:56
compressed audio in iOS
<html>
<head></head>
<body>
</body>
</html>