gt
stringclasses
1 value
context
stringlengths
2.49k
119k
#!/usr/bin/python # # Copyright (C) 2009 Google Inc. # 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 notice, # this list of...
# ------------------------------------------------------------- # # test menu strucure and testing command # # ------------------------------------------------------------- import random def _generate_goto(caller, **kwargs): return kwargs.get("name", "test_dynamic_node"), {"name": "replaced!"} def test_start_n...
# Copyright 2015 Mirantis, 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 ag...
import collections import csv from . import machines from . import syntax __all__ = ['Table', 'from_table', 'read_csv', 'read_excel', 'to_table'] class Table: """A simple class that just stores a list of lists of strings. Arguments: rows: list of lists of strings num_header_rows (int): number...
# This file is part of beets. # Copyright 2016, Fabrice Laporte. # # 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 rights to use, copy,...
''' Retrieve game list (by Requests). Update log: (date / version / author : comments) 2020-07-10 / 1.0.0 / Du Jiang : Creation Notes: 1. It requires 3rd parth python lib (at least): requests. ''' import csv import getopt from http import HTTPStatus import json import sys from time import localtime, strftime, time ...
# -*- coding: utf8 -*- # # 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...
from copy import deepcopy import HTMLParser import re try: from BeautifulSoup import BeautifulSoup as soup BS_AVAILABLE = True except ImportError: print "WARNING - BS4 NOT AVAILABLE" BS_AVAILABLE = False class HTMLScraperInterface(object): def get_iframes(self, html_in): raise NotImplement...
#!/usr/bin/env python # # VM Backup extension # # Copyright 2014 Microsoft 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 # # U...
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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 rights to use, copy, modi...
import numpy from qualipy.utils.histogram_analyzation import * def arrayNpEquals(arr1, arr2): if arr1.shape[0] != arr2.shape[0]: return False comp = arr1 == arr2 for i in range(0, comp.shape[0]): if comp[i] != True: return False return True def arrayEquals(arr1, arr2):...
# Copyright 2013-2016 DataStax, 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 writi...
# 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...
""" Ansible action plugin to ensure inventory variables are set appropriately and no conflicting options have been provided. """ import json import re from ansible.plugins.action import ActionBase from ansible import errors # pylint: disable=import-error,no-name-in-module from ansible.module_utils.six.moves.urllib.par...
# Copyright 2019 NetApp, 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 or ag...
# Copyright (c) 2020 PaddlePaddle 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 app...
#!/usr/bin/python3 -tt # -*- coding: utf-8 -*- # # (C) 2016 Bernhards 'Lockout' Blumbergs # See LICENSE file for usage conditions # # Known issues: # 1. TCP socket reuse problems once the socket has been closed # 2. UDP socket spoofing, port reuse problems # 3. Keepalive does not print out the previous buffer befoe new...
#!/usr/bin/env python3 """ Filename: id3.py Author: Christopher Goes Course: CS 404 Machine Learning and Data Mining Semester: Spring 2016 Description: The ID3 algorithm Book: Machine Learning: An Algorithmic Perspective Github: https://github.com/GhostofGoes/cgoes-cs404 """ import fileinput import math ...
# # 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...
#!/usr/bin/env python3 # Copyright (c) 2014-2019 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test the RBF code.""" from decimal import Decimal from test_framework.messages import COIN, COutPoint...
from .academicearth import AcademicEarthCourseIE from .addanime import AddAnimeIE from .aftonbladet import AftonbladetIE from .anitube import AnitubeIE from .aparat import AparatIE from .appletrailers import AppleTrailersIE from .archiveorg import ArchiveOrgIE from .ard import ARDIE from .arte import ( ArteTvIE, ...
from django import forms from django.core.exceptions import ValidationError from django.forms import Textarea, Select from django.utils.translation import ugettext_lazy as _ from .models import FinancialAidApplication, FinancialAidMessage, \ FinancialAidReviewData, FinancialAidEmailTemplate, Receipt, \ RECEIPT...
# Copyright (c) 2007-2009 Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for the 'session' channel implementation in twisted.conch.ssh.session. See also RFC 4254. """ import os, signal, sys, struct from zope.interface import implements from twisted.internet.error import ProcessTerminated, Proces...
import pytest from etcaetera.adapter import * class TestAdapterSet: def test_set_defaults_to_invalid_type_raises(self): s = AdapterSet() with pytest.raises(TypeError): s.defaults = 123 def test_set_overrides_to_invalid_type_raises(self): s = AdapterSet() ...
# -*- coding: utf-8 -*- from operator import attrgetter from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType from pyangbind.lib.yangtypes import RestrictedClassType from pyangbind.lib.yangtypes import TypedListType from pyangbind.lib.yangtypes import YANGBool from pyangbind.lib.yangtypes import YANGListTy...
#!/usr/bin/env python import sys import os import os.path import logging import threading import PyV8 class cmd(object): def __init__(self, *alias): self.alias = alias def __call__(self, func): def wrapped(*args, **kwds): return func(*args, **kwds) wrapped.alias = list(se...
import itertools import math from copy import copy from decimal import Decimal from django.core.exceptions import EmptyResultSet from django.db.models.expressions import Func, Value from django.db.models.fields import ( DateTimeField, DecimalField, Field, IntegerField, ) from django.db.models.query_utils import Re...
# 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 may ...
# coding=utf-8 r""" This code was generated by \ / _ _ _| _ _ | (_)\/(_)(_|\/| |(/_ v1.0.0 / / """ from tests import IntegrationTestCase from tests.holodeck import Request from twilio.base.exceptions import TwilioException from twilio.http.response import Response class ActivityTestCase(Integrat...
# Natural Language Toolkit: Plaintext Corpus Reader # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ Corpus reader for the XML version of the British National Corpus. """ __docformat__ = 'epytex...
# Copyright 2012 Nebula 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 ...
from datetime import datetime import actstream.actions import django_filters import json from django.contrib.contenttypes.models import ContentType from django.db.models import Q from rest_framework import serializers, viewsets, permissions, filters, status, pagination from rest_framework.decorators import detail_rout...
# Copyright (c) 2017-2019 Uber Technologies, Inc. # SPDX-License-Identifier: Apache-2.0 import itertools import math import numbers import torch import pyro.distributions as dist from pyro.util import warn_if_nan def _product(factors): result = 1.0 for factor in factors: result = result * factor ...
from sketch_components.engines.base.converters import BaseSketchStyle, \ SketchColor from sketch_components.engines.react.base import converters from sketch_components.utils import update_existing, combine_styles, \ remove_existing, hyphen_to_small_camel, \ transform_dict_keys from .components.button import...
"""Implementation of the WebSocket protocol. `WebSockets <http://dev.w3.org/html5/websockets/>`_ allow for bidirectional communication between the browser and server. WebSockets are supported in the current versions of all major browsers, although older versions that do not support WebSockets are still in use (refer ...
from bot.hardware.IR import IR from side import Side from bot.driver.omni_driver import OmniDriver import bot.lib.lib as lib from time import sleep from time import time from pid import PID import os.path import yaml bound = lambda x, l, u: l if x < l else u if x > u else x MAX_VALUE = 800 class Navigation(object): ...
""" ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. ...
#!/usr/bin/env python import os import subprocess from staticbuilder import StaticBuilder def test(): """ Test harness for static builder. Checks SB both as imported object and command line utility. Test paths must be set up correctly: (TODO: create setup function to automate d...
"""ACME client API.""" import datetime import heapq import logging import time import six from six.moves import http_client # pylint: disable=import-error import OpenSSL import requests import sys import werkzeug from acme import errors from acme import jose from acme import jws from acme import messages logger =...
# Copyright 2016 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...
""" db.py Functions that interact with the database. """ from osmhm import connect def add_watched_user(username, reason=None, author=None, authorid=None, email=None): """ Add user to watched user list for tracking. Inputs ------ username : str Username to track reason : str, optiona...
#!/usr/bin/env python # Copyright 2015 gRPC 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 applicable law o...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 Jacob Kaplan-Moss # Copyright 2011 OpenStack LLC # Copyright 2011 Piston Cloud Computing, Inc. # Copyright 2013 Alessio Ababilov # Copyright 2013 Grid Dynamics # Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache Lice...
from .._abstract.abstract import BaseSecurityHandler, BaseAGSServer from ..security.security import AGSTokenSecurityHandler import json, types ######################################################################## class GlobeServiceLayer(BaseAGSServer): """ Represents a single globe layer """ _url = N...
# 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 2013 dotCloud 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 t...
#!/usr/bin/python # # Copyright (c) 2013 Juniper Networks, Inc. All rights reserved. # import sys import argparse import ConfigParser from provision_bgp import BgpProvisioner from vnc_api.vnc_api import * from vnc_admin_api import VncApiAdmin class ControlProvisioner(object): def __init__(self, args_str=None): ...
# Copyright (C) 2004, Thomas Hamelryck (thamelry@binf.ku.dk) # This code is part of the Biopython distribution and governed by its # license. Please see the LICENSE file that should have been included # as part of this package. """Vector class, including rotation-related functions.""" import numpy def m2rotaxis(m)...
# 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...
import math from unittest import mock import os import pytest import requests import shutil import struct import time from girder.constants import SortDir from girder.models.file import File from girder.models.item import Item from girder.models.setting import Setting from girder.models.token import Token from girder....
""" Support for the NetAtmo Weather Service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.netatmo/ """ import logging from datetime import timedelta import voluptuous as vol from homeassistant.components.sensor import PLATFORM_SCHEMA from home...
""" Tests for salt.modules.zpool :codeauthor: Nitin Madhok <nmadhok@g.clemson.edu>, Jorge Schrauwen <sjorge@blackdot.be> :maintainer: Jorge Schrauwen <sjorge@blackdot.be> :maturity: new :depends: salt.utils.zfs :platform: illumos,freebsd,linux """ import pytest import salt.loader import salt.mod...
import random import itertools import numpy as np import tensorflow as tf from tensorflow.python.ops.rnn_cell import BasicLSTMCell, GRUCell from basic_cnn.read_data import DataSet from basic_cnn.superhighway import SHCell from my.tensorflow import exp_mask, get_initializer, VERY_SMALL_NUMBER from my.tensorflow.nn imp...
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use t...
#!/usr/bin/env python3 import functools import os import string import urllib from blog import Blog from bottle import route, run, template, jinja2_view, url, Jinja2Template, response from utilities import Log # ----- INITIALIZE THE BLOG ----- # # I'm not sure I'm happy with this; but making it all static doesn'...
# Copyright 2013, Big Switch Networks, 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 applic...
#!/usr/bin/env python # Software License Agreement (BSD License) # # Copyright (c) 2017, Southwest Research Institute (SwRI) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # * Redistributions...
#!/usr/bin/env vpython # Copyright (c) 2013 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. """ Tool to perform checkouts in one easy command line! Usage: fetch <config> [--property=value [--property2=value2 ...]] This...
# Copyright (c) OpenMMLab. All rights reserved. import bisect import math from collections import defaultdict from unittest.mock import MagicMock import numpy as np import pytest from mmdet.datasets import (ClassBalancedDataset, ConcatDataset, CustomDataset, MultiImageMixDataset, RepeatDat...
# 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 inspect from itertools import count from pathlib import Path import base64 try: from dataclasses import is_dataclass # noqa from .dataclass import SerDataClass except ImportError: def is_dataclass(x): return False def SerDataClass(): return None from ..interface import (Fail, ...
# -*- coding: utf8 -*- """ Burp-UI is a web-ui for burp backup written in python with Flask and jQuery/Bootstrap .. module:: burpui.cli :platform: Unix :synopsis: Burp-UI CLI module. .. moduleauthor:: Ziirish <hi+burpui@ziirish.me> """ import os import sys import time import click if os.getenv("BUI_MODE") in...
#!/usr/bin/python2.4 # -*- coding: us-ascii -*- # vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab # $Id$ """ Web-interactive Python debugger. """ import sys, os import linecache import bdb import re try: from repr import Repr except ImportError: from reprlib import Repr # Create a custom safe Repr instance...
__author__ = 'ZSGX' from model.contact import Contact class ContactHelper: def __init__(self, app): self.app = app def fill_contact_form(self, Contact): wd = self.app.wd self.app.edit_field(field_name="firstname", text=Contact.firstname) self.app.edit_field(field_name="middle...
# Dual Annealing implementation. # Copyright (c) 2018 Sylvain Gubian <sylvain.gubian@pmi.com>, # Yang Xiang <yang.xiang@pmi.com> # Author: Sylvain Gubian, Yang Xiang, PMP S.A. """ A Dual Annealing global optimization algorithm """ from __future__ import division, print_function, absolute_import import numpy as np fr...
# -*- coding: utf-8 -*- import re import random from types import MethodType from django.http import HttpResponseRedirect from django.http import SimpleCookie from django.http import HttpRequest from django.conf import settings try: from threading import local except ImportError: from django.utils._threadin...
# 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 use ...
import os import numpy as np import matplotlib import matplotlib.pyplot as plt from orbitdeterminator.doppler.utils.constants import * from orbitdeterminator.doppler.utils.utils import * from mpl_toolkits.mplot3d import Axes3D def plot_sphere(ax, d:np.ndarray, n:np.ndarray) -> None: """ Plots a sphere on a given...
# Copyright (c) 2015, MapR Technologies # # 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...
''' Input recorder ============== .. versionadded:: 1.1.0 .. warning:: This part of Kivy is still experimental and this API is subject to change in a future version. This is a class that can record and replay some input events. This can be used for test cases, screen savers etc. Once activated, the recorde...
""" Platform for the Garadget cover component. For more details about this platform, please refer to the documentation https://home-assistant.io/components/garadget/ """ import logging import requests import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.components.cover im...
# 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 may ...
from __future__ import (absolute_import, division, print_function, unicode_literals) from matplotlib.externals import six import numpy as np from .axes_divider import make_axes_locatable, Size, locatable_axes_factory import sys from .mpl_axes import Axes def make_rgb_axes(ax, pad=0.01, axes_...
# Copyright 2013 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...
#!/usr/bin/env # -*- coding: utf-8 -*- """ Created on Sat Oct 15 14:15:16 2016 @author of the file: smrak Autrors of the code: Greg Starr and Michael Hirsch """ from __future__ import division,absolute_import,print_function import numpy as np from datetime import datetime from pandas import Panel4D, DataFrame, Series ...
from django.core.management.base import BaseCommand, CommandError from django.conf import settings from django.db import connection from django.db import IntegrityError from protein.models import (Protein, ProteinGProtein,ProteinGProteinPair, ProteinConformation, ProteinState, ProteinFamily, ProteinAlias, Prot...
"""ML-ENSEMBLE :author: Sebastian Flennerhag :copyright: 2017-2018 :licence: MIT Base classes for ensemble layer management. """ # pylint: disable=protected-access # pylint: disable=too-many-arguments # pylint: disable=too-many-instance-attributes from __future__ import division, print_function, with_statement fro...
#!/usr/bin/env python # encoding: utf-8 import os from types import NoneType from xmlrpclib import DateTime import mock from nose.tools import * from webtest_plus import TestApp from tests.base import OsfTestCase from tests.factories import (UserFactory, ProjectFactory, NodeFactory, AuthFactory, PointerFactory, ...
# 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...
#!/usr/local/sci/bin/python #***************************** # # plot failure rate for each test and overall for variables # # #************************************************************************ # SVN Info #$Rev:: 120 $: Revision of last commit #$Author:...
# 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 # distributed under t...
""" Management of the Salt scheduler ============================================== .. code-block:: yaml job3: schedule.present: - function: test.ping - seconds: 3600 - splay: 10 This will schedule the command: test.ping every 3600 seconds (every hour) splaying the time betw...
#!/usr/bin/env python2.7 # # Copyright 2017 Google Inc, 2019 Open GEE Contributors. # # 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 # # Unl...
from sqlalchemy import exc from sqlalchemy import testing from sqlalchemy.engine import default from sqlalchemy.orm import joinedload from sqlalchemy.orm import mapper from sqlalchemy.orm import relationship from sqlalchemy.orm import Session from sqlalchemy.testing import assert_raises_message from sqlalchemy.testing ...
# (C) Copyright 2017 IBM Corp. # (C) Copyright 2017 Inova Development 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-...
# Copyright (c) 2013 Rackspace, 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 wr...
# Copyright 2019 The Magenta 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 applicable law or agreed to in ...
#! /usr/bin/env python3 ## -*- coding: utf-8 -*- from __future__ import print_function from triton import * import random import string import sys import lief import os DEBUG = True INPUT = 'arm32' SERIAL = None TARGET = os.path.join(os.path.dirname(__file__), 'crackme_hash-arm') VALID = False FINISH = False...
# These are tests for the IActiveScript related interfaces. They are # written in Python as the pywin32 package provides support for the vtable # based interfaces used - meaning the other (reasonable) alternative # would be C++. # The intention is that whereever possible, we use the Windows Scripting # Host to test...
#!/usr/bin/env python import os import shutil import sqlite3 import sys import uuid import database as gemini_db import gemini_load_chunk def append_variant_info(main_curr, chunk_db): """ Append the variant and variant_info data from a chunk_db to the main database. """ cmd = "attach ? as toMerg...
# # Copyright (C) 2009, Jose Antonio Martin H. # #http://rl-glue-ext.googlecode.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...
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # Denis Engemann <denis.engemann@gmail.com> # Eric Larson <larson.eric.d@gmail.com> # # License: BSD (3-clause) import numpy as np from .peak_finder import peak_finder from .. import pick_types, pick_channels from ..utils import...
import time from copy import deepcopy from typing import Any, Dict, List, Optional import orjson from zerver.lib.test_classes import ZulipTestCase from zerver.models import Draft class DraftCreationTests(ZulipTestCase): def create_and_check_drafts_for_success(self, draft_dicts: List[Dict[str, Any]], ...
import sys import platform from numpy.testing import * import numpy.core.umath as ncu import numpy as np class TestDivision(TestCase): def test_division_int(self): # int division should follow Python x = np.array([5, 10, 90, 100, -5, -10, -90, -100, -120]) if 5 / 10 == 0.5: as...
"""Selection classes. Represents an enumeration using a widget. """ # Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. from collections import OrderedDict from .domwidget import DOMWidget from .widget import register from traitlets import (Unicode, Bool, Any, Dict, T...
# 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 may ...
import json from bson import ObjectId from django.core.urlresolvers import reverse from django.contrib.auth.decorators import login_required from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist from django.http import HttpResponseRedirect, HttpResponse from django.shortcut...
from __future__ import unicode_literals from django import forms from django.forms.formsets import BaseFormSet, DELETION_FIELD_NAME from django.forms.utils import ErrorDict, ErrorList from django.forms.models import modelform_factory, inlineformset_factory, modelformset_factory, BaseModelFormSet from django.test impor...
# # Module which supports allocation of ctypes objects from shared memory # # multiprocessing/sharedctypes.py # # Copyright (c) 2006-2008, R Oudkerk # Licensed to PSF under a Contributor Agreement. # from __future__ import absolute_import import ctypes import weakref from . import heap, RLock from .forking import ass...
#!/usr/bin/env python # encoding: utf-8 """ This module of native functions is implemented for compatability with 010 editor functions. Some of these functions are nops, some are fully implemented. """ import six import sys from pfp.native import native import pfp.fields import pfp.errors as errors import pfp.bitwra...