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
| model: | |
| arch: video_llama | |
| model_type: pretrain_vicuna | |
| freeze_vit: True | |
| freeze_qformer: True | |
| max_txt_len: 160 | |
| end_sym: "###" | |
| low_resource: True | |
| frozen_llama_proj: False |
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 os | |
| import time | |
| import cv2 | |
| import hashlib | |
| import numpy as np | |
| from PIL import Image | |
| from absl import logging | |
| import tritonclient.http |
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 python3 | |
| import sys | |
| import rospy | |
| import rostopic | |
| import numpy as np | |
| import message_filters |
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 cv2 | |
| import numpy as np | |
| from collections import deque | |
| # https://github.com/elliottzheng/face-detection | |
| from face_detection import RetinaFace | |
| # https://pyscenedetect.readthedocs.io/projects/Manual/en/latest/api/scene_manager.html#scenemanager-example | |
| from scenedetect import VideoManager | |
| from scenedetect import SceneManager |
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
| # http://index-of.es/Varios-2/Practical%20Python%20AI%20Projects%20Mathemathical%20Models%20of%20Optimization%20Problems%20with%20Google%20OR-Tools.pdf | |
| # coding: utf-8 | |
| """ | |
| Example code for solving the transshipment problem. (pg. 111) | |
| Input is an NxN numpy matrix (referenced here as D) | |
| where row N is the demand and column N is the supply for each location 0 through N-1. | |
| To solve, call the solve_model() function with matrix D as the input. | |
| """ |
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/python3 | |
| from __future__ import absolute_import, print_function | |
| import cv2 | |
| import numpy as np | |
| from time import sleep, time | |
| from collections import deque | |
| from tensorflow.keras.models import Model | |
| from tensorflow.keras.optimizers import RMSprop | |
| from tensorflow.keras.layers import Input, Conv2D, MaxPooling2D, UpSampling2D, ZeroPadding2D |
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 pytube | |
| def yt_download(video_id, video_path): | |
| video_url = 'https://youtu.be/{}'.format(video_id) | |
| youtube = pytube.YouTube(video_url) | |
| video = youtube.streams.first() | |
| video.download(video_path) | |
| print('youtube video {} saved as: \n\n {}{}.mp4'.format(video_id, video_path, video.title)) | |
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 __future__ import print_function | |
| import os | |
| import io | |
| import boto3 | |
| import base64 | |
| import numpy as np | |
| import zipfile | |
| from PIL import Image | |
| from tflite_runtime.interpreter import Interpreter |
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
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import requests | |
| from bs4 import BeautifulSoup as bs | |
| from urllib.parse import urlencode | |
| from pytube import YouTube | |
| qstring = sys.argv[1] | |
| out_dir = sys.argv[2] |