code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
"""Grep dialog for Find in Files functionality. Inherits from SearchDialogBase for GUI and uses searchengine to prepare search pattern. """ import fnmatch import os import sys from tkinter import StringVar, BooleanVar from tkinter.ttk import Checkbutton from idlelib.searchbase import SearchDialogBase from idle...
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/idlelib/grep.py
Python
apache-2.0
6,741
#!/usr/bin/python2.4 # # Copyright 2010 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 ...
angvp/gord
gord/common.py
Python
apache-2.0
3,534
# 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...
nburn42/tensorflow
tensorflow/contrib/distribute/python/one_device_strategy.py
Python
apache-2.0
4,931
from packetbeat import BaseTest """ Tests for HTTP messages with gaps (packet loss) in them. """ class Test(BaseTest): def test_gap_in_large_file(self): """ Should recover well from losing a packet in a large file download. """ self.render_config_template( htt...
christiangalsterer/httpbeat
vendor/github.com/elastic/beats/packetbeat/tests/system/test_0029_http_gap.py
Python
apache-2.0
659
# 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 agreed t...
devoid/nova
nova/tests/integrated/v3/test_lock_server.py
Python
apache-2.0
1,568
# coding=utf-8 # vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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...
enolfc/occi-os
tests/test_backends_compute.py
Python
apache-2.0
11,931
# Copyright (C) 2013 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: vraj@reciprocitylabs.com from ggrc import db from ggrc.models.directive import Directive from ggrc.models....
prasannav7/ggrc-core
src/ggrc/models/section.py
Python
apache-2.0
3,107
# -*- coding: utf-8 -*- # 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 # # Un...
alshedivat/tensorflow
tensorflow/python/kernel_tests/py_func_test.py
Python
apache-2.0
22,732
# ==================================================================== # 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...
lskillen/pylucene
test/test_PrefixFilter.py
Python
apache-2.0
4,217
import concurrent from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ThreadPoolExecutor import math import os from scripts.load import put_load # Each task is a call to `put_load` def soft_blow(num_tasks=100, use_processes=False): executor = ProcessPoolExecutor if use_processes ...
TechWritingWhiz/indy-node
scripts/load_multi.py
Python
apache-2.0
1,617
# Copyright 2015 Cisco Systems # 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...
noironetworks/neutron
neutron/agent/linux/dibbler.py
Python
apache-2.0
7,239
# # # Copyright (C) 2007, 2008, 2010, 2012 Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright notice, # this list ...
apyrgio/ganeti
lib/http/__init__.py
Python
bsd-2-clause
28,992
from oonib.policy import handlers policyAPI = [ (r"/policy/nettest", handlers.NetTestPolicyHandler), (r"/policy/input", handlers.InputPolicyHandler), ]
dstufft/ooni-backend
oonib/policy/api.py
Python
bsd-2-clause
161
''' Created on Apr 25, 2017 @author: kashefy ''' import numpy as np import h5py from nideep.iow.file_system_utils import gen_paths, filter_is_h5 def id_loc_to_loc(fpath_src, key_dst, key_src='label_id_loc', has_void_bin=True): with h5py.File(fpath_src, 'r+') as h: if has_void_bin: l = np....
kashefy/caffe_sandbox
nideep/datasets/twoears/label_utils.py
Python
bsd-2-clause
798
from cms.app_base import CMSApp from cms.apphook_pool import apphook_pool from django.utils.translation import ugettext_lazy as _ from .menu import ProposalsMenu class ProposalsApp(CMSApp): name = _("Proposals app") urls = ["pyconde.proposals.urls"] menus = [ProposalsMenu] apphook_pool.register(Proposa...
EuroPython/djep
pyconde/proposals/cms_app.py
Python
bsd-3-clause
327
# Finds all files matching extensions recursively in current directory (.) # and updates tthe contact e-mail address import re import os OLD_EMAIL = "Copyright (C) 2011-2012, NYU-Poly" NEW_EMAIL = "Copyright (C) 2011-2014, NYU-Poly" EXTENSIONS = [".py", ".xml", ".xsd", ".php", ".sql", ".sh", ".rst", ".tex", ...
Nikea/VisTrails
scripts/update_email_contact.py
Python
bsd-3-clause
1,077
# Copyright (c) 2016 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 unittest from tracing.metrics import discover class MetricsDiscoverUnittest(unittest.TestCase): def testMetricsDiscoverEmpty(self): self.a...
catapult-project/catapult
tracing/tracing/metrics/discover_unittest.py
Python
bsd-3-clause
685
"""ProvidedInstance provider async mode tests.""" import asyncio from dependency_injector import containers, providers from pytest import mark, raises from .common import RESOURCE1, init_resource @mark.asyncio async def test_provided_attribute(): class TestClient: def __init__(self, resource): ...
ets-labs/python-dependency-injector
tests/unit/providers/async/test_provided_instance_py36.py
Python
bsd-3-clause
5,113
""" Attempt to generate templates for module reference with Sphinx To include extension modules, first identify them as valid in the ``_uri2path`` method, then handle them in the ``_parse_module_with_import`` script. Notes ----- This parsing is based on the import and introspection of modules. Previously functions an...
FrancoisRheaultUS/dipy
doc/tools/apigen.py
Python
bsd-3-clause
17,957
"""Tests that the IPython printing module is properly loaded. """ import warnings from sympy.core.compatibility import u from sympy.interactive.session import init_ipython_session from sympy.external import import_module from sympy.utilities.pytest import raises # run_cell was added in IPython 0.11 ipython = import_...
jamesblunt/sympy
sympy/interactive/tests/test_ipythonprinting.py
Python
bsd-3-clause
5,908
"""Test that anonymous structs/unions are transparent to member access""" import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class AnonymousTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) @skipIf( compiler="ic...
endlessm/chromium-browser
third_party/llvm/lldb/test/API/lang/c/anonymous/TestAnonymous.py
Python
bsd-3-clause
6,073
import nibabel as nib import numpy as np from scipy import stats def remove_zero_variance_voxels(func_timeseries, mask): for i in range(0, len(func_timeseries)): for j in range(0, len(func_timeseries[0])): for k in range(0, len(func_timeseries[0][0])): var = func_timeseries...
oesteban/quality-assessment-protocol
qap/dvars.py
Python
bsd-3-clause
6,915
#!/usr/bin/env python """ Raven ===== Raven is a Python client for `Sentry <http://getsentry.com/>`_. It provides full out-of-the-box support for many of the popular frameworks, including `Django <djangoproject.com>`_, `Flask <http://flask.pocoo.org/>`_, and `Pylons <http://www.pylonsproject.org/>`_. Raven also includ...
jmp0xf/raven-python
setup.py
Python
bsd-3-clause
3,611
#!/usr/bin/env python # Copyright 2021 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. # This is generated, do not edit. Update BuildConfigGenerator.groovy and # 3ppFetch.template instead. from __future__ import print_fun...
nwjs/chromium.src
third_party/android_deps/libs/org_apache_maven_wagon_wagon_http_shared/3pp/fetch.py
Python
bsd-3-clause
1,402
# 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. from __future__ import absolute_import import unittest from telemetry import decorators from telemetry.testing import tab_test_case from telemetry.timeline ...
catapult-project/catapult
telemetry/telemetry/timeline/model_unittest.py
Python
bsd-3-clause
3,395
{'comment': {'handle': 'matt@example.com', 'id': 2603645287324504065, 'message': 'I think differently now.', 'resource': '/api/v1/comments/2603645287324504065', 'url': '/event/jump_to?event_id=2603645287324504065'}}
macobo/documentation
code_snippets/results/result.api-comment-edit.py
Python
bsd-3-clause
224
"""`Resource` - Flask request scope example.""" from dependency_injector import containers, providers from dependency_injector.wiring import Closing, Provide, inject from flask import Flask, current_app class Service: ... def init_service() -> Service: print("Init service") yield Service() print("S...
ets-labs/python-dependency-injector
examples/wiring/flask_resource_closing.py
Python
bsd-3-clause
807
from __future__ import unicode_literals from __future__ import print_function from __future__ import division from __future__ import absolute_import from future import standard_library standard_library.install_aliases() from builtins import * __author__ = 'Yin' from pymongo import MongoClient from get_database import g...
shankari/e-mission-server
bin/historical/migrations/Switch_user_test2staging.py
Python
bsd-3-clause
476
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2017-06-06 17:16 from __future__ import unicode_literals from django.db import migrations import kolibri.core.fields class Migration(migrations.Migration): dependencies = [("content", "0001_initial")] operations = [ migrations.AddField( ...
lyw07/kolibri
kolibri/core/content/migrations/0002_channelmetadatacache_last_updated.py
Python
mit
476
class Solution: """ @param A : a list of integers @param target : an integer to be searched @return : a list of length 2, [index1, index2] """ def searchRange(self, A, target): # write your code here res = [] l, r = 0, len(A) - 1 while l <= r: m = (l ...
cc13ny/Allin
jiuzhang/Nine Chapters/2 Binary Search & Sorted Array/py/SearchforaRange.py
Python
mit
719
# -*- coding: utf-8 -*- """ requests_futures ~~~~~~~~~~~~~~~~ This module provides a small add-on for the requests http library. It makes use of python 3.3's concurrent.futures or the futures backport for previous releases of python. from requests_futures import FuturesSession session = FuturesSession() ...
GarySparrow/mFlaskWeb
venv/Lib/site-packages/requests_futures/sessions.py
Python
mit
2,820
# coding=utf-8 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals import numpy as np import numba from src_legacy.fourier_series.buffer.ringbuffer import Ringbuffer @numba.vectorize(nopython=True) def legendre_recursio...
jaantollander/Convergence-of-Fourier-Series
src_legacy/fourier_series/basis_functions/legendre/fast_evaluation.py
Python
mit
1,726
# -*- coding: utf-8 -*- ## ## This file is part of Harvesting Kit. ## Copyright (C) 2014 CERN. ## ## Harvesting Kit 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 2 of the ## License, or (at ...
kaplun/harvesting-kit
harvestingkit/ftp_utils.py
Python
gpl-2.0
11,930
# -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) from sympy import log, exp, Symbol, Pow, sin from sympy.printing.ccode import ccode from sympy.codegen.cfunctions import log2, exp2, expm1, log1p from sympy.codegen.rewriting import ( optimize, log2_opt, exp2_opt, expm1_opt,...
wxgeo/geophar
wxgeometrie/sympy/codegen/tests/test_rewriting.py
Python
gpl-2.0
4,843
from django.contrib import admin from membership.models import JoinRequest admin.site.register(JoinRequest)
willingc/portal
systers_portal/membership/admin.py
Python
gpl-2.0
111
# plugin/plugin_base.py # Copyright (C) 2005-2020 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Testing extensions. this module is designed to work as a testing-framework...
gltn/stdm
stdm/third_party/sqlalchemy/testing/plugin/plugin_base.py
Python
gpl-2.0
20,361
import sre_parse, sre_compile, sre_constants from sre_constants import BRANCH, SUBPATTERN from re import VERBOSE, MULTILINE, DOTALL import re import cgi import warnings _speedups = None class JSONFilter(object): def __init__(self, app, mime_type='text/x-json'): self.app = app self.mi...
Zulan/PBStats
tests/Updater/Mods/Updater/Assets/Python/Extras/simplejson.py
Python
gpl-2.0
33,784
# IMAP folder support # Copyright (C) 2002-2012 John Goerzen & contributors # # 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 2 of the License, or # (at your option) a...
spaetz/offlineimap
offlineimap/folder/IMAP.py
Python
gpl-2.0
33,949
# -*- coding: utf-8 -*- # Automatically generated - don't edit. # Use `python setup.py build_ui` to update it. from PyQt5 import QtCore, QtGui, QtWidgets class Ui_TagsCompatibilityOptionsPage(object): def setupUi(self, TagsCompatibilityOptionsPage): TagsCompatibilityOptionsPage.setObjectName("TagsCompa...
metabrainz/picard
picard/ui/ui_options_tags_compatibility_id3.py
Python
gpl-2.0
7,654
# # Copyright (c) 2004 Conectiva, Inc. # # Written by Gustavo Niemeyer <niemeyer@conectiva.com> # # This file is part of Smart Package Manager. # # Smart Package Manager 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 Fou...
dmacvicar/spacewalk
client/solaris/smartpm/smart/sorter.py
Python
gpl-2.0
22,108
"""\ minidom.py -- a lightweight DOM implementation based on SAX. parse( "foo.xml" ) parseString( "<foo><bar/></foo>" ) Todo: ===== * convenience methods for getting elements and text. * more testing * bring some of the writer and linearizer code into conformance with this interface * SAX 2 namespaces ""...
kidmaple/CoolWall
user/python/Lib/xml/dom/minidom.py
Python
gpl-2.0
14,813
"""Predicted Electoral Vote Count""" import re from madcow.util.http import getsoup from madcow.util.color import ColorLib from madcow.util import Module, strip_html class Main(Module): pattern = re.compile(r'^\s*(election|ev)\s*$', re.I) help = u'ev - current election 2008 vote prediction' baseurl = u'h...
icucinema/madcow
madcow/modules/election.py
Python
gpl-3.0
1,577
from chill import * source('mm.c') procedure('mm') #format: rose loop(0) known('ambn > 0') known('an > 0') known('bm > 0') permute([3,1,2]) print_code()
ztuowen/chill-dev
Manual/tests/test_permute.py
Python
gpl-3.0
155
# Copyright (C) 2014-2020 ycmd contributors # # This file is part of ycmd. # # ycmd 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. # #...
Valloric/ycmd
ycmd/identifier_utils.py
Python
gpl-3.0
8,517
#!/usr/bin/python import argparse import xml.etree.ElementTree as ET def main(): parser = argparse.ArgumentParser(description="List all error without a CWE assigned in CSV format") parser.add_argument("-F", metavar="filename", required=True, help="XML file containing output from: ./cppcheck --errorlist --xml...
bryongloden/cppcheck
tools/listErrorsWithoutCWE.py
Python
gpl-3.0
645
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage elasticsearch shield role (c) 2016, Thierno IB. BARRY @barryib Sponsored by Polyconseil http://polyconseil.fr. 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 Publ...
jcftang/ansible
lib/ansible/modules/database/misc/kibana_plugin.py
Python
gpl-3.0
7,030
# -*- coding: utf-8 -*- """ Data about OCA Projects, with a few helper functions. OCA_PROJECTS: dictionary of OCA Projects mapped to the list of related repository names, based on https://community.odoo.com/page/website.projects_index OCA_REPOSITORY_NAMES: list of OCA repository names """ from github_login import l...
osvalr/maintainer-tools
tools/oca_projects.py
Python
agpl-3.0
5,555
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('credit', '0005_creditrequirement_sort_value'), ] operations = [ migrations.AlterModelOptions( name='creditrequirement', ...
cpennington/edx-platform
openedx/core/djangoapps/credit/migrations/0006_creditrequirement_alter_ordering.py
Python
agpl-3.0
387
""" Setuptools configuration for Pubs Warehouse. This setup script requires that static assets have been built into the `assets/dist` directory prior to the build. """ import os from setuptools import setup, find_packages def read_requirements(): """ Get application requirements from the requirements.tx...
jkreft-usgs/PubsWarehouse_UI
server/setup.py
Python
unlicense
3,994
"""Helpers for testing Met Office DataPoint.""" from homeassistant.components.metoffice.const import DOMAIN from homeassistant.const import CONF_API_KEY, CONF_LATITUDE, CONF_LONGITUDE, CONF_NAME TEST_DATETIME_STRING = "2020-04-25T12:00:00+00:00" TEST_API_KEY = "test-metoffice-api-key" TEST_LATITUDE_WAVERTREE = 53.3...
jawilson/home-assistant
tests/components/metoffice/const.py
Python
apache-2.0
2,161
# 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...
krikru/tensorflow-opencl
tensorflow/python/kernel_tests/confusion_matrix_test.py
Python
apache-2.0
7,382
"""Entity representing a Sonos power sensor.""" from __future__ import annotations import logging from typing import Any from homeassistant.components.binary_sensor import ( DEVICE_CLASS_BATTERY_CHARGING, BinarySensorEntity, ) from homeassistant.helpers.dispatcher import async_dispatcher_connect from .const ...
Danielhiversen/home-assistant
homeassistant/components/sonos/binary_sensor.py
Python
apache-2.0
2,094
# -*- coding: utf-8 -*- from __future__ import absolute_import from django.db.models import Q from django.conf import settings from django.http import HttpResponse from django.test import TestCase, override_settings from django.utils import timezone from zerver.lib import bugdown from zerver.decorator import JsonableEr...
Juanvulcano/zulip
zerver/tests/test_messages.py
Python
apache-2.0
72,787
# Copyright 2009-2010 10gen, 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,...
reedobrien/mongo-python-driver
pymongo/max_key.py
Python
apache-2.0
604
# 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...
airbnb/superset
superset/css_templates/filters.py
Python
apache-2.0
1,481
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # Copyright (c) 2012 VMware, Inc. # Copyright (c) 2011 Citrix Systems, Inc. # Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. Yo...
silenceli/nova
nova/virt/vmwareapi/driver.py
Python
apache-2.0
28,360
import h2o from h2o.estimators.glm import H2OGeneralizedLinearEstimator h2o.init() h2o_df = h2o.import_file("http://h2o-public-test-data.s3.amazonaws.com/bigdata/laptop/glm_ordinal_logit/ordinal_multinomial_training_set.csv") h2o_df['C11'] = h2o_df['C11'].asfactor() ordinal_fit = H2OGeneralizedLinearEstimator(family =...
spennihana/h2o-3
h2o-docs/src/booklets/v2_2015/source/GLM_Vignette_code_examples/glm_ordinal_example.py
Python
apache-2.0
520
"""Test the Kuler Sky config flow.""" from unittest.mock import MagicMock, patch import pykulersky from homeassistant import config_entries, setup from homeassistant.components.kulersky.config_flow import DOMAIN async def test_flow_success(hass): """Test we get the form.""" await setup.async_setup_component...
kennedyshead/home-assistant
tests/components/kulersky/test_config_flow.py
Python
apache-2.0
3,098
# Copyright 2015 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...
akshara775/PerfKitBenchmarker-master-2
perfkitbenchmarker/providers/azure/util.py
Python
apache-2.0
1,611
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Pelix shell bundle. Provides the basic command parsing and execution support to make a Pelix shell. :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.5.8 :status: Beta .. Copyright 2014 isandlaTech ...
isandlaTech/cohorte-demos
led/dump/led-demo-yun/cohorte/dist/cohorte-1.0.0-20141216.234517-57-python-distribution/repo/pelix/shell/core.py
Python
apache-2.0
48,234
from __future__ import unicode_literals import datetime import re import sys import warnings from unittest import skipIf from xml.dom.minidom import parseString from django.contrib.auth.models import User from django.core import serializers from django.core.urlresolvers import reverse from django.db.models import Max...
weiawe/django
tests/timezones/tests.py
Python
bsd-3-clause
54,664
from __future__ import absolute_import import itertools from django.contrib import messages from django.core.context_processors import csrf from django.db import transaction from django.http import HttpResponseRedirect from django.views.decorators.cache import never_cache from django.views.decorators.csrf import csrf...
alexm92/sentry
src/sentry/web/frontend/account_notification.py
Python
bsd-3-clause
3,360
import json import pathlib import sys import boto3 dist_folder = pathlib.Path.cwd() / 'dist' try: f = next(dist_folder.glob('*.whl')) except StopIteration: print("No .whl files found in ./dist!") sys.exit() print("Uploading", f.name) s3 = boto3.client('s3') s3.upload_file(str(f), 'releases.wagtail.io',...
kaedroho/wagtail
scripts/nightly/upload.py
Python
bsd-3-clause
615
from chatterbot import ChatBot from chatterbot.adapters import Adapter from .base_case import ChatBotTestCase class AdapterValidationTests(ChatBotTestCase): def test_invalid_storage_adapter(self): kwargs = self.get_kwargs() kwargs['storage_adapter'] = 'chatterbot.input.TerminalAdapter' wi...
maclogan/VirtualPenPal
tests/test_adapter_validation.py
Python
bsd-3-clause
4,912
import json import os from urlparse import urlparse from django.conf import settings from django.core.files.storage import default_storage as storage from django.core.urlresolvers import resolve from django.http import Http404 from django.shortcuts import render from django.utils import translation from django.views.d...
Jobava/zamboni
mkt/commonplace/views.py
Python
bsd-3-clause
6,014
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..preprocess import MaskTool def test_MaskTool_inputs(): input_map = dict(args=dict(argstr='%s', ), count=dict(argstr='-count', position=2, ), datum=dict(argstr='-datum %s', ), dilate_inputs...
sgiavasis/nipype
nipype/interfaces/afni/tests/test_auto_MaskTool.py
Python
bsd-3-clause
1,585
#!/usr/bin/python # # Copyright 2008-2010 WebDriver committers # Copyright 2008-2010 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...
gx1997/chrome-loongson
third_party/webdriver/python/test/selenium/webdriver/firefox/test_ff_api.py
Python
bsd-3-clause
1,189
# Generated by Django 2.1.7 on 2019-03-25 09:40 import versatileimagefield.fields from django.db import migrations class Migration(migrations.Migration): dependencies = [("account", "0025_auto_20190314_0550")] operations = [ migrations.AddField( model_name="user", name="avat...
maferelo/saleor
saleor/account/migrations/0026_user_avatar.py
Python
bsd-3-clause
486
import csv from bs4 import BeautifulSoup from collections import Counter import re import os OUTPUT_NAME = os.getenv('OUTPUT_NAME', 'data_detikcom_labelled_740_7_class.csv') csv_file = open('data_detikcom_labelled_740.csv') csv_reader = csv.DictReader(csv_file) # Tranform individual label to candidate pair labe...
CodeRiderz/rojak
rojak-analyzer/convert_13_labels_to_7_labels.py
Python
bsd-3-clause
1,929
#! /usr/bin/env python from distutils.core import setup import rarfile ver = rarfile.__version__ ldesc = open("README.rst").read().strip() sdesc = ldesc.split('\n')[0].split(' - ')[1].strip() setup( name = "rarfile", version = ver, description = sdesc, long_description = ldesc, author = "Marko K...
koroshiya/JPyReader
rarfile/setup.py
Python
mit
961
from django.conf.urls import patterns, include, url from settings import STATIC_ROOT, GRAPHITE_API_PREFIX, CONTENT_DIR # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns( '', # These views are needed for the django-rest-framew...
ceph/calamari-clients
utils/urls.py
Python
mit
3,135
from test_support import verbose, TestFailed if verbose: print 'Running tests on argument handling' try: exec 'def f(a, a): pass' raise TestFailed, "duplicate arguments" except SyntaxError: pass try: exec 'def f(a = 0, a = 1): pass' raise TestFailed, "duplicate keyword arguments" except Synta...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-2.1/Lib/test/test_compile.py
Python
mit
907
#!/usr/bin/env python # ********************************************************************** # # Copyright (c) 2003-2013 ZeroC, Inc. All rights reserved. # # This copy of Ice is licensed to you under the terms described in the # ICE_LICENSE file included in this distribution. # # *************************************...
sbesson/zeroc-ice
rb/test/Ice/retry/run.py
Python
gpl-2.0
807
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2011 CERN. # # Invenio 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 2 of the # License, or (at your option) any later...
Panos512/invenio
modules/bibauthorid/lib/bibauthorid_webauthorprofileinterface.py
Python
gpl-2.0
4,128
# -*- coding: utf-8 -*- iface = None
mhugent/Quantum-GIS
python/plugins/processing/interface.py
Python
gpl-2.0
38
import os import subprocess import time import logging from autotest.client import utils from autotest.client.shared import error, utils_cgroup class MemoryLimit(object): """ Test memory sub system. Use it to control memory resource. 1. Clear all cgroups and init modules and parent cgroup. 2. C...
PoornimaNayak/autotest-client-tests
cgroup_tests/memory_limit_test.py
Python
gpl-2.0
8,025
#!/usr/bin/env python from pyurdme.adfsp_solver import ADFSPSolver from examples.cylinder_demo.cylinder_demo3D import cylinderDemo3D import matplotlib.pyplot as plt import numpy import pyurdme import time model = cylinderDemo3D() sol = ADFSPSolver(model, report_level=1, error_tolarance=0.05) print "Attempting to compi...
Aratz/pyurdme
test/test_adfsp.py
Python
gpl-3.0
806
from discord.ext import commands from .utils.dataIO import dataIO from .utils.chat_formatting import escape_mass_mentions from .utils import checks from collections import defaultdict from string import ascii_letters from random import choice import discord import os import re import aiohttp import asyncio import loggi...
Twentysix26/Red-DiscordBot
cogs/streams.py
Python
gpl-3.0
26,330
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster class CyberlockerCh(DeadHoster): __name__ = "CyberlockerCh" __type__ = "hoster" __version__ = "0.06" __status__ = "stable" __pattern__ = r'http://(?:www\.)?cyberlocker\.ch/\w+' __config__ = [] #@TODO: ...
manuelm/pyload
module/plugins/hoster/CyberlockerCh.py
Python
gpl-3.0
485
# -*- coding: utf-8 -*- """ Class for reading output files from NEST simulations ( http://www.nest-simulator.org/ ). Tested with NEST2.10.0 Depends on: numpy, quantities Supported: Read Authors: Julia Sprenger, Maximilian Schmidt, Johanna Senk """ # needed for Python3 compatibility from __future__ import absolute_...
CINPLA/expipe-dev
python-neo/neo/io/nestio.py
Python
gpl-3.0
32,456
############################################################################## # # Copyright (c) 2010 Alistek Ltd. (http://www.alistek.com) All Rights # Reserved. # General contacts <info@alistek.com> # # DISCLAIMER: This module is licensed under GPLv3 or newer and # is considered incompatible with ...
thinkopensolutions/aeroolib
aeroolib/plugins/__init__.py
Python
gpl-3.0
2,201
# Copyright 2014 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 accompa...
morissette/devopsdays-hackathon-2016
venv/lib/python2.7/site-packages/boto3/resources/model.py
Python
gpl-3.0
20,675
""" Python wrappers for Orthogonal Distance Regression (ODRPACK). Notes ===== * Array formats -- FORTRAN stores its arrays in memory column first, i.e. an array element A(i, j, k) will be next to A(i+1, j, k). In C and, consequently, NumPy, arrays are stored row first: A[i, j, k] is next to A[i, j, k+1]. For ef...
kenshay/ImageScript
ProgramData/SystemFiles/Python/Lib/site-packages/scipy/odr/odrpack.py
Python
gpl-3.0
41,283
from optparse import make_option from django.core.management.base import BaseCommand from django.utils.six.moves import input from treeherder.model.models import Datasource, Repository class Command(BaseCommand): help = ("Populate the datasource table and" "create the connected databases") opti...
moijes12/treeherder
treeherder/model/management/commands/init_datasources.py
Python
mpl-2.0
1,226
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
Yenthe666/Odoo_Samples
sale/sale.py
Python
agpl-3.0
69,258
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
badlogicmanpreet/nupic
tests/unit/nupic/research/spatial_pooler_cpp_api_test.py
Python
agpl-3.0
1,297
# -*- coding: utf-8 -*- """ Test models, managers, and validators. """ import ddt from completion import waffle from completion.test_utils import CompletionWaffleTestMixin from django.urls import reverse from rest_framework.test import APIClient import six from openedx.core.djangolib.testing.utils import skip_unless...
edx-solutions/edx-platform
openedx/tests/completion_integration/test_views.py
Python
agpl-3.0
9,482
""" Celery needs to be loaded when the cms modules are so that task registration and discovery can work correctly. """ # We monkey patch Kombu's entrypoints listing because scanning through this # accounts for the majority of LMS/Studio startup time for tests, and we don't # use custom Kombu serializers (which is what...
eduNEXT/edx-platform
lms/__init__.py
Python
agpl-3.0
959
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RAbsseq(RPackage): """ABSSeq: a new RNA-Seq analysis method based on modelling absolute ...
LLNL/spack
var/spack/repos/builtin/packages/r-absseq/package.py
Python
lgpl-2.1
1,317
#!/usr/bin/env python # encoding: utf-8 """Snippet representation after parsing.""" import re import vim import textwrap from UltiSnips import _vim from UltiSnips.compatibility import as_unicode from UltiSnips.indent_util import IndentUtil from UltiSnips.text import escape from UltiSnips.text_objects import Snippet...
Insanityandme/dotfiles
vim/bundle/ultisnips/pythonx/UltiSnips/snippet/definition/_base.py
Python
unlicense
14,330
""" Test lldb data formatter subsystem. """ from __future__ import print_function import os import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class SkipSummaryDataFormatterTestCase(TestBase): mydir = TestBase.compute_mydir(__file__) ...
apple/swift-lldb
packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-skip-summary/TestDataFormatterSkipSummary.py
Python
apache-2.0
7,621
"""Test deCONZ gateway.""" from copy import deepcopy import pydeconz import pytest from homeassistant import config_entries from homeassistant.components import deconz, ssdp from homeassistant.helpers.dispatcher import async_dispatcher_connect from tests.async_mock import Mock, patch from tests.common import MockCon...
pschmitt/home-assistant
tests/components/deconz/test_gateway.py
Python
apache-2.0
5,831
"""The tests for the Rfxtrx cover platform.""" import unittest import pytest from homeassistant.bootstrap import setup_component from homeassistant.components import rfxtrx as rfxtrx_core from tests.common import get_test_home_assistant @pytest.mark.skipif("os.environ.get('RFXTRX') != 'RUN'") class TestCoverRfxtrx...
kyvinh/home-assistant
tests/components/cover/test_rfxtrx.py
Python
apache-2.0
9,040
# 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...
jbedorf/tensorflow
tensorflow/compiler/tests/variable_ops_test.py
Python
apache-2.0
21,657
# Copyright 2015 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...
viqueen/closure-templates
python/bidi.py
Python
apache-2.0
16,021
# Copyright 2016, 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, s...
JavaRabbit/CS496_capstone
bigquery/rest/labels_test.py
Python
apache-2.0
1,254
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc. # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you...
vmthunder/nova
nova/network/api.py
Python
apache-2.0
23,489
# Natural Language Toolkit: Sourced Strings # # Copyright (C) 2001-2009 NLTK Project # Author: Edward Loper <edloper@gmail.com> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT """ X{Sourced strings} are strings that are annotated with information about the location in a document where they wer...
tadgh/ArgoRevisit
third_party/nltk/sourcedstring.py
Python
apache-2.0
54,572
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, so...
o0neup/ibis
ibis/sql/compiler.py
Python
apache-2.0
27,343
#!/usr/bin/python2 # Copyright 2012 Anton Beloglazov # # 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 ...
beloglazov/openstack-neat
utils/idle-time-fraction.py
Python
apache-2.0
2,317