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
baffolobill/django-lfs
lfs/portlet/models/recent_products.py
4
1913
# django imports from django import forms from django.conf import settings from django.contrib.contenttypes.models import ContentType from django.template import RequestContext from django.template.loader import render_to_string # portlets imports from portlets.models import Portlet # lfs imports from lfs.catalog.mod...
bsd-3-clause
seem-sky/kbengine
kbe/src/lib/python/Tools/pybench/Numbers.py
92
16198
from pybench import Test class CompareIntegers(Test): version = 2.0 operations = 30 * 5 rounds = 120000 def test(self): for i in range(self.rounds): 2 < 3 2 > 3 2 == 3 2 > 3 2 < 3 2 < 3 2 > 3 2 ...
lgpl-3.0
oliverlee/sympy
sympy/core/tests/test_assumptions.py
7
30051
from sympy import I, sqrt, log, exp, sin, asin, factorial, Mod, pi from sympy.core import Symbol, S, Rational, Integer, Dummy, Wild, Pow from sympy.core.facts import InconsistentAssumptions from sympy import simplify from sympy.core.compatibility import range from sympy.utilities.pytest import raises, XFAIL def test...
bsd-3-clause
2014c2g12/c2g12
c2wp/exts/exts/sphinxcontrib/bibtex/directives.py
40
7003
""" New Doctree Directives ~~~~~~~~~~~~~~~~~~~~~~ .. autoclass:: BibliographyDirective .. automethod:: run .. automethod:: process_bibfile .. automethod:: update_bibfile_cache .. automethod:: parse_bibfile """ import os.path # getmtime() import copy # deepcopy import docu...
gpl-2.0
Develonaut/Develonaut
node_modules/nodemon/travis_after_all.py
76
4308
import os import sys import json import time import logging try: import urllib.request as urllib2 except ImportError: import urllib2 log = logging.getLogger("travis.leader") log.addHandler(logging.StreamHandler()) log.setLevel(logging.INFO) TRAVIS_JOB_NUMBER = 'TRAVIS_JOB_NUMBER' TRAVIS_BUILD_ID = 'TRAVIS_BU...
mit
antoine-de/navitia
source/tyr/tests/integration/users_test.py
1
23669
from tests.check_utils import api_get, api_post, api_delete, api_put, _dt import json import pytest import mock from navitiacommon import models from tyr.rabbit_mq_handler import RabbitMqHandler from tyr import app import urllib @pytest.fixture def geojson_polygon(): return { "type": "Feature", "g...
agpl-3.0
ptitjano/bokeh
bokeh/server/protocol/messages/tests/test_push_doc.py
14
1038
from __future__ import absolute_import, print_function import unittest import bokeh.document as document from bokeh.model import Model from bokeh.core.properties import Int, Instance from bokeh.server.protocol import Protocol class AnotherModelInTestPushDoc(Model): bar = Int(1) class SomeModelInTestPushDoc(Mode...
bsd-3-clause
CCI-MOC/nova
nova/tests/unit/virt/vmwareapi/test_ds_util_datastore_selection.py
42
7367
# # 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
AndyLavr/Aspire-SW5-012_Kernel_4.8
scripts/gdb/linux/utils.py
509
4833
# # gdb helper commands and functions for Linux kernel debugging # # common utilities # # Copyright (c) Siemens AG, 2011-2013 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb class CachedType: def __init__(self, name): s...
gpl-2.0
eeshangarg/oh-mainline
vendor/packages/scrapy/scrapy/tests/test_contrib_exporter.py
16
7618
import unittest, cPickle as pickle from cStringIO import StringIO from scrapy.item import Item, Field from scrapy.utils.python import str_to_unicode from scrapy.utils.py26 import json from scrapy.contrib.exporter import BaseItemExporter, PprintItemExporter, \ PickleItemExporter, CsvItemExporter, XmlItemExporter, J...
agpl-3.0
popazerty/dvbapp2-gui
lib/python/Tools/CopyFiles.py
2
2065
from Components.Task import PythonTask, Task, Job, job_manager as JobManager from Tools.Directories import fileExists from enigma import eTimer from os import path from shutil import rmtree class DeleteFolderTask(PythonTask): def openFiles(self, fileList): self.fileList = fileList def work(self): print "[Delete...
gpl-2.0
pyfisch/servo
tests/wpt/web-platform-tests/tools/third_party/pytest/testing/test_pluginmanager.py
30
13081
# encoding: UTF-8 from __future__ import absolute_import, division, print_function import pytest import os import re import sys import types from _pytest.config import get_config, PytestPluginManager from _pytest.main import EXIT_NOTESTSCOLLECTED, Session @pytest.fixture def pytestpm(): return PytestPluginManage...
mpl-2.0
open-craft/opencraft
instance/management/commands/recreate_db.py
1
4389
# -*- coding: utf-8 -*- # # OpenCraft -- tools to aid developing and hosting free software projects # Copyright (C) 2015-2019 OpenCraft <contact@opencraft.com> # # 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 Fre...
agpl-3.0
timokoola/timoechobot
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...
apache-2.0
alivecor/tensorflow
tensorflow/python/debug/lib/debug_gradients_test.py
39
15165
# 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
n0m4dz/odoo
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
1490
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...
agpl-3.0
mattsmart/uwaterloo-igem-2015
models/tridimensional/incomplete_scripts/cas9-AA-subst.py
9
2283
#///////////////////////**READ ME FIRST**////////////////////////////////// # Point of this script is to substitute amino acids into a given pose # protein structure in pyrosetta. # Please change dropbox folder location accordingly + make sure that the # script's current location is the root of PyRosetta (need to i...
mit
bregman-arie/ansible
test/units/modules/network/ironware/test_ironware_command.py
57
4066
# (c) 2016 Red Hat 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. # # Ansible is dis...
gpl-3.0
scenarios/tensorflow
tensorflow/compiler/tests/function_test.py
27
4129
# 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
imankulov/sentry
tests/sentry/utils/models/tests.py
29
1711
from __future__ import absolute_import from django.db import models from sentry.db.models import ( Model, BoundedIntegerField, BoundedBigIntegerField, BoundedPositiveIntegerField) from sentry.testutils import TestCase # There's a good chance this model wont get created in the db, so avoid # assuming it exist...
bsd-3-clause
StefanRijnhart/odoomrp-wip
mrp_subcontracting/models/procurement_order.py
3
1868
# -*- encoding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
intity/gtk-win32
gvsbuild/utils/simple_ui.py
1
2270
# Copyright (C) 2016 - Yevgen Muntyan # Copyright (C) 2016 - Ignacio Casal Quinteiro # Copyright (C) 2016 - Arnavion # # 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 ...
gpl-2.0
mesheven/pyOCD
pyocd/board/board.py
1
2633
""" mbed CMSIS-DAP debugger Copyright (c) 2006-2013,2018 ARM Limited 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 applic...
apache-2.0
zihua/scikit-learn
sklearn/linear_model/tests/test_perceptron.py
378
1815
import numpy as np import scipy.sparse as sp from sklearn.utils.testing import assert_array_almost_equal from sklearn.utils.testing import assert_true from sklearn.utils.testing import assert_raises from sklearn.utils import check_random_state from sklearn.datasets import load_iris from sklearn.linear_model import Pe...
bsd-3-clause
muntasirsyed/intellij-community
plugins/hg4idea/testData/bin/mercurial/fancyopts.py
92
3562
# fancyopts.py - better command line parsing # # Copyright 2005-2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import getopt, util from i18n import _ def gnugetopt(args, options, l...
apache-2.0
jjmleiro/hue
desktop/core/ext-py/py4j-0.9/src/py4j/tests/java_dir_test.py
15
5123
from __future__ import unicode_literals, absolute_import from py4j.java_gateway import JavaGateway, GatewayParameters, java_import,\ UserHelpAutoCompletion from py4j.protocol import Py4JError from py4j.tests.java_gateway_test import ( start_example_app_process, sleep) from contextlib import contextmanager Ex...
apache-2.0
juliogonzalez/ebs-tools
lib/exceptions.py
1
9304
# ebs-tools, a set of tools to manage EBS volumes and snapshots # # Copyright (C) 2014 Julio Gonzalez Gil <julio@juliogonzalez.es> # # This file is part of ebs-tools (http://github.com/juliogonzalez/ebs-tools) # # ebs-tools is free software: you can redistribute it and/or modify # it under the terms of the GNU General ...
gpl-3.0
sameerparekh/pants
tests/python/pants_test/backend/python/tasks/checkstyle/test_print_statements.py
6
1158
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) from pants.backend.p...
apache-2.0
Vhati/TweetSubs
lib/common.py
1
1579
import htmlentitydefs import logging import os import re import sys def html_unescape(text): """Removes HTML or XML character references and entities from a text string. http://effbot.org/zone/re-sub.htm#unescape-html :param text: The HTML (or XML) source text. :returns: The plain text, as a U...
gpl-2.0
turbokongen/home-assistant
homeassistant/components/bmw_connected_drive/device_tracker.py
3
2559
"""Device tracker for BMW Connected Drive vehicles.""" import logging from homeassistant.components.device_tracker import SOURCE_TYPE_GPS from homeassistant.components.device_tracker.config_entry import TrackerEntity from . import DOMAIN as BMW_DOMAIN, BMWConnectedDriveBaseEntity from .const import CONF_ACCOUNT, DATA...
apache-2.0
bolkedebruin/snakebite
doc/source/conf.py
3
8266
# -*- coding: utf-8 -*- # # snakebite documentation build configuration file, created by # sphinx-quickstart on Tue Apr 30 11:39:44 2013. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
apache-2.0
JingJunYin/tensorflow
tensorflow/python/eager/graph_only_ops.py
69
2363
# 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
cilcoberlin/panoptes
panoptes/analysis/panels/events/rrule.py
2
5544
from django.template.defaultfilters import striptags from django.utils.translation import ugettext as _ from icalendar.prop import vDatetime, vRecur import pytz import re class RepeatRule(object): """A representation of an iCalendar repeat rule.""" # A regex to find the timezone information in a recurrence rule...
bsd-3-clause
ltilve/ChromiumGStreamerBackend
tools/telemetry/third_party/gsutilz/third_party/oauth2client/tests/test_keyring.py
17
3339
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
bsd-3-clause
PatrickChrist/scikit-learn
sklearn/datasets/tests/test_rcv1.py
322
2414
"""Test the rcv1 loader. Skipped if rcv1 is not already downloaded to data_home. """ import errno import scipy.sparse as sp import numpy as np from sklearn.datasets import fetch_rcv1 from sklearn.utils.testing import assert_almost_equal from sklearn.utils.testing import assert_array_equal from sklearn.utils.testing i...
bsd-3-clause
renzifeng/renzifeng
node_modules/node-gyp/gyp/pylib/gyp/xcodeproj_file.py
1366
120842
# 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. """Xcode project file generator. This module is both an Xcode project file generator and a documentation of the Xcode project file format. Knowledge of the proje...
apache-2.0
KevinOConnor/klipper
klippy/util.py
1
4791
# Low level unix utility functions # # Copyright (C) 2016-2020 Kevin O'Connor <kevin@koconnor.net> # # This file may be distributed under the terms of the GNU GPLv3 license. import sys, os, pty, fcntl, termios, signal, logging, json, time import subprocess, traceback, shlex ##########################################...
gpl-3.0
CongSmile/tp-qemu
qemu/tests/timedrift_with_stop.py
9
5827
import logging import time import os import signal from autotest.client.shared import error from virttest import utils_test def run(test, params, env): """ Time drift test with stop/continue the guest: 1) Log into a guest. 2) Take a time reading from the guest and host. 3) Stop the running of t...
gpl-2.0
trabacus-softapps/openerp-8.0-cc
openerp/addons/process/__init__.py
65
1071
# -*- 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...
agpl-3.0
zrhans/pythonanywhere
.virtualenvs/django19/lib/python3.4/site-packages/pandas/stats/math.py
25
3253
# pylint: disable-msg=E1103 # pylint: disable-msg=W0212 from __future__ import division from pandas.compat import range import numpy as np import numpy.linalg as linalg def rank(X, cond=1.0e-12): """ Return the rank of a matrix X based on its generalized inverse, not the SVD. """ X = np.asarray(...
apache-2.0
ualikhansars/Gwent
lib/python2.7/site-packages/django/db/backends/sqlite3/introspection.py
219
11307
import re from collections import namedtuple from django.db.backends.base.introspection import ( BaseDatabaseIntrospection, FieldInfo, TableInfo, ) field_size_re = re.compile(r'^\s*(?:var)?char\s*\(\s*(\d+)\s*\)\s*$') FieldInfo = namedtuple('FieldInfo', FieldInfo._fields + ('default',)) def get_field_size(name)...
mit
simongoffin/my_odoo_tutorial
addons/account_anglo_saxon/invoice.py
61
13374
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) # 2004-2010 Tiny SPRL (<http://tiny.be>). # 2009-2010 Veritos (http://veritos.nl). # All Rights Reserved # # This program is free software: you can redistri...
agpl-3.0
metamx/spark
examples/src/main/python/ml/vector_assembler_example.py
123
1649
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
Juniper/ceilometer
ceilometer/storage/models.py
13
6509
# # Copyright 2013 New Dream Network, LLC (DreamHost) # # 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...
apache-2.0
ElementalAlchemist/txircd
txircd/config.py
1
2906
import yaml class Config(object): def __init__(self, ircd, configFileName): self.ircd = ircd self.fileName = configFileName def reload(self): newConfig = self._readConfig(self.fileName) self.ircd.verifyConfig(newConfig) self._configData = newConfig def _readConfig(self, fileName): configData = {} ...
bsd-3-clause
jiajiechen/mxnet
tools/launch.py
3
5466
#!/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 # "L...
apache-2.0
rwl/PyCIM
CIM15/IEC61970/Informative/InfOperations/ErpPersonScheduleStepRole.py
1
2895
# Copyright (C) 2010-2011 Richard Lincoln # # 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 without limitation the # rights to use, copy, modify, merge, publish...
mit
datawire/qpid-proton
examples/python/helloworld_direct_tornado.py
4
1576
#!/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 # "...
apache-2.0
fidomason/kbengine
kbe/res/scripts/common/Lib/test/test_pydoc.py
68
37053
import os import sys import builtins import contextlib import difflib import inspect import pydoc import keyword import _pickle import pkgutil import re import string import test.support import time import types import unittest import urllib.parse import xml.etree import textwrap from io import StringIO from collection...
lgpl-3.0
zenfone-legacy/android_kernel_asus_T00F
tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
2058
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
tareqalayan/ansible
lib/ansible/modules/cloud/vmware/vmware_portgroup_facts.py
10
4939
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.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
awslabs/sockeye
sockeye/arguments.py
1
78075
# Copyright 2017--2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"). You may not # use this file except in compliance with the License. A copy of the License # is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" fi...
apache-2.0
Dandandan/wikiprogramming
jsrepl/build/extern/python/reloop-closured/lib/python2.7/plistlib.py
141
15176
r"""plistlib.py -- a tool to generate and parse MacOSX .plist files. The PropertyList (.plist) file format is a simple XML pickle supporting basic object types, like dictionaries, lists, numbers and strings. Usually the top level object is a dictionary. To write out a plist file, use the writePlist(rootObject, pathOr...
mit
bliti/django-nonrel-1.5
django/contrib/gis/gdal/tests/test_geom.py
104
20864
import json from binascii import b2a_hex try: from django.utils.six.moves import cPickle as pickle except ImportError: import pickle from django.contrib.gis.gdal import (OGRGeometry, OGRGeomType, OGRException, OGRIndexError, SpatialReference, CoordTransform, GDAL_VERSION) from django.contrib.gis.geometry.t...
bsd-3-clause
sarthakmeh03/django
django/template/base.py
1
40259
""" This is the Django template system. How it works: The Lexer.tokenize() function converts a template string (i.e., a string containing markup with custom template tags) to tokens, which can be either plain text (TOKEN_TEXT), variables (TOKEN_VAR) or block statements (TOKEN_BLOCK). The Parser() class takes a list ...
bsd-3-clause
eriol/pywt
setup.py
1
9482
#!/usr/bin/env python #-*- coding: utf-8 -*- import os import sys import subprocess from functools import partial from distutils.sysconfig import get_python_inc import setuptools from setuptools import setup, Extension from numpy import get_include as get_numpy_include try: from Cython.Build import cythonize ...
mit
numenta-ci/nupic
examples/opf/experiments/anomaly/temporal/simple/description.py
3
14147
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
ddelemeny/calligra
3rdparty/google-breakpad/src/tools/gyp/pylib/gyp/common_test.py
21
1086
#!/usr/bin/env python # 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. """Unit tests for the common.py file.""" import gyp.common import unittest class TestTopologicallySorted(unittest.TestCase): def test_V...
gpl-2.0
pilou-/ansible
test/units/modules/network/edgeswitch/test_edgeswitch_vlan.py
29
5640
# (c) 2018 Red Hat 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. # # Ansible is dis...
gpl-3.0
maellak/invenio
modules/bibfield/lib/bibfield_regression_tests.py
14
15803
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2013 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 ...
gpl-2.0
MiyamotoAkira/kivy
kivy/core/spelling/spelling_enchant.py
70
1329
''' Enchant Spelling: Implements spelling backend based on enchant. ''' import enchant from kivy.core.spelling import SpellingBase, NoSuchLangError from kivy.compat import PY2 class SpellingEnchant(SpellingBase): ''' Spelling backend based on the enchant library. ''' def __init__(self, language=No...
mit
ModdedPA/android_external_chromium_org
build/android/pylib/utils/reraiser_thread.py
36
3871
# Copyright 2013 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. """Thread and ThreadGroup that reraise exceptions on the main thread.""" import logging import sys import threading import time import traceback import wat...
bsd-3-clause
ivh/VAMDC-VALD
other/legacy/valdxsams.py
4
3501
from vamdc.xmltools import * import vamdc.db as db t=db.tools subel=e.SubElement NS='http://www.w3.org/2001/XMLSchema-instance' SCHEMA='http://www-amdis.iaea.org/xsams/schema/xsams-0.1.xsd' header="""<?xml version="1.0" encoding="UTF-8"?> <XSAMSData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNames...
gpl-3.0
frodejohansen/codebrag
scripts/dist/lib/s3cmd-1.5.0-alpha1/S3/CloudFront.py
4
32530
## Amazon CloudFront support ## Author: Michal Ludvig <michal@logix.cz> ## http://www.logix.cz/michal ## License: GPL Version 2 import sys import time import httplib import random from datetime import datetime from logging import debug, info, warning, error try: import xml.etree.ElementTree as ET except I...
agpl-3.0
jpshort/odoo
marcos_addons/marcos_ncf/models.py
3
1293
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2013-2015 Marcos Organizador de Negocios SRL http://marcos.do # Write by Eneldo Serrata (eneldo@marcos.do) # # This program is free software: you can redistribute it and/or modify # it un...
agpl-3.0
bjowi/newsdiffs
website/settings_dev.py
3
2657
# Django settings for newsdiffer project. import os.path DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( ('Eric Price', 'ecprice@mit.edu'), ('Jennifer 8. Lee', 'jenny8lee@gmail.com'), ('Gregory Price', 'price@mit.edu'), ) MANAGERS = ADMINS WEBAPP_ROOT = os.path.dirname(os.path.abspath(__file__)) DAT...
mit
makermade/arm_android-19_arm-linux-androideabi-4.8
lib/python2.7/sunau.py
156
16537
"""Stuff to parse Sun and NeXT audio files. An audio file consists of a header followed by the data. The structure of the header is as follows. +---------------+ | magic word | +---------------+ | header size | +---------------+ | data size | +--------...
gpl-2.0
doismellburning/edx-platform
common/lib/capa/capa/tests/test_correctmap.py
107
7116
""" Tests to verify that CorrectMap behaves correctly """ import unittest from capa.correctmap import CorrectMap import datetime class CorrectMapTest(unittest.TestCase): """ Tests to verify that CorrectMap behaves correctly """ def setUp(self): super(CorrectMapTest, self).setUp() sel...
agpl-3.0
apache/beam
sdks/python/apache_beam/runners/pipeline_context_test.py
5
3727
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
chirayudesai/linux-msm-fusion3
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
iconmix/skins-addons
script.iconmixtools/resources/lib/unidecode/x27.py
87
3785
data = ( '[?]', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 ...
gpl-3.0
kennethgillen/ansible
lib/ansible/modules/cloud/cloudstack/cs_cluster.py
39
13114
#!/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
qedsoftware/commcare-hq
custom/ilsgateway/tanzania/warehouse/updater.py
1
27752
from datetime import datetime, timedelta import logging import itertools from celery.canvas import chain from celery.task import task from django.db import transaction, connection from django.db.models import Q from django.db.models.aggregates import Avg, Sum from corehq.apps.locations.dbaccessors import get_users_by_...
bsd-3-clause
pearfalse/disasterclass
src/data/data_processor.py
1
5844
#!/usr/bin/python from __future__ import print_function import os, sys, json from math import log from datetime import datetime import re def quoteAndEscape(s): r"""Enquote s, escaping quote marks and backslashes. As a convenience, \n and \r are also stripped.""" return "\"%s\"" % s.replace("\n",'').replace("\r",'')...
mpl-2.0
pombredanne/blivet-1
blivet/deviceaction.py
1
21894
# deviceaction.py # Device modification action classes for anaconda's storage configuration # module. # # Copyright (C) 2009 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License...
gpl-2.0
julianwang/cinder
cinder/tests/unit/api/contrib/test_volume_manage.py
4
8420
# Copyright 2014 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in...
apache-2.0
kkuunnddaannkk/vispy
vispy/gloo/buffer.py
21
16293
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright (c) 2015, Vispy Development Team. All Rights Reserved. # Distributed under the (new) BSD License. See LICENSE.txt for more info. # -------------------------------------------------------------------------...
bsd-3-clause
ahewer/ematoblender
ematoblender/scripts/ema_blender/ema_bpy/bpy_static_video.py
3
3208
__author__ = 'Kristy' '''Create the context (UV texture of an arbitrary image on a plane) so that a video texture can be displayed in BGE. This texture uses Alpha Add, so that the black of the ultrasound is not shown. Inspired by: http://www.tutorialsforblender3d.com/Blender_GameEngine/Alpha/Alpha_GLSL_3.html http:/...
gpl-3.0
saurabh6790/pow-lib
wnf.py
22
25832
#!/usr/bin/env python2.7 # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import sys if __name__=="__main__": sys.path = [".", "lib", "app"] + sys.path import webnotes def main(): parsed_args = webnotes._dict(vars(setup...
mit
Mazecreator/tensorflow
tensorflow/python/kernel_tests/reduce_join_op_test.py
116
14445
# 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
rajsadho/django
django/conf/locale/en_AU/formats.py
504
2117
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j M Y' # '25 Oc...
bsd-3-clause
mKeRix/home-assistant
tests/components/fan/test_device_action.py
15
3216
"""The tests for Fan device actions.""" import pytest import homeassistant.components.automation as automation from homeassistant.components.fan import DOMAIN from homeassistant.helpers import device_registry from homeassistant.setup import async_setup_component from tests.common import ( MockConfigEntry, ass...
mit
dileep-p/ansible-modules-core
database/postgresql/postgresql_user.py
89
25160
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. #...
gpl-3.0
facebookexperimental/eden
eden/hg-server/tests/test-revert-t.py
2
50393
# coding=utf-8 # Copyright (c) Facebook, Inc. and its affiliates. # Copyright (c) Mercurial Contributors. # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from __future__ import absolute_import import os import generateworkingco...
gpl-2.0
freedomDR/shiny-robot
src/GrayScaleTransformation/GrayLevelStratification.py
1
1106
import numpy as np import matplotlib.pyplot as plt import cv2 plt.figure(1) plt.subplot(1,2,1) x = [0,2,2,3.5,3.5,5] y = [0.5,0.5,3,3,0.5,0.5] plt.plot(x,y,'-') plt.axis([0,5,0,5]) plt.gca().set_aspect(1) plt.subplot(1,2,2) x = [0,1.5,1.5,2.5,2.5,5] y = [0,1.5,4,4,2.5,5] plt.plot(x,y,'-') plt.axis([0,5,0,5]) plt.gca...
gpl-3.0
tcpcloud/openvstorage
ovs/dal/lists/brandinglist.py
1
1275
# Copyright 2014 Open vStorage NV # # 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...
apache-2.0
zmeeey5/test_proj
node_modules/node-gyp/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
3426
# 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 collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
gpl-2.0
Allow2CEO/browser-ios
brave/node_modules/hashset-cpp/vendor/depot_tools/third_party/gsutil/gslib/addlhelp/prod.py
51
8580
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
mpl-2.0
xcat2/confluent
confluent_server/confluent/netutil.py
2
12433
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2017 Lenovo # # 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
thnkloud9/Tandem
server/scheduler/dialer.py
1
1504
import logging from bson.objectid import ObjectId from twilio.rest import TwilioRestClient from pymongo import MongoClient ACCOUNT_SID = "ACd2d64bee9b5d72522c0fa5e33c7aa2fc" AUTH_TOKEN = "8f54d45265a4fe99157003841e499388" client = MongoClient('localhost', 27017) db = client['tandem'] client = TwilioRestClient(A...
gpl-2.0
40223139/203739test
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/base.py
603
4652
#!/usr/bin/env python ## https://bitbucket.org/pygame/pygame/raw/2383b8ab0e2273bc83c545ab9c18fee1f3459c64/pygame/base.py '''Pygame core routines Contains the core routines that are used by the rest of the pygame modules. Its routines are merged directly into the pygame namespace. This mainly includes the auto-initia...
gpl-3.0
BernhardPosselt/fish
listentothefish/listentothefish/homepage/models.py
2
1084
from django.db import models from django.utils.translation import ugettext as _ from django.template.defaultfilters import date as _date class Event(models.Model): date = models.DateTimeField(_('Datum')) title = models.CharField(_('Titel'), max_length=250) place = models.CharField(_('Ort'), max_length=250)...
gpl-3.0
tommilligan/pyqubes
setup.py
1
1849
#!/usr/bin/env python from setuptools import setup, find_packages setup( name='pyqubes', version='0.0.3', license='Apache License 2.0', url='https://github.com/tommilligan/pyqubes/', author='Tom Milligan', author_email='code@tommilligan.net', description="QubesOS dom0 automation in Python"...
apache-2.0
hpsilva/profitpy
profit/lib/widgets/plot.py
18
41789
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2007 Troy Melhase <troy@gci.net> # Distributed under the terms of the GNU General Public License v2 ## # # This module defines the Plot class for display of plots and # associated controls. # ## from PyQt4.QtCore import QRectF, QString, QTimer, QVariant from ...
gpl-2.0
waseem18/oh-mainline
vendor/packages/Django/tests/regressiontests/utils/timezone.py
52
2381
import copy import datetime import pickle from django.test.utils import override_settings from django.utils import timezone from django.utils.tzinfo import FixedOffset from django.utils import unittest EAT = FixedOffset(180) # Africa/Nairobi ICT = FixedOffset(420) # Asia/Bangkok class TimezoneTests(unitte...
agpl-3.0
santiycr/selenium-firefox-support-matrix
test_the_firefoxen.py
1
5063
#!/usr/bin/env python # encoding: utf-8 import os import sys import new import json import unittest from time import sleep import argparse import random from selenium import webdriver import nose from nose.plugins.multiprocess import MultiProcess from lib.parse_version import parse_version USER = os.environ['SAUCE_...
gpl-2.0
yspanchal/docli
docli/main.py
1
3046
# -*- coding: utf-8 -*- import click from commands.account import account_group from commands.actions import actions_group from commands.domain import domain_group from commands.records import record_group from commands.droplet import droplet_group from commands.droplet_actions import droplet_actions_group from comman...
apache-2.0
informaticameg/Posta
storm/references.py
3
37211
# # Copyright (c) 2006, 2007 Canonical # # Written by Gustavo Niemeyer <gustavo@niemeyer.net> # # This file is part of Storm Object Relational Mapper. # # Storm is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as # published by the Free Software Found...
gpl-3.0
pombreda/git-git.code.sf.net-p-rpmlint-code
LSBCheck.py
3
1846
# -*- coding: utf-8 -*- ############################################################################# # Project : Mandriva Linux # Module : rpmlint # File : LSBCheck.py # Author : Frederic Lepied # Created On : Tue Jan 30 14:44:37 2001 # Purpose : LSB non compliance che...
gpl-2.0
matvey00z/histfetch
config.py
1
2851
import sys import os import re import json import shutil import errno config_directory_path = os.path.expanduser("~/.config/histfetch") config_path = "/".join([config_directory_path, "config.json"]) default_config_path = "default_config.json" last_config_path = "/".join([config_directory_path, "last_used_config.json"]...
unlicense