text
stringlengths
1
927k
# Copyright (c) James Percent, Byron Galbraith and Unlock contributors. # All rights reserved. # Redistribution and use in source and binary forms, with or without modification, # are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notic...
# Copyright (c) 2020 Tigera, Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
def ant_map_tuple_conversion_hook(obj) : modified_obj = {} for key in obj : if key in ["hills", "walls"] : val = [tuple(l) for l in obj[key]] modified_obj[key] = val else : modified_obj[key] = obj[key] return modified_obj
# -*- coding: utf-8 -*- # Copyright (C) 2012, Almar Klein # # Visvis is distributed under the terms of the (new) BSD License. # The full license can be found in 'license.txt'. """ Module misc Various things are defined here that did not fit nicely in any other module. This module is also meant to be imported by man...
# model settings model = dict( type='SpaceTimeWalker', backbone=dict( type='ResNet', pretrained=None, depth=18, out_indices=(3, ), norm_eval=False, zero_init_residual=True), cls_head=dict( type='WalkerHead', num_classes=400, in_channels...
# ------------------------------------------------------------------------------ # Copyright (c) Microsoft # Licensed under the MIT License. # Written by Bin Xiao (Bin.Xiao@microsoft.com) # Modified by Xingyi Zhou # ------------------------------------------------------------------------------ from __future__ import a...
from django.apps import AppConfig class QuestionMonitorConfig(AppConfig): name = 'question_monitor'
import warnings from numpy.testing import TestCase class TestWarn(TestCase): def test_f(self): warnings.filterwarnings("ignore", message="another warning") warnings.warn("another warning!")
import json import logging from typing import Any, Callable, List import paho.mqtt.client as mqtt from paho.mqtt.client import MQTTMessage, SubscribeOptions from paho.mqtt.properties import Properties from paho.mqtt.reasoncodes import PacketTypes, ReasonCodes class MqttClient: def __init__( self, ...
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: chirpstack-api/as_pb/external/api/multicastGroup.proto from google.protobuf.internal import enum_type_wrapper from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.pr...
from django.urls import path from .views import todo_list, todo_detail, todo_create, todo_update, todo_delete app_name = 'todos' urlpatterns = [ path('', todo_list), path('create/', todo_create), path('<id>/', todo_detail), path('<id>/update/', todo_update), path('<id>/delete/', todo_delete), ]
# encoding: utf-8 # module Autodesk.Revit.DB.Electrical calls itself Electrical # from RevitAPI, Version=17.0.0.0, Culture=neutral, PublicKeyToken=null # by generator 1.145 # no doc # no imports # no functions # classes class CableTrayConduitBase(MEPCurve, IDisposable): """ The CableTrayConduitBase class is imple...
# Copyright (c) 2011 Tencent Inc. # All rights reserved. # # Author: Huan Yu <huanyu@tencent.com> # Feng chen <phongchen@tencent.com> # Yi Wang <yiwang@tencent.com> # Chong peng <michaelpeng@tencent.com> # Date: October 20, 2011 """ This is the util module which provides some helper function...
import torch from torchvision import datasets, transforms import os transform = { "train": transforms.Compose( [ transforms.RandomResizedCrop(224), transforms.RandomHorizontalFlip(), transforms.ToTensor(), transforms.Normalize( [0.4914, 0.4821...
#!/usr/bin/python3 from __future__ import print_function import logging import re from ssg.constants import OSCAP_PROFILE from ssg_test_suite import common from ssg_test_suite import rule from ssg_test_suite import xml_operations from ssg_test_suite import test_env class CombinedChecker(rule.RuleChecker): """ ...
import os import csv from shopify_csv import ShopifyRow def get_template_rows(): with open( os.path.join( os.getcwd(), "shopify_csv", "tests", "fixtures", "product_template.csv" ), "r", ) as file: reader = csv.reader(file, delimiter=";") return [row for row...
# coding=utf-8 HOST_STRING = "lvye_pay@192.168.0.165" CODE_DIR = "/home/lvye_pay/projects/pay2/pub_site" VENV_NAME = "pub_venv"
# -*- coding: utf-8 -*- """ flask.testing ~~~~~~~~~~~~~ Implements test support helpers. This module is lazily imported and usually not used in production environments. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import werkzeug from contextlib im...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PerlModuleRuntime(PerlPackage): """Runtime module handling""" homepage = "http://sear...
# Copyright 2017 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in wri...
# -*- coding: utf-8 -*- """ Created on Fri May 06 14:54:11 2016 @author: Alexander Weaver """ """ Performs an affine (fully connected) operation on its input An affine layer with out_dim neurons takes a data array of size Nx(in_dim), x and returns a linearly transformed Nx(out_dim) data array The transformation resul...
import subprocess COMMAND = u'systemctl' ARGS = [u'sleep.target', u'suspend.target', u'hibernate.target', u'hybrid-sleep.target'] # https://www.man7.org/linux/man-pages/man1/systemctl.1.html if not subprocess.check_output('pidof systemd'): raise NotImplementedError( "wakepy has not yet support for init pr...
from .pushbots import Pushbots
"""Tests for tasks.py.""" import collections import contextlib import contextvars import functools import gc import io import random import re import sys import textwrap import traceback import types import unittest import weakref from unittest import mock import asyncio from asyncio import coroutines from asyncio im...
from lantz import Feat, DictFeat, Action from lantz.errors import InstrumentError from lantz.messagebased import MessageBasedDriver from pint import UnitRegistry from time import sleep class CLD101XLP(MessageBasedDriver): DEFAULTS = { 'COMMON': { 'write_termination': '\n', 'read...
# Copyright 2016 VMware, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
# -*- coding: utf-8 -*- import scrapy class ResumeItem(scrapy.Item): time = scrapy.Field() org_name = scrapy.Field() job_title = scrapy.Field() location = scrapy.Field() product_name = scrapy.Field() company_name = scrapy.Field() person_name = scrapy.Field() id = scrapy.Field()
from django.shortcuts import render, redirect from django.template.loader import get_template from django.core.mail import EmailMessage def home_page(request): return render(request, 'bootstrap/home_page.html') def features_page(request): return render(request, 'bootstrap/features_page.html') def pricing_page(r...
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.trial._dist.workertrial}. """ import errno import sys from io import BytesIO from twisted.protocols.amp import AMP from twisted.test.proto_helpers import StringTransport from twisted.trial._dist import ( _WORKER_AMP_S...
#!/usr/bin/env python import os import uuid from xml.sax.saxutils import escape scriptDir = os.path.dirname(os.path.normpath(os.path.abspath(__file__))) buildDir = os.path.join(os.path.dirname(os.path.dirname(scriptDir)), 'build') dirs = { 'ELECTRONDIR': 'BitcoenWallet-win32-x64', 'COREDIR': 'core', ...
''' This script is about reading and writing excel files through python. Refer to the guidelines in @33. This builds on assignment 1 (on using click). Here's the high level spec, you have to figure out all the details and get this done: Create a script called copyexcel.py which uses openpyxl and click. It copies all d...
# models.py from peewee import * from app import db class Filename(Model): filepath = TextField(primary_key=True) class Meta: database = db
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shop.payment.defaults import filer.fields.image import django_fsm import django.db.models.deletion import jsonfield.fields import djangocms_text_ckeditor.fields import django.utils.timezone from django.conf ...
from Element.FlutterFind import FlutterFind from selenium.common.exceptions import WebDriverException, NoSuchElementException from Utilitys.WaitUtils import WaitUtils class FlutterElement(FlutterFind): def __init__(self, driver): FlutterFind.__init__(self) self.driver = driver self.interva...
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # ## SetMemberSDOPackageTest.py ## ## メモリーリークチェック ## SDOPackage.idlで定義されているオペレーション ## OrganizationのMemberのセットと取得に関するオペレーション # # $Id$ # from rtc_handle import * from BasicDataType_idl import * from omniORB import any import time import commands import SDOPackage import soc...
from django.contrib import admin from hknweb.candidate.models import ( CandidateForm, CandidateFormDoneEntry, CommitteeProject, CommitteeProjectDoneEntry, DuePayment, DuePaymentPaidEntry, RequirementBitByteActivity, RequriementEvent, RequirementHangout, RequirementMandatory, ...
# -*- coding: utf-8 -*- # Generated by Django 1.11.4 on 2017-08-31 11:03 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [("followers", "0001_initial")] operations = [ migrations.RemoveField(model_name="followcompany", n...
# coding=utf-8 # *** WARNING: this file was generated by crd2pulumi. *** # *** Do not edit by hand unless you're certain you know what you are doing! *** import warnings import pulumi import pulumi.runtime from typing import Any, Mapping, Optional, Sequence, Union from ... import _utilities, _tables __all__ = [ '...
""" flask_security ~~~~~~~~~~~~~~ Flask-Security is a Flask extension that aims to add quick and simple security via Flask-Login, Flask-Principal, Flask-WTF, and passlib. :copyright: (c) 2012-2019 by Matt Wright. :copyright: (c) 2019-2020 by J. Christopher Wagner. :license: MIT, see LICENS...
import pickle import tqdm from collections import Counter class TorchVocab(object): """Defines a vocabulary object that will be used to numericalize a field. Attributes: freqs: A collections.Counter object holding the frequencies of tokens in the data used to build the Vocab. stoi:...
import pytest @pytest.mark.webtest def test_send_http(): print('========== Hello *********************************') assert True def test_something_quick(): pass def test_another(): pass class TestClass(object): def test_method(self): pass # Run marked tests # pytest -v -m webtest ...
# -*- coding: utf-8 -*- from __future__ import absolute_import, print_function, unicode_literals from ckeditor.fields import RichTextField from django.conf import settings from django.db import models from django.db.models import ImageField from django.urls import reverse from django.utils.encoding import python_2_uni...
from django.db import migrations class Migration(migrations.Migration): dependencies = [ ("django_file_form", "0006_auto_20200501_0908"), ] operations = [ migrations.RenameModel( new_name="TemporaryUploadedFile", old_name="UploadedFile", ), migratio...
import random from typing import Dict, List, Union from transformers import AutoTokenizer import datasets from fewie.dataset_processors.processor import DatasetProcessor class RobertaProcessor(DatasetProcessor): def __init__( self, tokenizer_name_or_path: str, text_column_name: str, ...
""" A SAX driver for xmlproc $Id: drv_xmlproc.py,v 1.9 1999/10/15 07:55:33 larsga Exp $ """ version="0.95" from xml.sax import saxlib,saxutils,saxmisc from xml.parsers.xmlproc import xmlproc import os pre_parse_properties={"http://xml.org/sax/properties/namespace-sep":1, "http://xml.org/sax/h...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache...
# Code obtained from django-debug-toolbar sql panel tracking from __future__ import absolute_import, unicode_literals import json from threading import local from time import time from django.utils.encoding import force_str from .types import DjangoDebugSQL class SQLQueryTriggered(Exception): """Thrown when te...
import re from mesh.constants import OK, RETURNING from mesh.exceptions import GoneError, NotFoundError from mesh.standard import Controller from sqlalchemy.sql import asc, column, desc, func, literal_column, not_, select from spire.core import Configurable, Unit from spire.schema import NoResultFound __all__ = ('M...
# Copyright (C) databricks-cicd 2021 man40 (man40dev@gmail.com) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by a...
from __future__ import print_function from optparse import make_option from django.core.management.base import BaseCommand, CommandError class Command(BaseCommand): help = 'Run arbitrary script within Django environment' option_list = BaseCommand.option_list + ( make_option('--file', dest='file', hel...
import pickle import sys import os import urllib import gzip import cPickle import time import lasagne import theano import numpy as np import theano.tensor as T from lasagne import layers from lasagne.updates import nesterov_momentum from nolearn.lasagne import NeuralNet from nolearn.lasagne import BatchIterator from...
import os DATA_DIR = os.environ.get( "COVID_WEBAPP_DATA_DIR", "/home/ubuntu/efs-mnt/latest_new/" ) # elasticsearch index ES_COL_TO_TYPE = { "cord_uid": { "type": "keyword" }, "title":{ "type": "text", }, "abstract": { "type": "text", }, "text": { "type...
#author: Christoffer Norell #contact: christoffernorell@yahoo.se #This is a simple simulator of a deck of cards I made for fun. #The values in the dictionaries are there for better comparison during games. import random #Using dictionaries to represent values. #The color-values was taken from bridge-order: #http://p...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange import math from ccxt.base.errors import ExchangeError from ccxt.base.errors import AuthenticationE...
# Based on code written by @DavidGlaude on Twitter # https://twitter.com/DavidGlaude/status/1340365817138044933 # https://gist.github.com/dglaude/4bf8d0a13c9c8ca8b05d6c0e9176bd20 import time import alarm import displayio import board import adafruit_imageload from adafruit_display_shapes.rect import Rect from adafruit...
from brewtils.schemas import RoleSchema from marshmallow import Schema, fields class RoleListSchema(Schema): """Schema for listing multiple roles""" roles = fields.List(fields.Nested(RoleSchema))
# Auto-generated at 2021-09-27T17:01:29.359679+08:00 # from: Justice Platform Service (3.24.0) # Copyright (c) 2018 - 2021 AccelByte Inc. All Rights Reserved. # This is licensed software from AccelByte Inc, for limitations # and restrictions contact your company contract manager. # pylint: disable=duplicate-code # py...
# -*- coding: utf-8 -*- from __future__ import unicode_literals import math DESTRUIDO = 'Destruido' ATIVO = 'Ativo' GRAVIDADE = 10 # m/s^2 class Ator: """ Classe que representa um ator. Ele representa um ponto cartesiano na tela. """ _caracter_ativo = 'A' _caracter_destruido = ' ' def __i...
#!/usr/bin/env python3 # -*- Coding: UTF-8 -*- # --------------------------------------------------------------------------- # Open Asset Import Library (ASSIMP) # --------------------------------------------------------------------------- # # Copyright (c) 2006-2020, ASSIMP Development Team # # All rights reserved. #...
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
# Copyright 1999-2021 Alibaba Group Holding Ltd. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
from typing import Optional import aiohttp import grpc from jina.excepts import BadClientCallback from jina import Flow, Client import numpy as np import pytest from docarray import DocumentArray from docarray.document.generators import from_ndarray def validate(x): raise NotImplementedError @pytest.mark.ski...
# Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
# coding: utf-8 """ Mux API Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before. # noqa: E501 The version of the OpenAPI document: v1 Contact: devex@mux.com Gener...
# !usr/bin/env python2 # -*- coding: utf-8 -*- # # Licensed under a 3-clause BSD license. # # @Author: Brian Cherinka # @Date: 2017-03-24 12:22:30 # @Last modified by: Michael Talbot # @Last Modified time: 2019-08-07 12:30:00 from __future__ import print_function, division, absolute_import import glob import gzip ...
""" Contains main program example for scheduler """ # standard libraries import sys import os sys.path.append(os.path.abspath("../lotlan_scheduler")) # local sources from lotlan_scheduler.scheduler import LotlanScheduler from lotlan_scheduler.api.event import Event def cb_triggered_by(mf_uuid, uuid_, event_informa...
""" Django settings for profiles_project project. Generated by 'django-admin startproject' using Django 2.2. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ impor...
#!/usr/bin/env python import os import sys import subprocess from pathlib import Path # There is no sane way to test them. IGNORE_TESTS = [ 'macos.tests', ] IGNORE_TEST_CASES = [ # aots tests # in-house tests # --shaper=fallback is not supported. 'simple_002', # Not possible to implement wi...
import tools.find_mxnet import mxnet as mx import logging import sys import os import importlib import re from dataset.iterator import MultiTaskRecordIter from train.metric import MultiBoxMetric from evaluate.eval_metric import MApMetric, VOC07MApMetric from config.config import cfg from symbol.multitask_symbol_factory...
"""Contains the Layout class""" # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from traitlets import Unicode, Instance from .widget_core import CoreWidget class Layout(CoreWidget): """Layout specification Defines a layout that can be expressed using CSS...
from configparser import ConfigParser import os import platform OCR_CONFIG = 'OCRCONFIG' TRANSLATION_CONFIG = 'TRANSLATIONCONFIG' APPERANCE_CONFIG = 'APPEARANCE' APP_CONFIG = 'APPCONFIG' ANKI_CONFIG = 'ANKICONFIG' LOG_CONFIG = 'LOGCONFIG' SCRIPT_MATCH_CONFIG = 'SCRIPTMATCHCONFIG' TEXTHOOKER_CONFIG = 'TEXTHOOKERCONFIG'...
from cv2 import * class Modificaciones (object): def __init__(self,img,segIni,segFin,posx,posy): self.im=img self.height, self.width, self.channels = self.im.shape self.segIni=segIni self.segFin=segFin self.posy=posy self.posx=posx def pertenece...
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses...
import sys from collections import Iterable from path2insight import WindowsFilePath, PosixFilePath PATH_OBJECT_TYPES = (WindowsFilePath, PosixFilePath) # ---------------------------------------------------- class VisibleDeprecationWarning(UserWarning): """Visible deprecation warning. Based on numpy's Vis...
from itertools import permutations import yatest.common from yatest.common import ExecutionTimeoutError, ExecutionError import pytest import os import filecmp import numpy as np import pandas as pd import timeit import json import catboost from catboost_pytest_lib import ( apply_catboost, compare_evals_with_p...
# coding: utf-8 """ Syntropy Rule service Syntropy Rule service # noqa: E501 OpenAPI spec version: 1.0 Generated by: https://github.com/swagger-api/swagger-codegen.git """ import pprint import re # noqa: F401 import six class PointtotagResponse(object): """NOTE: This class is auto gene...
import tensorflow.keras as tfk import tensorflow as tf import tensorflow.keras.layers as layers import json import collections from datetime import datetime import os class LrStepDecay(tfk.callbacks.Callback): def __init__(self, decay_rate, decay_at): super(LrStepDecay, s...
#!/usr/bin/env python ##################################### # Installation module for PyKek ##################################### # AUTHOR OF MODULE NAME AUTHOR="David Kennedy (ReL1K)" # DESCRIPTION OF THE MODULE DESCRIPTION="This module will install/update PyKEK - Kerberos exploitation kit" # INSTALL TYPE GIT, SVN,...
# -*- coding: utf-8 -*- from calendar import timegm from datetime import datetime from importlib import import_module from os import path as op import re from pkg_resources import DistributionNotFound, iter_entry_points, load_entry_point from pygments import highlight from pygments.formatters import HtmlFormatter fro...
########################################################################## # # pgAdmin 4 - PostgreSQL Tools # # Copyright (C) 2013 - 2017, The pgAdmin Development Team # This software is released under the PostgreSQL Licence # ########################################################################## from __future__ i...
class Solution(object): def nextGreaterElement(self, n): """ :type n: int :rtype: int """ s = str(n) for i, n in enumerate(reversed(s[:-1]), 1): if n < s[-i]: x, j = min((x, k) for k, x in enumerate(s[-i:]) if x > n) ans = s...
#!/usr/bin/env python # Impacket - Collection of Python classes for working with network protocols. # # SECUREAUTH LABS. Copyright (C) 2021 SecureAuth Corporation. All rights reserved. # # This software is provided under a slightly modified version # of the Apache Software License. See the accompanying LICENSE file # f...
from doctest import testmod from runtool import ( datatypes, recurse_config, runtool, transformations, transformer, utils, ) for module in ( datatypes, recurse_config, runtool, transformations, transformer, utils, ): testmod(module)
# Copyright 2020 - 2021 MONAI Consortium # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # http://www.apache.org/licenses/LICENSE-2.0 # Unless required by applicable law or agreed to in wri...
from tests.system.action.base import BaseActionTestCase class MotionSubmitterCreateActionTest(BaseActionTestCase): def test_create(self) -> None: self.create_model("meeting/111", {"name": "name_m123etrd"}) self.create_model("motion/357", {"title": "title_YIDYXmKj", "meeting_id": 111}) self...
import connexion import six from swagger_server.models.certificate import Certificate # noqa: E501 from swagger_server.models.connect_response import ConnectResponse # noqa: E501 from swagger_server.models.roundtrip_method_call_body import RoundtripMethodCallBody # noqa: E501 from swagger_server import util from d...
from django.contrib import admin from mapapp.models import PointOfInterest admin.site.register(PointOfInterest)
# Copyright (c) 2013 dotCloud, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requir...
import numpy as np import pickle import h5py from scipy.misc import imread import os from pycocotools.coco import COCO from pycocotools import mask data_dir = '/home/chuancen/CVResearch/HumanPoseTracking/PJDATA/COCO/images' ann_path = '/home/chuancen/CVResearch/HumanPoseTracking/PJDATA/COCO/annotations/person_keypoi...
from setuptools import setup setup( name='gzip-stream', version='1.2.0', py_modules=['gzip_stream'], provides=['gzip_stream'], description='Compress stream by GZIP on the fly.', long_description=open('README.rst').read(), keywords=['gzip', 'compression'], url='https://github.com/lee...
# Copyright 2011 University of Southern California # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------ # # Copyright 2018-2019 Fetch.AI Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the...
# -*- coding: utf-8 -*- # PLEASE DO NOT EDIT THIS FILE, IT IS GENERATED AND WILL BE OVERWRITTEN: # https://github.com/ccxt/ccxt/blob/master/CONTRIBUTING.md#how-to-contribute-code from ccxt.base.exchange import Exchange # ----------------------------------------------------------------------------- try: basestri...
from flask import Blueprint, request, session, render_template from models.user import requires_login user_blueprint = Blueprint('users', __name__) @user_blueprint.route('/login') def login_user(): is_logged_in = False if not session.get('email') else True return render_template("users/login.html", is_logged...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This module is for testing dynRNN """ import os import matplotlib.pyplot as plt from dynamicgem.embedding.dynRNN import DynRNN from dynamicgem.graph_generation import dynamic_SBM_graph as sbm from dynamicgem.visualization import plot_dynamic_sbm_embedding from time imp...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import http from odoo.addons.website_event_track.controllers.event_track import EventTrackController from odoo.http import request class WebsiteEventTrackQuiz(EventTrackController): # QUIZZES IN PAGE ...
import sublime, sublime_plugin, urllib, re, tempfile, os, desktop def getTempPreviewPath(view): tmp_filename = '%s.png' % view.file_name() tmp_fullpath = os.path.join(tempfile.gettempdir(), tmp_filename) return tmp_fullpath def getSequenceDiagram(text, outputFile, style = 'default'): request = {} req...
#!/usr/bin/env python """Class and context manager for writing KbartRecord class to csv file.""" # coding: utf-8 from __future__ import (absolute_import, division, print_function, unicode_literals) import contextlib import six import unicodecsv as csv # TODO: make a better way to write the ...
import matplotlib.pyplot as plt from scipy.io import wavfile # get the api from scipy.fftpack import fft from pylab import * def f(filename): # song files are in ogg... we need it to be in wav. fs, data = wavfile.read(filename) # songs have multiple channels, but we only need one channel a = data...