This was tested on:
- Ubuntu 14.04 x64
- Ubuntu 16.04 x64
import numpy as np | |
import skfuzzy as fuzz | |
CURRENT_TEMP = 15 | |
CURRENT_HUM = 50 | |
x_temp = np.arange(-20, 41, 1) | |
x_hum = np.arange(0, 101, 1) | |
x_sys = np.arange(12, 36, 1) |
This is the example usage of electron-packager that I never found online anywhere else.
To add resource.exe and resource2.dll in the resource folder when you create an installer, this is how you do it with the --extra-resource commandline switch.
electron-packager . --overwrite --asar --extra-resource="resource1.exe" --extra-resource="resource2.dll" --platform=win32 --arch=ia32 --icon=./frontend/dist/assets/icon.ico --prune=true --out=./build --version-string.ProductName='Hot Pan de sal'
within the backend code you can refer to the files as:
import * as tf from "@tensorflow/tfjs" | |
import "@tensorflow/tfjs-node" | |
import iris from "./iris.json" | |
import irisTesting from "./iris-testing.json" | |
// convert/setup our data | |
const trainingData = tf.tensor2d(iris.map(item => [ | |
item.sepal_length, item.sepal_width, item.petal_length, item.petal_width, | |
])) | |
const outputData = tf.tensor2d(iris.map(item => [ |
#!/bin/bash | |
set -euo pipefail | |
IFS=$'\n\t' | |
# Ubuntu 16.04 Dev Server | |
# Run like - bash install_lamp.sh | |
# Script should auto terminate on errors | |
echo -e "\e[96m Adding PPA \e[39m" | |
sudo add-apt-repository -y ppa:ondrej/apache2 |
watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache |
##Example Task: Make 2 parallel (simultaneous) async calls, then one async call when they've resolved##
##The Good Way: Promises##
//with bluebird library
var parallelCalls = [
getUrl('/api/profile'),
getUrl('/api/accounts')
];
//spread is like .then(), except it apply()s the array of responses as individual arguments
There are a bunch of reasons why this is convoluted, mostly in building the URL to make the request:
info_format
parameter in the request. We don't know a priori which will be supported by a WMS that we might make a request to. See Geoserver's docs for what formats are available from Geoserver. That won't be the same from WMS to WMS, however.#!/bin/bash | |
# | |
# Install Postgres 9.1, PostGIS 2.0 and pgRouting on a clean Ubuntu 12.04 install (64 bit) | |
# updated to PostGIS 2.0.1 | |
# basics | |
apt-get install python-software-properties | |
apt-add-repository ppa:sharpie/for-science # To get GEOS 3.3.3 | |
# install the following pacakages |