repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
sajeeshcs/nested_projects_keystone | refs/heads/master | keystone/common/sql/migrate_repo/versions/054_add_actor_id_index.py | 8 | # Copyright 2014 IBM Corp.
#
# 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, s... |
asedunov/intellij-community | refs/heads/master | python/lib/Lib/email/quopriMIME.py | 93 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Ben Gertzfield
# Contact: email-sig@python.org
"""Quoted-printable content transfer encoding per RFCs 2045-2047.
This module handles the content transfer encoding method defined in RFC 2045
to encode US ASCII-like 8-bit data called `quoted-printable'. It... |
nickmoline/feedsanitizer | refs/heads/master | django/contrib/gis/tests/distapp/tests.py | 276 | import os
from decimal import Decimal
from django.db import connection
from django.db.models import Q
from django.contrib.gis.geos import GEOSGeometry, Point, LineString
from django.contrib.gis.measure import D # alias for Distance
from django.contrib.gis.tests.utils import oracle, postgis, spatialite, no_oracle, no_s... |
SamiHiltunen/invenio-ext | refs/heads/master | tests/test_ext_registry.py | 5 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015 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 your option) any... |
Carmezim/tensorflow | refs/heads/master | tensorflow/python/training/ftrl.py | 33 | # 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... |
hale36/SRTV | refs/heads/master | lib/guessit/patterns/extension.py | 31 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# GuessIt - A library for guessing information from filenames
# Copyright (c) 2013 Nicolas Wack <wackou@gmail.com>
# Copyright (c) 2013 Rémi Alvergnat <toilal.dev@gmail.com>
# Copyright (c) 2011 Ricard Marxer <ricardmp@gmail.com>
#
# GuessIt is free software; you can redi... |
jxs/servo | refs/heads/master | tests/wpt/css-tests/tools/wptserve/wptserve/ranges.py | 329 | from utils import HTTPException
class RangeParser(object):
def __call__(self, header, file_size):
prefix = "bytes="
if not header.startswith(prefix):
raise HTTPException(416, message="Unrecognised range type %s" % (header,))
parts = header[len(prefix):].split(",")
rang... |
yograterol/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/client.py | 831 | from django.db.backends.sqlite3.client import DatabaseClient
class SpatiaLiteClient(DatabaseClient):
executable_name = 'spatialite'
|
levis501/nupuck | refs/heads/master | models/r47x/model_0/model_params.py | 1 | # ----------------------------------------------------------------------
# Numenta Platform for Intelligent Computing (NuPIC)
# Copyright (C) 2013, Numenta, Inc. Unless you have an agreement
# with Numenta, Inc., for a separate license for this software code, the
# following terms and conditions apply:
#
# This progra... |
nrhine1/scikit-learn | refs/heads/master | sklearn/ensemble/tests/test_voting_classifier.py | 140 | """Testing for the boost module (sklearn.ensemble.boost)."""
import numpy as np
from sklearn.utils.testing import assert_almost_equal
from sklearn.utils.testing import assert_equal
from sklearn.linear_model import LogisticRegression
from sklearn.naive_bayes import GaussianNB
from sklearn.ensemble import RandomForestCl... |
mlperf/training_results_v0.7 | refs/heads/master | DellEMC/benchmarks/transformer/implementation/pytorch/fairseq/tasks/language_modeling.py | 5 | # Copyright (c) 2017-present, Facebook, Inc.
# All rights reserved.
#
# This source code is licensed under the license found in the LICENSE file in
# the root directory of this source tree. An additional grant of patent rights
# can be found in the PATENTS file in the same directory.
import itertools
import numpy as n... |
JCROM-Android/jcrom_external_chromium_org | refs/heads/kitkat | tools/telemetry/telemetry/page/csv_page_measurement_results.py | 23 | # Copyright (c) 2012 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.
import csv
from telemetry.page import page_measurement_results
class CsvPageMeasurementResults(
page_measurement_results.PageMeasurementResults):
... |
kiyoto/statsmodels | refs/heads/master | statsmodels/nonparametric/kernel_density.py | 21 | """
Multivariate Conditional and Unconditional Kernel Density Estimation
with Mixed Data Types.
References
----------
[1] Racine, J., Li, Q. Nonparametric econometrics: theory and practice.
Princeton University Press. (2007)
[2] Racine, Jeff. "Nonparametric Econometrics: A Primer," Foundation
and Trends in Eco... |
belteshassar/cartopy | refs/heads/master | lib/cartopy/feature.py | 3 | # (C) British Crown Copyright 2011 - 2016, Met Office
#
# This file is part of cartopy.
#
# cartopy 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 3 of the License, or
# (at your option)... |
n0max/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/wptserve/wptserve/router.py | 138 | import itertools
import re
import types
from .logger import get_logger
any_method = object()
class RouteTokenizer(object):
def literal(self, scanner, token):
return ("literal", token)
def slash(self, scanner, token):
return ("slash", None)
def group(self, scanner, token):
return... |
c0710204/edx-platform | refs/heads/master | lms/djangoapps/courseware/migrations/0003_done_grade_cache.py | 194 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# NOTE (vshnayder): This constraint has the wrong field order, so it doesn't actually
# do anything in sqlite. M... |
toddetzel/flask-admin | refs/heads/master | flask_admin/tests/sqla/__init__.py | 10 | from flask import Flask
from flask_admin import Admin
from flask_sqlalchemy import SQLAlchemy
def setup():
app = Flask(__name__)
app.config['SECRET_KEY'] = '1'
app.config['CSRF_ENABLED'] = False
app.config['SQLALCHEMY_DATABASE_URI'] = 'sqlite:///'
app.config['SQLALCHEMY_ECHO'] = True
db = SQL... |
SatoshiNXSimudrone/sl4a-damon-clone | refs/heads/master | python/src/Mac/Modules/dlg/dlgsupport.py | 35 | # This script generates the Dialogs interface for Python.
# It uses the "bgen" package to generate C code.
# It execs the file dlggen.py which contain the function definitions
# (dlggen.py was generated by dlgscan.py, scanning the <Dialogs.h> header file).
from macsupport import *
# Create the type objects
DialogPtr... |
dsgouda/autorest | refs/heads/master | src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/BodyComplex/auto_rest_complex_test_service/models/auto_rest_complex_test_service_enums.py | 31 | # 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 ... |
bloyl/mne-python | refs/heads/placeholder | mne/io/hitachi/__init__.py | 4 | """fNIRS module for conversion to FIF."""
# Author: Eric Larson <larson.eric.d@gmail.com>
#
# License: BSD (3-clause)
from .hitachi import read_raw_hitachi
|
mathLab/RBniCS | refs/heads/master | tests/performance/backends/online/numpy/test_numpy_matrix_assembly_with_slicing.py | 1 | # Copyright (C) 2015-2021 by the RBniCS authors
#
# This file is part of RBniCS.
#
# SPDX-License-Identifier: LGPL-3.0-or-later
import pytest
from numpy import isclose
from numpy.linalg import norm
from rbnics.backends import product as factory_product, sum as factory_sum
from rbnics.backends.online import OnlineAffin... |
toontownfunserver/Panda3D-1.9.0 | refs/heads/master | python/Lib/idlelib/textView.py | 71 | """Simple text browser for IDLE
"""
from Tkinter import *
import tkMessageBox
class TextViewer(Toplevel):
"""A simple text viewer dialog for IDLE
"""
def __init__(self, parent, title, text, modal=True):
"""Show the given text in a scrollable window with a 'close' button
"""
Topl... |
python-bonobo/bonobo | refs/heads/develop | bonobo/execution/contexts/__init__.py | 2 | """
Execution Contexts are objects that wraps the stateless data-structures (graphs and nodes) during a job execution to
keep an eye on their context/state (from the simplest things like i/o statistics to lifecycle and custom userland
state).
"""
from bonobo.execution.contexts.graph import GraphExecutionContext
from ... |
ffu/DSA-3.2.2 | refs/heads/master | gnuradio-examples/python/apps/hf_radio/startup.py | 86 | from radio import *
|
damdam-s/OpenUpgrade | refs/heads/8.0 | addons/document/report/document_report.py | 341 | # -*- 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... |
greggian/TapdIn | refs/heads/master | django/contrib/gis/gdal/prototypes/errcheck.py | 1 | """
This module houses the error-checking routines used by the GDAL
ctypes prototypes.
"""
from ctypes import c_void_p, string_at
from django.contrib.gis.gdal.error import check_err, OGRException, SRSException
from django.contrib.gis.gdal.libgdal import lgdal
# Helper routines for retrieving pointers and/or ... |
Betaboxguugi/P6 | refs/heads/master | code/test/test_program_2.py | 1 | __author__ = 'Alexander'
"User forgets to declare dimensions and fact tables "
import pygrametl
from pygrametl.datasources import SQLSource
from pygrametl.tables import Dimension, FactTable
import sqlite3
input_conn = sqlite3.connect('input.db')
input2_conn = sqlite3.connect('input2.db')
output_conn = sqlite3.connect... |
40023255/-w16b_test | refs/heads/master | static/Brython3.1.3-20150514-095342/Lib/encodings/aliases.py | 726 | """ Encoding Aliases Support
This module is used by the encodings package search function to
map encodings names to module names.
Note that the search function normalizes the encoding names before
doing the lookup, so the mapping will have to map normalized
encoding names to module names.
Con... |
kamalx/edx-platform | refs/heads/release | lms/djangoapps/certificates/badge_handler.py | 32 | """
BadgeHandler object-- used to award Badges to users who have completed courses.
"""
import hashlib
import logging
import mimetypes
from eventtracking import tracker
import requests
from django.template.defaultfilters import slugify
from django.utils.translation import ugettext as _
from django.conf import settings... |
thirdwing/mxnet | refs/heads/master | example/speech-demo/train_lstm_proj.py | 25 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
tpounds/ansible-modules-core | refs/heads/devel | cloud/openstack/os_network.py | 21 | #!/usr/bin/python
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2013, Benno Joy <benno@ansible.com>
#
# This module 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 vers... |
mglukhikh/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/utils/synch.py | 376 | """
Synchronization primitives:
- reader-writer lock (preference to writers)
(Contributed to Django by eugene@lazutkin.com)
"""
try:
import threading
except ImportError:
import dummy_threading as threading
class RWLock:
"""
Classic implementation of reader-writer lock with preference to writers.... |
frankvdp/django | refs/heads/master | tests/validation/tests.py | 71 | from django import forms
from django.core.exceptions import NON_FIELD_ERRORS
from django.test import TestCase
from django.utils.functional import lazy
from . import ValidationTestCase
from .models import (
Article, Author, GenericIPAddressTestModel, GenericIPAddrUnpackUniqueTest,
ModelToValidate,
)
class Bas... |
indictranstech/frappe | refs/heads/develop | frappe/templates/pages/about.py | 62 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
def get_context(context):
return { "doc": frappe.get_doc("About Us Settings", "About Us Settings") }
|
mxmaslin/Test-tasks | refs/heads/master | tests_django/apps/image_sizer/models.py | 1 | import os
from django.db import models
class Image(models.Model):
file = models.ImageField(
upload_to='image_sizer/images/%Y/%m/%d',
null=True)
download = models.URLField(null=True)
def __str__(self):
return f'{self.pk, self.file.url}'
class Resize(models.Model):
width = mo... |
pbrod/numpy | refs/heads/master | numpy/lib/tests/test_utils.py | 9 | import inspect
import sys
import pytest
from numpy.core import arange
from numpy.testing import assert_, assert_equal, assert_raises_regex
from numpy.lib import deprecate, deprecate_with_doc
import numpy.lib.utils as utils
from io import StringIO
@pytest.mark.skipif(sys.flags.optimize == 2, reason="Python running -... |
GbalsaC/bitnamiP | refs/heads/master | django-wiki/django_notify/views.py | 2 | # -*- coding: utf-8 -*-
from django_notify.decorators import json_view, login_required_ajax
from django_notify import models
from django.contrib.auth.decorators import login_required
from django.shortcuts import redirect, get_object_or_404
@login_required_ajax
@json_view
def get_notifications(request, latest_id=None,... |
julian-klode/python-apt | refs/heads/debian/sid | tests/old/test_enhances.py | 2 | #!/usr/bin/python
import apt
cache = apt.Cache()
for pkg in cache:
if pkg.installed and pkg.installed.enhances:
s = "%s enhances:" % pkg.name
for or_list in pkg.installed.enhances:
for enhances in or_list.or_dependencies:
s += " %s" % enhances.name
if (... |
dwcarder/sdn-ix-demo | refs/heads/master | exabgp-3.4.3/lib/exabgp/bgp/message/update/nlri/vpls.py | 3 | # encoding: utf-8
"""
vpls.py
Created by Nikita Shirokov on 2014-06-16.
Copyright (c) 2014-2014 Nikita Shirokov. All rights reserved.
Copyright (c) 2014-2014 Exa Networks. All rights reserved.
"""
from struct import unpack
from struct import pack
from exabgp.protocol.ip import IP
from exabgp.protocol.family import AF... |
exelearning/iteexe | refs/heads/master | exe/export/websiteexport.py | 1 | # ===========================================================================
# eXe
# Copyright 2004-2005, University of Auckland
# Copyright 2004-2008 eXe Project, http://eXeLearning.org/
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... |
jmesteve/saas3 | refs/heads/master | openerp/addons_extra/l10n_es_fiscal_year_closing/__openerp__.py | 3 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (c) 2009 Zikzakmedia S.L. (http://zikzakmedia.com) All Rights Reserved.
# Jordi Esteve <jesteve@zikzakmedia.com>
# Copyright (c) ... |
AndrewSallans/osf.io | refs/heads/develop | framework/logging/__init__.py | 61 | import logging
import logging.config
try:
import colorlog
use_color = True
except ImportError:
use_color = False
from website import settings
handler = logging.StreamHandler()
if settings.DEBUG_MODE and use_color:
log_colors = colorlog.default_log_colors
log_colors['DEBUG'] = 'cyan'
formatt... |
zhangxq5012/sky_engine | refs/heads/master | sky/tools/webkitpy/layout_tests/reftests/extract_reference_link_unittest.py | 66 | # Copyright (C) 2011 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... |
vipmike007/virt-test | refs/heads/master | virttest/asset.py | 9 | import urllib2
import logging
import os
import glob
from autotest.client import utils, test_config
from autotest.client.shared import git, error
import data_dir
import re
def get_known_backends():
"""
Return virtualization backends supported by virt-test.
"""
# Generic means the test can run in multip... |
lil-cain/satori | refs/heads/ohai_solo_install_dir | satori/tests/test_formats_text.py | 3 | # pylint: disable=C0103,R0904
# 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 i... |
chaostic/Hima-M9 | refs/heads/master | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... |
DanielNeugebauer/adhocracy | refs/heads/develop | src/adhocracy/controllers/comment.py | 4 | import logging
import formencode
from formencode import htmlfill, Invalid, validators
from pylons import request, tmpl_context as c
from pylons.controllers.util import redirect
from pylons.decorators import validate
from pylons.i18n import _
from adhocracy import forms, model
from adhocracy.lib import democracy
from... |
bailey1234/hyeri7846 | refs/heads/master | lib/itsdangerous.py | 296 | # -*- coding: utf-8 -*-
"""
itsdangerous
~~~~~~~~~~~~
A module that implements various functions to deal with untrusted
sources. Mainly useful for web applications.
:copyright: (c) 2011 by Armin Ronacher and the Django Software Foundation.
:license: BSD, see LICENSE for more details.
"""
imp... |
kislayabhi/pgmpy | refs/heads/dev | pgmpy/models/__init__.py | 1 | from .BayesianModel import *
from .NoisyOrModel import *
from .MarkovModel import *
from .FactorGraph import *
from .JunctionTree import *
__all__ = ['BayesianModel',
'NoisyOrModel',
'MarkovModel',
'FactorGraph',
'JunctionTree'
]
|
Zhaoyanzhang/-myflasky | refs/heads/master | venv/lib/python2.7/site-packages/flask_bootstrap/__init__.py | 17 | #!/usr/bin/env python
# coding=utf8
import re
from flask import Blueprint, current_app, url_for
try:
from wtforms.fields import HiddenField
except ImportError:
def is_hidden_field_filter(field):
raise RuntimeError('WTForms is not installed.')
else:
def is_hidden_field_filter(field):
ret... |
TangentMicroServices/IncomingTransactionService | refs/heads/master | hipchat/serializers.py | 1 | from rest_framework import serializers
from webhook.models import IncomingRequest
class IncomingRequestSerializer(serializers.ModelSerializer):
class Meta:
model = IncomingRequest
fields = ('source', 'incoming_url', 'payload', 'user')
|
repotvsupertuga/tvsupertuga.repository | refs/heads/master | script.module.openscrapers/lib/openscrapers/sources_openscrapers/de/proxer.py | 1 | # -*- coding: UTF-8 -*-
# ..#######.########.#######.##....#..######..######.########....###...########.#######.########..######.
# .##.....#.##.....#.##......###...#.##....#.##....#.##.....#...##.##..##.....#.##......##.....#.##....##
# .##.....#.##.....#.##......####..#.##......##......##.....#..##...##.##.....#.... |
coagulant/django-storages-py3 | refs/heads/py3 | storages/backends/s3.py | 2 | import os
import mimetypes
import warnings
from io import StringIO
from django.conf import settings
from django.core.files.base import File
from django.core.files.storage import Storage
from django.core.exceptions import ImproperlyConfigured
try:
from ..utils.S3 import AWSAuthConnection, QueryStringAuthGenerator... |
andrewpaulreeves/soapy | refs/heads/master | soapy/pyqtgraph/parametertree/Parameter.py | 24 | from ..Qt import QtGui, QtCore
import os, weakref, re
from ..pgcollections import OrderedDict
from ..python2_3 import asUnicode, basestring
from .ParameterItem import ParameterItem
PARAM_TYPES = {}
PARAM_NAMES = {}
def registerParameterType(name, cls, override=False):
global PARAM_TYPES
if name in PARAM_TYPES... |
zerolab/wagtail | refs/heads/main | wagtail/utils/version.py | 15 |
# This file is heavily inspired by django.utils.version
def get_version(version):
"""Return a PEP 440-compliant version number from VERSION."""
version = get_complete_version(version)
# Now build the two parts of the version number:
# main = X.Y[.Z]
# sub = .devN - for pre-alpha releases
# ... |
mblachford/conductor | refs/heads/master | lib/python2.7/site-packages/pip/vendor/distlib/version.py | 79 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2013 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""
Implementation of a flexible versioning scheme providing support for PEP-386,
distribute-compatible and semantic versioning.
"""
import re
from .compat import string_types
__all__ = ['Nor... |
Tafkas/fritzbox-munin | refs/heads/master | fritzbox_uptime.py | 1 | #!/usr/bin/env python3
"""
fritzbox_uptime - A munin plugin for Linux to monitor AVM Fritzbox
Copyright (C) 2015 Christian Stade-Schuldt
Author: Christian Stade-Schuldt
Like Munin, this plugin is licensed under the GNU GPL v2 license
http://www.opensource.org/licenses/GPL-2.0
Add the following section to yo... |
DanielSBrown/osf.io | refs/heads/develop | website/project/__init__.py | 10 | # -*- coding: utf-8 -*-
import uuid
from .model import Node, PrivateLink
from framework.mongo.utils import from_mongo
from modularodm import Q
from modularodm.exceptions import ValidationValueError
from website.exceptions import NodeStateError
from website.util.sanitize import strip_html
def show_diff(seqm):
"""U... |
hbrunn/OpenUpgrade | refs/heads/master | openerp/modules/registry.py | 37 | # -*- 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 GNU... |
binoculars/osf.io | refs/heads/develop | osf/migrations/0024_migrate_subject_parents_to_parent.py | 28 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from django.db import connection, migrations, models
from osf.models.validators import validate_subject_hierarchy_length
logger = logging.getLogger(__name__)
def add_custom_mapping_constraint(state, schema):
sql = """
ALTER T... |
hubsaysnuaa/odoo | refs/heads/8.0 | addons/purchase/__openerp__.py | 259 | # -*- 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... |
fabrickit/fabkit | refs/heads/master | core/job/__init__.py | 1 | # noqa
from base import job
job.__doc__ = """
Start Job.
## Examples
```
$ fab node:test/api job
```
"""
|
foss-transportationmodeling/rettina-server | refs/heads/master | flask/lib/python2.7/site-packages/pbr/tests/test_version.py | 41 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 Red Hat, Inc.
# Copyright 2012-2013 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 Licen... |
bsundsrud/aptly | refs/heads/master | system/t12_api/__init__.py | 10 | """
Testing aptly REST API
"""
from .repos import *
from .files import *
from .publish import *
from .version import *
from .graph import *
from .snapshots import *
from .packages import *
|
JWDebelius/scikit-bio | refs/heads/master | skbio/draw/_distributions.py | 1 | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... |
levixie/zulip | refs/heads/master | zerver/management/commands/send_stats.py | 125 | from __future__ import absolute_import
from django.core.management.base import BaseCommand
from django.conf import settings
class Command(BaseCommand):
help = """Send some stats to statsd."""
def add_arguments(self, parser):
parser.add_argument('operation', metavar='<operation>', type=str,
... |
Magicked/crits | refs/heads/master | crits/samples/urls.py | 4 | from django.conf.urls import url
from . import views
urlpatterns = [
url(r'^upload/$', views.upload_file, name='crits-samples-views-upload_file'),
url(r'^upload/(?P<related_md5>\w+)/$', views.upload_file, name='crits-samples-views-upload_file'),
url(r'^upload_list/(?P<filename>[\S ]+)/(?P<md5s... |
tlatzko/spmcluster | refs/heads/master | .tox/clean/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/charsetgroupprober.py | 2928 | ######################## 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 ... |
DimensionalScoop/kautschuk | refs/heads/master | tex-table-generator/Doku table_py/pyCode/Beispiel2.py | 1 | write('build/Tabelle_b.tex', make_table(
[Wert_b, C2*1e9, R2, R34, Rx, Cx*1e9], [0, 1, 1, 1, 1, 1]))
|
zkota/pyblio-1.3 | refs/heads/master | Legacy/Autoload.py | 3 | # This file is part of pybliographer
#
# Copyright (C) 1998-2004 Frederic GOBRY
# Email : gobry@pybliographer.org
#
# 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 t... |
Omegaphora/external_chromium_org | refs/heads/lp5.1 | tools/json_schema_compiler/json_parse.py | 139 | # Copyright (c) 2012 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.
import json
import os
import sys
_FILE_PATH = os.path.dirname(os.path.realpath(__file__))
_SYS_PATH = sys.path[:]
try:
_COMMENT_EATER_PATH = os.path.j... |
jorik041/plaso | refs/heads/master | tests/parsers/winreg_plugins/services.py | 1 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""This file contains tests for Services Windows Registry plugin."""
import unittest
from plaso.formatters import winreg as _ # pylint: disable=unused-import
from plaso.lib import timelib
from plaso.parsers.winreg_plugins import services
from tests.parsers.winreg_plugins im... |
mlorbetske/PTVS | refs/heads/master | Python/Tests/TestData/DjangoTemplateCodeIntelligence/manage.py | 68 | #!/usr/bin/env python
from django.core.management import execute_manager
import imp
try:
imp.find_module('settings') # Assumed to be in the same directory.
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've custo... |
andrewyoung1991/supriya | refs/heads/master | supriya/tools/ugentools/HPZ2.py | 1 | # -*- encoding: utf-8 -*-
from supriya.tools.ugentools.LPZ2 import LPZ2
class HPZ2(LPZ2):
r'''A two zero fixed midcut filter.
::
>>> source = ugentools.In.ar(bus=0)
>>> hpz_2 = ugentools.HPZ2.ar(
... source=source,
... )
>>> hpz_2
HPZ2.ar()
'''
... |
presto8/mplayer.py | refs/heads/master | mplayer/async.py | 6 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2011 Darwin M. Bautista <djclue917@gmail.com>
#
# This file is part of mplayer.py.
#
# mplayer.py 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 v... |
ieguinoa/tools-iuc | refs/heads/master | tools/circos/karyotype-colors.py | 15 | #!/usr/bin/env python
import sys
highest = int(sys.argv[1])
for idx in range(highest + 1):
sys.stdout.write(
"chr{idx}color = lch(66,104,{pos})\n".format(
idx=idx, pos=int(float(idx) / highest * 360)
)
)
|
flebel/rtsp2snapshot | refs/heads/master | rtsp2snapshot.py | 1 | #!/usr/bin/env python
import io
import platform
import shlex
import subprocess
from flask import Flask, request, send_file, send_from_directory
app = Flask(__name__)
tmp_dir = '/tmp/'
tmp_filename = 'snapshot.jpg'
@app.route('/<path:url>')
def snapshot(url):
freebsd_platform = platform.system() == 'FreeBSD'
... |
ricardodani/django-simple-url-shortner | refs/heads/master | simple_url_shortner/simple_url_shortner/settings.py | 1 | """
Django settings for simple_url_shortner project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
SITE_URL = 'http://localhost:8000'
LOGIN_REDIRECT_URL = '/'
#... |
meyerson/luigi | refs/heads/master | luigi/task_status.py | 16 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# 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... |
vvv1559/intellij-community | refs/heads/master | python/testData/resolve/FStringNestedComprehensionSourcePart.py | 31 | xs = [42 for foo in range(10) for _ in f'{foo}']
<ref> |
chb/indivo_server | refs/heads/master | indivo/migrations/0002_lab_schema_update.py | 4 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'PHA.principal_ptr'
db.alter_column('indivo_pha', 'principal_ptr_id', self.gf('django.db.... |
OmeGak/indico | refs/heads/master | indico/modules/events/papers/controllers/base.py | 2 | # This file is part of Indico.
# Copyright (C) 2002 - 2019 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from flask import request, session
from werkzeug.exceptions impor... |
nanshihui/PocCollect | refs/heads/master | database/postgresql/__init__.py | 1 | KEYWORDS = ['postgresql', ]
def rules(head='',context='',ip='',port='',productname={},keywords='',hackinfo=''):
if 'postgresql' in context or 'postgresql' in head:
return True
else:
return False |
linkedin/simoorg | refs/heads/master | src/test/test_Journal.py | 7 | #
# Copyright 2015 LinkedIn Corp. 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 ... |
zhuwenping/python-for-android | refs/heads/master | python3-alpha/extra_modules/gdata/blogger/service.py | 264 | #!/usr/bin/python
#
# Copyright (C) 2007 Google 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 ... |
worstcase/blockade | refs/heads/dependabot/pip/pygments-2.7.4 | blockade/tests/test_audit.py | 2 | #
# Copyright (c) 2017, Stardog Union. <http://stardog.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... |
ellepannitto/LISA | refs/heads/master | AdjectiveCluster.py | 2 | #!/usr/bin/python
# coding= utf-8
class AdjectiveCluster:
def __init__(self, file_cluster):
self.mappa={}
self.leggi(file_cluster)
def leggi(self,file_cluster):
with open(file_cluster, 'r') as f:
for line in f:
lista=line.split("\t")
agg=lista[0].split('-')[0]
clusters=[el.replace("cluster:"... |
Karthikeyan-kkk/ooni-probe | refs/heads/master | ooni/deckgen/processors/namebench_dns_servers.py | 5 | import os
import csv
import GeoIP
from ooni.settings import config
class GeoIPDB(object):
_borg = {}
country = None
asn = None
def __init__(self):
self.__dict__ = self._borg
if not self.country:
try:
country_file = config.get_data_file_path('GeoIP/GeoIP.da... |
verdurin/easybuild-easyblocks | refs/heads/master | easybuild/easyblocks/c/chimera.py | 15 | # This file is an EasyBuild reciPY as per https://github.com/hpcugent/easybuild
# Author: Pablo Escobar Lopez
# Swiss Institute of Bioinformatics
# Biozentrum - University of Basel
"""
EasyBuild support for installing Chimera, implemented as an easyblock
"""
import os
from easybuild.framework.easyblock import EasyBlo... |
fccoelho/jogos_vorazes | refs/heads/master | estrategias/Vitoria.py | 1 | from estrategias.jogadores import Jogador
import numpy as np
class MeuJogador(Jogador):
def escolha_de_cacada(self, rodada, comida_atual, reputacao_atual, m, reputacoes_dos_jogadores):
total_jogadores = len(reputacoes_dos_jogadores)
if rodada==1:
escolhas = list(np.random.cho... |
jiangdaniel/sentence-autocomp | refs/heads/develop | server/unit_tests.py | 1 | import unittest
from sentences import Lexicon
from sentences import VariableSentence
from app import app
class FlaskrTestCase(unittest.TestCase):
def setUp(self):
pass
def test_temp(self):
temp = "temp"
self.assertEqual(temp, "temp")
self.assertNotEqual(temp, "not temp")
... |
rubencabrera/odoo | refs/heads/8.0 | addons/account/wizard/account_move_line_reconcile_select.py | 385 | # -*- 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... |
alphaBenj/zipline | refs/heads/master | tests/test_exception_handling.py | 8 | #
# Copyright 2013 Quantopian, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... |
gigq/flasktodo | refs/heads/master | application.py | 1 | from flask import Flask
app = Flask(__name__)
from google.appengine.ext import db
from google.appengine.api import users
from flask import redirect, url_for, request, render_template, abort, flash, get_flashed_messages
class Task(db.Model):
user = db.UserProperty()
name = db.StringProperty(required=True)
... |
imtapps/django-imt-fork | refs/heads/IMT | tests/modeltests/empty/tests.py | 51 | from __future__ import absolute_import
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_app
from django.test import TestCase
from django.test.utils import override_settings
from django.utils import six
from .models import Empty
class EmptyModelTests(TestCase):
def... |
freeman-lab/dask | refs/heads/master | dask/dataframe/utils.py | 1 | import pandas as pd
import numpy as np
from collections import Iterator
import toolz
def shard_df_on_index(df, divisions):
""" Shard a DataFrame by ranges on its index
Example
-------
>>> df = pd.DataFrame({'a': [0, 10, 20, 30, 40], 'b': [5, 4 ,3, 2, 1]})
>>> df
a b
0 0 5
1 ... |
jaw20/Crunchyroll-XML-Decoder | refs/heads/master | crunchy-xml-decoder/unidecode/x0ca.py | 253 | data = (
'jjael', # 0x00
'jjaelg', # 0x01
'jjaelm', # 0x02
'jjaelb', # 0x03
'jjaels', # 0x04
'jjaelt', # 0x05
'jjaelp', # 0x06
'jjaelh', # 0x07
'jjaem', # 0x08
'jjaeb', # 0x09
'jjaebs', # 0x0a
'jjaes', # 0x0b
'jjaess', # 0x0c
'jjaeng', # 0x0d
'jjaej', # 0x0e
'jjaec', # 0x... |
HEG-Arc/Appagoo | refs/heads/master | appagoo/allauth/socialaccount/providers/__init__.py | 7 | from django.conf import settings
from django.utils import importlib
class ProviderRegistry(object):
def __init__(self):
self.provider_map = {}
self.loaded = False
def get_list(self):
self.load()
return self.provider_map.values()
def register(self, cls):
self.provid... |
auduny/home-assistant | refs/heads/dev | homeassistant/components/volkszaehler/__init__.py | 36 | """The volkszaehler component."""
|
yashchandak/connectthedots | refs/heads/master | Devices/GatewayConnectedDevices/Hydrology/ECSensor.py | 13 | '''
Copyright (c) Microsoft Open Technologies, Inc. All rights reserved.
The MIT License (MIT)
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 limitati... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.