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 unicodedata | |
from unidecode import unidecode | |
def normalize(text:str): | |
text = unicodedata.normalize('NFD', text)\ | |
.encode('ascii', 'ignore')\ | |
.decode("utf-8") | |
return text | |
text ='zażółć gęślą jaźń, kožušček 北亰 François aaßaa aßb' |
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
$TTL 3600 | |
@ IN SOA dns200.anycast.me. tech.ovh.net. (2022082311 86400 3600 3600000 60) | |
IN NS ns200.anycast.me. | |
IN NS dns200.anycast.me. | |
IN A 66.111.4.53 | |
IN A 66.111.4.54 | |
IN MX 10 in1-smtp.messagingengine.com. | |
IN MX 20 in2-smtp.messagingengine.com. | |
IN TXT "v=spf1 include:spf.messagingengine.com ~all" |
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
; This file is autohotkey v2 script. | |
#SingleInstance Force | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory. | |
InstallKeybdHook ; how it works: https://lexikos.github.io/v2/docs/commands/InstallKeybdHook.htm |
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
#SingleInstance Force | |
#Warn ; Enable warnings to assist with detecting common errors. | |
SendMode "Input" ; Recommended for new scripts due to its superior speed and reliability. | |
SetWorkingDir A_ScriptDir ; Ensures a consistent starting directory. | |
; This script hides Discord to tray. | |
if (not ProcessExist("Discord.exe")) | |
{ | |
Run "C:\Users\user\AppData\Local\Discord\Update.exe --processStart Discord.exe --process-start-args --start-minimized" |
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 tqdm import tqdm | |
from time import sleep | |
import psutil | |
with tqdm(total=100, desc='cpu%', position=1) as cpubar, tqdm(total=100, desc='ram%', position=0) as rambar: | |
while True: | |
rambar.n=psutil.virtual_memory().percent | |
cpubar.n=psutil.cpu_percent() | |
rambar.refresh() | |
cpubar.refresh() |
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 tqdm import tqdm | |
from time import sleep | |
with tqdm(total=4, desc='1st loop', position=2) as pbar1: | |
with tqdm(total=5, desc='2nd loop', position=1) as pbar2: | |
with tqdm(total=50, desc='3rd loop', position=0) as pbar3: | |
for i in range(4): | |
pbar2.reset() | |
for j in range(5): |
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 tqdm import tqdm | |
from time import sleep | |
with tqdm(total=4, desc='1st loop', position=2) as pbar1: | |
with tqdm(total=5, desc='2nd loop', position=1) as pbar2: | |
with tqdm(total=50, desc='3rd loop', position=0) as pbar3: | |
for i in range(4): | |
pbar2.reset() | |
for j in range(5): |
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 pulumi | |
import pulumi_gcp as gcp | |
region= "us-central1" | |
# Cloud Run Service is not enabled by default, let's enable it | |
enableCloudRun = gcp.projects.Service("EnableCloudRun", | |
service= "run.googleapis.com", | |
) |
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 pulumi | |
import pulumi_gcp as gcp | |
region= "us-central1" | |
# Cloud Run Service is not enabled by default, let's enable it | |
enableCloudRun = gcp.projects.Service("EnableCloudRun", | |
service= "run.googleapis.com", |
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 __future__ import print_function | |
import os.path | |
from googleapiclient.discovery import build | |
from google_auth_oauthlib.flow import InstalledAppFlow | |
from google.auth.transport.requests import Request | |
from google.oauth2.credentials import Credentials | |
# If modifying these scopes, delete the file token.json. | |
SCOPES = ['https://www.googleapis.com/auth/drive.metadata.readonly'] |
NewerOlder