Skip to content

Instantly share code, notes, and snippets.

View shubhamjain's full-sized avatar

Shubham Jain shubhamjain

View GitHub Profile
@shubhamjain
shubhamjain / universe.md
Last active March 8, 2025 13:17
What is the Universe made up of? (by Issac Asimov) [1980]

What is the Universe made up of?

Part of Asimov's essay collection, this essay is the most accessible introduction to the standard model of atom. It was published on November 1980.

All the countless myriads of things, living and non-living, large and small, here and in the farthest galaxies, can't really be countless myriads. That would be too complex, too messy to suit our intuition which is that the Universe is basically simple, and that all we need is to be subtle enough to penetrate that simplicity.

The Greeks suggested the Universe was made up of a few "elements,*' and some supposed that each element was made up of invisibly small "atoms” (from a Greek word meaning "indivisible”) which, as the name implied, could not be divided into anything smaller.

Nineteenth-century chemists agreed in essence. But what nineteenth-century chemists found were elements by the dozens, each with its characteristic atoms. Again, too complex and too messy.

/9j/2wCEAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDIBCQkJDAsMGA0NGDIhHCEyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMv/AABEIAGQAZAMBIgACEQEDEQH/xAGiAAABBQEBAQEBAQAAAAAAAAAAAQIDBAUGBwgJCgsQAAIBAwMCBAMFBQQEAAABfQECAwAEEQUSITFBBhNRYQcicRQygZGhCCNCscEVUtHwJDNicoIJChYXGBkaJSYnKCkqNDU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6g4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2drh4uPk5ebn6Onq8fLz9PX29/j5+gEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoLEQACAQIEBAMEBwUEBAABAncAAQIDEQQFITEGEkFRB2FxEyIygQgUQpGhscEJIzNS8BVictEKFiQ04SXxFxgZGiYnKCkqNTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqCg4SFhoeIiYqSk5SVlpeYmZqio6Slpqeoqaqys7S1tre4ubrCw8TFxsfIycrS09TV1tfY2dri4+Tl5ufo6ery8/T19vf4+fr/2gAMAwEAAhEDEQA/APFMU4DJp22lr2jz7jdopwqS2gNzdRQDgyOqZ+pxQ6qsjqjblDEAnuM8GhbibGgVIg5poFSIMGqIvqdv8T1xrWnnHXTbb/0WK4cCu9+KS41jTD66Zbf+gCuEArHC/wAJGmJ/isAKfikAqwYgLVJRnJYq36EV0bHMyECnAUoFKBTJbDFGKdijFUK5RKUmypyhHUU0rWSNuYsaSNl955xiCOSX8Qpx+uKpKvGPSrtpKsNvd5A3
@shubhamjain
shubhamjain / centroids.json
Created April 6, 2021 12:10
JSON list of countries (ISO Abbreviations) and their respective centroids
{
"AD": [42.546245, 1.601554],
"AE": [23.424076, 53.847818],
"AF": [33.93911, 67.709953],
"AG": [17.060816, -61.796428],
"AI": [18.220554, -63.068615],
"AL": [41.153332, 20.168331],
"AM": [40.069099, 45.038189],
"AN": [12.226079, -69.060087],
"AO": [-11.202692, 17.873887],
@shubhamjain
shubhamjain / covid.md
Last active November 2, 2020 21:19
Questions about Covid
  1. Why was most of Europe relatively calm for five months and then, faced a second wave all of a sudden?
  2. How has Japan been able to minimize the impact of Covid-19 despite doing relatively nothing? Is it masks?
  3. How was Pakistan able to peak so quickly (https://prnt.sc/vb1ao0), despite taking few measures to curb the spread? Pakistan demographic is young but is comparable to that of India's.
  4. Why is second-wave so far less deadly than the first in Europe? Yes, we are testing more but the difference in mortality rate is huge.
  5. On the other hand, the second wave (https://prnt.sc/vb1bzh) in Iran is as deadly as the first. What explains it?
  6. Why did India fail so badly at curbing the virus, despite having one of the strictest lockdown? Was compliance at fault?
  7. Why, in India, the deaths so heavily skewed towards relatively younger age? <60 age-group deaths contribute 50% to overall deaths (https://twitter.com/MoHFW_INDIA/status/1300969939298263041). This is in stark contrast with somewhere like Italy
@shubhamjain
shubhamjain / formula.js
Created April 12, 2019 15:13
Google Sheets custom formula to check for primality
/**
* @customfunction
*/
function ISPRIME(number) {
for (var i = 2; i <= Math.sqrt (number); i++) {
if(number % i === 0) {
return false;
}
}
@shubhamjain
shubhamjain / social.js
Created May 18, 2016 19:06
Social Share Tracking With GA
// Track Facebook Likes
var fbCallback = function() {
FB.Event.subscribe('edge.create', function(targetUrl) {
ga('send', 'social', 'facebook', 'like', targetUrl);
});
}
if( window.fbAsyncInit ) {
fbCallback();
} else {
window.fbAsyncInit = fbCallback;
@shubhamjain
shubhamjain / SMQT.js
Created July 2, 2014 19:00
Successive Mean Quantization Transform
function addUp(a, b, c)
{
catArr = b.concat(c);
for(i = 0; i < catArr.length ; i++)
a[i] += catArr[i];
return a;
}
@shubhamjain
shubhamjain / IndianCities.json
Created June 30, 2014 08:30
Indian States and their Cities
{
"AP":[
"Adilabad",
"Anantapur",
"Chittoor",
"Kakinada",
"Guntur",
"Hyderabad",
"Karimnagar",
"Khammam",
@shubhamjain
shubhamjain / IndianStates.json
Last active December 18, 2024 08:36
Indian States and Union Territories in JSON format
{
"AN":"Andaman and Nicobar Islands",
"AP":"Andhra Pradesh",
"AR":"Arunachal Pradesh",
"AS":"Assam",
"BR":"Bihar",
"CG":"Chandigarh",
"CH":"Chhattisgarh",
"DN":"Dadra and Nagar Haveli",
@shubhamjain
shubhamjain / vlc_http
Created March 27, 2014 14:45
Library to use VLC HTTP interface in python
"""Module to use VLC HTTP interface
@author Shubham Jain <[email protected]>
@license MIT License
VLC provides an HTTP interface (by default disabled) at 127.0.0.1:8080.
I have written some basic functions to work on the interface.
Example: