Skip to content

Instantly share code, notes, and snippets.

View trianglesis's full-sized avatar
🎯
Focusing

Trianglesis trianglesis

🎯
Focusing
View GitHub Profile
@trianglesis
trianglesis / python_decorator_guide.md
Created July 20, 2018 11:11 — forked from Zearin/python_decorator_guide.md
The best explanation of Python decorators I’ve ever seen. (An archived answer from StackOverflow.)

NOTE: This is a question I found on StackOverflow which I’ve archived here, because the answer is so effing phenomenal.


Q: How can I make a chain of function decorators in Python?


If you are not into long explanations, see [Paolo Bergantino’s answer][2].

@trianglesis
trianglesis / gist:8ed6075fa7105f5fabf2b23b822cbcfa
Last active July 27, 2016 10:15 — forked from antixrist/gist:faf300eb04c1aeca9137
VK API: Parse json Args to array.
var myList = Args.post_id_array_str;
// List should end with separator, for exampe ","
// car myList = 111,222,333,444,
var listSeparator = ",";
var listItemsType = "integer";
var result = [];
var charsLength = myList.length;
var currentPosition = 0;
var previousSeparatorPosition = -1;
@trianglesis
trianglesis / GoogleAPI.py
Created February 3, 2016 19:11 — forked from SalvaJ/GoogleAPI.py
Example making HTTP request to use Google API without api-client.It works in Python3 (tested ok in 3.3.5)
#!usr/bin/python3
# -*- coding: UTF-8 -*-
"""This module is a sample of the OAuth2 authentication by Python3"""
__version__ = "0.1.0"
__author__ = "shin (shin.hateblo.jp)"
__copyright__ = "(C) 2012 shin"
__email__ = "s2pch.luck@gmail.com"
__license__ = "Apache License 2.0"