Skip to content

Instantly share code, notes, and snippets.

View sithart's full-sized avatar
😀
The time has come

sitharthan sithart

😀
The time has come
  • Chadura Tech
  • Chennai
View GitHub Profile
@sithart
sithart / work_queue.rs
Created January 16, 2023 18:00 — forked from NoraCodes/work_queue.rs
An example of a parallel work scheduling system using only the Rust standard library
// Here is an extremely simple version of work scheduling for multiple
// processors.
//
// The Problem:
// We have a lot of numbers that need to be math'ed. Doing this on one
// CPU core is slow. We have 4 CPU cores. We would thus like to use those
// cores to do math, because it will be a little less slow (ideally
// 4 times faster actually).
//
// The Solution:
@sithart
sithart / extractor.py
Created March 3, 2021 06:59
website css, javascript, image links extractor
import requests
from bs4 import BeautifulSoup as bs
from urllib.parse import urljoin
import sys
# URL of the web page you want to extract
url = sys.argv[1]
# initialize a session
@sithart
sithart / bioinformatics_keywords_scraping.py
Last active March 3, 2021 06:45
Bioinformatics keywords scraping from wikipedia
import requests
from bs4 import BeautifulSoup
import json
import csv
import pandas as pd
res = requests.get("https://mipt.ru/dbmp/student/files/bioinformatics/books/glossary_bioinf.php")
soup = BeautifulSoup(res.text, "html.parser")
keys = []
@sithart
sithart / send_file.py
Last active June 14, 2024 13:44
Upload file via pysftp with python
import pysftp as sftp
connection_info = {
'server': "SERVER NAME OR IP ADDRESS",
'user': "USER NAME",
'passwd': "PASSWORD",
}
def push_file_to_server():
s = sftp.Connection(host=connection_info['server'], username=connection_info['user'], password=connection_info['passwd'])
local_path = "LOCAL FILE PATH"