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
diff --git a/toonz/sources/common/tapptools/tenv.cpp b/toonz/sources/common/tapptools/tenv.cpp | |
index 979376f..b31715d 100644 | |
--- a/toonz/sources/common/tapptools/tenv.cpp | |
+++ b/toonz/sources/common/tapptools/tenv.cpp | |
@@ -5,8 +5,8 @@ | |
#include "tconvert.h" | |
#include "tfilepath_io.h" | |
+#include <QDir> | |
#include <QSettings> |
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
def sandbox_code(code): | |
import numba | |
from types import FunctionType | |
fn = FunctionType(code, {}, "fn", ()) | |
fn_jit = numba.jit(fn, nopython=True) | |
a = fn_jit._compile_for_args() | |
import IPython; IPython.embed() | |
return fn_jit.__code__ | |
def safe_eval(expr): |
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
Module( | |
body=[ | |
Import( | |
names=[ | |
alias( | |
name='ast', | |
asname=None, | |
), | |
], | |
), |
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
/* | |
* Example of how preprocessor can be used to ensure unique args. | |
* (by checking their identifiers). | |
* | |
* See: http://stackoverflow.com/questions/31631862 | |
* | |
* ... and yes, this is ridiculous! (more a testcase to see if its even possible). | |
*/ | |
/* -------------------------------------------------------------------- */ |
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
/* | |
* ***** BEGIN MIT LICENSE BLOCK ***** | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining | |
* a copy of this software and associated documentation files (the | |
* "Software"), to deal in the Software without restriction, including | |
* without limitation the rights to use, copy, modify, merge, publish, | |
* distribute, sublicense, and/or sell copies of the Software, and to | |
* permit persons to whom the Software is furnished to do so, subject to | |
* the following conditions: |
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
/* Originally from: http://stackoverflow.com/a/27663998/432509 | |
* | |
* With following modifications: | |
* - Use a pointer to the tail (remove 2x conditional checks, reduces code-size). | |
* - Avoid re-assigning empty values the size doesn't change. | |
* - Corrected comments. | |
*/ | |
static void *listbase_sort_impl(struct Link *head, int (*cmp)(const void *, const void *)) | |
{ |
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
data = tuple(range(500000)) | |
N = 3 | |
import struct | |
import time | |
print("Iter pack:\n----\n") | |
for i in range(N): | |
t = time.time() | |
v = b''.join(struct.pack('d', elem) for elem in data) | |
print("> ", time.time() - t) |
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
/* varargs macros (keep first so others can use) */ | |
/* --- internal helpers --- */ | |
#define _VA_NARGS_GLUE(x, y) x y | |
#define _VA_NARGS_RETURN_COUNT(\ | |
_1_, _2_, _3_, _4_, _5_, _6_, _7_, _8_, _9_, _10_, _11_, _12_, _13_, _14_, _15_, _16_, \ | |
_17_, _18_, _19_, _20_, _21_, _22_, _23_, _24_, _25_, _26_, _27_, _28_, _29_, _30_, _31_, _32_, \ | |
_33_, _34_, _35_, _36_, _37_, _38_, _39_, _40_, _41_, _42_, _43_, _44_, _45_, _46_, _47_, _48_, \ | |
_49_, _50_, _51_, _52_, _53_, _54_, _55_, _56_, _57_, _58_, _59_, _60_, _61_, _62_, _63_, _64_, \ | |
count, ...) count | |
#define _VA_NARGS_EXPAND(args) _VA_NARGS_RETURN_COUNT 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
bl_info = { | |
"name": "Sequence Switcher", | |
"author": "Campbell Barton", | |
"version": (1, 0), | |
"blender": (2, 6, 4), | |
"location": "Sequencer Header", | |
"description": "Switches finals with current renders", | |
"warning": "", | |
"wiki_url": "", | |
"tracker_url": "", |
NewerOlder