Skip to content

Instantly share code, notes, and snippets.

View felipecustodio's full-sized avatar
🏠
Working from home

Felipe Custódio felipecustodio

🏠
Working from home
View GitHub Profile
@felipecustodio
felipecustodio / highres_plot.py
Last active June 5, 2018 17:01
Plot big and in high definition
sns.set()
sns.set_context("poster")
# plot something
figure = plt.gcf() # get current figure
# 800 x 600
figure.set_size_inches(8, 6)
# save with high DPI
plt.savefig("plots/plot.png", dpi=100)
@felipecustodio
felipecustodio / colors.py
Created April 18, 2018 15:01
Colorized output for errors when executing python script on terminal
if __name__ == '__main__':
try:
import IPython.core.ultratb
except ImportError:
# No IPython. Use default exception printing.
pass
else:
import sys
sys.excepthook = IPython.core.ultratb.ColorTB()
main()
@felipecustodio
felipecustodio / readme.md
Created April 2, 2018 05:07
Template for my college studies repositories

CODE - NAME

College studies on CODE - NAME @ ICMC - University of São Paulo.


Assignment 1

@felipecustodio
felipecustodio / trail.pde
Created January 11, 2018 23:35
Simple trail in Processing 3 (Java)
float posX, posY;
float radiusX, radiusY;
float theta;
int frames = 0;
PVector position;
ArrayList<PVector> trail;
int trailSize = 50;
int trailLength;
@felipecustodio
felipecustodio / The Technical Interview Cheat Sheet.md
Created February 24, 2017 19:04 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
@felipecustodio
felipecustodio / benchmarking.c
Created December 12, 2016 06:48
Benchmarking C code for college assignments
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
int main(int argc, char const *argv[]) {
/* benchmarking */
clock_t start_t, end_t;
float delta_t = 0.0;
@felipecustodio
felipecustodio / Makefile
Created December 12, 2016 06:44
Makefile template for C college assignments
# using gcc compiler
CC = gcc
# output path and filename
BINARY = ./build/output
# sources directory
SRC = src/main.c
# includes directory
@felipecustodio
felipecustodio / strings.c
Last active December 12, 2016 06:52
String functions for C college assignments
#include <stdio.h>
#include <stdlib.h>
/* read string from stdin */
char* readString(char end) {
char* string = NULL;
char value = '@';
int counter = 0;
while (value != end) {
@felipecustodio
felipecustodio / arch-linux-install
Created September 25, 2016 01:34 — forked from mattiaslundberg/arch-linux-install
Minimal instructions for installing arch linux on an UEFI system with full system encryption using dm-crypt and luks
# Install ARCH Linux with encrypted file-system and UEFI
# The official installation guide (https://wiki.archlinux.org/index.php/Installation_Guide) contains a more verbose description.
# Download the archiso image from https://www.archlinux.org/
# Copy to a usb-drive
dd if=archlinux.img of=/dev/sdX bs=16M && sync # on linux
# Boot from the usb. If the usb fails to boot, make sure that secure boot is disabled in the BIOS configuration.
# Set swedish keymap