My first pen. Just playing around with canvas and TweenMax. This is my first real foray into animation like stuff but I came up with what might be a pretty cool loading screen for a website.
A Pen by Austin Riba on CodePen.
My first pen. Just playing around with canvas and TweenMax. This is my first real foray into animation like stuff but I came up with what might be a pretty cool loading screen for a website.
A Pen by Austin Riba on CodePen.
private static class TocComparator implements Comparator<String>{ | |
public int compare(String s1, String s2){ | |
Integer s1front = Integer.parseInt(s1.substring(0, s1.indexOf('.'))); | |
Integer s2front = Integer.parseInt(s2.substring(0, s2.indexOf('.'))); | |
if(s1front.equals(s2front)){ | |
Integer f1ass = Integer.parseInt(s1.substring(s1.indexOf('.')+1)); | |
Integer f2ass = Integer.parseInt(s2.substring(s2.indexOf('.')+1)); | |
return f1ass.compareTo(f2ass); | |
} | |
else{ |
#!/usr/bin/python | |
import urllib2 | |
import urllib | |
import re | |
import getopt, sys, argparse | |
def getSongLyrics(artist, song): | |
songUrl = 'http://api.chartlyrics.com/apiv1.asmx/SearchLyricDirect?artist=%s&song=%s' % (urllib.quote_plus(artist), urllib.quote_plus(song)) | |
data = urllib2.urlopen(songUrl).read(); | |
p = re.compile('<Lyric>[a-zA-z].*?<\/Lyric>', re.DOTALL) |
import urllib, urllib2, subprocess, re, csv, pickle | |
from collections import OrderedDict | |
urls = [] | |
usessl = 0 | |
sites = OrderedDict() | |
CHECK = 1000 | |
with open('top-1m.csv', 'rb') as csvfile: | |
i = 0 | |
reader = csv.reader(csvfile) |
#!/bin/bash | |
#Converts images to text using tesseract (package tesseract-ocr & tesseract-ocr-eng) | |
function usage | |
{ | |
echo "img2txt -i <input directory> -o <output directory> --concat" | |
} | |
function concat | |
{ |
.factory('CacheFactory', ['$injector', function($injector){ | |
var cache = {}; | |
var cacheFactory; | |
cacheFactory = { | |
get: function(type, callback){ | |
if(!cache[type] || cache[type].length < 1){ | |
console.log("no cache"); | |
var factory = $injector.get(type); | |
factory.query({}, function(data, headers){ | |
cache[type] = data.results; |
getAccurateCurrentPosition = function (geolocationSuccess, geolocationError, geoprogress, options) { | |
var lastCheckedPosition, | |
locationEventCount = 0, | |
watchID, | |
timerID; | |
options = options || {}; | |
var checkLocation = function (position) { | |
lastCheckedPosition = position; |
set -g __fish_git_prompt_show_informative_status 1 | |
set -g __fish_git_prompt_hide_untrackedfiles 1 | |
set -g __fish_git_prompt_color_branch magenta bold | |
set -g __fish_git_prompt_showupstream "informative" | |
set -g __fish_git_prompt_char_upstream_ahead "↑" | |
set -g __fish_git_prompt_char_upstream_behind "↓" | |
set -g __fish_git_prompt_char_upstream_prefix "" | |
set -g __fish_git_prompt_char_stagedstate "●" |
import pyinotify | |
import asyncio | |
class EventHandler(pyinotify.ProcessEvent): | |
def process_IN_CREATE(self, event): | |
if not event.dir: | |
print("Got new file: ", event.pathname) | |
wm = pyinotify.WatchManager() # Watch Manager |
from django.db import models | |
from ast import literal_eval as make_tuple | |
from django.core.exceptions import ValidationError | |
import collections | |
def parse_tuple(box_tuple): | |
if len(box_tuple) != 2: | |
raise ValidationError("Box has exactly two points (NE, SW)") | |
if not all(isinstance(i, tuple) for i in box_tuple): |