Skip to content

Instantly share code, notes, and snippets.

#!/bin/env bash
cp -r /home/.ssh/* /root/.ssh/
cp -r /home/.gitconfig /root/.gitconfig
cp -r /home/.conda_envs/nerfstudio /opt/conda/envs/
(
cd /home/nerfstudio
git pull
)
#!/bin/env bash
cp -r /home/.ssh /root/
#cp -r /home/.conda_envs/nerfstudio /opt/conda/envs/
cp -r /home/.conda_envs/snerg3.8 /opt/conda/envs/
#(
# cd /home/nerfstudio
# git pull
#)
#!/bin/sh
cd /notebooks/dl_experiments
git add .
git commit -m "Commit"
git push origin master
cd /notebooks/web
git add .
git commit -m "Commit"
#!/bin/sh
# run it from /storage/pre_run.sh in paperspace fastai container
# setup git user
git config --global user.email "misza222@gmail.com"
git config --global user.name "Michal Pawlowski"
# download and setup cmd utils
-------------------------------------------------
nench.sh v2017.06.01 -- https://git.io/nench.sh
benchmark timestamp: 2018-02-28 16:17:56 UTC
Digital Ocean 4 GB 2 vCPUs 25 GB 5 TB $40/mo
-------------------------------------------------
Processor: Intel(R) Xeon(R) Platinum 8168 CPU @ 2.70GHz
CPU cores: 2
Frequency: 2693.674 MHz
RAM: 3.9G
{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
@misza222
misza222 / iterative_deepening.py
Created June 1, 2017 08:12
Iterative deepening timeout example in python for *nix
import signal
import time
class TimeOut():
"""
TimeOut for *nix systems
"""
class TimeOutException(Exception):
pass

Turn on/off a LED from a web page

VIDEO

# LAYER_CONF_VERSION is increased each time build/conf/bblayers.conf
# changes incompatibly
LCONF_VERSION = "6"
BBPATH = "${TOPDIR}"
BBFILES ?= ""
BBLAYERS ?= " \
/usr/local/storage/misza/yocto/galileo_iot-devkit/iotdk_src_140220/meta \
/usr/local/storage/misza/yocto/galileo_iot-devkit/iotdk_src_140220/meta-oe \
@misza222
misza222 / drive_led_with_button.js
Created March 3, 2014 17:23
Driving LED on Intel Galileo with push button
var fs = require('fs');
var button_gpio = 17; // maps to digital PIN5 on the board
var led_gpio = 27; // maps to digital PIN7
var fileOptions = {encoding: 'ascii'};
var exportGpio = function(gpio_nr) {
fs.writeFile('/sys/class/gpio/export', gpio_nr, fileOptions, function (err) {
if (err) { console.log("Couldn't export %d, probably already exported.", gpio_nr); }