Skip to content

Instantly share code, notes, and snippets.

@adithyabsk
adithyabsk / shell_dump.md
Created July 6, 2022 19:01
Working Pyenv / Poetry Setup Example
pwd
/Users/adithyabalaji/Coding/test
❯ ls
❯ pyenv --version
pyenv 2.3.2
❯ poetry --version
Poetry version 1.1.13
❯ pyenv global
3.8.10
@adithyabsk
adithyabsk / parachute.py
Last active May 24, 2021 04:24
NASA Perseverance Parachute Code
"""Perseverence Parachute Cipher Python Solution
In Press:
* https://www.nytimes.com/2021/02/24/science/nasa-mars-parachute-code.html
* https://www.theguardian.com/science/2021/feb/23/dare-mighty-things-hidden-message-found-on-nasa-mars-rover-parachute
* https://www.cmu.edu/news/stories/archives/2021/march/mars-rover-code.html
Output:
DARE¿¿¿¿
MIGHTY¿¿
THINGS¿¿
@adithyabsk
adithyabsk / README.md
Last active December 30, 2023 06:15
Convert iBook EPUBs to standard EPUBs

How to Convert iBook EPUBs to standard EPUBs

iBooks EPUBs actually show up on macOS as folders. If you need the actual file you can use the above script to convert your iBook directory of files to a destination directory.

The path of iBook files as of macOS 10.15.7 is: /Users/${USER}/Library/Mobile Documents/iCloud~com~apple~iBooks/Documents

Usage

@adithyabsk
adithyabsk / pyproject.toml
Created November 3, 2020 10:54
Sample pyproject.toml
[tool.poetry]
name = "test"
version = "0.1.0"
description = ""
authors = ["First Last"]
[tool.poetry.dependencies]
python = "^3.9"
[build-system]
@adithyabsk
adithyabsk / keybase.md
Created October 28, 2020 05:47
keybase.md

Keybase proof

I hereby claim:

  • I am adithyabsk on github.
  • I am abalaji (https://keybase.io/abalaji) on keybase.
  • I have a public key ASDagzA4vgI2kuB6xpf0pgfCrwn8xH8Q6Lqn5_iyFrJMMQo

To claim this, I am signing this object:

@adithyabsk
adithyabsk / HNDark.css
Created September 23, 2020 06:32
A modified version of a HN Dark Theme that works with refined-hacker-news
/* Placeholder: /*[[upvotecolor]]*/
/* Replace with #6F6F6F for gray upvote arrow. */
/* Replace with #FF6600 for orange upvote arrow. */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("news.ycombinator.com") {
/* main body styles */
body {
background-color: #262626;
}
@adithyabsk
adithyabsk / populatedb_data_broken.json
Created February 24, 2020 14:04
Broken populatedb_data.json
[
{
"model": "product.category",
"pk": 7,
"fields": {
"private_metadata": {},
"metadata": {},
"seo_title": "",
"seo_description": "",
"name": "Accessories",
@adithyabsk
adithyabsk / fix_coverage.sh
Last active August 1, 2019 18:09
Fix the Coverage
git diff 57afaa5
# diff --git a/simplecalc/tests/test_cli.py b/simplecalc/tests/test_cli.py
# index 6130265..253f4ce 100644
# --- a/simplecalc/tests/test_cli.py
# +++ b/simplecalc/tests/test_cli.py
# @@ -27,113 +27,113 @@ def test_exception_handling_error():
# assert "Test" in str(e)
#
#
# -@pytest.mark.parametrize(
@adithyabsk
adithyabsk / switch_branch.sh
Last active July 31, 2019 19:26
Switch Branch
git checkout tool_useage_example
# Switched to branch 'tool_useage_example'
# Your branch is up to date with 'origin/tool_useage_example'.
@adithyabsk
adithyabsk / fix_bugs.sh
Last active August 1, 2019 18:11
Fix bugs
pytest
# ================================= test session starts =================================
# platform darwin -- Python 3.6.8, pytest-3.10.1, py-1.8.0, pluggy-0.12.0 -- /Users/adithyabalaji/.pyenv/versions/3.6.8/envs/tooling_example/bin/python
# cachedir: .pytest_cache
# rootdir: /Users/adithyabalaji/Coding/simplecalc, inifile: setup.cfg
# plugins: xdoctest-0.9.1, cov-2.7.1, mock-1.10.4
# collected 19 items
#
# simplecalc/calculator.py::sum_:0 FAILED [ 5%]
#