Skip to content

Instantly share code, notes, and snippets.

View adrianrocamora's full-sized avatar
🔬
Gentleman Scientist

Adrian Rocamora adrianrocamora

🔬
Gentleman Scientist
View GitHub Profile
@adrianrocamora
adrianrocamora / pandas_to_mongodb.py
Created September 30, 2020 17:32 — forked from jmquintana79/pandas_to_mongodb.py
Store Pandas dataframe content into MongoDb
from pymongo import MongoClient
from odo import odo
import pandas as pd
# open connection
connection = MongoClient()
# pandas df creation
DF = pd.DataFrame({'A': [1,2,3,4,5,6,7], 'B':[10,20,30,40,50,60,70]})
# database connection
@adrianrocamora
adrianrocamora / metabase-postgres.docker-compose.yml
Created July 14, 2020 21:21 — forked from eliashussary/metabase-postgres.docker-compose.yml
A docker-compose file for metabase with postgres.
version: "3"
services:
postgres-db:
image: postgres
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: postgres
@adrianrocamora
adrianrocamora / pip-mirror.md
Created June 18, 2020 21:10 — forked from nepsilon/pip-mirror.md
Use another mirror when PyPI go down — First published in fullweb.io issue #52

Use another mirror when PyPI go down

Find a mirror geographically close to you and use it like this:

pip install -i https://[mirror-url]/simple package

For instance, using a Beijing mirror:

pip install -i https://pypi.douban.com/simple package
@adrianrocamora
adrianrocamora / install-kubernetes-archlinux.md
Created May 2, 2020 03:23 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@adrianrocamora
adrianrocamora / install-kubernetes-archlinux.md
Created May 2, 2020 03:23 — forked from StephenSorriaux/install-kubernetes-archlinux.md
Install Kubernetes on bare-metal ArchLinux host

Installing Kubernetes on ArchLinux

Packages

pacman -S curl docker ebtables ethtool wget unzip

Also cfssl is needed but available on AUR, using pacaur

pacaur -S cfssl
@adrianrocamora
adrianrocamora / archinstall.md
Created February 6, 2020 23:11 — forked from xtrymind/archinstall.md
Windows 10 and Arch Linux dual boot with UEFI

Arch Linux installation (Windows 10 dual boot)

Before

  1. Disable Windows Fast-Startup
  2. Disable Secure Boot

Partitioning

@adrianrocamora
adrianrocamora / install_Jupyter.sh
Created November 14, 2019 21:49 — forked from gatopeich/install_Jupyter.sh
Install Jupyter iPython Notebook on Android via Termux
pkg upgrade
pkg install python python-dev libzmq-dev libcrypt-dev clang
pip3 install -U pip
pip3 install pyzmq --install-option="--zmq=/usr/lib"
pip3 install jupyter
#TODO: Clean up ~200 mb pulled by build...
apt remove python-dev libzmq-dev libcrypt-dev clang
apt autoremove
rm .cache ../usr/var/cache -rf
@adrianrocamora
adrianrocamora / 10-Bit H.264
Created June 10, 2019 00:33
10-Bit H.264 explanation
10-Bit H.264
For all those who haven’t heard of it already, here’s a quick rundown about the
newest trend in making our encodes unplayable on even more systems: So-called
high-bit-depth H.264. So, why another format, and what makes this stuff
different from what you know already?
First off: What is bit depth?
In short, bit depth is the level of precision that’s available for storing color
information. The encodes you’re used to have a precision of 8 bits (256 levels)
@adrianrocamora
adrianrocamora / vimwiki2html.md
Created June 5, 2019 16:14 — forked from enpassant/vimwiki2html.md
Convert VimWiki to HTML (markdown, mediawiki)

With this wiki2html.sh bash script and pandoc program, you can convert markdown to html.

Usage: In the vim list section of the .vimrcfile, include options:

let g:vimwiki_list = [{'path': ‘your_wiki_place',
  \ 'path_html': ‘wiki_html_location’,
  \ 'syntax': 'markdown',
 \ 'ext': '.md',
@adrianrocamora
adrianrocamora / The Technical Interview Cheat Sheet.md
Created June 3, 2019 04:08 — forked from tsiege/The Technical Interview Cheat Sheet.md
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.