Skip to content

Instantly share code, notes, and snippets.


Georgios Gousios gousiosg

View GitHub Profile
gousiosg /
Created Jan 18, 2021
Obtain a transitive closure for a list of Maven dependencies (including release dates)

Input format example (the date field is not mandatory):

{'groupId': '', 'artifactId': 'nexus-ruby-plugin', 'version': '2.11.4-01', 'date': 1436480633}
{'groupId': 'org.apache.maven.archiva', 'artifactId': 'archiva-site', 'version': '1.0-beta-1', 'date': 1186902008}
{'groupId': '', 'artifactId': 'linguistics', 'version': '6.158.42', 'date': 1508227582}
{'groupId': 'org.xwiki.commons', 'artifactId': 'xwiki-commons-repository-api', 'version': '8.0', 'date': 1458055140}

To run:

View developer-density.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
gousiosg /
Last active Feb 4, 2020
Rebuild RAID array when one disk has been marked as faulty (but it is not really)
View deps.bib
title={Could I Have a Stack Trace to Examine the Dependency Conflict Issue?},
author={Wang, Ying and Wen, Ming and Wu, Rongxin and Liu, Zhenwei and Tan, Shin Hwei and Zhu, Zhiliang and Yu, Hai and Cheung, Shing-Chi},
booktitle={ICSE 2019},
Note = {
The authors consider the problem of dependency conflicts.
This happens when imported libraries include classes of the same name or multiple versions of the same library are imported.
The authors found several issues on GitHub related to dependency conflicts.
The build a full scale CFG (including the program and dependencies) and they initially short-circuit all branch conditions
gousiosg / ml4se.bib
Last active Dec 9, 2020
My reading list for ML4SE
View ml4se.bib
author = {Alon, Uri and Zilberstein, Meital and Levy, Omer and Yahav, Eran},
title = {Code2Vec: Learning Distributed Representations of Code},
journal = {Proc. ACM Program. Lang.},
issue_date = {January 2019},
volume = {3},
number = {POPL},
month = jan,
year = {2019},
issn = {2475-1421},
highlight -O rtf -s seashell -k Monaco -K 20 foo.rb |pbcopy
#!/usr/bin/env python
# (c) 2018 Georgios Gousios <>
# Barebones linear equation solving trainer
from __future__ import division
from random import randint
import codecs
import sys
gousiosg /
Last active Oct 8, 2020
Restoring the GHTorrent MongoDB database

This is a collection of scripts to restore a full GHTorrent MongoDB database from the dumps available at

To do the restore:

  1. Open a MongoDB terminal and run the createCollections.js script to create the necessary collections. You can block_compressor to either snappy or zlib to make your databases compressed. I am using none here, as I am using compression at the filesystem level.

  2. Run to restore the cummulative dumps. Wait 3-4 days.

digraph g {
graph [fontname = "helvetica"];
node [shape=record, fontname = "helvetica"];
edge [fontname = "helvetica"];
1 -> 95;
1 -> 10;
2 -> 78;
gousiosg /
Last active Nov 20, 2017
How compatible is your Unix with the original one?
#!/usr/bin/env bash
echo 0 0 > $TEMPFILE
curl ""|
grep "(I)"|