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
| Google Chrome as well as Mozilla Firerfox both provide an option to copy download link specifically for cURL. | |
| This option will generate cURL with all required things such as User agent for downloading things from the side. | |
| To get that, | |
| 1. Open the URL in either of the browser. | |
| 2. Open Developer options using Ctrl+Shift+I. | |
| 3. Go to Network tab. | |
| 4. Now click on download. Saving file isn't required. We only need the network activity while browser requests the file from the server. | |
| 5. A new entry will appear which would look like "download.aspx?...". | |
| 6. Right click on that and Copy → Copy as cURL. |
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 open3d as o3d | |
| import numpy as np | |
| def create_gif_from_folder(image_list, output_path, duration=20, loop=0): | |
| from PIL import Image | |
| images = [] |
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 argparse import ArgumentParser | |
| from dataclasses import dataclass, fields, Field, field | |
| class col: | |
| HEADER = "\033[95m" | |
| OKBLUE = "\033[94m" | |
| OKCYAN = "\033[96m" | |
| OKGREEN = "\033[92m" | |
| OKYELLOW = "\33[33m" | |
| WARNING = "\033[93m" |
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 sys | |
| import time | |
| def pretty_time(seconds): | |
| seconds = int(round(seconds)) | |
| s = seconds % 60 | |
| m = (seconds // 60) % 60 | |
| h = (seconds // 3600) | |
| return '%d:%02d:%02d' % (h, m, s) |
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
| """ | |
| Simple script to convert ply to obj models | |
| """ | |
| import pymeshlab | |
| import os | |
| from argparse import ArgumentParser | |
| def parse_args(): | |
| parser = ArgumentParser() | |
| parser.add_argument('input_dir', help='Path to ycb dataset models directory containing .ply files and .png textures.') |
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 | |
| from os.path import dirname, abspath, join | |
| import sys | |
| import zmq | |
| import json | |
| import time | |
| # Find code directory relative to our directory | |
| THIS_DIR = dirname(__file__) |
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 ContinuousSet | |
| def bisection_method(f, value, interval, eps=1e-12): | |
| """ Finds the root of f(psi) - value | |
| Args: | |
| f ([function]): f(psi) | |
| value ([float]): value = f(psi0) | |
| interval ([ContinuousSet]): interval of psi to look into | |
| Returns: |
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
| # # Sets | |
| # Provides logic for different continuous set operators. | |
| # 1. Add continuous intervals of the form [2, 12.2] or (3, 6] in the set | |
| # 2. Union Operator | |
| # 3. Intersection Operator | |
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
| { | |
| '<s>': 0, | |
| '</s>': 0, | |
| '<unk>': 1, | |
| 'THE': 2, | |
| 'AND': 3, | |
| 'OF': 4, | |
| 'TO': 5, | |
| 'A': 6, | |
| 'IN': 7, |
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
| #version: 0.2 | |
| T H | |
| TH E</w> | |
| A N | |
| I N | |
| E D</w> | |
| E R | |
| AN D</w> | |
| O U | |
| E R</w> |
NewerOlder