repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
eckucukoglu/arm-linux-gnueabihf | refs/heads/master | arm-linux-gnueabihf/libc/usr/lib/python2.7/distutils/tests/test_install_scripts.py | 95 | """Tests for distutils.command.install_scripts."""
import os
import unittest
from distutils.command.install_scripts import install_scripts
from distutils.core import Distribution
from distutils.tests import support
from test.test_support import run_unittest
class InstallScriptsTestCase(support.TempdirManager,
... |
madan96/sympy | refs/heads/master | sympy/combinatorics/testutil.py | 33 | from __future__ import print_function, division
from sympy.core.compatibility import range
from sympy.combinatorics.util import _distribute_gens_by_base
from sympy.combinatorics import Permutation
rmul = Permutation.rmul
def _cmp_perm_lists(first, second):
"""
Compare two lists of permutations as sets.
... |
nil0x42/phpsploit | refs/heads/master | plugins/network/bannergrab/plugin.py | 1 | """TCP Banner Grabber
SYNOPSIS:
bannergrab <address> [-p <PORT>] [-t <TIMEOUT>]
-p single or range of port(s) to connect to
* single : -p port
* range : -p min-max
-t socket timeout
DESCRIPTION:
Connect to a single port or range of ports and grab the
application banner
... |
KjellZijlemaker/Course-exercises-System-Engineering-2 | refs/heads/master | Python/Lab 8/Server:Client model : multiple sockets/NewClient.py | 1 | '''
Created on 5 okt. 2014
@author: kjellzijlemaker
'''
import socket
import sys
class MyClient():
def setClient(self):
message = raw_input('Please enter a message: ')
server_address = ('localhost', 10000)
#Create TCP/IP socket
socks = [socket.socket(socket.AF_INET, so... |
retomerz/intellij-community | refs/heads/master | python/testData/refactoring/introduceConstant/suggestUniqueNamesGlobalScope.py | 83 | S = True
STR = True
def foo():
"<caret>"
|
slyphon/pants | refs/heads/master | src/python/pants/backend/jvm/tasks/jvm_compile/anonymizer.py | 25 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import base64
import... |
gengue/django | refs/heads/master | tests/messages_tests/base.py | 319 | from django import http
from django.contrib.messages import constants, get_level, set_level, utils
from django.contrib.messages.api import MessageFailure
from django.contrib.messages.constants import DEFAULT_LEVELS
from django.contrib.messages.storage import base, default_storage
from django.contrib.messages.storage.ba... |
FusionSP/android_external_chromium_org | refs/heads/lp5.1 | tools/metrics/histograms/pretty_print.py | 36 | #!/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.
"""Pretty-prints the histograms.xml file, alphabetizing tags, wrapping text
at 80 chars, enforcing standard attribute ordering, and sta... |
rmoorman/reclass | refs/heads/master | reclass/core.py | 3 | #
# -*- coding: utf-8 -*-
#
# This file is part of reclass (http://github.com/madduck/reclass)
#
# Copyright © 2007–14 martin f. krafft <madduck@madduck.net>
# Released under the terms of the Artistic Licence 2.0
#
import time
#import types
import re
#import sys
import fnmatch
import shlex
from reclass.datatypes impor... |
sander76/home-assistant | refs/heads/dev | homeassistant/components/zengge/__init__.py | 36 | """The zengge component."""
|
jolevq/odoopub | refs/heads/master | addons/hr_payroll_account/wizard/hr_payroll_payslips_by_employees.py | 337 | # -*- 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... |
Royal-Society-of-New-Zealand/NZ-ORCID-Hub | refs/heads/master | orcid_api_v3/models/preferences_v20.py | 1 | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... |
trondeau/gnuradio | refs/heads/master | gr-zeromq/python/zeromq/qa_zeromq_pub.py | 37 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3... |
leafclick/intellij-community | refs/heads/master | python/testData/formatter/dictWrappingChopDownIfLong.py | 78 | handlers = {ACTION_1: handle_action_1, ACTION_2: handle_action_2, ACTION_3: handle_action_3, ACTION_4: handle_action_4,
ACTION_5: handle_action_5, ACTION_6: handle_action_6, ACTION_7: handle_action_7, ACTION_8: handle_action_8} |
maas/maas | refs/heads/master | src/maasserver/models/tests/test_space.py | 1 | # Copyright 2015-2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the Space model."""
from django.core.exceptions import PermissionDenied, ValidationError
from testtools.matchers import Equals, MatchesStructure
from maasserve... |
jorisvandenbossche/DS-python-data-analysis | refs/heads/master | notebooks/_solutions/pandas_03a_selecting_data21.py | 1 | len(titles[(titles['year'] >= 1950) & (titles['year'] <= 1959)]) |
CUFCTL/DLBD | refs/heads/master | face-detection-code/object_detection/core/region_similarity_calculator.py | 23 | # Copyright 2017 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... |
40223101/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/pwd.py | 730 |
def getpwuid():
pass
|
kiwicopple/MyMDb | refs/heads/master | venv/Lib/site-packages/pygments/lexers/rust.py | 72 | # -*- coding: utf-8 -*-
"""
pygments.lexers.rust
~~~~~~~~~~~~~~~~~~~~
Lexers for the Rust language.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups, words, default
from pygments... |
eckardm/archivematica | refs/heads/stable/1.5.x | src/MCPClient/lib/clientScripts/moveDspaceMetsFilesToDSpaceMETS.py | 1 | #!/usr/bin/env python2
# This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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, ... |
Spiderlover/Toontown | refs/heads/master | toontown/building/DistributedTrophyMgrAI.py | 2 | from direct.directnotify.DirectNotifyGlobal import *
from direct.distributed.DistributedObjectAI import DistributedObjectAI
MAX_LISTING = 10
AV_ID_INDEX = 0
NAME_INDEX = 1
SCORE_INDEX = 2
class DistributedTrophyMgrAI(DistributedObjectAI):
notify = directNotify.newCategory('DistributedTrophyMgrAI')
def __i... |
stephrdev/django-userprofiles | refs/heads/master | userprofiles/utils.py | 3 | from django.conf import settings
from django.contrib.auth.models import SiteProfileNotAvailable
from django.core.exceptions import ImproperlyConfigured
from django.db import models
from userprofiles.settings import up_settings
try:
from importlib import import_module
except ImportError:
from django.utils.impo... |
struempelix/mbed | refs/heads/master | workspace_tools/dev/syms.py | 120 | """
mbed SDK
Copyright (c) 2011-2013 ARM Limited
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 wr... |
cprov/snapcraft | refs/heads/master | snapcraft/plugins/ant.py | 2 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2015 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in the h... |
mozilla/moztrap | refs/heads/master | tests/model/environments/models/test_category.py | 5 | """
Tests for Category model.
"""
from tests import case
class CategoryTest(case.DBTestCase):
"""Tests for Category model."""
def test_unicode(self):
"""Unicode representation is name of category."""
c = self.F.CategoryFactory(name="Operating System")
self.assertEqual(unicode(c), u"... |
callowayproject/django-newsletters | refs/heads/master | doc_src/conf.py | 1 | # -*- coding: utf-8 -*-
#
# app documentation build configuration file, created by
# sphinx-quickstart on Wed Oct 21 13:18:22 2009.
#
# 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
# autogenerated file.
#
# All con... |
felixma/nova | refs/heads/master | nova/tests/unit/virt/libvirt/test_fakelibvirt.py | 49 | # Copyright 2010 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 l... |
Jaironlanda/yowsup | refs/heads/master | yowsup/layers/protocol_acks/protocolentities/ack_incoming.py | 70 | from yowsup.structs import ProtocolEntity, ProtocolTreeNode
from .ack import AckProtocolEntity
class IncomingAckProtocolEntity(AckProtocolEntity):
'''
<ack t="{{TIMESTAMP}}" from="{{FROM_JID}}" id="{{MESSAGE_ID}}" class="{{message | receipt | ?}}">
</ack>
'''
def __init__(self, _id, _class, _from,... |
StefanescuCristian/hammerhead | refs/heads/almost_stock | tools/perf/scripts/python/syscall-counts.py | 11181 | # 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... |
sktjdgns1189/android_kernel_samsung_SHV-E110S | refs/heads/master | tools/perf/scripts/python/syscall-counts.py | 11181 | # 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... |
MalloyPower/parsing-python | refs/heads/master | front-end/testsuite-python-lib/Python-2.1/Lib/htmllib.py | 4 | """HTML 2.0 parser.
See the HTML 2.0 specification:
http://www.w3.org/hypertext/WWW/MarkUp/html-spec/html-spec_toc.html
"""
from sgmllib import SGMLParser
from formatter import AS_IS
__all__ = ["HTMLParser"]
class HTMLParser(SGMLParser):
from htmlentitydefs import entitydefs
def __init__(self, formatter,... |
ToonBoxEntertainment/rez | refs/heads/master | src/rez/vendor/pygraph/algorithms/searching.py | 11 | # Copyright (c) 2007-2009 Pedro Matiello <pmatiello@gmail.com>
#
# 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,... |
sudheerchintala/LearnEraPlatForm | refs/heads/master | common/test/acceptance/pages/studio/export.py | 28 | """
Course Export page.
"""
from .course_page import CoursePage
from utils import click_css
class ExportPage(CoursePage):
"""
Course Export page.
"""
url_path = "export"
def is_browser_on_page(self):
return self.q(css='body.view-export').present
def click_export_button(self):
... |
barachka/odoo | refs/heads/master | addons/l10n_be_invoice_bba/__init__.py | 438 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it u... |
ader1990/cloudbase-init | refs/heads/master | cloudbaseinit/tests/utils/windows/test_licensing.py | 4 | # Copyright (c) 2017 Cloudbase Solutions Srl
#
# 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 applicab... |
mahabuber/erpnext | refs/heads/develop | erpnext/patches/v5_0/update_dn_against_doc_fields.py | 109 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
import frappe
def execute():
frappe.reload_doc('stock', 'doctype', 'delivery_note_item')
frappe.db.sql("""update `tabDelivery Note Item` set so_detail = prevdoc_detail_docname
where ifnu... |
michabs/linux-imx6-3.14 | refs/heads/master | tools/perf/scripts/python/event_analyzing_sample.py | 4719 | # event_analyzing_sample.py: general event handler in python
#
# Current perf report is already very powerful with the annotation integrated,
# and this script is not trying to be as powerful as perf report, but
# providing end user/developer a flexible way to analyze the events other
# than trace points.
#
# The 2 dat... |
ldoktor/avocado-vt | refs/heads/master | virttest/qemu_devices/qdevices.py | 1 | """
Autotest representation of qemu devices.
These classes implements various features in order to simulate, verify or
interact with qemu qdev structure.
:copyright: 2012-2013 Red Hat Inc.
"""
import logging
import re
import traceback
from collections import OrderedDict
from functools import reduce
from virttest imp... |
orcmkit/ORCmKit | refs/heads/master | Python27/ORCSim/LineSet.py | 1 | from __future__ import division
from CoolProp.CoolProp import PropsSI
from Correlations import f_h_1phase_Tube,TrhoPhase_ph,Tsat
from math import log,pi,exp
class LineSetClass():
def __init__(self,**kwargs):
#Load the parameters passed in
# using the dictionary
self.__dict__.update(kwargs)
... |
gfyoung/scipy | refs/heads/master | tools/authors.py | 11 | #!/usr/bin/env python
# -*- encoding:utf-8 -*-
"""
git-authors [OPTIONS] REV1..REV2
List the authors who contributed within a given revision interval.
To change the name mapping, edit .mailmap on the top-level of the
repository.
"""
# Author: Pauli Virtanen <pav@iki.fi>. This script is in the public domain.
from __... |
kmoocdev/edx-platform | refs/heads/kmooc.rc0 | common/lib/xmodule/xmodule/assetstore/__init__.py | 12 | """
Classes representing asset metadata.
"""
from datetime import datetime
import dateutil.parser
import pytz
import json
from contracts import contract, new_contract
from opaque_keys.edx.keys import CourseKey, AssetKey
from lxml import etree
new_contract('AssetKey', AssetKey)
new_contract('CourseKey', CourseKey)
ne... |
NewPresident1/kitsune | refs/heads/master | kitsune/forums/tests/test_views.py | 15 | from mock import patch, Mock
from nose.tools import eq_
from django.contrib.contenttypes.models import ContentType
from kitsune.access.tests import permission
from kitsune.forums.events import NewThreadEvent, NewPostEvent
from kitsune.forums.models import Forum, Thread
from kitsune.forums.tests import (
ForumTest... |
szendrei/django-unleashed | refs/heads/master | listeria/lists/forms.py | 1 | from django import forms
from django.core.exceptions import ValidationError
from django.utils.text import slugify
from .models import Item, List
class ListForm(forms.ModelForm):
class Meta:
model = List
fields = "__all__"
def __init__(self, *args, **kwargs):
super(ListForm, self).__ini... |
EvanK/ansible | refs/heads/devel | lib/ansible/modules/windows/win_partition.py | 48 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Varun Chopra (@chopraaa) <v@chopraaa.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
ANSIBLE_METADATA = {
'metadata_version': '1.1',
'status': ['preview'],
'supported_by': 'community'
}
DOCU... |
Semi-global/edx-platform | refs/heads/master | cms/djangoapps/contentstore/views/import_export.py | 32 | """
These views handle all actions in Studio related to import and exporting of
courses
"""
import base64
import logging
import os
import re
import shutil
import tarfile
from path import Path as path
from tempfile import mkdtemp
from django.conf import settings
from django.contrib.auth.decorators import login_required... |
agry/NGECore2 | refs/heads/master | scripts/object/building/kashyyyk/decd_trillium_palm_tall01.py | 85615 | import sys
def setup(core, object):
return |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/object/mobile/violent_krahbu.py | 85615 | import sys
def setup(core, object):
return |
gangadhar-kadam/mtn-erpnext | refs/heads/master | hr/search_criteria/employee_information/employee_information.py | 3 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 yo... |
rven/odoo | refs/heads/14.0-fix-partner-merge-mail-activity | addons/payment_adyen/controllers/__init__.py | 738 | # -*- coding: utf-8 -*-
from . import main
|
ShassAro/ShassAro | refs/heads/master | Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/core/management/commands/createcachetable.py | 55 | from optparse import make_option
from django.conf import settings
from django.core.cache import caches
from django.core.cache.backends.db import BaseDatabaseCache
from django.core.management.base import BaseCommand, CommandError
from django.db import connections, router, transaction, models, DEFAULT_DB_ALIAS
from djan... |
trtt/apitrace | refs/heads/guiwip2 | retrace/dllretrace.py | 7 | ##########################################################################
#
# Copyright 2008-2010 VMware, Inc.
# 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 withou... |
ballouche/navitia | refs/heads/dev | source/jormungandr/jormungandr/module_resource.py | 3 | # coding=utf-8
# Copyright (c) 2001-2014, Canal TP and/or its affiliates. All rights reserved.
#
# This file is part of Navitia,
# the software to build cool stuff with public transport.
#
# Hope you'll enjoy and contribute to this project,
# powered by Canal TP (www.canaltp.fr).
# Help us simplify mobility and open p... |
arabenjamin/scikit-learn | refs/heads/master | examples/linear_model/plot_multi_task_lasso_support.py | 249 | #!/usr/bin/env python
"""
=============================================
Joint feature selection with multi-task Lasso
=============================================
The multi-task lasso allows to fit multiple regression problems
jointly enforcing the selected features to be the same across
tasks. This example simulates... |
Renzo-Olivares/BAMF_android_kernel_htc_msm8660 | refs/heads/exp_sense | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... |
canaltinova/servo | refs/heads/master | tests/wpt/mozilla/tests/webgl/conformance-2.0.0/deqp/functional/gles3/textureformat/textureformat_test_generator.py | 51 | #!/usr/bin/env python
# Copyright (c) 2016 The Khronos Group Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and/or associated documentation files (the
# "Materials"), to deal in the Materials without restriction, including
# without limitation the rights to use... |
sbidoul/pip | refs/heads/main | src/pip/_internal/distributions/base.py | 6 | import abc
from typing import Optional
from pip._vendor.pkg_resources import Distribution
from pip._internal.index.package_finder import PackageFinder
from pip._internal.req import InstallRequirement
class AbstractDistribution(metaclass=abc.ABCMeta):
"""A base class for handling installable artifacts.
The ... |
amrdraz/brython | refs/heads/master | www/src/Lib/os.py | 635 | r"""OS routines for Mac, NT, or Posix depending on what system we're on.
This exports:
- all functions from posix, nt, os2, or ce, e.g. unlink, stat, etc.
- os.path is either posixpath or ntpath
- os.name is either 'posix', 'nt', 'os2' or 'ce'.
- os.curdir is a string representing the current directory ('.' or... |
zqzhang/crosswalk-test-suite | refs/heads/master | webapi/tct-sse-w3c-tests/inst.apk.py | 1996 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PARAMETERS = None
ADB_CMD = "adb"
def doCMD(cmd):
# Do not need handle timeout in this short script, let tool... |
PWNCgit/website | refs/heads/master | sites/all/themes/pwnc_theme/node_modules/node-gyp/gyp/PRESUBMIT.py | 1369 | # Copyright (c) 2012 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.
"""Top-level presubmit script for GYP.
See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts
for more details about the presubmit API built... |
deepaknadig/pyNets | refs/heads/master | udpSimpleServer.py | 1 | import socket
import sys
__author__ = 'Deepak Nadig Anantha'
'''
This server runs only on localhost
'''
PORT = 55555
MAX = 65535
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
if sys.argv[1:] == ['server']:
s.bind(('127.0.0.1', PORT))
print 'Server is listening at: %s' % repr(s.getsockname())
whi... |
gojira/tensorflow | refs/heads/master | tensorflow/contrib/distributions/python/kernel_tests/util/correlation_matrix_volumes.py | 15 | # 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... |
eriknor/HiBench | refs/heads/master | bin/functions/monitor.py | 19 | #!/usr/bin/env python2
# 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 "Lice... |
mahak/neutron | refs/heads/master | neutron/tests/unit/plugins/ml2/drivers/agent/test__agent_manager_base.py | 5 | # Copyright (c) 2016 IBM Corp.
#
# 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 ... |
LecomteEmerick/Essentia-build | refs/heads/master | test/src/pythontests/tempotap_test.py | 10 | # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 version 3 of the ... |
levilucio/SyVOLT | refs/heads/master | UMLRT2Kiltera_MM/MT_pre__IN0.py | 1 | """
__MT_pre__IN0.py_____________________________________________________
Automatically generated AToM3 syntactic object (DO NOT MODIFY DIRECTLY)
Author: gehan
Modified: Sun Feb 15 10:22:14 2015
_____________________________________________________________________
"""
from ASGNode import *
from ATOM3Type import *
fr... |
laperry1/android_external_chromium_org | refs/heads/cm-12.1 | chrome/common/extensions/docs/server2/docs_server_utils_test.py | 87 | #!/usr/bin/env python
# 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.
import unittest
from docs_server_utils import StringIdentity
class DocsServerUtilsTest(unittest.TestCase):
'''Tests for methods in... |
gameduell/duell | refs/heads/master | bin/mac/python2.7.9/lib/python2.7/plat-mac/Carbon/Fm.py | 82 | from _Fm import *
|
mour/motion | refs/heads/master | motion/gyro.py | 1 | '''
Created on 18. 2. 2014
@author: ondra
'''
class Gyro(object):
'''
classdocs
'''
WHOAMI = 0x00
PWRM = 0x3e
SMPL = 0x15
DLPF_FS = 0x16
ICONF = 0x17
ISTAT = 0x1a
TEMPH = 0x1b
TEMPL = 0x1c
DATAXH = 0x1d
DATAXL = 0x1e
DATAYH = 0x1f
DATAYL = 0... |
lorserker/bridgesim | refs/heads/master | examples/gib_weirdness.py | 1 | from redeal import *
from collections import Counter
import random
predeal = {'W': H('AQ6 AJ3 KJ6543 T')}
def initial():
global TABLE
global CNT
global WIN_SAMPLE
global LOSE_SAMPLE
TABLE = Payoff(('2HN', '2SW'), imps)
CNT = Counter()
WIN_SAMPLE = set()
LOSE_SAMPLE = se... |
Tesi-Luca-Davide/ryu | refs/heads/master | ryu/lib/addrconv.py | 56 | # 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:... |
eayunstack/nova | refs/heads/develop | nova/virt/hyperv/volumeops.py | 5 | # Copyright 2012 Pedro Navarro Perez
# Copyright 2013 Cloudbase Solutions Srl
# 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... |
Cenditel/cenditel.comunidades.cynin | refs/heads/master | src/ubify.ffxmpp/ubify/ffxmpp/browser/sidepanel_conversation_ff.py | 5 | ###############################################################################
#cyn.in is an open source Collaborative Knowledge Management Appliance that
#enables teams to seamlessly work together on files, documents and content in
#a secure central environment.
#
#cyn.in v2 an open source appliance is distributed ... |
knossos-project/PythonQt | refs/heads/master | examples/NicePyConsole/pygments/lexers/webmisc.py | 3 | # -*- coding: utf-8 -*-
"""
pygments.lexers.webmisc
~~~~~~~~~~~~~~~~~~~~~~~
Lexers for misc. web stuff.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, ExtendedRegexLexer, include, byg... |
collex100/odoo | refs/heads/8.0 | addons/account/report/account_partner_ledger.py | 236 | # -*- 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... |
chvrga/outdoor-explorer | refs/heads/master | java/play-1.4.4/python/Lib/site-packages/pyreadline/test/history_test.py | 3 | # -*- coding: UTF-8 -*-
# Copyright (C) 2007 Jörgen Stenarson. <>
import sys, unittest
sys.path.append ('../..')
#from pyreadline.modes.vi import *
#from pyreadline import keysyms
from pyreadline.lineeditor import lineobj
from pyreadline.lineeditor.history import LineHistory
import pyreadline.lineeditor.histo... |
mihailignatenko/erp | refs/heads/master | addons/stock_account/wizard/stock_return_picking.py | 342 | # -*- 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... |
dimbeni/Gnucash | refs/heads/trunk | src/optional/python-bindings/tests/test_book.py | 7 | from unittest import TestCase, main
from gnucash import Session
class BookSession( TestCase ):
def setUp(self):
self.ses = Session()
self.book = self.ses.get_book()
table = self.book.get_table()
self.currency = table.lookup('CURRENCY', 'EUR')
class TestBook( BookSession ):
def... |
shpark76/WhereHows | refs/heads/master | wherehows-etl/src/main/resources/jython/requests/packages/chardet/euckrprober.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org 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 Reserved.
#
# Con... |
mircobe87/MapStore | refs/heads/master | mapcomposer/app/static/externals/openlayers/tools/shrinksafe.py | 293 | #!/usr/bin/env python
#
# Script to provide a wrapper around the ShrinkSafe "web service"
# <http://shrinksafe.dojotoolkit.org/>
#
#
# We use this script for two reasons:
#
# * This avoids having to install and configure Java and the standalone
# ShrinkSafe utility.
#
# * The current ShrinkSafe standalone utility... |
tungvx/deploy | refs/heads/master | .google_appengine/lib/django_0_96/django/newforms/fields.py | 29 | """
Field classes
"""
from django.utils.translation import gettext
from util import ErrorList, ValidationError, smart_unicode
from widgets import TextInput, PasswordInput, HiddenInput, MultipleHiddenInput, CheckboxInput, Select, NullBooleanSelect, SelectMultiple
import datetime
import re
import time
__all__ = (
'... |
ryfeus/lambda-packs | refs/heads/master | Selenium_Chromium/source/selenium/webdriver/common/html5/application_cache.py | 52 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... |
pazeshun/jsk_apc | refs/heads/master | demos/instance_occlsegm/examples/synthetic2d/legacy/train_mrcnn.py | 2 | #!/usr/bin/env python
from __future__ import division
import argparse
import datetime
import os
import os.path as osp
import random
import socket
os.environ['MPLBACKEND'] = 'Agg' # NOQA
# import cv2 # FIXME: cv2 should be imported first to avoid segfault.
import chainer
from chainer import training
from chainer.... |
jgillis/topaf | refs/heads/master | pathfollowing/pathfollowing.py | 2 | # TOPAF -- Time optimal path following for differentially flat systems
# Copyright (C) 2013 Wannes Van Loock, KU Leuven. All rights reserved.
#
# TOPAF 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; ei... |
lms-io/lms | refs/heads/master | src/user.py | 1 | from bottle import route,request
from cassandra.cluster import Cluster
import uuid, collections, traceback, redis, thread, bcrypt, configparser, requests, sys, jsonpickle, random, os, zipfile, shutil, appcontext, permission
config = configparser.ConfigParser()
config.read('config.ini')
def redis():
return appcont... |
mlecours/netman | refs/heads/master | tests/adapters/switches/juniper_qfx_copper_test.py | 1 | # Copyright 2015 Internap.
#
# 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, so... |
liucode/tempest-master | refs/heads/master | tempest/api/volume/test_volume_metadata.py | 13 | # Copyright 2013 Huawei Technologies Co.,LTD
# 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
#
# Unle... |
imtapps/django-imt-fork | refs/heads/IMT | tests/regressiontests/admin_scripts/management/commands/label_command.py | 138 | from django.core.management.base import LabelCommand
class Command(LabelCommand):
help = "Test Label-based commands"
requires_model_validation = False
args = '<label>'
def handle_label(self, label, **options):
print('EXECUTE:LabelCommand label=%s, options=%s' % (label, sorted(options.items())... |
Jeremmm/fake-lxc | refs/heads/master | fakelxc/lxcls.py | 1 | #!/usr/bin/env python
def main():
print('test1\ntest2\ntest3')
if __name__ == '__main__':
main()
|
Pandaaaa906/ChemErpSystem | refs/heads/master | ChemErpSystem/wsgi.py | 1 | """
WSGI config for ChemErpSystem project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO... |
inr-kit/numjuggler | refs/heads/master | tests/test_likefunc.py | 1 | import pytest
from numjuggler.utils.io import cd_temporarily
from six import StringIO
import numjuggler.likefunc as lf
@pytest.mark.parametrize("data, log, present, absent, expected_present_value, expected_absent_value, expected_text", [
(
"""
c 1: 12
c 2: 14
""",
... |
clarkfitzg/dask | refs/heads/master | docs/source/scripts/scheduling.py | 18 | from toolz import merge
from time import time
import dask
from dask import threaded, multiprocessing, async
from random import randint
from collections import Iterator
import matplotlib.pyplot as plt
def noop(x):
pass
nrepetitions = 1
def trivial(width, height):
""" Embarassingly parallel dask """
d = {... |
scrollback/kuma | refs/heads/master | vendor/packages/translate-toolkit/translate/services/__init__.py | 10 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 t... |
Pafcholini/emotion_tw_511_COI3 | refs/heads/master | tools/perf/scripts/python/net_dropmonitor.py | 2669 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
mcus/SickRage | refs/heads/master | lib/hachoir_parser/parser_list.py | 85 | import re
import types
from hachoir_core.error import error
from hachoir_core.i18n import _
from hachoir_parser import Parser, HachoirParser
import sys
### Parser list ################################################################
class ParserList(object):
VALID_CATEGORY = ("archive", "audio", "container", "fil... |
shaz13/oppia | refs/heads/develop | extensions/interactions/EndExploration/EndExploration.py | 18 | # coding: utf-8
#
# Copyright 2014 The Oppia Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... |
SRabbelier/Melange | refs/heads/master | thirdparty/google_appengine/lib/django_1_2/django/conf/locale/bg/formats.py | 45 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
DATE_FORMAT = 'd F Y'
TIME_FORMAT = 'H:i:s'
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
MONTH_DAY_FORMAT = 'j F'
SHORT_DATE_FORMAT = 'd.m.Y'
# SHORT_DATETIME_FORMAT =
# FIRST_DAY_OF_WEEK =
# DATE_INPUT_FORMATS =
# T... |
xrg/tweepy | refs/heads/master | tweepy/oauth.py | 5 | """
The MIT License
Copyright (c) 2007 Leah Culver
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, publis... |
haoqili/MozSecWorld | refs/heads/master | vendor-local/lib/python/PIL/EpsImagePlugin.py | 39 | #
# The Python Imaging Library.
# $Id$
#
# EPS file handling
#
# History:
# 1995-09-01 fl Created (0.1)
# 1996-05-18 fl Don't choke on "atend" fields, Ghostscript interface (0.2)
# 1996-08-22 fl Don't choke on floating point BoundingBox values
# 1996-08-23 fl Handle files from Macintosh (0.3)
# 2001-02-17 fl ... |
eka/pygrabbit | refs/heads/master | pygrabbit/parser.py | 1 | import requests
from lxml import html
from ._compat import urljoin
from ._helpers import cached_attribute
class PyGrabbit:
headers = {'User-agent': 'PyGrabbit 0.1'}
def __init__(self, url):
self.url = url
self._tree = None
self._content = requests.get(url, headers=self.headers).text
... |
sbx320/mtasa-blue-old | refs/heads/master | vendor/google-breakpad/src/tools/gyp/test/win/gyptest-cl-buffer-security-check.py | 344 | #!/usr/bin/env python
# Copyright (c) 2012 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 buffer security check setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = Tes... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.