Skip to content

Instantly share code, notes, and snippets.

View pangyuteng's full-sized avatar

pangyuteng

View GitHub Profile
@wesleybliss
wesleybliss / docker-compose-node-mongo.yml
Created September 9, 2016 21:37
Docker Compose with example App & Mongo
version: '2'
services:
myapp:
build: .
container_name: "myapp"
image: debian/latest
environment:
- NODE_ENV=development
- FOO=bar
volumes:
@awjuliani
awjuliani / DCGAN.ipynb
Last active May 19, 2020 07:12
An implementation of DCGAN in Tensorflow and Python.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@residential-map-machine-user
residential-map-machine-user / setup240.sh
Last active May 15, 2021 22:24
openfoam 2.4.0 setup shellscript
#!/bin/bash
#====================================================================
# aptのアップデート
#====================================================================
yes | sudo apt-get update
yes | sudo apt-get upgrade
#====================================================================
# 『デスクトップ』『音楽』などの日本語フォルダー名を英語表記にする
#====================================================================
@denti
denti / install-tensorflow.sh
Last active December 8, 2017 17:49 — forked from erikbern/install-tensorflow.sh
Install TensorFlow v 0.11 and later on EC2 instances with Ubuntu 16.04. Instances: p2.xlarge, g2.xlarge and bigger
# Note – this is not a bash script (some of the steps require reboot)
# I named it .sh just so Github does correct syntax highlighting.
#
# This is also available as an AMI in us-east-1 (virginia): ami-cf5028a5
#
# The CUDA part is mostly based on this excellent blog post:
# http://tleyden.github.io/blog/2014/10/25/cuda-6-dot-5-on-aws-gpu-instance-running-ubuntu-14-dot-04/
# Install various packages
sudo apt-get update
@wassname
wassname / keras_weighted_categorical_crossentropy.py
Last active October 10, 2024 00:52
Keras weighted categorical_crossentropy (please read comments for updated version)
"""
A weighted version of categorical_crossentropy for keras (2.0.6). This lets you apply a weight to unbalanced classes.
@url: https://gist.github.com/wassname/ce364fddfc8a025bfab4348cf5de852d
@author: wassname
"""
from keras import backend as K
def weighted_categorical_crossentropy(weights):
"""
A weighted version of keras.objectives.categorical_crossentropy
@agitter
agitter / tensorflow_docker_template.sub
Last active July 25, 2023 16:15
Template for running TensorFlow in a Docker container on CHTC compute nodes
############################################################################
#
# Condor job that runs a TensorFlow Docker container.
# Based on http://chtc.cs.wisc.edu/helloworld.shtml and
# http://research.cs.wisc.edu/htcondor/HTCondorWeek2016/presentations/FriThain_Docker.pdf
# and https://www.tensorflow.org/get_started/os_setup#docker_installation
#
# Assumes the job is submitted from the WID pool so
# allow flocking to the CHTC pool.
#
@teamdandelion
teamdandelion / labels_1024.tsv
Last active February 6, 2024 08:33
TensorBoard: TF Dev Summit Tutorial
We can make this file beautiful and searchable if this error is corrected: No tabs found in this TSV file in line 0.
7
2
1
0
4
1
4
9
5
9
@jorgemf
jorgemf / compile_tensorflow_serving.sh
Last active November 27, 2018 07:25
Compile TensorFlow Serving with CUDA support (October 2017) needs bazel 5.3 , cuda 8 , cudnn 7 # UNSUPPORTED -> https://gist.github.com/jorgemf/c791841f769bff96718fd54bbdecfd4e
#!/bin/bash
TENSORFLOW_COMMIT=9e76bf324f6bac63137a02bb6e6ec9120703ea9b # August 16, 2017
TENSORFLOW_SERVING_COMMIT=267d682bf43df1c8e87332d3712c411baf162fe9 # August 18, 2017
MODELS_COMMIT=78007443138108abf5170b296b4d703b49454487 # July 25, 2017
if [ -z $TENSORFLOW_SERVING_REPO_PATH ]; then
TENSORFLOW_SERVING_REPO_PATH="serving"
fi
INITIAL_PATH=$(pwd)
@Brainiarc7
Brainiarc7 / build-tensorflow-from-source.md
Last active September 9, 2024 22:48
Build Tensorflow from source, for better performance on Ubuntu.

Building Tensorflow from source on Ubuntu 16.04LTS for maximum performance:

TensorFlow is now distributed under an Apache v2 open source license on GitHub.

On Ubuntu 16.04LTS+:

Step 1. Install NVIDIA CUDA:

To use TensorFlow with NVIDIA GPUs, the first step is to install the CUDA Toolkit as shown:

@deehzee
deehzee / autoreload.md
Last active December 1, 2021 19:48
Auto reload of modules in jupyter notebook

Module autoreload

To auto-reload modules in jupyter notebook (so that changes in files *.py doesn't require manual reloading):

# for auto-reloading external modules
# see http://stackoverflow.com/questions/1907993/autoreload-of-modules-in-ipython
%load_ext autoreload
%autoreload 2