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
use bevy::prelude::{AppBuilder, Entity, With, World}; | |
use bevy::ecs::system::IntoExclusiveSystem; | |
use rustpython_vm::{self as vm, builtins::PyCode, PyRef, scope::Scope}; | |
pub(crate) struct PythonPlugin; | |
pub(crate) struct Script(pub String); | |
fn compile(world: &mut World) { | |
let interpreter = world |
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
# Configuration file for secret santa | |
participants = [ | |
"User One <u1@email.com>", | |
"User two <u2@email.com>", | |
"User three <u3@email.com>", | |
] | |
dont_pair = [ | |
"User One, User Two", |
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
static void dump_ktermios(struct device* dev, struct ktermios* ktermios, const char* func) { | |
char buf[128]; | |
unsigned int idx = 0; | |
size_t i = 0; | |
idx += snprintf(buf + idx, 128 - idx, "%lx:%lx:%lx:%lx", | |
(unsigned long int) ktermios->c_iflag, | |
(unsigned long int) ktermios->c_oflag, | |
(unsigned long int) ktermios->c_cflag, | |
(unsigned long int) ktermios->c_lflag); | |
for(i = 0; i < NCCS; ++i) |
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
/* start test code here */ | |
/* Link 0 */ | |
CDynamics3DMultiBodyObjectModel::CLink* pcLink0 = | |
dynamic_cast<CDynamics3DMultiBodyObjectModel::CLink*>(itDipole0->Body); | |
btMultiBodyLinkCollider& col0 = pcLink0->m_cMultiBodyLink; | |
btScalar* vel0 = col0.m_multiBody->getJointVelMultiDof(col0.m_link); | |
btVector3 cDampingTorque0(vel0[0],vel0[1],vel0[2]); |
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
#!/bin/bash | |
# required programs: gnu parallel, sshpass | |
OPENWRT_IP='192.168.1.1' | |
OPENWRT_PASS='amadeus0247' | |
OPENWRT_USER='root' | |
OPENWRT_GET_LEASES='cat /tmp/dhcp.leases' | |
BEBOT_MAC_START='00:19:88' | |
BEBOT_CONN_TEST_ATTEMPTS=10 |
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
#!/bin/bash | |
while inotifywait underlay.png | |
do | |
until composite -gravity center overlay.png underlay.png /tmp/out.png | |
do | |
sleep 0.25 | |
done | |
sleep 0.25 | |
done |
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
<prototype id="smartblock"> | |
<body position="0.0,0.0,0.01" orientation="0,0,0"/> | |
<bodies reference_body="block"> | |
<body id="block" geometry="box" size="0.055,0.055,0.055" mass="0.25"> | |
<offset/> | |
<coordinates/> | |
</body> | |
<body id="magnet_tq1" geometry="sphere" radius="0.003" mass="0.001"> | |
<offset position="0.0225,0.0225,0.047" orientation="1,0,0"/> | |
<coordinates/> |
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
clear parse_my_data | |
clear path | |
clear inputs | |
clear index | |
function parse_my_data(f_data_path) | |
csv_data = read_csv(f_data_path); | |
num_data = strtod(csv_data(2:$,1:$)); | |
num_data_points = size(num_data,1); | |
my_plot = figure(); |
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
struct SBuffer { | |
/* shared pointers to pixel data */ | |
std::shared_ptr<image_u8_t> Y, U, V; | |
/* index (set by capture thread) */ | |
unsigned int Index = -1; | |
/* capture time */ | |
std::chrono::time_point<std::chrono::steady_clock> Timestamp; | |
/* default constructor */ | |
SBuffer() : | |
Y(image_u8_create(0, 0), image_u8_destroy), |
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
#!/bin/bash | |
WORKING_DIR=temp | |
OUTPUT=output | |
#create working directory | |
if [[ -d $WORKING_DIR ]] | |
then | |
echo "Directory '$WORKING_DIR' already exists" | |
exit | |
else |
NewerOlder