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/python3 | |
import argparse | |
parser = argparse.ArgumentParser() | |
parser.add_argument("sum", type=int) | |
parser.add_argument("-s", "--start", type=int, default=1, help="start searching from a specific digit", metavar="DIGIT") | |
parser.add_argument("-t", "--stop", type=int, default=9, help="stop searching at a specific digit", metavar="DIGIT") | |
parser.add_argument("-n", "--min-addends", type=int, default=1, help="minimum number of addends", metavar="MIN") | |
parser.add_argument("-m", "--max-addends", type=int, default=9, help="maximum number of addends", metavar="MAX") |
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/python | |
''' | |
This script downloads your likes from your Tumblr blog. | |
It needs *BOTH* a valid OAuth key + secret *AND* a user token (obtained through OAuth). | |
Obtain the former here: https://www.tumblr.com/oauth/apps | |
Obtain the latter through API Explorer: https://api.tumblr.com/console/calls/user/info | |
(or through the nonsense of an OAuth dance if you'd like, this is Tumblr anyway, | |
I won't kink-shame you. But seriously.) |
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 Underscore.js 1.8.3 (http://underscorejs.org | |
// (c) 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors | |
// Underscore may be freely distributed under the MIT license. | |
function _extend(obj) | |
{ | |
var length = arguments.length; | |
if (length < 2 || obj == null) | |
{ | |
return obj; |
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 bpy | |
bpy.context.user_preferences.system.compute_device_type = 'CUDA' | |
bpy.context.user_preferences.system.compute_device = 'CUDA_0' | |
bpy.context.scene.cycles.device = 'GPU' | |
print(bpy.context.scene.cycles.device) |
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/perl -w | |
# | |
# Jean-Samuel Reynaud <[email protected]> | |
# base on snmp__if_ from Jimmy Olsen, Dagfinn Ilmari Mannsaaker | |
# | |
# This program is free software; you can redistribute it and/or | |
# modify it under the terms of the GNU General Public License | |
# as published by the Free Software Foundation; version 2 dated June, | |
# 1991. | |
# |