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
# Requires an already built boringssl project as subdirectory | |
TGT := boringssl_client_example | |
OBJS := boringssl_client_example.o | |
CFLAGS := -g -I boringssl/include -pthread | |
LIBS := boringssl/build/ssl/libssl.a boringssl/build/crypto/libcrypto.a boringssl/build/libpki.a boringssl/build/decrepit/libdecrepit.a | |
${TGT}: ${OBJS} | |
gcc ${CFLAGS} -o $@ $^ ${LIBS} |
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
setfiletype python | |
CocCommand python.upgradePythonLanguageServer | |
q |
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
# https://www.tensorflow.org/tutorials/images/cnn | |
from __future__ import absolute_import, division, print_function, unicode_literals | |
import keras | |
from keras.datasets import mnist | |
from keras.models import Sequential | |
from keras.layers import Dense, Dropout, Conv2D, MaxPooling2D, Flatten | |
from keras.optimizers import RMSprop |
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 random | |
import sys | |
import json | |
import numpy as np | |
from vector import translate_vector | |
from naive_bayes import NaiveBayes | |
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
def gen_vector_counter(vec_len): | |
if vec_len <= 1: | |
return defaultdict(int) | |
else: | |
t = partial(gen_vector_counter, vec_len - 1) | |
return defaultdict(t) | |
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
class Dog(object): | |
def speak(self): | |
return "woof" | |
class Cat(object): | |
def speak(self): | |
return "meow" |
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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <ctype.h> | |
#include <stdint.h> | |
#include <sys/socket.h> | |
#include <sys/types.h> | |
#include <linux/if_ether.h> | |
#include <arpa/inet.h> |