repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
minhphung171093/GreenERP
openerp/addons/crm_partner_assign/report/crm_partner_report.py
25
2409
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from openerp.osv import fields,osv from openerp import tools class crm_partner_report_assign(osv.osv): """ CRM Lead Report """ _name = "crm.partner.report.assign" _auto = False _description = "CRM Partne...
gpl-3.0
eltomello/qutebrowser
qutebrowser/config/textwrapper.py
8
1294
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2015 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
gpl-3.0
2014c2g3/w16b_test
static/Brython3.1.1-20150328-091302/Lib/linecache.py
785
3864
"""Cache lines from files. This is intended to read lines from modules imported -- hence if a filename is not found, it will look down the module search path for a file by that name. """ import sys import os import tokenize __all__ = ["getline", "clearcache", "checkcache"] def getline(filename, lineno, module_globa...
agpl-3.0
emon10005/sympy
sympy/polys/euclidtools.py
42
41188
"""Euclidean algorithms, GCDs, LCMs and polynomial remainder sequences. """ from __future__ import print_function, division from sympy.polys.densebasic import ( dup_strip, dmp_raise, dmp_zero, dmp_one, dmp_ground, dmp_one_p, dmp_zero_p, dmp_zeros, dup_degree, dmp_degree, dmp_degree_in, dup_LC,...
bsd-3-clause
lablup/backend.ai-manager
src/ai/backend/manager/models/alembic/versions/e35332f8d23d_add_modified_at_to_users_and_kernels.py
1
3049
"""add_modified_at_to_users_and_kernels Revision ID: e35332f8d23d Revises: da24ff520049 Create Date: 2020-07-01 14:02:11.022032 """ from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import postgresql from sqlalchemy.sql.expression import bindparam from ai.backend.manager.models.base import conv...
lgpl-3.0
tlatzko/spmcluster
.tox/docs/lib/python2.7/site-packages/docutils/examples.py
180
3959
# $Id: examples.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to c...
bsd-2-clause
espadrine/opera
chromium/src/tools/telemetry/telemetry/core/chrome/cros_interface_unittest.py
29
6041
# 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. # TODO(nduca): Rewrite what some of these tests to use mocks instead of # actually talking to the device. This would improve our coverage quite # a bit. ...
bsd-3-clause
AndroidOpenDevelopment/android_external_chromium_org
tools/valgrind/scan-build.py
103
6714
#!/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 argparse import errno import os import re import sys import urllib import urllib2 # Where all the data lives. ROOT_URL = "h...
bsd-3-clause
psci2195/espresso-ffans
samples/lb_profile.py
1
2856
# Copyright (C) 2010-2019 The ESPResSo project # # This file is part of ESPResSo. # # ESPResSo 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 v...
gpl-3.0
patricmutwiri/pombola
pombola/core/migrations/0033_auto__add_field_place_mapit_area.py
4
24803
# encoding: utf-8 import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): # We need mapit setup so that we can link to it depends_on = ( ("mapit", "0004_remove_old_type_columns"), ) def forwards(self, orm): ...
agpl-3.0
arafsheikh/coala
coalib/tests/parsing/GlobbingTest.py
9
11091
""" Tests Globbing and related functions Test Files are local and permanent and organized as follows: GlobTestDir ├── SubDir1 │ ├── File11.py │ └── File12.py │ SubDir2 │ ├── File(with)parentheses.txt │ └── File[with]brackets.txt ├── File1.x ├── File2.y └── File3.z """ import os import unittest from coalib.pa...
agpl-3.0
dparnell/rethinkdb
test/rql_test/connections/http_support/werkzeug/useragents.py
145
5300
# -*- coding: utf-8 -*- """ werkzeug.useragents ~~~~~~~~~~~~~~~~~~~ This module provides a helper to inspect user agent strings. This module is far from complete but should work for most of the currently available browsers. :copyright: (c) 2014 by the Werkzeug Team, see AUTHORS for more deta...
agpl-3.0
m4734/mysql_pio
boost_1_59_0/tools/boostbook/setup_boostbook.py
42
11819
# Copyright (c) 2002 Douglas Gregor <doug.gregor -at- gmail.com> # # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # This is a rewrite of setup_boostbook.sh in Python # It will work on Posix and Windows sys...
gpl-2.0
janhahne/nest-simulator
testsuite/regressiontests/issue-779-1016.py
4
1637
# -*- coding: utf-8 -*- # # issue-779-1016.py # # This file is part of NEST. # # Copyright (C) 2004 The NEST Initiative # # NEST 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,...
gpl-2.0
tersmitten/ansible
test/units/modules/storage/netapp/test_na_ontap_igroup_initiator.py
22
7224
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit test template for ONTAP Ansible module ''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch, Mock from ans...
gpl-3.0
wadobo/GECO
src/gecoc/keepass/slowaes.py
2
25814
#!/usr/bin/python # # aes.py: implements AES - Advanced Encryption Standard # from the SlowAES project, http://code.google.com/p/slowaes/ # # Copyright (c) 2008 Josh Davis ( http://www.josh-davis.org ), # Alex Martelli ( http://www.aleax.it ) # # Ported from C code written by Laurent Haan ( http://www.prog...
gpl-3.0
mahak/ansible
lib/ansible/plugins/callback/oneline.py
29
3528
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type DOCUMENTATION = ''' ...
gpl-3.0
anryko/ansible
lib/ansible/modules/cloud/misc/proxmox_kvm.py
9
45012
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Abdoul Bah (@helldorado) <bahabdoul at gmail.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'me...
gpl-3.0
openaps/openaps
openaps/vendors/units.py
1
2534
""" Units - units tool for openaps """ from openaps.uses.use import Use from openaps.uses.registry import Registry from openaps.glucose.convert import Convert as GlucoseConvert import json import argparse def set_config (args, device): return device def display_device (device): return '' use = Registry( ) ...
mit
resmo/ansible
lib/ansible/modules/cloud/vmware/vmware_evc_mode.py
31
8204
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2019, Michael Tipton <mike () ibeta.org> # 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'...
gpl-3.0
henriquegemignani/randovania
randovania/game_connection/nintendont_backend.py
1
10056
import asyncio import dataclasses import struct from asyncio import StreamReader, StreamWriter from typing import List, Optional, Dict from randovania.game_connection.backend_choice import GameBackendChoice from randovania.game_connection.connection_backend import ConnectionBackend, MemoryOperation, MemoryOperationExc...
gpl-3.0
yorvic/.vim
bundle/python-mode/pylibs/rope/base/builtins.py
27
24713
"""This module trys to support builtin types and functions.""" import inspect import rope.base.evaluate from rope.base import pynames, pyobjects, arguments, utils, ast class BuiltinModule(pyobjects.AbstractModule): def __init__(self, name, pycore=None, initial={}): super(BuiltinModule, self).__init__() ...
gpl-3.0
Chilledheart/vbox
src/VBox/Additions/common/crOpenGL/entrypoints.py
22
7807
# Copyright (c) 2001, Stanford University # All rights reserved. # # See the file LICENSE.txt for information on redistributing this software. """ This module generates C entrypoints for all the OpenGL functions and the special Chromium meta/glue functions. """ import sys import apiutil def GenerateEntrypoints(h...
gpl-2.0
iceman1989/Check_mk
web/htdocs/htmllib.py
1
58082
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
gpl-2.0
jalexvig/tensorflow
tensorflow/python/platform/googletest.py
29
9938
# 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
Jajcus/pyxmpp
pyxmpp/objects.py
1
6158
# # (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License Version # 2.1 as published by the Free Software Foundation. # # This program is distributed in the hope that it will be u...
lgpl-2.1
h3llrais3r/SickRage
lib/requests/utils.py
17
27595
# -*- coding: utf-8 -*- """ requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. """ import cgi import codecs import collections import contextlib import io import os import platform import re import socket import struct imp...
gpl-3.0
josuebrunel/myemacs
python-libs/rope/base/simplify.py
115
1692
"""A module to ease code analysis This module is here to help source code analysis. """ import re from rope.base import codeanalyze, utils @utils.cached(7) def real_code(source): """Simplify `source` for analysis It replaces: * comments with spaces * strs with a new str filled with spaces * im...
gpl-3.0
mattcaldwell/boto
tests/db/test_lists.py
136
3474
# Copyright (c) 2010 Chris Moyer http://coredumped.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, modify, ...
mit
vortechs2000/python-bugzilla
setup.py
3
5655
#!/usr/bin/env python from __future__ import print_function import glob import os import sys import unittest from distutils.core import Command from setuptools import setup def get_version(): f = open("bugzilla/apiversion.py") for line in f: if line.startswith('version = '): return eval...
gpl-2.0
takis/odoo
addons/portal_sale/res_config.py
445
1479
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of ...
agpl-3.0
WorldMG/production-email
lib/werkzeug/local.py
310
14094
# -*- coding: utf-8 -*- """ werkzeug.local ~~~~~~~~~~~~~~ This module implements context-local objects. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from functools import update_wrapper from werkzeug.wsgi import ClosingIt...
apache-2.0
ahmedaljazzar/edx-platform
lms/djangoapps/bulk_email/migrations/0005_move_target_data.py
49
1907
# -*- coding: utf- from __future__ import unicode_literals from django.db import migrations, models from django.db.utils import DatabaseError from bulk_email.models import EMAIL_TARGETS, SEND_TO_MYSELF def to_option_to_targets(apps, schema_editor): CourseEmail = apps.get_model("bulk_email", "CourseEmail") Tar...
agpl-3.0
40223119/w16b_test
static/Brython3.1.1-20150328-091302/Lib/_threading_local.py
923
7410
"""Thread-local objects. (Note that this module provides a Python version of the threading.local class. Depending on the version of Python you're using, there may be a faster one available. You should always import the `local` class from `threading`.) Thread-local objects support the management of thread-local d...
gpl-3.0
bjzhang/xen
tools/python/xen/xend/XendAPIVersion.py
49
1064
#============================================================================ # This library is free software; you can redistribute it and/or # modify it under the terms of version 2.1 of the GNU Lesser General Public # License as published by the Free Software Foundation. # # This library is distributed in the hope th...
gpl-2.0
samuelhavron/heroku-buildpack-python
Python-3.4.3/Lib/io.py
165
3395
"""The io module provides the Python interfaces to stream handling. The builtin open function is defined in this module. At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; impl...
mit
emersonsoftware/ansiblefork
lib/ansible/modules/cloud/ovirt/ovirt_host_networks.py
13
13914
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (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 #...
gpl-3.0
eric011/git-repo
error.py
28
3107
# # 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
tere-valdivia/icy_tower_tarea
ControladorPlataforma.py
1
1051
#!/usr/bin/env python2 # -*- coding: utf-8 -*- """ Created on Sat Oct 14 15:26:23 2017 @author: terevaldivia """ import os from CC3501Utils_personal import * import numpy as np from Plataforma import * class ControladorPlataforma: def __init__(self): self.lista = [] self.generar() def gen...
mit
QijunPan/ansible
lib/ansible/plugins/lookup/redis_kv.py
251
2433
# (c) 2012, Jan-Piet Mens <jpmens(at)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) any later ver...
gpl-3.0
BonexGu/Blik2D-SDK
Blik2D/addon/tensorflow-1.2.1_for_blik/tensorflow/contrib/imperative/imperative_graph.py
65
18616
# 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...
mit
maniteja123/sympy
examples/advanced/fem.py
107
5572
#!/usr/bin/env python """FEM library Demonstrates some simple finite element definitions, and computes a mass matrix $ python fem.py [ 1/60, 0, -1/360, 0, -1/90, -1/360] [ 0, 4/45, 0, 2/45, 2/45, -1/90] [-1/360, 0, 1/60, -1/90, 0, -1/360] [ 0, 2/45, -1/90, 4/45, 2/45, 0] ...
bsd-3-clause
roadmapper/ansible
test/units/modules/network/netvisor/test_pn_ipv6security_raguard_vlan.py
23
2558
# Copyright: (c) 2018, Pluribus Networks # 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 from units.compat.mock import patch from ansible.modules.network.netvisor import pn_ipv6security...
gpl-3.0
Dhivyap/ansible
test/units/plugins/callback/test_callback.py
6
14152
# (c) 2012-2014, Chris Meyers <chris.meyers.fsu@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
chessco/cursus
modules/mapreduce/mapreduce_module.py
4
6436
# 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 ...
apache-2.0
pavelchristof/gomoku-ai
tensorflow/contrib/nccl/python/ops/nccl_ops_test.py
7
5857
# 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
jinankjain/barrelfish
tools/grader/machines/pandaboard.py
2
3296
########################################################################## # Copyright (c) 2014-2016 ETH Zurich. # All rights reserved. # # This file is distributed under the terms in the attached LICENSE file. # If you do not find this file, copies can be found by writing to: # ETH Zurich D-INFK, Universitaetstr 6, CH...
mit
cirrusone/phantom2
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/newcommitbot.py
119
7612
# Copyright (c) 2012 Google Inc. All rights reserved. # Copyright (c) 2013 Apple Inc. 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...
bsd-3-clause
coin-or/Dip
Dip/src/dippy/examples/bpp/mdbin_pack_func.py
1
2645
from builtins import range from builtins import object import sys from pulp import LpVariable, lpSum, LpBinary, LpStatusOptimal try: import path except ImportError: pass try: import dippy except ImportError: try: import src.dippy as dippy except ImportError: import coinor....
epl-1.0
M4sse/chromium.src
third_party/closure_linter/closure_linter/checkerbase.py
104
6771
#!/usr/bin/env python # # Copyright 2008 The Closure Linter Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 #...
bsd-3-clause
TaddyLab/gensim
gensim/models/ldamodel.py
4
41600
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2011 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html # # Parts of the LDA inference code come from Dr. Hoffman's `onlineldavb.py` script, # (C) 2010 Matthew D. Hoffman, GNU GPL 3.0 """ **...
gpl-3.0
40223101/2015final2
static/Brython3.1.3-20150514-095342/Lib/abc.py
765
8057
# Copyright 2007 Google, Inc. All Rights Reserved. # Licensed to PSF under a Contributor Agreement. """Abstract Base Classes (ABCs) according to PEP 3119.""" from _weakrefset import WeakSet def abstractmethod(funcobj): """A decorator indicating abstract methods. Requires that the metaclass is ABCMeta or der...
gpl-3.0
Elettronik/SickRage
lib/pyasn1/type/constraint.py
382
7279
# # ASN.1 subtype constraints classes. # # Constraints are relatively rare, but every ASN1 object # is doing checks all the time for whether they have any # constraints and whether they are applicable to the object. # # What we're going to do is define objects/functions that # can be called unconditionally ...
gpl-3.0
Deepakkothandan/ansible
lib/ansible/module_utils/bigswitch_utils.py
187
3354
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
adamgreenhall/scikit-learn
examples/linear_model/plot_logistic_path.py
349
1195
#!/usr/bin/env python """ ================================= Path with L1- Logistic Regression ================================= Computes path on IRIS dataset. """ print(__doc__) # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD 3 clause from datetime import datetime import numpy as np import...
bsd-3-clause
fperez/sympy
sympy/series/order.py
1
8346
from sympy.core.basic import Basic, S, C, sympify from sympy.core import oo, Rational, Pow from sympy.core.cache import cacheit class Order(Basic): """ Represents O(f(x)) at the point x = 0. Definition ========== g(x) = O(f(x)) as x->0 if and only if |g(x)|<=M|f(x)| near x=0 ...
bsd-3-clause
ananthonline/grpc
src/python/grpcio/grpc/framework/interfaces/links/links.py
5
6234
# Copyright 2015, Google Inc. # 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 list of conditions and the f...
bsd-3-clause
schlueter/ansible
lib/ansible/plugins/cliconf/nxos.py
14
2700
# # (c) 2017 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 d...
gpl-3.0
Deepakkothandan/ansible
lib/ansible/modules/network/netvisor/pn_vrouterlbif.py
29
10152
#!/usr/bin/python """ PN CLI vrouter-loopback-interface-add/remove """ # # 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 yo...
gpl-3.0
h2oai/h2o-3
h2o-py/setup.py
2
3346
# -*- encoding: utf-8 -*- from setuptools import setup, find_packages from codecs import open import os import sys import shutil here = os.path.abspath(os.path.dirname(__file__)) # Get the long description from the relevant file with open(os.path.join(here, 'DESCRIPTION.rst'), encoding='utf-8') as f: long_descrip...
apache-2.0
Serag8/Bachelor
google_appengine/lib/django-1.4/django/contrib/formtools/tests/wizard/forms.py
90
7471
from django import forms, http from django.conf import settings from django.test import TestCase from django.template.response import TemplateResponse from django.utils.importlib import import_module from django.contrib.auth.models import User from django.contrib.formtools.wizard.views import (WizardView, ...
mit
Belxjander/Kirito
Python-3.5.0-main/Lib/csv.py
14
16128
""" csv.py - read/write/investigate CSV files """ import re from _csv import Error, __version__, writer, reader, register_dialect, \ unregister_dialect, get_dialect, list_dialects, \ field_size_limit, \ QUOTE_MINIMAL, QUOTE_ALL, QUOTE_NONNUMERIC, QUOTE_NONE, \ ...
gpl-3.0
gxx/lettuce
tests/integration/lib/Django-1.2.5/django/contrib/localflavor/uy/forms.py
310
2083
# -*- coding: utf-8 -*- """ UY-specific form helpers. """ import re from django.core.validators import EMPTY_VALUES from django.forms.fields import Select, RegexField from django.forms import ValidationError from django.utils.translation import ugettext_lazy as _ from django.contrib.localflavor.uy.util import get_vali...
gpl-3.0
GheRivero/ansible
lib/ansible/module_utils/facts/network/aix.py
143
5982
# 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
fredkingham/blog-of-fred
django/db/models/loading.py
91
9755
"Utilities for loading models and the modules that contain them." from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils.datastructures import SortedDict from django.utils.importlib import import_module from django.utils.module_loading import module_has_submodule im...
bsd-3-clause
akretion/stock-logistics-workflow
stock_ownership_by_move/model/picking.py
17
2156
# -*- coding: utf-8 -*- # Author: Leonardo Pistone # Copyright 2015 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or...
agpl-3.0
Serg09/socorro
socorro/unittest/external/postgresql/test_crash_adu_by_build_signature.py
11
7059
# This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. import datetime from nose.plugins.attrib import attr from nose.tools import eq_, ok_ from socorro.lib import datetimeu...
mpl-2.0
alikins/ansible
lib/ansible/modules/network/avi/avi_gslbgeodbprofile.py
15
4195
#!/usr/bin/python # # @author: Gaurav Rastogi (grastogi@avinetworks.com) # Eric Anderson (eanderson@avinetworks.com) # module_check: supported # Avi Version: 17.1.2 # # Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses...
gpl-3.0
lkorigin/laniakea
src/mirk/mirk/matrix_pub.py
1
8838
# -*- coding: utf-8 -*- # # Copyright (C) 2019-2020 Matthias Klumpp <matthias@tenstral.net> # # Licensed under the GNU Lesser General Public License Version 3 # # This program 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...
gpl-3.0
sporto/rails_go_to_spec
rails_go_to_spec.py
1
1760
import sublime, sublime_plugin, os import RailsGoToSpec.resolver import re class RailsGoToSpecCommand(sublime_plugin.WindowCommand): def run(self): sublime.status_message('Running Rails Go To Spec') win = self.window view = win.active_view() current_file = view.file_name() # remove the root dir root_pat...
mit
MichaelNedzelsky/intellij-community
python/lib/Lib/site-packages/django/contrib/gis/geos/linestring.py
411
5568
from django.contrib.gis.geos.base import numpy from django.contrib.gis.geos.coordseq import GEOSCoordSeq from django.contrib.gis.geos.error import GEOSException from django.contrib.gis.geos.geometry import GEOSGeometry from django.contrib.gis.geos.point import Point from django.contrib.gis.geos import prototypes as cap...
apache-2.0
ClaudeZoo/volatility
volatility/plugins/mac/dump_map.py
44
2610
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # # This file is part of Volatility. # # Volatility 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 o...
gpl-2.0
bohlian/erpnext
erpnext/patches/v7_0/make_guardian.py
31
1033
from __future__ import unicode_literals import frappe def execute(): if frappe.db.exists("DocType", "Student"): student_table_cols = frappe.db.get_table_columns("Student") if "father_name" in student_table_cols: frappe.reload_doc("schools", "doctype", "student") frappe.reload_doc("schools", "doctype", "guar...
gpl-3.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/django/core/paginator.py
8
5394
import collections import warnings from math import ceil from django.utils import six from django.utils.functional import cached_property from django.utils.translation import ugettext_lazy as _ class UnorderedObjectListWarning(RuntimeWarning): pass class InvalidPage(Exception): pass class PageNotAnIntege...
gpl-3.0
ghchinoy/tensorflow
tensorflow/examples/saved_model/integration_tests/export_mnist_cnn.py
3
8104
# Copyright 2019 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
aESeguridad/GERE
venv/lib/python2.7/site-packages/cairocffi/ffi_build.py
3
3638
# coding: utf8 """ cairocffi.ffi_build ~~~~~~~~~~~~~~~~~~~ Build the cffi bindings :copyright: Copyright 2013 by Simon Sapin :license: BSD, see LICENSE for details. """ import os import sys from cffi import FFI # Path hack to import constants when this file is exec'd by setuptools this_file = o...
gpl-3.0
amy12xx/keras
examples/mnist_irnn.py
70
3041
from __future__ import absolute_import from __future__ import print_function import numpy as np np.random.seed(1337) # for reproducibility from keras.datasets import mnist from keras.models import Sequential from keras.layers.core import Dense, Activation from keras.initializations import normal, identity from keras....
mit
tlksio/tlksio
env/lib/python3.4/site-packages/logilab/common/ureports/docbook_writer.py
93
5706
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mit
php-coder/origin
vendor/github.com/google/certificate-transparency/python/ct/crypto/verify_test.py
22
21693
#!/usr/bin/env python import unittest import base64 import gflags import os import sys from ct.crypto import cert from ct.crypto import error from ct.crypto import pem from ct.crypto import verify from ct.proto import client_pb2 from ct.serialization import tls_message import mock FLAGS = gflags.FLAGS gflags.DEFINE...
apache-2.0
tanglei528/nova
nova/api/openstack/compute/contrib/admin_actions.py
2
17255
# Copyright 2011 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 a...
apache-2.0
Drooids/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/tiny_socket.py
386
3270
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
Praveen-1987/devstack-Quantumleap
smc/examples/Python/EX7/telephone.py
3
8590
#!/usr/bin/env python # -*- tab-width: 4; -*- # # The contents of this file are subject to the Mozilla Public # License Version 1.1 (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.mozilla.org/MPL/ # # Software distributed under th...
apache-2.0
semonte/intellij-community
python/lib/Lib/encodings/iso8859_6.py
593
11089
""" Python Character Mapping Codec iso8859_6 generated from 'MAPPINGS/ISO8859/8859-6.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
apache-2.0
smartfile/django-1.4
django/contrib/gis/tests/relatedapp/tests.py
198
14731
from __future__ import absolute_import from datetime import date from django.contrib.gis.geos import GEOSGeometry, Point, MultiPoint from django.contrib.gis.db.models import Collect, Count, Extent, F, Union from django.contrib.gis.geometry.backend import Geometry from django.contrib.gis.tests.utils import mysql, orac...
bsd-3-clause
Danisan/odoo-1
addons/stock_dropshipping/wizard/__init__.py
313
1077
# -*- 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
ChrisAntaki/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/efl_unittest.py
117
2573
# Copyright (C) 2011 ProFUSION Embedded Systems. All rights reserved. # Copyright (C) 2011 Samsung Electronics. 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 c...
bsd-3-clause
pichuang/ryu
ryu/services/protocols/bgp/bmp.py
10
9234
# Copyright (C) 2014 Nippon Telegraph and Telephone Corporation. # # 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 appli...
apache-2.0
chrismoulton/Varnish-Cache
lib/libvcc/generate.py
4
28463
#!/usr/bin/env python3 #- # Copyright (c) 2006 Verdens Gang AS # Copyright (c) 2006-2015 Varnish Software AS # All rights reserved. # # Author: Poul-Henning Kamp <phk@phk.freebsd.dk> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditio...
bsd-2-clause
zozo123/buildbot
master/buildbot/test/fake/fakemaster.py
1
5314
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-3.0
philsch/ansible
lib/ansible/modules/cloud/amazon/aws_api_gateway.py
33
12101
#!/usr/bin/python # 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...
gpl-3.0
jamielennox/glance_store
tools/install_venv.py
5
2421
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this...
apache-2.0
ChanduERP/odoo
odoo.py
257
5618
#!/usr/bin/env python #---------------------------------------------------------- # odoo cli # # To install your odoo development environement type: # # wget -O- https://raw.githubusercontent.com/odoo/odoo/8.0/odoo.py | python # # The setup_* subcommands used to boostrap odoo are defined here inline and may # only depe...
agpl-3.0
ds-hwang/chromium-crosswalk
tools/perf/benchmarks/benchmark_unittest.py
9
3252
# 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. """For all the benchmarks that set options, test that the options are valid.""" from collections import defaultdict import os import unittest from core imp...
bsd-3-clause
markeTIC/OCB
addons/website_membership/controllers/main.py
64
9496
# -*- coding: utf-8 -*- from openerp import SUPERUSER_ID from openerp.addons.web import http from openerp.addons.web.http import request from openerp.addons.website.models.website import unslug from openerp.tools import DEFAULT_SERVER_DATE_FORMAT from openerp.tools.translate import _ import time import werkzeug.urls ...
agpl-3.0
shownomercy/django
tests/admin_checks/models.py
98
1724
""" Tests of ModelAdmin system checks logic. """ from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.encoding import python_2_unicode_compatible class Album(models.Model): title = models.CharFie...
bsd-3-clause
windoze/scintilla.old
test/simpleTests.py
6
44032
# -*- coding: utf-8 -*- from __future__ import with_statement import ctypes, os, unittest import XiteWin class TestSimple(unittest.TestCase): def setUp(self): self.xite = XiteWin.xiteFrame self.ed = self.xite.ed self.ed.ClearAll() self.ed.EmptyUndoBuffer() def testLength(self): self.assertEquals(self....
isc
hackatbrown/2015.hackatbrown.org
hack-at-brown-2015/twilio/rest/exceptions.py
7
2545
# -*- coding: utf-8 -*- import sys from six import u # Backwards compatibility. from ..version import __version__, __version_info__ from ..exceptions import TwilioException class TwilioRestException(TwilioException): """ A generic 400 or 500 level exception from the Twilio API :param int status: the HTTP ...
mit
tjsavage/djangononrel-starter
django/template/loaders/app_directories.py
16
2759
""" Wrapper for loading templates from "templates" directories in INSTALLED_APPS packages. """ import os import sys from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.template import TemplateDoesNotExist from django.template.loader import BaseLoader from django.utils....
bsd-3-clause
Pegase745/sqlalchemy-datatables
examples/pyramid_tut/pyramid_tut/__init__.py
1
1355
from datetime import date from pyramid.config import Configurator from pyramid.renderers import JSON from sqlalchemy import engine_from_config from .models import Base, DBSession def date_adapter(obj, request): return str(obj) def main(global_config, **settings): """Return a Pyramid WSGI application.""" ...
mit
SoftwareMaven/django
tests/gis_tests/test_geoforms.py
292
14830
from unittest import skipUnless from django.contrib.gis import forms from django.contrib.gis.gdal import HAS_GDAL from django.contrib.gis.geos import GEOSGeometry from django.forms import ValidationError from django.test import SimpleTestCase, skipUnlessDBFeature from django.utils import six from django.utils.html imp...
bsd-3-clause