Skip to content

Instantly share code, notes, and snippets.

View chronossc's full-sized avatar

Felipe Prenholato chronossc

View GitHub Profile
chronossc /
Last active December 29, 2020 14:20
List with all cities of Brazil

Dado um csv com todos os municipios do Brasil, escolha 25 randomicamente, que não tenham menos de 6 caracteres e mais de 10 caracteres no nome da cidade. Adicione os seguintes municipios aos 25 escolhidos:

  • São Carlos (SP)
  • São Carlos (SC)

Não se deve repetir cidades/estados.

Para cada um dos 27 descubra a latitude e longitude deles. O OpenStreetMaps tem uma api para isso.

Imprima as informações na tela e também salve uma planilha (XLS) com as seguintes colunas: nome do estado, município, latitude, longitude.

from django.apps import AppConfig
from django.utils.translation import gettext_lazy as _
class MessageryConfig(AppConfig):
name = 'messagery'
label = 'messagery'
verbose_name = _("Messages and E-mails management")
chronossc / gist:1acc5e10455f236484accae40e96471c
Last active February 26, 2018 05:25
Ema Crosses + Bollinger Bands
study(title="EMA Cross + BB", shorttitle=':', overlay=true)
// data = close >= open
// plotchar(data, char='↓', color=lime, text="Buy")
// plotchar(data, char='↑', location=location.belowbar, color=red, text="Sell")
// Bollinger Bands: Madrid : 14/SEP/2014 11:07 : 2.0
// This displays the traditional Bollinger Bands, the difference is
// that the 1st and 2nd StdDev are outlined with two colors and two
chronossc / stochastic_and_rsi
Last active August 26, 2018 17:24 — forked from anonymous/stochastic_and_rsi
slightly improved version of indicator with Stochastic RSI and RSI with alerts from autemox for use in trading view.
// ver 1 alerts show significant stoch rsi crossovers as long as they arent in outermost bounds
// ver 2 fixed error with > to >= that caused some alerts to not appear
// ver 3 changed from symbols to columns to make it easier to set up real trading view alerts with it!
// BASED on
// Author: autemox
study(title="Stochastic RSI with Crossover Alerts", shorttitle="Stoch RSI with Crossover Alerts")
smoothK = input(3, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(14, minval=1)
lengthStoch = input(14, minval=1)
chronossc /
Created August 31, 2017 18:54
CSV to XLS with Pandas
import unicodecsv
from pandas import DataFrame
def csv_to_xls(fname, delimiter=';'):
with open(fname, 'r') as f:
stream = StringIO(
reader = unicodecsv.reader(stream, delimiter=delimiter)
df = DataFrame(list(reader))
chronossc / PKGBUILD_FIXED
Created March 26, 2017 18:11
Diff to be applied to hid-apple-patched-git in AUR
# Maintainer: juantascon <>
# Contributor: Ilya Kuzmin <>
pkgname=( #'hid-apple-patched-git'
chronossc /
Last active November 1, 2016 02:56
Pool Labs Inc position

Back-end Developer at Pool Labs (Remote)


We spend an average of 4 hours every day, or thousands of hours in our lifetime doing repetitive and tedious work. Pool revolutionizes the way we work by creating an executive assistant that helps you take care of the many tasks that surface during your day. The intelligent assistant acts as a cognitive super-layer, facilitating a direct interaction between you and your SaaS. Simply delegate meetings to schedule, expenses to capture, CRM updates and much more – so you can do the work that actually matters.

Pool is an artificial intelligence company operating at and pushing the boundaries of AI science. Run by a small team of tech veterans in combination with some of the brightest minds from ETH Zurich, a top-tier research university for AI. The platform is built upon an virtual layer abstracting the actions done on public APIs as standardized actions.


❯ mkproject -p /usr/bin/python3 foobar
Running virtualenv with interpreter /usr/bin/python3
Using base prefix '/usr'
New python executable in /home/felipe/.virtualenvs/foobar/bin/python3
Also creating executable in /home/felipe/.virtualenvs/foobar/bin/python
Installing setuptools, pip, wheel...done.
virtualenvwrapper.user_scripts creating /home/felipe/.virtualenvs/foobar/bin/predeactivate
virtualenvwrapper.user_scripts creating /home/felipe/.virtualenvs/foobar/bin/postdeactivate
virtualenvwrapper.user_scripts creating /home/felipe/.virtualenvs/foobar/bin/preactivate
chronossc /
Created March 28, 2016 22:37
Load a json for current tests module in tests/fixtures directory.
# -*- coding: UTF-8 -*-
from __future__ import (
absolute_import, division, print_function, unicode_literals
import json
import inspect
from os.path import abspath, dirname, join, isdir, isfile, sep
import random
cards = ["card_{}".format(i) for i in range(1, 55)]
def shuffle(cards):
return cards
print cards
print shuffle(cards)