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
NL66278/odoo
addons/survey_crm/survey.py
385
2051
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
agpl-3.0
ghorn/debian-casadi
experimental/joris/scp.py
1
2985
# # This file is part of CasADi. # # CasADi -- A symbolic framework for dynamic optimization. # Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl, # K.U. Leuven. All rights reserved. # Copyright (C) 2011-2014 Greg Horn # # CasADi is free software; you can...
lgpl-3.0
lanyuwen/openthread
tests/toranj/test-035-child-timeout-large-data-poll.py
9
3450
#!/usr/bin/env python3 # # Copyright (c) 2019, The OpenThread Authors. # 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 # ...
bsd-3-clause
sputnick-dev/weboob
modules/meteofrance/test.py
4
1336
# -*- coding: utf-8 -*- # Copyright(C) 2010-2011 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
agpl-3.0
icodedev7/customap
devkit/mingw/bin/lib/email/errors.py
468
1628
# Copyright (C) 2001-2006 Python Software Foundation # Author: Barry Warsaw # Contact: email-sig@python.org """email package exception classes.""" class MessageError(Exception): """Base class for errors in the email package.""" class MessageParseError(MessageError): """Base class for message parsing erro...
mit
ghyde/letsencrypt
acme/acme/jose/__init__.py
60
1573
"""Javascript Object Signing and Encryption (jose). This package is a Python implementation of the stadards developed by IETF `Javascript Object Signing and Encryption (Active WG)`_, in particular the following RFCs: - `JSON Web Algorithms (JWA)`_ - `JSON Web Key (JWK)`_ - `JSON Web Signature (JWS)`_ .. _`Jav...
apache-2.0
xuerenlv/scrapy
scrapy/http/response/text.py
98
4038
""" This module implements the TextResponse class which adds encoding handling and discovering (through HTTP headers) to base Response class. See documentation in docs/topics/request-response.rst """ import six from six.moves.urllib.parse import urljoin from w3lib.encoding import html_to_unicode, resolve_encoding, \...
bsd-3-clause
CyanogenMod/android_kernel_xiaomi_cancro
tools/perf/scripts/python/check-perf-trace.py
11214
2503
# perf script event handlers, generated by perf script -g python # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # This script tests basic functionality such as flag and symbol # strings, common_xxx() calls back into perf, begin, end, unhandled # events, etc. ...
gpl-2.0
RuudBurger/CouchPotatoServer
libs/pyutil/test/current/json_tests/test_pass1.py
106
1814
from unittest import TestCase from pyutil import jsonutil as json # from http://json.org/JSON_checker/test/pass1.json JSON = r''' [ "JSON Test Pattern pass1", {"object with 1 member":["array with 1 element"]}, {}, [], -42, true, false, null, { "integer": 1234567890, ...
gpl-3.0
OBIGOGIT/etch
binding-python/runtime/src/main/python/etch/binding/support/Mailbox.py
8
1061
""" # 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...
apache-2.0
EricSB/nupic
src/nupic/encoders/scalarspace.py
40
1946
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
Huyuwei/tvm
python/tvm/relay/op/vision/_vision.py
2
4687
# 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
toontownfunserver/Panda3D-1.9.0
direct/extensions_native/extension_native_helpers.py
4
4052
### Tools __all__ = ["Dtool_ObjectToDict", "Dtool_funcToMethod", "Dtool_PreloadDLL"] import imp, sys, os # The following code exists to work around a problem that exists # with Python 2.5 or greater. # Specifically, Python 2.5 is designed to import files named *.pyd # only; it will not import files named *.dll (or ...
bsd-3-clause
quarckster/cfme_tests
widgetastic_manageiq/expression_editor.py
3
17213
# -*- coding: utf-8 -*- """ The expression editor present in some locations of CFME. """ from functools import partial from selenium.common.exceptions import NoSuchElementException from cfme.utils.wait import wait_for, TimedOutError import re from cfme.utils.pretty import Pretty from widgetastic_patternfly import Inp...
gpl-2.0
walteryang47/ovirt-engine
packaging/setup/plugins/ovirt-engine-setup/ovirt-engine/system/__init__.py
8
1079
# # ovirt-engine-setup -- ovirt engine setup # Copyright (C) 2013-2015 Red Hat, 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 # # Unl...
apache-2.0
aperigault/ansible
test/units/modules/storage/netapp/test_na_ontap_snapshot.py
38
8659
# (c) 2018, NetApp, Inc # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ''' unit tests ONTAP Ansible module: na_ontap_nvme_snapshot''' from __future__ import print_function import json import pytest from units.compat import unittest from units.compat.mock import patch fro...
gpl-3.0
mpare002/HackTech_2017
env/Lib/_weakrefset.py
162
5911
# Access WeakSet through the weakref module. # This code is separated-out because it is needed # by abc.py to load everything else at startup. from _weakref import ref __all__ = ['WeakSet'] class _IterationGuard(object): # This context manager registers itself in the current iterators of the # weak containe...
mit
fitermay/intellij-community
python/helpers/py3only/docutils/examples.py
180
3959
# $Id: examples.py 7320 2012-01-19 22:33:02Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ This module contains practical examples of Docutils client code. Importing this module from client code is not recommended; its contents are subject to c...
apache-2.0
dstftw/youtube-dl
youtube_dl/extractor/vice.py
9
12517
# coding: utf-8 from __future__ import unicode_literals import re import time import hashlib import json import random from .adobepass import AdobePassIE from .youtube import YoutubeIE from .common import InfoExtractor from ..compat import ( compat_HTTPError, compat_str, ) from ..utils import ( ExtractorE...
unlicense
marratj/ansible
lib/ansible/modules/cloud/vmware/vmware_datacenter.py
47
4916
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Joseph Callen <jcallen () csc.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': '1.1', ...
gpl-3.0
cchurch/ansible
lib/ansible/plugins/strategy/debug.py
134
1288
# This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distributed in the hope that ...
gpl-3.0
marcoitur/Freecad_test
src/Doc/sphinx/conf.py
57
9649
# -*- coding: utf-8 -*- #*************************************************************************** #* * #* Copyright (c) 2012 * #* Yorik van Havre <yorik@uncreated.net> ...
lgpl-2.1
hectord/lettuce
tests/integration/lib/Django-1.2.5/django/utils/encoding.py
44
7087
import types import urllib import locale import datetime import codecs from decimal import Decimal from django.utils.functional import Promise class DjangoUnicodeDecodeError(UnicodeDecodeError): def __init__(self, obj, *args): self.obj = obj UnicodeDecodeError.__init__(self, *args) def __str_...
gpl-3.0
kapilt/cloud-custodian
tools/c7n_azure/tests_azure/tests_resources/test_event_subscriptions.py
2
3567
# Copyright 2015-2018 Capital One Services, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed ...
apache-2.0
Krossom/python-for-android
python3-alpha/python3-src/Lib/test/test_userlist.py
66
1722
# Check every path through every method of UserList from collections import UserList from test import support, list_tests class UserListTest(list_tests.CommonTest): type2test = UserList def test_getslice(self): super().test_getslice() l = [0, 1, 2, 3, 4] u = self.type2test(l) ...
apache-2.0
drayanaindra/shoop
shoop/admin/dashboard/blocks.py
4
3567
# -*- coding: utf-8 -*- # This file is part of Shoop. # # Copyright (c) 2012-2015, Shoop Ltd. All rights reserved. # # This source code is licensed under the AGPLv3 license found in the # LICENSE file in the root directory of this source tree. from babel.numbers import format_currency, format_number from django.conf im...
agpl-3.0
drunknbass/plexpy
lib/unidecode/x1d7.py
248
3645
data = ( '', # 0x00 '', # 0x01 '', # 0x02 '', # 0x03 '', # 0x04 '', # 0x05 '', # 0x06 '', # 0x07 '', # 0x08 '', # 0x09 '', # 0x0a '', # 0x0b '', # 0x0c '', # 0x0d '', # 0x0e '', # 0x0f '', # 0x10 '', # 0x11 '', # 0x12 '', # 0x13 '', # 0x14 '', # 0x15 '',...
gpl-3.0
qutebrowser/qutebrowser
scripts/dev/ua_fetch.py
1
2287
#!/usr/bin/env python3 # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: """Fetch and print the most common user agents. This script fetches the most common user agents according to https://github.com/Kikobeats/top-user-agents, and prints the most recent Chrome user agent for Windows, macOS and Linux. """ import ma...
gpl-3.0
sYnfo/samba-1
third_party/waf/wafadmin/Tools/unittestw.py
32
9789
#!/usr/bin/env python # encoding: utf-8 # Carlos Rafael Giani, 2006 """ Unit tests run in the shutdown() method, and for c/c++ programs One should NOT have to give parameters to programs to execute In the shutdown method, add the following code: >>> def shutdown(): ... ut = UnitTest.unit_test() ... ut.run() ......
gpl-3.0
ryfeus/lambda-packs
Tensorflow_LightGBM_Scipy_nightly/source/tensorflow/python/util/deprecation.py
13
15050
# 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
kenlist/chromium_tools_gyp
test/target/gyptest-target.py
241
1109
#!/usr/bin/env python # Copyright (c) 2009 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 simplest-possible build of a "Hello, world!" program using non-default extension. In particular, verifies how target_extension ...
bsd-3-clause
aitorhh/ncclient
ncclient/manager.py
2
10436
# Copyright 2009 Shikhar Bhushan # Copyright 2011 Leonidas Poulopoulos # # 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
aidan-/ansible-modules-extras
network/a10/a10_virtual_server.py
2
11545
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage A10 Networks slb virtual server objects (c) 2014, Mischa Peters <mpeters@a10networks.com>, Eric Chou <ericc@a10networks.com> This file is part of Ansible Ansible is free software: you can redistribute it and/or modify it under the terms of the GN...
gpl-3.0
zimmermant/dlvo_lammps
tools/python/pizza/gnu.py
64
12601
# Pizza.py toolkit, www.cs.sandia.gov/~sjplimp/pizza.html # Steve Plimpton, sjplimp@sandia.gov, Sandia National Laboratories # # Copyright (2005) Sandia Corporation. Under the terms of Contract # DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains # certain rights in this software. This software is...
gpl-2.0
xpansa/pmis
purchase_request/__openerp__.py
1
1861
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Eficent (<http://www.eficent.com/>) # <contact@eficent.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero ...
agpl-3.0
CubicERP/odoo
addons/hr_payroll/report/report_payslip.py
377
1982
#-*- 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 # it...
agpl-3.0
dlazz/ansible
lib/ansible/modules/network/netvisor/pn_vrouterbgp.py
10
15212
#!/usr/bin/python """ PN-CLI vrouter-bgp-add/vrouter-bgp-remove/vrouter-bgp-modify """ # # 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 Lice...
gpl-3.0
Mirantis/solar
solar/test/test_limits.py
4
2537
# Copyright 2015 Mirantis, 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 ...
apache-2.0
vmindru/ansible
lib/ansible/modules/network/netscaler/netscaler_ssl_certkey.py
31
11855
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017 Citrix Systems # 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
CeltonMcGrath/TACTIC
src/pyasm/deprecated/flash/widget/flash_render_wdg.py
6
7359
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
sting47/pocl
lib/kernel/convert_type.py
8
13810
#!/usr/bin/env python3 # OpenCL built-in library: type conversion functions # # Copyright (c) 2013 Victor Oliveira <victormatheus@gmail.com> # Copyright (c) 2013 Jesse Towner <jessetowner@lavabit.com> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated doc...
mit
Debian/openjfx
modules/web/src/main/native/Tools/QueueStatusServer/handlers/queuestatus.py
2
5100
# Copyright (C) 2010 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 ...
gpl-2.0
75651/kbengine_cloud
kbe/src/lib/python/Lib/plat-sunos5/IN.py
108
28152
# Generated by h2py from /usr/include/netinet/in.h # Included from sys/feature_tests.h # Included from sys/isa_defs.h _CHAR_ALIGNMENT = 1 _SHORT_ALIGNMENT = 2 _INT_ALIGNMENT = 4 _LONG_ALIGNMENT = 8 _LONG_LONG_ALIGNMENT = 8 _DOUBLE_ALIGNMENT = 8 _LONG_DOUBLE_ALIGNMENT = 16 _POINTER_ALIGNMENT = 8 _MAX_ALIGNMENT = 16 _A...
lgpl-3.0
vauxoo-dev/stoqdrivers
stoqdrivers/printers/bematech/MP20.py
1
4982
# -*- Mode: Python; coding: iso-8859-1 -*- # vi:si:et:sw=4:sts=4:ts=4 ## ## Stoqdrivers ## Copyright (C) 2009 Async Open Source <http://www.async.com.br> ## All rights reserved ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as publishe...
lgpl-2.1
Distrotech/intellij-community
python/lib/Lib/site-packages/django/contrib/admin/views/main.py
69
10813
from django.contrib.admin.filterspecs import FilterSpec from django.contrib.admin.options import IncorrectLookupParameters from django.contrib.admin.util import quote, get_fields_from_path from django.core.exceptions import SuspiciousOperation from django.core.paginator import Paginator, InvalidPage from django.db impo...
apache-2.0
bancek/egradebook
src/lib/docutils/readers/pep.py
61
1554
# $Id: pep.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. """ Python Enhancement Proposal (PEP) Reader. """ __docformat__ = 'reStructuredText' from docutils.readers import standalone from docutils.transforms import p...
gpl-3.0
crosswalk-project/crosswalk-android-extensions
build/android/gyp/jar.py
13
1776
#!/usr/bin/env python # # 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 fnmatch import optparse import os import sys from util import build_utils from util import md5_check def DoJar(options): ...
bsd-3-clause
trippysalmon/bitcoin
test/functional/nulldummy.py
5
6471
#!/usr/bin/env python3 # Copyright (c) 2016 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 NULLDUMMY softfork. Connect to a single node. Generate 2 blocks (save the coinbases for later). Genera...
mit
40223137/cdag7test37
lego/man/remover.py
36
1524
import os, re regex = re.compile('^(?P<name>.+\..+\.)(?P<version>\d+$)') def remover(path): os.chdir(path) print(path) for root, dlst, flst in os.walk(path): # print('正在處理文件夾<{}>。'.format(root)) maxversion = {} for f in flst: m = regex.match(f) if m: ...
gpl-3.0
zangree/ryu
ryu/tests/unit/ofproto/test_ofproto_v12.py
38
26177
# Copyright (C) 2012 Nippon Telegraph and Telephone Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by appli...
apache-2.0
zentralopensource/zentral
zentral/contrib/mdm/migrations/0020_auto_20180911_2058.py
1
1596
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2018-09-11 20:58 from __future__ import unicode_literals import django.contrib.postgres.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mdm', '0019_auto_20180828_1212'), ] operation...
apache-2.0
adamncasey/servo
tests/wpt/css-tests/tools/py/testing/root/test_xmlgen.py
162
4008
import py from py._xmlgen import unicode, html, raw class ns(py.xml.Namespace): pass def test_escape(): uvalue = py.builtin._totext('\xc4\x85\xc4\x87\n\xe2\x82\xac\n', 'utf-8') class A: def __unicode__(self): return uvalue def __str__(self): x = self.__unicode__() ...
mpl-2.0
KDE/tellico
src/fetch/scripts/dark_horse_comics.py
1
14898
#!/usr/bin/env python # -*- coding: utf-8 -*- # *************************************************************************** # Copyright (C) 2006-2009 Mathias Monnerville <tellico@monnerville.com> # *************************************************************************** # # **************************************...
gpl-2.0
rottenbytes/Sick-Beard
sickbeard/sab.py
40
8100
# Author: Nic Wolfe <nic@wolfeden.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of Sick Beard. # # Sick Beard 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 t...
gpl-3.0
GDGGhana/GDGGhana.github.io
www/lib/jasmine/setup.py
191
1983
from setuptools import setup, find_packages, os import json with open('package.json') as packageFile: version = json.load(packageFile)['version'] setup( name="jasmine-core", version=version, url="http://pivotal.github.io/jasmine/", author="Pivotal Labs", author_email="jasmine-js@googlegroups.com...
apache-2.0
hexlism/css_platform
sleepyenv/lib/python2.7/site-packages/boto-2.38.0-py2.7.egg/boto/ses/exceptions.py
151
1830
""" Various exceptions that are specific to the SES module. """ from boto.exception import BotoServerError class SESError(BotoServerError): """ Sub-class all SES-related errors from here. Don't raise this error directly from anywhere. The only thing this gets us is the ability to catch SESErrors separ...
apache-2.0
ahaym/eden
controllers/gis.py
8
148225
# -*- coding: utf-8 -*- """ GIS Controllers """ module = request.controller resourcename = request.function # Compact JSON encoding SEPARATORS = (",", ":") # ----------------------------------------------------------------------------- def index(): """ Module's Home Page: Show the Main map """ ...
mit
jonaprieto/agda-pkg
apkg/commands/list.py
1
3039
''' apkg ~~~~ A package manager for Agda. ''' # ---------------------------------------------------------------------------- import click import logging import click_log as clog from operator import attrgetter, itemgetter from pony.orm import db_session, select from natsort ...
mit
raccoongang/xblock-video
video_xblock/backends/wistia.py
1
11501
# -*- coding: utf-8 -*- """ Wistia Video player plugin. """ import HTMLParser import json import httplib import logging import re import requests import babelfish from video_xblock import BaseVideoPlayer from video_xblock.constants import TranscriptSource from video_xblock.utils import ugettext as _ log = logging.g...
gpl-3.0
tbttfox/TwistyTools
ttLib/ttRegion.py
1
6597
#!/usr/bin/python from __future__ import division from ttPoint import TINYNUM,Point,cross,matMul,angle,distance2,cart2uv from ttPlane import pointDistPlane from ttTriangle import Triangle from ttSphere import Sphere from ttBase import TTBase from Draw.DrawRegion import DrawRegion class Region(TTBase): def __init...
gpl-3.0
danieljjh/oppia
utils_test.py
29
5762
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
apache-2.0
moyogo/nototools
nototools/subset_font_cmap.py
3
3530
#!/usr/bin/env python # # Copyright 2016 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 require...
apache-2.0
otherness-space/myProject002
my_project_002/lib/python2.7/site-packages/pip/_vendor/progress/counter.py
404
1529
# -*- 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
fizzaly/qgroundcontrol
.ycm_extra_conf.py
42
5293
# This file is NOT licensed under the GPLv3, which is the license for the rest # of YouCompleteMe. # # Here's the license text for this file: # # This is free and unencumbered software released into the public domain. # # Anyone is free to copy, modify, publish, use, compile, sell, or # distribute this software, either...
agpl-3.0
CiscoSystems/neutron
neutron/db/migration/alembic_migrations/versions/2eeaf963a447_floatingip_status.py
17
1488
# Copyright 2014 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Lab603/PicEncyclopedias
jni-build/jni-build/jni/include/tensorflow/python/training/adadelta.py
40
3494
# 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
daevaorn/sentry
src/sentry/migrations/0043_auto__chg_field_option_value__chg_field_projectoption_value.py
36
16655
# 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): # Changing field 'Option.value' db.alter_column('sentry_option', 'value', self.gf('picklefield.fields.PickledObjec...
bsd-3-clause
lancezlin/ml_template_py
lib/python2.7/site-packages/setuptools/command/upload_docs.py
110
7275
# -*- coding: utf-8 -*- """upload_docs Implements a Distutils 'upload_docs' subcommand (upload documentation to PyPI's pythonhosted.org). """ from base64 import standard_b64encode from distutils import log from distutils.errors import DistutilsOptionError import os import socket import zipfile import tempfile import ...
mit
xuleiboy1234/autoTitle
tensorflow/tensorflow/contrib/keras/python/keras/layers/noise.py
19
5875
# 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
lin-credible/scikit-learn
sklearn/svm/tests/test_sparse.py
95
12156
from nose.tools import assert_raises, assert_true, assert_false import numpy as np from scipy import sparse from numpy.testing import (assert_array_almost_equal, assert_array_equal, assert_equal) from sklearn import datasets, svm, linear_model, base from sklearn.datasets import make_classif...
bsd-3-clause
henryfjordan/django
tests/template_tests/syntax_tests/test_i18n.py
245
23356
# coding: utf-8 from __future__ import unicode_literals from django.template import TemplateSyntaxError from django.test import SimpleTestCase from django.utils import translation from django.utils.safestring import mark_safe from ..utils import setup class I18nTagTests(SimpleTestCase): libraries = { 'c...
bsd-3-clause
mollstam/UnrealPy
UnrealPyEmbed/Source/Python/Lib/python27/binhex.py
35
14698
"""Macintosh binhex compression/decompression. easy interface: binhex(inputfilename, outputfilename) hexbin(inputfilename, outputfilename) """ # # Jack Jansen, CWI, August 1995. # # The module is supposed to be as compatible as possible. Especially the # easy interface should work "as expected" on any platform. # XXX...
mit
sgiavasis/nipype
nipype/interfaces/semtools/diffusion/tests/test_auto_dtiaverage.py
12
1138
# AUTO-GENERATED by tools/checkspecs.py - DO NOT EDIT from .....testing import assert_equal from ..diffusion import dtiaverage def test_dtiaverage_inputs(): input_map = dict(DTI_double=dict(argstr='--DTI_double ', ), args=dict(argstr='%s', ), environ=dict(nohash=True, usedefault=True, ), ...
bsd-3-clause
Fat-Zer/FreeCAD_sf_master
src/Mod/Fem/femexamples/thermomech_spine.py
9
6411
# *************************************************************************** # * Copyright (c) 2019 Bernd Hahnebach <bernd@bimstatik.org> * # * Copyright (c) 2020 Sudhanshu Dubey <sudhanshu.thethunder@gmail.com * # * * # * Th...
lgpl-2.1
Universal-Model-Converter/UMC3.0a
data/Python/x86/Lib/site-packages/scipy/lib/blas/tests/test_blas.py
4
7946
#!/usr/bin/env python # # Created by: Pearu Peterson, April 2002 # from __future__ import division, print_function, absolute_import __usage__ = """ Build linalg: python setup.py build Run tests if scipy is installed: python -c 'import scipy;scipy.lib.blas.test()' """ import math import warnings from numpy impor...
mit
roscopecoltran/scraper
.staging/meta-engines/xlinkBook/update/update_mergers_and_acquisitions.py
1
10303
#!/usr/bin/env python # -*- coding: utf-8 -*- from spider import * sys.path.append("..") from utils import Utils class MergersAndAcquisitionsSpider(Spider): def __init__(self): Spider.__init__(self) self.school = 'wiki' def processMergers(self): utils = Utils() wiki_dict = {'...
mit
RobinQuetin/CAIRIS-web
cairis/cairis/AssetsDialog.py
1
2963
# 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...
apache-2.0
lhirschfeld/JargonBot
custombot.py
1
3061
import pickle import praw import random from textblob import TextBlob from datetime import datetime from sklearn import linear_model class RedditBot: """A class that performs basic operations, working with Reddit's PRAW API.""" def __init__(self, botName): # Setup the bot and primary variables. ...
mit
aburan28/elements
contrib/sidechain-manipulation.py
5
10942
#!/usr/bin/env python2 import sys, os, traceback sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "../../python-bitcoinrpc")) from bitcoinrpc.authproxy import AuthServiceProxy, JSONRPCException from decimal import * # VARIOUS SETTINGS... sidechain_url = "http://user:pass@127.0.0.1:4241" bitcoi...
mit
mheap/ansible
lib/ansible/modules/files/tempfile.py
66
3141
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Krzysztof Magosa <krzysztof@magosa.pl> # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = t...
gpl-3.0
wanliming11/MurlocAlgorithms
Last/OpenSource/Python-3.6.1/Tools/scripts/reindent.py
50
11515
#! /usr/bin/env python3 # Released to the public domain, by Tim Peters, 03 October 2000. """reindent [-d][-r][-v] [ path ... ] -d (--dryrun) Dry run. Analyze, but don't make any changes to, files. -r (--recurse) Recurse. Search for all .py files in subdirectories too. -n (--nobackup) No backup. Does not make ...
mit
JCA-Developpement/Odoo
addons/stock_landed_costs/product.py
364
1611
# -*- 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
toomore/grs
tools/make_twse_list.py
1
3616
# -*- coding: utf-8 -*- import csv import re import urllib2 from datetime import datetime NOW = datetime(2013, 12, 17) SAVEPATH = '../grs/twse_list.csv' INDUSTRYCODE = '../grs/industry_code.csv' TWSEURL = 'http://www.twse.com.tw/ch/trading/exchange/MI_INDEX/MI_INDEX2_print.php?genpage=genpage/Report%(year)s%(mon)02d...
mit
lakshayg/tensorflow
tensorflow/contrib/framework/python/framework/__init__.py
61
1529
# 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
snakeztc/NeuralDialog-CVAE
config_utils.py
1
1880
# Copyright (C) 2017 Tiancheng Zhao, Carnegie Mellon University class KgCVAEConfig(object): description= None use_hcf = True # use dialog act in training (if turn off kgCVAE -> CVAE) update_limit = 3000 # the number of mini-batch before evaluating the model # how to encode utterance. # bow: ...
apache-2.0
noikiy/electron
script/cpplint.py
13
1364
#!/usr/bin/env python import fnmatch import os import sys from lib.util import execute IGNORE_FILES = [ os.path.join('atom', 'browser', 'mac', 'atom_application.h'), os.path.join('atom', 'browser', 'mac', 'atom_application_delegate.h'), os.path.join('atom', 'browser', 'resources', 'win', 'resource.h'), os.pa...
mit
wemanuel/smry
smry/server-auth/ls/google-cloud-sdk/platform/gsutil/third_party/boto/tests/unit/sqs/test_queue.py
113
1944
# Copyright (c) 2013 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 restriction, including # without limitation the rights ...
apache-2.0
ict-felix/stack
modules/resource/orchestrator/src/extensions/sfa/util/enumeration.py
31
1653
#---------------------------------------------------------------------- # Copyright (c) 2008 Board of Trustees, Princeton University # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and/or hardware specification (the "Work") to # deal in the Work without restriction, i...
apache-2.0
gangadharkadam/v4_frappe
frappe/website/permissions.py
28
2434
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe def remove_empty_permissions(): permissions_cache_to_be_cleared = frappe.db.sql_list("""select distinct user from `tabWebsite Route Permission` where ifnull...
mit
RPGOne/scikit-learn
examples/decomposition/plot_pca_vs_fa_model_selection.py
70
4523
""" =============================================================== Model selection with Probabilistic PCA and Factor Analysis (FA) =============================================================== Probabilistic PCA and Factor Analysis are probabilistic models. The consequence is that the likelihood of new data can be u...
bsd-3-clause
UMD-DRASTIC/drastic
tests/test_user.py
1
1769
import unittest from drastic.models.user import User from drastic.models.group import Group from drastic.models.errors import UserConflictError from nose.tools import raises class UserTest(unittest.TestCase): _multiprocess_can_split_ = True def test_create(self): user = User.create(username="test", ...
agpl-3.0
iulian787/spack
var/spack/repos/builtin/packages/r-coin/package.py
5
1447
# 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 RCoin(RPackage): """Conditional inference procedures for the general independence problem ...
lgpl-2.1
ga4gh/server
ga4gh/server/configtest.py
16
1913
""" Tests for the server configuration. Run via configtest_dev.py Tests are standard python unittest tests. """ from __future__ import division from __future__ import print_function from __future__ import unicode_literals import unittest import flask import os class TestConfig(unittest.TestCase): """ This c...
apache-2.0
hsnlab/mapping
alg1/utils/BatchTest-params.py
2
6737
# Copyright 2017 Balazs Nemeth # # 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, s...
apache-2.0
fapable/pygameproject2
Board/RAMON_DISASTER (1).py
1
37742
import math import pygame import random attack = pygame.image.load('Attack.png') chance = pygame.image.load('Chance1.png') normale = pygame.image.load('Normale.png') politie = pygame.image.load('Politielijn.png') politiec = pygame.image.load('PolitielijnChance.png') landmark = pygame.image.load('Powerup.png')...
apache-2.0
chukong/sdkbox-facebook-sample-v2
samples/Lua/TestLua/proj.marmalade/cccopy.py
16
1647
import os import shutil from optparse import OptionParser def cccopy(sourcePath, destPath): for root, dirs, files in os.walk(sourcePath): #figure out where we're going dest = destPath + root.replace(sourcePath, '') destAbsPath = os.path.abspath(destPath) #if we're in a directory tha...
mit
tumdum/bittornado
BitTornado/BTcrypto.py
4
3099
# Written by John Hoffman # based on code by Uoti Urpala # see LICENSE.txt for license information from __future__ import generators # for python 2.2 from random import randrange,randint,seed try: from os import urandom except: seed() urandom = lambda x: ''.join([chr(randint(0,255)) for i in xrange(x)]) ...
mit
kelseyoo14/Wander
venv_2_7/lib/python2.7/site-packages/IPython/core/inputtransformer.py
8
18001
"""Input transformer classes to support IPython special syntax. This includes the machinery to recognise and transform ``%magic`` commands, ``!system`` commands, ``help?`` querying, prompt stripping, and so forth. """ import abc import functools import re from IPython.core.splitinput import LineInfo from IPython.util...
artistic-2.0
TheAnou/Cobra
apps/public/views/product_ranking.py
2
3589
from math import log, pow, e from django.db.models import Avg from django.utils import timezone from apps.public.models import Rating from apps.public.models.ranking import Ranking from apps.admin.utils.exception_handling import ExceptionHandler WEIGHTS = {'photography': 14, 'price': 5, 'ap...
gpl-2.0
LionelDupuy/ARCHI_PHEN
ImageJ/DatabaseInput_deprecated.py
1
5558
import time from datetime import date import numpy from PIL import Image import zbar import os,sys import wx # GUI # Handle time lapse! scanner = zbar.ImageScanner() # configure the reader scanner.parse_config('enable') #scanner.set_config(0, zbar.Config.ENABLE, 0) #scanner.set_conf...
mit