As configured in my dotfiles.
start new:
tmux
start new with session name:
| using System; | |
| using System.Text; | |
| using System.Net; | |
| using System.Net.Sockets; | |
| namespace Server | |
| { | |
| class Program | |
| { |
| import socket | |
| import time | |
| import datetime | |
| IPADDR = '192.168.1.141' | |
| PORTNUM = 5600 | |
| PACKETDATA = "f1a525da11f6".encode() | |
| while(True): | |
| s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM, 0) |
| **HEADER FILES** | |
| deprecated.h | |
| libvlc.h | |
| libvlc_events.h | |
| libvlc_media.h | |
| libvlc_media_discoverer.h | |
| libvlc_media_library.h | |
| libvlc_media_list.h | |
| libvlc_media_list_player.h | |
| libvlc_media_player.h |
| # This lecture based on Stanford' Python Numpy Tutorial | |
| def quicksort(arr): | |
| if len(arr) <= 1: | |
| return arr | |
| pivot = arr[len(arr) // 2] | |
| left = [x for x in arr if x < pivot] | |
| middle = [x for x in arr if x == pivot] | |
| right = [x for x in arr if x > pivot] | |
| return quicksort(left) + middle + quicksort(right) |
As configured in my dotfiles.
start new:
tmux
start new with session name:
##VGG16 model for Keras
This is the Keras model of the 16-layer network used by the VGG team in the ILSVRC-2014 competition.
It has been obtained by directly converting the Caffe model provived by the authors.
Details about the network architecture can be found in the following arXiv paper:
Very Deep Convolutional Networks for Large-Scale Image Recognition
K. Simonyan, A. Zisserman
| y_true = 2 | |
| y_pred = 0.2 | |
| if(K.backend()=="tensorflow"): | |
| import tensorflow as tf | |
| sess= tf.Session() | |
| with tf.device('/cpu:0'): | |
| pt = tf.where(tf.equal(y_true, 1), y_pred, 1 - y_pred) | |
| print(sess.run(pt)) | |
| if(K.backend()=="theano"): |
| import numpy as np | |
| from pycocotools.coco import COCO | |
| import os | |
| import math | |
| import keras | |
| from keras.models import Sequential, Model | |
| from keras.layers import Dense, Activation, Input, Flatten, Dropout | |
| from keras.utils import plot_model | |
| import cv2 | |
| import matplotlib.pyplot as plt |
| # Written by MSK | |
| import glob | |
| import cv2 | |
| pngs = glob('./*.png') | |
| for png in pngs: | |
| img = cv2.imread(png) | |
| cv2.imwrite(png[:-3] + 'jpg', img) |
| 7 | |
| 2 | |
| 1 | |
| 0 | |
| 4 | |
| 1 | |
| 4 | |
| 9 | |
| 5 | |
| 9 |