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 |
|---|---|---|---|---|---|
nevir/plexability | extern/depot_tools/third_party/logilab/common/proc.py | 117 | 9352 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of logilab-common.
#
# logilab-common is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as publ... | gpl-2.0 |
stefansommer/jetflows | code/run_two_jets.py | 1 | 1970 | #!/usr/bin/python
#
# This file is part of jetflows.
#
# Copyright (C) 2014, Henry O. Jacobs (hoj201@gmail.com), Stefan Sommer (sommer@di.ku.dk)
# https://github.com/nefan/jetflows.git
#
# jetflows is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as publishe... | agpl-3.0 |
mkeilman/sirepo | tests/template/srw_import_data/srx.py | 2 | 35248 | # -*- coding: utf-8 -*-
#############################################################################
# SRWLIB Example: Virtual Beamline: a set of utilities and functions allowing to simulate
# operation of an SR Beamline.
# The standard use of this script is from command line, with some optional arguments,
# e.g. for ... | apache-2.0 |
Tatsh/youtube-dl | youtube_dl/extractor/ondemandkorea.py | 62 | 2036 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import (
ExtractorError,
js_to_json,
)
class OnDemandKoreaIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?ondemandkorea\.com/(?P<id>[^/]+)\.html'
_GEO_COUNTRIES = ['US', 'CA']
_TEST = {
... | unlicense |
luiseduardohdbackup/odoo | addons/auth_signup/res_config.py | 445 | 2860 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms o... | agpl-3.0 |
imjonsnooow/synapse | synapse/tests/test_async.py | 1 | 3507 | import time
import unittest
import threading
import synapse.async as s_async
import synapse.lib.threads as s_threads
from synapse.tests.common import *
class AsyncTests(SynTest):
def test_async_basics(self):
boss = s_async.Boss()
data = {}
def jobmeth(x, y=20):
return x + y... | apache-2.0 |
losfair/android_kernel_sony_u8500_3_4 | scripts/rt-tester/rt-tester.py | 11005 | 5307 | #!/usr/bin/python
#
# rt-mutex tester
#
# (C) 2006 Thomas Gleixner <tglx@linutronix.de>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
import os
import sys
import getopt
import sh... | gpl-2.0 |
rob356/SickRage | lib/unidecode/x06e.py | 252 | 4640 | data = (
'Ben ', # 0x00
'Yuan ', # 0x01
'Wen ', # 0x02
'Re ', # 0x03
'Fei ', # 0x04
'Qing ', # 0x05
'Yuan ', # 0x06
'Ke ', # 0x07
'Ji ', # 0x08
'She ', # 0x09
'Yuan ', # 0x0a
'Shibui ', # 0x0b
'Lu ', # 0x0c
'Zi ', # 0x0d
'Du ', # 0x0e
'[?] ', # 0x0f
'Jian ', # 0x10
'Mi... | gpl-3.0 |
akshayaurora/kivy | kivy/uix/colorpicker.py | 3 | 16388 | '''
Color Picker
============
.. versionadded:: 1.7.0
.. warning::
This widget is experimental. Its use and API can change at any time until
this warning is removed.
.. image:: images/colorpicker.png
:align: right
The ColorPicker widget allows a user to select a color from a chromatic
wheel where pinch... | mit |
alhashash/odoomrp-wip | mrp_operations_time_control/models/operation_time.py | 16 | 3343 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program 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... | agpl-3.0 |
milfeld/lammps | python/examples/mc.py | 15 | 2535 | #!/usr/bin/env python -i
# preceeding line should have path for Python on your machine
# mc.py
# Purpose: mimic operation of example/MC/in.mc via Python
# Syntax: mc.py in.mc
# in.mc = LAMMPS input script
import sys,random,math
# set these parameters
# make sure neigh skin (in in.mc) > 2*deltamove
nloop =... | gpl-2.0 |
linglung/ytdl | youtube_dl/extractor/morningstar.py | 220 | 1732 | # coding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
class MorningstarIE(InfoExtractor):
IE_DESC = 'morningstar.com'
_VALID_URL = r'https?://(?:www\.)?morningstar\.com/[cC]over/video[cC]enter\.aspx\?id=(?P<id>[0-9]+)'
_TEST = {
'url': 'http://www.mo... | unlicense |
defionscode/ansible | test/units/modules/network/slxos/test_slxos_config.py | 30 | 8136 | #
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ans... | gpl-3.0 |
felipedau/pyaxo | examples/axotor.py | 2 | 24592 | #!/usr/bin/env python
import socket
import threading
import sys
import os
import curses
import socks
import stem.process
from wh import WHMgr
import random
from binascii import a2b_base64 as a2b
from binascii import b2a_base64 as b2a
from getpass import getpass
from smp import SMP
from stem.control import Controller
f... | gpl-3.0 |
kawamuray/ganeti | lib/watcher/state.py | 2 | 7572 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011 Google Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
... | gpl-2.0 |
imclab/CoECI-CMS-Healthcare-Fraud-Prevention | partnerclient/decision_module/decision_module/helper.py | 3 | 1511 | '''
Copyright (C) 2013 TopCoder Inc., All Rights Reserved.
'''
'''
This is the module that provides useful helper functions.
Thread Safety:
The implementation is thread safe.
@author: TCSASSEMLBER
@version: 1.0
'''
def log_entrance(logger, signature, parasMap):
'''
Logs for entrance into public methods at DE... | apache-2.0 |
hoangt/tpzsimul.gem5 | src/arch/x86/isa/insts/simd128/integer/logical/pand.py | 91 | 3202 | # Copyright (c) 2007 The Hewlett-Packard Development Company
# All rights reserved.
#
# The license below extends only to copyright in the software and shall
# not be construed as granting a license to any other intellectual
# property including but not limited to intellectual property relating
# to a hardware implemen... | bsd-3-clause |
arowla/csvkit | tests/test_unicsv.py | 21 | 6571 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv
import os
import six
try:
import unittest2 as unittest
except ImportError:
import unittest
from csvkit import unicsv
@unittest.skipIf(six.PY3, "Not supported in Python 3.")
class TestUnicodeCSVReader(unittest.TestCase):
def test_utf8(self):
... | mit |
shuangshuangwang/spark | python/pyspark/sql/window.py | 23 | 12863 | #
# 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 |
yencarnacion/jaikuengine | .google_appengine/lib/django-1.5/tests/regressiontests/admin_util/models.py | 115 | 1303 | from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
class Article(models.Model):
"""
A simple Article model for testing
"""
site = models.ForeignKey('sites.Site', related_name="admin_articles")
title = models.CharField(max_length=... | apache-2.0 |
Clyde-fare/scikit-learn | sklearn/metrics/ranking.py | 79 | 25426 | """Metrics to assess performance on classification task given scores
Functions named as ``*_score`` return a scalar value to maximize: the higher
the better
Function named as ``*_error`` or ``*_loss`` return a scalar value to minimize:
the lower the better
"""
# Authors: Alexandre Gramfort <alexandre.gramfort@inria.... | bsd-3-clause |
GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/19.Djangos-Testing-Framework/4.How-To-Test-Models/we_are_social/accounts/forms.py | 8 | 1889 | from django import forms
from django.contrib.auth.forms import UserCreationForm
from django.core.exceptions import ValidationError
from accounts.models import User
class UserRegistrationForm(UserCreationForm):
MONTH_ABBREVIATIONS = [
'Jan', 'Feb', 'Mar', 'Apr', 'May', 'June',
'July', 'Aug', 'Sept... | mit |
atlassian/boto | tests/integration/ec2/elb/test_connection.py | 100 | 12554 | # Copyright (c) 2010 Hunter Blanks http://artifex.org/~hblanks/
# 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 th... | mit |
suiyuan2009/tensorflow | tensorflow/python/kernel_tests/sparse_tensors_map_ops_test.py | 134 | 9952 | # 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 |
wrouesnel/ansible | lib/ansible/plugins/netconf/__init__.py | 4 | 10724 | #
# (c) 2017 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is d... | gpl-3.0 |
BtbN/xbmc | lib/gtest/test/gtest_output_test.py | 1733 | 12005 | #!/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... | gpl-2.0 |
skulbrane/metagoofil | hachoir_parser/program/exe_res.py | 95 | 15292 | """
Parser for resource of Microsoft Windows Portable Executable (PE).
Documentation:
- Wine project
VS_FIXEDFILEINFO structure, file include/winver.h
Author: Victor Stinner
Creation date: 2007-01-19
"""
from hachoir_core.field import (FieldSet, ParserError, Enum,
Bit, Bits, SeekableFieldSet,
UInt16, UInt3... | gpl-2.0 |
chdecultot/erpnext | erpnext/hr/doctype/employee_attendance_tool/employee_attendance_tool.py | 7 | 1956 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
import json
from frappe.model.document import Document
class EmployeeAttendanceTool(Document):
pass
@frappe.whitelist... | gpl-3.0 |
BT-ojossen/odoo | addons/crm_helpdesk/__openerp__.py | 260 | 1956 | # -*- 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 |
jaimahajan1997/sympy | sympy/physics/quantum/density.py | 82 | 9834 | from __future__ import print_function, division
from itertools import product
from sympy import Tuple, Add, Mul, Matrix, log, expand, Rational
from sympy.core.trace import Tr
from sympy.printing.pretty.stringpict import prettyForm
from sympy.physics.quantum.dagger import Dagger
from sympy.physics.quantum.operator imp... | bsd-3-clause |
KarlTDebiec/westpa | lib/examples/wca-dimer_openmm/bruteforce/wcadimer.py | 12 | 10747 | #!/usr/local/bin/env python
#=============================================================================================
# MODULE DOCSTRING
#=============================================================================================
"""
WCA fluid and WCA dimer systems.
DESCRIPTION
COPYRIGHT
@author John D. Cho... | gpl-3.0 |
wolverineav/neutron | neutron/core_extensions/base.py | 32 | 1533 | # Copyright (c) 2015 Red Hat Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 |
40423105/2016fallcadp_hw | plugin/liquid_tags/graphviz.py | 245 | 3198 | """
GraphViz Tag
---------
This implements a Liquid-style graphviz tag for Pelican. You can use different
Graphviz programs like dot, neato, twopi etc. [1]
[1] http://www.graphviz.org/
Syntax
------
{% graphviz
<program> {
<DOT code>
}
%}
Examples
--------
{% graphviz
dot {
digraph graph... | agpl-3.0 |
kbc-developers/android_kernel_samsung_jfdcm | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | 5411 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... | gpl-2.0 |
Khilo84/PyQt4 | pyuic/uic/Loader/loader.py | 8 | 3049 | #############################################################################
##
## Copyright (C) 2011 Riverbank Computing Limited.
## Copyright (C) 2006 Thorsten Marek.
## All right reserved.
##
## This file is part of PyQt.
##
## You may use this file under the terms of the GPL v2 or the revised BSD
## license as fol... | gpl-2.0 |
c86j224s/snippet | Python_Pygments/lib/python3.6/site-packages/pygments/lexers/ooc.py | 31 | 2999 | # -*- coding: utf-8 -*-
"""
pygments.lexers.ooc
~~~~~~~~~~~~~~~~~~~
Lexers for the Ooc language.
:copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, bygroups, words
from pygments.token import Text, C... | apache-2.0 |
mytliulei/DCNRobotInstallPackages | windows/win32/pygal-1.7.0/pygal/test/test_pie.py | 4 | 2015 | # -*- coding: utf-8 -*-
# This file is part of pygal
#
# A python svg graph plotting library
# Copyright © 2012-2014 Kozea
#
# 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... | apache-2.0 |
pbarton666/buzz_bot | djangoproj/djangoapp/csc/webapi/urls.py | 1 | 2618 | from django.conf.urls.defaults import *
from piston.resource import Resource
from csc.webapi.docs import documentation_view
from csc.webapi.handlers import *
# This gives a way to accept "query.foo" on the end of the URL to set the
# format to 'foo'. "?format=foo" works as well.
Q = r'(query\.(?P<emitter_format>.+))?$... | mit |
s0930342674/pyload | module/plugins/container/RSDF.py | 15 | 1699 | # -*- coding: utf-8 -*-
from __future__ import with_statement
import binascii
import re
from Crypto.Cipher import AES
from module.plugins.internal.Container import Container
from module.utils import fs_encode
class RSDF(Container):
__name__ = "RSDF"
__type__ = "container"
__version__ = "0.31"
... | gpl-3.0 |
takis/django | django/contrib/gis/geoip2/base.py | 335 | 9054 | import os
import socket
import geoip2.database
from django.conf import settings
from django.core.validators import ipv4_re
from django.utils import six
from django.utils.ipv6 import is_valid_ipv6_address
from .resources import City, Country
# Creating the settings dictionary with any settings, if needed.
GEOIP_SETT... | bsd-3-clause |
vbarrielle/cppChan | 3rdparty/gtest-1.6.0/test/gtest_break_on_failure_unittest.py | 1050 | 7214 | #!/usr/bin/env python
#
# Copyright 2006, 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... | mit |
yawnosnorous/python-for-android | python-modules/twisted/twisted/web/test/test_error.py | 52 | 5433 | # Copyright (c) 2010 Twisted Matrix Laboratories.
# See LICENSE for details.
"""
HTTP errors.
"""
from twisted.trial import unittest
from twisted.web import error
class ErrorTestCase(unittest.TestCase):
"""
Tests for how L{Error} attributes are initialized.
"""
def test_noMessageValidStatus(self):
... | apache-2.0 |
ralphtheninja/cjdns | node_build/dependencies/libuv/build/gyp/test/win/gyptest-link-pgo.py | 239 | 2993 | #!/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.
"""
Make sure PGO is working properly.
"""
import TestGyp
import os
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(forma... | gpl-3.0 |
Plexxi/st2 | st2common/tests/unit/services/test_workflow.py | 3 | 18346 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... | apache-2.0 |
draugiskisprendimai/odoo | openerp/addons/base/tests/test_ir_attachment.py | 433 | 3536 | import hashlib
import os
import openerp
import openerp.tests.common
HASH_SPLIT = 2 # FIXME: testing implementations detail is not a good idea
class test_ir_attachment(openerp.tests.common.TransactionCase):
def setUp(self):
super(test_ir_attachment, self).setUp()
registry, cr, uid = self.regi... | agpl-3.0 |
zoidbergwill/lint-review | lintreview/config.py | 2 | 5210 | import os
import logging.config
from flask.config import Config
from ConfigParser import ConfigParser
from StringIO import StringIO
def load_config():
"""
Loads the config files merging the defaults
with the file defined in environ.LINTREVIEW_SETTINGS if it exists.
"""
config = Config(os.getcwd()... | mit |
robfig/rietveld | third_party/oauth2client/multistore_file.py | 52 | 12045 | # Copyright 2011 Google Inc. All Rights Reserved.
"""Multi-credential file store with lock support.
This module implements a JSON credential store where multiple
credentials can be stored in one file. That file supports locking
both in a single process and across processes.
The credential themselves are keyed off of... | apache-2.0 |
hzruandd/AutobahnPython | examples/twisted/wamp/pubsub/unsubscribe/backend.py | 8 | 2223 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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 with... | mit |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/scipy/sparse/csgraph/tests/test_graph_laplacian.py | 26 | 4388 | # Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Jake Vanderplas <vanderplas@astro.washington.edu>
# License: BSD
from __future__ import division, print_function, absolute_import
import numpy as np
from numpy.testing import assert_allclose, assert_array_almost_equal
from pytest import raises as asser... | gpl-3.0 |
upgoingstar/datasploit | emails/email_scribd.py | 2 | 1462 | #!/usr/bin/env python
import base
import re
import sys
import requests
from termcolor import colored
# Control whether the module is enabled or not
ENABLED = True
class style:
BOLD = '\033[1m'
END = '\033[0m'
def banner():
print colored(style.BOLD + '\n---> Searching Scribd Docs\n' +... | gpl-3.0 |
tumbl3w33d/ansible | test/lib/ansible_test/_internal/manage_ci.py | 17 | 10692 | """Access Ansible Core CI remote services."""
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
import os
import tempfile
import time
from .util import (
SubprocessError,
ApplicationError,
cmd_quote,
display,
ANSIBLE_TEST_DATA_ROOT,
)
from .util_common import... | gpl-3.0 |
mnahm5/django-estore | Lib/site-packages/cryptography/hazmat/primitives/asymmetric/rsa.py | 17 | 10226 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import abc
from fractions import gcd
import six
from cryptography impor... | mit |
defance/edx-platform | lms/djangoapps/ccx/tests/test_field_override_performance.py | 27 | 9659 | # coding=UTF-8
"""
Performance tests for field overrides.
"""
import ddt
import itertools
import mock
from nose.plugins.skip import SkipTest
from courseware.views import progress
from courseware.field_overrides import OverrideFieldData
from datetime import datetime
from django.conf import settings
from django.core.cac... | agpl-3.0 |
zaccoz/odoo | addons/web_diagram/controllers/main.py | 268 | 4321 | import openerp
from openerp.tools.safe_eval import safe_eval as eval
class DiagramView(openerp.http.Controller):
@openerp.http.route('/web_diagram/diagram/get_diagram_info', type='json', auth='user')
def get_diagram_info(self, req, id, model, node, connector,
src_node, des_node, label... | agpl-3.0 |
mkennedy04/knodj | env/Lib/site-packages/django/utils/crypto.py | 82 | 6844 | """
Django's standard crypto functions and utilities.
"""
from __future__ import unicode_literals
import binascii
import hashlib
import hmac
import random
import struct
import time
from django.conf import settings
from django.utils import six
from django.utils.encoding import force_bytes
from django.utils.six.moves i... | mit |
gunan/tensorflow | tensorflow/python/platform/sysconfig.py | 3 | 2718 | # 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 |
1013553207/django | django/utils/text.py | 308 | 14923 | from __future__ import unicode_literals
import re
import unicodedata
from gzip import GzipFile
from io import BytesIO
from django.utils import six
from django.utils.encoding import force_text
from django.utils.functional import SimpleLazyObject, allow_lazy
from django.utils.safestring import SafeText, mark_safe
from ... | bsd-3-clause |
forge33/CouchPotatoServer | libs/subliminal/cache.py | 107 | 4619 | # -*- coding: utf-8 -*-
# Copyright 2012 Nicolas Wack <wackou@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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 Licen... | gpl-3.0 |
maxamillion/ansible | lib/ansible/module_utils/compat/_selectors2.py | 79 | 23517 | # This file is from the selectors2.py package. It backports the PSF Licensed
# selectors module from the Python-3.5 stdlib to older versions of Python.
# The author, Seth Michael Larson, dual licenses his modifications under the
# PSF License and MIT License:
# https://github.com/SethMichaelLarson/selectors2#license
#... | gpl-3.0 |
IONISx/edx-platform | cms/djangoapps/contentstore/management/commands/import.py | 64 | 2065 | """
Script for importing courseware from XML format
"""
from django.core.management.base import BaseCommand, CommandError, make_option
from django_comment_common.utils import (seed_permissions_roles,
are_permissions_roles_seeded)
from xmodule.modulestore.xml_importer import imp... | agpl-3.0 |
msingh172/youtube-dl | youtube_dl/extractor/movieclips.py | 126 | 2668 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..compat import (
compat_str,
)
from ..utils import (
ExtractorError,
clean_html,
)
class MovieClipsIE(InfoExtractor):
_VALID_URL = r'https?://movieclips\.com/(?P<id>[\da-zA-Z]+)(?:-(?P<display_id>[\da-z-]+))?'
... | unlicense |
402231466/40223146 | static/Brython3.1.0-20150301-090019/Lib/unittest/test/test_break.py | 785 | 8138 | import gc
import io
import os
import sys
import signal
import weakref
import unittest
@unittest.skipUnless(hasattr(os, 'kill'), "Test requires os.kill")
@unittest.skipIf(sys.platform =="win32", "Test cannot run on Windows")
@unittest.skipIf(sys.platform == 'freebsd6', "Test kills regrtest on freebsd6 "
"if threa... | gpl-3.0 |
zaqwes8811/matlab_ext | code-miners/projects/mkt-processors/data_str_to_json/coursera_title_parser.py | 1 | 4890 | #-*- coding: utf-8 -*-
import sys
sys.path.append('D:/github-release')
import unittest
import json
# Other
import uasio.os_io.io_wrapper as iow
# App
import _http_requester as http_request
def _split_url(url):
""" http://www.dessci.com/en/products/mathplayer/ to
www.dessci.com /en/products/mathplayer/ - д... | apache-2.0 |
bob-the-hamster/commandergenius | project/jni/python/src/Lib/pydoc_topics.py | 48 | 410336 | # Autogenerated by Sphinx on Tue Apr 14 09:12:28 2009
topics = {'assert': u'\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form, ``assert expression``,... | lgpl-2.1 |
rs2/pandas | pandas/io/sql.py | 1 | 62655 | """
Collection of query wrappers / abstractions to both facilitate data
retrieval and to reduce dependency on DB-specific API.
"""
from contextlib import contextmanager
from datetime import date, datetime, time
from functools import partial
import re
from typing import Iterator, Optional, Union, overload
import warnin... | bsd-3-clause |
AmperificSuperKANG/lge-kernel-loki | tools/perf/scripts/python/sched-migration.py | 11215 | 11670 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... | gpl-2.0 |
JuanjoA/l10n-spain | l10n_es_aeat_mod340/__init__.py | 14 | 1171 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 20011 Ting (http://www.ting.es)
# Copyright (c) 2011-2013 Acysos S.L. (http://acysos.com)
# Ignacio Ibeas Izquierdo <ignacio@... | agpl-3.0 |
jaredly/django-feedback | test_settings.py | 2 | 5566 | # Django settings for demoproject project.
from os.path import abspath, dirname, join
demoproject_dir = dirname(abspath(__file__))
DEBUG = True
ADMINS = (
# ('Your Name', 'your_email@example.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgres... | mit |
IKholopov/HackUPC2017 | hackupc/env/lib/python3.5/site-packages/social_core/backends/odnoklassniki.py | 4 | 7024 | """
Odnoklassniki OAuth2 and Iframe Application backends, docs at:
https://python-social-auth.readthedocs.io/en/latest/backends/odnoklassnikiru.html
"""
from hashlib import md5
from six.moves.urllib_parse import unquote
from .base import BaseAuth
from .oauth import BaseOAuth2
from ..exceptions import AuthFailed
... | apache-2.0 |
jtoppins/beaker | Server/bkr/server/pools.py | 1 | 18936 |
# 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.
import re
from flask import jsonify, request
from bkr.server import id... | gpl-2.0 |
rdelval/aurora | src/test/python/apache/thermos/core/test_runner_integration.py | 14 | 6126 | #
# 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 ... | apache-2.0 |
diogommartins/pox | pox/lib/packet/ethernet.py | 45 | 5486 | # Copyright 2011,2012,2013 James McCauley
# Copyright 2008 (C) Nicira, 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 requ... | apache-2.0 |
Shemahmforash/playcert | playcert/lib/event.py | 1 | 1199 | import logging
from playcert.lib.artist import Artist
from playcert.cache import cache_data_in_hash
log = logging.getLogger(__name__)
class Event(object):
def __init__(self, title, when, venue, artist_name=None, redis=None):
self.title = title
self.when = when
self.venue = venue
... | gpl-2.0 |
sacherjj/array_devices | baud_test.py | 1 | 2376 | from __future__ import division
import serial
import time
from array_devices import array3710
__author__ = 'JoeSacher'
"""
This is a crude script to play with PC baud rates while the load
is set to a fixed baud rate.
"""
load_addr = 1
# This should match load
base_baud_rate = 9600
serial_conn = serial.Serial('COM4'... | mit |
virgree/odoo | addons/base_report_designer/plugin/openerp_report_designer/bin/script/Repeatln.py | 293 | 13228 | #########################################################################
#
# Copyright (c) 2003-2004 Danny Brewer d29583@groovegarden.com
# Copyright (C) 2004-2010 OpenERP SA (<http://openerp.com>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser Gene... | agpl-3.0 |
popazerty/blackhole-vuplus | lib/python/Components/MediaPlayer.py | 32 | 3735 | from MenuList import MenuList
from Tools.Directories import SCOPE_CURRENT_SKIN, resolveFilename
from os import path
from enigma import eListboxPythonMultiContent, RT_VALIGN_CENTER, gFont, eServiceCenter
from Tools.LoadPixmap import LoadPixmap
import skin
STATE_PLAY = 0
STATE_PAUSE = 1
STATE_STOP = 2
STATE_REWIND = ... | gpl-2.0 |
hogarthj/ansible | test/units/modules/network/edgeos/test_edgeos_command.py | 39 | 4249 | # (c) 2018 Red Hat Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is dis... | gpl-3.0 |
liberorbis/libernext | apps/frappe/frappe/__init__.py | 3 | 19151 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
"""
globals attached to frappe module
+ some utility functions that should probably be moved
"""
from __future__ import unicode_literals
from werkzeug.local import Local, release_local
import os, importlib, inspect, ... | gpl-2.0 |
bayusantoso/final-assignment-web-ontology | IMPLEMENTATION/Application/SourceCode/GOApps/flask/Lib/encodings/cp862.py | 272 | 33370 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP862.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors='strict'):
... | gpl-3.0 |
2013Commons/HUE-SHARK | build/env/lib/python2.7/site-packages/Pygments-1.3.1-py2.7.egg/pygments/lexer.py | 58 | 22989 | # -*- coding: utf-8 -*-
"""
pygments.lexer
~~~~~~~~~~~~~~
Base lexer classes.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.filter import apply_filters, Filter
from pygments.filters import get_filter_by_name
... | apache-2.0 |
derekjchow/models | official/keras_application_models/benchmark_main.py | 1 | 8439 | # Copyright 2018 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 |
RevolutionTech/hummingbird | hummingbird_django/settings.py | 1 | 2852 | """
Django settings for hummingbird_django project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_D... | isc |
mlassnig/pilot | NordugridATLASSiteInformation.py | 3 | 1933 | # Class definition:
# NordugridATLASSiteInformation
# This class is the Nordugrid-ATLAS site information class inheriting from ATLASSiteInformation
# Instances are generated with SiteInformationFactory via pUtil::getSiteInformation()
# Implemented as a singleton class
# http://stackoverflow.com/questions/4255... | apache-2.0 |
Chuban/moose | python/peacock/tests/postprocessor_tab/test_AxesSettingsPlugin.py | 6 | 4831 | #!/usr/bin/env python
import sys
import unittest
from PyQt5 import QtCore, QtWidgets
from peacock.PostprocessorViewer.plugins.AxesSettingsPlugin import main
from peacock.utils import Testing
class TestAxesSettingsPlugin(Testing.PeacockImageTestCase):
"""
Test class for the ArtistToggleWidget which toggles po... | lgpl-2.1 |
denys-duchier/django | tests/gis_tests/layermap/models.py | 21 | 2409 | from django.contrib.gis.db import models
class NamedModel(models.Model):
name = models.CharField(max_length=25)
class Meta:
abstract = True
required_db_features = ['gis_enabled']
def __str__(self):
return self.name
class State(NamedModel):
pass
class County(NamedModel):
... | bsd-3-clause |
Addepar/buck | python-dsl/buck_parser/glob_internal.py | 5 | 2442 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 |
flightcoin/flightcoin | contrib/pyminer/pyminer.py | 1257 | 6438 | #!/usr/bin/python
#
# Copyright (c) 2011 The Bitcoin developers
# Distributed under the MIT/X11 software license, see the accompanying
# file license.txt or http://www.opensource.org/licenses/mit-license.php.
#
import time
import json
import pprint
import hashlib
import struct
import re
import base64
import httplib
im... | mit |
HKUST-SING/tensorflow | tensorflow/python/ops/cloud/bigquery_reader_ops_test.py | 12 | 9585 | # 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 |
kenorb-contrib/BitTorrent | launchmany-console.py | 2 | 6333 | #!/usr/bin/env python
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that ... | gpl-3.0 |
flyher/pymo | android/pgs4a-0.9.6/python-install/lib/python2.7/test/test_xml_etree.py | 16 | 53139 | # xml.etree test. This file contains enough tests to make sure that
# all included components work as they should.
# Large parts are extracted from the upstream test suite.
# IMPORTANT: the same doctests are run from "test_xml_etree_c" in
# order to ensure consistency between the C implementation and the
# Python imp... | mit |
tim-janik/beast | yapps2_deb/yapps/grammar.py | 42 | 8821 | # grammar.py, part of Yapps 2 - yet another python parser system
# Copyright 1999-2003 by Amit J. Patel <amitp@cs.stanford.edu>
#
# This version of the Yapps 2 grammar can be distributed under the
# terms of the MIT open source license, either found in the LICENSE
# file included with the Yapps distribution
# <http://t... | lgpl-2.1 |
nhicher/ansible | lib/ansible/modules/cloud/ovirt/ovirt_storage_template_facts.py | 16 | 4457 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
#... | gpl-3.0 |
bakhtout/odoo-educ | addons/product_expiry/__init__.py | 442 | 1053 | ##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 |
thanhacun/odoo | addons/report_webkit/__init__.py | 382 | 1593 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com)
# All Right Reserved
#
# Author : Nicolas Bessi (Camptocamp)
#
# WARNING: This program as such is intended to be used by professional
# programmers who... | agpl-3.0 |
kartikgupta0909/gaia | test/unittest/test_parser.py | 3 | 5700 | #!/usr/bin/env python
# Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Gaia
#
# Gaia 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 (FSF), either ve... | agpl-3.0 |
backmari/moose | python/peacock/tests/input_tab/InputFileEditorWithMesh/test_InputFileEditorWithMesh.py | 1 | 9015 | #!/usr/bin/env python
from peacock.Input.InputFileEditorWithMesh import InputFileEditorWithMesh
from PyQt5.QtWidgets import QMainWindow, QMessageBox
from peacock.Input.ExecutableInfo import ExecutableInfo
from peacock.utils import Testing
import argparse, os
from mock import patch
class BaseTests(Testing.PeacockTester... | lgpl-2.1 |
petewarden/tensorflow | tensorflow/python/debug/wrappers/disk_usage_test.py | 11 | 4453 | # 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 |
danlrobertson/servo | tests/wpt/web-platform-tests/tools/third_party/py/py/_code/_assertionnew.py | 60 | 11450 | """
Find intermediate evalutation results in assert statements through builtin AST.
This should replace _assertionold.py eventually.
"""
import sys
import ast
import py
from py._code.assertion import _format_explanation, BuiltinAssertionError
def _is_ast_expr(node):
return isinstance(node, ast.expr)
def _is_ast... | mpl-2.0 |
marc-sensenich/ansible | test/units/modules/network/netvisor/test_pn_user.py | 9 | 3099 | # Copyright: (c) 2018, Pluribus Networks
# 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
import json
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn... | gpl-3.0 |
nwjs/chromium.src | third_party/blink/web_tests/external/wpt/tools/third_party/pytest/testing/test_parseopt.py | 30 | 13227 | from __future__ import absolute_import, division, print_function
import argparse
import sys
import os
import py
import pytest
from _pytest.config import argparsing as parseopt
@pytest.fixture
def parser():
return parseopt.Parser()
class TestParser(object):
def test_no_help_by_default(self, capsys):
... | bsd-3-clause |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.