Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 langchain_core.language_models.llms import BaseLLM | |
from poe_api_wrapper import PoeApi | |
from pydantic import BaseModel, Field | |
class PoeApiAdapter(BaseLLM): | |
tokens: dict | |
bot: str | |
auto_proxy: bool = Field(default=False) | |
class Config: |
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
- source: https://www.youtube.com/watch?v=LY7YmuDbuW0&list=PLUl4u3cNGP61O7HkcF7UImpM0cR_L2gSw | |
--- | |
- 2 books that are writing to new real analysis learner: | |
- Proofs: a long-form mathematics textbook https://www.doc88.com/p-21973918406856.html | |
- | |
--- | |
### Learning objectives | |
- 1. By proving the theorems, we practice how to deploy the related definitions and axioms |
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 | |
def print_tree(directory, indent=''): | |
files = os.listdir(directory) | |
files.sort() # Sort files alphabetically | |
for file in files: | |
path = os.path.join(directory, file) | |
if os.path.isfile(path): | |
# Print file name with proper indentation |
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 moviepy.editor as mpy | |
import glob | |
def compress_video(video_path, output_path, video_bitrate="1000k"): | |
clip = mpy.VideoFileClip(video_path) | |
# Compress video | |
clip.write_videofile(output_path, codec='mpeg4', bitrate=video_bitrate) | |
def concatenate_videos(videos_path, output_path): |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 pytube.cli import on_progress | |
from pytube import YouTube | |
import os | |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
def download_with_cut(link, target_folder=None, time_ranges=None): | |
yt = YouTube( | |
link, on_progress_callback=on_progress, use_oauth=True, allow_oauth_cache=True | |
) |
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 pytube.cli import on_progress | |
from pytube import YouTube | |
import os | |
from moviepy.video.io.ffmpeg_tools import ffmpeg_extract_subclip | |
def download(link, target_folder=None): | |
yt = YouTube( | |
link, on_progress_callback=on_progress, use_oauth=True, allow_oauth_cache=True | |
) |
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
""" | |
This script automatically converts the output of GPT-3 to markdown format. | |
Future: convert this script to be a chrome extension. | |
For linux users, they might need to install `xclip` or `xsel` to find clipboard mechanism. | |
`sudo apt-get install xclip`: Install xclip | |
""" |
NewerOlder