Skip to content

Instantly share code, notes, and snippets.

@DocGarbanzo
DocGarbanzo / README.md
Last active February 6, 2023 00:50
A demo notebook for tensorflow datasets from generator

Creating training pipelines in tensorflow using generators

Here we show how using generators allows to use large data sets that don't fit into computer memory for training. We focus on models with multiple input and output arrays, where the generator has to provide the data in form of dictionaries to the tf.dataset. This data pipeline is used in the Donkey Car training. The notebook is simply extracting the pipeline mechanics to give a simplified view on the functionality.

@nahakiole
nahakiole / flatastic.js
Created March 27, 2021 09:44
Simple Flatastic API Library for NodeJS
const request = require('request');
exports.Flatastic = function Flatastic(apikey) {
this.apikey = apikey;
Flatastic.prototype.request = function (url, option, cb){
const options = {
@DocGarbanzo
DocGarbanzo / Readme.md
Last active February 6, 2023 00:50
Mock up of an alternative parts and car setup for donkeycar.

Mock up of alternative donkeycar parts and car infrastructure.

Here we share a global data bus which allows to remove the explicit input and output arguments for current parts when added to the Vehicle. Each part runs in its own thread with its own frequency. Parts can write to and read from the data bus asynchronously and there is no global vehicle loop any longer. There is some resemblance to ROS whereby parts subscribe to topics. There is currently no control about type safety or allowed types in the data bus but that could be added easily.

@obax
obax / checkwifi.sh
Last active March 10, 2024 15:02
Rebooting the Raspberry Pi when it loses wireless connection
# Source: https://weworkweplay.com/play/rebooting-the-raspberry-pi-when-it-loses-wireless-connection-wifi/
# Save under /usr/local/bin/checkwifi.sh
# The Raspberry Pi tends to drop network connection (especially wireless wifi) rather fast, which is a real pain when you're trying to do anything that has the RPi running constantly from a remote location (like our RaspEye does).
# However, it's possible to detect wifi connection loss and perform upon it. It's easiest to just do a full system reboot.
# Change the IP on the first line to the IP of your router, or some other device on your network that you can assume will be always online.
# First step is to ping your IP.
# On line three, the $? represents the exit code of the previous command, in this case the ping.
@anantbahuguna
anantbahuguna / README-Template.md
Created April 30, 2020 06:08 — forked from PurpleBooth/README-Template.md
A template to make good README.md

Project Title

One Paragraph of project description goes here

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

@pansapiens
pansapiens / custom_environments_in_jupyter.ipynb
Last active July 21, 2020 01:53
Using custom environments in Jupyter
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@okajasto
okajasto / augment.py
Created April 1, 2019 20:31
Simple script to augment DonkeyCar tubs
"""
Script to augment teaching data
Usage:
augment.py --path=<source-dir> [--out=<target_dir>] --aug=<name> [--prob=<PROBABILITY>] [--add-prefix] [--start-id=<id>]
Options:
-h --help Show this screen.
--path TUBPATH Path of the record directory
--out TARGETPATH Path to directory where augmented data is placed, directory is created if it doesn't exist
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@carry0987
carry0987 / RPi3-Auto-WiFi.md
Last active July 16, 2024 07:43
Raspberry Pi 3B+ Auto reconnect to wifi when lost connect

Auto reconnect to wifi when lost connection

Before you start, make sure ip command is available on your system. In modern Linux distributions, ip replaces older ifconfig command. If net-tools package (that includes ifconfig) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools.

Create script file

Use touch /home/pi/wifi-reconnect.sh to create a shell script file, with the following content:

#!/bin/bash
@iannase
iannase / soundscraper.py
Created April 8, 2018 22:13
Python web scraper that gets the new / top 50 charts, also allows you to play tracks using the selenium browser
from selenium import webdriver
import requests
import bs4
import os
# new, top, or mix url
top_url = "https://soundcloud.com/charts/top"
new_url = "https://soundcloud.com/charts/new"
track_url = "https://soundcloud.com/search/sounds?q="
artist_url = "https://soundcloud.com/search/people?q="