This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env xdg-open | |
# Make sure the Python script has +x | |
[Desktop Entry] | |
Version=1.0 | |
Name=Imgur Uploader | |
Exec=/path/to/imgur_upload %U | |
Terminal=true | |
Type=Application |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env python | |
from time import gmtime, strftime | |
import urllib2 as urllib | |
import re | |
from BeautifulSoup import BeautifulSoup, Tag | |
### | |
user = 'gbrlgrct' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import platform | |
import json | |
import urllib2 as urllib | |
from urllib import urlencode | |
# --- | |
# Copy + Paste functions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import re | |
from urllib2 import Request, urlopen | |
from bs4 import BeautifulSoup as Soup | |
class Scraper(object): | |
regions = dict( | |
lapaz = 'La Paz', | |
cochabamba = 'Cochabamba', | |
santacruz = 'Santa Cruz' | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "siterator.hpp" | |
#include "repeater.hpp" | |
#include "to_bool_arr.hpp" | |
#include <iostream> | |
#include <array> | |
int main() { | |
using namespace siterator; | |
using namespace extra; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tempfile, os, requests, json, webbrowser | |
import pyscreenshot as pyscr | |
from base64 import b64encode | |
# required modules: pyscreenshot, PIL, requests | |
__client_id__ = '...' | |
__client_secret__ = '...' | |
__cred_keys__ = ['access_token', 'refresh_token', 'token_type', 'expires_in'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <type_traits> | |
#include <array> | |
#include <climits> | |
#include <iostream> | |
#include <algorithm> | |
#include <tuple> | |
template<size_t... Vals> | |
struct Sequence { }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function list(v) { | |
function errchk(f, e) { | |
try { | |
return f(); | |
} catch (err) { | |
if (err instanceof ReferenceError && | |
err.message.match(/^[v]+\s/) !== null) { | |
return e ? e() : undefined; | |
} | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import std.traits, std.stdio; | |
void times(F)(uint n, F func) | |
if (isSomeFunction!F) | |
{ | |
immutable ar = arity!func; | |
foreach (uint i; 0 .. n) { | |
static if (ar == 0) { | |
func(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <tuple> | |
#include <string> | |
#include <typeinfo> | |
#include <memory> | |
#include <cxxabi.h> | |
namespace extra { | |
template <typename... Types> | |
struct TypeInfoExtractor; |
OlderNewer