repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
EvaSDK/sqlalchemy | refs/heads/master | test/orm/test_manytomany.py | 32 | from sqlalchemy.testing import assert_raises, \
assert_raises_message, eq_
import sqlalchemy as sa
from sqlalchemy import testing
from sqlalchemy import Integer, String, ForeignKey
from sqlalchemy.testing.schema import Table
from sqlalchemy.testing.schema import Column
from sqlalchemy.orm import mapper, relationshi... |
upshot-nutrition/upshot-nutrition.github.io | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/make.py | 896 | # Copyright (c) 2013 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Notes:
#
# This is all roughly based on the Makefile system used by the Linux
# kernel, but is a non-recursive make -- we put the entire dependency
# graph in fr... |
endlessm/chromium-browser | refs/heads/master | components/module_installer/android/module_desc_java.py | 1 | #!/usr/bin/env python
#
# Copyright 2019 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.
"""Writes Java module descriptor to srcjar file."""
import argparse
import os
import sys
import zipfile
sys.path.append(
os.path... |
fake-name/ReadableWebProxy | refs/heads/master | WebMirror/management/rss_parser_funcs/feed_parse_extractRosietranslatesHomeBlog.py | 1 | def extractRosietranslatesHomeBlog(item):
'''
Parser for 'rosietranslates.home.blog'
'''
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or "preview" in item['title'].lower():
return None
tagmap = [
('Secret Organization', 'Secret Organization', ... |
huzq/scikit-learn | refs/heads/master | examples/miscellaneous/plot_kernel_ridge_regression.py | 17 | """
=============================================
Comparison of kernel ridge regression and SVR
=============================================
Both kernel ridge regression (KRR) and SVR learn a non-linear function by
employing the kernel trick, i.e., they learn a linear function in the space
induced by the respective k... |
nsgundy/ACE3 | refs/heads/master | tools/search_privates.py | 5 | #!/usr/bin/env python3
import fnmatch
import os
import re
import ntpath
import sys
import argparse
def get_private_declare(content):
priv_declared = []
srch = re.compile('private.*')
priv_srch_declared = srch.findall(content)
priv_srch_declared = sorted(set(priv_srch_declared))
... |
cbeloni/pychronesapp | refs/heads/master | backend/appengine/convention.py | 34 | import sys
import os
# Put lib on path, once Google App Engine does not allow doing it directly
sys.path.append(os.path.join(os.path.dirname(__file__), "lib"))
sys.path.append(os.path.join(os.path.dirname(__file__), "apps"))
import settings
from tekton.gae import middleware
import webapp2
from webapp2_extras import i... |
manashmndl/scikit-learn | refs/heads/master | sklearn/utils/arpack.py | 265 | """
This contains a copy of the future version of
scipy.sparse.linalg.eigen.arpack.eigsh
It's an upgraded wrapper of the ARPACK library which
allows the use of shift-invert mode for symmetric matrices.
Find a few eigenvectors and eigenvalues of a matrix.
Uses ARPACK: http://www.caam.rice.edu/software/ARPACK/
"""
#... |
mikewiebe-ansible/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_vpc_offering.py | 13 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017, David Passante (@dpassante)
# 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'... |
lucafavatella/intellij-community | refs/heads/cli-wip | python/testData/codeInsight/smartEnter/classKeywordOnly_after.py | 79 | class <caret>: |
mdblv2/joatu-django | refs/heads/master | application/site-packages/django/core/management/commands/startapp.py | 205 | from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.importlib import import_module
class Command(TemplateCommand):
help = ("Creates a Django app directory structure for the given app "
"name in the current directory or opt... |
chromium2014/src | refs/heads/master | tools/telemetry/unittest_data/test_simple_two_page_set.py | 10 | # 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.
from telemetry.page.page_set import PageSet
class TestSimpleTwoPageSet(PageSet):
def __init__(self):
super(TestSimpleTwoPageSet, self).__init__(
... |
sgraham/nope | refs/heads/master | v8/tools/testrunner/server/work_handler.py | 123 | # Copyright 2012 the V8 project authors. 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 conditi... |
837468220/python-for-android | refs/heads/master | python3-alpha/python3-src/Tools/scripts/reindent.py | 48 | #! /usr/bin/env python3
# Released to the public domain, by Tim Peters, 03 October 2000.
"""reindent [-d][-r][-v] [ path ... ]
-d (--dryrun) Dry run. Analyze, but don't make any changes to, files.
-r (--recurse) Recurse. Search for all .py files in subdirectories too.
-n (--nobackup) No backup. Does not make ... |
mhbu50/frappe | refs/heads/develop | frappe/utils/minify.py | 14 | # This code is original from jsmin by Douglas Crockford, it was translated to
# Python by Baruch Even. The original code had the following copyright and
# license.
#
# /* jsmin.c
# 2007-05-22
#
# Copyright (c) 2002 Douglas Crockford (www.crockford.com)
#
# Permission is hereby granted, free of charge, to any person ob... |
pquentin/django | refs/heads/stable/1.8.x | django/templatetags/future.py | 37 | import warnings
from django.template import Library, defaulttags
from django.utils.deprecation import (
RemovedInDjango19Warning, RemovedInDjango20Warning,
)
register = Library()
@register.tag
def ssi(parser, token):
warnings.warn(
"Loading the `ssi` tag from the `future` library is deprecated and "... |
happy5214/pywikibot-core | refs/heads/master | scripts/solve_disambiguation.py | 2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
u"""
Script to help a human solve disambiguations by presenting a set of options.
Specify the disambiguation page on the command line.
The program will pick up the page, and look for all alternative links,
and show them with a number adjacent to them. It will then automatical... |
skirsdeda/django | refs/heads/master | django/contrib/sitemaps/tests/test_https.py | 21 | from __future__ import unicode_literals
from datetime import date
import warnings
from django.test import override_settings
from django.utils.deprecation import RemovedInDjango20Warning
from .base import SitemapTestsBase
@override_settings(ROOT_URLCONF='django.contrib.sitemaps.tests.urls.https')
class HTTPSSitemap... |
minjay/Stuff | refs/heads/master | Lecture_Code/Big_Data/MapReduce/example2/reducer.py | 6 | #!/usr/bin/env python
from operator import itemgetter
import sys
# Hideously ugly reduce example
current_sum = 0.0
current_group = None
current_count = 0
verbose = False
# input comes from STDIN
for line in sys.stdin:
# Remove trailing '\n'
line = line.strip()
# Extract (key,value)
vs = line.split('... |
enjaz/enjaz | refs/heads/master | newhpc/migrations/0008_add_files.py | 2 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('newhpc', '0007_merge'),
]
operations = [
migrations.AddField(
model_name='previousversion',
name='sp... |
bennojoy/ansible | refs/heads/devel | lib/ansible/template/__init__.py | 5 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
neurodata/synaptome-stats | refs/heads/gh-pages | collman14v2/201710/synaptogramCubes.py | 1 | #!/usr/bin/env python3
###
###
###
### Jesse Leigh Patsolic
### 2017 <jpatsol1@jhu.edu>
### S.D.G
#
import argparse
import math
from intern.remote.boss import BossRemote
from intern.resource.boss.resource import *
import configparser
#import grequests # for async requests, conflicts with requests somehow
import req... |
3dfxmadscientist/odoo_vi | refs/heads/master | addons/lunch/report/order.py | 377 | # -*- 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... |
cosmiclattes/TPBviz | refs/heads/master | torrent/lib/python2.7/site-packages/django/contrib/gis/gdal/tests/test_ds.py | 109 | import os
from django.contrib.gis.gdal import HAS_GDAL
from django.contrib.gis.geometry.test_data import get_ds_file, TestDS, TEST_DATA
from django.utils import unittest
from django.utils.unittest import skipUnless
if HAS_GDAL:
from django.contrib.gis.gdal import DataSource, Envelope, OGRGeometry, OGRException, O... |
nan86150/ImageFusion | refs/heads/master | lib/python2.7/site-packages/nose/tools/__init__.py | 94 | """
Tools for testing
-----------------
nose.tools provides a few convenience functions to make writing tests
easier. You don't have to use them; nothing in the rest of nose depends
on any of these methods.
"""
from nose.tools.nontrivial import *
from nose.tools.nontrivial import __all__ as nontrivial_all
from nose.t... |
rafaelmartins/blohg | refs/heads/master | blohg/tests/vcs_backends/hg/filectx.py | 1 | # -*- coding: utf-8 -*-
"""
blohg.tests.vcs_backends.hg.filectx
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Module with tests for blohg integration with mercurial (file context).
:copyright: (c) 2010-2013 by Rafael Goncalves Martins
:license: GPL-2, see LICENSE for more details.
"""
import codecs
import ... |
drrk/micropython | refs/heads/master | tests/basics/del_deref.py | 118 | def f():
x = 1
y = 2
def g():
nonlocal x
print(y)
try:
print(x)
except NameError:
print("NameError")
def h():
nonlocal x
print(y)
try:
del x
except NameError:
print("NameError")
print(x, y... |
icede/Gridcoin-master | refs/heads/master | share/qt/extract_strings_qt.py | 2945 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt4 stringdefs so that
they can be picked up by Qt linguist.
'''
from subprocess import Popen, PIPE
import glob
import operator
OUT_CPP="src/qt/bitcoinstrings.cpp"
EMPTY=['""']
def parse_po(text):
"""
Parse 'po' format produced by x... |
me0/LikSATSolver | refs/heads/master | lib/lp_solve_5.5/extra/Python/setup.py | 1 | from distutils.core import setup, Extension
from os import getenv
import sys
import os
p = sys.prefix
NUMPYPATH = '.'
if os.path.isdir(p + '/include/numpy'):
NUMPY = 'NUMPY'
elif os.path.isdir(p + '/Lib/site-packages/numpy/core/include/numpy'):
NUMPY = 'NUMPY'
NUMPYPATH = p + '/Lib/site-packages/numpy/core/includ... |
vveliev/selenium | refs/heads/master | py/selenium/webdriver/support/expected_conditions.py | 69 | # 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... |
yusufm/mobly | refs/heads/master | tests/mobly/records_test.py | 1 | #!/usr/bin/env python3.4
#
# Copyright 2016 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... |
xuewei4d/scikit-learn | refs/heads/master | examples/miscellaneous/plot_isotonic_regression.py | 17 | """
===================
Isotonic Regression
===================
An illustration of the isotonic regression on generated data (non-linear
monotonic trend with homoscedastic uniform noise).
The isotonic regression algorithm finds a non-decreasing approximation of a
function while minimizing the mean squared error on th... |
baryonix/collectd | refs/heads/master | contrib/collectd_unixsock.py | 84 | #-*- coding: ISO-8859-1 -*-
# collect.py: the python collectd-unixsock module.
#
# Requires collectd to be configured with the unixsock plugin, like so:
#
# LoadPlugin unixsock
# <Plugin unixsock>
# SocketFile "/var/run/collectd-unixsock"
# SocketPerms "0775"
# </Plugin>
#
# Copyright (C) 2008 Clay Loveless <clay@k... |
evanma92/routeh | refs/heads/master | flask/lib/python2.7/site-packages/sqlalchemy/dialects/oracle/base.py | 21 | # oracle/base.py
# Copyright (C) 2005-2015 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: oracle
:name: Oracle
Oracle version 8 through current (11g ... |
xfournet/intellij-community | refs/heads/master | python/testData/refactoring/changeSignature/removeKeyedParam.after.py | 83 | def retry(tries, delay=3, backoff=1, exceptions_to_check=Exception, retry_for_lambda=None):
print "tries", tries
print "log", log
print "delay", delay
print "backoff", backoff
print "exceptions_to_check", exceptions_to_check
print "retry_for_lambda", retry_for_lambda
retry(3, 2, retry_for_lamb... |
x111ong/django | refs/heads/master | django/core/mail/backends/dummy.py | 835 | """
Dummy email backend that does nothing.
"""
from django.core.mail.backends.base import BaseEmailBackend
class EmailBackend(BaseEmailBackend):
def send_messages(self, email_messages):
return len(list(email_messages))
|
jaysonsantos/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/testing/test_conftest.py | 171 | from textwrap import dedent
import _pytest._code
import py
import pytest
from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED, EXIT_USAGEERROR
@pytest.fixture(scope="module", params=["global", "inpackage"])
def basedir(request, tmpdir_factory):
from _pytest.tmpdir import ... |
ArcherSys/ArcherSys | refs/heads/master | Lib/test/test_spwd.py | 1 | <<<<<<< HEAD
<<<<<<< HEAD
import os
import unittest
from test import support
spwd = support.import_module('spwd')
@unittest.skipUnless(hasattr(os, 'geteuid') and os.geteuid() == 0,
'root privileges required')
class TestSpwdRoot(unittest.TestCase):
def test_getspall(self):
entries = ... |
rajalokan/nova | refs/heads/master | nova/virt/xenapi/driver.py | 2 | # Copyright (c) 2010 Citrix Systems, Inc.
# 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... |
spooky/lobby | refs/heads/the-purge | src/games/view_models.py | 1 | import asyncio
import logging
from PyQt5.QtCore import QVariant, QUrl, QCoreApplication, pyqtSignal, pyqtSlot
import relays.game
from models import Map
from utils.async import asyncSlot
from widgets import Application
from view_models.adapters import ListModelFor, SelectionList, NotifyablePropertyObject, notifyablePro... |
manisandro/gtkspellmm | refs/heads/master | codegen/tools/defs_gen/definitions.py | 10 | # -*- Mode: Python; py-indent-offset: 4 -*-
import copy
import sys
def get_valid_scheme_definitions(defs):
return [x for x in defs if isinstance(x, tuple) and len(x) >= 2]
def unescape(s):
s = s.replace('\r\n', '\\r\\n').replace('\t', '\\t')
return s.replace('\r', '\\r').replace('\n', '\\n')
def make_doc... |
tboyce021/home-assistant | refs/heads/dev | tests/components/zwave/test_climate.py | 16 | """Test Z-Wave climate devices."""
import pytest
from homeassistant.components.climate.const import (
ATTR_TARGET_TEMP_HIGH,
ATTR_TARGET_TEMP_LOW,
CURRENT_HVAC_COOL,
CURRENT_HVAC_HEAT,
HVAC_MODE_COOL,
HVAC_MODE_HEAT,
HVAC_MODE_HEAT_COOL,
HVAC_MODE_OFF,
HVAC_MODES,
PRESET_AWAY,
... |
psav/cfme_tests | refs/heads/master | cfme/tests/cloud_infra_common/test_rest_providers.py | 2 | import fauxfactory
import pytest
from cfme import test_requirements
from cfme.common.provider import CloudInfraProvider
from cfme.infrastructure.provider import InfraProvider
from cfme.infrastructure.provider.rhevm import RHEVMProvider
from cfme.utils.blockers import BZ
from cfme.utils.rest import (
assert_respons... |
jsirois/pants | refs/heads/master | tests/python/pants_test/integration/list_integration_test.py | 4 | # Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from pants.testutil.pants_integration_test import run_pants
def test_list_all() -> None:
pants_run = run_pants(["--backend-packages=pants.backend.python", "list", "::"])
pants_ru... |
urisimchoni/samba | refs/heads/master | auth/credentials/tests/bind.py | 35 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This is unit with tests for LDAP access checks
import optparse
import sys
import base64
import copy
import time
sys.path.insert(0, "bin/python")
import samba
from samba.tests.subunitrun import SubunitOptions, TestProgram
import samba.getopt as options
from ldb import ... |
19kestier/taiga-back | refs/heads/master | taiga/base/utils/db.py | 12 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# 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 F... |
claudep/pootle | refs/heads/master | pootle/core/utils/db.py | 11 | # -*- coding: utf-8 -*-
#
# Copyright (C) Pootle contributors.
#
# This file is a part of the Pootle project. It is distributed under the GPL3
# or later license. See the LICENSE file for a copy of the license and the
# AUTHORS file for copyright and authorship information.
from contextlib import contextmanager
from ... |
OpenPymeMx/OCB | refs/heads/7.0 | addons/email_template/__openerp__.py | 56 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2009 Sharoon Thomas
# Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it ... |
zhaochao/fuel-web | refs/heads/master | fuel_agent/fuel_agent/drivers/nailgun.py | 1 | # Copyright 2014 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... |
le9i0nx/ansible | refs/heads/devel | lib/ansible/modules/cloud/atomic/atomic_host.py | 85 | #!/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',
... |
dfunckt/django | refs/heads/master | tests/migrations/test_migrations_first/thefirst.py | 2995 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
operations = [
migrations.CreateModel(
"Author",
[
("id", models.AutoField(primary_key=True)),
("name",... |
pim89/youtube-dl | refs/heads/master | youtube_dl/extractor/restudy.py | 62 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
class RestudyIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?restudy\.dk/video/play/id/(?P<id>[0-9]+)'
_TEST = {
'url': 'https://www.restudy.dk/video/play/id/1637',
'info_dict': {
'id': ... |
chamikaramj/incubator-beam | refs/heads/master | sdks/python/apache_beam/runners/dataflow/internal/clients/dataflow/message_matchers.py | 21 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
bricky/xbmc-addon-tvtumbler | refs/heads/master | resources/lib/dns/rdtypes/IN/APL.py | 85 | # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation 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 SOFTWARE IS PROVIDED "... |
benoitsteiner/tensorflow-opencl | refs/heads/master | tensorflow/contrib/learn/python/learn/datasets/text_datasets.py | 124 | # 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... |
DazWorrall/zulip | refs/heads/master | tools/send_github_payloads.py | 115 | #!/usr/bin/python
import sys
import os
import simplejson
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'api'))
import zulip
zulip_client = zulip.Client(site="http://localhost:9991", client="ZulipGithubPayloadSender/0.1")
payload_dir = "zerver/fixtures/github"
for filename in os.listdir(payload_dir):
... |
Udayraj123/dashboard_IITG | refs/heads/master | Binder/alpha/models.py | 278 | from django.db import models
|
Jcfunk/zva | refs/heads/master | tools/perf/python/twatch.py | 7370 | #! /usr/bin/python
# -*- python -*-
# -*- coding: utf-8 -*-
# twatch - Experimental use of the perf python interface
# Copyright (C) 2011 Arnaldo Carvalho de Melo <acme@redhat.com>
#
# This application is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License... |
da1z/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/contrib/messages/storage/user_messages.py | 308 | """
Storages used to assist in the deprecation of contrib.auth User messages.
"""
from django.contrib.messages import constants
from django.contrib.messages.storage.base import BaseStorage, Message
from django.contrib.auth.models import User
from django.contrib.messages.storage.fallback import FallbackStorage
class ... |
drufat/vispy | refs/heads/master | vispy/geometry/polygon.py | 21 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
# Copyright (c) 2015, Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# -------------------------------------------------------------------------... |
KlausTrainer/bigcouch | refs/heads/master | couchjs/scons/scons-local-2.0.1/SCons/Tool/gcc.py | 61 | """SCons.Tool.gcc
Tool-specific initialization for gcc.
There normally shouldn't be any need to import this module directly.
It will usually be imported through the generic SCons.Tool.Tool()
selection method.
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# P... |
rrva/uwsgi | refs/heads/master | tests/grunter.py | 21 | import uwsgi
import time
def application(env, start_response):
start_response('200 Ok', [('Content-Type', 'text/html')])
yield "I am the worker %d<br/>" % uwsgi.worker_id()
grunt = uwsgi.grunt()
if grunt is None:
print "worker %d detached" % uwsgi.worker_id()
else:
yield "And n... |
peercoin/peercoin | refs/heads/master | test/functional/wallet_txn_doublespend.py | 10 | #!/usr/bin/env python3
# Copyright (c) 2014-2019 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 wallet accounts properly when there is a double-spend conflict."""
from decimal import Decimal... |
shahar-stratoscale/nova | refs/heads/master | nova/api/openstack/compute/plugins/v3/hypervisors.py | 13 | # Copyright (c) 2012 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 ... |
Lord-Nazdar/mini-sentry | refs/heads/master | sentry.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Sentry
This is a dead-simple movement detection application with slack notification.
The computer's camera is used to take a picture at a given speed, then use opencv
to detect movement.
When a movement is detected, a picture is uploaded to slack.
Installation/Configu... |
tbreloff/Qwt.jl | refs/heads/master | src/python/pythonwidgets.py | 2 | from qwt_common import *
from PyQt4.QtCore import *
from PyQt4.QtGui import *
import PyQt4.Qwt5 as Qwt
import signal
def sigint_handler(*args):
sys.stderr.write('\r')
QApplication.quit()
signal.signal(signal.SIGINT, sigint_handler)
colorList = [Qt.black, Qt.red, Qt.green, Qt.blue, Qt.cyan, Qt.magenta,
... |
hrishioa/Aviato | refs/heads/master | flask/Lib/site-packages/requests/packages/chardet/__init__.py | 1777 | ######################## BEGIN LICENSE BLOCK ########################
# 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 your option) any later ve... |
dlazz/ansible | refs/heads/devel | lib/ansible/modules/monitoring/logentries.py | 122 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Ivan Vanderbyl <ivan@app.io>
# 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',
... |
swcarpentry/amy | refs/heads/develop | amy/dashboard/forms.py | 1 | from django import forms
from django.core.exceptions import ValidationError
from django.db.models import Q
from django_countries.fields import CountryField
from workshops.models import (
Language,
GenderMixin,
Person,
TrainingProgress,
TrainingRequirement,
)
from workshops.forms import BootstrapHe... |
ebifrier/one-godwhale2015 | refs/heads/master | third-party/gtest-1.7.0/test/gtest_help_test.py | 2968 | #!/usr/bin/env python
#
# Copyright 2009, 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... |
adam111316/SickGear | refs/heads/master | lib/unidecode/x05b.py | 252 | data = (
'Gui ', # 0x00
'Deng ', # 0x01
'Zhi ', # 0x02
'Xu ', # 0x03
'Yi ', # 0x04
'Hua ', # 0x05
'Xi ', # 0x06
'Hui ', # 0x07
'Rao ', # 0x08
'Xi ', # 0x09
'Yan ', # 0x0a
'Chan ', # 0x0b
'Jiao ', # 0x0c
'Mei ', # 0x0d
'Fan ', # 0x0e
'Fan ', # 0x0f
'Xian ', # 0x10
'Yi '... |
indautgrp/frappe | refs/heads/develop | frappe/patches/v4_0/set_website_route_idx.py | 75 | from __future__ import unicode_literals
import frappe
def execute():
pass
# from frappe.website.doctype.website_template.website_template import \
# get_pages_and_generators, get_template_controller
#
# frappe.reload_doc("website", "doctype", "website_template")
# frappe.reload_doc("website", "doctype", "websit... |
kevinwilde/WildeBot | refs/heads/master | src/mybot/Lib/site-packages/pip/compat/dictconfig.py | 921 | # This is a copy of the Python logging.config.dictconfig module,
# reproduced with permission. It is provided here for backwards
# compatibility for Python versions prior to 2.7.
#
# Copyright 2009-2010 by Vinay Sajip. All Rights Reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# docu... |
hengyicai/OnlineAggregationUCAS | refs/heads/master | python/pyspark/traceback_utils.py | 160 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
JonatanAntoni/CMSIS_5 | refs/heads/develop | CMSIS/DSP/PythonWrapper/config.py | 3 | CMSISDSP = 1
ROOT=".."
config = CMSISDSP
if config == CMSISDSP:
extensionName = 'cmsisdsp'
setupName = 'CMSISDSP'
setupDescription = 'CMSIS-DSP Python API'
cflags="-DCMSISDSP"
|
apache/allura | refs/heads/master | ForgeShortUrl/forgeshorturl/tests/__init__.py | 409 | # 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 (t... |
sogelink/ansible | refs/heads/devel | lib/ansible/plugins/callback/__init__.py | 16 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... |
jeromewu/bitcoin-abe-opennet | refs/heads/master | Abe/Chain/LtcScryptChain.py | 28 | # Copyright(C) 2014 by Abe developers.
# 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 version.
#
# This program is dist... |
seanchen/taiga-back | refs/heads/master | tests/integration/test_searches.py | 7 | # Copyright (C) 2014 Andrey Antukh <niwi@niwi.be>
# Copyright (C) 2014 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014 Anler Hernández <hello@anler.me>
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
KevinMidboe/statusHandler | refs/heads/master | flask/lib/python3.4/site-packages/setuptools/command/bdist_rpm.py | 1049 | import distutils.command.bdist_rpm as orig
class bdist_rpm(orig.bdist_rpm):
"""
Override the default bdist_rpm behavior to do the following:
1. Run egg_info to ensure the name and version are properly calculated.
2. Always run 'install' using --single-version-externally-managed to
disable eggs... |
Zuckonit/retry | refs/heads/master | setup.py | 1 | from setuptools import setup, find_packages
setup(
name="retry",
version="0.0.1",
packages=find_packages(),
author="Mocker",
author_email="Zuckerwooo@gmail.com",
)
|
gltn/stdm | refs/heads/master | stdm/third_party/FontTools/fontTools/ttLib/tables/TupleVariation.py | 1 | from fontTools.misc.py23 import *
from fontTools.misc.fixedTools import (
fixedToFloat as fi2fl,
floatToFixed as fl2fi,
floatToFixedToStr as fl2str,
strToFixedToFloat as str2fl,
otRound,
)
from fontTools.misc.textTools import safeEval
import array
import io
import logging
import struct
import sys
... |
elingg/tensorflow | refs/heads/master | tensorflow/python/training/gradient_descent_test.py | 7 | # 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... |
Arakmar/Sick-Beard | refs/heads/development | lib/imdb/parser/http/searchKeywordParser.py | 128 | """
parser.http.searchKeywordParser module (imdb package).
This module provides the HTMLSearchKeywordParser class (and the
search_company_parser instance), used to parse the results of a search
for a given keyword.
E.g., when searching for the keyword "alabama", the parsed page would be:
http://akas.imdb.com/find?... |
drmrd/ansible | refs/heads/devel | lib/ansible/modules/monitoring/sensu_subscription.py | 16 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Anders Ingemann <aim@secoya.dk>
# 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',
... |
calcutec/flask-burtonblog | refs/heads/master | app/models.py | 1 | from hashlib import md5
from werkzeug.security import generate_password_hash, check_password_hash
import re
from app import db
from flask import url_for, g
from flask.ext.login import UserMixin
from sqlalchemy import desc
import json
import datetime
json.JSONEncoder.default = lambda self, obj: (obj.isoformat() if isi... |
gormanb/mtools | refs/heads/master | mtools/util/grouping.py | 8 | from mtools.util import OrderedDict
import re
class Grouping(object):
def __init__(self, iterable=None, group_by=None):
self.groups = {}
self.group_by = group_by
if iterable:
for item in iterable:
self.add(item, group_by)
def add(self, item, group_by=None... |
juggernaut/pyrollbar | refs/heads/master | rollbar/test/test_loghandler.py | 2 | """
Tests for the RollbarHandler logging handler
"""
import copy
import logging
import mock
import urllib
import sys
import rollbar
from rollbar.logger import RollbarHandler
from . import BaseTest
_test_access_token = 'aaaabbbbccccddddeeeeffff00001111'
_test_environment = 'test'
_default_settings = copy.deepcopy(ro... |
dayutianfei/impala-Q | refs/heads/master | common/function-registry/gen_builtins_catalog.py | 8 | #!/usr/bin/env python
# Copyright 2012 Cloudera Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... |
ivanlmj/Android-DNSSL | refs/heads/master | Flask/lib/python2.7/site-packages/pip/_vendor/html5lib/tokenizer.py | 1710 | from __future__ import absolute_import, division, unicode_literals
try:
chr = unichr # flake8: noqa
except NameError:
pass
from collections import deque
from .constants import spaceCharacters
from .constants import entities
from .constants import asciiLetters, asciiUpper2Lower
from .constants import digits, ... |
kyroskoh/phantomjs | refs/heads/master | src/qt/qtbase/src/3rdparty/freetype/src/tools/chktrcmp.py | 381 | #!/usr/bin/env python
#
# Check trace components in FreeType 2 source.
# Author: suzuki toshiya, 2009
#
# This code is explicitly into the public domain.
import sys
import os
import re
SRC_FILE_LIST = []
USED_COMPONENT = {}
KNOWN_COMPONENT = {}
SRC_FILE_DIRS = [ "src" ]
TRACE_DEF_FILES = [ "include/freetype/in... |
dharmabumstead/ansible | refs/heads/devel | lib/ansible/module_utils/mysql.py | 114 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
samabhi/pstHealth | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/inject_meta_charset.py | 1730 | from __future__ import absolute_import, division, unicode_literals
from . import _base
class Filter(_base.Filter):
def __init__(self, source, encoding):
_base.Filter.__init__(self, source)
self.encoding = encoding
def __iter__(self):
state = "pre_head"
meta_found = (self.enco... |
littlezz/pyspider | refs/heads/master | pyspider/fetcher/cookie_utils.py | 69 | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
# vim: set et sw=4 ts=4 sts=4 ff=unix fenc=utf8:
# Author: Binux<roy@binux.me>
# http://binux.me
# Created on 2014-12-14 09:07:11
from requests.cookies import MockRequest
class MockResponse(object):
def __init__(self, headers):
self._headers = head... |
Strassengezwitscher/Strassengezwitscher | refs/heads/develop | crowdgezwitscher/events/views.py | 1 | from django.contrib.auth.mixins import PermissionRequiredMixin
from django.views.generic.list import ListView
from django.views.generic.detail import DetailView
from django.views.generic.edit import DeleteView
from django.urls import reverse_lazy
from extra_views import CreateWithInlinesView, UpdateWithInlinesView
fro... |
tal-nino/shinken | refs/heads/master | test/test_complex_hostgroups.py | 18 | #!/usr/bin/env python
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
#
# This file is part of Shinken.
#
# Shinken 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 F... |
CSC301H-Fall2013/JuakStore | refs/heads/master | site-packages/tests/regressiontests/admin_scripts/complex_app/models/bar.py | 153 | from __future__ import absolute_import
from django.db import models
from ..admin import foo
class Bar(models.Model):
name = models.CharField(max_length=5)
class Meta:
app_label = 'complex_app'
|
rpavlik/lyx-lucid-backport | refs/heads/master | lib/scripts/lyxpreview_tools.py | 1 | #! /usr/bin/env python
# file lyxpreview_tools.py
# This file is part of LyX, the document processor.
# Licence details can be found in the file COPYING.
# author Angus Leeming
# Full author contact details are available in file CREDITS
# and with much help testing the code under Windows from
# Paul A. Rubin, rubi... |
AppNearMe/micronfcboard-python | refs/heads/master | micronfcboard/interface/interface.py | 3 | """
mbed CMSIS-DAP debugger
Copyright (c) 2006-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 ... |
r0x0r/pywebview | refs/heads/master | tests/run.py | 1 | import os
import pytest
if __name__ == '__main__':
pytest.main(['-s']) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.