gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
#! /usr/bin/env python3
import sys
import lexer
from tree import Node, CompositeNode
class SymbolDesc:
def __init__(self, symbol, lprio, rprio, evaluator):
self.symbol = symbol
self.lprio = lprio
self.rprio = rprio
self.evaluator = evaluator
def __repr__(self):
return... | |
# -*- coding: utf-8 -*-
"""
Auth* related model.
This is where the models used by :mod:`repoze.who` and :mod:`repoze.what` are
defined.
It's perfectly fine to re-use this definition in the Brie application,
though.
"""
import os
from datetime import datetime
import sys
try:
from hashlib import sha1
except 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"); you may not u... | |
# 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://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | |
# 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... | |
"""
Tests for .objective.modifiers module.
"""
import abc
from taipan.objective.base import Object
from taipan.functional.functions import const
from tests.test_objective.test_base import _UniversalBaseClass
import taipan.objective.modifiers as __unit__
# @abstract
class _Abstract(_UniversalBaseClass):
def _a... | |
import pygame
from pygame.locals import *
from util import debug, file_list, gamedir
from imagecache import ImageCache
from util import file_path
def render_text (text, size=32, color=(0,0,0), font=None):
#font = pygame.font.SysFont('monospace', size)
if font is None:
font = pygame.font.Font(file_path(... | |
# -*- coding: utf-8 -*-
from __future__ import with_statement
from contextlib import contextmanager
import inspect
import os
from itertools import chain
from django.conf import settings
from django.template import Lexer, TOKEN_BLOCK
from django.utils.decorators import method_decorator
from django.utils.termcolors impor... | |
#
# 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 us... | |
"""
mbed SDK
Copyright (c) 2011-2013 ARM 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 License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | |
"""
Tests for the http.client module
Adapted for the python-future module from the Python 2.7 standard library
tests. The adaptations are to cope with the unicode_literals syntax.
"""
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from future import standa... | |
# 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... | |
import base64
import os
import email
import urllib.parse
import urllib.request
import http.server
import threading
import unittest
import hashlib
from test import support
try:
import ssl
except ImportError:
ssl = None
here = os.path.dirname(__file__)
# Self-signed cert file for 'localhost'
CERT_localhost = o... | |
__author__ = 'chris'
import base64
import bitcointools
import json
import nacl.encoding
import nacl.signing
import os
import random
import re
import time
from binascii import unhexlify
from bitcoin import SelectParams
from bitcoin.core.script import CScript, OP_2, OP_3, OP_CHECKMULTISIG
from bitcoin.wallet import P2SH... | |
# 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... | |
#!/bin/python
import ck.kernel as ck
import copy
import re
import argparse
import os
import json
#######################################
# Description:
#
# KERNEL = xgemm client
# INPUT = SIZE (M,N,K); PRECISION
# OUTPUT = CONFIGURATION
#######################################
'''
Set interval or Resolutio... | |
#!/usr/bin/env python
# This example demonstrates the use of fields and use of
# vtkProgrammableDataObjectSource. It creates fields the hard way (as
# compared to reading a vtk field file), but shows you how to
# interface to your own raw data.
import os
import re
import vtk
from vtk.util.misc import vtkGetDataRoot
V... | |
# 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 contextlib
import csv
import locale
import pickle
import re
import subprocess
import sys
import warnings
from tempfile import NamedTemporaryFile
from os import path, unlink
from ast import literal_eval
from math import isnan
from numbers import Number
from itertools import chain, repeat
from functools import lr... | |
# Copyright (c) 2014 Alex Meade. All rights reserved.
# Copyright (c) 2014 Clinton Knight. All rights reserved.
# Copyright (c) 2014 Andrew Kerr. All rights reserved.
# Copyright (c) 2015 Tom Barron. All rights reserved.
# Copyright (c) 2015 Goutham Pacha Ravi. All rights reserved.
# Copyright (c) 2015 Dustin Schoe... | |
#!/usr/bin/env python
"""
A simple test client for the lua debugger.
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 ... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P.
# Copyright 2013 Canonical Corp.
# 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
... | |
# Copyright 2011 OpenStack Foundation.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance w... | |
"""
Load test suite descriptions and generate test runner files.
"""
import yaml
import os
import os.path
from textwrap import dedent
import re
import json
from jinja2 import Environment, PackageLoader
import urllib
import logging
LOGGER = logging.getLogger(__name__)
# Set up the template environment
TEMPLATE_LOADER ... | |
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
# Tree (Hierarchical) Nested Set Model (nsm)
#
# To use the nested set model,
# use the following pattern
# 1. name your parent field as "parent_item_group" if not have a property nsm_parent_field as your field name in ... | |
# This file is part of the Indico plugins.
# Copyright (C) 2020 - 2021 CERN and ENEA
#
# The Indico plugins are free software; you can redistribute
# them and/or modify them under the terms of the MIT License;
# see the LICENSE file for more details.
from flask import flash, has_request_context, request, session
from ... | |
import unittest
import json
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from magmaweb.models import ReactionSequence, Molecule, Reaction
from magmaweb.models import fill_molecules_reactions
class TestReactionSequence(unittest.TestCase):
reactions = {
'products': [{
... | |
from datetime import datetime, timedelta
import pytest
from freezegun import freeze_time
from sqlalchemy.exc import IntegrityError
from app.dao.emails_dao import (
dao_add_member_sent_to_email,
dao_get_emails_for_year_starting_on,
dao_get_emails_sent_count,
dao_get_todays_email_count_for_provider,
... | |
from decimal import Decimal
from django.db.models import Count
from django.test import TestCase
from django.urls import reverse
from meadery.models import Ingredient, Parent, Recipe, Batch, Sample, Product
from unittest import skipIf
# views.py
# show_category edge cases
# show_product post (add to cart)
# add_review... | |
"""HTTP/1.1 client library
<intro stuff goes here>
<other stuff, too>
HTTPConnection goes through a number of "states", which define when a client
may legally make another request or fetch the response for a particular
request. This diagram details these state transitions:
(null)
|
| HTTPConnection()... | |
# Copyright 2014 Google 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 a... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, 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:
#
# * Redistrib... | |
data = (
'Mou ', # 0x00
'Ye ', # 0x01
'Wei ', # 0x02
'[?] ', # 0x03
'Teng ', # 0x04
'Zou ', # 0x05
'Shan ', # 0x06
'Jian ', # 0x07
'Bo ', # 0x08
'Ku ', # 0x09
'Huang ', # 0x0a
'Huo ', # 0x0b
'Ge ', # 0x0c
'Ying ', # 0x0d
'Mi ', # 0x0e
'Xiao ', # 0x0f
'Mi ', # 0x10
'Xi ... | |
# Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# 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... | |
import logging
import random
import jsonfield
from datetime import datetime
from django.db import models
from django.db.models import Count
from django.contrib.sites.models import Site
from django.contrib.auth.models import User
from django.utils.encoding import smart_unicode
from django.db.models import Q
from django.... | |
import os
import csv
import shutil
import zipfile
import requests
import string
from decimal import Decimal
from datetime import datetime
from django.conf import settings
from django.core.management.base import BaseCommand
from irs.models import F8872, Contribution, Expenditure, Committee
# These are terms in the raw... | |
from pandac.PandaModules import *
from toontown.toonbase.ToontownGlobals import *
from direct.gui.DirectGui import *
from pandac.PandaModules import *
from direct.showbase import DirectObject
from direct.directnotify import DirectNotifyGlobal
from direct.fsm import StateData
from toontown.toonbase import ToontownGlobal... | |
from __future__ import absolute_import, print_function, division
from operator import itemgetter, attrgetter
from petl.compat import text_type
from petl.util.base import asindices, records, Table, values, rowgroupby
from petl.errors import DuplicateKeyError
from petl.transform.basics import addfield
from petl.trans... | |
# 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... | |
from __future__ import annotations
import abc
import copy
import logging
from enum import Enum
from pathlib import Path
from rasa.shared.core.events import Event
from typing import (
Any,
List,
Optional,
Text,
Dict,
Callable,
Union,
Tuple,
TYPE_CHECKING,
)
import numpy as np
from r... | |
"""Paginators for iterating over API results."""
from urllib.parse import parse_qs, urlencode, urlsplit, urlunsplit
class InvalidPageError(Exception):
"""An error representing an invalid page access."""
class BasePaginator(object):
"""Base class for a paginator used in the hosting services code.
This ... | |
import traceback
import logging
import psycopg2
import psycopg2.extras
import psycopg2.extensions as ext
import sqlparse
import pgspecial as special
from .packages.function_metadata import FunctionMetadata
from .encodingutils import unicode2utf8, PY2, utf8tounicode
import click
_logger = logging.getLogger(__name__)
... | |
# -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | |
#-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2019, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | |
from os.path import abspath, expanduser, isfile, dirname, isdir, basename, join, splitext
import networkx as nx
import re
import tempfile
from time import asctime
from snarkx.io import ParseFileError
__all__ = ['GraphReaderBA', 'GraphWriterBA']
class GraphReaderBA(object):
def __init__(self, path):
# p... | |
from __future__ import absolute_import
import collections
import errno
import operator
import select
import sys
_original_select = select.select
class Poll(object):
"a greenhouse poller using the poll system call"
INMASK = getattr(select, 'POLLIN', 0)
OUTMASK = getattr(select, 'POLLOUT', 0)
ERRMASK ... | |
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from numpy.testing import assert_array_equal
import pytest
from astropy import units as u
from astropy.coordinates import Angle
from astropy.uncertainty.core import Distribution
from astropy.uncertainty import distributions as ds
from ... | |
"""IO methods for radar data from MYRORSS or MRMS.
MYRORSS = Multi-year Reanalysis of Remotely Sensed Storms
MRMS = Multi-radar Multi-sensor
"""
import os
import glob
import warnings
import numpy
import pandas
from netCDF4 import Dataset
from gewittergefahr.gg_io import netcdf_io
from gewittergefahr.gg_utils import ... | |
# Copyright (C) 2012 Nippon Telegraph and Telephone 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 appli... | |
#===============================================================================
# OMDb API Search Script - Module - getdat
#-------------------------------------------------------------------------------
# Version: 0.1.3
# Updated: 03-11-2013
# Author: Alex C.
# License: MIT
#------------------------------------------... | |
# 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... | |
# 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 ... | |
#!/usr/bin/env python3
# Copyright (c) 2014-2016 The Stardust Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""
Exercise the wallet backup code. Ported from walletbackup.sh.
Test case is:
4 nodes. 1 2 and 3 sen... | |
import os
from numpy import array,abs,empty,ndarray
from generic import obj
from simulation import SimulationInput
from developer import DevBase
from debug import *
lcs = ls
# support functions for keyword files
def remove_comment(sval):
if ' ' in sval:
sval = sval.split(' ',1)[0]
#end if
retur... | |
# -*- coding: utf-8 -*-
"""CUPS Internet Printing Protocol (IPP) files."""
import os
from dfdatetime import rfc2579_date_time as dfdatetime_rfc2579_date_time
from dtformats import data_format
from dtformats import errors
class CupsIppFile(data_format.BinaryDataFile):
"""CUPS Internet Printing Protocol (IPP) file... | |
"""
This file is part of the everest project.
See LICENSE.txt for licensing, CONTRIBUTORS.txt for contributor information.
Created on Nov 17, 2011.
"""
import os
from pkg_resources import resource_filename # pylint: disable=E0611
from pyramid.compat import bytes_
from pyramid.compat import native_
from pyramid.testin... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# no... | |
# flake8: noqa
COMMANDS = {'APPEND': {'arity': 3L,
'flags': ['write', 'denyoom'],
'key_spec': (1, 1, 1)},
'AUTH': {'arity': 2L,
'flags': ['readonly', 'noscript', 'loading', 'stale', 'fast'],
'key_spec': (0, 0, 0)},
'BGREWRITEAOF': {'arity': 1L,
'flags': [... | |
# Copyright 2022 UW-IT, University of Washington
# SPDX-License-Identifier: Apache-2.0
from sis_provisioner.dao.course import (
get_sections_by_instructor_and_term, valid_academic_course_sis_id,
valid_adhoc_course_sis_id)
from sis_provisioner.dao.term import get_term_by_year_and_quarter
from sis_provisioner.da... | |
#!/usr/bin/env python3
"""
File: tar-smart-backup.py
Author: Evgeniy Klemin
Email: evgeniy.klemin@gmail.com
Github: https://github.com/evgeniy-klemin/tar-smart-backup
Description: Backup directory by incremental tar
"""
import argparse
import sys
import subprocess
import os
import errno
import shutil
import logging
im... | |
import os
from fabric.api import task, run, env, settings, cd
from fabtools.vagrant import ssh_config, _settings_dict
import fabtools
from fabtools import require
from fabric.contrib import files
@task
def vagrant(name=''):
config = ssh_config(name)
extra_args = _settings_dict(config)
env.update(extra_arg... | |
import logging
import traceback
from typing import Union, Tuple
import numpy as np
from gi.repository import Gtk
from matplotlib.backends.backend_gtk3 import NavigationToolbar2GTK3
from matplotlib.backends.backend_gtk3agg import FigureCanvasGTK3Agg
from matplotlib.figure import Figure
from matplotlib.widgets import Cu... | |
#!/usr/bin/python2.4
# Copyright (c) 2006-2008 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.
'''The 'grit resize' tool.
'''
import getopt
import os
import types
from grit.tool import interface
from grit.tool import bui... | |
# -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
# Contributor(s) : Florent Xicluna (Wingo SA)
#
# WARNING: This program as such is intended... | |
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# 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... | |
import json
import pickle
import time
import pytest
import zmq
import osbrain
from osbrain import run_agent
from osbrain.address import AgentAddressSerializer
from osbrain.agent import TOPIC_SEPARATOR
from osbrain.agent import compose_message
from osbrain.agent import deserialize_message
from osbrain.agent import ser... | |
import agents as ag
import envgui as gui
import random
# ______________________________________________________________________________
loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world
def RandomVacuumAgent():
"Randomly choose one of the actions from the vacuum environment."
p = ag.Ra... | |
# Copyright 2011 Nicholas Bray
#
# 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... | |
import sys
import rospy
import socket
import shutil
import os
import requests
import threading
from lg_common import ManagedApplication, ManagedWindow
from lg_common.tcp_relay import TCPRelay
from lg_msg_defs.msg import ApplicationState
from tornado.websocket import websocket_connect
DEFAULT_BINARY = '/usr/bin/google... | |
"""DHCPv4 Client Classification - default classes"""
# pylint: disable=invalid-name,line-too-long
import pytest
import srv_control
import misc
import srv_msg
@pytest.mark.v4
@pytest.mark.classification
@pytest.mark.default_classes
@pytest.mark.disabled
def test_v4_client_classification_one_class_docsis3_boot_file_... | |
# -*- 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 field 'UserInteraction.makey'
db.add_column(u'catalog_userinteraction', 'makey',
... | |
__all__ = [
'schema_cp2k_general_settings', 'schema_derivative_couplings', 'schema_single_points',
'schema_distribute_absorption_spectrum',
'schema_distribute_derivative_couplings',
'schema_distribute_single_points',
'schema_absorption_spectrum']
from numbers import Real
from schema import (And, O... | |
"""
mbed SDK
Copyright (c) 2011-2013 ARM 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 License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... | |
# Copyright (c) 2018 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... | |
"""
Copyright (c) 2015 Red Hat, Inc
All rights reserved.
This software may be modified and distributed under the terms
of the BSD license. See the LICENSE file for details.
"""
import pytest
import atomic_reactor.util
import docker.errors
from atomic_reactor.build import InsideBuilder, BuildResult
from atomic_reactor... | |
#!/usr/bin/env python
# -*- utf-8 -*-
import re
import copy
import time
# This is const data
direct = ['u', 'r', 'd', 'l']
direct_vector = [{'x' : -1, 'y' : 0},
{'x' : 0, 'y' : 1},
{'x' : 1, 'y' : 0},
{'x' : 0, 'y' : -1}]
def calculateNum(i, f, y):
return i * y + f
def is_empty_not_chang... | |
# Copyright 2021 Google LLC
#
# 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, ... | |
import collections
import itertools
import json
import logging as logmodule
import os
import re
import sys
import tempfile
import uuid
import zipfile
from itertools import chain
from django.conf import settings
from django.core.files import File
from django.core.files.storage import default_storage as storage
from dja... | |
# coding: utf-8
'''
------------------------------------------------------------------------------
Copyright 2018 Esri
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/lic... | |
"""
Configure a Pacemaker/Corosync cluster with PCS
===============================================
Configure Pacemaker/Cororsync clusters with the
Pacemaker/Cororsync conifguration system (PCS)
:depends: pcs
.. versionadded:: 2016.3.0
"""
import logging
import salt.utils.path
log = logging.getLogger(__name__)
... | |
#encoding: utf-8
__all__ = ['StartResponse', 'StartResponseCalledTwice', 'Plugin', 'run_command', 'validate_input_params', 'Wsgid']
import sys
import logging
import plugnplay
from command import ICommand
import parser
import re
import os
from wsgid import __version__
from wsgid import conf
from wsgid.interfaces.filte... | |
import json
from indy.did import create_and_store_my_did
from indy.ledger import build_node_request, build_nym_request, \
build_get_txn_request
from indy.pool import refresh_pool_ledger
from plenum.test.node_catchup.helper import waitNodeDataEquality
from stp_core.loop.looper import Looper
from stp_core.types imp... | |
# -*- coding: utf-8 -*-
# Natural Language Toolkit: Transformation-based learning
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Marcus Uneson <marcus.uneson@gmail.com>
# based on previous (nltk2) version by
# Christopher Maloof, Edward Loper, Steven Bird
# URL: <http://nltk.org/>
# For license information, see... | |
# coding=utf-8
# Copyright 2020 The HuggingFace Team. 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... | |
"""
Django settings for columbus project on production server.
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
import os
import socket
import mimetypes
mimetypes.add_type("image/svg+xml", ".svg", True)
mimetypes.add_type("image/svg+xml", ".svgz", True)
# Webservice for Galileo. Needed only... | |
# -*- coding: utf-8 -*-
# Copyright (C) 2008-2017, Luis Pedro Coelho <luis@luispedro.org>
# vim: set ts=4 sts=4 sw=4 expandtab smartindent:
#
# 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... | |
# (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
# Also licenced under the Apache License, 2.0: http://opensource.org/licenses/apache2.0.php
# Licensed to PSF under a Contributor Agreement
"""
Middlew... | |
#
# Milovision: A camera pose estimation programme
#
# Copyright (C) 2013 Joris Stork
# See LICENSE.txt
#
# ellipse.py
"""
:synopsis: Contains the EllipseFitter class, a PipelineModule used to fit
ellipses to the pipeline's sequences of contours.
.. moduleauthor:: Joris Stork <joris@wintermute.eu>
"""
... | |
#!/usr/bin/python
#
# Copyright (c) 2015 CenturyLink
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['previe... | |
# coding: utf-8
#
# Copyright 2014 The Oppia 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 requi... | |
"""Support for WeMo humidifier."""
import asyncio
import logging
from datetime import timedelta
import requests
import async_timeout
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
from homeassistant.components.fan import (
DOMAIN,
SUPPORT_SET_SPEED,
FanEntity,
SPEED_OFF,... | |
import cme
import os
import logging
import re
import tempfile
from sys import exit
from string import ascii_lowercase
from random import choice, randrange, sample
from subprocess import check_output, call
from cme.helpers.misc import gen_random_string, which
from cme.logger import CMEAdapter
from base64 import b64encod... | |
from __future__ import absolute_import
from datetime import datetime, timedelta
from kombu import Queue
from celery import Task
from celery.exceptions import Retry
from celery.five import items, range, string_t
from celery.result import EagerResult
from celery.utils import uuid
from celery.utils.timeutils import pa... | |
import copy
import time
import warnings
from collections import deque
from contextlib import contextmanager
import _thread
import pytz
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db import DEFAULT_DB_ALIAS
from django.db.backends import utils
from django.db.bac... | |
#!/usr/bin/python
"""@package tester.py.in
Integration tests for obfsproxy.
The obfsproxy binary is assumed to exist in the current working
directory, and you need to have Python 2.6 or better (but not 3).
You need to be able to make connections to arbitrary high-numbered
TCP ports on the loopback interface.
"""
imp... | |
#!/usr/bin/env python
# coding=utf8
from datetime import timedelta, datetime
import json
import sys
if sys.version_info < (2, 7):
import unittest2 as unittest
else:
import unittest
import time
from flask import Flask, session
from flaskext.kvsession import SessionID, KVSessionExtension, KVSession
from itsda... | |
# 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 agree... | |
import unittest
import numpy
import chainer
from chainer import testing
import chainer.testing.backend
import chainerx
def _get_expected_xp(backend_config, is_function):
# Returns a pair of xp's expected in forward() and backward() respectively.
xp = backend_config.xp
if xp is chainerx:
forward... | |
"""
Copyright (c) 2014 Miguel Grinberg
Copyright (c) 2015 Alexandru Ciobanu
"""
from datetime import timedelta
import functools
from time import time
from threading import Thread
from werkzeug.wrappers import Response
from flask import jsonify, url_for, request, make_response, current_app
from flask import g, abort
fro... | |
"""
Implement some datastore based on SQL databases
"""
import sqlite3
from werkzeug.exceptions import NotFound, BadRequest
from .base import DataStore
from rest_api_framework.models import PkField
class SQLiteDataStore(DataStore):
"""
Define a sqlite datastore for your ressource. you have to give
__ini... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.