This file contains 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 sys, os, tempfile, logging,shutil | |
import urllib.request as urllib2 | |
import urllib.parse as urlparse | |
import threading | |
import time | |
maxThreads = 64 | |
block_sz = 16 * 1024 | |
class FilePartThread(threading.Thread): |
This file contains 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
def get_decorators(cls): | |
target = cls | |
decorators = {} | |
def visit_FunctionDef(node): | |
decorators[node.name] = [] | |
for n in node.decorator_list: | |
name = '' | |
if isinstance(n, ast.Call): | |
name = n.func.attr if isinstance(n.func, ast.Attribute) else n.func.id |
This file contains 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
@echo off | |
setlocal enableextensions | |
:: search for available ports | |
call :findFirstAvailablePort 8080 tomcatPort | |
call :findFirstAvailablePort 1521 oraclePort | |
:: echo the retrieved data | |
echo Tomcat_port=%tomcatPort% | |
echo Oracle_port=%oraclePort% |
This file contains 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
@echo off | |
setlocal ENABLEDELAYEDEXPANSION | |
set JAVA_OPTS= | |
rem eol stops comments from being parsed | |
rem otherwise split lines at the = char into two tokens | |
for /F "eol=# delims== tokens=1,*" %%a in (test.properties) do ( | |
rem proper lines have both a and b set |