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
angular.module('webApp.directives', []) | |
// user as file-select="image" | |
.directive('fileSelect', ['$q', function($q) { | |
return function($scope, $elem, attrs) { | |
var openFileInput = function() { | |
// gets or creates an input on the DOM. | |
var id = '__global_file_input' | |
, html = '<input type="file" id="' + id + '" style="display:none" />' | |
, input = angular.element('#' + id) |
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
{ | |
"webpage": { | |
"title": "Stackoverflow" | |
}, | |
"cover_artists": [ | |
{ | |
"name": "Ozzy", | |
"nicknames": ["Ozzman", "Ozzster"] | |
}, | |
{ |
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
from collections import defaultdict, deque | |
def find_number_universe(keylog): | |
numbers = set() | |
for attempt in keylog: | |
for num in attempt: | |
numbers.add(num) | |
return numbers |
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
### Keybase proof | |
I hereby claim: | |
* I am alexmic on github. | |
* I am alexmic (https://keybase.io/alexmic) on keybase. | |
* I have a public key ASBJlx8-MALgeEzpRMR4ItUwCq1N2t9rvwH706qs8ZJmpwo | |
To claim this, I am signing this object: |
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
""" | |
py.test demo | |
~~~~~~~~~~~~ | |
#yolo | |
""" | |
from pytest import raises, mark, fixture | |
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 os | |
import pytest | |
from alembic.command import upgrade | |
from alembic.config import Config | |
from project.factory import create_app | |
from project.database import db as _db | |
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
from operator import itemgetter | |
from PIL import Image, ImageDraw, ImageFont | |
# Make a lowercase + uppercase alphabet. | |
alphabet = 'abcdefghijklmnopqrstuvwxyz' | |
alphabet += ''.join(map(str.upper, alphabet)) | |
# We'll use Helvetica in big type. |
OlderNewer