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 annotations | |
import logging | |
import warnings | |
from collections.abc import Callable, Sequence | |
from typing import Any, Dict, List, Literal, Optional, Set, Tuple, Union | |
import numpy as np | |
import requests | |
from langchain.pydantic_v1 import BaseModel, Extra, Field, root_validator |
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
#!/bin/bash | |
# create pull request for current git branch and merge using azurecli | |
git push --set-upstream origin "$(git branch --show-current)" || exit | |
if pr_list=$(az repos pr list --output json --source-branch "$(git branch --show-current)"); then | |
if [ $(echo "$pr_list" | jq '. | length') -gt 0 ]; then | |
pullRequestId=$(echo "$pr_list" | jq '.[0].pullRequestId') | |
echo "A pull request already exists for the current branch with ID: $pullRequestId" | |
else | |
resp=$(az repos pr create --auto-complete true --delete-source-branch true --source-branch "$(git branch --show-current)" --output json) && \ |
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
echo backing up LGHUB | |
rm -rf LGHUBlocal LGHUBroaming | |
cp -r C:/Users/faris/AppData/Local/LGHUB LGHUB-local | |
cp -r C:/Users/faris/AppData/Roaming/LGHUB LGHUB-roaming | |
zip -r LGHUB-local-`date +%Y%m%d_%H%M%S`.zip LGHUB-local/* | |
zip -r LGHUB-roaming-`date +%Y%m%d_%H%M%S`.zip LGHUB-roaming/* | |
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
print(""" | |
this file is has migrated to https://github.com/FarisHijazi/deblack/blob/master/deblack.py | |
Please go head over to the repository and contribute to the project | |
""") |
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
""" | |
VoiceFixer | |
$ python voicefixer_cli.py -i ~/Downloads/download.mp3 | |
# for running on multiple files | |
$ find path/to/folder -name "*.wav" -not -name "*denoised*" |xargs -P 20 -I{} sh -c 'python voicefixer_cli.py -i {}' | |
""" | |
""" |
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
/* | |
* @author https://github.com/FarisHijazi | |
* @param query (string): search query to send to google | |
* | |
* this script fetches a google images page and uses regex to extract thumbnail URLs | |
* more work can be done like extracting names and descriptions too | |
*/ | |
function getGoogleImages(query) { | |
if (!query) return []; | |
var html = UrlFetchApp.fetch("https://www.google.com/search?hl=en&tbm=isch&q=" + encodeURIComponent(query.trim()), { |
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
#!/bin/bash | |
# https://gist.github.com/FarisHijazi/4ba8d9768eddc6f218ecd21824c24909 | |
#TODO: fix directory naming, name it something related to the file | |
# argparsing from: https://stackoverflow.com/a/39376824/7771202 | |
# usage function | |
function usage() | |
{ |
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
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases. | |
; #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. | |
#SingleInstance, force | |
~*wheelup:: | |
sendinput, {Space} | |
Return |
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
// code to get this: | |
/** | |
* @author github.com/FarisHijazi | |
* | |
* @returns {{ "id": String, "tu": String, "th": String, "tw": String, "ou": String, "oh": String, "ow": String, "pt": String, "st": String, }[]} | |
* returns a list of objects, these contain the image info | |
* | |
* how it works: | |
* there's a <script> that contains the images info, the code in it contains `AF_initDataCallback` |
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
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\*\shell\Unzip and delete] | |
"icon"="C:\\Program Files\\7-Zip\\7zG.exe" | |
[HKEY_CLASSES_ROOT\*\shell\Unzip and delete\command] | |
@="\"<PATH TO>\\unzip_and_delete.bat\" \"%1\"" |
NewerOlder