This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <functional> | |
#include <iostream> | |
// https://www.youtube.com/watch?v=eG5suWcHI8M | |
// Lightning Talk: FINALLY - The Presentation You've All Been Waiting For - Louis Thomas - CppCon 2021 | |
class Finally { | |
public: | |
std::function<void()> m_action; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <iostream> | |
#include <vector> | |
template <class T, class U, class V> | |
struct Foo { | |
T bar; | |
std::vector<U> baz; | |
V foobar; | |
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# first: mkdir user && cd user && cp /path/to/get_gists.py . | |
# python3 get_gists.py user | |
import requests | |
import sys | |
from subprocess import call | |
user = sys.argv[1] | |
r = requests.get('https://api.github.com/users/{0}/gists'.format(user)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cmath> | |
class exact {}; | |
class floating {}; | |
template <class T> bool close_enough(T a, T b, exact) { | |
return a == b; | |
} | |
template <class T> bool close_enough(T a, T b, floating) { | |
return std::abs(a - b) <= static_cast<T>(0.000001); | |
} | |
struct false_type { enum { value = false }; }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import urllib.request | |
import requests | |
from bs4 import BeautifulSoup | |
with open("images.txt", "r") as fp: | |
lines = fp.readlines() | |
for url in lines: | |
r = requests.get(url=url.strip()) | |
print(f"URL: {url.strip()}") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computer Vision and Perception for Self-Driving Cars (Deep Learning Course) | |
https://www.youtube.com/watch?v=cPOtULagNnI | |
Python + Deep Learning | |
Robotics with Sakshay | |
https://www.youtube.com/c/roboticswithsakshay/videos | |
* Road Segmentation | |
* 2D Object Detection (yolo) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Compare Algorithms | |
import pandas | |
import matplotlib.pyplot as plt | |
from sklearn import model_selection | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.tree import DecisionTreeClassifier | |
from sklearn.neighbors import KNeighborsClassifier | |
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis | |
from sklearn.naive_bayes import GaussianNB | |
from sklearn.svm import SVC |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// With friendly permission of BENOCS GmbH (www.benocs.com) | |
// https://www.youtube.com/watch?v=KmoTKz95Wsg | |
// https://godbolt.org/z/73vT1bE86 | |
#include <cstdio> // Needed for the print-function only! | |
#include <cstdint> | |
#include <variant> | |
#include <system_error> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import dbus | |
class Client: | |
def __init__(self): | |
bus = dbus.SessionBus() | |
service = bus.get_object("com.example.service", "/com/example/service") | |
self._message = service.get_dbus_method( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NOTE: all useful flags for up to GCC 8.1 and Clang 7.0 were added (not included into -Wall -Wextra) | |
# * https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html | |
# * https://gcc.gnu.org/onlinedocs/gcc/C-Dialect-Options.html | |
# * https://gcc.gnu.org/onlinedocs/gcc/C_002b_002b-Dialect-Options.html | |
# * https://clang.llvm.org/docs/DiagnosticsReference.html | |
set(qa_warn) | |
set(qa_c_warn) | |
set(qa_cxx_warn) |