Skip to content

Instantly share code, notes, and snippets.

Gabriel Fernandes gabrielfern

Block or report user

Report or block gabrielfern

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View index.html
<html>
<head>
<title>Guessing Game</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<style>
@import url('https://fonts.googleapis.com/css?family=Nunito&display=swap');
body {
margin: 0px;
@gabrielfern
gabrielfern / test.csv
Created Oct 17, 2019
cartola test csv
View test.csv
We can make this file beautiful and searchable if this error is corrected: It looks like row 10 should actually have 33 columns, instead of 8. in line 9.
atleta_id,rodada,clube_id,participou,posicao_id,jogos_num,pontos_num,media_num,preco_num,variacao_num,partida_id,mando,titular,substituido,tempo_jogado,FS,PE,A,FT,FD,FF,G,I,PP,RB,FC,GC,CA,CV,SG,DD,DP,GS
68873,37,262.0,1,1.0,29,10.1,4.81,9.88,0.22,180166.0,1,1.0,0,1.0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,1,2,0,0
78086,37,262.0,0,1.0,0,0.0,0.0,2.0,0.0,180166.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
89258,37,262.0,0,1.0,0,0.0,0.0,1.0,0.0,180166.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
37701,37,262.0,1,2.0,33,1.7,2.82,10.09,0.26,180166.0,1,1.0,1,0.5,0,1,0,0,0,0,0,0,0,0,2,0,1,0,1,0,0,0
50453,37,262.0,1,2.0,8,10.0,7.2,6.15,1.55,180166.0,1,0.0,1,0.5,0,1,0,0,0,1,0,0,0,3,1,0,0,0,1,0,0,0
69177,37,262.0,0,2.0,3,0.0,2.4,4.18,0.0,180166.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
71602,37,262.0,1,2.0,27,5.4,3.47,6.47,0.82,180166.0,1,1.0,0,1.0,2,6,0,0,0,0,0,0,0,1,1,0,0,0,1,0,0,0
68958,37,262.0,1,3.0,31,7.5,3.67,15.31,1.48,180166.0,1,1.0,0,1.0,2,3,0,0,0,0,0,0,0,2,2,0,0,0,1,0,0,0
74103,37,262.0,0,3.0,0,0.0,0.0
View cartola_2014.csv
We can't make this file beautiful and searchable because it's too large.
atleta_id,rodada,clube_id,participou,posicao_id,jogos_num,pontos_num,media_num,preco_num,variacao_num,partida_id,mando,titular,substituido,tempo_jogado,nota,FS,PE,A,FT,FD,FF,G,I,PP,RB,FC,GC,CA,CV,SG,DD,DP,GS
37958,1,262.0,1,1.0,1,8.0,8.0,19.69,1.69,179872.0,1,1.0,0,1.0,6.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,0
68873,1,262.0,0,1.0,0,0.0,0.0,4.0,0.0,179872.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
37701,1,262.0,1,2.0,1,0.4,0.4,16.97,-5.03,179872.0,1,1.0,0,1.0,6.0,0,7,0,0,0,0,0,0,0,0,1,0,1,0,1,0,0,0
71602,1,262.0,0,2.0,0,0.0,0.0,3.0,0.0,179872.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
37684,1,262.0,1,3.0,1,9.1,9.1,10.68,5.68,179872.0,1,1.0,0,1.0,6.0,2,1,0,0,1,0,0,1,0,2,1,0,0,0,1,0,0,0
68958,1,262.0,1,3.0,1,6.3,6.3,15.38,1.38,179872.0,1,1.0,0,1.0,6.0,1,1,0,0,0,1,0,0,0,2,2,0,1,0,1,0,0,0
81223,1,262.0,0,3.0,0,0.0,0.0,4.0,0.0,179872.0,1,0.0,0,0.0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
38311,1,262.0,1,4.0,1,3.0,3.0,7.57,0.57,179872.0,1,1.0,0,1.0,6.0,2,3,0,0,0,0,0,0,0,2,1,0,0,0,0,0,0,0
View income.csv
10 26.6588387834389
10.4013377926421 27.3064353457772
10.8428093645485 22.1324101716143
11.2441471571906 21.1698405046065
11.6454849498328 15.1926335164307
12.0869565217391 26.3989510407284
12.4882943143813 17.435306578572
12.8896321070234 25.5078852305278
13.2909698996656 36.884594694235
13.7324414715719 39.666108747637
@gabrielfern
gabrielfern / Medições
Last active Jul 1, 2019
adsd medição usando ffmpeg
View Medições
[1 min]
[1080p30]
cpu 384% mem 606,628k time 72.34s
cpu 384% mem 606,724k time 72.74s
[1080p60]
cpu 388% mem 608,724k time 122.89s
cpu 388% mem 609,192k time 124.12s
[4k30]
cpu 387% mem 2,145,880k time 267.67s
cpu 386% mem 2,145,648k time 267.61s
@gabrielfern
gabrielfern / hello.asm
Created Nov 25, 2018
hello world em assembly, linux x86_64
View hello.asm
# assembly para "hello world" em linux x86_64
# assemblar e linkar
# as hello.asm -o hello.o && ld hello.o -o hello
# executar
# ./hello
.data # secao de dados do programa
msg: .ascii "Hello, World!\n" # mensagem a ser escrita na tela
@gabrielfern
gabrielfern / RLGDT_Walls.java
Created Nov 13, 2018
Robo que pega o Walls
View RLGDT_Walls.java
import java.awt.Color;
import robocode.AdvancedRobot;
import robocode.BulletHitEvent;
import robocode.HitRobotEvent;
import robocode.ScannedRobotEvent;
public class RLGDT_Walls extends AdvancedRobot {
final int NE = 0, SE = 1, SO = 2, NO = 3;
double eixoDeDescida;
@gabrielfern
gabrielfern / pi.c
Created Oct 29, 2018
Leibniz to find π
View pi.c
#include <stdio.h>
#include <stdlib.h>
double calc(unsigned long n) {
unsigned long i = 0;
double sum = 0;
while (i < n) {
sum += (i%2 == 0 ? 1.0 : -1.0) / (2*i+1);
i++;
@gabrielfern
gabrielfern / userChrome.css
Created Oct 11, 2018
Firefox csd fix (theme: Mint-Y-Darker)
View userChrome.css
.titlebar-placeholder[type="pre-tabs"] {
display:none !important;
}
#TabsToolbar {
background-color: #2f2f2f;
}
@gabrielfern
gabrielfern / hamming.c
Last active Oct 11, 2018
Detecção e correção de erro por hamming
View hamming.c
#include <assert.h>
/* retorna 0 caso não exista erro
retorna 1 caso exista erro */
int checa_erro(void *dados, unsigned long num_bits) {
unsigned char *array = dados;
unsigned i = 1, j = 0;
while (j < num_bits) {
You can’t perform that action at this time.