repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
anthgur/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/sessions/new_session/support/__init__.py | 12133432 | |
drpngx/tensorflow | refs/heads/master | tensorflow/contrib/quantize/python/quantize_graph.py | 11 | # 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... |
4shadoww/hakkuframework | refs/heads/master | core/lib/scapy/modules/__init__.py | 34 | ## This file is part of Scapy
## See http://www.secdev.org/projects/scapy for more informations
## Copyright (C) Philippe Biondi <phil@secdev.org>
## This program is published under a GPLv2 license
"""
Package of extension modules that have to be loaded explicitly.
"""
|
teltek/edx-platform | refs/heads/master | lms/envs/static.py | 16 | """
This config file runs the simplest dev environment using sqlite, and db-based
sessions. Assumes structure:
/envroot/
/db # This is where it'll write the database file
/edx-platform # The location of this repo
/log # Where we're going to write log files
"""
# We intentionally define lot... |
leafclick/intellij-community | refs/heads/master | python/testData/completion/className/orderingModuleBeforePackage/b/foo.py | 12133432 | |
marisn/timlab | refs/heads/master | src/images/__init__.py | 12133432 | |
chennan47/osf.io | refs/heads/develop | addons/figshare/migrations/0002_auto_20170323_1534.py | 28 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-23 20:34
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('addons_fi... |
dc217863/CarND-Behavioral-Cloning-P3 | refs/heads/master | model.py | 1 | import csv
import matplotlib.pyplot as plt
import cv2
import numpy as np
from sklearn.utils import shuffle
from keras.models import Sequential
from keras.layers import Flatten, Dense, Lambda, Convolution2D, Cropping2D, Dropout, SpatialDropout2D
IMAGE_HEIGHT, IMAGE_WIDTH, IMAGE_CHANNELS = 160, 320, 3
INPUT_SHAPE = (IMA... |
allanlewis/behave | refs/heads/master | behave/i18n.py | 9 | # -*- coding: UTF-8 -*-
# -- FILE GENERATED BY: convert_i18n_yaml.py with i18n.yml
from __future__ import unicode_literals
languages = \
{'ar': {'and': [u'*', u'\u0648'],
'background': [u'\u0627\u0644\u062e\u0644\u0641\u064a\u0629'],
'but': [u'*', u'\u0644\u0643\u0646'],
'examples': [u'\u0627\u... |
davidkassa/p2pool | refs/heads/master | nattraverso/__init__.py | 288 | """
This package offers ways to retreive ip addresses of the machine, and map ports
through various protocols.
Currently only UPnP is implemented and available, in the pynupnp module.
@author: Raphael Slinckx
@copyright: Copyright 2005
@license: LGPL
@contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>}
@versi... |
takeshineshiro/cinder | refs/heads/master | cinder/volume/drivers/ibm/storwize_svc/__init__.py | 10 | # Copyright 2013 IBM Corp.
# Copyright 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/LIC... |
vonivgol/pyreminder | refs/heads/master | src/reminder.py | 1 | import json
import os
class Reminder(object):
def __init__(self):
self.__reminder_db_name = os.path.dirname(os.path.abspath(__file__))+"/events.json"
"""
events.json example:
{"id":["time", "text"], "1":["16.25.13.01.2016", "Write new module for my project."]}
"""
s... |
RitwikGupta/pattern | refs/heads/master | docs/update.py | 21 | #### DOCUMENTATION GENERATOR ##########################################################################
# Keeps the offline documention in synch with the online documentation.
# Simply run "python update.py" to generate the latest version.
import os, sys; sys.path.insert(0, os.path.join(".."))
import codecs
import re
... |
Zhaoyanzhang/-myflasky | refs/heads/master | venv/lib/python2.7/site-packages/mako/ast.py | 61 | # mako/ast.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""utilities for analyzing expressions and blocks of Python
code, as well as generating Python from AS... |
czhengsci/pymatgen | refs/heads/master | pymatgen/analysis/chemenv/utils/__init__.py | 132 | __author__ = 'waroquiers'
|
pymedusa/SickRage | refs/heads/master | ext/urllib3/util/wait.py | 63 | import errno
from functools import partial
import select
import sys
try:
from time import monotonic
except ImportError:
from time import time as monotonic
__all__ = ["NoWayToWaitForSocketError", "wait_for_read", "wait_for_write"]
class NoWayToWaitForSocketError(Exception):
pass
# How should we wait on ... |
sebastic/QGIS | refs/heads/master | python/plugins/processing/algs/lidar/lastools/las2demPro.py | 3 | # -*- coding: utf-8 -*-
"""
***************************************************************************
las2demPro.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
... |
Nickito12/stepmania-server | refs/heads/master | smserver/models/ranked_chart.py | 1 |
import enum
from sqlalchemy import Column, Integer, String, Float, ForeignKey
from sqlalchemy.orm import relationship
from smserver.models import schema
from smserver.models.song_stat import SongStat
from smserver.models.chart import Chart
__all__ = ['RankedChart', 'Diffs']
class Diffs(enum.Enum):
Beginner ... |
mvaled/sentry | refs/heads/master | src/sentry/south_migrations/0228_auto__del_field_event_num_comments.py | 1 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'Event.num_comments'
db.delete_column('sentry_message', '... |
redhat-cip/numeter | refs/heads/master | web-app/numeter_webapp/configuration/__init__.py | 12133432 | |
lig/picket2014 | refs/heads/master | picket/migrations/__init__.py | 12133432 | |
n0trax/ansible | refs/heads/devel | lib/ansible/modules/cloud/atomic/atomic_image.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',
... |
izzyleung/ZhihuDailyPurify | refs/heads/master | news_fetch/server/server.py | 1 | from os import environ
from bottle import route, run, request
from proto.zhihu_daily_purify_pb2 import Feed
from news_fetch.python.official import ZhihuDailyOfficial
from news_fetch.server import mongo
from news_fetch.server.datetimechina import DateTimeChina
@route('/')
def index():
return 'Index'
@route('/n... |
KellyChan/python-examples | refs/heads/master | javascript/backbone/backbone-templates/backbone-fileupload/venvs/lib/python2.7/site-packages/django/core/serializers/json.py | 81 | """
Serialize data to/from JSON
"""
import datetime
import decimal
from StringIO import StringIO
from django.core.serializers.base import DeserializationError
from django.core.serializers.python import Serializer as PythonSerializer
from django.core.serializers.python import Deserializer as PythonDeserializer
from dj... |
boundarydevices/android_external_chromium_org | refs/heads/cm-12.0 | tools/ipc_fuzzer/mutate/ipc_fuzzer_gen.py | 56 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generational ClusterFuzz fuzzer. It generates IPC messages using
GenerateTraits. Support of GenerateTraits for different types will ... |
ttyangf/pdfium_gyp | refs/heads/master | test/dependencies/gyptest-sharedlib-linksettings.py | 246 | #!/usr/bin/env python
# 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.
"""
Verify that link_settings in a shared_library are not propagated to targets
that depend on the shared_library, but are used in the share... |
MeteorAdminz/autopep8 | refs/heads/master | test/bad_encoding.py | 8 | # -*- coding: zlatin-1 -*-
|
EDUlib/edx-platform | refs/heads/master | lms/djangoapps/course_wiki/utils.py | 9 | """
Utility functions for course_wiki.
"""
from django.core.exceptions import ObjectDoesNotExist
import lms.djangoapps.courseware
from xmodule import modulestore
def user_is_article_course_staff(user, article):
"""
The root of a course wiki is /<course_number>. This means in case there
are two courses ... |
epandurski/django | refs/heads/master | django/contrib/messages/views.py | 818 | from django.contrib import messages
class SuccessMessageMixin(object):
"""
Adds a success message on successful form submission.
"""
success_message = ''
def form_valid(self, form):
response = super(SuccessMessageMixin, self).form_valid(form)
success_message = self.get_success_mes... |
village-people/flying-pig | refs/heads/master | ai_challenge/agents/_ignorebeta_dqn_agent_batch.py | 1 | # 2017, Andrei N., Tudor B.
from sphinx.addnodes import centered
from ._ignore_Agent import Agent
from ._ignore_Agent import Transition
import matplotlib.pyplot as plt
from random import choice
import logging
import os
import numpy as np
import math
import random
import torch
import torch.nn as nn
import torch.opti... |
jevonearth/frappe | refs/heads/develop | frappe/website/doctype/website_slideshow_item/__init__.py | 12133432 | |
fish2000/python-vlfeatures | refs/heads/master | vlfeat/mser/__init__.py | 12133432 | |
karthik-suresh/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/volumes/volume_types/qos_specs/__init__.py | 12133432 | |
2013Commons/HUE-SHARK | refs/heads/master | desktop/core/ext-py/Django-1.2.3/django/contrib/auth/handlers/modpython.py | 436 | from mod_python import apache
import os
def authenhandler(req, **kwargs):
"""
Authentication handler that checks against Django's auth database.
"""
# mod_python fakes the environ, and thus doesn't process SetEnv. This fixes
# that so that the following import works
os.environ.update(req.subp... |
40223232/2015cd_midterm | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/unittest/test/test_setups.py | 791 | import io
import sys
import unittest
def resultFactory(*_):
return unittest.TestResult()
class TestSetups(unittest.TestCase):
def getRunner(self):
return unittest.TextTestRunner(resultclass=resultFactory,
stream=io.StringIO())
def runTests(self, *cases... |
xwolf12/django | refs/heads/master | django/contrib/humanize/templatetags/__init__.py | 12133432 | |
rajul/mne-python | refs/heads/master | mne/io/bti/tests/__init__.py | 12133432 | |
cbmoore/statsmodels | refs/heads/master | statsmodels/genmod/tests/test_gee.py | 19 | """
Test functions for GEE
External comparisons are to R and Stata. The statmodels GEE
implementation should generally agree with the R GEE implementation
for the independence and exchangeable correlation structures. For
other correlation structures, the details of the correlation
estimation differ among implementat... |
gautamkmr/incubator-mxnet | refs/heads/master | example/reinforcement-learning/dqn/base.py | 25 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
rdhyee/osf.io | refs/heads/develop | api_tests/view_only_links/views/test_view_only_link_detail.py | 11 | from nose.tools import * # flake8: noqa
from api.base.settings.defaults import API_BASE
from api_tests.nodes.views.test_node_view_only_links_list import ViewOnlyLinkTestCase
class TestViewOnlyLinksDetail(ViewOnlyLinkTestCase):
def setUp(self):
super(TestViewOnlyLinksDetail, self).setUp()
self.... |
Hanaasagi/sorator | refs/heads/master | orator/connectors/connection_factory.py | 1 | # -*- coding: utf-8 -*-
import random
from ..exceptions import ArgumentError
from ..exceptions.connectors import UnsupportedDriver
from .mysql_connector import MySQLConnector
from .postgres_connector import PostgresConnector
from .sqlite_connector import SQLiteConnector
from ..connections import (
MySQLConnection,... |
aequitas/home-assistant | refs/heads/dev | homeassistant/auth/providers/__init__.py | 12 | """Auth providers for Home Assistant."""
import importlib
import logging
import types
from typing import Any, Dict, List, Optional
import voluptuous as vol
from voluptuous.humanize import humanize_error
from homeassistant import data_entry_flow, requirements
from homeassistant.core import callback, HomeAssistant
from... |
seibert/numba | refs/heads/master | numba/cuda/tests/cudadrv/test_detect.py | 7 | import os
import sys
import subprocess
import threading
from numba import cuda
from numba.cuda.testing import (unittest, CUDATestCase, skip_on_cudasim,
skip_under_cuda_memcheck)
from numba.tests.support import captured_stdout
class TestCudaDetect(CUDATestCase):
def test_cuda_detect... |
ESOedX/edx-platform | refs/heads/master | lms/djangoapps/courseware/tests/test_draft_modulestore.py | 1 | """
Test the draft modulestore
"""
from __future__ import absolute_import
from django.test import TestCase
from opaque_keys.edx.keys import CourseKey
from xmodule.modulestore.django import modulestore
class TestDraftModuleStore(TestCase):
"""
Test the draft modulestore
"""
def test_get_items_with_... |
fitermay/intellij-community | refs/heads/master | python/testData/mover/emptyLineInIf.py | 83 | if True:
a = 1<caret> # <- move statement down here
else:
b = 2 |
GoogleCloudPlatform/runtimes-common | refs/heads/master | appengine/reconciletags/tag_reconciler.py | 5 | # 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 agre... |
chouseknecht/ansible-modules-core | refs/heads/devel | cloud/rackspace/rax_dns_record.py | 51 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
avanov/solo | refs/heads/develop | solo/configurator/view.py | 1 | import logging
from .config.routes import Route
from .exceptions import ConfigurationError
import venusian
log = logging.getLogger(__name__)
class http_endpoint:
venusian = venusian
def __init__(self, **settings):
self.__dict__.update(settings)
def __call__(self, wrapped):
settings =... |
phalax4/CarnotKE | refs/heads/master | jyhton/lib-python/2.7/encodings/utf_16_le.py | 860 | """ Python 'utf-16-le' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
encode = codecs.utf_16_le_encode
def decode(input, errors='strict'):
return codecs.utf_16_le_decode(input, errors, True)
class IncrementalEncod... |
asaenzestrada/tacobot | refs/heads/master | tacobot_pysa/manage.py | 1 | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tacobot_pysa.settings")
from django.core.management import execute_from_command_line
execute_from_command_line(sys.argv)
|
stxent/kmodgen | refs/heads/master | exporter_kicad_pretty.py | 1 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# exporter_kicad_pretty.py
# Copyright (C) 2016 xent
# Project is distributed under the terms of the GNU General Public License v3.0
import math
import time
import exporter
# Default precision for :g format is 6
class Converter:
def __init__(self, model_path, mod... |
direvus/ansible | refs/heads/devel | test/units/module_utils/network/aci/test_aci.py | 7 | # -*- coding: utf-8 -*-
# Copyright 2017 Dag Wieers <dag@wieers.com>
# This file is part of Ansible by Red Hat
#
# 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
... |
mglukhikh/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/middleware/http.py | 94 | from django.core.exceptions import MiddlewareNotUsed
from django.utils.http import http_date
class ConditionalGetMiddleware(object):
"""
Handles conditional GET operations. If the response has a ETag or
Last-Modified header, and the request has If-None-Match or
If-Modified-Since, the response is replac... |
sebrandon1/neutron | refs/heads/master | neutron/db/migration/__init__.py | 3 | # Copyright 2012 New Dream Network, LLC (DreamHost)
#
# 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 a... |
grap/OpenUpgrade | refs/heads/8.0 | addons/web/tests/common.py | 12133432 | |
lz1988/django-web2015 | refs/heads/master | django/conf/locale/eu/__init__.py | 12133432 | |
MartinHjelmare/home-assistant | refs/heads/dev | homeassistant/components/zha/entity.py | 6 | """Entity for Zigbee Home Automation."""
import logging
import time
from homeassistant.core import callback
from homeassistant.helpers import entity
from homeassistant.helpers.device_registry import CONNECTION_ZIGBEE
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from homeassistant.helpers.rest... |
qsnake/gpaw | refs/heads/master | doc/install/Linux/customize_armageddon.py | 3 | scalapack = False
extra_compile_args = ['-O3', '-std=c99', '-fpic']
compiler = 'gcc'
mpicompiler = '/home/firegam/CAMd/openmpi-1.4.3-1/bin/mpicc'
mpilinker = mpicompiler
libraries = ['mkl_lapack', 'mkl_core', 'mkl_sequential', 'mkl_gf_lp64', 'iomp5']
mkl_lib_path = '/opt/intel/Compiler/11.1/072/mkl/lib/em64t/'
ompi... |
boltnev/iktomi | refs/heads/master | tests/forms/forms.py | 3 | # -*- coding: utf-8 -*-
import six
import os
import unittest
from iktomi.forms import *
from iktomi.templates import Template
from iktomi.templates.jinja2 import TemplateEngine
from webob.multidict import MultiDict
from iktomi.web.app import AppEnvironment
class FormClassInitializationTests(unittest.TestCase):
... |
CenterForOpenScience/osf.io | refs/heads/develop | addons/wiki/migrations/0004_remove_nodewikipage_guid_string.py | 28 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-24 21:09
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('addons_wiki', '0003_auto_20170403_2228'),
]
operations = [
migrations.RemoveField(
... |
joshisa/django-storages | refs/heads/master | docs/conf.py | 32 | # -*- coding: utf-8 -*-
#
# django-storages documentation build configuration file, created by
# sphinx-quickstart on Sun Aug 28 13:44:45 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.... |
rdipietro/tensorflow | refs/heads/master | tensorflow/contrib/quantization/python/math_ops.py | 179 | # 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... |
southpawtech/TACTIC-DEV | refs/heads/master | src/pyasm/prod/web/version_history_wdg.py | 6 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... |
GinnyN/towerofdimensions-django | refs/heads/master | django/core/cache/backends/locmem.py | 80 | "Thread-safe in-memory cache backend."
from __future__ import with_statement
import time
try:
import cPickle as pickle
except ImportError:
import pickle
from django.core.cache.backends.base import BaseCache
from django.utils.synch import RWLock
# Global in-memory store of cache data. Keyed by name, to provi... |
zouzhberk/ambaridemo | refs/heads/master | demo-server/src/main/resources/stacks/HDP/2.1.GlusterFS/services/FALCON/package/scripts/params.py | 1 | """
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 use this ... |
jupierce/openshift-tools | refs/heads/prod | ansible/roles/lib_openshift_3.2/build/src/oc_process.py | 13 | # pylint: skip-file
# pylint: disable=too-many-instance-attributes
class OCProcess(OpenShiftCLI):
''' Class to wrap the oc command line tools '''
# pylint allows 5. we need 6
# pylint: disable=too-many-arguments
def __init__(self,
namespace,
tname=None,
... |
ntonjeta/iidea-Docker | refs/heads/master | examples/sobel/src/boost_1_63_0/libs/python/test/callbacks.py | 20 | # Copyright David Abrahams 2004. Distributed under the Boost
# Software License, Version 1.0. (See accompanying
# file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
'''
>>> from callbacks_ext import *
>>> def double(x):
... return x + x
...
>>> apply_int_int(double, 42)
84
>>> apply_void_int(dou... |
pierrepo/PBxplore | refs/heads/master | pbxplore/structure/loader.py | 2 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
import sys
# Local module
from .structure import Chain, Atom
from .PDB import PDB
# load MDAnalysis with limited support for Python 3
import warnings
with warnings.catch_warnings():
warnings.simplefilter("ignore")
import MDAnalysis
# Create the __all__ keywo... |
tlksio/tlksio | refs/heads/develop | env/lib/python3.4/site-packages/django/template/backends/django.py | 119 | # Since this package contains a "django" module, this is required on Python 2.
from __future__ import absolute_import
import sys
from importlib import import_module
from pkgutil import walk_packages
from django.apps import apps
from django.conf import settings
from django.template import TemplateDoesNotExist
from dja... |
dvitme/account-financial-tools | refs/heads/8.0 | __unported__/account_cancel_invoice_check_payment_order/__init__.py | 44 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author Vincent Renaville. Copyright 2012 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publis... |
whs/django | refs/heads/master | tests/template_tests/syntax_tests/test_extends.py | 52 | from django.template import NodeList
from django.template.base import Node
from django.template.loader_tags import ExtendsNode
from django.test import SimpleTestCase
from ..utils import setup
inheritance_templates = {
'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% endblock %}",
'inh... |
Eforcers/inbox-cleaner | refs/heads/master | src/lib/requests/adapters.py | 8 | # -*- 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, ProxyManager
from .packages.urllib3.response import... |
3manuek/scikit-learn | refs/heads/master | benchmarks/bench_plot_fastkmeans.py | 294 | from __future__ import print_function
from collections import defaultdict
from time import time
import numpy as np
from numpy import random as nr
from sklearn.cluster.k_means_ import KMeans, MiniBatchKMeans
def compute_bench(samples_range, features_range):
it = 0
results = defaultdict(lambda: [])
chun... |
scholer/cadnano2.5 | refs/heads/master | cadnano/views/pathview/pathrootitem.py | 2 | # -*- coding: utf-8 -*-
from typing import List, Set
from PyQt5.QtCore import (
Qt,
QRectF
)
from PyQt5.QtWidgets import (
QGraphicsRectItem,
QGraphicsItem,
QGraphicsSceneMouseEvent
)
from PyQt5.QtGui import QKeyEvent
from cadnano.objectinstance import ObjectInstance
from cadnano import util
from ... |
klim-iv/phantomjs-qt5 | refs/heads/qt5 | src/webkit/Tools/Scripts/webkitpy/layout_tests/views/buildbot_results.py | 120 | #!/usr/bin/env python
# Copyright (C) 2012 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 ... |
wangjiezhe/FetchNovels | refs/heads/master | novel/sources/ppxhh.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pyquery import PyQuery
from novel import serial, utils, config
BASE_URL = 'http://www.ppxhh.com/{}/'
class Ppxhh(serial.SerialNovel):
def __init__(self, tid):
super().__init__(utils.base_to_url(BASE_URL, tid), '#bfick',
chap_t... |
scottcunningham/ansible | refs/heads/devel | lib/ansible/plugins/callback/timer.py | 141 | import os
import datetime
from datetime import datetime, timedelta
from ansible.plugins.callback import CallbackBase
class CallbackModule(CallbackBase):
"""
This callback module tells you how long your plays ran for.
"""
CALLBACK_VERSION = 2.0
CALLBACK_TYPE = 'aggregate'
CALLBACK_NAME = 'timer... |
leighpauls/k2cro4 | refs/heads/master | tools/gyp/test/variables/filelist/gyptest-filelist.py | 102 | #!/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.
"""
Test variable expansion of '<|(list.txt ...)' syntax commands.
"""
import os
import sys
import TestGyp
test = TestGyp.TestGyp(format=... |
ShawnPengxy/Flask-madeBlog | refs/heads/master | site-packages/flask/testsuite/test_apps/moduleapp/apps/frontend/__init__.py | 628 | from flask import Module, render_template
frontend = Module(__name__)
@frontend.route('/')
def index():
return render_template('frontend/index.html')
|
hazrpg/calibre | refs/heads/master | src/calibre/ebooks/mobi/reader/mobi8.py | 14 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import struct... |
nikhila05/micro-finance | refs/heads/master | microfinance/settings_local.py | 1 | from .settings import *
import dj_database_url
DEBUG = True
INSTALLED_APPS = INSTALLED_APPS + (
'debug_toolbar',
)
SITE_URL = "http://127.0.0.1:8000"
FROM_EMAIL = "admin@example.com"
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
'filters': {
'require_debug_false': {
... |
sestrella/ansible | refs/heads/devel | test/units/modules/network/cumulus/__init__.py | 12133432 | |
indictranstech/internal-frappe | refs/heads/develop | frappe/print/__init__.py | 12133432 | |
hephaestus9/Ironworks | refs/heads/master | lib/weatherfeed/__init__.py | 12133432 | |
huang4fstudio/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_c/migrations/__init__.py | 12133432 | |
h4ck3rm1k3/MapNickAutotools | refs/heads/master | scons/scons-local-1.2.0/SCons/Script/__init__.py | 12 | """SCons.Script
This file implements the main() function used by the scons script.
Architecturally, this *is* the scons script, and will likely only be
called from the external "scons" wrapper. Consequently, anything here
should not be, or be considered, part of the build engine. If it's
something that we expect ot... |
mglukhikh/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/similar.py | 96 | # similar.py - mechanisms for finding similar files
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
import util
import mdiff
import bdiff
def _findexactmat... |
popazerty/bnigma2 | refs/heads/master | lib/python/Plugins/SystemPlugins/Satfinder/plugin.py | 4 | from enigma import eDVBResourceManager,\
eDVBFrontendParametersSatellite, eDVBFrontendParameters
from Screens.Screen import Screen
from Screens.ScanSetup import ScanSetup
from Screens.MessageBox import MessageBox
from Plugins.Plugin import PluginDescriptor
from Components.Label import Label
from Components.Sources.F... |
biboc/RIOT | refs/heads/master | tests/thread_flags/tests/01-run.py | 17 | #!/usr/bin/env python3
import sys
from testrunner import run
def testfunc(child):
child.expect("START")
child.expect_exact("thread(): waiting for 0x1...")
child.expect_exact("main(): setting flag 0x0001")
child.expect_exact("thread(): received flags: 0x0001")
child.expect_exact("thread(): waiting... |
simonpatrick/bite-project | refs/heads/master | deps/mrtaskman/client/package_installer.py | 16 | #!/usr/bin/python
# 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
# di... |
a-doumoulakis/tensorflow | refs/heads/master | tensorflow/python/profiler/model_analyzer.py | 12 | # 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... |
kernel-sanders/arsenic-mobile | refs/heads/master | Dependencies/Twisted-13.0.0/twisted/internet/test/test_win32events.py | 7 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for implementations of L{IReactorWin32Events}.
"""
from thread import get_ident
try:
import win32event
except ImportError:
win32event = None
from zope.interface.verify import verifyObject
from twisted.python.failure import Fa... |
jakub-olczyk/miniVim | refs/heads/master | src/Editor.py | 1 | #!/usr/bin/env python
# coding=utf8
#
# miniVim
# Copyright (c) Jakub Olczyk
# 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 opti... |
mahak/keystone | refs/heads/master | keystone/tests/unit/backend/__init__.py | 12133432 | |
cdriehuys/chmvh-website | refs/heads/master | chmvh_website/resources/tests/__init__.py | 12133432 | |
ctlab/pypipe | refs/heads/master | pypipe-gui/widgets/__init__.py | 12133432 | |
ptisserand/ansible | refs/heads/devel | lib/ansible/modules/cloud/softlayer/__init__.py | 12133432 | |
ketoo/Astron | refs/heads/master | test/database/__init__.py | 12133432 | |
jyotikamboj/container | refs/heads/master | dj-tests/template_tests/templatetags/subpackage/__init__.py | 12133432 | |
maxtorete/frappe | refs/heads/develop | frappe/website/doctype/website_slideshow/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.