gt
stringclasses
1 value
context
stringlengths
2.49k
119k
""" Logger implementation loosely modeled on PEP 282. We don't use the PEP 282 logger implementation in the stdlib ('logging') because it's idiosyncratic and a bit slow for our purposes (we don't use threads). """ # This module must not depend on any non-stdlib modules to # avoid circular import problems import os i...
# Copyright 2014 Google 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, ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # coding=utf-8 # Copyright 2012 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 NTT DOCOMO, INC. # Copyright (c) 2011 University of Southern California / ISI # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may ...
import numpy as np import pandas as pd import statsmodels import statsmodels.api as sm from statsmodels.tsa.stattools import coint # just set the seed for the random number generator #np.random.seed(107) import sys import matplotlib.pyplot as plt import time """ class MovAvg: def __init__(self, n = 200, s = 1): ...
#!/usr/bin/env python # Copyright (c) 2011-2020, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. """ Gage adjustment ^^^^^^^^^^^^^^^ Concept ------- The objective of this module is the adjustment of radar-based rainfall estimates by rain gage observations. However, this module ...
#!/usr/bin/env python # -*- coding: utf-8 -*- # The MIT License (MIT) # # Copyright (c) 2013 ton1517 <tonton1517@gmail.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy of # this software and associated documentation files (the "Software"), to deal in # the Software without restrict...
# # # # Conditions ############################################## import pprint # Base class class Condition(object): def __str__(self): return pprint.pformat(self.to_dict()) class NilCondition(Condition): ''' DO NOT USE THIS CLASS!!! ''' def to_dict(self): return {'query_strin...
############################################################################### ## ## Copyright (C) 2011-2014 Tavendo GmbH ## ## 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 ## ## h...
import copy import logging import random import threading import time import yaml import sys from pybloom import BloomFilter from Queue import Queue from thrift import Thrift from thrift.transport import TSocket from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol from thrift.server impo...
#!/usr/bin/python # -*- coding: utf-8 -*- from flask import Flask, render_template, request, redirect, jsonify, \ url_for, flash from sqlalchemy import create_engine from sqlalchemy.orm import sessionmaker from database_setup import Category, Base, Product, User from flask import session as login_session import r...
# 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...
#!/bin/python #NOTE: This script only runs in Linux and requires pdflatex in order to create pdfs import argparse import logging logging.getLogger("scapy.runtime").setLevel(logging.ERROR) from scapy.all import * #The default ports to scan in none are specified default_ports = [5,8,20,21,22,23,25,53,67,68,69,79,80,88...
import tornado.web import tornado.auth import json import requests import os import sys from datetime import datetime, timedelta from dateutil import parser ######################### # Useful misc handlers # ######################### ERROR_CODES = { 400: 'Bad Request', 401: 'Unauthorized', 403: 'Forbidd...
# 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 applicable law or agree...
# Copyright 2016 Pinterest, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import ( compat_urllib_parse, compat_str, ) from ..utils import ( ExtractorError, find_xpath_attr, fix_xml_ampersands, HEADRequest, sanitized_Request, unescapeHTML, url_basename, R...
# Copyright (c) 2018 Foundries.io # # SPDX-License-Identifier: Apache-2.0 import abc import argparse import os import shutil import subprocess from west import cmake from west import log from west.build import is_zephyr_build from west.util import quote_sh_list from runners.core import BuildConfiguration from build...
import unittest import collections from fontTools.misc.py23 import basestring from fontParts.base import FontPartsError class TestComponent(unittest.TestCase): def getComponent_generic(self): layer, _ = self.objectGenerator("layer") glyph = layer.newGlyph("A") pen = glyph.getPen() ...
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
#!/usr/bin/env python import subprocess import praw from hashlib import sha1 from flask import Flask from flask import Response from flask import request from cStringIO import StringIO from base64 import b64encode from base64 import b64decode from ConfigParser import ConfigParser import OAuth2Util import os import mar...
#!/usr/bin/env python # Copyright (c) 2011-2018, wradlib developers. # Distributed under the MIT License. See LICENSE.txt for more info. import os import numpy as np import wradlib.util as util import unittest import datetime as dt class HelperFunctionsTest(unittest.TestCase): def test__shape_to_size(self): ...
from Configuration import BasketballPlayerDatabase, Root_URL from BasketballPlayer import BasketballPlayer import pickle from flask import Flask, request, render_template, redirect, send_from_directory from htmltemplate import Template from PIL import Image import base64 import os import uuid import psycopg2 app = ...
# Copyright (c) 2012 Santosh Philip # Copyright (c) 2016 Jamie Bull # ======================================================================= # Distributed under the MIT License. # (See accompanying file LICENSE or copy at # http://opensource.org/licenses/MIT) # ======================================================...
#!/usr/bin/env python import datetime import logging import os import re from urllib.parse import urljoin from bs4 import BeautifulSoup from utils import utils, inspector # https://www.nsf.gov/oig/ archive = 1989 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web team:...
# encoding: 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 'Rulebook.published' db.add_column('dnd_rulebook', 'published', self.gf('django.db.models.f...
import logging import calendar import copy import dateutil import numpy import datetime from dimagi.ext.couchdbkit import Document, DocumentSchema, StringProperty, IntegerProperty, DateTimeProperty from casexml.apps.case.models import CommCareCase from corehq.apps.crud.models import AdminCRUDDocumentMixin from corehq.a...
"""Run DESeq analysis.""" from pathlib import Path from plumbum import TEE from resolwe.process import ( BooleanField, Cmd, DataField, FileField, FloatField, GroupField, IntegerField, JsonField, ListField, Persistence, Process, SchedulingClass, StringField, ) clas...
#!/usr/bin/env python """ Rules for building C/API module with f2py2e. Here is a skeleton of a new wrapper function (13Dec2001): wrapper_function(args) declarations get_python_arguments, say, `a' and `b' get_a_from_python if (successful) { get_b_from_python if (successful) { callfortran ...
#!/usr/bin/env python """ stocks.py ========= Author: Anthony Sutardja Last modified: 2015-03-15 ========= Methods to fetch stock quotes from external sources. """ import httplib import os import string import sys import time os.environ['TZ'] = 'US/Eastern' time.tzset() # need to reset for eastern...
#!/usr/bin/env python # Copyright 2014-2020 The PySCF Developers. 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 # # U...
""" ------- Convert ------- This module provides functions to convert NetworkX graphs to and from other formats. The preferred way of converting data to a NetworkX graph is through the graph constuctor. The constructor calls the from_whatever() function which attempts to guess the input type and convert it automat...
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
# Copyright 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. import os import sys from telemetry import benchmark from telemetry import record_wpr from telemetry.core import util from telemetry.core import wpr_modes f...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2021 Lenovo # # 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 ...
# encoding: 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 unique constraint on 'WelcomeEmailRecipient', fields ['recipient'] db.create_unique('canvas_welco...
#!/usr/bin/env python # # switch_tests.py: testing `svn switch'. # # Subversion is a tool for revision control. # See http://subversion.apache.org for more information. # # ==================================================================== # Licensed to the Apache Software Foundation (ASF) under one # or mo...
'''connection.py: a framework for defining/managing database connections''' import abc import importlib.util import logging #use NullHandler to avoid "NoneType is not Scriptable" exceptions DEFAULT_LOGGER = logging.getLogger('NULL') DEFAULT_LOGGER.addHandler(logging.NullHandler()) from plumbum import local import pan...
#!/usr/bin/python2 import dicom, cv2, re, sys import os, fnmatch, shutil, subprocess import numpy as np sys.path.append('..') import SETTINGS as c from PIL import Image from heart import getAlignImg; import h5py import dsb_utils as du; """ This script processes (crop from center, rotate, etc..) all the sunny-brook da...
"""Simple word2vec implementation on Tensorflow """ # Origin: https://github.com/tensorflow/blob/r0.9/tensorflow/examples/tutorials/word2vec/word2vec_basic.py # Coding: utf-8 # Filename: word2vec_basic.py - Python 2.7 # Created: 2016-06-27 v0.0 # Description: ## v0.0: Basic skip-gram model with Tensorflow ## v0.1: Refa...
# Generated by Django 2.2.2 on 2019-07-24 05:46 from django.conf import settings from django.db import migrations, models import django.db.models.deletion import phonenumber_field.modelfields class Migration(migrations.Migration): dependencies = [ ("common", "0017_auto_20190722_1443"), migration...
#!/usr/bin/env python # Copyright 2014-2019 The PySCF Developers. 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 # # U...
import numpy as np import matplotlib.pyplot as plt import time import sys # Functions to sample the diffusion-weighted gradient directions from dipy.core.sphere import disperse_charges, HemiSphere # Function to reconstruct the tables with the acquisition information from dipy.core.gradients import gradient_table # F...
import unittest from test import test_support import posixpath, os from posixpath import realpath, abspath, join, dirname, basename, relpath # An absolute path to a temporary filename for testing. We can't rely on TESTFN # being an absolute path, so we need this. ABSTFN = abspath(test_support.TESTFN) def safe_rmdir...
#!/usr/bin/python # -*- coding: utf-8 -*- # # (c) 2014, Jens Depuydt <http://www.jensd.be> # 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', ...
from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponseBadRequest, HttpResponse from bootcamp.tasks.models import Task from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from bootcamp.tasks.forms import TaskForm from django.contrib.auth.decorators impo...
import galaxy.model from galaxy.model.orm import * from galaxy.model.mapping import context as sa_session from base.twilltestcase import * not_logged_in_as_admin_security_msg = 'You must be logged in as an administrator to access this feature.' logged_in_as_admin_security_msg = 'You must be an administrator to access ...
""" solve a scalar diffusion-reaction equation: phi_t = kappa phi_{xx} + (1/tau) R(phi) using operator splitting, with implicit diffusion M. Zingale """ from __future__ import print_function import numpy as np from scipy import linalg from scipy.integrate import ode import sys import matplotlib as mpl import matp...
""" Contains the protocols, commands, and client factory needed for the Server and Portal to communicate with each other, letting Portal work as a proxy. Both sides use this same protocol. The separation works like this: Portal - (AMP client) handles protocols. It contains a list of connected sessions in a d...
# -*- coding: utf-8 -*- # # Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia # 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 copyrigh...
__source__ = 'https://leetcode.com/problems/binary-tree-postorder-traversal/#/solutions' # https://github.com/kamyu104/LeetCode/blob/master/Python/binary-tree-postorder-traversal.py # Time: O(n) # Space: O(1) # Tree # # Description: Leetcode # 145. Binary Tree Postorder Traversal # # Given a binary tree, return the po...
from timeit import default_timer as timer import json import Queue import argparse import os import csv from tabulate import tabulate from foofah_libs.foofah_node import FoofahNode import foofah_libs.operators as Operations import numpy as np from foofah_libs.generate_prog import create_python_prog MAX_STEPS = float("...
# -*- coding: utf-8 -*- import os import re from collections import OrderedDict import PyXMCDA as px from lxml import etree HEADER = ("<?xml version='1.0' encoding='UTF-8'?>\n" "<xmcda:XMCDA xmlns:xmcda='http://www.decision-deck.org/2012/XMCDA-2.2.0'\n" " xmlns:xsi='http://www.w3.org/2001/XMLSc...
#!/usr/bin/env python """ """ __docformat__ = 'restructuredtext' __version__ = '$Id: //depot/task/DEV-99/client/tests.py#13 $' import sys sys.path.insert(0, '../../') sys.path.insert(0, '../layout/') from pyglet.window import * from pyglet import clock from pyglet.gl import * from pyglet import media import layou...
class ReverseComplement(object): #declares an object class. We capitalize the first letter (unlike variables that should start with lowercase) to avoid potential collisions with variable names def __init__(self, sequence, reverse = True, case = 'upper'): #this is a special function (within an object, a func...
# -*- coding:utf-8 -*- # Copyright 2017 Xiaomi, 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 o...
""" Tests donut/modules/courses """ import flask import json import pytest from donut.testing.fixtures import client from donut import app from donut.modules.courses import helpers, routes def test_planner(client): rv = client.get(flask.url_for('courses.planner')) assert rv.status_code == 200 def test_sched...
# -*- coding: utf-8 -*- import sys import warnings import pytest import deprecated.classic class MyDeprecationWarning(DeprecationWarning): pass _PARAMS = [ None, ((), {}), (('Good reason',), {}), ((), {'reason': 'Good reason'}), ((), {'version': '1.2.3'}), ((), {'action': 'once'}), ...
""" Default settings for the ``mezzanine.core`` app. Each of these can be overridden in your project's settings module, just like regular Django settings. The ``editable`` argument for each controls whether the setting is editable via Django's admin. Thought should be given to how a setting is actually used before mak...
"""Support for the Lovelace UI.""" import logging import voluptuous as vol from homeassistant.components import frontend from homeassistant.config import async_hass_config_yaml, async_process_component_config from homeassistant.const import CONF_FILENAME, CONF_MODE, CONF_RESOURCES from homeassistant.core import callb...
# Copyright 2018 AT&T 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 by applicable...
# 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 required by applicable ...
# 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...
#!/usr/bin/python2 # import inspect import os import re from optparse import OptionParser import sys sys.path.append("/home/01934/srinath/pkg/cheetah/lib/python") from Cheetah.Template import Template import zcc_parser import merkle # Go in apps_sfdl_gen/ PROVER_H = "_p.h" VERIFIER_H = "_v.h" #Output in ginger PROV...
# # 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...
#!/usr/bin/env python2 ''' Fetch and combine multiple inventory account settings into a single json hash. ''' # vim: expandtab:tabstop=4:shiftwidth=4 from string import Template from time import time import argparse import atexit import copy import errno import fcntl import json import os import re import shut...
__author__ = 'maru' __copyright__ = "Copyright 2013, ML Lab" __version__ = "0.1" __status__ = "Development" import sys import os sys.path.append(os.path.abspath(".")) from experiment_utils import * import argparse import numpy as np from sklearn.datasets.base import Bunch from datautil.load_data import * from sklear...
# Copyright 2013 IBM 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 # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
"""Integration tests for the auth component.""" from datetime import timedelta from http import HTTPStatus from unittest.mock import patch import pytest from homeassistant.auth import InvalidAuthError from homeassistant.auth.models import Credentials from homeassistant.components import auth from homeassistant.setup ...
# 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. import logging import os import re import shutil import stat import subprocess import tempfile from catapult_base import binary_manager from telemetry.core ...
# Using the following encoding: utf-8 # Python 2 # from ConfigParser import ConfigParser, NoOptionError # End Python 2 # Python 3 from configparser import ConfigParser, NoOptionError # End Python 3 import requests import os import shutil import fnmatch import time import getpass import itertools from ltk import excepti...
# coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import inspect impor...
# # The Python Imaging Library. # $Id$ # # PIL raster font management # # History: # 1996-08-07 fl created (experimental) # 1997-08-25 fl minor adjustments to handle fonts from pilfont 0.3 # 1999-02-06 fl rewrote most font management stuff in C # 1999-03-17 fl take pth files into account in load_path (from Rich...
from inspect import isclass from django.conf import settings from django.core.files.storage import get_storage_class from celery.datastructures import AttributeDict from tower import ugettext_lazy as _ __all__ = ('LOG', 'LOG_BY_ID', 'LOG_KEEP',) class _LOG(object): action_class = None class CREATE_ADDON(_LOG...
#!/usr/bin/env python # coding: utf-8 from __future__ import (absolute_import, print_function, division, unicode_literals) from pkg_resources import resource_string, resource_listdir from datetime import datetime import os import sys import re import argparse join = lambda a, b: os.path.join(o...
from collections import namedtuple import lasagne as nn from lasagne.layers.dnn import Conv2DDNNLayer, MaxPool2DDNNLayer import data_iterators import numpy as np import theano.tensor as T from functools import partial import nn_heart import utils_heart from pathfinder import PKL_TRAIN_DATA_PATH, TRAIN_LABELS_PATH, PKL_...
"""The ``interface`` module provides functions to convert/cast between common VTK and NumPy/Pandas data types. These methods provide a simple to use interface for VTK data types so that users can make changes to VTK data strucutres via Python data structures that are a bit easier to perform numerical operations upon. "...
"""Tests for letsencrypt.renewer.""" import datetime import pytz import os import tempfile import shutil import unittest import configobj import mock from letsencrypt import configuration from letsencrypt import errors from letsencrypt.storage import ALL_FOUR from letsencrypt.tests import test_util CERT = test_uti...
""" GAM datasets """ # -*- coding: utf-8 -*- from os.path import dirname import pandas as pd import numpy as np from pygam.utils import make_2d PATH = dirname(__file__) def _clean_X_y(X, y): """ensure that X and y data are float and correct shapes """ return make_2d(X, verbose=False).astype('float'),...
# Copyright 2013 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
#!/usr/bin/env python # # 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 requir...
# Copyright 2018 The trfl Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
from django.db import models from django.db.migrations.operations.base import Operation from django.db.migrations.state import ModelState from django.db.models.options import normalize_together from django.utils.functional import cached_property from .fields import ( AddField, AlterField, FieldOperation, RemoveFie...
# -*- coding: utf-8 -*- """ pygments.lexers.text ~~~~~~~~~~~~~~~~~~~~ Lexers for non-source code file types. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re try: set except NameError: from sets import Set as set from...
# Licensed under an MIT open source license - see LICENSE from __future__ import print_function, absolute_import, division import numpy as np from astropy import units as u from astropy.wcs import WCS from six import string_types import statsmodels.api as sm from warnings import warn from astropy.utils.console import ...
#!/usr/bin/env python """API handlers for dealing with flows.""" from __future__ import absolute_import from __future__ import division from __future__ import unicode_literals import collections import itertools import re from future.builtins import str from future.utils import iteritems from future.utils import ite...
import re import os import shutil from gppylib.db import dbconn from test.behave_utils.utils import check_schema_exists, check_table_exists, drop_table_if_exists from gppylib.operations.backup_utils import get_lines_from_file from behave import given, when, then CREATE_MULTI_PARTITION_TABLE_SQL = """ CREATE TABLE %s.%...
# coding=utf-8 # Copyright 2021 The HuggingFace Inc. team. # # 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...
# # Khan Academy Exercises for Course Builder # # Copy Right (C) 2013 Pavel Simakov (pavel@vokamis.com) # https://github.com/psimakov/khan-exercises-coursebuilder # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as...
"""Test the Panasonic Viera setup process.""" from homeassistant.components.panasonic_viera.const import ( ATTR_DEVICE_INFO, ATTR_FRIENDLY_NAME, ATTR_MANUFACTURER, ATTR_MODEL_NUMBER, ATTR_UDN, CONF_APP_ID, CONF_ENCRYPTION_KEY, CONF_ON_ACTION, DEFAULT_NAME, DEFAULT_PORT, DOMAI...
# Copyright 2010-2012 Institut Mines-Telecom # # 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...
"""Test match.py.""" import textwrap import unittest from pytype import convert_structural from pytype.pytd import pytd from pytype.pytd.parse import builtins from pytype.pytd.parse import parser from pytype.tests import test_inference import unittest class MatchTest(unittest.TestCase): @classmethod def setUpC...
try: import aiohttp.web except ImportError: print("The dashboard requires aiohttp to run.") import sys sys.exit(1) import argparse import copy import datetime import json import logging import os import re import threading import time import traceback import yaml import uuid from base64 import b64deco...
import json import model __author__ = 'wangc31' class Resource(object): """This class represents REST resource model""" def __init__(self, raw_resource): """ This is the model for REST resources. Actually it stores the data of resource in a dictionary. Besides, a resource is linkable...
# -*- coding: utf-8 -*- """ pygments.lexers.crystal ~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Crystal. :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import ExtendedRegexLexer, include, \ bygroups, default,...
#!/usr/bin/env python # # $Id$ # # Copyright (c) 2009, Jay Loden, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """OSX platform implementation.""" import errno import os import sys import _psutil_osx import _psutil_posix ...
# Copyright (c) 2016 Alex Meade. 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...
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'AuthProvider.config' db.alter_column('sentry_authprovi...
from __future__ import unicode_literals from django.utils import six from djblets.db.query import LocalDataQuerySet from djblets.util.decorators import augment_method_from from djblets.webapi.decorators import webapi_request_fields from djblets.webapi.responses import WebAPIResponsePaginated from reviewboard.hostings...
from __future__ import absolute_import, division, print_function from .expressions import ElemWise, schema_method_list, method_properties import datashape from datashape import dshape, isdatelike, isnumeric __all__ = ['DateTime', 'Date', 'date', 'Year', 'year', 'Month', 'month', 'Day', 'day', 'Hour', 'ho...