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 |
|---|---|---|---|---|---|
jazztpt/edx-platform | common/djangoapps/enrollment/api.py | 56 | 15361 | """
Enrollment API for creating, updating, and deleting enrollments. Also provides access to enrollment information at a
course level, such as available course modes.
"""
from django.utils import importlib
import logging
from django.conf import settings
from django.core.cache import cache
from enrollment import errors... | agpl-3.0 |
wRieDen/imapx210-nb-linux-kernel | tools/perf/scripts/python/syscall-counts.py | 944 | 1429 | # system call counts
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.path.append(os.envir... | gpl-2.0 |
cjaymes/pyscap | src/scap/model/oval_5/sc/OvalSystemCharacteristicsElement.py | 1 | 1356 | # Copyright 2016 Casey Jaymes
# This file is part of PySCAP.
#
# PySCAP 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.
#
# PySCAP is ... | gpl-3.0 |
rananda/cfme_tests | fixtures/pytest_store.py | 2 | 6554 | """Storage for pytest objects during test runs
The objects in the module will change during the course of a test run,
so they have been stashed into the 'store' namespace
Usage:
# as pytest.store
import pytest
pytest.store.config, pytest.store.pluginmanager, pytest.store.session
# imported directly ... | gpl-2.0 |
ucloud/uai-sdk | examples/tensorflow/inference/im2txt/code/ops/inputs.py | 7 | 7468 | # 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 |
guiquanz/node-gyp | gyp/pylib/gyp/xml_fix.py | 2767 | 2174 | # Copyright (c) 2011 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.
"""Applies a fix to CR LF TAB handling in xml.dom.
Fixes this: http://code.google.com/p/chromium/issues/detail?id=76293
Working around this: http://bugs.python.or... | mit |
tylerpedley/Tetris | 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-3.0 |
ninegrid/dotfiles-vim | bundle/vim-python-mode/pymode/libs/pylama/config.py | 13 | 6016 | """ Parse arguments from command line and configuration files. """
import fnmatch
import sys
import os
from re import compile as re
import logging
from argparse import ArgumentParser
from . import __version__
from .libs.inirama import Namespace
from .lint.extensions import LINTERS
# Setup a logger
LOGGER = logging.... | unlicense |
HandyMenny/android_kernel_sony_u8500 | tools/perf/scripts/python/failed-syscalls-by-pid.py | 11180 | 2058 | # failed system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide failed system call totals, broken down by pid.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os
import sys
sys.pa... | gpl-2.0 |
vrjuggler/maestro | playpen/cluster_options/ClusterEditorBase.py | 2 | 4323 | # Maestro is Copyright (C) 2006-2008 by Infiscape Corporation
#
# Original Author: Aron Bierbaum
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your ... | gpl-2.0 |
DepthDeluxe/ansible | lib/ansible/modules/messaging/rabbitmq_plugin.py | 69 | 4777 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chatham Financial <oss@chathamfinancial.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... | gpl-3.0 |
degustaf/github3.py | github3/notifications.py | 10 | 5135 | # -*- coding: utf-8 -*-
"""
github3.notifications
=====================
This module contains the classes relating to notifications.
See also: http://developer.github.com/v3/activity/notifications/
"""
from __future__ import unicode_literals
from json import dumps
from .models import GitHubCore
class Thread(GitHubC... | bsd-3-clause |
aequitas/home-assistant | homeassistant/components/teksavvy/sensor.py | 2 | 6043 | """Support for TekSavvy Bandwidth Monitor."""
from datetime import timedelta
import logging
import async_timeout
import voluptuous as vol
from homeassistant.components.sensor import PLATFORM_SCHEMA
from homeassistant.const import (
CONF_API_KEY, CONF_MONITORED_VARIABLES, CONF_NAME)
from homeassistant.helpers.aioh... | apache-2.0 |
mplewis/platformio | platformio/builder/scripts/timsp430.py | 6 | 2409 | # Copyright (C) Ivan Kravets <me@ikravets.com>
# See LICENSE for details.
"""
Builder for Texas Instruments
MSP430 Ultra-Low Power 16-bit microcontrollers
"""
from os.path import join
from platform import system
from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default,
... | mit |
nikste/tensorflow | tensorflow/python/debug/examples/debug_errors.py | 150 | 2655 | # 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 |
zhongyi-zhang/azure-quickstart-templates | bosh-cf-crossregion/scripts/setup_env.py | 121 | 9192 | #!/usr/bin/env python
import json
import netaddr
import os
import random
import re
import requests
import sys
from azure.storage.blob import AppendBlobService
from azure.storage.table import TableService
import azure.mgmt.network
from azure.common.credentials import ServicePrincipalCredentials
from azure.mgmt.network ... | mit |
firebase/grpc | examples/python/cancellation/client.py | 13 | 3496 | # Copyright 2019 the 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 wri... | apache-2.0 |
mtnbikenc/ansible-modules-extras | cloud/profitbricks/profitbricks_nic.py | 132 | 8769 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... | gpl-3.0 |
jeffery9/mixprint_addons | analytic/__openerp__.py | 112 | 1877 | # -*- 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 |
yinquan529/platform-external-chromium_org | native_client_sdk/src/build_tools/dsc_info.py | 70 | 1816 | #!/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.
"""Extracts information from a library.dsc file."""
import optparse
import os
import sys
import parse_dsc
def Error(msg):
print >>... | bsd-3-clause |
Jayflux/servo | tests/wpt/web-platform-tests/tools/pywebsocket/test/test_util.py | 449 | 7538 | #!/usr/bin/env python
#
# Copyright 2011, 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... | mpl-2.0 |
rmfitzpatrick/ansible | lib/ansible/utils/module_docs_fragments/purestorage.py | 71 | 1297 | #
# (c) 2017, Simon Dodsley <simon@purestorage.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 option) any late... | gpl-3.0 |
adafruit/micropython | tests/basics/exceptpoly2.py | 63 | 1789 | try:
raise MemoryError
except Exception:
print("Caught MemoryError via Exception")
try:
raise MemoryError
except MemoryError:
print("Caught MemoryError")
try:
raise NameError
except Exception:
print("Caught NameError via Exception")
try:
raise NameError
except NameError:
print("Caught... | mit |
ravsa/python-for-android | src/buildlib/jinja2.egg/jinja2/parser.py | 637 | 35186 | # -*- coding: utf-8 -*-
"""
jinja2.parser
~~~~~~~~~~~~~
Implements the template parser.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
from jinja2 import nodes
from jinja2.exceptions import TemplateSyntaxError, TemplateAssertionError
from jinja2.lexer impo... | mit |
qedsoftware/commcare-hq | corehq/apps/userreports/tests/test_report_charts.py | 1 | 5758 | from django.test import SimpleTestCase
from corehq.apps.userreports.models import ReportConfiguration
from corehq.apps.userreports.exceptions import BadSpecError
from corehq.apps.userreports.reports.factory import ChartFactory
from corehq.apps.userreports.reports.specs import PieChartSpec, MultibarChartSpec, MultibarAg... | bsd-3-clause |
PRIMEDesigner15/PRIMEDesigner15 | dependencies/Lib/weakref.py | 769 | 11495 | """Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
"""
# Naming convention: Variables named "wr" are weak reference objects;
# they are called this instead of "ref" to avoid name collisions with
# the module-global ref() function imported from ... | bsd-3-clause |
tectronics/mavrec | smra/smra_portal/rfc3339.py | 2 | 10277 | #!/usr/bin/env python
#
# Copyright (c) 2009, 2010, Henry Precheur <henry@precheur.org>
#
# Permission to use, copy, modify, and/or 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 SOFTWA... | bsd-3-clause |
simudream/django-rest-framework | rest_framework/authtoken/serializers.py | 80 | 1032 | from django.contrib.auth import authenticate
from django.utils.translation import ugettext_lazy as _
from rest_framework import exceptions, serializers
class AuthTokenSerializer(serializers.Serializer):
username = serializers.CharField()
password = serializers.CharField(style={'input_type': 'password'})
... | bsd-2-clause |
zbqf109/goodo | openerp/addons/decimal_precision/decimal_precision.py | 47 | 2671 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import openerp
from openerp import SUPERUSER_ID
from openerp import tools
from openerp.osv import orm, fields
from openerp.modules.registry import RegistryManager
class decimal_precision(orm.Model):
_name = 'decim... | gpl-3.0 |
ehashman/oh-mainline | mysite/search/migrations/0005_add_original_bug_link.py | 17 | 2325 | # This file is part of OpenHatch.
# Copyright (C) 2009 OpenHatch, Inc.
#
# 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 License, or
# (at your option) any later v... | agpl-3.0 |
mshafiq9/django | tests/utils_tests/test_baseconv.py | 326 | 1787 | from unittest import TestCase
from django.utils.baseconv import (
BaseConverter, base2, base16, base36, base56, base62, base64,
)
from django.utils.six.moves import range
class TestBaseConv(TestCase):
def test_baseconv(self):
nums = [-10 ** 10, 10 ** 10] + list(range(-100, 100))
for converte... | bsd-3-clause |
postla/e2-gui | lib/python/Components/Converter/TemplatedMultiContent.py | 80 | 2879 | from Components.Converter.StringList import StringList
class TemplatedMultiContent(StringList):
"""Turns a python tuple list into a multi-content list which can be used in a listbox renderer."""
def __init__(self, args):
StringList.__init__(self, args)
from enigma import eListboxPythonMultiContent, gFont, RT_HAL... | gpl-2.0 |
imsparsh/python-for-android | python-modules/twisted/twisted/names/srvconnect.py | 52 | 6386 | # -*- test-case-name: twisted.names.test.test_srvconnect -*-
# Copyright (c) 2001-2009 Twisted Matrix Laboratories.
# See LICENSE for details.
import random
from zope.interface import implements
from twisted.internet import error, interfaces
from twisted.names import client, dns
from twisted.names.error import DNSN... | apache-2.0 |
rrampage/rethinkdb | test/rql_test/connections/http_support/werkzeug/contrib/fixers.py | 464 | 9949 | # -*- coding: utf-8 -*-
"""
werkzeug.contrib.fixers
~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.5
This module includes various helpers that fix bugs in web servers. They may
be necessary for some versions of a buggy web server but not others. We try
to stay updated with the status of the bug... | agpl-3.0 |
Jenselme/AutobahnPython | examples/twisted/websocket/broadcast/server.py | 3 | 3885 | ###############################################################################
#
# 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 |
acsone/stock-logistics-warehouse | stock_account_quant_merge/tests/test_merge.py | 3 | 4743 | # -*- coding: utf-8 -*-
# © 2016 Eficent Business and IT Consulting Services S.L.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp.addons.stock.tests.common import TestStockCommon
class TestMerge(TestStockCommon):
"""Test the potential quantity on a product with a multi-line BoM"... | agpl-3.0 |
acemod/ace3-misc | tools/setup.py | 2 | 3202 | #!/usr/bin/env python3
#######################
# ACEX Setup Script #
#######################
import os
import sys
import shutil
import platform
import subprocess
import winreg
######## GLOBALS #########
MAINDIR = "z"
PROJECTDIR = "acex"
##########################
def main():
FULLDIR = "{}\\{}".format(MAINDIR,... | gpl-2.0 |
ruleant/weblate | manage.py | 2 | 1084 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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 Soft... | gpl-3.0 |
miniconfig/home-assistant | homeassistant/components/device_tracker/bt_home_hub_5.py | 13 | 4161 | """
Support for BT Home Hub 5.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.bt_home_hub_5/
"""
import logging
import re
import threading
from datetime import timedelta
import xml.etree.ElementTree as ET
import json
from urllib.parse impo... | mit |
dankcoin/dankcoin | qa/rpc-tests/bipdersig.py | 1 | 3247 | #!/usr/bin/env python3
# Copyright (c) 2014-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 the BIP66 changeover logic
#
from test_framework.test_framework import DankcoinTestFramework
fr... | mit |
jeeftor/alfredToday | src/lib/ntlm3/U32.py | 4 | 3800 | # This file is part of 'NTLM Authorization Proxy Server' http://sourceforge.net/projects/ntlmaps/
# Copyright 2001 Dmitry A. Rozmanov <dima@xenon.spb.ru>
#
# 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... | mit |
tareqalayan/ansible | lib/ansible/modules/inventory/add_host.py | 66 | 2701 | # -*- mode: python -*-
#
# Copyright: Ansible Team
# 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',
'status': ['stablein... | gpl-3.0 |
pshen/ansible | lib/ansible/modules/packaging/language/maven_artifact.py | 63 | 16002 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2014, Chris Schmidt <chris.schmidt () contrastsecurity.com>
#
# Built using https://github.com/hamnis/useful-scripts/blob/master/python/download-maven-artifact
# as a reference and starting point.
#
# This module is free software: you can redistribute it and/or... | gpl-3.0 |
qedsoftware/commcare-hq | custom/apps/crs_reports/fields.py | 2 | 1360 | from corehq.apps.reports.dont_use.fields import ReportSelectField
from corehq.apps.reports.filters.users import SelectCaseOwnerFilter
from django.utils.translation import ugettext_noop
from django.utils.translation import ugettext as _
from corehq.apps.es import CaseES
def _get_blocks(domain):
query = (CaseES('re... | bsd-3-clause |
shssoichiro/servo | tests/wpt/css-tests/css-text-decor-3_dev/xhtml1print/support/generate-text-emphasis-style-property-tests.py | 841 | 3434 | #!/usr/bin/env python
# - * - coding: UTF-8 - * -
"""
This script generates tests text-emphasis-style-property-011 ~ 020 which
cover all possible values of text-emphasis-style property, except none
and <string>, with horizontal writing mode. It outputs a list of all
tests it generated in the format of Mozilla reftest.... | mpl-2.0 |
sayanchowdhury/fedmsg_meta_fedora_infrastructure | fedmsg_meta_fedora_infrastructure/autocloud.py | 1 | 2497 | # This file is part of fedmsg.
# Copyright (C) 2015 Sayan Chowdhury.
#
# fedmsg is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version... | lgpl-2.1 |
chenxulong/quanteco | quantecon/quad.py | 7 | 30082 | """
Filename: quad.py
Authors: Chase Coleman, Spencer Lyon
Date: 2014-07-01
Defining various quadrature routines.
Based on the quadrature routines found in the CompEcon toolbox by
Miranda and Fackler.
References
----------
Miranda, Mario J, and Paul L Fackler. Applied Computational Economics
and Finance, MIT Press, ... | bsd-3-clause |
CYBAI/servo | tests/wpt/web-platform-tests/tools/third_party/aioquic/docs/conf.py | 17 | 5850 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# aioquic documentation build configuration file, created by
# sphinx-quickstart on Thu Feb 8 17:22:14 2018.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# au... | mpl-2.0 |
scroggo/skia | tools/skp/page_sets/skia_ebay_desktop.py | 9 | 1442 | # Copyright 2014 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.
# pylint: disable=W0401,W0614
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class SkiaBuildbotDesk... | bsd-3-clause |
codingdojotw/CppMiniTutorial | third_party/gmock-1.7.0/gtest/test/gtest_filter_unittest.py | 2826 | 21261 | #!/usr/bin/env python
#
# Copyright 2005 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... | mit |
ChengeLi/VehicleTracking | utilities/embedding.py | 1 | 3427 | #### embedding
from sklearn.decomposition import PCA
from sklearn.manifold import TSNE, MDS
from mpl_toolkits.mplot3d import Axes3D
class embeddings(obj):
def __init__(self, model,data):
self.modelChoice = model
self.data = data
# self.data = FeatureMtx_norm
def PCA_embedding(self,n_c... | mit |
rclmenezes/sqlalchemy | doc/build/builder/dialect_info.py | 5 | 6366 | import re
from sphinx.util.compat import Directive
from docutils import nodes
class DialectDirective(Directive):
has_content = True
_dialects = {}
def _parse_content(self):
d = {}
d['default'] = self.content[0]
d['text'] = []
idx = 0
for line in self.content[1:]:
... | mit |
mattt416/neutron | neutron/tests/unit/plugins/ml2/drivers/base_type_tunnel.py | 19 | 15909 | # Copyright (c) 2014 OpenStack Foundation, all rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 |
UdjinM6/omim | data/benchmarks/tk_results_viewer.py | 53 | 9617 | from Tkinter import *
import tkMessageBox
import math
import sys
import copy
import os
import shutil
import time
def less_start_time(t1, t2):
fmt = '%a_%b_%d_%H:%M:%S_%Y'
return time.strptime(t1[0].replace('__','_'), fmt) < time.strptime(t2[0].replace('__','_'), fmt)
class BenchmarkResultsFrame(Frame):
de... | apache-2.0 |
shamanu4/netmiko | netmiko/ssh_dispatcher.py | 1 | 3921 | """Controls selection of proper class based on the device type."""
from __future__ import unicode_literals
from netmiko.cisco import CiscoIosSSH
from netmiko.cisco import CiscoIosTelnet
from netmiko.cisco import CiscoAsaSSH
from netmiko.cisco import CiscoNxosSSH
from netmiko.cisco import CiscoXrSSH
from netmiko.cisco i... | mit |
BigBearGCU/googletest | test/gtest_xml_test_utils.py | 1815 | 8876 | #!/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... | bsd-3-clause |
dati91/servo | tests/wpt/web-platform-tests/tools/third_party/more-itertools/more_itertools/tests/test_recipes.py | 39 | 19558 | from doctest import DocTestSuite
from unittest import TestCase
from itertools import combinations
from six.moves import range
import more_itertools as mi
def load_tests(loader, tests, ignore):
# Add the doctests
tests.addTests(DocTestSuite('more_itertools.recipes'))
return tests
class AccumulateTests(... | mpl-2.0 |
Juniper/contrail-dev-neutron | neutron/db/migration/alembic_migrations/versions/157a5d299379_ml2_binding_profile.py | 11 | 1586 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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... | apache-2.0 |
jashandeep-sohi/pyds | docs/conf.py | 1 | 8535 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pyds documentation build configuration file, created by
# sphinx-quickstart on Thu May 29 20:47:19 2014.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autog... | gpl-3.0 |
bmotlaghFLT/FLT_PhantomJS | src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/stack_utils.py | 215 | 2734 | # Copyright (C) 2011 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 ... | bsd-3-clause |
arista-eosplus/ansible | test/units/modules/network/nxos/test_nxos_ip_interface.py | 19 | 3005 | # (c) 2016 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 |
robhudson/kuma | vendor/packages/translate/storage/lisa.py | 24 | 13208 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006-2011 Zuza Software Foundation
#
# This file is part of the Translate Toolkit.
#
# 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; e... | mpl-2.0 |
ProfessionalIT/professionalit-webiste | sdk/google_appengine/lib/django-1.4/django/utils/dates.py | 488 | 2237 | "Commonly-used date structures"
from django.utils.translation import ugettext_lazy as _, pgettext_lazy
WEEKDAYS = {
0:_('Monday'), 1:_('Tuesday'), 2:_('Wednesday'), 3:_('Thursday'), 4:_('Friday'),
5:_('Saturday'), 6:_('Sunday')
}
WEEKDAYS_ABBR = {
0:_('Mon'), 1:_('Tue'), 2:_('Wed'), 3:_('Thu'), 4:_('Fri')... | lgpl-3.0 |
JShadowMan/packages | python/zdl/error_logger/error_logger/utils/daemon.py | 2 | 2948 | #!/usr/bin/env python
#
# Copyright (C) 2017 DL
#
import os
import sys
import atexit
import signal
from error_logger.utils import (
logger, exceptions
)
class Daemon(object):
def __init__(self, debug=False, pid_file=None, stdin='/dev/null',
stdout='/dev/null', stderr='/dev/null'):
se... | mit |
simdugas/childcare | languages/id.py | 148 | 11233 | # coding: utf8
{
'!langcode!': 'id',
'!langname!': 'Indonesian',
'%d days ago': '%d hari yang lalu',
'%d hours ago': '%d jam yang lalu',
'%d minutes ago': '%d menit yang lalu',
'%d months ago': '%d bulan yang lalu',
'%d seconds ago': '%d detik yang lalu',
'%d seconds from now': '%d detik dari sekarang',
'%d weeks ago':... | gpl-2.0 |
ProjectSWGCore/NGECore2 | scripts/object/tangible/wearables/ring/item_band_set_smuggler_dps_01_01.py | 2 | 1144 | import sys
def setup(core, object):
object.setAttachment('radial_filename', 'ring/unity')
object.setAttachment('objType', 'ring')
object.setStfFilename('static_item_n')
object.setStfName('item_band_set_smuggler_dps_01_01')
object.setDetailFilename('static_item_d')
object.setDetailName('item_band_set_smuggler_dps... | lgpl-3.0 |
sogelink/ansible | lib/ansible/modules/database/postgresql/postgresql_privs.py | 26 | 25234 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: 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__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
modesttree/Projeny | Source/prj/main/PrjRunner.py | 1 | 7435 |
import sys
import os
import webbrowser
from mtm.util.Assert import *
import mtm.util.MiscUtil as MiscUtil
import mtm.util.PlatformUtil as PlatformUtil
from mtm.util.Platforms import Platforms
from mtm.util.CommonSettings import ConfigFileName
import mtm.ioc.Container as Container
from mtm.ioc.Inject import Inject
... | mit |
Quikling/gpdb | gpMgmt/bin/gppylib/system/configurationImplGpdb.py | 6 | 17891 | #!/usr/bin/env python
#
# Copyright (c) Greenplum Inc 2010. All Rights Reserved.
# Copyright (c) EMC/Greenplum Inc 2011. All Rights Reserved.
#
"""
This file defines the interface that can be used to fetch and update system
configuration information.
"""
import os, copy
from gppylib.gplog import *
from gppylib.utils i... | apache-2.0 |
iqas/e2gui | lib/python/Plugins/Extensions/MiniTV/plugin.py | 29 | 2039 | from Plugins.Plugin import PluginDescriptor
from Components.PluginComponent import plugins
from Components.config import config, ConfigSubsection, ConfigSelection
from enigma import eDBoxLCD
config.plugins.minitv = ConfigSubsection()
config.plugins.minitv.enable = ConfigSelection(default = "disable", choices = [ ("ena... | gpl-2.0 |
ChanderG/scipy | scipy/io/harwell_boeing/hb.py | 83 | 18473 | """
Implementation of Harwell-Boeing read/write.
At the moment not the full Harwell-Boeing format is supported. Supported
features are:
- assembled, non-symmetric, real matrices
- integer for pointer/indices
- exponential format for float values, and int format
"""
from __future__ import division, print_... | bsd-3-clause |
berkerpeksag/astor | astor/code_gen.py | 1 | 31784 | # -*- coding: utf-8 -*-
"""
Part of the astor library for Python AST manipulation.
License: 3-clause BSD
Copyright (c) 2008 Armin Ronacher
Copyright (c) 2012-2017 Patrick Maupin
Copyright (c) 2013-2017 Berker Peksag
This module converts an AST into Python source code.
Before being version-controlled as part of... | bsd-3-clause |
pashinin/fabric | fabric/contrib/console.py | 67 | 1175 | """
Console/terminal user interface functionality.
"""
from fabric.api import prompt
def confirm(question, default=True):
"""
Ask user a yes/no question and return their response as True or False.
``question`` should be a simple, grammatically complete question such as
"Do you wish to continue?", an... | bsd-2-clause |
seims/SEIMS | preprocess/import_parameters.py | 2 | 8592 | #! /usr/bin/env python
# coding=utf-8
# @Import model calibrateion parameters
# Author: Junzhi Liu
# Revised: Liang-Jun Zhu
#
import sqlite3
from struct import pack
from gridfs import *
from pymongo import MongoClient
from pymongo.errors import ConnectionFailure
from config import *
from gen_subbasins import ImportS... | gpl-2.0 |
ShashaQin/erpnext | erpnext/controllers/tests/test_recurring_document.py | 31 | 4665 | # 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
import frappe.permissions
from erpnext.controllers.recurring_document import date_field_map
from frappe.utils import get_first_day, get_la... | agpl-3.0 |
att-comdev/armada | armada/tests/unit/utils/test_source.py | 1 | 9206 | # Copyright 2017 The Armada 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 w... | apache-2.0 |
Tony-Zhang03/kafka | system_test/utils/testcase_env.py | 71 | 7198 | # 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 |
LiamBao/Spiders | LivePlatformIndex/douyuOnlineCount.py | 1 | 5918 | # -*- coding: utf-8 -*-
##__author__ =='liam'
# python3.52
import re,time,random
import requests
import tkinter as tk
from tkinter import filedialog
import xlsxwriter as wx
from lxml import etree
USER_AGENTS = [
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.5... | gpl-3.0 |
Chilledheart/chromium | tools/telemetry/third_party/gsutilz/third_party/boto/boto/contrib/ymlmessage.py | 70 | 1880 | # Copyright (c) 2006,2007 Chris Moyer
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish, di... | bsd-3-clause |
etos/django | tests/template_tests/filter_tests/test_rjust.py | 521 | 1030 | from django.template.defaultfilters import rjust
from django.test import SimpleTestCase
from django.utils.safestring import mark_safe
from ..utils import setup
class RjustTests(SimpleTestCase):
@setup({'rjust01': '{% autoescape off %}.{{ a|rjust:"5" }}. .{{ b|rjust:"5" }}.{% endautoescape %}'})
def test_rju... | bsd-3-clause |
charbeljc/OCB | addons/hr_timesheet_sheet/report/hr_timesheet_report.py | 194 | 4092 | # -*- 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 |
dgwakeman/mne-python | mne/io/tree.py | 11 | 4708 | # Authors: Alexandre Gramfort <alexandre.gramfort@telecom-paristech.fr>
# Matti Hamalainen <msh@nmr.mgh.harvard.edu>
#
# License: BSD (3-clause)
import struct
import numpy as np
from .constants import FIFF
from .tag import Tag
from .tag import read_tag
from .write import write_id, start_block, end_block, _wr... | bsd-3-clause |
mrpau/kolibri | kolibri/core/content/serializers.py | 1 | 12418 | from django.db.models import Manager
from django.db.models import Sum
from django.db.models.query import RawQuerySet
from le_utils.constants import content_kinds
from rest_framework import serializers
from kolibri.core.content.models import ChannelMetadata
from kolibri.core.content.models import ContentNode
from kolib... | mit |
mj-5/volatility | volatility/plugins/mac/session_hash_table.py | 45 | 2308 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 o... | gpl-2.0 |
ZENGXH/scikit-learn | sklearn/utils/tests/test_estimator_checks.py | 202 | 3757 | import scipy.sparse as sp
import numpy as np
import sys
from sklearn.externals.six.moves import cStringIO as StringIO
from sklearn.base import BaseEstimator, ClassifierMixin
from sklearn.utils.testing import assert_raises_regex, assert_true
from sklearn.utils.estimator_checks import check_estimator
from sklearn.utils.... | bsd-3-clause |
wbvalid/python2 | getVduNormal.py | 1 | 1309 | #!/usr/bin/python
import re
import time
import sys
import os
work_path = '/home/vpu_data'
def to_unix(date):
if len(date) < 14:
date = date + '0' * (14 - len(date))
return int(time.mktime(time.strptime(date, "%Y%m%d%H%M%S")))
def convert(file_name):
hex_num = re.findall(r'/(\w{16})_', file_name... | unlicense |
huseyinbiyik/plugin.program.ump | lib/providers/audio_link_youtube.py | 2 | 3032 | # -*- coding: utf-8 -*-
import json
import re
import urlparse
import unidecode
domain="http://www.youtube.com/"
encoding="utf-8"
tunnel=["cookie"]
timetol=5
maxttol=15
filters=["sheetmusic","canli","live","karaoke","cover","concert","konser","remix","reaction","parody","meet","version","tutorial"]
def add(hash,i,arti... | gpl-2.0 |
malayaleecoder/servo | tests/wpt/css-tests/tools/html5lib/html5lib/treewalkers/pulldom.py | 1729 | 2302 | from __future__ import absolute_import, division, unicode_literals
from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \
COMMENT, IGNORABLE_WHITESPACE, CHARACTERS
from . import _base
from ..constants import voidElements
class TreeWalker(_base.TreeWalker):
def __iter__(self):
ignore_until = None... | mpl-2.0 |
alxgu/ansible | lib/ansible/plugins/callback/logdna.py | 52 | 6805 | # (c) 2018, Samir Musali <samir.musali@logdna.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
DOCUMENTATION = '''
callback: logdna
callback_type: aggregate
short_descri... | gpl-3.0 |
erwilan/ansible | lib/ansible/plugins/lookup/passwordstore.py | 60 | 7765 | # (c) 2017, Patrick Deelman <patrick@patrickdeelman.nl>
#
# 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 l... | gpl-3.0 |
gmaxwell/bitcoin | test/functional/invalidblockrequest.py | 19 | 4319 | #!/usr/bin/env python3
# Copyright (c) 2015-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 node responses to invalid blocks.
In this test we connect to one node over p2p, and test block re... | mit |
valkjsaaa/sl4a | python/src/Lib/filecmp.py | 61 | 9470 | """Utilities for comparing files and directories.
Classes:
dircmp
Functions:
cmp(f1, f2, shallow=1) -> int
cmpfiles(a, b, common) -> ([], [], [])
"""
import os
import stat
from itertools import ifilter, ifilterfalse, imap, izip
__all__ = ["cmp","dircmp","cmpfiles"]
_cache = {}
BUFSIZE=8*1024
def cmp(... | apache-2.0 |
Backflipz/plugin.video.excubed | resources/lib/more_itertools/recipes.py | 6 | 8915 | """Imported from the recipes section of the itertools documentation.
All functions taken from the recipes section of the itertools library docs
[1]_.
Some backward-compatible usability improvements have been made.
.. [1] http://docs.python.org/library/itertools.html#recipes
"""
from collections import deque
from ite... | gpl-2.0 |
fifengine/fifengine | engine/python/fife/extensions/pychan/widgets/radiobutton.py | 1 | 4543 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2019 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | lgpl-2.1 |
asm666/sympy | bin/coverage_doctest.py | 83 | 21410 | #!/usr/bin/env python
"""
Program to test that all methods/functions have at least one example
doctest. Also checks if docstrings are imported into Sphinx. For this to
work, the Sphinx docs need to be built first. Use "cd doc; make html" to
build the Sphinx docs.
Usage:
./bin/coverage_doctest.py sympy/core
or
./... | bsd-3-clause |
dya2/python-for-android | python3-alpha/python3-src/Lib/test/test_compileall.py | 51 | 14735 | import sys
import compileall
import imp
import os
import py_compile
import shutil
import struct
import subprocess
import tempfile
import time
import unittest
import io
from test import support, script_helper
class CompileallTests(unittest.TestCase):
def setUp(self):
self.directory = tempfile.mkdtemp()
... | apache-2.0 |
vjmac15/Lyilis | lib/pip/_vendor/distlib/metadata (VJ Washington's conflicted copy 2017-08-29).py | 335 | 38833 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.
Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals
import codecs
from email... | gpl-3.0 |
RobCranfill/miditrans | changer.py | 1 | 2952 | #!/usr/bin/python3
#
# Command-line app to write data for MPK mapper app
# Note that we want Python 3, not 2!
# robcranfill@gmail.com
import sys
SR18voiceNames_ = [
"kick",
"snare_1",
"snare_2",
"highhat_1",
"highhat_2",
"highhat_3",
"tom_1",
"tom_2",
... | gpl-2.0 |
dagwieers/ansible-modules-extras | packaging/language/npm.py | 73 | 8566 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Chris Hoffman <christopher.hoffman@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 ... | gpl-3.0 |
jstrobl/rts2 | scripts/rts2saf/rts2saf_exclusive.py | 3 | 6092 | #!/usr/bin/env python
# (C) 2017, Markus Wildi, wildi.markus@bluewin.ch
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# ... | lgpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.