gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Multiclass and multilabel classification strategies =================================================== This module implements multiclass learning algorithms: - one-vs-the-rest / one-vs-all - one-vs-one - error correcting output codes The estimators provided in this module are meta-estimators: they re...
#!/usr/bin/env python # # Copyright (C) 2014 # Brian Caswell <bmc@lungetech.com> # Narf Industries <info@narfindustries.com> # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the "Software"), # to deal in the Software without res...
import sys import random import numpy as np from constants import LOCAL_T_MAX from collections import Counter from math import exp from constants import direction from constants import direction_index # 400 pixels represent the largest distance of the area, i.e. 100m WINDOW_WIDTH = 400 *40 # size of window's width i...
import os from typing import List from collections import Counter from fontbakery.callable import condition # used to inform get_module_profile whether and how to create a profile from fontbakery.fonts_profile import profile_factory # NOQA pylint: disable=unused-import,cyclic-import @condition def ttFont(font): ...
# Copyright 2013-2014 MongoDB, 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 agreed to in writin...
""" The display module. """ from jasper.utility import extract_traceback from termcolor import colored import textwrap import colorama import sys class Display(object): """ The class responsible for displaying the results of a suites, features, scenarios, and steps. """ def __init__(self, force_ansi=...
#!/usr/bin/env python # cardinal_pythonlib/sqlalchemy/list_types.py """ =============================================================================== Original code copyright (C) 2009-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of cardinal_pythonlib. Licensed under the Apache License, Ve...
# -*- coding: utf-8 -*- """ @author: Chenglong Chen <c.chenglong@gmail.com> @brief: generate feature conf for the following models (most of which are linear models) - reg_skl_ridge - reg_skl_bayesian_ridge - reg_skl_lasso - reg_skl_lsvr - reg_xgb_linear - reg_keras_dnn (n...
#***************************************************************************** # Copyright 2004-2008 Steve Menard # # 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....
#!/usr/bin/env python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Generate fake repositories for testing.""" import atexit import datetime import errno import logging import os import pprint im...
"""Test the base functions of the media player.""" import asyncio import base64 from http import HTTPStatus from unittest.mock import patch from homeassistant.components import media_player from homeassistant.components.media_player.browse_media import BrowseMedia from homeassistant.components.websocket_api.const impo...
"""tests the "bind" attribute/argument across schema and SQL, including the deprecated versions of these arguments""" from sqlalchemy.test.testing import eq_ from sqlalchemy import engine, exc from sqlalchemy import MetaData, ThreadLocalMetaData from sqlalchemy import Integer, text from sqlalchemy.test.schema import T...
""" This module performs all basic DFA operations, without pyfst """ #!/usr/bin/python from operator import attrgetter from itertools import product import copy from alphabet import createalphabet from collections import defaultdict EPSILON = 0xffff def TropicalWeight(param): """ Returns the emulated fst Tropi...
from le_utils.constants import content_kinds from rest_framework import serializers from kolibri.core.content.models import ChannelMetadata from kolibri.core.content.models import ContentNode from kolibri.core.content.models import File from kolibri.core.content.models import Language from kolibri.core.fields import c...
# ================================================================ # Blue Gecko BLE API BGLib code generator: Python3 platform # Jeff Rowberg <jeff@rowberg.net> # Kris Young <kris.young@silabs.com> # ---------------------------------------------------------------- # # CHANGELOG: # 2020-08-03 - Ported to Blue Gecko (K...
#!/opt/local/bin python # Python Menu Code to call the various procedures to plot EQ data and forecasts # # This code downloads data from various web sites and uses matplotlib to construct plots import sys import os import numpy as np from array import array from EQUtilities import * #.............
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2010 Citrix Systems, Inc. # Copyright 2010 OpenStack Foundation # # 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 # # ...
""" File with trajectory written to file: /users/srio/Oasys/tmp.traj wiggler_cdf: Electron beam energy (from velocities) = 3.000355 GeV wiggler_cdf: gamma (from velocities) = 5870.853556 GeV wiggler_cdf: Curvature (min)) = 0.000000 m^-1 wiggler_cdf: (max) 0.199920 m^-1 wiggler_cdf: Radius of curvature (m...
#!/usr/bin/env python # -*- encoding: utf-8 -*- # vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8: # Author: Binux<i@binux.me> # http://binux.me # Created on 2014-03-05 00:11:49 import os import six import time import shutil import logging import logging.config from six.moves import builtins import click impor...
#!/usr/bin/env python """Model for guide cameras. Warning: the config stuff will probably be modified. 2005-01-28 ROwen preliminary; has all existing keywords, but there will be more and "star" will probably change to include ellipticity. 2005-02-23 ROwen added expTime and thresh. 2005-03-14...
# -*- coding: utf-8; -*- # # Licensed to Crate.io GmbH ("Crate") under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. Crate licenses # this file to you under the Apache License, Version 2.0 (the "License"); # you...
# supported_libc contains the the lines to take in order to retrieve the malloc_state # from the libc data segment # f.i. 2.23-32 is the libc 2.23 on 32 bit, 61-95 means that from line 61 to 95 of the hexdump we have the info about bins import pdb class HeapyLibcFormatter: def __init__(self,libc_dump_full_path,pr...
# # Copyright (c) 2008-2015 Citrix Systems, 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 l...
#!/usr/bin/env python # Bitcoin private key importer # Copyright (C) 2011 by Matt Giuca # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the...
""" homeassistant.components.media_player ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Component to interface with various media players """ import logging from homeassistant.components import discovery from homeassistant.helpers.device import Device from homeassistant.helpers.device_component import DeviceComponent from ho...
# -*- Mode: Python -*- # Author: Sam Rushing <rushing@nightmare.com> # # python REPL channel. # RCS_ID = '$Id: monitor.py,v 1.5 2002/03/23 15:08:06 amk Exp $' import md5 import socket import string import sys import time VERSION = string.split(RCS_ID)[2] import asyncore_25 as asyncore import asynchat_25 as a...
import sys import numpy as np import matplotlib.pyplot as plt ################################################################################ # main ################################################################################ def main(): #######################################################################...
__all__ = ('Request', 'StreamResponse', 'Response') import asyncio import binascii import cgi import collections import http.cookies import io import json import warnings from urllib.parse import urlsplit, parse_qsl, unquote from types import MappingProxyType from . import hdrs from .helpers import reify from .multid...
__all__ = ['Counter', 'deque', 'defaultdict', 'namedtuple', 'OrderedDict'] # For bootstrapping reasons, the collection ABCs are defined in _abcoll.py. # They should however be considered an integral part of collections.py. from _abcoll import * import _abcoll __all__ += _abcoll.__all__ from operator import itemgetter...
# Copyright 2015 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...
import os # Path helper location = lambda x: os.path.join( os.path.dirname(os.path.realpath(__file__)), x) USE_TZ = True DEBUG = True TEMPLATE_DEBUG = True SQL_DEBUG = True ALLOWED_HOSTS = ['latest.oscarcommerce.com', 'master.oscarcommerce.com'] # This is needed for the hosted version of the s...
# Copyright 2018 The Bazel 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 applicable la...
# Copyright 2011 OpenStack Foundation # 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 requ...
# Copyright 2013 OpenStack Foundation # # 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 ...
import copy from django import forms from django.forms.util import ErrorDict from django.forms import ModelForm, ModelChoiceField from questionnaire.forms.custom_widgets import MultiChoiceAnswerSelectWidget, SkipRuleRadioWidget, MultipleResponseChoiceField from questionnaire.models import NumericalAnswer, TextAnswer,...
# Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # 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://w...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'AuthIdentity.last_synced' db.add_column('sentry_authident...
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # All rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without res...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.core.management.base import BaseCommand from core.models import ( Person, Person2Company, Person2Country, Person2Person, Declaration) from core.utils import ceil_date from tasks.models import PersonDeduplication, AdHocMatch from django.db...
import sys import os from modPackager import ModPackager from modManagerModel import ModManagerModel from modManagerView import (ModManagerView, NOMODSELECTED, MODSELECTED, EDITMOD, NEWMOD, NORMALMODES, EDITINGMODES) class ModManagerController: def __init__(self): self.domain ...
""" INLINE PATTERNS ============================================================================= Inline patterns such as *emphasis* are handled by means of auxiliary objects, one per pattern. Pattern objects must be instances of classes that extend markdown.Pattern. Each pattern object uses a single regular express...
import codecs import calendar import datetime import io import json import logging import mimetypes import sys import urllib import urllib2 import uuid FACEBOOK_API = 'https://graph.facebook.com' logger = logging.getLogger(__name__) class MultipartFormdataEncoder(object): def __init__(self): self.bounda...
# output from elife00013.xml expected = [ { "xlink_href": "elife00013f001", "type": "graphic", "parent_type": "fig", "parent_ordinal": 1, "parent_sibling_ordinal": 1, "parent_component_doi": "10.7554/eLife.00013.003", "position": 1, "ordinal": 1, }...
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals, print_function import itertools import logging from collections import defaultdict import math from math import cos from math import sin from fractions import...
#------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. #-------------------------------------------------------------------------- import loggi...
#!/usr/bin/python2.4 # # Copyright 2011 Google Inc. All Rights Reserved. """WebRTC Demo This module demonstrates the WebRTC API by implementing a simple video chat app. """ import cgi import json import logging import os import random import threading import jinja2 import webapp2 from google.appengine.api import me...
import unittest import numpy as np from op_test import OpTest import paddle.v2.framework.core as core from paddle.v2.framework.op import Operator def grad_var_name(var_name): return var_name + "@GRAD" def get_backward_op(scope, op, no_grad_set): backward_op = core.Operator.backward(op, no_grad_set) for ...
import keras from keras.models import Model, Sequential from keras.layers import Activation, Dropout, Flatten, Dense, Input from keras.layers.convolutional import Conv2D from keras.layers.pooling import MaxPooling2D from keras.layers.merge import Concatenate from keras.callbacks import ProgbarLogger, ModelCheckpoint, T...
from . import stdops as stdops from . import core from . import copy from . import operator from . import factor from .core import wild def reduce(func, iterable, initial=None, reverse=False): x=initial if reverse: iterable=reversed(iterable) for e in iterable: x=func(x,e) if x is not None...
# vim:ts=4:sw=4:et: # Copyright 2012-present Facebook, Inc. # Licensed under the Apache License, Version 2.0 # no unicode literals from __future__ import absolute_import, division, print_function import errno import functools import inspect import os import os.path import tempfile import time import Interrupt import...
#! /usr/bin/env python """Info about node/set/members. For admin tool. """ __all__ = ['MemberInfo', 'NodeInfo', 'QueueInfo'] # node types ROOT = 'root' BRANCH = 'branch' LEAF = 'leaf' class MemberInfo: """Info about set member.""" def __init__(self, row): self.name = row['node_name'] self.l...
import os import logging from .plugin import SimStatePlugin from ..storage.file import SimFile from ..errors import SimMergeError from ..misc.ux import once l = logging.getLogger(name=__name__) class SimFilesystem(SimStatePlugin): # pretends links don't exist """ angr's emulated filesystem. Available as stat...
# 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 writing, software # d...
# 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...
# 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 License, Version 2.0 (the # "License"); you may not u...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Contract.summ_mo_money' db.add_column(u'build_contract', ...
# coding: utf-8 """Wrappers for ABINIT main executables""" from __future__ import unicode_literals, division, print_function import os from subprocess import Popen, PIPE from monty.os.path import which from pymatgen.util.string_utils import list_strings from six.moves import map, cStringIO import logging logger = lo...
from __future__ import unicode_literals import locale import sys from datetime import date from django.apps import apps from django.contrib.auth import management, models from django.contrib.auth.checks import check_user_model from django.contrib.auth.management import create_permissions from django.contrib.auth.mana...
# Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved. from __future__ import absolute_import import json import os import shutil import tempfile # Find the best implementation available try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from bs4 import Beauti...
#/-------------------------------------------------------------------------------------------------- # # Pretty standard fibonacci function # # def fibonacci(): a,b = 1,1 while 1: print a a,b = b, a+b fibonacci() # # # # # # # # # # # # #\--------------------------------------------------------------...
#!/usr/bin/env python # Copyright (C) 2013 Adobe Systems Incorporated. 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 n...
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
''' Created on Mar 18, 2011 @author: svohara ''' # PyVision License # # Copyright (c) 2006-2008 Stephen O'Hara # 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 c...
#Copyright ReportLab Europe Ltd. 2000-2010 #see license.txt for license details #history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/colors.py __version__=''' $Id: colors.py 3780 2010-09-17 13:40:59Z rgbecker $ ''' __doc__='''Defines standard colour-handling classes and colour na...
"""The tests for the DirecTV Media player platform.""" from __future__ import annotations from datetime import datetime, timedelta from unittest.mock import patch from pytest import fixture from homeassistant.components.directv.media_player import ( ATTR_MEDIA_CURRENTLY_RECORDING, ATTR_MEDIA_RATING, ATTR...
""" Define a set of scopes to be used by COS Internal OAuth implementation, specifically tailored to work with APIv2. List of scopes, nomenclature, and rationale can be found in the relevant "Login as OSF- phase 2" proposal document """ from collections import namedtuple from website import settings # Public scopes...
# Copyright 2017 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...
# pylama:ignore=E501 # TODO: Modify all calls to get a Well to use the `wells` method from numpy import isclose from unittest import mock import pytest from opentrons.legacy_api.containers import load as containers_load from opentrons.config import pipette_config from opentrons.trackers import pose_tracker @pytest.m...
#------------------------------------------------------------------------------ # pycparser: c_generator.py # # C code generator from pycparser AST nodes. # # Eli Bendersky [http://eli.thegreenplace.net] # License: BSD #------------------------------------------------------------------------------ from . import c_ast ...
#TIME COMPLEXITY : """ FOR WORD PREDICTION : O(1) FOR WORD PREDICTION WITH 'R'TH RANK: O(R) ADDED POROBAILITY USING INTERPOLATION """ #import the modules necessary from nltk.util import ngrams from collections import defaultdict from collections import OrderedDict import string import time import gc start_time =...
"""Manager class and mixin. The :class:`Manager` class helps manage a SQLAlchemy database session as well as provide convenience functions for commons operations. Configuration ------------- The following configuration values can be passed into a new :class:`Manager` instance as a ``dict``, ``class``, or ``module``...
"""The tests for the sun automation.""" from datetime import datetime import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import SUN_EVENT_SUNRISE, SUN_EVENT_SUNSET from homeassistant.setup import async_setup_component import homeass...
from __future__ import unicode_literals import logging from functools import update_wrapper from django import http from django.core.exceptions import ImproperlyConfigured from django.core.urlresolvers import reverse, NoReverseMatch from django.template.response import TemplateResponse from django.utils.decorators im...
import os, time, sys, traceback, weakref import numpy as np import threading try: import __builtin__ as builtins import cPickle as pickle except ImportError: import builtins import pickle # color printing for debugging from ..util import cprint class ClosedError(Exception): """Raised when an event...
import datetime import dateutil.parser import pytz from django.conf import settings from django.core.urlresolvers import reverse from django.db.models import F, Q from django.http import ( Http404, HttpResponseBadRequest, HttpResponseRedirect, JsonResponse, ) from django.shortcuts import get_object_or_404 from dja...
# # The Python Imaging Library. # $Id$ # # JPEG (JFIF) file handling # # See "Digital Compression and Coding of Continuous-Tone Still Images, # Part 1, Requirements and Guidelines" (CCITT T.81 / ISO 10918-1) # # History: # 1995-09-09 fl Created # 1995-09-13 fl Added full parser # 1996-03-25 fl Added hack to use t...
# Copyright 2017 Google LLC. # # 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 notice, # this list of conditions and the following disclaimer. # #...
# # Copyright 2019 Amazon.com, Inc. or its affiliates. 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. # A copy of the License is located at # # http://aws.amazon.com/apache2.0 # # or in the "license" file accom...
#!/usr/bin/env python # Copyright 2016 the V8 project authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """ V8 correctness fuzzer launcher script. """ import argparse import hashlib import itertools import json import os import re impor...
import os import numpy as np import matplotlib import logging import glob import astropy, astropy.io.ascii _log = logging.getLogger('mcfostpy') # this lets you put "stop()" in your code to have a debugger breakpoint from IPython.core.debugger import Tracer; stop = Tracer() # some extremely simple classes to serve as ...
from datetime import datetime, timedelta, timezone from typing import Any, Dict from unittest import mock from django.utils.timezone import now as timezone_now from zerver.lib.stream_topic import StreamTopicTarget from zerver.lib.test_classes import ZulipTestCase from zerver.lib.topic_mutes import ( add_topic_mut...
# Natural Language Toolkit: Agreement Metrics # # Copyright (C) 2001-2015 NLTK Project # Author: Tom Lippincott <tom@cs.columbia.edu> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # """ Implementations of inter-annotator agreement coefficients surveyed by Artstein and Poesio (2007), Inter-Coder ...
"""This module contains tests which are supposed to run on both root Marathon and Marathon on Marathon (MoM).""" import apps import common import groups import os import os.path import pytest import requests import retrying import scripts import time import logging import shakedown.dcos.service from shakedown.clients...
from ctutlz import rfc6962 def test_parse_log_entry_type_0(): tdf = b'\x00\x00' parse, offset = rfc6962._parse_log_entry_type(tdf) assert offset == 2 assert parse == { 'tdf': b'\x00\x00', 'val': 0, } def test_parse_log_entry_type_1(): tdf = b'\x00\x01' parse, offset = ...
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'IdMapping' db.create_table(u'ddsc_core_idmapping', ( ('id', self.gf('django.db.m...
from datetime import timedelta import jsonpickle from django.core import mail from django.core.files import File from django.core.mail import EmailMultiAlternatives from django.template import TemplateDoesNotExist from django.test import TestCase, override_settings from django.utils import timezone from herald.base im...
# Copyright 2012-2013 OpenStack Foundation # # 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 la...
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2014, Niklas Hauser # All rights reserved. # # The file is part of my bachelor thesis and is released under the 3-clause BSD # license. See the file `LICENSE` for the full license governing this code. # -------------------------------------------------------...
# -*- coding: utf-8 -*- import pytest import sys import random from .test_base_class import TestBaseClass from aerospike import exception as e aerospike = pytest.importorskip("aerospike") try: import aerospike except: print("Please install aerospike python client.") sys.exit(1) class TestListRemove(objec...
# Copyright (c) 2017, John Skinner import os.path import xxhash import cv2 import util.associate import metadata.camera_intrinsics as cam_intr import metadata.image_metadata as imeta import util.transform as tf import core.image_entity import dataset.image_collection_builder def make_camera_pose(tx, ty, tz, qx, qy, q...
# See readme.md for instructions on running this code. import re import os class VirtualFsHandler(object): def usage(self): return get_help() def handle_message(self, message, client, state_handler): command = message['content'] if command == "": return sender = me...
"""This module contains the detection code for integer overflows and underflows.""" from math import log2, ceil from typing import cast, List, Dict, Set from mythril.analysis import solver from mythril.analysis.report import Issue from mythril.analysis.swc_data import INTEGER_OVERFLOW_AND_UNDERFLOW from mythril.except...
# 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 License, Version 2.0 (the # "License"); you may not u...
from datetime import datetime import re import numpy as np import pytest import pandas as pd from pandas import ( DataFrame, Index, MultiIndex, Series, _testing as tm, ) @pytest.mark.parametrize("method", ["split", "rsplit"]) def test_split(any_string_dtype, method): values = Series(["a_b_c"...
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Edgewall Software # Copyright (C) 2006-2011, Herbert Valerio Riedel <hvr@gnu.org> # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://...
# encoding: utf-8 # # Copyright (c) 2014 Dean Jackson <deanishe@deanishe.net> # # MIT Licence. See http://opensource.org/licenses/MIT # # Created on 2014-02-15 # """ A lightweight HTTP library with a requests-like interface. """ from __future__ import print_function import codecs import json import mimetypes import ...
''' ''' # 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 License, Version 2.0 (the # "License");...
# coding=utf-8 # Copyright 2022 The Google Research Authors. # # 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 applicab...
import numpy try: import scipy.sparse _scipy_available = True except ImportError: _scipy_available = False import cupy from cupy import _core from cupy import cusparse from cupyx.scipy.sparse import _base from cupyx.scipy.sparse import _csc from cupyx.scipy.sparse import _csr from cupyx.scipy.sparse import...
#!/usr/bin/env python3 import os import io import sys import re import argparse import json import xml.etree.ElementTree as ET # on msys, use crlf output nl = None if sys.platform == 'msys': nl = "\r\n" # Get the file, relative to this script's location (same directory) # that way we're not sensitive to CWD ...