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/python | |
# -*- coding: utf-8 -*- | |
ERROR_CODES = { | |
11607: {'long': 'A successful transaction has already been completed for this token.', | |
'short': 'Duplicate Request'}, | |
12302: {'long': 'This transaction already has a PayPal dispute filed', | |
'short': 'Dispute Refund Not Allowed'}, | |
81243: {'long': 'RefundType : Invalid parameter', |
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
map.defineObject('bl_up', { | |
'type': 'dynamic', | |
'symbol': '.', | |
'color': 'yellow', | |
'interval': 100, | |
'projectile': true, | |
'behavior': function (me) { | |
me.move('up'); | |
} | |
}); |
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
def convert_dict_to_update(dictionary, roots=None, return_dict=None): | |
""" | |
Returns a new dict that can be used in Document.update(**dict), | |
this is used for updating MongoEngine documents with dictionary | |
serialized from json. | |
>>> data = {'email' : 'email@example.com'} | |
>>> convert_dict_to_update(data) | |
{'set__email': 'email@example.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
import datetime | |
import json | |
import time | |
import requests | |
API_KEY = '' | |
from_date = datetime.datetime(2014, 4, 4, 0, 0) | |
end_date = datetime.datetime(2014, 4, 7, 0, 0) |
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
API_RECURSION_LIMIT = 5 | |
def get_stories(object_id): | |
token = facebook.get_app_access_token(APP_ID, APP_SECRET) | |
graph = facebook.GraphAPI(token) | |
def get_interesting_stories(until=None, since=None, recursion_level=0): | |
"""Recursive function that digs all the interesting stories till the recursion level is reached""" | |
api_parameters = { | |
'id': '{page_id}/feed'.format(page_id=object_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
import facebook | |
import os | |
import sh | |
from slugify import slugify | |
oauth_access_token = '' | |
root = '/debatovani.cz/albums' | |
graph = facebook.GraphAPI(oauth_access_token) |
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
gsettings set org.gnome.desktop.background picture-uri file:///home/visgean/.trianglify_background.svg |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
# <nbformat>3.0</nbformat> | |
# <codecell> | |
matrix=[[1,2,3,4,5], | |
[6,7,8,9,10], | |
[11,12,13,14,15], | |
[16,17,18,19,20], | |
[21,22,23,24,25] |
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
wget https://sslimgs.xkcd.com/comics/now/{00..23}h{00,15,30,45}m.png | |
convert -delay 20 -loop 0 *.png wheee.gif |