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/python3 | |
| import os | |
| import bpy | |
| DIRNAME = os.path.dirname(os.path.realpath(__file__)) | |
| FILES = [f for f in os.listdir(DIRNAME) if os.path.isfile(os.path.join(DIRNAME, f)) and f.endswith(('blend'))] | |
| NEW_FILES_DIR = os.path.join(DIRNAME, 'ok') | |
| os.mkdir(NEW_FILES_DIR) |
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
| abspath="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")"; pwd)" | |
| echo $abspath |
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
| import os | |
| import shutil | |
| total, used, free = shutil.disk_usage('.') | |
| print(total, used, free / (1024 * 1024 * 1024)) |
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 i in *.jpg; do convert $i \( mask.png -channel a -separate +channel \) -compose copy_opacity -composite ${i%jpg}png;done |
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
| int typedef Int, *pInt, **ppInt; | |
| unsigned typedef char UChar; | |
| int main() | |
| { | |
| UChar u = 25 * sizeof(UChar); | |
| Int a = 17 * sizeof(UChar); | |
| pInt b = &a; | |
| ppInt c = &b; | |
| return 0[c][0] + u; |
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 <unordered_map> | |
| #include <string> | |
| #include <iostream> | |
| struct foo; | |
| struct bar; | |
| struct baz; | |
| template<typename T> struct uhm; |
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 <variant> | |
| #include <iostream> | |
| #include <ios> | |
| #define print(x) do { std::cout << #x << ": " << std::boolalpha << (x) << std::endl; } while (0) | |
| struct IsEmptyVisitor | |
| { | |
| template<typename T> | |
| bool operator()(const T&) const { return false; } |
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
| cmake_minimum_required(VERSION 3.5) | |
| find_program(CCACHE_PROGRAM ccache) | |
| if(CCACHE_PROGRAM) | |
| set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}") | |
| endif() | |
| set(program_name an_experiment) | |
| project(${program_name} CXX) |
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
| // x86_64-redhat-linux | |
| #include <iostream> | |
| template<typename T> struct foo; | |
| #ifndef NO_CHAR | |
| template<> struct foo<char> { void operator()() { std::cout << "char" << std::endl;} }; | |
| #endif | |
| template<> struct foo<unsigned char> { void operator()() { std::cout << "unsigned char" << std::endl;} }; |
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
| class Foo(object): | |
| def fce(self): | |
| print "foo" | |
| class Bar(Foo): | |
| def fce(self): | |
| super(Bar, self).fce() # c'est nécessaire | |
| print "bar" | |
| a = Bar() |
NewerOlder