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
label key command | |
general.pause space space | |
general.forward left left | |
general.backward right right | |
general.cooking ctrl.space offon | |
general.F1 F1 F1 | |
general.F2 F2 F2 | |
general.F3 F3 F3 | |
general.F4 F4 F4 | |
general.F5 F5 F5 |
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 subprocess as sp | |
import json | |
import pandas as pd | |
def _find_all_files_with_ext(dir, ext): | |
suffix = os.extsep + ext.lower() | |
for root, dirs, files in os.walk(dir): | |
for file in files: | |
if file.lower().endswith(suffix): |
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
{ | |
"PresetList": [ | |
{ | |
"AudioCopyMask": [ | |
"copy:aac", | |
"copy:ac3", | |
"copy:dtshd", | |
"copy:dts", | |
"copy:mp3", | |
"copy:truehd", |
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
# -*- coding: utf8 -*- | |
USAGE = \ | |
''' | |
USAGE: | |
rename | |
$ python rename.py rn {oldName} {newName} | |
copy & rename | |
$ python rename.py cp {oldName} {newName} | |
''' |
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 | |
os.system("taskkill /im emptyExample.exe") |
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 "ofMain.h" | |
class ofApp : public ofBaseApp { | |
static const std::string kEndpoint; | |
static const std::string kRequestLabel; // for testing | |
std::unordered_map<std::string, std::function<void(const ofHttpResponse &)>> handler; | |
std::vector<int> request_history; | |
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 glob | |
import commands | |
import time | |
files = glob.glob('*.mov') | |
for file in files: | |
if os.path.isfile(file) : | |
base, ext = os.path.splitext(file); | |
command = "/usr/local/bin/ffmpeg -y -i " + file + " " + base + ".wav" |
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 "log.h" | |
#include "ofUtils.h" | |
namespace aoi { | |
namespace detail { | |
static std::stack<ofLogLevel> log_level_stack; | |
static std::mutex log_level_mutex; | |
} | |
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 <iostream> | |
#include <random> | |
#include <chrono> | |
#include <functional> | |
#include <string> | |
using namespace std; | |
std::mt19937 random_engine; | |
std::uniform_real_distribution<float> random_distribution; |
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 <codecvt> | |
#include "ofxTrueTypeFontUL2.h" // https://github.com/kentaroid/ofxTrueTypeFontUL2 | |
std::wstring text; | |
ofxTrueTypeFontUL2 typeface; | |
void ofApp::setup() { | |
ofXml xml("multilingual_words.xml"); // have to be saved as UTF-8 with BOM | |
// do something with xml... | |
std::string text_from_xml = xml.getAttribute("my_chinese_word"); |