sudo apt-get install python3-pip
sudo pip3 install virtualenv
#!/bin/bash | |
################################################################################ | |
### OpenCV2 Installation Script ### | |
################################################################################ | |
# Source code at https://github.com/arthurbeggs/scripts # | |
################################################################################ | |
# # | |
# Feel free to copy and modify this file. Giving me credit for it is your # | |
# choice, but please keep references to other people's work, which I don't # |
def validation_required(validator_function): | |
def decorator(function): | |
async def error(websocket, err): | |
await websocket.send(err) | |
async def wrapper(websocket, data): | |
status, err = validator_function(data) | |
if status: |
# https://conda.io/docs/user-guide/tasks/manage-environments.html | |
conda create --name myenv | |
# how install a sepcific version of package | |
# https://github.com/lopatovsky/HMMs/issues/4 | |
conda install cython=0.25.2 | |
conda env list |
from flask import Flask, escape, url_for, request, redirect, session | |
from werkzeug.utils import secure_filename | |
#Instancier une application Flask | |
app = Flask(__name__) | |
# Set the secret key to some random bytes. Keep this really secret! | |
app.secret_key = b'_5#y2L"F4Q8z\n\xec]/' | |
########################## |
import logging | |
import pika | |
import configparser | |
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) ' | |
'-35s %(lineno) -5d: %(message)s') | |
LOGGER = logging.getLogger(__name__) | |
class RabbitmqManager: |
from threading import Thread, Event | |
event = Event() | |
def worker(number, outputs, exit_code): | |
msg = "=== Table de mulitiplication par {}".format(number) | |
outputs.append(msg) |
import os, argparse | |
import tensorflow as tf | |
from tensorflow.python.tools import freeze_graph as freeze_tool | |
def freeze_graph(sess, input_checkpoint_path): | |
saver = tf.train.Saver() # or your own Saver | |
saver.restore(sess, input_checkpoint_path) | |
absolute_model_dir = 'absolute_model_dir1111' | |
graph_file_name = 'tf-model_graph' |
Typing vagrant
from the command line will display a list of all available commands.
Be sure that you are in the same directory as the Vagrantfile when running these commands!
vagrant init
-- Initialize Vagrant with a Vagrantfile and ./.vagrant directory, using no specified base image. Before you can do vagrant up, you'll need to specify a base image in the Vagrantfile.vagrant init <boxpath>
-- Initialize Vagrant with a specific box. To find a box, go to the public Vagrant box catalog. When you find one you like, just replace it's name with boxpath. For example, vagrant init ubuntu/trusty64
.vagrant up
-- starts vagrant environment (also provisions only on the FIRST vagrant up)