Skip to content

Instantly share code, notes, and snippets.

@fo40225
fo40225 / ubuntu-upgrade.sh
Created March 18, 2019 08:16
totally upgrade ubuntu
#!/bin/sh
sudo apt-get -y update
sudo apt-get -y upgrade
sudo apt-get -y dist-upgrade
sudo do-release-upgrade
@fo40225
fo40225 / ifilter.sql
Created January 29, 2019 04:44
sql server ifilter setting
-- https://www.microsoft.com/en-us/download/details.aspx?id=17062
-- https://supportdownloads.adobe.com/detail.jsp?ftpID=5542
-- https://helpx.adobe.com/acrobat/kb/pdf-search-breaks-110-install.html
-- add C:\Program Files\Adobe\Adobe PDF iFilter 11 for 64-bit platforms\bin to PATH
EXEC sp_fulltext_service 'verify_signature', 0
EXEC sp_fulltext_service 'load_os_resources', 1
EXEC sp_fulltext_service 'Restart_all_fdhosts'
EXEC sp_help_fulltext_system_components 'filter'
@fo40225
fo40225 / result.txt
Last active September 10, 2019 14:53
DGX Station benchmark
Welcome to NVIDIA DGX Station Version 4.0.7 (GNU/Linux 4.15.0-47-generic x86_64)
user@user-DGX-Station:~$ lscpu
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
CPU(s): 40
On-line CPU(s) list: 0-39
Thread(s) per core: 2
Core(s) per socket: 20
Socket(s): 1
@fo40225
fo40225 / fdhost_cpu.sql
Last active September 28, 2019 06:06
fdhost cpu
sp_configure 'show advanced options'
go
sp_configure 'show advanced options', 1
go
RECONFIGURE
go
sp_configure 'max full-text crawl range'
go
sp_configure 'max full-text crawl range', 16
go
@fo40225
fo40225 / keras_dynamic_vram.py
Created August 11, 2018 09:15
keras dynamic vram
from keras import backend as K
import tensorflow as tf
config = tf.ConfigProto()
config.gpu_options.allow_growth = True
session = tf.Session(config=config)
K.set_session(session)
@fo40225
fo40225 / ubuntu_apt_mirror_setting.sh
Last active March 22, 2020 07:09
台灣apt mirror
# 顯示目前mirror
cat /etc/apt/sources.list | grep main | awk '{ print $2 }' | cut -d'/' -f3 | sed -n '3P'
# 國網中心
sudo sed -i 's/archive.ubuntu.com/tw.archive.ubuntu.com/g' /etc/apt/sources.list
@fo40225
fo40225 / TaiwanBioBankExon.sql
Created March 25, 2018 07:09
使用SQL Server過濾出TaiwanBioBank中UCSC exon區域的資料
USE [master];
GO
CREATE DATABASE [TaiwanBioBank]
CONTAINMENT = NONE
ON PRIMARY (
NAME = N'TaiwanBioBank'
, FILENAME = N'C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA\TaiwanBioBank.mdf'
, SIZE = 8192 KB
, FILEGROWTH = 65536 KB
@fo40225
fo40225 / Program.cs
Created March 21, 2018 03:56
detect oledb provider
class Program
{
static void Main(string[] args)
{
using (var reader = OleDbEnumerator.GetRootEnumerator())
{
var colIndex = 0;
for (int i = 0; i < reader.FieldCount; i++)
{
if (reader.GetName(i) == "SOURCES_NAME")
@fo40225
fo40225 / tensorflow-1.4.0-cuda91-cudnn7-windows.txt
Last active January 29, 2018 11:58
tensorflow 1.4.0 on windows with avx2 & cuda 9.1 & cudnn 7 by cmake
tensorflow 1.4.0 on windows with avx2 & cuda 9.1 & cudnn 7 by cmake
win 10 1703
git 2.14.1
cmake 3.9.6
anaconda3 5.0.0
cuda 9.1.85
cudnn 7.0.5 with cuda9.1
visual studio 2017 15.4 (msvc 1911)
# Note vs 15.5 (msvc 1912) didn't work with cuda 9.1.85
@fo40225
fo40225 / tensorflow-1.4.0-cmake-windows.txt
Last active February 20, 2018 14:58
tensorflow 1.4.0 on windows with avx2 & cuda by cmake
tensorflow 1.4.0 on windows with avx2 & cuda by cmake
win 10 1703
git 2.10.2
cmake 3.8.2
anaconda3 4.4.0
visual studio 2015 update 3 with c++ installed
cuda 8.0.61
cudnn 6
swigwin-3.0.10