Skip to content

Instantly share code, notes, and snippets.

View davixcky's full-sized avatar
⌨️
C lover and vim adict

David Orozco davixcky

⌨️
C lover and vim adict
View GitHub Profile
@davixcky
davixcky / medellin.geojson
Created November 6, 2020 01:12
Medellin comunas GeoJson
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@davixcky
davixcky / is_hw1.ipynb
Last active August 29, 2020 20:10
Introduction to data science - Universidad del Norte
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
import numpy as np
import matplotlib.pyplot as plt
def get_column(matrix, column=0):
values = []
for row in matrix:
values.append(row[column])
return values
@davixcky
davixcky / display.sh
Created August 1, 2020 23:30 — forked from amanusk/display.sh
Easily change between laptop and external displays in i3 + dmenu
#!/bin/bash
# This script is intended to make switching between laptop and external displays easier when using i3+dmenu
# To run this script, map it to some shortcut in your i3 config, e.g:
# bindsym $mod+p exec --no-startup-id $config/display.sh
#include <stdio.h>
void swap(char *a, char *b) {
char c;
c = *a;
*a = *b;
*b = c;
}
#include "hash_tables.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
hash_table_t *initialize_hash_table(unsigned int size)
{
hash_table_t *hash_table;
char *_strcat(char *dest, char *src)
{
int l_dest, i;
l_dest = _strlen(dest);
for (i = 0; src[i] != '\0'; i++, l_dest++)
dest[l_dest] = src[i];
dest[l_dest] = '\0';
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int _strlen(const char *str)
{
int i;
for (i = 0; str[i] != 0; i++)
;
@davixcky
davixcky / commands
Created March 1, 2020 21:35
Commands for create the library and link to the main.c
gcc mylib.c
ar rcs libmylib.a *.o
gcc main.c -L. -lmylib -o message
#include "mylib.h"
#include <stdio.h>
void print_message(char *message)
{
printf("The message is \"%s\"\n", message);
}