Skip to content

Instantly share code, notes, and snippets.

View ronaldokun's full-sized avatar
🏠
Working from home

ronaldokun

🏠
Working from home
View GitHub Profile
@ronaldokun
ronaldokun / selenium.py
Created May 26, 2021 17:55 — forked from korakot/selenium.py
Use selenium in Colab
# install chromium, its driver, and selenium
!apt update
!apt install chromium-chromedriver
!pip install selenium
# set options to be headless, ..
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument('--headless')
options.add_argument('--no-sandbox')
options.add_argument('--disable-dev-shm-usage')
@ronaldokun
ronaldokun / jupyter_ngrok.md
Created July 22, 2020 16:41 — forked from artificialsoph/jupyter_ngrok.md
Quickest way to get Jupyter notebook running on a remote server.

Log into your server with ssh, something like

ssh -i "my_secret.pem" ubuntu@12.123.12.123

If it's a new server, you'll need to install a few things.

Install conda with

@ronaldokun
ronaldokun / pandas_crossjoin_example.py
Created January 25, 2020 21:37 — forked from internaut/pandas_crossjoin_example.py
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on calculating the distances between origin and destination cities. See https://mkonrad.net/2016/04/16/cross-join--cartesian-product-between-pandas-dataframes.html
"""
Shows how to do a cross join (i.e. cartesian product) between two pandas DataFrames using an example on
calculating the distances between origin and destination cities.
Tested with pandas 0.17.1 and 0.18 on Python 3.4 and Python 3.5
Best run this with Spyder (see https://github.com/spyder-ide/spyder)
Author: Markus Konrad <post@mkonrad.net>
April 2016
@ronaldokun
ronaldokun / subplots.py
Created April 3, 2018 21:28 — forked from dyerrington/subplots.py
Plotting multiple figures with seaborn and matplotlib using subplots.
##
# Create a figure space matrix consisting of 3 columns and 2 rows
#
# Here is a useful template to use for working with subplots.
#
##################################################################
fig, ax = plt.subplots(figsize=(10,5), ncols=3, nrows=2)
left = 0.125 # the left side of the subplots of the figure
right = 0.9 # the right side of the subplots of the figure
@ronaldokun
ronaldokun / -
Created February 20, 2018 04:02 — forked from anonymous/-
System: Host: Vostro-5470 Kernel: 4.4.0-53-generic x86_64 (64 bit gcc: 5.4.0)
Desktop: Cinnamon 3.2.7 (Gtk 3.18.9-1ubuntu3.3) dm: mdm Distro: Linux Mint 18.1 Serena
Machine: System: Dell (portable) product: Vostro 5470 Chassis: type: 8 v: 0.1
Mobo: Dell model: 019TFD v: A01 Bios: Dell v: A11 date: 01/21/2015
CPU: Dual core Intel Core i5-4210U (-HT-MCP-) cache: 3072 KB
flags: (lm nx sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx) bmips: 9577
clock speeds: min/max: 800/2700 MHz 1: 1699 MHz 2: 1700 MHz 3: 1699 MHz 4: 1699 MHz
Graphics: Card-1: Intel Haswell-ULT Integrated Graphics Controller bus-ID: 00:02.0 chip-ID: 8086:0a16
Card-2: NVIDIA GK208M [GeForce GT 740M] bus-ID: 09:00.0 chip-ID: 10de:1292
Display Server: X.Org 1.18.4 driver: nvidia Resolution: 1366x768@60.06hz
@ronaldokun
ronaldokun / gist:b6b2033d113b913cb284454870546762
Last active January 24, 2018 12:50 — forked from CristinaSolana/gist:1885435
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream