gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# Copyright 2020 The 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 or agreed to in writ... | |
#!/usr/bin/env python
#
# Copyright 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.
"""Instruments classes and jar files.
This script corresponds to the 'emma_instr' action in the java build process.
Depending on whe... | |
#!/usr/bin/python
import xml.etree.ElementTree as ET
import re
import math
from pprint import pprint
import sys
import codecs
import argparse
import sys
import string
from copy import copy
import os
config = {}
def loadConfig():
global config
ign = {}
execfile('config.py', ign, config)
def getConfig(filename):
f... | |
# -*- coding: utf-8 -*-
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | |
# Copyright 2014 Ahmed H. Ismail
# 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... | |
# vim:fileencoding=utf-8:ts=2:sw=2:expandtab
import sys
import os
import os.path
import re
import json
import time
import logging
import subprocess
from abc import ABCMeta, abstractmethod
from glob import glob
from importlib import import_module
from DocStruct.Base import GetSession, S3, SQS
DATADIR_PATH = '/tmp'
NU... | |
# Copyright 2016 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... | |
"""Literature:
[1] OMG Unified Modeling LanguageTM (OMG UML), Superstructure. Version 2.2.
[2] The Unified Modeling Language Reference Manual Second Edition.
James Rumbaugh, Ivar Jacobson, Grady Booch. Addison-Wesley, 2005
[3] Unified Modeling Language Specification (version 2.1)
"""
from zope.interface import Attrib... | |
# coding: utf-8
# Copyright 2014 Globo.com Player authors. All rights reserved.
# Use of this source code is governed by a MIT License
# license that can be found in the LICENSE file.
# Tests M3U8 class to make sure all attributes and methods use the correct
# data returned from parser.parse()
import arrow
import dat... | |
# TODO
#
# @author Oktay Acikalin <oktay.acikalin@gmail.com>
# @copyright Oktay Acikalin
# @license MIT (LICENSE.txt)
# TODO
# - What should happen when we load a sheet after creating/loading a map?
# - load_map() should fill up and truncate rows as necessary.
# - Handle situations where build_map builds maps of ... | |
#!/usr/bin/env python
# vim: fileencoding=utf8:et:sta:ai:sw=4:ts=4:sts=4
import logging
import traceback
import unittest
import greenhouse
import junction
import junction.errors
TIMEOUT = 0.015
PORT = 7000
GTL = greenhouse.Lock()
#junction.configure_logging(level=1)
#greenhouse.global_exception_handler(traceback.... | |
# Copyright 2020 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, ... | |
#!/usr/bin/env python2
#If you build libarea from source and get undefined symbol errors, pull
#in CMakeLists.txt from here: https://github.com/aewallin/libarea
#and rebuild (cmake/make/make install)
#Otherwise, you should just use my modified version: https://github.com/dbtayl/libarea
#This version is modified to ha... | |
"""
Batch processors
These commands implements the 'batch-command' and 'batch-code'
processors, using the functionality in evennia.utils.batchprocessors.
They allow for offline world-building.
Batch-command is the simpler system. This reads a file (*.ev)
containing a list of in-game commands and executes them in sequ... | |
"""
Testing for the gradient boosting module (sklearn.ensemble.gradient_boosting).
"""
import numpy as np
from numpy.testing import assert_array_equal
from numpy.testing import assert_array_almost_equal
from numpy.testing import assert_equal
from nose.tools import assert_raises, assert_true
from sklearn.metrics impo... | |
from __future__ import unicode_literals
from datetime import datetime, timedelta
import logging
from django.contrib.auth.models import AnonymousUser, User
from django.utils import timezone
from djblets.testing.decorators import add_fixtures
from djblets.util.dates import get_tz_aware_utcnow
from kgb import SpyAgency,... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_context import InstanceContext
from twilio.base.instance_resource import InstanceResource
from twilio.base... | |
# 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 ... | |
import json
import pytest
from lemur.api_keys.views import * # noqa
from .vectors import VALID_ADMIN_API_TOKEN, VALID_ADMIN_HEADER_TOKEN, VALID_USER_HEADER_TOKEN
@pytest.mark.parametrize("token,status", [
(VALID_USER_HEADER_TOKEN, 200),
(VALID_ADMIN_HEADER_TOKEN, 200),
(VALID_ADMIN_API_TOKEN, 200),
... | |
# Copyright 2014, Rackspace, US, 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 w... | |
#!/usr/bin/env python
__all__ = ['create_chute']
import os, sys
import numpy
import math
import pickle
from siconos.mechanics.collision.tools import Contactor
import siconos.numerics as Numerics
# WARNING : in 3D by default z-axis is upward
# this is very important to direct PLANx objects
dim = 3
box_height = 3.... | |
# Copyright 2012 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 2009-2015 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... | |
"""
Load test to test the performance of teams discussions.
"""
import os
import sys
# due to locust sys.path manipulation, we need to re-add the project root.
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))
import backoff
from collections import deque
import requests.exceptions
import js... | |
#!/usr/bin/env python3
# Copyright (c) 2016-2020 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 Hierarchical Deterministic wallet function."""
import os
import shutil
from test_framework.block... | |
'''
'''
import re
import sys
import logging
import itertools
#from datachef.ids import simple_hashstring
from amara3 import iri
from versa import SUBJECT, RELATIONSHIP, VALUE, I, VERSA_BASEIRI
from bibframe import BFZ, BFLC, BL
WORKCLASS = iri.absolutize('Work', BL)
INSTANCECLASS = iri.absolutize('Instance', BL)
... | |
#----------------------------------------------------------------------
# Copyright (c) 2008 Board of Trustees, Princeton University
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and/or hardware specification (the "Work") to
# deal in the Work without restriction, i... | |
from __future__ import unicode_literals
import os
import re
import warnings
from contextlib import contextmanager
from datetime import timedelta
from django.conf import settings
from django.contrib.auth.models import AnonymousUser, Permission, User
from django.contrib.messages.middleware import MessageMiddleware
from... | |
"""
Provides functionality to interact with lights.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/light/
"""
import asyncio
import csv
from datetime import timedelta
import logging
import os
import voluptuous as vol
from homeassistant.auth.permission... | |
"""Undocumented Module"""
__all__ = ['ClassicFSM']
"""Finite State Machine module: contains the ClassicFSM class.
This module and class exist only for backward compatibility with
existing code. New code should use the FSM module instead.
"""
from direct.directnotify.DirectNotifyGlobal import directNotify
from dire... | |
# -----------------------------------------------------------------------
# Standalone and testing code
import sys
try:
import pywraps
pywraps_there = True
print "Using pywraps"
except:
pywraps_there = False
print "Not using pywraps"
try:
import _idaapi
except:
print "Please try me from ins... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License... | |
# -*- encoding: utf-8 -*-
"""
lunaport_worker.clients
~~~~~~~~~~~~~~~~~~~~~~~
Client libs for 3rd party services interaction.
Issue trackers: JIRA, Star track.
"""
import os
import socket
from functools import wraps
import re
import json
import marshal
import pprint
pp = pprint.PrettyPrinter(indent=4)... | |
#
# Collective Knowledge (Unified modeling using R)
#
# See CK LICENSE.txt for licensing details
# See CK COPYRIGHT.txt for copyright details
#
# Developer: Grigori Fursin
#
cfg={} # Will be updated by CK (meta description of this module)
work={} # Will be updated by CK (temporal data)
ck=None # Will be updated by CK... | |
import json
import threading
import time
import os
import stat
from copy import deepcopy
from .util import user_dir, print_error, print_stderr, PrintError
from .bitcoin import MAX_FEE_RATE, FEE_TARGETS
SYSTEM_CONFIG_PATH = "/etc/electrum.conf"
config = None
def get_config():
global config
return config
... | |
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT!
import grpc
from google.cloud.container_v1.proto import (
cluster_service_pb2 as google_dot_cloud_dot_container__v1_dot_proto_dot_cluster__service__pb2,
)
from google.protobuf import empty_pb2 as google_dot_protobuf_dot_empty__pb2
class Cluste... | |
"""
the flask extension
"""
import warnings
from functools import wraps
import logging
from flask import request, current_app, g, Blueprint
from werkzeug.http import http_date
from limits.errors import ConfigurationError
from limits.storage import storage_from_string, MemoryStorage
from limits.strategies import STRAT... | |
# ----------------------------------------------------------------------------
# pyglet
# Copyright (c) 2006-2008 Alex Holkner
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistributi... | |
"""
The :mod:`sklearn.kernel_approximation` module implements several
approximate kernel feature maps base on Fourier transforms.
"""
# Author: Andreas Mueller <amueller@ais.uni-bonn.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
import scipy.sparse as sp
from scipy.linalg import svd
from .base im... | |
"""Python part of the warnings subsystem."""
import sys, re, types
__all__ = ["warn", "showwarning", "formatwarning", "filterwarnings",
"resetwarnings"]
defaultaction = "default"
filters = []
onceregistry = {}
def warn(message, category=None, stacklevel=1):
"""Issue a warning, or maybe ignore it or r... | |
import unittest
from rx import Observable
from rx.testing import TestScheduler, ReactiveTest, is_prime, MockDisposable
from rx.disposables import Disposable, SerialDisposable
on_next = ReactiveTest.on_next
on_completed = ReactiveTest.on_completed
on_error = ReactiveTest.on_error
subscribe = ReactiveTest.subscribe
sub... | |
"""Test configuration and mocks for the SmartThings component."""
import secrets
from uuid import uuid4
from pysmartthings import (
CLASSIFICATION_AUTOMATION,
AppEntity,
AppOAuthClient,
AppSettings,
DeviceEntity,
DeviceStatus,
InstalledApp,
InstalledAppStatus,
InstalledAppType,
... | |
import itertools
import os
import re
import yaml
import rdoupdate.core
from action import Action, Arg
from conf import cfg, cfg_files
import exception
import guess
from rdopkg.actionmods import copr as _copr
from rdopkg.actionmods import kojibuild
from rdopkg.actionmods import pushupdate
from rdopkg.actionmods import... | |
# This file is part of beets.
# Copyright 2015, Adrian Sampson.
#
# 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, ... | |
'''
The MIT License (MIT)
Copyright (c) 2016 Nordeus LLC
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, modify, merge, p... | |
from nose.plugins.attrib import attr
from test.integration.base import DBTIntegrationTest
import mock
import hashlib
from mock import call, ANY
import dbt.exceptions
import dbt.version
import dbt.tracking
import dbt.utils
class TestEventTracking(DBTIntegrationTest):
maxDiff = None
@property
def profile... | |
# \file API.py
# \author Andrew Kerr <arkerr@gatech.edu>
# \date
# \brief models a data collection and associated classes
#
# What is Eiger? http://www.youtube.com/watch?v=PEYiSeDr1UE
#
import copy
import numpy as np
import sqlite3
def Connect(db):
return sqlite3.connect(db)
def sortedDictionary(_dict):
r... | |
##########################################################################
#
# Copyright (c) 2012, John Haddon. All rights reserved.
# Copyright (c) 2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that ... | |
# 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... | |
'''
datetime.tzinfo timezone definitions generated from the
Olson timezone database:
ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
See the datetime section of the Python Library Reference for information
on how to use these modules.
'''
# The Olson database is updated several times a year.
OLSON_VERSION = '2014f'
VERSI... | |
#!/usr/bin/env python2
from time import time
import sys
import logging
from itertools import combinations
import json
import shlex
import os
from getpass import getpass
from timetabler.scheduler import Scheduler
from timetabler.ssc.course import Lecture, Discussion, Lab
from timetabler import sort, util
from timetabl... | |
#
# This file contains testing where PyCA results are compared to
# results from numpy. All tests can be run from the command line by:
#
# > python -m unittest discover -v -p '*UnitTest.py'
#
# To run an individual test with graphical output from ipython:
#
# import CpuGpuUnitTest as cgtest
# cgtc = cgtest.CpuGpuTestC... | |
#!/usr/bin/env python
# CAUTION: Please use SI in the project.
from __future__ import absolute_import, division
import numpy as np
from scipy.optimize import brentq
import isentropic_flow as ise_flow
import normal_shock_wave as nsw
from constants import EPSILON, R
from common import Model, View, Controller
cl... | |
#
# Copyright 2017 Vitalii Kulanov
#
# 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 os
import logging
import time
import itertools
import pandas as pd
import numpy as np
from astropy import units as u
from tardis.montecarlo.base import MontecarloRunner
from tardis.plasma.properties.base import Input
# Adding logging support
logger = logging.getLogger(__name__)
class Simulation(object):
... | |
# Copyright 2014 Scalyr 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 writing, so... | |
# coding=utf-8
"""
Processes OpenVPN metrics. This collector can process multiple OpenVPN
instances (even from a server box). In addition to the path, you may
also specify a name of the instance.
You can use both the status file or the tcp management connection to
retrieve the metrics.
To parse the status file::
... | |
import six
from swimlane.core.bulk import Replace, _BulkModificationOperation
from swimlane.core.cache import check_cache
from swimlane.core.resolver import AppResolver
from swimlane.core.resources.record import Record, record_factory
from swimlane.core.resources.report import Report
from swimlane.utils import random_... | |
# TO DO: CLEANING!!!
from django.shortcuts import render_to_response, get_object_or_404, redirect
from django import forms
from django.template import RequestContext
from django.http import HttpResponseRedirect, HttpResponse
from django.core.urlresolvers import reverse
from django.views.decorators.csrf import csrf_exem... | |
# Copyright 2018 The TensorFlow Probability 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... | |
# 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... | |
# 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# 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 compli... | |
"""Concrete implementations of the Instruction Atom type."""
from abc import ABC, abstractmethod
from typing import Callable, Set, Sequence
from pyshgp.push.atoms import InstructionMeta
from pyshgp.push.config import PushConfig
from pyshgp.push.type_library import RESERVED_PSEUDO_STACKS
from pyshgp.push.state import P... | |
# Authors: Karl MacMillan <kmacmillan@mentalrootkit.com>
#
# Copyright (C) 2006 Red Hat
# see file 'COPYING' for use and warranty information
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; ve... | |
#!/usr/bin/env python
# Author:
# Muhammad Shahbaz (muhammad.shahbaz@gatech.edu)
# Rudiger Birkner (Networked Systems Group ETH Zurich)
# Arpit Gupta (Princeton)
import argparse
from collections import namedtuple
import json
from multiprocessing.connection import Listener, Client
import os
import Queue
import sys... | |
#!/usr/bin/python
import platform
import sys
class TestSetup:
_win = {}
_linux = {}
_osx = {}
_options = []
def __init__(self, win=None, linux=None, osx=None, options=None, alias=None):
self._win = {} if win is None else win
self._linux = {} if linux is None else linux
sel... | |
#!/usr/bin/env python
#
#===- run-clang-tidy.py - Parallel clang-tidy runner ---------*- python -*--===#
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
#===--------------------------------------... | |
import sys
from compass import CompassOverlay
from raycaster import TooFarException
import raycaster
import keys
import pygame
import math
import copy
import numpy
from config import config
import frustum
import logging
import glutils
import mceutils
import itertools
import pymclevel
from math import isnan
from datet... | |
# -*- coding: utf-8 -*-
'''
Module for sending messages to Slack
.. versionadded:: 2015.5.0
:configuration: This module can be used by either passing an api key and version
directly or by specifying both in a configuration profile in the salt
master/minion config.
For example:
.. code-block:: yaml
... | |
# Copyright 2012 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 agre... | |
# Copyright 2013 NEC Corporation. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required ... | |
#!/usr/bin/python
#
# 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... | |
"""0MQ Constant names"""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
# dictionaries of constants new or removed in particular versions
new_in = {
(2,2,0) : [
'RCVTIMEO',
'SNDTIMEO',
],
(3,2,2) : [
# errnos
'EMSGSIZE',
... | |
# Copyright 2020 The Matrix.org Foundation C.I.C.
#
# 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... | |
# 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 2009 Facebook
#
# 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, s... | |
import datetime
import json
import unittest
import pytest
from firebase_admin import messaging
from firebase_admin.exceptions import (
FirebaseError,
InternalError,
InvalidArgumentError,
UnavailableError,
)
from firebase_admin.messaging import (
QuotaExceededError,
SenderIdMismatchError,
Th... | |
#!/usr/bin/env python
import os,re,sys
import csv
import logging
import gzip
from cyvcf2 import VCF, Writer
import subprocess
csv.field_size_limit(500 * 1024 * 1024)
threeLettertoOneLetterAA = {'Ala':'A','Arg':'R','Asn':'N','Asp':'D','Cys':'C','Glu':'E','Gln':'Q','Gly':'G','His':'H','Ile':'I','Leu':'L','Lys':'K', 'M... | |
# 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... | |
# 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... | |
# 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... | |
#!/usr/bin/env python3
import io
import os
import png
import shutil
import tempfile
import unittest
from pico8 import util
from pico8.game import compress
from pico8.game import file
from pico8.game import game
from pico8.game.formatter import p8
from pico8.game.formatter import p8png
from pico8.game.formatter import... | |
_stdoutlock = None
def start_stdout():
global _stdoutlock
_stdoutlock = helpers.RedirectStdout(autostart=True)
def stop_stdout():
global _stdoutlock
_stdoutlock.stop()
#rss = helpers.RedirectStdout(autostart=True)
#rss.stop()
def where_did_vsone_matches_go(hs, qcx, fnum=1):
vsone_cfg = mc3.vsone_c... | |
"""Tests for classes defining properties of ground domains, e.g. ZZ, QQ, ZZ[x] ... """
from sympy import S, sqrt, sin, oo, nan, all, Poly, Integer, Rational
from sympy.abc import x, y, z
from sympy.polys.domains import (
ZZ, QQ, RR, PythonRationalType as Q, ZZ_sympy, QQ_sympy,
RR_mpmath, RR_sympy, PolynomialR... | |
from typing import Any, AsyncContextManager, AsyncIterator, Dict, List, Optional, Set, Tuple, Type
from types import TracebackType
import os
import re
import asyncio
import urllib
import secrets
import logging
from azure.storage.blob import BlobProperties
from azure.storage.blob.aio import BlobClient, ContainerClient... | |
"""Module to download a complete playlist from a youtube channel."""
import json
import logging
from collections.abc import Sequence
from datetime import date, datetime
from typing import Dict, Iterable, List, Optional, Tuple, Union
from pytube import extract, request, YouTube
from pytube.helpers import cache, Deferre... | |
# -*- coding: utf-8 -*-
#
# Copyright (c) 2015 Gouthaman Balaraman
#
# 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
# vim: et ts=4 sw=4
import datetime
from django.template import defaultfilters
class Column(object):
"""
This class represents a table column. It is responsible for holding
metadata, and rending table cells. Like Django model/fields, columns
are usually created within the tabl... | |
#!/usr/bin/python
# Copyright 2019 The Cobalt 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... | |
import os
import six
import pytest
import numpy as np
import pandas as pd
import pandas.util.testing as tm
import ibis
import ibis.expr.operations as ops
from ibis.compat import Path, parse_version
from ibis.impala.tests.conftest import IbisTestEnv as ImpalaEnv
class RoundAwayFromZero(object):
def round(self, se... | |
"""Tests for letsencrypt.plugins.standalone.authenticator."""
import os
import psutil
import signal
import socket
import unittest
import mock
import OpenSSL
from acme import challenges
from acme import jose
from letsencrypt import achallenges
from letsencrypt.tests import acme_util
from letsencrypt.tests import tes... | |
"""
sentry.search.django.backend
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
import six
from django.db import router
from django.db.models import Q
from sentry.api.pag... | |
# -*- coding: utf-8 -*-
"""Provides interfaces to various commands provided by dcmstack
Change directory to provide relative paths for doctests
>>> import os
>>> filepath = os.path.dirname( os.path.realpath( __file__ ) )
>>> datadir = os.path.realpath(os.path.join(filepath, '../testing/data'))
>>> os.ch... | |
import hashlib
import json
import os
import sqlite3
import unittest
from app.models import User, BucketList, BucketListItem
from app.app import app
from app.helpers import *
from helpers import *
class TestBucketList(unittest.TestCase):
def setUp(self):
setupDatabase()
app.config.from_object('co... | |
#!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/thumbor/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
from os.path import join
import tempfile
import derpconf.config as c... | |
# 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 getpass
import logging
import os
import re
import subprocess
import sys
import textwrap
import xmlrpclib
from ConfigParser import ConfigParser
from datetime import datetime
from .extern.six import print_, reraise, string_types
try:
from docutils import nodes
from docutils.core import publish_parts
... | |
#
# This file is a part of the normalize python library
#
# normalize is free software: you can redistribute it and/or modify
# it under the terms of the MIT License.
#
# normalize is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FI... | |
from workalendar.core import WesternCalendar, ChristianMixin
from workalendar.core import MON, TUE, FRI
from datetime import date
class Australia(WesternCalendar, ChristianMixin):
"Australia"
include_good_friday = True
include_easter_monday = True
include_queens_birthday = False
include_labour_day... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.