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 datetime import datetime | |
LINES = [ | |
'ITLISBFAMPM', | |
'ACQUARTERDC', | |
'TWENTYFIVE<X', | |
'HALFBTEN<FTO', | |
'PASTERUNINE', | |
'ONESIXTHREE', | |
'FOURFIVE>TWO', |
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
{ | |
"page": 1, | |
"limit": 50, | |
"explicit": false, | |
"total": 16, | |
"has_more": false, | |
"list": [{ | |
"id": "music", | |
"name": "Music", | |
"description": "Watch music videos, concerts, and interviews from artists in every genre, from hip-hop and rock to indie and electro. Live performances, news and exclusives." |
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
+02:00 # Correct | |
+04:00 # Wrong, it has been set to UTC+3 permanently on 26 October 2014: http://sputniknews.com/russia/20141026/194606015.html |
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 | |
""" | |
Facebook-Event-Stalking-Tool | |
""" | |
import urllib2, json, re | |
from types import NoneType | |
access_token = "your facebook 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
// | |
// CameraAvailable.h | |
// | |
// | |
// Created by Lukas Klein on 08-19-11. | |
// MIT Licensed | |
// Copyright (c) Lukas Klein | |
#import <foundation foundation.h=""> | |
#ifdef PHONEGAP_FRAMEWORK |
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 random, os, urllib, urllib2, time, getpass | |
from urlparse import urlparse | |
rootpass = getpass.getpass() | |
interface = "en0" | |
testurl = "http://www.google.com/robots.txt" | |
stringtotest = "User-agent: *" | |
def randomMAC(): | |
mac = [ 0x00, 0x16, 0x3e, |
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 django.conf import settings | |
def get_client_ip(request): | |
x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR') | |
if x_forwarded_for: | |
ip = x_forwarded_for.split(',')[0] | |
else: | |
ip = request.META.get('REMOTE_ADDR') | |
return ip |
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
docker: | |
image: jpetazzo/dind | |
privileged: true | |
environment: | |
- PORT=4444 | |
transcoder: | |
build: transcoder | |
restart: always | |
command: /usr/local/bin/gunicorn -w 2 -b :8000 app:app | |
links: |
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 json | |
english_json = open('english.json', 'r').read() | |
frequencies_english = json.loads(english_json) | |
frequencies_english_sorted = [] | |
for char in sorted(frequencies_english, key=frequencies_english.get, reverse=True): | |
frequencies_english_sorted.append({'char': char, 'frq': frequencies_english[char]}) | |
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 generate(code): | |
code_obj = compile(code, '<string>', 'exec') | |
code_ = code_obj.co_code | |
code = '' | |
for char in code_: | |
code += 'chr(' + str(hex(ord(char))) + ')+' | |
code = code[:-1] | |
return "type(make_secure)(code=type(make_secure.__code__)(%d,%d,%d,%d,%s,%s,%s,%s,'%s','%s',%d,'%s'),globals={})()" % (code_obj.co_argcount, code_obj.co_nlocals, code_obj.co_stacksize, code_obj.co_flags, code, str(code_obj.co_consts).replace(' ', ''), str(code_obj.co_names).replace(' ', ''), str(code_obj.co_varnames).replace(' ', ''), code_obj.co_filename, code_obj.co_name, code_obj.co_firstlineno, str(code_obj.co_lnotab)) | |
if __name__ == "__main__": |
OlderNewer