Skip to content

Instantly share code, notes, and snippets.

View demarchenac's full-sized avatar
🎯
Focusing

Cristhyan D. Marchena demarchenac

🎯
Focusing
  • Barranquilla, Colombia.
  • 23:25 (UTC -05:00)
View GitHub Profile
@demarchenac
demarchenac / Proy_Final_data.csv
Created December 1, 2021 04:00
Dataset for final project of the Machine Learning subject, due to 2021-12-02. Group formed by: Eduardo Angulo & Cristhyan De Marchena.
We can't make this file beautiful and searchable because it's too large.
,credit.policy,purpose,int.rate,installment,log.annual.inc,dti,fico,days.with.cr.line,revol.bal,revol.util,inq.last.6mths,delinq.2yrs,pub.rec,not.fully.paid
1765,1,credit_card,0.1505,277.53,11.28978191,12.07,667,3509.041667,9229,93.2,1,0,0,0
3891,1,debt_consolidation,0.1253,133.87,10.59663473,18.39,687,4050.0,7227,70.9,0,0,0,0
4486,1,debt_consolidation,0.1392,682.74,11.35040654,11.55,697,5220.0,17250,78.3,2,1,0,0
9071,0,all_other,0.0768,405.48,10.73630972,23.64,712,3240.0,58996,55.7,3,0,0,1
2380,1,major_purchase,0.1537,174.24,10.46310334,11.67,672,2070.041667,8105,87.2,1,0,0,0
5234,1,home_improvement,0.1183,828.35,12.37073927,2.51,802,5190.0,2069,4.0,1,0,0,1
1267,1,credit_card,0.1033,226.96,11.13616442,8.62,722,2789.958333,22595,61.9,1,0,0,0
6171,1,credit_card,0.1322,338.01,10.81977828,7.44,692,2070.0,7408,31.9,2,0,0,0
8950,0,all_other,0.1347,54.28,12.61153775,6.72,677,7680.0,27197,46.6,4,1,0,0
@demarchenac
demarchenac / Discrete Math T1_4.js
Last active February 16, 2022 20:17
Discrete Mathematics, Homework #01, Exercise #04.
// Code developed by:
// - Eduardo David Angulo Madrid.
// - Cristhyan David De Marchena Rueda.
// 2022-02-14.
/**
* Discrete Mathematics, Homework #01, Exercise #04. This methods verifies wether an
* Vertice A (Selected vertice) can be transformed to the vertice B (Target vertice)
* According to the following rules:
* - A letter from the vertice A can be changed and the result is the vertice B.
@demarchenac
demarchenac / demo.hl7
Last active February 23, 2022 21:40
An HL7 v2 message example
MSH|^~\&|ADT1|MCM|LABADT|MCM|202109210825|SEGURIDAD|ADT^A01|MSG00001|P|2.6
EVN|A01|202109210820
PID|||DEMAR1022||DE MARCHENA^RUEDA^CRISTHYAN^DAVID||19991022|M||2106-3|CRA 66 58 69^BAQ^ATL||(304)413-8167|||B|||1234097133
NK1|1|RUEDA^ROSSO^DENYS|MTH
NK1|2|DE MARCHENA^BARRIOS^RAFAEL^DAVID|FTH
PV1|1|CONTRIB|||||856321^EPS^SURA|||||-||1|A0
DG1|001|I9|1490|MALESTAR ESTOMACAL|202109210845|F
const highestPalindrome = (S) => {
const digits = S.length -1;
const ocurrences = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
for(let index = 0; index < S.length; index++){
const number = S.charAt(index);
ocurrences[+number] += 1;
}
let rootNumber = '';
for(let index = 0; index < ocurrences.length; index++)
@demarchenac
demarchenac / messages.json
Last active April 21, 2022 00:26
A list of messages in JSON format.
[
{ "delta": 1000, "payload": { "type": "message", "user": { "id": 1, "user_name": "taco", "display_name": "Taco Spolsky" }, "message": { "id": 1, "text": "Hello!" } }},
{ "delta": 2000, "payload": { "type": "message", "user": { "id": 2, "user_name": "chorizo", "display_name": "Chorizo" }, "message": { "id": 2, "text": "Hi Taco!" } }},
{ "delta": 2100, "payload": { "type": "connect", "user": { "id": 3, "user_name": "pete", "display_name": "Pete the Computer" } }},
{ "delta": 3000, "payload": { "type": "message", "user": { "id": 3, "user_name": "pete", "display_name": "Pete the Computer" }, "message": { "id": 3, "text": "Hi Taco!" } }},
{ "delta": 4000, "payload": { "type": "message", "user": { "id": 1, "user_name": "pete", "display_name": "Pete the Computer" }, "message": { "id": 4, "text": "What's going on in here?" } }},
{ "delta": 5000, "payload": { "type": "message", "user": { "id": 2, "user_name": "chorizo", "display_name": "Chorizo" }, "message": { "id": 5, "text": "We're testing this chat r
@demarchenac
demarchenac / target_cohort.sql
Created May 31, 2022 22:34
A target cohort generated using Atlas: https://atlas-demo.ohdsi.org/
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
);
INSERT INTO #Codesets (codeset_id, concept_id)
SELECT 5 as codeset_id,
c.concept_id
FROM (
select distinct I.concept_id
FROM (
@demarchenac
demarchenac / outcome_cohort.sql
Created May 31, 2022 22:35
An outcome cohort generated using Atlas: https://atlas-demo.ohdsi.org/
CREATE TABLE #Codesets (
codeset_id int NOT NULL,
concept_id bigint NOT NULL
);
with primary_events (
event_id,
person_id,
start_date,
end_date,
op_start_date,
@demarchenac
demarchenac / reset_cohorts.sql
Created June 1, 2022 00:13
A simple SQL to reset a cohort table on a given schema
DROP TABLE IF EXISTS @cdm_database_schema.@cohort_table;
CREATE TABLE IF NOT EXISTS @cdm_database_schema.@cohort_table (
"cohort_definition_id" integer NOT NULL,
"subject_id" integer NOT NULL,
"cohort_start_date" date NOT NULL,
"cohort_end_date" date NOT NULL
)
@demarchenac
demarchenac / settings.jsonc
Last active July 26, 2023 09:02
Basic Vistual Studio Code Settings
{
// theme
"workbench.colorTheme": "Night Owl",
"workbench.iconTheme": "material-icon-theme",
// font config
"editor.fontFamily": "FiraCode NFM",
"editor.fontLigatures": true,
// Editor settings