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 / gist:2acb4541812d3f5414718c49ed14c8b1
Created April 29, 2021 09:53
git proxy for special domain
#just proxy for github.com
git config --global http.https://github.com.proxy socks5://127.0.0.1:1080
git config --global http.https://github.com.sslVerify false
git config --global https.https://github.com.proxy socks5://127.0.0.1:1080
git config --global https.https://github.com.sslVerify false
#cancel proxy
git config --global --unset http.https://github.com.proxy
git config --global --unset http.https://github.com.sslVerify
git config --global --unset https.https://github.com.proxy
@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 / recordThread.py
Last active May 30, 2023 10:09
pyaudio record in thread
# coding=utf-8
# Python3.6
# Class Record a wav in new thread
import threading
import pyaudio
import wave
from time import sleep
class RecordThread(threading.Thread):
@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®