Skip to content

Instantly share code, notes, and snippets.

View riccardoscalco's full-sized avatar
🐢
Thinking slowly

Riccardo Scalco riccardoscalco

🐢
Thinking slowly
View GitHub Profile
@riccardoscalco
riccardoscalco / README.md
Last active July 22, 2022 16:32
Confidence intervals on linear regression

Confidence intervals on linear regression

Python code for the evaluation of linear regression and confidence intervals between two random variables x and y.

@riccardoscalco
riccardoscalco / README.md
Last active January 11, 2022 16:20
Twitter Influencers

Twitter users visibility by means of regular Markov chains.

This is an attempt to define user visibility on a specific topic. Briefly, tweets are collected via the Twitter streaming API, stored in sqlite databases and then processed in order to create a regular Markov chain. The steady state distribution of the chain defines a metric on the set of Twitter users, which can be used to retrieve an ordered list of users.

Have a look at this paper and this other paper for further details about the mathematical methods.

Be careful, the procedure described here is experimental and it is not meant to be used in production environments.

Fetching and storing from the Twitter streaming

@riccardoscalco
riccardoscalco / image.svg
Created May 8, 2020 07:50
Example of custom textures
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@riccardoscalco
riccardoscalco / README.md
Last active April 1, 2020 14:02
Topojson of Italy (province)
#!/bin/bash
# Install ghostscript.
# Assume A and B have the same amount of files.
# Assume file in A are named `testo_1`, and files in B are named `disegno_1`.
END=`ls A/*.pdf | wc -l`
echo "merging..."
@riccardoscalco
riccardoscalco / file.md
Created December 6, 2017 14:32
how to use ttf fonts in xterm

Add fonts to directory ~/.fonts.

See available fonts:

$ fc-list | col | sort | less

For example, among all I have:

@riccardoscalco
riccardoscalco / file.md
Last active May 26, 2016 10:21
JSPM tutorial
@riccardoscalco
riccardoscalco / file.md
Created July 15, 2015 06:44
Git: revert to an older commit. Get your index and work tree into the desired state, without changing HEAD. http://stackoverflow.com/questions/4114095/revert-to-a-previous-git-commit
$ git checkout 0d1d7fc32 .
$ git commit -m "revert to older commit"
$ git push origin master
@riccardoscalco
riccardoscalco / index.html
Created June 19, 2015 08:57
power distribution
<div id="box">
<script src="http://d3js.org/d3.v3.min.js" charset="utf-8"></script>
<script src="https://raw.githubusercontent.com/riccardoscalco/textures/master/textures.min.js"></script>