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
drix00/pymcxray
pymcxray/SimulationsParameters.py
1
6043
#!/usr/bin/env python """ .. py:currentmodule:: SimulationsParameters .. moduleauthor:: Hendrix Demers <hendrix.demers@mail.mcgill.ca> Simulations parameters """ # Script information for the file. __author__ = "Hendrix Demers (hendrix.demers@mail.mcgill.ca)" __version__ = "" __date__ = "" __copyright__ = "Copyright (...
apache-2.0
cgimenop/Excel2Testlink
ExcelParser/lib/openpyxl/drawing/line.py
3
4378
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl from openpyxl.descriptors.serialisable import Serialisable from openpyxl.descriptors import ( Typed, Float, Integer, Bool, MinMax, Set, NoneSet, String, Alias, Sequence ) from openpyxl.descriptors.excel im...
mit
sinbazhou/odoo
addons/portal_project/tests/__init__.py
260
1086
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
aperigault/ansible
lib/ansible/module_utils/network/slxos/slxos.py
96
4326
# # (c) 2018 Extreme Networks 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 published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ans...
gpl-3.0
mjec/wagtail
wagtail/wagtailembeds/models.py
22
1062
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ EMBED_TYPES = ( ('video', 'Video'), ('photo', 'Photo'), ('link', 'Link'), ('rich', 'Rich'), ) @python_2_unicode_...
bsd-3-clause
consulo/consulo-python
plugin/src/main/dist/helpers/py2only/docutils/parsers/rst/languages/af.py
128
3677
# $Id: af.py 7119 2011-09-02 13:00:23Z milde $ # Author: Jannie Hofmeyr <jhsh@sun.ac.za> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated for ...
apache-2.0
iansf/engine
build/gypi_to_gn.py
106
5871
# 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. """Converts a given gypi file to a python scope and writes the result to stdout. It is assumed that the file contains a toplevel dictionary, and this script...
bsd-3-clause
convexopt/gpkit
setup.py
1
2480
"""Standard Python setup script for gpkit""" import os from distutils.core import setup LONG_DESCRIPTION = """ GPkit is a Python package for defining and manipulating geometric programming models, abstracting away the backend solver. Supported solvers are `MOSEK <http://mosek.com>`_ and `CVXopt <http://cvxopt.org/>`_....
mit
petertodd/replace-by-fee-tools
lib/python-bitcoinlib/bitcoin/bloom.py
3
6275
# Copyright (C) 2013-2014 The python-bitcoinlib developers # # This file is part of python-bitcoinlib. # # It is subject to the license terms in the LICENSE file found in the top-level # directory of this distribution. # # No part of python-bitcoinlib, including this file, may be copied, modified, # propagated, or dist...
gpl-3.0
FluidityProject/fluidity
tests/Helmholtz-anisotropic-vector-mms-p1p1cg-unstructured/helmholtz_tools.py
12
2562
from math import sin, cos # simulated variables def velocity(XX): '''Velocity''' x = XX[0]; y = XX[1] u=sin(x)*cos(y) v=-1.0*cos(x)*sin(y) return [u, v] def pressure(XX): x = XX[0]; y = XX[1] return cos(x)*cos(y) # gradients def grad_u(XX): '''grad u''' x = XX[0]; y = XX[1] u_x = cos(...
lgpl-2.1
elancom/kafka
kafka-merge-pr.py
38
19405
#!/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 "Li...
apache-2.0
sbalde/edxplatform
common/lib/xmodule/xmodule/tests/test_error_module.py
146
5893
""" Tests for ErrorModule and NonStaffErrorModule """ import unittest from xmodule.tests import get_test_system from xmodule.error_module import ErrorDescriptor, ErrorModule, NonStaffErrorDescriptor from xmodule.modulestore.xml import CourseLocationManager from opaque_keys.edx.locations import SlashSeparatedCourseKey, ...
agpl-3.0
sebrandon1/neutron
neutron/extensions/quotasv2.py
5
6470
# Copyright 2011 OpenStack Foundation. # 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 req...
apache-2.0
titansgroup/python-phonenumbers
python/phonenumbers/data/region_LS.py
11
1539
"""Auto-generated file, do not edit by hand. LS metadata""" from ..phonemetadata import NumberFormat, PhoneNumberDesc, PhoneMetadata PHONE_METADATA_LS = PhoneMetadata(id='LS', country_code=266, international_prefix='00', general_desc=PhoneNumberDesc(national_number_pattern='[2568]\\d{7}', possible_number_pattern='...
apache-2.0
mollstam/UnrealPy
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pywin32-219/com/win32comext/shell/test/testShellItem.py
20
2921
# Test IShellItem and related interfaces from win32com.shell import shell, shellcon, knownfolders import unittest class TestShellItem(unittest.TestCase): def assertShellItemsEqual(self, i1, i2): n1 = i1.GetDisplayName(shellcon.SHGDN_FORPARSING) n2 = i2.GetDisplayName(shellcon.SHGDN_FORPARSING) ...
mit
frankyrumple/ope
admin_app/ecdsa/ellipticcurve.py
55
8609
#! /usr/bin/env python # # Implementation of elliptic curves, for cryptographic applications. # # This module doesn't provide any way to choose a random elliptic # curve, nor to verify that an elliptic curve was chosen randomly, # because one can simply use NIST's standard curves. # # Notes from X9.62-1998 (draft): # ...
mit
primiano/depot_tools
third_party/logilab/astroid/utils.py
66
8301
# copyright 2003-2013 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of astroid. # # astroid 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 #...
bsd-3-clause
Donald-Otto/SpeedDreamsForkProject
src/tools/blender/blender-2.6/osg/osgobject.py
3
43620
# -*- python-indent: 4; coding: iso-8859-1; mode: python -*- # Copyright (C) 2008 Cedric Pinson, Jeremy Moles # # 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, o...
gpl-2.0
wscullin/spack
lib/spack/spack/modules/common.py
1
26288
############################################################################## # Copyright (c) 2013-2017, 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...
lgpl-2.1
dfranco/shinken
shinken/misc/filter.py
19
1849
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2009-2014: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # # This file is part of Shinken. # # Shinken is free software: you can redis...
agpl-3.0
afaheem88/tempest_neutron
tempest/openstack/common/fixture/lockutils.py
15
1890
# Copyright 2011 OpenStack Foundation. # 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 req...
apache-2.0
gravitystorm/fifengine
tools/editor/scripts/gui/dockarea.py
1
5393
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
lgpl-2.1
auto-mat/klub
apps/aklub/tests/models/test_profile.py
1
19456
# -*- coding: utf-8 -*- # Author: Petr Dlouhý <petr.dlouhy@auto-mat.cz> # # Copyright (C) 2017 o.s. Auto*Mat # # 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, o...
gpl-3.0
gnuhub/intellij-community
python/lib/Lib/site-packages/django/core/validators.py
158
6583
import re import urlparse from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from django.utils.encoding import smart_unicode # These values, if given to validate(), will trigger the self.required check. EMPTY_VALUES = (None, '', [], (), {}) try: from django...
apache-2.0
LIKAIMO/MissionPlanner
Lib/site-packages/numpy/lib/tests/test_format.py
58
25664
r''' Test the .npy file format. Set up: >>> import sys >>> if sys.version_info[0] >= 3: ... from io import BytesIO as StringIO ... else: ... from cStringIO import StringIO >>> from numpy.lib import format >>> >>> scalars = [ ... np.uint8, ... np.int8, ... ...
gpl-3.0
jeenalee/servo
tests/wpt/mozilla/tests/mozilla/referrer-policy/generic/tools/common_paths.py
238
1823
import os, sys, json, re script_directory = os.path.dirname(os.path.abspath(__file__)) generic_directory = os.path.abspath(os.path.join(script_directory, '..')) template_directory = os.path.abspath(os.path.join(script_directory, '..', ...
mpl-2.0
lreis2415/PyGeoC
pygeoc/hydro.py
1
22107
# -*- coding: utf-8 -*- """Hydrological analysis functions. @author: Liangjun Zhu @changlog: - 17-06-25 lj - check by pylint and reformat by Google style. - 18-02-05 lj - compatible with Python3 - 20-03-28 lj - add delineation function of Hillslopes. """ from __future__ import absolute_import, un...
mit
shakamunyi/nova
nova/tests/unit/image/fake.py
6
9370
# Copyright 2011 Justin Santa Barbara # Copyright 2012 OpenStack Foundation # 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/l...
apache-2.0
edelooff/newWeb
newweb/test_templateparser.py
1
37443
#!/usr/bin/python """Tests for the templateparser module.""" # Too many public methods # pylint: disable=R0904 # Standard modules import os import re import time import unittest # Unittest target from . import templateparser class Parser(unittest.TestCase): """Basic tests for the Parser class and equality of Tem...
isc
wavesoft/LiveQ
liveq-webserver/webserver/common/forum.py
1
7910
################################################################ # LiveQ - An interactive volunteering computing batch system # Copyright (C) 2013 Ioannis Charalampidis # # 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 ...
gpl-2.0
klemvor/wesnoth
scons/pango.py
33
1131
# vi: syntax=python:et:ts=4 import os, sys from os.path import join from os import environ from SCons.Util import AppendPath def CheckPango(context, backend, require_version = None): context.Message("Checking for Pango with " + backend + " backend... ") env = context.env gtkdir = env.get("gtkdir", os.envir...
gpl-2.0
Plexxi/st2
st2client/tests/unit/test_util_terminal.py
3
2661
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
leeymcj/linuxrk-tk1
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
zhenwendai/RGP
svi_experiments/rgp_experiments.py
1
42403
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Mon Aug 21 11:51:21 2017 @author: grigoral """ from __future__ import print_function import autoreg import GPy import numpy as np from matplotlib import pyplot as plt import scipy.io as io from autoreg.benchmark import tasks # Define class for normalizati...
bsd-3-clause
joopert/home-assistant
homeassistant/components/twitter/notify.py
2
8719
"""Twitter platform for notify component.""" from datetime import datetime, timedelta from functools import partial import json import logging import mimetypes import os from TwitterAPI import TwitterAPI import voluptuous as vol from homeassistant.const import CONF_ACCESS_TOKEN, CONF_USERNAME import homeassistant.hel...
apache-2.0
exploreshaifali/datastructures
linkedlist.py
1
2272
class Node: def __init__(self, data=None, _next=None): self.data = data self._next = _next class LinkedList: def __init__(self, data=None): if data is None: self.head = None else: self.head = Node(data) def travel(self): """Print all element...
mit
PLyczkowski/Sticky-Keymap
2.74/scripts/addons/io_import_dxf/dxfimport/do.py
2
56704
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 version. # # This program is distrib...
gpl-2.0
peixiaobin/viewfinder
backend/services/tools/itunes_renew.py
13
4197
#!/usr/bin/env python """Process iTunes subscription renewals. This script finds all recently-expired subscriptions and checks with iTunes to see if they have been renewed. To account for transient failures and delays in processing, it should be run from cron so that it runs several times within the EXPIRATION_GRACE_...
apache-2.0
ldoktor/autotest
client/shared/kernel_versions.py
12
3569
# # kernel_versions.py -- linux kernel version comparisons # __author__ = """Copyright Andy Whitcroft 2007""" import re # # Sort key for ordering versions chronologically. The key ordering # problem is between that introduced by -rcN. These come _before_ # their accompanying version. # # 2.6.0 -> 2.6.1-rc1 -> 2.6...
gpl-2.0
samuto/UnityOpenCV
opencv/samples/python/squares.py
6
5820
#!/usr/bin/python # # The full "Square Detector" program. # It loads several images subsequentally and tries to find squares in # each image # import urllib2 from math import sqrt import cv thresh = 50 img = None img0 = None storage = None wndname = "Square Detection Demo" def angle(pt1, pt2, pt0): dx1 = pt1.x -...
gpl-3.0
robbiet480/home-assistant
homeassistant/components/ombi/sensor.py
22
2235
"""Support for Ombi.""" from datetime import timedelta import logging from pyombi import OmbiError from homeassistant.helpers.entity import Entity from .const import DOMAIN, SENSOR_TYPES _LOGGER = logging.getLogger(__name__) SCAN_INTERVAL = timedelta(seconds=60) def setup_platform(hass, config, add_entities, dis...
apache-2.0
le9i0nx/ansible
lib/ansible/modules/network/ironware/ironware_config.py
4
10331
#!/usr/bin/python # # 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.1', 'status': ['preview'],...
gpl-3.0
goanpeca/qtpy
setup.py
1
1696
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Setup script for qtpy """ import os import io from setuptools import setup, find_packages HERE = os.path.abspath(os.path.dirname(__file__)) version_ns = {} with open(os.path.join(HERE, 'qtpy', '_version.py')) as f: exec(f.read(), {}, version_ns) with io.open(o...
mit
HeinleinSupport/check_mk
python-urllib3/lib/python/urllib3/connection.py
24
14485
from __future__ import absolute_import import datetime import logging import os import sys import socket from socket import error as SocketError, timeout as SocketTimeout import warnings from .packages import six from .packages.six.moves.http_client import HTTPConnection as _HTTPConnection from .packages.six.moves.http...
gpl-2.0
florian-dacosta/OCB
addons/account/wizard/__init__.py
362
2345
# -*- 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
srajag/nova
nova/virt/disk/mount/api.py
13
8873
# Copyright 2011 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 agreed to in writing, so...
apache-2.0
lukauskas/scipy
scipy/linalg/tests/test_interpolative.py
79
9517
#****************************************************************************** # Copyright (C) 2013 Kenneth L. Ho # 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...
bsd-3-clause
HellerCommaA/flask-angular
lib/python2.7/site-packages/setuptools/tests/test_dist_info.py
452
2615
"""Test .dist-info style distributions. """ import os import shutil import tempfile import unittest import textwrap try: import ast except: pass import pkg_resources from setuptools.tests.py26compat import skipIf def DALS(s): "dedent and left-strip" return textwrap.dedent(s).lstrip() class TestDist...
mit
lemmingapex/ElementsOfComputingSystems
projects/project06/src/Assembler.py
1
5903
#!/usr/bin/python -O ##################################### # Scott Wiedemann # # Project06 Assembler.py # ##################################### # some libraries we need import string, sys ################################ # Parser Module # ################################ c...
mit
sidja/django-debug-toolbar
debug_toolbar/panels/sql/views.py
46
4223
from __future__ import absolute_import, unicode_literals from django.http import HttpResponseBadRequest from django.shortcuts import render_to_response from django.views.decorators.csrf import csrf_exempt from debug_toolbar.panels.sql.forms import SQLSelectForm @csrf_exempt def sql_select(request): """Returns t...
bsd-3-clause
guewen/odoo
addons/crm_partner_assign/report/crm_partner_report.py
68
3323
# -*- 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
amisrs/angular-flask
angular_flask/lib/python2.7/site-packages/jsonschema/_utils.py
20
5033
import itertools import json import pkgutil import re from jsonschema.compat import str_types, MutableMapping, urlsplit class URIDict(MutableMapping): """ Dictionary which uses normalized URIs as keys. """ def normalize(self, uri): return urlsplit(uri).geturl() def __init__(self, *args...
mit
tigersirvine/occtigerscricket
django/views/generic/edit.py
77
7464
from django.forms import models as model_forms from django.core.exceptions import ImproperlyConfigured from django.http import HttpResponseRedirect from django.views.generic.base import TemplateResponseMixin, View from django.views.generic.detail import (SingleObjectMixin, SingleObjectTemplateRe...
bsd-3-clause
helldorado/ansible
lib/ansible/module_utils/common/file.py
85
5881
# Copyright (c) 2018, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import errno import os import stat import re import pwd import grp import time import...
gpl-3.0
proxysh/Safejumper-for-Desktop
buildlinux/env32/lib/python2.7/site-packages/twisted/trial/test/test_loader.py
13
25990
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for loading tests by name. """ from __future__ import absolute_import, division import os import sys import unittest as pyunit from hashlib import md5 from twisted.python import util, filepath from twisted.trial.test import packages ...
gpl-2.0
ppries/tensorflow
tensorflow/contrib/linear_optimizer/python/ops/sparse_feature_column_test.py
6
2098
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
mlq/python-taiga
tests/test_issues.py
2
3577
from taiga.requestmaker import RequestMaker from taiga.models import Issue, Issues import unittest from mock import patch from .tools import create_mock_json from .tools import MockResponse import six if six.PY2: import_open = '__builtin__.open' else: import_open = 'builtins.open' class TestIssues(unittest.Te...
mit
a-slide/pyDNA
FastqFT/PairwiseAligner.py
1
2932
#~~~~~~~GLOBAL IMPORTS~~~~~~~# # Third party package import from Bio import pairwise2 #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~# class PairwiseAligner(object): """ @class PairwiseAligner @brief Require the third party package Biopython """ ...
gpl-2.0
hanicker/odoo
openerp/addons/base/ir/ir_ui_menu.py
316
20548
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP SA (<http://openerp.com>). # # This program is free software: you can ...
agpl-3.0
globocom/database-as-a-service
dbaas/maintenance/admin/update_ssl.py
1
3357
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import patterns, url from django.contrib import messages from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from django.utils.html ...
bsd-3-clause
CG-F16-16-Rutgers/steersuite-rutgers
steerstats/steersuitedb/Algorithm.py
8
3533
import psycopg2 import sys class Algorithm(object): """Used to abstract the meta table that holds meta information about an algorithm""" # Should define the name of the table for use in sql strings _table_name = "algorithm" # Should define the insert order to make insertion stronger. _insert_ord...
gpl-3.0
alexgorban/models
research/object_detection/metrics/coco_evaluation.py
1
35976
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
bscottm/SublimeHaskell
backend_cmds.py
2
5091
import threading import sublime import sublime_plugin import SublimeHaskell.internals.backend_mgr as BackendManager import SublimeHaskell.internals.utils as Utils import SublimeHaskell.sublime_haskell_common as Common import SublimeHaskell.internals.settings as Settings class SublimeHaskellStartBackend(sublime_plug...
mit
lucernae/inasafe
safe_extras/simplejson/ordered_dict.py
1039
3370
"""Drop-in replacement for collections.OrderedDict by Raymond Hettinger http://code.activestate.com/recipes/576693/ """ from UserDict import DictMixin # Modified from original to support Python 2.4, see # http://code.google.com/p/simplejson/issues/detail?id=53 try: all except NameError: def all(seq): ...
gpl-3.0
NLeSC/eEcology-Annotation-WS
annotation/__init__.py
1
4807
# Copyright 2013 Netherlands eScience Center # # 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...
apache-2.0
lbartoletti/QGIS
python/PyQt/PyQt5/QtGui.py
45
1030
# -*- coding: utf-8 -*- """ *************************************************************************** QtGui.py --------------------- Date : November 2015 Copyright : (C) 2015 by Matthias Kuhn Email : matthias at opengis dot ch ****************************...
gpl-2.0
Kryz/sentry
src/sentry/migrations/0152_auto__add_field_file_checksum__chg_field_file_name__add_unique_file_na.py
36
32982
# -*- 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 'File.checksum' db.add_column('sentry_file', 'checksum', ...
bsd-3-clause
johancz/olympia
apps/addons/tests/test_commands.py
7
7814
import pytest from django.conf import settings from django.core.management import call_command import amo import amo.tests from addons.management.commands import approve_addons from devhub.models import AddonLog from editors.models import ReviewerScore # Where to monkeypatch "lib.crypto.tasks.sign_addons" so it's c...
bsd-3-clause
ochinchina/thrift
test/crossrunner/test.py
47
4187
# # 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
jtakayama/ics691-setupbooster
makahiki/apps/widgets/action_feedback/views.py
7
4422
"""Views handler for action_feedback rendering.""" import datetime #from apps.widgets.action_feedback.models import ActionFeedback from apps.widgets.action_feedback import feedback_analysis from django.views.decorators.cache import never_cache from django.contrib.auth.decorators import login_required from apps.widge...
mit
TaizoAyase/FSECplotter2
FSECplotter/pyqt/dialogs/yscale_dialog.py
1
2010
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' FSECplotter2 - The interactive plotting application for FSEC. Copyright 2015-2017, TaizoAyase, tikuta, biochem-fan This file is part of FSECplotter2. FSECplotter2 is free software: you can redistribute it and/or modify it under the terms of the GNU General Public Lic...
gpl-2.0
alexryndin/ambari
ambari-server/src/main/resources/common-services/RANGER/0.4.0/package/scripts/ranger_tagsync.py
1
4897
#!/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");...
apache-2.0
terbolous/CouchPotatoServer
libs/pyutil/hashexpand.py
106
2890
# Copyright (c) 2002-2012 Zooko Wilcox-O'Hearn # This file is part of pyutil; see README.rst for licensing terms. import warnings """ Cryptographically strong pseudo-random number generator based on SHA256. """ class SHA256Expander: """ Provide a cryptographically strong pseudo-random number generator base...
gpl-3.0
hoechenberger/psychopy
psychopy/_version.py
1
18449
# 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...
gpl-3.0
edquist/autopyfactory
autopyfactory/plugins/sched/FixedSchedPlugin.py
1
1335
#! /usr/bin/env python # from autopyfactory.interfaces import SchedInterface import logging class FixedSchedPlugin(SchedInterface): id = 'fixed' def __init__(self, apfqueue): try: self.apfqueue = apfqueue self.log = logging.getLogger("main.schedplugin[...
gpl-3.0
veger/ansible
lib/ansible/module_utils/aws/waiters.py
48
10179
# Copyright: (c) 2018, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) try: import botocore.waiter as core_waiter except ImportError: pass # caught by HAS_BOTO3 ec2_data = { "version": 2, "waiters": { "RouteTableExists": { ...
gpl-3.0
eltonsantos/django
django/db/backends/oracle/base.py
2
39001
""" Oracle database backend for Django. Requires cx_Oracle: http://cx-oracle.sourceforge.net/ """ from __future__ import unicode_literals import decimal import re import sys import warnings def _setup_environment(environ): import platform # Cygwin requires some special voodoo to set the environment variables...
bsd-3-clause
amenonsen/ansible
lib/ansible/module_utils/common/collections.py
59
3527
# Copyright: (c) 2018, Sviatoslav Sydorenko <ssydoren@redhat.com> # Copyright: (c) 2018, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) """Collection of low-level utility functions.""" from __future__ import absolute_import, division, print_fu...
gpl-3.0
dmnfarrell/epitopemap
languages/pt-pt.py
1
7860
# -*- coding: utf-8 -*- { '"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"update" é uma expressão opcional como "field1=\'newvalue\'". Não pode actualizar ou eliminar os resultados de um JOIN', '%s rows deleted': '%s linhas eliminadas', '%s rows upda...
apache-2.0
vignanl/Plinth
plinth/modules/pagekite/__init__.py
8
2928
# # This file is part of Plinth. # # 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 # License, or (at your option) any later version. # # This program is distribute...
agpl-3.0
anorfleet/turntable
test/lib/python2.7/site-packages/numpy/distutils/tests/test_npy_pkg_config.py
70
3069
from __future__ import division, absolute_import, print_function import os from tempfile import mkstemp from numpy.testing import * from numpy.distutils.npy_pkg_config import read_config, parse_flags simple = """\ [meta] Name = foo Description = foo lib Version = 0.1 [default] cflags = -I/usr/include libs = -L/usr/...
mit
DavidWhittingham/agsadmin
agsadmin/sharing_admin/portals/Role.py
1
1965
from __future__ import (absolute_import, division, print_function, unicode_literals) from builtins import (ascii, bytes, chr, dict, filter, hex, input, int, map, next, oct, open, pow, range, round, str, super, zip) from ..._utils import send_session_request from .._PortalEndpointBase import Porta...
bsd-3-clause
vmax-feihu/hue
desktop/core/ext-py/openpyxl-2.3.0-b2/openpyxl/workbook/names/named_range.py
13
4731
from __future__ import absolute_import # Copyright (c) 2010-2015 openpyxl """Track named groups of cells in a worksheet""" # Python stdlib imports import re import warnings # package imports from openpyxl.utils import absolute_coordinate from openpyxl.compat import unicode from openpyxl.utils.exceptions import Named...
apache-2.0
guozhangwang/kafka
tests/kafkatest/tests/streams/streams_cooperative_rebalance_upgrade_test.py
3
10768
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
apache-2.0
determinedcheetahs/cheetah_juniper
hadoop/contrib/hod/hodlib/Common/hodsvc.py
182
8438
#Licensed to the Apache Software Foundation (ASF) under one #or more contributor license agreements. See the NOTICE file #distributed with this work for additional information #regarding copyright ownership. The ASF licenses this file #to you under the Apache License, Version 2.0 (the #"License"); you may not use thi...
apache-2.0
seibert-media/Highton
highton/fields/date_field.py
1
1048
import datetime from xml.etree import ElementTree from highton.fields.field import Field from highton.fields.field_constants import FieldConstants class DateField(Field): """ The DateField represents a field which value will be parsed to Highrise specific date format """ DATE_FORMAT = '%Y-%m-%d' ...
apache-2.0
adamtiger/tensorflow
tensorflow/contrib/labeled_tensor/python/ops/ops.py
77
46403
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
mluke93/osf.io
website/profile/views.py
6
27811
# -*- coding: utf-8 -*- import datetime import logging import httplib import httplib as http # TODO: Inconsistent usage of aliased import from dateutil.parser import parse as parse_date from flask import request import markupsafe from modularodm.exceptions import ValidationError, NoResultsFound, MultipleResultsFound...
apache-2.0
hlin117/statsmodels
statsmodels/sandbox/examples/ex_onewaygls.py
33
6903
# -*- coding: utf-8 -*- """Example: Test for equality of coefficients across groups/regressions Created on Sat Mar 27 22:36:51 2010 Author: josef-pktd """ import numpy as np from scipy import stats #from numpy.testing import assert_almost_equal import statsmodels.api as sm from statsmodels.sandbox.regression.onewayg...
bsd-3-clause
mcus/SickRage
lib/sqlalchemy/dialects/sybase/pysybase.py
79
3228
# sybase/pysybase.py # Copyright (C) 2010-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: sybase+pysybase :name: Python-Sybase :dbapi: Sybase :c...
gpl-3.0
marc-sensenich/ansible
lib/ansible/utils/unsafe_proxy.py
41
4247
# PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2 # -------------------------------------------- # # 1. This LICENSE AGREEMENT is between the Python Software Foundation # ("PSF"), and the Individual or Organization ("Licensee") accessing and # otherwise using this software ("Python") in source or binary form and # its ass...
gpl-3.0
jeremiahmarks/sl4a
python/src/Lib/plat-irix5/readcd.py
132
8576
# Class interface to the CD module. from warnings import warnpy3k warnpy3k("the readcd module has been removed in Python 3.0", stacklevel=2) del warnpy3k import cd, CD class Error(Exception): pass class _Stop(Exception): pass def _doatime(self, cb_type, data): if ((data[0] * 60) + data[1]) * 75 + data[2]...
apache-2.0
leogregianin/pychess
lib/pychess/Utils/logic.py
1
8599
""" This module contains chess logic functins for the pychess client. They are based upon the lutils modules, but supports standard object types and is therefore not as fast. """ from .lutils import lmovegen from .lutils.validator import validateMove from .lutils.lmove import FCORD, TCORD from .lutils import l...
gpl-3.0
ecoal95/servo
tests/wpt/web-platform-tests/tools/third_party/h2/test/test_interacting_stacks.py
37
4228
# -*- coding: utf-8 -*- """ test_interacting_stacks ~~~~~~~~~~~~~~~~~~~~~~~ These tests run two entities, a client and a server, in parallel threads. These two entities talk to each other, running what amounts to a number of carefully controlled simulations of real flows. This is to ensure that the stack as a whole b...
mpl-2.0
dieface/erpnext
erpnext/accounts/page/accounts_browser/accounts_browser.py
31
1661
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe import frappe.defaults from frappe.utils import flt from erpnext.accounts.utils import get_balance_on from erpnext.accounts.report.financi...
agpl-3.0
SimonBiggs/electronfactor-server
main.py
1
11548
# Copyright (C) 2016 Simon Biggs # 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 License, or (at your option) any later version. # This program is distributed in...
agpl-3.0
kmacinnis/sympy
sympy/integrals/tests/test_rde.py
5
8020
"""Most of these tests come from the examples in Bronstein's book.""" from sympy import Poly, S, symbols, oo, I from sympy.integrals.risch import (DifferentialExtension, NonElementaryIntegralException) from sympy.integrals.rde import (order_at, order_at_oo, weak_normalizer, normal_denom, special_denom, bound_de...
bsd-3-clause
MIPS/external-chromium_org
third_party/PRESUBMIT.py
47
3817
# Copyright (c) 2011 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. def _CheckThirdPartyReadmesUpdated(input_api, output_api): """ Checks to make sure that README.chromium files are properly updated when dependancie...
bsd-3-clause
chaffra/sympy
sympy/physics/quantum/tests/test_hilbert.py
125
2513
from sympy.physics.quantum.hilbert import ( HilbertSpace, ComplexSpace, L2, FockSpace, TensorProductHilbertSpace, DirectSumHilbertSpace, TensorPowerHilbertSpace ) from sympy import Interval, oo, Symbol, sstr, srepr def test_hilbert_space(): hs = HilbertSpace() assert isinstance(hs, HilbertSpace) ...
bsd-3-clause
tlhallock/line-search-dfo
python/utilities/boxable_query_set.py
1
3275
from numpy.linalg import norm import itertools from numpy import inf as infinity # Could be so much faster!!!!!!!!!!!! # Also should replace this with a standard library implementation # or make it a splay tree class Node: def __init__(self, key, val): self.key = key self.val = val self.left = None self.ri...
gpl-3.0