The use of __main__.py to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py:
print("Hello")
The use of __main__.py to create executables
myprojectfolder/
|_ __main__.py
|_ __init__.py
Being __main__.py:
print("Hello")
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <link href="{% static 'bootstrap/dist/css/bootstrap.min.css' %}" rel="stylesheet"> | |
| <link href="{% static 'magnific-popup/dist/magnific-popup.css' %}" rel="stylesheet" media="screen"> | |
| <!-- pode ir para o final --> | |
| <script src="{% static 'jquery/dist/jquery.min.js' %}"></script> | |
| <script src="{% static 'bootstrap/dist/js/bootstrap.min.js' %}"></script> |
| import sys | |
| import os | |
| import linecache | |
| class Profiler: | |
| def __init__(self, instrument): | |
| self.instrument = instrument | |
| def run(self, func, *args, **kwargs): |
| def changePassword(user_dn, old_password, new_password): | |
| ldap.set_option(ldap.OPT_X_TLS_REQUIRE_CERT, ldap.OPT_X_TLS_NEVER) | |
| l = ldap.initialize("LDAPS://DOMAIN.COM") | |
| l.set_option(ldap.OPT_REFERRALS,0) | |
| l.set_option(ldap.OPT_PROTOCOL_VERSION,3) | |
| l.set_option(ldap.OPT_X_TLS,ldap.OPT_X_TLS_DEMAND) | |
| l.set_option(ldap.OPT_X_TLS_DEMAND,True) | |
| l.set_option(ldap.OPT_DEBUG_LEVEL,255) | |
| l.simple_bind_s("[email protected]", "PASSWORD") |
| # -*- coding: utf-8 -*- | |
| from bottle import route, run | |
| @route('/') | |
| def index(): | |
| return '<h1>Hello World/h1>' | |
| run(host='localhost', port=8000) |
| -- basic doc: http://docs.oracle.com/cd/B19306_01/network.102/b14266/admusers.htm#i1008832 | |
| -- get all database schema's name from Oracle Database | |
| -- http://www.orafaq.com/wiki/List_of_default_database_users | |
| -- http://www.adp-gmbh.ch/ora/misc/known_schemas.html | |
| SELECT DISTINCT OWNER | |
| FROM ALL_OBJECTS | |
| WHERE OWNER NOT IN ('APEX_030200', 'CTXSYS', 'DBSNMP', 'EXFSYS', | |
| 'MDSYS', 'OLAPSYS', 'ORDDATA', 'ORDPLUGINS', | |
| 'ORDSYS', 'PUBLIC', 'SYS', 'SYSTEM', 'WMSYS', |
| function check_for_virtual_env { | |
| [ -d .git ] || git rev-parse --git-dir &> /dev/null | |
| if [ $? == 0 ]; then | |
| local ENV_NAME=`basename \`pwd\`` | |
| if [ "${VIRTUAL_ENV##*/}" != $ENV_NAME ] && [ -e $WORKON_HOME/$ENV_NAME/bin/activate ]; then | |
| workon $ENV_NAME && export CD_VIRTUAL_ENV=$ENV_NAME | |
| fi | |
| elif [ $CD_VIRTUAL_ENV ]; then |
| #!/bin/sh | |
| # Cleanup docker files: untagged containers and images. | |
| # | |
| # Use `docker-cleanup -n` for a dry run to see what would be deleted. | |
| untagged_containers() { | |
| # Print containers using untagged images: $1 is used with awk's print: 0=line, 1=column 1. | |
| # NOTE: "[0-9a-f]{12}" does not work with GNU Awk 3.1.7 (RHEL6). | |
| # Ref: https://github.com/blueyed/dotfiles/commit/a14f0b4b#commitcomment-6736470 | |
| docker ps -a | tail -n +2 | awk '$2 ~ "^[0-9a-f]+$" {print $'$1'}' |