See how a minor change to your commit message style can make you a better programmer.
Format: <type>(<scope>): <subject>
<scope> is optional
| import argparse | |
| from decimal import Decimal | |
| import matplotlib.pyplot as plt | |
| from numpy import trapz | |
| def create_roc_values(thresholds, scores, true_values): | |
| """ | |
| Calculate the points on a roc curve | |
| """ | |
| assert len(scores) == len(true_values) |
| import argparse | |
| from decimal import * | |
| from functools import reduce, partial | |
| import math | |
| def _class_count(dic, x): | |
| """ | |
| Callback function to count elements in a list. | |
| """ |
| """ | |
| Simple logging decorator. | |
| Usage: | |
| @log() | |
| def foo(): | |
| # raise an exception | |
| return 1 / 0 | |
| By default, the exception is logged and then raised. |
| ## https://stackoverflow.com/a/35730928/12168211 | |
| ## Automatic help command | |
| ## Comment directly before target name used as help | |
| .PHONY: help | |
| # Show this help. | |
| help: | |
| @awk '/^#/{c=substr($$0,3);next}c&&/^[[:alpha:]][[:alnum:]_-]+:/{print substr($$1,1,index($$1,":")),c}1{c=0}' $(MAKEFILE_LIST) | column -s: -t |
| name: Test | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - features/** | |
| - dependabot/** | |
| pull_request: | |
| branches: |
| #!/bin/bash | |
| # first process | |
| cd ~/Desktop/folder1 | |
| # start your first process with nohup | |
| # (the `&` is important) | |
| nohup python proc1.py > proc1.out 2>&1 & | |
| echo "proc2.py PID:" $! |
| #!/bin/bash | |
| # Install Spin and iSpin on MacOS | |
| # adapted from https://philenius.github.io/software%20quality/2020/04/09/installing-spin-on-ubuntu-19.html | |
| # (requires developer tools to be installed; to install them, run `xcode-select --install`) | |
| # Install in a new directory | |
| INSTALL_DIR=Spin | |
| mkdir $INSTALL_DIR | |
| cd $INSTALL_DIR |
| // ==UserScript== | |
| // @name YouTube Ad Skipper | |
| // @namespace https://github.com/leo-pfeiffer | |
| // @version 0.1 | |
| // @description Skip ads on youtube | |
| // @match *://www.youtube.com/* | |
| // ==/UserScript== | |
| (function() { |
| /** | |
| lazy val doobieVersion = "1.0.0-RC1" | |
| libraryDependencies ++= Seq( | |
| "org.xerial" % "sqlite-jdbc" % "3.36.0.2", | |
| "org.tpolecat" %% "doobie-core" % doobieVersion, | |
| "org.tpolecat" %% "doobie-hikari" % doobieVersion, | |
| "org.tpolecat" %% "doobie-scalatest" % doobieVersion % Test, | |
| ) | |
| */ |