Windows Service with Python 3.5 and pyinstaller
- Python 3.5.x
- Visual C++ Build Tools 2015
- PyInstaller 3.2
Windows Service with Python 3.5 and pyinstaller
| #!/bin/bash | |
| set -eu -o pipefail | |
| # ----------------------------------------------------------------------------- | |
| export LANG=en_US.UTF-8 | |
| export BORG_PASSPHRASE='' | |
| MAIN_USER="johndoe" | |
| MAIN_HOMEDIR="$(getent passwd ${MAIN_USER} | cut -f 6 -d ':')" |
| """ | |
| Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy) | |
| BSD License | |
| """ | |
| import numpy as np | |
| # data I/O | |
| data = open('input.txt', 'r').read() # should be simple plain text file | |
| chars = list(set(data)) | |
| data_size, vocab_size = len(data), len(chars) |
| # Alternatively don't use slog but something else. I just like that more. | |
| [aliases] | |
| slog = log --pretty=format:"%C(auto,yellow)%h%C(auto)%d\\ %C(auto,reset)%s\\ \\ [%C(auto,blue)%cn%C(auto,reset),\\ %C(auto,cyan)%ar%C(auto,reset)]" | |
| addprx = "!f() { b=`git symbolic-ref -q --short HEAD` && \ | |
| git fetch origin pull/$1/head:pr/$1 && \ | |
| git fetch -f origin pull/$1/merge:PR_MERGE_HEAD && \ | |
| git rebase --onto $b PR_MERGE_HEAD^ pr/$1 && \ | |
| git branch -D PR_MERGE_HEAD && \ | |
| git checkout $b && echo && \ | |
| git diff --stat $b..pr/$1 && echo && \ |
| user www-data; | |
| worker_processes 1; | |
| pid /var/run/nginx.pid; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { | |
| sendfile on; |
| #!/bin/bash | |
| # Source: http://toomuchdata.com/2012/06/25/how-to-install-python-2-7-3-on-centos-6-2/ | |
| # Install stuff # | |
| ################# | |
| # Install development tools and some misc. necessary packages | |
| yum -y groupinstall "Development tools" | |
| yum -y install zlib-devel # gen'l reqs |
| #!/usr/bin/env python | |
| # coding: utf-8 | |
| import os | |
| import random | |
| import glob | |
| from PIL import Image | |
| import numpy |
| # -*- coding: utf-8 -*- | |
| ''' | |
| Created on 2012-10-07 | |
| @author: Sergey <[email protected]> | |
| Альтернативный вариант решения из статьи http://habrahabr.ru/post/153595/ | |
| на базе модификации AST | |
| @asynchronous |
| """ | |
| A file lock implementation that tries to avoid platform specific | |
| issues. It is inspired by a whole bunch of different implementations | |
| listed below. | |
| - https://bitbucket.org/jaraco/yg.lockfile/src/6c448dcbf6e5/yg/lockfile/__init__.py | |
| - http://svn.zope.org/zc.lockfile/trunk/src/zc/lockfile/__init__.py?rev=121133&view=markup | |
| - http://stackoverflow.com/questions/489861/locking-a-file-in-python | |
| - http://www.evanfosmark.com/2009/01/cross-platform-file-locking-support-in-python/ | |
| - http://packages.python.org/lockfile/lockfile.html |
| This playbook has been removed as it is now very outdated. |