Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Rafael Trindade 648trindade

🏠
Working from home
View GitHub Profile
View kd_tree.py
import pygame, random
class Point:
def __init__(self, x, y):
self.x = x
self.y = y
class Kd_tree:
class Axis:
View GGJScrapper.py
from bs4 import BeautifulSoup
from requests import get
from multiprocessing import Pool
from timeit import default_timer as timer
import csv
countries = (("AF", "Afghanistan"), ("AX", "Aland Islands"), ("AL", "Albania"), ("DZ", "Algeria"), ("AS", "American Samoa"), ("AD", "Andorra"), ("AO", "Angola"), ("AI", "Anguilla"), ("AQ", "Antarctica"), ("AG", "Antigua and Barbuda"), ("AR", "Argentina"), ("AM", "Armenia"), ("AW", "Aruba"), ("AU", "Australia"), ("AT", "Austria"), ("AZ", "Azerbaijan"), ("BS", "Bahamas"), ("BH", "Bahrain"), ("BD", "Bangladesh"), ("BB", "Barbados"), ("BY", "Belarus"), ("BE", "Belgium"), ("BZ", "Belize"), ("BJ", "Benin"), ("BM", "Bermuda"), ("BT", "Bhutan"), ("BO", "Bolivia"), ("BA", "Bosnia and Herzegovina"), ("BW", "Botswana"), ("BV", "Bouvet Island"), ("BR", "Brazil"), ("IO", "British Indian Ocean Territory"), ("VG", "British Virgin Islands"), ("BN", "Brunei"), ("BG", "Bulgaria"), ("BF", "Burkina Faso"), ("BI", "Burundi"), ("KH", "Cambodia"), ("CM", "Cameroon"), ("CA", "Canada"), ("CV",
View googlenet.prototxt
name: "GoogleNet"
layer {
name: "data"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
View cifar10.prototxt
name: "CIFAR10_quick"
layer {
name: "cifar"
type: "Data"
top: "data"
top: "label"
include {
phase: TRAIN
}
transform_param {
@648trindade
648trindade / eduroam.config
Created Aug 24, 2017
UFSM eduroam network configuration file for systems with connman
View eduroam.config
# Rafael Gauna Trindade - 24/08/17
# save this as /var/lib/connman/eduroam.config
[service_eduroam]
Type=wifi
Name=eduroam
EAP=ttls
Phase2=PAP
# replace XXXXXXXXXXX by your CPF number
Identity=XXXXXXXXXXX@ufsm.br
View PyGameOfLife.py
import pygame
from pygame import gfxdraw
pygame.init()
size = (800,600)
display = pygame.display.set_mode(size)
surface = [None, None]
surface[0] = pygame.Surface((size[0]/10, size[1]/10))
surface[1] = pygame.Surface((size[0]/10, size[1]/10))
@648trindade
648trindade / pokemons.pl
Last active Jul 4, 2016
Base de conhecimento prolog sobre pokemons
View pokemons.pl
grass(bulbasaur).
grass(ivysaur).
grass(venusaur).
grass(oddish).
grass(gloom).
grass(vileplume).
grass(paras).
grass(parasect).
grass(bellsprout).
grass(weepinbell).
@648trindade
648trindade / stats-obi.py
Created Jun 4, 2016
Scripts para consultas em lote ao sistema de certificados da Olimpiada Brasileira de Informatica
View stats-obi.py
#!/usr/bin/python3
# Script para consultas em lote ao sistema de certificados da Olimpiada Brasileira de Informatica
# http://olimpiada.ic.unicamp.br/
# Obs.: Emissao de certificados inicia em 2005 (OBI iniciou em 1999)
# Adaptado da versão original em bash escrito pela prof. Andrea
# Dependencias: python3-requests
# Author: Rafael
import requests
@648trindade
648trindade / DBFileGenerator.py
Last active Oct 30, 2016
Python script to convert the text file that is inside the compressed .bak project file from software Magic Set Editor to a .db sqlite3 file. Please read the comments to custom it your way
View DBFileGenerator.py
#!/usr/bin/python3
"""
The MIT License (MIT)
Copyright (c) 2016 Rafael Gauna Trindade
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
@648trindade
648trindade / Makefile
Last active Mar 24, 2017
Makefile para demos de Computação Gráfica
View Makefile
################################################################################
# Makefile para sistemas GNU/Linux #
# Alvo: Demos com canvas do prof. Cesar Tadeu Pozzer, docente da disciplina #
# de Computação Gráfica da UFSM, disponível no link #
# http://www-usr.inf.ufsm.br/~pozzer/disciplinas/cg_demos.rar #
# Instruções: Coloque esse arquivo no diretório raiz do projeto. Compile com #
# 'make' a partir de qualquer shell como bash, sh, zsh, etc. #
# Para evitar possíveis erros, crie manualmente uma pasta 'build' no di- #
# retório raiz do projeto.
# Obs.: Esse Makefile não faz uso das bibliotecas disponibilizadas juntamente #