Skip to content

Instantly share code, notes, and snippets.

View gfelitti's full-sized avatar

Guilherme Felitti gfelitti

  • São Paulo
View GitHub Profile
@psychemedia
psychemedia / free text feedback.ipynb
Created December 9, 2019 19:09
Notebook showing example NLP marking support tool for free text answers against a specimen answer
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@psychemedia
psychemedia / Quantity Parsing.ipynb
Created August 6, 2019 13:35
Example of parsing quantities from sentences
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nikhilkumarsingh
nikhilkumarsingh / google_calendar_api_integration.ipynb
Created May 10, 2019 10:01
Integrating Google Calendar API in Python Projects
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@nportinari
nportinari / pesquisas-eleitorais.ipynb
Last active June 14, 2020 23:30
Pesquisas eleitorais
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@tdpetrou
tdpetrou / basictransformer.py
Last active September 7, 2023 13:44
A custom scikit-learn transformer for one-hot encoding categorical values, and standardizing numeric columns
import pandas as pd
import numpy as np
from sklearn.base import BaseEstimator
class BasicTransformer(BaseEstimator):
def __init__(self, cat_threshold=None, num_strategy='median', return_df=False):
# store parameters as public attributes
self.cat_threshold = cat_threshold
@palewire
palewire / pg_to_rds.sh
Last active July 16, 2018 19:45
Migrate PostgreSQL databases to Amazon RDS
pg_dump -Fc --no-acl --no-owner -h localhost -U <YOUR LOCAL DATABASE USER> <YOUR LOCAL DATABASE NAME> > <YOUR LOCAL DATABASE NAME>.dump;
pg_restore -v -h <YOUR RDS IP ADDRESS> -U <YOUR RDS DATABASE USER> -d <YOUR RDS DATABASE NAME> <YOUR LOCAL DATABASE NAME>.dump;
@AlexArcPy
AlexArcPy / sql2pandas2sql.ipynb
Created February 22, 2018 10:39
Using IPython SQL magic in a Jupyter notebook to create new database tables using the PERSIST command
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@DusanMadar
DusanMadar / TorPrivoxyPython.md
Last active November 7, 2025 21:55
A step-by-step guide how to use Python with Tor and Privoxy

A step-by-step guide how to use Python with Tor and Privoxy

Latest revision: 2025-07-24.

Tested on Ubuntu 24.04 Docker container. The Dockerfile is a single line FROM ubuntu:24.04. Alternatively, you can simply run docker run -it ubuntu:24.04 bash.

NOTE: stopping services didn't work for me for some reason. That's why there is kill $(pidof <service name>) after each failed service <service name> stop to kill it.

References

@Irio
Irio / normalize_string.py
Created December 12, 2017 15:53
normalize_string.py
import unicodedata
def normalize_string(string):
if isinstance(string, str):
nfkd_form = unicodedata.normalize('NFKD', string.lower())
return nfkd_form.encode('ASCII', 'ignore').decode('utf-8')
@jakevdp
jakevdp / PIL-Animation.ipynb
Last active June 17, 2025 20:25
Quick example of an animation with ipywidgets and PIL
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.