Skip to content

Instantly share code, notes, and snippets.

View biwin's full-sized avatar
🎯
Focusing

Biwin Joseph biwin

🎯
Focusing
View GitHub Profile
@biwin
biwin / geo_names_downloader.py
Created June 17, 2022 13:32
Downloads all files from geonames.org
import os
items = ["AD.zip", "AE.zip", "AF.zip", "AG.zip", "AI.zip", "AL.zip", "AM.zip", "AN.zip", "AO.zip", "AQ.zip", "AR.zip", "AS.zip", "AT.zip", "AU.zip", "AW.zip", "AX.zip", "AZ.zip", "BA.zip", "BB.zip", "BD.zip", "BE.zip", "BF.zip", "BG.zip", "BH.zip", "BI.zip", "BJ.zip", "BL.zip", "BM.zip", "BN.zip", "BO.zip", "BQ.zip", "BR.zip", "BS.zip", "BT.zip", "BV.zip", "BW.zip", "BY.zip", "BZ.zip", "CA.zip", "CC.zip", "CD.zip", "CF.zip", "CG.zip", "CH.zip", "CI.zip", "CK.zip", "CL.zip", "CM.zip", "CN.zip", "CO.zip", "CR.zip", "CS.zip", "CU.zip", "CV.zip", "CW.zip", "CX.zip", "CY.zip", "CZ.zip", "DE.zip", "DJ.zip", "DK.zip", "DM.zip", "DO.zip", "DZ.zip", "EC.zip", "EE.zip", "EG.zip", "EH.zip", "ER.zip", "ES.zip", "ET.zip", "FI.zip", "FJ.zip", "FK.zip", "FM.zip", "FO.zip", "FR.zip", "GA.zip", "GB.zip", "GD.zip", "GE.zip", "GF.zip", "GG.zip", "GH.zip", "GI.zip", "GL.zip", "GM.zip", "GN.zip", "GP.zip", "GQ.zip", "GR.zip", "GS.zip", "GT.zip", "GU.zip", "GW.zip", "GY.zip", "HK.zip", "HM.zip", "HN.zip", "HR.zip", "HT
.ken
width: 100%
section
width: 100%!important
//display: table-row
display: flex
justify-content: space-between
background: #f6f6f6
box-shadow: 1px 1px 1px rgba(0,0,0,0.1)
&:first-child
@biwin
biwin / Dockerfile
Last active January 15, 2019 16:36 — forked from balachandarlinks/Dockerfile
Dockerfile for https://github.com/gojuno/mainframer remote android build system.
FROM ubuntu:18.04
MAINTAINER Biwin John KM "biwinjohn@gmail.com"
ENV TZ=Europe/Minsk
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# Install java8
RUN apt-get update && \
apt-get install -y software-properties-common && \
html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin
html{box-sizing:border-box;font-family:sans-serif;line-height:1.15;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%;-ms-overflow-style:scrollbar;-webkit-tap-highlight-color:transparent}*,::after,::before{box-sizing:inherit}article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}body{margin:0;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;font-size:1rem;font-weight:400;line-height:1.5;color:#212529;background-color:#fff}[tabindex="-1"]:focus{outline:0}hr{box-sizing:content-box;height:0;overflow:visible}h1,h2,h3,h4,h5,h6{margin-top:0;margin-bottom:.5rem}p{margin-top:0;margin-bottom:1rem}abbr[data-original-title],abbr[title]{text-decoration:underline;-webkit-text-decoration:underline dotted;text-decoration:underline dotted;cursor:help;border-bottom:0}address{margin-bottom:1rem;font-style:normal;line-height:inherit}dl,ol,ul{margin-top:0;margin-bottom:1rem}ol ol,ol ul,ul ol,ul ul{margin-bottom:0}dt{font-weight:700}dd{margin
@biwin
biwin / gist:835a2647105d64158f3ca01d8710cbbf
Created January 27, 2018 07:52 — forked from agriffis/gist:2481292
.bashrc.virtualenvwrapper
# Dynamically load virtualenvwrapper functions to reduce shell startup
# time.
#
# Copyright 2012 Aron Griffis <aron@arongriffis.com>
# Released under the GNU GPL v3
#######################################################################
# Python virtualenvwrapper loads really slowly, so load it on demand.
if [[ $(type -t workon) != function ]]; then
virtualenv_funcs=( workon deactivate mkvirtualenv )
@biwin
biwin / community_to_shell.py
Last active January 12, 2024 10:53
Change PyCharm Community Python Console to PyCharm Professional Django Console (Django Shell)
# Change the run script on `settings> Build Execution and Deployment > Console > Python Console` to
# hoping you have your settings at project/project/settings.py (if not, change accordingly;)
import os,sys,django;sys.path.extend([WORKING_DIR_AND_PYTHON_PATHS])
os.environ['DJANGO_SETTINGS_MODULE'] = WORKING_DIR_AND_PYTHON_PATHS.split('/')[-1]+'.settings'
print('Python {0} on {1} using {2} as settings'.format(sys.version, sys.platform, os.environ['DJANGO_SETTINGS_MODULE']))
django.setup()
@biwin
biwin / reserved-words.txt
Created February 10, 2017 14:40 — forked from zachrose/reserved-words.txt
URL paths to reserve in a web app
about
admin
blog
calendar
contact
copyright
dashboard
email
errors
events
@biwin
biwin / reserved_usernames.rb
Created February 10, 2017 14:23 — forked from caseyohara/reserved_usernames.rb
A list of reserved usernames to avoid vanity URL collision with resource paths
# A list of possible usernames to reserve to avoid
# vanity URL collision with resource paths
# It is a merged list of the recommendations from this Quora discussion:
# http://www.quora.com/How-do-sites-prevent-vanity-URLs-from-colliding-with-future-features
# Country TLDs found here:
# http://en.wikipedia.org/wiki/List_of_Internet_top-level_domains#Country_code_top-level_domains
# Languages found here:
@biwin
biwin / enc_dec_test.py
Last active April 29, 2016 04:07 — forked from justinfx/enc_dec_test.py
Speed test of common serializers on python 2.7.8 cartridge on OpenShift (pickle, cPickle, ujson, cjson, simplejson, json, yajl, msgpack)
"""
Dependencies:
pip install tabulate simplejson python-cjson ujson yajl msgpack-python
"""
from timeit import timeit
from tabulate import tabulate