Browsed by
Category: Programming

Basic Python Libraries for Ricky

Basic Python Libraries for Ricky

Anaconda – Has many essential libraries (numpy, pillow, matplotlib, csv – CSV File Reading and Writing turtle — Turtle graphics openpyxl – read/write Excel 2010 xlsx/xlsm files XlsxWriter – writing files in the Excel 2007+ XLSX file format pymysql – access/manipulate MySQL Database pyodbc and pymssql – access/manipulate an ODBC SQL database requests – read web pages beautifulsoup – read HTML pages/tags pypdf – manipulate PDF files pdfminer-six – read contents of PDFs Tkinter – Graphic User Interface library PySimpleGUI…

Read More Read More

Extra Python Libraries to Install

Extra Python Libraries to Install

Want To Level Up Your Python? Use These Python Libraries! In this article, I’ll cover the 24 best Python libraries in 2023.Whether you’re using Python for data science, web development, or game prototyping, one thing’s for sure: Python libraries can make a huge difference in speeding up development.But what are Python libraries anyway? In a hurry, here’s the TL-DR: Python libraries are a collection of pre-written functions, classes, or modules that you can integrate into your own Python projects without…

Read More Read More

Installing PowerShell on Linux

Installing PowerShell on Linux

CentOS 7 This package also works on Oracle Linux 7. Installation via Package Repository (preferred) – CentOS 7 PowerShell Core for Linux is published to official Microsoft repositories for easy installation (and updates). # Register the Microsoft RedHat repository curl https://packages.microsoft.com/config/rhel/7/prod.repo | sudo tee /etc/yum.repos.d/microsoft.repo # Install PowerShell sudo yum install -y powershell # Start PowerShell powershell After registering the Microsoft repository once as superuser, you just need to use sudo yum update powershell to update PowerShell. Installation via Direct…

Read More Read More

Python IDE Research – May 2017

Python IDE Research – May 2017

Comparison of Various Python IDEs As of May 2017, I have only actively used Idle and Pyzo, but have tried a many more. Idle – Pyzo – Canopy – Spyder   … (more coming) Canopy Express By downloading Canopy you acknowledge your acceptance of all the terms and conditions of the applicable license. v1.7.4 Documentation Platform Python Released Size MD5 Linux [64-bit] 2.7 download 2016-07-21 619.8 MB a2510ac37a4ab3079ea4aa728ff31b0e macOS [64-bit] 2.7 download 2016-07-21 437.3 MB 889a2e2beb7dfd8e77b40ba8f603b387 Windows [64-bit] 2.7 download…

Read More Read More

Processing Excel Files in Python Using XLRD (Documentation)

Processing Excel Files in Python Using XLRD (Documentation)

xlrd 1.0.0 documentation Handling of Unicode Dates in Excel spreadsheets Named references, constants, formulas, and macros Formatting information in Excel Spreadsheets Loading worksheets on demand XML vulnerabilities and Excel files API Reference Installation Instructions Development Changes Acknowledgements Licenses xlrd Docs » xlrd 1.0.0 documentation Edit on GitHub xlrd documentation¶ xlrd is a library for reading data and formatting information from Excel files, whether they are .xls or .xlsx files.   Handling of Unicode¶ This package presents all text strings as…

Read More Read More

Installing Third-Party Python Modules

Installing Third-Party Python Modules

Installing Third-Party Modules Beyond the standard library of modules packaged with Python, other developers have written their own modules to extend Python’s capabilities even further. The primary way to install third-party modules is to use Python’s pip tool. This tool securely downloads and installs Python modules onto your computer from https://pypi.python.org/, the website of the Python Software Foundation. PyPI, or the Python Package Index, is a sort of free app store for Python modules. The pip Tool The executable file…

Read More Read More

Using Python with Excel Spreadsheets with OpenPyXL

Using Python with Excel Spreadsheets with OpenPyXL

Working with Excel Spreadsheets Excel is a popular and powerful spreadsheet application for Windows. The openpyxl module allows your Python programs to read and modify Excel spreadsheet files. For example, you might have the boring task of copying certain data from one spreadsheet and pasting it into another one. Or you might have to go through thousands of rows and pick out just a handful of them to make small edits based on some criteria. Or you might have to…

Read More Read More

Python Exceptions and Error Handling

Python Exceptions and Error Handling

Python provides two very important features to handle any unexpected error in your Python programs and to add debugging capabilities in them − Exception Handling: This would be covered in this tutorial. Here is a list standard Exceptions available in Python: Standard Exceptions. Assertions: This would be covered in Assertions in Python tutorial. List of Standard Exceptions − EXCEPTION NAME DESCRIPTION Exception Base class for all exceptions StopIteration Raised when the next() method of an iterator does not point to…

Read More Read More

PowerCLI Useful Scripts And Commands

PowerCLI Useful Scripts And Commands

PowerCLI Useful Scripts And Commands Source: http://www.getshifting.com/wiki/powerclinotes 8/20/2014 PowerCLI Usefull Scripts And Commands This is an overview page with small PowerCLI scripts and or commands. Getting all Possible Values for Objects If only I knew then what I know now! When working on Script: PowerCLI: Create CSV with VMInfo I spent some serious time on finding what properties and values are available on certain objects. Today I finally figured it out, simply use “Select *”: [vSphere PowerCLI] C:\> Get-NetworkAdapter -vm testvm01…

Read More Read More

Accessing SCSM 2012 using PowerShell (without SMLets)

Accessing SCSM 2012 using PowerShell (without SMLets)

Accessing SCSM 2012 using PowerShell (without SMLets) http://ben.neise.co.uk/index.php/2014/01/accessing-scsm-2012-with-powershell/ Accessing SCSM 2012 using PowerShell (without SMLets) 2 Replies I wanted to use PowerShell to create a simple report of open (active & pending) incidents in System Center Service Manager 2012, but the only examples I could find online used the SMLets. Sometimes this wasn’t obvious, but soon became apparent when PowerShell choked over CMDLets likeGet-SCSMObject. While I’m sure the SMLets are handy for ad-hoc reports by administrators, I wanted the option for my report…

Read More Read More

SCSM PowerShell Cmdlets Using SMLets

SCSM PowerShell Cmdlets Using SMLets

SCSM PowerShell Cmdlets Using SMLets SCSM PowerShell Cmdlets Project Description This project provides cmdlets for System Center Service Manager 2010/2010 SP1/2012/2012 SP1/2012 R2 which can be used to automate common tasks. Current commands: Add-SCSMEnumeration Add-SCSMRequestOffering Export-SCManagementPack Get-DataWarehouseConfiguration Get-SCDWDimensionTypes Get-SCDWFactTypes Get-SCDWMeasureTypes Get-SCDWOutriggerTypes Get-SCDWRelationshipFactTypes Get-SCDWWarehouseModuleTypes Get-SCGroup Get-SCManagementPack Get-SCManagementPackElement Get-SCQueue Get-SCSMAnnouncement Get-SCSMCategory Get-SCSMChildEnumeration Get-SCSMClass Get-SCSMConfigItem Get-SCSMConnectedUser Get-SCSMConsoleTask Get-SCSMEnumeration Get-SCSMFolder Get-SCSMFolderHierarchy Get-SCSMForm Get-SCSMImage Get-SCSMIncident Get-SCSMLanguagePackCulture Get-SCSMManagementPackReference Get-SCSMObject Get-SCSMObjectHistory Get-SCSMObjectProjection Get-SCSMObjectTemplate Get-SCSMPage Get-SCSMPageSet Get-SCSMRelatedObject Get-SCSMRelationshipClass Get-SCSMRelationshipObject Get-SCSMRequestOffering Get-SCSMRequestOfferingQuestion Get-SCSMResource Get-SCSMRule Get-SCSMRunAsAccount Get-SCSMServiceOffering Get-SCSMSession Get-SCSMStringResource Get-SCSMSubscription…

Read More Read More

PowerShell Active Directory Commands

PowerShell Active Directory Commands

PowerShell Active Directory Commands Import-Module ActiveDirectory Set-Location AD: Get-ChildItem Set-Location “dc=rickyadams,dc=com” Set-Location “OU=TestOU” Set-ItemProperty -Path ‘.\CN=Ricky Adams’ -Name “Description” -Value “Virtualization Cloud God” Get-ADObject -LDAPFilter “(&(operatingSystem=Windows Server 2008 R2 Standard) (objectClass=computer))” -SearchBase “dc=rickyadams,dc=com” -SearchScope Subtree Search-ADAccount -PasswordExpired -UsersOnly -SearchBase “OU=TestOU,dc=rickyadams,dc=com” -SearchScope OneLevel   List All Servers in AD Get-ADComputer-Filter {OperatingSystem -Like”Windows Server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap-Auto # Only disabled computer accounts Get-QADComputer-ldapFilter‘(userAccountControl:1.2.840.113556.1.4.803:=2)’# Only enabled computer accountsGet-QADComputer-ldapFilter‘(!(userAccountControl:1.2.840.113556.1.4.803:=2))’ #List Active Servers Get-ADComputer-LDAPFilter“((objectcategory=computer)(&(operatingsystem=*Server*))(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))))” -Property *-SearchBase“OU=Servers,DC=rickyadams,DC=com”| Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap-Auto      …

Read More Read More

Powershell to List All Active Windows 2012 Servers from Active Directory

Powershell to List All Active Windows 2012 Servers from Active Directory

Import-ModuleActiveDirectory Set-Location AD: Get-ChildItem #Set-Location “OU=Server Infrastructure,dc=rickyadams,dc=com” Get-ADComputer-LDAPFilter“((objectcategory=computer)(&(operatingsystem=*Server 2012*))(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))))” -Property *-SearchBase“OU=Server Infrastructure,DC=ia,DC=doi,DC=net”| Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap-Auto