Skip to content

Instantly share code, notes, and snippets.

View Nelsonochoam's full-sized avatar

Nelson Ochoa Nelsonochoam

View GitHub Profile
@Nelsonochoam
Nelsonochoam / aws.md
Last active October 6, 2022 21:02 — forked from colinvh/aws.md
AWS Region Names
" Specify a directory for plugins
call plug#begin('~/.vim/plugged')
Plug 'neoclide/coc.nvim', {'branch': 'release'}
Plug 'scrooloose/nerdtree'
"Plug 'tsony-tsonev/nerdtree-git-plugin'
Plug 'Xuyuanp/nerdtree-git-plugin'
Plug 'tiagofumo/vim-nerdtree-syntax-highlight'
Plug 'ryanoasis/vim-devicons'
Plug 'airblade/vim-gitgutter'
@Nelsonochoam
Nelsonochoam / coding_challenge.py
Created August 28, 2017 21:15
Osprey's Coding Challenge
"""
Osprey Code Challenge
We have a report of ~1000 images taken by 10 cameras in the past month.
Each image metadata object contains a 'camera_id' and 'size' property.
For example:
{
"camera_id": 1,
"size": 42048
@Nelsonochoam
Nelsonochoam / .zshrc
Last active October 2, 2017 17:20
Dev Setup
# If you come from bash you might have to change your $PATH.
export PATH=$HOME/bin:/usr/local/bin:/usr/local/sbin:$HOME/Library/Python/2.7/bin:$PATH
# Path to your oh-my-zsh installation.
export ZSH=/Users/nelsonochoam/.oh-my-zsh
# Set name of the theme to load. Optionally, if you set this to "random"
# it'll load a random theme each time that oh-my-zsh is loaded.
# See https://github.com/robbyrussell/oh-my-zsh/wiki/Themes
@Nelsonochoam
Nelsonochoam / drone_coding_challenge.py
Last active March 4, 2021 16:13
Coding Challenge
"""
Coding Challenge
Given a square airspace, 128km x 128km, and N=10,000 drones occupying the
airspace our challenge is to efficiently compute how many drones are flying
too close to one another.
Drone positions will be provided as an Nx2 array of [x,y]
coordinates (in meters). Drones must maintain a horizontal separation of
radius 0.5km from other drones. If a drone is within 0.5km of another drone,
@Nelsonochoam
Nelsonochoam / thread_pipeline.py
Created November 28, 2016 20:14
Python threaded pipeline execution example
import threading
from Queue import Queue, Empty
import numpy as np
import cv2
from PIL import Image
import boto
from boto.s3.connection import S3Connection
import boto3
@Nelsonochoam
Nelsonochoam / psqlcommands.md
Last active July 13, 2016 16:53
Clonning Postgres DB from one remote server to another one

Useful Postgres commands

  • Terminate all connections to a database
SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE datname='';