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
# Eloipool - Python Bitcoin pool server # Copyright (C) 2011-2012 Luke Dashjr <luke-jr+eloipool@utopios.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # L...
uingei/mm
merklemaker.py
Python
agpl-3.0
19,767
"""Certificates API This is a Python API for generating certificates asynchronously. Other Django apps should use the API functions defined in this module rather than importing Django models directly. """ import logging from django.conf import settings from django.core.urlresolvers import reverse from django.db.model...
procangroup/edx-platform
lms/djangoapps/certificates/api.py
Python
agpl-3.0
21,092
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license class BaseC...
superdesk/superdesk-core
apps/common/components/base_component.py
Python
agpl-3.0
653
""" News resource ============= It is an alias for archive without filtering out published items. """ from superdesk.resource import build_custom_hateoas from apps.archive.archive import ArchiveResource, ArchiveService from apps.archive.common import CUSTOM_HATEOAS class NewsResource(ArchiveResource): datasour...
superdesk/superdesk-core
apps/archive/news.py
Python
agpl-3.0
767
# Copyright (c) 2014, Hubert Kario # # See the LICENSE file for legal information regarding use of this file. # compatibility with Python 2.6, for that we need unittest2 package, # which is not available on 3.3 or 3.4 try: import unittest2 as unittest except ImportError: import unittest from tlslite.utils.ec...
ioef/tlslite-ng
unit_tests/test_tlslite_utils_ecc.py
Python
lgpl-2.1
8,381
############################################################################## # Copyright (c) 2013-2018, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
mfherbst/spack
var/spack/repos/builtin/packages/slepc/package.py
Python
lgpl-2.1
4,929
"""distutils.dist Provides the Distribution class, which represents the module distribution being built/installed/distributed. """ import sys, os, re try: import warnings except ImportError: warnings = None from distutils.errors import * from distutils.fancy_getopt import FancyGetopt, translat...
theheros/kbengine
kbe/res/scripts/common/Lib/distutils/dist.py
Python
lgpl-3.0
47,477
#!/usr/bin/python ''' Auto-generated ui widget plugin ''' from projexui.qt.QtDesigner import QPyDesignerCustomWidgetPlugin from projexui.qt.QtGui import QIcon import projex.resources from projexui.widgets.xscintillaedit import XScintillaEdit as Base setattr(Base, '__designer_mode__', True) DEFAULT_XML = ...
bitesofcode/projexui
projexui/designer/build/xscintillaeditplugin.py
Python
lgpl-3.0
2,537
""" Tri-Polar Grid Projected Plotting ================================= This example demonstrates cell plots of data on the semi-structured ORCA2 model grid. First, the data is projected into the PlateCarree coordinate reference system. Second four pcolormesh plots are created from this projected dataset, using diff...
pp-mo/iris
docs/iris/example_code/General/orca_projection.py
Python
lgpl-3.0
1,647
import sys from services.spawn import MobileTemplate from services.spawn import WeaponTemplate from resources.datatables import WeaponType from resources.datatables import Difficulty from resources.datatables import Options from resources.datatables import FactionStatus from java.util import Vector def addTemplate(co...
ProjectSWGCore/NGECore2
scripts/mobiles/generic/faction/imperial/imp_warant_officer_ii_1st_class_33.py
Python
lgpl-3.0
1,458
# appnexus cryptography edited google pep8 smarkets import ast # This comment should not prevent the I201 below, it is not a newline. import X # I201 import flake8_import_order # I201
public/flake8-import-order
tests/test_cases/missing_newline.py
Python
lgpl-3.0
184
# Configuration file for ipython. #------------------------------------------------------------------------------ # InteractiveShellApp(Configurable) configuration #------------------------------------------------------------------------------ ## A Mixin for applications that start InteractiveShell instances. # # ...
OpnSrcConstruction/OSCbashRCs
.ipython/profile_debug/ipython_config.py
Python
unlicense
23,357
# Copyright 2014 Google Inc. All Rights Reserved. """Command for describing target HTTPS proxies.""" from googlecloudsdk.compute.lib import base_classes class Describe(base_classes.GlobalDescriber): """Display detailed information about a target HTTPS proxy.""" @staticmethod def Args(parser): cli = Describ...
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/lib/googlecloudsdk/compute/subcommands/target_https_proxies/describe.py
Python
apache-2.0
917
# Copyright 2017 Mycroft AI 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 writin...
forslund/mycroft-core
mycroft/metrics/__init__.py
Python
apache-2.0
6,083
# Copyright 2013: Mirantis 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...
varunarya10/rally
tests/unit/deploy/engines/test_devstack.py
Python
apache-2.0
4,325
""" Support for IP Webcam settings. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/switch.android_ip_webcam/ """ from homeassistant.components.switch import SwitchDevice from homeassistant.components.android_ip_webcam import ( KEY_MAP, ICON_MAP, DAT...
tinloaf/home-assistant
homeassistant/components/switch/android_ip_webcam.py
Python
apache-2.0
2,983
# # Copyright 2012, Red Hat, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
pshchelo/heat
heat/rpc/client.py
Python
apache-2.0
28,301
#!/usr/bin/env python # # Copyright 2008 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 ...
cloudysunny14/lakshmi
test/testlib/mox.py
Python
apache-2.0
60,051
#!/usr/bin/env python # Populate package directories. # # python PopulatePackages.py < packages.csv # # The input packages.csv table must have these columns: # # Package Name,Directory Name,Prefixes,File Numbers,File Names,Globals # # Rows with an empty package name specify additional prefixes and # globals for the...
ChristopherEdwards/VistA-FOIA
Scripts/PopulatePackages.py
Python
apache-2.0
4,599
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright 2013-2015 clowwindy # # 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...
ilikecola/Shadowsocks-combine-manyuser
shadowsocks/eventloop.py
Python
apache-2.0
7,495
# # Autogenerated by Thrift # # DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING # from thrift.Thrift import * from ttypes import * from thrift.Thrift import TProcessor from thrift.transport import TTransport from thrift.protocol import TBinaryProtocol try: from thrift.protocol import fastbinary exce...
lenn0x/Milo-Tracing-Framework
src/py/examples/helloworld/HelloWorld.py
Python
apache-2.0
5,966
## @file # This file contained the parser for [Sources] sections in INF file # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.<BR> # # This program and the accompanying materials are licensed and made available # under the terms and conditions of the BSD License which accompanies this # dist...
google/google-ctf
third_party/edk2/BaseTools/Source/Python/UPT/Parser/InfSourceSectionParser.py
Python
apache-2.0
5,413
# -*- coding: utf-8 -*- ''' Novell ASAM Runner ================== .. versionadded:: Beryllium Runner to interact with Novell ASAM Fan-Out Driver :codeauthor: Nitin Madhok <nmadhok@clemson.edu> To use this runner, set up the Novell Fan-Out Driver URL, username and password in the master configuration at ``/etc/salt/...
stephane-martin/salt-debian-packaging
salt-2016.3.3/salt/runners/asam.py
Python
apache-2.0
11,014
# Copyright (c) 2018 PaddlePaddle 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 app...
QiJune/Paddle
python/paddle/fluid/tests/unittests/testsuite.py
Python
apache-2.0
7,265
# Copyright (c) 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 required by applicable law or agreed to in writ...
zhangjunli177/sahara
sahara/main.py
Python
apache-2.0
6,825
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
tswast/google-cloud-python
grafeas/synth.py
Python
apache-2.0
13,298
# Copyright (c) 2012 OpenStack Foundation. # Administrator of the National Aeronautics and Space Administration. # 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 a...
citrix-openstack-build/neutron-fwaas
neutron_fwaas/openstack/common/eventlet_backdoor.py
Python
apache-2.0
4,924
#!/usr/bin/env python # # Copyright 2019 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 ...
CloudVLab/professional-services
tools/asset-inventory/asset_inventory/export.py
Python
apache-2.0
7,690
"""Provides a UPNP discovery method that mimicks Hue hubs.""" import threading import socket import logging import select from aiohttp import web from homeassistant import core from homeassistant.components.http import HomeAssistantView _LOGGER = logging.getLogger(__name__) class DescriptionXmlView(HomeAssistantVi...
ct-23/home-assistant
homeassistant/components/emulated_hue/upnp.py
Python
apache-2.0
5,032
import os.path RNASEQ_PIPELINE_DIR = os.path.dirname(__file__)
montilab/Hydra
hydra_pkg/__init__.py
Python
apache-2.0
65
# 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...
seanli9jan/tensorflow
tensorflow/contrib/saved_model/python/saved_model/keras_saved_model.py
Python
apache-2.0
16,089
"""Config flow for Google Maps Travel Time integration.""" from __future__ import annotations import logging import voluptuous as vol from homeassistant import config_entries from homeassistant.const import CONF_API_KEY, CONF_MODE, CONF_NAME from homeassistant.core import callback import homeassistant.helpers.config...
home-assistant/home-assistant
homeassistant/components/google_travel_time/config_flow.py
Python
apache-2.0
5,526
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
citrix-openstack-build/oslo.cache
oslo_cache/exception.py
Python
apache-2.0
770
# Copyright 2015 FUJITSU LIMITED # (C) Copyright 2016 Hewlett Packard Enterprise Development LP # # 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 # ...
openstack/monasca-notification
monasca_notification/common/repositories/base/base_repo.py
Python
apache-2.0
1,519
# -*- encoding: utf-8 -*- # # Copyright © 2014-2016 eNovance # # 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...
gnocchixyz/gnocchi
gnocchi/tests/test_carbonara.py
Python
apache-2.0
38,695
"""Config flow to configure the OVO Energy integration.""" import aiohttp from ovoenergy.ovoenergy import OVOEnergy import voluptuous as vol from homeassistant import config_entries from homeassistant.config_entries import ConfigFlow from homeassistant.const import CONF_PASSWORD, CONF_USERNAME from .const import DOMA...
partofthething/home-assistant
homeassistant/components/ovo_energy/config_flow.py
Python
apache-2.0
3,440
"""Tests for OwnTracks config flow.""" from unittest.mock import patch from homeassistant.setup import async_setup_component from tests.common import mock_coro async def test_config_flow_import(hass): """Test that we automatically create a config flow.""" assert not hass.config_entries.async_entries('owntrac...
aequitas/home-assistant
tests/components/owntracks/test_config_flow.py
Python
apache-2.0
2,257
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
dhermes/gcloud-python
videointelligence/synth.py
Python
apache-2.0
2,452
#!/usr/bin/env python from optparse import OptionParser import getpass import os import sys import yaml possible_topdir = os.path.normpath(os.path.join(os.path.abspath(sys.argv[0]), os.pardir, os.pardir)) if os.path.exists(os.path.join(possible_t...
toby82/anvil
tools/endpoint-service-replace.py
Python
apache-2.0
3,065
from typing import Any, Dict, List, Union from unittest import mock import orjson from zerver.lib.actions import ( do_remove_realm_custom_profile_field, do_update_user_custom_profile_data_if_changed, try_add_realm_custom_profile_field, try_reorder_realm_custom_profile_fields, ) from zerver.lib.externa...
punchagan/zulip
zerver/tests/test_custom_profile_data.py
Python
apache-2.0
35,581
# -*- coding: utf-8 -*- # # Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
tseaver/google-cloud-python
containeranalysis/google/cloud/devtools/containeranalysis_v1/gapic/container_analysis_client.py
Python
apache-2.0
21,328
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the...
fkolacek/FIT-VUT
bp-revok/python/lib/python2.7/site-packages/cryptography-0.5.2-py2.7-linux-x86_64.egg/cryptography/hazmat/primitives/serialization.py
Python
apache-2.0
909
#!/usr/bin/python """ Copyright 2014 The Trustees of Princeton University 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 ...
jcnelson/syndicate
python/syndicate/observer/storage/common.py
Python
apache-2.0
2,548
#!/usr/bin/env python """ 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");...
arenadata/ambari
ambari-server/src/main/resources/stacks/ADH/1.6/services/HBASE/package/scripts/setup_ranger_hbase.py
Python
apache-2.0
6,925
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # 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. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICEN...
dreamhost/ceilometer
ceilometer/openstack/common/rpc/impl_fake.py
Python
apache-2.0
5,641
# -*- coding: utf-8 -*- """ pygments.lexers.web ~~~~~~~~~~~~~~~~~~~ Lexers for web-related languages and markup. :copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re try: set except NameError: from sets import Set as set ...
artdent/jgments
lib/pygments-1.2.2-patched/pygments/lexers/web.py
Python
bsd-2-clause
31,156
from oct2py import octave from cvxopt import matrix, solvers from cvxpy import * import numpy as np def svm_classifier(X, y,mode): [num_sample,d]=X.shape mode_control=np.ones((num_sample,1)) for i in range(num_sample): if(mode==1): if(y[i]==-1): mode_control[i]=0; if(mode==2): if(y[i]==1): ...
dathath/IJCAI_2017_SD
proteus/svm_classifier.py
Python
bsd-2-clause
1,509
from warpnet_framework.warpnet_client import * from warpnet_framework.warpnet_common_params import * from warpnet_experiment_structs import * from twisted.internet import reactor from datetime import * from numpy import log10, linspace import time import sys mods = [[2,2,2100,78-1]] pktLens = [1412]; #range(1412, 91,...
shailcoolboy/Warp-Trinity
ResearchApps/Measurement/warpnet_coprocessors/phy_logger/examples/twoNode_cfoLogging.py
Python
bsd-2-clause
6,164
import asyncio import warnings import psycopg2 from .log import logger class Cursor: def __init__(self, conn, impl, timeout, echo): self._conn = conn self._impl = impl self._timeout = timeout self._echo = echo @property def echo(self): """Return echo mode status...
nerandell/aiopg
aiopg/cursor.py
Python
bsd-2-clause
11,747
# -*- coding: utf-8 -*- from behave.formatter.base import Formatter class PlainFormatter(Formatter): """ Provides a simple plain formatter without coloring/formatting. In addition, multi-line text and tables are not shown in output (SAD). """ name = 'plain' description = 'Very basic formatter...
tokunbo/behave-parallel
behave/formatter/plain.py
Python
bsd-2-clause
1,652
import datetime from django.core.exceptions import ObjectDoesNotExist from django.db import models from django.db.models import Sum from django.contrib.contenttypes.models import ContentType class TrendingManager(models.Manager): def trending(self, model, days=30, kind=""): views = self.filter( ...
eldarion/django-trending
trending/managers.py
Python
bsd-3-clause
1,033
#!/usr/bin/env python2.7 #! -*- encoding: utf-8 -*- import simplejson as json import threading from sqlobject import SQLObject, connectionForURI from sqlobject.sqlbuilder import Insert, Select, Delete from octopus.dispatcher.model.node import FolderNode, TaskNode from octopus.dispatcher.model.task import Task, Tas...
mikrosimage/OpenRenderManagement
scripts/archive_migration.py
Python
bsd-3-clause
13,337
# -*- coding: utf-8 -*- __version__ = "who knows" # ''' I/O for VTK <https://www.vtk.org/wp-content/uploads/2015/04/file-formats.pdf>. .. moduleauthor:: Nico Schlömer <nico.schloemer@gmail.com> NOTE: Stolen from https://github.com/nschloe/meshio/blob/master/meshio/vtk_io.py NOTE: which is distributed under the MIT l...
amanzi/ats-dev
tools/meshing_ats/vtk_io.py
Python
bsd-3-clause
16,481
from __future__ import absolute_import, unicode_literals import operator import sys from collections import OrderedDict from functools import reduce from django import forms from django.contrib.admin import FieldListFilter, widgets from django.contrib.admin.exceptions import DisallowedModelAdminLookup from django.con...
hamsterbacke23/wagtail
wagtail/contrib/modeladmin/views.py
Python
bsd-3-clause
35,740
""" Copyright (c) 2015 Red Hat, Inc All rights reserved. This software may be modified and distributed under the terms of the BSD license. See the LICENSE file for details. """ from __future__ import unicode_literals import json import os from osbs.api import OSBS from osbs.conf import Configuration from atomic_re...
mmilata/atomic-reactor
atomic_reactor/plugins/post_import_image.py
Python
bsd-3-clause
2,151
""" Test lldb data formatter subsystem. """ from __future__ import print_function import os import time import lldb from lldbsuite.test.lldbtest import * from lldbsuite.test.decorators import * import lldbsuite.test.lldbutil as lldbutil class GlobalsDataFormatterTestCase(TestBase): mydir = TestBase.compute_my...
youtube/cobalt
third_party/llvm-project/lldb/packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-globals/TestDataFormatterGlobals.py
Python
bsd-3-clause
2,544
####################################################### # Copyright (c) 2015, ArrayFire # All rights reserved. # # This file is distributed under 3-clause BSD license. # The complete license agreement can be obtained at: # http://arrayfire.com/licenses/BSD-3-Clause ######################################################...
arrayfire/arrayfire-python
arrayfire/features.py
Python
bsd-3-clause
2,480
import subprocess import sys import os import setup_util def start(args, logfile, errfile): setup_util.replace_text("rails-stripped/config/database.yml", "host: .*", "host: " + args.database_host) try: subprocess.check_call("cp Gemfile-jruby Gemfile", shell=True, cwd="rails-stripped", stderr=errfile, stdout=...
torhve/FrameworkBenchmarks
frameworks/Ruby/rails-stripped/setup_jruby.py
Python
bsd-3-clause
1,221
#coding=utf-8 from __future__ import with_statement from itertools import chain from select import select import os import socket import sys import threading from ssdb._compat import (b, xrange, imap, byte_to_chr, unicode, bytes, long, BytesIO, nativestr, basestring, ...
carryLabs/carrydb
test/carrydb/connection.py
Python
bsd-3-clause
23,711
# Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr> # License: BSD 3 clause import pytest import numpy as np from numpy.testing import assert_allclose from scipy import sparse from sklearn.base import BaseEstimator from sklearn.dummy import DummyClassifier from sklearn.model_selection import Leave...
glemaitre/scikit-learn
sklearn/tests/test_calibration.py
Python
bsd-3-clause
23,376
# -*- coding: utf-8 -*- from __future__ import unicode_literals def get_client_ip(request): """ Given an HTTP request, returns the related IP address. """ x_forwarded_for = request.META.get('HTTP_X_FORWARDED_FOR', None) if x_forwarded_for: ip = x_forwarded_for.split(',')[0] else: ...
reinbach/django-machina
machina/apps/forum_conversation/utils.py
Python
bsd-3-clause
375
from __future__ import absolute_import import uncertainties as U from .. import asrootpy __all__ = [ 'as_ufloat', 'correlated_values', ] def as_ufloat(roorealvar): """ Cast a `RooRealVar` to an `uncertainties.ufloat` """ if isinstance(roorealvar, (U.AffineScalarFunc, U.Variable)): r...
ndawe/rootpy
rootpy/stats/correlated_values.py
Python
bsd-3-clause
2,219
# "Copyright (c) 2000-2003 The Regents of the University of California. # All rights reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose, without fee, and without written agreement # is hereby granted, provided that the above copyright notice, the follow...
ekiwi/tinyos-1.x
contrib/ucb/tools/python/pytos/tools/Straw.py
Python
bsd-3-clause
3,841
""" Caching framework. This package defines set of cache backends that all conform to a simple API. In a nutshell, a cache is a set of values -- which can be any object that may be pickled -- identified by string keys. For the complete API, see the abstract BaseCache class in django.core.cache.backends.base. Client ...
heracek/django-nonrel
django/core/cache/__init__.py
Python
bsd-3-clause
6,144
# -*- coding: utf-8 -*- """ wakatime.compat ~~~~~~~~~~~~~~~ For working with Python2 and Python3. :copyright: (c) 2014 Alan Hamlett. :license: BSD, see LICENSE for more details. """ import codecs import os import platform import subprocess import sys is_py2 = (sys.version_info[0] == 2) is_py3 ...
wakatime/komodo-wakatime
components/wakatime/compat.py
Python
bsd-3-clause
3,553
import sys import unittest # Run from the root dir sys.path.insert(0, '.') from pycparser import c_parser, c_generator, c_ast _c_parser = c_parser.CParser( lex_optimize=False, yacc_debug=True, yacc_optimize=False, yacctab='yacctab') def compare_asts(a...
CtheSky/pycparser
tests/test_c_generator.py
Python
bsd-3-clause
7,444
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification, regression and One-Class SVM using Stochastic Gradient Descent (SGD). """ import numpy as np import warnings from abc import ABCMeta, abstractmethod ...
manhhomienbienthuy/scikit-learn
sklearn/linear_model/_stochastic_gradient.py
Python
bsd-3-clause
85,464
#!/usr/bin/env python3 # Copyright 2020 The Chromium OS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=logging-fstring-interpolation """Flashes firmware using Segger J-Link. This script requires Segger hardware at...
coreboot/chrome-ec
util/flash_jlink.py
Python
bsd-3-clause
6,344
import unittest import numpy as np from chainer import testing from chainercv.utils import generate_random_bbox from chainercv.visualizations import vis_bbox try: import matplotlib # NOQA _available = True except ImportError: _available = False @testing.parameterize( *testing.product_dict([ ...
chainer/chainercv
tests/visualizations_tests/test_vis_bbox.py
Python
mit
4,256
#!/usr/bin/env python ''' ooiui.core.app.science Defines the application for the Science UI ''' import os from flask import Flask from flask.ext.cache import Cache from flask_environments import Environments app = Flask(__name__, static_url_path='', template_folder='../../templates', static_folder='../../static') ...
maka-io/ooi-ui
ooiui/core/app/__init__.py
Python
mit
651
from . import Event class PlayerEvent(Event): def setup(s): s.username = s.username.encode('ascii') #Raised in manager class PlayerJoin(PlayerEvent): username = Event.Arg(required=True) ip = Event.Arg(required=True) class PlayerQuit(PlayerEvent): username = Event.Arg(required=True) ...
frostyfrog/mark2
mk2/events/player.py
Python
mit
952
""" Auto-discovers all unittests in the tests directory and runs them """ import unittest loader = unittest.TestLoader() tests = loader.discover('tests', pattern='*.py', top_level_dir='.') testRunner = unittest.TextTestRunner() testRunner.run(tests)
jimrybarski/fylm_critic
tests.py
Python
mit
250
# -*- 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 model 'CultivosVariedad' db.create_table(u'indicador11_cultivosv...
shiminasai/ciat_plataforma
monitoreo/indicador11/migrations/0001_initial.py
Python
mit
14,973
import asyncore import email.mime.text from email.message import EmailMessage from email.base64mime import body_encode as encode_base64 import email.utils import socket import smtpd import smtplib import io import re import sys import time import select import errno import textwrap import unittest from test import sup...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.5.0/Lib/test/test_smtplib.py
Python
mit
47,462
from .dual_structured_quad import ( DualRectilinearGraph, DualStructuredQuadGraph, DualUniformRectilinearGraph, ) from .structured_quad import ( RectilinearGraph, StructuredQuadGraph, UniformRectilinearGraph, ) __all__ = [ "StructuredQuadGraph", "RectilinearGraph", "UniformRectiline...
landlab/landlab
landlab/graph/structured_quad/__init__.py
Python
mit
426
# This file helps to compute a version number in source trees obtained from # git-archive tarball (such as those provided by githubs download-from-tag # feature). Distribution tarballs (built by setup.py sdist) and build # directories (produced by setup.py build) will contain a much shorter file # that just contains t...
drdoctr/doctr
doctr/_version.py
Python
mit
15,755
"""Module containing routines for estimating covariance models. """ import math from pyvol.tseries.Transforms import SeqXform import CovUtils class CovEstimator: """Base class illustrating the API covariance estimators should follow All covariance estimators should subclass this class and override ...
eiriks/pyvol
pyvol/est/CovEst.py
Python
mit
7,719
# -*- coding: utf-8 -*- # # This file is part of INSPIRE. # Copyright (C) 2014, 2015 CERN. # # INSPIRE 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...
jalavik/inspire-next
inspire/modules/harvester/definitions.py
Python
gpl-2.0
1,759
from client import get_client from client import ( BIGQUERY_SCOPE, BIGQUERY_SCOPE_READ_ONLY, JOB_CREATE_IF_NEEDED, JOB_CREATE_NEVER, JOB_SOURCE_FORMAT_NEWLINE_DELIMITED_JSON, JOB_SOURCE_FORMAT_DATASTORE_BACKUP, JOB_SOURCE_FORMAT_CSV, JOB_WRITE_TRUNCATE, JOB_WRITE_APPEND, JOB_WRIT...
thinksource/angularbigquery
lib/bigquery/__init__.py
Python
gpl-2.0
430
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 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 # Li...
CERNDocumentServer/invenio
modules/docextract/lib/refextract_cli.py
Python
gpl-2.0
10,531
#!/usr/bin/python3 # requirements: partition /dev/sdc1 with swap from storage import * from storageitu import * set_logger(get_logfile_logger()) environment = Environment(False) storage = Storage(environment) storage.probe() staging = storage.get_staging() print(staging) sdc1 = BlkDevice.find_by_name(staging,...
aschnell/libstorage-ng
integration-tests/filesystems/set-uuid.py
Python
gpl-2.0
477
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
alberts/check_mk
web/plugins/icons/inventory.py
Python
gpl-2.0
1,927
# Copyright 2014 Diamond Light Source Ltd. # # 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...
FedeMPouzols/Savu
savu/test/travis/plugin_tests/filter_tests/monitor_correction_test.py
Python
gpl-3.0
1,328
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
francbartoli/geonode
geonode/people/forms.py
Python
gpl-3.0
3,226
import frappe from frappe import _ change_icons_map = [ { "module_name": "Patient", "color": "#6BE273", "icon": "fa fa-user", "doctype": "Patient", "type": "link", "link": "List/Patient", "label": _("Patient") }, { "module_name": "Patient Encounter", "color": "#2ecc71", "icon": "fa fa-stethoscop...
chdecultot/erpnext
erpnext/patches/v11_0/change_healthcare_desktop_icons.py
Python
gpl-3.0
2,450
# This file is part of Checkbox. # # Copyright 2012 Canonical Ltd. # Written by: # Zygmunt Krynicki <zygmunt.krynicki@canonical.com> # Daniel Manrique <roadmr@ubuntu.com> # # Checkbox is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # th...
jds2001/ocp-checkbox
plainbox/plainbox/impl/exporter/test_text.py
Python
gpl-3.0
1,478
# (c) 2014, Michael DeHaan <michael.dehaan@gmail.com> # # 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 lat...
ansible/ansible
lib/ansible/utils/display.py
Python
gpl-3.0
19,081
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
zozo123/buildbot
master/buildbot/test/unit/test_util_netstrings.py
Python
gpl-3.0
1,718
# 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,...
dannyboi104/SickRage
sickbeard/tv.py
Python
gpl-3.0
117,710
from __future__ import absolute_import import six # #START_LICENSE########################################################### # # # This file is part of the Environment for Tree Exploration program # (ETE). http://etetoolkit.org # # ETE is free software: you can redistribute it and/or modify it # under the terms of th...
Unode/ete
ete3/tools/ete_build_lib/ordereddict.py
Python
gpl-3.0
10,439
# -*- coding: utf-8 -*- import operator import os import re import subprocess import time import urllib from xml.dom.minidom import parseString as parse_xml from module.network.CookieJar import CookieJar from module.network.HTTPRequest import HTTPRequest from ..internal.Hoster import Hoster from ..internal.misc impo...
Arno-Nymous/pyload
module/plugins/hoster/YoutubeCom.py
Python
gpl-3.0
42,175
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django_extensions.db.fields class Migration(migrations.Migration): dependencies = [ ('talks', '0002_auto_20150808_2108'), ] operations = [ migrations.AlterField( m...
jgmize/tulsawebdevs.org
talks/migrations/0003_auto_20150816_2148.py
Python
gpl-3.0
722
from django.test.testcases import SimpleTestCase from publicweb.extra_models import (NotificationSettings, OrganizationSettings, NO_NOTIFICATIONS, FEEDBACK_MAJOR_CHANGES) from django.contrib.auth.models import User, AnonymousUser from organizations.models import Organization from django.db.models.fields.related imp...
aptivate/econsensus
django/econsensus/publicweb/tests/settings_test.py
Python
gpl-3.0
9,245
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and Contributors # See license.txt import unittest class TestCourseTopic(unittest.TestCase): pass
frappe/erpnext
erpnext/education/doctype/course_topic/test_course_topic.py
Python
gpl-3.0
154
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django_mysql.models class Migration(migrations.Migration): dependencies = [ ('base', '0008_auto_20160331_1405'), ] operations = [ migrations.AddField( model_name='...
akatsoulas/snippets-service
snippets/base/migrations/0009_snippet_client_options.py
Python
mpl-2.0
448
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-08-09 22:56 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('judge', '0038_profile_problem_count'), ] operations = [ migrations.RemoveField( ...
monouno/site
judge/migrations/0039_remove_contest_is_external.py
Python
agpl-3.0
399
"""Points and related utilities """ from ctypes import c_double from ctypes import cast, POINTER from shapely.coords import required from shapely.geos import lgeos, DimensionError from shapely.geometry.base import BaseGeometry from shapely.geometry.proxy import CachingGeometryProxy __all__ = ['Point', 'asPoint'] c...
GbalsaC/bitnamiP
venv/lib/python2.7/site-packages/shapely/geometry/point.py
Python
agpl-3.0
6,390
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2018-06-01 12:58 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('base', '0276_professional_integration'), ] operations = [ migrations.AlterF...
uclouvain/OSIS-Louvain
base/migrations/0277_auto_20180601_1458.py
Python
agpl-3.0
682
# -*- coding: utf-8 -*- # This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. from django.conf.urls import url urlpatterns = [ url('test/(...
suutari-ai/shoop
shuup_tests/notify/notification_test_urls.py
Python
agpl-3.0
364
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2020, 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...
numenta/nupic.research
packages/backprop_structure/src/nupic/research/frameworks/backprop_structure/dataset_managers/imagenet.py
Python
agpl-3.0
3,774