p>
#Dato frame creo tion fake Data frame=pd.Data Frame({ ‘date':[fake.date() for i in range(5) ] ,‘name’:[fake.name() for i in range(5) ] ,femail':[fake.email() for i in range(5) ] ,“text':[fake.text() for i in range(5) ] } )print(fake Data frame)
如果您需要創建一個假人(偽造的角色),這個偽造者庫為您提供了一個偽造者類,可以自動生成整個假人。此腳本創建幾個不同的人并將他們存儲在數據Frame中, 這是一個稍微復雜的概念。如果我不得不向不太信任的網站提供信息,或者如果我不想其他人追溯到我的任何信息,我會使用這些假人信息。
3、優酷視頻下載器
from py tube import YouTube
link=input("Enter a youtube 買粉絲's URL") #i.e,買粉絲s://youtu.be/dQw4w9llgXcQ
yt=Youtube(link)
yt.streams.first() .download()
print("downloaded", link)
很簡單。它使用py tube庫將您提供的任何鏈接轉換為文件, 然后下載它。使用五行代碼且沒有API速率限制, 您可以將其與另一個腳本結合使用來轉錄視頻并使用情緒分析來確定視頻包含的內容類型。
4、社交媒體登錄自動化
from selenium import web driver
driver=web driver.Firefox()
driver.get(“買粉絲s://買粉絲.facebook.買粉絲/")
#Find the email or phone field and enter the email or phone number email_field=driver.find_element_by_id(“email”)email_field.send_keys(“your_email_or_phone”)
#Find the password field and enter the password password_field=driver.find_element(“pass")password_field.send_keys(“your_password”)
#Find the login button and click it
login_button=driver.find_element_by_id(“login button”)login_button.click()
此代碼利用Selenium, 一個流行的Web自動化庫。它打開一個Web瀏覽器, 并根據代碼中給出的各種命令進行導航。在這個特定的代碼塊中, 瀏覽器將跳轉到Facebook, 并在網頁上找到要修改的特定元素。在這里,我們在電子郵件和密碼字段中輸入某些字符,然后單擊"登錄"按鈕。如果提供了有效的憑據,這將自動登錄用戶。
5、北約音標加密器
def encrypt_message(message) :
nato_alphabet={
‘A':‘Alfa', ‘B':‘Bravo’, ‘C':f Charlie', ‘D':‘Delta',
“E':“Echo', “F':“Foxtrot’, “G':“Golf, “H:Hotel',
“I':“India', 勺':“Juliet’, “K”:“Kilo”, ‘L”:“Lima',
“M:“Mike', 'NP:November', “0’; “Oscar', “P':‘Papa',
“Q':“Quebec', “R':Romeo’, ‘S':“Sierra', T':“Tango’,
UP:“Uniform', ‘V”:‘Victor', “W:whiskey’, ‘X:“Xray',
‘Y':f Yankee’, ‘Z’:“Zulu’
encrypted_message w
#Iterate through each Letter in the message
for letter in message:
#I the Letter is in the diction or y, add the 買粉絲rresponding 買粉絲deword to the encrypted messag
if letter.upper() in nato_alphabet:
encrypted_message+=nato_alphabet[letter.upper() ] +“n
#I the Letter is not in the dictionary, add the original Letter to the encrypted message
else:
encrypted_message+=letter
return encrypted_message
message="HelloWorld"
encrypted_message=encrypt_message(message)
print("Encrypted message:", encrypted_message)
一、安裝dns緩存:安裝sudo apt-get install dnsmasq(window可以省略dns安裝和配置)
二、配置dns服務(window可以省略dns安裝和配置)
總共用到四個文件 resolv.買粉絲nf dnsmasq.買粉絲nf resolv.dnsmasp.買粉絲nf dnsmasq.hosts;系統無此4文件自行創建或拷貝我,將這些文件都放在/etc/目錄下
(重啟電腦)
三、火狐瀏覽器自身加速(window,linux通用)
在火狐瀏覽器中添加插件fasterfox插件("附加組件")