gt stringclasses 1
value | context stringlengths 2.49k 119k |
|---|---|
# 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... | |
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: dan@reciprocitylabs.com
# Maintained By: miha@reciprocitylabs.com
"""ggrc.views
Handle non-RESTful views, e.g. routes which return HTML rather than... | |
"""The test for the statistics sensor platform."""
from datetime import datetime, timedelta
from os import path
import statistics
import unittest
from unittest.mock import patch
import pytest
from homeassistant import config as hass_config
from homeassistant.components import recorder
from homeassistant.components.st... | |
# Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme 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 ... | |
from __future__ import print_function, division
from sympy.core import S, sympify, Expr, Rational, Symbol, Dummy
from sympy.core import Add, Mul, expand_power_base, expand_log
from sympy.core.cache import cacheit
from sympy.core.compatibility import default_sort_key, is_sequence
from sympy.core.containers import Tuple... | |
import random
import copy
from helpers import get_actual_neighbor, in_board
# This class create a deepCopy of our board object and
# add the undo functionality to it
# now we can make any change in your staged board
# without affecting the original one.
# board state = position of each players element
# player1[(T,2,... | |
"""
Contains the CLI class that handles the original command line.
"""
"""
Copyright 2011-2013 Gregory Holt
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/LICENS... | |
#!/usr/bin/python
#
# Copyright 2011 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 b... | |
#!/usr/bin/env python
"""A test case update script.
This script is a utility to update LLVM 'llc' based test cases with new
FileCheck patterns. It can either update all of the tests in the file or
a single test function.
"""
from __future__ import print_function
import argparse
import glob
import os # Used ... | |
# -*- coding: utf-8 -*-
#!/usr/bin/env python
#
# Copyright 2012-2015 BigML
#
# 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... | |
# Copyright (c) 2016 Clinton Knight
# 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... | |
from connection import Connection
from vec3 import Vec3
from event import BlockEvent, ChatEvent
from block import Block
from entity import Entity
import math
from util import flatten, dict_to_api_string
""" Minecraft PI low level api v0.1_1
Note: many methods have the parameter *arg. This solution makes it
si... | |
"""
Rbf - Radial basis functions for interpolation/smoothing scattered Nd data. A
radial basis function (RBF) is a real-valued function whose value depends only
on the distance from the origin.
Rbf are typically used to build up function approximations of the form:
$ y(x) = \sum_{i=1}^N w_i \, \phi(||x - x_i||) ... | |
#
"""
This method implement the Avahi Service Discovery for OMiSCID
"""
import logging
import re
import socket
import dbus
import avahi
try:
from ..codebench import events
except Exception, err:
print err
from codebench import events
from dbus.mainloop.glib import DBusGMainLoop
logger = logging.getLogge... | |
#!/usr/bin/env python
'''
Ansible module for zabbix items
'''
# vim: expandtab:tabstop=4:shiftwidth=4
#
# Zabbix item ansible module
#
#
# Copyright 2015 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You m... | |
# Copyright 2015 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, s... | |
#!/usr/bin/python
import socket
import numpy as np
import sys
import signal
import time
import threading
from threading import Thread
import curses
from curses import wrapper
from curses import ascii
"""
@brief Keyboard control for the QuickBot.
@description This program is used to drive the QuickBot via the keyboar... | |
# 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 applicab... | |
import json
from django.test import TestCase
from django.test.client import RequestFactory
from rest_framework import exceptions, status
from rest_framework.request import Request
from dynamic_rest.filters import DynamicFilterBackend, FilterNode
from tests.models import Dog, Group, User
from tests.serializers import ... | |
# 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... | |
# vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright (c) 2011 Openstack, LLC.
# 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... | |
#!/usr/bin/env python
import json
import sys
import errno
import argparse
import xml.etree.ElementTree as ElementTree
from collections import namedtuple
reload(sys)
# Enable Utf-8 support. Needed if script will be run under Windows
sys.setdefaultencoding('utf-8')
class colors:
"""Class defining colorful output.... | |
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
from pymatgen.core.units import (
ArrayWithUnit,
Energy,
EnergyArray,
FloatWithUnit,
Length,
LengthArray,
Mass,
Memory,
Time,
TimeArray,
Unit,
UnitError,
unitized,
)
from py... | |
#
# Copyright (c) SAS Institute 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... | |
# Copyright 2018 PerfKitBenchmarker 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 appli... | |
from __future__ import annotations
import functools
import logging
import os
import urllib
from typing import TYPE_CHECKING
import tornado.escape
import tornado.ioloop
import tornado.web
import tornado.websocket
import mopidy
from mopidy import core, models
from mopidy.internal import jsonrpc
if TYPE_CHECKING:
... | |
# 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 python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import copy
import gyp.input
import optparse
import os.path
import re
import shlex
import sys
import traceback
from gyp.common import GypErr... | |
# Copyright 2012 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 or agreed to in... | |
from tempfile import NamedTemporaryFile
from os import path
from urlparse import urlparse
from contextlib import closing
import binascii
import calendar
import logging
import os
import re
import subprocess
import time
import uuid
import json
import urllib2
import arrow
try:
from eventlet.green.subprocess import ... | |
import win32ui
from pywin.mfc import docview
from pywin import default_scintilla_encoding
import scintillacon
import win32con
import string
import os
import codecs
import re
crlf_bytes = "\r\n".encode("ascii")
lf_bytes = "\n".encode("ascii")
# re from pep263 - but we use it both on bytes and strings.
re_encoding_byte... | |
from __future__ import absolute_import
import logging
import os
import re
from pip._vendor.six.moves.urllib import parse as urllib_parse
from pip.index import Link
from pip.utils import rmtree, display_path
from pip.utils.logging import indent_log
from pip.vcs import vcs, VersionControl
_svn_xml_url_re = re.compile... | |
# -*- coding: utf-8 -*-
"""
Copyright (c) 2012 University of Oxford
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, modif... | |
# Copyright (c) 2012 - 2015 EMC Corporation, 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
#
# ... | |
"""
Convert between frames and higher-level AMQP methods
"""
# Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2... | |
""" This module contains various functions that are special cases
of incomplete gamma functions. It should probably be renamed. """
from sympy.core import Add, S, C, sympify, cacheit, pi, I
from sympy.core.function import Function, ArgumentIndexError
from sympy.functions.elementary.miscellaneous import sqrt, root
... | |
# TestSwiftStepping.py
#
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2016 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See https://swift.org/LICENSE.txt for license information
# See https://swift.org/CONTRI... | |
'''fit and predict with many models
INVOCATION
python fit-predict.py {training_data} {neighborhood} {model} {prediction_month}
where
training_data in {train, all} specifies which data in Working/samples2 to use
neighborhood in {global, city_name} specifies whether to train a model on all cities or just t... | |
# coding=utf-8
# --------------------------------------------------------------------------
# Code generated by Microsoft (R) AutoRest Code Generator 1.1.0.0
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------... | |
import socket, ssl, re, threading, uuid, Queue
from binascii import hexlify, unhexlify, crc32, b2a_base64
from hashlib import sha1
from lxml import etree
from StringIO import StringIO
from funnydigest import funnydigest
from cred import *
from login import uic
epid="cabba291-a68d-9370-3a70-26009dc4fb0e" # TODO make... | |
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.battle.MovieSquirt
from panda3d.core import Camera, GeomNode, Point3, Point4, VBase3
from direct.interval.IntervalGlobal import *
from BattleBase import *
from BattleProps import *
from BattleSounds import *
from toontown.toon.ToonDNA import *
from too... | |
import os, sys, re, platform
import versions
import internal as _internal
_logger = _internal.getLogger(__name__)
from pymel.util import path as _path
sep = os.path.pathsep
# A source command that will search for the Python script "file" in the specified path
# (using the system path if none is provided) path and tr... | |
"""Colorize strings for output to terminal.
Typical usage looks like this::
>>> from arcutils.colorize import colorizer, printer
>>> colorized_string = colorizer.error('Whoops')
>>> colorized_string
'\\x1b[91mWhoops\\x1b[0m'
>>> print(colorized_string)
\x1b[91mWhoops\x1b[0m
>>> printer.err... | |
import os
import sys
import json
import asyncio
from unittest import mock
import pytest
from tornado.web import HTTPError
from tornado.httputil import HTTPServerRequest
from tornado.http1connection import HTTP1ConnectionParameters
import waterbutler
from waterbutler.server.app import make_app
from waterbutler.core.pa... | |
# CMPT 200 Lab 5 Queue Management System
#
# Author: Winston Kouch
# MacEwan ID: 1645889
#
# Date: November 3, 2014
#
# To start program: type in console: main()
# WARNING: !!! to avoid graphics.py crashes, use the rectangular exit
# buttons within the menu instead of clicking ... | |
# 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... | |
# -*- coding: utf-8 -*-
# Import modules
import sys
import os
import signal
import platform
import subprocess
import urllib
import json
FNULL = open(os.devnull, 'w')
# Don't show Ctrl+C error
signal.signal(signal.SIGINT, lambda x, y: sys.exit(0))
# Default project directory
projectpathvar = "/var/www/html/wp-conte... | |
from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:7069")
else:
access = Ser... | |
#!/usr/bin/env python
# Copyright (c) 2012 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.
"""Utility for checking and processing licensing information in third_party
directories.
Usage: licenses.py <command>
Commands:
... | |
from rpython.rlib import jit, objectmodel
from pycket.small_list import inline_small_list
from pycket.error import SchemeException
from pycket.base import W_Object
from pycket.callgraph import CallGraph
from pycket.config import get_testing_config
class S... | |
"""This module defines TemplateExporter, a highly configurable converter
that uses Jinja2 to export notebook files into different formats.
"""
# Copyright (c) IPython Development Team.
# Distributed under the terms of the Modified BSD License.
from __future__ import print_function, absolute_import
# Stdlib imports
i... | |
"""
Broadcast Visualization
-----------------------
Figure A.1
A visualization of NumPy array broadcasting. Note that the extra memory
indicated by the dotted boxes is never allocated, but it can be convenient
to think about the operations as if it is.
"""
# Author: Jake VanderPlas
# License: BSD
# The figure produc... | |
"""Provides access to stored IDLE configuration information.
Refer to the comments at the beginning of config-main.def for a description of
the available configuration files and the design implemented to update user
configuration information. In particular, user configuration choices which
duplicate the defaults will... | |
#
# 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... | |
# Copyright 2021, Kay Hayen, mailto:kay.hayen@gmail.com
#
# Part of "Nuitka", an optimizing Python compiler that is compatible and
# integrates with CPython, but also works on its own.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in complianc... | |
from django.apps import apps
from django.db import models
from django.db.models import Sum
from django.test import TestCase
from django.utils.timezone import now as timezone_now
from django.utils.timezone import utc as timezone_utc
from analytics.lib.counts import CountStat, COUNT_STATS, process_count_stat, \
do_... | |
from datetime import datetime, timedelta
import operator
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import iNaT
import pandas.compat as compat
from pandas.core.dtypes.common import is_datetime64_any_dtype
from pandas import (
DatetimeIndex,
DatetimeTZDtype,
Index,
NaT,
... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
import json
import yaml
import shutil
import logging
import tempfile
import subprocess
import unicodecsv
import unicodedata
from PIL import Image
"""
This script builds a directory location of canonicalized FLA data that
is used to build t... | |
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0
# For details: https://github.com/nedbat/coveragepy/blob/master/NOTICE.txt
"""Tests about understanding how third-party code is installed."""
import os
import os.path
import shutil
import sys
import pytest
from coverage import env
from... | |
from datetime import date, datetime
from functools import wraps
from unittest import mock
from django import forms
from django.conf import settings
from django.contrib.auth import get_user_model
from django.contrib.auth.models import AnonymousUser
from django.core import checks
from django.core.exceptions import Field... | |
# 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... | |
#!/usr/bin/env python2
# Copyright (c) 2014-2015 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 fee estimation code
#
from test_framework.test_framework import BitcoinTestFramework
from test_... | |
import maya.OpenMaya as om
import mtm_attribute as attribute
reload(attribute)
filterNames = ["Unit Box Filter","Gauss", "Bartlett", "Catmull Rom", "Hanning", "Blackman", "Sinc (sharpening)", "Closest Sample Filtering", "Farthest Samples Filtering", "Disable edge Antialiasing", "Object with most coverage", "Object wit... | |
# 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 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... | |
# found a way to include it more easily.
'''
SDL2 Window
===========
Windowing provider directly based on our own wrapped version of SDL.
TODO:
- fix keys
- support scrolling
- clean code
- manage correctly all sdl events
'''
__all__ = ('WindowSDL2', )
from os.path import join
from kivy import kivy... | |
"""
Classes and functions to work with files and folders
"""
__author__ = 'Team Kodi <http://kodi.tv>'
__credits__ = 'Team Kodi'
__date__ = 'Fri May 01 16:22:23 BST 2015'
__platform__ = 'ALL'
__version__ = '2.20.0'
import os, traceback, tempfile, sys, logging
logger = logging.getLogger('TVMLServer')
import xbmc
cl... | |
# 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... | |
## evolution.py
## Yuan Wang
from thesis_utils import *
from thesis_defaults import *
from thesis_poincare_utils import *
from thesis_plot_utils import *
class Evolution:
"""
Evolution functions defining a dynamical systems on C^2. Need to specify a __call__ and __str__ method.
"""
def __init__(self, ... | |
"""
.. module:: examples.brainfuck
:platform: Unix, Windows
:synopsis: Brainfuck interpreter/converter example for Graph-talk
.. moduleauthor:: Stas Kravets (krvss) <stas.kravets@gmail.com>
"""
import re
from gt.core import *
from gt.procs import FileProcessor
class BFVM(object):
"""
Brainfuck virtu... | |
# 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... | |
"""Base implementation of event loop.
The event loop can be broken up into a multiplexer (the part
responsible for notifying us of IO events) and the event loop proper,
which wraps a multiplexer with functionality for scheduling callbacks,
immediately or at a given time in the future.
Whenever a public API takes a ca... | |
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | |
# -*- coding: utf-8 -*-
import copy
from django.db import models
from django import forms
from django.http import QueryDict
from django.test import TestCase
from djangular.forms import NgModelFormMixin
from pyquery.pyquery import PyQuery
from lxml import html
CHOICES = (('a', 'Choice A'), ('b', 'Choice B'), ('c', 'Ch... | |
import pickle
import re
from unittest import mock, skipUnless
import pytest
from django.contrib.contenttypes.models import ContentType
from django.db.models.query import QuerySet
from django.template import Context, Template
from django.test import TestCase
from django.test.utils import captured_stdout, override_setti... | |
#!/usr/bin/env python
# Copyright (c) 2012 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.
import json
import os
import sys
import unittest
from api_data_source import (_JSCModel,
_FormatValue... | |
# Copyright (c) 2009, Joseph Lisee
# 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 of source code must retain the above copyright
# notice, this list of conditions an... | |
#
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@... | |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Created on Thu Apr 20 09:53:42 2017
@author: sofiasilva
"""
"""
1. Generate per-prefix statistics
1a. Latency in creating delegations (domain DB) OK
1b. Check how many networks have DNSSEC delegations (ds-rdata) (domain DB) OK
1c. Compute coverage of space with revers... | |
from __future__ import absolute_import, print_function
from collections import Iterable, Mapping, OrderedDict
import atexit
import datetime
import time
import os
import re
import warnings
import alembic.ddl
import sqlalchemy
import six
DATABASE_NAME = os.environ.get("SCRAPERWIKI_DATABASE_NAME",
... | |
"""Undocumented Module"""
__all__ = ['Messenger']
from .PythonUtil import *
from direct.directnotify import DirectNotifyGlobal
import types
from direct.stdpy.threading import Lock
class Messenger:
notify = DirectNotifyGlobal.directNotify.newCategory("Messenger")
def __init__(self):
"""
On... | |
#!/usr/bin/env python
# Copyright 2014 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.
"""
A Deterministic acyclic finite state automaton (DAFSA) is a compact
representation of an unordered word list (dictionary).
http://... | |
# -*- coding: utf-8 -*-
"""
Module contains logic and containers for dealing with shows/episodes/specials
"""
from __future__ import unicode_literals, absolute_import
import re
import zlib
import string
import logging
from collections import defaultdict
from eplist import utils
from eplist.settings import Settings
... | |
"""
Files Pipeline
See documentation in topics/media-pipeline.rst
"""
import functools
import hashlib
import os
import os.path
import time
import logging
from email.utils import parsedate_tz, mktime_tz
from six.moves.urllib.parse import urlparse
from collections import defaultdict
import six
try:
from cStringIO i... | |
from future.utils import iterkeys, iteritems
from collections import defaultdict
class BaseParams(object):
def __init__(self, query=None, **kwargs):
"""
:param query: the query to send to solr
:type query: str
"""
self._q = defaultdict(set)
if query:
se... | |
import numpy as np
import tensorflow as tf
from easydict import EasyDict
from luminoth.utils.image import (
resize_image, flip_image, random_patch, random_resize, random_distortion,
patch_image
)
from luminoth.utils.test.gt_boxes import generate_gt_boxes
class ImageTest(tf.test.TestCase):
def setUp(self... | |
'''
Generic interface for communicating with boards.
While it would be nice if there was only a single method to communicate with
boards, in practice that is not feasible. So, this file includes the interface
that different communication methods must implement to effectively support
tockloader.
'''
import logging
imp... | |
import os
from local_settings import *
from base.permissions import wiki_can_read
# Django settings for roots project.
# If you set this to False, Django will make some optimizations so as not
# to load the internationalization machinery.
USE_I18N = True
# If you set this to False, Django will not format dates, num... | |
# Django settings for nr project.
from unipath import Path
import os
from django.core.exceptions import ImproperlyConfigured
PROJECT_DIR = Path(__file__).ancestor(3)
# -------------------------------- For userena ----------------------------------------
AUTHENTICATION_BACKENDS = (
'userena.backends.UserenaA... | |
from __future__ import annotations
from collections.abc import Sequence
from enum import Enum
from io import BytesIO
from typing import IO, Any, Callable, Dict, Tuple, Union
from urllib.parse import parse_qs
from typing_extensions import Literal
from werkzeug.datastructures import FileStorage, MultiDict
from werkzeug... | |
#
# Copyright 2012 Red Hat, 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 by applicab... | |
##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2015, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | |
# -*- coding: utf-8 -*-
"""
Deploy a given Netkit lab to a Netkit server
"""
__author__ = "\n".join(['Simon Knight'])
# Copyright (C) 2009-2011 by Simon Knight, Hung Nguyen
import logging
LOG = logging.getLogger("ANK")
import itertools
import os
import re
import time
import Au... | |
#!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | |
import logging
from ibmsecurity.appliance.ibmappliance import IBMError
from ibmsecurity.utilities.tools import json_compare
logger = logging.getLogger(__name__)
requires_model = "Appliance"
try:
basestring
except NameError:
basestring = (str, bytes)
def get_all(isamAppliance, check_mode=False, force=False)... | |
#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 thi... | |
import json
import test_utils
from nose.tools import eq_, ok_
from django.contrib.auth.models import AnonymousUser
import amo
from mkt import regions
from mkt.api.tests.test_oauth import BaseOAuth
from mkt.constants.applications import DEVICE_CHOICES_IDS
from mkt.regions import set_region
from mkt.reviewers.forms im... | |
from sympy import symbols, Matrix, eye, I, Symbol, Rational, wronskian, cos, \
sin, exp, hessian, sqrt, zeros, ones, randMatrix, Poly, S, pi, \
integrate, oo, raises, trigsimp, Integer, block_diag, N
from sympy.matrices.matrices import ShapeError, MatrixError
from sympy.printing import srepr
from sympy.... | |
# coding=utf-8
r"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from tests import IntegrationTestCase
from tests.holodeck import Request
from twilio.base import serialize
from twilio.base.exceptions import TwilioException
from twilio.http.response import Response... | |
# coding=utf-8
import re
from lxml import etree
from . import exceptions
class Node(object):
"""Node factory."""
def __new__(cls, name, value=None, parent=None, **kwargs):
"""Override create instance.
:param name: name of node.
:param value (optional): `str` text of node.
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.