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 |
|---|---|---|---|---|---|
psathyrella/partis-deprecated | packages/ighutil/python/versioneer.py | 6 | 27828 | #! /usr/bin/python
"""versioneer.py
(like a rocketeer, but for versions)
* https://github.com/warner/python-versioneer
* Brian Warner
* License: Public Domain
* Version: 0.8+
This file helps distutils-based projects manage their version number by just
creating version-control tags.
For developers who work from a V... | gpl-3.0 |
manipopopo/tensorflow | tensorflow/python/saved_model/tag_constants.py | 20 | 1516 | # 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 |
javilonas/Thoth-SM-N9005-Sammy | scripts/tracing/draw_functrace.py | 14676 | 3560 | #!/usr/bin/python
"""
Copyright 2008 (c) Frederic Weisbecker <fweisbec@gmail.com>
Licensed under the terms of the GNU GPL License version 2
This script parses a trace provided by the function tracer in
kernel/trace/trace_functions.c
The resulted trace is processed into a tree to produce a more human
view of the call ... | gpl-2.0 |
AlexanderYAPPO/stackalytics | tests/unit/test_default_data_processor.py | 4 | 4084 | # Copyright (c) 2013 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 agreed to in writi... | apache-2.0 |
zanderle/django | django/utils/baseconv.py | 650 | 2982 | # Copyright (c) 2010 Guilherme Gondim. All rights reserved.
# Copyright (c) 2009 Simon Willison. All rights reserved.
# Copyright (c) 2002 Drew Perttula. All rights reserved.
#
# License:
# Python Software Foundation License version 2
#
# See the file "LICENSE" for terms & conditions for usage, and a DISCLAIMER OF
# ... | bsd-3-clause |
jfemiani/facade-segmentation | pyfacades/util/process_strip.py | 1 | 3952 | import numpy as np
import skimage
from skimage.transform import rescale
def split_tiles(image, shape, overlap=16):
""" Rescale and split the input images to get several overlapping images of a given shape.
*** The inpput must be CHANNELS FIRST ***
The input image is rescaled so that height matches the o... | mit |
bazz-erp/erpnext | erpnext/setup/doctype/authorization_control/authorization_control.py | 29 | 9897 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe.utils import cstr, flt, has_common, comma_or
from frappe import session, _
from erpnext.utilities.transaction_base import Tran... | gpl-3.0 |
FrankBian/kuma | vendor/packages/sqlalchemy/test/aaa_profiling/test_orm.py | 7 | 3012 | from sqlalchemy.test.testing import eq_, assert_raises, \
assert_raises_message
from sqlalchemy import exc as sa_exc, util, Integer, String, ForeignKey
from sqlalchemy.orm import exc as orm_exc, mapper, relationship, \
sessionmaker
from sqlalchemy.test import testing, profiling
from test.orm import _base
from s... | mpl-2.0 |
ddRPB/rpb-server | services/OCStudyEventDefinitionWsService.py | 1 | 6030 | #### ## ## ######## ####### ######## ######## ######
## ### ### ## ## ## ## ## ## ## ## ##
## #### #### ## ## ## ## ## ## ## ##
## ## ### ## ######## ## ## ######## ## ######
## ## ## ## ## ## ## ## ## ##
## ## #... | gpl-3.0 |
wankunde/cloudera_hadoop | dev-support/relnotes.py | 62 | 7865 | #!/usr/bin/python
# 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, sof... | apache-2.0 |
danux/danjd | cv/models.py | 1 | 1371 | # ~*~ coding: utf-8 ~*~
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models
class Skill(models.Model):
"""
A skill has a name and a skill level.
"""
name = models.CharField(max_length=30)
skill_level = models.IntegerField(validators=[MinValueValidat... | mit |
jspricke/python-remind | setup.py | 1 | 1133 | from setuptools import setup
setup(name='remind',
version='0.17.0',
description='Remind Python library',
long_description=open('README.rst').read(),
author='Jochen Sprickerhof',
author_email='remind@jochen.sprickerhof.de',
license='GPLv3+',
url='https://github.com/jspricke/pyt... | gpl-3.0 |
Ballz0fSteel/Umeko | lib/youtube_dl/extractor/ketnet.py | 33 | 2589 | from __future__ import unicode_literals
from .common import InfoExtractor
class KetnetIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ketnet\.be/(?:[^/]+/)*(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://www.ketnet.be/kijken/zomerse-filmpjes',
'md5': 'd907f7b1814ef0fa285c0475d9994ed7',
... | gpl-3.0 |
Lyleo/nupic | tests/integration/nupic/opf/opf_checkpoint_test/opf_checkpoint_test.py | 17 | 16469 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# 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 ... | gpl-3.0 |
rockstor/rockstor-core | src/rockstor/storageadmin/models/network_interface.py | 2 | 9858 | """
Copyright (c) 2012-2020 RockStor, Inc. <http://rockstor.com>
This file is part of RockStor.
RockStor 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 la... | gpl-3.0 |
soarpenguin/ansible | lib/ansible/module_utils/cnos.py | 2 | 133164 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by
# Ansible still belong to the author of the module, and may assign their own
# license to the complete wo... | gpl-3.0 |
mith1979/ansible_automation | applied_python/applied_python/lib/python2.7/site-packages/pyasn1/type/char.py | 172 | 2043 | # ASN.1 "character string" types
from pyasn1.type import univ, tag
class NumericString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImplicitly(
tag.Tag(tag.tagClassUniversal, tag.tagFormatSimple, 18)
)
class PrintableString(univ.OctetString):
tagSet = univ.OctetString.tagSet.tagImpli... | apache-2.0 |
yamada-h/ryu | ryu/lib/of_config/base.py | 7 | 4331 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... | apache-2.0 |
kangkot/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_gdbm.py | 58 | 2501 | import gdbm
import unittest
import os
from test.test_support import verbose, TESTFN, run_unittest, unlink
filename = TESTFN
class TestGdbm(unittest.TestCase):
def setUp(self):
self.g = None
def tearDown(self):
if self.g is not None:
self.g.close()
unlink(filename)
d... | apache-2.0 |
paulballesty/zxcvbn | data-scripts/build_keyboard_adjacency_graphs.py | 9 | 4051 | #!/usr/bin/python
import sys
import simplejson
def usage():
return '''
constructs adjacency_graphs.coffee from QWERTY and DVORAK keyboard layouts
usage:
%s adjacency_graphs.coffee
''' % sys.argv[0]
qwerty = r'''
`~ 1! 2@ 3# 4$ 5% 6^ 7& 8* 9( 0) -_ =+
qQ wW eE rR tT yY uU iI oO pP [{ ]} \|
aA sS dD fF gG... | mit |
rghe/ansible | contrib/inventory/nagios_ndo.py | 42 | 3808 | #!/usr/bin/env python
# (c) 2014, Jonathan Lestrelin <jonathan.lestrelin@gmail.com>
#
# This file is part of Ansible,
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licens... | gpl-3.0 |
balachandrana/pythonista_stash_utilities | catbinascii.py | 1 | 2770 | """ cat bin asccii
Examples:
"""
"""
todo:
__doc__
test examples
"""
import argparse
import fileinput
import os
import re
import sys
import binascii
def main(args):
ap = argparse.ArgumentParser(description=__doc__)
ap.add_argument('files', nargs='*', help='files to be processed')
ap.add_argument('... | mit |
devs1991/test_edx_docmode | lms/djangoapps/shoppingcart/utils.py | 103 | 2782 | """
Utility methods for the Shopping Cart app
"""
from django.conf import settings
from microsite_configuration import microsite
from pdfminer.pdfparser import PDFParser
from pdfminer.pdfdocument import PDFDocument
from pdfminer.pdfinterp import PDFResourceManager, PDFPageInterpreter
from pdfminer.converter import PDF... | agpl-3.0 |
thomazs/geraldo | site/newsite/django_1_0/django/contrib/markup/templatetags/markup.py | 38 | 3646 | """
Set of "markup" template filters for Django. These filters transform plain text
markup syntaxes to HTML; currently there is support for:
* Textile, which requires the PyTextile library available at
http://dealmeida.net/projects/textile/
* Markdown, which requires the Python-markdown library from
... | lgpl-3.0 |
geomagpy/MARTAS | libmqtt/lorawanserver.py | 1 | 7323 | from __future__ import print_function
from __future__ import absolute_import
# ###################################################################
# Import packages
# ###################################################################
from magpy.stream import DataStream, KEYLIST, NUMKEYLIST, subtractStreams
import st... | gpl-3.0 |
kobotoolbox/kpi | kpi/tests/api/v1/test_api_permissions.py | 1 | 5983 | # coding: utf-8
from django.contrib.auth.models import User, Permission
from django.urls import reverse
from django.utils import timezone
from rest_framework import status
from kpi.constants import ASSET_TYPE_COLLECTION
from kpi.models import Asset, ObjectPermission
from kpi.models.object_permission import get_anonymo... | agpl-3.0 |
deepmind/dm_control | dm_control/viewer/user_input_test.py | 1 | 6472 | # Copyright 2018 The dm_control 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 i... | apache-2.0 |
Nepherhotep/django | tests/postgres_tests/test_ranges.py | 98 | 24582 | import datetime
import json
import unittest
from django import forms
from django.core import exceptions, serializers
from django.db import connection
from django.db.models import F
from django.test import TestCase, override_settings
from django.utils import timezone
from . import PostgreSQLTestCase
from .models impor... | bsd-3-clause |
Delgan/w2ui | server/python/bottle/bottle.py | 28 | 143552 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bottle is a fast and simple micro-framework for small web applications. It
offers request dispatching (Routes) with url parameter support, templates,
a built-in HTTP Server and adapters for many third party WSGI/HTTP-server and
template engines - all in a single file an... | mit |
with-git/tensorflow | tensorflow/contrib/grid_rnn/python/ops/grid_rnn_cell.py | 76 | 23199 | # 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 |
albertz/music-player | mac/pyobjc-core/PyObjCTest/test_object_property.py | 2 | 19504 | from __future__ import unicode_literals
from PyObjCTools.TestSupport import *
import objc
import copy
from PyObjCTest.fnd import *
objc.registerMetaDataForSelector(
b"NSObject", b"validateValue:forKey:error:",
dict(
arguments={
2: dict(type_modifier=objc._C_INOUT),
... | bsd-2-clause |
flwh/KK_mt6589_iq451 | prebuilts/python/linux-x86/2.7.5/lib/python2.7/distutils/tests/test_cmd.py | 87 | 3901 | """Tests for distutils.cmd."""
import unittest
import os
from test.test_support import captured_stdout, run_unittest
from distutils.cmd import Command
from distutils.dist import Distribution
from distutils.errors import DistutilsOptionError
from distutils import debug
class MyCmd(Command):
def initialize_options(... | gpl-2.0 |
tombstone/models | research/slim/nets/mobilenet/mobilenet_v3_test.py | 3 | 5913 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 |
pv/scikit-learn | sklearn/tree/tests/test_export.py | 76 | 9318 | """
Testing for export functions of decision trees (sklearn.tree.export).
"""
from numpy.testing import assert_equal
from nose.tools import assert_raises
from sklearn.tree import DecisionTreeClassifier, DecisionTreeRegressor
from sklearn.tree import export_graphviz
from sklearn.externals.six import StringIO
# toy sa... | bsd-3-clause |
igel-kun/pyload | module/plugins/hoster/XDCC.py | 1 | 3550 | # -*- coding: utf-8 -*-
import os
import re
from module.plugins.internal.Hoster import Hoster
from module.network.XDCCRequest import XDCCRequest
from module.plugins.internal.misc import parse_name, safejoin
class XDCC(Hoster):
__name__ = "XDCC"
__type__ = "hoster"
__version__ = "99"
__status__ ... | gpl-3.0 |
nyuwireless/ns3-mmwave | .waf-1.8.12-f00e5b53f6bbeab1384a38c9cc5d51f7/waflib/Tools/dmd.py | 21 | 1487 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! https://waf.io/book/index.html#_obtaining_the_waf_file
import sys
from waflib.Tools import ar,d
from waflib.Configure import conf
@conf
def find_dmd(conf):
conf.find_program(['dmd','dmd2','ldc'],var='D')
out=conf.cmd_and_log(conf.env.D+['--help'])
if ... | gpl-2.0 |
OrlandoSoto/retirement | retirement_api/urls.py | 1 | 1116 | from django.conf.urls import patterns, include, url
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
admin.autodiscover()
urlpatterns = patterns('',
# url(r'^retirement-api/admin/', include(admin.site.urls)),
url(r'^retirement... | cc0-1.0 |
mesosphere/aws-cfn-resource-bridge | aws/cfn/bridge/vendored/botocore/vendored/requests/packages/charade/chardistribution.py | 2755 | 9226 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... | apache-2.0 |
s20121035/rk3288_android5.1_repo | frameworks/base/tools/layoutlib/rename_font/build_font_single.py | 1 | 6688 | #!/usr/bin/env python
# Copyright (C) 2014 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 requ... | gpl-3.0 |
arcivanov/pybuilder | src/integrationtest/python/smoke_setup_tests.py | 3 | 1045 | # -*- coding: utf-8 -*-
#
# This file is part of PyBuilder
#
# Copyright 2011-2020 PyBuilder Team
#
# 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/l... | apache-2.0 |
neurodebian/htcondor | src/condor_contrib/condor_pigeon/src/condor_pigeon_client/skype_linux_tools/Skype4Py/Languages/pl.py | 10 | 7899 | apiAttachAvailable = u'API jest dost\u0119pne'
apiAttachNotAvailable = u'Niedost\u0119pny'
apiAttachPendingAuthorization = u'Autoryzacja w toku'
apiAttachRefused = u'Odmowa'
apiAttachSuccess = u'Sukces'
apiAttachUnknown = u'Nieznany'
budDeletedFriend = u'Usuni\u0119ty z listy znajomych'
budFriend = u'Znajomy'
b... | apache-2.0 |
miptliot/edx-platform | common/djangoapps/terrain/stubs/catalog.py | 19 | 1690 | """
Stub implementation of catalog service for acceptance tests
"""
# pylint: disable=invalid-name, missing-docstring
import re
import urlparse
from .http import StubHttpRequestHandler, StubHttpService
class StubCatalogServiceHandler(StubHttpRequestHandler):
def do_GET(self):
pattern_handlers = {
... | agpl-3.0 |
firebase/grpc-SwiftPM | src/python/grpcio/grpc_core_dependencies.py | 1 | 48612 | # Copyright 2015 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 |
Yukarumya/Yukarum-Redfoxes | python/mozbuild/mozbuild/frontend/mach_commands.py | 2 | 7822 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from __future__ import absolute_import, print_function, unicode_literals
from collections import defaultdict
import os
... | mpl-2.0 |
probml/pyprobml | scripts/svi_gmm_tfp_scratch.py | 1 | 7626 | # SVI for a GMM
# Modified from
# https://github.com/brendanhasz/svi-gaussian-mixture-model/blob/master/BayesianGaussianMixtureModel.ipynb
#pip install tf-nightly
#pip install --upgrade tfp-nightly -q
# Imports
import numpy as np
import matplotlib.pyplot as plt
import seaborn as sns
import tensorflow as tf
import ten... | mit |
blacklin/kbengine | kbe/res/scripts/common/Lib/concurrent/futures/_base.py | 88 | 19638 | # Copyright 2009 Brian Quinlan. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
__author__ = 'Brian Quinlan (brian@sweetapp.com)'
import collections
import logging
import threading
import time
FIRST_COMPLETED = 'FIRST_COMPLETED'
FIRST_EXCEPTION = 'FIRST_EXCEPTION'
ALL_COMPLETED = 'ALL_COMPLETED... | lgpl-3.0 |
igoralmeida/tahoe-lafs | src/allmydata/test/test_deepcheck.py | 6 | 60303 |
import os, simplejson, urllib
from cStringIO import StringIO
from twisted.trial import unittest
from twisted.internet import defer
from twisted.internet import threads # CLI tests use deferToThread
from allmydata.immutable import upload
from allmydata.mutable.common import UnrecoverableFileError
from allmydata.mutable... | gpl-2.0 |
z-jason/anki | thirdparty/BeautifulSoup.py | 20 | 79554 | """Beautiful Soup
Elixir and Tonic
"The Screen-Scraper's Friend"
http://www.crummy.com/software/BeautifulSoup/
Beautiful Soup parses a (possibly invalid) XML or HTML document into a
tree representation. It provides methods and Pythonic idioms that make
it easy to navigate, search, and modify the tree.
A well-formed X... | agpl-3.0 |
broferek/ansible | test/units/modules/network/check_point/test_cp_mgmt_host_facts.py | 19 | 2820 | # Ansible module to manage CheckPoint Firewall (c) 2019
#
# 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 dist... | gpl-3.0 |
acutesoftware/AIKIF | aikif/.z_prototype/search.py | 1 | 1453 | # -*- coding: utf-8 -*-
import argparse
import aikif.config as cfg
def search(search_string):
"""
main function to search using indexes
"""
print('Searching for ' + search_string)
ndxFiles = cfg.params['index_files']
numResults = 0
totLines = 0
for fname in ndxFiles:
print("Se... | gpl-3.0 |
William-Hai/volatility | volatility/scan.py | 44 | 9086 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# Derived from source in PyFlag developed by:
# Copyright 2004: Commonwealth of Australia.
# Michael Cohen <scudette@users.sourceforge.net>
# David Collett <daveco@users.sourceforge.net>
#
# This file is part of Volatility.
#
# Volatility is free software;... | gpl-2.0 |
magdamagda/geny-chorobowe | geny_chorobowe/find_disease_genes/migrations/0010_auto_20160106_0951.py | 1 | 1184 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-06 09:51
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('find_disease_genes', '0009_auto_20160105_2120'),
]
operations = [
migrations... | gpl-2.0 |
tanyunshi/python-docx | features/steps/table.py | 6 | 12947 | # encoding: utf-8
"""
Step implementations for table-related features
"""
from __future__ import (
absolute_import, division, print_function, unicode_literals
)
from behave import given, then, when
from docx import Document
from docx.enum.table import WD_TABLE_ALIGNMENT, WD_TABLE_DIRECTION
from docx.shared impo... | mit |
nop33/indico | indico/modules/events/registration/placeholders/invitations.py | 2 | 1675 | # This file is part of Indico.
# Copyright (C) 2002 - 2017 European Organization for Nuclear Research (CERN).
#
# Indico 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 (a... | gpl-3.0 |
Taapat/enigma2-openpli-vuplus | lib/python/Components/Sources/Boolean.py | 162 | 1264 | from Source import Source
from Components.Element import cached
from enigma import eTimer
# a small warning:
# you can use that boolean well to express screen-private
# conditional expressions.
#
# however, if you think that there is ANY interest that another
# screen could use your expression, please put your calcula... | gpl-2.0 |
getnikola/plugins | v7/link_figure/link_figure.py | 2 | 4919 | # -*- coding: utf-8 -*-
# Copyright © 2014 Ivan Teoh and others.
# 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, cop... | mit |
Astoriane/jCrunchyroll | lib/crunchy-xml-decoder/unidecode/x0cb.py | 253 | 5012 | data = (
'jjwaels', # 0x00
'jjwaelt', # 0x01
'jjwaelp', # 0x02
'jjwaelh', # 0x03
'jjwaem', # 0x04
'jjwaeb', # 0x05
'jjwaebs', # 0x06
'jjwaes', # 0x07
'jjwaess', # 0x08
'jjwaeng', # 0x09
'jjwaej', # 0x0a
'jjwaec', # 0x0b
'jjwaek', # 0x0c
'jjwaet', # 0x0d
'jjwaep', # 0x0e
'jjw... | lgpl-3.0 |
abhiii5459/sympy | sympy/parsing/sympy_parser.py | 43 | 30008 | """Transform a string with Python-like source code into SymPy expression. """
from __future__ import print_function, division
from .sympy_tokenize import \
generate_tokens, untokenize, TokenError, \
NUMBER, STRING, NAME, OP, ENDMARKER
from keyword import iskeyword
import ast
import re
import unicodedata
im... | bsd-3-clause |
Tetchain/pycoin | tests/encoding_test.py | 18 | 9641 | #!/usr/bin/env python
import unittest
from pycoin import encoding
from pycoin.serialize import h2b
class EncodingTestCase(unittest.TestCase):
def test_to_from_long(self):
def do_test(as_int, prefix, as_rep, base):
self.assertEqual((as_int, prefix), encoding.to_long(base, encoding.byte_to_int... | mit |
google/glazier | testing/run_tests.py | 1 | 1660 | # Copyright 2019 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 |
YueLinHo/Subversion | subversion/tests/cmdline/svntest/verify.py | 1 | 34138 | #
# verify.py: routines that handle comparison and display of expected
# vs. actual output
#
# Subversion is a tool for revision control.
# See http://subversion.tigris.org for more information.
#
# ====================================================================
# Licensed to the Apache Softwar... | apache-2.0 |
lokirius/python-for-android | python-build/python-libs/gdata/build/lib/gdata/tlslite/utils/cipherfactory.py | 357 | 3177 | """Factory functions for symmetric cryptography."""
import os
import Python_AES
import Python_RC4
import cryptomath
tripleDESPresent = False
if cryptomath.m2cryptoLoaded:
import OpenSSL_AES
import OpenSSL_RC4
import OpenSSL_TripleDES
tripleDESPresent = True
if cryptomath.cryptlibpyLoaded:
impo... | apache-2.0 |
BT-astauder/odoo | openerp/tools/cache.py | 100 | 5907 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 OpenERP (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GN... | agpl-3.0 |
GeoscienceAustralia/Geodesy-Web-Services | aws/amazonia/test/unit_tests/test_stack.py | 2 | 27223 | from amazonia.classes.api_gateway_config import ApiGatewayMethodConfig
from amazonia.classes.api_gateway_config import ApiGatewayResponseConfig, ApiGatewayRequestConfig
from amazonia.classes.asg_config import AsgConfig
from amazonia.classes.block_devices_config import BlockDevicesConfig
from amazonia.classes.cf_distrib... | bsd-3-clause |
joopert/home-assistant | tests/components/fan/test_init.py | 4 | 1116 | """Tests for fan platforms."""
import unittest
from homeassistant.components.fan import FanEntity
import pytest
class BaseFan(FanEntity):
"""Implementation of the abstract FanEntity."""
def __init__(self):
"""Initialize the fan."""
pass
class TestFanEntity(unittest.TestCase):
"""Test ... | apache-2.0 |
cpina/science-cruise-data-management | ScienceCruiseDataManagement/main/management/commands/importprojects.py | 1 | 1792 | from django.core.management.base import BaseCommand, CommandError
from main.models import Project, Person
import csv
# This file is part of https://github.com/cpina/science-cruise-data-management
#
# This project was programmed in a hurry without any prior Django experience,
# while circumnavigating the Antarctic on t... | mit |
havt/odoo | addons/account/wizard/account_use_model.py | 341 | 3361 | # -*- 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 |
dannyboi104/SickRage | lib/mako/ast.py | 60 | 6702 | # mako/ast.py
# Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""utilities for analyzing expressions and blocks of Python
code, as well as generating Python from AS... | gpl-3.0 |
joopert/home-assistant | tests/components/input_datetime/test_reproduce_state.py | 5 | 2723 | """Test reproduce state for Input datetime."""
from homeassistant.core import State
from tests.common import async_mock_service
async def test_reproducing_states(hass, caplog):
"""Test reproducing Input datetime states."""
hass.states.async_set(
"input_datetime.entity_datetime",
"2010-10-10 0... | apache-2.0 |
0jpq0/kbengine | kbe/res/scripts/common/Lib/idlelib/OutputWindow.py | 88 | 4394 | from tkinter import *
from idlelib.EditorWindow import EditorWindow
import re
import tkinter.messagebox as tkMessageBox
from idlelib import IOBinding
class OutputWindow(EditorWindow):
"""An editor window that can serve as an output file.
Also the future base class for the Python shell window.
This class ... | lgpl-3.0 |
mageec/mageec | script/generate-builds.py | 1 | 12030 | #!/usr/bin/env python3
import argparse
import os
import random
import sys
import mageec
gcc_flags = [
#'-faggressive-loop-optimizations', # Not supported in 4.5
'-falign-functions',
'-falign-jumps',
'-falign-labels',
'-falign-loops',
'-fbranch-count-reg',
'-fbranch-target-load-optimize',
... | gpl-3.0 |
cstipkovic/spidermonkey-research | testing/talos/talos/cmanager_mac.py | 2 | 2801 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
"""CounterManager for Mac OSX"""
import subprocess
from cmanager import CounterManager
import sys
def GetProcessData(... | mpl-2.0 |
thaim/ansible | lib/ansible/plugins/action/cnos.py | 38 | 3535 | # (C) 2017 Red Hat Inc.
# Copyright (C) 2017 Lenovo.
#
# GNU General Public License v3.0+
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for ... | mit |
jamesblunt/edx-platform | lms/djangoapps/class_dashboard/tests/test_views.py | 133 | 4061 | """
Tests for class dashboard (Metrics tab in instructor dashboard)
"""
import json
from django.test.client import RequestFactory
from mock import patch
from nose.plugins.attrib import attr
from xmodule.modulestore.tests.factories import CourseFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestC... | agpl-3.0 |
deroneriksson/incubator-systemml | src/main/python/systemml/random/sampling.py | 7 | 5336 | # -------------------------------------------------------------
#
# 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 unde... | apache-2.0 |
amarant/servo | tests/wpt/web-platform-tests/tools/py/py/_path/cacheutil.py | 278 | 3333 | """
This module contains multithread-safe cache implementations.
All Caches have
getorbuild(key, builder)
delentry(key)
methods and allow configuration when instantiating the cache class.
"""
from time import time as gettime
class BasicCache(object):
def __init__(self, maxentries=128):
self.maxe... | mpl-2.0 |
SoftwareExperiment4/SungkyunWiki | wiki/plugins/haystack/search_indexes.py | 16 | 1113 | from __future__ import absolute_import
from __future__ import unicode_literals
from haystack import indexes
from wiki import models
class ArticleIndex(indexes.SearchIndex, indexes.Indexable):
text = indexes.CharField(document=True, use_template=True)
created = indexes.DateTimeField(model_attr='created')
m... | gpl-3.0 |
michaelneuder/image_quality_analysis | bin/nets/old/conv_net_SSIM.py | 1 | 6635 | #!/usr/bin/env python3
import os
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
import numpy as np
np.set_printoptions(threshold=np.nan)
import tensorflow as tf
import time
from PIL import Image as im
def convolve_inner_layers(x, W, b):
y = tf.nn.conv2d(x, W, strides = [1,1,1,1], padding='SAME')
y = tf.nn.bias_add(y, ... | mit |
derDavidT/sympy | sympy/calculus/euler.py | 54 | 3152 | from sympy import Function, sympify, diff, Eq, S, Symbol, Derivative
from sympy.core.compatibility import (
combinations_with_replacement, iterable, range)
def euler_equations(L, funcs=(), vars=()):
r"""
Find the Euler-Lagrange equations [1]_ for a given Lagrangian.
Parameters
==========
L :... | bsd-3-clause |
KyoungRan/Django_React_ex | Django_React_Workshop-mbrochh/django/myvenv/lib/python3.4/site-packages/django/contrib/gis/db/backends/spatialite/operations.py | 28 | 10604 | """
SQL functions reference lists:
http://www.gaia-gis.it/spatialite-3.0.0-BETA/spatialite-sql-3.0.0.html
https://web.archive.org/web/20130407175746/http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html
http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.2.1.html
"""
import re
import sys
from django.contrib.gis.db.... | mit |
skiselev/upm | examples/python/relay.py | 7 | 1896 | from __future__ import print_function
# Author: Sarah Knepper <sarah.knepper@intel.com>
# Copyright (c) 2015 Intel Corporation.
#
# 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 restr... | mit |
richardcs/ansible | lib/ansible/plugins/lookup/mongodb.py | 84 | 8872 | # (c) 2016, Marcos Diez <marcos@unitron.com.br>
# https://github.com/marcosdiez/
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or... | gpl-3.0 |
pablorecio/resistencia-1812 | resistencia/gui/round_results.py | 1 | 6387 | # -*- coding: utf-8 -*-
###############################################################################
# This file is part of Resistencia Cadiz 1812. #
# #
# This program is free software: you can redistribute it... | gpl-3.0 |
rysson/filmkodi | plugin.video.mrknow/lib/parser2.py | 2 | 28077 | # -*- coding: utf-8 -*-
import common
import sys, os, traceback
import time
import random
import re
import urllib
import string
from string import lower
from entities.CList import CList
from entities.CItemInfo import CItemInfo
from entities.CListItem import CListItem
from entities.CRuleItem import CRuleItem
import c... | apache-2.0 |
samithaj/headphones | lib/pytz/__init__.py | 61 | 34011 | '''
datetime.tzinfo timezone definitions generated from the
Olson timezone database:
ftp://elsie.nci.nih.gov/pub/tz*.tar.gz
See the datetime section of the Python Library Reference for information
on how to use these modules.
'''
# The Olson database is updated several times a year.
OLSON_VERSION = '2014j'
VERSI... | gpl-3.0 |
shepdelacreme/ansible | lib/ansible/modules/network/aos/_aos_login.py | 44 | 4110 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opt... | gpl-3.0 |
lmtim/iOSBlogCN | Export.py | 65 | 1482 | __author__ = 'wwxiang'
#coding=utf-8
import os
import re
work = os.getcwd()
resxml = work + os.path.sep + 'blogcn.opml'
workmd = work + os.path.sep + 'README.md'
def handler():
isblock = True
handlerData = []
lineNo = 0
try:
with open(workmd,'rb') as linefs:
lineCout = len(linefs... | gpl-2.0 |
ddzialak/boto | boto/cloudsearch2/search.py | 16 | 13430 | # Copyright (c) 2014 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... | mit |
Sylrob434/CouchPotatoServer | libs/CodernityDB/debug_stuff.py | 44 | 7678 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2011-2013 Codernity (http://codernity.com)
#
# 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/L... | gpl-3.0 |
cdepman/falcon_api | site-packages/wheel/test/test_install.py | 455 | 1866 | # Test wheel.
# The file has the following contents:
# hello.pyd
# hello/hello.py
# hello/__init__.py
# test-1.0.data/data/hello.dat
# test-1.0.data/headers/hello.dat
# test-1.0.data/scripts/hello.sh
# test-1.0.dist-info/WHEEL
# test-1.0.dist-info/METADATA
# test-1.0.dist-info/RECORD
# The ... | mit |
bcornwellmott/erpnext | erpnext/hr/report/employee_birthday/employee_birthday.py | 120 | 1328 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt
def execute(filters=None):
if not filters: filters = {}
columns = get_columns()
dat... | gpl-3.0 |
notmyname/swift | test/unit/common/test_exceptions.py | 51 | 1959 | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... | apache-2.0 |
danielvdao/TheAnimalFarm | venv/lib/python2.7/site-packages/setuptools/command/easy_install.py | 206 | 72706 | #!/usr/bin/env python
"""
Easy Install
------------
A tool for doing automatic download/extract/build of distutils-based Python
packages. For detailed documentation, see the accompanying EasyInstall.txt
file, or visit the `EasyInstall home page`__.
__ https://pythonhosted.org/setuptools/easy_install.html
"""
impo... | gpl-2.0 |
otherness-space/myProject002 | my_project_002/lib/python2.7/site-packages/django/contrib/contenttypes/management.py | 96 | 2903 | from django.contrib.contenttypes.models import ContentType
from django.db import DEFAULT_DB_ALIAS, router
from django.db.models import get_apps, get_models, signals
from django.utils.encoding import smart_text
from django.utils import six
from django.utils.six.moves import input
def update_contenttypes(app, created_m... | mit |
onceuponatimeforever/oh-mainline | vendor/packages/bleach/bleach/tests/test_basics.py | 21 | 5094 | import html5lib
from nose.tools import eq_
import bleach
def test_empty():
eq_('', bleach.clean(''))
def test_comments_only():
comment = '<!-- this is a comment -->'
open_comment = '<!-- this is an open comment'
eq_('', bleach.clean(comment))
eq_('', bleach.clean(open_comment))
eq_(comment,... | agpl-3.0 |
blueyed/ycmd | ycmd/request_validation.py | 29 | 2422 | #!/usr/bin/env python
#
# Copyright (C) 2014 Google Inc.
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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 you... | gpl-3.0 |
nolanliou/tensorflow | tensorflow/python/kernel_tests/sparse_conditional_accumulator_test.py | 132 | 22955 | # 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 |
bitfinder/thrift | contrib/fb303/py/fb303/FacebookBase.py | 173 | 1917 | #!/usr/bin/env python
#
# 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
# "L... | apache-2.0 |
tjsavage/full_nonrel_starter | django/templatetags/static.py | 233 | 2149 | from django import template
from django.utils.encoding import iri_to_uri
register = template.Library()
class PrefixNode(template.Node):
def __repr__(self):
return "<PrefixNode for %r>" % self.name
def __init__(self, varname=None, name=None):
if name is None:
raise template.Templa... | bsd-3-clause |
michhar/flask-webapp-aml | env/Lib/site-packages/wtforms/i18n.py | 142 | 2175 | import os
def messages_path():
"""
Determine the path to the 'messages' directory as best possible.
"""
module_path = os.path.abspath(__file__)
locale_path = os.path.join(os.path.dirname(module_path), 'locale')
if not os.path.exists(locale_path):
locale_path = '/usr/share/locale'
r... | mit |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.