repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
cbrucks/keystone_ldap | refs/heads/essex-eol-ldap | keystone/common/wsgi.py | 1 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack LLC
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (... |
c-o-m-m-a-n-d-e-r/CouchPotatoServer | refs/heads/master | libs/tornado/ioloop.py | 65 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# 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 a... |
ibrahimcesar/panda | refs/heads/master | panda/api/exports.py | 6 | #!/usr/bin/env python
from mimetypes import guess_type
from django.conf.urls.defaults import url
from django.core.servers.basehttp import FileWrapper
from django.http import HttpResponse
from tastypie import fields
from tastypie.authorization import DjangoAuthorization
from tastypie.utils.urls import trailing_slash
... |
eprincev-egor/nw.js | refs/heads/nw13 | tests/automatic_tests/start_app/zip.py | 97 | import zipfile
import os
zip = zipfile.ZipFile(os.path.join('tmp-nw', 'app.nw'), 'w',
compression=zipfile.ZIP_DEFLATED)
source_file = ['index.html', 'package.json']
for file in source_file:
path = os.path.join('tmp-nw', file)
zip.write(path, file)
zip.close();
|
detiber/ansible | refs/heads/devel | contrib/inventory/serf.py | 395 | #!/usr/bin/env python
# (c) 2015, Marc Abramowitz <marca@surveymonkey.com>
#
# This file is part of Ansible.
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... |
MilesDuronCIMAT/book_exercises | refs/heads/master | chapter_11/lists/__init__.py | 12133432 | |
manassolanki/frappe | refs/heads/develop | frappe/core/doctype/user_permission/__init__.py | 12133432 | |
CUCWD/edx-platform | refs/heads/master | lms/djangoapps/badges/events/__init__.py | 12133432 | |
timhughes/gnome15 | refs/heads/master | src/gnome15/objgraph.py | 8 | """
Ad-hoc tools for drawing Python object reference graphs with graphviz.
This module is more useful as a repository of sample code and ideas, than
as a finished product. For documentation and background, read
http://mg.pov.lt/blog/hunting-python-memleaks.html
http://mg.pov.lt/blog/python-object-graphs.html
h... |
kennethreitz-archive/mead | refs/heads/master | mead/plugins/index/controllers/about.py | 1 | # Part of Mead. See LICENSE file for full copyright and licensing details.
from mead.plugins.index import mead_index
from flask import render_template
@mead_index.route('/about')
def about():
return render_template('about.html')
|
ddimensia/RaceCapture_App | refs/heads/master | test/__init__.py | 12133432 | |
dydek/django | refs/heads/master | django/conf/locale/pt_BR/__init__.py | 12133432 | |
zasdfgbnm/tensorflow | refs/heads/master | tensorflow/contrib/framework/python/ops/critical_section_test.py | 6 | # Copyright 2017 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... |
loic/django | refs/heads/master | tests/template_tests/templatetags/subpackage/echo.py | 580 | from django import template
register = template.Library()
@register.simple_tag
def echo2(arg):
return arg
|
jmgonzalez00449/Arduino | refs/heads/master | arduino-core/src/processing/app/i18n/python/requests/packages/urllib3/util.py | 189 | # urllib3/util.py
# Copyright 2008-2012 Andrey Petrov and contributors (see CONTRIBUTORS.txt)
#
# This module is part of urllib3 and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
from base64 import b64encode
from collections import namedtuple
from socket import error as Socke... |
pombredanne/pants | refs/heads/master | src/python/pants/backend/jvm/tasks/nailgun_task.py | 4 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
from pant... |
xhat/micropython | refs/heads/master | tests/basics/subclass_native5.py | 117 | # Subclass from 2 bases explicitly subclasses from object
class Base1(object):
pass
class Base2(object):
pass
class Sub(Base1, Base2):
pass
o = Sub()
|
joeryan/web-data | refs/heads/master | websock1.py | 1 | # simple web socket access
# get the data at a specific uri and print to std out
import socket, sys, re
websock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
print sys.argv
if len(sys.argv) > 1:
optionalurl = sys.argv[1]
urlmatch = re.match(r"(http://.+?/) (.+)", optionalurl)
print urlmatch
if (... |
kreopt/aioweb | refs/heads/master | tests/wyrm/files/insert_in_python_r9.py | 2 | from orator.migrations import Migration
class AcidTest(Migration):
def up(self):
"""
Run the migrations.
"""
with self.schema.table('shits') as table:
self.integer("lsd_quality")
def down(self):
"""
Revert the migrations.
"""
with s... |
h-utkuunlu/tubitak-uav | refs/heads/master | gorev_yazilim/gorev_1_otonom.py | 1 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
print "Görev 1 Otonom"
from __future__ import print_function
from dronekit import connect, VehicleMode, LocationGlobalRelative, LocationGlobal
from time import sleep, time
import numpy as np
import cv2
import imutils
import math
import picamera
import tanimlar as t
#########... |
linearregression/socorro | refs/heads/master | socorro/unittest/database/createSchema.py | 11 | #! /usr/bin/env python
# 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 http://mozilla.org/MPL/2.0/.
# XXX Set to be deprecated in favor of socorro/external/postgresql/models.py
"""
Just set up the... |
polyaxon/polyaxon | refs/heads/master | core/tests/test_transports/test_http_transport.py | 1 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... |
zincumyx/Mammoth | refs/heads/master | mammoth-src/build/contrib/hod/hodlib/Common/allocationManagerUtil.py | 182 | #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 thi... |
frank-tancf/scikit-learn | refs/heads/master | examples/model_selection/plot_validation_curve.py | 141 | """
==========================
Plotting Validation Curves
==========================
In this plot you can see the training scores and validation scores of an SVM
for different values of the kernel parameter gamma. For very low values of
gamma, you can see that both the training score and the validation score are
low. ... |
weisongchen/flaskapp | refs/heads/master | venv/lib/python2.7/site-packages/setuptools/__init__.py | 130 | """Extensions to the 'distutils' for large or complex distributions"""
import os
import functools
import distutils.core
import distutils.filelist
from distutils.util import convert_path
from fnmatch import fnmatchcase
from six.moves import filter, map
import setuptools.version
from setuptools.extension import Extens... |
zenodo/invenio | refs/heads/zenodo-master | invenio/modules/bulletin/format_elements/bfe_webjournal_widget_featureRecord.py | 13 | # -*- coding: utf-8 -*-
# $Id: bfe_webjournal_widget_forTheEyes.py,v 1.7 2008/06/03 10:04:16 jerome Exp $
#
# This file is part of Invenio.
# Copyright (C) 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 ... |
smjurcak/csm | refs/heads/master | csmserver/parsers/platforms/IOS_XR.py | 1 | # =============================================================================
# Copyright (c) 2015, Cisco Systems, 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 ... |
MatthewJWalls/FlaskStrap | refs/heads/master | core/__init__.py | 12133432 | |
Laurawly/tvm-1 | refs/heads/master | tests/python/unittest/test_auto_scheduler_loop_state.py | 5 | # 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... |
AlpineNow/python-alpine-api | refs/heads/master | tests/api/test_job.py | 1 | import os, time
import pytz
from datetime import datetime,timedelta
from alpine import APIClient
from alpine.exception import *
from alpine.job import *
from alpine.datasource import *
from .alpineunittest import AlpineTestCase
class TestJob(AlpineTestCase):
def setUp(self):
super(TestJob, self).setUp()... |
alexcuellar/odoo | refs/heads/8.0 | addons/procurement_jit/__openerp__.py | 312 | # -*- 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... |
dmitry-r/incubator-airflow | refs/heads/master | tests/dags/test_double_trigger.py | 39 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... |
youprofit/phantomjs | refs/heads/master | src/qt/qtwebkit/Tools/QueueStatusServer/handlers/showresults.py | 146 | # Copyright (C) 2009 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... |
arantebillywilson/python-snippets | refs/heads/master | microblog/flask/lib/python3.5/site-packages/pip/utils/hashes.py | 517 | from __future__ import absolute_import
import hashlib
from pip.exceptions import HashMismatch, HashMissing, InstallationError
from pip.utils import read_chunks
from pip._vendor.six import iteritems, iterkeys, itervalues
# The recommended hash algo of the moment. Change this whenever the state of
# the art changes; ... |
FederatedAI/FATE | refs/heads/master | python/fate_arch/session/__init__.py | 1 | #
# Copyright 2019 The FATE 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 appli... |
jnerin/ansible | refs/heads/devel | lib/ansible/modules/database/proxysql/proxysql_manage_config.py | 42 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2017, Ansible Project
# 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
DOCUMENTATION = '''
---
module: proxysql_manage_config
ver... |
antoviaque/edx-platform | refs/heads/master | common/djangoapps/contentserver/__init__.py | 12133432 | |
ayu-mushi/memoru | refs/heads/master | lib/memoru/__init__.py | 12133432 | |
dionyself/candela | refs/heads/master | queue/__init__.py | 12133432 | |
tcwicklund/django | refs/heads/master | django/contrib/flatpages/templatetags/flatpages.py | 472 | from django import template
from django.conf import settings
from django.contrib.flatpages.models import FlatPage
from django.contrib.sites.shortcuts import get_current_site
register = template.Library()
class FlatpageNode(template.Node):
def __init__(self, context_name, starts_with=None, user=None):
sel... |
hi2017teamB/ChatAppProject | refs/heads/master | websocket-client/websocket/_http.py | 15 | """
websocket - WebSocket client library for Python
Copyright (C) 2010 Hiroki Ohtani(liris)
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, ... |
stannynuytkens/youtube-dl | refs/heads/master | youtube_dl/extractor/embedly.py | 71 | # coding: utf-8
from __future__ import unicode_literals
from .common import InfoExtractor
from ..compat import compat_urllib_parse_unquote
class EmbedlyIE(InfoExtractor):
_VALID_URL = r'https?://(?:www|cdn\.)?embedly\.com/widgets/media\.html\?(?:[^#]*?&)?url=(?P<id>[^#&]+)'
_TESTS = [{
'url': 'https:... |
WorldBank-Transport/open-transit-indicators | refs/heads/master | python/django/datasources/tasks/osm.py | 2 | """Handles downloading and importing OSM Data"""
import os
import subprocess
import tempfile
import requests
from celery.utils.log import get_task_logger
from django.conf import settings
from django.db import connection
from datasources.models import OSMData, OSMDataProblem
from datasources.tasks.shapefile import E... |
tuxology/bcc | refs/heads/master | tools/old/statsnoop.py | 9 | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# statsnoop Trace stat() syscalls.
# For Linux, uses BCC, eBPF. Embedded C.
#
# USAGE: statsnoop [-h] [-t] [-x] [-p PID]
#
# Copyright 2016 Netflix, Inc.
# Licensed under the Apache License, Version 2.0 (the "License")
#
# 08-Feb-2016 Brendan ... |
ThinkOpen-Solutions/odoo | refs/heads/stable | addons/sale_stock/__init__.py | 376 | # -*- 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... |
anthrotype/freetype-py | refs/heads/master | freetype/ft_enums/tt_mac_ids.py | 4 | # -*- coding: utf-8 -*-
# -----------------------------------------------------------------------------
#
# FreeType high-level python API - Copyright 2011-2015 Nicolas P. Rougier
# Distributed under the terms of the new BSD license.
#
# -----------------------------------------------------------------------------
""... |
shadowwalkersb/conda-smithy | refs/heads/master | tests/recipes/click-test-feedstock/recipe/upload_or_check_non_existence.py | 2 | print('it works')
|
MoritzS/django | refs/heads/master | tests/admin_scripts/simple_app/management/commands/duplicate.py | 554 | from django.core.management.base import BaseCommand
class Command(BaseCommand):
def handle(self, **options):
self.stdout.write('simple_app')
|
iddqd1/django-cms | refs/heads/develop | menus/templatetags/__init__.py | 12133432 | |
binarydud/django-oscar | refs/heads/master | tests/integration/__init__.py | 12133432 | |
ojengwa/django-1 | refs/heads/master | tests/max_lengths/__init__.py | 12133432 | |
lindsay-stevens/odk_tools | refs/heads/master | tests/__init__.py | 12133432 | |
suneeth51/neutron | refs/heads/master | neutron/plugins/ml2/drivers/brocade/__init__.py | 12133432 | |
xfournet/intellij-community | refs/heads/master | python/testData/refactoring/move/function/before/src/a.py | 83 | from lib1 import urlopen
def f(url):
'''Return the representation available at the URL.
'''
return urlopen(url).read()
def f_usage():
return f(14)
class C(object):
def g(self, x):
return x
class D(C):
def g(self, x, y):
return super(D, self).f(x) + y
class E(object):
... |
VitalPet/account-financial-tools | refs/heads/8.0 | currency_rate_update/services/update_service_PL_NBP.py | 41 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2009 CamptoCamp. All rights reserved.
# @author Nicolas Bessi
#
# Abstract class to fetch rates from National Bank of Poland
#
# This program is free software: you can redistribute it and... |
saga-project/bliss | refs/heads/master | examples/advanced/mandelbrot/run_mandel.py | 1 | #!/usr/bin/env python
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
"""
This example script runs the Mandelbrot fractal generator sequentially.
In this example, we run the Mandelbrot generator for a 2048x2048 pixel
Mandelbrot fractal. We split it up in 4x4 tiles which we run sequentially, one
after another o... |
blckshrk/DummySMA | refs/heads/master | src/particles/ParticlesFrame.py | 1 | '''
Created on 19 janv. 2014
@author: Alexandre Bonhomme
'''
from Tkinter import ALL
from gui.FrameTk import FrameTk
from particles.agents.ParticleAgent import ParticleAgent
from core.agents.AgentWall import AgentWall
class ExplorerFrame(FrameTk):
def __init__(self, height, width, box_size, sma):
Frame... |
orb-framework/orb | refs/heads/master | orb/core/connection_types/sql/postgres/statements/add_column.py | 2 | from projex.lazymodule import lazy_import
from ..psqlconnection import PSQLStatement
orb = lazy_import('orb')
class ADD_COLUMN(PSQLStatement):
def __call__(self, column):
# determine all the flags for this column
flags = []
Flags = orb.Column.Flags
for key, value in Flags.items():... |
beaufortfrancois/chromium-dashboard | refs/heads/master | customtags/templatetags/verbatim.py | 4 | """
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
This, of course, completely screws up Django templates,
because Django thinks {{ and }} mean something.
Wrap {% verbatim %} and {% endverbatim %} around those
blocks of jQuery templates and this will try its best
to output the cont... |
eneldoserrata/marcos_openerp | refs/heads/master | addons/report_geraldo/lib/geraldo/site/newsite/django_1_0/tests/regressiontests/templates/models.py | 12133432 | |
hickford/youtube-dl | refs/heads/master | youtube_dl/extractor/videoweed.py | 133 | from __future__ import unicode_literals
from .novamov import NovaMovIE
class VideoWeedIE(NovaMovIE):
IE_NAME = 'videoweed'
IE_DESC = 'VideoWeed'
_VALID_URL = NovaMovIE._VALID_URL_TEMPLATE % {'host': 'videoweed\.(?:es|com)'}
_HOST = 'www.videoweed.es'
_FILE_DELETED_REGEX = r'>This file no longe... |
taedori81/wagtail | refs/heads/master | wagtail/wagtailadmin/migrations/0001_create_admin_access_permissions.py | 27 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django
from django.db import migrations
def create_admin_access_permissions(apps, schema_editor):
ContentType = apps.get_model('contenttypes.ContentType')
Permission = apps.get_model('auth.Permission')
Group = apps.get_model('auth.Gro... |
KanchanChauhan/erpnext | refs/heads/develop | erpnext/docs/assets/img/human-resources/__init__.py | 12133432 | |
douglas-treadwell/marshmallow-models | refs/heads/master | tests/__init__.py | 12133432 | |
andrewmchen/incubator-airflow | refs/heads/master | tests/contrib/hooks/test_aws_hook.py | 42 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... |
donglin-zhang/testLinkHelper | refs/heads/master | ui_option.py | 1 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'options.ui'
#
# Created by: PyQt5 UI code generator 5.9
#
# WARNING! All changes made in this file will be lost!
|
z01nl1o02/tests | refs/heads/master | mxnet/emotion/symbol/ninnet.py | 5 | import os,sys,pdb
import numpy as np
import mxnet as mx
from mxnet import gluon
from mxnet.gluon import nn
class NIN(nn.Block):
def __init__(self, channels, kernel_size, padding, strides=1, max_pooling=True, **kwargs):
super(NIN, self).__init__(**kwargs)
self.conv1 = nn.Conv2D(channels=c... |
jaymin-panchal/zang-python | refs/heads/master | zang/domain/base_resource.py | 1 | import sys
import datetime
from zang.helpers.helpers import to_python
from enum import Enum
if sys.version_info > (3, 0):
basestring = (str, bytes)
class BaseResource(object):
_strs = []
_ints = []
_reals = []
_dates = []
_bools = []
_dicts = []
_map = {}
_arrays = {}
_enums ... |
matthagy/rtchemstats | refs/heads/master | setupegg.py | 3 | #!/usr/bin/env python
# Copyright (C) 2012 Matt Hagy <hagy@gatech.edu>
#
# 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... |
elastic-coders/graphqllib | refs/heads/master | tests/core_language/test_parser.py | 3 | from pytest import raises
from graphql.core.language.error import LanguageError
from graphql.core.language.source import Source
from graphql.core.language.parser import parse
from graphql.core.language import ast
from fixtures import KITCHEN_SINK
def test_parse_provides_useful_errors():
with raises(LanguageError)... |
dynius/p2pool | refs/heads/master | SOAPpy/GSIServer.py | 289 | from __future__ import nested_scopes
"""
GSIServer - Contributed by Ivan R. Judson <judson@mcs.anl.gov>
################################################################################
#
# SOAPpy - Cayce Ullman (cayce@actzero.com)
# Brian Matthews (blm@actzero.com)
# Gregory Warnes (G... |
akosyakov/intellij-community | refs/heads/master | python/testData/resolve/Global.py | 83 | xx = 1
def f():
global x<ref>x
print xx
|
HalcyonChimera/osf.io | refs/heads/develop | addons/forward/migrations/0003_auto_20170713_1125.py | 22 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2017-07-13 16:25
from __future__ import unicode_literals
import pytz
import datetime
from django.db import migrations
import django_extensions.db.fields
class Migration(migrations.Migration):
dependencies = [
('addons_forward', '0002_nodesettings_o... |
Universal-Model-Converter/UMC3.0a | refs/heads/master | data/Python/x86/Lib/binhex.py | 216 | """Macintosh binhex compression/decompression.
easy interface:
binhex(inputfilename, outputfilename)
hexbin(inputfilename, outputfilename)
"""
#
# Jack Jansen, CWI, August 1995.
#
# The module is supposed to be as compatible as possible. Especially the
# easy interface should work "as expected" on any platform.
# XXX... |
ellepdesk/python-snap7 | refs/heads/master | test/test_partner.py | 1 | import logging
import unittest as unittest
import mock
import snap7.partner
from snap7.snap7exceptions import Snap7Exception
logging.basicConfig(level=logging.WARNING)
class TestPartner(unittest.TestCase):
def setUp(self):
self.partner = snap7.partner.Partner()
self.partner.start()
def test... |
leighpauls/k2cro4 | refs/heads/master | third_party/WebKit/Source/ThirdParty/gtest/test/gtest_color_test.py | 3259 | #!/usr/bin/env python
#
# Copyright 2008, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list... |
jb-boin/mariadb-10.0 | refs/heads/master | storage/tokudb/mysql-test/tokudb/t/change_column_multiple_columns.py | 56 | import sys
import itertools
cols = [ 'a', 'b', 'c', 'd', 'e' ]
old_types = [ 'VARCHAR(1)', 'VARBINARY(1)', 'INT', 'CHAR(1)', 'BINARY(1)' ]
new_types = [ 'VARCHAR(2)', 'VARBINARY(2)', 'BIGINT', 'CHAR(2)', 'BINARY(2)' ]
def main():
print "# this test generated by change_multiple_columns.py"
print "# this test g... |
eg-zhang/scikit-learn | refs/heads/master | sklearn/utils/tests/test_optimize.py | 239 | import numpy as np
from sklearn.utils.optimize import newton_cg
from scipy.optimize import fmin_ncg
from sklearn.utils.testing import assert_array_almost_equal
def test_newton_cg():
# Test that newton_cg gives same result as scipy's fmin_ncg
rng = np.random.RandomState(0)
A = rng.normal(size=(10, 10))
... |
NaturalGIS/naturalgis_qgis | refs/heads/master | python/plugins/processing/gui/HistoryDialog.py | 15 | # -*- coding: utf-8 -*-
"""
***************************************************************************
HistoryDialog.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
*************************... |
MiniPlayer/log-island | refs/heads/master | logisland-plugins/logisland-scripting-processors-plugin/src/main/resources/nltk/tbl/api.py | 386048 | |
Migdalo/wd-label-builder | refs/heads/master | wdlabelbuilder/__init__.py | 386048 | |
JaDogg/__py_playground | refs/heads/master | reference/parson/eg_trees.py | 1 | """
Testing out tree parsing.
"""
from operator import add, sub
from parson import anyone, capture, delay, nest, one_of, one_that
end = ~anyone
def match(p, x): return (p + end)([x])
def an_instance(type_): return one_that(lambda x: isinstance(x, type_))
def capture1(p): return capture(p) >> (lambda x: x[0]) # Ouc... |
18padx08/PPTex | refs/heads/master | PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/tensor/tests/test_tensor.py | 17 | from sympy import Matrix, eye
from sympy.combinatorics import Permutation
from sympy.core import S, Rational, Symbol, Basic
from sympy.core.containers import Tuple
from sympy.core.symbol import symbols
from sympy.external import import_module
from sympy.functions.elementary.miscellaneous import sqrt
from sympy.printing... |
nkhuyu/commons | refs/heads/master | src/python/twitter/checkstyle/plugins/indentation.py | 14 | # ==================================================================================================
# Copyright 2014 Twitter, Inc.
# --------------------------------------------------------------------------------------------------
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use thi... |
zouyapeng/horizon | refs/heads/stable/juno | openstack_dashboard/dashboards/project/images/tests.py | 9 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
# Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use t... |
jameslittle/dpkt | refs/heads/master | dpkt/ntp.py | 6 | # $Id: ntp.py 48 2008-05-27 17:31:15Z yardley $
# -*- coding: utf-8 -*-
"""Network Time Protocol."""
import dpkt
from decorators import deprecated
# NTP v4
# Leap Indicator (LI) Codes
NO_WARNING = 0
LAST_MINUTE_61_SECONDS = 1
LAST_MINUTE_59_SECONDS = 2
ALARM_CONDITION = 3
# Mode Codes
RESERVED = 0
SYMMETRIC_ACTIVE ... |
isandlaTech/cohorte-demos | refs/heads/dev | led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-1.0.0-20141201.234602-19-python-distribution/repo/sleekxmpp/plugins/xep_0297/__init__.py | 13 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2012 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.plugins.base import register_plugin
from sleekxmpp.plugins.xep_0297 import stanza
from sleekxmpp.plugins.xep_02... |
craigem/MyAdventures | refs/heads/master | mcpi/minecraft.py | 2 | from connection import Connection
from vec3 import Vec3
from event import BlockEvent
from block import Block
import math
from util import flatten
""" Minecraft PI low level api v0.1_1
Note: many methods have the parameter *arg. This solution makes it
simple to allow different types, and variable num... |
openhatch/new-mini-tasks | refs/heads/master | vendor/packages/Django/django/conf/locale/sv/__init__.py | 12133432 | |
jakubroztocil/cloudtunes | refs/heads/master | cloudtunes-server/cloudtunes/services/musicbrainz/__init__.py | 12133432 | |
sbuss/voteswap | refs/heads/master | lib/django/conf/locale/es_CO/__init__.py | 12133432 | |
firstjob/python-social-auth | refs/heads/master | social/apps/django_app/default/admin.py | 72 | """Admin settings"""
from django.conf import settings
from django.contrib import admin
from social.utils import setting_name
from social.apps.django_app.default.models import UserSocialAuth, Nonce, \
Association
class UserSocialAuthOption(admin.ModelAdmin):
"""So... |
wangxuan007/flasky | refs/heads/master | venv/lib/python2.7/site-packages/flask/testsuite/ext.py | 563 | # -*- coding: utf-8 -*-
"""
flask.testsuite.ext
~~~~~~~~~~~~~~~~~~~
Tests the extension import thing.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import sys
import unittest
try:
from imp import reload as reload_module
except ImportError:
reload... |
youdonghai/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/db/backends/mysql/introspection.py | 313 | from django.db.backends import BaseDatabaseIntrospection
from MySQLdb import ProgrammingError, OperationalError
from MySQLdb.constants import FIELD_TYPE
import re
foreign_key_re = re.compile(r"\sCONSTRAINT `[^`]*` FOREIGN KEY \(`([^`]*)`\) REFERENCES `([^`]*)` \(`([^`]*)`\)")
class DatabaseIntrospection(BaseDatabaseI... |
nzavagli/UnrealPy | refs/heads/master | UnrealPyEmbed/Source/Python/Lib/python27/test/test_frozen.py | 134 | # Test the frozen module defined in frozen.c.
from test.test_support import captured_stdout, run_unittest
import unittest
import sys
class FrozenTests(unittest.TestCase):
def test_frozen(self):
with captured_stdout() as stdout:
try:
import __hello__
except ImportEr... |
RiccardoPecora/MP | refs/heads/master | Lib/encodings/latin_1.py | 103 | """ Python 'latin-1' Codec
Written by Marc-Andre Lemburg (mal@lemburg.com).
(c) Copyright CNRI, All Rights Reserved. NO WARRANTY.
"""
import codecs
### Codec APIs
class Codec(codecs.Codec):
# Note: Binding these as C functions will result in the class not
# converting them to methods. This... |
shimpe/frescobaldi | refs/heads/master | frescobaldi_app/popplerdummy.py | 1 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# 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
... |
AOSPU/external_chromium_org | refs/heads/android-5.0/py3 | third_party/bintrees/bintrees/avltree.py | 156 | #!/usr/bin/env python
#coding:utf-8
# Author: mozman (python version)
# Purpose: avl tree module (Julienne Walker's unbounded none recursive algorithm)
# source: http://eternallyconfuzzled.com/tuts/datastructures/jsw_tut_avl.aspx
# Created: 01.05.2010
# Copyright (c) 2010-2013 by Manfred Moitzi
# License: MIT License
... |
luosch/vinda | refs/heads/master | vinda/vinda.py | 1 | # -*- coding:utf-8 -*-
import os
import codecs
from jinja2 import Environment, FileSystemLoader
def look(path='.', deep_limit=3, ignore=[]):
env = Environment(loader=FileSystemLoader(os.path.join(os.path.dirname(__file__))))
template = env.get_template('template.html')
link = []
for name in os.li... |
pavelkuchin/tracktrains | refs/heads/master | utils/__init__.py | 12133432 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.