Skip to content

Instantly share code, notes, and snippets.

Anand Chitipothu anandology

View GitHub Profile
@anandology
anandology / custom.css
Last active Dec 18, 2017
Custom CSS to optimize jupyter notebook presentation in full-screen when zoomed in
View custom.css
/*
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;
}
View fabfile.py
"""Fabric demo.
Setup Instructions:
pip install Fabric3
How to use:
fab --list
fab hello
@anandology
anandology / rdash.py
Created Jun 22, 2017
POC implementation of reactive expressions for Dash
View rdash.py
"""Reactive expressions for Dash!
Dash[1] is an interesting project build reactive web applications in Python.
While the ideas are exciting, the syntax for specifying custom code is way
too complicated that it should be.
Here is a sample code to display sum of two input values.
@app.callback(
[Input(component_id='x', component_property='value')]
@anandology
anandology / top-features.py
Created Mar 15, 2017
Script to find most common features found from multiple runs of an algorithm with different parameters.
View top-features.py
"""Script to find most common features found from
multiple runs of an algorithm with different parameters.
"""
from collections import Counter
runs = [
["a", "b", "c", "d", "e"],
["a", "b", "c", "d", "f"],
["a", "b", "c", "e", "g"],
["a", "b", "d", "f", "h"]
@anandology
anandology / python-engineer.md
Last active Aug 31, 2018
We are looking for an experienced python engineer to join our team at Rorodata.
View python-engineer.md

We are looking for an experienced python engineer to join our team at Rorodata, a data analytics startup based in Hyderabad. Interesting work in the intersection of data science, infrastructure and microservices.

This is a full-time position based out of Hyderabad. We can explore remote working only in exceptional cases.

Please ping us on rorodata.team@gmail.com if this sounds interesting to you.

About Rorodata

@anandology
anandology / boxoffice.html
Created Sep 2, 2016
Box Office widget snippet
View boxoffice.html
<div id="boxoffice-widget" style="padding-top: 0px;"><script src="https://checkout.razorpay.com/v1/checkout.js"></script> <div class="payment-progress-wrapper payment-stages-bg" id="payment-stages"><ul class="progress-indicator"><li class="indicator active "><span class="bubble"></span>Select Tickets<br></li><li class="indicator "><span class="bubble"></span>Payment<br></li><li class="indicator "><span class="bubble"></span>Confirm<br></li></ul></div> <div class="payment-stages-wrapper"><div id="boxoffice-selectItems" class="boxoffice-section ticket-selection-content clearfix"><div id="workshop"><div><h1 class="category-heading">Workshop</h1></div> <div><div class="ticket-booking clearfix " id="python-generators-inside-out"><div class="ticket-details"><p class="ticket-title">Python Generators Inside Out</p> <div class="ticket-description"><p><i class="fa fa-calendar"></i>18 September 2016</p><p><i class="fa fa-map-marker ticket-venue"></i>TERI, Domlur, Bangalore</p><p><i class="fa fa-info" aria-hidden="tru
@anandology
anandology / mtr.txt
Created Aug 1, 2016
Output of traceroute and mtr from digital ocean bangalore datacenter to apt.dockerproject.org
View mtr.txt
root@docker-blr:~# mtr -w --report apt.dockerproject.org
Start: Mon Aug 1 02:22:19 2016
HOST: docker-blr Loss% Snt Last Avg Best Wrst StDev
1.|-- 139.59.16.253 0.0% 10 2.1 2.3 1.8 2.8 0.0
2.|-- 138.197.249.14 0.0% 10 0.3 0.3 0.2 0.3 0.0
3.|-- 124.124.67.154 0.0% 10 2.0 7.1 1.6 53.7 16.4
4.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
5.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
6.|-- 220.227.64.209 0.0% 10 12.1 13.0 12.0 21.2 2.8
7.|-- ??? 100.0 10 0.0 0.0 0.0 0.0 0.0
@anandology
anandology / wget-log.txt
Created Jul 28, 2016
Is Digital Ocean diverting all the traffic in the droplets via a caching proxy?
View wget-log.txt
I've noticed that on digital ocean droplets, the second download is way faster than the first one. Does it mean digital ocean diverting all the traffic in the droplets via a caching proxy?
******
anand@docker0:/tmp$ wget https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.10.0-0~jessie_amd64.deb
--2016-07-28 14:35:51-- https://apt.dockerproject.org/repo/pool/main/d/docker-engine/docker-engine_1.10.0-0~jessie_amd64.deb
Resolving apt.dockerproject.org (apt.dockerproject.org)... 54.192.151.51
Connecting to apt.dockerproject.org (apt.dockerproject.org)|54.192.151.51|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 8552538 (8.2M) [application/vnd.debian.binary-package]
@anandology
anandology / search-sum.rb
Created Jul 3, 2016
Given an array and a number , how do I find that sum of any consecutive array elements equals the number?
View search-sum.rb
def search(array, sum, expected, head, tail)
if head > tail
return false
elsif sum == expected
return [head, tail]
else
return (search(array, sum - array[head], expected, head+1, tail) or search(array, sum - array[tail], expected, head, tail-1))
end
end
You can’t perform that action at this time.