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
vrsys/avango
avango-blender/blender-json-loader/application.py
2
3250
from examples_common.GuaVE import GuaVE import avango.gua class Application: def __init__(self): self.viewer = avango.gua.nodes.Viewer(Name='Viewer') self.scenegraph = avango.gua.nodes.SceneGraph(Name='SceneGraph') self.window = None self.screen = None self.camera = None ...
lgpl-3.0
SaikWolf/gnuradio
gr-filter/python/filter/qa_fractional_interpolator.py
47
3147
#!/usr/bin/env python # # Copyright 2007,2010,2012,2013 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 ...
gpl-3.0
rossweinstein/Evolutionary-Computing-Python
src/main/Main.py
1
1131
from src.ecSystem.ECSystem import ECSystem from src.ecSystem.ECSystemParameters import ECSystemParameters # Where we actually run our EC System params = ECSystemParameters() # Governs the number of expressions in each generation params.generation_size = 200 # Governs the length of the expressions in the initial pop...
mit
camptocamp/odoo
openerp/report/render/simple.py
117
3155
# -*- 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
FCP-INDI/nipype
nipype/interfaces/freesurfer/tests/test_auto_RobustTemplate.py
5
1958
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from ....testing import assert_equal from ..longitudinal import RobustTemplate def test_RobustTemplate_inputs(): input_map = dict(args=dict(argstr='%s', ), auto_detect_sensitivity=dict(argstr='--satit', mandatory=True, xor=['outlier_sensitivity...
bsd-3-clause
atyenoria/docker-registry
docker_registry/toolkit.py
18
11250
# -*- coding: utf-8 -*- import base64 import functools import hashlib import logging import os import random import re import string import time import urllib import flask from M2Crypto import RSA import requests from docker_registry.core import compat json = compat.json from . import storage from .lib import confi...
apache-2.0
emsrc/daeso-dutch
test/graph/test_alpinograph.py
1
3993
""" test AlpinoGraph class """ import unittest from daeso_nl.graph.alpinograph import AlpinoGraph class Test_AlpinoGraph(unittest.TestCase): def setUp(self): self.ag = AlpinoGraph(root="0") self.ag.add_node("0", "top", cat="top", tokens="Ik wilde weten of hij echt begr...
gpl-3.0
karrtikr/ete
examples/treeview/random_draw.py
6
3818
import os from ete3 import Tree, faces from ete3.treeview.main import TreeStyle, NodeStyle, random_color import colorsys import random # :::::::::::::: # Layout actions # :::::::::::::: def sphere_map(node): # Creates a random color sphere face that will be floating over nodes bubble = faces.CircleFace(rando...
gpl-3.0
vmarkovtsev/django
tests/gis_tests/geoapp/test_feeds.py
292
4194
from __future__ import unicode_literals from xml.dom import minidom from django.conf import settings from django.contrib.sites.models import Site from django.test import ( TestCase, modify_settings, override_settings, skipUnlessDBFeature, ) from .models import City @modify_settings(INSTALLED_APPS={'append': 'd...
bsd-3-clause
eestay/edx-platform
cms/djangoapps/contentstore/views/tests/test_unit_page.py
222
2775
""" Unit tests for the unit page. """ from contentstore.views.tests.utils import StudioPageTestCase from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import ItemFactory from xmodule.x_module import STUDENT_VIEW class UnitPageTestCase(StudioPageTestCase): """ Unit tes...
agpl-3.0
jlspyaozhongkai/Uter
third_party_build/Python-2.7.9/lib/python2.7/idlelib/StackViewer.py
25
4404
import os import sys import linecache import re import Tkinter as tk from idlelib.TreeWidget import TreeNode, TreeItem, ScrolledCanvas from idlelib.ObjectBrowser import ObjectTreeItem, make_objecttreeitem from idlelib.PyShell import PyShellFileList def StackBrowser(root, flist=None, tb=None, top=None): if top is ...
gpl-3.0
mmckinst/pykickstart
pykickstart/commands/sshkey.py
3
3231
# # Brian C. Lane <bcl@redhat.com> # # Copyright 2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, modify, # copy, or redistribute it subject to the terms and conditions of the GNU # General Public License v.2. This program is distributed in the hope that it # will be useful,...
gpl-2.0
kasioumis/invenio
invenio/version.py
8
3488
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2014, 2015 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 option) any...
gpl-2.0
Azure/azure-sdk-for-python
sdk/formrecognizer/azure-ai-formrecognizer/tests/test_content_type.py
1
2199
# coding=utf-8 # ------------------------------------ # Copyright (c) Microsoft Corporation. # Licensed under the MIT License. # ------------------------------------ import pytest from azure.ai.formrecognizer._helpers import get_content_type from testcase import FormRecognizerTest class TestContentType(FormRecognize...
mit
whix/tablib
tablib/packages/xlwt/Workbook.py
57
20514
# -*- coding: windows-1252 -*- ''' Record Order in BIFF8 Workbook Globals Substream BOF Type = workbook globals Interface Header MMS Interface End WRITEACCESS CODEPAGE DSF TABID FNGROUPCOUNT Workbook Protection Block WINDOWPROTECT PRO...
mit
openbaoz/titanium_mobile
support/common/css/ply/lex.py
37
40747
# ----------------------------------------------------------------------------- # ply: lex.py # # Copyright (C) 2001-2009, # David M. Beazley (Dabeaz LLC) # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions ar...
apache-2.0
tung18tht/ICDAR-2017-Post-OCR-Correction
errors_detection/find_suspicious_eng_words.py
1
1754
import os, linecache, re, json work_directory_path = os.path.dirname(os.path.realpath(__file__)) eng_words_file = open(work_directory_path + "/eng_words.txt", "rU") eng_words = set() for word in eng_words_file: eng_words |= {word.rstrip()} data_directory_path = work_directory_path + "/ICDAR2017_datasetPostOCR_Eval...
mit
ahmetabdi/SickRage
lib/hachoir_metadata/file_system.py
90
1107
from lib.hachoir_metadata.metadata import RootMetadata, registerExtractor from lib.hachoir_metadata.safe import fault_tolerant from lib.hachoir_parser.file_system import ISO9660 from datetime import datetime class ISO9660_Metadata(RootMetadata): def extract(self, iso): desc = iso['volume[0]/content'] ...
gpl-3.0
diagramsoftware/odoo
addons/event/res_partner.py
329
1228
# -*- 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
jacques/joyent-connector
test/feedvalidator/feedvalidator/feed.py
2
3891
"""$Id: feed.py 582 2006-03-22 20:20:22Z rubys $""" __author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>" __version__ = "$Revision: 582 $" __date__ = "$Date: 2006-03-23 08:20:22 +1200 (Thu, 23 Mar 2006) $" __copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim" __license...
gpl-2.0
kalahbrown/HueBigSQL
desktop/core/ext-py/guppy-0.1.10/guppy/gsl/Latex.py
37
23407
#._cv_part guppy.gsl.Latex class Doc2Latex: sizes = ('tiny', 'scriptsize', 'footnotesize', 'small', 'normalsize', 'large', 'Large', 'LARGE', 'huge', 'Huge') def __init__(self, mod, doc, node): self.mod = mod self.doc = doc self.encoder = Encoder(mod) self.encode = self.encoder.encode self.node = no...
apache-2.0
evanma92/routeh
flask/lib/python2.7/site-packages/pbr/tests/test_hooks.py
64
4039
# Copyright (c) 2013 Hewlett-Packard Development Company, L.P. # # 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...
bsd-3-clause
tdtrask/ansible
lib/ansible/modules/network/cloudengine/ce_bgp_neighbor_af.py
22
109157
#!/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 distribut...
gpl-3.0
kevin-intel/scikit-learn
sklearn/feature_selection/tests/test_rfe.py
10
16467
""" Testing Recursive feature elimination """ from operator import attrgetter import pytest import numpy as np from numpy.testing import assert_array_almost_equal, assert_array_equal from scipy import sparse from sklearn.feature_selection import RFE, RFECV from sklearn.datasets import load_iris, make_friedman1 from s...
bsd-3-clause
Mako-kun/mangaki
mangaki/mangaki/utils/svd.py
2
5410
from django.contrib.auth.models import User from mangaki.models import Rating, Work, Recommendation from mangaki.utils.chrono import Chrono from mangaki.utils.values import rating_values from scipy.sparse import lil_matrix from sklearn.utils.extmath import randomized_svd import numpy as np from django.db import connect...
agpl-3.0
mikelum/pyspeckit
pyspeckit/mpfit/mpfitexpr.py
11
2384
""" Copyright (C) 2009 Sergey Koposov 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 di...
mit
rationalAgent/edx-platform-custom
lms/djangoapps/foldit/models.py
65
5129
import logging from django.contrib.auth.models import User from django.db import models log = logging.getLogger(__name__) class Score(models.Model): """ This model stores the scores of different users on FoldIt problems. """ user = models.ForeignKey(User, db_index=True, ...
agpl-3.0
MartialD/hyperspy
hyperspy/drawing/tiles.py
4
2899
# -*- coding: utf-8 -*- # Copyright 2007-2011 The HyperSpy developers # # This file is part of HyperSpy. # # HyperSpy 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...
gpl-3.0
orgito/ansible
lib/ansible/modules/windows/win_shortcut.py
52
4021
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Dag Wieers (@dagwieers) <dag@wieers.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supporte...
gpl-3.0
zhukaixy/kbengine
kbe/src/lib/python/Tools/freeze/makefreeze.py
37
2706
import marshal import bkfile # Write a file containing frozen code for the modules in the dictionary. header = """ #include "Python.h" static struct _frozen _PyImport_FrozenModules[] = { """ trailer = """\ {0, 0, 0} /* sentinel */ }; """ # if __debug__ == 0 (i.e. -O option given), set Py_OptimizeFlag in frozen...
lgpl-3.0
psdh/servo
tests/wpt/harness/wptrunner/executors/executorservodriver.py
21
8682
# 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 json import os import socket import threading import time import traceback from .base import (Protocol, ...
mpl-2.0
loli/medpy
doc/numpydoc/numpydoc/comment_eater.py
1
5357
import sys if sys.version_info[0] >= 3: from io import StringIO else: from io import StringIO import compiler import inspect import textwrap import tokenize from .compiler_unparse import unparse class Comment(object): """ A comment block. """ is_comment = True def __init__(self, start_line...
gpl-3.0
jeremiahyan/odoo
addons/crm_iap_lead/models/crm_iap_lead_mining_request.py
1
15651
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. import logging from odoo import api, fields, models, _ from odoo.addons.iap.tools import iap_tools from odoo.exceptions import UserError _logger = logging.getLogger(__name__) DEFAULT_ENDPOINT = 'https://iap-services.o...
gpl-3.0
ogajduse/spacewalk
client/debian/packages-already-in-debian/rhn-client-tools/test/testutils.py
4
9439
#!/usr/bin/python import os,sys import getopt import shutil import glob DBPATH="/tmp/testdb" DBCACHEPATH="/tmp/testdbcaches/" UP2DATE_COMMAND="up2date --justdb --dbpath $DBPATH" DATAPATH="/tmp/datadir" TOPDIR="../" DBDIR="%s/testdbs" % "/usr/src/rhn/test/up2date/depsolve/" PKGDIR="%s/testpackages" % "/usr/src/rhn/te...
gpl-2.0
dcroc16/skunk_works
google_appengine/lib/django-0.96/django/utils/translation/trans_null.py
32
1167
# These are versions of the functions in django.utils.translation.trans_real # that don't actually do anything. This is purely for performance, so that # settings.USE_I18N = False can use this module rather than trans_real.py. from django.conf import settings def ngettext(singular, plural, number): if number == 1...
mit
bstrebel/PyUtils
test/test_options.py
1
2293
import os, sys, logging, logging.config, pyutils from pyutils import Options, LogAdapter, get_logger, log_level def main(): from ConfigParser import ConfigParser from argparse import ArgumentParser options = { 'option': 'OPTION', 'secrets': {'token': 'secret'}, 'loglevel': 'INFO' ...
gpl-2.0
I-TECH-UW/mwachx
contacts/migrations_old/0015_auto_20160419_1803.py
2
1652
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contacts', '0014_loss_date'), ] operations = [ migrations.AlterField( model_name='contact', name='co...
apache-2.0
Scemoon/lpts
site-packages/pychart/afm/Helvetica_Oblique.py
12
1496
# AFM font Helvetica-Oblique (path: /usr/share/fonts/afms/adobe/phvro8a.afm). # Derived from Ghostscript distribution. # Go to www.cs.wisc.edu/~ghost to get the Ghostcript source code. import dir dir.afm["Helvetica-Oblique"] = (500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 50...
gpl-2.0
huongttlan/statsmodels
statsmodels/sandbox/formula.py
27
22903
""" Provides the basic classes needed to specify statistical models. namespace : dictionary mapping from names to data, used to associate data to a formula or term """ from statsmodels.compat.python import (iterkeys, lrange, callable, string_types, itervalues, range) import copy ...
bsd-3-clause
freeJim/monserver
tools/examples/python/mongrel2/config/model.py
92
7490
from storm.locals import * database = None store = None TABLES = ["server", "host", "route", "proxy", "directory", "handler", "setting"] def load_db(spec): global database global store if not store: database = create_database(spec) store = Store(database) return st...
bsd-3-clause
Rocamadour7/ml_tutorial
05. Clustering/titanic-data-example.py
1
1721
import numpy as np from sklearn.cluster import KMeans from sklearn import preprocessing import pandas as pd ''' Pclass Passenger Class (1 = 1st; 2 = 2nd; 3 = 3rd) survival Survival (0 = No; 1 = Yes) name Name sex Sex age Age sibsp Number of Siblings/Spouses Aboard parch Number of Parents/Children Aboard ticket Ticket ...
mit
scudre/alarm-central-station-receiver
alarm_central_station_receiver/contact_id/callup.py
1
3225
""" Copyright (2018) Chris Scuderi 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, softwar...
apache-2.0
zombi-x/android_kernel_htc_m7
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
google/tangent
tests/test_optimization.py
1
2734
# Copyright 2017 Google 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 wri...
apache-2.0
gavioto/rethinkdb
external/v8_3.30.33.16/buildtools/clang_format/script/clang-format-sublime.py
164
2440
# This file is a minimal clang-format sublime-integration. To install: # - Change 'binary' if clang-format is not on the path (see below). # - Put this file into your sublime Packages directory, e.g. on Linux: # ~/.config/sublime-text-2/Packages/User/clang-format-sublime.py # - Add a key binding: # { "keys": ["...
agpl-3.0
ucbrise/clipper
monitoring/front_end_exporter.py
2
2298
import requests from flatten_json import flatten import itertools import time from prometheus_client import start_http_server from prometheus_client.core import GaugeMetricFamily, REGISTRY import argparse import logging parser = argparse.ArgumentParser( description='Spin up a node exporter for query_frontend.') pa...
apache-2.0
ntonjeta/iidea-Docker
examples/sobel/src/boost_1_63_0/libs/python/config/__init__.py
5
5259
# # Copyright (c) 2016 Stefan Seefeld # All rights reserved. # # 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) from SCons.Variables import * from SCons.Script import AddOption from collections import OrderedDict im...
agpl-3.0
JackDanger/sentry
tests/sentry/web/frontend/test_auth_login.py
6
4389
from __future__ import absolute_import from django.utils.http import urlquote from django.core.urlresolvers import reverse from exam import fixture from sentry.testutils import TestCase from sentry.models import User # TODO(dcramer): need tests for SSO behavior and single org behavior class AuthLoginTest(TestCase)...
bsd-3-clause
huytd/dejavu
dejavu/fingerprint.py
1
6020
import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt from scipy.ndimage.filters import maximum_filter from scipy.ndimage.morphology import (generate_binary_structure, iterate_structure, binary_erosion) import hashlib from operator import itemgetter IDX...
mit
vmanoria/bluemix-hue-filebrowser
hue-3.8.1-bluemix/apps/search/src/search/views.py
4
19985
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
gpl-2.0
bswartz/cinder
cinder/volume/drivers/emc/emc_vmax_provision_v3.py
1
35993
# Copyright (c) 2012 - 2015 EMC Corporation. # 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 # # Unle...
apache-2.0
joel-airspring/Diamond
src/collectors/s3/s3.py
61
2360
# coding=utf-8 """ The S3BucketCollector collects bucket size using boto #### Dependencies * boto (https://github.com/boto/boto) """ import diamond.collector try: import boto boto from boto.s3.connection import S3Connection except ImportError: boto = None class S3BucketCollector(diamond.collecto...
mit
yanchen036/tensorflow
tensorflow/python/framework/versions_test.py
164
2130
# 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
guijomatos/SickRage
sickrage/media/ShowBanner.py
15
1291
# This file is part of SickRage. # # URL: https://www.sickrage.tv # Git: https://github.com/SiCKRAGETV/SickRage.git # # SickRage 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,...
gpl-3.0
samdowd/drumm-farm
drumm_env/lib/python2.7/site-packages/setuptools/command/build_clib.py
314
4484
import distutils.command.build_clib as orig from distutils.errors import DistutilsSetupError from distutils import log from setuptools.dep_util import newer_pairwise_group class build_clib(orig.build_clib): """ Override the default build_clib behaviour to do the following: 1. Implement a rudimentary time...
mit
angel511wong/nixysa
third_party/ply-3.1/test/yacc_unused.py
174
1669
# ----------------------------------------------------------------------------- # yacc_unused.py # # A grammar with an unused rule # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex import tok...
apache-2.0
guorendong/iridium-browser-ubuntu
third_party/webpagereplay/proxyshaper_test.py
31
4988
#!/usr/bin/env python # Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
bsd-3-clause
chanchett/ds3_python_sdk_
ds3/ds3.py
1
30418
# Copyright 2014-2015 Spectra Logic Corporation. All Rights Reserved. # Licensed under the Apache License, Version 2.0 (the "License"). You may not use # this file except in compliance with the License. A copy of the License is located at # # http://www.apache.org/licenses/LICENSE-2.0 # # or in the "lic...
apache-2.0
guru-digital/CouchPotatoServer
libs/git/config.py
110
2432
# 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
hynnet/openwrt-mt7620
staging_dir/host/lib/python2.7/_threading_local.py
241
7456
"""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-2.0
gauravbose/digital-menu
digimenu2/build/lib.linux-x86_64-2.7/django/contrib/sessions/models.py
82
2229
from __future__ import unicode_literals from django.db import models from django.utils.encoding import python_2_unicode_compatible from django.utils.translation import ugettext_lazy as _ class SessionManager(models.Manager): use_in_migrations = True def encode(self, session_dict): """ Return...
bsd-3-clause
jimi-c/ansible
test/units/playbook/test_helpers.py
119
19184
# (c) 2016, Adrian Likins <alikins@redhat.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 vers...
gpl-3.0
mdietrichc2c/carrier-delivery
__unported__/delivery_carrier_label_dispatch/wizard/generate_labels.py
2
3670
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Vaucher # Copyright 2013 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 # pub...
agpl-3.0
yasoob/PythonRSSReader
venv/lib/python2.7/site-packages/pip/commands/list.py
269
7251
from __future__ import absolute_import import logging from pip._vendor import pkg_resources from pip.basecommand import Command from pip.exceptions import DistributionNotFound from pip.index import FormatControl, fmt_ctl_formats, PackageFinder, Search from pip.req import InstallRequirement from pip.utils import get_...
mit
pixelgremlins/ztruck
dj/lib/python2.7/site-packages/setuptools/command/alias.py
467
2381
from distutils.errors import DistutilsOptionError from setuptools.command.setopt import edit_config, option_base, config_file def shquote(arg): """Quote an argument for later parsing by shlex.split()""" for c in '"', "'", "\\", "#": if c in arg: return repr(arg) if arg.split() != [arg...
apache-2.0
njmube/erpnext
erpnext/accounts/report/accounts_receivable/accounts_receivable.py
10
11261
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, scrub from frappe.utils import getdate, nowdate, flt, cint class ReceivablePayableReport(object): def __init__(self, filters=None):...
agpl-3.0
beiko-lab/gengis
bin/Lib/email/test/test_email_torture.py
15
3805
# Copyright (C) 2002-2004 Python Software Foundation # # A torture test of the email package. This should not be run as part of the # standard Python test suite since it requires several meg of email messages # collected in the wild. These source messages are not checked into the # Python distro, but are availab...
gpl-3.0
ofer43211/unisubs
apps/videos/migrations/0004_auto__add_field_video_widget_views_count.py
5
9784
# encoding: 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 field 'Video.widget_views_count' db.add_column('videos_video', 'widget_views_count', self.gf(...
agpl-3.0
marcosmodesto/django-testapp
django/django/contrib/localflavor/si/si_postalcodes.py
89
13570
# *-* coding: utf-8 *-* SI_POSTALCODES = [ (1000, u'Ljubljana'), (1215, u'Medvode'), (1216, u'Smlednik'), (1217, u'Vodice'), (1218, u'Komenda'), (1219, u'Laze v Tuhinju'), (1221, u'Motnik'), (1222, u'Trojane'), (1223, u'Blagovica'), (1225, u'Lukovica'), (1230, u'Dom\u017eale...
bsd-3-clause
trondhindenes/ansible-modules-core
cloud/google/gce_mig.py
3
30256
#!/usr/bin/python # Copyright 2016 Google 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 vers...
gpl-3.0
GustavoHennig/ansible
lib/ansible/modules/network/nxos/nxos_snmp_community.py
19
8273
#!/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 distribut...
gpl-3.0
r8921039/bitcoin
test/functional/feature_minchainwork.py
33
4122
#!/usr/bin/env python3 # Copyright (c) 2017-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test logic for setting nMinimumChainWork on command line. Nodes don't consider themselves out of "init...
mit
dfalt974/SickRage
lib/dateutil/zoneinfo/rebuild.py
34
1719
import logging import os import tempfile import shutil import json from subprocess import check_call from tarfile import TarFile from dateutil.zoneinfo import METADATA_FN, ZONEFILENAME def rebuild(filename, tag=None, format="gz", zonegroups=[], metadata=None): """Rebuild the internal timezone info in dateutil/zo...
gpl-3.0
Akrog/cinder
cinder/tests/targets/test_iser_driver.py
5
3980
# 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
pbuehler/AliPhysics
PWGJE/EMCALJetTasks/Tracks/analysis/old/ComparePeriodsTriggerToMB.py
42
8443
#! /usr/bin/env python from ROOT import TCanvas, TGraphErrors, TLegend, TPaveText from ROOT import kBlack, kBlue, kRed from Helper import Frame, ReadHistList from Graphics import Style from SpectrumContainer import DataContainer from copy import deepcopy class PeriodComparisonPlot: def __init__(self): ...
bsd-3-clause
Pulshen/XKernel
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
katyhuff/moose
gui/utils/mergeLists.py
34
1682
#!/usr/bin/python ''' Merge the lists together preserving the ordering of master. "master" will be the merged list after completion. ''' def mergeLists(master, slave): for slave_value_position in xrange(0,len(slave)): value = slave[slave_value_position] if value in master: continue else: sl...
lgpl-2.1
kivy/kivy
kivy/core/image/img_tex.py
21
1549
''' Tex: Compressed texture ''' __all__ = ('ImageLoaderTex', ) import json from struct import unpack from kivy.logger import Logger from kivy.core.image import ImageLoaderBase, ImageData, ImageLoader class ImageLoaderTex(ImageLoaderBase): @staticmethod def extensions(): return ('tex', ) def lo...
mit
Nowheresly/odoo
addons/contacts/__openerp__.py
260
1594
# -*- 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
2014c2g14/2014c2
exts/wsgi/static/Brython2.1.0-20140419-113919/Lib/tempfile.py
728
22357
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
gpl-2.0
jiajiechen/mxnet
example/rcnn/rcnn/tools/reeval.py
16
2329
# Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not u...
apache-2.0
LLNL/spack
var/spack/repos/builtin/packages/py-python-socketio/package.py
5
1037
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyPythonSocketio(PythonPackage): """Python implementation of the Socket.IO realtime server...
lgpl-2.1
rogerscristo/BotFWD
env/lib/python3.6/site-packages/pytests/test_inputtextmessagecontent.py
1
3394
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2017 # Leandro Toledo de Souza <devs@python-telegram-bot.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as publis...
mit
BT-ojossen/sale-workflow
__unported__/sale_delivery_term/sale.py
34
14224
# -*- coding: utf-8 -*- # # # Copyright (C) 2012 Agile Business Group sagl (<http://www.agilebg.com>) # Copyright (C) 2012 Domsense srl (<http://www.domsense.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publis...
agpl-3.0
totoromano/settings
node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py
1835
12124
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """New implementation of Visual Studio project generation.""" import os import random import gyp.common # hashlib is supplied as of Python 2.5 as the replacemen...
mit
dednal/chromium.src
tools/metrics/histograms/update_extension_permission.py
59
1028
# 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. """Updates ExtensionPermission2 enum in histograms.xml file with values read from permission_message.h. If the file was pretty-printed, the updated version ...
bsd-3-clause
shakamunyi/tensorflow
tensorflow/compiler/tests/pooling_ops_test.py
43
16927
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
Jgarcia-IAS/SITE
addons/auth_crypt/auth_crypt.py
108
3919
import logging from passlib.context import CryptContext import openerp from openerp.osv import fields, osv _logger = logging.getLogger(__name__) default_crypt_context = CryptContext( # kdf which can be verified by the context. The default encryption kdf is # the first of the list ['pbkdf2_sha512', 'md5_...
agpl-3.0
kosgroup/odoo
odoo/workflow/service.py
20
4081
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from helpers import Session from helpers import Record from odoo.workflow.instance import WorkflowInstance # import instance class WorkflowService(object): CACHE = {} @classmethod def clear_cache(cls, dbna...
gpl-3.0
chrisdroid/nexmon
buildtools/gcc-arm-none-eabi-5_4-2016q2-osx/arm-none-eabi/lib/armv7-ar/thumb/fpu/libstdc++.a-gdb.py
6
2620
# -*- python -*- # Copyright (C) 2009-2015 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 versio...
gpl-3.0
meganbkratz/acq4
acq4/analysis/atlas/AuditoryCortex/CtrlTemplate.py
4
4733
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file './acq4/analysis/atlas/AuditoryCortex/CtrlTemplate.ui' # # Created: Tue Dec 24 01:49:12 2013 # by: PyQt4 UI code generator 4.10 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8...
mit
Lab603/PicEncyclopedias
jni-build/jni-build/jni/include/tensorflow/python/kernel_tests/variable_ops_test.py
29
9619
# 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...
mit
quokkaproject/flask-security
flask_security/core.py
10
15768
# -*- coding: utf-8 -*- """ flask_security.core ~~~~~~~~~~~~~~~~~~~ Flask-Security core module :copyright: (c) 2012 by Matt Wright. :license: MIT, see LICENSE for more details. """ from flask import current_app, render_template from flask_login import AnonymousUserMixin, UserMixin as BaseUserMixi...
mit
aristeu/linux-2.6
scripts/clang-tools/gen_compile_commands.py
45
7980
#!/usr/bin/env python # SPDX-License-Identifier: GPL-2.0 # # Copyright (C) Google LLC, 2018 # # Author: Tom Roeder <tmroeder@google.com> # """A tool for generating compile_commands.json in the Linux kernel.""" import argparse import json import logging import os import re import subprocess _DEFAULT_OUTPUT = 'compile_...
gpl-2.0
mohabusama/django-users-api
users_api/authorization.py
1
1626
from tastypie.exceptions import Unauthorized from tastypie.authorization import Authorization, DjangoAuthorization class UsersDjangoAuthorization(DjangoAuthorization): def update_detail(self, object_list, bundle): if bundle.request.user.id == bundle.obj.id: return True return super(Us...
mit
horance-liu/tensorflow
tensorflow/contrib/rnn/python/kernel_tests/benchmarking.py
67
1906
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
viewdy/phantomjs2
src/breakpad/src/third_party/protobuf/protobuf/python/google/protobuf/message.py
261
9669
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
bsd-3-clause
batermj/algorithm-challenger
code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Lib/_pyio.py
1
93037
""" Python implementation of the io module. """ import os import abc import codecs import errno import stat import sys # Import _thread instead of threading to reduce startup cost from _thread import allocate_lock as Lock if sys.platform in {'win32', 'cygwin'}: from msvcrt import setmode as _setmode else: _set...
apache-2.0
Gabriel439/pants
migrations/0.0.24/src/python/publish_migration.py
17
1194
#!/usr/bin/python # coding=utf-8 # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) i...
apache-2.0
xuleiboy1234/autoTitle
tensorflow/tensorflow/examples/learn/wide_n_deep_tutorial.py
18
8111
# 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...
mit