Skip to content

Instantly share code, notes, and snippets.

View realFranco's full-sized avatar
🚀
On a Rocket

Franco Gil realFranco

🚀
On a Rocket
View GitHub Profile
{
"medical_agreement" : {
"client" : "ECR Salud",
"care_provider" : [
"ECR Salud",
"Inmunomedica",
"Centro Médico de Quilicura",
"UCM",
"Medismart",
"Teledoc",
{
"fonasa": [
{
"group": "01",
"items": [
{
"subgroup": "0101",
"description": "ATENCION ABIERTA",
"items": [
{
@realFranco
realFranco / stage-fonasa-services-2020-v1.2.json
Last active May 20, 2021 20:11
Fonasa Codes result after apply a parser action (some descriptions contains wrong caracters, check the read prcess).
{
"fonasa": [
{
"group": "29",
"items": [
{
"subgroup": "2904",
"description": "POR ESPECIALISTA EN ONCOLOGIA Y HEMATOONCOLOGOS.",
"items": [
{
@realFranco
realFranco / python_pipeline.py
Created August 3, 2021 19:15
Script to compose a csv file.
"""
Description: Compose a CSV object.
Example execution:
python3 python_pipeline.py > output.csv
"""
import csv
@realFranco
realFranco / translateScheduleBlocks.js
Created August 25, 2021 20:51
Map structures between Backend & Frontend services.
INPUT_DATA_BACK = [
{
"weekDayName": 3,
"scheduleBlocks": [
{
"startWorkingTime": 480,
"endWorkingTime": 720,
"tag": null,
"description": null
},
@realFranco
realFranco / comunas_standard_820.json
Last active September 24, 2021 13:31
Example data definition for Chilean political distribution, based on "Norma 820"
{
"region": {
"01": { "code": "01", "name": "Tarapacá", "abreviation": "TPCA" }
},
"province": {
"011": { "code": "011", "name": "Iquique"}
},
"comune": {
"01101": { "code": "01101", "code_comune_2018": "01101", "name": "Iquique"},
}
@realFranco
realFranco / naive_string_matcher.py
Created November 9, 2021 23:06
String Matcher Algorithm - Naive
"""
November 9th, 2021
Naive Implmementation
Exacution example
> python3 string_match.py
"""
class StringMatch():
text: str
#!/usr/bin/env jjs
/*####################################################################################################################################
# As Nashorn does not have http capabilities through XMLHttpRequest (DOM API), we have to use regular Java classes instead.
# This sample shows how this can be acheived without depending on any third party libraries. Just a standard Java 8 JDK.
# Make sure to have JAVA_HOME/bin on your PATH for the shebang to work. Then just chmod +x away and run...
# Alternatively if you're on a non *nix OS, start with jjs -scritping httpsample.js
####################################################################################################################################*/
var url = "https://api.github.com/users/billybong/repos";
var response;
@realFranco
realFranco / naive_graph_traversing.ajs
Created November 27, 2021 15:57
Traverse into one element to another #jArchi
// Naive Graph Traversing.
console.log("edit a property from a relation");
$("#id-733e2449d19b455db12241633b28cdab").prop("top_bottom", 0);
$("#id-733e2449d19b455db12241633b28cdab").prop("bottom_top", 0);
console.log("every input relation from the current element");
$(ID).inRels().each(function(relation) {
if (relation.name){
console.log(relation);
@realFranco
realFranco / dt_bench.py
Created December 17, 2021 18:52
Datetime Benchmark - Given a timestamp in seconds (epoch), return the day of the week
from math import ceil
import random
import pytz
from datetime import date
import pandas as pd
def dates_gen(cases: int = 1000) -> list:
return [random.randint(0, 1639758915) for _ in range(0, cases)]