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 | |
import os | |
import sys | |
import datetime | |
import time | |
import logging | |
try: | |
import MySQLdb 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
#!/usr/bin/env python | |
import pika | |
import time | |
credentials = pika.credentials.PlainCredentials('guest', 'guest') | |
parameters = pika.ConnectionParameters( | |
host="127.0.0.1", | |
credentials=credentials) | |
connection = pika.BlockingConnection(parameters) | |
channel = connection.channel() |
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
# hämta ut en array med dina likeade urlar | |
if($urls){ | |
foreach($urls as $url){ | |
# fetch stats from fb | |
$fbdata = @json_decode($this->curl->simple_get('http://api.facebook.com/restserver.php?method=links.getStats&urls='.$url.'&format=json')); | |
$likes = $fbdata ? $fbdata[0]->total_count : 0; | |
# uppdatera denna marker med hur många likes den har i databasen. nya värdet på likes finns i: $likes |
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
stoppa in detta i ditt tweetdeck under preferences > global filter. | |
#melo2012, #mel2012, #dif, #twittboll, #mel12012, #melodifestivalen, #mel2012, #melfest, #mel21012, #melfest2012, melodifestivalen, sean banan, ranelid, flinck |
NewerOlder