repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
defionscode/ansible | refs/heads/devel | test/units/modules/network/netscaler/test_netscaler_gslb_site.py | 68 |
# Copyright (c) 2017 Citrix Systems
#
# 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.
#
# ... |
yangdongsheng/autotest | refs/heads/master | client/shared/base_utils.py | 2 | #
# Copyright 2008 Google Inc. Released under the GPL v2
import os, pickle, random, re, resource, select, shutil, signal, StringIO, glob
import socket, struct, subprocess, sys, time, textwrap, traceback, urlparse
import warnings, smtplib, logging, urllib2, string
from threading import Thread, Event, Lock
try:
impo... |
vjFaLk/frappe | refs/heads/bloomstack-production | frappe/patches/v7_0/update_send_after_in_bulk_email.py | 3 | from __future__ import unicode_literals
import frappe
from frappe.utils import now_datetime
def execute():
frappe.db.sql('update `tabEmail Queue` set send_after=%s where send_after is null', now_datetime()) |
eresearchrmit/hpctardis | refs/heads/master | tardis/tardis_portal/ParameterSetManager.py | 4 | from django.core.exceptions import ObjectDoesNotExist
from tardis.tardis_portal.models import DatasetParameterSet
from tardis.tardis_portal.models import DatafileParameterSet
from tardis.tardis_portal.models import ExperimentParameterSet
from tardis.tardis_portal.models import ParameterName
from tardis.tardis_portal.m... |
HLFH/CouchPotatoServer | refs/heads/develop | libs/chardet/sjisprober.py | 1182 | ######################## 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... |
colloquium/spacewalk | refs/heads/master | client/solaris/smartpm/smart/interfaces/up2date/rhnoptions.py | 5 | #
# Copyright (c) 2004 Conectiva, Inc.
# Copyright (c) 2005 Red Hat, Inc.
#
# From code written by Gustavo Niemeyer <niemeyer@conectiva.com>
# Modified by Peter Vetere <pvetere@redhat.com>
#
# This file is part of Smart Package Manager.
#
# Smart Package Manager is free software; you can redistribute it and/or
# modify... |
home-assistant/home-assistant | refs/heads/dev | homeassistant/components/neato/vacuum.py | 2 | """Support for Neato Connected Vacuums."""
from datetime import timedelta
import logging
from pybotvac.exceptions import NeatoRobotException
import voluptuous as vol
from homeassistant.components.vacuum import (
ATTR_STATUS,
STATE_CLEANING,
STATE_DOCKED,
STATE_ERROR,
STATE_IDLE,
STATE_PAUSED,
... |
sxjscience/mxnet | refs/heads/master | tests/nightly/dist_async_kvstore.py | 7 | #!/usr/bin/env python
# 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
# "L... |
zhakui/python | refs/heads/master | llluiop/0006/MostWords.py | 38 | #!/usr/bin/env python
import os
def DiaryFiles(path):
if os.path.exists(path):
for file in os.listdir(path):
if 'diary' in file:
yield os.path.join(path, file)
def CalcWords(file, dict1):
f = open(file)
for line in f.readlines():
for word in line.split():
... |
zzzombat/lucid-python-django | refs/heads/master | django/contrib/gis/geos/collections.py | 311 | """
This module houses the Geometry Collection objects:
GeometryCollection, MultiPoint, MultiLineString, and MultiPolygon
"""
from ctypes import c_int, c_uint, byref
from django.contrib.gis.geos.error import GEOSException, GEOSIndexError
from django.contrib.gis.geos.geometry import GEOSGeometry
from django.contrib.gi... |
leanix/leanix-sdk-python | refs/heads/master | src/leanix/models/FactSheetHasLifecycle.py | 1 | #!/usr/bin/env python
"""
The MIT License (MIT)
Copyright (c) 2017 LeanIX GmbH
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,... |
nth10sd/lithium | refs/heads/master | setup.py | 2 | #!/usr/bin/env python
# coding=utf-8
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
"""setuptools install script"""
import site
from setuptools import setup
site.... |
gangadharkadam/saloon_erp_install | refs/heads/master | erpnext/stock/doctype/stock_entry_detail/stock_entry_detail.py | 120 | # 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.model.document import Document
class StockEntryDetail(Document):
pass |
sridevikoushik31/nova | refs/heads/port_id_in_vif_on_devide | nova/scheduler/chance.py | 2 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2010 OpenStack Foundation
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you m... |
EBII/connector-cdiscount | refs/heads/master | connector-cdiscount/tests/test_deux.py | 1 | # -*- coding: utf-8 -*-
import unittest
#from .. import sale
class TestConnector(unittest.TestCase):
def create_attachment(self):
print "zzzzzzzzzzzzzzzzzooooooooooooooooooooobbbbbbbbbbbbbb"
# cdiscountAdapter = sale.CdiscountAdapter().search_read()
# print str(cdiscountAdapter)
... |
jonnatas/codeschool | refs/heads/master | old/cs_questions/models/base.py | 2 | from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import reverse as url_reverse
from model_utils.managers import InheritanceManager
from codeschool import models
from codeschool.shortcuts import delegation
from cs_courses.models import Discipline
from cs_activities.models import Acti... |
devoid/nova | refs/heads/sheepdog-nova-support | nova/tests/virt/xenapi/image/test_bittorrent.py | 14 | # Copyright 2013 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
jaeilepp/mne-python | refs/heads/master | mne/io/ctf/ctf.py | 1 | """Conversion tool from CTF to FIF."""
# Author: Eric Larson <larson.eric.d<gmail.com>
#
# License: BSD (3-clause)
import os
from os import path as op
import numpy as np
from ...utils import verbose, logger
from ...externals.six import string_types
from ..base import BaseRaw
from ..utils import _mult_cal_one, _blk... |
mariofix/ad-login | refs/heads/master | bender.py | 1 | #!/usr/bin/python
import ldap
def autentifica(username, password):
LDAP_SERVER = 'ldap://IP_OR_HOST'
LDAP_USERNAME = '%s@DOMAIN' % username
LDAP_PASSWORD = password
try:
ldap_client = ldap.initialize(LDAP_SERVER)
ldap_client.set_option(ldap.OPT_REFERRALS,0)
ldap_client.simple_bi... |
getsentry/django-social-auth | refs/heads/master | example/app/pipeline.py | 14 | from django.http import HttpResponseRedirect
def redirect_to_form(strategy, user=None, *args, **kwargs):
if not strategy.session_get('saved_username') and user is None:
return HttpResponseRedirect('/form/')
def username(strategy, user=None, *args, **kwargs):
if user:
username = user.username... |
Designist/sympy | refs/heads/master | sympy/matrices/tests/test_densetools.py | 80 | from sympy.matrices.densetools import trace, transpose
from sympy.matrices.densetools import eye
from sympy import ZZ
def test_trace():
a = [[ZZ(3), ZZ(7), ZZ(4)], [ZZ(2), ZZ(4), ZZ(5)], [ZZ(6), ZZ(2), ZZ(3)]]
b = eye(2, ZZ)
assert trace(a, ZZ) == ZZ(10)
assert trace(b, ZZ) == ZZ(2)
def test_transpo... |
arnaudsj/pybrain | refs/heads/master | pybrain/tests/unittests/structure/modules/test_peephole_lstm.py | 5 | """
>>> from pybrain.tools.functions import tanh
>>> from pybrain.utilities import fListToString
>>> from scipy import arctanh
>>> from random import random
Test the LSTMLayer behavior when using peepholes.
>>> N = buildMinimalLSTMNetwork()
>>> N.params[:] = [3,4,5]
>>> s1 = 0.2
>>> ... |
facelessuser/Rummage | refs/heads/master | tools/gui_patch.py | 1 | """Patch graphical user interface file."""
import codecs
import re
filename = 'rummage/lib/gui/gui.py'
with codecs.open(filename, 'r', encoding='utf-8') as f:
text = f.read()
# Add collapsible pane replacement
text = re.sub(
r'^((?:import|from)(?! \.controls\.collapsible_pane).*?)(\r?\n){2}',
r'\1\2from ... |
mark-ignacio/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/model/__init__.py | 143 | # Required for Python to search this directory for module files
from model.svnrevision import SVNRevision
|
charanpald/sandbox | refs/heads/master | sandbox/data/FeatureGenerator.py | 1 |
import numpy
from sandbox.util.Parameter import Parameter
class FeatureGenerator(object):
"""
A class to compute new features from exisiting ones.
"""
def __init__(self):
pass
def categoricalToIndicator(self, X, indices):
"""
Convert a set of categorical variables to ind... |
yuanagain/seniorthesis | refs/heads/master | venv/lib/python3.5/site-packages/pip/_vendor/packaging/requirements.py | 448 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
import string
import re
from pip._vendor.pyparsing import (
stringSta... |
bassijtsma/chatbot | refs/heads/master | yowsup/layers/protocol_calls/layer.py | 65 | from yowsup.layers import YowProtocolLayer
from .protocolentities import *
from yowsup.layers.protocol_acks.protocolentities import OutgoingAckProtocolEntity
from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEntity
class YowCallsProtocolLayer(YowProtocolLayer):
def __init__(self):... |
sbidoul/buildbot | refs/heads/master | master/buildbot/scripts/reconfig.py | 11 | # This file is part of Buildbot. Buildbot 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.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... |
Noviat/odoo | refs/heads/8.0 | openerp/report/render/render.py | 457 | # -*- 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... |
mspark93/VTK | refs/heads/master | Imaging/Core/Testing/Python/ResliceColorWrap.py | 20 | #!/usr/bin/env python
import vtk
from vtk.test import Testing
from vtk.util.misc import vtkGetDataRoot
VTK_DATA_ROOT = vtkGetDataRoot()
# we have to make sure it works with multiple scalar components
# Image pipeline
reader = vtk.vtkBMPReader()
reader.SetFileName("" + str(VTK_DATA_ROOT) + "/Data/masonry.bmp")
reader.S... |
Chentaco/Proyecto-IV | refs/heads/master | setup.py | 1 | from setuptools import setup
setup(name='MOBAgestor',
version='0.01',
description='Gestiona tus equipos y tus partidas para tus MOBAS favoritos',
url='https://github.com/Chentaco/Proyecto-IV',
author='Ramon Sanchez Garcia',
author_email='chentaco@correo.ugr.es',
license='GNU GENERAL... |
chrissmall22/odl-client | refs/heads/master | odlclient/tests/unit/test_rest.py | 1 | #!/usr/bin/env python
#
# Copyright 2014 Hewlett-Packard Development Company, L.P.
#
# 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... |
yetilinux/yetiweb | refs/heads/master | packages/management/commands/signoff_report.py | 1 | # -*- coding: utf-8 -*-
"""
signoff_report command
Send an email summarizing the state of outstanding signoffs for the given
repository.
Usage: ./manage.py signoff_report <email> <repository>
"""
from django.core.mail import send_mail
from django.core.urlresolvers import reverse
from django.core.management.base impo... |
musicbrainz/picard | refs/heads/master | picard/util/scripttofilename.py | 1 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
#
# Copyright (C) 2004 Robert Kaye
# Copyright (C) 2006 Lukáš Lalinský
# Copyright (C) 2018-2020 Philipp Wolfer
# Copyright (C) 2019 Laurent Monin
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of t... |
damonkohler/sl4a | refs/heads/master | python/src/Lib/plat-irix5/FILE.py | 66 | # Generated by h2py from /usr/include/sys/file.h
from warnings import warnpy3k
warnpy3k("the FILE module has been removed in Python 3.0", stacklevel=2)
del warnpy3k
# Included from sys/types.h
# Included from sgidefs.h
_MIPS_ISA_MIPS1 = 1
_MIPS_ISA_MIPS2 = 2
_MIPS_ISA_MIPS3 = 3
_MIPS_ISA_MIPS4 = 4
_MIPS_SIM_ABI32 = 1... |
aplicatii-romanesti/allinclusive-kodi-pi | refs/heads/master | .kodi/addons/script.mythbox/resources/src/mythbox/msg.py | 8 | #
# Msg translation constants
#
INFO = 26
ERROR = 27
CONFIRMATION = 28
UNKNOWN = 45
ASK_RERECORD_RECORDING = 51
ASK_DELETE_RECORDING = 65
NOT_AVAILABLE = 46
MISSING_SETTINGS_TAG = 34
CACHES_CLEARED = 426
SETTINGS_OK = 431
DEBUG_LOG_LOCATION = 447
# Home
COMM_FLAGGING = 313
TRANSCODING = 314
PROCESSING = 315
WAITING... |
signed/intellij-community | refs/heads/master | python/testData/copyPaste/EmptyBranchBlock.src.py | 37 | <selection>x = 1
y = 2</selection> |
vileopratama/vitech | refs/heads/master | src/addons/im_livechat/models/im_livechat_channel.py | 21 | # -*- coding: utf-8 -*-
import json
import openerp
import random
import re
from datetime import datetime, timedelta
from openerp import api, fields, models
from openerp import tools
class ImLivechatChannel(models.Model):
""" Livechat Channel
Define a communication channel, which can be accessed with 'scr... |
desarrollogt-frm-utn/reservas | refs/heads/master | app_reservas/views/__init__.py | 1 | from .ali import (
AliTemplateView,
AliVideoconferenciasDetailView,
)
from .area import AreaDetailView
from .aula import AulaDetailView
from .cuerpo import CuerpoDetailView
from .index import IndexView
from .laboratorio import LaboratorioDetailView
from .laboratorio_informatico import (
LaboratorioInformati... |
zdary/intellij-community | refs/heads/master | python/testData/intentions/PyConvertToFStringIntentionTest/percentOperatorRemovingEscapingFromPercentSigns.py | 11 | '%%%d%%' % 42 |
cosurgi/trunk | refs/heads/master | examples/gts-horse/gts-horse.py | 2 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# © 2009 Václav Šmilauer <eudoxos@arcig.cz>
from __future__ import print_function
from yade import pack
import gts, os.path, locale
locale.setlocale(locale.LC_ALL, 'en_US.UTF-8') #gts is locale-dependend. If, for example, german locale is used, gts.read()-function does not... |
onemoonsci/nmrfxprocessor | refs/heads/master | src/main/resources/nmrpar.py | 1 | import math
from org.nmrfx.processor.processing import Processor
processor = Processor.getProcessor()
def getTdSizes(nmrData=None):
'''return time domain sizes'''
if not nmrData:
nmrData = processor.getNMRData()
nDim = nmrData.getNDim() # getSize dim is 1-based
sizes = [ nmrData.getSize(i) f... |
postrational/django | refs/heads/master | tests/or_lookups/models.py | 109 | """
19. OR lookups
To perform an OR lookup, or a lookup that combines ANDs and ORs, combine
``QuerySet`` objects using ``&`` and ``|`` operators.
Alternatively, use positional arguments, and pass one or more expressions of
clauses using the variable ``django.db.models.Q`` (or any object with an
``add_to_query`` metho... |
mhbu50/erpnext | refs/heads/develop | erpnext/patches/v11_0/rename_healthcare_doctype_and_fields.py | 5 | import frappe
from frappe.model.rename_doc import rename_doc
from frappe.model.utils.rename_field import rename_field
from frappe.modules import scrub, get_doctype_module
field_rename_map = {
"Patient Encounter": [
["consultation_time", "encounter_time"],
["consultation_date", "encounter_date"],
["consultation_... |
RuanJG/git-repo | refs/heads/master | command.py | 40 | #
# Copyright (C) 2008 The Android Open Source Project
#
# 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 la... |
awanke/bokeh | refs/heads/master | tests/glyphs/CircleX.py | 43 |
import numpy as np
from bokeh.document import Document
from bokeh.models import ColumnDataSource, DataRange1d, Plot, LinearAxis, Grid
from bokeh.models.markers import CircleX
from bokeh.plotting import show
N = 9
x = np.linspace(-2, 2, N)
y = x**2
sizes = np.linspace(10, 20, N)
source = ColumnDataSource(dict(x=x, ... |
Neuroglycerin/hail-seizure | refs/heads/master | python/train_and_predict.py | 1 | #!/usr/bin/env python3
import subprocess
import warnings
import os
import sys
import utils
def call_train_and_predict(settings_file, verbose=False):
settings = utils.get_settings(settings_file)
null = open(os.devnull, 'w')
train_retcode = subprocess.call(['./train.py', '-s', settings_file],
... |
mvaled/OpenUpgrade | refs/heads/8.0 | addons/contacts/__openerp__.py | 260 | # -*- 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... |
jakereps/qiime-workshops | refs/heads/master | payments/migrations/0013_workshop_sales_open.py | 1 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2018, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... |
takeflight/django | refs/heads/master | tests/mutually_referential/models.py | 128 | """
Mutually referential many-to-one relationships
Strings can be used instead of model literals to set up "lazy" relations.
"""
from django.db import models
class Parent(models.Model):
name = models.CharField(max_length=100)
# Use a simple string for forward declarations.
bestchild = models.ForeignKey... |
xuweiliang/Codelibrary | refs/heads/master | nova/api/openstack/compute/hypervisors.py | 4 | # Copyright (c) 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... |
VielSoft/odoo | refs/heads/8.0 | addons/product/pricelist.py | 154 | # -*- 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... |
40223249-1/-w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/highlight.py | 617 | import keyword
import _jsre as re
from browser import html
letters = 'abcdefghijklmnopqrstuvwxyz'
letters += letters.upper()+'_'
digits = '0123456789'
builtin_funcs = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
"eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +... |
Panos512/invenio | refs/heads/prod | modules/websubmit/lib/functions/Insert_Modify_Record.py | 26 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 CERN.
##
## Invenio 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... |
skycucumber/Messaging-Gateway | refs/heads/master | webapp/venv/lib/python2.7/site-packages/pip/vcs/bazaar.py | 393 | import os
import tempfile
import re
from pip.backwardcompat import urlparse
from pip.log import logger
from pip.util import rmtree, display_path, call_subprocess
from pip.vcs import vcs, VersionControl
from pip.download import path_to_url
class Bazaar(VersionControl):
name = 'bzr'
dirname = '.bzr'
repo_na... |
Plain-Andy-legacy/android_external_chromium_org | refs/heads/lp-5.1r1 | build/android/pylib/perf/__init__.py | 962 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
|
leiferikb/bitpop | refs/heads/master | depot_tools/third_party/logilab/astng/__pkginfo__.py | 14 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
# copyright 2003-2010 Sylvain Thenault, all rights reserved.
# contact mailto:thenault@gmail.com
#
# This file is part of logilab-astng.
#
# logilab-astng is free software: you can redi... |
tectronics/cusp-library | refs/heads/master | build/build-env.py | 6 | EnsureSConsVersion(1,2)
import os
import inspect
import platform
def get_cuda_paths():
"""Determines CUDA {bin,lib,include} paths
returns (bin_path,lib_path,inc_path)
"""
# determine defaults
if os.name == 'nt':
bin_path = 'C:/CUDA/bin'
lib_path = 'C:/CUDA/lib'
inc_path = 'C:/CUDA/include'
... |
Pedals2Paddles/ardupilot | refs/heads/master | Tools/autotest/rover.py | 1 | #!/usr/bin/env python
# Drive Rover in SITL
from __future__ import print_function
import copy
import os
import shutil
import sys
import time
from common import AutoTest
from pysim import util
from pysim import vehicleinfo
from common import AutoTestTimeoutException
from common import MsgRcvTimeoutException
from com... |
KevinGreene/compose | refs/heads/master | compose/container.py | 6 | from __future__ import absolute_import
from __future__ import unicode_literals
from functools import reduce
import six
from .const import LABEL_CONTAINER_NUMBER
from .const import LABEL_PROJECT
from .const import LABEL_SERVICE
class Container(object):
"""
Represents a Docker container, constructed from the... |
thomaswilley/vnode | refs/heads/master | vvm_node/vvm_pgadmin/config_local.py | 1 | SERVER_MODE = False
DEFAULT_SERVER = '0.0.0.0'
DEFAULT_SERVER_PORT = 5051
LOG_FILE = '/var/log/pgadmin4/pgadmin4.log'
SQLITE_PATH = '/var/lib/pgadmin4/pgadmin4.db'
SESSION_DB_PATH = '/var/lib/pgadmin4/sessions'
STORAGE_DIR = '/var/lib/pgadmin4/storage'
|
jeromeb/cf-php-buildpack | refs/heads/master | lib/extension_helpers.py | 12 | # 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 ... |
Russell-IO/ansible | refs/heads/devel | test/runner/lib/__init__.py | 174 | """Support code for Ansible testing infrastructure."""
|
saurabh6790/medsynaptic-app | refs/heads/develop | selling/doctype/installation_note/__init__.py | 37694 | from __future__ import unicode_literals
|
GunnerJnr/_CodeInstitute | refs/heads/master | Stream-3/Full-Stack-Development/13.Stripe-Subscriptions/1.Setting-Up-A-Monthly-Payment-Plan/we_are_social/we_are_social/wsgi.py | 31 | """
WSGI config for we_are_social project.
It exposes the WSGI callable as a module-level variable named ``application``.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/howto/deployment/wsgi/
"""
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANG... |
Shrhawk/edx-platform | refs/heads/master | common/djangoapps/student/migrations/0021_remove_askbot.py | 188 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
ASKBOT_AUTH_USER_COLUMNS = (
'website',
'about',
'gold',
'email_isvalid',
'real_name',
'location',
'reputation',
'gravatar',
'bronze',
'last_seen',
... |
hgiemza/DIRAC | refs/heads/integration | WorkloadManagementSystem/private/Queues.py | 13 | _MIN = 60
_HOUR = 3600
_DAY = 86400
maxCPUSegments = [ 6 * _MIN, 30 * _MIN, 1 * _HOUR, 6 * _HOUR, 12 * _HOUR, 1 * _DAY, 2 * _DAY, 3 * _DAY, 4 * _DAY, 6 * _DAY, 8 * _DAY, 10 * _DAY, int( 12.5 * _DAY ) ]
|
STealthy-and-haSTy/SublimeScraps | refs/heads/master | quick_panel/nested_panel.py | 1 | import sublime
import sublime_plugin
# The sublime plugin API includes a method for showing a quick panel, which
# allows you to select from a list of items while doing some optional filtering
# if desired using the same fuzzy matching as you can in the command palette.
#
# This file shows an example of using a quick ... |
s0enke/boto | refs/heads/develop | tests/mturk/support.py | 136 | import sys
# use unittest2 under Python 2.6 and earlier.
if sys.version_info >= (2, 7):
import unittest
else:
import unittest2 as unittest
|
40223221/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/browser/markdown.py | 623 | # -*- coding: utf-8 -*-
try:
import _jsre as re
except:
import re
import random
import time
letters = 'abcdefghijklmnopqrstuvwxyz'
letters += letters.upper()+'0123456789'
class URL:
def __init__(self,src):
elts = src.split(maxsplit=1)
self.href = elts[0]
self.alt = ''
if ... |
liqd/adhocracy | refs/heads/develop | src/adhocracy/model/tag.py | 4 | from datetime import datetime
import logging
from sqlalchemy import Table, Column, Integer, Unicode, DateTime, func
from sqlalchemy.orm import reconstructor, aliased
import meta
import instance_filter as ifilter
log = logging.getLogger(__name__)
tag_table = Table(
'tag', meta.data,
Column('id', Integer, pr... |
JetBrains/intellij-community | refs/heads/master | python/testData/inspections/RemoveDecorator_after.py | 83 | class C:
@classmethod
def foo(self):
pass
def foo(self):
print ("Constructor C was called") |
specter4mjy/you-get | refs/heads/develop | src/you_get/extractors/dongting.py | 19 | # -*- coding: utf-8 -*-
__all__ = ['dongting_download']
from ..common import *
_unit_prefixes = 'bkmg'
def parse_size(size):
m = re.match(r'([\d.]+)(.(?:i?B)?)', size, re.I)
if m:
return int(float(m.group(1)) * 1024 **
_unit_prefixes.index(m.group(2).lower()))
else:
re... |
gopal1cloud/neutron | refs/heads/master | neutron/tests/unit/vmware/nsxlib/test_queue.py | 27 | # Copyright (c) 2014 VMware, 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 writi... |
nealtodd/django | refs/heads/master | django/utils/cache.py | 220 | """
This module contains helper functions for controlling caching. It does so by
managing the "Vary" header of responses. It includes functions to patch the
header of response objects directly and decorators that change functions to do
that header-patching themselves.
For information on the Vary header, see:
http... |
kouaw/CouchPotatoServer | refs/heads/develop | libs/requests/packages/chardet/euckrprober.py | 2930 | ######################## 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... |
vegitron/ansible | refs/heads/devel | contrib/inventory/vagrant.py | 150 | #!/usr/bin/env python
"""
Vagrant external inventory script. Automatically finds the IP of the booted vagrant vm(s), and
returns it under the host group 'vagrant'
Example Vagrant configuration using this script:
config.vm.provision :ansible do |ansible|
ansible.playbook = "./provision/your_playbook.yml"
... |
WadeYuChen/django-oscar | refs/heads/master | src/oscar/apps/promotions/app.py | 33 | from django.conf.urls import url
from oscar.core.application import Application
from oscar.core.loading import get_class
from oscar.apps.promotions.models import PagePromotion, KeywordPromotion
class PromotionsApplication(Application):
name = 'promotions'
home_view = get_class('promotions.views', 'HomeView'... |
boland1992/SeisSuite | refs/heads/master | build/lib.linux-x86_64-2.7/seissuite/response/resp.py | 6 | # -*- coding: utf-8 -*-
"""
Created on Mon Aug 24 10:23:55 2015
@author: boland
Goal of this code is to achieve a list of all intrumentation make and models
with combined frequency response ranges for each channel in each instrument
to make a database of which instruments a seismologist should use for a
given period... |
Locu-Unofficial/locu-python | refs/heads/master | locu/api.py | 1 | from urllib import urlencode
try:
import simplejson as json
except :
import json
from httplib2 import Http
__all__ = [
'VenueApiClient',
'MenuItemApiClient',
]
################################################################################
class HttpException(Exception):
def __init__(self, cod... |
pombreda/preprocess | refs/heads/master | test/inputs/error.py | 11 | #!python
# #define ONE 1
# #define ZERO 0
# #define UN 1
if __name__ == '__main__':
# #if ONE
print "hi"
# #error This is an error string.
# #endif
print "bye"
|
isrohutamahopetechnik/MissionPlanner | refs/heads/master | Lib/site-packages/numpy/lib/financial.py | 81 | # Some simple financial calculations
# patterned after spreadsheet computations.
# There is some complexity in each function
# so that the functions behave like ufuncs with
# broadcasting and being able to be called with scalars
# or arrays (or other sequences).
import numpy as np
__all__ = ['fv', 'pmt', 'nper', ... |
trondhindenes/ansible | refs/heads/devel | lib/ansible/modules/cloud/google/gcp_compute_router_facts.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... |
zhanglab/psamm | refs/heads/master | psamm/commands/formulacheck.py | 1 | # This file is part of PSAMM.
#
# PSAMM 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.
#
# PSAMM is distributed in the hope that it wi... |
rossgoodwin/musapaedia | refs/heads/master | musapaedia/en/parser/nltk_lite/parse/pchart.py | 9 | # Natural Language Toolkit: Probabilistic Chart Parsers
#
# Copyright (C) 2001-2006 University of Pennsylvania
# Author: Edward Loper <edloper@gradient.cis.upenn.edu>
# Steven Bird <sb@csse.unimelb.edu.au>
# URL: <http://nltk.sf.net>
# For license information, see LICENSE.TXT
"""
Classes and interfaces for ass... |
k-team/KHome | refs/heads/master | modules/co_sensor/local_module.py | 1 | #-*- coding: utf-8 -*-
import module
from module import use_module
import fields
class COSensor(module.Base):
update_rate = 1000
public_name = 'Capteur CO'
alarm = use_module('Alarm')
class co(fields.sensor.CO,
fields.syntax.Numeric,
fields.io.Graphable,
fields.pe... |
cloudera/hue | refs/heads/master | desktop/core/ext-py/Mako-1.0.7/mako/lookup.py | 39 | # mako/lookup.py
# Copyright (C) 2006-2016 the Mako authors and contributors <see AUTHORS file>
#
# This module is part of Mako and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import os
import stat
import posixpath
import re
from mako import exceptions, util
from mako.templa... |
opennode/waldur-mastermind | refs/heads/develop | src/waldur_freeipa/tests/test_profiles.py | 1 | from unittest import mock
from ddt import data, ddt
from python_freeipa import exceptions as freeipa_exceptions
from rest_framework import status, test
from waldur_core.structure.tests import factories as structure_factories
from waldur_freeipa import tasks
from waldur_freeipa.backend import FreeIPABackend
from waldu... |
apocquet/django | refs/heads/master | tests/auth_tests/test_management.py | 116 | from __future__ import unicode_literals
import locale
import sys
from datetime import date
from django.apps import apps
from django.contrib.auth import management, models
from django.contrib.auth.checks import check_user_model
from django.contrib.auth.management import create_permissions
from django.contrib.auth.mana... |
anneline/Bika-LIMS | refs/heads/hotfix/next | bika/lims/upgrade/to3013.py | 2 | from Acquisition import aq_inner
from Acquisition import aq_parent
from bika.lims.permissions import *
from Products.Archetypes.BaseContent import BaseContent
from bika.lims.upgrade import stub
def upgrade(tool):
portal = aq_parent(aq_inner(tool))
setup = portal.portal_setup
setup.runImportStepFromProfil... |
TNT-Samuel/Coding-Projects | refs/heads/master | DNS Server/Source - Copy/Lib/distutils/msvccompiler.py | 21 | """distutils.msvccompiler
Contains MSVCCompiler, an implementation of the abstract CCompiler class
for the Microsoft Visual Studio.
"""
# Written by Perry Stoll
# hacked by Robin Becker and Thomas Heller to do a better job of
# finding DevStudio (through the registry)
import sys, os
from distutils.errors import \
... |
parin2092/cook | refs/heads/master | codechef/january/1.py | 2 | def givemered(n,k,mi,bi):
max_profit = -1
for i in xrange(n):
profit = int(k/mi[i]) * bi[i]
if profit > max_profit:
max_profit = profit
return max_profit
def processTc():
[n,k] = map(int,(raw_input().split()))
mi = map(int,(raw_input().split()))
bi = map(int,(raw_input().split()))
return givemered(n,k,mi... |
Geheimorganisation/sltv | refs/heads/master | sltv/ui/pip_widget.py | 5 | # -*- coding: utf-8 -*-
# Copyright (C) 2010 Holoscópio Tecnologia
# Author: Luciana Fujii Pontello <luciana@holoscopio.com>
#
# 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... |
go-bears/nupic | refs/heads/master | examples/network/hierarchy_network_demo.py | 31 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2015, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions ... |
code-google-com/openshadinglanguage | refs/heads/master | testsuite/array-derivs/run.py | 132 | #!/usr/bin/python
import os
import sys
path = ""
command = ""
if len(sys.argv) > 2 :
os.chdir (sys.argv[1])
path = sys.argv[2] + "/"
# A command to run
command = path + "oslc/oslc test.osl > out.txt"
command = command + "; " + path + "testshade/testshade -g 2 2 test >> out.txt"
# Outputs to check against r... |
EvanK/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_mysqlserver_facts.py | 5 | #!/usr/bin/python
#
# Copyright (c) 2017 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',
... |
inpfss/my-code-work | refs/heads/master | python-scripts/nltk/excuses-analysis/tactic_usage_stat_5.py | 1 | """
What communication tactics are most frequently used in the US, UK or Canada
"""
# statistic class
from nltk import ConditionalFreqDist
# import our helper class to access excuses data from XML tree
from excuses_helper import ExcusesHelper
# need in order to read correctly excuses file in UTF-8 encoding
... |
katsikas/gnuradio | refs/heads/master | gnuradio-core/src/python/gnuradio/gr/qa_short_to_float.py | 18 | #!/usr/bin/env python
#
# Copyright 2011,2012 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your optio... |
tonghuashuai/OnlyRSSWeb | refs/heads/master | _new/model/db.py | 1 | #!/usr/bin/env python
#coding: utf-8
import mongokit
from mongokit import Document, Connection
from mongokit.document import DocumentProperties
from bson.objectid import ObjectId
from misc.config import MONGO_CONFIG, DB
_iterables = (list, tuple, set, frozenset)
mongo = Connection(**MONGO_CONFIG)
class CallableMi... |
hex108/docker-registry | refs/heads/master | depends/docker-registry-core/docker_registry/testing/driver.py | 30 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 Docker.
#
# 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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.