College studies on CODE - NAME @ ICMC - University of São Paulo.
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
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) |
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
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() |
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
float posX, posY; | |
float radiusX, radiusY; | |
float theta; | |
int frames = 0; | |
PVector position; | |
ArrayList<PVector> trail; | |
int trailSize = 50; | |
int trailLength; |
Great references:
https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet
https://guides.github.com/features/mastering-markdown/
Align image/header to center:
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.
###Array ####Definition:
- Stores data elements based on an sequential, most commonly 0 based, index.
- Based on tuples from set theory.
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 <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; | |
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
# using gcc compiler | |
CC = gcc | |
# output path and filename | |
BINARY = ./build/output | |
# sources directory | |
SRC = src/main.c | |
# includes directory |
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> | |
/* read string from stdin */ | |
char* readString(char end) { | |
char* string = NULL; | |
char value = '@'; | |
int counter = 0; | |
while (value != end) { |
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
# 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 |