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
for number in {1..10} | |
do | |
echo $number | |
img=$(curl -s https://frinkiac.com/api/random | jq -r '"https://frinkiac.com/img/"+.Episode.Key+"/"+(.Frame.Timestamp|tostring)+".jpg"') | |
curl -s $img > ./$number.jpg | |
done |
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
scikit-learn==0.19.0 | |
geopy==1.11.0 | |
numpy==1.13.1 | |
scipy==0.19.1 |
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 -*- | |
import facebook | |
import datetime | |
import urlparse | |
import json | |
import traceback | |
import time | |
import re | |
# get an auth token with feed reading permissions from https://developers.facebook.com/tools/explorer/ |
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
var artist = $('.profile h1 span').first().text().replace(/\n/g,"").replace(/\s\s+/g,""); | |
var release = $('.profile h1 span').last().text().replace(/\n/g,"").replace(/\s\s+/g,""); | |
var label = $('.profile .content').first().text().replace(/\n/g,"").replace(/\s\s+/g,""); | |
var releasedate= $('.profile .content:eq(3)').text().replace(/\n/g,"").replace(/\s\s+/g,""); | |
var style = $('.profile .content:eq(5)').text().replace(/\n/g,"").replace(/\s\s+/g,""); | |
// if releasedate has full date, get just the year; | |
if(releasedate.length>4){; | |
releasedate = releasedate.slice(-4); | |
}; | |
var url = document.location.toString(); |
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 csv | |
import time | |
sample=csv.reader(open("/vedurmaelingar-a-islandi.csv","r")) | |
# gögnin eru á forminu: | |
# ["YYYY-mm-dd H:M:S", hámarkshitastig, lágmarkshitastig, úrkoma] dæmi: | |
# ["2002-04-25 18:00:00", "3.9", "1.8", "0.5"] | |
frost=[] | |
notfrost=[] | |
for row in sample: | |
aday=time.strptime(row[0],"%Y-%m-%d %H:%M:%S") |
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
function FBNotificationsPrank(){ | |
document.getElementById('fbNotificationsJewel').className = document.getElementById('fbNotificationsJewel').className + " hasNew"; | |
document.getElementById('notificationsCountValue').innerHTML = 1; | |
document.title = "(1) Facebook"; | |
setTimeout(FBNotificationsPrank, 10000); | |
} | |
FBNotificationsPrank(); |
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 urllib2 | |
import re | |
import json | |
def find_review_links(html): | |
re.VERBOSE | |
# some reviews are listed with the rating in a span tag: <span class="grey">4</span> | |
span_re = re.compile(r'''span\sclass=\"?grey\"?\>(\d\.?\d?)''', re.UNICODE | re.IGNORECASE | re.VERBOSE) | |
review_ratings = span_re.findall(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
(* | |
Set the bpm value of the current iTunes track to the bpm value of the counter http://www.all8.com/tools/bpm.htm or a selected number | |
written by Karl Tryggvason www.karltryggvason.com / @karltryggvason | |
*) | |
if appIsRunning("Google Chrome") then | |
tell application "Google Chrome" | |
if (get URL of active tab of first window) is equal to "http://www.all8.com/tools/bpm.htm" then |
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
'''Sublime Text 2 plugin for inserting the line numbers of a text document or a selection within it ''' | |
import sublime | |
import sublime_plugin | |
class InsertLineNumbersCommand(sublime_plugin.TextCommand): | |
def run(self, edit): | |
selected_region = self.view.sel()[0] | |
if selected_region.size() == 0: |