This file contains 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 praw | |
import pandas as pd | |
import yfinance as yf | |
import datetime as dt | |
from psaw import PushshiftAPI | |
#Global Variables | |
api = PushshiftAPI() | |
reddit_read_only = praw.Reddit(client_id="", | |
client_secret="", |
This file contains 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-Module ActiveDirectory | |
Import-Csv \\Pathname\ADbulk.csv | ForEach-Object { | |
$firstName = $_.firstname | |
$lastName = $_.lastname | |
$name = $firstName + ' ' + $lastName | |
$samAccountName = $firstName[0] + $lastName | |
$userPrincipal = $samAccountName + "@companyname.com" | |
$ouPath = "OU=Base,OU=Sites,DC=rome,DC=local" | |
$password = (ConvertTo-SecureString "Password1" -AsPlainText -Force) | |
$enable = $true |
This file contains 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
def calculations(): | |
salary = int(input("What is your yearly salary?")) | |
state = input("What state are you in? Choose a number \n 1: AZ \n 2: NY\n:") | |
states = {'1': .83, '2': .73} | |
state_tax = states.get(state) | |
weekly = int((salary / 52) * state_tax) | |
monthly = int((salary / 12) * state_tax) | |
biweekly = weekly * 2 | |
print("Weekly: $" + str(weekly) + "\nMonthly: $" + str(monthly) + "\nBiWeekly: $" + str(biweekly)) | |
new_calculation = input("Would you like to calculate another salary? Y/N:") |
This file contains 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
Write-Host "Password Reset and Unlock Tool`n" -ForegroundColor Yellow | |
$User = Read-Host "Enter in a Username" | |
try{ | |
Get-ADuser $User -properties * | select Name,LockedOut,Enabled,@{n='Password Last Reset';e={$_.PasswordLastSet}},@{n="Job Title";e={$_."Description"}},@{n='Email';e={$_."EmailAddress"}},TelephoneNumber,Office | fl | |
$Name = (Get-ADUser $User -Properties Name).name | |
} | |
catch{ | |
Write-Warning "$User is incorrect or does not exist.`nTry again" | |
\\FileOfYourScript.ps1 |
This file contains 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-Type -AssemblyName System.Windows.Forms | |
[System.Windows.Forms.Application]::EnableVisualStyles() | |
Function MakeNewForm { | |
$PWTool.Close() | |
$PWTool.Dispose() | |
MakeForm | |
} | |
Function Search { |
This file contains 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
$firstName = Read-Host "What is the users first name?" | |
$lastName = Read-Host "What is the users last name?" | |
# Default username setting is first letter of first name and full last name Ex: John Smith = Jsmith | |
$recommendedUser = $firstName[0] + $lastName | |
#Password set to "Password1" feel free to change | |
$password = (ConvertTo-SecureString -AsPlainText "Password1" -Force) | |
$fullName = "$firstName $lastName" |
This file contains 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
$OU = 'ou=TestOU,dc=Company,dc=local' | |
Get-ADUser -Filter * -SearchBase $OU | Select Name,Samaccountname |
This file contains 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
Invoke-RestMethod ipinfo.io | Select ip |
This file contains 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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
driver = webdriver.Chrome() | |
driver.get("Https://facebook.com") | |
def userInfo(Username,Password): | |
user = driver.find_element_by_xpath("//*[@id='email']") | |
user.send_keys(Username) | |
password = driver.find_element_by_xpath("//*[@id='pass']") |
NewerOlder