Skip to content

Instantly share code, notes, and snippets.

View offchan42's full-sized avatar
🐳
Deep Learning with Generative AI

Chanchana Sornsoontorn offchan42

🐳
Deep Learning with Generative AI
View GitHub Profile
@offchan42
offchan42 / .spacemacs
Last active December 31, 2016 20:27
My Spacemacs dot file and its configurations, deprecated; see this instead: https://github.com/off99555/.spacemacs.d
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
@offchan42
offchan42 / generate_hny_permutations.py
Last active January 4, 2017 02:56
Generate all 4096 permutations of "happy new year" in Python 3
sentence = 'happynewyear'
n = len(sentence)
total_perms = 2 ** n
for perm in range(total_perms):
generated = []
for i in range(n):
ch = sentence[i]
if (1 << i) & perm: # see explanation: https://www.quora.com/What-is-bitmasking-What-kind-of-problems-can-be-solved-using-it/answer/Piyush-Kumar-8
ch = ch.upper()
Data: [ 70. 91. 52. 67. 80. 93. 74. 40. 89. 45. 61. 82.
96. 50. 64. 85. 100. 56. 98. 41. 87. 68. 43. 65.
75. 62. 54. 47. 48. 72.]
===Beginning Parameters===
Group 1; MEAN = 45.00, SD = 3.00
Group 2; MEAN = 65.00, SD = 3.00
Group 3; MEAN = 85.00, SD = 3.00
Reading 70.0
This data is in group 2
MEAN: 66.6666666667 SD: 4.8218253805
@offchan42
offchan42 / git_course_draft.md
Last active September 5, 2023 19:15
Git & GitHub course outline draft

What will I learn ?

  • การติดตั้ง Git
  • การใช้งาน Git เบื้องต้น เพื่อการจัดการเวอร์ชันโปรแกรมของเรา
  • การใช้เว็บไซต์ GitHub
  • การอัพโหลดโปรเจ็ค Git ขึ้นสู่ GitHub เพื่อใช้งานร่วมกับคนอื่น
  • การใช้คำสั่งมีประโยชน์ต่างๆ เช่น git blame, git bisect, ...

Requirements

  • มีความคุ้นเคยกับโค้ดโปรแกรม (ไม่จำเป็นต้องเขียนเป็น)
  • มีความกระตือรือร้นที่จะฝึกฝนทักษะ, ถาม, และค้นหา
@offchan42
offchan42 / resistance_training_guide.md
Last active June 16, 2023 10:13
No bullsh*t resistance training and diet guide for improving your physique and performance. To obtain spectacular changes, we must train both your body and your mind.

Resistance training introduction

Resistance training A.K.A. strength training A.K.A. weight training is done by lifting weights in the gym or using bodyweight in order to improve your physique and performance.

The physique goal might be to gain muscle, lose fat, or maintain your weight.

The performance goal might be to improve strength, endurance, cardiovascularity, power, or technical showoff.

NOTE: I also talk about diet. I'm showing you how to improve your physique in scientifically proven ways. After reading this open-mindedly, you are going to be able to manipulate your bodyweight like crazy.

I also talk about how to eliminate excuses and difficulty for going to the gym. I'll show you how you can train your mind to be a new person.

@offchan42
offchan42 / social_anxiety.md
Last active September 23, 2021 13:31
Social anxiety resources; How to deal with life when you are painfully shy
@offchan42
offchan42 / bfg.bat
Last active January 3, 2019 20:08
Alias file for git-bfg repo cleaner
:: Put this file and `bfg.jar` into a dedicated folder for aliases like `C:\Aliases`.
:: And ensure that you add the folder path to `PATH` environment variable.
:: Then you would be able to call `bfg` inside command prompt.
@echo off
echo.
java -jar %~dp0\bfg.jar %*
@offchan42
offchan42 / visual-studio-summary.md
Last active October 6, 2020 10:15
Short Summary of (some language) development in Visual Studio

Building and using DLL in Visual C++

  1. Create a library project to build DLL file. You will get .lib, .dll, and .h files.

  2. Create another project to use the DLL file. Then follow steps 2 to 6 on this project. You need to tell Visual Studio where to find the header files and library files via its Properties window.

  3. Go to project Properties > C/C++ > General and set Additional Include Directories to directory for header files (.h). (Or you can just copy the header files into your project.)

If you build the project, you will get error LNK2019: unresolved external symbol because there is no library file yet.

@offchan42
offchan42 / install-tensorflow-gpu-windows.md
Last active August 3, 2021 18:45
How to install TensorFlow GPU on Windows without installing CUDA Toolkit manually and ensure training speedup

Installation

Follow this guide to install TensorFlow GPU on Windows (without the need to manually install CUDA Toolkit): https://www.pugetsystems.com/labs/hpc/How-to-Install-TensorFlow-with-GPU-Support-on-Windows-10-Without-Installing-CUDA-UPDATED-1419 CUDA will be installed for you automatically using Anaconda.

Or just follow the Fast Instructions I wrote below.

If you want to install CUDA toolkit on your own, or if you want to install the latest tensorflow version, then you need to follow official installation guide.

Fast Instructions

Using TensorFlow Object Detection API on Windows 10

  1. Install TensorFlow 1.14 (not 2)
  2. Download https://github.com/tensorflow/models/ repository
  3. Add models/, models/research/, and models/research/slim/ to the PYTHONPATH variable.
  4. Install pycocotoolsfrom this clone (works with Windows): https://github.com/philferriere/cocoapi
  5. Follow installation guide from https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/installation.md (Except the cocoapi part)
  6. Download https://github.com/EdjeElectronics/TensorFlow-Object-Detection-API-Tutorial-Train-Multiple-Objects-Windows-10 for inference script in webcam and TFRecord data generator script
  7. Mainly, try to follow this local training guide and fix the bug one by one by providing the requirements: https://github.com/tensorflow/models/blob/master/research/object_detection/g3doc/running_locally.md