Build starting from a Jupyter 2.x image.
docker build -t jupyterlab .
| #!/bin/bash | |
| # call this script with an email address (valid or not). | |
| # like: | |
| # ./makecert.sh [email protected] | |
| mkdir certs | |
| rm certs/* | |
| echo "make server cert" | |
| openssl req -new -nodes -x509 -out certs/server.pem -keyout certs/server.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" | |
| echo "make client cert" | |
| openssl req -new -nodes -x509 -out certs/client.pem -keyout certs/client.key -days 3650 -subj "/C=DE/ST=NRW/L=Earth/O=Random Company/OU=IT/CN=www.random.com/emailAddress=$1" |
| /* | |
| This functions opens a video file and extracts the frames and put them into a vector of Mat(its the class for representing an img) | |
| */ | |
| void extract_frames(const string &videoFilePath,vector<Mat>& frames){ | |
| try{ | |
| //open the video file | |
| VideoCapture cap(videoFilePath); // open the video file | |
| if(!cap.isOpened()) // check if we succeeded | |
| CV_Error(CV_StsError, "Can not open Video file"); |
| import ( | |
| "crypto/md5" | |
| "encoding/hex" | |
| ) | |
| func GetMD5Hash(text string) string { | |
| hasher := md5.New() | |
| hasher.Write([]byte(text)) | |
| return hex.EncodeToString(hasher.Sum(nil)) | |
| } |
| --- Source: http://solaimurugan.blogspot.ru/2010/10/list-out-all-forien-key-constraints.html | |
| SELECT | |
| tc.constraint_name, | |
| tc.constraint_type, | |
| tc.table_name, | |
| kcu.column_name, | |
| tc.is_deferrable, | |
| tc.initially_deferred, | |
| rc.match_option AS match_type, |
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| package main | |
| import ( | |
| "crypto/tls" | |
| "crypto/x509" | |
| "fmt" | |
| "io" | |
| "log" | |
| ) |