Skip to content

Instantly share code, notes, and snippets.

View jorjun's full-sized avatar
🎯
Focusing

jorjun jorjun

🎯
Focusing
  • jorjun technical services
  • Edwinstowe, England
  • 15:26 (UTC +01:00)
  • X @jorjun
View GitHub Profile

Raspberry Pi 5 - Google Coral Edge M.2 TPU installation guide

To get started with either the Mini PCIe or M.2 Accelerator, all you need to do is connect the card to your system, and then install our PCIe driver, Edge TPU runtime, and the TensorFlow Lite runtime. This page walks you through the setup and shows you how to run an example model.

The setup and operation is the same for both M.2 form-factors, including the M.2 Accelerator with Dual Edge TPU.

Requirements

  • Raspberry Pi 5 with the following Linux operating system:
  • Raspberry Pi OS (64-bit) based on Debian 10 or newer
@markusrenepae
markusrenepae / simulator.py
Created January 2, 2020 22:22
This gist is for another medium article and is about an investment simulator.
import pandas as pd
import numpy as np
import datetime as dt
import math
import warnings
warnings.filterwarnings("ignore")
prices = pd.read_csv("adjclose.csv", index_col="Date", parse_dates=True)
volumechanges = pd.read_csv("volume.csv", index_col="Date", parse_dates=True).pct_change()*100
@bilsalak
bilsalak / exercise-slices.go
Created December 2, 2018 00:59
A Tour of Go - Exercise: Slices
// Implement Pic. It should return a slice of length dy, each element of which is
// a slice of dx 8-bit unsigned integers. When you run the program, it will display your picture,
// interpreting the integers as grayscale (well, bluescale) values.
//
// The choice of image is up to you. Interesting functions include (x+y)/2, x*y, and x^y.
//
// (You need to use a loop to allocate each []uint8 inside the [][]uint8.)
//
// (Use uint8(intValue) to convert between types.)
package main
@njam
njam / asyncio_pool.py
Created October 13, 2017 18:24
Limit number of concurrently running asyncio tasks
import asyncio
from collections import deque
class AsyncioPool:
def __init__(self, concurrency, loop=None):
"""
@param loop: asyncio loop
@param concurrency: Maximum number of concurrently running tasks
"""
@zacharycarter
zacharycarter / wclwn.md
Last active July 6, 2024 06:26
Binding to C Libraries with Nim
#!/bin/bash
# GUI-related packages
pkgs="
xserver-xorg-video-fbdev
xserver-xorg xinit
gstreamer1.0-x gstreamer1.0-omx gstreamer1.0-plugins-base
gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-alsa
gstreamer1.0-libav
epiphany-browser
@jiaaro
jiaaro / installing_pyaudio.md
Last active May 2, 2024 10:15
How to install PyAudio into a VirtualEnv on Mac OS X 10.10

Install portaudio using homebrew (or method of your choice)

brew install portaudio

create $HOME/.pydistutils.cfg using the include and lib directories of your portaudio install:

[build_ext]
@wrenoud
wrenoud / DropboxSync.py
Created November 10, 2012 02:46
DropboxSync
import os
import sys
import pickle
import console
# I moved 'dropboxlogin' into a sub folder so it doesn't clutter my main folder
sys.path += [os.path.join(os.path.dirname(os.path.abspath(__file__)), 'lib')]
import dropboxlogin # this code can be found here https://gist.github.com/4034526
STATE_FILE = '.dropbox_state'
@omz
omz / FileTransfer.py
Last active June 23, 2024 14:50
File Transfer script for Pythonista (iOS)
# File Transfer for Pythonista
# ============================
# This script allows you to transfer Python files from
# and to Pythonista via local Wifi.
# It starts a basic HTTP server that you can access
# as a web page from your browser.
# When you upload a file that already exists, it is
# renamed automatically.
# From Pythonista's settings, you can add this script
# to the actions menu of the editor for quick access.
@hrldcpr
hrldcpr / tree.md
Last active June 8, 2024 18:11
one-line tree in python

One-line Tree in Python

Using Python's built-in defaultdict we can easily define a tree data structure:

def tree(): return defaultdict(tree)

That's it!