This file contains hidden or 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 https://github.com/taizan/PaintsChainer/blob/master/cgi-bin/paint_x2_unet/cgi_exe.py | |
This code allows you to colorize on CPU (without CUDA). | |
$ python server.py |
This file contains hidden or 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 python3 | |
import glob | |
import json | |
import sys | |
import shutil | |
import os | |
#this might change, not sure, but probably not since 16 is a great number | |
HEADER_LENGTH = 16 |
This file contains hidden or 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
interface Window { | |
RPGAtsumaru; | |
} | |
class RPGAtsumaruState { | |
buttons; | |
next: Function; | |
create() { | |
this.buttons = { |
This file contains hidden or 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 | |
# | |
# pixelate.py | |
# | |
# https://github.com/tsutsuji815/pixel_convert | |
# | |
# pip install opencv-python | |
# pip install Pillow |
This file contains hidden or 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
/** | |
* read PNG file. | |
*/ | |
import * as fs from 'fs'; | |
function putUsage(): void | |
{ | |
const usage = "Usage: node pngreader.ts source.png"; | |
console.log(usage); | |
} |
This file contains hidden or 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
--- armaturesys\armature_export.py.orig 2015-01-27 08:38:31.732200600 +0900 | |
+++ armaturesys\armature_export.py 2017-08-01 18:33:26.455402600 +0900 | |
@@ -275,19 +275,22 @@ class Armature(): | |
return correction_matrix * matrix | |
elif (space == 'BONESPACE'): | |
if bone.parent: | |
- # not sure why extra = True is required here | |
- # but if extra = extra then transforms are messed up, so keep | |
- # for now | |
- parinv = self.get_bone_rest_matrix(bone.parent, 'ARMATURESPACE', |
This file contains hidden or 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
diff --git a/lib/bcdice/user_defined_dice_table.rb b/lib/bcdice/user_defined_dice_table.rb | |
index 11c8938..ca2b086 100644 | |
--- a/lib/bcdice/user_defined_dice_table.rb | |
+++ b/lib/bcdice/user_defined_dice_table.rb | |
@@ -52,7 +52,7 @@ module BCDice | |
return false | |
end | |
- index_list = @rows.map(&:to_i).unique.sort | |
+ index_list = @rows.map(&:to_i).uniq.sort |
This file contains hidden or 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
// https://github.com/opal/opal/blob/b1074a37150f9b0b53a35f0efa4a1cbddc02ba29/opal/corelib/random/mersenne_twister.rb | |
// node opal_mt.js | |
var mt19937 = (function() { | |
/* Period parameters */ | |
var N = 624; | |
var M = 397; | |
var MATRIX_A = 0x9908b0df; /* constant vector a */ | |
var UMASK = 0x80000000; /* most significant w-r bits */ | |
var LMASK = 0x7fffffff; /* least significant r bits */ | |
var MIXBITS = function(u,v) { return ( ((u) & UMASK) | ((v) & LMASK) ); }; |
This file contains hidden or 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 <set> | |
#include "NodeMap.h" | |
std::unordered_map<NiNode *, std::unordered_map<std::string, NiNode *> > m_nodes_container; | |
void DeleteNodeMap(NiNode * rootnode) | |
{ | |
_DMESSAGE("DeleteNodeMap rootnode %p", rootnode); | |
m_nodes_container.erase(rootnode); |
This file contains hidden or 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
for code in "1000".."9999" | |
a, b, c, d = code.bytes.map {|byte| byte - 0x30} | |
n = code.to_i | |
x = a + b + c + d | |
# min(x) = 1 | |
# max(x) = 36 | |
next if x == 1 |
OlderNewer