-
Java programming basic knowhow
- Code style (https://www.cs.cornell.edu/courses/JavaAndDS/JavaStyle.html)
- for-loop, while-loop, if-else
- Normal data type object:
String
,Integer
,Double
,Boolean
,Map
,List
,Set
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -622,46 +622,46 @@ | |
{ cont.erase( std::remove( cont.begin(), cont.end(), thing ), cont.end() ); } | |
// Error macros - output goes to stderr | |
-#define PRINT_ERR(m) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", __FILE__, __FUNCTION__) | |
-#define PRINT_ERR1(m,a) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, __FILE__, __FUNCTION__) | |
-#define PRINT_ERR2(m,a,b) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, __FILE__, __FUNCTION__) | |
-#define PRINT_ERR3(m,a,b,c) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, __FILE__, __FUNCTION__) | |
-#define PRINT_ERR4(m,a,b,c,d) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, __FILE__, __FUNCTION__) | |
-#define PRINT_ERR5(m,a,b,c,d,e) fprintf( stderr, "\033[41merr\033[0m: "m" (%s %s)\n", a, b, c, d, e, __FILE__, __FUNCTION__) |
code from https://github.com/DrSleep/tensorflow-deeplab-lfov/blob/master/deeplab_lfov/model.py
- deeplab_v1: https://bitbucket.org/deeplab/deeplab-public/src
- deeplab_v2: https://bitbucket.org/aquariusjay/deeplab-public-ver2
- deeplab models: http://liangchiehchen.com/projects/DeepLab_Models.html
- input:
inputs = tf.placeholder(tf.float32, [1, 224,224, 3])
- num_classes:
num_classes = 21
- label_size:
label_size = tf.shape(inputs)[1:3]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
000 road | |
001 sidewalk | |
002 building | |
003 wall | |
004 fence | |
005 pole | |
006 traffic light | |
007 traffic sign | |
008 vegetation | |
009 terrain |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import tensorflow as tf # tf.VERSION == 1.4.0 | |
from tensorflow.contrib.tensorboard.plugins import projector | |
# ... write something here ... | |
dx, x_embedding = discriminator(x, is_training=True) | |
dz, z_embedding = discriminator(z, is_training=True) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# Uasge: | |
# getpasswd 64 ~/.vnc/passwd | |
# | |
length=${1:-128} | |
passwdfile=${2:-$HOME/.vnc/passwd} | |
if su -c true $USER ; then | |
head /dev/urandom | tr -dc 0-9a-zA-Z_ | head -c $length | tee /dev/tty | /usr/bin/vncpasswd -f > $passwdfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import threading | |
import GPUtil | |
import numpy as np | |
gpu_loading = [] | |
num_threads = 2 | |
th = {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import tensorflow.contrib.slim as slim | |
import tensorflow as tf | |
import numpy as np | |
d_w_initializer = tf.orthogonal_initializer(1.0) | |
def discriminator(inputs, phase_train=True, reuse=False, use_bias=False, name="deGAN_d"): | |
net = inputs | |
pack = ( | |
# [128, tf.nn.relu, d_w_initializer], | |
[128, tf.nn.relu, d_w_initializer], | |
[1, None, d_w_initializer] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
label count | |
0 2600 | |
1 2600 | |
2 2600 | |
3 2600 | |
4 2600 | |
5 2300 | |
6 2600 | |
7 2600 | |
8 2600 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import threading | |
num_threads = 5 | |
th = {} | |
def main(): |
NewerOlder