To do calcaculating weight mean of prvide of array
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
#!pip install paco | |
import paco | |
import aiohttp | |
async def fetch(url): | |
async with aiohttp.ClientSession() as session: | |
async with session.get(url) as res: | |
return res |
To 'clone' a container, you'll have to make an image of that container first, you can do so by "committing" the container. Docker will (by default) pause all processes running in the container during commit to preserve data-consistency.
For example;
docker commit --message="Snapshot of my container" my_container my_container_snapshot:yymmdd
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 * 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 => [ |
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
library(caret) | |
library(tm) | |
# Training data. | |
data <- c('Cats like to chase mice.', 'Dogs like to eat big bones.') | |
corpus <- VCorpus(VectorSource(data)) | |
# Create a document term matrix. | |
tdm <- DocumentTermMatrix(corpus, list(removePunctuation = TRUE, stopwords = TRUE, stemming = TRUE, removeNumbers = TRUE)) |
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
[{"id":"d3a698fb.007c88","type":"inject","z":"fa9050d8.3686","name":"Start","topic":"","payload":"1","payloadType":"num","repeat":"","crontab":"","once":false,"x":130,"y":80,"wires":[["47e40795.d58228"]]},{"id":"47e40795.d58228","type":"function","z":"fa9050d8.3686","name":"LoadCV","func":"var require = global.get('require');\n// try for global install\nvar cv = null\ntry{\n cv = require.main.require('opencv');\n} catch(e){\n cv = require('opencv');\n}\nif (cv === null){\n node.warn('node-opencv not found');\n return;\n}\n\nvar cvdesc = Object.keys(cv);\nnode.send([null, {payload:cvdesc}]);\nflow.set('cv', cv);\n\nnode.send({payload:1});\nnode.send({payload:'next'});\n","outputs":"2","noerr":0,"x":260,"y":80,"wires":[["46d283a6.ce321c"],[]]},{"id":"46d283a6.ce321c","type":"function","z":"fa9050d8.3686","name":"GetImage","func":"\n\nif (msg.payload === 0){\n var vid = flow.get('cvvid');\n if (vid){\n node.warn(util.inspect(vid));\n vid.release();\n flow.set('cvvid', null) |
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
# ipak function: install and load multiple R packages. | |
# check to see if packages are installed. Install them if they are not, then load them into the R session. | |
ipak <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} |
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
# ipak function: install and load multiple R packages. | |
# check to see if packages are installed. Install them if they are not, then load them into the R session. | |
ipak <- function(pkg){ | |
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] | |
if (length(new.pkg)) | |
install.packages(new.pkg, dependencies = TRUE) | |
sapply(pkg, require, character.only = TRUE) | |
} |
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
/** | |
* IE 5.5+, Firefox, Opera, Chrome, Safari XHR object | |
* | |
* @param string url | |
* @param object callback | |
* @param mixed data | |
* @param null x | |
*/ | |
function ajax(url, callback, data, x) { | |
try { |
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
#Source www.cze.cz | |
#This script is tested with "Cisco AnyConnect Secure Mobility Client version 3.1.00495" | |
# Usage: & '.\Cisco_Anyconnect.ps1' [-Server <server name or ip>] [-Group <group>] [-User <user>] [-Password <password>] | |
#Please change following variables | |
#IP address or host name of cisco vpn, Username, Group and Password as parameters | |
param ( | |
[string]$Server = $( Read-Host "Input server, please" ), |