๐
This file contains hidden or 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 os | |
| CSV_FOLDER = 'csvs/' | |
| def parse_csv(csv_path): | |
| arr = [] | |
| csv_arr = open(csv_path, encoding='utf-8') | |
| next(csv_arr) | |
| for i in csv_arr: |
This file contains hidden or 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 <iostream> | |
| #include "arr.h" | |
| template class Arrayy<int>; | |
| template class Arrayy<double>; | |
| template <typename T> | |
| Arrayy<T>::Arrayy() { |
This file contains hidden or 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
| ./fabric-scripts/hlfv11/stopFabric.sh | |
| ./fabric-scripts/hlfv11/teardownFabric.sh | |
| ./fabric-scripts/hlfv11/startFabric.sh | |
| composer card delete --card admin@ttcnetwork | |
| composer archive create --sourceType dir --sourceName . -a ./dist/ttc-network.bna | |
| composer network install --card PeerAdmin@hlfv1 --archiveFile ./dist/ttc-network.bna |
This file contains hidden or 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
| sudo apt-get update | |
| curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.11/install.sh | bash | |
| sudo apt-get install -y build-essential | |
| sudo npm install -g node-gyp | |
| sudo apt-get install -y python2.7 | |
| export PYTHON=/usr/bin/python2.7 | |
| sudo chown -R $USER /usr/local | |
| npm uninstall -g composer-cli |
This file contains hidden or 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 as tf | |
| import numpy as np | |
| (x_train, y_train), (x_test, y_test) = tf.keras.datasets.fashion_mnist.load_data() | |
| # add empty color dimension | |
| x_train = np.expand_dims(x_train, -1) | |
| x_test = np.expand_dims(x_test, -1) | |
| model = tf.keras.models.Sequential() | |
| model.add(tf.keras.layers.BatchNormalization(input_shape=x_train.shape[1:])) | |
| model.add(tf.keras.layers.Conv2D(64, (5, 5), padding='same', activation='elu')) |
This file contains hidden or 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
| --- | |
| ################################################################################ | |
| # | |
| # Section: Organizations | |
| # | |
| # - This section defines the different organizational identities which will | |
| # be referenced later in the configuration. | |
| # | |
| ################################################################################ | |
| Organizations: |
This file contains hidden or 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
| # -*- coding: utf-8 -*- | |
| """ | |
| Created on Thu Jul 20 11:24:50 2017 | |
| @author: chs | |
| """ | |
| from joblib import Parallel, delayed | |
| import glob | |
| import os |
This file contains hidden or 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
| sudo curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| sudo chmod +x /usr/local/bin/docker-compose | |
| docker-compose --version |
This file contains hidden or 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 as tf | |
| import numpy as np | |
| class A: | |
| def __init__(self): | |
| self.X = tf.placeholder(tf.float32, [None, 10]) | |
| self.l1 = tf.layers.dense(self.X, 10) | |
| self.sess = tf.Session() | |
| self.sess.run(tf.global_variables_initializer()) |
This file contains hidden or 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
| from PIL import Image | |
| from pprint import pprint | |
| import xmltodict | |
| with open('pizza.xml') as fd: | |
| doc = xmltodict.parse(fd.read()) | |
| file_path = doc['annotation']['path'] | |
| main_img = Image.open(file_path) |