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 soundcloud | |
from clize import clize, run | |
from subprocess import call | |
@clize | |
def sc_load(tracks='', likes='', tags='', group=''): | |
opts = {} | |
if likes: |
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 | |
# -*- coding: utf-8 -*- | |
# | |
# DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
# Version 2, December 2004 | |
# | |
# Copyright (C) 2012 paradoxxx_zero | |
# | |
# Everyone is permitted to copy and distribute verbatim or modified | |
# copies of this license document, and changing it is allowed as long |
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
# -*- coding: utf-8 -*- | |
# This file is part of pygal | |
# | |
# A python svg graph plotting library | |
# Copyright © 2012-2013 Kozea | |
from __future__ import division | |
def cubic_interpolate(x, a, precision=250): | |
"""Takes a list of (x, a) and returns an iterator over |
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
var _rcokt_farms = $('.farmtown_owned a').map(function () { return JSON.parse(atob($(this).attr('href')).split(String.fromCharCode(0))[0]).id;}), | |
_rcokt_town = $('.ftr_undefined').attr('id').split('_')[2], | |
_rcokt_token = game_definition_object.csrfToken, | |
_rcokt_link = $('<a>'); | |
$('#links').append($('<li>').append(_rcokt_link)); | |
function claim_okt() { | |
$.ajax({ | |
url: 'http://fr38.grepolis.com/game/oktoberfest?action=start_production&town_id=' + _rcokt_town + '&h=' + _rcokt_token, |
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
var _rc_ = {}; | |
$('#memo_icon').remove(); | |
$('<a>').attr('id', '_rc_claim').addClass('town_control').css({left: '322px', backgroundPosition: "-323px 9px"}).text('+').on('click', _rc_start).insertBefore($('#city_overview')); | |
function _rc_start () { | |
if (webkitNotifications && webkitNotifications.checkPermission() != 0) { | |
webkitNotifications.requestPermission(); | |
} | |
if(!_rc_.hasOwnProperty(Game.townId)) { |
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
from flask import Flask, redirect | |
from random import choice | |
from pyquery import PyQuery as pq | |
app = Flask(__name__) | |
usable_images = [] | |
for page in range(1, 10): | |
d = pq(url='https://alpha.wallhaven.cc/search?categories=010&purity=100&ratios=16x9&sorting=views&order=desc&page=%d' % page) | |
usable_images.extend(list(d.find('[data-wallpaper-id]').map(lambda _, x: x.attrib['data-wallpaper-id']))) |
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 'https://fonts.googleapis.com/css?family=Anonymous+Pro:400,700' | |
$font-family: 'Anonymous Pro', monospace | |
$font-size: 1.3em | |
$fg: darken(#AABBC3, 5%) | |
$bg: #212121 | |
$active-bg: rgba(0, 0, 0, 0.19) | |
$colors: #000000, rgba(211, 66, 62, 1), #8BD649, #FAD430, #c792ea, rgba(255, 83, 112, 1), #8EACE3, #DDDDDD, #656565, #F77669, #91b859, #ffcb6b, rgba(199, 146, 234, 1), #ff5370, #B2CCD6, rgba(217, 245, 221, 1) |
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
[Unit] | |
Description=Image server | |
[Service] | |
ExecStart=/usr/bin/python /etc/butterfly/themes/material-dark-bg/img-serve.py | |
[Install] | |
WantedBy=default.target |
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
from time import sleep | |
from flask import Flask, Response | |
app = Flask(__name__) | |
@app.route("/") | |
def hello(): | |
def gen(*args): |
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
from sqlalchemy import create_engine, Column, Integer, String, ForeignKey | |
from sqlalchemy.orm import ( | |
declarative_base, | |
joinedload, | |
query_expression, | |
relationship, | |
sessionmaker, | |
) | |
engine = create_engine( |
OlderNewer