Skip to content

Instantly share code, notes, and snippets.

View EPRINC-MP's full-sized avatar

Max Pyziur EPRINC-MP

View GitHub Profile
@rezkam
rezkam / remove_twitter_favorites.py
Created May 13, 2019 23:14
Remove likes (favorite) from your tweets using twitter API (Working with Python 3.5+)
"""
Remove likes (favorite) from your tweets using twitter API
you need to install twitter-client for python to use this code:
pip install python-twitter ( more info https://github.com/bear/python-twitter)
to use this you need to generate authntication tokens for your account
find more info on (https://developer.twitter.com/en/docs/basics/authentication/guides/access-tokens)
"""
import asyncio
@romansklenar
romansklenar / crosstab.sql
Last active February 1, 2023 18:46
PostgreSQL "pivot table" example using tablefunc extension
CREATE EXTENSION tablefunc;
CREATE TABLE sales(year int, month int, qty int);
INSERT INTO sales VALUES(2007, 1, 1000);
INSERT INTO sales VALUES(2007, 2, 1500);
INSERT INTO sales VALUES(2007, 7, 500);
INSERT INTO sales VALUES(2007, 11, 1500);
INSERT INTO sales VALUES(2007, 12, 2000);
INSERT INTO sales VALUES(2008, 1, 1000);
INSERT INTO sales VALUES(2009, 5, 2500);