Skip to content

Instantly share code, notes, and snippets.

View bygreencn's full-sized avatar
💭
I may be slow to respond.

Sui Libin bygreencn

💭
I may be slow to respond.
View GitHub Profile
@bygreencn
bygreencn / text2speech.py
Created February 29, 2020 09:34 — forked from e96031413/text2speech.py
This script can help you ( Text to Speech )
import win32com.client
speaker = win32com.client.Dispatch("SAPI.SpVoice")
while 1:
print('Enter the Word')
#可用中文、英文
s = input( )
speaker.Speak(s)
@bygreencn
bygreencn / pytorch_jetson_install.sh
Last active May 31, 2019 04:51 — forked from dusty-nv/pytorch_jetson_install.sh
Install procedure for pyTorch on NVIDIA Jetson TX1/TX2 with JetPack <= 3.1. For JetPack 4.2 and Xavier/Nano/TX2, see https://devtalk.nvidia.com/default/topic/1049071/jetson-nano/pytorch-for-jetson-nano/
#!/bin/bash
#
# pyTorch install script for NVIDIA Jetson TX1/TX2,
# from a fresh flashing of JetPack 2.3.1 / JetPack 3.0 / JetPack 3.1 / JetPack 4.2
#
# for the full source, see jetson-reinforcement repo:
# https://github.com/dusty-nv/jetson-reinforcement/blob/master/CMakePreBuild.sh
#
# note: pyTorch documentation calls for use of Anaconda,
# however Anaconda isn't available for aarch64.
@bygreencn
bygreencn / ubuntu_cuda10.1.sh
Last active June 22, 2019 01:31 — forked from fo40225/ubuntu1804cuda10.sh
install cuda 10.1 on ubuntu
sudo apt update
sudo apt -y install build-essential
sudo apt -y install linux-headers-$(uname -r)
wget -N https://developer.nvidia.com/compute/cuda/10.1/Prod/local_installers/cuda_10.1.168_418.67_linux.run
wget -N http://developer.download.nvidia.com/compute/redist/cudnn/v7.6.0/cudnn-10.1-linux-x64-v7.6.0.64.tgz
wget -N https://developer.download.nvidia.com/compute/redist/nccl/v2.4/nccl_2.4.7-1+cuda10.1_x86_64.txz
#Disable nouveau driver
echo "blacklist nouveau" | sudo tee -a /etc/modprobe.d/blacklist-nouveau.conf > /dev/null
@bygreencn
bygreencn / install-cuda-10-bionic.sh
Created May 22, 2019 07:50 — forked from bogdan-kulynych/install-cuda-10-bionic.sh
Install CUDA 10 on Ubuntu 18.04
#!/bin/bash
# Install CUDA Toolkit 10
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt-key adv --fetch-keys https://developer.download.nvidia.com/compute/cuda/repos/ubuntu1804/x86_64/7fa2af80.pub && sudo apt update
sudo dpkg -i cuda-repo-ubuntu1804_10.0.130-1_amd64.deb
sudo apt update
sudo apt install -y cuda
@bygreencn
bygreencn / cool_gpu2.sh
Last active May 5, 2019 07:33 — forked from squadbox/cool_gpu2.sh
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <akohlmey@gmail.com>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds
@bygreencn
bygreencn / trial.key
Created March 17, 2019 03:46 — forked from huqi/trial.key
Beyond Compare 4 license for Mac
Beyond Compare 4
Licensed to: ASIO Allsoftinone
Quantity: 1 user
Serial number: 1822-9597
License type: Pro Edition for Windows
--- BEGIN LICENSE KEY ---
H1bJTd2SauPv5Garuaq0Ig43uqq5NJOEw94wxdZTpU-pFB9GmyPk677gJ
vC1Ro6sbAvKR4pVwtxdCfuoZDb6hJ5bVQKqlfihJfSYZt-xVrVU27+0Ja
hFbqTmYskatMTgPyjvv99CF2Te8ec+Ys2SPxyZAF0YwOCNOWmsyqN5y9t
@bygreencn
bygreencn / eigen-patch.txt
Created March 8, 2019 09:07 — forked from bstriner/eigen-patch.txt
Patch for eigen3 to build for tensorflow
--- Eigen/src/Core/arch/CUDA/Half.h 2018-06-22 18:09:44.000000000 -0400
+++ Eigen/src/Core/arch/CUDA/Half.h 2018-07-25 01:19:55.462313100 -0400
@@ -209,7 +209,7 @@
// conversion steps back and forth.
EIGEN_STRONG_INLINE __device__ half operator + (const half& a, const half& b) {
- return __hadd(a, b);
+ return __hadd(::__half(a), ::__half(b));
}
EIGEN_STRONG_INLINE __device__ half operator * (const half& a, const half& b) {
@bygreencn
bygreencn / install_source_windows.md
Created March 8, 2019 07:38 — forked from meteorcloudy/install_source_windows.md
Build TensorFlow on Windows With Bazel (Preview)

Install TensorFlow from Sources on Windows (Preview)

This guide explains how to build TensorFlow sources into a TensorFlow binary and how to install that TensorFlow binary on Windows.

Determine which TensorFlow to install

You must choose one of the following types of TensorFlow to build and install:

  • TensorFlow with CPU support only. If your system does not have a NVIDIA®
@bygreencn
bygreencn / trial.md
Created February 28, 2019 02:31 — forked from satish-setty/trial.md
Beyond Compare 4 license for Linux

Beyond Compare 4.x

Licensed to: ASIO Allsoftinone Quantity: 1 user Serial number: 1822-9597 License type: Pro Edition for Linux

First delete away trial mode:

sudo sed -i "s/keexjEP3t4Mue23hrnuPtY4TdcsqNiJL-5174TsUdLmJSIXKfG2NGPwBL6vnRPddT7tH29qpkneX63DO9ECSPE9rzY1zhThHERg8lHM9IBFT+rVuiY823aQJuqzxCKIE1bcDqM4wgW01FH6oCBP1G4ub01xmb4BGSUG6ZrjxWHJyNLyIlGvOhoY2HAYzEtzYGwxFZn2JZ66o4RONkXjX0DF9EzsdUef3UAS+JQ+fCYReLawdjEe6tXCv88GKaaPKWxCeaUL9PejICQgRQOLGOZtZQkLgAelrOtehxz5ANOOqCaJgy2mJLQVLM5SJ9Dli909c5ybvEhVmIC0dc9dWH+/N9KmiLVlKMU7RJqnE+WXEEPI1SgglmfmLc1yVH7dqBb9ehOoKG9UE+HAE1YvH1XX2XVGeEqYUY-Tsk7YBTz0WpSpoYyPgx6Iki5KLtQ5G-aKP9eysnkuOAkrvHU8bLbGtZteGwJarev03PhfCioJL4OSqsmQGEvDbHFEbNl1qJtdwEriR+VNZts9vNNLk7UGfeNwIiqpxjk4Mn09nmSd8FhM4ifvcaIbNCRoMPGl6KU12iseSe+w+1kFsLhX+OhQM8WXcWV10cGqBzQE9OqOLUcg9n0krrR3KrohstS9smTwEx9olyLYppvC0p5i7dAx2deWvM1ZxKNs0BvcXGukR+/g" /usr/lib/beyondcompare/BCompare
@bygreencn
bygreencn / workflows-in-django.md
Created October 26, 2018 03:33 — forked from Nagyman/workflows-in-django.md
Workflows in Django

Workflows (States) in Django

I'm going to cover a simple, but effective, utility for managing state and transitions (aka workflow). We often need to store the state (status) of a model and it should only be in one state at a time.

Common Software Uses

  • Publishing (Draft->Approved->Published->Expired->Deleted)