repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
Kast0rTr0y/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/openswitch.py | 166 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.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) any late... |
alec-heif/MIT-Thesis | refs/heads/master | spark-bin/examples/src/main/python/mllib/standard_scaler_example.py | 95 | #
# 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... |
Jannes123/django-oscar | refs/heads/master | src/oscar/apps/dashboard/promotions/forms.py | 22 | from django import forms
from django.conf import settings
from django.forms.models import inlineformset_factory
from django.utils.translation import ugettext_lazy as _
from oscar.apps.promotions.conf import PROMOTION_CLASSES
from oscar.core.loading import get_class, get_classes
from oscar.forms.fields import ExtendedU... |
probablytom/tomwallis.net | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/gis/geoip/tests.py | 57 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import os
import unittest
from unittest import skipUnless
from django.conf import settings
from django.contrib.gis.geos import HAS_GEOS
from django.contrib.gis.geoip import HAS_GEOIP
from django.utils import six
if HAS_GEOIP:
from . import GeoIP, G... |
nhippenmeyer/django | refs/heads/master | tests/template_tests/filter_tests/test_timeuntil.py | 207 | from __future__ import unicode_literals
from datetime import datetime, timedelta
from django.template.defaultfilters import timeuntil_filter
from django.test import SimpleTestCase
from django.test.utils import requires_tz_support
from ..utils import setup
from .timezone_utils import TimezoneTestCase
class Timeunti... |
Slezhuk/ansible | refs/heads/devel | lib/ansible/utils/module_docs_fragments/ios.py | 101 | #
# (c) 2015, Peter Sprygada <psprygada@ansible.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) any late... |
ktnyt/chainer | refs/heads/master | chainer/functions/math/fft.py | 2 | from chainer import backend
from chainer import function_node
from chainer.utils import type_check
class FFT(function_node.FunctionNode):
"""Fast Fourier transform."""
def __init__(self, method):
self._method = method
def check_type_forward(self, in_types):
type_check._argname(in_types,... |
midma101/AndIWasJustGoingToBed | refs/heads/master | .venv/lib/python2.7/site-packages/pip/commands/install.py | 187 | from __future__ import absolute_import
import logging
import operator
import os
import tempfile
import shutil
import warnings
try:
import wheel
except ImportError:
wheel = None
from pip.req import RequirementSet
from pip.basecommand import RequirementCommand
from pip.locations import virtualenv_no_global, dis... |
brian-l/django-1.4.10 | refs/heads/master | tests/regressiontests/csrf_tests/tests.py | 10 | # -*- coding: utf-8 -*-
from __future__ import with_statement
from django.conf import settings
from django.core.context_processors import csrf
from django.http import HttpRequest, HttpResponse
from django.middleware.csrf import CsrfViewMiddleware, CSRF_KEY_LENGTH
from django.template import RequestContext, Template
fr... |
hassoon3/odoo | refs/heads/8.0 | addons/l10n_es/migrations/8.0.5.0/pre-migration.py | 52 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 Serv. Tecnol. Avanz. (<http://www.serviciosbaeza.com>)
# Pedro M. Baeza <pedro.baeza@serviciosbaeza.com>
# ... |
spock1104/vm696-kernel | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 886 | # Util.py - Python extension for perf trace, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
NSECS_PER_SEC = 1000000000
de... |
DavidMikeSimon/ansible | refs/heads/devel | lib/ansible/vars/__init__.py | 31 | # (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... |
rd37/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/flavors/extras/tests.py | 8 | # 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
# distributed under t... |
byndcivilization/toy-infrastructure | refs/heads/master | flask-app/venv/lib/python3.6/site-packages/pip/_vendor/requests/packages/chardet/eucjpprober.py | 2918 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
hamzehd/edx-platform | refs/heads/master | lms/djangoapps/licenses/__init__.py | 12133432 | |
guykr-stratoscale/powerline-shell | refs/heads/master | segments/ssh.py | 22 | import os
def add_ssh_segment():
if os.getenv('SSH_CLIENT'):
powerline.append(' %s ' % powerline.network, Color.SSH_FG, Color.SSH_BG)
add_ssh_segment()
|
almarklein/flexx | refs/heads/master | flexx/pyscript/functions.py | 21 | import os
import sys
import types
import inspect
import subprocess
import hashlib
from . import Parser
if sys.version_info[0] >= 3:
string_types = str,
text_type = str
else: # pragma: no cover
string_types = basestring,
text_type = unicode
class JSString(text_type):
""" A subclass of string, so... |
Santinell/ansible-modules-core | refs/heads/devel | cloud/amazon/ec2_asg.py | 33 | #!/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... |
AurelienRoy/ardupilot | refs/heads/master | Tools/autotest/pysim/testwind.py | 246 | #!/usr/bin/env python
# simple test of wind generation code
import util, time, random
from rotmat import Vector3
wind = util.Wind('7,90,0.1')
t0 = time.time()
velocity = Vector3(0,0,0)
t = 0
deltat = 0.01
while t < 60:
print("%.4f %f" % (t, wind.drag(velocity, deltat=deltat).length()))
t += deltat
|
darjeeling/django | refs/heads/master | tests/migrations/test_migrations_squashed_ref_squashed/app1/4_auto.py | 133 | from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("app1", "2_squashed_3")]
|
ivh/VAMDC-VALD | refs/heads/master | nodes/starkb/node/admin.py | 59 | from django.contrib import admin
#import your models here like this:
#from DjNodeExample.node.models import *
# add your models here to have them in the admin interface
# for example if you have a model class called "Transition":
#admin.site.register(Transition)
|
dya2/python-for-android | refs/heads/master | python3-alpha/extra_modules/pyxmpp2/simple.py | 46 | #
# (C) Copyright 2005-2011 Jacek Konieczny <jajcus@jajcus.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be u... |
apavlo/h-store | refs/heads/master | graphs/draw.py | 4 | #!/usr/bin/env python
import sys
import matplotlib.pyplot as plt
import numpy as np
def time_pred(in_path,out_path):
fig = plt.figure()
fig.set_size_inches(8,4.8)
ax = fig.add_subplot(111)
res1 = []
res2 =[]
res3 = []
res4 = []
for line in open(in_path):
fields = line.rstrip().s... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/Django/tests/modeltests/raw_query/__init__.py | 12133432 | |
olympian94/gstudio | refs/heads/mongokit | gnowsys-ndf/gnowsys_ndf/mobwrite/migrations/__init__.py | 12133432 | |
houzhenggang/hiwifi-openwrt-HC5661-HC5761 | refs/heads/master | staging_dir/target-mipsel_r2_uClibc-0.9.33.2/usr/lib/python2.7/lib-tk/test/test_tkinter/__init__.py | 12133432 | |
Rucknar/rancher | refs/heads/master | tests/server/ranchertests/__init__.py | 12133432 | |
Duke-NSOE/GeoHAT | refs/heads/master | GeoHat_V10/Scripts/networkx/generators/intersection.py | 44 | # -*- coding: utf-8 -*-
"""
Generators for random intersection graphs.
"""
# Copyright (C) 2011 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import random
import networkx as nx
__author__ = "\n".join(['Ar... |
rht/zulip | refs/heads/master | zerver/webhooks/reviewboard/tests.py | 3 | # -*- coding: utf-8 -*-
from zerver.lib.test_classes import WebhookTestCase
class ReviewBoardHookTests(WebhookTestCase):
STREAM_NAME = 'reviewboard'
URL_TEMPLATE = '/api/v1/external/reviewboard?&api_key={api_key}&stream={stream}'
FIXTURE_DIR_NAME = 'reviewboard'
def test_review_request_published(self... |
InfiniaPress/Passenger-Pigeon | refs/heads/master | assets/bower_components/bower_components/forge/tests/forge_ssl/forge/__init__.py | 12133432 | |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/keyvault/azure-keyvault-certificates/azure/keyvault/certificates/_generated/v7_2/aio/__init__.py | 17 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
darkleons/lama | refs/heads/master | addons/mrp/tests/test_multicompany.py | 374 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (c) 2012-TODAY OpenERP S.A. <http://openerp.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of ... |
LigninTools/Ligpy-Cantera | refs/heads/master | Ligscipy/gen_ODE_scipy.py | 1 | #!/usr/bin/pythons
# -*- coding: utf-8 -*-
import sciligpy_utils as lig
import constants as const
def heating(species_IC='Pseudotsuga_menziesii', heating_rate=2.7, T0=25, Tmax=500):
reactionlist, rateconstantlist, compositionlist, module_dir = lig.set_paths()
y_list = lig.get_specieslist(reactionlist)
sp... |
michalliu/OpenWrt-Firefly-Libraries | refs/heads/master | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/_threading_local.py | 923 | """Thread-local objects.
(Note that this module provides a Python version of the threading.local
class. Depending on the version of Python you're using, there may be a
faster one available. You should always import the `local` class from
`threading`.)
Thread-local objects support the management of thread-local d... |
CityGrid/arsenal | refs/heads/master | server/arsenalweb/views/user.py | 1 | '''Arsenal user UI.'''
# Copyright 2015 CityGrid Media, LLC
#
# 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... |
darjeeling/django | refs/heads/master | tests/delete_regress/models.py | 325 | from django.contrib.contenttypes.fields import (
GenericForeignKey, GenericRelation,
)
from django.contrib.contenttypes.models import ContentType
from django.db import models
class Award(models.Model):
name = models.CharField(max_length=25)
object_id = models.PositiveIntegerField()
content_type = mode... |
jsvelasquezv/agroind-mobile | refs/heads/master | platforms/browser/www/node_modules/node-gyp/gyp/pylib/gyp/generator/android.py | 960 | # 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.
# Notes:
#
# This generates makefiles suitable for inclusion into the Android build system
# via an Android.mk file. It is based on make.py, the standard makefile
... |
MarcDufresne/SysWatch | refs/heads/master | ServerMonitorClient.py | 1 | from simplejson import dumps as json_dumps
from flask import Flask, Response
from flask.templating import render_template
from system_apis import api
import config
app = Flask(__name__)
DISKS = ()
PROCESSES = ()
@app.route('/')
def home():
cpu_info = api.get_cpu_info()
ram_info = api.get_ram_info()
... |
dulems/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/aggregation/models.py | 114 | # coding: utf-8
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
age = models.IntegerField()
friends = models.ManyToManyField('self', blank=True)
def __str__(self... |
mkschreder/openwrt | refs/heads/master | scripts/flashing/jungo-image.py | 761 | #!/usr/bin/env python
#
# Copyright 2008, 2009 (C) Jose Vasconcellos <jvasco@verizon.net>
#
# A script that can communicate with jungo-based routers
# (such as MI424-WR, USR8200 and WRV54G) to backup the installed
# firmware and replace the boot loader.
#
# Tested with Python 2.5 on Linux and Windows
#
"""Usage: %s [op... |
ryanmt/mitro | refs/heads/master | mitro-core/tools/dog.py | 25 | #!/usr/bin/python
from collections import defaultdict
import argparse
import json
import re
import struct
import sys
import time
import os
POINTER_FILE_SUFFIX = '.pointers'
parser = argparse.ArgumentParser(description='search logs for stuff. Usage: ./dog.py --fields=identity,endpoint /tmp/logfile')
parser.add_argu... |
feliperfranca/FelipeRFranca_site | refs/heads/master | django/contrib/gis/geos/libgeos.py | 154 | """
This module houses the ctypes initialization procedures, as well
as the notice and error handler function callbacks (get called
when an error occurs in GEOS).
This module also houses GEOS Pointer utilities, including
get_pointer_arr(), and GEOM_PTR.
"""
import os, re, sys
from ctypes import c_char_p, Structur... |
denys-duchier/django | refs/heads/master | tests/sessions_tests/tests.py | 16 | import base64
import os
import shutil
import string
import sys
import tempfile
import unittest
from datetime import timedelta
from http import cookies
from django.conf import settings
from django.contrib.sessions.backends.base import UpdateError
from django.contrib.sessions.backends.cache import SessionStore as CacheS... |
aidanlister/django | refs/heads/master | django/middleware/common.py | 145 | import logging
import re
from django import http
from django.conf import settings
from django.core import urlresolvers
from django.core.exceptions import PermissionDenied
from django.core.mail import mail_managers
from django.utils.cache import get_conditional_response, set_response_etag
from django.utils.encoding imp... |
tianzhihen/SublimeJEDI | refs/heads/master | jedi/parser/pgen2/pgen.py | 49 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
# Modifications:
# Copyright 2014 David Halter. Integration into Jedi.
# Modifications are dual-licensed: MIT and PSF.
# Pgen imports
from . import grammar
from jedi.parser import token
from jedi.parse... |
mcardillo55/goxta | refs/heads/master | goxta.py | 1 | """goxta -- realtime technical analysis on mtGox trading"""
from indicators import *
from goxapi import *
import strategy
import numpy as np
import argparse
import time
import math
import sys
import urllib2
import thread
import random
BTCCHARTS_URL = "http://api.bitcoincharts.com/v1/trades.csv?symbol=mtgoxUSD"
class... |
vnsofthe/odoo-dev | refs/heads/master | addons/payment_paypal/models/__init__.py | 419 | # -*- coding: utf-8 -*-
import paypal
import res_company
|
ForgottenKahz/CloudOPC | refs/heads/master | venv/Lib/site-packages/pip/_vendor/pkg_resources/__init__.py | 80 | """
Package resource API
--------------------
A resource is a logical file contained within a package, or a logical
subdirectory thereof. The package resource API expects resource names
to have their path parts separated with ``/``, *not* whatever the local
path separator is. Do not use os.path operations to manipul... |
rbramwell/pulp | refs/heads/master | server/pulp/server/webservices/views/serializers/dispatch.py | 14 | from pulp.server.webservices.views.serializers.link import link_obj
def task_result_href(task):
if task.get('task_id'):
return {'_href': '/pulp/api/v2/tasks/%s/' % task['task_id']}
return {}
def spawned_tasks(task):
"""
For a given Task dictionary convert the spawned tasks list of ids to
... |
kuojo/NocMonkey | refs/heads/master | monkey-stable.py | 2 | #!/usr/bin/python
import os
import os.path
import sys
from PyQt4 import QtGui, QtCore
#Initalize Stuff
clear = lambda: os.system('cls')
class Acknowledgements(object):
def __init__(self,flatfile):
self.flatfile = str(flatfile)
self.initilize(self.flatfile)
sel... |
SnabbCo/snabbswitch | refs/heads/master | src/program/lwaftr/tests/data/add-dot1q.py | 14 | #! /usr/bin/env python2
import sys
from scapy.all import rdpcap, wrpcap, NoPayload, Ether, Dot1Q
if len(sys.argv) not in (3, 4):
raise SystemExit("Usage: " + sys.argv[0]
+ " input.pcap output.pcap [vlan-id]")
VLAN_ID = 42
if len(sys.argv) == 4:
try:
VLAN_ID = int(sys.argv[3])
except:
... |
umrashrf/scrapy | refs/heads/master | tests/test_utils_spider.py | 147 | import unittest
from scrapy.http import Request
from scrapy.item import BaseItem
from scrapy.utils.spider import iterate_spider_output, iter_spider_classes
from scrapy.spiders import CrawlSpider
class MyBaseSpider(CrawlSpider):
pass # abstract spider
class MySpider1(MyBaseSpider):
name = 'myspider1'
class ... |
fillycheezstake/MissionPlanner | refs/heads/master | Lib/distutils/command/__init__.py | 59 | """distutils.command
Package containing implementation of all the standard Distutils
commands."""
__revision__ = "$Id$"
__all__ = ['build',
'build_py',
'build_ext',
'build_clib',
'build_scripts',
'clean',
'install',
'install_l... |
rest-of/the-deck | refs/heads/master | lambda/lib/python2.7/site-packages/wheel/pkginfo.py | 565 | """Tools for reading and writing PKG-INFO / METADATA without caring
about the encoding."""
from email.parser import Parser
try:
unicode
_PY3 = False
except NameError:
_PY3 = True
if not _PY3:
from email.generator import Generator
def read_pkg_info_bytes(bytestr):
return Parser().pars... |
kenorb-contrib/BitTorrent | refs/heads/master | twisted/plugins/twisted_telnet.py | 20 | # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
# See LICENSE for details.
from twisted.scripts.mktap import _tapHelper
TwistedTelnet = _tapHelper(
"Twisted Telnet Shell Server",
"twisted.tap.telnet",
"A simple, telnet-based remote debugging service.",
"telnet")
|
apparena/docs | refs/heads/master | readthedocs/projects/views/__init__.py | 12133432 | |
zanderle/django | refs/heads/master | django/conf/locale/el/__init__.py | 12133432 | |
bnprk/django-oscar | refs/heads/master | sites/demo/apps/__init__.py | 12133432 | |
wong2/sentry | refs/heads/master | tests/sentry/web/__init__.py | 12133432 | |
mujiansu/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/third_party/python_26/Lib/site-packages/win32/scripts/ce/pysynch.py | 38 | # Simple CE synchronisation utility with Python features.
import wincerapi
import win32api
import win32file
import getopt
import sys
import os
import string
import win32con
import fnmatch
class InvalidUsage(Exception): pass
def print_error(api_exc, msg):
hr, fn, errmsg = api_exc
print "%s - %s(%d)" % (msg, e... |
CYBAI/servo | refs/heads/master | tests/wpt/web-platform-tests/css/css-fonts/support/fonts/makegsubfonts.py | 30 | from __future__ import print_function
import os
import textwrap
from xml.etree import ElementTree
from fontTools.ttLib import TTFont, newTable
from fontTools.misc.psCharStrings import T2CharString
from fontTools.ttLib.tables.otTables import GSUB,\
ScriptList, ScriptRecord, Script, DefaultLangSys,\
FeatureList,... |
djgagne/scikit-learn | refs/heads/master | sklearn/metrics/cluster/__init__.py | 312 | """
The :mod:`sklearn.metrics.cluster` submodule contains evaluation metrics for
cluster analysis results. There are two forms of evaluation:
- supervised, which uses a ground truth class values for each sample.
- unsupervised, which does not and measures the 'quality' of the model itself.
"""
from .supervised import ... |
gadomski/cpd | refs/heads/master | vendor/googletest-release-1.10.0/googletest/test/gtest_json_test_utils.py | 134 | # Copyright 2018, 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... |
suncycheng/intellij-community | refs/heads/master | python/testData/completion/heavyStarPropagation/lib/_pkg1/_pkg1_0/_pkg1_0_0/_pkg1_0_0_1/_pkg1_0_0_1_0/_mod1_0_0_1_0_0.py | 30 | name1_0_0_1_0_0_0 = None
name1_0_0_1_0_0_1 = None
name1_0_0_1_0_0_2 = None
name1_0_0_1_0_0_3 = None
name1_0_0_1_0_0_4 = None |
orezpraw/unnaturalcode | refs/heads/master | unnaturalcode/testdata/makehuman/makehuman/shared/progress.py | 2 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
"""
Definition of Progress class.
**Project Name:** MakeHuman
**Product Home Page:** http://www.makehuman.org/
**Code Home Page:** https://bitbucket.org/MakeHuman/makehuman/
**Authors:** Thanasis Papoutsidakis
**Copyright(c):** MakeHuman Team 200... |
j-greffe/mbed-os | refs/heads/master | tools/export/e2studio/__init__.py | 23 | """
mbed SDK
Copyright (c) 2011-2016 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in wr... |
david4096/ga4gh-server | refs/heads/master | ga4gh/server/cli/configtest.py | 4 | """
configtest cli
"""
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import unittest
import ga4gh.server.cli as cli
import ga4gh.server.configtest as configtest
import ga4gh.common.cli as common_cli
class SimplerResult(unittest.TestResu... |
vincent99/cattle | refs/heads/master | tests/integration-v1/cattletest/core/test_healthcheck.py | 1 | from common import * # NOQA
from cattle import ApiError
import yaml
def _get_agent_for_container(context, container):
agent = None
for map in container.hosts()[0].instanceHostMaps():
try:
c = map.instance()
except Exception:
continue
if c.agentId is not None:
... |
yingzha/blocks-examples | refs/heads/master | parity_problem/__init__.py | 6 | from __future__ import print_function
import random
import numpy as np
import theano
import theano.tensor as T
from fuel.streams import DataStream
from fuel.datasets import IterableDataset
from blocks.bricks import Linear, Logistic
from blocks.bricks.recurrent import LSTM
from blocks.bricks.cost import BinaryCrossEn... |
chrisidefix/devide | refs/heads/master | modules/vtk_basic/vtkGenericGlyph3DFilter.py | 7 | # class generated by DeVIDE::createDeVIDEModuleFromVTKObject
from module_kits.vtk_kit.mixins import SimpleVTKClassModuleBase
import vtk
class vtkGenericGlyph3DFilter(SimpleVTKClassModuleBase):
def __init__(self, module_manager):
SimpleVTKClassModuleBase.__init__(
self, module_manager,
... |
llonchj/sentry | refs/heads/master | src/sentry/utils/cursors.py | 29 | """
sentry.utils.cursors
~~~~~~~~~~~~~~~~~~~~
: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 collections import Sequence
class Cursor(object):
def __init__(self, value, offset=0, is_prev=Fal... |
WadeBarnes/TheOrgBook | refs/heads/master | tob-api/api_indy/indy/__init__.py | 12133432 | |
sadaf2605/django | refs/heads/master | tests/i18n/other/__init__.py | 12133432 | |
Prashant-Surya/addons-server | refs/heads/master | src/olympia/files/tests/test_models.py | 1 | # -*- coding: utf-8 -*-
import hashlib
import json
import os
import shutil
import tempfile
import zipfile
from datetime import datetime
from django import forms
from django.core.files.storage import default_storage as storage
from django.conf import settings
from django.test.utils import override_settings
import mock... |
PRIMEDesigner15/PRIMEDesigner15 | refs/heads/master | dependencies/Lib/fnmatch.py | 894 | """Filename matching with shell patterns.
fnmatch(FILENAME, PATTERN) matches according to the local convention.
fnmatchcase(FILENAME, PATTERN) always takes case in account.
The functions operate by translating the pattern into a regular
expression. They cache the compiled regular expressions for speed.
The function... |
yhpeng-git/mxnet | refs/heads/master | example/bi-lstm-sort/rnn_model.py | 15 | # pylint: disable=C0111,too-many-arguments,too-many-instance-attributes,too-many-locals,redefined-outer-name,fixme
# pylint: disable=superfluous-parens, no-member, invalid-name
import sys
sys.path.insert(0, "../../python")
import numpy as np
import mxnet as mx
from lstm import LSTMState, LSTMParam, lstm, bi_lstm_infer... |
dxq-git/zulip | refs/heads/master | zproject/local_settings_template.py | 42 | # Settings for Zulip Voyager
### MANDATORY SETTINGS
#
# These settings MUST be set in production. In a development environment,
# sensible default values will be used.
# The user-accessible Zulip hostname for this installation, e.g.
# zulip.example.com
EXTERNAL_HOST = 'zulip.example.com'
# The email address for the ... |
jlmadurga/django-oscar | refs/heads/master | src/oscar/apps/catalogue/migrations/0001_initial.py | 57 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import oscar.models.fields.autoslugfield
import django.db.models.deletion
import django.core.validators
import oscar.models.fields
class Migration(migrations.Migration):
dependencies = [
('contenttyp... |
ibm-watson-iot/device-kodi | refs/heads/master | service.iotf/lib/requests/packages/urllib3/contrib/pyopenssl.py | 488 | '''SSL with SNI_-support for Python 2. Follow these instructions if you would
like to verify SSL certificates in Python 2. Note, the default libraries do
*not* do certificate checking; you need to do additional work to validate
certificates yourself.
This needs the following packages installed:
* pyOpenSSL (tested wi... |
bcl/pykickstart | refs/heads/master | pykickstart/handlers/f10.py | 3 | #
# Chris Lumens <clumens@redhat.com>
#
# Copyright 2008 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use, modify,
# copy, or redistribute it subject to the terms and conditions of the GNU
# General Public License v.2. This program is distributed in the hope that it
# will be usef... |
google-research/google-research | refs/heads/master | neural_guided_symbolic_regression/mcts/policies.py | 1 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
rrooij/youtube-dl | refs/heads/master | youtube_dl/extractor/xminus.py | 87 | # coding: utf-8
from __future__ import unicode_literals
import re
import time
from .common import InfoExtractor
from ..compat import (
compat_ord,
)
from ..utils import (
int_or_none,
parse_duration,
)
class XMinusIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?x-minus\.org/track/(?P<id>[0-9]+)... |
gmr/email-normalize | refs/heads/master | tests/test_normalizer.py | 1 | import asyncio
import functools
import logging
import operator
import os
import time
import unittest
import uuid
import aiodns
from asynctest import mock
import email_normalize
LOGGER = logging.getLogger(__name__)
def async_test(*func):
if func:
@functools.wraps(func[0])
def wrapper(*args, **kw... |
varunkumta/azure-linux-extensions | refs/heads/master | Common/libpsutil/py2.6-glibc-2.12-pre/psutil/_pssunos.py | 37 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Sun OS Solaris platform implementation."""
import errno
import os
import socket
import subprocess
import sys
from collections im... |
brychanrobot/orrt-star-cpp | refs/heads/master | scripts/plot_online_rewiring.py | 1 | from operator import itemgetter
import json
import numpy as np
import matplotlib.pyplot as plt
j = json.load(open('scripts/onlineRewiring.json', 'r'))
for spot in j:
results = spot['results']
radius = spot['radius']
plt.plot([result['time'] for result in results], [result['entropy'] for result in results], label='... |
open-synergy/partner-contact | refs/heads/8.0 | partner_phone_extension/models/__init__.py | 2 | # -*- coding: utf-8 -*-
# Copyright 2013-2014 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
# Copyright 2017 Eficent Business and IT Consulting Services S.L.
# (http://www.eficent.com)
# Copyright 2017 Serpent Consulting Services Pvt. Ltd.
# (<http://www.serpentcs.com>)
# License AGPL-3.0 or later (ht... |
andybak/ansible-modules-extras | refs/heads/devel | cloud/webfaction/__init__.py | 12133432 | |
mcsosa121/cafa | refs/heads/master | cafaenv/lib/python2.7/site-packages/django/middleware/__init__.py | 12133432 | |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_11_01/_container_service_client.py | 1 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... |
ChenJunor/hue | refs/heads/master | desktop/core/ext-py/boto-2.38.0/boto/ec2containerservice/layer1.py | 135 | # Copyright (c) 2015 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 ... |
ecogroup/p2pool-ecocoin | refs/heads/master | wstools/XMLSchema.py | 289 | # Copyright (c) 2003, The Regents of the University of California,
# through Lawrence Berkeley National Laboratory (subject to receipt of
# any required approvals from the U.S. Dept. of Energy). All rights
# reserved.
#
# Copyright (c) 2001 Zope Corporation and Contributors. All Rights Reserved.
#
# This software is ... |
jlopezmalla/spark | refs/heads/master | examples/src/main/python/mllib/tf_idf_example.py | 126 | #
# 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... |
mvidalgarcia/indico | refs/heads/master | indico/modules/events/contributions/lists.py | 2 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from collections import OrderedDict
from datetime import timedelt... |
shingonoide/odoo | refs/heads/deverp_8.0 | addons/website_hr/controllers/__init__.py | 7372 | import main
|
Buggaarde/youtube-dl | refs/heads/master | youtube_dl/extractor/tunein.py | 120 | # coding: utf-8
from __future__ import unicode_literals
import json
import re
from .common import InfoExtractor
from ..utils import ExtractorError
class TuneInIE(InfoExtractor):
_VALID_URL = r'''(?x)https?://(?:www\.)?
(?:
tunein\.com/
(?:
radio/.*?-s|
station/.*?Stat... |
chirilo/remo | refs/heads/master | remo/reports/tests/__init__.py | 3 | import datetime
from random import randint
from django.db.models.signals import post_save
from django.utils.timezone import now
import factory
from factory import fuzzy
from remo.profiles.models import FunctionalArea
from remo.profiles.tests import UserFactory
from remo.reports.models import (Activity, Campaign, NGR... |
cloudera/recordservice | refs/heads/master | thirdparty/thrift-0.9.0/contrib/zeromq/TZmqServer.py | 108 | #
# 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... |
synergeticsedx/deployment-wipro | refs/heads/oxa/master.fic | common/djangoapps/xblock_django/migrations/0002_auto_20160204_0809.py | 60 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('xblock_django', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='xblockdisableconfig',
... |
jerli/sympy | refs/heads/master | sympy/combinatorics/tests/test_group_constructs.py | 129 | from sympy.combinatorics.group_constructs import DirectProduct
from sympy.combinatorics.named_groups import CyclicGroup, DihedralGroup
def test_direct_product_n():
C = CyclicGroup(4)
D = DihedralGroup(4)
G = DirectProduct(C, C, C)
assert G.order() == 64
assert G.degree == 12
assert len(G.orbit... |
grundgruen/zipline | refs/heads/master | zipline/gens/composites.py | 43 | #
# Copyright 2013 Quantopian, 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 wr... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.