Spaces:
Sleeping
Sleeping
Bhanu Prasanna
commited on
Commit
·
1a3a4b5
1
Parent(s):
9fe7bf9
Update
Browse files
.devcontainer/devcontainer.json
DELETED
@@ -1,33 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"name": "Python 3",
|
3 |
-
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
|
4 |
-
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
|
5 |
-
"customizations": {
|
6 |
-
"codespaces": {
|
7 |
-
"openFiles": [
|
8 |
-
"README.md",
|
9 |
-
"main.py"
|
10 |
-
]
|
11 |
-
},
|
12 |
-
"vscode": {
|
13 |
-
"settings": {},
|
14 |
-
"extensions": [
|
15 |
-
"ms-python.python",
|
16 |
-
"ms-python.vscode-pylance"
|
17 |
-
]
|
18 |
-
}
|
19 |
-
},
|
20 |
-
"updateContentCommand": "[ -f packages.txt ] && sudo apt update && sudo apt upgrade -y && sudo xargs apt install -y <packages.txt; [ -f requirements.txt ] && pip3 install --user -r requirements.txt; pip3 install --user streamlit; echo '✅ Packages installed and Requirements met'",
|
21 |
-
"postAttachCommand": {
|
22 |
-
"server": "streamlit run main.py --server.enableCORS false --server.enableXsrfProtection false"
|
23 |
-
},
|
24 |
-
"portsAttributes": {
|
25 |
-
"8501": {
|
26 |
-
"label": "Application",
|
27 |
-
"onAutoForward": "openPreview"
|
28 |
-
}
|
29 |
-
},
|
30 |
-
"forwardPorts": [
|
31 |
-
8501
|
32 |
-
]
|
33 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.idea/CapiPort.iml
CHANGED
@@ -1,7 +1,10 @@
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
-
<content url="file://$MODULE_DIR$"
|
|
|
|
|
|
|
5 |
<orderEntry type="jdk" jdkName="data_science" jdkType="Python SDK" />
|
6 |
<orderEntry type="sourceFolder" forTests="false" />
|
7 |
</component>
|
|
|
1 |
<?xml version="1.0" encoding="UTF-8"?>
|
2 |
<module type="PYTHON_MODULE" version="4">
|
3 |
<component name="NewModuleRootManager">
|
4 |
+
<content url="file://$MODULE_DIR$">
|
5 |
+
<excludeFolder url="file://$MODULE_DIR$/.devcontainer" />
|
6 |
+
<excludeFolder url="file://$MODULE_DIR$/.ipynb_checkpoints" />
|
7 |
+
</content>
|
8 |
<orderEntry type="jdk" jdkName="data_science" jdkType="Python SDK" />
|
9 |
<orderEntry type="sourceFolder" forTests="false" />
|
10 |
</component>
|
.ipynb_checkpoints/CapiPort-checkpoint.ipynb
DELETED
The diff for this file is too large to render.
See raw diff
|
|
.ipynb_checkpoints/Untitled-checkpoint.ipynb
DELETED
@@ -1,95 +0,0 @@
|
|
1 |
-
{
|
2 |
-
"cells": [
|
3 |
-
{
|
4 |
-
"cell_type": "code",
|
5 |
-
"execution_count": 2,
|
6 |
-
"id": "621c09fe",
|
7 |
-
"metadata": {},
|
8 |
-
"outputs": [],
|
9 |
-
"source": [
|
10 |
-
"from bs4 import BeautifulSoup\n",
|
11 |
-
"import pandas as pd\n",
|
12 |
-
"\n",
|
13 |
-
"# Read HTML content from the file\n",
|
14 |
-
"with open(\"index.html\", \"r\", encoding=\"utf-8\") as file:\n",
|
15 |
-
" html_content = file.read()\n",
|
16 |
-
"\n",
|
17 |
-
"# Parse the HTML content\n",
|
18 |
-
"soup = BeautifulSoup(html_content, \"html.parser\")\n",
|
19 |
-
"\n",
|
20 |
-
"# Find the table\n",
|
21 |
-
"table = soup.find(\"table\")\n",
|
22 |
-
"\n",
|
23 |
-
"# Extract table data\n",
|
24 |
-
"if table:\n",
|
25 |
-
" rows = table.find_all(\"tr\")\n",
|
26 |
-
" data = []\n",
|
27 |
-
" for row in rows:\n",
|
28 |
-
" columns = row.find_all(\"td\")\n",
|
29 |
-
" if columns: # Ensure it's not a header row or empty row\n",
|
30 |
-
" row_data = [column.text.strip() for column in columns]\n",
|
31 |
-
" data.append(row_data)\n",
|
32 |
-
" # Create DataFrame\n",
|
33 |
-
" df = pd.DataFrame(data)\n",
|
34 |
-
" \n",
|
35 |
-
" # Extract first part and last word from the first column\n",
|
36 |
-
" df['Name'] = df[0].str.split().str[:-1].str.join(\" \")\n",
|
37 |
-
" df['Ticker'] = df[0].str.split().str[-1]\n",
|
38 |
-
" df[['Name', 'Ticker']].to_csv(\"Company List.csv\")\n",
|
39 |
-
"else:\n",
|
40 |
-
" print(\"Table not found in the HTML content.\")\n"
|
41 |
-
]
|
42 |
-
},
|
43 |
-
{
|
44 |
-
"cell_type": "code",
|
45 |
-
"execution_count": 1,
|
46 |
-
"id": "38efd2c9",
|
47 |
-
"metadata": {},
|
48 |
-
"outputs": [
|
49 |
-
{
|
50 |
-
"ename": "NameError",
|
51 |
-
"evalue": "name 'c' is not defined",
|
52 |
-
"output_type": "error",
|
53 |
-
"traceback": [
|
54 |
-
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
|
55 |
-
"\u001b[0;31mNameError\u001b[0m Traceback (most recent call last)",
|
56 |
-
"Cell \u001b[0;32mIn[1], line 1\u001b[0m\n\u001b[0;32m----> 1\u001b[0m \u001b[38;5;28mprint\u001b[39m(\u001b[43mc\u001b[49m)\n",
|
57 |
-
"\u001b[0;31mNameError\u001b[0m: name 'c' is not defined"
|
58 |
-
]
|
59 |
-
}
|
60 |
-
],
|
61 |
-
"source": [
|
62 |
-
"print(c)"
|
63 |
-
]
|
64 |
-
},
|
65 |
-
{
|
66 |
-
"cell_type": "code",
|
67 |
-
"execution_count": null,
|
68 |
-
"id": "6c185203",
|
69 |
-
"metadata": {},
|
70 |
-
"outputs": [],
|
71 |
-
"source": []
|
72 |
-
}
|
73 |
-
],
|
74 |
-
"metadata": {
|
75 |
-
"kernelspec": {
|
76 |
-
"display_name": "Python 3 (ipykernel)",
|
77 |
-
"language": "python",
|
78 |
-
"name": "python3"
|
79 |
-
},
|
80 |
-
"language_info": {
|
81 |
-
"codemirror_mode": {
|
82 |
-
"name": "ipython",
|
83 |
-
"version": 3
|
84 |
-
},
|
85 |
-
"file_extension": ".py",
|
86 |
-
"mimetype": "text/x-python",
|
87 |
-
"name": "python",
|
88 |
-
"nbconvert_exporter": "python",
|
89 |
-
"pygments_lexer": "ipython3",
|
90 |
-
"version": "3.10.13"
|
91 |
-
}
|
92 |
-
},
|
93 |
-
"nbformat": 4,
|
94 |
-
"nbformat_minor": 5
|
95 |
-
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|