Skip to content

Instantly share code, notes, and snippets.

@r5v9
r5v9 / tradingview-rotate-userscript.js
Last active August 27, 2019 00:31
Tradingview rotate userscript
// ==UserScript==
// @name Tradingview Rotate
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.tradingview.com/chart/NrwqIuhp/
// @grant none
// ==/UserScript==
import multiprocessing
from multiprocessing import Pool
import pandas as pd
import numpy as np
def apply_parallel(df, func):
cores = multiprocessing.cpu_count()
partitions = np.array_split(df, cores)
with Pool(cores) as pool:
@r5v9
r5v9 / top-brew-packages.txt
Created September 4, 2017 23:09
Top homebrew packages
node: Platform built on V8 to build network applications
git: Distributed revision control system
wget: Internet file retriever
yarn: JavaScript package manager
python3: Interpreted, interactive, object-oriented programming language
python: Interpreted, interactive, object-oriented programming language
mysql: Open source relational database management system
coreutils: GNU File, Shell, and Text utilities
openssl: SSL/TLS cryptography library
postgresql: Object-relational database system
@r5v9
r5v9 / facet.py
Last active August 14, 2017 01:15
Ipython header
def facet(df):
template = """<link rel="import" href="/nbextensions/facets-dist/facets-jupyter.html">
<facets-dive id="elem" height="600" style="width:125%"></facets-dive>
<script>var data = {jsonstr};document.querySelector("#elem").data = data;</script>"""
html = template.format(jsonstr=df.to_json(orient='records'))
display(HTML(html), )
@r5v9
r5v9 / gist:3a997657eda328e78d0d
Last active April 17, 2023 13:54
O Essencial - Mário de Andrade
Contei meus anos e descobri que terei menos tempo para viver daqui para a frente
do que já vivi até agora.
Tenho muito mais passado do que futuro.
Sinto-me como aquele menino que recebeu uma bacia de cerejas. As primeiras,
ele chupou displicente, mas percebendo que faltam poucas, rói o caroço.
Já não tenho tempo para lidar com mediocridades.