This file contains hidden or 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
// 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: |
This file contains hidden or 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 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 |
This file contains hidden or 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 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 = [] |
This file contains hidden or 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 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" |