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
| YEARLY_INTEREST = 0.1375 | |
| MONTHLY_INTEREST = ((1 + YEARLY_INTEREST) ** (1/12)) - 1 | |
| NUM_INSTALLMENTS = 12 | |
| print("+--------------+----------+") | |
| print("| Installments | Discount |") | |
| print("+--------------+----------+") | |
| installments = [1.0] | |
| for num_installments in range(1, NUM_INSTALLMENTS + 1): |
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
| #!/usr/bin/env python3 | |
| ################################################################ | |
| # Hardhat Gas Report Diff | |
| # ============================================================== | |
| # Steps: | |
| # 1) Have `hardhat-gas-reporter` | |
| # 2) Run `npx hardhat test` before and after applying | |
| # some change to the smart contracts you're testing | |
| # 3) Save the gas reports into separate files (e.g. |
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
| #!/usr/bin/env python3 | |
| import random | |
| from colorama import Fore | |
| hiraganas = { | |
| "あ": "a", | |
| "い": "i", | |
| "う": "u", | |
| "え": "e", |
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
| #!/usr/bin/env bash | |
| set -euo pipefail | |
| [ $# -ge 1 ] || (echo "Expected URI for git clone" >&2 && exit 1) | |
| repodir=`mktemp -d` | |
| git clone -- "$1" "$repodir" | |
| pushd "$repodir" >/dev/null | |
| folders=`git ls-files | xargs -r -d '\n' -n1 dirname | sort | uniq | xargs -r -d '\n' -n1 basename` | |
| popd >/dev/null | |
| rm -rf "$repodir" | |
| snake_case=`echo "$folders" | grep -- '_' | tee snake | wc -l` |
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
| <html> | |
| <head> | |
| <title>Horário das aulas</title> | |
| <style> | |
| table, th, td { | |
| border: 1px solid black; | |
| border-collapse: collapse; | |
| padding: 10px; | |
| } | |
| table { |
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
| /* | |
| * bernoulli.c | |
| * | |
| * Bernoulli distribution simulation | |
| */ | |
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <assert.h> |
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
| /* | |
| * pi.c | |
| * | |
| * Approximation of Pi by the probability | |
| * of a point to fall into the circle of | |
| * a circumscribed square in the xy-plane. | |
| * | |
| * Inspired by Simulation Fifth Edition | |
| * Book by Sheldon Ross | |
| */ |
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
| /* | |
| * pow.c | |
| * | |
| * Optimised power function for integer values | |
| */ | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <stdint.h> | |
| #include <stdlib.h> |
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
| /* | |
| * perm.c | |
| * | |
| * Array permutation | |
| */ | |
| #include <assert.h> | |
| #include <stdio.h> | |
| #include <time.h> | |
| #include <stdlib.h> |
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
| import urllib.request | |
| import xlrd | |
| import tkinter as tk | |
| from tkinter import filedialog | |
| # ############################################ | |
| # PUC Dependency Graph Viewer | |
| # ############################################ | |
| # Guilherme Dantas, 7/23/2019 | |
| # ############################################ |
NewerOlder