Skip to content

Instantly share code, notes, and snippets.

View raninho's full-sized avatar
🤖
Simulating what is human.

Raniere Medeiros raninho

🤖
Simulating what is human.
View GitHub Profile
@raninho
raninho / robot.js
Created December 1, 2012 20:15
Myagi
//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.clone();
@raninho
raninho / robot.js
Created December 1, 2012 20:38 — forked from guilhermef/robot.js
Daniel San
//FightCode can only understand your robot
//if its class is called Robot
var Robot = function(robot){
};
rotated = false;
Robot.prototype.onIdle = function(ev) {
@raninho
raninho / pip
Created May 7, 2013 13:33
pip cache
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = ~/.pip/cache
log-file = ~/.pip/pip.log
build = ~/.pip/build
@raninho
raninho / gist:9092928
Created February 19, 2014 14:13
vimrc
syntax on
set encoding=utf-8
set nocompatible
set backspace=indent,eol,start
set tabstop=4
set shiftwidth=4
set scrolloff=2
set laststatus=2
set showtabline=2
# coding: utf-8
from time import sleep
from random import randint
from datetime import datetime
import lxml.html
import requests
URL = "http://saber.pb.gov.br/users/sign_in"
USER = "[email protected]"
@raninho
raninho / gist:8bfd9e5277948551825e38aa16223c21
Created November 30, 2018 21:17
Request With Two Way SSL With Golang
package main
import (
"bytes"
"crypto/tls"
"encoding/base64"
"io"
"io/ioutil"
"log"
"net/http"
@raninho
raninho / foo.go
Created December 4, 2018 22:20
BubbleSort example
package main
import (
"bufio"
"fmt"
"os"
"strconv"
"strings"
)
package main
import (
"fmt"
"github.com/Nhanderu/brdoc"
)
var (
cpfs = []string{

Keybase proof

I hereby claim:

  • I am raninho on github.
  • I am raninho (https://keybase.io/raninho) on keybase.
  • I have a public key ASC1dLMYdsyJ8iJxMNnvqvpMOiKfQYdT_XMsUqTP_rLDSwo

To claim this, I am signing this object:

from datetime import datetime, timedelta
if __name__ == "__main__":
date1 = "15:59:02"
date2 = "16:59:02"
d1 = datetime.strptime(date1, "%H:%M:%S")
d2 = datetime.strptime(date2, "%H:%M:%S")
d = d2 - d1
print(d.total_seconds())