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
| Function Invoke-WolframAlphaAPI($Query) | |
| { | |
| Return (Invoke-RestMethod -Uri "http://api.wolframalpha.com/v2/query?appid=APIKEY&input=$($Query.Replace(' ','%20'))").queryresult | |
| } |
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
| $url="https://geekeefy.wordpress.com/2016/03/12/powershell-extract-text-from-image-and-convert-print-in-any-language/" | |
| (Invoke-WebRequest -Uri $url).images.src | ?{$_ -like "*Geekeefy.files*"} -PipelineVariable pv ` | |
| | %{$fn = ($pv.split("/")[-1]).split('?')[0];iwr $pv -OutFile "D:\scraping\$fn"} |
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 os | |
| import io | |
| from docx import Document | |
| from pdfminer3.layout import LAParams, LTTextBox | |
| from pdfminer3.pdfpage import PDFPage | |
| from pdfminer3.pdfinterp import PDFResourceManager | |
| from pdfminer3.pdfinterp import PDFPageInterpreter | |
| from pdfminer3.converter import PDFPageAggregator | |
| from pdfminer3.converter import TextConverter |
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
| Add-PSSnapin Microsoft.SharePoint.PowerShell | |
| function Add-PageParserPath | |
| { | |
| [CmdletBinding()] | |
| param | |
| ( | |
| [Parameter(Mandatory=$true,ValueFromPipeline=$true)][Microsoft.SharePoint.Administration.SPWebApplication]$WebApplication, | |
| [Parameter(Mandatory=$true)][string]$VirtualPath, | |
| [Parameter(Mandatory=$false)][bool]$AllowServerSideScript = $false, |
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
| function Test-ProcessElevated | |
| { | |
| [CmdletBinding()] | |
| [OutputType([bool])] | |
| param ( | |
| [Parameter(Mandatory = $true, ValueFromPipeline = $true)] | |
| [System.Diagnostics.Process] $Process | |
| ) | |
| begin { |
OlderNewer