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
mxOBS/deb-pkg_trusty_chromium-browser
tools/win/split_link/check_installed.py
146
1147
# Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import sys def IsAvailable(): _winreg = None if sys.platform == 'win32': import _winreg elif sys.platform == 'cygwin': try: ...
bsd-3-clause
JacobJacob/pyew
vstruct/defs/elf.py
21
5151
import vstruct from vstruct.primitives import * EI_NIDENT = 4 EI_PADLEN = 7 class Elf32(vstruct.VStruct): def __init__(self): vstruct.VStruct.__init__(self) self.e_ident = v_bytes(EI_NIDENT) self.e_class = v_uint8() self.e_data = v_uint8() self.e_filevers...
gpl-2.0
aachik/flask-blog-abdulmx
env/lib/python2.7/site-packages/flask_wtf/file.py
101
2502
from werkzeug import FileStorage from wtforms import FileField as _FileField from wtforms.validators import InputRequired, StopValidation class FileField(_FileField): """ Werkzeug-aware subclass of **wtforms.FileField** Provides a `has_file()` method to check if its data is a FileStorage instance wit...
mit
t794104/ansible
lib/ansible/modules/cloud/amazon/iam_cert.py
36
11967
#!/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
lietu/godot
tools/export/blender25/io_scene_dae/__init__.py
29
6438
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
mit
madan96/sympy
sympy/functions/special/tests/test_delta_functions.py
9
5769
from sympy import ( adjoint, conjugate, DiracDelta, Heaviside, nan, pi, sign, sqrt, symbols, transpose, Symbol, Piecewise, I, S, Eq, oo, SingularityFunction ) from sympy.utilities.pytest import raises from sympy.core.function import ArgumentIndexError from sympy.utilities.exceptions import SymPyDeprecationWa...
bsd-3-clause
lidabing/xgyp
gyp/test/make_global_settings/wrapper/gyptest-wrapper.py
229
1444
#!/usr/bin/env python # Copyright (c) 2013 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. """ Verifies *_wrapper in make_global_settings. """ import os import sys import TestGyp test_format = ['ninja'] if sys.platform in ('linux...
bsd-3-clause
yannickcr/CouchPotatoServer
libs/apscheduler/triggers/cron/expressions.py
103
6204
""" This module contains the expressions applicable for CronTrigger's fields. """ from calendar import monthrange import re from apscheduler.util import asint __all__ = ('AllExpression', 'RangeExpression', 'WeekdayRangeExpression', 'WeekdayPositionExpression', 'LastDayOfMonthExpression') WEEKDAYS = ['mo...
gpl-3.0
mark-me/Pi-Jukebox
venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/urllib3/packages/ssl_match_hostname/_implementation.py
22
5700
"""The match_hostname() function from Python 3.3.3, essential when using SSL.""" # Note: This file is under the PSF license as the code comes from the python # stdlib. http://docs.python.org/3/license.html import re import sys # ipaddress has been backported to 2.6+ in pypi. If it is installed on the # system, us...
agpl-3.0
syci/bank-payment
__unported__/bank_statement_instant_voucher/model/account_bank_statement_line.py
19
1960
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # This module copyright (C) 2012 - 2013 Therp BV (<http://therp.nl>). # # This program is free software: you can redistribute it and/or modify # it under the te...
agpl-3.0
srkukarni/heron
heron/tools/ui/src/python/handlers/__init__.py
12
1153
''' handler module ''' __all__ = ['handlers'] from heron.tools.ui.src.python.handlers import api from heron.tools.ui.src.python.handlers.base import BaseHandler from heron.tools.ui.src.python.handlers.mainhandler import MainHandler from heron.tools.ui.src.python.handlers.notfound import NotFoundHandler #############...
apache-2.0
timmie/cartopy
lib/cartopy/examples/favicon.py
5
1607
__tags__ = ['Miscellanea'] import cartopy.crs as ccrs import matplotlib.pyplot as plt import matplotlib.textpath import matplotlib.patches from matplotlib.font_manager import FontProperties import numpy as np def main(): plt.figure(figsize=[8, 8]) ax = plt.axes(projection=ccrs.SouthPolarStereo()) ax.coas...
gpl-3.0
Woerd88/service.usb.redbutton
usb/_lookup.py
28
3259
# Copyright (C) 2009-2014 Walker Inman # # The following terms apply to all files associated # with the software unless explicitly disclaimed in individual files. # # The authors hereby grant permission to use, copy, modify, distribute, # and license this software and its documentation for any purpose, provided # that ...
gpl-2.0
wanliming11/MurlocAlgorithms
Last/OpenSource/Python-3.6.1/Tools/unittestgui/unittestgui.py
50
18560
#!/usr/bin/env python3 """ GUI framework and application for use with Python unit testing framework. Execute tests written using the framework provided by the 'unittest' module. Updated for unittest test discovery by Mark Roddy and Python 3 support by Brian Curtin. Based on the original by Steve Purcell, from: htt...
mit
thjashin/tensorflow
tensorflow/examples/image_retraining/retrain_test.py
53
3941
# 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
pmghalvorsen/gramps_branch
gramps/gen/utils/maclocale.py
1
12242
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2011 John Ralls, Fremont, CA # # 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 ...
gpl-2.0
j00bar/ansible
lib/ansible/modules/files/find.py
27
13494
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Ruggero Marchei <ruggero.marchei@daemonzone.net> # (c) 2015, Brian Coca <bcoca@ansible.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 #...
gpl-3.0
schmidtc/pysal
pysal/cg/standalone.py
15
28747
""" Helper functions for computational geometry in PySAL """ __author__ = "Sergio J. Rey, Xinyue Ye, Charles Schmidt, Andrew Winslow" __credits__ = "Copyright (c) 2005-2009 Sergio J. Rey" import doctest import math import copy from shapes import * from itertools import islice import scipy.spatial from pysal.common i...
bsd-3-clause
hplustree/trove
trove/tests/util/server_connection.py
2
2550
# Copyright 2013 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
apache-2.0
crafty78/ansible
lib/ansible/modules/network/asa/asa_command.py
30
7230
#!/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
clumsy/intellij-community
plugins/hg4idea/testData/bin/mercurial/hgweb/common.py
92
6605
# hgweb/common.py - Utility functions needed by hgweb_mod and hgwebdir_mod # # Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net> # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later...
apache-2.0
ejpbruel/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/dispatch.py
652
14786
# Copyright 2012, 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...
mpl-2.0
11craft/django-tastypie
tastypie/utils/formatting.py
24
1102
import email import datetime import time from django.utils import dateformat from tastypie.utils.timezone import make_aware, make_naive, aware_datetime # Try to use dateutil for maximum date-parsing niceness. Fall back to # hard-coded RFC2822 parsing if that's not possible. try: from dateutil.parser import parse a...
bsd-3-clause
uoryon/cluster-scheduler-simulator
src/main/python/generate-txt-from-protobuff.py
5
8573
#!/usr/bin/python # Copyright (c) 2013, Regents of the University of California # 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 no...
bsd-3-clause
xyuanmu/XX-Net
python3.8.2/Lib/pickle.py
9
64395
"""Create portable serialized representations of Python objects. See module copyreg for a mechanism for registering custom picklers. See module pickletools source for extensive comments. Classes: Pickler Unpickler Functions: dump(object, file) dumps(object) -> string load(file) -> object lo...
bsd-2-clause
ravindrapanda/tensorflow
tensorflow/python/ops/numerics.py
5
4094
# 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
perkinslr/pypyjs
website/js/pypy.js-0.2.0/lib/modules/pyrepl/unicodedata_.py
14
3391
try: from unicodedata import * except ImportError: def category(ch): """ ASCII only implementation """ if type(ch) is not unicode: raise TypeError if len(ch) != 1: raise TypeError return _categories.get(ord(ch), 'Co') # "Other, private use...
mit
spatialdev/onadata
onadata/apps/logger/migrations/0001_initial.py
13
9504
# 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 model 'XForm' db.create_table('odk_logger_xform', ( ('id', self.gf('django.db.models....
bsd-2-clause
pasqualguerrero/django
tests/validation/tests.py
301
8536
from __future__ import unicode_literals from django import forms from django.core.exceptions import NON_FIELD_ERRORS from django.test import TestCase from django.utils.functional import lazy from . import ValidationTestCase from .models import ( Article, Author, GenericIPAddressTestModel, GenericIPAddrUnpackUniqu...
bsd-3-clause
connorimes/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/mod_pywebsocket/handshake/_base.py
652
6143
# Copyright 2012, 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...
mpl-2.0
calfonso/ansible
lib/ansible/modules/network/f5/bigip_gtm_facts.py
24
31047
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (c) 2017 F5 Networks 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.1', ...
gpl-3.0
ppwwyyxx/tensorflow
tensorflow/python/kernel_tests/self_adjoint_eig_op_test.py
4
9480
# 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
persandstrom/home-assistant
homeassistant/components/device_tracker/thomson.py
9
4023
""" Support for THOMSON routers. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/device_tracker.thomson/ """ import logging import re import telnetlib import voluptuous as vol import homeassistant.helpers.config_validation as cv from homeassistant.compo...
apache-2.0
renzhn/Wox
PythonHome/Lib/site-packages/requests/packages/urllib3/util/timeout.py
303
9236
from socket import _GLOBAL_DEFAULT_TIMEOUT import time from ..exceptions import TimeoutStateError def current_time(): """ Retrieve the current time, this function is mocked out in unit testing. """ return time.time() _Default = object() # The default timeout to use for socket connections. This is t...
mit
Nick-OpusVL/odoo
addons/crm/wizard/crm_merge_opportunities.py
333
4562
############################################################################## # # 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 Affero General Public L...
agpl-3.0
Bang3DEngine/Bang
Compile/CompileDependencies/ThirdParty/assimp/port/PyAssimp/pyassimp/structs.py
4
34579
#-*- coding: UTF-8 -*- from ctypes import POINTER, c_void_p, c_int, c_uint, c_char, c_float, Structure, c_char_p, c_double, c_ubyte, c_size_t, c_uint32 class Vector2D(Structure): """ See 'aiVector2D.h' for details. """ _fields_ = [ ("x", c_float),("y", c_float), ] class Matrix...
lgpl-3.0
mbrucher/ATK-plugins
ATKSideChainExpander/update_version.py
1
4495
#!/usr/bin/python # this script will update the versions in plist and installer files to match that in resource.h import plistlib, os, datetime, fileinput, glob, sys, string scriptpath = os.path.dirname(os.path.realpath(__file__)) def replacestrs(filename, s, r): files = glob.glob(filename) for line in filein...
bsd-3-clause
vladmm/intellij-community
python/helpers/pydev/third_party/pep8/pep8.py
43
75838
#!/usr/bin/env python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006-2009 Johann C. Rocholl <johann@rocholl.net> # Copyright (C) 2009-2014 Florent Xicluna <florent.xicluna@gmail.com> # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this soft...
apache-2.0
rdhyee/nypl50
gitenberg_utils.py
1
34668
from __future__ import print_function __all__ = ['GitenbergJob', 'GitenbergTravisJob', 'ForkBuildRepo', 'BuildRepo', 'BuildRepo2'] # import github3.py from abc import ABCMeta, abstractmethod import base64 import time, datetime from itertools import islice import re import sys import traceback import yaml from coll...
apache-2.0
ravibhure/ansible
lib/ansible/plugins/callback/oneline.py
44
3309
# (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
tingzhao/branchtest
neurolabi/gui/ext/gtest/test/gtest_uninitialized_test.py
2901
2480
#!/usr/bin/env python # # Copyright 2008, 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...
bsd-3-clause
Juanvulcano/zulip
zerver/models.py
1
58087
from __future__ import absolute_import from typing import Any, Dict, List, Set, Tuple, TypeVar, Text, \ Union, Optional, Sequence, AbstractSet, Pattern, AnyStr from typing.re import Match from zerver.lib.str_utils import NonBinaryStr from django.db import models from django.db.models.query import QuerySet from dja...
apache-2.0
graetzer/arangodb
3rdParty/V8/v5.7.0.0/tools/gyp/test/lib/TestCommon.py
23
21747
""" TestCommon.py: a testing framework for commands and scripts with commonly useful error handling The TestCommon module provides a simple, high-level interface for writing tests of executable commands and scripts, especially commands and scripts that interact with the file system. All methods throw...
apache-2.0
akopich/spark
examples/src/main/python/mllib/latent_dirichlet_allocation_example.py
128
2189
# # 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
ilo10/scikit-learn
sklearn/qda.py
140
7682
""" Quadratic Discriminant Analysis """ # Author: Matthieu Perrot <matthieu.perrot@gmail.com> # # License: BSD 3 clause import warnings import numpy as np from .base import BaseEstimator, ClassifierMixin from .externals.six.moves import xrange from .utils import check_array, check_X_y from .utils.validation import ...
bsd-3-clause
Percona-QA/percona-qa
pxc-tests/percona-xtradb-cluster-tests/sst/python/subunit/iso8601.py
50
4578
# Copyright (c) 2007 Michael Twomey # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # d...
gpl-2.0
edulramirez/nova
nova/tests/unit/cells/test_cells_filters.py
52
9638
# Copyright (c) 2012-2013 Rackspace Hosting # 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 # # Unles...
apache-2.0
consulo/consulo-mercurial
src/test/resources/bin/mercurial/diffhelpers.py
96
1566
# diffhelpers.py - pure Python implementation of diffhelpers.c # # Copyright 2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. def addlines(fp, hunk, lena, lenb, a, b): while True: ...
apache-2.0
rkokkelk/CouchPotatoServer
libs/xmpp/transports.py
89
15453
## transports.py ## ## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov ## ## 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, or (at your option) ## any later versi...
gpl-3.0
jusdng/odoo
openerp/tools/misc.py
62
45907
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2010-2014 OpenERP s.a. (<http://openerp.com>). # # This program is free software: you ca...
agpl-3.0
JPO1/vincent
vincent/legends.py
9
2425
# -*- coding: utf-8 -*- """ Legend: Classes to define Vega Legends """ from __future__ import (print_function, division) from .core import grammar, GrammarClass from .properties import PropertySet from ._compat import str_types class LegendProperties(GrammarClass): """Sets of Legend Properties. These prope...
mit
rcrowder/nupic
external/linux32/lib/python2.6/site-packages/matplotlib/backends/backend_wx.py
69
77038
from __future__ import division """ backend_wx.py A wxPython backend for matplotlib, based (very heavily) on backend_template.py and backend_gtk.py Author: Jeremy O'Donoghue (jeremy@o-donoghue.com) Derived from original copyright work by John Hunter (jdhunter@ace.bsd.uchicago.edu) Copyright (C) Jeremy O'Don...
agpl-3.0
alfasin/st2
st2common/tests/unit/test_validator_mistral.py
9
11193
# Licensed to the StackStorm, Inc ('StackStorm') 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 use th...
apache-2.0
flv0/qutebrowser
qutebrowser/misc/lineparser.py
7
9568
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 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
aign/got-your-back
rsa/_version133.py
82
11764
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Un...
apache-2.0
carl-mastrangelo/grpc
examples/python/interceptors/default_value/helloworld_pb2_grpc.py
148
1331
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import helloworld_pb2 as helloworld__pb2 class GreeterStub(object): """The greeting service definition. """ def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel. """ self.SayHello = c...
apache-2.0
maxwen/android_kernel_oppo_n1
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
jimyx17/jimh
lib/requests/packages/chardet2/universaldetector.py
25
6729
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer....
gpl-3.0
kennedyshead/home-assistant
tests/components/nightscout/test_init.py
2
1361
"""Test the Nightscout config flow.""" from unittest.mock import patch from aiohttp import ClientError from homeassistant.components.nightscout.const import DOMAIN from homeassistant.config_entries import ConfigEntryState from homeassistant.const import CONF_URL from tests.common import MockConfigEntry from tests.co...
apache-2.0
travisfcollins/gnuradio
gr-digital/examples/example_timing.py
49
9180
#!/usr/bin/env python # # Copyright 2011-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 optio...
gpl-3.0
mnuthan1/workflow
lib/python2.7/site-packages/setuptools/tests/__init__.py
412
12582
"""Tests for the 'setuptools' package""" import sys import os import unittest from setuptools.tests import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError from distutils.core import Extension fr...
apache-2.0
kelle/astropy
astropy/stats/circstats.py
2
17037
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ This module contains simple functions for dealing with circular statistics, for instance, mean, variance, standard deviation, correlation coefficient, and so on. This module also cover tests of uniformity, e.g., the Rayleigh and V tests. The Maximum L...
bsd-3-clause
StrellaGroup/erpnext
erpnext/patches/v11_0/inter_state_field_for_gst.py
8
3196
from __future__ import unicode_literals import frappe from erpnext.regional.india.setup import make_custom_fields def execute(): company = frappe.get_all('Company', filters = {'country': 'India'}) if not company: return frappe.reload_doc("hr", "doctype", "Employee Tax Exemption Declaration") frappe.reload_doc("...
gpl-3.0
bcheung92/Paperproject
gem5/src/cpu/o3/O3Checker.py
69
1724
# Copyright (c) 2007 The Regents of The University of Michigan # 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 ...
mit
ceejatec/git-repo
git_refs.py
68
3907
# # Copyright (C) 2009 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
Mazecreator/tensorflow
tensorflow/contrib/ndlstm/python/misc_test.py
93
2875
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable ...
apache-2.0
icclab/vm-reliability-tester
test_measurer.py
1
3027
# -*- coding: utf-8 -*- """ Created on Mon Mar 02 15:47:37 2015 @author: Konstantin """ import configparser, os, csv from fabric.api import env, execute, task, get import cuisine import vm_control @task def upload_file(remote_location, local_location, sudo=False): cuisine.file_upload(remote_locatio...
mit
TheVirtualLtd/bda.plone.orders
src/bda/plone/orders/vocabularies.py
1
4059
# -*- coding: utf-8 -*- from bda.plone.orders import interfaces as ifaces from bda.plone.orders import message_factory as _ from bda.plone.orders.common import get_all_vendors from bda.plone.orders.common import get_order from bda.plone.orders.common import get_vendor_order_uids_for from bda.plone.orders.common import ...
bsd-3-clause
saltastro/pysalt
lib/saltsafemysql.py
1
19962
################################# LICENSE ################################## # Copyright (c) 2009, South African Astronomical Observatory (SAAO) # # All rights reserved. # # # # Redistribu...
bsd-3-clause
mtp1376/youtube-dl
youtube_dl/extractor/aftonbladet.py
8
2528
# encoding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor class AftonbladetIE(InfoExtractor): _VALID_URL = r'^http://tv\.aftonbladet\.se/webbtv.+?(?P<video_id>article[0-9]+)\.ab(?:$|[?#])' _TEST = { 'url': 'http://tv.aftonbladet.se/webbtv/nyheter/vetenskap/rymden/art...
unlicense
rdbwebster/ansible-modules-extras
system/facter.py
91
1614
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of...
gpl-3.0
agoravoting/frestq
frestq/utils.py
1
12596
# -*- coding: utf-8 -*- # This file is part of frestq. # Copyright (C) 2013-2020 Agora Voting SL <contact@nvotes.com> # frestq is free software: you can redistribute it and/or modify # it under the terms of the GNU Lesser General Public License as published by # the Free Software Foundation, either version 3 of the ...
lgpl-3.0
Cheppers/zulip
zerver/management/commands/bulk_change_user_name.py
115
1120
from __future__ import absolute_import from django.core.management.base import BaseCommand from zerver.lib.actions import do_change_full_name from zerver.models import UserProfile, get_user_profile_by_email class Command(BaseCommand): help = """Change the names for many users.""" def add_arguments(self, par...
apache-2.0
shaqfu786/android_kernel_lge_omap4-common
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
1927
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
gpl-2.0
Lektorium-LLC/edx-platform
common/lib/sandbox-packages/verifiers/draganddrop.py
197
15116
""" Grader of drag and drop input. Client side behavior: user can drag and drop images from list on base image. Then json returned from client is: { "draggable": [ { "image1": "t1" }, { "ant": "t2" }, { "molecule": "t3" }, ] } values are target names. or: { "dra...
agpl-3.0
kevinmel2000/sl4a
python/src/Demo/tkinter/guido/ManPage.py
43
6856
# Widget to display a man page import re from Tkinter import * from Tkinter import _tkinter from ScrolledText import ScrolledText # XXX These fonts may have to be changed to match your system BOLDFONT = '*-Courier-Bold-R-Normal-*-120-*' ITALICFONT = '*-Courier-Medium-O-Normal-*-120-*' # XXX Recognizing footers is sy...
apache-2.0
mm250/TiFramework
plugins/ti.alloy/plugin.py
229
4668
import os, sys, subprocess, hashlib import subprocess def check_output(*popenargs, **kwargs): r"""Run command with arguments and return its output as a byte string. Backported from Python 2.7 as it's implemented as pure python on stdlib. >>> check_output(['/usr/bin/python', '--version']) Python 2.6....
apache-2.0
magic0704/python-keystoneclient
keystoneclient/auth/conf.py
6
4237
# 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
globocom/database-as-a-service
dbaas/physical/migrations/0103_auto__add_field_environment_stage__add_field_environment_provisioner.py
1
34135
# -*- coding: utf-8 -*- from south.utils import datetime_utils as 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 'Environment.stage' db.add_column(u'physical_environment',...
bsd-3-clause
mattcaldwell/pip
pip/_vendor/html5lib/treewalkers/genshistream.py
1730
2278
from __future__ import absolute_import, division, unicode_literals from genshi.core import QName from genshi.core import START, END, XML_NAMESPACE, DOCTYPE, TEXT from genshi.core import START_NS, END_NS, START_CDATA, END_CDATA, PI, COMMENT from . import _base from ..constants import voidElements, namespaces class ...
mit
40223101/2015cda_0505
static/Brython3.1.0-20150301-090019/Lib/posixpath.py
722
14212
"""Common operations on Posix pathnames. Instead of importing this module directly, import os and refer to this module as os.path. The "os.path" name is an alias for this module on Posix systems; on other systems (e.g. Mac, Windows), os.path provides the same operations in a manner specific to that platform, and is a...
gpl-3.0
ojengwa/odoo
addons/hr_payroll_account/__init__.py
433
1116
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0
origingod/sina-weibo-auto-login
weibo1.py
3
11984
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '1.0' __author__ = 'Liao Xuefeng (askxuefeng@gmail.com)' ''' Python client SDK for sina weibo API using OAuth 1.0 ''' try: import json except ImportError: import simplejson as json import time import hmac import uuid import base64 import urllib impo...
apache-2.0
awohns/selection
python_lib/lib/python3.4/site-packages/pip/_vendor/requests/packages/charade/universaldetector.py
200
6664
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
ingenieroariel/geonode
geonode/maps/management/commands/fix_baselayers.py
24
1412
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
gpl-3.0
emakris1/Testing
Python/int_test.py
1
1697
#!/usr/bin/python2 choice = 0 cur_val_pow = 0 min_val_pow = 0 max_val_pow = 9750 cur_pct_pow = 0 min_pct_pow = 0 max_pct_pow = 100 while choice != -1: choice = int(input('Are you entering a (1) Power Percentage or a (2) Power Value? (Enter -1 to quit): ')) if choice == -1: break elif choice == 1: ...
mit
ashwin713/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/packages/ssl_match_hostname/__init__.py
426
2174
"""The match_hostname() function from Python 3.2, essential when using SSL.""" import re __version__ = '3.2.2' class CertificateError(ValueError): pass def _dnsname_to_pat(dn): pats = [] for frag in dn.split(r'.'): if frag == '*': # When '*' is a fragment by itself, it matches a non-...
lgpl-2.1
alex/tablib
tablib/packages/odf3/odf2xhtml.py
56
65058
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (C) 2006-2010 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 ...
mit
luiscarlosgph/nas
env/lib/python2.7/site-packages/django/contrib/admin/helpers.py
53
14115
from __future__ import unicode_literals from django import forms from django.contrib.admin.utils import (flatten_fieldsets, lookup_field, display_for_field, label_for_field, help_text_for_field) from django.contrib.admin.templatetags.admin_static import static from django.core.exceptions import ObjectDoesNotExist ...
mit
schwancr/pdbfetcher
setup.py
1
5152
"""PDBFetcher: A simple python API for querying the RCSB PDB and downloading PDB files""" from __future__ import print_function from __future__ import division from __future__ import absolute_import DOCLINES = __doc__.split("\n") import os import sys import tempfile import shutil import subprocess from glob import ...
mit
cgranade/qutip
qutip/tests/test_countstat.py
5
3705
# This file is part of QuTiP: Quantum Toolbox in Python. # # Copyright (c) 2011 and later, Paul D. Nation and Robert J. Johansson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: ...
bsd-3-clause
AkihikoITOH/capybara
capybara/virtualenv/lib/python2.7/site-packages/flask/testsuite/__init__.py
564
7022
# -*- coding: utf-8 -*- """ flask.testsuite ~~~~~~~~~~~~~~~ Tests Flask itself. The majority of Flask is already tested as part of Werkzeug. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import print_function import os import sys im...
mit
luo66/scikit-learn
examples/manifold/plot_mds.py
261
2616
""" ========================= Multi-dimensional scaling ========================= An illustration of the metric and non-metric MDS on generated noisy data. The reconstructed points using the metric MDS and non metric MDS are slightly shifted to avoid overlapping. """ # Author: Nelle Varoquaux <nelle.varoquaux@gmail....
bsd-3-clause
ParsonsAMT/Myne
datamining/apps/reporting/views.py
1
25120
from django.shortcuts import get_object_or_404, render_to_response from django.template.context import RequestContext from datamining.apps.reporting.models import Committee, Affiliation, Role,\ Meeting, Authority from datamining.apps.profiles.models import Person, Invitation, School,\ Organization from haystack...
agpl-3.0
flavour/eden
modules/unit_tests/s3/s3timeplot.py
5
74575
# -*- coding: utf-8 -*- # # Time Plot Unit Tests # # To run this script use: # python web2py.py -S eden -M -R applications/eden/modules/unit_tests/s3/s3timeplot.py # import datetime import random import unittest import dateutil.tz from gluon import * from s3.s3timeplot import * from s3.s3timeplot import tp_datetime fr...
mit
arifsetiawan/edx-platform
lms/djangoapps/mobile_api/social_facebook/preferences/views.py
86
1597
""" Views for users sharing preferences """ from rest_framework import generics, status from rest_framework.response import Response from openedx.core.djangoapps.user_api.preferences.api import get_user_preferences, set_user_preference from ...utils import mobile_view from . import serializers @mobile_view() class ...
agpl-3.0
Geeglee/scrapy
tests/test_exporters.py
100
14139
from __future__ import absolute_import import re import json import unittest from io import BytesIO from six.moves import cPickle as pickle import lxml.etree from scrapy.item import Item, Field from scrapy.utils.python import to_unicode from scrapy.exporters import ( BaseItemExporter, PprintItemExporter, PickleIt...
bsd-3-clause
mancoast/CPythonPyc_test
cpython/278_test_cmd_line_script.py
72
9577
# Tests command line execution of scripts import unittest import os import os.path import test.test_support from test.script_helper import (run_python, temp_dir, make_script, compile_script, assert_python_failure, make_pkg, ...
gpl-3.0
amondot/QGIS
python/ext-libs/pygments/lexers/_clbuiltins.py
370
14015
# -*- coding: utf-8 -*- """ pygments.lexers._clbuiltins ~~~~~~~~~~~~~~~~~~~~~~~~~~~ ANSI Common Lisp builtins. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ BUILTIN_FUNCTIONS = [ # 638 functions '<', '<=', '=', '>', '>=', '-', '...
gpl-2.0
sintefmath/Splipy
splipy/Volume.py
1
6056
# -*- coding: utf-8 -*- from splipy import BSplineBasis, SplineObject from splipy.utils import ensure_listlike, check_direction, sections from itertools import chain import numpy as np __all__ = ['Volume'] class Volume(SplineObject): """Volume() Represents a volume: an object with a three-dimensional param...
gpl-3.0