Skip to content

Instantly share code, notes, and snippets.

View diegozr1's full-sized avatar

D Z diegozr1

  • DevLatam
  • MX
View GitHub Profile
@diegozr1
diegozr1 / githubknowledge
Last active February 16, 2024 21:19
Github commands & tricks
# Github tricks
https://stackoverflow.com/questions/37972753/git-reset-single-file-in-feature-branch-to-be-the-same-as-in-master-main
https://stackoverflow.com/questions/3876977/update-git-branches-from-master
https://stackoverflow.com/questions/12481639/remove-file-from-latest-commit
https://stackoverflow.com/questions/39399804/updates-were-rejected-because-the-tip-of-your-current-branch-is-behind-its-remot
@diegozr1
diegozr1 / tasa_364_dias_banxico.csv
Created December 25, 2022 22:04
Valores históricos de la Tasa de Interés a 365 días en México
15/11/1990 24.41
22/11/1990 25.02
29/11/1990 24.69
06/12/1990 25.64
13/12/1990 25.37
20/12/1990 25.01
27/12/1990 24.51
03/01/1991 24.26
10/01/1991 24.26
17/01/1991 24.69
import java.security.SecureRandom;
import java.time.LocalDateTime;
import java.util.Optional;
import java.util.concurrent.TimeUnit;
public class BusyTask {
private final int time;
private final String id;
private LocalDateTime start = null;
@diegozr1
diegozr1 / Mexican_Stock_Market_Symbols_List.py
Last active January 22, 2020 03:27
Mexican Stock Market Symbols List
# list of stocks (.MX isnt part of symbol name)
# updated on January 20th of 2020
stocks = ['AC',
'ACCELSA.MX',
'ACTINVR.MX',
'AEROMEX.MX',
'AGRIEXP.MX',
'AGUA.MX',
'AHMSA.MX',
We can't make this file beautiful and searchable because it's too large.
FECHA,HORA,COMPRADOR,VENDEDOR,VOLUMEN,PRECIO,IMPORTE
5/25/2018,3:00:00 PM,GBM,GBM,100000,50.5,5050000
5/25/2018,3:00:00 PM,GBM,CITI,147815,50.5,7464657.5
5/25/2018,3:00:00 PM,GBM,VALME,41000,50.5,2070500
5/25/2018,3:00:00 PM,GBM,GBM,30000,50.5,1515000
5/25/2018,3:00:00 PM,GBM,GBM,133344,50.5,6733872
5/25/2018,3:00:00 PM,VAFIN,GBM,22700,50.5,1146350
5/25/2018,3:00:00 PM,CITI,GBM,792695,50.5,40031097.5
5/25/2018,3:00:00 PM,CITI,HSBCB,8374,50.5,422887
5/25/2018,3:00:00 PM,CITI,VAFIN,20931,50.5,1057015.5
#!/usr/bin/env python
# send.py -s “Subject” -b “Body” -r “recipient”
import sys
#from smtplib import SMTP_SSL as SMTP
from smtplib import SMTP
#from email.MIMEText import MIMEText
from email.mime.text import MIMEText
@diegozr1
diegozr1 / fintech_api_list.md
Last active December 20, 2023 17:51
Curated list of Mexican Fintech APIs
@diegozr1
diegozr1 / setup.md
Last active March 12, 2018 02:04
Machine Learning & Data Science

Setup to start AI and data science

This mini-guide helps you to install the dependencies you need to get started with AI and scientific programs.

Windows setup

Install Miniconda

@diegozr1
diegozr1 / algorithms.md
Last active February 14, 2018 23:15
Graph theory - Notes

Best graphs and its appliance

  • Prim, Kruskals - Network Spanning Tree Protocol.
  • Dijkstra - Maps and routing eg. Maps Google. (A * is an improved version of this algorithm).
  • DAG - For easy implement tree hierarchy.
  • Bellman-Ford - RIP Networks and negative paths.

Prim (Minimium spanning tree)

Algorithm