College studies on CODE - NAME @ ICMC - University of São Paulo.
This file contains hidden or 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
| size(640, 360); | |
| //background(#F2EAE8); | |
| background(#ECE9E4); | |
| translate(640 / 2, 360 / 2); | |
| fill(#5E5554); | |
| noStroke(); | |
| ellipse(0, 0, 100, 100); |
This file contains hidden or 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 | |
| shopt -s nullglob | |
| for ext in .in; do | |
| files=(tests/*"$ext") | |
| printf 'number of %s files: %d\n' "$ext" "${#files[@]}" | |
| for i in `seq 1 ${#files[@]}`; do | |
| rm results$i.out; | |
| printf "\nRunning test $i\n"; |
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 |
