Skip to content

Instantly share code, notes, and snippets.

View pushkarnimkar's full-sized avatar
🧸
Toymaker

Pushkar Nimkar pushkarnimkar

🧸
Toymaker
View GitHub Profile
@pushkarnimkar
pushkarnimkar / hrh-query.sql
Created August 13, 2021 06:25
Query for finding the HRH raw numbers (1983, 2000, 2011) from the NSS data
create temp function occupation_nco_1968(nco string)
returns string as (
case
when nco = '085' then 'aux_nurse'
when nco = '084' then 'nurse'
when nco = '067' then 'pharmacist'
when nco = '070' then 'allopathic'
when nco = '074' then 'dentist'
when nco = '071' then 'ayush'
when nco = '072' then 'ayush'
@pushkarnimkar
pushkarnimkar / future_set_result.py
Last active July 23, 2019 09:25
This gist is sample code for a question posted on stackoverflow related to working of Future.set_result function in multi-threaded setting. https://stackoverflow.com/questions/57144657/unable-to-understand-behavior-of-future-set-result-on-futures-in-another-thread
import asyncio
import threading
from typing import Dict
import numpy as np
import time
# import logging
# logging.basicConfig(level=logging.DEBUG)