repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sims1253/coala-bears | refs/heads/master | bears/typescript/__init__.py | 12133432 | |
miles0411/pm | refs/heads/master | venv/lib/python2.7/site-packages/flask/testsuite/test_apps/flask_broken/b.py | 12133432 | |
popazerty/enigma2 | refs/heads/master | lib/python/Plugins/SystemPlugins/VideoEnhancement/__init__.py | 12133432 | |
njncalub/hiddencloudserver | refs/heads/master | api/__init__.py | 12133432 | |
jotes/ansible-modules-core | refs/heads/devel | utilities/logic/__init__.py | 12133432 | |
Nesiehr/osf.io | refs/heads/develop | api_tests/applications/views/__init__.py | 12133432 | |
RayMick/scikit-learn | refs/heads/master | sklearn/tests/__init__.py | 12133432 | |
gsnbng/erpnext | refs/heads/develop | erpnext/agriculture/doctype/agriculture_analysis_criteria/__init__.py | 12133432 | |
daonb/Open-Knesset | refs/heads/master | suggestions/migrations/__init__.py | 12133432 | |
valtandor/easybuild-framework | refs/heads/master | easybuild/framework/easyconfig/easyconfig.py | 4 | # #
# Copyright 2009-2015 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (ht... |
jayceyxc/hue | refs/heads/master | desktop/core/ext-py/MySQL-python-1.2.5/tests/dbapi20.py | 45 | #!/usr/bin/env python
''' Python DB API 2.0 driver compliance unit test suite.
This software is Public Domain and may be used without restrictions.
"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read... |
AkhilHector/Rex.Inc | refs/heads/master | .env/lib/python2.7/site-packages/pip/_vendor/requests/adapters.py | 573 | # -*- coding: utf-8 -*-
"""
requests.adapters
~~~~~~~~~~~~~~~~~
This module contains the transport adapters that Requests uses to define
and maintain connections.
"""
import socket
from .models import Response
from .packages.urllib3.poolmanager import PoolManager, proxy_from_url
from .packages.urllib3.response impo... |
shful/python-rrlog | refs/heads/master | rrlog/logging23.py | 1 | # Copyright (c) 2007 Ruben Reifenberg
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, d... |
shubhamdhama/zulip | refs/heads/master | zerver/webhooks/errbit/view.py | 5 | from typing import Any, Dict
from django.http import HttpRequest, HttpResponse
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.mod... |
josthkko/ggrc-core | refs/heads/develop | src/ggrc_workflows/migrations/versions/20140610235548_5ac75b9cbb64_add_cycle_related_tables.py | 7 | # Copyright (C) 2016 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Add Cycle-related tables
Revision ID: 5ac75b9cbb64
Revises: 2078f4b2c9f9
Create Date: 2014-06-10 23:55:48.137814
"""
# revision identifiers, used by Alembic.
revision = '5ac75b9cbb64'
down_revision = ... |
yebrahim/pydatalab | refs/heads/master | solutionbox/ml_workbench/tensorflow/transform.py | 1 | # Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... |
ShassAro/ShassAro | refs/heads/master | Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/contrib/sites/admin.py | 365 | from django.contrib import admin
from django.contrib.sites.models import Site
class SiteAdmin(admin.ModelAdmin):
list_display = ('domain', 'name')
search_fields = ('domain', 'name')
admin.site.register(Site, SiteAdmin)
|
andrew-aladev/samba-talloc-debug | refs/heads/master | buildtools/wafadmin/Tools/config_c.py | 6 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2005-2008 (ita)
"""
c/c++ configuration routines
"""
import os, imp, sys, shlex, shutil
from Utils import md5
import Build, Utils, Configure, Task, Options, Logs, TaskGen
from Constants import *
from Configure import conf, conftest
cfg_ver = {
'atleast-version'... |
home-assistant/home-assistant | refs/heads/dev | homeassistant/components/tcp/binary_sensor.py | 2 | """Provides a binary sensor which gets its values from a TCP socket."""
from __future__ import annotations
from typing import Any, Final
from homeassistant.components.binary_sensor import (
PLATFORM_SCHEMA as PARENT_PLATFORM_SCHEMA,
BinarySensorEntity,
)
from homeassistant.core import HomeAssistant
from homea... |
RafaelTorrealba/odoo | refs/heads/8.0 | addons/resource/faces/pcalendar.py | 433 | #@+leo-ver=4
#@+node:@file pcalendar.py
#@@language python
#@<< Copyright >>
#@+node:<< Copyright >>
############################################################################
# Copyright (C) 2005, 2006, 2007, 2008 by Reithinger GmbH
# mreithinger@web.de
#
# This file is part of faces.
#
# faces is free softw... |
michellemorales/OpenMM | refs/heads/master | models/domain_adaptation/pixel_domain_adaptation/pixelda_eval.py | 10 | # Copyright 2017 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 or agreed to in writing, ... |
peixiaobin/viewfinder | refs/heads/master | backend/services/tools/apns_cert_test.py | 13 | #!/usr/bin/env python
"""Test connection to the APNS servers.
This script simply attempts a connection to the various APNS servers to ensure that our
certificates and keys are configured correctly. Run the script and look at its logs
for lines like "connected to gateway.push.apple.com".
Usage:
python -m viewfinder... |
MetSystem/PTVS | refs/heads/master | Python/Tests/TestData/RenameItemsTest/ProgramX.py | 927 | print 'hello world' |
whirm/elpy | refs/heads/master | elpy/tests/__init__.py | 45 | """Unit tests for elpy."""
try:
import unittest2
import sys
sys.modules['unittest'] = unittest2
except:
pass
|
jpetso/libtorrent | refs/heads/master | tools/parse_disk_buffer_log.py | 3 | #!/usr/bin/env python
import os, sys, time
lines = open(sys.argv[1], 'rb').readlines()
# logfile format:
# <time(ms)> <key>: <value>
# example:
# 16434 read cache: 17
key_order = ['receive buffer', 'send buffer', 'released send buffer', 'posted send buffer',
'received send buffer', 'dispatched send buffer', 'queue... |
raychorn/simple-message-bus | refs/heads/master | test-bridge.py | 1 | import time
import simplejson
from vyperlogix import misc
from vyperlogix.misc import _utils
run_tests = [1,2]
if (__name__ == '__main__'):
import sys
import tcpipbridge
if (sys.platform == 'win32'):
if (1 in run_tests):
# Test #1 :: Create a new object
... |
lnls-sirius/dev-packages | refs/heads/master | siriuspy/siriuspy/callbacks.py | 1 | """Generic class to handle callbacks."""
class Callback:
"""Generic class to handle callbacks."""
def __init__(self, callback=None):
"""Initialize Instance.
callback can be any callable or list/tuple of callables.
"""
self._callbacks = dict()
if callback is None:
... |
FedoraScientific/salome-paravis | refs/heads/master | test/VisuPrs/Vectors/F3.py | 1 | # Copyright (C) 2010-2014 CEA/DEN, EDF R&D
#
# 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 version.
#
# This library ... |
YBJAY00000/django-rest-framework | refs/heads/master | rest_framework/metadata.py | 65 | """
The metadata API is used to allow customization of how `OPTIONS` requests
are handled. We currently provide a single default implementation that returns
some fairly ad-hoc information about the view.
Future implementations might use JSON schema or other definitions in order
to return this information in a more sta... |
ESS-LLP/erpnext-healthcare | refs/heads/master | erpnext/setup/doctype/currency_exchange/test_currency_exchange.py | 11 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe, unittest
from frappe.utils import flt
from erpnext.setup.utils import get_exchange_rate
test_records = frappe.get_test_records('Currency ... |
Cactuslegs/audacity-of-nope | refs/heads/master | lib-src/lv2/lv2/plugins/eg01-amp.lv2/waflib/Tools/xlc.py | 330 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib.Tools import ccroot,ar
from waflib.Configure import conf
@conf
def find_xlc(conf):
cc=conf.find_program(['xlc_r','xlc'],var='CC')
cc=conf.cmd_to_list(cc)
conf.g... |
simbs/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/video_outlines/views.py | 121 | """
Video Outlines
We only provide the listing view for a video outline, and video outlines are
only displayed at the course level. This is because it makes it a lot easier to
optimize and reason about, and it avoids having to tackle the bigger problem of
general XBlock representation in this rather specialized format... |
stanlyxiang/incubator-hawq | refs/heads/master | tools/bin/pythonSrc/unittest2-0.5.1/unit2.py | 195 | #! /usr/bin/env python
__unittest = True
from unittest2.main import main_
main_() |
vishnubob/bones | refs/heads/master | bones/package.py | 1 | import os
import sys
import inspect
class PackageInstaller(object):
def __init__(self, packages, **args):
self.packages = packages
self.args = args
def build(self, pkgcls):
pkg = pkgcls(**self.args)
script = pkg.script
def depends(self, key):
deps = set()
f... |
apagac/cfme_tests | refs/heads/master | cfme/storage/volume_snapshot.py | 2 | # -*- coding: utf-8 -*-
import attr
from navmazing import NavigateToAttribute
from navmazing import NavigateToSibling
from widgetastic.widget import NoSuchElementException
from widgetastic.widget import Text
from widgetastic.widget import View
from widgetastic_patternfly import BootstrapNav
from widgetastic_patternfly ... |
flwh/KK_mt6589_iq451 | refs/heads/master | prebuilts/python/linux-x86/2.7.5/lib/python2.7/distutils/tests/test_bdist_wininst.py | 99 | """Tests for distutils.command.bdist_wininst."""
import unittest
from test.test_support import run_unittest
from distutils.command.bdist_wininst import bdist_wininst
from distutils.tests import support
class BuildWinInstTestCase(support.TempdirManager,
support.LoggingSilencer,
... |
pyexcel/pyexcel-cli | refs/heads/master | tests/test_split.py | 1 | import os
from nose.tools import eq_
from pyexcel_cli.split import split
from click.testing import CliRunner
from pyexcel import get_book, get_sheet
def test_simple_option():
runner = CliRunner()
file_fixture = os.path.join("tests", "fixtures", "multiple-sheets.xls")
prefix = "output"
result = runner.... |
maartenq/ansible | refs/heads/devel | lib/ansible/modules/cloud/amazon/ec2_vpc_route_table_facts.py | 33 | #!/usr/bin/python
# 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',
'status': ['preview'],
... |
DinoTools/ArduRPC-python | refs/heads/master | ardurpc/__about__.py | 1 | __all__ = [
"__author__",
"__copyright__",
"__email__",
"__license__",
"__summary__",
"__title__",
"__uri__",
"__version__",
]
__title__ = "ardurpc"
__summary__ = "An extensible library to control microcontroller boards like Arduino using Python and the ArduRPC protocol"
__uri__ = "http... |
duyet-website/api.duyet.net | refs/heads/master | lib/faker/providers/person/sl_SI/__init__.py | 19 | # coding=utf-8
from __future__ import unicode_literals
from .. import Provider as PersonProvider
class Provider(PersonProvider):
formats = ['{{first_name}} {{last_name}}', ]
first_names_male = [
"Franc", "Janez", "Anton", "Ivan", "Jožef", "Andrej", "Marko",
"Marjan", "Peter", "Milan", "Stani... |
pozetroninc/micropython | refs/heads/stable | tests/extmod/ujson_dumps.py | 2 | try:
import ujson as json
except ImportError:
try:
import json
except ImportError:
print("SKIP")
raise SystemExit
print(json.dumps(False))
print(json.dumps(True))
print(json.dumps(None))
print(json.dumps(1))
print(json.dumps('abc'))
print(json.dumps('\x00\x01\x7e'))
print(json.dumps... |
daodewang/DECAF | refs/heads/master | decaf/roms/seabios/tools/encodeint.py | 118 | #!/usr/bin/env python
# Encode an integer in little endian format in a file.
#
# Copyright (C) 2011 Kevin O'Connor <kevin@koconnor.net>
#
# This file may be distributed under the terms of the GNU GPLv3 license.
import sys
import struct
def main():
filename = sys.argv[1]
value = int(sys.argv[2])
outval =... |
baidu/Paddle | refs/heads/develop | python/paddle/fluid/tests/book/__init__.py | 82 | # Copyright (c) 2018 PaddlePaddle 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 app... |
totallybradical/temp_servo2 | refs/heads/master | tests/wpt/web-platform-tests/tools/pywebsocket/src/example/hsts_wsh.py | 486 | # Copyright 2013, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... |
bobphill/compose | refs/heads/master | compose/progress_stream.py | 51 | import json
import os
import codecs
class StreamOutputError(Exception):
pass
def stream_output(output, stream):
is_terminal = hasattr(stream, 'fileno') and os.isatty(stream.fileno())
stream = codecs.getwriter('utf-8')(stream)
all_events = []
lines = {}
diff = 0
for chunk in output:
... |
aksaxena80/test | refs/heads/master | tensorflow/g3doc/tutorials/word2vec/word2vec_basic.py | 4 | from __future__ import print_function
import tensorflow.python.platform
import collections
import math
import numpy as np
import os
import random
import tensorflow as tf
import urllib
import zipfile
# Step 1: Download the data.
url = 'http://mattmahoney.net/dc/'
def maybe_download(filename, expected_bytes):
"""Dow... |
bmi-forum/bmi-pyre | refs/heads/master | pythia-0.8/packages/opal/opal/content/Head.py | 2 | #!/usr/bin/env python
#
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# Michael A.G. Aivazis
# California Institute of Technology
# (C) 1998-2005 All Rights Reserved
#
# {LicenseText}
#
# ~~~~~~~~~~~~~~~~~~~~~~~~... |
zafar-hussain/or-tools | refs/heads/master | data/nonogram_regular/nonogram_n6.py | 74 | # Copyright 2010 Hakan Kjellerstrand hakank@bonetmail.com
#
# 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... |
KevinHock/rtdpyt | refs/heads/master | profiling/test_projects/flaskbb_lite_2/flaskbb/configs/__init__.py | 12133432 | |
wolfram74/numerical_methods_iserles_notes | refs/heads/master | chapter_02/notes_Kelsey.py | 12133432 | |
ehudmagal/robotqcapp | refs/heads/master | boto/dynamodb/item.py | 6 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without ... |
adaur/SickRage | refs/heads/master | lib/unidecode/x009.py | 252 | data = (
'[?]', # 0x00
'N', # 0x01
'N', # 0x02
'H', # 0x03
'[?]', # 0x04
'a', # 0x05
'aa', # 0x06
'i', # 0x07
'ii', # 0x08
'u', # 0x09
'uu', # 0x0a
'R', # 0x0b
'L', # 0x0c
'eN', # 0x0d
'e', # 0x0e
'e', # 0x0f
'ai', # 0x10
'oN', # 0x11
'o', # 0x12
'o', # 0x13
'... |
karllessard/tensorflow | refs/heads/master | tensorflow/python/kernel_tests/attention_ops_test.py | 13 | # 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... |
ga7g08/sympy | refs/heads/master | sympy/polys/densetools.py | 52 | """Advanced tools for dense recursive polynomials in ``K[x]`` or ``K[X]``. """
from __future__ import print_function, division
from sympy.polys.densebasic import (
dup_strip, dmp_strip,
dup_convert, dmp_convert,
dup_degree, dmp_degree,
dmp_to_dict,
dmp_from_dict,
dup_LC, dmp_LC, dmp_ground_LC,... |
GehenHe/Recognize-Face-on-Android | refs/heads/master | tensorflow/contrib/learn/python/learn/estimators/_sklearn.py | 153 | # 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... |
Maximilian-Reuter/SickRage-1 | refs/heads/master | lib/mako/ext/extract.py | 76 | import re
from mako import compat
from mako import lexer
from mako import parsetree
class MessageExtractor(object):
def process_file(self, fileobj):
template_node = lexer.Lexer(
fileobj.read(),
input_encoding=self.config['encoding']).parse()
for extracted in self.extract_n... |
songyi199111/sentry | refs/heads/master | src/sentry/models/grouphash.py | 31 | """
sentry.models.grouphash
~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.db import models
from sentry.db.models import FlexibleForeignKey, Model
class GroupHash... |
FOSSEE-Manipal/eSim | refs/heads/master | src/frontEnd/ProjectExplorer.py | 2 | from PyQt4 import QtGui,QtCore
import os
import json
from configuration.Appconfig import Appconfig
class ProjectExplorer(QtGui.QWidget):
def __init__(self):
QtGui.QWidget.__init__(self)
self.obj_appconfig = Appconfig()
self.treewidget = QtGui.QTreeWidget()
self.window= QtGui.QVBoxL... |
Cuuuurzel/KiPyCalc | refs/heads/master | sympy/core/tests/test_truediv.py | 125 | from __future__ import division
#this module tests that sympy works with true division turned on
from sympy import Rational, Symbol, Float
def test_truediv():
assert 1/2 != 0
assert Rational(1)/2 != 0
def dotest(s):
x = Symbol("x")
y = Symbol("y")
l = [
Rational(2),
Float("1.3"... |
Tetpay/cjdns | refs/heads/master | node_build/dependencies/libuv/build/gyp/test/gyp-defines/gyptest-multiple-values.py | 169 | #!/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.
"""
Verifies that when multiple values are supplied for a gyp define, the last one
is used.
"""
import os
import TestGyp
test = TestGyp.Te... |
janpipek/pyg4app | refs/heads/master | g4app/plugin.py | 1 | class Plugin(object):
def __init__(self, name):
|
yceruto/django-guardian | refs/heads/master | guardian/core.py | 23 | from __future__ import unicode_literals
from itertools import chain
from django.contrib.auth.models import Permission
from django.contrib.contenttypes.models import ContentType
from guardian.utils import get_identity
from guardian.utils import get_user_obj_perms_model
from guardian.utils import get_group_obj_perms_m... |
metjush/decision_tree | refs/heads/master | decision_tree/TreeNode.py | 1 | __author__ = 'metjush'
# Node Class is the basic building block of the Classification Tree
# it implements decision rules and final assignment to classes
import numpy as np
class Node:
# the object is initialized by telling the node along which feature it is splitting
# what the split threshold is, what th... |
andcor02/mbed-os | refs/heads/master | features/FEATURE_BLE/targets/TARGET_NORDIC/TARGET_MCU_NRF51822/sdk/script/replace_headers.py | 77 | # Copyright (c) 2015-2016 ARM Limited
# SPDX-License-Identifier: Apache-2.0
#
# 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... |
hackEns/Jarvis | refs/heads/master | Rules/Info.py | 1 | from ._shared import *
import subprocess
import wiringpi2
class Info(Rule):
"""Display infos"""
def __init__(self, bot):
self.bot = bot
def atx_status(self):
return wiringpi2.digitalRead(self.bot.config.get("pin_atx_status"))
def __call__(self, serv, author, args):
"""Displa... |
Shade5/coala | refs/heads/master | tests/bearlib/abstractions/SectionCreatableTest.py | 31 | import unittest
from coalib.bearlib.abstractions.SectionCreatable import SectionCreatable
from coalib.settings.Section import Section, Setting
class TestObject(SectionCreatable):
def __init__(self,
setting_one: int,
raw_setting,
setting_two: bool=False,
... |
a25kk/newe | refs/heads/master | src/newe.sitetheme/newe/sitetheme/interfaces.py | 1 | # -*- coding: utf-8 -*-
"""Module where all interfaces, events and exceptions live."""
from plone.theme.interfaces import IDefaultPloneLayer
class INeweSitethemeLayer(IDefaultPloneLayer):
"""Marker interface that defines a Zope 3 browser layer."""
|
klunwebale/odoo | refs/heads/8.0 | openerp/tools/osutil.py | 238 | # -*- coding: 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... |
askulkarni2/ansible | refs/heads/devel | lib/ansible/utils/boolean.py | 256 | # (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... |
paxswill/evesrp | refs/heads/master | src/evesrp/killmail.py | 1 | from __future__ import absolute_import
from collections import defaultdict
import datetime as dt
import time
from decimal import Decimal
from functools import partial
import re
import sys
import six
from .util import unistr, urlparse, urlunparse, utc, classproperty
from flask import Markup, current_app
from flask_babe... |
dya2/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/multiprocessing/synchronize.py | 51 | #
# Module implementing synchronization primitives
#
# multiprocessing/synchronize.py
#
# Copyright (c) 2006-2008, R Oudkerk
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistribution... |
nandadotexe/CodeIgniter | refs/heads/develop | user_guide_src/source/conf.py | 86 | # -*- coding: utf-8 -*-
#
# CodeIgniter documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 07:24:38 2011.
#
# 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.
#
#... |
int19h/PTVS | refs/heads/master | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pip/_internal/commands/hash.py | 30 | from __future__ import absolute_import
import hashlib
import logging
import sys
from pip._internal.cli.base_command import Command
from pip._internal.cli.status_codes import ERROR
from pip._internal.utils.hashes import FAVORITE_HASH, STRONG_HASHES
from pip._internal.utils.misc import read_chunks
logger = logging.get... |
hxer/exercise | refs/heads/master | docker/django/blog/code/core/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
tai-korestate/budongsanbuddy | refs/heads/master | profile_app/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
datapythonista/pandas | refs/heads/master | pandas/tests/indexes/datetimes/test_constructors.py | 2 | from datetime import (
datetime,
timedelta,
timezone,
)
from functools import partial
from operator import attrgetter
import dateutil
import numpy as np
import pytest
import pytz
from pandas._libs.tslibs import (
OutOfBoundsDatetime,
conversion,
)
import pandas as pd
from pandas import (
Date... |
Big-B702/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/test/test_macpath.py | 62 | import macpath
from test import support, test_genericpath
import unittest
class MacPathTestCase(unittest.TestCase):
def test_abspath(self):
self.assertEqual(macpath.abspath("xx:yy"), "xx:yy")
def test_isabs(self):
isabs = macpath.isabs
self.assertTrue(isabs("xx:yy"))
self.ass... |
cdrttn/samba-regedit | refs/heads/regedit-wip | buildtools/wafadmin/Tools/ruby.py | 16 | #!/usr/bin/env python
# encoding: utf-8
# daniel.svensson at purplescout.se 2008
import os
import Task, Options, Utils
from TaskGen import before, feature, after
from Configure import conf
@feature('rubyext')
@before('apply_incpaths', 'apply_type_vars', 'apply_lib_vars', 'apply_bundle')
@after('default_cc', 'vars_tar... |
last-g/qoala | refs/heads/master | apps/quests/management/__init__.py | 6 | __author__ = 'Last G'
|
morelab/weblabdeusto | refs/heads/master | server/src/weblab/permissions.py | 3 | from __future__ import print_function, unicode_literals
"""
This module includes all the possible permissions. Whenever the application is upgraded,
it can include new permissions, and no change in the database is required (except for granting
groups, roles or users with the new permission).
"""
class PermissionType(o... |
da1z/intellij-community | refs/heads/master | python/testData/refactoring/move/importFirstWithSlash/before/src/tmp.py | 166 | from file1 import function_1,\
function_2
function_1()
function_2() |
spvkgn/youtube-dl | refs/heads/master | youtube_dl/extractor/cbssports.py | 22 | from __future__ import unicode_literals
from .cbs import CBSBaseIE
class CBSSportsIE(CBSBaseIE):
_VALID_URL = r'https?://(?:www\.)?cbssports\.com/[^/]+/(?:video|news)/(?P<id>[^/?#&]+)'
_TESTS = [{
'url': 'https://www.cbssports.com/nba/video/donovan-mitchell-flashes-star-potential-in-game-2-victory-o... |
weka-io/boto | refs/heads/develop | boto/kinesis/layer1.py | 102 | # Copyright (c) 2014 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights ... |
VincentCATILLON/navitia | refs/heads/dev | source/jormungandr/jormungandr/manage.py | 12 | #!/usr/bin/env python
# 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 ... |
wilvk/ansible | refs/heads/devel | contrib/vault/vault-keyring-client.py | 40 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# (c) 2014, Matt Martz <matt@sivel.net>
# (c) 2016, Justin Mayer <https://justinmayer.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 ... |
zanderle/django | refs/heads/master | tests/field_subclassing/models.py | 252 | """
Tests for field subclassing.
"""
from django.db import models
from django.utils.encoding import force_text, python_2_unicode_compatible
from .fields import JSONField, Small, SmallerField, SmallField
@python_2_unicode_compatible
class MyModel(models.Model):
name = models.CharField(max_length=10)
data = Sm... |
laputian/dml | refs/heads/master | test/test_11_1.py | 1 | import numpy as np
def nonlinear( x, deriv = False):
if deriv == True:
return x * (1 - x)
return 1/( 1 + np.exp(-x))
X = np.array([[0, 0, 1],
[0, 1, 1],
[1, 0, 1],
[1, 1, 1]])
y = np.array([[0],
[1],
[1],
[0]])
np.r... |
jhawkesworth/ansible | refs/heads/devel | test/units/modules/network/dellos6/__init__.py | 12133432 | |
heeraj123/oh-mainline | refs/heads/master | vendor/packages/python-openid/examples/djopenid/__init__.py | 12133432 | |
pdebuyl/numpy | refs/heads/master | numpy/core/tests/test_overrides.py | 6 | import inspect
import sys
from unittest import mock
import numpy as np
from numpy.testing import (
assert_, assert_equal, assert_raises, assert_raises_regex)
from numpy.core.overrides import (
_get_implementing_args, array_function_dispatch,
verify_matching_signatures, ARRAY_FUNCTION_ENABLED)
from numpy.co... |
ccnmtl/lettuce | refs/heads/master | tests/integration/lib/Django-1.2.5/tests/regressiontests/defer_regress/models.py | 90 | """
Regression tests for defer() / only() behavior.
"""
from django.conf import settings
from django.contrib.contenttypes.models import ContentType
from django.db import connection, models
class Item(models.Model):
name = models.CharField(max_length=15)
text = models.TextField(default="xyzzy")
value = mod... |
ProjectSWGCore/NGECore2 | refs/heads/master | scripts/mobiles/lairgroups/dantooine_mining_area.py | 2 | import sys
from services.spawn import LairSpawnTemplate
from java.util import Vector
def addLairGroup(core):
spawnTemplate1 = LairSpawnTemplate(-1, 'dantooine_huurton_lair_1', -1, -1)
spawnTemplate2 = LairSpawnTemplate(-1, 'dantooine_huurton_lair_2', -1, -1)
spawnTemplate3 = LairSpawnTemplate(-1, 'dantooine_bol_lai... |
nginxxx/ansible | refs/heads/devel | contrib/inventory/proxmox.py | 74 | #!/usr/bin/env python
# Copyright (C) 2014 Mathieu GAUTHIER-LAFAYE <gauthierl@lapth.cnrs.fr>
#
# 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 op... |
yelongyu/chihu | refs/heads/master | venv/lib/python2.7/site-packages/werkzeug/_reloader.py | 144 | import os
import sys
import time
import subprocess
import threading
from itertools import chain
from werkzeug._internal import _log
from werkzeug._compat import PY2, iteritems, text_type
def _iter_module_files():
"""This iterates over all relevant Python files. It goes through all
loaded files from modules,... |
Klozz/android_kernel_msm_3.10 | refs/heads/linux-linaro-lsk-v3.10-android | tools/perf/scripts/python/sched-migration.py | 11215 | #!/usr/bin/python
#
# Cpu task migration overview toy
#
# Copyright (C) 2010 Frederic Weisbecker <fweisbec@gmail.com>
#
# perf script event handlers have been generated by perf script -g python
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Fre... |
cernops/keystone | refs/heads/master | keystone_tempest_plugin/tests/api/identity/__init__.py | 12133432 | |
Chibin/gpdb | refs/heads/master | src/test/tinc/tincrepo/mpp/gpdb/tests/storage/transaction_management/mpp23395/__init__.py | 12133432 | |
abhattad4/Digi-Menu | refs/heads/master | digimenu2/tests/builtin_server/__init__.py | 12133432 | |
zerc/django | refs/heads/master | tests/model_inheritance/same_model_name/__init__.py | 12133432 | |
sn1k/app_mundial | refs/heads/master | lib/python2.7/site-packages/django/conf/locale/ja/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.