Thanks for taking an interest in this awesome little project. We love to bring new members into the community, and can always use the help.
- Task tracking and Bug reports: GitHub
- Discussion: the Python Discord server
| import sys | |
| PY2 = sys.version_info[0] == 2 | |
| if PY2: | |
| import _winreg as winreg | |
| else: | |
| import winreg | |
| try: | |
| reg = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE) | |
| ps_key = winreg.OpenKey(reg, r'SOFTWARE\Microsoft\PowerShell') | |
| except OSError: |
| # Editors | |
| .vscode/ | |
| .idea/ | |
| # Vagrant | |
| .vagrant/ | |
| # Mac/OSX | |
| .DS_Store |
Thanks for taking an interest in this awesome little project. We love to bring new members into the community, and can always use the help.
| function TabExpansion($line, $lastWord) { | |
| $lastBlock = [regex]::Split($line, '[|;]')[-1].TrimStart() | |
| $aliases = @("pipenv") + @(Get-Alias | where { $_.Definition -eq "pipenv" } | select -Exp Name) | |
| $aliasPattern = "($($aliases -join '|'))" | |
| if($lastBlock -match "^$aliasPattern ") { | |
| $Env:_PIPENV_COMPLETE = "complete-powershell" | |
| $Env:COMMANDLINE = "$lastBlock" | |
| (pipenv) | ? {$_.trim() -ne "" } | |
| Remove-Item Env:_PIPENV_COMPLETE | |
| Remove-Item Env:COMMANDLINE |
| # Provides same functionality as the Unix "which" command | |
| function which($commandName) | |
| { | |
| (Get-Command $commandName).Definition | |
| } | |
| # Shortens a filesystem path to singe-characters [used by prompt()]. | |
| function shorten-path([string] $path) { | |
| $loc = $path.Replace($HOME, '~') |
| [MASTER] | |
| # Specify a configuration file. | |
| #rcfile= | |
| # Python code to execute, usually for sys.path manipulation such as | |
| # pygtk.require(). | |
| #init-hook= | |
| # Add files or directories to the blacklist. They should be base names, not |
| # Pre-commit config (https://pre-commit.com/) | |
| .pre-commit-config.yaml | |
| # Editors/IDEs/etc | |
| .idea | |
| .vscode | |
| .vagrant | |
| .classpath | |
| .project |
| # ************************************** | |
| # ** Get MAC address of a remote host ** | |
| def arpreq_ip(ip): | |
| # type: (str) -> Optional[str] | |
| import arpreq | |
| return arpreq.arpreq('192.168.1.1') | |
| def scapy_ip(ip): | |
| # type: (str) -> str | |
| """Requires root permissions on POSIX platforms. |
| import logging | |
| import re | |
| import browsercookie | |
| import requests | |
| from bs4 import BeautifulSoup | |
| from requests.cookies import RequestsCookieJar | |
| class AnimePlanet: |