repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
interfect/cjdns | refs/heads/master | node_build/dependencies/libuv/build/gyp/pylib/gyp/generator/__init__.py | 12133432 | |
Jorge-Rodriguez/ansible | refs/heads/devel | test/units/modules/network/netvisor/test_pn_vrouter_bgp_network.py | 9 | # Copyright: (c) 2018, Pluribus Networks
# 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
import json
from units.compat.mock import patch
from ansible.modules.network.netvisor import pn... |
anentropic/django-director | refs/heads/master | director/signals.py | 1 | import django.dispatch
"""
Use the job function you're executing as the `sender`
(though we don't use it currently)
"""
new_artefact = django.dispatch.Signal(providing_args=['file', 'name'])
|
boompieman/iim_project | refs/heads/master | project_python2/lib/python2.7/site-packages/tornado/queues.py | 78 | # Copyright 2015 The Tornado 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 applicable law or agreed to in w... |
plish/Trolly | refs/heads/master | trolly/exceptions.py | 2 |
class ResourceUnavailable(Exception):
'''
Exception representing a failed request to a resource
'''
def __init__(self, message, http_response):
super(ResourceUnavailable, self).__init__()
self.message = message
self.status = http_response.status
def __str__(self):
... |
ahmadassaf/zulip | refs/heads/master | zerver/migrations/0022_subscription_pin_to_top.py | 41 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('zerver', '0021_migrate_attachment_data'),
]
operations = [
migrations.AddField(
model_name='subscription',
... |
dfang/odoo | refs/heads/10.0 | odoo/tools/graph.py | 71 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import operator
import math
class graph(object):
def __init__(self, nodes, transitions, no_ancester=None):
"""Initialize graph's object
@param nodes list of ids of nodes in the... |
KrzysztofStachanczyk/Sensors-WWW-website | refs/heads/master | www/env/lib/python2.7/site-packages/django/contrib/gis/geoip/libgeoip.py | 479 | import os
from ctypes import CDLL
from ctypes.util import find_library
from django.conf import settings
# Creating the settings dictionary with any settings, if needed.
GEOIP_SETTINGS = {key: getattr(settings, key)
for key in ('GEOIP_PATH', 'GEOIP_LIBRARY_PATH', 'GEOIP_COUNTRY', 'GEOIP_CITY')
... |
saurabh6790/test-erp | refs/heads/develop | erpnext/hr/doctype/leave_allocation/leave_allocation.py | 43 | # 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
from frappe.utils import cint, flt
from frappe import _
from frappe.model.document import Document
from erpnext.hr.utils import set_employ... |
StephenWeber/ansible | refs/heads/devel | lib/ansible/modules/system/gluster_volume.py | 11 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2014, Taneli Leppä <taneli@crasman.fi>
#
# This file is part of Ansible (sort of)
#
# 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 o... |
lewiskan/heron | refs/heads/master | heron/instance/tests/python/network/st_stmgr_client_unittest.py | 10 | # Copyright 2016 Twitter. 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 agree... |
ajgorgas/uip-pc3 | refs/heads/master | semana5/clase5.py | 3 | # CLASE 5
# Autor: Abdel G. Martinez L.
#
# Instrucciones: Dada una lista de numeros positivos, retornar el numero mas grande de la lista
def find_max(L):
max = 0
for x in L:
if x > max:
max = x
return max
if __name__ == '__main__':
L = (17, 20, 29, 16)
result = find_max(L)
... |
spencerparkin/AlgebraSystem | refs/heads/master | MathAlgEvaluate.py | 1 | # MathAlgEvaluate.py
from MathAlgorithm import MathAlgorithm
class MathAlgEvaluate(MathAlgorithm):
def __init__(self):
super().__init__()
def Manipulate(self, math_object):
pass
# Evaluate functions here, such as inverse, reverse, sine, cosine, etc. |
frreiss/tensorflow-fred | refs/heads/master | tensorflow/python/keras/layers/preprocessing/benchmarks/category_crossing_benchmark.py | 4 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
schoolie/bokeh | refs/heads/master | sphinx/source/docs/user_guide/examples/charts_boxplot_box_color.py | 8 | from bokeh.charts import BoxPlot, output_file, show
from bokeh.sampledata.autompg import autompg as df
p = BoxPlot(df, values='mpg', label='cyl', color='#00cccc',
title="MPG Summary (grouped by CYL)")
output_file("boxplot.html")
show(p)
|
dsajkl/reqiop | refs/heads/master | common/djangoapps/track/tracker.py | 239 | """
Module that tracks analytics events by sending them to different
configurable backends.
The backends can be configured using Django settings as the example
below::
TRACKING_BACKENDS = {
'tracker_name': {
'ENGINE': 'class.name.for.backend',
'OPTIONS': {
'host': ... ,
... |
ramisetti/lammps | refs/heads/master | tools/i-pi/ipi/inputs/ensembles.py | 41 | """Deals with creating the ensembles class.
Copyright (C) 2013, Joshua More and Michele Ceriotti
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) ... |
sidzan/netforce | refs/heads/master | netforce_mfg/setup.py | 4 | #!/usr/bin/env python3
# Copyright (c) 2012-2015 Netforce Co. Ltd.
#
# 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, co... |
ol-loginov/intellij-community | refs/heads/master | python/testData/inspections/PyUnresolvedReferencesInspection/dunderPackage.py | 83 | __package__ #pass |
zchking/odoo | refs/heads/8.0 | addons/account/wizard/account_reconcile.py | 226 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... |
siosio/intellij-community | refs/heads/master | python/testData/mover/simpleBlankLines.py | 83 | if a:
a = 1
b =<caret> 2
c = 3 |
ict-felix/stack | refs/heads/master | vt_manager/src/python/vt_manager/models/Ip4Range.py | 3 | from django.db import models
from django.contrib import auth
from threading import Lock
import inspect
from vt_manager.utils.IP4Utils import IP4Utils
from vt_manager.utils.MutexStore import MutexStore
from vt_manager.models.Ip4Slot import Ip4Slot
'''
@author: msune
'''
class Ip4Range(models.Model):
"""Ip4Range"... |
zhongzw/skia-sdl | refs/heads/master | third_party/externals/gyp/test/win/gyptest-link-warnings-as-errors.py | 239 | #!/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.
"""
Make sure linker warnings-as-errors setting is extracted properly.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test =... |
ishank08/scikit-learn | refs/heads/master | examples/neighbors/plot_approximate_nearest_neighbors_hyperparameters.py | 102 | """
=================================================
Hyper-parameters of Approximate Nearest Neighbors
=================================================
This example demonstrates the behaviour of the
accuracy of the nearest neighbor queries of Locality Sensitive Hashing
Forest as the number of candidates and the numb... |
plotly/plotly.py | refs/heads/master | packages/python/plotly/plotly/graph_objs/splom/marker/colorbar/title/_font.py | 2 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class Font(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "splom.marker.colorbar.title"
_path_str = "splom.marker.colorbar.title.font"
_valid_props = {"c... |
0x46616c6b/ansible-modules-core | refs/heads/devel | database/__init__.py | 12133432 | |
prymatex/SublimeCodeIntel | refs/heads/master | arch/_linux_libcpp6_x86_py33/__init__.py | 12133432 | |
alexshin/django-guardian | refs/heads/devel | example_project/integration_tests/models.py | 12133432 | |
tsoporan/tehorng | refs/heads/master | reporting/__init__.py | 12133432 | |
moreati/django | refs/heads/master | django/template/loaders/__init__.py | 12133432 | |
cecep-edu/edx-platform | refs/heads/eucalyptus.2 | openedx/core/djangoapps/credentials/tests/__init__.py | 12133432 | |
SCSSG/Odoo-SCS | refs/heads/master | addons/website/__openerp__.py | 311 | {
'name': 'Website Builder',
'category': 'Website',
'summary': 'Build Your Enterprise Website',
'website': 'https://www.odoo.com/page/website-builder',
'version': '1.0',
'description': """
OpenERP Website CMS
===================
""",
'author': 'OpenERP SA',
'depends': ['web', 's... |
hernandito/SickRage | refs/heads/master | lib/hachoir_parser/program/prc.py | 86 | """
PRC (Palm resource) parser.
Author: Sebastien Ponce
Creation date: 29 october 2008
"""
from hachoir_parser import Parser
from hachoir_core.field import (FieldSet,
UInt16, UInt32, TimestampMac32,
String, RawBytes)
from hachoir_core.endian import BIG_ENDIAN
class PRCHeader(FieldSet):
static_size = 78*8... |
akionux/OpenFOAM-2.3.x | refs/heads/master | tutorials/multiphase/stirringInterPTFoam/laminar/stirringCulture/genKinematicCloudPositions.py | 1 | #!/usr/bin/env python
# create parcel injections
# http://www.geocities.co.jp/SiliconValley-SantaClara/1183/study/OpenFOAM/injection.html
from random import random
# input start
minx = 0
maxx = 0.032
miny = 0.0
maxy = 0.020
minz = 0
maxz = 0.017
nx = 32
ny = 20
nz = 17
turbdx = 3.2e-5
turbdy = 2.0e-5
turbdz = 1.7e... |
liavkoren/djangoDev | refs/heads/master | tests/admin_inlines/tests.py | 3 | from __future__ import unicode_literals
from django.contrib.admin.tests import AdminSeleniumWebDriverTestCase
from django.contrib.admin.helpers import InlineAdminForm
from django.contrib.auth.models import User, Permission
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase, ove... |
jdemon519/cfme_tests | refs/heads/master | cfme/tests/openstack/infrastructure/test_host_power_control.py | 1 | import pytest
from navmazing import NavigationDestinationNotFound
from cfme.infrastructure.host import Host
from cfme.infrastructure.provider.openstack_infra import OpenstackInfraProvider
from cfme.web_ui import Quadicon
from utils import testgen
from utils.appliance.implementations.ui import navigate_to
from utils.ve... |
gmr/httpbl | refs/heads/master | httpbl.py | 1 | """
Project Honeypot Http:BL API Client
Example:
.. code:: python
import httpbl
ip_address = '127.10.20.5'
print 'Querying {}'.format(ip_address)
bl = httpbl.HttpBL('my-key')
print(bl.query(ip_address))
"""
import socket
__version__ = '1.0.1'
DNSBL_SUFFIX = 'dnsbl.httpbl.org.'
# Visitor Typ... |
kazemakase/scikit-learn | refs/heads/master | sklearn/tests/test_kernel_approximation.py | 244 | import numpy as np
from scipy.sparse import csr_matrix
from sklearn.utils.testing import assert_array_equal, assert_equal, assert_true
from sklearn.utils.testing import assert_not_equal
from sklearn.utils.testing import assert_array_almost_equal, assert_raises
from sklearn.utils.testing import assert_less_equal
from ... |
ChinaMassClouds/copenstack-server | refs/heads/master | openstack/src/horizon-2014.2/openstack_dashboard/dashboards/project/data_processing/data_image_registry/tables.py | 10 | # 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 the... |
mic4ael/indico | refs/heads/master | indico/migrations/versions/20180126_1130_093533d27a96_add_visibility_options_to_contribution.py | 7 | """Add visibility options to contribution fields
Revision ID: 093533d27a96
Revises: 9c4418d7a6aa
Create Date: 2017-11-30 17:15:07.141552
"""
import sqlalchemy as sa
from alembic import op
from indico.core.db.sqlalchemy import PyIntEnum
from indico.modules.events.contributions.models.fields import ContributionFieldVi... |
onestarshang/flask_super_config | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/sanitizer.py | 1734 | from __future__ import absolute_import, division, unicode_literals
from . import _base
from ..sanitizer import HTMLSanitizerMixin
class Filter(_base.Filter, HTMLSanitizerMixin):
def __iter__(self):
for token in _base.Filter.__iter__(self):
token = self.sanitize_token(token)
if tok... |
Azure/azure-sdk-for-python | refs/heads/sync-eng/common-js-nightly-docs-2-1768-ForTestPipeline | sdk/hdinsight/azure-mgmt-hdinsight/azure/mgmt/hdinsight/_version.py | 6 | # 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 ... |
Dunkas12/BeepBoopBot | refs/heads/master | lib/requests/packages/chardet/chardistribution.py | 2754 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client 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 R... |
infowantstobeseen/pyglet-darwincore | refs/heads/master | tests/font/ALIGN_MULTILINE.py | 19 | #!/usr/bin/env python
'''Test that font.Text alignment works with multiple lines.
Three labels will be rendered at the top-left, center and bottom-right of the
window. Resize the window to ensure the alignment is as specified.
'''
__docformat__ = 'restructuredtext'
__version__ = '$Id: $'
import unittest
from pygl... |
shikil/sympy | refs/heads/master | sympy/core/tests/test_equal.py | 111 | from sympy import Symbol, Dummy, Rational, exp
def test_equal():
b = Symbol("b")
a = Symbol("a")
e1 = a + b
e2 = 2*a*b
e3 = a**3*b**2
e4 = a*b + b*a
assert not e1 == e2
assert not e1 == e2
assert e1 != e2
assert e2 == e4
assert e2 != e3
assert not e2 == e3
x = Symb... |
JasonBristol/spor-ct | refs/heads/master | spor/investigations/__init__.py | 12133432 | |
Mixser/django | refs/heads/master | tests/migrations/test_migrations_first/__init__.py | 12133432 | |
wong2/sentry | refs/heads/master | tests/sentry/interfaces/test_base.py | 12133432 | |
FokkeZB/titanium_mobile | refs/heads/master | support/common/markdown/inlinepatterns.py | 107 | """
INLINE PATTERNS
=============================================================================
Inline patterns such as *emphasis* are handled by means of auxiliary
objects, one per pattern. Pattern objects must be instances of classes
that extend markdown.Pattern. Each pattern object uses a single regular
express... |
popazerty/enigma2-4.3 | refs/heads/master | lib/python/Components/Timeshift.py | 6 | # -*- coding: utf-8 -*-
# InfoBarTimeshift requires InfoBarSeek, instantiated BEFORE!
# Hrmf.
#
# Timeshift works the following way:
# demux0 demux1 "TimeshiftActions" "TimeshiftActivateActions" "SeekActions"
# - normal playback TUNER ... |
libfuse/python-fuse | refs/heads/master | example/hello.py | 1 | #!/usr/bin/env python
# Copyright (C) 2006 Andrew Straw <strawman@astraw.com>
#
# This program can be distributed under the terms of the GNU LGPL.
# See the file COPYING.
#
import os, stat, errno
# pull in some spaghetti to make this stuff work without fuse-py being installed
try:
import _find_fuse_par... |
clumsy/intellij-community | refs/heads/master | python/testData/intentions/PyConvertMethodToPropertyIntentionTest/emptyReturn.py | 83 | class A():
def mo<caret>o(self):
return |
CivicTechTO/open-cabinet | refs/heads/master | venv/lib/python2.7/site-packages/django/contrib/staticfiles/templatetags/__init__.py | 12133432 | |
delinhabit/django | refs/heads/master | tests/view_tests/templatetags/__init__.py | 12133432 | |
haystack/eyebrowse-server | refs/heads/master | notifications/management/__init__.py | 12133432 | |
enigmampc/catalyst | refs/heads/master | catalyst/examples/mean_reversion_simple_custom_fees.py | 1 | # For this example, we're going to write a simple momentum script. When the
# stock goes up quickly, we're going to buy; when it goes down quickly, we're
# going to sell. Hopefully we'll ride the waves.
import os
import tempfile
import time
import numpy as np
import pandas as pd
import talib
from logbook import Logg... |
mikewiebe-ansible/ansible | refs/heads/devel | lib/ansible/module_utils/ovirt.py | 14 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# 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) ... |
bhargav/scikit-learn | refs/heads/master | sklearn/tests/test_check_build.py | 312 | """
Smoke Test the check_build module
"""
# Author: G Varoquaux
# Licence: BSD 3 clause
from sklearn.__check_build import raise_build_error
from sklearn.utils.testing import assert_raises
def test_raise_build_error():
assert_raises(ImportError, raise_build_error, ImportError())
|
neuroidss/nupic.vision | refs/heads/master | image_encoders.py | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have purchased from
# Numenta, Inc. a separate commercial license for this software code, the
# following terms and conditions apply:
#
# This pro... |
showell/zulip | refs/heads/master | zerver/migrations/0086_realm_alter_default_org_type.py | 7 | # Generated by Django 1.11.2 on 2017-06-26 21:56
from django.db import migrations, models
CORPORATE = 1
class Migration(migrations.Migration):
dependencies = [
('zerver', '0085_fix_bots_with_none_bot_type'),
]
operations = [
migrations.AlterField(
model_name='realm',
... |
sgerhart/ansible | refs/heads/maintenance_policy_module | lib/ansible/modules/cloud/azure/azure_rm_mysqlfirewallrule.py | 25 | #!/usr/bin/python
#
# Copyright (c) 2018 Zim Kalinowski, <zikalino@microsoft.com>
#
# 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',
... |
timothydmorton/bokeh | refs/heads/master | examples/compat/ggplot/xkcd_density.py | 34 | from ggplot import aes, diamonds, geom_density, ggplot
import matplotlib.pyplot as plt
from bokeh import mpl
from bokeh.plotting import output_file, show
g = ggplot(diamonds, aes(x='price', color='cut')) + geom_density()
g.draw()
plt.title("xkcd-ggplot-mpl based plot in Bokeh.")
output_file("xkcd_density.html")
sh... |
yograterol/django | refs/heads/master | django/contrib/postgres/validators.py | 458 | import copy
from django.core.exceptions import ValidationError
from django.core.validators import (
MaxLengthValidator, MaxValueValidator, MinLengthValidator,
MinValueValidator,
)
from django.utils.deconstruct import deconstructible
from django.utils.translation import ugettext_lazy as _, ungettext_lazy
clas... |
sasasaftic/owatam | refs/heads/master | analysis/models.py | 1 | from django.contrib.auth.models import User
from django.db import models
class WebPage(models.Model):
user = models.ForeignKey(User)
main_domain = models.CharField(max_length=20)
page_id = models.CharField(max_length=20)
selected = models.BooleanField(default=False)
def __unicode__(self):
... |
DCSaunders/tensorflow | refs/heads/master | tensorflow/examples/android/jni/__init__.py | 12133432 | |
MinchinWeb/topydo | refs/heads/stable | test/__init__.py | 12133432 | |
fivejjs/bayespy | refs/heads/master | bayespy/utils/tests/__init__.py | 12133432 | |
akhilari7/pa-dude | refs/heads/master | lib/python2.7/site-packages/django/contrib/auth/management/commands/__init__.py | 12133432 | |
JiYou/apprtc | refs/heads/master | src/app_engine/compute_page.py | 24 | # Copyright 2015 Google Inc. All Rights Reserved.
"""Compute page for handling tasks related to compute engine."""
import logging
import apiauth
import webapp2
from google.appengine.api import app_identity
from google.appengine.api import taskqueue
# Page actions
# Get the status of an instance.
ACTION_STATUS = '... |
slevenhagen/odoo | refs/heads/8.0 | openerp/report/render/rml2pdf/utils.py | 381 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2003, Fabien Pinckaers, UCL, FSA
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesse... |
cjahangir/geodash-new | refs/heads/master | geonode/documents/forms.py | 2 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... |
AnimationInVR/avango | refs/heads/master | examples/examples_common/matrix_converter.py | 3 | import avango.gua
import avango.osg
def convert_osg_to_gua(osg_mat):
gua_mat = avango.gua.make_identity_mat()
for row in range(0, 4):
for col in range(0, 4):
gua_mat.set_element(col, row, osg_mat.get_element(row, col))
return gua_mat
def convert_gua_to_osg(gua_mat):
gua_mat = avango.osg.mak... |
harmy/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/json_tests/test_decode.py | 49 | import decimal
from io import StringIO
from collections import OrderedDict
from test.json_tests import PyTest, CTest
class TestDecode:
def test_decimal(self):
rval = self.loads('1.1', parse_float=decimal.Decimal)
self.assertTrue(isinstance(rval, decimal.Decimal))
self.assertEqual(rval, dec... |
jni/networkx | refs/heads/master | networkx/algorithms/shortest_paths/tests/test_astar.py | 76 | #!/usr/bin/env python
from nose.tools import *
import networkx as nx
from random import random, choice
class TestAStar:
def setUp(self):
self.XG=nx.DiGraph()
self.XG.add_edges_from([('s','u',{'weight':10}),
('s','x',{'weight':5}),
('u... |
csblab/md_scripts | refs/heads/master | openmm/amberff/equilibrate_NPT.py | 1 | #!/usr/bin/env python
"""
Runs a simulation under NPT conditions.
Outputs a portable state (.xml) file with positions and velocities,
to allow restarting and/or continuation.
.2019. joaor@stanford.edu
"""
from __future__ import print_function, division
import argparse
import logging
import math
import os
import ra... |
nvoron23/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/utils/unittest/runner.py | 571 | """Running tests"""
import sys
import time
import unittest
from django.utils.unittest import result
try:
from django.utils.unittest.signals import registerResult
except ImportError:
def registerResult(_):
pass
__unittest = True
class _WritelnDecorator(object):
"""Used to decorate file-like obj... |
StefanRijnhart/account-financial-reporting | refs/heads/8.0 | __unported__/account_financial_report_webkit_xls/wizard/general_ledger_wizard.py | 37 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2013 Noviat nv/sa (www.noviat.com). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under... |
venumech/cookiecutter | refs/heads/master | docs/__init__.py | 12133432 | |
ebar0n/django | refs/heads/master | django/views/decorators/__init__.py | 12133432 | |
vinc456/coala | refs/heads/master | tests/parsing/GlobTestDir/SubDir1/File11.py | 12133432 | |
sglumac/pyislands | refs/heads/master | tests/__init__.py | 1 | import tests.permutation
|
ohmini/thaifoodapi | refs/heads/master | lib/django/contrib/flatpages/urls.py | 667 | from django.conf.urls import url
from django.contrib.flatpages import views
urlpatterns = [
url(r'^(?P<url>.*)$', views.flatpage, name='django.contrib.flatpages.views.flatpage'),
]
|
SanPen/GridCal | refs/heads/master | src/research/PTDF/ACPTDF_research.py | 1 | # This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is distributed in the hope that... |
linino/kernel_3.3.8 | refs/heads/master | 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... |
barykaed/Pelican-Test | refs/heads/gh-pages | activate/Lib/encodings/johab.py | 816 | #
# johab.py: Python Unicode Codec for JOHAB
#
# Written by Hye-Shik Chang <perky@FreeBSD.org>
#
import _codecs_kr, codecs
import _multibytecodec as mbc
codec = _codecs_kr.getcodec('johab')
class Codec(codecs.Codec):
encode = codec.encode
decode = codec.decode
class IncrementalEncoder(mbc.MultibyteIncrement... |
okolisny/integration_tests | refs/heads/master | cfme/utils/ansible.py | 1 | import tempfile
from os import listdir, mkdir, makedirs, path
from shutil import copy, copyfile, rmtree
from subprocess import check_output, CalledProcessError, STDOUT
import sys
from fauxfactory import gen_alphanumeric
from cfme.utils import conf
from cfme.utils.providers import providers_data
from git import Repo
f... |
Acidburn0zzz/servo | refs/heads/master | tests/wpt/web-platform-tests/webdriver/tests/accept_alert/__init__.py | 12133432 | |
adelton/django | refs/heads/master | tests/model_validation/__init__.py | 12133432 | |
Gussy/mavlink | refs/heads/master | pymavlink/generator/lib/__init__.py | 12133432 | |
binoculars/osf.io | refs/heads/develop | tests/framework_tests/__init__.py | 12133432 | |
lindamar/ecclesi | refs/heads/master | env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/contrib/__init__.py | 12133432 | |
group-policy/rally | refs/heads/master | rally/plugins/openstack/scenarios/fuel/utils.py | 1 | # 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 agreed to in... |
toddeye/home-assistant | refs/heads/dev | homeassistant/components/tellduslive.py | 2 | """
homeassistant.components.tellduslive
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Tellduslive Component.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/tellduslive/
"""
from datetime import timedelta
import logging
from homeassistant.loader import get_comp... |
ecolell/pfamserver | refs/heads/master | pfamserver/models/__init__.py | 1 | from .pfam_a import PfamA
from .pdb import Pdb
from .pdb_pfam_a_reg import PdbPfamAReg
from .pfam_a_reg_full_significant import PfamARegFullSignificant
from .pfamseq import Pfamseq
from .uniprot import Uniprot
from .uniprot_reg_full import UniprotRegFull
from .pfam_a_pfamseq import PfamAPfamseq
|
timvandermeij/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/pytest/_pytest/runner.py | 173 | """ basic collect and runtest protocol implementations """
import bdb
import sys
from time import time
import py
import pytest
from _pytest._code.code import TerminalRepr, ExceptionInfo
def pytest_namespace():
return {
'fail' : fail,
'skip' : skip,
'importorskip' : importo... |
infobloxopen/neutron | refs/heads/master | neutron/plugins/ml2/drivers/arista/config.py | 21 | # Copyright (c) 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... |
googleapis/python-service-usage | refs/heads/master | google/cloud/service_usage_v1/types/serviceusage.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2020 Google 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 applicable law or... |
tudorian/eden | refs/heads/master | modules/s3_update_check.py | 12 | # -*- coding: utf-8 -*-
import os
import sys
try:
from gluon import current
except ImportError:
print >> sys.stderr, """
The installed version of Web2py is too old -- it does not define current.
Please upgrade Web2py to a more recent version.
"""
# Version of 000_config.py
# Increment this if t... |
makerbot/conveyor | refs/heads/master | src/main/python/conveyor/jsonrpc.py | 1 | # vim:ai:et:ff=unix:fileencoding=utf-8:sw=4:ts=4:
# conveyor/src/main/python/conveyor/jsonrpc.py
#
# conveyor - Printing dispatch engine for 3D objects and their friends.
# Copyright © 2012 Matthew W. Samsonoff <matthew.samsonoff@makerbot.com>
#
# This program is free software: you can redistribute it and/or modify it ... |
ferrisvienna/Disco_Defense | refs/heads/master | discodefense.py | 1 | #004BB1#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Disco Defense
Open source game by Ferris(FerrisofVienna) Bartak
and Paolo "Broccolimaniac" Perfahl
using python3 and pygame
"""
#the next line is only needed for python2.x and not necessary for python3.x
from __future__ import print_function, division
import rand... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.