This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 EmbeddedMixin(object): | |
def get_embedded(self, hierarchy, key, value, depth=0, indexes=False): | |
index = 0 | |
domain = hierarchy.pop(0) | |
if len(hierarchy) == 0: | |
for embedded in self[domain]: | |
if embedded[key] == value: | |
if indexes == True: | |
return [index] |
NewerOlder