I hereby claim:
- I am lazyoracle on github.
- I am anuragsaharoy (https://keybase.io/anuragsaharoy) on keybase.
- I have a public key whose fingerprint is F42A 6BA6 F29D 2691 5E3D C12D 6085 B4EE EE1A CD25
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
Thank you for your interest in contributing to the open source software project C3 (“Project”) made available by the owners of the q-optimize Github organisation or its affiliates ("Owner"). This Individual Contributor License Agreement (“Agreement”) sets out the terms governing any source code, object code, bug fixes, configuration changes, tools, specifications, documentation, data, materials, feedback, information or other works of authorship that you submit or have submitted, in any form and in any manner, to the Project (collectively “Contributions”). If you have any questions respecting this Agreement, please contact c3@q-optimize.org.
You agree that the following terms apply to all of your past, present and future Contributions. Except for the licenses granted in this Agreement, you retain all of your right, title and interest in and to your Contributions.
Copyright License. You hereby grant, and agree to grant, to the Owner a non-exclusive, perpetu
def sum_up_to(number): | |
return sum(range(1, number + 1)) | |
a_pool = multiprocessing.Pool() # Create pool object | |
result = a_pool.map(sum_up_to, range(10)) # Run `sum_up_to` 10 times simultaneously |
javascript: (function(){ window.open('https://translate.google.com/translate?sl=auto&tl=en&u=' + location.origin + location.pathname)})(); |
javascript: (function(){ window.open(location.origin.replace%28/%5Ehttps/, 'http') + '.sci-hub.se' + location.pathname + location.search, '_blank')})(); |
pip install -U pyan3==1.1.1 | |
pyan3 <path/to/file> --uses --no-defines --colored --grouped --annotated --dot > call-graph.dot | |
pip install graphviz | |
python | |
>>> from graphviz import render | |
>>> render('dot', 'png', 'call-graph.dot') | |
'call-graph.dot.png' | |
>>> render('dot', 'svg', 'call-graph.dot') | |
'call-graph.dot.svg' |
from typing import Callable | |
from numba import njit, prange | |
import numpy as np | |
@njit() | |
def my_square(x: float) -> float: | |
return x**2 | |
def bayes_numr(x: float, t: float) -> float: | |
return (1. / np.sqrt(2. * np.pi)) * np.exp(-np.square(x) / 2.) * np.square(np.cos(x * t / 2.0)) |
Use case: You have repository A with remote location rA, and repository B (which may or may not have remote location rB). You want to do one of two things:
NB: Check out git subtree
/git submodule
and this Stack Overflow question before going through the steps below. This gist is just a record of how I solved this problem on my own one day.
Before starting, make sure your local and remote repositories are up-to-date with all changes you need. The following steps use the general idea of changing the remote origin and renaming the local master branch of one of the repos in order to combine the two master branches.
name: c3-dev | |
channels: | |
- conda-forge | |
dependencies: | |
- ipykernel=6.6 | |
- jupyter=1.0 | |
- matplotlib=3.5 | |
- notebook=6.4 | |
- pip=21.3 | |
- python=3.8 |
# install miniforge for arm64 | |
# https://github.com/conda-forge/miniforge | |
name: tensorflow | |
channels: | |
- apple | |
- conda-forge | |
dependencies: | |
- ipykernel=6.6 | |
- jupyter=1.0 | |
- matplotlib=3.5 |