You are ChatGPT, a large language model trained by OpenAI, based on the GPT-4 architecture. Knowledge cutoff: 2023-04 Current date: 2024-02-07
Image input capabilities: Enabled
Hello World |
# From https://github.com/pytube/pytube/issues/2062 | |
import ssl | |
from pytube import YouTube | |
from pytube import request | |
from pytube import extract | |
from pytube.innertube import _default_clients | |
from pytube.exceptions import RegexMatchError | |
_default_clients["ANDROID"]["context"]["client"]["clientVersion"] = "19.08.35" | |
_default_clients["IOS"]["context"]["client"]["clientVersion"] = "19.08.35" |
!pip install set-env-colab-kaggle-dotenv | |
from set_env import set_env | |
set_env("GOOGLE_API_KEY") | |
set_env("WANDB_API_KEY") |
let cred = JSON.parse(Deno.env.get("GOOGLE_APPLICATION_CREDENTIALS")); | |
// Big Query Style | |
export let bq = new BigQuery({ projectId, credentials: cred }); | |
// Vertex Style | |
let vertex_ai = new VertexAI({ project: "kora-id", location: "us-central1", | |
googleAuthOptions: { credentials: cred } }); |
from google.colab import userdata | |
key = userdata.get('MY_APY_KEY') |
import os | |
import sys | |
from contextlib import contextmanager | |
@contextmanager | |
def suppress_stdout(): | |
with open(os.devnull, 'w') as devnull: | |
original_stdout = sys.stdout | |
sys.stdout = devnull | |
try: |
!pip install playwright | |
!playwright install | |
# colab need this for async | |
import nest_asyncio | |
nest_asyncio.apply() | |
# start browser, not to use 'with' context | |
from playwright.async_api import async_playwright | |
playwright = await async_playwright().start() | |
browser = await playwright.chromium.launch() |
# see https://github.com/yifeikong/curl_cffi | |
from curl_cffi import requests |
!pip install claude2 | |
from claude import Claude | |
from fastcore.foundation import patch | |
from curl_cffi import requests | |
cookie = "sessionKey=sk-ant-sid01-4etj_0tI6RJKMbAAA" | |
claude = Claude(cookie) | |
@patch |