Skip to content

Instantly share code, notes, and snippets.

@orendon
orendon / day08_hauntedwasteland2.py
Last active December 9, 2023 17:00
Advent of Code Day 8 part 2
import sys, re
def main():
curr_path = '/Users/orendon/dev/codez/advent-of-code/2023/'
# lines = open(curr_path + 'input.txt', 'r').readlines()
lines = sys.stdin.readlines()
navigation = lines[0].strip()
network = {}
starting_nodes = []
@orendon
orendon / config.ini
Last active January 18, 2023 20:24
Visa appointment (renewal)
[USVISA]
; Account and current appointment info from https://ais.usvisa-info.com
USERNAME = YOUR_EMAIL
PASSWORD = YOUR_PASSWORD
SCHEDULE_ID = YOUR_ID
MY_SCHEDULE_DATE = YYYY-MM-DD
; Spanish - Colombia
COUNTRY_CODE = es-co
; Bogotá
FACILITY_ID = 26
@orendon
orendon / RPC08_A_trie.cpp
Last active September 17, 2021 18:11
Trie (Arbol de Prefijos) [RPC 08 A. Substrings Telefónicos] https://youtu.be/GEoUPRYguY4
// Video con explicación https://youtu.be/GEoUPRYguY4
#include <bits/stdc++.h>
using namespace std;
#define endl '\n'
struct TrieNode {
char val;
bool end;
@orendon
orendon / git_edit_date.sh
Last active August 14, 2021 17:16
git edit last commit date
# edit to current date
GIT_COMMITTER_DATE="$(date)" git commit --amend --no-edit --date "$(date)"
# edit to arbitrary date
GIT_COMMITTER_DATE="Fri Aug 13 18:00:00 2021 -0500" git commit --amend --no-edit --date "Fri Aug 13 18:00:00 2021 -0500"
@orendon
orendon / common.sh
Created August 2, 2021 20:22
most common commands bash script
history | awk '{print $2}' | sort | uniq -c | sort -nr | head -20
@orendon
orendon / 00_graphs_intro.md
Last active September 13, 2021 23:16
Club de Algoritmia: Febrero de Grafos

Recursos de las sesiones del mes de Febrero (Grafos)

Todo el mes de febrero estaremos tratando sobre grafos, a continuación los recursos de cada una de las sesiones

  • Ene 26 - Introducción a Grafos y Representación
  • Feb 02 - BFS (Breadth First Search)
  • Feb 09 - Flood-fill y DFS (Depth First Search)
  • Feb 16 - Ordenamiento Topológico
  • Feb 23 - Kosaraju

Las grabaciones quedan https://www.youtube.com/playlist?list=PLRMfC7A6yJWqJ6x-Xw4Fmrpx-4N5wPjQH

@orendon
orendon / tle.service
Last active May 12, 2021 15:39
TLE bot systemd
# /etc/systemd/system/tle.service
[Unit]
Description=TLE-bot
[Service]
ExecStart=/home/orendon/TLE/run.sh
Restart=on-failure
RestartSec=5s
@orendon
orendon / day13_shuttle_search.cpp
Created December 14, 2020 22:50
Advent of Code - Day 13 Shuttle Search
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
#include <vector>
#include "tmpl.h"
using namespace std;
int bs_part1(int, int);
@orendon
orendon / day12_rain_risk.cpp
Created December 12, 2020 23:57
Advent of Code 2020 - Day 12 Rain Risk
#include <algorithm>
#include <fstream>
#include <iostream>
#include <vector>
using namespace std;
#define forn(i, j, n) for (int i = j; i < (int)n; i++)
#define forr(i, j, n) for (int i = j; i >= (int)n; i--)
#define fore(i, coll) for (auto i : coll)