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
OCA/contract
contract_sale_payment_mode/tests/test_sale_order.py
1
1524
# Copyright 2018 ACSONE SA/NV # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from odoo.addons.product_contract.tests.test_sale_order import TestSaleOrder class TestSaleOrderPaymentMode(TestSaleOrder): def setUp(self): super(TestSaleOrderPaymentMode, self).setUp() self.payme...
agpl-3.0
tensorflow/probability
tensorflow_probability/python/optimizer/linesearch/hager_zhang_test.py
1
13189
# Copyright 2018 The TensorFlow Probability Authors. # # 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 o...
apache-2.0
MobinRanjbar/hue
desktop/core/ext-py/lxml-3.3.6/doc/s5/ep2008/atom.py
50
18452
# ET is 80's! #import elementtree as etree # LXML is 00's! from lxml import etree from lxml.etree import tostring #from dateutil.parser import parse as parse_date from datetime import datetime import uuid import cgi import copy __all__ = [ 'ATOM', 'atom_ns', 'Element', 'tostring'] ATOM_NAMESPACE = atom_ns = 'http...
apache-2.0
chengdh/openerp-ktv
openerp/addons/sale/__openerp__.py
10
3479
# -*- 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
blueszhangsh/serf
bindings/python_ctypes/serf/__init__.py
23
8936
# # ==================================================================== # Copyright 2013 Justin Erenkrantz and Greg Stein # # 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 # # h...
apache-2.0
jlgoldman/writetogov
logic/tests/reminder_service_test.py
1
8126
import datetime import unittest from dateutil import tz import mock from api import reminder from database import db from database import db_models from logic import reminder_logic from logic import reminder_service from testing import test_base R = db_models.Reminder def create_db_reminder(email, frequency=R.Frequ...
bsd-3-clause
exildev/webpage
exile/migrations/0001_initial.py
1
5062
# -*- coding: utf-8 -*- # Generated by Django 1.10.1 on 2016-09-14 22:38 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.Crea...
mit
sassoftware/conary
conary_test/queryreptest.py
2
42072
# # Copyright (c) SAS Institute 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 w...
apache-2.0
analogdevicesinc/gnuradio
gr-digital/python/digital/qa_lfsr.py
57
1377
#!/usr/bin/env python # # Copyright 2012 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
kybriainfotech/iSocioCRM
addons/project_timesheet/report/__init__.py
441
1063
# -*- 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
uni2u/neutron
neutron/tests/unit/services/loadbalancer/drivers/haproxy/test_cfg.py
6
10772
# Copyright 2013 Mirantis, Inc. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
apache-2.0
ma314smith/home-assistant
tests/components/emulated_hue/test_hue_api.py
4
14737
"""The tests for the emulated Hue component.""" import json import unittest from unittest.mock import patch import requests from homeassistant import bootstrap, const, core import homeassistant.components as core_components from homeassistant.components import ( emulated_hue, http, light, script, media_player ) f...
mit
chen0031/nupic
tests/integration/nupic/opf/opf_checkpoint_test/experiments/backwards_compatibility/a/description.py
38
2140
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2011-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 p...
agpl-3.0
civisanalytics/ansible
lib/ansible/modules/packaging/os/swdepot.py
11
6348
#!/usr/bin/python -tt # -*- coding: utf-8 -*- # (c) 2013, Raul Melo # Written by Raul Melo <raulmelo@gmail.com> # Based on yum module written by Seth Vidal <skvidal at fedoraproject.org> # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pu...
gpl-3.0
tinkerthaler/odoo
openerp/addons/base/ir/ir_values.py
228
26238
# -*- 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 GNU...
agpl-3.0
vlegoff/tsunami
src/primaires/salle/detail.py
1
13493
# -*-coding:Utf-8 -* # Copyright (c) 2010-2017 LE GOFF Vincent # 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 # ...
bsd-3-clause
saketmehta/softy-project
connect/views.py
1
1960
from django.shortcuts import render, get_object_or_404, redirect from django.contrib.auth.decorators import login_required from .models import Question from .forms import QuestionForm # from firebase_token_generator import create_token # Create your views here. @login_required def dashboard(request): open_questio...
isc
Nachtfeuer/concept-py
concept/data/schema.py
1
4267
""" Schema tool. .. module:: schema :platform: Unix, Windows :synopis: schema tool. .. moduleauthor:: Thomas Lehmann <thomas.lehmann.private@googlemail.com> ======= License ======= Copyright (c) 2015 Thomas Lehmann Permission is hereby granted, free of charge, to any person obtaining a cop...
mit
azunite/wireshark_1023
tools/dfilter-test.py
42
1682
#!/usr/bin/env python """ Test-suite to test wireshark's dfilter mechanism. """ # # Copyright (C) 2003-2013 by Gilbert Ramirez <gram@alumni.rice.edu> # # 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 Fou...
gpl-2.0
wakatime/wakatime-unity
Editor/WakaTime/client/wakatime/packages/pygments_py3/pygments/lexers/ooc.py
72
2999
# -*- coding: utf-8 -*- """ pygments.lexers.ooc ~~~~~~~~~~~~~~~~~~~ Lexers for the Ooc language. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from pygments.lexer import RegexLexer, bygroups, words from pygments.token import Text, C...
cc0-1.0
jpshort/odoo
addons/account_asset/report/__init__.py
445
1074
# -*- 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
vladistan/percona-pam-plugin
test/dbqp/lib/util/crashme_methods.py
22
4738
#! /usr/bin/env python # -*- mode: python; indent-tabs-mode: nil; -*- # vim:expandtab:shiftwidth=2:tabstop=2:smarttab: # # Copyright (C) 2011 Patrick Crews # # # 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 Softwar...
gpl-2.0
aurelijusb/arangodb
3rdParty/V8-4.3.61/third_party/python_26/Lib/distutils/bcppcompiler.py
53
15091
"""distutils.bcppcompiler Contains BorlandCCompiler, an implementation of the abstract CCompiler class for the Borland C++ compiler. """ # This implementation by Lyle Johnson, based on the original msvccompiler.py # module and using the directions originally published by Gordon Williams. # XXX looks like there's a L...
apache-2.0
ric2b/Vivaldi-browser
chromium/tools/metrics/histograms/find_unmapped_histograms.py
3
15017
# 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. """Scans the Chromium source for histograms that are absent from histograms.xml. This is a heuristic scan, so a clean run of this script does not guarantee ...
bsd-3-clause
Trafire/purchaseorders
lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/cli.py
42
16941
# -*- coding: utf-8 -*- """ flask.cli ~~~~~~~~~ A simple command line application to run flask apps. :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import os import sys from threading import Lock, Thread from functools import update_wrapper import click ...
mit
bitthunder-toolchain/binutils
gdb/testsuite/gdb.python/py-pp-integral.py
41
1122
# Copyright (C) 2013-2014 Free Software Foundation, Inc. # 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 progr...
gpl-2.0
h3llrais3r/SickRage
lib/pgi/codegen/cbargs.py
19
3599
# Copyright 2013 Christoph Reiter # # This library 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 Foundation; either # version 2.1 of the License, or (at your option) any later version. from pgi.clib.gir import G...
gpl-3.0
rahushen/ansible
lib/ansible/modules/network/cnos/cnos_conditional_template.py
35
8748
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import (absolute_import, division, print_function) __metaclass__ = type # # Copyright (C) 2017 Lenovo, 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 Licens...
gpl-3.0
BurtBiel/azure-cli
src/command_modules/azure-cli-network/azure/cli/command_modules/network/mgmt_vnet_gateway/lib/models/provider_resource_type.py
12
1771
#--------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. #---------------------------------------------------------------------...
mit
mikebenfield/scipy
scipy/_lib/_version.py
71
4793
"""Utility to compare (Numpy) version strings. The NumpyVersion class allows properly comparing numpy version strings. The LooseVersion and StrictVersion classes that distutils provides don't work; they don't recognize anything like alpha/beta/rc/dev versions. """ import re from scipy._lib.six import string_types ...
bsd-3-clause
evangeline97/localwiki-backend-server
localwiki/pages/tests/test_api.py
3
21821
import json from StringIO import StringIO from django.contrib.auth.models import User, Group from django.conf import settings from django.core.files.base import ContentFile from django.db import IntegrityError, DatabaseError from guardian.shortcuts import assign_perm, remove_perm from rest_framework import status fr...
gpl-2.0
phalax4/CarnotKE
jyhton/lib-python/2.7/lib2to3/pgen2/conv.py
325
9627
# Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Convert graminit.[ch] spit out by pgen to Python code. Pgen is the Python parser generator. It is useful to quickly create a parser from a grammar file in Python's grammar notation. But I don't wa...
apache-2.0
Mj258/weiboapi
srapyDemo/envs/Lib/site-packages/twisted/mail/maildir.py
10
27925
# -*- test-case-name: twisted.mail.test.test_mail -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Maildir-style mailbox support. """ import os import stat import socket from hashlib import md5 from zope.interface import implementer try: import cStringIO as StringIO except Import...
mit
DedMemez/ODS-August-2017
tutorial/TutorialPlayground.py
1
16612
# Fuck you Disyer. Stealing my fucking paypal. GET FUCKED: toontown.tutorial.TutorialPlayground from panda3d.core import CardMaker, Vec3, headsUp from direct.actor.Actor import Actor from direct.interval.IntervalGlobal import * from direct.showbase.DirectObject import DirectObject from otp.avatar import Emote fro...
apache-2.0
fcanbolat/ponscoin
contrib/testgen/gen_base58_test_vectors.py
1064
4344
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
mit
allanice001/RJ45
lib/tweepy/binder.py
18
7851
# Tweepy # Copyright 2009-2010 Joshua Roesslein # See LICENSE for details. import httplib import urllib import time import re from StringIO import StringIO import gzip from tweepy.error import TweepError from tweepy.utils import convert_to_utf8_str from tweepy.models import Model re_path_template = re.compile('{\w+}...
gpl-2.0
ravigadde/kube-scheduler
third_party/htpasswd/htpasswd.py
897
5219
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2008-2013 Edgewall Software # Copyright (C) 2008 Eli Carter # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. The terms # are also available at http://trac.edge...
apache-2.0
vipullakhani/mi-instrument
mi/instrument/um/thsph/ooicore/driver.py
3
28865
""" @package mi.instrument.um.thsph.thsph.driver @file marine-integrations/mi/instrument/um/thsph/thsph/driver.py @author Richard Han @brief Driver for the thsph Release notes: Vent Chemistry Instrument Driver """ import re import time from mi.core.exceptions import InstrumentException from mi.core.driver_scheduler...
bsd-2-clause
Widiot/simpleblog
venv/lib/python3.5/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 ...
mit
Widiot/simpleblog
venv/lib/python3.5/site-packages/idna/core.py
144
11390
from . import idnadata import bisect import unicodedata import re import sys from .intranges import intranges_contain _virama_combining_class = 9 _alabel_prefix = b'xn--' _unicode_dots_re = re.compile(u'[\u002e\u3002\uff0e\uff61]') if sys.version_info[0] == 3: unicode = str unichr = chr class IDNAError(Unico...
mit
NoahFlowa/glowing-spoon
venv/lib/python2.7/site-packages/geocode/geocode.py
1
2974
import os import urllib import cPickle as pickle import json import time class NoResultError(Exception): pass class QueryLimitError(Exception): pass last_read = time.time() try: pickle_dir = os.path.expanduser('~/.geocode/') os.makedirs(pickle_dir) except: pickle_dir = './' pickle_path = os.path.join(p...
apache-2.0
dochang/ansible
lib/ansible/playbook/block.py
13
14599
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) an...
gpl-3.0
markeTIC/OCB
addons/mass_mailing/models/mass_mailing.py
55
27705
# -*- coding: utf-8 -*- from datetime import datetime from dateutil import relativedelta import json import random from openerp import tools from openerp.exceptions import Warning from openerp.tools.safe_eval import safe_eval as eval from openerp.tools.translate import _ from openerp.tools import ustr from openerp.os...
agpl-3.0
asakusafw/asakusafw-documentation
docs/ja/source/conf.py
1
11241
# -*- coding: utf-8 -*- # # Asakusa Framework documentation build configuration file, created by # sphinx-quickstart on Wed May 18 11:38:42 2011. # # 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 fil...
apache-2.0
JNRowe/versionah
tests/test_impl.py
1
1471
# """test_impl - Model implementation tests""" # Copyright © 2011-2018 James Rowe <jnrowe@gmail.com> # # SPDX-License-Identifier: GPL-3.0-or-later # # This file is part of versionah. # # versionah is free software: you can redistribute it and/or modify it under # the terms of the GNU General Public License as publishe...
gpl-3.0
tod31/pyload
module/plugins/accounts/OboomCom.py
5
2295
# -*- coding: utf-8 -*- try: from beaker.crypto.pbkdf2 import PBKDF2 except ImportError: from beaker.crypto.pbkdf2 import pbkdf2 from binascii import b2a_hex class PBKDF2(object): def __init__(self, passphrase, salt, iterations=1000): self.passphrase = passphrase self....
gpl-3.0
postlund/pyatv
pyatv/mrp/protobuf/RemoveClientMessage_pb2.py
1
3551
# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: pyatv/mrp/protobuf/RemoveClientMessage.proto """Generated protocol buffer code.""" from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as ...
mit
skrueger111/zazzie
src/sassie/simulate/complex_monte_carlo/gui_mimic_complex_monte_carlo1.py
2
8820
''' Driver method to run the complex_monte_carlo module ''' import sys import string import os import shutil import time import sassie.util.sasconfig as sasconfig import sassie.interface.input_filter as input_filter import sassie.simulate.complex_monte_carlo.complex_monte_carlo as complex_monte_carlo #import complex_...
gpl-3.0
scotthartbti/android_external_chromium_org
tools/checkperms/checkperms.py
27
15170
#!/usr/bin/env python # Copyright (c) 2012 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. """Makes sure files have the right permissions. Some developers have broken SCM configurations that flip the svn:executable permis...
bsd-3-clause
kawasaki2013/python-for-android-x86
python3-alpha/python3-src/Lib/distutils/tests/__init__.py
165
1060
"""Test suite for distutils. This test suite consists of a collection of test modules in the distutils.tests package. Each test module has a name starting with 'test' and contains a function test_suite(). The function is expected to return an initialized unittest.TestSuite instance. Tests for the command classes in...
apache-2.0
ray-project/ray
python/ray/tune/tests/test_trial_runner_callbacks.py
1
10023
import os import shutil import sys import tempfile import time import unittest import ray from ray import tune from ray.rllib import _register_all from ray.tune.checkpoint_manager import Checkpoint from ray.tune.logger import DEFAULT_LOGGERS, LoggerCallback, \ LegacyLoggerCallback from ray.tune.ray_trial_executor ...
apache-2.0
michigraber/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
adambrenecki/django
tests/forms_tests/tests/test_forms.py
2
116434
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.core.files.uploadedfile import SimpleUploadedFile from django.core.validators import RegexValidator from django.forms import * from django.http import QueryDict from django.template import Template, Context from django.test im...
bsd-3-clause
richardtran415/pymatgen
pymatgen/analysis/diffraction/core.py
3
7292
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. """ This module implements core classes for calculation of diffraction patterns. """ import abc import collections import numpy as np from pymatgen.core.spectrum import Spectrum from pymatgen.util.plotting i...
mit
Epirex/android_external_chromium_org
chrome/test/functional/chromoting/it2me_basic.py
68
1355
#!/usr/bin/env python # Copyright (c) 2012 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. """Basic tests for Chromoting it2me.""" import chromoting_base import pyauto class IT2MeBasic(chromoting_base.ChromotingBase): ...
bsd-3-clause
Intel-Corporation/tensorflow
tensorflow/python/distribute/parameter_server_strategy.py
1
24128
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
c0710204/edx-platform
lms/djangoapps/bulk_email/migrations/0006_add_course_email_template.py
182
6003
# -*- coding: utf-8 -*- from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CourseEmailTemplate' db.create_table('bulk_email_courseemailtemplate', ( ('id', self.gf('django....
agpl-3.0
CERNDocumentServer/invenio
modules/bibupload/lib/batchuploader.py
3
6768
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 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 2 of the # License, or (at your optio...
gpl-2.0
gamnor/olhoneles
montanha/migrations/0003_auto__add_collectionrun__add_archivedexpense.py
1
8922
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'CollectionRun' db.create_table(u'montanha_collectionrun', ( (u'id', self.gf('dja...
agpl-3.0
impact-hiv/NepidemiX
nepidemix/utilities/networkxtra/generators/toivonen.py
1
8297
""" Toivonen et al. network generator for social network models =========================================================== Implementation of the network generation algorithm described in 'A Model for Social Networks' by Riitta Toivonen et al. Arxiv ID: arXiv:physics/0601114v2 Experimental. """ __author__ = "Luka...
bsd-3-clause
cybertk/depot_tools
third_party/coverage/report.py
214
3031
"""Reporter foundation for Coverage.""" import fnmatch, os from coverage.codeunit import code_unit_factory from coverage.files import prep_patterns from coverage.misc import CoverageException, NoSource, NotPython class Reporter(object): """A base class for all reporters.""" def __init__(self, coverage, confi...
bsd-3-clause
Venturi/oldcms
env/lib/python2.7/site-packages/djangocms_blog/south_migrations/0001_initial.py
14
26231
# -*- coding: utf-8 -*- from django.contrib.auth import get_user_model from django.utils import timezone from south.db import db from south.v2 import SchemaMigration from django.db import models User = get_user_model() user_orm_label = '%s.%s' % (User._meta.app_label, User._meta.object_name) user_model_label = '%s.%s...
apache-2.0
Medigate/cutiuta-server
cutiuta-server/env/lib/python3.4/site-packages/pip/_vendor/requests/packages/chardet/gb2312freq.py
3132
36011
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 R...
gpl-3.0
fraoustin/ocglances
ocglances/client.py
1
8230
# -*- coding: utf-8 -*- # # This file is part of Glances. # # Copyright (C) 2017 Nicolargo <nicolas@nicolargo.com> # # Glances 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 Foundation, either version 3 of the Lic...
gpl-2.0
pigeonflight/strider-plone
docker/appengine/lib/django-1.4/tests/regressiontests/forms/models.py
34
2525
# -*- coding: utf-8 -*- import os import datetime import tempfile from django.core.files.storage import FileSystemStorage from django.db import models temp_storage_location = tempfile.mkdtemp(dir=os.environ['DJANGO_TEST_TEMP_DIR']) temp_storage = FileSystemStorage(location=temp_storage_location) class BoundaryMode...
mit
marcydoty/geraldo
site/newsite/django_1_0/tests/modeltests/many_to_many/models.py
11
9686
""" 5. Many-to-many relationships To define a many-to-many relationship, use ManyToManyField(). In this example, an article can be published in multiple publications, and a publication has multiple articles. """ from django.db import models class Publication(models.Model): title = models.CharField(max_length=30...
lgpl-3.0
NeuralEnsemble/neuroConstruct
lib/jython/Lib/test/test_module.py
4
1896
# Test the module type from test.test_support import verify, vereq, verbose, TestFailed from types import ModuleType as module # An uninitialized module has no __dict__ or __name__, and __doc__ is None foo = module.__new__(module) verify(foo.__dict__ is None) try: s = foo.__name__ except AttributeError: pass ...
gpl-2.0
adamzap/django-storages
storages/backends/sftpstorage.py
14
9579
# SFTP storage backend for Django. # Author: Brent Tubbs <brent.tubbs@gmail.com> # License: MIT # # Modeled on the FTP storage by Rafal Jonca <jonca.rafal@gmail.com> # # Settings: # # SFTP_STORAGE_HOST - The hostname where you want the files to be saved. # # SFTP_STORAGE_ROOT - The root directory on the remote host int...
bsd-3-clause
doriancoins/doriancoin
test/functional/test_framework/mininode.py
1
16667
#!/usr/bin/env python3 # Copyright (c) 2010 ArtForz -- public domain half-a-node # Copyright (c) 2012 Jeff Garzik # Copyright (c) 2010-2017 The Doriancoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Doriancoi...
mit
Canule/Mash-Cogs
translated/translated.py
1
19488
from cogs.utils.dataIO import dataIO from .utils import checks from __main__ import send_cmd_help from __main__ import settings as bot_settings # Sys. import discord from discord.ext import commands from operator import itemgetter, attrgetter #from copy import deepcopy import random import os import sys import time imp...
gpl-3.0
mjourdan/paperwork
src/paperwork/backend/img/doc.py
1
10147
# Paperwork - Using OCR to grep dead trees the easy way # Copyright (C) 2012-2014 Jerome Flesch # Copyright (C) 2012 Sebastien Maccagnoni-Munch # # Paperwork 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 Soft...
gpl-3.0
petebachant/TurbineDAQ
modules/mainwindow.py
1
56870
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gui\mainwindow.ui' # # Created: Sun Mar 01 11:22:32 2015 # by: PyQt4 UI code generator 4.9.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except ...
gpl-3.0
CHagenlo/home-gateway
radiotherm/radiotherm/__init__.py
2
1452
from .thermostat import Thermostat, CommonThermostat, CT50v109, CT50v188, CT50v194, CT80RevB2v103 from . import discover from . import fields THERMOSTATS = (CT50v109, CT50v188, CT50v194, CT80RevB2v103,) def get_thermostat_class(model): """ :param model: string representation of the thermostat's model, in ...
gpl-2.0
wangsharp/trading-with-python
lib/yahooFinance.py
76
8290
# -*- coding: utf-8 -*- # Author: Jev Kuznetsov <jev.kuznetsov@gmail.com> # License: BSD """ Toolset working with yahoo finance data This module includes functions for easy access to YahooFinance data Functions ---------- - `getHistoricData` get historic data for a single symbol - `getQuote` get cur...
bsd-3-clause
dwillis/django-calaccess-campaign-browser
calaccess_campaign_browser/utils/serializer.py
3
1337
""" Tastypie serializer class for CSV exports and pretty priting JSON Use it as a starting point for other custom serializers in a project """ import csv import json from django.http import HttpResponse from django.core.serializers.json import DjangoJSONEncoder from tastypie.serializers import Serializer class CIRCus...
mit
dfunckt/django
tests/gis_tests/gdal_tests/test_ds.py
44
11126
import os import unittest from unittest import skipUnless from django.contrib.gis.gdal import HAS_GDAL from ..test_data import TEST_DATA, TestDS, get_ds_file if HAS_GDAL: from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, GDALException, OGRIndexError, GDAL_VERSION from django.contrib.gis....
bsd-3-clause
nirmeshk/oh-mainline
vendor/packages/gdata/samples/webmastertools/SitemapsFeedSummary.py
128
1878
#!/usr/bin/python # # Copyright (C) 2008 Yu-Jie Lin # # 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 o...
agpl-3.0
helldorado/ansible
lib/ansible/modules/monitoring/stackdriver.py
102
6450
#!/usr/bin/python # -*- coding: utf-8 -*- # 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', ...
gpl-3.0
Technux/linux
scripts/analyze_suspend.py
1537
120394
#!/usr/bin/python # # Tool for analyzing suspend/resume timing # Copyright (c) 2013, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free Software Foundation. # # This prog...
gpl-2.0
elainexmas/boto
boto/mturk/notification.py
170
4194
# Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # 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, modi...
mit
indera/redi
test/TestUpdateFormImported.py
1
10502
import unittest import os from lxml import etree from redi import redi file_dir = os.path.dirname(os.path.realpath(__file__)) goal_dir = os.path.join(file_dir, "../") proj_root = os.path.abspath(goal_dir)+'/' DEFAULT_DATA_DIRECTORY = os.getcwd() class TestUpdateFormImported(unittest.TestCase): def setUp(self): ...
bsd-3-clause
indictranstech/omnitech-frappe
frappe/utils/nestedset.py
25
8597
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt # Tree (Hierarchical) Nested Set Model (nsm) # # To use the nested set model, # use the following pattern # 1. name your parent field as "parent_item_group" if not have a property nsm_parent_field as your field name in ...
mit
boyuegame/kbengine
kbe/src/lib/python/Lib/curses/textpad.py
155
7339
"""Simple textbox editing widget with Emacs-like keybindings.""" import curses import curses.ascii def rectangle(win, uly, ulx, lry, lrx): """Draw a rectangle with corners at the provided upper-left and lower-right coordinates. """ win.vline(uly+1, ulx, curses.ACS_VLINE, lry - uly - 1) win.hline(u...
lgpl-3.0
myriadcoin/myriadcoin
contrib/gitian-build.py
6
13817
#!/usr/bin/env python3 import argparse import os import subprocess import sys def setup(): global args, workdir programs = ['ruby', 'git', 'apt-cacher-ng', 'make', 'wget'] if args.kvm: programs += ['python-vm-builder', 'qemu-kvm', 'qemu-utils'] elif args.docker: dockers = ['docker.io',...
mit
tangentlabs/wagtail
wagtail/wagtailadmin/urls/pages.py
25
1803
from django.conf.urls import url from wagtail.wagtailadmin.views import pages, page_privacy urlpatterns = [ url(r'^add/(\w+)/(\w+)/(\d+)/$', pages.create, name='add'), url(r'^add/(\w+)/(\w+)/(\d+)/preview/$', pages.preview_on_create, name='preview_on_add'), url(r'^usage/(\w+)/(\w+)/$', pages.content_type...
bsd-3-clause
kramwens/order_bot
venv/lib/python2.7/site-packages/requests/packages/chardet/sjisprober.py
1777
3764
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
GoogleCloudPlatform/python-docs-samples
composer/airflow_1_samples/simple.py
1
2689
# 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 or agreed to in writing, ...
apache-2.0
riseofthetigers/letsencrypt
letsencrypt/plugins/common.py
16
7005
"""Plugin common functions.""" import os import pkg_resources import re import shutil import tempfile import zope.interface from acme.jose import util as jose_util from letsencrypt import constants from letsencrypt import interfaces from letsencrypt import le_util def option_namespace(name): """ArgumentParser ...
apache-2.0
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/OpenGL/raw/GLE/__init__.py
4
12157
# -*- coding: iso-8859-1 -*- """Raw (C-style) API for OpenGL.GLE Automatically generated by the generateraw script, do not edit! """ from OpenGL.raw.GLE.constants import * from ctypes import * from OpenGL import platform, arrays from OpenGL.constant import Constant from OpenGL import constants as GLconstants GLvoid =...
mit
ProfessionalIT/maxigenios-website
sdk/google_appengine/lib/django-1.4/django/contrib/contenttypes/management.py
81
2670
from django.contrib.contenttypes.models import ContentType from django.db.models import get_apps, get_models, signals from django.utils.encoding import smart_unicode def update_contenttypes(app, created_models, verbosity=2, **kwargs): """ Creates content types for models in the given app, removing any model ...
mit
NorthernSec/CVE-Scan
bin/visualizer.py
2
3935
#!/usr/bin/env python3.3 # -*- coding: utf8 -*- # # Visualizes the enhanced nmap results # Copyright (c) 2015 NorthernSec # Copyright (c) 2015 Pieter-Jan Moreels # This software is licensed under the Original BSD License # Imports import os import sys runpath=os.path.dirname(os.path.realpath(__file__)) sys.path.appen...
bsd-3-clause
Alwnikrotikz/chimerascan
chimerascan/deprecated/filter_transcriptome_multihits_v1.py
6
3886
''' Created on Jun 8, 2012 @author: mkiyer ''' import sys import logging import argparse import os # local imports import chimerascan.pysam as pysam from chimerascan.lib import config from chimerascan.lib.base import imin2 from chimerascan.lib.sam import parse_pe_reads, copy_read from chimerascan.lib.feature import T...
gpl-3.0
javachengwc/hue
desktop/core/ext-py/elementtree/elementtree/TidyTools.py
125
3159
# # ElementTree # $Id: TidyTools.py 1862 2004-06-18 07:31:02Z Fredrik $ # # tools to run the "tidy" command on an HTML or XHTML file, and return # the contents as an XHTML element tree. # # history: # 2002-10-19 fl added to ElementTree library; added getzonebody function # # Copyright (c) 1999-2004 by Fredrik Lundh. ...
apache-2.0
luotao1/Paddle
python/paddle/fluid/tests/unittests/test_queue.py
2
2536
# Copyright (c) 2018 PaddlePaddle Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
xizhao/srclib-javascript
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/ordered_dict.py
2354
10366
# Unmodified from http://code.activestate.com/recipes/576693/ # other than to add MIT license header (as specified on page, but not in code). # Linked from Python documentation here: # http://docs.python.org/2/library/collections.html#collections.OrderedDict # # This should be deleted once Py2.7 is available on all bot...
mit
hexlism/css_platform
sleepyenv/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/sdb/db/key.py
153
2036
# Copyright (c) 2006,2007,2008 Mitch Garnaat http://garnaat.org/ # # 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,...
apache-2.0
dmsimard/ara
ara/clients/http.py
1
4293
# Copyright (c) 2018 Red Hat, Inc. # # This file is part of ARA: Ansible Run Analysis. # # ARA 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 l...
gpl-3.0
youprofit/scikit-image
skimage/io/tests/test_imageio.py
20
2026
import os import os.path import numpy as np from numpy.testing import * from numpy.testing.decorators import skipif from tempfile import NamedTemporaryFile from skimage import data_dir from skimage.io import imread, imsave, use_plugin, reset_plugins try: import imageio as _imageio except ImportError: imageio...
bsd-3-clause
adamjmcgrath/glancydesign
django/views/decorators/csrf.py
227
2240
from django.middleware.csrf import CsrfViewMiddleware from django.utils.decorators import decorator_from_middleware, available_attrs try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. csrf_protect = decorator_from_middleware(CsrfViewMiddlewar...
bsd-3-clause
iulian787/spack
lib/spack/external/py/_log/warning.py
218
2542
import py, sys class DeprecationWarning(DeprecationWarning): def __init__(self, msg, path, lineno): self.msg = msg self.path = path self.lineno = lineno def __repr__(self): return "%s:%d: %s" %(self.path, self.lineno+1, self.msg) def __str__(self): return self.msg d...
lgpl-2.1