code
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
226
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
# Copyright 2020 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...
cxxgtxy/tensorflow
tensorflow/python/keras/layers/preprocessing/hashing.py
Python
apache-2.0
11,280
"""Shark IQ Wrapper.""" from __future__ import annotations import logging from typing import Iterable from sharkiqpy import OperatingModes, PowerModes, Properties, SharkIqVacuum from homeassistant.components.vacuum import ( STATE_CLEANING, STATE_DOCKED, STATE_IDLE, STATE_PAUSED, STATE_RETURNING, ...
w1ll1am23/home-assistant
homeassistant/components/sharkiq/vacuum.py
Python
apache-2.0
8,401
#!/usr/bin/env python # -*- mode: python; encoding: utf-8 -*- # """This plugin renders the filesystem in a tree and a table.""" import cgi import os import random import socket from django import http from M2Crypto import X509 from grr.gui import renderers from grr.gui.plugins import fileview_widgets from grr.gui.p...
ksmaheshkumar/grr
gui/plugins/fileview.py
Python
apache-2.0
51,028
#- # Copyright (c) 2014 Robert M. Norton # All rights reserved. # # @BERI_LICENSE_HEADER_START@ # # Licensed to BERI Open Systems C.I.C. (BERI) under one or more contributor # license agreements. See the NOTICE file distributed with this work for # additional information regarding copyright ownership. BERI licenses t...
8l/beri
cheritest/trunk/tests/mt/test_ipc.py
Python
apache-2.0
1,772
# -*- coding: utf-8 -*- # # Author: François Rossigneux <francois.rossigneux@inria.fr> # # 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 # # Unles...
frossigneux/blazar
climate/tests/db/test_utils.py
Python
apache-2.0
741
# Copyright (c) 2015 NTT, OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
openstack/congress
congress/tests/api/test_api_utils.py
Python
apache-2.0
2,124
# Copyright 2017 Cloudbase Solutions Srl # 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 r...
openstack/compute-hyperv
compute_hyperv/nova/conf.py
Python
apache-2.0
3,933
from sklearn.base import BaseEstimator, TransformerMixin import numpy as np class PositionalSelector(BaseEstimator, TransformerMixin): def __init__(self, positions): self.positions = positions def fit(self, X, y=None): return self def transform(self, X): return np.array(X)[:, self...
GoogleCloudPlatform/training-data-analyst
quests/dei/census/custom_transforms.py
Python
apache-2.0
1,287
import base64 import json from django.test import TestCase from django.conf import settings from django.core.urlresolvers import reverse from ..views import register, statements, activities class ActivityTests(TestCase): @classmethod def setUpClass(cls): print "\n%s" % __name__ def setUp(self): ...
diagonalwalnut/Experience
lrs/tests/ActivityTests.py
Python
apache-2.0
25,452
import abc import datetime import decimal import functools import json import uuid import pytz import msgpack import six from lymph.utils import Undefined @six.add_metaclass(abc.ABCMeta) class ExtensionTypeSerializer(object): @abc.abstractmethod def serialize(self, obj): raise NotImplementedError ...
itakouna/lymph
lymph/serializers/base.py
Python
apache-2.0
3,844
import os import numpy as np import matplotlib.pyplot as plt from hyperion.model import ModelOutput from hyperion.util.constants import pc # Create output directory if it does not already exist if not os.path.exists('frames'): os.mkdir('frames') # Open model m = ModelOutput('flyaround_cube.rtout') # Read image...
bluescarni/hyperion
docs/tutorials/scripts/flyaround_cube_animate.py
Python
bsd-2-clause
1,402
# Copyright 2013 django-htmlmin 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 functools import wraps from htmlmin.minify import html_minify def minified_response(f): @wraps(f) def minify(*args, **kwargs): resp...
erikdejonge/django-htmlmin
htmlmin/decorators.py
Python
bsd-2-clause
837
# -*- coding: utf-8 -*- """ Flexx setup script. """ import os from os import path as op try: # use setuptools namespace, allows for "develop" import setuptools # noqa, analysis:ignore except ImportError: pass # it's not essential for installation from distutils.core import setup name = 'flexx' descrip...
sesh/flexx
setup.py
Python
bsd-2-clause
2,298
from django import forms from django.conf import settings from django.core.urlresolvers import reverse from django.template.loader import render_to_string from django.utils.safestring import mark_safe from django.utils.html import conditional_escape from django.utils.encoding import force_unicode from django.utils impo...
Xangis/django-ckeditor
ckeditor/widgets.py
Python
bsd-3-clause
3,226
#!/usr/bin/python # -*- coding: utf-8 -*- # # Urwid LCD display module # Copyright (C) 2010 Ian Ward # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1...
DarkPurpleShadow/ConnectFour
urwid/lcd_display.py
Python
bsd-3-clause
16,440
# Licensed under a 3-clause BSD style license - see LICENSE.rst # This module includes files automatically generated from ply (these end in # _lextab.py and _parsetab.py). To generate these files, remove them from this # folder, then build astropy and run the tests in-place: # # python setup.py build_ext --inplace #...
MSeifert04/astropy
astropy/units/format/generic.py
Python
bsd-3-clause
18,514
# Copyright 2015 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 collections import math import sys from telemetry.timeline import model as model_module from telemetry.value import scalar from telemetry.value import...
hefen1/chromium
tools/telemetry/telemetry/web_perf/metrics/gpu_timeline.py
Python
bsd-3-clause
9,768
#!/usr/bin/env python # # Copyright (C) 2009 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...
dekom/threepress-bookworm-read-only
bookworm/gdata/tests/all_tests.py
Python
bsd-3-clause
3,464
""" Polish-specific form helpers """ import re from django.newforms import ValidationError from django.newforms.fields import Select, RegexField from django.utils.translation import ugettext_lazy as _ class PLVoivodeshipSelect(Select): """ A select widget with list of Polish voivodeships (administrative prov...
diofeher/django-nfa
django/contrib/localflavor/pl/forms.py
Python
bsd-3-clause
5,591
# Copyright (c) 2014, the GREAT3 executive committee (http://www.great3challenge.info/?q=contacts) # 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...
barnabytprowe/great3-public
inputs/galdata/make_fits_catalogs.py
Python
bsd-3-clause
15,061
# -*- coding: utf-8 -*- import sys from django.contrib.admin.helpers import AdminForm from django.utils.decorators import method_decorator from django.db import transaction from django.utils import simplejson from django.views.decorators.clickjacking import xframe_options_sameorigin from cms.constants import PLUGIN_CO...
SinnerSchraderMobileMirrors/django-cms
cms/admin/placeholderadmin.py
Python
bsd-3-clause
25,921
import math import json import os import pytest import rti_python.ADCP.AdcpCommands def calculate_predicted_range(**kwargs): """ :param SystemFrequency=: System frequency for this configuration. :param CWPON=: Flag if Water Profile is turned on. :param CWPBL=: WP Blank in meters. :param CWPBS=: WP...
ricorx7/rti_python
ADCP/Predictor/Range.py
Python
bsd-3-clause
30,092
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('nomcom', '0004_auto_20151027_0829'), ] operations = [ migrations.RemoveField( model_name='position', name='i...
wpjesus/codematch
ietf/nomcom/migrations/0005_remove_position_incumbent.py
Python
bsd-3-clause
348
import sys from ..pakbase import Package class Mt3dAdv(Package): """ MT3DMS Advection Package Class. Parameters ---------- model : model object The model object (of type :class:`flopy.mt3d.mt.Mt3dms`) to which this package will be added. mixelm : int MIXELM...
brclark-usgs/flopy
flopy/mt3d/mtadv.py
Python
bsd-3-clause
16,549
""" Testing the Intravoxel incoherent motion module The values of the various parameters used in the tests are inspired by the study of the IVIM model applied to MR images of the brain by Federau, Christian, et al. [1]. References ---------- .. [1] Federau, Christian, et al. "Quantitative measurement of brain ...
FrancoisRheaultUS/dipy
dipy/reconst/tests/test_ivim.py
Python
bsd-3-clause
19,029
# # BSD 3-Clause License # # Copyright (c) 2017-2018, plures # 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...
skrah/ndtypes
python/ndt_randtype.py
Python
bsd-3-clause
16,372
SECRET_KEY = 'spam' DEBUG = True TEMPLATE_DEBUG = DEBUG ROOT_URLCONF = 'tests.urls' INSTALLED_APPS = ['tests'] DATABASES = {'default': {'NAME': 'db.sqlite', 'ENGINE': 'django.db.backends.sqlite3'}} # Django < 1.8 TEMPLATE_CONTEXT_PROCESSORS = [ 'django_settings_export.settings_export' ] # ...
jkbrzt/django-settings-export
tests/settings.py
Python
bsd-3-clause
688
# ---------------------------------------------------------------------------- # Copyright (c) 2016-2017, QIIME 2 development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file LICENSE, distributed with this software. # ------------------------------------------------...
jairideout/qiime2
qiime2/sdk/tests/test_artifact.py
Python
bsd-3-clause
17,709
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ astroquery.solarsystem.jpl -------------------------- a collection of data services provided by JPL """ from .sbdb import * from .horizons import * from . import *
imbasimba/astroquery
astroquery/solarsystem/jpl/__init__.py
Python
bsd-3-clause
235
# -*- coding: utf-8 -*- import os from cookiecutter import repository, exceptions import pytest def test_finds_local_repo(tmpdir): """A valid local repository should be returned.""" project_dir = repository.determine_repo_dir( 'tests/fake-repo', abbreviations={}, clone_to_dir=str(tmpd...
stevepiercy/cookiecutter
tests/repository/test_determine_repository_should_use_local_repo.py
Python
bsd-3-clause
1,964
# -*- coding: utf-8 -*- import logging from unittest import mock import olympia.core.logger from olympia.amo.tests import TestCase from olympia.users.models import UserProfile class LoggerTests(TestCase): @mock.patch('olympia.core.get_remote_addr', lambda: '127.0.0.1') @mock.patch('olympia.core.get_user', ...
kumar303/addons-server
src/olympia/core/tests/test_logger.py
Python
bsd-3-clause
2,279
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # Daniel Strohmeier <daniel.strohmeier@tu-ilmenau.de> # # License: Simplified BSD import os.path as op import numpy as np from numpy.testing import (assert_array_almost_equal, assert_allclose, assert_array_less, assert_array...
mne-tools/mne-python
mne/inverse_sparse/tests/test_mxne_inverse.py
Python
bsd-3-clause
18,922
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models from django.contrib.auth.hashers import make_password class Migration(DataMigration): def forwards(self, orm): """Adds a user to be used for migrations.""" # ``make_passw...
safwanrahman/linuxdesh
kitsune/users/migrations/0006_add_migration_user.py
Python
bsd-3-clause
7,501
""" Tests for miscellaneous models Author: Chad Fulton License: Simplified-BSD """ from __future__ import division, absolute_import, print_function import numpy as np import pandas as pd import os import re import warnings from statsmodels.tsa.statespace import mlemodel from statsmodels import datasets from numpy.te...
yl565/statsmodels
statsmodels/tsa/statespace/tests/test_models.py
Python
bsd-3-clause
6,374
""" OptimizableComp finds whether a comprehension can be optimized. """ from pythran.analyses.identifiers import Identifiers from pythran.passmanager import NodeAnalysis class OptimizableComprehension(NodeAnalysis): """Find whether a comprehension can be optimized.""" def __init__(self): self.result ...
serge-sans-paille/pythran
pythran/analyses/optimizable_comprehension.py
Python
bsd-3-clause
1,008
import os from pymco.test import ctxt from . import base class RabbitMQTestCase(base.IntegrationTestCase): '''RabbitMQ integration test case.''' CTXT = { 'connector': 'rabbitmq', 'plugin.rabbitmq.vhost': '/mcollective', 'plugin.rabbitmq.pool.size': '1', 'plugin.rabbitmq.pool....
rafaduran/python-mcollective
tests/integration/test_with_rabbitmq.py
Python
bsd-3-clause
1,771
from datetime import timedelta import operator from sys import getsizeof import warnings import numpy as np from pandas._libs import index as libindex, lib import pandas.compat as compat from pandas.compat import get_range_parameters, lrange, range from pandas.compat.numpy import function as nv from pandas.util._deco...
GuessWhoSamFoo/pandas
pandas/core/indexes/range.py
Python
bsd-3-clause
24,595
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('msgs', '0002_auto_20150204_1116'), ] operations = [ migrations.RemoveField( model_name='message', na...
xkmato/tracpro
tracpro/msgs/migrations/0003_remove_message_issue.py
Python
bsd-3-clause
349
# -*- 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): # Adding field 'AuthIdentity.last_verified' db.add_column( 'se...
jean/sentry
src/sentry/south_migrations/0159_auto__add_field_authidentity_last_verified__add_field_organizationmemb.py
Python
bsd-3-clause
52,679
import numpy as np import pandas as pd from bokeh.plotting import * # Generate some synthetic time series for six different categories cats = list("abcdef") y = np.random.randn(2000) g = np.random.choice(cats, 2000) for i, l in enumerate(cats): y[g == l] += i // 2 df = pd.DataFrame(dict(score=y, group=g)) # Find ...
sahat/bokeh
sphinx/source/tutorial/exercises/boxplot.py
Python
bsd-3-clause
2,199
#!/usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4 sw=4 et import re import os.path import subprocess from mainwindow import MainWindow def default_c10t_executable(): return "./c10t" def default_minecraft_world(): return "~/.minecraft/saves/World1" def default_output_image(): return os.path.abspat...
TomT0m/Boolean-c10t
gui/c10t-tk/c10t-tk.py
Python
bsd-3-clause
4,346
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import logging import os import sys from telemetry.core import browser_finder from telemetry.core import browser_options from telemetry.page import page_...
codenote/chromium-test
tools/telemetry/telemetry/page/page_test_runner.py
Python
bsd-3-clause
2,691
if __name__ == '__main__': x = int(raw_input()) y = int(raw_input()) z = int(raw_input()) n = int(raw_input()) print ( [ [i,j,k] for i in range(x+1) for j in range(y+1) for k in range(z+1) if i+j+k != n] )
jaswal72/hacker-rank
Python/Basic Data Types/List Comprehensions.py
Python
mit
226
# -*- coding: utf-8 -*- from __future__ import division from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import pytest from tableschema import types from tableschema.config import ERROR # Tests @pytest.mark.parametrize('format, value, result', [ ...
okfn/jsontableschema-py
tests/types/test_yearmonth.py
Python
mit
842
from collections import defaultdict from mongoengine.python_support import txt_type __all__ = ('NotRegistered', 'InvalidDocumentError', 'LookUpError', 'DoesNotExist', 'MultipleObjectsReturned', 'InvalidQueryError', 'OperationError', 'NotUniqueError', 'FieldDoesNotExist', 'ValidationE...
starsirius/mongoengine
mongoengine/errors.py
Python
mit
3,834
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
rabimba/p2pScrapper
BitTorrent-5.2.2/BitTorrent/GUI_wx/LanguageSettings.py
Python
mit
5,226
""" Microformats2 is a general way to mark up any HTML document with classes and propeties. This library parses structured data from a microformatted HTML document and returns a well-formed JSON dictionary. """ from .version import __version__ from .parser import Parser, parse from .mf_helpers import get_url __all__...
tommorris/mf2py
mf2py/__init__.py
Python
mit
369
#!/usr/bin/env python import string, copy import sys def read_fasta(afile, query_id=''): """Parses any fasta, a2m, a3m file, sequence or alignment file. @param afile input file @param query_id ID of query sequence (default='') Ensures: key of a given query ID only contains its ID...
ElofssonLab/pcons-fold
pconsc/plotting/parse_fasta.py
Python
mit
3,026
""" x86 definitions. Commonly used definitions. """ from __future__ import absolute_import from cdsl.isa import TargetISA, CPUMode import base.instructions from . import instructions as x86 from base.immediates import floatcc ISA = TargetISA('x86', [base.instructions.GROUP, x86.GROUP]) # type: TargetISA # CPU modes...
nrc/rustc-perf
collector/benchmarks/cranelift-codegen/cranelift-codegen/meta-python/isa/x86/defs.py
Python
mit
746
from __future__ import unicode_literals, division, absolute_import import os import re import logging from path import path from flexget import plugin from flexget.event import event from flexget.config_schema import one_or_more from flexget.plugin import get_plugin_by_name from flexget.utils.tools import TimedDict ...
vfrc2/Flexget
flexget/plugins/filter/exists_movie.py
Python
mit
6,869
""" Type Inference """ from .typevar import TypeVar from .ast import Def, Var from copy import copy from itertools import product try: from typing import Dict, TYPE_CHECKING, Union, Tuple, Optional, Set # noqa from typing import Iterable, List, Any, TypeVar as MTypeVar # noqa from typing import cast fr...
nrc/rustc-perf
collector/benchmarks/cranelift-codegen/cranelift-codegen/meta-python/cdsl/ti.py
Python
mit
28,415
# coding: utf-8 # Copyright 2014 Globo.com Player authors. All rights reserved. # Use of this source code is governed by a MIT License # license that can be found in the LICENSE file. import sys PYTHON_MAJOR_VERSION = sys.version_info import os import posixpath try: import urlparse as url_parser import urlli...
cristina0botez/m3u8
m3u8/__init__.py
Python
mit
2,171
from tasks.cache import cache_issues from tasks.cache import cache_pulls from tasks.cache import cache_commits from tasks.cache import oldest_issues from tasks.cache import oldest_pulls from tasks.cache import least_issues from tasks.cache import least_pulls from tasks.cache import issues_closed_since from tasks.cache ...
docker/gordon
pkg/legacy/build.py
Python
mit
731
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2017_03_01/models/sub_resource_py3.py
Python
mit
823
# -*- coding: utf-8 -*- ## Part of the pyprimes.py package. ## ## Copyright © 2014 Steven D'Aprano. ## See the file __init__.py for the licence terms for this software. """\ ===================================== Timing the speed of primes algorithms ===================================== """ from __future__ imp...
skilledindia/pyprimes
src/pyprimes/speed.py
Python
mit
4,872
from Screens.MessageBox import MessageBox from boxbranding import getMachineBrand, getMachineName from Screens.ParentalControlSetup import ProtectedScreen from Components.config import config from Tools.BoundFunction import boundFunction from Screens.InputBox import PinInput class FactoryReset(MessageBox, ProtectedScr...
schleichdi2/OpenNfr_E2_Gui-6.0
lib/python/Screens/FactoryReset.py
Python
gpl-2.0
1,747
##################################################################### # -*- coding: iso-8859-1 -*- # # # # Frets on Fire X (FoFiX) # # Copyright (C) 2006 Sami Kyöstilä ...
maggotgdv/fofix
src/Theme.py
Python
gpl-2.0
126,381
# Rekall Memory Forensics # # Copyright 2014 Google Inc. All Rights Reserved. # # 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) any later v...
chen0031/rekall
rekall-core/rekall/plugins/collectors/darwin/sessions.py
Python
gpl-2.0
7,561
#!/usr/bin/env python -i # preceeding line should have path for Python on your machine # plot.py # Purpose: plot Temp of running LIGGGHTS simulation via GnuPlot in Pizza.py # Syntax: plot.py in.liggghts Nfreq Nsteps compute-ID # in.liggghts = LIGGGHTS input script # Nfreq = plot data point every thi...
CFDEMproject/LIGGGHTS-PUBLIC
python/examples/plot.py
Python
gpl-2.0
1,885
"""Parallel testing, supporting arbitrary collection ordering The Workflow ------------ - Master py.test process starts up, inspects config to decide how many slave to start, if at all - env['parallel_base_urls'] is inspected first - py.test config.option.appliances and the related --appliance cmdline flag are u...
jkandasa/integration_tests
fixtures/parallelizer/__init__.py
Python
gpl-2.0
27,463
# vim:ts=4:sw=4:sts=4:et # -*- coding: utf-8 -*- """Additional auxiliary data types""" from itertools import islice __license__ = """\ Copyright (C) 2006-2012 Tamás Nepusz <ntamas@gmail.com> Pázmány Péter sétány 1/a, 1117 Budapest, Hungary This program is free software; you can redistribute it and/or modify it unde...
igraph/xdata-igraph
interfaces/python/igraph/datatypes.py
Python
gpl-2.0
28,500
""" Higher order classes and functions for Libvirt Sandbox (lxc) container testing :copyright: 2013 Red Hat Inc. """ import datetime import time import logging import lvsb_base # This utility function lets test-modules quickly create a list of all # sandbox aggregate types, themselves containing a list of individual...
spiceqa/virt-test
virttest/lvsb.py
Python
gpl-2.0
4,505
# -*- coding: utf-8 -*- # Copyright 2007-2021 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
thomasaarholt/hyperspy
hyperspy/tests/signals/test_image.py
Python
gpl-3.0
1,942
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): for field in ('species', 'cultivar', 'other', 'gender', 'bloom_period', 'fruit_period', 'fact_sheet...
ctaylo37/OTM2
opentreemap/treemap/migrations/0079_convert_species_null_values_to_empty_strings.py
Python
gpl-3.0
22,255
#!/usr/bin/env python2 # vim:fileencoding=utf-8 from __future__ import (unicode_literals, division, absolute_import, print_function) __license__ = 'GPL v3' __copyright__ = '2014, Kovid Goyal <kovid at kovidgoyal.net>' import sys, os, re from functools import partial from PyQt5.Qt import ( ...
drxaero/calibre
src/calibre/gui2/tweak_book/diff/main.py
Python
gpl-3.0
18,741
#!/usr/bin/env python """ script to build the latest binaries for each vehicle type, ready to upload Peter Barker, August 2017 based on build_binaries.sh by Andrew Tridgell, March 2013 AP_FLAKE8_CLEAN """ from __future__ import print_function import datetime import optparse import os import re import shutil import ...
ArduPilot/ardupilot
Tools/scripts/build_binaries.py
Python
gpl-3.0
29,462
#!/usr/bin/env python import os import sys if __name__ == "__main__": from django.core.management import execute_from_command_line os.environ.setdefault("DJANGO_SETTINGS_MODULE", "worldmap.settings") execute_from_command_line(sys.argv)
waybarrios/worldmap
manage.py
Python
gpl-3.0
253
from .depth import * from .camera import * from .contact import * from .imagefeature import * from .arduino import *
poppy-project/pypot
pypot/sensor/__init__.py
Python
gpl-3.0
117
# Copyright (C) 2007-2012 by the Free Software Foundation, Inc. # # This file is part of GNU Mailman. # # GNU Mailman 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 you...
hcs/mailman
src/mailman/interfaces/messages.py
Python
gpl-3.0
4,126
#!/usr/bin/env python from __future__ import absolute_import from collections import OrderedDict from linchpin.InventoryFilters.InventoryFilter import InventoryFilter class Inventory(InventoryFilter): DEFAULT_HOSTNAMES = ['public_ip'] def get_host_data(self, res, cfgs): """ Returns a dict o...
samvarankashyap/linch-pin
linchpin/provision/roles/gcloud/files/inventory.py
Python
gpl-3.0
1,959
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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,...
keen99/SickRage
sickbeard/notifiers/__init__.py
Python
gpl-3.0
3,001
from django.conf import settings from django.conf.urls.defaults import handler500, handler404, patterns, include, \ url from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', url(r'^admin/', include(admin.site.urls)), url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javasc...
hzlf/openbroadcast
website/cms/test_utils/project/second_urls_for_apphook_tests.py
Python
gpl-3.0
696
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Addons modules by CLEARCORP S.A. # Copyright (C) 2009-TODAY CLEARCORP S.A. (<http://clearcorp.co.cr>). # # This program is free software: you can redistribute...
sysadminmatmoz/odoo-clearcorp
TODO-8.0/cash_flow_report/__init__.py
Python
agpl-3.0
1,165
""" Module for code that should run during LMS startup """ # pylint: disable=unused-argument from django.conf import settings # Force settings to run so that the python path is modified settings.INSTALLED_APPS # pylint: disable=pointless-statement from openedx.core.lib.django_startup import autostartup import edxm...
htzy/bigfour
lms/startup.py
Python
agpl-3.0
4,878
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joel Grand-Guillaume # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
akretion/bank-statement-reconcile
__unported__/account_statement_transactionid_completion/__init__.py
Python
agpl-3.0
964
# -*- coding: utf-8 -*- # License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html from . import test_account_payment_transfer_reconcile_batch
acsone/bank-payment
account_payment_transfer_reconcile_batch/tests/__init__.py
Python
agpl-3.0
150
from sympy.core.evalf import PrecisionExhausted, complex_accuracy from sympy import pi, I, Symbol, Add, Rational, exp, sqrt, sin, cos, \ fibonacci, Integral, oo, E, atan, log, integrate, floor, ceiling, \ factorial, binomial, Sum, zeta, Catalan, Pow, GoldenRatio, sympify, \ sstr, Function, Eq, Mul, Pow, De...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/sympy/core/tests/test_evalf.py
Python
agpl-3.0
11,270
registry = {} def register(model, fields, order='pk', filter=False, results=5): registry[str(model)] = (model, fields, results, order, filter) class LoopBreak(Exception): pass def search_for_string(search_string): search_string = search_string.lower() matches = [] for key in registry: model, ...
UWCS/uwcs-website
uwcs_website/search/__init__.py
Python
agpl-3.0
1,310
# Copyright 2013-2020 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 Dtbuild3(Package): """Simple package which acts as a build dependency""" homepage = "...
iulian787/spack
var/spack/repos/builtin.mock/packages/dtbuild3/package.py
Python
lgpl-2.1
455
#!/usr/bin/python3 import argparse as ap import shared ACTIONS = dict() def action(key): def wrapper(function): ACTIONS[key] = function return function return wrapper def get_closed_issues(repo, milestone): issues_and_prs = repo.get_issues(milestone=milestone, state="closed") iss...
mpreisler/openscap
release_tools/query-milestones.py
Python
lgpl-2.1
1,404
from setuptools import setup def readme(): with open('README.rst') as f: return f.read() setup(name='portopy', version='0.1', description='Python API for porto', long_description=readme(), url='https://github.com/yandex/porto', author='marchael', author_email='marchael@yandex-team....
dreamer-dead/porto
src/api/python/setup.py
Python
lgpl-3.0
440
"""Run Valgrind on all demos.""" # Copyright (C) 2008 Ilmar Wilbers # # This file is part of DOLFIN. # # DOLFIN 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...
akshmakov/Dolfin-Fijee-Fork
test/memory/test.py
Python
lgpl-3.0
6,823
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. """Various utility functions used by this plugin""" import subprocess from os import environ, devnull from os.path impor...
EnTeQuAk/dotfiles
sublime-text-3/Packages/HTML-CSS-JS Prettify/src/py/utils/env_utils.py
Python
unlicense
2,798
"""Test the Dyson air quality component.""" import json from unittest import mock import asynctest from libpurecool.dyson_pure_cool import DysonPureCool from libpurecool.dyson_pure_state_v2 import DysonEnvironmentalSensorV2State import homeassistant.components.dyson.air_quality as dyson from homeassistant.components ...
DavidLP/home-assistant
tests/components/dyson/test_air_quality.py
Python
apache-2.0
5,733
"""Unit test for treadmill.runtime. """ import errno import socket import unittest import mock import treadmill import treadmill.rulefile import treadmill.runtime from treadmill import exc class RuntimeTest(unittest.TestCase): """Tests for treadmill.runtime.""" @mock.patch('socket.socket.bind', mock.Mock...
keithhendry/treadmill
tests/runtime_test.py
Python
apache-2.0
4,097
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 #import gnumpy as gnp # we need to explicitly import this in some cases, not sure why this doesn't get imported with numpy its...
ronanki/merlin
src/work_in_progress/run_sdae.py
Python
apache-2.0
55,019
# # 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...
chamikaramj/incubator-beam
sdks/python/apache_beam/examples/snippets/snippets.py
Python
apache-2.0
40,001
# coding=utf-8 # 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 app...
google/grumpy
compiler/block.py
Python
apache-2.0
12,060
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012, 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://www...
yamt/neutron
quantum/tests/unit/metaplugin/test_metaplugin.py
Python
apache-2.0
13,773
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # import base64 import json from six import string_types from kubernetes_py.models.unversioned.BaseModel import BaseModel from kubernetes_py.mo...
sebastienc/kubernetes-py
kubernetes_py/models/v1/Secret.py
Python
apache-2.0
8,321
# Copyright 2009 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, ...
lemonad/jaikuengine
common/tests.py
Python
apache-2.0
2,923
# Written by Bram Cohen # modified for multitracker operation by John Hoffman # see LICENSE.txt for license information from BitTornado.zurllib import urlopen, quote from urlparse import urlparse, urlunparse from socket import gethostbyname from btformats import check_peers from BitTornado.bencode import bdecode from ...
Skruf90/FriendlyTorrent
src/tornado/BitTornado/BT1/Rerequester.py
Python
apache-2.0
15,296
# Copyright 2015 OpenStack Foundation. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
projectcalico/calico-neutron
neutron/agent/metadata/config.py
Python
apache-2.0
3,403
""" Support for ISY994 fans. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/fan.isy994/ """ import logging from typing import Callable from homeassistant.components.fan import (FanEntity, DOMAIN, SPEED_OFF, SPEE...
PetePriority/home-assistant
homeassistant/components/isy994/fan.py
Python
apache-2.0
3,213
"""Platform for the Garadget cover component.""" import logging import requests import voluptuous as vol from homeassistant.components.cover import PLATFORM_SCHEMA, CoverDevice from homeassistant.const import ( CONF_ACCESS_TOKEN, CONF_COVERS, CONF_DEVICE, CONF_NAME, CONF_PASSWORD, CONF_USERNAM...
leppa/home-assistant
homeassistant/components/garadget/cover.py
Python
apache-2.0
8,790
#!/usr/bin/env python # Copyright 2014 ARM Limited # # Licensed under the Apache License, Version 2.0 # See LICENSE file for details. # standard library modules, , , import unittest import os import tempfile # internal modules: from yotta.lib.fsutils import rmRf from . import cli Test_Module_JSON = '''{ "name": ...
BlackstoneEngineering/yotta
yotta/test/cli/owners.py
Python
apache-2.0
2,645
#!/usr/bin/env python # Copyright (C) 2017 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
androidx/androidx
leanback/leanback/generatef.py
Python
apache-2.0
6,367
# -*- coding: utf-8 -*- # Copyright 2013 Mirantis, 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 requi...
huntxu/fuel-web
nailgun/nailgun/rpc/__init__.py
Python
apache-2.0
2,731
# 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...
dmlc/tvm
tests/python/contrib/test_ethosu/cascader/__init__.py
Python
apache-2.0
832
# coding: utf-8 if DefLANG in ("RU", "UA"): AnsBase_temp = tuple([line.decode("utf-8") for line in ( "\nВсего входов - %d\nВремя последнего входа - %s\nПоследняя роль - %s", # 0 "\nВремя последнего выхода - %s\nПричина выхода - %s", # 1 "\nНики: %s", # 2 "Нет статистики.", # 3 "«%s» сидит здесь - %s.", # 4 ...
alkorgun/blacksmith-2
expansions/user_stats/insc.py
Python
apache-2.0
813