This file contains hidden or 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 | |
| # encoding: utf-8 | |
| import numpy as np | |
| def Cp(mylist, usl, lsl): | |
| arr = np.array(mylist) | |
| arr = arr.ravel() | |
| sigma = np.std(arr) | 
  
    
      This file contains hidden or 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 torch | |
| import torch.nn as nn | |
| import numpy as np | |
| import torch.optim as optim | |
| from torch.autograd import Variable | |
| # (1, 0) => target labels 0+2 | |
| # (0, 1) => target labels 1 | |
| # (1, 1) => target labels 3 | |
| train = [] | 
  
    
      This file contains hidden or 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
    
  
  
    
  | """ | |
| Convert YouTube subtitles(vtt) to human readable text. | |
| Download only subtitles from YouTube with youtube-dl: | |
| youtube-dl --skip-download --convert-subs vtt <video_url> | |
| Note that default subtitle format provided by YouTube is ass, which is hard | |
| to process with simple regex. Luckily youtube-dl can convert ass to vtt, which | |
| is easier to process. | 
      
      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 hidden or 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 import PromptTemplate, LLMChain | |
| from langchain.document_loaders import UnstructuredHTMLLoader | |
| from langchain.embeddings import LlamaCppEmbeddings | |
| from langchain.llms import LlamaCpp | |
| from langchain.text_splitter import RecursiveCharacterTextSplitter | |
| from langchain.vectorstores.faiss import FAISS | |
| loader = UnstructuredHTMLLoader("langchain/docs/_build/html/index.html") | |
| embedding = LlamaCppEmbeddings(model_path="path/models/ggml-model-q4_0.bin") | |
| llm = LlamaCpp(model_path="path/models/ggml-model-q4_0.bin") | 
      
      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.
      
    
      
      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 hidden or 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 asyncio | |
| import base64 | |
| import json | |
| import os | |
| import pyaudio | |
| from websockets.asyncio.client import connect | |
| class SimpleGeminiVoice: | |
| def __init__(self): | 
  
    
      This file contains hidden or 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
    
  
  
    
  | Please go to https://github.com/nishuzumi/gemini-teacher | 
OlderNewer