Tested on NVIDIA RTX 4090, but these instructions also cover AMD and Mac in case you wanna try those.
This guide assumes you are running Linux (I ran this on Ubuntu).
Before you get excited:
#!/bin/bash | |
### steps #### | |
# verify the system has a cuda-capable gpu | |
# download and install the nvidia cuda toolkit and cudnn | |
# setup environmental variables | |
# verify the installation | |
### | |
### to verify your gpu is cuda enable check |
import logging | |
import os | |
import sys | |
import traceback | |
from contextlib import contextmanager | |
import diart.operators as dops | |
import numpy as np | |
import rich | |
import rx.operators as ops |
# This file contains a collection of workarounds for missing TFLite support from: | |
# https://github.com/tensorflow/magenta/tree/master/magenta/music | |
# as posted in https://github.com/tensorflow/tensorflow/issues/27303 | |
# Thanks a lot to github.com/rryan for his support! | |
# The function for testing MFCC computation given PCM input is: | |
# - test_mfcc_tflite | |
# Please not that the output has not yet been compared to the one produced by the respective TF functions. | |
# This file also contains test code for other problems in the context of audio processing with TF and TFLite: |
I'll start off with letting you know this is a fork from someone else. However, for some bizarre reason, this is the one everyone finds, so I better get round to updating this. Credit to Cristiano#2233 for the original idea.
Also, I've had a lot of people saying the rules are to strict. If you pick all the rules here, you're right, it would be very strict. However the rules below are guidelines! They are there for you to pick the ones you desire, you can ignore ones you don't want. Hopefully they might help with rules you wouldn't have thought of otherwise.
This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here
Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!
#!/usr/bin/python | |
import cv2 | |
import numpy as np | |
from primesense import openni2 | |
from primesense import _openni2 as c_api | |
openni2.initialize("<PATH TO OPENNI2 REDIST FOLDER>") | |
dev = openni2.Device.open_any() | |
depth_stream = dev.create_depth_stream() | |
depth_stream.start() | |
depth_stream.set_video_mode(c_api.OniVideoMode(pixelFormat = c_api.OniPixelFormat.ONI_PIXEL_FORMAT_DEPTH_100_UM, resolutionX = 640, resolutionY = 480, fps = 30)) |
""" Trains an agent with (stochastic) Policy Gradients on Pong. Uses OpenAI Gym. """ | |
import numpy as np | |
import cPickle as pickle | |
import gym | |
# hyperparameters | |
H = 200 # number of hidden layer neurons | |
batch_size = 10 # every how many episodes to do a param update? | |
learning_rate = 1e-4 | |
gamma = 0.99 # discount factor for reward |
# You should download the ffmpeg source code from the http://ffmpeg.org/ | |
# libx264 need yasm, so we install yasm first | |
sudo apt-get install yasm | |
sudo apt-get install libx264-dev | |
# then, install the required packages | |
sudo apt-get install libfaac-dev | |
sudo apt-get install libmp3lame-dev | |
sudo apt-get install libtheora-dev |