Skip to content

Instantly share code, notes, and snippets.

View nb-programmer's full-sized avatar
📗
SBCs are the best!

imaprogrammer nb-programmer

📗
SBCs are the best!
  • phAIdelta
View GitHub Profile
@hgrecco
hgrecco / tasks.py
Last active June 22, 2022 07:49
Simple concurrent tasks with dependencies in Python.
from collections import defaultdict
import concurrent.futures
class TasksGroup(object):
"""A group of tasks with dependencies.
>>> tasks = TasksGroup()
>>> @tasks.add()
@Rich-Harris
Rich-Harris / service-workers.md
Last active July 10, 2024 17:04
Stuff I wish I'd known sooner about service workers

Stuff I wish I'd known sooner about service workers

I recently had several days of extremely frustrating experiences with service workers. Here are a few things I've since learned which would have made my life much easier but which isn't particularly obvious from most of the blog posts and videos I've seen.

I'll add to this list over time – suggested additions welcome in the comments or via twitter.com/rich_harris.

Use Canary for development instead of Chrome stable

Chrome 51 has some pretty wild behaviour related to console.log in service workers. Canary doesn't, and it has a load of really good service worker related stuff in devtools.

@vpetrigo
vpetrigo / MyStreamBuf.cpp
Created September 13, 2016 23:03
Streambuf extending C++
#include <streambuf>
#include <array>
#include <algorithm>
#include <iostream>
#include <sstream>
template <typename CharT>
class MyStreamBuf : public std::basic_streambuf<CharT> {
public:
using char_type = CharT;
@byelipk
byelipk / 1-ml-exercises.md
Last active July 14, 2023 14:15
Machine learning questions and answers

Exercises

1) How would you define Machine Learning?

Machine learning is a way for computer programs to improve their performance on a task over time given more data.

2) Can you name 4 types of problems where it shines?

Machine learning algorithms have had good results on problems such has spam detection in email, cancer diagnosis, fraudulent credit card transactions, and automatically driving vehicles.

3) What is a labeled training set?

A labeled training set is a collection of data where one of the features of the data indicates the class the training example belongs to. A labeled training set is used in supervised learning algorithms.

@byelipk
byelipk / 2-ml-exercises.md
Last active April 2, 2024 13:59
Machine learning questions and answers

Exercises

1. What Linear Regression training algorithm can you use if you have a training set with millions of features?

You could use batch gradient descent, stochastic gradient descent, or mini-batch gradient descent. SGD and MBGD would work the best because neither of them need to load the entire dataset into memory in order to take 1 step of gradient descent. Batch would be ok with the caveat that you have enough memory to load all the data.

The normal equations method would not be a good choice because it is computationally inefficient. The main cause of the computational complexity comes from inverse operation on an (n x n) matrix.

O n2 . 4 to O n3

2. Suppose the features in your training set have very different scales: what algorithms might suffer from this, and how? What can you do about it?

@byelipk
byelipk / 9-ml-exercises.md
Last active April 22, 2022 05:18
Machine learning questions and answers

Excercises

1. What are the main benefits of creating a computation graph rather than directly executing the computations? What are the main drawbacks?

Deep Learning frameworks that generate computation graphs, like TensorFlow, have several things going for it.

For starters, computation graphs will compute the gradients automatically. This saves you from having to do lots of tedious calculus by hand.

Another huge plus is that they are optimized to run on your computer's GPU. If this wasn't the case you'd need to learn either CUDA or OPENCL and write lots of C++ by hand. Not an easy thing to do.

Exercises

1. Draw an ANN using the original artificial neurons that compute the XOR operation.

TODO: Upload photo of XOR network

2. Why is it generally preferable to use a Logistic Regression classifier rather than a classical Perceptron (ie. a single layer of Linear Threshold Units trained using the Perceptron training algorithm)? How can you tweak a Perceptron to make it equivalent to a Logistic Regression classifier?

A classical perceptron will only converge if the data is linearly seperable. It also cannot compute class probabilities. The logistic regression classifier is able to converge on non-linear data and outputs class probabilities.

@peteristhegreat
peteristhegreat / Readme.md
Last active July 23, 2024 00:09
Realtek bluetooth usb adapter RTL8671b
@testerzs
testerzs / Dutch Government Domains
Last active January 16, 2024 23:14
Dutch Government Domains
http://rijksoverheid.nl
http://rivm.nl
http://nederlandwereldwijd.nl
http://rvo.nl
http://government.nl
http://defensie.nl
http://vananaarbeter.nl
http://werkenvoornederland.nl
http://rijkswaterstaat.nl
http://lci.rivm.nl
@emilianavt
emilianavt / BestVTuberSoftware.md
Last active July 24, 2024 07:25
Best VTuber Software

Best VTuber software

This is a list of the most commonly used and relevant vtubing software. The "best" will always be subjective and depend on your specific requirements. Overall, the information in this list is as accurate as I could figure it out, but there might be errors or some details might become out of date. If you find anything that needs to be corrected, please let me know. You can also note it in a comment.

Additional explanations:

  • iPhone means that an iPhone is basically required
  • iFacialMocap support means that tracking data can be received from the iFacialMocap iPhone app
  • VMC protocol means that the application can send and/or receive tracking data from other VMC protocol capable applications, allowing the combination of multiple tracking methods (e.g. VSeeFace receiving VR tracking from Virtual Motion Capture and iPhone/ARKit face tracking from Waidayo)
  • Tobii means that the Tobii eye tracker is supported