Skip to content

Instantly share code, notes, and snippets.

View ttm's full-sized avatar

rfabbri ttm

  • IFSC-USP, Juntadados, Nós Digitais, CDTL, ICMC/USP
View GitHub Profile
trying to perform this simple query:
SELECT (COUNT(DISTINCT ?s) as ?c) WHERE {
?s ?p ?o
}
to Data.World without authentication.
the URL:
https://query.data.world/s/f222hh4smp4iwi4uidtbegtb72usts
import json, os
fname = '../server/mlpb/input/input-moreno.json'
with open(fname, 'r') as f:
c = json.load(f)
c['directory'] = '../server/mlpb/abacaxi'
c['input'] = '../server/mlpb/input/moreno.ncol'
fname2 = '../server/mlpb/input/input-moreno2.json'
sabe do Kant com a música pq ele considerava inferior?
invade o território do outro.
Debord n manjo.
justificativa: joga fora a primeira sentença.
ou inverte primeira com segunda, cita direitos humanos ou o q preferir.
info é poder => tem que ser de todos, melhorar escrita, citar algo.
@ttm
ttm / audiovisual.md
Created September 22, 2017 02:57
audiovisualização de dados

Audiovisualização de dados

Quais os tempos de reação e que perduram na memória? (implicam em pulsos, rítmos de interação e assimilação.) (representar os sinais nestes pulsos, ritmos, IHC).

Quais as leis de Weber/Fechner e de Stevens?

Para a audição e para a visão?

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/nodejs', '/usr/bin/npm', 'run', 'build' ]
2 info using npm@3.5.2
3 info using node@v4.2.6
4 verbose run-script [ 'prebuild', 'build', 'postbuild' ]
5 info lifecycle ccnetviz@1.0.14~prebuild: ccnetviz@1.0.14
6 silly lifecycle ccnetviz@1.0.14~prebuild: no script for prebuild, continuing
7 info lifecycle ccnetviz@1.0.14~build: ccnetviz@1.0.14
8 verbose lifecycle ccnetviz@1.0.14~build: unsafe-perm in lifecycle true
9 verbose lifecycle ccnetviz@1.0.14~build: PATH: /usr/share/npm/bin/node-gyp-bin:/home/r/repos/ccNetViz/node_modules/.bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
@ttm
ttm / gridLayout.js
Last active April 2, 2017 00:05
a solution to the challenge of the Helikar Lab GSoC2017
function gridLayout() {}
gridLayout.calculate = function(nodes, edges, size) {
var degrees = Array(nodes.length).fill(0);
edges.forEach(function(e) {
degrees[e.source.index] += 1;
degrees[e.target.index] += 1;
});
//getting the order of nodes from highest to lowest degrees
git commit -am $@
foo=`git remote show origin | grep Fetch`;
b=(`echo $foo | tr ',' '\n'`);
aa \#gitcommit ::: $@ \#repo ::: ${b[2]}
a=`git log -1 HEAD --pretty=format:%s`
foo=`git remote show origin | grep Fetch`
b=(`echo $foo | tr ',' '\n'`)
aa \#gitcommit ::: $a \#repo ::: ${b[2]}
import pymongo, time as T
from twython import Twython
from maccess import tw # importando os acessos (só pegar no api.twitter)
TWITTER_API_KEY = tw.tak
TWITTER_API_KEY_SECRET = tw.taks
TWITTER_ACCESS_TOKEN = tw.tat
TWITTER_ACCESS_TOKEN_SECRET = tw.tats
t = Twython(app_key=TWITTER_API_KEY,
app_secret=TWITTER_API_KEY_SECRET,
#-*- coding: utf8 -*-
from __future__ import division
import numpy as n, pylab as p
nbits=4
fa=8000 # Hz
nperiodos=1000.
passoFreq=20 # Hz