Skip to content

Instantly share code, notes, and snippets.

View garyo's full-sized avatar

Gary Oberbrunner garyo

View GitHub Profile

Query by text "covid-19" -- returns PDB IDs, one per line

Just fill in the keywords section, the rest is constant. Keywords are comma-separated and get "AND"ed together.

% curl --data-binary '<orgPdbQuery>
<queryType>org.pdb.query.simple.AdvancedKeywordQuery</queryType>
<keywords>covid-19</keywords>
</orgPdbQuery>' https://www.rcsb.org/pdb/rest/search

Query by text "1d3"

@garyo
garyo / blender-gltf2-import-speedups.patch
Last active February 12, 2020 20:55
Patch to improve speed of glTF2 import into Blender
diff --git a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
index 5904a974..ed652676 100755
--- a/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
+++ b/io_scene_gltf2/blender/imp/gltf2_blender_gltf.py
@@ -23,7 +23,26 @@ class BlenderGlTF():
raise RuntimeError("%s should not be instantiated" % cls)
@staticmethod
- def create(gltf):
+ def create(gltf, profile=True):

DaVinci Resolve Scripting Documentation

Updated as of 08 March 2019


In this package, you will find a brief introduction to the Scripting API for DaVinci Resolve Studio. Apart from this README.txt file, this package contains folders containing the basic import modules for scripting access (DaVinciResolve.py) and some representative examples.

Overview

As with Blackmagic Design Fusion scripts, user scripts written in Lua and Python programming languages are supported. By default, scripts can be invoked from the Console window in the Fusion page, or via command line. This permission can be changed in Resolve Preferences, to be only from Console, or to be invoked from the local network. Please be aware of the security implications when allowing scripting access from outside of the Resolve application.

@garyo
garyo / README.md
Created October 14, 2019 20:16
Test case for emacs27 + lsp + vue + vls problem

Install

  • Use recent nightly Emacs 27 with libjansson support (native JSON)
  • Install Node v10 or later (with npm)
  • Run this:
npm install

Run test

emacs -q -l test-init.el test.vue

@garyo
garyo / semaphore.js
Created August 10, 2018 15:49
Semaphore-ish example in Javascript
///////// This part just prints out all the event loop ticks
// Only use in node.js, not browser (I think)
const async_hooks = require('async_hooks');
async_hooks.createHook({
init: (id, type, triggerAsyncId, resource) => {
process._rawDebug(`${type}(${id}): trigger: ${triggerAsyncId}, resource: ${resource}`);
},
before: (id) => {
process._rawDebug(`async hook before: ${id}`);
#include <vector>
struct add1_op {
void operator()(const float x0, float& dst) const {
dst = x0 + 1;
}
};
template<class Op>
struct process_vec1 {
> godot.windows.tools.exe!Variant::reference(const Variant & p_variant) Line 909 C++ Symbols loaded.
godot.windows.tools.exe!Variant::Variant(const Variant & p_variant) Line 2616 C++ Symbols loaded.
godot.windows.tools.exe!godot_variant_new_copy(godot_variant * p_dest, const godot_variant * p_src) Line 52 C++ Symbols loaded.
horizonlib.dll!godot::Variant::Variant(const godot::Variant & v) Line 22 C++ Symbols loaded.
[Inline Frame] horizonlib.dll!godot::_WrappedMethod<ExportGlTF,void,godot::Node *,godot::String>::apply(godot::Variant *) Line 206 C++ Symbols loaded.
horizonlib.dll!godot::__wrapped_method<ExportGlTF,void,godot::Node * __ptr64,godot::String>(void * __formal, void * method_data, void * user_data, int num_args, godot_variant * * args) Line 223 C++ Symbols loaded.
godot.windows.tools.exe!NativeScriptInstance::call(const StringName & p_method, const Variant * * p_args, int p_argcount, Variant::CallError & r_error) Line 701 C++ Symbols loaded.
godot.windows.tools.exe!Object::call(const S
##### Code:
void ExportGlTF::export_gltf(godot::Node node, const godot::String filename)
{
std::string node_name = gdstring_to_string(node.get_name());
DPRINT("gltf", "Exporting scene to glTF file {}, starting with {}"_format(filename, node_name));
}
void ExportGlTF::_register_methods()
{
godot::register_method("export_gltf", &ExportGlTF::export_gltf);