I hereby claim:
- I am boechat107 on github.
- I am boechat107 (https://keybase.io/boechat107) on keybase.
- I have a public key ASBTwFP7WM0LUTqTZV85Vlu9pmtHTdKKT9m9cVeUYTD4Gwo
To claim this, I am signing this object:
from datetime import datetime as dt | |
from croniter import croniter | |
from functools import wraps | |
from typing import Dict, Any | |
def cache_with_schedule(schedule: str): | |
""" | |
Decorator to cache the results of a function "f(x)" and clear the cache as | |
scheduled. |
from typing import Callable, Iterable, TypeVar, Iterator, Optional | |
A = TypeVar("A") | |
def some(pred: Callable[[A], bool], seq: Iterable[A]) -> Optional[A]: | |
""" | |
Returns the first item in "seq" that satisfies "pred". | |
Examples: |
import random | |
class MutableCounter: | |
""" | |
Used by "count_calls". | |
""" | |
n = 0 | |
def inc(self): | |
self.n += 1 |
#!/bin/bash | |
# This script is useful to update branches that are based on a branch | |
# that was just merged to "master". | |
# | |
# As an example, suppose you have an open Merge Request based on branch "B1" | |
# and, while you are waiting for reviews, you start working on another | |
# branch, "B2", which is created directly from "B1". | |
# After a few commits on "B2", your MR gets reviewd and "B1" is merged to | |
# "master". | |
# Now your code on "B2" is ready for review and you want to create a new |
""" | |
Knapsacks have weight capacity; items have weight and value. | |
We want to find the allocation of items which maximizes the total | |
carried value. | |
""" | |
from typing import List, Set, Tuple | |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
import argparse | |
import urllib2 | |
import json | |
import pprint | |
def sort_by(dictlist, k, **kwargs): | |
return sorted(dictlist, key=(lambda d: d[k]), **kwargs) |
Interactive rebase of a branch. Among many options and actions, it allows the removal of specific commits. Useful for release branches or to submit PRs.
git rebase -i SHA-OF-FIRST-COMMIT-IN-BRANCH
Command to fetch a remote branch, creating a local branch with a different name (reference).