(1) Create a repository with name following your username
eg. with my username as Viiiikey,the repository name must be Viiiikey.github.io
(2) If you prefer git push instead of the local github app:
1 2 3 4 5 6
*cd to folder '123' cd 123 git add . git commit -m 123
git push
1.2 Github Only Works as A Host
(1) Name your new repository randomly without Readme.md (2) copy url to local Github app (3) push in the github app directly (4) Delpy the repository to the third party like Vercel and Netlify
Note: Other Platforms like aaPanel work the same way
It only takes a few lines of code to create an interactive,visual dashboard. (1) Case 1:Simple Uploading Files and Inputting Content Run it in Anaconda Prompt
1
`streamlit run C:/Users/hp/Main-Streamlit-Page.py`
uploaded_file = st.file_uploader("or upload your fasta file here")
if uploaded_file is not None: bytes_data = uploaded_file.getvalue() #print(type(bytes_data)) #st.write(bytes_data) tmp = tempfile.NamedTemporaryFile(suffix=".fasta",delete=False) st.write(tmp.name) try: tmp.write(bytes_data) tmp.seek(0) with open(tmp.name,'r') as fr: for line in fr: if line.startswith(">"): st.write("input seq id is: %s"%(line.strip().replace(">",""))) cmd = [blastn,'-db',db,'-query',tmp.name,'-evalue','0.0001','-outfmt','6'] process = subprocess.Popen(cmd,stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True) stdout,stderr = process.communicate() # for record in NCBIXML.parse(io.StringIO(stdout)): # st.write(record.query) df = pd.read_csv(io.StringIO(stdout),sep="\t",header=None,names=names) st.dataframe(df) finally: tmp.close() os.unlink(tmp.name)
(2) Case 2:Webpage for Conversational Chat by the ChatGPT API
import streamlit as st import openai # Set Title and Communicate with Each Other
st.title("Chat with ChatGPT") st.sidebar.header("Function Introduction") st.sidebar.info( '''This is a web application that enables interactive chatting through the OpenAI API and the ChatGPT model. Enter your questions in the text box, press Enter to query, and receive responses from ChatGPT.''' ) # Set Model and Key
def ChatGPT(user_query): """ Generate answers using the OpenAI API, select models, and configure parameters. """ # Use OpenAI API to Generate the Answer completion = openai.Completion.create( engine=model_engine, prompt=user_query, max_tokens=1024, n=1, temperature=0.5, ) response = completion.choices[0].text return response def main(): """ Get user input, submit it to ChatGPT, and print the output. """ # Get Question Information user_query = st.text_input("Input your question here, press Enter to query.", "What is Python?") if user_query != ":q" or user_query != "": # Give the Question to ChatGPT, Return the Results response = ChatGPT(user_query) return st.write(f"{response}")
Template:example,fukasawa,heo,matery,medium,next,nobelium,simple,plog,heo,nexo,landing,gitbook We could also deploy it on 4everland,one web3 cloud platform.
3.2 Hugo(Go)
Visit Locally: (1) Create a Folder “hugo”,put hugo.exe into it. (2) Input cmd at the folder path where folder hugo is,input hugo site new site,put the targeted template in the theme folder in the new established site
Note:when git clone the online template,you should choose the ones with exampleSite
(3) Open examplesite,copy all the files to the folder site (4) Delete the automatically generated hugo.toml
Otherwies, page not found will show up
(5) Open config.toml,change the project name as the cloned theme name
1 2
theme=" " # you choose *wiki*,theme="wiki"
(6) Back to the folder of site,cmd,input
1
hugo serve
If error occurs, you might delete xx.md by searching twitter. Then push it to cloud:
(7) Continue in the folder of site,cmd,input
1
hugo -D
(8) Open the newly generated public file in the site folder,copy it to the folder xx.github.io
there are only .git and README in the xx.github.io folder
1
Commit to main,push origin
(9) refresh,wait,done!
(10) You might choose the third party deployment after that.
(1) Download the latest edition of Ruby+Devkit officially (2) Input ruby -v and gem -v to check whether the installment is successful (3) Install Jekyll 和 Bundler gems:
1
put gem install jekyll bundler 来安装
(4) Input jekyll -v and bundle -v to check (5) Choose one empty folder to create new blog site:
1 2 3 4
jekyll new myblog cd myblog bundle add webrick bundle exec jekyll serve