Skip to content

Instantly share code, notes, and snippets.

View sinanatra's full-sized avatar

Giacomo Nanni sinanatra

View GitHub Profile
@sinanatra
sinanatra / TEXT-VISUALISATION
Last active June 21, 2018 07:59
TEXT-VISUALISATION
PFont font;
float fh = 10, deltaY = fh+0.3; // 209927 //161598
float x, y;
String[] text;
ArrayList<PVector> word1 = new ArrayList<PVector>();
ArrayList<PVector> word2 = new ArrayList<PVector>();
// arial narrow fh+03 fh= 8.45
import codecs
import urllib, re
import requests
import urllib.request
import datetime
import lxml.html
import os
import time
from bs4 import BeautifulSoup
import wikipedia
import io
import urllib.request
from PIL import Image
import time
languages = [ "aa", "ab", "ady" , "ady-cyrl" , "aeb" , "af" ,
"ak" , "aln" , "als" , "am" , "an" , "ang" , "anp" , "ar" , "arc" , "arn" , "arq" , "ary" , "arz" , "as" , "ase" , "ast" , "atj" , "av" , "avk" , "awa" ,"ay" , "az" , "azb" ,"ba" , "ban" , "bar" , "bat-smg" , "bbc" "bbc-latn" , "bcc" ,"bcl" , "be" , "be-tarask" , "bgn" ,"bh" , "bho" , "bi" , "bjn" , "bm" , "bn" , "bo" ,"bpy" , "bqi" , "br" , "brh" , "bs" ,"bto" , "bug" , "bxr" , "ca" , "cbk-zam" , "cdo" , "ce" , "ceb" ,"ch" , "cho" , "chr" ,"chy" , "ckb" ,"co" , "cps" , "cr" , "crh" ,"crh-latn" , "cs" , "csb" , "cu" , "cv" , "cy" , "da" , "de" , "de-at" , "de-ch" , "de-formal" , "din" , "diq" , "dsb" ,"dtp" , "dty" , "dv" ,"dz" , "ee" ,"egl" ,"el" , "eml" ,"en" , "en-ca" , "en-gb" ,"eo" , "es" , "et" , "eu" ,"ext" , "fa" , "ff" , "fi" , "fit" , "fiu-vro" , "fj" , "fo" , "fr" , "frc" , "frp" , "frr" , "fur
import codecs
import urllib, re
import requests
import urllib.request
import datetime
import lxml.html
import os
import time
from bs4 import BeautifulSoup as soup
PFont font;
float fh = 10, deltaY = fh+0.3; // 209927 //161598
float x, y;
String[] text;
ArrayList<PVector> word1 = new ArrayList<PVector>();
ArrayList<PVector> word2 = new ArrayList<PVector>();
int s=0;
int g=0;
int m=0;
@sinanatra
sinanatra / Pixart
Created June 21, 2018 07:37
remember to create a data folder with circular.ttf inside
int numPoints = parseInt(2);
int z = parseInt(random(1, 4));
PFont f;
PVector[] points = new PVector[numPoints];
PVector[] points1 = new PVector[numPoints];
PVector[] points2 = new PVector[numPoints];
PVector[] points3 = new PVector[numPoints];
import requests
def tag(tag_name, max_id=None):
url = "https://www.instagram.com/explore/tags/%s/" % tag_name
payload = {'__a': '1'}
if max_id is not None: payload['max_id'] = max_id
try:
res = requests.get(url, params=payload).json()
body = res['graphql']["hashtag"]
import urllib.request
import scraperwiki
import lxml.html
import codecs
import urllib
import requests
import urllib.request
import datetime
import os
import time
#!/usr/bin/env python
import requests
import lxml.html
import os
import time
# edit search words
word = "libya"
word1 = "militia"
#word2 = "Coast Guard"
from twython import Twython
import time
api = Twython(
app_key = "",
app_secret = "",
oauth_token = "",
oauth_token_secret = "",
)
search = 'trump'