repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
cisco-openstack/networking-cisco | refs/heads/staging/libertyplus | networking_cisco/tests/unit/cisco/cfg_agent/__init__.py | 12133432 | |
dprince/tripleo-heat-templates | refs/heads/master | tools/merge-new-params-nic-config-script.py | 1 | #!/usr/bin/env python
# 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... |
aarestad/advent-of-code-2015 | refs/heads/master | 2015/12.py | 1 | import json
def parse_as_dict(d):
for v in d.values():
# reject dict if it has a 'red' value
if v == 'red': return
for v in d.values():
parse_object(v)
total_sum = 0
def parse_object(o):
global total_sum
if isinstance(o, dict):
parse_as_dict(o)
elif isinstance(... |
nlalevee/spark | refs/heads/master | python/pyspark/accumulators.py | 77 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... |
CoDEmanX/ArangoDB | refs/heads/devel | 3rdParty/V8-4.3.61/build/gyp/test/win/gyptest-midl-rules.py | 141 | #!/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.
"""
Handle default .idl build rules.
"""
import TestGyp
import sys
if sys.platform == 'win32':
test = TestGyp.TestGyp(formats=['msvs', ... |
chaffra/sympy | refs/heads/master | sympy/conftest.py | 89 | from __future__ import print_function, division
import sys
sys._running_pytest = True
from distutils.version import LooseVersion as V
import pytest
from sympy.core.cache import clear_cache
import re
sp = re.compile(r'([0-9]+)/([1-9][0-9]*)')
def process_split(session, config, items):
split = config.getoption("-... |
cnelsonsic/cardscript | refs/heads/master | cardscript/cards/__init__.py | 105 | from . import *
|
Celedhrim/persomov | refs/heads/master | libs/suds/mx/core.py | 211 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... |
bartTC/django-wakawaka | refs/heads/master | wakawaka/tests/test_page_list.py | 1 | from django.urls import reverse
from wakawaka.tests.base import BaseTestCase
class PageListTestCase(BaseTestCase):
"""
The Revision List displays all Pages.
"""
def test_pagelist(self):
# Create a couple of Wiki pages
self.create_wikipage('WikiIndex', 'Some content')
self.cre... |
gausspy/gausspy | refs/heads/master | docs/conf.py | 1 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
#
# Astropy documentation build configuration file.
#
# 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 file.
#
# All configurati... |
debasishm89/OpenXMolar | refs/heads/master | ExtDepLibs/winappdbg/breakpoint.py | 1 | #!/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2009-2016, Mario Vilas
# 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 cop... |
repotvsupertuga/repo | refs/heads/master | script.module.httplib2/lib/httplib2/__init__.py | 246 | from __future__ import generators
"""
httplib2
A caching http interface that supports ETags and gzip
to conserve bandwidth.
Requires Python 2.3 or later
Changelog:
2007-08-18, Rick: Modified so it's able to use a socks proxy if needed.
"""
__author__ = "Joe Gregorio (joe@bitworking.org)"
__copyright__ = "Copyright... |
iuliat/nova | refs/heads/master | nova/api/openstack/compute/contrib/extended_quotas.py | 100 | # Copyright 2013 Rackspace Hosting
# 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 require... |
kxgames/kxg | refs/heads/master | kxg/multiplayer.py | 1 | from .errors import *
from .forums import Forum, IdFactory
from .actors import Actor
class ClientForum(Forum):
def __init__(self, pipe):
super().__init__()
self.pipe = pipe
self.pipe.lock()
from collections import OrderedDict
self.actor_id_factory = None
self.resp... |
rue89-tech/edx-platform | refs/heads/master | common/djangoapps/datadog/startup.py | 229 | from django.conf import settings
from dogapi import dog_stats_api, dog_http_api
def run():
"""
Initialize connection to datadog during django startup.
Can be configured using a dictionary named DATADOG in the django
project settings.
"""
# By default use the statsd agent
options = {'st... |
humberos/android_kernel_samsung_smdk4412 | refs/heads/cm-10.2 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/SchedGui.py | 12980 | # SchedGui.py - Python extension for perf script, basic GUI code for
# traces drawing and overview.
#
# Copyright (C) 2010 by Frederic Weisbecker <fweisbec@gmail.com>
#
# This software is distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
... |
defrank/roshi | refs/heads/master | app/roshi/views/home.py | 1 | """
Roshi
~~~~~
Home views.
:copyright: (c) 2017 Derek M. Frank
:license: MPL-2.0
"""
from flask import Blueprint # type: ignore
from flask_mako import render_template # type: ignore
home: Blueprint = Blueprint('home', __name__)
@home.route('/')
def index() -> str:
"""
The most important view. Current... |
Arksine/atom-serialmonitor | refs/heads/master | lib/python/pyserialserver.py | 1 | import os
import socketio
import eventlet
from eventlet import wsgi
import serial
from serial.tools import list_ports
eventlet.monkey_patch()
class SerialReader(object):
def __init__(self, serial_instance, sio_in, sid_in):
self.serial = serial_instance
self.sio = sio_in
self.sid = sid_in... |
ahmadRagheb/goldenHR | refs/heads/master | erpnext/docs/user/manual/de/human-resources/__init__.py | 12133432 | |
simonneuville/runamic_server | refs/heads/master | djangoserver/server/logic/database/__init__.py | 12133432 | |
indictranstech/focal-erpnext | refs/heads/develop | selling/doctype/job_order/__init__.py | 12133432 | |
dariemp/odoo | refs/heads/8.0 | addons/point_of_sale/wizard/pos_open_statement.py | 387 | # -*- 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... |
MatthewWilkes/django-oscar | refs/heads/master | src/oscar/test/factories/__init__.py | 40 | # coding=utf-8
from decimal import Decimal as D
import random
import datetime
from django.conf import settings
from django.utils import timezone
from oscar.apps.offer import models
from oscar.apps.partner import strategy, availability, prices
from oscar.core.loading import get_class, get_model
from oscar.test.factori... |
MaTriXy/thumbor | refs/heads/master | thumbor/detectors/feature_detector/__init__.py | 14 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# thumbor imaging service
# https://github.com/globocom/thumbor/wiki
# Licensed under the MIT license:
# http://www.opensource.org/licenses/mit-license
# Copyright (c) 2011 globo.com timehome@corp.globo.com
try:
import cv
except ImportError:
import cv2.cv as cv
from... |
CydarLtd/ansible | refs/heads/devel | test/runner/lib/sanity.py | 27 | """Execute Ansible sanity tests."""
from __future__ import absolute_import, print_function
import glob
import json
import os
import re
from xml.etree.ElementTree import (
fromstring,
Element,
)
from lib.util import (
ApplicationError,
SubprocessError,
display,
run_command,
deepest_path,
... |
fin/fragdenstaat.at | refs/heads/master | fragdenstaat_at/fds_cms/management/commands/__init__.py | 12133432 | |
mvaled/sentry | refs/heads/master | src/sentry/utils/math.py | 3 | from __future__ import absolute_import, division
import math
def mean(values):
return sum(values) / len(values)
def stddev(values, mean_=None):
if mean_ is None:
mean_ = mean(values)
n = 0
for val in values:
n += (val - mean_) ** 2
n = math.sqrt(n / float(len(values) - 1))
... |
ticosax/django | refs/heads/master | tests/gis_tests/distapp/__init__.py | 12133432 | |
whn09/tensorflow | refs/heads/master | tensorflow/docs_src/__init__.py | 12133432 | |
appendjeff/pianobar-client | refs/heads/master | pianobarclient/__init__.py | 12133432 | |
redhat-openstack/neutron | refs/heads/f22-patches | neutron/plugins/oneconvergence/__init__.py | 12133432 | |
CenterForOpenScience/SHARE | refs/heads/develop | db/backends/__init__.py | 12133432 | |
reddymeghraj/showroom | refs/heads/master | erpnext/crm/doctype/lead/__init__.py | 12133432 | |
schwartzmx/ansible-modules-extras | refs/heads/devel | network/f5/bigip_pool.py | 63 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2013, Matt Hite <mhite@hotmail.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... |
justathoughtor2/atomicApe | refs/heads/encaged | cygwin/lib/python2.7/site-packages/pygments/lexers/rust.py | 22 | # -*- coding: utf-8 -*-
"""
pygments.lexers.rust
~~~~~~~~~~~~~~~~~~~~
Lexers for the Rust language.
:copyright: Copyright 2006-2015 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexer import RegexLexer, include, bygroups, words, default
from pygments... |
ondoheer/GOT-english | refs/heads/master | NPCgenerator.py | 1 | # -*- coding: utf-8 -*-
from random import randint
eventsGeneral = {"personal": [
"exiled from his homeland",
"roamed lost for a while",
"was kidnapped and escaped",
"was ransomed",
"was kidnapped and latter joined the kidnappers",
"is loved by someone of status or importance",
"is loved by... |
eino-makitalo/mezzanine | refs/heads/master | docs/conf.py | 6 | # -*- coding: utf-8 -*-
#
# Mezzanine documentation build configuration file, created by
# sphinx-quickstart on Wed Mar 10 07:20:42 2010.
#
# 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
# autogenerated file.
#
# A... |
jeffposnick/chromium-dashboard | refs/heads/master | bulkloader_helpers.py | 5 | import datetime
from google.appengine.ext import db
from google.appengine.api import users
def email_to_list():
def wrapper(value):
if value == '' or value is None or value == []:
return None
return [db.Email(x.strip()) for x in value.split(',')]
return wrapper
def finalize(input_dict, instance, ... |
jfbelisle/triosante | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/generator/__init__.py | 12133432 | |
joshblum/django-with-audit | refs/heads/master | django/contrib/localflavor/fi/__init__.py | 12133432 | |
pramodhkp/pes | refs/heads/master | pes/urls.py | 1 | from django.conf.urls import patterns, include, url
from college.views import login, logout, home, profile_student, dashboard_student, dashboard_teacher
from django.contrib import admin
admin.autodiscover()
from dajaxice.core import dajaxice_autodiscover, dajaxice_config
dajaxice_autodiscover()
urlpatterns = patter... |
ruzhytskyi/Koans | refs/heads/master | python3/runner/koan.py | 120 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import re
# Starting a classname or attribute with an underscore normally implies Private scope.
# However, we are making an exception for __ and ___.
__all__ = [ "__", "___", "____", "_____", "Koan" ]
__ = "-=> FILL ME IN! <=-"
class ___(Exception):
... |
infowantstobeseen/pyglet-darwincore | refs/heads/master | tests/test.py | 3 | #!/usr/bin/env python
'''Test framework for pyglet. Reads details of components and capabilities
from a requirements document, runs the appropriate unit tests.
How to Run the Tests
--------------------
::
python tests/test.py top app graphics clock resource # these all run automatically
python tests/test.py... |
jacques/connector | refs/heads/master | test/feedvalidator/feedvalidator/link.py | 2 | """$Id: link.py 573 2006-03-18 20:56:15Z rubys $"""
__author__ = "Sam Ruby <http://intertwingly.net/> and Mark Pilgrim <http://diveintomark.org/>"
__version__ = "$Revision: 573 $"
__date__ = "$Date: 2006-03-19 08:56:15 +1200 (Sun, 19 Mar 2006) $"
__copyright__ = "Copyright (c) 2002 Sam Ruby and Mark Pilgrim"
__license... |
rhyolight/nupic.son | refs/heads/master | tests/app/soc/logic/__init__.py | 12133432 | |
secynic/nfsinkhole | refs/heads/master | nfsinkhole/tests/docker/__init__.py | 12133432 | |
camilonova/sentry | refs/heads/master | tests/sentry/web/helpers/__init__.py | 12133432 | |
BRMWebDev/BRMFlask | refs/heads/master | brmflask/tests/utils/__init__.py | 12133432 | |
pomegranited/edx-platform | refs/heads/master | openedx/core/djangoapps/user_api/tests/__init__.py | 12133432 | |
vitan/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/middleware/cond_get_urls.py | 176 | from django.conf.urls import patterns
from django.http import HttpResponse
urlpatterns = patterns('',
(r'^$', lambda request: HttpResponse('root is here')),
)
|
abhattad4/Digi-Menu | refs/heads/master | django/contrib/gis/geometry/backend/__init__.py | 742 | from importlib import import_module
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
geom_backend = getattr(settings, 'GEOMETRY_BACKEND', 'geos')
try:
module = import_module('django.contrib.gis.geometry.backend.%s' % geom_backend)
except ImportError:
try:
modul... |
shsingh/ansible | refs/heads/devel | test/units/modules/network/fortios/test_fortios_firewall_vip.py | 21 | # Copyright 2019 Fortinet, 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, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... |
robynbergeron/ansible-modules-extras | refs/heads/devel | monitoring/bigpanda.py | 74 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... |
bobellis/ghost_blog | refs/heads/master | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/lexers/hdl.py | 363 | # -*- coding: utf-8 -*-
"""
pygments.lexers.hdl
~~~~~~~~~~~~~~~~~~~
Lexers for hardware descriptor languages.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.lexer import RegexLexer, bygroups, include, using, t... |
aetilley/revscoring | refs/heads/master | revscoring/scorer_models/nb.py | 2 | """
.. autoclass:: revscoring.scorer_models.nb.GaussianNB
:members:
:member-order:
.. autoclass:: revscoring.scorer_models.nb.MultinomialNB
:members:
:member-order:
.. autoclass:: revscoring.scorer_models.nb.BernoulliNB
:members:
:member-order:
"""
import logging
from sklearn import naive_bay... |
ulope/django | refs/heads/master | django/db/backends/oracle/compiler.py | 22 | from django.db.models.sql import compiler
class SQLCompiler(compiler.SQLCompiler):
def as_sql(self, with_limits=True, with_col_aliases=False):
"""
Creates the SQL for this query. Returns the SQL string and list
of parameters. This is overridden from the original Query class
to han... |
rtindru/django | refs/heads/master | django/conf/locale/id/formats.py | 504 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
from __future__ import unicode_literals
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'j N Y'
DATETIME_FORMAT = "j N Y, ... |
DolphinDream/sverchok | refs/heads/master | nodes/spatial/voronoi3d.py | 2 | # This file is part of project Sverchok. It's copyrighted by the contributors
# recorded in the version control history of the file, available from
# its original location https://github.com/nortikin/sverchok/commit/master
#
# SPDX-License-Identifier: GPL3
# License-Filename: LICENSE
from collections import defaultdic... |
treemo/circuits | refs/heads/master | tests/node/test_node.py | 3 | #!/usr/bin/env python
from pytest import fixture, skip, PLATFORM
if PLATFORM == 'win32':
skip('Broken on Windows')
from circuits import Component, Event
from circuits.net.events import close
from circuits.node import Node, remote
from circuits.net.sockets import UDPServer
class App(Component):
ready = ... |
cloudbase/cinder | refs/heads/master | cinder/tests/unit/db/test_cluster.py | 5 | # Copyright (c) 2016 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 require... |
qiqipipioioi/django-radius-my | refs/heads/master | userWeb/admin.py | 1 | from django.contrib import admin
from userWeb.models import News, userlist
class NewsAdmin(admin.ModelAdmin):
list_display = ('title', 'created_time', 'status')
list_filter = ('status',)
ordering = ('-created_time',)
class userlistAdmin(admin.ModelAdmin):
list_display = ('username', 'statu')
lis... |
dvliman/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.5/django/contrib/gis/db/backends/mysql/operations.py | 100 | from django.db.backends.mysql.base import DatabaseOperations
from django.contrib.gis.db.backends.adapter import WKTAdapter
from django.contrib.gis.db.backends.base import BaseSpatialOperations
from django.utils import six
class MySQLOperations(DatabaseOperations, BaseSpatialOperations):
compiler_module = 'djang... |
googleapis/python-talent | refs/heads/master | google/cloud/talent_v4beta1/__init__.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... |
GbalsaC/bitnamiP | refs/heads/master | pika/pika/exceptions.py | 1 | """Pika specific exceptions"""
class AMQPError(Exception):
def __repr__(self):
return 'An unspecified AMQP error has occurred'
class AMQPConnectionError(AMQPError):
def __repr__(self):
if len(self.args) == 1:
if (self.args[0] == 1):
return ('No connection could be... |
kaltsimon/youtube-dl | refs/heads/master | youtube_dl/extractor/mlb.py | 142 | from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
parse_duration,
parse_iso8601,
)
class MLBIE(InfoExtractor):
_VALID_URL = r'''(?x)
https?://
(?:[\da-z_-]+\.)*mlb\.com/
(?:
... |
mad-lab/transit | refs/heads/master | src/pytransit/fileDisplay.py | 1 | # Copyright 2015.
# Michael A. DeJesus, Chaitra Ambadipudi, and Thomas R. Ioerger.
#
#
# This file is part of TRANSIT.
#
# TRANSIT 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 ... |
shrikantgond/ecView | refs/heads/master | node_modules/node-gyp/gyp/pylib/gyp/MSVSNew.py | 1835 | # 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.
"""New implementation of Visual Studio project generation."""
import os
import random
import gyp.common
# hashlib is supplied as of Python 2.5 as the replacemen... |
wevote/WeVoteServer | refs/heads/develop | apis_v1/documentation_source/organization_stop_ignoring_doc.py | 1 | # apis_v1/documentation_source/organization_stop_ignoring_doc.py
# Brought to you by We Vote. Be good.
# -*- coding: UTF-8 -*-
def organization_stop_ignoring_doc_template_values(url_root):
"""
Show documentation about organizationStopIgnoring
"""
required_query_parameter_list = [
{
... |
ysu-hust/cosmodel | refs/heads/master | collectors/collectors.py | 1 | #!/usr/bin/env python
from utils import default_config
from onlinemetrics import online_metrics
import time
import redis
import json
def save_metrics_measure_and_predict(metrics, f):
try:
print "###### start saving current online metrics ######"
cur_metrics = {}
cur_metrics["slostatus_obj"... |
xiandiancloud/edxplaltfom-xusong | refs/heads/master | cms/djangoapps/contentstore/views/tests/test_item.py | 2 | """Tests for items views."""
import os
import json
from datetime import datetime, timedelta
import ddt
from unittest import skipUnless
from mock import patch
from pytz import UTC
from webob import Response
from django.http import Http404
from django.test import TestCase
from django.test.client import RequestFactory
f... |
OWASP/django-DefectDojo | refs/heads/master | dojo/unittests/test_php_symfony_security_check_parser.py | 2 | from django.test import TestCase
from dojo.tools.php_symfony_security_check.parser import PhpSymfonySecurityCheckParser
from dojo.models import Test
class TestPhpSymfonySecurityCheckerParser(TestCase):
def test_php_symfony_security_check_parser_without_file_has_no_findings(self):
parser = PhpSymfonySecur... |
zhanghui9700/eonboard | refs/heads/master | eoncloud_web/eoncloud_web/formats/__init__.py | 12133432 | |
zdary/intellij-community | refs/heads/master | python/helpers/tests/generator3_tests/data/FileSystemUtil/copy_skeletons_failed_version_stamps_ignored/dst/after/generated.py | 12133432 | |
nju520/django | refs/heads/master | django/conf/locale/zh_Hant/__init__.py | 12133432 | |
CSC301H-Fall2013/JuakStore | refs/heads/master | site-packages/build/lib/django/contrib/auth/management/commands/__init__.py | 12133432 | |
vrv/tensorflow | refs/heads/master | tensorflow/tools/docs/doc_generator_visitor.py | 17 | # 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... |
machinalis/machinalis-movie-reviews | refs/heads/master | movie_recommendations/factories.py | 1 | from faker import Faker
faker = Faker()
def get_fake_user_data():
return {
'name': faker.name(),
'username': faker.user_name(),
'email': faker.email(),
'password': 's3cr4t$'
}
|
pannarale/pycbc | refs/heads/master | pycbc/noise/gaussian.py | 6 | # Copyright (C) 2012 Alex Nitz
#
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 3 of the License, or (at your
# option) any later version.
#
# This program is distributed in t... |
plxaye/chromium | refs/heads/master | src/tools/valgrind/test_suppressions.py | 5 | #!/usr/bin/env python
# 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.
from collections import defaultdict
import os
import re
import sys
import suppressions
def ReadReportsFromFile(filename):
""" ... |
ice9js/servo | refs/heads/master | tests/wpt/css-tests/tools/manifest/vcs.py | 287 | import os
import subprocess
def get_git_func(repo_path):
def git(cmd, *args):
full_cmd = ["git", cmd] + list(args)
return subprocess.check_output(full_cmd, cwd=repo_path, stderr=subprocess.STDOUT)
return git
def is_git_repo(tests_root):
return os.path.exists(os.path.join(tests_root, ".git... |
sils1297/PyGithub | refs/heads/master | github/tests/GitTree.py | 39 | # -*- coding: utf-8 -*-
# ########################## Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... |
cwgreene/Nanostructure-Simulator | refs/heads/master | photocurrent.py | 1 | #import driftscatter as ds
import move_particles_c as mpc
import montecarlo_mockup as mc
import dolfin_util as du
import kdtree_c
import time
import numpy as np
import ctypes
import constants
#import bandstructure as bs
def reap_list(full,remove_ids):
remove_ids.sort()
count = 0
for id in remove_ids:
p = full.po... |
tttthemanCorp/CardmeleonAppEngine | refs/heads/master | django/conf/locale/en_GB/formats.py | 234 | # -*- 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 = 'N j, Y' # 'Oct. 25, 2006'
TIME_FORMAT = 'P' ... |
clumsy/intellij-community | refs/heads/master | python/testData/stubs/DunderAll.py | 83 | __all__ = ['foo', 'bar']
|
andfoy/margffoy-tuay-server | refs/heads/master | env/lib/python2.7/site-packages/django_contrib_comments-1.6.1-py2.7.egg/tests/custom_comments/views.py | 12 | from django.http import HttpResponse
def custom_submit_comment(request):
return HttpResponse("Hello from the custom submit comment view.")
def custom_flag_comment(request, comment_id):
return HttpResponse("Hello from the custom flag view.")
def custom_delete_comment(request, comment_id):
return HttpRe... |
fusion809/fusion809.github.io-old | refs/heads/master | vendor/bundle/ruby/2.3.0/gems/pygments.rb-0.6.3/vendor/pygments-main/pygments/formatters/_mapping.py | 47 | # -*- coding: utf-8 -*-
"""
pygments.formatters._mapping
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Formatter mapping definitions. This file is generated by itself. Everytime
you change something on a builtin formatter definition, run this script from
the formatters folder to update it.
Do not alter the FOR... |
RichHelle/data-science-from-scratch | refs/heads/master | first-edition/code/naive_bayes.py | 60 | from __future__ import division
from collections import Counter, defaultdict
from machine_learning import split_data
import math, random, re, glob
def tokenize(message):
message = message.lower() # convert to lowercase
all_words = re.findall("[a-z0-9']+", message) # extract the words
... |
0x46616c6b/ansible | refs/heads/devel | lib/ansible/modules/cloud/azure/azure_rm_deployment.py | 16 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distribut... |
googleapis/python-aiplatform | refs/heads/master | google/cloud/aiplatform_v1beta1/types/data_labeling_job.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... |
osvalr/odoo | refs/heads/8.0 | openerp/addons/base/tests/__init__.py | 286 | import test_acl
import test_api
import test_base
import test_basecase
import test_db_cursor
import test_expression
import test_func
import test_ir_actions
import test_ir_attachment
import test_ir_filters
import test_ir_sequence
import test_ir_values
import test_mail
import test_menu
import test_orm
import test_osv
impo... |
Afnarel/django-forms-builder | refs/heads/master | forms_builder/example_project/settings.py | 9 | from __future__ import absolute_import, unicode_literals
import os, sys
DEBUG = True
SITE_ID = 1
PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__))
PROJECT_DIRNAME = PROJECT_ROOT.split(os.sep)[-1]
STATIC_URL = "/static/"
STATIC_ROOT = os.path.join(PROJECT_ROOT, STATIC_URL.strip("/"))
MEDIA_URL = STATIC_URL + ... |
xamanu/osm2gtfs | refs/heads/master | osm2gtfs/core/creator_factory.py | 4 | # coding=utf-8
import importlib
import logging
from osm2gtfs.creators.agency_creator import AgencyCreator
from osm2gtfs.creators.feed_info_creator import FeedInfoCreator
from osm2gtfs.creators.routes_creator import RoutesCreator
from osm2gtfs.creators.stops_creator import StopsCreator
from osm2gtfs.creators.schedule_c... |
darktears/chromium-crosswalk | refs/heads/master | tools/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-packages/main_script.py | 805 | import sys
|
LennonChin/Django-Practices | refs/heads/master | MxShop/MxShop/wsgi.py | 1 | """
WSGI config for MxShop 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(... |
skyoo/jumpserver | refs/heads/master | apps/terminal/migrations/0004_session_remote_addr.py | 6 | # -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2018-01-05 10:07
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('terminal', '0003_auto_20171230_0308'),
]
operations = [
migrations.AddField(
... |
agaurav/ansible | refs/heads/devel | test/integration/consul_running.py | 106 | ''' Checks that the consul agent is running locally. '''
if __name__ == '__main__':
try:
import consul
consul = consul.Consul(host='0.0.0.0', port=8500)
consul.catalog.nodes()
print "True"
except:
pass
|
gboudreau/CouchPotato | refs/heads/master | cherrypy/lib/__init__.py | 83 | """CherryPy Library"""
# Deprecated in CherryPy 3.2 -- remove in CherryPy 3.3
from cherrypy.lib.reprconf import unrepr, modules, attributes
class file_generator(object):
"""Yield the given input (a file object) in chunks (default 64k). (Core)"""
def __init__(self, input, chunkSize=65536):
self.in... |
codewarrior0/pytest | refs/heads/master | testing/python/fixture.py | 2 | import pytest, py, sys
from _pytest import python as funcargs
from _pytest.python import FixtureLookupError
from _pytest.pytester import get_public_names
from textwrap import dedent
def test_getfuncargnames():
def f(): pass
assert not funcargs.getfuncargnames(f)
def g(arg): pass
assert funcargs.getfunc... |
marqueedev/django | refs/heads/master | tests/inspectdb/models.py | 89 | # -*- encoding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
class People(models.Model):
name = models.CharField(max_length=255)
parent = models.ForeignKey('self')
class Message(models.Model):
from_field = models.ForeignKey(People, db_column='from_id')
class PeopleDa... |
sharhar/USB-Thing | refs/heads/master | UpdaterFiles/Lib/python-3.5.1.amd64/Lib/site-packages/setuptools/site-patch.py | 720 | def __boot():
import sys
import os
PYTHONPATH = os.environ.get('PYTHONPATH')
if PYTHONPATH is None or (sys.platform=='win32' and not PYTHONPATH):
PYTHONPATH = []
else:
PYTHONPATH = PYTHONPATH.split(os.pathsep)
pic = getattr(sys,'path_importer_cache',{})
stdpath = sys.path[le... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.