Skip to content

Instantly share code, notes, and snippets.

View gousiosg's full-sized avatar

Georgios Gousios gousiosg

View GitHub Profile
@gousiosg
gousiosg / decrypt.py
Created February 9, 2024 10:14
Encryption / Decryption for kinds experiments
#!/usr/bin/env python3
# (c) 2019 Georgios Gousios <[email protected]>
#
# Teaching encryption to kids
import sys
from encryption import KEY
INVERTED_KEY = {value: key for key, value in KEY.items()}
@gousiosg
gousiosg / README.md
Created January 18, 2021 17:54
Obtain a transitive closure for a list of Maven dependencies (including release dates)

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

{'groupId': 'org.sonatype.nexus.plugins', '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': 'com.yahoo.vespa', 'artifactId': 'linguistics', 'version': '6.158.42', 'date': 1508227582}
{'groupId': 'org.xwiki.commons', 'artifactId': 'xwiki-commons-repository-api', 'version': '8.0', 'date': 1458055140}

To run:

@gousiosg
gousiosg / developer-density.ipynb
Last active November 6, 2020 17:43
Developer density
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@gousiosg
gousiosg / rebuild_megaraid.md
Last active February 4, 2020 10:09
Rebuild RAID array when one disk has been marked as faulty (but it is not really)
@inproceedings{wang2019could,
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},
year={2019},
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
gousiosg / ml4se.bib
Last active December 9, 2020 13:29
My reading list for ML4SE
@article{Alon19,
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 <[email protected]>
#
# Barebones linear equation solving trainer
from __future__ import division
from random import randint
import codecs
import sys
@gousiosg
gousiosg / README.md
Last active November 8, 2023 05:20
Restoring the GHTorrent MongoDB database

This is a collection of scripts to restore a full GHTorrent MongoDB database from the dumps available at http://ghtorrent-downloads.ewi.tudelft.nl.

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 restore-cummulative-dumps.sh to restore the cummulative dumps. Wait 3-4 days.

@gousiosg
gousiosg / pink_rubies.dot
Last active April 3, 2018 11:49
33 pink rubies
digraph g {
rankdir=LR;
graph [fontname = "helvetica"];
node [shape=record, fontname = "helvetica"];
edge [fontname = "helvetica"];
1 -> 95;
1 -> 10;
2 -> 78;