repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
chen0510566/MissionPlanner
Lib/distutils/ccompiler.py
50
49641
"""distutils.ccompiler Contains CCompiler, an abstract base class that defines the interface for the Distutils compiler abstraction model.""" __revision__ = "$Id$" import sys import os import re from distutils.errors import (CompileError, LinkError, UnknownFileError, Distut...
gpl-3.0
michaelkuty/django-oscar
tests/integration/basket/form_tests.py
45
3927
from django.test import TestCase from django.conf import settings import mock from oscar.apps.basket import forms from oscar.test import factories class TestBasketLineForm(TestCase): def setUp(self): self.basket = factories.create_basket() self.line = self.basket.all_lines()[0] def mock_ava...
bsd-3-clause
sofianehaddad/ot-svn
python/test/t_FORM_sensitivity.py
2
3930
#! /usr/bin/env python from openturns import * from math import * from math import * def printNumericalPoint(point, digits): oss = "[" eps = pow(0.1, digits) for i in range(point.getDimension()): if i == 0: sep = "" else: sep = "," if fabs(point[i]) < eps:...
mit
cmshobe/landlab
landlab/io/esri_ascii.py
3
17226
#! /usr/bin/env python """Read/write data from an ESRI ASCII file into a RasterModelGrid. ESRI ASCII functions ++++++++++++++++++++ .. autosummary:: ~landlab.io.esri_ascii.read_asc_header ~landlab.io.esri_ascii.read_esri_ascii ~landlab.io.esri_ascii.write_esri_ascii """ import os import pathlib import r...
mit
swiftstack/swift
swift/obj/server.py
1
67311
# Copyright (c) 2010-2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
apache-2.0
Zarokka/exaile
plugins/lastfmlove/__init__.py
4
10746
# Copyright (C) 2011 Mathias Brodala <info@noctus.net> # # 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 progr...
gpl-2.0
40223149/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/zipfile.py
620
66368
""" Read and write ZIP files. XXX references to utf-8 need further investigation. """ import io import os import re import imp import sys import time import stat import shutil import struct import binascii try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib =...
gpl-3.0
double12gzh/nova
nova/api/openstack/compute/contrib/os_tenant_networks.py
8
8472
# Copyright 2013 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 requ...
apache-2.0
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.2/Lib/importlib/test/source/test_abc_loader.py
51
31363
import importlib from importlib import abc from .. import abc as testing_abc from .. import util from . import util as source_util import imp import inspect import io import marshal import os import sys import types import unittest import warnings class SourceOnlyLoaderMock(abc.SourceLoader): # Globals that sh...
mit
cccfran/sympy
sympy/polys/tests/test_modulargcd.py
125
9007
from sympy.polys.rings import ring from sympy.polys.domains import ZZ, QQ, AlgebraicField from sympy.polys.modulargcd import ( modgcd_univariate, modgcd_bivariate, _chinese_remainder_reconstruction_multivariate, modgcd_multivariate, _to_ZZ_poly, _to_ANP_poly, func_field_modgcd, _func_fie...
bsd-3-clause
e-q/scipy
scipy/sparse/linalg/tests/test_pydata_sparse.py
19
5954
import pytest import numpy as np import scipy.sparse as sp import scipy.sparse.linalg as splin from numpy.testing import assert_allclose try: import sparse except Exception: sparse = None pytestmark = pytest.mark.skipif(sparse is None, reason="pydata/sparse not installed") ...
bsd-3-clause
bright-sparks/chromium-spacewalk
chrome/browser/metrics/variations/generate_resources_map_unittest.py
16
3094
#!/usr/bin/python # 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. """Unittests for generate_resources_map.py""" import unittest import generate_resources_map class GenerateResourcesMapUnittest(unittest...
bsd-3-clause
deshipu/micropython
tests/basics/int1.py
46
1581
print(int(False)) print(int(True)) print(int(0)) print(int(1)) print(int(+1)) print(int(-1)) print(int('0')) print(int('+0')) print(int('-0')) print(int('1')) print(int('+1')) print(int('-1')) print(int('01')) print(int('9')) print(int('10')) print(int('+10')) print(int('-10')) print(int('12')) print(int('-12')) prin...
mit
jayme-github/CouchPotatoServer
libs/enzyme/real.py
180
4547
# -*- coding: utf-8 -*- # enzyme - Video metadata parser # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # Copyright 2003-2006 Thomas Schueppel <stain@acm.org> # Copyright 2003-2006 Dirk Meyer <dischi@freevo.org> # # This file is part of enzyme. # # enzyme is free software; you can redistribute it and/or mod...
gpl-3.0
pwoodworth/intellij-community
python/helpers/docutils/parsers/rst/directives/html.py
61
3223
# $Id: html.py 4667 2006-07-12 21:40:56Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Directives for typically HTML-specific constructs. """ __docformat__ = 'reStructuredText' import sys from docutils import nodes, utils from docutils.parse...
apache-2.0
cbertinato/pandas
pandas/tests/frame/test_axis_select_reindex.py
1
44030
from datetime import datetime import numpy as np import pytest from pandas.errors import PerformanceWarning import pandas as pd from pandas import ( Categorical, DataFrame, Index, MultiIndex, Series, date_range, isna) from pandas.tests.frame.common import TestData import pandas.util.testing as tm from pandas.uti...
bsd-3-clause
lfz/Guided-Denoise
Attackset/Iter4_ensv3_resv2_inresv2_random/nets/inception_v4.py
45
15643
# 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 applicable ...
apache-2.0
mupif/mupif
mupif/EnsightReader2.py
1
13109
# # MuPIF: Multi-Physics Integration Framework # Copyright (C) 2010-2015 Borek Patzak # # Czech Technical University, Faculty of Civil Engineering, # Department of Structural Mechanics, 166 29 Prague, Czech Republic # # This library is free software; you can redistribute it and/or # modi...
lgpl-3.0
ClearCorp-dev/odoo
addons/account/report/account_invoice_report.py
60
12934
# -*- 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
stadelmanma/OpenPNM
test/unit/Network/GenericNetworkTest.py
1
14373
import OpenPNM import scipy as sp class GenericNetworkTest: def setup_class(self): self.net = OpenPNM.Network.Cubic(shape=[10, 10, 10]) def teardown_class(self): mgr = OpenPNM.Base.Workspace() mgr.clear() def test_find_connected_pores_numeric_not_flattend(self): a = self....
mit
alkalait/Probabilistic-Programming-and-Bayesian-Methods-for-Hackers
Chapter3_MCMC/github_pull.py
95
2327
#github data scrapper """ variables of interest: indp. variables - language, given as a binary variable. Need 4 positions for 5 langagues - #number of days created ago, 1 position - has wiki? Boolean, 1 position - followers, 1 position - following, 1 position - constant dep. variab...
mit
godfather1103/WeiboRobot
python27/1.0/lib/ctypes/test/test_unicode.py
35
5126
# coding: latin-1 import unittest import ctypes from ctypes.test import need_symbol import _ctypes_test @need_symbol('c_wchar') class UnicodeTestCase(unittest.TestCase): @classmethod def setUpClass(cls): dll = ctypes.CDLL(_ctypes_test.__file__) cls.wcslen = dll.my_wcslen cls.wcslen.argt...
gpl-3.0
chaosim/dao
samples/hello.py
1
1301
from dao import word from samplevars import x def parse(grammar_element, text): x = Var() code = grammar_element(x)+x return eval([code, text]) def match(grammar_element, text): x = Var() code = grammar_element(x) return eval([code, text]) print parse(word, 'hello') print match(word, 'h...
gpl-3.0
nbp/git-repo
editor.py
85
2660
# # Copyright (C) 2008 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
apache-2.0
jsheperd/rotate_backup
rotate_backup.py
1
2651
#!/usr/bin/env python import sys import os import glob import time class archive: # The archive class represent an archive media with its age related parameters def __init__(self, path): self.path = path self.time = time.gmtime(os.path.getmtime(path)) self.year = time.strftime("%Y", sel...
unlicense
ehirt/odoo
addons/board/__init__.py
439
1144
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2012 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
rghe/ansible
test/units/modules/network/netscaler/test_netscaler_cs_policy.py
18
12568
# Copyright (c) 2017 Citrix Systems # # 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
cloudera/ibis
ibis/tests/expr/test_pipe.py
3
1763
# Copyright 2014 Cloudera 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
r2t2sdr/r2t2
u-boot/tools/buildman/toolchain.py
5
8510
# Copyright (c) 2012 The Chromium OS Authors. # # SPDX-License-Identifier: GPL-2.0+ # import re import glob import os import bsettings import command class Toolchain: """A single toolchain Public members: gcc: Full path to C compiler path: Directory path containing C compiler cross: ...
gpl-3.0
borjam/exabgp
src/exabgp/bgp/message/update/nlri/vpls.py
3
3647
# encoding: utf-8 """ vpls.py Created by Nikita Shirokov on 2014-06-16. Copyright (c) 2014-2017 Nikita Shirokov. All rights reserved. Copyright (c) 2014-2017 Exa Networks. All rights reserved. License: 3-clause BSD. (See the COPYRIGHT file) """ from struct import unpack from struct import pack from exabgp.protocol.fa...
bsd-3-clause
mrchapp/meta-openembedded
meta-oe/lib/oeqa/selftest/cases/meta_oe_sources.py
4
1206
import os import re import glob as g import shutil import tempfile from oeqa.selftest.case import OESelftestTestCase from oeqa.utils.commands import runCmd, bitbake, get_bb_var, get_bb_vars class MetaOESourceMirroring(OESelftestTestCase): # Can we download everything from the OpenEmbedded Sources Mirror over http ...
mit
pepeportela/edx-platform
common/djangoapps/util/model_utils.py
6
7263
""" Utilities for django models. """ import re import unicodedata from django.conf import settings from django.dispatch import Signal from django.utils.encoding import force_unicode from django.utils.safestring import mark_safe from django_countries.fields import Country from eventtracking import tracker # The setti...
agpl-3.0
wweiradio/django
tests/flatpages_tests/test_forms.py
165
4569
from __future__ import unicode_literals from django.conf import settings from django.contrib.flatpages.forms import FlatpageForm from django.contrib.flatpages.models import FlatPage from django.contrib.sites.models import Site from django.test import TestCase, modify_settings, override_settings from django.utils impor...
bsd-3-clause
gpetretto/monty
tests/test_os.py
2
1196
__author__ = 'Shyue Ping Ong' __copyright__ = 'Copyright 2014, The Materials Virtual Lab' __version__ = '0.1' __maintainer__ = 'Shyue Ping Ong' __email__ = 'ongsp@ucsd.edu' __date__ = '1/24/14' import unittest import os from monty.os.path import which, zpath from monty.os import cd test_dir = os.path.join(os.path.d...
mit
double-y/django
tests/forms_tests/tests/test_validators.py
261
1540
from __future__ import unicode_literals import re from unittest import TestCase from django import forms from django.core import validators from django.core.exceptions import ValidationError class UserForm(forms.Form): full_name = forms.CharField( max_length=50, validators=[ validato...
bsd-3-clause
joshuajnoble/ofxPython
example_Callbacks/bin/data/openframeworks_extra.py
9
3244
# This file was automatically generated by SWIG (http://www.swig.org). # Version 2.0.7 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. from sys import version_info if version_info >= (2,6,0): def swig_import_helper(): from os.path import ...
mit
eicher31/compassion-switzerland
partner_communication_switzerland/models/partner_communication.py
3
28550
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2016 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.py...
agpl-3.0
Page-David/wget-fast
configer.py
1
2463
#!/usr/bin/env python3 import urllib.parse import requests import queue import os import interface class Download_Configer(object): # Init download settings... def __init__(self, url, saveto): self.url = url parse_result = urllib.parse.urlparse(self.url) self.filename = self.url.split...
gpl-3.0
lalithsuresh/QEMU-Device-State-Visualisations
scripts/simpletrace.py
12
2522
#!/usr/bin/env python # # Pretty-printer for simple trace backend binary trace files # # Copyright IBM, Corp. 2010 # # This work is licensed under the terms of the GNU GPL, version 2. See # the COPYING file in the top-level directory. # # For help see docs/tracing.txt import sys import struct import re header_event_...
gpl-2.0
hobarrera/django
tests/responses/tests.py
33
4881
# -*- coding: utf-8 -*- from __future__ import unicode_literals import io from django.conf import settings from django.core.cache import cache from django.http import HttpResponse from django.http.response import HttpResponseBase from django.test import SimpleTestCase UTF8 = 'utf-8' ISO88591 = 'iso-8859-1' class ...
bsd-3-clause
abhiatgithub/shogun-toolbox
examples/undocumented/python_modular/mathematics_logdet.py
29
2923
#!/usr/bin/env python from numpy import * from scipy.io import mmread # Loading an example sparse matrix of dimension 479x479, real, unsymmetric mtx=mmread('../../../data/logdet/west0479.mtx') parameter_list=[[mtx,100,60,1]] def mathematics_logdet (matrix=mtx,max_iter_eig=1000,max_iter_lin=1000,num_samples=1): fr...
gpl-3.0
fcolamar/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/base/TriggerEfficiency.py
41
2551
#************************************************************************** #* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. * #* * #* Author: The ALICE Off-line Project. * #* Contributors ...
bsd-3-clause
kalev/anaconda
pyanaconda/iw/partition_gui.py
2
72665
# # partition_gui.py: allows the user to choose how to partition their disks # # Copyright (C) 2001, 2002 Red Hat, Inc. All rights reserved. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; e...
gpl-2.0
alikins/ansible
lib/ansible/modules/cloud/amazon/efs.py
14
24211
#!/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
Runscope/pysaml2
src/saml2/mdie.py
34
4757
#!/usr/bin/env python from saml2 import element_to_extension_element from saml2 import extension_elements_to_elements from saml2 import SamlBase from saml2 import md __author__ = 'rolandh' """ Functions used to import metadata from and export it to a pysaml2 format """ IMP_SKIP = ["_certs", "e_e_", "_extatt"] EXP_SK...
bsd-2-clause
BlindHunter/django
tests/model_formsets_regress/tests.py
173
20725
from __future__ import unicode_literals from django import forms from django.forms.formsets import DELETION_FIELD_NAME, BaseFormSet from django.forms.models import ( BaseModelFormSet, inlineformset_factory, modelform_factory, modelformset_factory, ) from django.forms.utils import ErrorDict, ErrorList from djan...
bsd-3-clause
terbolous/CouchPotatoServer
libs/git/files.py
122
1831
# Copyright (c) 2009, Rotem Yaari <vmalloc@gmail.com> # All rights reserved. # # 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 li...
gpl-3.0
moas/carbooking
booking/courses/models.py
1
3802
from __future__ import unicode_literals import datetime from django.core.exceptions import ValidationError from django.utils import timezone from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext as _ from django.db.models import signals from django.db import model...
mit
thomasvincent/utilities
NagiosPlugins/check_procs/pexpect/examples/chess2.py
17
4026
#!/usr/bin/env python '''This demonstrates controlling a screen oriented application (curses). It starts two instances of gnuchess and then pits them against each other. ''' import pexpect import string import ANSI import sys, os, time class Chess: def __init__(self, engine = "/usr/local/bin/gnuchess -a -h ...
apache-2.0
hdinsight/hue
desktop/core/ext-py/Django-1.6.10/tests/reverse_single_related/tests.py
150
1491
from __future__ import absolute_import from django.test import TestCase from .models import Source, Item class ReverseSingleRelatedTests(TestCase): """ Regression tests for an object that cannot access a single related object due to a restrictive default manager. """ def test_reverse_single_rel...
apache-2.0
DDelon/youtube-dl
youtube_dl/extractor/extremetube.py
31
3146
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( int_or_none, sanitized_Request, str_to_int, ) class ExtremeTubeIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?extremetube\.com/(?:[^/]+/)?video/(?P<id>[^/#?&]+)' _TESTS = [{ 'u...
unlicense
vigov5/pvp-game
build_question.py
1
1744
#!venv/bin/python # -*- coding: utf-8 -*- import tornado import tornado.websocket import tornado.wsgi import logging import time import json import random from app import app, db from app.models import User, Game, Fact, Deck, ROLE_USER, ROLE_ADMIN, get_object_or_404 a = {'あ':'a', 'い':'i', 'う':'u', 'え':'e', 'お':'o', ...
mit
the-c0d3r/CapTipper
CTMagic.py
11
6620
# # CapTipper is a malicious HTTP traffic explorer tool # By Omri Herscovici <omriher AT gmail.com> # http://omriher.com # @omriher # # # This file is part of CapTipper, and part of the Whatype library # Whatype is an independent file type identification pyt...
gpl-3.0
DavidNorman/tensorflow
tensorflow/python/kernel_tests/reduction_ops_test_big.py
30
8764
# Copyright 2015 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
nikolas/lettuce
tests/integration/lib/Django-1.3/django/contrib/localflavor/pe/forms.py
309
2272
# -*- coding: utf-8 -*- """ PE-specific Form helpers. """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import RegexField, CharField, Select from django.utils.translation import ugettext_lazy as _ class PERegionSelect(Select): """ A Select wi...
gpl-3.0
SerCeMan/intellij-community
python/lib/Lib/site-packages/django/conf/locale/nn/formats.py
685
1657
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. F Y' TIME_FORMAT = 'H:i' DATETIME_FORMAT = 'j. F Y H:i' YEAR_MONTH_FOR...
apache-2.0
slabanja/ase
ase/test/__init__.py
1
3984
import sys import unittest from glob import glob import numpy as np class NotAvailable(SystemExit): def __init__(self, msg, code=0): SystemExit.__init__(self, (msg,code,)) self.msg = msg self.code = code # ------------------------------------------------------------------- # Custom test...
gpl-2.0
octavioturra/aritial
google_appengine/lib/django/django/contrib/admin/utils.py
33
3621
"Misc. utility functions/classes for admin documentation generator." import re from email.Parser import HeaderParser from email.Errors import HeaderParseError try: import docutils.core import docutils.nodes import docutils.parsers.rst.roles except ImportError: docutils_is_available = False else: do...
apache-2.0
lpeska/BRDTI
netlaprls.py
1
2811
''' We base the NetLapRLS implementation on the one from PyDTI project, https://github.com/stephenliu0423/PyDTI, changes were made to the evaluation procedure [1] Xia, Zheng, et al. "Semi-supervised drug-protein interaction prediction from heterogeneous biological spaces." BMC systems biology 4.Suppl 2 (2010): S6. De...
gpl-2.0
albertodonato/toolrack
toolrack/tests/test_config.py
1
7449
from operator import attrgetter import pytest from ..config import ( Config, ConfigKey, ConfigKeyTypes, InvalidConfigValue, MissingConfigKey, ) class TestConfigKeyTypes: def test_get_converter_unknown_type(self): """An error is raised if type is unknown.""" with pytest.raises...
lgpl-3.0
mick-d/nipype
tools/make_examples.py
10
3014
#!/usr/bin/env python """Run the py->rst conversion and run all examples. This also creates the index.rst file appropriately, makes figures, etc. """ from __future__ import print_function, division, unicode_literals, absolute_import from builtins import open from past.builtins import execfile # -----------------------...
bsd-3-clause
lief-project/LIEF
examples/python/authenticode/api_example.py
1
2223
#!/usr/bin/env python import lief import sys import os # Parse PE file pe = lief.parse(sys.argv[1]) sep = (":") if sys.version_info.minor > 7 else () # Get authenticode print(pe.authentihash_md5.hex(*sep)) # 1c:a0:91:53:dc:9a:3a:5f:34:1d:7f:9b:b9:56:69:4d print(pe.authentihash(lief.PE.ALGORITHMS.SHA_1).hex(*sep)) # ...
apache-2.0
robclark/chromium
chrome/test/webdriver/test/run_webdriver_tests.py
9
9476
#!/usr/bin/env python # 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. import logging import optparse import os import sys import types import unittest from chromedriver_launcher import ChromeDriverLau...
bsd-3-clause
the-engine-room/replication-sprint-02
crowdataapp/migrations/0009_auto__chg_field_document_stored_validity_rate.py
1
11069
# -*- 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): # Changing field 'Document.stored_validity_rate' db.alter_column(u'crowdataapp_document', 'stored_validity_...
mit
VanirAOSP/external_chromium_org
tools/deep_memory_profiler/tests/mock_gsutil.py
131
1558
#!/usr/bin/env python # Copyright (c) 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. import os import re import sys import zipfile def main(): ZIP_PATTERN = re.compile('dmprof......\.zip') assert len(sys.argv)...
bsd-3-clause
kevinlondon/youtube-dl
youtube_dl/extractor/jeuxvideo.py
85
1990
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class JeuxVideoIE(InfoExtractor): _VALID_URL = r'http://.*?\.jeuxvideo\.com/.*/(.*?)\.htm' _TESTS = [{ 'url': 'http://www.jeuxvideo.com/reportages-videos-jeux/0004/00046170/tearaway-playstation-vita...
unlicense
sacharya/nova
nova/openstack/common/rpc/serializer.py
72
1600
# Copyright 2013 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 agree...
apache-2.0
RyanSkraba/beam
sdks/python/apache_beam/io/gcp/bigquery_io_read_it_test.py
7
2252
# # 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
elthariel/dff
ui/console/console.py
1
4149
# DFF -- An Open Source Digital Forensics Framework # Copyright (C) 2009-2010 ArxSys # This program is free software, distributed under the terms of # the GNU General Public License Version 2. See the LICENSE file # at the top of the source tree. # # See http://www.digital-forensic.org for more information about this...
gpl-2.0
tuxfux-hlp-notes/python-batches
archieves/batch-65/16-files/sheets/lib/python2.7/site-packages/pip/utils/logging.py
516
3327
from __future__ import absolute_import import contextlib import logging import logging.handlers import os try: import threading except ImportError: import dummy_threading as threading from pip.compat import WINDOWS from pip.utils import ensure_dir try: from pip._vendor import colorama # Lots of differen...
gpl-3.0
kwurst/grading-scripts
assignmentconvert.py
1
1952
# Copyright (C) 2014 Karl R. Wurst # # 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, or # (at your option) any later version. # # This program is distributed in ...
gpl-3.0
anisridhar/AudioShop
analysisClass.py
1
5377
import pyaudio import wave import sys import time import cv2 import numpy as np import os from Tkinter import * from pydubtest import play, make_chunks from pydub import AudioSegment from threading import Thread from vidAnalysis import vid2SoundFile from eventBasedAnimationClass import EventBasedAnimationClass import i...
mit
Cinntax/home-assistant
homeassistant/helpers/state.py
1
8248
"""Helpers that help with state related things.""" import asyncio import datetime as dt import json import logging from collections import defaultdict from types import ModuleType, TracebackType from typing import Awaitable, Dict, Iterable, List, Optional, Tuple, Type, Union from homeassistant.loader import bind_hass,...
apache-2.0
fxa90id/mozillians
mozillians/users/tests/test_tasks.py
1
11847
from datetime import datetime from django.conf import settings from django.contrib.auth.models import User from django.test.utils import override_settings from basket.base import BasketException from celery.exceptions import Retry from mock import patch from nose.tools import eq_, ok_ from mozillians.common.tests im...
bsd-3-clause
aladagemre/django-guardian
guardian/core.py
9
5191
from __future__ import unicode_literals from itertools import chain from django.contrib.auth.models import Permission from django.contrib.contenttypes.models import ContentType from django.db.models import Q from guardian.utils import get_identity from guardian.utils import get_user_obj_perms_model from guardian.uti...
bsd-2-clause
yograterol/django
tests/auth_tests/test_basic.py
328
4643
from __future__ import unicode_literals from django.apps import apps from django.contrib.auth import get_user_model from django.contrib.auth.models import AnonymousUser, User from django.contrib.auth.tests.custom_user import CustomUser from django.core.exceptions import ImproperlyConfigured from django.dispatch import...
bsd-3-clause
dhermes/google-cloud-python
tasks/noxfile.py
34
4095
# -*- coding: utf-8 -*- # # Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law...
apache-2.0
yestech/gae-django-template
django/contrib/localflavor/fr/forms.py
309
1747
""" FR-specific Form helpers """ from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from django.utils.encoding import smart_unicode from django.utils.translation import ugettext_lazy as _ import re phone_digits_re = re.com...
bsd-3-clause
msabramo/ansible
lib/ansible/modules/packaging/os/pacman.py
5
15028
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2012, Afterburn <http://github.com/afterburn> # (c) 2013, Aaron Bull Schaefer <aaron@elasticdog.com> # (c) 2015, Indrajit Raychaudhuri <irc+code@indrajit.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it un...
gpl-3.0
rishibarve/incubator-airflow
tests/jobs.py
1
61326
# -*- 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
leductan-nguyen/RaionPi
src/octoprint/plugin/core.py
1
42607
# coding=utf-8 """ In this module resides the core data structures and logic of the plugin system. It is implemented in an RaionPi-agnostic way and could be extracted into a separate Python module in the future. .. autoclass:: PluginManager :members: .. autoclass:: PluginInfo :members: .. autoclass:: Plugin ...
agpl-3.0
mungerd/plastex
plasTeX/Base/LaTeX/Index.py
5
13222
#!/usr/bin/env python """ C.11.5 Index and Glossary (p211) """ import string, os from plasTeX.Tokenizer import Token, EscapeSequence from plasTeX import Command, Environment, IgnoreCommand, encoding from plasTeX.Logging import getLogger from Sectioning import SectionUtils try: from pyuca import Collator col...
mit
nitzmahone/ansible
test/units/modules/network/eos/test_eos_banner.py
55
3617
# 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 distributed in the hope that ...
gpl-3.0
jacobq/csci5221-viro-project
tests/unit/lib/mock_socket_test.py
45
2309
#!/usr/bin/env python # # Copyright 2011-2012 Andreas Wundsam # # 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
mir-ror/linux-yocto-dev
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
cmisenas/artos
PyARTOS/config.py
2
7158
"""Reads and writes the configuration file of PyARTOS. This module provides access to the configuration given in the file 'pyartos.ini', which is searched for in the current working directory. To access the configuration options, the 'config' object in this module's dictionary can be used, which is an instance of...
gpl-3.0
JorgeCoock/django
django/contrib/gis/maps/google/__init__.py
287
2771
""" This module houses the GoogleMap object, used for generating the needed javascript to embed Google Maps in a Web page. Google(R) is a registered trademark of Google, Inc. of Mountain View, California. Example: * In the view: return render_to_response('template.html', {'google' : GoogleMap(key="...
bsd-3-clause
urandu/mfl_api
chul/filters.py
1
2760
import django_filters from .models import ( CommunityHealthUnit, CommunityHealthWorker, CommunityHealthWorkerContact, Status, CommunityHealthUnitContact, Approver, CommunityHealthUnitApproval, CommunityHealthWorkerApproval, ApprovalStatus ) from common.filters.filter_shared import ...
mit
Pretio/boto
boto/gs/lifecycle.py
157
9086
# Copyright 2013 Google Inc. # # 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, dis- # trib...
mit
HybridF5/jacket
jacket/db/sqlalchemy/migrate_repo/versions/036_compute_251_add_numa_topology_to_comput_nodes.py
81
1166
# 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 # d...
apache-2.0
ehirt/odoo
addons/resource/__init__.py
448
1086
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 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
chen0031/nupic
nupic/bindings/__init__.py
33
1033
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, 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
crowdhackathon-transport/optimizers
crowdstance-api/venv/lib/python2.7/site-packages/setuptools/command/bdist_egg.py
286
18718
"""setuptools.command.bdist_egg Build .egg distributions""" # This module should be kept compatible with Python 2.3 import sys, os, marshal from setuptools import Command from distutils.dir_util import remove_tree, mkpath try: # Python 2.7 or >=3.2 from sysconfig import get_path, get_python_version def _g...
mit
phenoxim/cinder
cinder/api/v2/snapshots.py
3
6696
# Copyright 2011 Justin Santa Barbara # 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 requ...
apache-2.0
danwchan/trail_of_cthulhu
mythos_website_upgrade/birthcharacter/admin.py
1
1941
from django.contrib import admin from .models import AbilityList, AbilityExamples, OccupationList, DriveList, DriveExamples, AssociatedOccuDrive, AssociatedOccuAbil, SpecialList # Primary keys you care about #primary_keys = [ # 'occupation', # 'drive', # 'ability' # ] # Inline projects to build the editin...
gpl-3.0
mrunge/horizon
openstack_dashboard/dashboards/admin/metering/urls.py
2
1031
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0
befair/sbcatalog
api/flaskapp.py
2
2401
# This file is part of sbcatalog # # sbcatalog is Copyright © 2015 beFair.it # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License version 3, as published by # the Free Software Foundation. # # This program is distributed in the hope that ...
agpl-3.0
ruibarreira/linuxtrail
usr/lib/python2.7/xml/etree/ElementInclude.py
74
5076
# # ElementTree # $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $ # # limited xinclude support for element trees # # history: # 2003-08-15 fl created # 2003-11-14 fl fixed default loader # # Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved. # # fredrik@pythonware.com # http://www.pythonware...
gpl-3.0
gisweb/plomino.printdocuments
bootstrap-buildout.py
172
6501
############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. # THIS SOF...
gpl-3.0
caot/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geometry/test_data.py
364
2994
""" This module has the mock object definitions used to hold reference geometry for the GEOS and GDAL tests. """ import gzip import os from django.contrib import gis from django.utils import simplejson # This global used to store reference geometry data. GEOMETRIES = None # Path where reference test data is located...
apache-2.0