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 pprint import pprint | |
from urllib2 import urlopen | |
from bs4 import BeautifulSoup | |
counts = {} | |
for letter in [chr(a) for a in xrange(ord('A'), ord('Z') + 1)] + ['intl']: | |
url = "http://www.openstack.org/community/members/?letter=%s" % (letter,) | |
soup = BeautifulSoup(urlopen(url).read()) |
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/bash | |
function __RETURN_CODE { | |
RETCODE=$? | |
case $RETCODE in | |
0) RETSTR=" 😈 " ;; | |
1) RETSTR=" 😭 " ;; | |
2) RETSTR=" 😱 " ;; |
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 socket | |
from kombu import Connection | |
host = "localhost" | |
port = 5672 | |
user = "guest" | |
password = "guest" | |
vhost = "/" | |
url = 'amqp://{0}:{1}@{2}:{3}/{4}'.format(user, password, host, port, vhost) | |
with Connection(url) as c: |
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
source of arduino: | |
/*************************************************************************** | |
* File Name: serial_MAX31865.h | |
* Processor/Platform: Arduino Uno R3 (tested) | |
* Development Environment: Arduino 1.0.5 | |
* | |
* Designed for use with with Playing With Fusion MAX31865 Resistance | |
* Temperature Device (RTD) breakout board: SEN-30202 (PT100 or PT1000) | |
* ---> http://playingwithfusion.com/productview.php?pdid=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
#!/usr/bin/env python | |
import flickrapi | |
import time | |
from pyslack import SlackClient | |
api_key = u'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
api_secret = u'YYYYYYYYYYYYYYYYYYY' | |
flickr = flickrapi.FlickrAPI(api_key, api_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
#!/usr/bin/python | |
# -*- coding: UTF-8 -*-# enable debugging | |
import cgitb | |
import sys | |
import json | |
import requests | |
import pprint | |
import codecs | |
import getpass |
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 | |
from gi.repository import GExiv2 | |
import pprint | |
exif = GExiv2.Metadata('test.jpg') | |
lat = exif.get_gps_latitude() | |
lon = exif.get_gps_longitude() | |
print "Latitude: %s" % lat | |
print "Longitude: %s" % lon |
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 sys | |
import time | |
import json | |
import requests | |
import pprint | |
import codecs | |
imgur_client = "6091596e15cc839" |
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 acquire_comments(username, imgur_client): | |
count = count_comments(username, imgur_client) | |
if ( count > 0): | |
print "count of commentary is %s" % count | |
pages = int(count / 50) | |
finger = 0 | |
f = codecs.open(username + ".csv", encoding='utf-8', mode='w+') | |
while ( finger < pages ): | |
header= {"Content-Type": "text", "Authorization": "Client-ID " + imgur_client} | |
r = requests.get("https://api.imgur.com/3/account/" + username + "/comments/newest/" + str(finger) + ".json", headers=header) |
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
# cat actions/restart.sls | |
include: | |
- jenkins.actions.stop | |
- jenkins.actions.start | |
# cat actions/start.sls | |
# Starts the tomcat service | |
tomcat_start: | |
service.running: | |
- name: tomcat |
OlderNewer