See how a minor change to your commit message style can make you a better programmer.
<type>[<scope>]: <short summary>
│ │ │| import numpy as np | |
| from typing import Tuple | |
| def f0(a: float, b: float) -> float: | |
| """ | |
| Implements the formula: | |
| f0(a,b) = (((a^4-1)^2-64)^2 - 2^7(1-(1-b^2)^2)^2) / 2^15 | |
| """ | |
| a_term = (a**4 - 1)**2 - 64 | |
| a_term = a_term**2 |
| // 1. login to https://www.isin.com/ and then head over to https://www.isin.com/isin-database/ page | |
| // 2. open the chrome console by pressing F12, and paste the script inside the console. | |
| // output: a json file named `all-data.json` containing list of dictionaries of info about the companies. | |
| const org = ["nobiskrug", "swm", "vattenfall", | |
| // and all the other companies you need to extract information about | |
| ]; | |
| function downloadJSON(data) { | |
| const dataStr = JSON.stringify(data, null, 2); | |
| const blob = new Blob([dataStr], { type: 'application/json' }); |
| import torch | |
| class FastTensorDataLoader: | |
| """ | |
| A DataLoader-like object for a set of tensors that can be much faster than | |
| TensorDataset + DataLoader because dataloader grabs individual indices of | |
| the dataset and calls cat (slow). | |
| Source: https://discuss.pytorch.org/t/dataloader-much-slower-than-manual-batching/27014/6 | |
| """ | |
| def __init__(self, *tensors, batch_size=32, shuffle=False): |
| import os | |
| import re | |
| import argparse | |
| import codecs | |
| from collections import defaultdict | |
| from graphviz import Digraph | |
| include_regex = re.compile('#include\s+["<"](.*)[">]') | |
| valid_headers = [['.h', '.hpp'], 'red'] | |
| valid_cuda = [['.cu'], 'green'] |
| <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js" type="text/javascript"></script> | |
| <div id="container"> | |
| <canvas id="game" width="100" height="100"></canvas> | |
| </div> | |
| <div id="controls"> | |
| <div id="buttons"> | |
| <button id="run" type="button">Start</button> | |
| <button id="step" type="button">Step</button> | |
| <button id="clear" type="button">Clear</button> |