from sqlalchemy import create_engine, Column, Integer, String, ForeignKey, UniqueConstraint
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker, relationship, backref
This file contains hidden or 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
| #!/bin/bash | |
| function docker-compose-run() { | |
| if [ "$1" = "-f" ] || [ "$1" = "--file" ] ; then | |
| docker exec -i $(docker-compose -f $2 ps $3 |grep -m 1 $3 | cut -d ' ' -f1) "${@:4}" | |
| else | |
| docker exec -i $(docker-compose ps $1 | grep -m 1 $1 | cut -d ' ' -f1) "${@:2}" | |
| fi | |
| } |
This file contains hidden or 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
| #!/bin/bash | |
| docker run --rm -v "$PWD":/usr/src/app -w /usr/src/app ruby:2.2 bundle install |
This file contains hidden or 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: (milq) https://github.com/milq/scripts-ubuntu-debian/blob/master/install-opencv.sh | |
| # also http://milq.github.io/install-opencv-ubuntu-debian/ | |
| # KEEP UBUNTU OR DEBIAN UP TO DATE | |
| sudo apt-get -y update | |
| sudo apt-get -y upgrade | |
| sudo apt-get -y dist-upgrade | |
| sudo apt-get -y autoremove | |
This file contains hidden or 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
| @powershell -NoProfile -ExecutionPolicy unrestricted -Command "$sessionid=((quser $env:USERNAME | select -Skip 1) -split '\s+')[2]; tscon $sessionid /dest:console" 2> UnlockErrors.log |
This file contains hidden or 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
| """ | |
| A simple POC of sentiment analisys using a small portuguese corpus | |
| - The corpus can be downloaded from here http://www.linguateca.pt/Repositorio/ReLi/ReLi-Lex.rar | |
| please visit the page before download http://www.linguateca.pt/Repositorio/ReLi/ | |
| """ | |
| from textblob import TextBlob | |
| from textblob.classifiers import NaiveBayesClassifier | |
| import os | |
| import re |
This file contains hidden or 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
| #!/bin/bash | |
| # | |
| # Watch current directory (recursively) for file changes, and execute | |
| # a command when a file or directory is created, modified or deleted. | |
| # | |
| # Written by: Senko Rasic <[email protected]> | |
| # | |
| # Requires Linux, bash and inotifywait (from inotify-tools package). | |
| # | |
| # To avoid executing the command multiple times when a sequence of |
This file contains hidden or 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
| #!/bin/sh | |
| sudo dpkg -i cuda-repo-ubuntu1604_9.0.176-1_amd64.deb | |
| sudo apt-key adv --fetch-keys \ | |
| http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub | |
| sudo apt-get update | |
| sudo apt-get install cuda-9-0 |
This file contains hidden or 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
| # | |
| # access gdrive | |
| # | |
| !apt-get install -y -qq software-properties-common python-software-properties module-init-tools | |
| !add-apt-repository -y ppa:alessandro-strada/ppa 2>&1 > /dev/null | |
| !apt-get update -qq 2>&1 > /dev/null | |
| !apt-get -y install -qq google-drive-ocamlfuse fuse | |
| from google.colab import auth | |
| auth.authenticate_user() | |
| from oauth2client.client import GoogleCredentials |
This file contains hidden or 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 rpyc | |
| from rpyc.utils.zerodeploy import DeployedServer | |
| from plumbum import SshMachine | |
| mach = SshMachine("rodrigo@server") | |
| server = DeployedServer(mach, python_executable='/home/rodrigo/venv/bin/python') | |
| conn = server.classic_connect() | |
| import sys | |
| conn.modules.sys.stdout = sys.stdout |