repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
willu47/SALib | refs/heads/master | src/SALib/analyze/__init__.py | 12133432 | |
hogarthj/ansible | refs/heads/devel | lib/ansible/modules/storage/purestorage/__init__.py | 12133432 | |
rohitwaghchaure/New_Theme_Erp | refs/heads/develop | erpnext/patches/v4_2/default_website_style.py | 9 | import frappe
from frappe.templates.pages.style_settings import default_properties
def execute():
style_settings = frappe.get_doc("Style Settings", "Style Settings")
if not style_settings.apply_style:
style_settings.update(default_properties)
style_settings.apply_style = 1
style_settings.save()
|
entomb/CouchPotatoServer | refs/heads/master | libs/migrate/versioning/util/importpath.py | 74 | import os
import sys
def import_path(fullpath):
""" Import a file with full path specification. Allows one to
import from anywhere, something __import__ does not do.
"""
# http://zephyrfalcon.org/weblog/arch_d7_2002_08_31.html
path, filename = os.path.split(fullpath)
filename, ext = os.pat... |
bcoca/ansible-modules-extras | refs/heads/devel | cloud/azure/__init__.py | 12133432 | |
Edraak/edraak-platform | refs/heads/master | common/test/acceptance/tests/studio/__init__.py | 12133432 | |
rahulunair/nova | refs/heads/master | nova/db/sqlalchemy/__init__.py | 12133432 | |
ee-in/python-api | refs/heads/master | plotly/offline/__init__.py | 1 | """
offline
======
This module provides offline functionality.
"""
from . offline import (
download_plotlyjs,
init_notebook_mode,
iplot
)
|
Passtechsoft/TPEAlpGen | refs/heads/master | blender/release/scripts/addons/rigify/rigs/basic/copy_chain.py | 6 | #====================== BEGIN GPL LICENSE BLOCK ======================
#
# 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 2
# of the License, or (at your option) any later vers... |
glennq/zhihu-py3 | refs/heads/master | docs/conf.py | 15 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# zhihu-py3 documentation build configuration file, created by
# sphinx-quickstart on Sun Feb 22 23:01:19 2015.
#
# 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
# ... |
divio/djangocms-rest-api | refs/heads/master | djangocms_rest_api/serializers/mapping.py | 1 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
from django.conf import settings
plugin_serializer_mapping = {}
if 'cmsplugin_filer_image' in settings.INSTALLED_APPS:
from cmsplugin_filer_image.cms_plugins import FilerImagePlugin
from djangocms_rest_api.seri... |
hazelnusse/sympy-old | refs/heads/master | sympy/series/tests/test_lseries.py | 7 | from sympy import sin, cos, exp, E
from sympy.abc import x
def test_sin():
e = sin(x).lseries(x, 0)
assert e.next() == x
assert e.next() == -x**3/6
assert e.next() == x**5/120
def test_cos():
e = cos(x).lseries(x, 0)
assert e.next() == 1
assert e.next() == -x**2/2
assert e.next() == x*... |
cloudbase/neutron-virtualbox | refs/heads/virtualbox_agent | neutron/tests/functional/api/test_v2_plugin.py | 5 | # Copyright 2014, Red Hat 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... |
OSSESAC/odoopubarquiluz | refs/heads/7.0 | openerp/addons/base/res/ir_property.py | 63 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... |
rbalda/neural_ocr | refs/heads/master | env/lib/python2.7/site-packages/django/core/management/commands/createcachetable.py | 342 | from django.conf import settings
from django.core.cache import caches
from django.core.cache.backends.db import BaseDatabaseCache
from django.core.management.base import BaseCommand, CommandError
from django.db import (
DEFAULT_DB_ALIAS, connections, models, router, transaction,
)
from django.db.utils import Databa... |
lchqfnu/mongo-connector | refs/heads/master | tests/test_rollbacks.py | 14 | """Test Mongo Connector's behavior when its source MongoDB system is
experiencing a rollback.
"""
import os
import sys
import time
from pymongo.read_preferences import ReadPreference
from pymongo import MongoClient
sys.path[0:0] = [""]
from mongo_connector.util import retry_until_ok
from mongo_connector.locking_di... |
VisionSystemsInc/voxel_globe | refs/heads/master | voxel_globe/voxel_viewer/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
alangwansui/mtl_ordercenter | refs/heads/master | openerp/addons/l10n_be/wizard/__init__.py | 438 | # -*- 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... |
nhenezi/kuma | refs/heads/master | vendor/packages/translate-toolkit/translate/convert/po2html.py | 6 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2004-2006 Zuza Software Foundation
#
# This file is part of translate.
#
# translate 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 ... |
dparlevliet/zelenka-report-storage | refs/heads/master | server-db/twisted/manhole/ui/gtk2manhole.py | 37 | # -*- test-case-name: twisted.manhole.ui.test.test_gtk2manhole -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Manhole client with a GTK v2.x front-end.
"""
__version__ = '$Revision: 1.9 $'[11:-2]
from twisted import copyright
from twisted.internet import reactor
from twisted.python i... |
hiezust/teask | refs/heads/master | website/migrations/0004_users_county.py | 1 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-05-04 15:41
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('website', '0003_users'),
]
operations = [
migr... |
Chunjie/xsconsole | refs/heads/master | plugins-base/XSFeatureHostCommon.py | 4 | # Copyright (c) 2008-2009 Citrix Systems Inc.
#
# 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; version 2 only.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ... |
pgmillon/ansible | refs/heads/devel | lib/ansible/modules/network/iosxr/iosxr_logging.py | 11 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2017, Ansible by Red Hat, inc
# 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',
... |
lrntc/touch_hdr | refs/heads/master | touch_hdr_variables.py | 1 | EV_dict = { 0 : "-5000",
1 : "-4666",
2 : "-4333",
3 : "-4000",
4 : "-3666",
5 : "-3333",
6 : "-3000",
7 : "-2666",
8 : "-2333",
9 : "-2000",
10 : "-1666",
11 : "-1333",
12 : "-1000",
13 : "-666",
14 : "-333",
15 : ... |
alex/sqlalchemy | refs/heads/master | test/orm/inheritance/test_poly_persistence.py | 28 | """tests basic polymorphic mapper loading/saving, minimal relationships"""
from sqlalchemy.testing import eq_, assert_raises, assert_raises_message
from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy.orm import exc as orm_exc
from sqlalchemy import exc as sa_exc
from sqlalchemy.testing.schema import ... |
piffey/ansible | refs/heads/devel | lib/ansible/module_utils/network/fortimanager/fortimanager.py | 64 | # This code is part of Ansible, but is an independent component.
# This particular file snippet, and this file snippet only, is BSD licensed.
# Modules you write using this snippet, which is embedded dynamically by Ansible
# still belong to the author of the module, and may assign their own license
# to the complete wo... |
hojel/calibre | refs/heads/master | setup/install.py | 6 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import sys, os, textwrap, subprocess, shutil, tempfile, atexit, glob
from setup imp... |
dimven/ClockworkForDynamo | refs/heads/master | nodes/0.9.x/python/View.Phase.py | 8 | import clr
clr.AddReference('RevitAPI')
from Autodesk.Revit.DB import *
clr.AddReference("RevitNodes")
import Revit
clr.ImportExtensions(Revit.Elements)
views = UnwrapElement(IN[0])
elementlist = list()
for view in views:
try:
elementlist.append(view.Document.GetElement(view.get_Parameter(BuiltInParameter.VIEW_PHA... |
Eficent/odoomrp-wip | refs/heads/8.0 | machine_purchase/__openerp__.py | 27 | # -*- encoding: utf-8 -*-
##############################################################################
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the... |
kernc/pelican-plugins | refs/heads/master | summary/test_summary.py | 339 | # -*- coding: utf-8 -*-
import unittest
from jinja2.utils import generate_lorem_ipsum
# generate one paragraph, enclosed with <p>
TEST_CONTENT = str(generate_lorem_ipsum(n=1))
TEST_SUMMARY = generate_lorem_ipsum(n=1, html=False)
from pelican.contents import Page
import summary
class TestSummary(unittest.TestCase... |
tmroeder/cloudproxy | refs/heads/master | src/third_party/googlemock/gtest/xcode/Scripts/versiongenerate.py | 3088 | #!/usr/bin/env python
#
# Copyright 2008, 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... |
djungelorm/sphinx-tabs | refs/heads/master | sphinx_tabs/__init__.py | 1 | __version__ = "2.1.0"
__import__("pkg_resources").declare_namespace(__name__)
|
googleapis/googleapis-gen | refs/heads/master | google/ads/googleads/v5/googleads-py/tests/unit/gapic/googleads.v5/services/test_user_interest_service.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... |
mszewczy/odoo | refs/heads/8.0 | addons/sales_team/res_config.py | 366 | # -*- coding: utf-8 -*-
from openerp.osv import fields, osv
class sales_team_configuration(osv.TransientModel):
_name = 'sale.config.settings'
_inherit = ['sale.config.settings']
def set_group_multi_salesteams(self, cr, uid, ids, context=None):
""" This method is automatically called by res_conf... |
thurt/arangodb | refs/heads/devel | 3rdParty/V8-4.3.61/build/gyp/test/cxxflags/gyptest-cxxflags.py | 142 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies build of an executable with C++ define specified by a gyp define, and
the use of the environment during regeneration when the g... |
slint/zenodo | refs/heads/master | tests/unit/records/test_schemas_datacite.py | 1 | # -*- coding: utf-8 -*-
#
# This file is part of Zenodo.
# Copyright (C) 2016-2018 CERN.
#
# Zenodo 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 2 of the
# License, or (at your option) any la... |
mahendra-r/edx-platform | refs/heads/master | cms/envs/aws.py | 15 | """
This is the default template for our main set of AWS servers.
"""
# We intentionally define lots of variables that aren't used, and
# want to import all variables from base settings files
# pylint: disable=wildcard-import, unused-wildcard-import
# Pylint gets confused by path.py instances, which report themselves... |
anbangleo/NlsdeWeb | refs/heads/master | Python-3.6.0/Lib/idlelib/delegator.py | 17 | class Delegator:
def __init__(self, delegate=None):
self.delegate = delegate
self.__cache = set()
# Cache is used to only remove added attributes
# when changing the delegate.
def __getattr__(self, name):
attr = getattr(self.delegate, name) # May raise AttributeError
... |
surajssd/kuma | refs/heads/master | kuma/attachments/migrations/__init__.py | 12133432 | |
yubang/message | refs/heads/master | message/__init__.py | 12133432 | |
kieslee/c_amz | refs/heads/master | c_amz/spiders/amz_1.py | 1 | # -*- coding: utf-8 -*-
import scrapy
import re
import sys
import json
import pdb
import redis
from retrying import retry
r_host = '127.0.0.1'
r_port = 6379
r_db = 1
pool = None
r = None
def get_cache():
global pool, r
if pool is None:
pool = redis.ConnectionPool(host=r_host, port=r_port, db=r_db, s... |
IndonesiaX/edx-platform | refs/heads/master | common/test/acceptance/tests/test_cohorted_courseware.py | 123 | """
End-to-end test for cohorted courseware. This uses both Studio and LMS.
"""
import json
from nose.plugins.attrib import attr
from studio.base_studio_test import ContainerBase
from ..pages.studio.settings_group_configurations import GroupConfigurationsPage
from ..pages.studio.auto_auth import AutoAuthPage as Stud... |
alaunay/bigtop | refs/heads/master | bigtop-packages/src/charm/zeppelin/layer-zeppelin/reactive/zeppelin.py | 8 | # 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 ... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/Django/django/conf/locale/zh_TW/formats.py | 1293 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
# DATE_FORMAT =
# TIME_FORMAT =
# DATETIME_FORMAT =
# YEAR_MONTH_FORMAT =
# MONTH_DA... |
tedelhourani/ansible | refs/heads/devel | lib/ansible/modules/cloud/ovirt/ovirt_datacenter.py | 56 | #!/usr/bin/python
# -*- 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
#... |
warped-rudi/xbmc | refs/heads/Gotham-13.1-AE-fixes | lib/libUPnP/Neptune/Extras/Scripts/GenTrustAnchorsTables.py | 264 | #! /usr/bin/env python
###
### Generate trust anchor tables from a text file
### like, for example, TLS-Trust-Anchors-base.crt
## and TLS-Trust-Anchors-extended.crt located under Extras/Data
###
### imports
import sys
import base64
### generate a C file with bult-in TLS trust anchors
FILE_HEADER = """/**************... |
PnCevennes/porteconnaissance_pq | refs/heads/master | app/pq/models.py | 1 | #coding: utf8
from server import db
from geoalchemy2 import Geometry
from shapely.wkb import loads
from shapely.geometry import asShape
from geoalchemy2.shape import to_shape, from_shape
from geojson import Feature
class PqData(db.Model):
__tablename__ = 'v_perimetres_quietude'
__table_args__ = {'schema':'... |
tanmaythakur/django | refs/heads/master | tests/migrations/migrations_test_apps/lookuperror_a/migrations/__init__.py | 12133432 | |
MichaelNedzelsky/intellij-community | refs/heads/master | python/testData/formatter/parenthesisAroundGeneratorExpression.py | 79 | gen = ( for c in 'abrakadabra' ) |
PatrickKennedy/Sybil | refs/heads/master | console/app/console.py | 1 | # The WSGI entry-point for App Engine Console
#
# Copyright 2008 Proven Corporation Co., Ltd., Thailand
#
# This file is part of App Engine Console.
#
# App Engine Console 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 F... |
ryanahall/django | refs/heads/master | django/contrib/gis/gdal/error.py | 535 | """
This module houses the GDAL & SRS Exception objects, and the
check_err() routine which checks the status code returned by
GDAL/OGR methods.
"""
# #### GDAL & SRS Exceptions ####
class GDALException(Exception):
pass
# Legacy name
OGRException = GDALException
class SRSException(Exception):
pass
cla... |
cosenal/osf.io | refs/heads/develop | website/files/models/dataverse.py | 39 | from framework.auth.core import _get_current_user
from website.files.models.base import File, Folder, FileNode, FileVersion
__all__ = ('DataverseFile', 'DataverseFolder', 'DataverseFileNode')
class DataverseFileNode(FileNode):
provider = 'dataverse'
class DataverseFolder(DataverseFileNode, Folder):
pass
... |
DylannCordel/djangocms-text-ckeditor | refs/heads/master | djangocms_text_ckeditor/tests/test_html.py | 4 | # -*- coding: utf-8 -*-
from django.test import TestCase
from .. import html
from .. import settings
class HtmlSanitizerAdditionalProtocolsTests(TestCase):
def tearDown(self):
settings.TEXT_ADDITIONAL_PROTOCOLS = []
def test_default_protocol_escaping(self):
settings.TEXT_ADDITIONAL_PROTOCOL... |
nikolas/readthedocs.org | refs/heads/master | readthedocs/projects/signals.py | 8 | import logging
import json
import django.dispatch
from django.conf import settings
from django.contrib import messages
from django.dispatch import receiver
from django.utils.translation import ugettext_lazy as _
from builds import utils as build_utils
from oauth import utils as oauth_utils
before_vcs = django.dispat... |
cast051/ardupilot_cast | refs/heads/master | mk/PX4/Tools/genmsg/test/test_genmsg_base.py | 216 | def test_log():
from genmsg.base import log
log("hello", "there")
def test_plog():
class Foo(object):
pass
from genmsg.base import plog
plog("hello", Foo())
def test_exceptions():
from genmsg import InvalidMsgSpec
try:
raise InvalidMsgSpec('hello')
except Invali... |
gimite/personfinder | refs/heads/master | app/vendors/xlrd/sheet.py | 27 | # -*- coding: cp1252 -*-
##
# <p> Portions copyright © 2005-2013 Stephen John Machin, Lingfo Pty Ltd</p>
# <p>This module is part of the xlrd package, which is released under a BSD-style licence.</p>
##
# 2010-04-25 SJM fix zoom factors cooking logic
# 2010-04-15 CW r4253 fix zoom factors cooking logic
# 2010-04-09 ... |
tudorvio/nova | refs/heads/master | nova/tests/unit/objects/test_instance_group.py | 26 | # 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 ... |
hwmaier/esp-idf | refs/heads/master | components/idf_test/integration_test/TestCaseScript/NVSTest/NVSCompatibleWiFi.py | 9 | import os
import time
from TCAction import TCActionBase
from TCAction import PerformanceTCBase
from NativeLog import NativeLog
SOFTAP_SSID = "SoftAPSSID4NVSCompatibleTest"
SOFTAP_PASSWORD = "SoftAPPassword4NVSCompatibleTest"
NVS_FILE_NAME = "nvs_wifi.bin"
class TestCase(PerformanceTCBase.PerformanceTCBase):
... |
kun--hust/sccloud | refs/heads/master | swift/common/middleware/account_quotas.py | 39 | # 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... |
ytoolshed/range | refs/heads/master | python_seco_range/source/setup.py | 1 | #!/usr/bin/python
from distutils.core import setup
setup(name='seco/range',
version = '1.0',
packages = [ 'seco', 'seco.range', 'seco.range.sync' ])
|
chriscrosscutler/scikit-image | refs/heads/master | skimage/io/_plugins/fits_plugin.py | 28 | __all__ = ['imread', 'imread_collection']
import skimage.io as io
try:
from astropy.io import fits as pyfits
except ImportError:
try:
import pyfits
except ImportError:
raise ImportError(
"PyFITS could not be found. Please refer to\n"
"http://www.stsci.edu/resources/... |
pcdocker/pcdocker | refs/heads/master | pcdocker/taskapp/celery.py | 2 |
from __future__ import absolute_import
import os
from celery import Celery
from django.apps import AppConfig
from django.conf import settings
if not settings.configured:
# set the default Django settings module for the 'celery' program.
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings.local")
... |
mixturemodel-flow/tensorflow | refs/heads/master | tensorflow/python/training/training_util.py | 68 | # 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... |
fengbaicanhe/intellij-community | refs/heads/master | python/testData/psi/ReturnAtEOF.py | 83 | def test(a):
if a:
return |
BigBorg/Blog | refs/heads/master | Blog/comments/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
wraldata/venus | refs/heads/master | leg_tracker/billcatcher/tests.py | 24123 | from django.test import TestCase
# Create your tests here.
|
google-code/android-scripting | refs/heads/master | python/src/Lib/test/badsyntax_future6.py | 383 | """This is a test"""
"this isn't a doc string"
from __future__ import nested_scopes
def f(x):
def g(y):
return x + y
return g
result = f(2)(4)
|
mini13i/maintenance | refs/heads/master | accounts/apps.py | 172 | from django.apps import AppConfig
class AccountsConfig(AppConfig):
name = 'accounts'
|
t0mk/ansible | refs/heads/devel | test/units/playbook/test_playbook.py | 290 | # (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... |
civisanalytics/ansible | refs/heads/civis | hacking/metadata-tool.py | 20 | #!/usr/bin/env python
import ast
import csv
import os
import sys
from collections import defaultdict
from distutils.version import StrictVersion
from pprint import pformat, pprint
import yaml
from ansible.module_utils._text import to_text
from ansible.plugins import module_loader
# There's a few files that are not... |
pisskidney/leetcode | refs/heads/master | easy/232.py | 1 | #!/usr/bin/python
class Queue(object):
def __init__(self):
"""
initialize your data structure here.
"""
self.stack = []
self.revstack = []
def push(self, x):
"""
:type x: int
:rtype: nothing
"""
self.stack.append(x)
... |
wimberosa/samba | refs/heads/master | buildtools/wafsamba/generic_cc.py | 22 |
# compiler definition for a generic C compiler
# based on suncc.py from waf
import os, optparse
import Utils, Options, Configure
import ccroot, ar
from Configure import conftest
from compiler_cc import c_compiler
c_compiler['default'] = ['gcc', 'generic_cc']
c_compiler['hpux'] = ['gcc', 'generic_cc']
@conftest
def... |
ethan-nelson/osm-tasking-manager2 | refs/heads/master | alembic/versions/b54ce37bde0_added_due_state_column_to_project_table.py | 7 | """Added due_state column to project table
Revision ID: b54ce37bde0
Revises: 33a5ec066e1d
Create Date: 2014-07-17 16:52:59.898360
"""
# revision identifiers, used by Alembic.
revision = 'b54ce37bde0'
down_revision = '33a5ec066e1d'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.add_column('pr... |
sourcelair/jason | refs/heads/master | jason/resources.py | 1 | from fields import BaseField
from queryselectors import JasonQuerySelector
import exceptions
class JasonResourceMeta(type):
def __new__(cls, name, bases, dct):
new_class = type.__new__(cls, name, bases, dct)
# Set names to attributes
for (key, value) in new_class.__dict__.iteritems():
... |
softak/webfaction_demo | refs/heads/master | vendor-local/lib/python/amqplib/client_0_8/abstract_channel.py | 22 | """
Code common to Connection and Channel objects.
"""
# Copyright (C) 2007-2008 Barry Pederson <bp@barryp.org>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of ... |
simmetria/sentry | refs/heads/master | src/sentry/services/__init__.py | 3 | """
sentry.services
~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
|
tayfun/django | refs/heads/master | tests/i18n/project_dir/app_no_locale/__init__.py | 12133432 | |
ornlneutronimaging/iBeatles | refs/heads/master | ibeatles/table_dictionary/__init__.py | 12133432 | |
teltek/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/tests/__init__.py | 12133432 | |
ssxenon01/contact-sharing | refs/heads/master | main/api/__init__.py | 816 | # coding: utf-8
|
SteveViss/readthedocs.org | refs/heads/master | readthedocs/gold/admin.py | 40 | from django.contrib import admin
from .models import GoldUser
class GoldAdmin(admin.ModelAdmin):
model = GoldUser
raw_id_fields = ('user', 'projects')
list_display = ('user', 'level')
list_filter = ('user', 'level')
admin.site.register(GoldUser, GoldAdmin)
|
reasonerjt/harbor | refs/heads/master | make/photon/prepare/utils/migration.py | 2 | import yaml
import click
import importlib
import os
from collections import deque
class MigratioNotFound(Exception): ...
class MigrationVersion:
'''
The version used to migration
Arttribute:
name(str): version name like `1.0.0`
module: the python module object for a specific migration whi... |
P0cL4bs/WiFi-Pumpkin | refs/heads/master | core/helpers/update.py | 4 | import time
import fnmatch
from os import path,walk
from subprocess import check_output,CalledProcessError
from core.loaders.master.github import GithubUpdate,UrllibDownload
from core.loaders.models.PackagesUI import *
"""
Description:
This program is a module for wifi-pumpkin.py. GUI update from github
Copyrigh... |
astroJeff/dart_board | refs/heads/master | dart_board/constants.py | 1 |
##################### CONSTANTS TO BE USED THROUGHOUT MODULE #####################
G = 6.674e-8 # Gravitational constant in cgs
GGG = 1.909e5 # Gravitational constant in Rsun * (km/s)^2 / Msun
c_light = 2.9979e10 # speed of light in cgs
km_to_cm = 1.0e5 # km to cm
Msun_to_g = 1.989e33 # Msun to g
Rsun_to_cm = 6.955e1... |
giocalitri/django-guardian | refs/heads/devel | guardian/south_migrations/__init__.py | 12133432 | |
tyler569/irclib | refs/heads/master | irclib/__init__.py | 12133432 | |
YACOWS/opps | refs/heads/master | tests/__init__.py | 12133432 | |
Metaswitch/horizon | refs/heads/master | openstack_dashboard/dashboards/admin/metadata_defs/__init__.py | 12133432 | |
Stratoscale/yumsnapshot | refs/heads/master | config.py | 1 | sources = { 'fedora' : 'rsync://dl.fedoraproject.org/fedora-enchilada/linux/%(repo)s/%(release)s/%(arch)s/',
'centos' : 'rsync://centos.eecs.wsu.edu/centos/%(release)s/%(repo)s/%(arch)s/'
}
S3_BUCKET = 's3://yumfreeze.com'
|
azureplus/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/indexes/__init__.py | 12133432 | |
hadrianpaulo/project_deathstar | refs/heads/master | core/api/__init__.py | 12133432 | |
alathers/projecteuler | refs/heads/master | 338/338.py | 12133432 | |
sid-kap/readthedocs.org | refs/heads/master | readthedocs/projects/__init__.py | 12133432 | |
ajoubert-mitre/geoq | refs/heads/develop | geoq/core/migrations/__init__.py | 12133432 | |
mlperf/training_results_v0.5 | refs/heads/master | v0.5.0/google/cloud_v2.8/gnmt-tpuv2-8/code/gnmt/model/staging/models/rough/ssd/async_checkpoint.py | 36 | # Copyright 2018 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... |
Quadrocube/rep | refs/heads/master | tests/test_folding.py | 4 | from __future__ import division, print_function, absolute_import
import numpy
from sklearn.ensemble import AdaBoostClassifier
from sklearn.svm import SVC
from sklearn.metrics.metrics import accuracy_score, roc_auc_score
from rep.estimators import SklearnClassifier
from rep.metaml import FoldingClassifier
from rep.tes... |
ttfseiko/openerp-trunk | refs/heads/master | openerp/addons/web/tests/test_ui.py | 4 | # -*- coding: utf-8 -*-
import os
import openerp.tests
class TestUi(openerp.tests.HttpCase):
def test_01_jsfile_ui_hello(self):
self.phantom_jsfile(os.path.join(os.path.dirname(__file__), 'test_ui_hello.js'))
def test_02_jsfile_ui_load(self):
self.phantom_jsfile(os.path.join(os.path.dirname(__... |
ashleysommer/sanic | refs/heads/master | sanic/log.py | 4 | import logging
import sys
LOGGING_CONFIG_DEFAULTS = dict(
version=1,
disable_existing_loggers=False,
loggers={
"sanic.root": {"level": "INFO", "handlers": ["console"]},
"sanic.error": {
"level": "INFO",
"handlers": ["error_console"],
"propagate": True,
... |
AlexandraMercier/RULEngine | refs/heads/dev | Communication/protobuf/google/protobuf/message.py | 78 | # Protocol Buffers - Google's data interchange format
# Copyright 2008 Google Inc. All rights reserved.
# https://developers.google.com/protocol-buffers/
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redi... |
splav/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/third_party/more-itertools/more_itertools/tests/test_recipes.py | 39 | from doctest import DocTestSuite
from unittest import TestCase
from itertools import combinations
from six.moves import range
import more_itertools as mi
def load_tests(loader, tests, ignore):
# Add the doctests
tests.addTests(DocTestSuite('more_itertools.recipes'))
return tests
class AccumulateTests(... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.