Skip to content

Instantly share code, notes, and snippets.

View anandology's full-sized avatar

Anand Chitipothu anandology

View GitHub Profile
@anandology
anandology / notes.md
Last active February 7, 2021 00:24
Lineage OS installation
@anandology
anandology / grid.js
Created October 23, 2020 09:07
grid function
function grid() {
push();
noFill();
stroke(200);
for (var x=0; x<width; x+=50) {
line(x, 0, x, height);
}
for (var y=0; y<height; y+=50) {
line(0, y, width, y);
@anandology
anandology / cli.md
Last active April 3, 2020 00:39
Build a CLI application to list the number of covid19 cases and death in India.

Write a CLI application to list the number of covid19 cases and deaths in India.

You can use the following API for getting that data:

https://github.com/anandology/covid19

The required interface is:

$ python covid19.py cases 

STATE CONFIRMED ACTIVE DEATHS

@anandology
anandology / covid19-thehindu.json
Created March 25, 2020 07:41
The number of COVID19 cases extracted from thehindu.com
{
"india": {
"confirmed": 586,
"active": 534,
"deaths": 10,
"recovered": 42,
"indians": 543,
"foreigners": 43
},
"states": {
@anandology
anandology / custom.css
Created February 22, 2020 05:57
Custom CSS to optimize the notebook presentation in full-screen when zoomed in
/*
FILE: ~/.jupyter/custom/custom.css
Custom CSS to optimize the notebook presentation in full-screen when zoomed in.
*/
@media all and (max-width: 800px) {
.prompt {
display: none !important;
}
#header-container, #maintoolbar, #menubar {
@anandology
anandology / app_foo.py
Last active February 3, 2020 00:33
Lazily Load Python Modules
# import pandas as pd
from .heavy_modules import pandas as pd
# from google.cloud import bigquery
from .heavy_modules import google_cloud_bigquery as bigquery
def foo(path):
df = pd.read_csv(path)
...
"""Python is infinitely beautiful!
This program is a response to the post "Infinite work is less work" by
Damian Conway[1].
This program demonstrates how infinity can be handled elegantly in
Python!
THE PROBLEM:
Write a script to generate first 10 strong and weak prime numbers.

Hello

Level 2

Test

@anandology
anandology / custom.css
Last active December 18, 2017 11:45
Custom CSS to optimize jupyter notebook presentation in full-screen when zoomed in
/*
FILE: ~/.jupyter/custom/custom.css
Custom CSS to optimize jupyter notebook presentation in full-screen when zoomed in.
*/
@media all and (max-width: 800px) {
/* Hide prompt when zoomed in */
.prompt {
display: none !important;
}
@anandology
anandology / fabfile.py
Created September 19, 2017 16:19
Fabric demo
"""Fabric demo.
Setup Instructions:
pip install Fabric3
How to use:
fab --list
fab hello