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
/* | |
* Oscilloscope | |
* Gives a visual rendering of analog pin 0 in realtime. | |
* | |
* This project is part of Accrochages | |
* See http://accrochages.drone.ws | |
* | |
* (c) 2008 Sofian Audry (info@sofianaudry.com) | |
* | |
* This program is free software: you can redistribute it and/or modify |
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
#!/bin/sh | |
# This is a skeleton of a bash daemon. To use for yourself, just set the | |
# daemonName variable and then enter in the commands to run in the doCommands | |
# function. Modify the variables just below to fit your preference. | |
daemonName="DAEMON-NAME" | |
pidDir="." | |
pidFile="$pidDir/$daemonName.pid" |
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
class Graph: | |
def __init__(self): | |
self.nodes = set() | |
self.edges = defaultdict(list) | |
self.distances = {} | |
def add_node(self, value): | |
self.nodes.add(value) | |
def add_edge(self, from_node, to_node, distance): |
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.contrib.auth import get_user_model | |
from rest_framework import status, serializers | |
from rest_framework.decorators import api_view | |
from rest_framework.response import Response | |
class UserSerializer(serializers.ModelSerializer): | |
class Meta: | |
model = get_user_model() |
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
#!/home/drspock/scripts/FBInvite/bin/python | |
import argparse | |
import requests | |
import pyquery | |
def login(session, email, password): | |
''' | |
Attempt to login to Facebook. Returns user ID, xs token and |
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 sys, urllib, urllib2, cookielib | |
class FacebookLogin(object): | |
def __init__(self,user,passw): | |
self.user=user | |
self.passw=passw | |
self.browser = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookielib.CookieJar())) | |
self.browser.addheaders=[('User-agent', 'Mozilla/5.0 (Windows NT 6.1; WOW64; rv:6.0) Gecko/20100101 Firefox/6.0')] | |
urllib2.install_opener(self.browser) |
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 base64 | |
import flask | |
import urllib.parse | |
import requests | |
app = flask.Flask(__name__) | |
APP_ID = "ID" | |
APP_SECRET = "SECRET" |
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
{ | |
"object_type": "profile", | |
"friends": false, | |
"friendship_pending_request": true, | |
"already_verified": false, | |
"photos": [], | |
"verifications": [], | |
"friendships": [], | |
"profile_data": { | |
"id": 7, |
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
{ | |
"object_type": "profile", | |
"friends": true, | |
"friendship_pending_request": false, | |
"already_verified": false, | |
"photos": [ | |
{ | |
"url": "https://www.omniitworld.com/img/team5.jpg" | |
} | |
], |
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
{ | |
"single": null, | |
"couple": { | |
"id_person_one": { | |
"profiletype": 0, | |
"nickname": "foo08", | |
"picture": "https://foo34.jpg", | |
"country": "México", | |
"spot": "Aguascalientes", | |
"city": "Aguascalientes", |
OlderNewer