Skip to content

Instantly share code, notes, and snippets.

View kargaranamir's full-sized avatar
🕸️
Focusing

Amir Hossein Kargaran kargaranamir

🕸️
Focusing
View GitHub Profile
@kargaranamir
kargaranamir / udhr.md
Created March 17, 2023 14:30
UDHR (Universal Declaration of Human Rights) dataset
@kargaranamir
kargaranamir / common.sh
Created May 22, 2023 18:15
common commands
# remove empty folders in the current directory.
find . -type d -empty -delete
# flat folder in. folder
find . -type f -exec mv -i {} . \;
# delete other files that doesnot match:
find . ! -name "*-sentences.txt" -type f -delete
# grep over not txt:
@kargaranamir
kargaranamir / selenium_colab.md
Last active August 25, 2023 20:13
install selenium in google colab
# install chromium and selenium
!apt update
!apt install chromium-chromedriver
!pip install selenium
from selenium import webdriver
from selenium.common.exceptions import WebDriverException
@kargaranamir
kargaranamir / selenium_gradio.md
Last active August 25, 2023 20:13
install selenium in gradio

Create a file named packages.txt in the root directory of Gradio, and insert the following content:

chromium-driver

By doing this, you will ensure the installation of the Chromium driver for Debian.

create a a file named requirements.txt in the root directory of Gradio, and insert the following content:

@kargaranamir
kargaranamir / commit.md
Created September 26, 2023 02:41
How to change a recent commit date.
  1. change GIT_COMMITTER_DATE variable:
export GIT_COMMITTER_DATE="Sat Sep 20 08:00:00 2023 +0000"
  1. then commit your changes! I use GitHub UI, it's much easier to handle some of the tasks. But don't push!
  2. git commit --amend --no-edit --date="$GIT_COMMITTER_DATE"