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
chat_template="{%- if tools %}\n {{- '<|im_start|>system\\n' }}\n {%- if messages[0]['role'] == 'system' %}\n {{- messages[0]['content'] }}\n {%- else %}\n {{- '' }}\n {%- endif %}\n {{- \"\\n\\n# Tools\\n\\nYou may call one or more functions to assist with the user query.\\n\\nYou are provided with function signatures within <tools></tools> XML tags:\\n<tools>\" }}\n {%- for tool in tools %}\n {{- \"\\n\" }}\n {{- tool | tojson }}\n {%- endfor %}\n {{- \"\\n</tools>\\n\\nFor each function call, return a json object with function name and arguments within <tool_call></tool_call> XML tags:\\n<tool_call>\\n{\\\"name\\\": <function-name>, \\\"arguments\\\": <args-json-object>}\\n</tool_call><|im_end|>\\n\" }}\n{%- else %}\n {%- if messages[0]['role'] == 'system' %}\n {{- '<|im_start|>system\\n' + messages[0]['content'] + '<|im_end|>\\n' }}\n {%- endif %}\n{%- endif %}\n{%- for message in messages %}\n {%- if (message.role == \"user\") or (message. |
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
diff --git a/astroid/nodes/node_classes.py b/astroid/nodes/node_classes.py | |
index c1c7af36..6d1aa5d7 100644 | |
--- a/astroid/nodes/node_classes.py | |
+++ b/astroid/nodes/node_classes.py | |
@@ -4692,14 +4692,18 @@ class FormattedValue(NodeNG): | |
yield util.Uninferable | |
uninferable_already_generated = True | |
continue | |
- formatted = format(value.value, format_spec.value) | |
- yield Const( |
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 os | |
import requests | |
import json | |
from pyperclip import copy | |
debug = 0 | |
HOST_URL = 'https://default-host.com' | |
def convert_to_openapi_2(spec): | |
global debug | |
# Initialize the OpenAPI 2.0 specification | |
openapi2_spec = { |
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 io | |
import pyautogui | |
from time import sleep | |
import win32clipboard | |
from PIL import ImageGrab | |
import win32gui | |
toplist, winlist = [], [] |
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
print(34) | |
print(34) | |
import requests | |
from threading import Thread | |
from bs4 import BeautifulSoup | |
from pyperclip import copy | |
headers = { | |
"User-Agent": "Mozilla/5.0 (Windows NT 10.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36", | |
} |
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 ccxt | |
from datetime import datetime | |
from pprint import pprint | |
connection = ccxt.gateio() | |
pair = 'FITFI/USDT' | |
timestamp = int(datetime.strptime( | |
"2022-04-26 10:30:00+00:00", "%Y-%m-%d %H:%M:%S%z").timestamp()) | |
timeframe = '1m' | |
timeframe = '10s' |
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 ccxt | |
from datetime import datetime | |
from pprint import pprint | |
connection = ccxt.gateio() | |
pair = 'FITFI/USDT' | |
timestamp = int(datetime.strptime( | |
"2022-04-26 10:30:00+00:00", "%Y-%m-%d %H:%M:%S%z").timestamp()) | |
timeframe = '1m' | |
timeframe = '10s' |
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
#!/usr/bin/env python | |
import os | |
import sys | |
import dotenv | |
dotenv.load_dotenv() | |
TOKEN = os.getenv("BOT_TOKEN") | |
if TOKEN is None: |
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 csv | |
import random | |
from telethon import TelegramClient, events, sync | |
from telethon.tl.types import InputPhoneContact | |
from telethon import functions, types | |
api_id = 210829 | |
api_hash = '..' | |
client = TelegramClient('SmartManoj2', api_id, api_hash) | |
with open('contacts.csv', 'r') as 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 os | |
from telethon import TelegramClient, events | |
from telethon.tl.types import InputPhoneContact | |
from telethon import functions, types | |
from config import * | |
import random | |
from tthon import * | |
sn = 'Temp' |
NewerOlder