Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void swap(char *a, char *b) { | |
char c; | |
c = *a; | |
*a = *b; | |
*b = c; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
int _strlen(const char *str) | |
{ | |
int i; | |
for (i = 0; str[i] != 0; i++) | |
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
gcc mylib.c | |
ar rcs libmylib.a *.o | |
gcc main.c -L. -lmylib -o message |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "mylib.h" | |
#include <stdio.h> | |
void print_message(char *message) | |
{ | |
printf("The message is \"%s\"\n", message); | |
} | |
NewerOlder