Skip to content

Instantly share code, notes, and snippets.

Avatar
🐳
Deep Learning, Data Structures, Algorithms, and Problem Solving

Chanchana Sornsoontorn off99555

🐳
Deep Learning, Data Structures, Algorithms, and Problem Solving
View GitHub Profile
@off99555
off99555 / OffACMTemplate.cpp
Created Oct 20, 2015
My ACM ICPC Template
View OffACMTemplate.cpp
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef vector<int> vi;
#define INF 1001001001 // 1 billion, safer than 2B for Floyd Warshall’s
#define EPS 1e-9
View print 2D numbers diagonal array.cpp
#include <iostream>
using namespace std;
int main() {
int n;
cin >> n;
int fields[50][50] = {}; // set to zero
for (int i = 0; i < n; i++) {
int v = i+1;
@off99555
off99555 / TestStreamPrimeGenerator.java
Last active Nov 20, 2015
Prime Generator with sorted list as a cache source
View TestStreamPrimeGenerator.java
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.IntStream;
/**
* Created by off999555 on 20/11/2558 at 14:27.
*/
public class TestStreamPrimeGenerator {
View git_alias_config.snippets
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.ci commit
git config --global alias.st status
View init.coffee
# Your init script
#
# Atom will evaluate this file each time a new window is opened. It is run
# after packages are loaded/activated and after the previous editor state
# has been restored.
#
# An example hack to log to the console when each text editor is saved.
#
# atom.workspace.observeTextEditors (editor) ->
# editor.onDidSave ->
@off99555
off99555 / OpenGLPrototype.cpp
Last active Dec 5, 2016
OpenGL Prototype - template for good code design, less overwhelming, less headache for maintenance
View OpenGLPrototype.cpp
#include <iostream>
#include <gl/glut.h>
using namespace std;
int W = 500; // window width
int H = 500; // window height
float time = 0; // เวลาปลอมๆสำหรับทำอนิเมชัน
float timeRate = 0.001; // timeRate นี่เป็นเรทเวลาจำลอง ปรับได้ถ้าอยากให้อนิเมชันมันช้าหรือเร็วขึ้น
// your global variables here ...
// e.g. float x = 10;
@off99555
off99555 / .spacemacs
Last active Dec 31, 2016
My Spacemacs dot file and its configurations, deprecated; see this instead: https://github.com/off99555/.spacemacs.d
View .spacemacs
;; -*- 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
@off99555
off99555 / deep_learning_ideas.md
Last active Dec 31, 2016
Deep Learning algorithms and strategies that I discovered and applications I want to build
View deep_learning_ideas.md

Deep learning applications that I want to build

LeafNet: app that recognizes tree from photo

Motivation

I don't know lots about trees. Just looking at their leaves, I know that experts could pinpoint exactly what is the tree's name. But I couldn't do that so I want to have an application that recognizes trees from just looking at its leaf photo.

Usage

You could use this for fun, just learning about trees or use it for research. Sometimes, even if you are in a forest full of trees you don't recognize, use LeafNet. It would tell you whether or not the leaves you find are edible or poisonous.

An application for instantaneous class attendance checking.

@off99555
off99555 / generate_hny_permutations.py
Last active Jan 4, 2017
Generate all 4096 permutations of "happy new year" in Python 3
View generate_hny_permutations.py
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()
View fuzzy-set-trainer-output.txt
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