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
# Needed this for merging a couple of log files into one file under conditions: | |
# - only files of type .log needed to be merged | |
# - only line starting with 'RLS' needed to be merged | |
import os | |
g = open('total.txt','a') | |
for file in os.listdir('.'): | |
if file.endswith('.log'): | |
f = open(file,'r') | |
for line in f: |
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 random | |
def main(): | |
length = int(raw_input('How long should your password be?\n')) | |
print('Here's the password I generated: ' + ''.join(random.sample('QWERTYUIOPASDFGHJKLZXCVBNM1234567890abcdefghijklmnopqrstuvwxyz1234567890!@$()_', length))) | |
main() |
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
# Qlikview 11.20 Service releases and build numbers | |
Qlikview 11.20 SR 1 | 11.20.11718 | |
Qlikview 11.20 SR 2 | 11.20.11922 | |
Qlikview 11.20 SR 3 | 11.20.12018 | |
Qlikview 11.20 SR 4 | 11.20.12129 | |
Qlikview 11.20 SR 5 | 11.20.12235 | |
Qlikview 11.20 SR 6 | 11.20.12347 | |
Qlikview 11.20 SR 7 | 11.20.12451 | |
Qlikview 11.20 SR 8 | 11.20.12577 |
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
--- 192.168.0.1 ping statistics --- | |
1016 packets transmitted, 1016 packets received, 0.0% packet loss | |
round-trip min/avg/max/stddev = 0.552/0.805/3.096/0.218 ms | |
--- 8.8.8.8 ping statistics --- | |
930 packets transmitted, 729 packets received, 21.6% packet loss | |
round-trip min/avg/max/stddev = 12.405/24.715/1031.789/38.960 ms | |
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
# This script is a solution to this version of the Zebra Puzzle: | |
# http://csl.name/post/einsteins-puzzle/ | |
# About which everything can be found at: | |
# http://en.wikipedia.org/wiki/Zebra_Puzzle | |
# After trying to generate all possible compositions of houses, nationality, color, drink, smoke and pet it still took too long for my machine to find the solution. So I took some business rules and applied these before generating the compositions. Eventually it still takes around a minute or two to find and print the solution. It was a nice challenge for a beginning programmer. | |
# Business rules: | |
# 1 The Brit lives in a red house. | |
# 2 The Swede keeps dogs as pets. |