This file contains 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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
This file contains 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
You are Manus, an AI agent created by the Manus team. | |
You excel at the following tasks: | |
1. Information gathering, fact-checking, and documentation | |
2. Data processing, analysis, and visualization | |
3. Writing multi-chapter articles and in-depth research reports | |
4. Creating websites, applications, and tools | |
5. Using programming to solve various problems beyond development | |
6. Various tasks that can be accomplished using computers and the internet |
This file contains 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
from openai_function_call import openai_function | |
import guidance | |
@openai_function | |
def get_weather(location: str, unit: str = 'fahrenheit', date: str = 'today'): | |
""" Get the current weather in a given location and date.""" | |
weather_info = { | |
'location': location, | |
'unit': unit, | |
'temperature': '60' if unit == 'fahrenheit' else '15', |
This file contains 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
from pydantic import BaseModel, Field | |
from tenacity import retry, stop_after_attempt | |
class FakeGoogleSearch(BaseModel): | |
query: str = Field(..., description='The query of Google search') | |
class FakeGoogleSearchResponse(BaseModel): | |
result: str = Field(..., description='The search result') |
This file contains 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 urllib | |
def main(): | |
base_url = "https://pubmlst.org/bigsdb?db=pubmlst_saureus_seqdef&page=downloadAlleles&locus=" | |
for number in xrange(1, 2940): | |
# i.e. SAUR0001 | |
file = "SAUR" + '{:0>4}'.format(number) | |
filename = file + '.fas' | |
url = base_url + file |
This file contains 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 random | |
class 我: | |
def __init__(本我, 愿意付出的时间): | |
本我.愿意付出的时间 = 愿意付出的时间 | |
本我.武力值 = 5 | |
def 学习(本我, 宝典): | |
本我.武力值 += 1 |
This file contains 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
class Database: | |
def __init__(self): | |
self.database = {} | |
self.msgs = { | |
-1: 'INVALID COMMAND', | |
0: 'OK', | |
1: 'MISSING VALUE', | |
2: 'NOT FOUND', | |
3: 'TRUE', | |
4: 'FALSE', |
This file contains 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
string = ''' | |
<h1>{{customerName}}</h1> | |
<ul> | |
{% for user in users %} | |
<li><a href="{{ user.url }}">{{ user.username }} {{location.CA}}</a></li> | |
{% endfor %} | |
</ul> | |
''' | |
dict_ = { |
This file contains 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
from typing import Sequence | |
class Request: | |
def __init__(self, id): | |
self.id = str(id) | |
def __str__(self): | |
return '[Request: %s]' % self.id | |
class Response: |
This file contains 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
# Helpers start | |
class TreeNode: | |
def __init__(self, val): | |
self.val = val | |
self.left = self.right = None | |
def get_tree(): | |
''' | |
4 | |
/ \ |
NewerOlder