updated eustartups
This commit is contained in:
+26033
File diff suppressed because one or more lines are too long
+63
-336
File diff suppressed because one or more lines are too long
+110
-4444
File diff suppressed because it is too large
Load Diff
+185
-22
@@ -13,7 +13,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": 10,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -24,7 +24,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -161,7 +161,7 @@
|
||||
"4 2022 www.satuvision.com "
|
||||
]
|
||||
},
|
||||
"execution_count": 4,
|
||||
"execution_count": 11,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -182,7 +182,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": 12,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -191,7 +191,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": 13,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -200,7 +200,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": 14,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -209,7 +209,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 29,
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
@@ -280,7 +280,7 @@
|
||||
"3160 Cross Channel Marketing Customer Data Platform... "
|
||||
]
|
||||
},
|
||||
"execution_count": 29,
|
||||
"execution_count": 15,
|
||||
"metadata": {},
|
||||
"output_type": "execute_result"
|
||||
}
|
||||
@@ -291,18 +291,9 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"c:\\Users\\arman\\anaconda3\\envs\\eustartups38\\lib\\site-packages\\tqdm\\auto.py:22: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html\n",
|
||||
" from .autonotebook import tqdm as notebook_tqdm\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from sentence_transformers import SentenceTransformer\n",
|
||||
"from sklearn.cluster import KMeans"
|
||||
@@ -310,9 +301,181 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"execution_count": 9,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"outputs": [
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "4b1f3d446aca424882a07ba333064b68",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"modules.json: 0%| | 0.00/229 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"d:\\Programme\\Miniconda\\envs\\jupyter\\lib\\site-packages\\huggingface_hub\\file_download.py:159: UserWarning: `huggingface_hub` cache-system uses symlinks by default to efficiently store duplicated files but your machine does not support them in C:\\Users\\voglt\\.cache\\huggingface\\hub\\models--sentence-transformers--distilbert-base-nli-stsb-mean-tokens. Caching files will still work but in a degraded version that might require more space on your disk. This warning can be disabled by setting the `HF_HUB_DISABLE_SYMLINKS_WARNING` environment variable. For more details, see https://huggingface.co/docs/huggingface_hub/how-to-cache#limitations.\n",
|
||||
"To support symlinks on Windows, you either need to activate Developer Mode or to run Python as an administrator. In order to see activate developer mode, see this article: https://docs.microsoft.com/en-us/windows/apps/get-started/enable-your-device-for-development\n",
|
||||
" warnings.warn(message)\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "ed8a32705df940aeadb07e71e929f70b",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"config_sentence_transformers.json: 0%| | 0.00/122 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "b9db126b406243db9a5209ea44deae14",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"README.md: 0%| | 0.00/4.05k [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "c3a8fe3413fe450b97b4c79856786deb",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"sentence_bert_config.json: 0%| | 0.00/53.0 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "10e5f20ffd9b4d8bb3c118dd9fb255af",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"config.json: 0%| | 0.00/555 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "3a2cbc837ff246f9aeffd5b96add8521",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"model.safetensors: 0%| | 0.00/265M [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "37c9cc3836364d2e95422d44b240b9da",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"tokenizer_config.json: 0%| | 0.00/505 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "268fb18c056e4a2385805bcbf603aa4d",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"vocab.txt: 0%| | 0.00/232k [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "21b8dbff954141bba2e4172ef49b49d8",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"tokenizer.json: 0%| | 0.00/466k [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "6e6f378b5b26415596ef7df169377a58",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"special_tokens_map.json: 0%| | 0.00/112 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
},
|
||||
{
|
||||
"name": "stderr",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"d:\\Programme\\Miniconda\\envs\\jupyter\\lib\\site-packages\\transformers\\tokenization_utils_base.py:1601: FutureWarning: `clean_up_tokenization_spaces` was not set. It will be set to `True` by default. This behavior will be depracted in transformers v4.45, and will be then set to `False` by default. For more details check this issue: https://github.com/huggingface/transformers/issues/31884\n",
|
||||
" warnings.warn(\n"
|
||||
]
|
||||
},
|
||||
{
|
||||
"data": {
|
||||
"application/vnd.jupyter.widget-view+json": {
|
||||
"model_id": "16222c4211034b16ab717162d554e72f",
|
||||
"version_major": 2,
|
||||
"version_minor": 0
|
||||
},
|
||||
"text/plain": [
|
||||
"1_Pooling/config.json: 0%| | 0.00/190 [00:00<?, ?B/s]"
|
||||
]
|
||||
},
|
||||
"metadata": {},
|
||||
"output_type": "display_data"
|
||||
}
|
||||
],
|
||||
"source": [
|
||||
"embedder = SentenceTransformer('distilbert-base-nli-stsb-mean-tokens')"
|
||||
]
|
||||
@@ -2919,7 +3082,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.13"
|
||||
"version": "3.9.19"
|
||||
},
|
||||
"orig_nbformat": 4
|
||||
},
|
||||
|
||||
+25869
-3631
File diff suppressed because one or more lines are too long
Vendored
+108
@@ -0,0 +1,108 @@
|
||||
|
||||
from selenium.common.exceptions import NoSuchElementException
|
||||
from selenium.webdriver.firefox.options import Options
|
||||
from selenium.webdriver.common.keys import Keys
|
||||
from selenium.webdriver.common.by import By
|
||||
from selenium import webdriver
|
||||
from elasticsearch import Elasticsearch
|
||||
from random import randint
|
||||
import time
|
||||
import json
|
||||
import sys
|
||||
import os
|
||||
|
||||
# uni elastic
|
||||
es = Elasticsearch({'host':'inse.nes.uni-due.de', 'port': 443, 'path_prefix':'elastic', 'scheme':'https'}, basic_auth=('elastic', 'RLldUaJgbGeoqd3KCX3p'), request_timeout=60, max_retries=5, retry_on_timeout=True)
|
||||
|
||||
def check_elastic():
|
||||
if not es.ping():
|
||||
sys.exit("No connection to Elasticsearch")
|
||||
|
||||
def build_driver_and_login():
|
||||
print("Login")
|
||||
|
||||
mail = None
|
||||
pw = None
|
||||
name = None
|
||||
|
||||
for arg in sys.argv[1:]:
|
||||
if arg.startswith("mail="):
|
||||
mail = arg.split("=", 1)[1]
|
||||
elif arg.startswith("pw="):
|
||||
pw = arg.split("=", 1)[1]
|
||||
elif arg.startswith("name="):
|
||||
name = arg.split("=", 1)[1]
|
||||
|
||||
if mail is None or pw is None or name is None:
|
||||
sys.exit("Enter UDE name, password and mail as Command Line Parameter: mail=XXX pw=XXX name=XXX")
|
||||
|
||||
options = Options()
|
||||
# options.add_argument("--headless") # TODO
|
||||
|
||||
driver = webdriver.Firefox(options=options)
|
||||
|
||||
try:
|
||||
driver.get("https://pitchbook.com/")
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
driver.find_element(By.XPATH, "/html/body/bsp-header/div[2]/div[3]/div/a[1]").click()
|
||||
|
||||
# can't get over this point
|
||||
# can't reach login
|
||||
|
||||
time.sleep(11)
|
||||
|
||||
driver.find_element(By.XPATH, "/html/body/div/ctrsi-signin-component/div/div/div[2]/main/section/div/form/div[4]/a[1]").click()
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
# find search-textarea
|
||||
mail_textarea = driver.find_element(By.ID, "ssoEmailInput")
|
||||
# clear current text
|
||||
mail_textarea.clear()
|
||||
# insert search_string into textarea
|
||||
mail_textarea.send_keys(mail)
|
||||
# search
|
||||
mail_textarea.send_keys(Keys.RETURN)
|
||||
|
||||
time.sleep(10)
|
||||
|
||||
# find search-textarea
|
||||
name_textarea = driver.find_element(By.ID, "username")
|
||||
# clear current text
|
||||
name_textarea.clear()
|
||||
# insert search_string into textarea
|
||||
name_textarea.send_keys(name)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
# find search-textarea
|
||||
pw_textarea = driver.find_element(By.ID, "password")
|
||||
# clear current text
|
||||
pw_textarea.clear()
|
||||
# insert search_string into textarea
|
||||
pw_textarea.send_keys(pw)
|
||||
# search
|
||||
pw_textarea.send_keys(Keys.RETURN)
|
||||
|
||||
time.sleep(1)
|
||||
|
||||
# TODO
|
||||
|
||||
except:
|
||||
sys.exit("Failed to Login")
|
||||
|
||||
return driver
|
||||
|
||||
# main - entry point
|
||||
if __name__ == '__main__':
|
||||
print("Starting")
|
||||
|
||||
check_elastic()
|
||||
|
||||
driver = build_driver_and_login()
|
||||
|
||||
# driver.close() # TODO
|
||||
|
||||
print("Finished")
|
||||
Reference in New Issue
Block a user