Skip to content

Instantly share code, notes, and snippets.

View tik0's full-sized avatar
🤖
Beep Boop!

Timo Korthals tik0

🤖
Beep Boop!
  • University Bielefeld
View GitHub Profile
@tik0
tik0 / variational_autoencoder.py
Created December 17, 2019 11:30
Example of VAE on MNIST dataset using MLP with tf.keras and tf-2.0
'''Example of VAE on MNIST dataset using MLP
tf-2.0 adaptation of the keras implementation [1]
with additional output of the reconstruction
and KL losses as discussed in [2]
# Reference
[1] https://github.com/keras-team/keras/blob/master/examples/variational_autoencoder.py
[2] https://stackoverflow.com/q/54069363/2084944
@lucasw
lucasw / create_cloud_xyzrgb.py
Created April 25, 2018 00:08
Create PointCloud2 with python with rgb
#!/usr/bin/env python
# PointCloud2 color cube
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/
import rospy
import struct
from sensor_msgs import point_cloud2
from sensor_msgs.msg import PointCloud2, PointField
from std_msgs.msg import Header
@mattseymour
mattseymour / build-instructions
Created May 1, 2017 06:58
Build Python 3.6 from source for Ubuntu and Debian
Prerequisties install:
- sudo apt-get install build-essential checkinstall
These are the dependancies required by python:
- sudo apt-get install libbz2-dev libc6-dev libgdbm-dev libncursesw5-dev libreadline-gplv2-dev libssl-dev libsqlite3-dev tk-dev
Download the tar source file from python.org (at the time of writing 3.6.1 is the latest release):
- wget -O ~/Downloads/python3.6.1.tgz https://www.python.org/ftp/python/3.6.1/Python-3.6.1.tgz
Via command line navigate to the downloaded file directory:
@gyglim
gyglim / tensorboard_logging.py
Last active August 23, 2023 21:29
Logging to tensorboard without tensorflow operations. Uses manually generated summaries instead of summary ops
"""Simple example on how to log scalars and images to tensorboard without tensor ops.
License: BSD License 2.0
"""
__author__ = "Michael Gygli"
import tensorflow as tf
from StringIO import StringIO
import matplotlib.pyplot as plt
import numpy as np
@bgrins
bgrins / export-chrome-bookmarks.js
Last active February 26, 2024 04:00
Reminder of how to export bookmarks from Chrome as text.
/*
Export bookmarks from Chrome as text.
Go to Bookmarks Manager->Organize->Export to HTML file.
Then open that file, open console and run this command:
*/
[].map.call(document.querySelectorAll("dt a"), function(a) {
return a.textContent + " - " + a.href
}).join("\n");