Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
#!/bin/bash
# MAYAVI SETUP
# mayavi is a python library for scientific visualisations, that can handle
# visualisation of Lidar Data. But, it can also be used to project Lidar data
# to 2D images.
#
# The set of commands I used to get mayavi set up on my computer so far.
# NOTE: I still do not know if it is set up properly, so this set of steps
# might be incomplete.
@telekosmos
telekosmos / txt
Created April 14, 2017 08:37
Remote Debugging a Java Application Inside a Docker Container
One problem when trying to debug a Java application running inside a Docker container is:
You can't expose an additional port when re(starting) a Docker container.
Here are the steps I used to create a remote debugging session for Planets:
In our scenario we can't simply override the Dockerfile CMD or pass an environment variable JAVA_OPTS to enable remote debugging.
So we have to "enter" the container with exec and add the JAVA_OPTS to the start script there:
kubectl get pods | grep Evicted | awk '{print $1}' | xargs kubectl delete pod
@filipececcon
filipececcon / install.bat
Created July 25, 2017 15:57
install.bat
@ECHO OFF
SET SERVICENAME=MY_SERVICE
SET NSSM="%CD%\nssm\nssm.exe"
ECHO INSTALLING SERVICE %SERVICENAME%
%NSSM% stop %SERVICENAME%
%NSSM% remove %SERVICENAME% confirm
%NSSM% install %SERVICENAME% %SERVICENAME%
@ndevenish
ndevenish / CMakeLists.txt
Last active March 4, 2024 22:47
Very simple "Getting started" boost-python CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
# Find python and Boost - both are required dependencies
find_package(PythonLibs 2.7 REQUIRED)
find_package(Boost COMPONENTS python REQUIRED)
# Without this, any build libraries automatically have names "lib{x}.so"
set(CMAKE_SHARED_MODULE_PREFIX "")
# Add a shared module - modules are intended to be imported at runtime.
@MihaiTheCoder
MihaiTheCoder / dockerfile
Last active July 13, 2019 16:48
cntk with object detection
FROM nvidia/cuda:8.0-cudnn6-devel-ubuntu14.04
RUN apt-get update && apt-get install -y --no-install-recommends \
autotools-dev \
build-essential \
cmake \
git \
gfortran-multilib \
libavcodec-dev \
libavformat-dev \
@charlesreid1
charlesreid1 / doit.sh
Last active May 27, 2024 17:06
Download the Large-scale CelebFaces Attributes (CelebA) Dataset from their Google Drive link
#!/bin/bash
#
# Download the Large-scale CelebFaces Attributes (CelebA) Dataset
# from their Google Drive link.
#
# CelebA: http://mmlab.ie.cuhk.edu.hk/projects/CelebA.html
#
# Google Drive: https://drive.google.com/drive/folders/0B7EVK8r0v71pWEZsZE9oNnFzTm8
python3 get_drive_file.py 0B7EVK8r0v71pZjFTYXZWM3FlRnM celebA.zip
@jaytaylor
jaytaylor / delete-from-v2-docker-registry.md
Last active May 6, 2025 17:49
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
'''Train MNIST with tfrecords yielded from a TF Dataset
In order to run this example you should first run 'mnist_to_tfrecord.py'
which will download MNIST data and serialize it into 3 tfrecords files
(train.tfrecords, validation.tfrecords, and test.tfrecords).
This example demonstrates the use of TF Datasets wrapped by a generator
function. The example currently only works with a fork of keras that accepts
`workers=0` as an argument to fit_generator, etc. Passing `workers=0` results
in the generator function being run on the main thread (without this various