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
using UnityEngine; | |
using System.Collections; | |
using System; | |
public class HoverBob : MonoBehaviour { | |
float originalY; | |
public float floatSpeed = 1; | |
public float floatStrength = 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
import random | |
hash_tag_string = "" | |
description_text_string = "" | |
# return bool(random.getrandbits(1)) | |
# [subject]}, [prepositional details]}, [setting]}, [meta modifiers and artist] | |
# a beautiful symmetrical painting of a lighthouse at sunset, overlooking a calm ocean, as seen from below, by thomas kinkade | |
#"FORMULA": ["MEDIA_TYPES","THINGS","PLACES","VIEWPOINTS","ARTISTS","MODIFIERS"], |
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
showScene('Tester'); | |
mediaVol(15); | |
say("Good morning Eric, welcome to "+global('DAYW')+". Let me check the weather."); | |
//getLocation( 'net' ); | |
//var coords = global('LOCN').split(","); | |
var http = new XMLHttpRequest(); | |
//flashLong('http://api.openweathermap.org/data/2.5/find?lat='+coords[0]+'&lon='+coords[1]+'&units=imperial&mode=json'); | |
//http.open("GET",'http://api.openweathermap.org/data/2.5/find?lat='+coords[0]+'&lon='+coords[1]+'&units=imperial&mode=json&type=like',false); | |
http.open("GET",'http://api.openweathermap.org/data/2.5/find?q=brooklyn&units=imperial&mode=json&type=like',false); | |
http.send(); |
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
10;https://trello.com/b/ejFbDwWP/fridge-door | |
10;http://10.0.0.181:2202/ubooquity/comics/25819/?random=true | |
10;https://trello.com/b/omLiMCaX/house | |
10;http://10.0.0.181:32400/web/index.html | |
10;https://sharptools.io/dashboard/view/XeC32e8uq6XwNMgzW5wD | |
10;https://trello.com/b/raQF7oGp/recipes | |
20;https://www.ecobee.com/consumerportal/index.html#/devices/thermostats/311036220143/homeiq/diagnostics/system | |
10;https://photos.google.com/share/AF1QipMNFBoE8PfxvoOyg3CId_Vby4Ln_r6OGk8jTlPqGb6IEe4AgrhQhQLhJETKNr5sbA?key=OHJTcUlSVXE2UEYxWm5NeU95aFZlTml6WGN3bndn | |
10;http://10.0.0.181:3003/d/A4ESkhbMz/temp?orgId=1 | |
10;http://10.0.0.181:3003/d/oXkEf1xGz/iot?orgId=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
for i in *.pdf | |
do | |
if test -f "$i" | |
then | |
echo "Converting $i to ${i%.*}.cbz" | |
convert -density 150 "$i" -quality 90 output.png | |
zip -R "${i%.*}".cbz '*.png' | |
rm *.png | |
fi |
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 TweetScraper(object): | |
def scrape(self, query, when=None, tokens=None): | |
output = [] | |
if when == None: | |
when = (datetime.datetime.now() - datetime.timedelta(hours=24)).strftime('%Y-%m-%d') | |
for tweet in self.get_tweets_since(query, when, tokens): | |
blob = TextBlob(tweet['text']) | |
new_tweet = cm.Tweet(text=tweet['text'], url=tweet['id'], profile_image_url=tweet['user']['profile_image_url'], screen_name=tweet['user']['screen_name'], favourites_count=tweet['favorite_count'], retweet_count=tweet['retweet_count'], followers_count=tweet['user']['followers_count'], polarity=blob.polarity, subjectivity=blob.subjectivity) |
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
o.centerOriginToTopLeft = (x, y, w, h) =>{ | |
return new THREE.Vector2((w/2)-x, (h/2)-y); | |
}; | |
o.latLonToVector3 = (lat, lng, radius) => { | |
// convert latitude / longitude to angles between 0 and 2*phi | |
var phi = (90 - lat) * Math.PI / 180; | |
var theta = (180 - lng) * Math.PI / 180; | |
// Calculate the xyz coordinate from the angles |
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
using System; | |
using UnityEngine; | |
using System.Collections.Generic; | |
public static class DDD | |
{ | |
/* | |
MILKCRATE.ddd.latLongToVector3 = function(lat, lng, radius, h) | |
{ | |
// convert latitude / longitude to angles between 0 and 2*phi |
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 __future__ import division, unicode_literals | |
import math | |
from textblob import TextBlob as tb | |
from goose import Goose | |
def tf(word, blob): | |
return blob.words.count(word) / len(blob.words) | |
def n_containing(word, bloblist): | |
return sum(1 for blob in bloblist if word in blob) |
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 get_embedded(self, hierarchy, key, value, indexes=False): | |
"""get a list containing the ordered indexes of embedded documents. | |
A recursive depth first search replacing the nested for loops normally required | |
to iterate through nested objects contained within lists to find a single object | |
that has a specific value for a specific key. | |
Keyword Arguments: | |
hierarchy -- a list of keys needed to access the list containingthe next level of objects to search | |
key -- the string name of the member to match value too |
NewerOlder