Skip to content

Instantly share code, notes, and snippets.

View yashbonde's full-sized avatar
👽
Up there!

Yash Bonde yashbonde

👽
Up there!
View GitHub Profile
@yashbonde
yashbonde / airport India codes.txt
Created December 19, 2018 19:25
Given is the list of Airports in India. This includes every single India Airports - International Airports, Domestic Airports, Military and Private Airports.
code2city_ = {
'AGX': 'Agatti Island',
'AMD': 'Ahmedabad',
'AJL': 'Aizawl',
'AKD': 'Akola'
'IXV': 'Along',
'LKO': 'Lucknow',
'LUH': 'Ludhiana',
'IXB': 'Bagdogra',
'IXE': 'Mangalore',
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@yashbonde
yashbonde / pyfc_use.py
Created February 5, 2019 07:01
Template on using freeciv-python module
# importing the dependencies
import pyfc
# make world
world = pyfc.World()
world.new_game(username = 'LutaNet', server_ip = '127.0.0.1', port = 5004)
# CAN ALSO INITIALIZE MINIGAME
# print(pyfc.MiniGames.minigames)
# minigame = pyfc.MiniGames.MAP_EXPLORER
@yashbonde
yashbonde / pyfc_min.py
Last active February 5, 2019 07:09
minimal file of freeciv-python
import pyfc
world = pyfc.World() # make world
world.new_game(username = 'lutanet', server_ip = '127.0.0.1', port = 5004) # server details
map_status, map_terrain, map_specials = world.start_game() # initialise and get maps
while world.is_running():
for unit in world.get_units(): # iterate over units
while unit.can_take_action(): # some units can take multiple actions
obs, action_mask = unit.observe() # action_mask tells which actions can be taken
# xxxx.sample() gives a sample action for that object
map_status, map_terrain, map_specials = world.take_action(unit, unit.sample())
"""making conway's game of life. It has the following instructions:
1. Any live cell with fewer than two live neighbors dies, as if by underpopulation.
2. Any live cell with two or three live neighbors lives on to the next generation.
3. Any live cell with more than three live neighbors dies, as if by overpopulation.
4. Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction."""
import time
import os
import numpy as np
"""simple script to train a simple graph network to train a simple drug classifier
18.04.2020 - @yashbonde"""
from tqdm import trange
import json
import numpy as np
from pysmiles import read_smiles
import networkx as nx
import pandas as pd # to make the final DF
from types import SimpleNamespace
@yashbonde
yashbonde / gov.in_links.json
Created February 28, 2021 14:26
Subset of URLs of available APIs from data.gov.in till 28th January. More to be followed.
{
"probabilities": [
[9.972352110754201e-11, 0.00011933996574953198, 0.0007233387441374362, 0.0016801176825538278, 0.0035771680995821953, 0.003529846202582121, 0.0055312211625278, 0.007051980588585138, 0.0003614935267250985, 0.0002043408458121121, 0.00016859555034898221, 0.00015332053590100259, 0.00014389651187229902, 0.0001375526626361534, 0.00013421755284070969, 0.00013190160098019987, 0.00012996737495996058, 0.00012795360817108303, 0.0001263110025320202, 0.00012506268103607, 0.0001244694140041247, 0.0001245801686309278, 0.00012636205065064132, 0.00012891105143353343, 0.00013078989286441356, 0.0001334186817985028, 0.00013651362678501755, 0.0001391653495375067, 0.00014227315841708332, 0.00014483038103207946, 0.00014795003517065197, 0.00015113379049580544, 0.00015444590826518834, 0.00015757823712192476, 0.00016108091222122312, 0.00016435040743090212, 0.00016827242507133633, 0.0001724570756778121, 0.00017722751363180578, 0.00018281125812791288, 0.00019189569866284728, 0.00020348772522993386, 0.0002211573737
{"probabilities": [[2.527923703699031e-10, 0.00030799562227912247, 0.0009716415661387146, 0.0032903130631893873, 0.003744088113307953, 0.0029717471916228533, 0.003439743770286441, 0.0011245131026953459, 0.00013837876031175256, 7.793624536134303e-05, 6.525851495098323e-05, 6.002122245263308e-05, 5.69291332794819e-05, 5.46721821592655e-05, 5.330058775143698e-05, 5.235594289842993e-05, 5.1467810408212245e-05, 5.0616246880963445e-05, 4.986739804735407e-05, 4.928252747049555e-05, 4.8863796109799296e-05, 4.865482696914114e-05, 4.911266660201363e-05, 4.9773916543927044e-05, 5.0246566388523206e-05, 5.084000076749362e-05, 5.170691656530835e-05, 5.238188896328211e-05, 5.322778451954946e-05, 5.39551729161758e-05, 5.471219992614351e-05, 5.562695150729269e-05, 5.653182961395942e-05, 5.724604125134647e-05, 5.8158817410003394e-05, 5.902961129322648e-05, 5.997034895699471e-05, 6.116966687841341e-05, 6.258075154619291e-05, 6.405540625564754e-05, 6.62909442326054e-05, 6.916551501490176e-05, 7.305670442292467e-05, 7.91575148468
[
"https://gist.githubusercontent.com/yashbonde/0769bc0ddeb516382f40554c0c9dc37a/raw/0fe96b0e6bbbf95f6f2fe1051576e9df4d4f3574/rupesh2_0.json",
"https://gist.githubusercontent.com/yashbonde/615a278808f6074c78f0302fcfcd8b2c/raw/a118da3d8d593a7f23470ead2a879fcc8cb5cf33/rupesh2_1.json",
"https://gist.githubusercontent.com/yashbonde/bf7315c3349092e8cbc8b1c3f3f8f073/raw/5dbc44702d340e6d158a8f84dac42e103b486d60/rupesh2_10.json",
"https://gist.githubusercontent.com/yashbonde/31bf2552e6db6773ab9d12dbe3d25a69/raw/4e4b938cd12d6eb1e2b3bd7035864cfa816ccaa1/rupesh2_11.json",
"https://gist.githubusercontent.com/yashbonde/c72103b7e7e7402380d836f9258aad97/raw/6e8c28d00b8717a1ad392579a9db0c6d546f8eb6/rupesh2_12.json",
"https://gist.githubusercontent.com/yashbonde/169f971a972c789c25b8d94666953bfc/raw/110a5747d31a3c5e14b4c4f4d3b912f502b78d72/rupesh2_13.json",
"https://gist.githubusercontent.com/yashbonde/4fc663ba000552e00dd2dae486d5c1d6/raw/bc2269d64bf5aef8a5fc324e17407595f61ec63a/rupesh2_14.json",