repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
RPGOne/Skynet | refs/heads/Miho | scikit-learn-c604ac39ad0e5b066d964df3e8f31ba7ebda1e0e/sklearn/linear_model/tests/__init__.py | 12133432 | |
sipwise/repoapi | refs/heads/master | panel/__init__.py | 12133432 | |
FCP-INDI/nipype | refs/heads/master | nipype/interfaces/dipy/tests/__init__.py | 12133432 | |
mdaniel/intellij-community | refs/heads/master | python/helpers/tests/generator3_tests/data/SkeletonGeneration/cache_skeleton_generated_and_reused_when_sdk_skeleton_is_outdated/mod.py | 12133432 | |
sertac/django | refs/heads/master | tests/migrations2/test_migrations_2_first/__init__.py | 12133432 | |
kwantopia/shoppley-migrate | refs/heads/master | shoppley.com/shoppley/apps/shoppleyuser/__init__.py | 12133432 | |
ruslanloman/nova | refs/heads/master | nova/db/sqlalchemy/api_migrations/migrate_repo/versions/__init__.py | 12133432 | |
the-invoice/smart2onyma | refs/heads/master | smart2onyma/__init__.py | 12133432 | |
iabdalkader/micropython | refs/heads/master | tests/basics/async_def.py | 54 | # test async def
def dec(f):
print('decorator')
return f
# test definition with a decorator
@dec
async def foo():
print('foo')
coro = foo()
try:
coro.send(None)
except StopIteration:
print('StopIteration')
|
darjus-amzn/boto | refs/heads/develop | boto/cloudfront/signers.py | 170 | # Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... |
peragro/peragro-index | refs/heads/master | tests/__init__.py | 2 | """The tests collector used in setup.py"""
from __future__ import absolute_import
import os
import unittest
def suite():
"""Return a list of tests"""
loader = unittest.TestLoader()
directory = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..')
return loader.discover(directory, 'test_*.py')... |
edwinksl/edwinksl.github.io | refs/heads/source | publishconf.py | 1 | #!/usr/bin/env python
# This file is only used if you use `make publish` or explicitly specify it as your config file
import os
import sys
sys.path.append(os.curdir)
from pelicanconf import *
SITEURL = 'https://www.edwinksl.com'
RELATIVE_URLS = False
FEED_ALL_ATOM = 'feeds/all.atom.xml'
CATEGORY_FEED_ATOM = 'feeds/... |
jeffrimko/PopPage | refs/heads/master | tests/testlib.py | 1 | """Provides a library to aid testig."""
##==============================================================#
## SECTION: Imports #
##==============================================================#
import os
import os.path as op
import random
from string import ascii_uppercase... |
Voluntarynet/BitmessageKit | refs/heads/master | BitmessageKit/Vendor/static-python/Lib/plat-mac/lib-scriptpackages/Explorer/__init__.py | 73 | """
Package generated from /Applications/Internet Explorer.app
"""
from warnings import warnpy3k
warnpy3k("In 3.x, the Explorer module is removed.", stacklevel=2)
import aetools
Error = aetools.Error
import Standard_Suite
import URL_Suite
import Netscape_Suite
import Microsoft_Internet_Explorer
import Web_Browser_Sui... |
tarc/gyp | refs/heads/master | test/rules-rebuild/gyptest-default.py | 345 | #!/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.
"""
Verifies that a rule that generates multiple outputs rebuilds
correctly when the inputs change.
"""
import TestGyp
test = TestGyp.Test... |
ajgallegog/gem5_arm | refs/heads/master | src/mem/slicc/__init__.py | 92 | # Copyright (c) 2009 The Hewlett-Packard Development Company
# 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... |
piyush0609/scipy | refs/heads/master | scipy/optimize/tests/test__differential_evolution.py | 59 | """
Unit tests for the differential global minimization algorithm.
"""
from scipy.optimize import _differentialevolution
from scipy.optimize._differentialevolution import DifferentialEvolutionSolver
from scipy.optimize import differential_evolution
import numpy as np
from scipy.optimize import rosen
from numpy.testing ... |
alu042/edx-platform | refs/heads/master | common/djangoapps/auth_exchange/tests/test_forms.py | 113 | # pylint: disable=no-member
"""
Tests for OAuth token exchange forms
"""
import unittest
from django.conf import settings
from django.contrib.sessions.middleware import SessionMiddleware
from django.test import TestCase
from django.test.client import RequestFactory
import httpretty
from provider import scope
import so... |
apocquet/django | refs/heads/master | django/contrib/gis/serializers/geojson.py | 275 | from __future__ import unicode_literals
from django.contrib.gis.gdal import HAS_GDAL
from django.core.serializers.base import (
SerializationError, SerializerDoesNotExist,
)
from django.core.serializers.json import Serializer as JSONSerializer
if HAS_GDAL:
from django.contrib.gis.gdal import CoordTransform, S... |
beatrizjesus/my-first-blog | refs/heads/master | blog/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
Lab603/PicEncyclopedias | refs/heads/master | jni-build/jni-build/jni/include/tensorflow/contrib/learn/python/learn/tests/dataframe/binary_transform_test.py | 5 | # 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... |
Nikoala/CouchPotatoServer | refs/heads/develop | couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/condenast.py | 115 | # coding: utf-8
from __future__ import unicode_literals
import re
import json
from .common import InfoExtractor
from ..compat import (
compat_urllib_parse,
compat_urllib_parse_urlparse,
compat_urlparse,
)
from ..utils import (
orderedSet,
)
class CondeNastIE(InfoExtractor):
"""
Condé Nast is... |
vperron/sentry | refs/heads/master | tests/sentry/web/frontend/test_admin.py | 23 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from exam import fixture
from sentry.testutils import TestCase
class EnvStatusTest(TestCase):
@fixture
def path(self):
return reverse('sentry-admin-status')
def test_requires_auth(self):... |
linvictor88/vse-lbaas-driver | refs/heads/master | quantum/db/extraroute_db.py | 2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2013, Nachi Ueno, NTT MCL, 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://ww... |
hyperized/ansible | refs/heads/devel | lib/ansible/modules/network/fortios/fortios_system_session_helper.py | 13 | #!/usr/bin/python
from __future__ import (absolute_import, division, print_function)
# Copyright 2019 Fortinet, Inc.
#
# 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, either version 3 of the Lic... |
efortuna/AndroidSDKClone | refs/heads/master | ndk/prebuilt/linux-x86_64/lib/python2.7/md5.py | 255 | # $Id$
#
# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
import warnings
warnings.warn("the md5 module is deprecated; use hashlib instead",
DeprecationWarning, 2)
from hashlib import md5
new = md5
blocksize = 1 # legacy value (wrong ... |
jso0003auburn/Is-It-Raining | refs/heads/master | lib/tweepy/error.py | 10 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from __future__ import print_function
import six
class TweepError(Exception):
"""Tweepy exception"""
def __init__(self, reason, response=None):
self.reason = six.text_type(reason)
self.response = response
Exc... |
nachoaguadoc/aimlx-demos | refs/heads/master | controller/argumentation_controller.py | 1 | from flask import Blueprint
from flask import Flask, abort
from flask import jsonify
from flask import render_template
from flask import request,send_from_directory
import requests
import config as conf
import helpers
argumentation_api = Blueprint('argumentation_api', __name__)
@argumentation_api.route('')
def getAr... |
javaos74/neutron | refs/heads/master | neutron/db/vlantransparent_db.py | 54 | # Copyright (c) 2015 Cisco Systems, 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 re... |
abhilashnta/edx-platform | refs/heads/master | common/djangoapps/student/migrations/0046_auto__add_entranceexamconfiguration__add_unique_entranceexamconfigurat.py | 93 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'EntranceExamConfiguration'
db.create_table('student_entranceexamconfiguration', (
... |
sgzsh269/django | refs/heads/master | django/views/static.py | 300 | """
Views and functions for serving static files. These are only to be used
during development, and SHOULD NOT be used in a production setting.
"""
from __future__ import unicode_literals
import mimetypes
import os
import posixpath
import re
import stat
from django.http import (
FileResponse, Http404, HttpRespons... |
Tejal011089/fbd_erpnext | refs/heads/develop | erpnext/patches/v4_0/move_warehouse_user_to_restrictions.py | 120 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
import frappe.permissions
def execute():
for warehouse, user in frappe.db.sql("""select parent, user from `tabWarehouse User`"""):
fra... |
DrMeers/django | refs/heads/master | django/contrib/gis/db/backends/oracle/adapter.py | 110 | from cx_Oracle import CLOB
from django.contrib.gis.db.backends.adapter import WKTAdapter
class OracleSpatialAdapter(WKTAdapter):
input_size = CLOB
|
sztanko/solsticestreets | refs/heads/master | python/solstreets/azimuth_processor.py | 1 | from typing import Generator, Iterable, Tuple, List
import math
import logging
from functools import lru_cache
from collections import Counter
from datetime import datetime
import ephem
from .entities import Street, StreetSegment, from_street
from .geo_utils import get_segment_details
logging.basicConfig(level="DEBUG... |
hhru/pycerberus-deb | refs/heads/master | tests/i18n_custom_test.py | 2 | # -*- coding: UTF-8 -*-
#
# The MIT License
#
# Copyright (c) 2009-2010 Felix Schwarz <felix.schwarz@oss.schwarz.eu>
#
# 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, i... |
dagwieers/ansible | refs/heads/devel | lib/ansible/modules/storage/netapp/na_elementsw_volume.py | 22 | #!/usr/bin/python
# (c) 2017, NetApp, Inc
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""Element OS Software Volume Manager"""
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... |
Peddle/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/bug8245/tests.py | 125 | from django.contrib import admin
from django.utils.unittest import TestCase
class Bug8245Test(TestCase):
"""
Test for bug #8245 - don't raise an AlreadyRegistered exception when using
autodiscover() and an admin.py module contains an error.
"""
def test_bug_8245(self):
# The first time aut... |
F483/ngcccbase | refs/heads/master | ngcccbase/tests/test_blockchain.py | 4 | import unittest
import os, tempfile, shutil
import time
from ngcccbase.pwallet import PersistentWallet
from ngcccbase.services.chroma import ChromaBlockchainState
from ngcccbase.blockchain import VerifierBlockchainState
class TestVerifierBlockchainState(unittest.TestCase):
@classmethod
def setUpClass(cls):
... |
Raphx/fuzza | refs/heads/master | tests/transformer/test_base64.py | 1 | import unittest
from fuzza.transformer._base64 import transform
class TestTransformerBase64(unittest.TestCase):
@classmethod
def setUpClass(cls):
cls.data = [
b'this is string',
b'aaa',
b'kkoopq'
]
def test_base64_encode_correctly(self):
expec... |
PlayUAV/MissionPlanner | refs/heads/master | Lib/site-packages/scipy/linalg/benchmarks/bench_basic.py | 57 | import sys
from numpy.testing import *
import numpy.linalg as linalg
def random(size):
return rand(*size)
class TestSolve(TestCase):
def bench_random(self):
basic_solve = linalg.solve
print
print ' Solving system of linear equations'
print ' =========================... |
noam09/kodi | refs/heads/master | script.module.israeliveresolver/lib/livestreamer/requests/packages/chardet/langhungarianmodel.py | 2762 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
vidoardes/XS-ICS | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
guewen/OpenUpgrade | refs/heads/master | addons/mail/mail_followers.py | 22 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... |
tsnoam/python-telegram-bot | refs/heads/master | telegram/__init__.py | 1 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... |
grilo/ansible-1 | refs/heads/devel | test/integration/targets/module_utils/module_utils/a/b/c/__init__.py | 12133432 | |
adelton/django | refs/heads/master | tests/admin_scripts/custom_templates/app_template/__init__.py | 12133432 | |
coderbhupendra/cltk | refs/heads/master | cltk/text_reuse/__init__.py | 12133432 | |
rlowrance/dot-vimrc | refs/heads/master | .vim/.vim/.vim/.vim/.vim/ftplugin/orgmode/vimbuffer.py | 9 | # -*- coding: utf-8 -*-
"""
vimbuffer
~~~~~~~~~~
VimBuffer and VimBufferContent are the interface between liborgmode and
vim.
VimBuffer extends the liborgmode.document.Document().
Document() is just a general implementation for loading an org file. It
has no interface to an actual file or vim buffer. This is ... |
bellkev/asg-sim | refs/heads/master | asgsim/plots/autoscaling.py | 1 | from collections import defaultdict
import csv
from math import log, sqrt
from multiprocessing import Pool
from numpy import mean
from ..batches import generate_jobs, load_results, STATIC_MINIMA, STATIC_MINIMA_LIMITED, BOOT_TIMES
from ..cost import costs, run_job, costs_from_job_results, cost_ci, compare_result_means... |
domix/FrameworkBenchmarks | refs/heads/master | dancer/__init__.py | 12133432 | |
openstack/vitrage | refs/heads/master | vitrage/tests/unit/datasources/heat/__init__.py | 12133432 | |
deevarvar/myLab | refs/heads/master | baidu_code/bcoreapi/monitor/__init__.py | 12133432 | |
AevumDecessus/fragforce.org | refs/heads/dev | ffdonations/migrations/__init__.py | 12133432 | |
Pandaaaa906/ChemErpSystem | refs/heads/master | WriteTogether/migrations/0001_initial.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-08-16 02:04
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
depe... |
aperigault/ansible | refs/heads/devel | lib/ansible/modules/net_tools/nios/__init__.py | 12133432 | |
OpenLD/enigma2-wetek | refs/heads/master | lib/python/Plugins/SystemPlugins/SoftwareManager/__init__.py | 12133432 | |
tomevans/utils | refs/heads/master | constants.py | 1 | import scipy
# Units in SI, i.e. not cgs
RSUN = 6.955e8
MSUN = 1.9889e30
MJUP = 1.8986e27
RJUP = 7.149e7
REARTH = 6.371e6
DAY2S = 86400.0
DEG2RAD = scipy.pi/180.
AU = 1.496e11
PLANCKH = 6.626e-34
BOLTZK = 1.38065e-23
C = 2.9979e8 # peed of light in vacuum in m s^-1
G = 6.673e-11 # gravitational constant in m^3 kg^-1 ... |
whs/django | refs/heads/master | django/contrib/sessions/serializers.py | 59 | import pickle
from django.core.signing import JSONSerializer as BaseJSONSerializer
class PickleSerializer:
"""
Simple wrapper around pickle to be used in signing.dumps and
signing.loads.
"""
def dumps(self, obj):
return pickle.dumps(obj, pickle.HIGHEST_PROTOCOL)
def loads(self, data)... |
paulrouget/servo | refs/heads/master | tests/wpt/web-platform-tests/fetch/cross-origin-resource-policy/resources/hello.py | 25 | def main(request, response):
headers = [("Cross-Origin-Resource-Policy", request.GET['corp'])]
if 'origin' in request.headers:
headers.append(('Access-Control-Allow-Origin', request.headers['origin']))
return 200, headers, "hello"
|
unnikrishnankgs/va | refs/heads/master | venv/lib/python3.5/site-packages/tensorflow/models/compression/entropy_coder/dataset/gen_synthetic_dataset.py | 9 | # 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... |
azatoth/scons | refs/heads/master | test/option-k.py | 5 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# 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, publish,
... |
sysalexis/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/distutils/tests/test_file_util.py | 59 | """Tests for distutils.file_util."""
import unittest
import os
import shutil
import errno
from unittest.mock import patch
from distutils.file_util import move_file
from distutils import log
from distutils.tests import support
from distutils.errors import DistutilsFileError
from test.support import run_unittest
class ... |
ocefpaf/folium | refs/heads/master | tests/plugins/test_heat_map.py | 2 | # -*- coding: utf-8 -*-
"""
Test HeatMap
------------
"""
import folium
from folium.plugins import HeatMap
from folium.utilities import normalize
from jinja2 import Template
import numpy as np
import pytest
def test_heat_map():
np.random.seed(3141592)
data = (np.random.normal(size=(100, 2)) * np.array([[... |
joshpeng/Network-Intrusions-Flask | refs/heads/master | app/performance.py | 1 | from __future__ import division
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
from sklearn.externals import joblib
from sklearn.metrics import accuracy_score
from sklearn.metrics import precision_score
from sklearn.metrics import recall_score
from sklearn.metrics import f1... |
yeyanchao/calibre | refs/heads/master | src/calibre/gui2/update.py | 1 | __license__ = 'GPL v3'
__copyright__ = '2008, Kovid Goyal <kovid at kovidgoyal.net>'
import traceback
from PyQt4.Qt import (QThread, pyqtSignal, Qt, QUrl, QDialog, QGridLayout,
QLabel, QCheckBox, QDialogButtonBox, QIcon, QPixmap)
import mechanize
from calibre.constants import (__appname__, __version__, isw... |
opencord/voltha | refs/heads/master | netconf/session/session_mgr.py | 1 | #!/usr/bin/env python
#
# Copyright 2017 the original author or 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 require... |
ContinuumIO/watchdog | refs/heads/master | docs/source/conf.py | 8 | # -*- coding: utf-8 -*-
#
# watchdog documentation build configuration file, created by
# sphinx-quickstart on Tue Nov 30 00:43:58 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... |
monash-merc/cvl-fabric-launcher | refs/heads/master | wsgidav/lock_manager.py | 4 | # (c) 2009-2011 Martin Wendt and contributors; see WsgiDAV http://wsgidav.googlecode.com/
# Original PyFileServer (c) 2005 Ho Chun Wei.
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Implements the `LockManager` object that provides the locking functionality.
The LockMan... |
jneight/django-xadmin | refs/heads/batch-fix | xadmin/plugins/quickform.py | 2 | from django.db import models
from django import forms
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext as _
from django.forms.models import modelform_factory
import copy
from xadmin.sites import site
from xadmin.util import get_model_from_relation, vendor
from xadmin.views imp... |
Tigge/platinumshrimp | refs/heads/master | plugins/titlegiver/__init__.py | 6 | __author__ = "reggna"
|
simonemurzilli/geonode | refs/heads/master | geonode/catalogue/backends/pycsw_local.py | 18 | #########################################################################
#
# Copyright (C) 2012 OpenPlans
#
# 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, either version 3 of the License, or
#... |
mcmcplotlib/mcmcplotlib | refs/heads/gh-pages | _downloads/1b7f8df4a92ddc1424eebaed150db6ed/mpl_plot_hdi.py | 2 | """
Plot HDI
========
_thumb: .8, .8
"""
import matplotlib.pyplot as plt
import numpy as np
import arviz as az
az.style.use("arviz-darkgrid")
x_data = np.random.normal(0, 1, 100)
y_data = 2 + x_data * 0.5
y_data_rep = np.random.normal(y_data, 0.5, (200, 100))
az.plot_hdi(x_data, y_data_rep, color="k", plot_kwargs={... |
CPqD/RouteFlow | refs/heads/master | pox/pox/web/jsonrpc.py | 25 | # Copyright 2011,2012 James McCauley
#
# This file is part of POX.
#
# POX 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, either version 3 of the License, or
# (at your option) any later version.
#
# POX is d... |
bikashgupta11/javarobot | refs/heads/master | src/main/resources/jython/Lib/selenium/webdriver/chrome/__init__.py | 2454 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
kutenai/django | refs/heads/master | tests/transactions/tests.py | 24 | from __future__ import unicode_literals
import sys
import threading
import time
from unittest import skipIf, skipUnless
from django.db import (
DatabaseError, Error, IntegrityError, OperationalError, connection,
transaction,
)
from django.test import (
TransactionTestCase, skipIfDBFeature, skipUnlessDBFea... |
akrzos/cfme_tests | refs/heads/master | cfme/tests/infrastructure/test_host_provisioning.py | 2 | import pytest
from cfme.infrastructure import host
from cfme.fixtures import pytest_selenium as sel
from cfme.infrastructure.pxe import get_pxe_server_from_config, get_template_from_config
from cfme.provisioning import provisioning_form
from cfme.services import requests
from cfme.web_ui import flash, fill
from utils.... |
ronanki/merlin | refs/heads/master | src/work_in_progress/oliver/run_dnn_hourly_check.py | 3 |
import cPickle
import gzip
import os, sys, errno
import time
import math
# numpy & theano imports need to be done in this order (only for some numpy installations, not sure why)
import numpy
# we need to explicitly import this in some cases, not sure why this doesn't get imported with numpy itself
import numpy.distu... |
vasiliykochergin/euca2ools | refs/heads/master | euca2ools/commands/ec2/resetsnapshotattribute.py | 5 | # Copyright 2014 Eucalyptus Systems, Inc.
#
# Redistribution and use of this software 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 and t... |
ixc/django_polymorphic | refs/heads/master | polymorphic/admin/forms.py | 4 | from django import forms
from django.contrib.admin.widgets import AdminRadioSelect
from django.utils.translation import ugettext_lazy as _
class PolymorphicModelChoiceForm(forms.Form):
"""
The default form for the ``add_type_form``. Can be overwritten and replaced.
"""
#: Define the label for the radi... |
rvrheenen/OpenKattis | refs/heads/master | Python/forests/forests.py | 1 | n_people, n_trees = [int(x) for x in input().split()]
people = [[] for _ in range(n_people)]
while True:
try:
p, t = [int(x) for x in input().split()]
people[p-1].append(t)
except EOFError as e:
break
opinions = set([str(sorted(heard)) for heard in people])
print(len(opinions))
|
prakritish/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/elasticache.py | 27 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
jideobs/twilioAngular | refs/heads/master | venv/lib/python2.7/site-packages/twilio/rest/resources/task_router/activities.py | 38 | from .. import NextGenInstanceResource, NextGenListResource
class Activity(NextGenInstanceResource):
"""
An Activity resource.
See the `TaskRouter API reference
<https://www.twilio.com/docs/taskrouter/activities>_`
for more information.
.. attribute:: sid
The unique ID for this Activ... |
Fireblend/chromium-crosswalk | refs/heads/master | tools/telemetry/telemetry/core/backends/remote/__init__.py | 1201 | # 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.
|
gaddman/ansible | refs/heads/devel | lib/ansible/modules/cloud/docker/docker_stack.py | 23 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2018 Dario Zanzico (git@dariozanzico.com)
# 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 = {'status': ['pre... |
SciTools/biggus | refs/heads/master | biggus/tests/unit/init/test_mean.py | 3 | # (C) British Crown Copyright 2014 - 2016, Met Office
#
# This file is part of Biggus.
#
# Biggus 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 3 of the License, or
# (at your option) a... |
tdruez/django-registration | refs/heads/master | registration/tests/test_forms.py | 3 | """
Exercise django-registration's built-in form classes.
"""
from django.contrib.auth.models import User
from django.test import TestCase
from django.utils.six import text_type
from .. import forms
class RegistrationFormTests(TestCase):
valid_data = {
'username': 'testuser',
'email': 'test@exa... |
consulo/consulo-python | refs/heads/master | plugin/src/main/dist/helpers/pycharm/buildout_engulfer.py | 85 | # Expects two env variables:
# PYCHARM_ENGULF_SCRIPT = which script should be engulfed.
# PYCHARM_PREPEND_SYSPATH = which entries should be added to the beginning of sys.path;
# items must be separated by path separator. May be unset.
#
# Given script is loaded and compiled, then sys.path is prepended as requested.... |
miguelparaiso/OdooAccessible | refs/heads/master | addons/l10n_cn/__init__.py | 339 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2007-2014 Jeff Wang(<http://jeff@osbzr.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... |
dharhas/wibblywobbly | refs/heads/master | pelicanconf.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
import os
AUTHOR = u'Dharhas Pothina'
SITENAME = u'wibbly wobbly'
SITESUBTITLE = u'Musings on data through time and space'
SITEURL = '' # change in publishconf.py
# Times and dates
DEFAULT_DATE_FORMAT = '%b %d, %Y'
TIMEZONE = 'US/Central'
DEFAULT_LANG = u'en'
# Set th... |
xNovax/SickRage | refs/heads/master | lib/hachoir_core/field/seekable_field_set.py | 74 | from hachoir_core.field import BasicFieldSet, GenericFieldSet, ParserError, createRawField
from hachoir_core.error import HACHOIR_ERRORS
# getgaps(int, int, [listof (int, int)]) -> generator of (int, int)
# Gets all the gaps not covered by a block in `blocks` from `start` for `length` units.
def getgaps(start, length,... |
theheros/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/test/test_grp.py | 3 | """Test script for the grp module."""
import unittest
from test import support
grp = support.import_module('grp')
class GroupDatabaseTestCase(unittest.TestCase):
def check_value(self, value):
# check that a grp tuple has the entries and
# attributes promised by the docs
self.... |
g1011999/Android-kernel-for-kindle-fire | refs/heads/master | tools/perf/scripts/python/check-perf-trace.py | 948 | # perf trace event handlers, generated by perf trace -g python
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# This script tests basic functionality such as flag and symbol
# strings, common_xxx() calls back into perf, begin, end, unhandled
# events, etc. Ba... |
kronicz/ecommerce-2 | refs/heads/master | lib/python2.7/site-packages/django/conf/locale/sl/formats.py | 115 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd. F Y'
TIME_FORMAT = 'H:i'
DATET... |
mostaphaRoudsari/Honeybee | refs/heads/master | src/Honeybee_Glare Analysis.py | 1 | #
# Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2020, Mostapha Sadeghipour Roudsari <mostapha@ladybug.tools>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU G... |
pniedzielski/fb-hackathon-2013-11-21 | refs/heads/master | src/repl.it/jsrepl/extern/python/closured/lib/python2.7/lib2to3/fixes/fix_methodattrs.py | 326 | """Fix bound method attributes (method.im_? -> method.__?__).
"""
# Author: Christian Heimes
# Local imports
from .. import fixer_base
from ..fixer_util import Name
MAP = {
"im_func" : "__func__",
"im_self" : "__self__",
"im_class" : "__self__.__class__"
}
class FixMethodattrs(fixer_base.BaseFix):
... |
macs03/demo-cms | refs/heads/master | cms/lib/python2.7/site-packages/django/conf/locale/fa/formats.py | 234 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j F Y'
TIME_FORMAT = 'G:i:s'
DATE... |
sergiorua/libcloud | refs/heads/trunk | libcloud/compute/ssh.py | 10 | # 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 ... |
dietrichc/streamline-ppc-reports | refs/heads/master | examples/dfp/v201403/creative_service/create_creative_from_template.py | 1 | #!/usr/bin/python
#
# Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... |
UdK-VPT/Open_eQuarter | refs/heads/master | mole/webinteraction/__init__.py | 12133432 | |
thnee/ansible | refs/heads/devel | test/units/module_utils/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.