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 |
|---|---|---|---|---|---|
spiffykahuna/TIJ4-code_idea | OutputVerifier.py | 10 | 7994 | #!/usr/bin/python
"""
To do:
3) command-line argument (to test a single file)
- What about exceptions and aborts?
-If ...is embedded anywhere in a line, that portion becomes a .*? regexp
---------------
Find files with
/* Output:
Run the programs and capture the output, compare with anticipated outpu... | mit |
pk-sam/crosswalk-test-suite | webapi/tct-widgetpolicy-w3c-tests/inst.wgt.py | 3 | 6691 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause |
vicnet/weboob | modules/audioaddict/module.py | 1 | 12892 | # -*- coding: utf-8 -*-
# Copyright(C) 2013 Pierre Mazière
#
# This file is part of a weboob module.
#
# This weboob module 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 Licen... | lgpl-3.0 |
liubq919/locust | locust/runners.py | 30 | 16947 | # coding=UTF-8
import socket
import traceback
import warnings
import random
import logging
from time import time
from hashlib import md5
import gevent
from gevent import GreenletExit
from gevent.pool import Group
import events
from stats import global_stats
from rpc import rpc, Message
logger = logging.getLogger(__... | mit |
aronsky/home-assistant | homeassistant/components/light/isy994.py | 5 | 1776 | """
Support for ISY994 lights.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/light.isy994/
"""
import logging
from typing import Callable
from homeassistant.components.light import (
Light, SUPPORT_BRIGHTNESS, DOMAIN)
from homeassistant.components.... | apache-2.0 |
savoirfairelinux/sflvault | server/sflvault/model/custom_types.py | 2 | 1414 | # -=- encoding: utf-8 -=-
#
# SFLvault - Secure networked password store and credentials manager.
#
# Copyright (C) 2008-2009 Savoir-faire Linux inc.
#
# Author: Alexandre Bourget <alexandre.bourget@savoirfairelinux.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 |
slightlymadphoenix/activityPointsApp | activitypoints/lib/python3.5/site-packages/django/contrib/postgres/search.py | 86 | 8710 | from django.db.models import Field, FloatField
from django.db.models.expressions import CombinedExpression, Func, Value
from django.db.models.functions import Coalesce
from django.db.models.lookups import Lookup
class SearchVectorExact(Lookup):
lookup_name = 'exact'
def process_rhs(self, qn, connection):
... | mit |
ColinIanKing/autotest | cli/label.py | 6 | 7943 | #
# Copyright 2008 Google Inc. All Rights Reserved.
"""
The label module contains the objects and methods used to
manage labels in Autotest.
The valid actions are:
add: adds label(s), or hosts to an LABEL
remove: deletes label(s), or hosts from an LABEL
list: lists label(s)
The common options are:
--blis... | gpl-2.0 |
leiqzhang/litevirt-api | LitevirtAPI/network.py | 1 | 1068 | #!/usr/bin/python
class EthernetDevice(object):
"""Representative of an ethernet device. """
def __init__(self,
iface = None,
vendor = None,
driver = None,
macaddr = None,
path = None):
self._iface = iface
self._v... | gpl-3.0 |
thisisshi/cloud-custodian | tools/c7n_terraform/c7n_terraform/parser.py | 2 | 14812 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from collections.abc import Iterable
import json
import logging
import os
from pathlib import Path
import re
import hcl2
TF_JSON_SUFFIX = ".tf.json"
TF_HCL_SUFFIX = ".tf"
class Block(dict):
__slots__ = ()
def __getattr__(self... | apache-2.0 |
ygol/odoo | setup/package.py | 180 | 22070 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-Today OpenERP SA (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
#... | agpl-3.0 |
akash1808/nova | nova/virt/xenapi/image/vdi_through_dev.py | 80 | 3667 | # Copyright 2013 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 requ... | apache-2.0 |
GetSomeBlocks/Score_Soccer | resources/src/mythbox/ui/uisettings.py | 5 | 13970 | #
# MythBox for XBMC - http://mythbox.googlecode.com
# Copyright (C) 2011 analogue@yahoo.com
#
# 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 you... | mit |
connormanning/arbiter | third/gtest-1.7.0/test/gtest_list_tests_unittest.py | 1898 | 6515 | #!/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 |
Simran-B/arangodb | 3rdParty/V8-4.3.61/third_party/python_26/Lib/test/test_htmlparser.py | 56 | 10661 | """Tests for HTMLParser.py."""
import HTMLParser
import pprint
import unittest
from test import test_support
class EventCollector(HTMLParser.HTMLParser):
def __init__(self):
self.events = []
self.append = self.events.append
HTMLParser.HTMLParser.__init__(self)
def get_events(self):
... | apache-2.0 |
sietse/pyietflib | pyietflib/rfc2045/contenttype_iana.py | 2 | 1838 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
"""IANA registered Content-Type type and subtype values."""
__copyright__ = """Copyright 2011 Lance Finn Helsten (helsten@acm.org)"""
from .__meta__ import (__version__, __author__, __license__)
import sys
if sys.version_info < (3, 2):
raise Exception("rfc2045 requires... | apache-2.0 |
daegun/mitro | browser-ext/third_party/firefox-addon-sdk/python-lib/cuddlefish/tests/test_preflight.py | 37 | 5860 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import os, shutil
import simplejson as json
import unittest
import hashlib
import base64
from cuddlefish import preflig... | gpl-3.0 |
yuewko/neutron | neutron/plugins/ml2/drivers/hyperv/mech_hyperv.py | 27 | 1490 | # Copyright (c) 2013 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 ... | apache-2.0 |
Knowledge-is-Power/Movie-Platform | node_modules/node-gyp/gyp/PRESUBMIT.py | 1369 | 3662 | # 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... | mit |
theflofly/tensorflow | tensorflow/python/ops/ragged/ragged_reduce_op_test.py | 11 | 13754 | # 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 |
google-research/google-research | eeg_modelling/eeg_viewer/utils_test.py | 1 | 2218 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 |
rgommers/statsmodels | statsmodels/sandbox/examples/thirdparty/findow_0.py | 33 | 2147 | # -*- coding: utf-8 -*-
"""A quick look at volatility of stock returns for 2009
Just an exercise to find my way around the pandas methods.
Shows the daily rate of return, the square of it (volatility) and
a 5 day moving average of the volatility.
No guarantee for correctness.
Assumes no missing values.
colors of lines... | bsd-3-clause |
petewarden/tensorflow | tensorflow/python/ops/image_grad_test.py | 13 | 1354 | # Copyright 2020 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 |
zxombie/aarch64-freebsd-binutils | gdb/testsuite/gdb.ada/pp-rec-component.py | 41 | 1101 | # Copyright (C) 2014 Free Software Foundation, 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 3 of the License, or
# (at your option) any later version.
#
# This program is... | gpl-2.0 |
shangvven/Wox | PythonHome/Lib/site-packages/requests/packages/chardet/charsetprober.py | 3127 | 1902 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... | mit |
GoogleCloudPlatform/training-data-analyst | courses/machine_learning/deepdive2/structured/solutions/serving/application/lib/werkzeug/middleware/lint.py | 12 | 12967 | """
WSGI Protocol Linter
====================
This module provides a middleware that performs sanity checks on the
behavior of the WSGI server and application. It checks that the
:pep:`3333` WSGI spec is properly implemented. It also warns on some
common HTTP errors such as non-empty responses for 304 status codes.
.... | apache-2.0 |
asquarezone/AnsibleZone | BookExamples/ScalingToMultipleHosts/ec2.py | 20 | 60320 | #!/usr/bin/env python
'''
EC2 external inventory script
=================================
Generates inventory that Ansible can understand by making API request to
AWS EC2 using the Boto library.
NOTE: This script assumes Ansible is being executed where the environment
variables needed for Boto have already been set:... | apache-2.0 |
juliebehr/gaff2xml | openmoltools/packmol.py | 4 | 9546 | import numpy as np
import shutil
import os
import mdtraj as md
from mdtraj.utils import enter_temp_directory
from mdtraj.utils.delay_import import import_
import tempfile
from distutils.spawn import find_executable
import simtk.unit as units
PACKMOL_PATH = find_executable("packmol")
HEADER_TEMPLATE = """
# Mixture
... | gpl-2.0 |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/Win64/python/2.7.5.3_64bit/Lib/dummy_thread.py | 326 | 4418 | """Drop-in replacement for the thread module.
Meant to be used as a brain-dead substitute so that threaded code does
not need to be rewritten for when the thread module is not present.
Suggested usage is::
try:
import thread
except ImportError:
import dummy_thread as thread
"""
# Exports onl... | bsd-2-clause |
fitermay/intellij-community | python/lib/Lib/distutils/fancy_getopt.py | 85 | 18441 | """distutils.fancy_getopt
Wrapper around the standard getopt module that provides the following
additional features:
* short and long options are tied together
* options have help strings, so fancy_getopt could potentially
create a complete usage summary
* options set attributes of a passed-in object
"""
# ... | apache-2.0 |
keum/KC_CSO_Status | cso_status_geojson.py | 1 | 7847 | #peter remove, not used# import sys
#peter remove, not used# import os
import subprocess
import time
import csv
import urllib2
import pprint
import json
"""
Take status csv file from url and coordinate csv file to create
data dictionary format and convert that format into geojson type.
This geojson data can then be l... | mit |
t794104/ansible | test/integration/targets/aws_lambda/files/mini_lambda.py | 139 | 1237 | from __future__ import print_function
import json
import os
def handler(event, context):
"""
The handler function is the function which gets called each time
the lambda is run.
"""
# printing goes to the cloudwatch log allowing us to simply debug the lambda if we can find
# the log entry.
... | gpl-3.0 |
Pure4Team/desire820 | tools/perf/tests/attr.py | 3174 | 9441 | #! /usr/bin/python
import os
import sys
import glob
import optparse
import tempfile
import logging
import shutil
import ConfigParser
class Fail(Exception):
def __init__(self, test, msg):
self.msg = msg
self.test = test
def getMsg(self):
return '\'%s\' - %s' % (self.test.path, self.msg)... | gpl-2.0 |
migueldsw/TL-DA-TF | report_helper.py | 1 | 2266 | import matplotlib.pyplot as plt
import numpy as np
import os
import sys
reload(sys)
sys.setdefaultencoding("utf-8")
# pretty printing
np.set_printoptions(suppress=True)
np.set_printoptions(precision=3)
def checkDir(directory):
if not os.path.exists(directory):
os.makedirs(directory)
# graph plotting
... | apache-2.0 |
kdar/Wox | PythonHome/Lib/site-packages/pip/_vendor/requests/status_codes.py | 695 | 3136 | # -*- coding: utf-8 -*-
from .structures import LookupDict
_codes = {
# Informational.
100: ('continue',),
101: ('switching_protocols',),
102: ('processing',),
103: ('checkpoint',),
122: ('uri_too_long', 'request_uri_too_long'),
200: ('ok', 'okay', 'all_ok', 'all_okay', 'all_good', '\\o/'... | mit |
slaughterjames/static | FILtriage.py | 1 | 4667 | '''
Static v0.1 - Copyright 2016 James Slaughter,
This file is part of Static v0.1.
Static v0.1 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 versi... | gpl-2.0 |
boberfly/gaffer | python/GafferUI/NodeSetEditor.py | 2 | 16799 | ##########################################################################
#
# Copyright (c) 2011-2012, John Haddon. All rights reserved.
# Copyright (c) 2011-2013, Image Engine Design Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted prov... | bsd-3-clause |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.3/Lib/sets.py | 1 | 18320 | """Classes to represent arbitrary sets (including sets of sets).
This module implements sets using dictionaries whose values are
ignored. The usual operations (union, intersection, deletion, etc.)
are provided as both methods and operators.
Important: sets are not sequences! While they support 'x in s',
'len(s)', a... | mit |
idea4bsd/idea4bsd | python/lib/Lib/site-packages/django/core/cache/backends/db.py | 227 | 6002 | "Database cache backend."
from django.core.cache.backends.base import BaseCache
from django.db import connections, router, transaction, DatabaseError
import base64, time
from datetime import datetime
try:
import cPickle as pickle
except ImportError:
import pickle
class Options(object):
"""A class that wil... | apache-2.0 |
scrollback/kuma | vendor/packages/setuptools/setuptools/command/install_scripts.py | 32 | 1921 | from distutils.command.install_scripts import install_scripts \
as _install_scripts
from easy_install import get_script_args, sys_executable, chmod
from pkg_resources import Distribution, PathMetadata, ensure_directory
import os
from distutils import log
class install_scripts(_install_scripts):
"""Do normal s... | mpl-2.0 |
xavierh/minecolonies | tools/exportLang.py | 1 | 1512 | #!/usr/local/bin/python3
import sys
import requests
import json
import os
base_url = "https://poeditor.com/api/"
api_key = ""
def post(data):
r = requests.post(base_url, data=data)
r.raise_for_status()
return r.json()
def get(path):
r = requests.get(path)
r.raise_for_status()
return r.json()
def getLangs():
... | gpl-3.0 |
jmhsi/justin_tinker | data_science/courses/learning_dl_packages/models/research/pcl_rl/controller.py | 7 | 16079 | # 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 applicab... | apache-2.0 |
highweb-project/highweb-webcl-html5spec | build/android/devil/android/perf/thermal_throttle.py | 18 | 4283 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
class OmapThrottlingDetector(object):
"""Class to detect and track thermal throttling on an OMAP 4."""
OMAP_TEMP_FILE = ('/sys/devices/p... | bsd-3-clause |
rooi/CouchPotatoServer | libs/tempita/__init__.py | 31 | 38364 | """
A small templating language
This implements a small templating language. This language implements
if/elif/else, for/continue/break, expressions, and blocks of Python
code. The syntax is::
{{any expression (function calls etc)}}
{{any expression | filter}}
{{for x in y}}...{{endfor}}
{{if x}}x{{elif y}}y... | gpl-3.0 |
anand-c-goog/tensorflow | tensorflow/contrib/quantization/python/array_ops.py | 5 | 1141 | # 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 |
bravominski/PennApps2015-HeartMates | venv/lib/python2.7/site-packages/requests/packages/urllib3/request.py | 853 | 5751 | try:
from urllib.parse import urlencode
except ImportError:
from urllib import urlencode
from .filepost import encode_multipart_formdata
__all__ = ['RequestMethods']
class RequestMethods(object):
"""
Convenience mixin for classes who implement a :meth:`urlopen` method, such
as :class:`~urllib3.... | apache-2.0 |
lgiommi/root | interpreter/llvm/src/tools/clang/bindings/python/tests/cindex/test_token_kind.py | 97 | 1064 | from clang.cindex import TokenKind
from nose.tools import eq_
from nose.tools import ok_
from nose.tools import raises
def test_constructor():
"""Ensure TokenKind constructor works as expected."""
t = TokenKind(5, 'foo')
eq_(t.value, 5)
eq_(t.name, 'foo')
@raises(ValueError)
def test_bad_register():... | lgpl-2.1 |
tqtran7/horizon | openstack_dashboard/dashboards/project/networks/forms.py | 41 | 2431 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 NEC Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with ... | apache-2.0 |
poulpito/Flexget | flexget/plugins/sites/limetorrents.py | 6 | 3902 | from __future__ import unicode_literals, division, absolute_import
from future.moves.urllib.parse import quote
from builtins import * # noqa pylint: disable=unused-import, redefined-builtin
import logging
from flexget import plugin
from flexget.entry import Entry
from flexget.event import event
from flexget.utils.re... | mit |
nycholas/ask-undrgz | src/ask-undrgz/django/utils/regex_helper.py | 361 | 12079 | """
Functions for reversing a regular expression (used in reverse URL resolving).
Used internally by Django and not intended for external use.
This is not, and is not intended to be, a complete reg-exp decompiler. It
should be good enough for a large class of URLS, however.
"""
# Mapping of an escape character to a r... | bsd-3-clause |
landism/pants | tests/python/pants_test/cache/test_pinger.py | 14 | 4804 | # coding=utf-8
# Copyright 2015 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 unittest
impo... | apache-2.0 |
parksandwildlife/wastd | wastd/observations/migrations/0017_auto_20200423_0940.py | 1 | 1621 | # Generated by Django 2.2.10 on 2020-04-23 01:40
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('observations', '0016_auto_20200305_1227'),
]
operations = [
migrations.AlterField(
model_name=... | mit |
todaychi/hue | desktop/core/ext-py/tablib-0.10.0/tablib/packages/odf/xforms.py | 96 | 1231 | # -*- coding: utf-8 -*-
# Copyright (C) 2006-2007 Søren Roug, European Environment Agency
#
# 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 2.1 of the License, or (at you... | apache-2.0 |
nens/turn | setup.py | 1 | 1473 | from setuptools import setup
version = '1.0.1.dev0'
long_description = '\n\n'.join([
open('README.rst').read(),
open('CREDITS.rst').read(),
open('CHANGES.rst').read(),
])
install_requires = [
'redis>=2.10.5',
],
tests_require = ["flake8", "ipdb", "ipython", "pytest", "pytest-cov"]
setup(nam... | gpl-3.0 |
qedsoftware/commcare-hq | corehq/apps/users/tests/test_signals.py | 1 | 4010 | import uuid
from django.test import SimpleTestCase
from elasticsearch.exceptions import ConnectionError
from mock import patch, MagicMock
from corehq.apps.reports.analytics.esaccessors import get_user_stubs
from corehq.elastic import doc_exists_in_es, get_es_new
from corehq.pillows.mappings.user_mapping import USER_I... | bsd-3-clause |
ActiveState/code | recipes/Python/528897_poker_dice/recipe-528897.py | 1 | 2821 | # just a simple game of poker dice, using 5 dice - with the
# computer throwing for you - and then you choose which
# dice to keep or reuse for the next throw
import os
def clear():
os.system("clear")
clear()
print
print " Poker dice game "
px = 2
while px == 2:
print
print " The compuuter will ... | mit |
jank3/django | django/contrib/postgres/forms/ranges.py | 393 | 3005 | from psycopg2.extras import DateRange, DateTimeTZRange, NumericRange
from django import forms
from django.core import exceptions
from django.forms.widgets import MultiWidget
from django.utils.translation import ugettext_lazy as _
__all__ = ['IntegerRangeField', 'FloatRangeField', 'DateTimeRangeField', 'DateRangeField... | bsd-3-clause |
kailIII/geraldo | site/newsite/django_1_0/tests/regressiontests/file_uploads/tests.py | 9 | 8537 | import os
import errno
import sha
import shutil
import unittest
from django.core.files import temp as tempfile
from django.core.files.uploadedfile import SimpleUploadedFile
from django.test import TestCase, client
from django.utils import simplejson
from models import FileModel, UPLOAD_ROOT, UPLOAD_TO
class FileUplo... | lgpl-3.0 |
Lh4cKg/sl4a | python/src/Lib/plat-mac/lib-scriptpackages/SystemEvents/Login_Items_Suite.py | 82 | 1733 | """Suite Login Items Suite: Terms and Events for controlling the Login Items application
Level 1, version 1
Generated from /System/Library/CoreServices/System Events.app
AETE/AEUT resource version 1/0, language 0, script 0
"""
import aetools
import MacOS
_code = 'logi'
class Login_Items_Suite_Events:
pass
cl... | apache-2.0 |
AgileInstitute/labs-cpp-gtest | SuperSet/gtest-1.7.0/test/gtest_uninitialized_test.py | 2901 | 2480 | #!/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... | mit |
saumishr/django | tests/regressiontests/localflavor/de/tests.py | 33 | 1847 | from django.contrib.localflavor.de.forms import (DEZipCodeField, DEStateSelect,
DEIdentityCardNumberField)
from django.test import SimpleTestCase
class DELocalFlavorTests(SimpleTestCase):
def test_DEStateSelect(self):
f = DEStateSelect()
out = u'''<select name="states">
<option value="BW">Bad... | bsd-3-clause |
jeffery-do/Vizdoombot | doom/lib/python3.5/site-packages/scipy/special/tests/test_spence.py | 60 | 1099 | import numpy as np
from numpy import sqrt, log, pi
from scipy.special._testutils import FuncData
from scipy.special import spence
def test_consistency():
# Make sure the implementation of spence for real arguments
# agrees with the implementation of spence for imaginary arguments.
x = np.logspace(-30, 30... | mit |
sudosurootdev/external_chromium_org | mojo/python/tests/bindings_serialization_deserialization_unittest.py | 25 | 3603 | # 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 math
import unittest
# pylint: disable=F0401
import mojo.bindings.reflection as reflection
import mojo.system
# Generated files
# pylint: disable=F0... | bsd-3-clause |
nanobox-io/nanobox-pkgsrc-base | nodejs012/patches/patch-tools_gyp_pylib_gyp_generator_make.py | 2 | 1181 | $NetBSD: patch-tools_gyp_pylib_gyp_generator_make.py,v 1.3 2013/12/12 11:52:37 jperkin Exp $
Add support for NetBSD and DragonFly.
Ensure we use the system libtool on OSX.
--- tools/gyp/pylib/gyp/generator/make.py.orig 2015-02-06 20:04:23.000000000 +0000
+++ tools/gyp/pylib/gyp/generator/make.py
@@ -168,7 +168,7 @@ c... | mit |
NiceCircuits/pcbLibraryManager | src/pcbLibraryManager/libraryManager/common.py | 1 | 3365 | # -*- coding: utf-8 -*-
"""
Created on Tue Jul 14 23:12:28 2015
@author: piotr at nicecircuits.com
"""
import datetime
import math
def timestamp():
return datetime.datetime.now().strftime("%Y%m%d%H%M%S")
def rectangleToPolyLinePoints(position, dimensions, rotation=0.0):
# start with unit rectangle
point... | cc0-1.0 |
johnkit/vtk-dev | ThirdParty/Twisted/twisted/copyright.py | 23 | 1466 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Copyright information for Twisted.
"""
from __future__ import division, absolute_import
from twisted import __version__ as version, version as longversion
longversion = str(longversion)
copyright="""\
Copyright (c) 2001-2014 Twisted Matrix... | bsd-3-clause |
2014c2g5/2014cadp | wsgi/static/Brython2.2.0rc0-20140913-093500/Lib/unittest/test/testmock/testhelpers.py | 737 | 25793 | import unittest
from unittest.mock import (
call, _Call, create_autospec, MagicMock,
Mock, ANY, _CallList, patch, PropertyMock
)
from datetime import datetime
class SomeClass(object):
def one(self, a, b):
pass
def two(self):
pass
def three(self, a=None):
pass
class AnyT... | gpl-3.0 |
mozilla/stoneridge | python/src/Lib/decimal.py | 31 | 220812 | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz <aahz at pobox.com>
# and Tim Peters
# This module is currently Py2.3 compatibl... | mpl-2.0 |
dsparrow27/zoocore | zoo/libs/plugin/plugin.py | 1 | 1836 | import inspect
import time
from zoo.libs.utils import env
class Plugin(object):
"""Base plugin class that all plugins inherent from. The client should subclass this to provide a standard
interface when needed.
.. code-block:: python
Class CustomPlugin(Plugin):
id = "CustomPlugin.exam... | gpl-3.0 |
GbalsaC/bitnamiP | common/djangoapps/student/tests/test_password_policy.py | 113 | 12723 | # -*- coding: utf-8 -*-
"""
This test file will verify proper password policy enforcement, which is an option feature
"""
import json
from django.test import TestCase
from django.test.client import RequestFactory
from django.core.urlresolvers import reverse
from django.contrib.auth.models import AnonymousUser
from djan... | agpl-3.0 |
shakamunyi/neutron-dvr | neutron/plugins/cisco/db/n1kv_models_v2.py | 6 | 7207 | # Copyright 2013 Cisco Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 |
double-y/django | django/core/mail/backends/console.py | 696 | 1477 | """
Email backend that writes messages to console instead of sending them.
"""
import sys
import threading
from django.core.mail.backends.base import BaseEmailBackend
from django.utils import six
class EmailBackend(BaseEmailBackend):
def __init__(self, *args, **kwargs):
self.stream = kwargs.pop('stream',... | bsd-3-clause |
bcoca/ansible | test/units/modules/test_systemd.py | 35 | 1801 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
from units.compat import unittest
from ansible.modules.systemd import parse_systemctl_show
class ParseSystemctlShowTestCase(unittest.TestCase):
def test_simple(self):
lines = [
'Type=simple',
... | gpl-3.0 |
Big-B702/python-for-android | python-build/python-libs/gdata/tests/gdata_tests/calendar_test.py | 87 | 38211 | #!/usr/bin/python
#
# Copyright (C) 2006 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
laszlocsomor/tensorflow | tensorflow/python/estimator/canned/optimizers.py | 73 | 2924 | # 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... | apache-2.0 |
mitsuhiko/requests | requests/structures.py | 46 | 1728 | # -*- coding: utf-8 -*-
"""
requests.structures
~~~~~~~~~~~~~~~~~~~
Data structures that power Requests.
"""
class CaseInsensitiveDict(dict):
"""Case-insensitive Dictionary
For example, ``headers['content-encoding']`` will return the
value of a ``'Content-Encoding'`` response header."""
@property... | isc |
kaikai581/NOvA | RecoValidation/hadd_reco_validation.py | 1 | 1974 | #
# This script is to make easy hadding the grid output of the RecoValidation jobs.
# This script uses the same configuration file as the submit_reco_validation.py script.
#
from ConfigParser import *
import argparse, os
#
# command line argument parsing
#
parser = argparse.ArgumentParser()
parser.add_argument('-c', ... | gpl-2.0 |
txemi/ansible | contrib/inventory/serf.py | 395 | 3032 | #!/usr/bin/env python
# (c) 2015, Marc Abramowitz <marca@surveymonkey.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
# (... | gpl-3.0 |
mikalstill/nova | nova/tests/unit/scheduler/weights/test_weights_ioopsweight.py | 9 | 2834 | # 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
# d... | apache-2.0 |
chiffa/Image_pipe | examples/xi_support.py | 1 | 5228 | import os
from _csv import writer as csv_writer
from collections import defaultdict
import numpy as np
import scipy
from chiffatools.dataviz import better2D_desisty_plot
from matplotlib import pyplot as plt
from scipy.stats import linregress
import imagepipe.raw_functions
import imagepipe.tools.helpers
import imagepi... | bsd-3-clause |
MrChoclate/tripping_sansa | api/views.py | 1 | 3318 | from rest_framework_bulk import BulkModelViewSet
from api.serializers import *
from api.models import *
class ProductViewSet(BulkModelViewSet):
queryset = Product.objects.all()
serializer_class = ProductSerializer
class Product_relationshipViewSet(BulkModelViewSet):
queryset = Product_relationship.obje... | agpl-3.0 |
neuroidss/cloudbrain | src/cloudbrain/connectors/muse.py | 3 | 1199 | import logging
from pythonosc import osc_server, dispatcher
from cloudbrain.connectors.museio import _start_muse_io
_LOGGER = logging.getLogger(__name__)
_LOGGER.level = logging.DEBUG
_LOGGER.addHandler(logging.StreamHandler())
class MuseConnector(object):
"""
Get OSC messages from the Muse
"""
d... | agpl-3.0 |
kailIII/geraldo | site/newsite/site-geraldo/django/db/backends/postgresql/base.py | 15 | 5921 | """
PostgreSQL database backend for Django.
Requires psycopg 1: http://initd.org/projects/psycopg1
"""
from django.db.backends import *
from django.db.backends.postgresql.client import DatabaseClient
from django.db.backends.postgresql.creation import DatabaseCreation
from django.db.backends.postgresql.introspection i... | lgpl-3.0 |
danielja/mudpy | filter/filter.py | 1 | 2938 | import meta
import sage
import re
from sage import player, triggers, aliases
from sage.signals import pre_shutdown
from sage.signals.gmcp import skills
import time
import MySQLdb as mysql
import MySQLdb.cursors
class FilterMap(object):
def __init__(self):
with open('mapper/mysql.cfg') as f:
se... | gpl-2.0 |
alessio/devedeng | src/devedeng/file_movie.py | 2 | 31271 | # Copyright 2014 (C) Raster Software Vigo (Sergio Costas)
#
# This file is part of DeVeDe-NG
#
# DeVeDe-NG 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)... | gpl-3.0 |
yanheven/console | horizon/tables/formset.py | 9 | 6931 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# 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 applicabl... | apache-2.0 |
sarvex/tensorflow | tensorflow/lite/python/op_hint.py | 5 | 53155 | # 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... | apache-2.0 |
mortada/scipy | scipy/sparse/coo.py | 17 | 18025 | """ A sparse matrix in COOrdinate or 'triplet' format"""
from __future__ import division, print_function, absolute_import
__docformat__ = "restructuredtext en"
__all__ = ['coo_matrix', 'isspmatrix_coo']
from warnings import warn
import numpy as np
from scipy._lib.six import xrange, zip as izip
from ._sparsetools ... | bsd-3-clause |
aviarypl/mozilla-l10n-addons-server | src/olympia/lib/git.py | 2 | 12250 | # -*- coding: utf-8 -*-
from collections import namedtuple
import uuid
import os
import shutil
import tempfile
import pygit2
from django.conf import settings
from django.utils import translation
from django.utils.functional import cached_property
import olympia.core.logger
from olympia import amo
from olympia.files... | bsd-3-clause |
zrax/moul-scripts | Python/system/site.py | 10 | 19784 | """Append module search paths for third-party packages to sys.path.
****************************************************************
* This module is automatically imported during initialization. *
****************************************************************
In earlier versions of Python (up to 1.5a3), scripts or... | gpl-3.0 |
CatsAndDogsbvba/odoo | addons/account_asset/__openerp__.py | 314 | 2182 | # -*- encoding: utf-8 -*-
##############################################################################
#
# 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 G... | agpl-3.0 |
spherulitic/xerafin | getLeaderboardStats.py | 1 | 38402 | #!/usr/bin/python
import json, sys
import MySQLdb as mysql
import xerafinLib as xl
import xerafinSetup as xs
import datetime
import time
def getUsersByPeriod (period):
try:
if period in ["today", "yesterday"]:
dateMask = {"today": "curdate()", "yesterday": "curdate() - interval 1 day"}
command = "se... | gpl-3.0 |
Adnn/django | tests/servers/test_basehttp.py | 213 | 3129 | from io import BytesIO
from django.core.handlers.wsgi import WSGIRequest
from django.core.servers.basehttp import WSGIRequestHandler
from django.test import SimpleTestCase
from django.test.client import RequestFactory
from django.test.utils import captured_stderr
class Stub(object):
def __init__(self, **kwargs):... | bsd-3-clause |
servo/servo | tests/wpt/web-platform-tests/tools/third_party/pluggy/scripts/release.py | 13 | 1959 | """
Release script.
"""
import argparse
import sys
from subprocess import check_call
from colorama import init, Fore
from git import Repo, Remote
def create_branch(version):
"""Create a fresh branch from upstream/master"""
repo = Repo.init(".")
if repo.is_dirty(untracked_files=True):
raise Runtim... | mpl-2.0 |
mstrcnvs/pybikes | pybikes/punpunbikeshare.py | 2 | 2194 | # -*- coding: utf-8 -*-
import json
from .base import BikeShareSystem, BikeShareStation
from . import utils
class Punpunbikeshare(BikeShareSystem):
sync = True
meta = {
'system': 'Smart Bike',
'company': 'BTS Group Holdings',
}
def __init__(self, tag, feed_url, meta):
super... | lgpl-3.0 |
ashwyn/eden-message_parser | models/zzz_1st_run.py | 1 | 16655 | # -*- coding: utf-8 -*-
# 1st-run initialisation
# Set settings.base.prepopulate to 0 in Production
# (to save 1x DAL hit every page).
pop_list = settings.get_base_prepopulate()
if pop_list == 0:
pop_list = []
else:
table = db[auth.settings.table_group_name]
# The query used here takes 2/3 the time of .co... | mit |
dendisuhubdy/tensorflow | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | 42 | 3051 | # 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 |
Ceciliae/gourmet | gourmet/plugins/listsaver/shoppingSaverPlugin.py | 6 | 2280 | from gourmet.plugin import ShoppingListPlugin
import gtk
import gourmet.recipeManager, gourmet.GourmetRecipeManager, time
from gettext import gettext as _
class ShoppingListSaver (ShoppingListPlugin):
ui_string = '''<ui>
<menubar name="ShoppingListMenuBar">
<menu name="File" action="File">
<plac... | gpl-2.0 |
eywalker/datajoint-python | datajoint/declare.py | 1 | 21577 | """
This module hosts functions to convert DataJoint table definitions into mysql table definitions, and to
declare the corresponding mysql tables.
"""
import re
import pyparsing as pp
import logging
from .errors import DataJointError, _support_filepath_types, FILEPATH_FEATURE_SWITCH
from .attribute_adapter import get_... | lgpl-2.1 |
Jionglun/w17test_2 | static/Brython3.1.1-20150328-091302/Lib/ui/slider.py | 603 | 2394 | from . import widget
from browser import doc,html
class Slider(widget.Widget):
def __init__(self, id=None, label=False):
self._div_shell=html.DIV(Class="ui-slider ui-slider-horizontal ui-widget ui-widget-content ui-corner-all")
widget.Widget.__init__(self, self._div_shell, 'slider', id)
self._h... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.