http://tinkerman.cat/rpi3_iot_server.pdf (Catalan)
- download the latest image
# add 7z tar and zip archivers | |
FROM nvidia/cuda:9.0-cudnn7-devel | |
# https://docs.docker.com/engine/examples/running_ssh_service/ | |
RUN apt-get update && apt-get install -y openssh-server | |
RUN mkdir /var/run/sshd | |
RUN echo 'root:Ubuntu@41' | chpasswd | |
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config | |
RUN sed -i 's/#PasswordAuthentication yes/PasswordAuthentication no/' /etc/ssh/sshd_config | |
RUN mkdir ~/.ssh/ |
import tqdm | |
import pandas as pd | |
import numpy as np | |
from multiprocessing import Pool | |
import os | |
# drop all the unknown points and all closed points | |
# for each SK_ID_CURR calculate the counts of time in each status | |
# normalize by the max len (we know of) in any of the meaningful statuses |
http://tinkerman.cat/rpi3_iot_server.pdf (Catalan)
# BASIC SYSTEM SETUP | |
# First donwload Ubuntu iso file from https://www.ubuntu.com/download/desktop | |
# Use 16.04 LTS (17 is also ok, but it's better to use LTS versions, also 18 will be very mature in terms of systemd) | |
# Dowload Linux live USB creator and install the iso to your USB stick https://www.linuxliveusb.com | |
# Boot your system, go to BIOS on boot (usually Del) or boot menu (usually F12) and choose your USB stick as boot medium | |
# Install Linux (these steps can be omitted if clean Ubuntu installation is provided as service by admins / cloud provider / etc) | |
# Minor trick unplug ALL of your hard disks (unless you are an avanced user) except for the disk for your system |
"""Another way, note this one will load the whole array into memory .""" | |
from keras.preprocessing.image import ImageDataGenerator | |
import h5py | |
from keras.utils.io_utils import HDF5Matrix | |
seed=0 | |
batch_size=32 | |
# we create two instances with the same arguments | |
data_gen_args = dict( | |
rotation_range=90., |
2017-03-03 fm4dd
The gcc compiler can optimize code by taking advantage of CPU specific features. Especially for ARM CPU's, this can have impact on application performance. ARM CPU's, even under the same architecture, could be implemented with different versions of floating point units (FPU). Utilizing full FPU potential improves performance of heavier operating systems such as full Linux distributions.
These flags can both be used to set the CPU type. Setting one or the other is sufficient.
CREATE TEMPORARY FUNCTION | |
-- In this function, we're going to be working on arrays of values. | |
-- we're also going to define a set of functions 'inside' the kMeans. | |
-- *heavily borrowing from https://github.com/NathanEpstein/clusters* -- | |
kMeans(x ARRAY<FLOAT64>, -- ESR1 gene expression | |
y ARRAY<FLOAT64>, -- EGFR gene expression | |
iterations FLOAT64, -- the number of iterations |
import cPickle | |
import numpy as np | |
from keras.models import Sequential | |
from keras.layers.core import Dense, Dropout, Activation, Flatten, Reshape | |
from keras.layers.embeddings import Embedding | |
from keras.layers.convolutional import Convolution2D, MaxPooling2D | |
from keras.optimizers import Adadelta | |
from keras.constraints import unitnorm | |
from keras.regularizers import l2 |
$ git clone -b 1.22 https://github.com/crosstool-ng/crosstool-ng.git | |
$ cd crosstool-ng | |
$ ./bootstrap | |
$ ./configure --prefix=/usr/local | |
$ make | |
$ sudo make install | |
$ cd .. | |
$ mkdir ctng | |
$ cd rpi1 | |
$ ct-ng menuconfig |
''' | |
This is an example of the server-side logic to handle slash commands in | |
Python with Flask. | |
Detailed documentation of Slack slash commands: | |
https://api.slack.com/slash-commands | |
Slash commands style guide: | |
https://medium.com/slack-developer-blog/slash-commands-style-guide-4e91272aa43a#.6zmti394c | |
''' |