Skip to content

Instantly share code, notes, and snippets.

View gustavopinto's full-sized avatar
🌴
On vacation

Gustavo Pinto gustavopinto

🌴
On vacation
View GitHub Profile
@gustavopinto
gustavopinto / github-popular-projects.sql
Created September 30, 2015 20:19
Top 10 most popular Haskell projects
@gustavopinto
gustavopinto / ParallelStrategyTaskStream.java
Created October 28, 2014 18:34
ParallelStrategyTaskStream.java
currentPositions.parallelStream().forEach(x -> assembleReachablePositions(x))
@gustavopinto
gustavopinto / wmod.md
Last active August 29, 2015 14:01
Open Data

Open data for the energy commit study

We welcome anyone who is interested in replicate our study

Steps:

  • Get commits on githubarchive.org
  • Automatic filter
  • Manual filter
@gustavopinto
gustavopinto / gist:6157891
Last active December 20, 2015 15:59
groundhog deploy to sonatype
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Groundhog
[INFO] task-segment: [clean, deploy]
[INFO] ------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory C:\Users\ghlp\msysgit\msysgit\workspace\groundhog\target
[INFO] [enforcer:enforce {execution: enforce-maven}]
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
@gustavopinto
gustavopinto / gist:6091381
Created July 26, 2013 19:01
how to get all contributors' email of a given project using git & shell?
git log --pretty=format:"%ae" | sort | uniq
@gustavopinto
gustavopinto / gist:5570951
Created May 13, 2013 19:49
line chart in R
seq <- c(78, 78, 78, 78)
thread <- c(80, 60, 55, 42)
executors <- c(80, 56, 42, 31)
forkJoin <- c(79, 55, 52, 54)
actors <-c(82, 47, 38, 30)
plot(thread, type="o", col="blue", pch=18, ylim=c(20, 100))
lines(seq, type="o", pch=23, lty=1, col="darkred")
lines(executors, type="o", pch=24, lty=1, col="purple")
@gustavopinto
gustavopinto / gadgets-for-sale
Last active December 15, 2015 06:39
Vendo gadgets
Itens:
- Monitor Philips LCD 21,5''; 2 anos de uso; R$ 230,00; http://migre.me/dMMc8
- Desktop Sim+ Core 2 Duo 4 Gb Ram; 2 anos de uso; R$ 500,00; http://migre.me/dMMBz
- Kindle wifi; 2 meses de uso; R$ 250,00; http://migre.me/dMO5B
Obs1: Links meramente ilustrativos: *não são os mesmos itens que estou vendendo*.
Obs2: Todos os itens estão em perfeito estado de conservação.
Obs3: Pacote especial para levar monitor + desktop.
@gustavopinto
gustavopinto / mustacheinator.py
Last active March 9, 2021 00:31
mustacheinator.py
from SimpleCV import Camera, Display, Image
cam = Camera()
disp = Display((800, 600))
stache = Image("mustache.png")
mask = stache.invert()
while disp.isNotDone():
img = cam.getImage()
public class TesteLockWatts {
private Contador contador = new Contador();
public void testar() {
for (int i = 0; i < 1000; i++) {
new Thread() {
public void run() {
for (int j = 0; j < 100000; j++) {
BufferedImage resizedImage = new BufferedImage(width, height, originalImage.getType());
Graphics2D g = resizedImage.createGraphics();
g.drawImage(originalImage, 0, 0, width, height, null);
g.dispose();