Skip to content

Instantly share code, notes, and snippets.

View jbsilva's full-sized avatar
:octocat:

Julio Batista Silva jbsilva

:octocat:
View GitHub Profile
@jbsilva
jbsilva / mlp_classification_mnist.ipynb
Created November 8, 2020 21:07
MLP_Classification_MNIST.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@jbsilva
jbsilva / delete_tweets.py
Created October 27, 2018 22:56
Delete Tweets
#!/usr/bin/env python3
# -*-*- encoding: utf-8 -*-*-
# Created: Tue, 26 Sep 2017 20:05:39 -0300
"""
Delete old tweets
split -l $((1 + $(wc -l < tweets.csv) / 3)) tweets.csv
"""

Keybase proof

I hereby claim:

  • I am jbsilva on github.
  • I am jbsilva (https://keybase.io/jbsilva) on keybase.
  • I have a public key whose fingerprint is 4F1A 736A C265 5381 9B79 0C25 3D7D 98B9 7D19 E437

To claim this, I am signing this object:

@jbsilva
jbsilva / reconnect.exp
Last active April 26, 2016 05:35
Reconnects my ADSL
#!/usr/bin/expect
set timeout 20
log_file reconnect.log
log_user 0
exp_internal 0
if {[llength $argv] == 0} {
send_user "Usage: reconnect \'password\'\n"
#!/usr/bin/env python3
# -*-*- encoding: utf-8 -*-*-
# Created: Sun, 31 Jan 2016 09:09:19 -0200
"""
Imprime LINHAS conjuntos de seis números cuja soma é igual a SOMA
É possível imprimir linhas repetidas.
Exemplo: ./soma_constante.py 12000 20
"""
#!/usr/bin/python3
# Este código é parte de um programa que resolve o problema do caixeiro
#viajante para o grafo das sub-regiões do estado de São Paulo utilizando o
#algoritmo 2-Otimal, ou seja, deseja-se, a partir de uma sub-região do estado,
#percorrer todas as outras, voltando à região inicial de modo a percorrer a
#mínima distância possível.
# A matriz de distâncias é gerada com os valores obtidos com o auxílio da
#distanceMatrix (http://code.google.com/apis/maps/documentation/distancematrix)
@jbsilva
jbsilva / robot.js
Created December 8, 2012 04:37
chico minero
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot) {
};
Robot.prototype.onIdle = function(ev) {
var robot = ev.robot;
robot.ahead(100);
/*
* Testanto a precisão do long double do C.
* Em Python: pow(math.e, math.pi) - math.pi = 19.99909997918947
*/
#include <math.h>
#include <stdio.h>
#define pi 3.14159265358979323846264338327L
#define e 2.718281828459045235360287471352L