repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
peterbarker/mavlink
pymavlink/tools/magfit_delta.py
45
4468
#!/usr/bin/env python ''' fit best estimate of magnetometer offsets using the algorithm from Bill Premerlani ''' import sys, time, os, math # command line option handling from argparse import ArgumentParser parser = ArgumentParser(description=__doc__) parser.add_argument("--no-timestamps", dest="notimestamps", actio...
lgpl-3.0
benoitsteiner/tensorflow
tensorflow/python/kernel_tests/sparsemask_op_test.py
133
1835
# 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
astorije/ansible-modules-core
cloud/amazon/rds_param_group.py
12
10469
#!/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
AloneRoad/Inforlearn
vendor/gdata/client.py
1
47380
#!/usr/bin/env python # # Copyright (C) 2008, 2009 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 appli...
apache-2.0
garimakhulbe/autorest
src/generator/AutoRest.Python.Azure.Tests/Expected/AcceptanceTests/AzureParameterGrouping/autorestparametergroupingtestservice/models/__init__.py
30
1121
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
ianastewart/cwltc-admin
pos/migrations/0004_auto_20171202_1337.py
1
1597
# -*- coding: utf-8 -*- # Generated by Django 1.11.7 on 2017-12-02 13:37 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ("members", "0004_auto_20171125_2023"), ("pos", "0003...
mit
imruahmed/microblog
flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/zxjdbc.py
59
8173
# oracle/zxjdbc.py # Copyright (C) 2005-2015 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """ .. dialect:: oracle+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc ...
bsd-3-clause
igemsoftware/SYSU-Software2013
project/Python27/Lib/test/test_sets.py
87
27851
#!/usr/bin/env python import unittest, operator, copy, pickle, random from test import test_support test_support.import_module("sets", deprecated=True) from sets import Set, ImmutableSet empty_set = Set() #============================================================================== class TestBasicOps(unittest.Te...
mit
drawks/ansible
lib/ansible/modules/system/svc.py
44
9312
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright: (c) 2015, Brian Coca <bcoca@ansible.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '...
gpl-3.0
justathoughtor2/atomicApe
cygwin/lib/python2.7/zipfile.py
24
58748
""" Read and write ZIP files. """ import struct, os, time, sys, shutil import binascii, cStringIO, stat import io import re import string try: import zlib # We may need its compression method crc32 = zlib.crc32 except ImportError: zlib = None crc32 = binascii.crc32 __all__ = ["BadZipfile", "error", "Z...
gpl-3.0
andela-ifageyinbo/django
tests/utils_tests/test_lazyobject.py
268
8629
from __future__ import unicode_literals import copy import pickle import sys from unittest import TestCase from django.utils import six from django.utils.functional import LazyObject, SimpleLazyObject, empty class Foo(object): """ A simple class with just one attribute. """ foo = 'bar' def __eq...
bsd-3-clause
AltSchool/django
tests/staticfiles_tests/test_views.py
279
1312
from __future__ import unicode_literals import posixpath from django.conf import settings from django.test import override_settings from .cases import StaticFilesTestCase, TestDefaults @override_settings(ROOT_URLCONF='staticfiles_tests.urls.default') class TestServeStatic(StaticFilesTestCase): """ Test sta...
bsd-3-clause
abartlet/samba-old
third_party/dnspython/dns/inet.py
99
3235
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
gpl-3.0
maelnor/nova
nova/tests/virt/libvirt/test_imagebackend.py
4
53414
# Copyright 2012 Grid Dynamics # 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...
apache-2.0
dednal/chromium.src
tools/perf/metrics/v8_object_stats.py
42
8916
# 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. import json import logging from metrics import Metric from telemetry.value import scalar _COUNTER_NAMES = [ 'V8.OsMemoryAllocated', 'V8.MemoryNewS...
bsd-3-clause
slabanja/dynsf
dsf/binner.py
4
3214
# Copyright (C) 2011 Mattias Slabanja <slabanja@chalmers.se> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This...
gpl-2.0
Psybrus/RakNet
Samples/nacl_sdk/RakNet_NativeClient_VS2010/httpd.py
32
10007
#!/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. import BaseHTTPServer import imp import logging import multiprocessing import optparse import os import SimpleHTTPServer # pylint:...
bsd-2-clause
mdj2/django
django/contrib/sites/management.py
232
1587
""" Creates the default Site object. """ from django.db.models import signals from django.db import connections from django.db import router from django.contrib.sites.models import Site from django.contrib.sites import models as site_app from django.core.management.color import no_style def create_default_site(app, c...
bsd-3-clause
daniellinye/HRINFG3
euromast/i18n/locale/en.py
1
5212
lang = { "start": 'Start', "resume": "Resume", "go to menu": "Go to menu", "settings": 'Settings', "instructions": 'Instructions', "highscores": 'Highscore', "exit": "Exit", "language": "Language", "continue": "Continue", "go back": "Go back", "rules": "Rules", "select am...
mit
ALProjects/ALProjects.github.io
node_modules/node-gyp/gyp/pylib/gyp/generator/android.py
960
45344
# 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. # Notes: # # This generates makefiles suitable for inclusion into the Android build system # via an Android.mk file. It is based on make.py, the standard makefile ...
mit
lightcn/odoo
addons/account_anglo_saxon/purchase.py
427
2043
# -*- encoding: 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 t...
agpl-3.0
plotly/python-api
packages/python/plotly/plotly/validators/histogram/_ycalendar.py
1
1058
import _plotly_utils.basevalidators class YcalendarValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__(self, plotly_name="ycalendar", parent_name="histogram", **kwargs): super(YcalendarValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name...
mit
addition-it-solutions/project-all
addons/hr_gamification/wizard/grant_badge.py
7
2525
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
jiazichenzhan/Server_Manage_Plugin
ironic-plugin-pike/ironic/tests/unit/drivers/modules/redfish/test_management.py
4
8645
# Copyright 2017 Red Hat, 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...
apache-2.0
jgoodall/presentation-20130412
node_modules/grunt-contrib-mincss/node_modules/gzip-js/test/runner.py
182
1600
#!/usr/bin/env python import os import sys import shutil from colorama import Fore import argparse import zipTest import unzipTest parser = argparse.ArgumentParser(description='Process command-line arguments') parser.add_argument('--file', '-f', metavar='path/to/file', type=str, nargs='?', help='Path to file to use f...
mit
Gabotero/GNURadioNext
gr-utils/python/modtool/modtool_help.py
16
2260
# # Copyright 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 your option) # any later version. # #...
gpl-3.0
philippjfr/bokeh
bokeh/models/map_plots.py
6
2840
''' Models for displaying maps in Bokeh plots. ''' from __future__ import absolute_import from ..core.enums import MapType from ..core.has_props import abstract from ..core.properties import Bool, Enum, Float, Instance, Int, JSON, Override, String from ..core.validation import error, warning from ..core.validation.wa...
bsd-3-clause
frainfreeze/studying
home/python/microblog/venv/lib/python3.5/site-packages/jinja2/optimizer.py
222
1722
# -*- coding: utf-8 -*- """ jinja2.optimizer ~~~~~~~~~~~~~~~~ The jinja optimizer is currently trying to constant fold a few expressions and modify the AST in place so that it should be easier to evaluate it. Because the AST does not contain all the scoping information and the compiler has to ...
mit
verma-varsha/zulip
zerver/views/home.py
1
11772
from __future__ import absolute_import from typing import Any, List, Dict, Optional, Text from django.conf import settings from django.core.urlresolvers import reverse from django.http import HttpResponseRedirect, HttpResponse, HttpRequest from django.shortcuts import redirect, render from django.utils import translat...
apache-2.0
seungjin/app5-seungjin-net.appspot.com
django/contrib/localflavor/pl/pl_administrativeunits.py
433
13194
# -*- coding: utf-8 -*- """ Polish administrative units as in http://pl.wikipedia.org/wiki/Podzia%C5%82_administracyjny_Polski """ ADMINISTRATIVE_UNIT_CHOICES = ( ('wroclaw', u'Wrocław'), ('jeleniagora', u'Jelenia Góra'), ('legnica', u'Legnica'), ('boleslawiecki', u'bolesławiecki'), ('dzierzoniows...
bsd-3-clause
sanjeevtripurari/hue
desktop/core/ext-py/PyYAML-3.09/lib/yaml/representer.py
114
17706
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * from nodes import * import datetime try: set except NameError: from sets import Set as set import sys, copy_reg, types class RepresenterError(YAMLError): pass class BaseRepresenter(object): ...
apache-2.0
tommo/gii
lib/3rdparty/common/pyqode/core/api/encodings.py
6
5199
""" This module contains the list of possible encodings, taken from the standard library documentation: https://docs.python.org/3.4/library/codecs.html#standard-encodings """ #: Encodings map, map a codec name to a an alias/language pair.#: ENCODINGS_MAP = { "ascii": ("US-ASCII", "English"), "big5": ("Big5", ...
mit
viglesiasce/euca-deploy
setup.py
1
1282
#!/usr/bin/env python from __future__ import with_statement from setuptools import setup, find_packages from eucadeploy.version import get_version with open('README.md') as f: long_description = f.read() setup( name='Euca Deploy', version=get_version(), description='Tool for installing Eucalyptus'...
bsd-2-clause
revmischa/boto
boto/cloudsearch/search.py
153
13775
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # 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...
mit
Pluto-tv/chromium-crosswalk
tools/checkperms/checkperms.py
5
13415
#!/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 executable permission...
bsd-3-clause
sammyshj/gci
modules/s3/s3hierarchy.py
2
25177
# -*- coding: utf-8 -*- """ S3 Hierarchy Toolkit @copyright: 2013 (c) Sahana Software Foundation @license: MIT @requires: U{B{I{gluon}} <http://web2py.com>} Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "...
mit
Stiivi/brewery
brewery/ds/gdocs_streams.py
1
4553
#!/usr/bin/env python # -*- coding: utf-8 -*- import base import brewery.metadata as metadata try: import gdata.spreadsheet.text_db except: from brewery.utils import MissingPackage gdata = MissingPackage("gdata", "Google data (spreadsheet) source/target") # Documentation: # http://gdata-python-client.goog...
mit
jmhsi/justin_tinker
data_science/courses/learning_dl_packages/models/research/differential_privacy/dp_sgd/dp_optimizer/dp_pca.py
16
2596
# 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
Endika/c2c-rd-addons
stock_product_zero/report/__init__.py
8
1453
#-*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Ferdinand Gassauer (ChriCar Beteiligungs- und Beratungs- GmbH) # # WARNING: This program as such is intended to be use...
agpl-3.0
MikkelSchubert/paleomix
tests/common_tests/formats_tests/bed_test.py
1
15092
#!/usr/bin/python3 # # Copyright (c) 2012 Mikkel Schubert <MikkelSch@gmail.com> # # 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 ...
mit
queirozfcom/spam-filter
case2_naive_laplace.py
1
8446
import numpy as np import scipy.stats as stats import sys # lib eh a nossa biblioteca criada para este trabalho import lib.naive_bayes as nb import lib.preprocessing as prep import lib.validation as valid from config.constants import * def case2(indexes=CASE_2_ATTRIBUTE_INDEXES,output=True): accuracy_in_each_...
mit
hale36/SRTV
lib/stevedore/enabled.py
51
3014
import logging from .extension import ExtensionManager LOG = logging.getLogger(__name__) class EnabledExtensionManager(ExtensionManager): """Loads only plugins that pass a check function. The check_func argument should return a boolean, with ``True`` indicating that the extension should be loaded and ...
gpl-3.0
manishpatell/erpcustomizationssaiimpex123qwe
addons/account_analytic_plans/account_analytic_plans.py
18
23246
# -*- 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
Adai0808/pybrain
pybrain/rl/environments/ode/instances/ccrl.py
23
6117
from __future__ import print_function __author__ = 'Frank Sehnke, sehnke@in.tum.de' from pybrain.rl.environments.ode import ODEEnvironment, sensors, actuators import imp import xode #@UnresolvedImport import ode #@UnresolvedImport import sys from scipy import array, asarray class CCRLEnvironment(ODEEnvironment): ...
bsd-3-clause
tensorflow/estimator
tensorflow_estimator/python/estimator/training.py
1
43985
# 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
ShaheenHossain/eagle-medical
oemedical_lab/models/oemedical_lab.py
1
5959
# coding=utf-8 # Copyright (C) 2012-2013 Federico Manuel Echeverri Choux # 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) ...
agpl-3.0
kollad/turbo-ninja
apps/game/server.py
1
3848
from logging import getLogger from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop from tornado.web import Application import tornado.netutil from engine.apps.game.environment import setup_game_server from engine.apps.game.handlers.game import GameServerHandler from engine.apps.game.handlers.st...
mit
Nick-Hall/gramps
gramps/gen/filters/rules/family/_searchchildname.py
5
1825
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2002-2006 Donald N. Allingham # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at you...
gpl-2.0
Zhongqilong/kbengine
kbe/src/lib/python/Lib/distutils/tests/test_install_data.py
147
2603
"""Tests for distutils.command.install_data.""" import sys import os import unittest import getpass from distutils.command.install_data import install_data from distutils.tests import support from test.support import run_unittest class InstallDataTestCase(support.TempdirManager, support.Logg...
lgpl-3.0
Tatsh-ansible/ansible
lib/ansible/modules/storage/netapp/na_cdot_volume.py
9
13714
#!/usr/bin/python # (c) 2017, NetApp, Inc # 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.0', 'status': ['preview'], ...
gpl-3.0
saguas/jasper_erpnext_report
jasper_erpnext_report/jasper_erpnext_report/doctype/jasper_reports/jasper_reports.py
1
9860
# Copyright (c) 2013, Luis Fernandes and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe import os, json from frappe import _ from frappe.model.document import Document from jasper_erpnext_report.utils.file import get_image_name, JasperXmlReport,\ ...
mit
jeffery-do/Vizdoombot
doom/lib/python3.5/site-packages/pip/_vendor/progress/bar.py
510
2685
# -*- coding: utf-8 -*- # Copyright (c) 2012 Giorgos Verigakis <verigak@gmail.com> # # Permission to use, copy, modify, and distribute this software for any # purpose with or without fee is hereby granted, provided that the above # copyright notice and this permission notice appear in all copies. # # THE SOFTWARE IS P...
mit
havt/odoo
addons/base_report_designer/plugin/openerp_report_designer/bin/script/lib/gui.py
382
31513
########################################################################## # # Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com # Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>). # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser Gener...
agpl-3.0
jomolinare/kobocat
onadata/apps/main/tests/test_form_exports.py
13
9898
import os import time import csv import tempfile from django.core.urlresolvers import reverse from django.utils import timezone from xlrd import open_workbook from onadata.apps.viewer.models.export import Export from onadata.apps.viewer.views import zip_export, kml_export, export_download from onadata.libs.utils.expo...
bsd-2-clause
madelynfreed/rlundo
venv/lib/python2.7/site-packages/nose/failure.py
69
1249
import logging import unittest from traceback import format_tb from nose.pyversion import is_base_exception log = logging.getLogger(__name__) __all__ = ['Failure'] class Failure(unittest.TestCase): """Unloadable or unexecutable test. A Failure case is placed in a test suite to indicate the presence of a ...
gpl-3.0
jmartinezchaine/OpenERP
openerp/addons/resource/faces/task.py
9
126390
#@+leo-ver=4 #@+node:@file task.py #@@language python #@<< Copyright >> #@+node:<< Copyright >> ############################################################################ # Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH # mreithinger@web.de # # This file is part of faces. # # faces is free software; ...
agpl-3.0
vFense/vFenseAgent-nix
agent/deps/mac/Python-2.7.5/lib/python2.7/plat-mac/lib-scriptpackages/Explorer/__init__.py
73
2265
""" Package generated from /Applications/Internet Explorer.app """ from warnings import warnpy3k warnpy3k("In 3.x, the Explorer module is removed.", stacklevel=2) import aetools Error = aetools.Error import Standard_Suite import URL_Suite import Netscape_Suite import Microsoft_Internet_Explorer import Web_Browser_Sui...
lgpl-3.0
tomdoel/pyxnatbrowser
database/xnatproject.py
1
2132
# https://github.com/tomdoel/pyxnatbrowser # Author: Tom Doel www.tomdoel.com # Distributed under the Simplified BSD License. from database.base import Base from database.utilities import Utilities class XnatProject(Base): """ Describes an XNAT project """ def __init__(self, rest_client, project_id, pro...
bsd-2-clause
cbingos/hongmafund
crispy_forms/templatetags/crispy_forms_filters.py
16
3494
# -*- coding: utf-8 -*- from django.conf import settings from django.forms import forms from django.forms.formsets import BaseFormSet from django.template import Context from django.template.loader import get_template from django.utils.functional import memoize from django.utils.safestring import mark_safe from django ...
mit
adeepkit01/ns3-dhcp-new
src/virtual-net-device/bindings/modulegen__gcc_ILP32.py
28
213430
from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers import pybindgen.settings import warnings class ErrorHandler(pybindgen.settings.ErrorHandler): def handle_error(self, wrapper, exception, traceback_): warnings.warn("exception %r in wrapper %s" % (exception, wrapper)) ...
gpl-2.0
masci/oauthlib
tests/oauth2/rfc6749/endpoints/test_scope_handling.py
26
8017
"""Ensure scope is preserved across authorization. Fairly trivial in all grants except the Authorization Code Grant where scope need to be persisted temporarily in an authorization code. """ from __future__ import absolute_import, unicode_literals import json import mock from .test_utils import get_query_credentials,...
bsd-3-clause
henryiii/rootpy
rootpy/tree/treebuffer.py
1
10524
# Copyright 2012 the rootpy developers # distributed under the terms of the GNU General Public License from __future__ import absolute_import import sys import re import inspect import ROOT try: from collections import OrderedDict except ImportError: # py 2.6 from ..extern.ordereddict import OrderedDict fro...
gpl-3.0
juanyaw/PTVS
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/mac_croatian.py
93
14196
""" Python Character Mapping Codec mac_croatian generated from 'MAPPINGS/VENDORS/APPLE/CROATIAN.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 de...
apache-2.0
azumimuo/family-xbmc-addon
script.module.liveresolver/lib/liveresolver/resolvers/hdcastinfo.py
1
1867
# -*- coding: utf-8 -*- import re,urlparse,urllib from liveresolver.modules import client,decryptionUtils from liveresolver.modules.log_utils import log def resolve(url): try: try: referer = urlparse.parse_qs(urlparse.urlparse(url).query)['referer'][0] url = url.replace('&referer...
gpl-2.0
ess-dmsc/do-ess-data-simulator
DonkiDirector/tinydb/middlewares.py
1
3813
""" Contains the :class:`base class <tinydb.middlewares.Middleware>` for middlewares and implementations. """ from tinydb import TinyDB class Middleware(object): """ The base class for all Middlewares. Middlewares hook into the read/write process of TinyDB allowing you to extend the behav...
bsd-2-clause
mikjo/bigitr
bigitr/log.py
1
3628
# # Copyright 2012 SAS Institute # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in ...
apache-2.0
IronLanguages/ironpython3
Src/StdLib/Lib/inspect.py
4
104640
"""Get useful information from live Python objects. This module encapsulates the interface provided by the internal special attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion. It also provides some help for examining source code and class layout. Here are some of the useful functions provided by this module:...
apache-2.0
ecederstrand/django
django/contrib/gis/db/backends/oracle/operations.py
43
10643
""" This module contains the spatial lookup types, and the `get_geo_where_clause` routine for Oracle Spatial. Please note that WKT support is broken on the XE version, and thus this backend will not work on such platforms. Specifically, XE lacks support for an internal JVM, and Java libraries are required to use...
bsd-3-clause
poojavade/Genomics_Docker
Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/Sphinx-1.2.3-py2.7.egg/sphinx/writers/latex.py
11
58296
# -*- coding: utf-8 -*- """ sphinx.writers.latex ~~~~~~~~~~~~~~~~~~~~ Custom docutils writer for LaTeX. Much of this code is adapted from Dave Kuhlman's "docpy" writer from his docutils sandbox. :copyright: Copyright 2007-2014 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE fo...
apache-2.0
ravindrapanda/tensorflow
tensorflow/contrib/learn/python/learn/preprocessing/__init__.py
138
1071
# 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
D2005-devs/cafkernel2-old
scripts/rt-tester/rt-tester.py
11005
5307
#!/usr/bin/python # # rt-mutex tester # # (C) 2006 Thomas Gleixner <tglx@linutronix.de> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as # published by the Free Software Foundation. # import os import sys import getopt import sh...
gpl-2.0
vauxoo-dev/stock-logistics-warehouse
__unported__/stock_lot_valuation/wizard/stock_change_standard_price.py
23
4852
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2013 Agile Business Group sagl (<http://www.agilebg.com>) # # This program is free softw...
agpl-3.0
franekp/ankidict
ankidict/thirdparty/httplib.py
18
51163
r"""HTTP/1.1 client library <intro stuff goes here> <other stuff, too> HTTPConnection goes through a number of "states", which define when a client may legally make another request or fetch the response for a particular request. This diagram details these state transitions: (null) | | HTTPConnection(...
agpl-3.0
paultcochrane/pyvisi
pyvisi/renderers/plplot/axes.py
1
1261
# Copyright (C) 2004-2008 Paul Cochrane # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distribut...
gpl-2.0
bitmaintech/p2pool
p2pool/bitcoin/networks/terracoin_testnet.py
30
1171
import os import platform from twisted.internet import defer from .. import data, helper from p2pool.util import pack P2P_PREFIX = '41babe56'.decode('hex') P2P_PORT = 23333 ADDRESS_VERSION = 111 RPC_PORT = 23332 RPC_CHECK = defer.inlineCallbacks(lambda bitcoind: defer.returnValue( 'terracoinaddress' in ...
gpl-3.0
nicolasnoble/grpc
src/python/grpcio_testing/grpc_testing/_server/_handler.py
18
7405
# Copyright 2017 gRPC 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 or agreed to in writing...
apache-2.0
accesso/beets
beetsplug/info.py
2
2210
# This file is part of beets. # Copyright 2013, Adrian Sampson. # # 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, ...
mit
yffq/mecanum
avr/include/voltage.py
4
1549
#!/usr/bin/env python import sys import serial import time print('Opening port') arduino = serial.Serial('/dev/ttyACM0', 115200, timeout=1, dsrdtr=False) time.sleep(3) print('Flushing the buffer') arduino.readline() def a2s(arr): """ Array of integer byte values --> binary string """ return ''.join(chr(b...
gpl-2.0
surajssd/kuma
vendor/packages/translate/storage/placeables/test_general.py
27
7630
# -*- coding: utf-8 -*- from translate.storage.placeables import general def test_placeable_numbers(): """Check the correct functioning of number placeables""" assert general.NumberPlaceable([u"25"]) in general.NumberPlaceable.parse(u"Here is a 25 number") assert general.NumberPlaceable([u"-25"]) in gene...
mpl-2.0
javalovelinux/SparkGroovyScript
python/pyspark/ml/wrapper.py
14
9977
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
apache-2.0
lastweek/gem5
src/python/m5/trace.py
61
1755
# Copyright (c) 2008 The Hewlett-Packard Development Company # 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...
bsd-3-clause
kyleam/pymc3
pymc/examples/ARM12_6.py
2
1807
import numpy as np from pymc import * import pandas as pd data = pd.read_csv(get_data_file('pymc.examples', 'data/srrs2.dat')) cty_data = pd.read_csv(get_data_file('pymc.examples', 'data/cty.dat')) data = data[data.state == 'MN'] data['fips'] = data.stfips * 1000 + data.cntyfips cty_data['fips'] = cty_data.stfips *...
apache-2.0
Enlik/entropy
server/eit/commands/checkout.py
5
3263
# -*- coding: utf-8 -*- """ @author: Fabio Erculiani <lxnay@sabayon.org> @contact: lxnay@sabayon.org @copyright: Fabio Erculiani @license: GPL-2 B{Entropy Infrastructure Toolkit}. """ import sys import os import argparse from entropy.output import darkgreen, blue from entropy.i18n import _ from...
gpl-2.0
mdakin/engine
tools/android/remove_strings.py
183
1426
#!/usr/bin/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. """Remove strings by name from a GRD file.""" import optparse import re import sys def RemoveStrings(grd_path, string_names): """R...
bsd-3-clause
AlanJAS/turtleart
TurtleArt/util/odf/attrconverters.py
2
73949
# -*- coding: utf-8 -*- # Copyright (C) 2006-2012 Søren Roug, European Environment Agency # # 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 you...
mit
jolevq/odoopub
extra-addons/l10n_py/__init__.py
4
1456
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2014 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
benschmaus/catapult
third_party/py_vulcanize/third_party/rcssmin/_setup/py3/util.py
43
1811
# -*- coding: ascii -*- # # Copyright 2007, 2008, 2009, 2010, 2011 # Andr\xe9 Malo or his licensors, as applicable # # 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.or...
bsd-3-clause
jeromeLB/client175
cherrypy/lib/caching.py
13
9234
import datetime import threading import time import cherrypy from cherrypy.lib import cptools, http class MemoryCache: maxobjects = 1000 maxobj_size = 100000 maxsize = 10000000 delay = 600 def __init__(self): self.clear() t = threading.Thread(target=self.expire_cache, na...
gpl-3.0
zhaishaomin/LDS-prefetcher-research
gem5_src/arch/x86/isa/insts/simd64/floating_point/arithmetic/reciprocal_estimation.py
91
2172
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
apache-2.0
wvangeit/AllenSDK
doc_template/examples/multicell/multi.py
3
1070
from allensdk.model.biophys_sim.config import Config from utils import Utils import matplotlib matplotlib.use("Agg") import matplotlib.pyplot as plt import numpy as np config = Config().load('config.json') # configure NEURON utils = Utils(config) h = utils.h # configure model manifest = config.manifest utils.gener...
gpl-3.0
MziRintu/kitsune
kitsune/upload/tasks.py
19
4527
import logging import os import StringIO import subprocess from django.conf import settings from django.core.files.base import ContentFile from celery import task from PIL import Image from kitsune.sumo.decorators import timeit log = logging.getLogger('k.task') @task(rate_limit='15/m') @timeit def generate_thumb...
bsd-3-clause
alexteodor/odoo
addons/l10n_syscohada/__init__.py
439
1040
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2010-2011 BAAMTU SARL (<http://www.baamtu.sn>). # contact: leadsn@baamtu.com # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affer...
agpl-3.0
akintoey/django
tests/forms_tests/widget_tests/test_multiplehiddeninput.py
247
2892
from django.forms import MultipleHiddenInput from .base import WidgetTest class MultipleHiddenInputTest(WidgetTest): widget = MultipleHiddenInput() def test_render_single(self): self.check_html( self.widget, 'email', ['test@example.com'], html='<input type="hidden" name="emai...
bsd-3-clause
thundernet8/WRGameVideos-Server
venv/lib/python2.7/site-packages/pip/index.py
237
47847
"""Routines related to PyPI, indexes""" from __future__ import absolute_import import logging import cgi from collections import namedtuple import itertools import sys import os import re import mimetypes import posixpath import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor....
gpl-2.0
tbinjiayou/Odoo
addons/report/controllers/main.py
40
6657
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2014-Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
katiecheng/Bombolone
env/lib/python2.7/site-packages/paramiko/sftp_file.py
8
19209
# Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com> # # This file is part of paramiko. # # Paramiko 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 (a...
bsd-3-clause
dhongu/l10n-romania
l10n_ro_stock_account/models/purchase.py
1
1580
# -*- coding: utf-8 -*- # © 2008-2018 Fekete Mihai <mihai.fekete@forbiom.eu> # Dorin Hongu <dhongu(@)gmail(.)com # See README.rst file on addons root folder for license details from odoo import models, fields """ class purchase_order(models.Model): _inherit = 'purchase.order' # todo: care o fi ...
agpl-3.0
xkcd1253/Mimi
flask/lib/python2.7/site-packages/whoosh/reading.py
7
41769
# Copyright 2007 Matt Chaput. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # 1. Redistributions of source code must retain the above copyright notice, # this list of conditions and the...
gpl-2.0
lostdj/Jaklin-OpenJFX
modules/web/src/main/native/Tools/Scripts/webkitpy/port/leakdetector_valgrind_unittest.py
2
43954
# Copyright (C) 2013 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 code must retain the above copyright # notice, this list of conditions ...
gpl-2.0
openstack/python-openstacksdk
openstack/tests/unit/fake/v1/fake.py
6
1280
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
apache-2.0