repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/contact_lists.py
hubspot3/contact_lists.py
""" hubspot contact lists api """ from hubspot3.base import BaseClient from hubspot3.utils import get_log CONTACT_LISTS_API_VERSION = "1" class ContactListsClient(BaseClient): """ The hubspot3 Contact Lists client uses the _make_request method to call the API for data. It returns a python object transl...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/companies.py
hubspot3/companies.py
""" hubspot companies api """ from typing import List, Dict, Optional, Union from hubspot3.base import BaseClient from hubspot3.utils import prettify, get_log COMPANIES_API_VERSION = "2" class CompaniesClient(BaseClient): """ hubspot3 Companies client :see: https://developers.hubspot.com/docs/methods/c...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/property_groups.py
hubspot3/property_groups.py
""" hubspot property groups api """ from hubspot3.base import BaseClient from hubspot3.globals import ( OBJECT_TYPE_COMPANIES, OBJECT_TYPE_CONTACTS, OBJECT_TYPE_DEALS, OBJECT_TYPE_LINE_ITEMS, OBJECT_TYPE_PRODUCTS, ) from hubspot3.utils import get_log PROPERTY_GROUPS_API_VERSION = { OBJECT_TYPE...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/base.py
hubspot3/base.py
""" base hubspot client class """ import http.client import json import logging import time import traceback import urllib.request import urllib.parse import urllib.error import zlib from typing import Callable, Dict, List, Optional, Union from hubspot3 import utils from hubspot3.utils import force_utf8, uglify_hapike...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/globals.py
hubspot3/globals.py
""" globals file for hubspot3 """ __version__ = "3.2.56" BASE_URL = "https://api.hubapi.com" OBJECT_TYPE_COMPANIES = "companies" OBJECT_TYPE_CONTACTS = "contacts" OBJECT_TYPE_DEALS = "deals" OBJECT_TYPE_PRODUCTS = "products" OBJECT_TYPE_LINE_ITEMS = "line_items" DATA_TYPE_BOOL = "bool" DATA_TYPE_DATETIME = "datet...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/deals.py
hubspot3/deals.py
""" hubspot deals api """ import urllib.parse from typing import Dict, Optional, Union from hubspot3.base import BaseClient from hubspot3.utils import get_log, prettify DEALS_API_VERSION = "1" class DealsClient(BaseClient): """ The hubspot3 Deals client uses the _make_request method to call the API for...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/crm_pipelines.py
hubspot3/crm_pipelines.py
""" hubspot crm_pipelines api """ from hubspot3.base import BaseClient from hubspot3.utils import get_log CRM_PIPELINES_API_VERSION = "1" class PipelinesClient(BaseClient): """ The hubspot3 Pipelines client uses the _make_request method to call the API for data. It returns a python object translated f...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/forms.py
hubspot3/forms.py
""" hubspot forms api """ import json from urllib.parse import urlencode from http.client import HTTPResponse from typing import Dict, Optional from hubspot3.base import BaseClient from hubspot3.error import HubspotNotFound, HubspotServerError FORMS_API_VERSION = 2 class FormSubmissionClient(BaseClient): """al...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/workflows.py
hubspot3/workflows.py
""" hubspot workflows api """ from typing import Optional from hubspot3.base import BaseClient from hubspot3.utils import get_log WORKFLOWS_API_VERSION = "3" class WorkflowsClient(BaseClient): """ The hubspot3 Workflows client uses the _make_request method to call the API for data. It returns a python...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/tickets.py
hubspot3/tickets.py
""" hubspot tickets api """ from typing import Dict, List, Optional from hubspot3.base import BaseClient from hubspot3.utils import get_log TICKETS_API_VERSION = "1" class TicketsClient(BaseClient): """ hubspot3 Tickets client :see: https://developers.hubspot.com/docs/methods/tickets/tickets-overview ...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_properties.py
hubspot3/test/test_properties.py
""" testing hubspot3.properties """ import json from unittest.mock import Mock from typing import Dict import pytest from hubspot3 import properties from hubspot3.globals import ( OBJECT_TYPE_CONTACTS, OBJECT_TYPE_COMPANIES, OBJECT_TYPE_DEALS, OBJECT_TYPE_LINE_ITEMS, OBJECT_TYPE_PRODUCTS, DAT...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_deals.py
hubspot3/test/test_deals.py
""" testing hubspot3.deals """ import pytest from hubspot3.deals import DealsClient from hubspot3.error import HubspotNotFound, HubspotBadRequest from hubspot3.test.globals import TEST_KEY DEALS = DealsClient(api_key=TEST_KEY) DEFAULT_DEAL_PROPERTIES = ["dealname", "createdate"] def _is_deal(deal: dict) -> bool: ...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_tickets.py
hubspot3/test/test_tickets.py
""" testing hubspot3.tickets """ import pytest from hubspot3.tickets import TicketsClient from hubspot3.test.globals import TEST_KEY TICKETS = TicketsClient(api_key=TEST_KEY) # since we need to have an id to submit and to attempt to get a ticket, # we need to be hacky here and fetch one upon loading this file. BAS...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_forms.py
hubspot3/test/test_forms.py
""" testing hubspot3.deals """ import pytest from hubspot3.forms import FormsClient, FormSubmissionClient from hubspot3.error import HubspotNotFound from hubspot3.test.globals import TEST_KEY FORMS = FormsClient(api_key=TEST_KEY) FORM_SUBMISSION = FormSubmissionClient(api_key=TEST_KEY) # since we need to have an i...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_main.py
hubspot3/test/test_main.py
""" Tests for the Hubspot3 main module. """ import io import pytest from contextlib import contextmanager from json import JSONDecodeError from unittest.mock import Mock, mock_open, patch from hubspot3.__main__ import ( ClientCLIWrapper, get_config_from_file, Hubspot3CLIWrapper, split_args, ) from hubs...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_email_subscription.py
hubspot3/test/test_email_subscription.py
import json from unittest.mock import Mock import pytest from hubspot3.email_subscription import EmailSubscriptionClient @pytest.fixture def email_subscription_client(mock_connection): client = EmailSubscriptionClient(disable_auth=True) client.options["connection_type"] = Mock(return_value=mock_connection) ...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/conftest.py
hubspot3/test/conftest.py
""" configure pytest """ import json import pytest from http.client import HTTPSConnection from unittest.mock import MagicMock, Mock from urllib.parse import urlencode @pytest.fixture def mock_connection(): """ A mock connection object that can be used in place of HTTP(S)Connection objects to avoid to ac...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_oauth2.py
hubspot3/test/test_oauth2.py
import json from urllib.parse import urlencode from unittest.mock import Mock, patch import pytest from hubspot3.oauth2 import OAuth2Client @pytest.fixture def mock_urlencode(): """ A mocked `urlencode` function that still calls the original function, but additionally stores the last result in the `last...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_contacts.py
hubspot3/test/test_contacts.py
""" testing hubspot3.contacts """ import json import warnings from unittest.mock import Mock, patch import pytest from hubspot3 import contacts @pytest.fixture def contacts_client(mock_connection): client = contacts.ContactsClient(disable_auth=True) client.options["connection_type"] = Mock(return_value=moc...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/__init__.py
hubspot3/test/__init__.py
""" tests for hubspot3 """
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_lines.py
hubspot3/test/test_lines.py
"""Tests for the line items client.""" import json from unittest.mock import Mock, patch import pytest from hubspot3 import lines @pytest.fixture def lines_client(mock_connection): client = lines.LinesClient(disable_auth=True) client.options["connection_type"] = Mock(return_value=mock_connection) return...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/globals.py
hubspot3/test/globals.py
""" hubspot3 testing globals """ TEST_KEY = "f3268339-9593-462b-8cba-30b4823eb2b2"
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_products.py
hubspot3/test/test_products.py
""" testing hubspot3.products """ import json from unittest.mock import Mock import pytest from hubspot3 import products @pytest.fixture def products_client(mock_connection) -> products.ProductsClient: client = products.ProductsClient(disable_auth=True) client.options["connection_type"] = Mock(return_value...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_init.py
hubspot3/test/test_init.py
""" basic testing on the main Hubspot3 client """ import pytest from hubspot3 import Hubspot3, Hubspot3UsageLimits from hubspot3.error import HubspotBadConfig, HubspotNoConfig from hubspot3.base import BaseClient from hubspot3.blog import BlogClient from hubspot3.broadcast import BroadcastClient from hubspot3.companie...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/hubspot3/test/test_ecommerce_bridge.py
hubspot3/test/test_ecommerce_bridge.py
import json import pytest from unittest.mock import Mock, patch from hubspot3 import ecommerce_bridge from hubspot3.error import HubspotBadConfig DUMMY_PROPERTY_MAPPINGS = { "CONTACT": { "properties": [ { "externalPropertyName": "customer_email", "hubspotPropert...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
jpetrucciani/hubspot3
https://github.com/jpetrucciani/hubspot3/blob/37a12eea9e08fe8effa60c8f117b5bf9416b00a4/docs/conf.py
docs/conf.py
# -*- coding: utf-8 -*- # # Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup ------------------------------------------------------------...
python
MIT
37a12eea9e08fe8effa60c8f117b5bf9416b00a4
2026-01-05T07:09:09.017152Z
false
Tedixx/dmarc-subdomains
https://github.com/Tedixx/dmarc-subdomains/blob/0e23f8fdb6554407328ae358261ced91db90e3f2/dmarc-subdomains.py
dmarc-subdomains.py
## By @tedixh1 import argparse import asyncio from playwright.async_api import async_playwright from bs4 import BeautifulSoup async def fetch_dmarc_domains(domain): """Fetch domains sharing the same DMARC record.""" async with async_playwright() as p: browser = await p.chromium.launch() page =...
python
MIT
0e23f8fdb6554407328ae358261ced91db90e3f2
2026-01-05T07:09:09.829190Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/train_face.py
train_face.py
# training TS-Net for FaceForensics dataset import argparse import torch from torch.utils import data import numpy as np import cv2 import torch.backends.cudnn as cudnn import os import os.path as osp import timeit import math from PIL import Image from utils.misc import Logger from model.TSNet import TSNet from datas...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/quick_start1.py
quick_start1.py
# this code will show a toy example about how to train our model import torch from model.TSNet import TSNet import os # setting GPU os.environ["CUDA_VISIBLE_DEVICES"] = "6" # our model requires landmark/keypoint labels label_nc = 2 bs = 4 # source, i.e., subject videos # here we make some fake data for illustration ...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/train_pose.py
train_pose.py
# training TS-Net for Youtube-dance dataset import argparse import torch from torch.utils import data import numpy as np import cv2 import torch.backends.cudnn as cudnn import os import os.path as osp import timeit import math from PIL import Image from utils.misc import Logger from model.TSNet_pose import TSNet from ...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/model/TSNet_pose.py
model/TSNet_pose.py
import torch import torch.nn as nn from model import networks from torch.optim import lr_scheduler from collections import OrderedDict import numpy as np from torchvision import models import torch.nn.functional as F import random # Define a resnet block class ResnetBlock(nn.Module): def __init__(self, dim, paddi...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/model/TSNet.py
model/TSNet.py
import torch import torch.nn as nn from model import networks from collections import OrderedDict from torchvision import models import torch.nn.functional as F # Define a resnet block class ResnetBlock(nn.Module): def __init__(self, dim, padding_type, norm_layer, activation=nn.ReLU(True), use_dropout=False): ...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/model/__init__.py
model/__init__.py
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/model/networks.py
model/networks.py
import torch import torch.nn as nn from torch.nn import init import functools from torch.optim import lr_scheduler ############################################################################### # Helper Functions ############################################################################### class Identity(nn.Modu...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/utils/keypoint2img.py
utils/keypoint2img.py
# Copyright (c) 2019, NVIDIA Corporation. All rights reserved. # # This work is made available # under the Nvidia Source Code License (1-way Commercial). # To view a copy of this license, visit # https://nvlabs.github.io/few-shot-vid2vid/License.txt import os.path from PIL import Image import numpy as np import json im...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/utils/misc.py
utils/misc.py
import numpy as np import torch import sys import matplotlib.pyplot as plt from matplotlib.collections import LineCollection import os import glob global_pose_color_list = [ [153, 0, 153], [153, 0, 102], [102, 0, 153], [51, 0, 153], # head [153, 0, 51], [153, 0, 0], # body [153, 51, 0], [153, 102, 0], [...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/utils/__init__.py
utils/__init__.py
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/utils/keypoint2img_posenorm.py
utils/keypoint2img_posenorm.py
import numpy as np import json import random from scipy.optimize import curve_fit import warnings import math from copy import deepcopy # Read json file and returns the drawn image. def read_keypoints_posenorm(opt, json_input, size, basic_point_only=False, remove_face_labels=False, ppl_idx...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/dataset/dataset_video_pose.py
dataset/dataset_video_pose.py
import os import torch.utils.data as data from PIL import Image, ImageOps import numpy as np import random from utils.keypoint2img import read_keypoints from utils.keypoint2img_posenorm import read_keypoints_posenorm, read_keypoints_posenorm_smooth, \ define_edge_lists, read_pts_posenorm import argparse import torc...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/dataset/dataset_video_face.py
dataset/dataset_video_face.py
# build a framework similar to vid2vid # consistently use previous frame to synthesis current frame import warnings warnings.filterwarnings("ignore") from PIL import Image import numpy as np import random import torch.utils.data as data from utils.keypoint2img import interp_points, draw_edge import os import cv2 from ...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/dataset/smooth_pose_keypoint.py
dataset/smooth_pose_keypoint.py
# this file is used to smooth pose keypoints import os import json_tricks as json import numpy as np # Use only the valid keypoints in the list. def extract_valid_keypoints(pts, edge_lists): pose_edge_list, _, hand_edge_list, _, face_list = edge_lists p = pts.shape[0] thre = 0.1 if p == 70 else 0.01 o...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/dataset/__init__.py
dataset/__init__.py
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/demo/demo_face.py
demo/demo_face.py
# testing demo for face dataset import sys import imageio sys.path.append("/home/hfn5052/code/WACV23_TSNet") import argparse import torch from torch.utils import data import numpy as np import cv2 import torch.backends.cudnn as cudnn import os import time from PIL import Image from utils.misc import Logger from model...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
nihaomiao/WACV23_TSNet
https://github.com/nihaomiao/WACV23_TSNet/blob/93e87e1b7a85a2fed883a0507dda737e3ade7997/demo/demo_pose.py
demo/demo_pose.py
# testing demo for dace dataset import sys sys.path.append("/home/hfn5052/code/WACV23_TSNet") import argparse import torch from torch.utils import data import numpy as np import cv2 import torch.backends.cudnn as cudnn import os import time from PIL import Image from utils.misc import Logger from model.TSNet_pose impor...
python
MIT
93e87e1b7a85a2fed883a0507dda737e3ade7997
2026-01-05T07:08:52.229761Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/run.py
run.py
""" Name : run.py.py Author : Hanat Time : 2019-09-18 11:55 Desc: """ import service if __name__ == '__main__': service.start()
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/constant.py
constant.py
from utils.random_tools import Random class Const: def __init__(self): self.COLOR_TRANSPARENT = (0, 0, 0, 0) self.COLOR_HALF_TRANSPARENT = (0, 0, 0, 55) self.COLOR_RED = (255, 0, 0, 255) self.COLOR_GREEN = (0, 255, 0, 255) self.COLOR_BLUE = (0, 0, 255, 255) self.CO...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/__init__.py
service/__init__.py
from ruamel import yaml from service.provider.TextImgProvider import TextImgProvider from service.provider.BackgroundImgProvider import BackgroundImgProvider from service.provider.TextProvider import TextProvider from service.provider.SmoothAreaProvider import SmoothAreaProvider from service.provider.LayoutProvider im...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/base.py
service/base.py
from lxml.etree import Element, SubElement, tostring from utils import log import shutil import json import os def get_pic_dir(out_put_dir): img_dir = os.path.join(out_put_dir, "img") pic_dir = os.path.join(img_dir, "pic") return pic_dir def get_fragment_dir(out_put_dir): img_dir = os.path.join(out_...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/LayoutProvider.py
service/provider/LayoutProvider.py
from core.layout import Layout import numpy as np from PIL import Image class LayoutProvider: def __init__(self, out_put_dir, rotate_angle_range, strategy_list): self.out_put_dir = out_put_dir self.rotate_angle_range = eval(rotate_angle_range) if type(rotate_angle_range) is str else rotate_angle_r...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/TextImgProvider.py
service/provider/TextImgProvider.py
import os import time from typing import List from constant import const from utils.decorator import singleton from utils.random_tools import Random from core.element.CharImg import CharImg from core.element.TextImg import create, gen_batch_char_obj, TYPE_ORIENTATION_HORIZONTAL, TYPE_ORIENTATION_VERTICAL, \ TYPE_AL...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/SmoothAreaProvider.py
service/provider/SmoothAreaProvider.py
""" Name : test.py Author : Hanat Time : 2019-10-16 15:33 Desc: """ # cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/data/User/hanat/opencv_install -D WITH_CUDA=ON -D ENABLE_FAST_MATH=1 -D CUDA_FAST_MATH=1 -D WITH_CUBLAS=1 -D WITH_OPENMP=1 .. import cv2 import numpy as np from libs import nms from lib...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/__init__.py
service/provider/__init__.py
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/BackgroundImgProvider.py
service/provider/BackgroundImgProvider.py
""" Name : BackgroundImgProvider.py Author : Hanat Time : 2019-09-19 16:50 Desc: """ import os import cv2 import math import numpy as np from utils.random_tools import Random from PIL import Image class DirImageGen(object): def __init__(self, image_list: list, len_range=(2, 15)): """ :param ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/service/provider/TextProvider.py
service/provider/TextProvider.py
""" Name : TextProvider.py Author : Hanat Time : 2019-09-18 13:53 Desc: """ import random from utils.random_tools import Random class RandomCorpusGen(object): def __init__(self, character_seq: list, len_range=(2, 15)): """ :param character_seq: :param batch_size: """ ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/font_tool.py
utils/font_tool.py
from fontTools.fontBuilder import TTFont fonts = {} def check(char, font_path): if font_path in fonts: font = fonts.get(font_path) else: font = TTFont(font_path) fonts[font_path] = font utf8_char = char.encode("unicode_escape").decode('utf-8') if utf8_char.startswith('\\u'): ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/log.py
utils/log.py
from logging import * basicConfig(level=INFO)
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/random_tools.py
utils/random_tools.py
import random import time class Random(object): @staticmethod def random_choice(prob_list: list, seed=None): """ random choice a probability range :param prob_list: :param seed: :return: """ prob_sum = sum(prob_list) prob_range_list = list() ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/time_util.py
utils/time_util.py
from datetime import datetime def today(): time = datetime.now() return time.strftime("%Y%m%d") def timestamp(): time = datetime.now() return time.strftime("%Y%m%d%H%M%S%f")
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/__init__.py
utils/__init__.py
""" Name : __init__.py.py Author : Hanat Time : 2019-09-18 11:58 Desc: """
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/utils/decorator.py
utils/decorator.py
import time from utils import log def singleton(cls): """ 单例模式装饰器 使用方式: @Singleton class A(object): pass :param cls: :return: """ _instance = {} def _singleton(*args, **kwargs): if cls not in _instance: _instance[cls] = cls(*args, **kwa...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/__init__.py
core/__init__.py
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/element/TextImg.py
core/element/TextImg.py
import cv2 from typing import List from core.element.BaseImg import BaseImg from core.element.CharImg import CharImg from PIL import Image, ImageFont, ImageDraw import os import numpy as np import json from utils import time_util as tu import math import traceback from utils import log TYPE_ORIENTATION_HORIZONTAL = 0 ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/element/BaseImg.py
core/element/BaseImg.py
class BaseImg: pass
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/element/CharImg.py
core/element/CharImg.py
import json from core.element.BaseImg import BaseImg class CharImg(BaseImg): """ 字符图片对象 """ def __init__(self, char, font_size, color, box=(0, 0, 0, 0), size=(0, 0), border_width=0, border_color=(0, 0, 0, 0)): self.char = char self.font_size = font_size self.c...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/element/__init__.py
core/element/__init__.py
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/__init__.py
core/layout/__init__.py
from PIL import Image, ImageDraw from constant import const from utils.decorator import count_time from utils import log from utils.random_tools import Random from core.layout.strategy import Strategy from core.element.TextImg import TYPE_ORIENTATION_HORIZONTAL, \ TYPE_ORIENTATION_VERTICAL, TextImg import os import...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/VerticalFlowStrategy.py
core/layout/strategy/VerticalFlowStrategy.py
from core.layout.strategy import Strategy class VerticalFlowStrategy(Strategy): """ 生成一个竖直流式排布的文本贴图布局 """ def logic(self, block_group, next_block) -> bool: init_x = block_group.group_box[0] init_y = block_group.group_box[1] next_x = init_x next_y = init_y max_...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/RandomPasteStrategy.py
core/layout/strategy/RandomPasteStrategy.py
from core.layout.strategy import Strategy from utils.random_tools import Random class RandomPasteStrategy(Strategy): """ 随机粘贴策略 """ # 随机种子必须设置为空 否则每次都会贴在同一区域,导致重叠而帖失败 seed = None def logic(self, block_group, next_block) -> bool: gbl = block_group.group_box[0] gbt = block_group...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/strategy_controller.py
core/layout/strategy/strategy_controller.py
from core.layout.strategy import Strategy from utils.random_tools import Random from core.layout.strategy.HorizontalStrategy import HorizontalStrategy from core.layout.strategy.VerticalStrategy import VerticalStrategy from core.layout.strategy.HorizontalFlowStrategy import HorizontalFlowStrategy from core.layout.strate...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/VerticalStrategy.py
core/layout/strategy/VerticalStrategy.py
from core.layout.strategy import Strategy class VerticalStrategy(Strategy): """ 只生成一个竖直排布的文本贴图布局 """ def logic(self, block_group, next_block) -> bool: init_x = block_group.group_box[0] init_y = block_group.group_box[1] next_x = init_x next_y = init_y for block...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/HorizontalStrategy.py
core/layout/strategy/HorizontalStrategy.py
from core.layout.strategy import Strategy class HorizontalStrategy(Strategy): """ 只生成一个水平排布的文本贴图布局 """ def logic(self, block_group, next_block) -> bool: init_x = block_group.group_box[0] init_y = block_group.group_box[1] next_x = init_x next_y = init_y for blo...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/HorizontalFlowStrategy.py
core/layout/strategy/HorizontalFlowStrategy.py
from core.layout.strategy import Strategy class HorizontalFlowStrategy(Strategy): """ 生成一个水平流式排布的文本贴图布局 [*******] [************] [***] [*********] """ def logic(self, block_group, next_block) -> bool: init_x = block_group.group_box[0] init_y = block_group.group_box[1] ...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/__init__.py
core/layout/strategy/__init__.py
def check_two_box_is_overlap(a_box, b_box): """ 检查两个区域是否有交集 :param a_box: :param b_box: :return: """ in_h = min(a_box[2], b_box[2]) - max(a_box[0], b_box[0]) in_w = min(a_box[3], b_box[3]) - max(a_box[1], b_box[1]) inter = 0 if in_h < 0 or in_w < 0 else in_h * in_w return inter >...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/core/layout/strategy/CustomizationStrategy1.py
core/layout/strategy/CustomizationStrategy1.py
from core.layout.strategy import Strategy from core.layout.strategy import is_horizontal, is_vertical class CustomizationStrategy1(Strategy): """ 定制策略1: 「*| [********] |*」 [********] 左边一列竖直排列 右边一列水平排列 """ def logic(self, block_group, next_block) -> bool: init_x = block_group.gro...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/libs/__init__.py
libs/__init__.py
""" Name : __init__.py Author : Hanat Contect : hanati@tezign.com Time : 2019-11-08 11:00 Desc: """ def select_by_kp(image_integral, anchors):pass from libs.select_by_kp import select_by_kp def nms(dets, thresh):pass from libs.select_by_kp import nms def box_connect(imageIntegral, anchors_in, h_gap, width, he...
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
BboyHanat/TextGenerator
https://github.com/BboyHanat/TextGenerator/blob/7e4ec737fbf4f6031d0c28a2c0f6cff662792a76/libs/cxx/setup.py
libs/cxx/setup.py
from distutils.core import setup import numpy as np from Cython.Build import cythonize numpy_include = np.get_include() setup(ext_modules=cythonize("select_by_kp.pyx"), include_dirs=[numpy_include])
python
MIT
7e4ec737fbf4f6031d0c28a2c0f6cff662792a76
2026-01-05T07:08:50.957525Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/scripts/pretty_print_json.py
leaderboard/scripts/pretty_print_json.py
# !/usr/bin/env python # Copyright (c) 2020 Intel Corporation. # authors: German Ros (german.ros@intel.com) # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Create a human readable version of the scores provided by the leaderboard. """ from __f...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/scripts/set_new_scenarios.py
leaderboard/scripts/set_new_scenarios.py
import argparse import json import math from argparse import RawTextHelpFormatter from leaderboard.utils.checkpoint_tools import fetch_dict import carla import os SCENARIO_COLOR = { "Scenario1": [carla.Color(255, 0, 0), "Red"], # Red "Scenario2": [carla.Color(0, 255, 0), "Green"], # Green "Sc...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/leaderboard_evaluator.py
leaderboard/leaderboard/leaderboard_evaluator.py
#!/usr/bin/env python # Copyright (c) 2018-2019 Intel Corporation. # authors: German Ros (german.ros@intel.com), Felipe Codevilla (felipe.alcm@gmail.com) # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ CARLA Challenge Evaluator Routes Provisio...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/__init__.py
leaderboard/leaderboard/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/envs/sensor_interface.py
leaderboard/leaderboard/envs/sensor_interface.py
import copy import logging import numpy as np import os import time from threading import Thread from queue import Queue from queue import Empty import carla from srunner.scenariomanager.carla_data_provider import CarlaDataProvider from srunner.scenariomanager.timer import GameTime def threaded(fn): def wrapper...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/envs/__init__.py
leaderboard/leaderboard/envs/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/master_scenario.py
leaderboard/leaderboard/scenarios/master_scenario.py
#!/usr/bin/env python # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Basic CARLA Autonomous Driving training scenario """ import py_trees from srunner.scenarioconfigs.route_scenario_configuration import RouteConfiguration from srunner.scenar...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/route_scenario.py
leaderboard/leaderboard/scenarios/route_scenario.py
#!/usr/bin/env python # Copyright (c) 2019 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides Challenge routes as standalone scenarios """ from __future__ import print_function import math import xml.etree...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/background_activity.py
leaderboard/leaderboard/scenarios/background_activity.py
#!/usr/bin/env python # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Scenario spawning elements to make the town dynamic and interesting """ import carla from srunner.scenariomanager.carla_data_provider import CarlaDataProvider from srunner...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/__init__.py
leaderboard/leaderboard/scenarios/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/scenario_manager.py
leaderboard/leaderboard/scenarios/scenario_manager.py
#!/usr/bin/env python # Copyright (c) 2018-2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides the ScenarioManager implementations. It must not be modified and is for reference only! """ from __future__...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/scenarioatomics/atomic_criteria.py
leaderboard/leaderboard/scenarios/scenarioatomics/atomic_criteria.py
#!/usr/bin/env python # Copyright (c) 2018-2020 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides additional atomic evaluation criteria required to analyze if a scenario was completed successfully or failed...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/scenarios/scenarioatomics/__init__.py
leaderboard/leaderboard/scenarios/scenarioatomics/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/npc_agent.py
leaderboard/leaderboard/autoagents/npc_agent.py
#!/usr/bin/env python # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides an NPC agent to control the ego vehicle """ from __future__ import print_function import carla from agents.navigation.basic_agent import BasicAgent from...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/agent_wrapper.py
leaderboard/leaderboard/autoagents/agent_wrapper.py
#!/usr/bin/env python # Copyright (c) 2019 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Wrapper for autonomous agents required for tracking and checking of used sensors """ from __future__ import print_function import mat...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/ros_agent.py
leaderboard/leaderboard/autoagents/ros_agent.py
#!/usr/bin/env python # # Copyright (c) 2019 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. # """ This module provides a ROS autonomous agent interface to control the ego vehicle via a ROS stack """ import math import os import ...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/human_agent.py
leaderboard/leaderboard/autoagents/human_agent.py
#!/usr/bin/env python # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides a human agent to control the ego vehicle via keyboard """ import time import json from threading import Thread import cv2 import numpy as np try: im...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/__init__.py
leaderboard/leaderboard/autoagents/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/dummy_agent.py
leaderboard/leaderboard/autoagents/dummy_agent.py
#!/usr/bin/env python # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides a dummy agent to control the ego vehicle """ from __future__ import print_function import carla from leaderboard.autoagents.autonomous_agent import Aut...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/autoagents/autonomous_agent.py
leaderboard/leaderboard/autoagents/autonomous_agent.py
#!/usr/bin/env python # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module provides the base class for all autonomous agents """ from __future__ import print_function from enum import Enum import carla from srunner.scenariomanager.time...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/utils/checkpoint_tools.py
leaderboard/leaderboard/utils/checkpoint_tools.py
import json try: import simplejson as json except ImportError: import json import requests import os.path def autodetect_proxy(): proxies = {} proxy_https = os.getenv('HTTPS_PROXY', os.getenv('https_proxy', None)) proxy_http = os.getenv('HTTP_PROXY', os.getenv('http_proxy', None)) if proxy_h...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/utils/route_manipulation.py
leaderboard/leaderboard/utils/route_manipulation.py
#!/usr/bin/env python # Copyright (c) 2018-2019 Intel Labs. # authors: German Ros (german.ros@intel.com), Felipe Codevilla (felipe.alcm@gmail.com) # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ Module to manipulate the routes, by making then m...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/utils/__init__.py
leaderboard/leaderboard/utils/__init__.py
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false
tulerfeng/PlanKD
https://github.com/tulerfeng/PlanKD/blob/7b6f542ad2b173f20d8baa0f78f83f652065d5ff/leaderboard/leaderboard/utils/result_writer.py
leaderboard/leaderboard/utils/result_writer.py
#!/usr/bin/env python # Copyright (c) 2018-2019 Intel Corporation # # This work is licensed under the terms of the MIT license. # For a copy, see <https://opensource.org/licenses/MIT>. """ This module contains the result gatherer and write for CARLA scenarios. It shall be used from the ScenarioManager only. """ from...
python
Apache-2.0
7b6f542ad2b173f20d8baa0f78f83f652065d5ff
2026-01-05T07:09:10.481895Z
false