Skip to content

Instantly share code, notes, and snippets.

@DRN88
DRN88 / tampermonkey_extract_tradingview_data
Last active November 27, 2021 18:26
Extract tradingview data with tampermonkey script
// ==UserScript==
// @name Extract TradingView Databox on keypress
// @namespace http://tampermonkey.net/
// @version 0.1
// @description try to take over the world!
// @author You
// @match https://www.tradingview.com/chart/IQRwR53e/?symbol=USI%3APCC
// @icon https://www.google.com/s2/favicons?domain=tradingview.com
// @grant none
// @run-at document-end
@unacorbatanegra
unacorbatanegra / main.dart
Created January 15, 2021 17:26
Above the keyboard widget
import 'package:flutter/material.dart';
import 'package:get/get.dart';
void main() {
runApp(
GetMaterialApp(
initialRoute: '/',
initialBinding: BindingsBuilder.put(() => HomeController()),
getPages: [
GetPage(
@juanhuttemann
juanhuttemann / main.go
Last active September 13, 2019 03:36
Datos de Asegurados IPS (consulta en paralelo)
package main
import (
"fmt"
"log"
"net/http"
"net/url"
"strconv"
"strings"
"sync"
@dave-ramirez
dave-ramirez / number-prefix-py.json
Last active December 19, 2018 17:37
Códigos de área de teléfonos de las ciudades de Paraguay
{
"0":{
"Ciudad":"3 de Mayo",
"Código":"05478"
},
"1":{
"Ciudad":"Acahay",
"Código":"0535"
},
"2":{
@TraderX0
TraderX0 / MutliTimeFramRSI.txt
Last active December 31, 2022 11:08
Pinescript trading view multi time frame RSI - Allows you to plot upto 3 MTF RSI's on one panel
// All credits go to CMoody for the original Idea...
// THE MTFRSI is an extension of his original script to now encorporate 3RSI's on one panel
study(title="TraderX0 3-RSI MTF", shorttitle="X0_3_RSI_MTF", precision=0)
//candle source
src = close
//rsi setup
//first RSI inputs
firstRsiTimeframe = input(title="Select 1st RSI Timeframe", type=resolution, defval="60")
@tjvananne
tjvananne / timestamps_in_R.R
Created January 14, 2018 20:14
R Date Timestamp Epoch Unix Time
library(lubridate) # <3 tidyverse
# this is likely not the most efficient way to generate unix time stamps, but it is intuitive to me
# I like to see how it is done step by step
# to make this more efficient, you could store the "epoch" value outside the function so it
# doesn't have to be calculated every time you call the function
time_since_epoch <- function() {
@mieitza
mieitza / mongo_to_csv.py
Created January 3, 2018 15:09 — forked from wixb50/mongo_to_csv.py
python mongo to csv use pandas.
# @Author: xiewenqian <int>
# @Date: 2016-11-28T20:35:09+08:00
# @Email: wixb50@gmail.com
# @Last modified by: int
# @Last modified time: 2016-12-01T19:32:48+08:00
import pandas as pd
from pymongo import MongoClient
@NigelEarle
NigelEarle / Knex-Migrations-Seeding.md
Last active March 23, 2024 09:04
Migration and seeding instructions using Knex.js!

Migrations & Seeding

What are migrations??

Migrations are a way to make database changes or updates, like creating or dropping tables, as well as updating a table with new columns with constraints via generated scripts. We can build these scripts via the command line using knex command line tool.

To learn more about migrations, check out this article on the different types of database migrations!

Creating/Dropping Tables

@alimanfoo
alimanfoo / find_runs.py
Created November 5, 2017 23:53
Find runs of consecutive items in a numpy array.
import numpy as np
def find_runs(x):
"""Find runs of consecutive items in an array."""
# ensure array
x = np.asanyarray(x)
if x.ndim != 1:
raise ValueError('only 1D array supported')
@ironic-name
ironic-name / EmailValidator.kt
Last active September 23, 2022 18:03
Kotlin regex email validator function
fun isEmailValid(email: String): Boolean {
return Pattern.compile(
"^(([\\w-]+\\.)+[\\w-]+|([a-zA-Z]|[\\w-]{2,}))@"
+ "((([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\."
+ "([0-1]?[0-9]{1,2}|25[0-5]|2[0-4][0-9])\\.([0-1]?"
+ "[0-9]{1,2}|25[0-5]|2[0-4][0-9]))|"
+ "([a-zA-Z]+[\\w-]+\\.)+[a-zA-Z]{2,4})$"
).matcher(email).matches()
}