Create an empty git repo or reinitialize an existing one
git init
name: Python Test | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main |
Create an empty git repo or reinitialize an existing one
git init
export PATH="$PATH:/Applications/Visual Studio Code.app/Contents/Resources/app/bin" | |
export PATH="/usr/local/opt/python/bin:$PATH" | |
export GPG_TTY=$(tty) | |
# export START="$HOME/a" | |
# if [[ $PWD == $HOME ]]; then | |
# cd $START | |
# fi | |
# alias ls='ls -F --color --show-control-chars' |
from functools import reduce | |
def summate(startingAt, endingWith, callback): | |
""" | |
Returns the sum of the result values of `callback` starting at `startingAt` and ending with `endingWith`. | |
Example: sigma(1, 6, lambda n: 3 * n) | |
See: https://replit.com/@jedmao/SuperSigma#main.py | |
""" | |
return sum([callback(x) for x in range(startingAt - 1, endingWith + 1)]) |
# TP = True Positive | |
# TN = True Negative | |
# FP = False Positive | |
# FN = False Negative | |
def precision(TP, FP): | |
return TP / (TP + FP) | |
def recall(TP, FN): | |
return TP / (TP + FN) |
import { noop } from 'lodash'; | |
import EventEmitter from './EventEmitter'; | |
describe('EventEmitter class', () => { | |
describe('on()', () => { | |
it('subscribes to foo event with listener', () => { | |
const e = new EventEmitter(); | |
e.on('foo', noop); |
import { FC, useCallback } from 'react' | |
import { connect } from 'react-redux'; | |
import addToCart from '../actions/cart' | |
import useAddToCart, { UseAddToCartOptions } from './useAddToCart' | |
interface DispatchProps { | |
onSubmit(options: UseAddToCartOptions): Promise<void>, | |
} |
class PrismaClient { | |
#used = false; | |
/** | |
* Indicates whether `useOnce` has already been called. | |
*/ | |
public get used() { | |
return this.#used; | |
} |
I hereby claim:
To claim this, I am signing this object: