-
In
~/.ssh/config
, include the lines:Host * ControlPath ~/.ssh/sockets/%r@%h-%p
#!/usr/bin/env bash | |
set -euo pipefail | |
NAME=$(jj config get user.name) | |
MAIL=$(jj config get user.email) | |
SIGNSTR="Signed-off-by: ${NAME} <${MAIL}>" | |
contents=$(<"$1") |
import numpy as np | |
# handle pytorch tensors etc, by using tensorboardX's method | |
try: | |
from tensorboardX.x2num import make_np | |
except ImportError: | |
def make_np(x): | |
return np.array(x).copy().astype('float16') | |
class RunningStats(object): |
import math | |
import torch | |
import torch.nn as nn | |
import torchvision | |
REGISTERED_OUTPUT_SHAPE_TYPES = [] | |
def compute_type(type): | |
def _wrap(func): |
// from https://github.com/betaflight/betaflight-configurator | |
'use strict'; | |
//MSPCodes needs to be re-integrated inside MSP object | |
var MSPCodes = { | |
MSP_API_VERSION: 1, | |
MSP_FC_VARIANT: 2, | |
MSP_FC_VERSION: 3, | |
MSP_BOARD_INFO: 4, | |
MSP_BUILD_INFO: 5, |
I screwed up using git ("git checkout --" on the wrong file) and managed to delete the code I had just written... but it was still running in a process in a docker container. Here's how I got it back, using https://pypi.python.org/pypi/pyrasite/ and https://pypi.python.org/pypi/uncompyle6
apt-get update && apt-get install gdb
These commands are based on a askubuntu answer http://askubuntu.com/a/581497 | |
To install gcc-6 (gcc-6.1.1), I had to do more stuff as shown below. | |
USE THOSE COMMANDS AT YOUR OWN RISK. I SHALL NOT BE RESPONSIBLE FOR ANYTHING. | |
ABSOLUTELY NO WARRANTY. | |
If you are still reading let's carry on with the code. | |
sudo apt-get update && \ | |
sudo apt-get install build-essential software-properties-common -y && \ | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y && \ |
// | |
// Source code for application to transmit image from ov7670 to PC via USB | |
// By Siarhei Charkes in 2015 | |
// http://privateblog.info | |
// | |
#include <stdint.h> | |
#include <avr/io.h> | |
#include <util/twi.h> | |
#include <util/delay.h> |
// Creating a node graph editor for Dear ImGui | |
// Quick sample, not production code! | |
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff, | |
// which ended up feeding a thread full of better experiments. | |
// See https://github.com/ocornut/imgui/issues/306 for details | |
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors | |
// Changelog | |
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic(). |
// To the extent possible under law, the Yawning Angel has waived all copyright | |
// and related or neighboring rights to orhttp_example, using the creative | |
// commons "cc0" public domain dedication. See LICENSE or | |
// <http://creativecommons.org/publicdomain/zero/1.0/> for full details. | |
package main | |
import ( | |
// Things needed by the actual interface. | |
"golang.org/x/net/proxy" |