Skip to content

Instantly share code, notes, and snippets.

View carlosevi94's full-sized avatar

Carlos Sevilla Barceló carlosevi94

  • Sevilla
View GitHub Profile
@sainathadapa
sainathadapa / anti_join.py
Created May 9, 2018 10:00
anti-join-pandas
import pandas as pd
def anti_join(x, y, on):
"""Return rows in x which are not present in y"""
ans = pd.merge(left=x, right=y, how='left', indicator=True, on=on)
ans = ans.loc[ans._merge == 'left_only', :].drop(columns='_merge')
return ans
def anti_join_all_cols(x, y):
@seanbehan
seanbehan / app.py
Last active March 13, 2023 04:55
Flask with Django ORM
'''
Run the following commands (bc. gists don't allow directories)
pip install flask django dj-database-url psycopg2
mkdir -p app/migrations
touch app/__init__.py app/migrations/__init__.py
mv models.py app/
python manage.py makemigrations
python manage.py migrate
@mdang
mdang / RAILS_CHEATSHEET.md
Last active November 4, 2024 15:59
Ruby on Rails Cheatsheet

Ruby on Rails Cheatsheet

Architecture

Create a new application

Install the Rails gem if you haven't done so before

@renshuki
renshuki / ubuntu_agnoster_install.md
Last active October 23, 2024 13:16
Ubuntu 16.04 + Terminator + Oh My ZSH with Agnoster Theme

Install Terminator (shell)

sudo add-apt-repository ppa:gnome-terminator
sudo apt-get update
sudo apt-get install terminator

Terminator should be setup as default now. Restart your terminal (shortcut: "Ctrl+Alt+T").

Install ZSH

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active November 18, 2024 11:51
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@HiroNakamura
HiroNakamura / EjemplosPython.py
Last active March 30, 2024 05:49
Ejemplos de Python
# -*- coding: cp1252 -*-
'''
[Programación en Python]
'''
'''
Python tiene veintiocho palabras clave:
and continue else for import not raise
assert def except from in or return
break del exec global is pass try