This gist provides the learning-python3.ipynb notebook file, which can be viewed and edited in a Jupyter Notebook server to learn Python 3.
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
| # I tried to use the pip install wifi but it really didn't work. | |
| # So created this | |
| import subprocess | |
| process = subprocess.Popen(['/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport','-I'], stdout=subprocess.PIPE) | |
| out, err = process.communicate() | |
| process.wait() | |
| print(out) | |
| ''' |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
| Filter | Description | Example |
|---|---|---|
| allintext | Searches for occurrences of all the keywords given. | allintext:"keyword" |
| intext | Searches for the occurrences of keywords all at once or one at a time. | intext:"keyword" |
| inurl | Searches for a URL matching one of the keywords. | inurl:"keyword" |
| allinurl | Searches for a URL matching all the keywords in the query. | allinurl:"keyword" |
| intitle | Searches for occurrences of keywords in title all or one. | intitle:"keyword" |
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
| #Create the network graph using networkx | |
| if uploaded_file is not None: | |
| df=pd.read_csv(uploaded_file) | |
| A = list(df["Source"].unique()) | |
| B = list(df["Target"].unique()) | |
| node_list = set(A+B) | |
| G = nx.Graph() #Use the Graph API to create an empty network graph object | |
| #Add nodes and edges to the graph object | |
| for i in node_list: |
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
| #Use plotly to visualize the network graph created using NetworkX | |
| #Adding edges to plotly scatter plot and specify mode='lines' | |
| edge_trace = go.Scatter( | |
| x=[], | |
| y=[], | |
| line=dict(width=1,color='#888'), | |
| hoverinfo='none', | |
| mode='lines') | |
| for edge in G.edges(): |
Inspiration: https://www.most-useful.com/kde-plasma-on-wsl.html
- Update WSL
- In windows command prompt run:
wsl --update
- In windows command prompt run:
- Add systemd to ubuntu
- In ubuntu prompt run:
sudo nano /etc/wsl.conf
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 openai | |
| import streamlit as st | |
| from streamlit_chat import message | |
| from dotenv import load_dotenv | |
| import os | |
| from langchain.embeddings.openai import OpenAIEmbeddings | |
| from langchain.vectorstores import Chroma | |
| import openai | |
| from langchain.document_loaders import UnstructuredMarkdownLoader | |
| from langchain.chains.question_answering import load_qa_chain |
OlderNewer