References:
Cloud Computation Coursera https://www.coursera.org/learn/cloud-computing-2?specialization=cloud-computing Distributed Systems Course from MIT: https://pdos.csail.mit.edu/6.824/schedule.html Design Data Intensive Applications: book
| import os | |
| from openai import OpenAI | |
| URL="https://fast-api.snova.ai/v1/", | |
| API_KEY="xxxx" | |
| def main(): | |
| client = OpenAI( | |
| base_url="https://fast-api.snova.ai/v1/", |
| from typing import List, Tuple, Any | |
| from langchain.schema import AgentAction, AgentFinish | |
| from langchain.agents import BaseSingleActionAgent | |
| class DummyAgent(BaseSingleActionAgent): | |
| """DummyAgent is an agent that simply repeats the execution of the tool | |
| by the specified number of times. |
| openapi: 3.0.0 | |
| info: | |
| title: OpenAPI Library Demo App | |
| version: 0.0.1 | |
| servers: [ | |
| { | |
| "url": "http://localhost:8000", | |
| "description": "local development server", | |
| }, | |
| ] |
| # required libraries: | |
| # pandas, openpyxl | |
| import pandas as pd | |
| def read_excel(): | |
| with open('高等学校-法宝列表.xlsx', 'rb') as f: | |
| data = pd.read_excel(f, engine='openpyxl', header=0, | |
| sheet_name='for dissertation') |
| # depend on third-party libraries, run the following command to install: | |
| # sudo pip3 install jieba pdfplumber docx2txt | |
| # | |
| # run the script with: | |
| # python3 reader.py <yourfile.pdf> <yourfile.doc> | |
| # | |
| # see more at: https://github.com/fxsjy/jieba | |
| import sys |
| import os | |
| inputstr = input('input: ') | |
| splitted = inputstr.split() | |
| assert len(splitted) == 2, 'Error: invalid input' | |
| N = int(splitted[0]) | |
| M = int(splitted[1]) | |
| print('input: M = %d, N = %d' % (M, N)) |
| # gre.txt from plaintext in | |
| # https://gre.economist.com/gre-advice/gre-vocabulary/which-words-study/most-common-gre-vocabulary-list-organized-difficulty | |
| with open('gre.txt') as inf, \ | |
| open('out.csv', 'w') as outf: | |
| count = 0 | |
| while True: | |
| line = inf.readline() | |
| if line == '': |
References:
Cloud Computation Coursera https://www.coursera.org/learn/cloud-computing-2?specialization=cloud-computing Distributed Systems Course from MIT: https://pdos.csail.mit.edu/6.824/schedule.html Design Data Intensive Applications: book
| package main | |
| import ( | |
| "os" | |
| "syscall" | |
| "os/exec" | |
| "fmt" | |
| ) | |
| // Start daemon function |