Skip to content

Instantly share code, notes, and snippets.

@israelio
israelio / movedigiphotos.bash
Last active May 20, 2017 16:19 — forked from jvhaarst/movedigiphotos.bash
Bash script to move images, based on exif data and file timestamp
#!/bin/bash
# Reads EXIF creation date from all .JPG files in the
# current directory and moves them carefully under
#
# $BASEDIR/YYYY/MM/DD/
#
# ...where 'carefully' means that it does not overwrite
# differing files if they already exist and will not delete
# the original file if copying fails for some reason.
// Mock dynamoDB
const requestMock = {
promise: jest.fn().mockImplementation( () => Promise.resolve({
TableName: "my table name",
Items: [
{
mykey: "myValue",
},
]
})
@israelio
israelio / final.py
Created December 8, 2022 12:59
Reinforcement learning ev3 - final
import time
import random
from ev3dev2.motor import LargeMotor, OUTPUT_A, OUTPUT_B, MoveTank, SpeedPercent
from ev3dev2.sensor import INPUT_1, INPUT_2, INPUT_3, INPUT_4
from ev3dev2.sensor.lego import UltrasonicSensor
from ev3dev2.sound import Sound
SPEED = 20
DRIVE_TIME = 1