- NodeBox - a nice lib to create images of graph networks
- Python Image Library
- BeautfulSoup - HTML parser
- mechanize - automated web browsing
def rightplace(a,b,len=3): | |
astr = str.zfill(str(a),len) | |
bstr = str.zfill(str(b),len) | |
return [1 if astr[x]==bstr[x] else 0 for x in range(len)] | |
def wrongplace(a,b,len=3): | |
astr = str.zfill(str(a),len) | |
bstr = str.zfill(str(b),len) | |
return [1 if astr[x] in bstr and astr[x] != bstr[x] else 0 for x in range(len)] |
$groups = Import-Clixml c:\temp\ADGroups.xml | |
$users = Import-Clixml c:\temp\ADUsers.xml | |
$users | export-csv -NoTypeInformation c:\temp\AD-users.csv | |
$groups | export-csv -NoTypeInformation c:\temp\AD-groups.csv |
Import-Module ActiveDirectory | |
#users | |
$users = Get-ADUser -filter * -properties AccountExpirationDate, AccountLockoutTime, AccountNotDelegated, AllowReversiblePasswordEncryption, CannotChangePassword, CanonicalName, Created, Deleted, Description, DisplayName, DistinguishedName, EmailAddress, EmployeeID, EmployeeNumber, Enabled, GivenName, HomeDirectory, HomedirRequired, LastBadPasswordAttempt, LastLogonDate, LockedOut, LogonWorkstations, Modified, Name, PasswordExpired, PasswordLastSet, PasswordNeverExpires, PasswordNotRequired, PrimaryGroup, ProfilePath, SamAccountName, SID, SIDHistory, Surname, Title, TrustedForDelegation, TrustedToAuthForDelegation, UserPrincipalName | |
#$users | export-clixml "C:\temp\ADUsers.xml" | |
#Groups (with members) | |
$groups = Get-ADGroup -filter * -properties CanonicalName, Created, Deleted, Description, DisplayName, DistinguishedName, GroupCategory, GroupScope, ManagedBy, MemberOf, Members, Modified, Name, ObjectCategory, ObjectClass, ObjectGUID, SamAccountName, SID | |
#$groups | expo |
#!/bin/sh | |
# Some things taken from here | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# Set the colours you can use | |
black='\033[0;30m' | |
white='\033[0;37m' | |
red='\033[0;31m' | |
green='\033[0;32m' |