repo_name stringlengths 5 100 | path stringlengths 4 375 | copies stringclasses 991
values | size stringlengths 4 7 | content stringlengths 666 1M | license stringclasses 15
values |
|---|---|---|---|---|---|
swirkert/ipcai2016 | msi/test/test_spectrometerreader.py | 1 | 1921 | # -*- coding: utf-8 -*-
"""
ipcai2016
Copyright (c) German Cancer Research Center,
Computer Assisted Interventions.
All rights reserved.
This software is distributed WITHOUT ANY WARRANTY; without
even the implied warranty of MERCHANTABILITY or FITNESS FOR
A PARTICULAR PURPOSE.
See LICENSE for details
"""
"""
Crea... | bsd-3-clause |
thaim/ansible | test/units/modules/network/check_point/test_checkpoint_host.py | 40 | 3698 | # Copyright (c) 2018 Red Hat
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible i... | mit |
MaplePlan/djwp | django/db/models/sql/compiler.py | 15 | 50040 | import datetime
from django.conf import settings
from django.core.exceptions import FieldError
from django.db.backends.util import truncate_name
from django.db.models.constants import LOOKUP_SEP
from django.db.models.query_utils import select_related_descend, QueryWrapper
from django.db.models.sql.constants import (SI... | lgpl-3.0 |
rmcgibbo/scipy | scipy/sparse/csr.py | 39 | 14549 | """Compressed Sparse Row matrix format"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['csr_matrix', 'isspmatrix_csr']
import numpy as np
from scipy._lib.six import xrange
from ._sparsetools import csr_tocsc, csr_tobsr, csr_count_blocks, \
... | bsd-3-clause |
Qalthos/ansible | lib/ansible/modules/network/f5/bigip_gtm_virtual_server.py | 38 | 40714 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
broadcastyourseb/SADR | raspberry/allskySCRIPT/dev/test.py | 1 | 6342 | #!/usr/bin/python
#-*- coding: iso-8859-15 -*-
# SADR METEOLLSKY
# http://www.sadr.fr
# SEBASTIEN LECLERC 2018
# Inspired by Marcus Degenkolbe
# http://indilib.org/develop/tutorials/151-time-lapse-astrophotography-with-indi-python.html
# allsky frame script
import sys, time, logging
import PyIndi
import pyfits
import ... | apache-2.0 |
stefan-caraiman/cloudbase-init | cloudbaseinit/tests/metadata/services/test_ec2service.py | 1 | 3611 | # Copyright 2014 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 |
alexthered/kienhoc-platform | common/djangoapps/student/migrations/0029_add_lookup_table_between_user_and_anonymous_student_id.py | 114 | 16366 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'AnonymousUserId'
db.create_table('student_anonymoususerid', (
('id', self.gf('dj... | agpl-3.0 |
l2isbad/netdata | collectors/python.d.plugin/python_modules/bases/FrameworkServices/ExecutableService.py | 3 | 3319 | # -*- coding: utf-8 -*-
# Description:
# Author: Pawel Krupa (paulfantom)
# Author: Ilya Mashchenko (ilyam8)
# SPDX-License-Identifier: GPL-3.0-or-later
import os
from subprocess import Popen, PIPE
from bases.FrameworkServices.SimpleService import SimpleService
from bases.collection import find_binary
class Execut... | gpl-3.0 |
MikeAmy/django | tests/i18n/sampleproject/update_catalogs.py | 344 | 1780 | #!/usr/bin/env python
"""
Helper script to update sampleproject's translation catalogs.
When a bug has been identified related to i18n, this helps capture the issue
by using catalogs created from management commands.
Example:
The string "Two %% Three %%%" renders differently using trans and blocktrans.
This issue i... | bsd-3-clause |
caidongyun/Dato-Core | src/unity/python/graphlab/meta/decompiler/tests/test_simple.py | 13 | 8056 | '''
Created on Nov 9, 2011
@author: sean
'''
from graphlab.meta.testing import py2only
from graphlab.meta.decompiler.tests import Base
import unittest
class Simple(Base):
def test_assign(self):
'a = b'
self.statement('a = b')
def test_assign2(self):
'a = b = c'
self.statemen... | agpl-3.0 |
agat63/E4GT_ICS_kernel | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
supriyantomaftuh/pip | pip/_vendor/requests/packages/chardet/charsetprober.py | 3127 | 1902 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
slank/ansible | lib/ansible/plugins/callback/debug.py | 137 | 1190 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from ansible.plugins.callback.default import CallbackModule as CallbackModule_default
class CallbackModule(CallbackModule_default): # pylint: disable=too-few-public-methods,no-init
'''
Override for the default callback m... | gpl-3.0 |
arulkumarkandasamy/clictest | clictest/common/rpc.py | 1 | 9370 | # Copyright 2013 Red Hat, 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... | apache-2.0 |
CiscoSystems/fabric_enabler | setup_enabler.py | 1 | 36241 | # Copyright 2014 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 |
2ndQuadrant/ansible | lib/ansible/modules/commands/telnet.py | 38 | 2786 | # this is a virtual module that is entirely implemented server side
# Copyright: Ansible Project
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1... | gpl-3.0 |
pelson/pyggybank | testing/test_wizard.py | 1 | 3067 | """
These integration tests exist solely to test the interaction between pyggybank and GPG on the CLI.
All attempts should be made to avoid extending these tests in preference for unit tests of the functions
themselves (where necessary, mocking out the GPG interactions).
TODO: It would be great to bring these tests in... | bsd-3-clause |
matheuscas/hackathon_paypal | modules/requests/packages/chardet/escprober.py | 2936 | 3187 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... | mit |
UOWPhysSoc/Barnes-Hutt-Simulation--James-MattG- | barnesdist.py | 1 | 4826 | '''
Distribution function module for Barnes-Hutt n-body simulation developed by Matt Griffiths and James Archer.
Example distribution written by Matt Griffiths, list idea concieved by James Archer.
Special thanks to Matt Sanderson for ideas regarding distribution implementation.
Avaliable for use under a GPL v3 licenc... | gpl-3.0 |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/django/apps/config.py | 51 | 8187 | import os
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.utils._os import upath
from django.utils.module_loading import module_has_submodule
MODELS_MODULE_NAME = 'models'
class AppConfig(object):
"""
Class representing a Django application and its con... | gpl-3.0 |
40223123/finaltest2 | static/Brython3.1.3-20150514-095342/Lib/site-packages/pygame/display.py | 603 | 25179 | #!/usr/bin/env python
'''Pygame module to control the display window and screen.
This module offers control over the pygame display. Pygame has a single display
Surface that is either contained in a window or runs full screen. Once you
create the display you treat it as a regular Surface. Changes are not
immediately ... | gpl-3.0 |
shadyueh/pyranking | env/lib/python2.7/site-packages/django/contrib/gis/db/models/functions.py | 59 | 15777 | from decimal import Decimal
from django.contrib.gis.db.models.fields import GeometryField
from django.contrib.gis.db.models.sql import AreaField
from django.contrib.gis.measure import (
Area as AreaMeasure, Distance as DistanceMeasure,
)
from django.core.exceptions import FieldError
from django.db.models import Fl... | mit |
popazerty/obh-sh4 | lib/python/Plugins/Extensions/MediaPlayer/settings.py | 28 | 5037 | from Screens.Screen import Screen
from Screens.HelpMenu import HelpableScreen
from Components.FileList import FileList
from Components.Sources.StaticText import StaticText
from Components.MediaPlayer import PlayList
from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf... | gpl-2.0 |
willhess/aima-python | submissions/Conklin/vaccuum.py | 18 | 6471 | import agents as ag
import envgui as gui
import random
# ______________________________________________________________________________
loc_A, loc_B = (1, 1), (2, 1) # The two locations for the Vacuum world
def RandomVacuumAgent():
"Randomly choose one of the actions from the vacuum environment."
p = ag.Ra... | mit |
jesusfcr/airflow | tests/contrib/sensors/test_hdfs_sensors.py | 28 | 9240 | # -*- coding: utf-8 -*-
#
# 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
... | apache-2.0 |
bashrc/zeronet-debian | src/src/lib/pybitcointools/bitcoin/composite.py | 1 | 3833 | #!/usr/bin/python
from .main import *
from .transaction import *
from .bci import *
from .deterministic import *
from .blocks import *
# Takes privkey, address, value (satoshis), fee (satoshis)
def send(frm, to, value, fee=10000):
return sendmultitx(frm, to + ":" + str(value), fee)
# Takes privkey, "address1:va... | gpl-2.0 |
Yuego/dbfread | dbfread/struct_parser.py | 5 | 1169 | """
Parser that converts (C style) binary structs named tuples.
The struct can be read from a file or a byte string.
"""
import struct
import collections
def _make_struct_class(name, names):
class Struct(object):
_names = names
def __init__(self, **kwargs):
vars(self).update(kwargs)
... | mit |
revolunet/requests | requests/packages/chardet/mbcharsetprober.py | 215 | 3182 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | isc |
Ledoux/ShareYourSystem | Pythonlogy/ShareYourSystem/Specials/_Lifers/Stabilizer/tests/test_05_stability_lif_I_ExampleCell.py | 2 | 1370 | #ImportModules
import ShareYourSystem as SYS
#ImportModules
import ShareYourSystem as SYS
LateralWeightVariablesList=[
[[-100.]]
]
#Check
for __LateralWeightVariable in LateralWeightVariablesList:
#Define
MyStabilizer=SYS.StabilizerClass(
).stationarize(
_MeanWeightVariable=__Lateral... | mit |
Narcolapser/Octo | logfile.py | 2 | 7834 | from tkinter import *
from tkinter import ttk
import connection
import paramiko
import threading
import sqlite3
import time
import os
import random
class LogFile(ttk.Frame):
def __init__(self,master,filterFrame,con,log,addr,tempdir):
ttk.Frame.__init__(self,master)
self.master = master
se... | apache-2.0 |
scaphilo/koalixcrm | koalixcrm/accounting/rest/product_categorie_rest.py | 2 | 2866 | # -*- coding: utf-8 -*-
from koalixcrm.accounting.rest.account_rest import OptionAccountJSONSerializer
from rest_framework import serializers
from koalixcrm.accounting.accounting.product_category import ProductCategory
from koalixcrm.accounting.models import Account
class ProductCategoryMinimalJSONSerializer(seriali... | bsd-3-clause |
nickdex/cosmos | code/data_structures/src/tree/multiway_tree/union_find/union_find.py | 3 | 1628 | #!/usr/bin/env python
class UnionFind:
def __init__(self):
self.parent = {}
self.rank = {}
def root(self, a):
current_item = a
path = []
while self.parent[current_item] != current_item:
path.append(current_item)
current_item = self.parent[curren... | gpl-3.0 |
Opentopic/ot-api | ot_api/base.py | 1 | 2508 | import json
from booby import Model
from ot_api.endpoints import GET_URL
from ot_api.exceptions import NoParamException
from .utils import build_endpoint_url
class OpentopicModel(Model):
"""
Base Model class. Provide functionalists for needed in all opentopic objects return by endpoints
"""
parser = ... | gpl-2.0 |
grigorisg9gr/menpo | menpo/image/test/boolean_image_constrain_test.py | 4 | 2020 | import numpy as np
from numpy.testing import assert_allclose
from menpo.image import BooleanImage
from menpo.shape import PointCloud
def test_boolean_image_constrain_landmarks():
mask = BooleanImage.init_blank((10, 10), fill=False)
mask.landmarks['test'] = PointCloud(
np.array([[1, 1], [8, 1], [8, 8],... | bsd-3-clause |
cylc/cylc | tests/unit/batch_sys_handlers/test_lsf.py | 1 | 2520 | # THIS FILE IS PART OF THE CYLC SUITE ENGINE.
# Copyright (C) NIWA & British Crown (Met Office) & 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 3 of the License,... | gpl-3.0 |
Adai0808/BuildingMachineLearningSystemsWithPython | ch06/install.py | 23 | 9264 | # This code is supporting material for the book
# Building Machine Learning Systems with Python
# by Willi Richert and Luis Pedro Coelho
# published by PACKT Publishing
#
# It is made available under the MIT License
#
# Sanders-Twitter Sentiment Corpus Install Script
# Version 0.1
#
# Pulls tweet data from Twitter bec... | mit |
polimediaupv/edx-platform | common/lib/xmodule/xmodule/raw_module.py | 146 | 2027 | from lxml import etree
from xmodule.editing_module import XMLEditingDescriptor
from xmodule.xml_module import XmlDescriptor
import logging
from xblock.fields import String, Scope
from exceptions import SerializationError
log = logging.getLogger(__name__)
class RawDescriptor(XmlDescriptor, XMLEditingDescriptor):
... | agpl-3.0 |
rssenar/PyToolkit | JoinDatasets.py | 1 | 2552 |
#!/usr/bin/env python3.4
# ---------------------------------------------------------------------------- #
import os, csv, glob, re
import pandas as pd
from Constants import ConvPercentage
from tqdm import tqdm
# ---------------------------------------------------------------------------- #
os.chdir('../../../../Deskto... | bsd-2-clause |
IoveSunny/DreamBox | package/mac80211/files/host_bin/b43-fwsquash.py | 30 | 3181 | #!/usr/bin/env python
#
# b43 firmware file squasher
# Removes unnecessary firmware files
#
# Copyright (c) 2009 Michael Buesch <mb@bu3sch.de>
#
# Licensed under the GNU/GPL version 2 or (at your option) any later version.
#
import sys
import os
def usage():
print("Usage: %s PHYTYPES COREREVS /path/to/extracted/firm... | gpl-2.0 |
mahendra-r/edx-platform | cms/djangoapps/contentstore/views/tests/test_library.py | 114 | 9392 | """
Unit tests for contentstore.views.library
More important high-level tests are in contentstore/tests/test_libraries.py
"""
from contentstore.tests.utils import AjaxEnabledTestClient, parse_json
from contentstore.utils import reverse_course_url, reverse_library_url
from contentstore.views.component import get_compon... | agpl-3.0 |
zeroSteiner/smoke-zephyr | smoke_zephyr/utilities.py | 1 | 27644 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# smoke_zephyr/utilities.py
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this l... | bsd-3-clause |
ryfeus/lambda-packs | LightGBM_sklearn_scipy_numpy/source/scipy/optimize/tests/test_zeros.py | 10 | 3685 | from __future__ import division, print_function, absolute_import
from math import sqrt, exp, sin, cos
from numpy.testing import (assert_warns, assert_,
assert_allclose,
assert_equal)
from numpy import finfo
from scipy.optimize import zeros as cc
from scipy.optim... | mit |
Glutanimate/FrozenFields | src/frozen_fields/main.py | 1 | 6350 | # -*- coding: utf-8 -*-
"""
This file is part of the Frozen Fields add-on for Anki.
Main Module, hooks add-on methods into Anki.
Copyright: (c) 2012-2015 Tiago Barroso <https://github.com/tmbb>
(c) 2015-2018 Glutanimate <https://glutanimate.com/>
License: GNU AGPLv3 <https://www.gnu.org/licenses/agpl.htm... | bsd-2-clause |
danakj/chromium | third_party/closure_linter/closure_linter/not_strict_test.py | 129 | 2318 | #!/usr/bin/env python
#
# Copyright 2011 The Closure Linter 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
#... | bsd-3-clause |
pylada/pylada-light | src/pylada/ipython/launch/interactive.py | 1 | 4693 | ###############################
# This file is part of PyLaDa.
#
# Copyright (C) 2013 National Renewable Energy Lab
#
# PyLaDa is a high throughput computational platform for Physics. It aims to
# make it easier to submit large numbers of jobs on supercomputers. It
# provides a python interface to physical input, ... | gpl-3.0 |
mhvk/numpy | numpy/core/_internal.py | 3 | 27343 | """
A place for internal code
Some things are more easily handled Python.
"""
import ast
import re
import sys
import platform
import warnings
from .multiarray import dtype, array, ndarray
try:
import ctypes
except ImportError:
ctypes = None
IS_PYPY = platform.python_implementation() == 'PyPy'
if sys.byteor... | bsd-3-clause |
wolfier/incubator-airflow | airflow/operators/dagrun_operator.py | 14 | 3160 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 |
skoppisetty/idigbio-appliance | lib/sqlalchemy/log.py | 39 | 6820 | # sqlalchemy/log.py
# Copyright (C) 2006-2011 the SQLAlchemy authors and contributors <see AUTHORS file>
# Includes alterations by Vinay Sajip vinay_sajip@yahoo.co.uk
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Logging control and... | gpl-3.0 |
lovetox/gajim | src/common/jingle_rtp.py | 1 | 18136 | ##
## Copyright (C) 2006 Gajim Team
##
## Gajim 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 3 only.
##
## Gajim is distributed in the hope that it will be useful,
## but WITHOUT ANY WARRANTY; wit... | gpl-3.0 |
alkemics/graphalchemy | graphalchemy/ogm/mapper.py | 1 | 1095 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# ==============================================================================
# IMPORTS
# ==============================================================================
class Mapper(object):
"""
"""
_new_mappers = Fals... | apache-2.0 |
crazy-canux/django | tests/template_tests/syntax_tests/test_with.py | 391 | 2245 | from django.template import TemplateSyntaxError
from django.test import SimpleTestCase
from ..utils import setup
class WithTagTests(SimpleTestCase):
@setup({'with01': '{% with key=dict.key %}{{ key }}{% endwith %}'})
def test_with01(self):
output = self.engine.render_to_string('with01', {'dict': {'k... | bsd-3-clause |
MyAOSP/external_skia | tools/generate_fir_coeff.py | 198 | 4546 | #!/usr/bin/python
'''
Copyright 2013 Google Inc.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
'''
import math
import pprint
def withinStdDev(n):
"""Returns the percent of samples within n std deviations of the normal."""
return math.erf(n / math.sqrt(2))
def... | bsd-3-clause |
atul-bhouraskar/django | django/contrib/contenttypes/migrations/0001_initial.py | 585 | 1227 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.contenttypes.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='ContentType',
fields=... | bsd-3-clause |
krux/kibana-pkg | kibana-4.0.2-linux-x64/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py | 2698 | 3270 | #!/usr/bin/env python
# Copyright (c) 2011 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
""" Unit tests for the easy_xml.py file. """
import gyp.easy_xml as easy_xml
import unittest
import StringIO
class TestSequenceFunctions(... | mit |
CameronLonsdale/jam | docs/highlighting.py | 2 | 3364 | from pygments.lexer import RegexLexer, bygroups, include, combined, words
from pygments.token import *
import sphinx
class JamLexer(RegexLexer):
name = "Jam"
aliases = ["jam"]
filenames = ["*.jm"]
INTEGER_REGEX = r"[0-9]([0-9_]*[0-9])?"
tokens = {
'root': [
(r"#.*?$", Comment)... | mit |
htwenhe/DJOA | env/Lib/site-packages/django/db/models/options.py | 149 | 36502 | from __future__ import unicode_literals
import warnings
from bisect import bisect
from collections import OrderedDict, defaultdict
from itertools import chain
from django.apps import apps
from django.conf import settings
from django.core.exceptions import FieldDoesNotExist
from django.db import connections
from djang... | mit |
low-sky/pyspeckit | pyspeckit/spectrum/models/n2hp.py | 4 | 11414 | """
===========
N2H+ fitter
===========
Reference for line params:
Dore (Private Communication), improving on the determinations from
L. Pagani, F. Daniel, and M. L. Dubernet A&A 494, 719-727 (2009)
DOI: 10.1051/0004-6361:200810570
http://www.strw.leidenuniv.nl/~moldata/N2H+.html
http://adsabs.harvard.edu/abs/2005M... | mit |
Microvellum/Fluid-Designer | win64-vc/2.78/python/lib/site-packages/numpy/distutils/errors.py | 152 | 3577 | """distutils.errors
Provides exceptions used by the Distutils modules. Note that Distutils
modules may raise standard exceptions; in particular, SystemExit is
usually raised for errors that are obviously the end-user's fault
(eg. bad command-line arguments).
This module is safe to use in "from ... import *" mode; it... | gpl-3.0 |
moondrop-entertainment/django-nonrel-drawp | django/template/defaultfilters.py | 1 | 29877 | """Default variable filters."""
import re
from decimal import Decimal, InvalidOperation, ROUND_HALF_UP
import random as random_module
try:
from functools import wraps
except ImportError:
from django.utils.functional import wraps # Python 2.4 fallback.
from django.template.base import Variable, Library
from d... | bsd-3-clause |
atopuzov/nitro-python | nssrc/com/citrix/netscaler/nitro/resource/config/audit/auditmessages.py | 3 | 6812 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 |
madjam/mxnet | example/rcnn/rcnn/processing/bbox_regression.py | 25 | 5519 | # 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... | apache-2.0 |
agoose77/hivesystem | manual/movingpanda/panda-7.py | 1 | 4435 | import dragonfly
import dragonfly.pandahive
import bee
from bee import connect
import math, functools
from panda3d.core import NodePath
import dragonfly.scene.unbound
import dragonfly.std
import dragonfly.io
import dragonfly.canvas
import Spyder
# ## random matrix generator
from random import random
def random_m... | bsd-2-clause |
thaim/ansible | lib/ansible/modules/network/aci/aci_access_sub_port_block_to_access_port.py | 5 | 12106 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Simon Metzger <smnmtzgr@gmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version'... | mit |
thaim/ansible | lib/ansible/modules/storage/purestorage/purefb_dsrole.py | 38 | 6212 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2018, Simon Dodsley (simon@purestorage.com)
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',... | mit |
lihui7115/ChromiumGStreamerBackend | PRESUBMIT_test_mocks.py | 28 | 3773 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import json
import os
import re
import subprocess
import sys
class MockInputApi(object):
"""Mock class for the InputApi class.
This class can be used ... | bsd-3-clause |
angad/libjingle-mac | scons-2.2.0/build/lib/SCons/Memoize.py | 14 | 9676 | #
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
... | bsd-3-clause |
yig/intpy | intpy/src/support/__init__.py | 1 | 1101 | # support/__init__.py
#
# Copyright 2008 Rafael Menezes Barreto <rmb3@cin.ufpe.br,
# rafaelbarreto87@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 2
# as published by the Free Software Foundation.
#
# This program is di... | gpl-2.0 |
consbio/gis-metadata-parser | gis_metadata/iso_metadata_parser.py | 1 | 32865 | """ A module to contain utility ISO-19115 metadata parsing helpers """
import six
from collections import OrderedDict
from copy import deepcopy
from frozendict import frozendict, FrozenOrderedDict
from parserutils.collections import filter_empty, reduce_value, wrap_value
from parserutils.elements import get_element_... | bsd-3-clause |
fedorahungary/fedinv | fedinv/fedinv/wsgi.py | 1 | 1419 | """
WSGI config for fedinv project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION`` s... | gpl-2.0 |
asrar7787/Test-Frontools | node_modules/node-gyp/gyp/pylib/gyp/generator/xcode.py | 1363 | 58344 | # Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import filecmp
import gyp.common
import gyp.xcodeproj_file
import gyp.xcode_ninja
import errno
import os
import sys
import posixpath
import re
import shutil
import... | mit |
nlaurens/budgetRapportage | model/budget/kostensoortgroup.py | 1 | 5986 | class KostensoortGroup:
def __init__(self, name, descr, level, parent):
self.name = name
self.descr = descr
self.parent = parent # KostensoortGroup class
self.level = level
self.kostenSoorten = {} # KS die bij deze node horen (uit kostensoortgroep)
self.children = [... | mit |
lanthaler/schemaorg | lib/rdflib/plugins/parsers/pyRdfa/options.py | 14 | 11840 | # -*- coding: utf-8 -*-
"""
L{Options} class: collect the possible options that govern the parsing possibilities. The module also includes the L{ProcessorGraph} class that handles the processor graph, per RDFa 1.1 (i.e., the graph containing errors and warnings).
@summary: RDFa parser (distiller)
@requires: U{RDFLib<... | apache-2.0 |
cgstudiomap/cgstudiomap | main/eggs/Werkzeug-0.11.2-py2.7.egg/werkzeug/contrib/lint.py | 128 | 12322 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.lint
~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.5
This module provides a middleware that performs sanity checks of the WSGI
application. It checks that :pep:`333` is properly implemented and warns
on some common HTTP errors such as non-empty respons... | agpl-3.0 |
aduric/crossfit | nonrel/tests/regressiontests/settings_tests/tests.py | 47 | 2686 | from django.conf import settings
from django.utils import unittest
from django.conf import settings, UserSettingsHolder, global_settings
class SettingsTests(unittest.TestCase):
#
# Regression tests for #10130: deleting settings.
#
def test_settings_delete(self):
settings.TEST = 'test'
... | bsd-3-clause |
tumbl3w33d/ansible | lib/ansible/modules/network/aci/aci_interface_policy_leaf_profile.py | 8 | 6901 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Bruno Calogero <brunocalogero@hotmail.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_... | gpl-3.0 |
katrid/django | tests/check_framework/test_security.py | 242 | 17428 | from django.conf import settings
from django.core.checks.security import base, csrf, sessions
from django.test import SimpleTestCase
from django.test.utils import override_settings
class CheckSessionCookieSecureTest(SimpleTestCase):
@property
def func(self):
from django.core.checks.security.sessions i... | bsd-3-clause |
atalax/linux | tools/perf/util/setup.py | 766 | 1540 | #!/usr/bin/python2
from distutils.core import setup, Extension
from os import getenv
from distutils.command.build_ext import build_ext as _build_ext
from distutils.command.install_lib import install_lib as _install_lib
class build_ext(_build_ext):
def finalize_options(self):
_build_ext.finalize_optio... | gpl-2.0 |
hifly/OpenUpgrade | addons/mrp_repair/__openerp__.py | 259 | 2554 | # -*- 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... | agpl-3.0 |
open2c/bioframe | bioframe/io/fileops.py | 1 | 21340 | from collections import OrderedDict
from contextlib import closing
import tempfile
import json
import io
import numpy as np
import pandas as pd
try:
import bbi
except ImportError:
bbi = None
try:
import pyBigWig
except ImportError:
pyBigWig = None
from ..core.stringops import parse_region
from ..cor... | mit |
sv-dev1/odoo | addons/email_template/wizard/__init__.py | 446 | 1130 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... | agpl-3.0 |
waterdotorg/waterday-2015 | project/custom/forms.py | 1 | 1447 | from django import forms
from django.conf import settings
from PIL import Image
class ShareImageForm(forms.Form):
WORD_CHOICES = (
('', '2. WATER GIVES ME...'),
('joy', 'joy'),
('friendship', 'friendship'),
('life', 'life'),
('family', 'family'),
('nourishment', 'no... | gpl-3.0 |
asbjornu/arana | app/Web/aranalibtest/common/appenginepatch/appenginepatcher/patch.py | 2 | 24059 | # -*- coding: utf-8 -*-
# Unfortunately, we have to fix a few App Engine bugs here because otherwise
# not all of our features will work. Still, we should keep the number of bug
# fixes to a minimum and report everything to Google, please:
# http://code.google.com/p/googleappengine/issues/list
from google.appengine.ex... | gpl-2.0 |
jefftriplett/trolley | trolley.py | 1 | 23057 | #!/usr/bin/env python
"""
Trolley syncs issues between CSV, Github, and Buffer with Trello.
"""
import csv
import datetime
import os
import random
import click
import click_config
import github3
from buffpy.api import API as BufferAPI
from buffpy.managers.profiles import Profiles
from buffpy.managers.updates import... | bsd-3-clause |
tboyce021/home-assistant | tests/components/gios/test_air_quality.py | 7 | 4211 | """Test air_quality of GIOS integration."""
from datetime import timedelta
import json
from gios import ApiError
from homeassistant.components.air_quality import (
ATTR_AQI,
ATTR_CO,
ATTR_NO2,
ATTR_OZONE,
ATTR_PM_2_5,
ATTR_PM_10,
ATTR_SO2,
)
from homeassistant.components.gios.air_quality i... | apache-2.0 |
KimNorgaard/ansible-modules-extras | cloud/cloudstack/cs_resourcelimit.py | 27 | 6401 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2016, René Moser <mail@renemoser.net>
#
# 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 Lice... | gpl-3.0 |
leonth/elude | elude/servers/redis.py | 1 | 1616 | import asyncio
import asyncio_redis
from elude import config
from elude.servers import BaseServer
REDIS_REQUEST_WIP_KEY = '_elude:request_wip'
class RedisServer(BaseServer):
def __init__(self, proxy_gatherer, serialize_func, deserialize_func):
super().__init__(proxy_gatherer)
self.serialize = ser... | mit |
GustavoHennig/ansible | lib/ansible/modules/database/mongodb/mongodb_user.py | 6 | 16030 | #!/usr/bin/python
# (c) 2012, Elliott Foster <elliott@fourkitchens.com>
# Sponsored by Four Kitchens http://fourkitchens.com.
# (c) 2014, Epic Games, Inc.
#
# 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 publi... | gpl-3.0 |
Teamxrtc/webrtc-streaming-node | third_party/webrtc/src/chromium/src/third_party/webdriver/pylib/test/selenium/webdriver/common/utils.py | 52 | 1991 | # Copyright 2008-2009 WebDriver committers
# Copyright 2008-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 requ... | mit |
eirannejad/pyRevit | extensions/pyRevitTools.extension/pyRevit.tab/Analysis.panel/Tools.stack/Inspect.pulldown/Find All Attached Constraints.pushbutton/script.py | 1 | 1382 | """Find all constraints attached to the selected element."""
from pyrevit import revit, DB
def listconstraints(selected_el):
print('THIS OBJECT ID: {0}'.format(selected_el.Id))
clconst = DB.FilteredElementCollector(revit.doc)\
.OfCategory(DB.BuiltInCategory.OST_Constraints)\
.... | gpl-3.0 |
xiaozhuchacha/OpenBottle | action_earley_srv/scripts/nltk/classify/weka.py | 5 | 12625 | # Natural Language Toolkit: Interface to Weka Classsifiers
#
# Copyright (C) 2001-2017 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
"""
Classifiers that make use of the external 'Weka' package.
"""
from __future__ import print_function
imp... | mit |
virneo/opencog | opencog/python/pln_old/examples/context/context_agent.py | 32 | 1282 | """
A MindAgent to test the application of the context rules
"""
from opencog.cogserver import MindAgent
from pln.chainers import Chainer
from pln.rules import *
__author__ = 'Sebastian Ruder'
class ContextAgent(MindAgent):
def __init__(self):
self.chainer = None
def create_chainer(self, atomspace)... | agpl-3.0 |
jc0n/scrapy | scrapy/commands/__init__.py | 38 | 3532 | """
Base class for Scrapy commands
"""
import os
from optparse import OptionGroup
from twisted.python import failure
from scrapy.utils.conf import arglist_to_dict
from scrapy.exceptions import UsageError
class ScrapyCommand(object):
requires_project = False
crawler_process = None
# default settings to ... | bsd-3-clause |
CaptFrank/EsxiController | server/utils/error/taskhandler.py | 1 | 1464 | """
task.py
==========
This is the task handler for the error handler.
:copyright: (c) 2015 by GammaRay.
:license: BSD, see LICENSE for more details.
Author: GammaRay
Version: 1.0
Date: 3/11/2015
"""
"""
=============================================
Imports... | gpl-2.0 |
kaday/rose | t/rose-config/02-self.py | 1 | 7930 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# (C) British Crown Copyright 2012-6 Met Office.
#
# This file is part of Rose, a framework for meteorological suites.
#
# Rose is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 |
dsfsdgsbngfggb/odoo | addons/stock_invoice_directly/__openerp__.py | 260 | 1618 | # -*- 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... | agpl-3.0 |
SEL-Columbia/commcare-hq | corehq/apps/hqadmin/urls.py | 1 | 2341 | from django.conf.urls.defaults import *
from corehq.apps.reports.dispatcher import AdminReportDispatcher
from .views import FlagBrokenBuilds
urlpatterns = patterns('corehq.apps.hqadmin.views',
url(r'^$', 'default', name="default_admin_report"),
url(r'^export/global/$', 'global_report', name="export_global_repo... | bsd-3-clause |
fedspendingtransparency/data-act-core | dataactcore/aws/s3UrlHandler.py | 1 | 4148 | from datetime import datetime
import boto
from boto import sts
import os
import inspect
import json
from dataactcore.config import CONFIG_BROKER
class s3UrlHandler:
"""
This class acts a wrapper for S3 URL Signing
"""
BASE_URL = "https://s3.amazonaws.com/"
ENABLE_S3 = True
URL_LIFETIME = 2000
... | cc0-1.0 |
Chandlercjy/OnePy | OnePy/sys_module/models/calendar.py | 1 | 2501 |
import arrow
from OnePy.sys_module.components.exceptions import BacktestFinished
from OnePy.sys_module.metabase_env import OnePyEnvBase
from OnePy.utils.easy_func import get_day_ratio
class Calendar(OnePyEnvBase):
def __init__(self, instrument):
if instrument == 'A_shares':
self.is_trading_... | mit |
CFIS-Octarine/octarine | src/ossos_tests/test_ossos/test_tools/test_coding.py | 2 | 1122 | __author__ = "David Rusk <drusk@uvic.ca>"
import unittest
from hamcrest import assert_that, equal_to
from ossos import coding
class EncodingDecodingTest(unittest.TestCase):
def test_base36_encode_decode_1(self):
assert_that(coding.base36encode(1), equal_to("1"))
assert_that(coding.base36decode(... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.