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
#!/c/Python32/python.exe | |
import sys | |
import os | |
import os.path | |
import xml.etree.ElementTree as ET | |
ns = '{http://schemas.microsoft.com/developer/msbuild/2003}' | |
#Works with relative path also | |
projectFileName = sys.argv[1] |
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
########################################################################## | |
# | |
# xmlsort | |
# | |
# Simple utility script to enable a diff of two XML files in a way | |
# that ignores the order or attributes and elements. | |
# | |
# Forked from | |
# Dale Lane (email@dalelane.co.uk) | |
# 6 Oct 2014 |
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
hKRib2R5hqhkZXRhY2hlZMOpaGFzaF90eXBlCqNrZXnEIwEg1SqWNfe5q/aH9Q+OH7j8CYREoroq3hgI5JR0PVAv7GwKp3BheWxvYWTFAul7ImJvZHkiOnsia2V5Ijp7ImVsZGVzdF9raWQiOiIwMTIwZDUyYTk2MzVmN2I5YWJmNjg3ZjUwZjhlMWZiOGZjMDk4NDQ0YTJiYTJhZGUxODA4ZTQ5NDc0M2Q1MDJmZWM2YzBhIiwiaG9zdCI6ImtleWJhc2UuaW8iLCJraWQiOiIwMTIwZDUyYTk2MzVmN2I5YWJmNjg3ZjUwZjhlMWZiOGZjMDk4NDQ0YTJiYTJhZGUxODA4ZTQ5NDc0M2Q1MDJmZWM2YzBhIiwidWlkIjoiOGRhODVkNTNhZGU3NDc3MDAzYjc5MjFhMWY1MWQ4MTkiLCJ1c2VybmFtZSI6Iml4ZTAxMyJ9LCJzZXJ2aWNlIjp7Im5hbWUiOiJnaXRodWIiLCJ1c2VybmFtZSI6Iml4ZTAxMyJ9LCJ0eXBlIjoid2ViX3NlcnZpY2VfYmluZGluZyIsInZlcnNpb24iOjF9LCJjbGllbnQiOnsibmFtZSI6ImtleWJhc2UuaW8gZ28gY2xpZW50IiwidmVyc2lvbiI6IjEuMC4yMSJ9LCJjdGltZSI6MTQ5MjQ4NDQ3NCwiZXhwaXJlX2luIjo1MDQ1NzYwMDAsIm1lcmtsZV9yb290Ijp7ImN0aW1lIjoxNDkyNDg0NDQ5LCJoYXNoIjoiODY4YmNiYmY0Njk2NTQ2OTA3OWYyYTFiNjgxZWU3NzhlN2VmNDg4N2I4NzY5OWY0ZjNkNGI2YTQ5ODYzZWI0YzM5ODgwYWNlNTg3YTkzNTIyODkxNTM5ZDRiMmRlMWNlNGZkOTk4ZWM0MjY5ZDc0N2QyZWVjNWFkYmU5YWFmMzUiLCJzZXFubyI6MTAyNTMyMX0sInByZXYiOiI3ZDNmODlhYTQ5YmMxZmM3OGM2YjA3N2UyMzY4YjkzNTk4Mjk4 |
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
from __future__ import print_function | |
import base64 | |
import json | |
import os.path | |
import pprint | |
import sys | |
import time | |
import zlib | |
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
#See https://stackoverflow.com/q/54425723/591064 for usage | |
async def adapter_cmdloop(self, intro=None): | |
"""Repeatedly issue a prompt, accept input, parse an initial prefix | |
off the received input, and dispatch to action methods, passing them | |
the remainder of the line as argument. | |
""" | |
self.preloop() | |
#This is the same code as the Python 3.7.2 Cmd class, with the |
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 concurrent.futures | |
import logging | |
import threading | |
import time | |
import random | |
def return_after_5_secs(num, stop): | |
threading.current_thread().name = f"banane{num}" | |
logging.debug(f"from inside {num}") |
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 itertools | |
tests_passed = { | |
'simple end of line': | |
[ b'One\nSSH>', | |
b'no!', | |
], | |
'simple begining of line': | |
[ b'SSH>', | |
], |
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 re | |
emp = 'cn.l.ble.901:itc' | |
#Test regex here: | |
#https://pythex.org/?regex=%5E(%5Ba-z%5D%7B2%2C4%7D)%5C.l%5C.(%5Ba-z%5D%2B%3F)%5C.(.*)%3A(.*)&test_string=cn.l.ble.901%3Atmc | |
pattern = re.compile(r'^([a-z]{2,4})\.l\.([a-z]+?)\.(.*):(.*)') | |
match = pattern.search(emp) | |
scac, origin, number, topic = match.groups() | |
#print(scac, origin, number, topic) | |
print(f'emp={emp}') | |
print(f'locoid={origin}{number}') |
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
@if (@X)==(@Y) @end /* JScript comment | |
@echo off | |
REM Polyglot code adapted from https://stackoverflow.com/a/24396149/591064 | |
setlocal enableDelayedExpansion | |
REM Too few arguments? | |
if "x%1" == "x" goto usage_help | |
REM Find the latest JScript.Net compiler | |
for /f "tokens=* delims=" %%v in ('dir /b /s /a:-d /o:-n "%SystemRoot%\Microsoft.NET\Framework\*jsc.exe"') do ( |
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
package main | |
import ( | |
"encoding/hex" | |
"fmt" | |
"strings" | |
"github.com/capitalone/fpe/ff1" | |
//"alphabets" | |
) |
OlderNewer