This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Run with either: | |
- $ python testing_example.py | |
OR | |
- $ pytest -v testing_example.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Git sparse checkout changed some breaking code changes: | |
2.34.0.txt: * In cone mode, the sparse-index code path learned to remove ignored | |
2.34.0.txt: files (like build artifacts) outside the sparse cone, allowing the | |
2.34.0.txt: entire directory outside the sparse cone to be removed, which is | |
2.34.0.txt: especially useful when the sparse patterns change. | |
2.34.0.txt- * "git add", "git mv", and "git rm" have been adjusted to avoid | |
2.34.0.txt: updating paths outside of the sparse-checkout definition unless | |
2.34.0.txt: the user specifies a "--sparse" option. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
min. Requirements: | |
- We an API client that fetches configs from the API. | |
- We need it to cache the result via Django cache, and use cache when possible. | |
adl. Requirements: | |
- Allow using the client in packages (such CLI) that Django isn't installed. | |
""" | |
## v1. Hard Django Depdencency in a single class |
I hereby claim:
- I am omarithawi on github.
- I am omarithawi (https://keybase.io/omarithawi) on keybase.
- I have a public key ASAKGVmuHTauWkpW82IdX6zDdR4OZ4rwW6UWOXWVEL7gwQo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Distance { | |
private double latCenterRad; | |
private double lonCenterRad; | |
private double latCenterRad_cos; | |
public Distance(double latCenter, double lonCenter) { | |
this.latCenterRad = latCenter * DistanceUtils.DEGREES_TO_RADIANS; |