Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View PatWie's full-sized avatar
💭
waiting for the end of the AI hype

Patrick Wieschollek PatWie

💭
waiting for the end of the AI hype
View GitHub Profile
@PatWie
PatWie / build.sh
Last active June 3, 2023 17:06
MultiIndex
g++ main.cc -std=c++17 && ./a.out
@PatWie
PatWie / LICENSE
Created January 7, 2022 18:21 — forked from cryptix/LICENSE
example of using JWT for http authentication in go
MIT License
Copyright (c) <year> <copyright holders>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE S
blueprint:
name: Close Blinds At Sunset
description: Blinds will be closed at sunset
domain: automation
input:
target_blind:
name: Blinds
description: This is the blind (or blinds) that will be closed at sunset
selector:
target:
@PatWie
PatWie / resnet50-tf2-py3.py
Last active February 10, 2021 00:40
Training ResNet50 in TensorFlow 2.0
import tensorflow as tf
import numpy as np
BATCH = 2
NUM_EPOCHS = 25
"""
ResNet50 is implemented here:
https://github.com/tensorflow/tensorflow/blob/bd754067dac90182d883f621b775d76ec7c6b87d/tensorflow/python/eager/benchmarks/resnet50/resnet50.py#L1
@PatWie
PatWie / Eigen Cheat sheet
Created August 3, 2020 08:29 — forked from gocarlos/Eigen Cheat sheet
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.
@PatWie
PatWie / zmqimage.py
Created January 17, 2017 22:22 — forked from jeffbass/zmqimage.py
zmqimage.py -- classes to send, receive and display OpenCV images from a headless computer to a display computer using cv2.imshow()
# zmqimage.py -- classes to send, receive and display cv2 images via zmq
# based on serialization in pyzmq docs and pyzmq/examples/serialization
'''
PURPOSE:
These classes allow a headless (no display) computer running OpenCV code
to display OpenCV images on another computer with a display.
For example, a headless Raspberry Pi with no display can run OpenCV code
and can display OpenCV images on a Mac with a display.
USAGE:
@PatWie
PatWie / update-tensorflow.sh
Last active December 4, 2019 18:24
simple cronjob script to frequently build TensorFlow from source automatically
#!/bin/bash
# Patrick Wieschollek
# =============================================================
# UPDATE SOURCE
# =============================================================
git checkout -- .
git pull origin master
@PatWie
PatWie / file0.txt
Created November 12, 2019 21:30 — forked from akisatok/file0.txt
1億枚ラベル付き画像データセット Yahoo Flickr Creative Commons 100M (YFCC100M) を使う ref: http://qiita.com/_akisato/items/66deb481ea3cedf388fa
% sudo pip install s3cmd
@PatWie
PatWie / glfw_ship.cpp
Created December 5, 2018 03:53 — forked from ad8e/glfw_ship.cpp
instructions to use skia and glfw together. (download, installation, first program). works on Linux and Windows.
/* Note: this Google copyright notice only applies to the original file, which has large sections copy-pasted here. my changes are under CC0 (public domain).
* Copyright 2015 Google Inc.
*
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/*
this is intended as a second-resort, after trying to build using the official instructions inevitably fails because of poor documentation and strange build systems.
@PatWie
PatWie / nvml.py
Created February 8, 2018 23:56
NVML for Python
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Patrick Wieschollek <mail@patwie.com>
"""
A Python2 + Python3 wrapper for NVML
"""
from ctypes import *
import threading