repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
decvalts/iris | refs/heads/master | lib/iris/fileformats/cf.py | 2 | # (C) British Crown Copyright 2010 - 2015, Met Office
#
# This file is part of Iris.
#
# Iris 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) any l... |
diox/olympia | refs/heads/master | src/olympia/promoted/migrations/0007_auto_20200924_1328.py | 5 | # Generated by Django 2.2.16 on 2020-09-24 13:28
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('promoted', '0006_auto_20200819_0951'),
]
operations = [
migrations.AddField(
model_name='promotedapproval',
name='a... |
nhicher/ansible | refs/heads/devel | lib/ansible/compat/selectors/_selectors2.py | 36 | # This file is from the selectors2.py package. It backports the PSF Licensed
# selectors module from the Python-3.5 stdlib to older versions of Python.
# The author, Seth Michael Larson, dual licenses his modifications under the
# PSF License and MIT License:
# https://github.com/SethMichaelLarson/selectors2#license
#... |
aajtodd/zipline | refs/heads/master | tests/test_execution_styles.py | 34 | #
# Copyright 2014 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... |
wreckJ/intellij-community | refs/heads/master | python/testData/mover/multiLineSelection9.py | 83 | class Test(object):
<caret><selection> a = 1
b = 2
</selection> def q(self):
c = 3
|
anthonynguyen/UrTSB | refs/heads/master | urtsb_src/ui/rconpassdialog.py | 3 | #
# Copyright (C) 2010 Sorcerer
#
# This file is part of UrTSB.
#
# UrTSB 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.
#
# UrTSB is... |
Kabele/ZCR-Shellcoder | refs/heads/master | lib/generator/freebsd_x64/write.py | 80 | #!/usr/bin/env python
'''
ZCR Shellcoder
ZeroDay Cyber Research
Z3r0D4y.Com
Ali Razmjoo
'''
def run(filename,content):
return 'N'
|
mjgrav2001/scikit-learn | refs/heads/master | sklearn/utils/tests/test_sparsefuncs.py | 157 | import numpy as np
import scipy.sparse as sp
from scipy import linalg
from numpy.testing import assert_array_almost_equal, assert_array_equal
from sklearn.datasets import make_classification
from sklearn.utils.sparsefuncs import (mean_variance_axis,
inplace_column_scale,
... |
nagyistoce/devide.johannes | refs/heads/master | install_packages/ip_scipy.py | 5 | # Copyright (c) Charl P. Botha, TU Delft.
# All rights reserved.
# See COPYRIGHT for details.
# this was just an experiment to see how far we could get with
# gohlke's MKL built scipy binaries on Windows. Not far enough
# (and there are licensing issues in any case). Ask me (cpbotha)
# about the details if you'... |
xwolf12/scikit-learn | refs/heads/master | sklearn/ensemble/tests/test_forest.py | 57 | """
Testing for the forest module (sklearn.ensemble.forest).
"""
# Authors: Gilles Louppe,
# Brian Holt,
# Andreas Mueller,
# Arnaud Joly
# License: BSD 3 clause
import pickle
from collections import defaultdict
from itertools import product
import numpy as np
from scipy.sparse import csr_... |
yasoob/PythonRSSReader | refs/heads/master | venv/lib/python2.7/dist-packages/oauthlib/oauth1/rfc5849/request_validator.py | 9 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
"""
oauthlib.oauth1.rfc5849
~~~~~~~~~~~~~~
This module is an implementation of various logic needed
for signing and checking OAuth 1.0 RFC 5849 requests.
"""
from . import SIGNATURE_METHODS, utils
class RequestValidator(object):
"... |
wistoch/meego-app-browser | refs/heads/master | tools/valgrind/common.py | 3 | # Copyright (c) 2009 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 logging
import os
import signal
import subprocess
import sys
import time
class NotImplementedError(Exception):
pass
class TimeoutError(Excep... |
bennylope/elasticstack | refs/heads/master | tests/test_fields.py | 1 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_fields
------------
Tests for `elasticstack` fields module.
"""
from django.test import TestCase
from elasticstack.fields import ConfigurableFieldMixin
class TestFields(TestCase):
def test_missing_analyzer(self):
"""No specified analyzer should r... |
palerdot/calibre | refs/heads/master | src/calibre/devices/bambook/libbambookcore.py | 21 | # -*- coding: utf-8 -*-
__license__ = 'GPL v3'
__copyright__ = '2010, Li Fanxi <lifanxi at freemindworld.com>'
__docformat__ = 'restructuredtext en'
'''
Sanda library wrapper
'''
import ctypes, hashlib, os, sys
from threading import Event, Lock
from calibre.constants import iswindows
from calibre import load_libra... |
deKupini/erp | refs/heads/master | addons/event_sale/models/event.py | 5 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, _
import openerp.addons.decimal_precision as dp
from openerp.exceptions import UserError
from openerp.osv import fields as old_fields
class event_event(models.Model):
_inherit = 'event.event'
event_ticket_ids = fields.One2many(
'event.... |
AFMD/smallProjects | refs/heads/master | DC_sourcemeter/run_me.py | 1 | #!/usr/bin/env python3
# written by [email protected]
# on 20 Feb 2019
# Example usage:
# ./run_me.py --sm-address ASRL/dev/ttyUSB0::INSTR --duration 10 --set-point 0.001 --compliance 2 --nplc 10 > data.csv
# for serial communication with a sourcemeter attached to /dev/ttyUSB0
# sourcing 1mA
# for 10 seconds
# wit... |
ar4s/django | refs/heads/master | tests/logging_tests/logconfig.py | 609 | import logging
from django.conf import settings
from django.core.mail.backends.base import BaseEmailBackend
class MyHandler(logging.Handler):
def __init__(self):
logging.Handler.__init__(self)
self.config = settings.LOGGING
class MyEmailBackend(BaseEmailBackend):
def send_messages(self, ema... |
hustlzp/zulip | refs/heads/master | confirmation/util.py | 126 | # -*- coding: utf-8 -*-
# Copyright: (c) 2008, Jarek Zgoda <[email protected]>
__revision__ = '$Id: util.py 3 2008-11-18 07:33:52Z jarek.zgoda $'
from django.conf import settings
def get_status_field(app_label, model_name):
model = '%s.%s' % (app_label, model_name)
mapping = getattr(settings, 'STATUS_FI... |
petermalcolm/osf.io | refs/heads/develop | scripts/retract_registrations.py | 21 | """Script for retracting pending retractions that are more than 48 hours old."""
import datetime
import logging
import sys
from modularodm import Q
from framework.auth import Auth
from framework.transactions.context import TokuTransaction
from website import models, settings
from website.app import init_app
from web... |
aforalee/keystone | refs/heads/master | keystone/tests/unit/test_exception.py | 3 | # Copyright 2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in... |
plotly/plotly.py | refs/heads/master | packages/python/plotly/_plotly_utils/tests/validators/test_number_validator.py | 2 | import pytest
from pytest import approx
from _plotly_utils.basevalidators import NumberValidator
import numpy as np
import pandas as pd
# Fixtures
# --------
@pytest.fixture
def validator(request):
return NumberValidator("prop", "parent")
@pytest.fixture
def validator_min_max(request):
return NumberValidato... |
emory-libraries/readux | refs/heads/master | readux/annotations/management/commands/import_annotations.py | 1 | from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth import get_user_model
import json
from readux.annotations.models import Annotation
class Command(BaseCommand):
'''Import a JSON file of annotation data in the format provided
by the annotator store API (i.e., search res... |
siosio/intellij-community | refs/heads/master | python/testData/copyPaste/singleLine/Indent32.after.py | 747 | class C:
def foo(self):
x = 1
y = 2
|
OldFrostDragon/GcovParserLibrary | refs/heads/master | tests/googletest/googletest/scripts/pump.py | 2471 | #!/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... |
blaggacao/OpenUpgrade | refs/heads/8.0 | addons/web_api/__openerp__.py | 384 | {
'name': 'OpenERP Web API',
'category': 'Hidden',
'description': """
Openerp Web API.
================
""",
'version': '2.0',
'depends': ['web'],
'installable': True,
'auto_install': False,
}
|
dimpase/offlineimap | refs/heads/master | offlineimap/ui/debuglock.py | 17 | # Locking debugging code -- temporary
# Copyright (C) 2003 John Goerzen
# <[email protected]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
#... |
gsmartway/odoo | refs/heads/8.0 | addons/hr_recruitment/report/hr_recruitment_report.py | 325 | # -*- 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... |
pombredanne/or-tools | refs/heads/master | examples/tests/issue117.py | 9 | from collections import namedtuple
from ortools.constraint_solver import pywrapcp
VEHICLE_COUNT= 30
VEHICLE_CAPACITY = 200
Customer = namedtuple("Customer", ['index', 'demand', 'x', 'y'])
print (' ----------------------------------------------- Init ----------------------------------------------')
customers = list... |
mith1979/ansible_automation | refs/heads/master | applied_python/applied_python/lib/python2.7/site-packages/ansible/modules/extras/system/alternatives.py | 4 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage symbolic link alternatives.
(c) 2014, Gabe Mulley <[email protected]>
(c) 2015, David Wittman <[email protected]>
This file is part of Ansible
Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... |
saurabh6790/alert-med-app | refs/heads/master | stock/doctype/purchase_receipt/purchase_receipt.py | 28 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt, cint
from webnotes.model.bean import getlist
from webnotes.model.code import get_obj
from webn... |
engdan77/edoAutoHomeMobile | refs/heads/master | twisted/conch/ttymodes.py | 82 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
#
import tty
# this module was autogenerated.
VINTR = 1
VQUIT = 2
VERASE = 3
VKILL = 4
VEOF = 5
VEOL = 6
VEOL2 = 7
VSTART = 8
VSTOP = 9
VSUSP = 10
VDSUSP = 11
VREPRINT = 12
VWERASE = 13
VLNEXT = 14
VFLUSH = 15
VSWTCH = 16
VSTATUS = 17
VDISCARD ... |
awslabs/py-flask-signup-docker | refs/heads/master | application.py | 14 | # Copyright 2015. Amazon Web Services, Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... |
notriddle/servo | refs/heads/master | tests/wpt/web-platform-tests/tools/lint/tests/test_lint.py | 12 | from __future__ import unicode_literals
import os
import sys
import mock
import six
from ...localpaths import repo_root
from .. import lint as lint_mod
from ..lint import filter_whitelist_errors, parse_whitelist, lint, create_parser
_dummy_repo = os.path.join(os.path.dirname(__file__), "dummy")
def _mock_lint(name... |
mkmelin/bedrock | refs/heads/master | bedrock/base/tests/test_accepted_locales.py | 11 | import os
import shutil
from django.conf import settings
from django.test import TestCase
from bedrock.settings.base import get_dev_languages, path
class AcceptedLocalesTest(TestCase):
"""Test lazy evaluation of locale related settings.
Verify that some localization-related settings are lazily evaluated ba... |
lcpt/xc | refs/heads/master | python_modules/actions/weight/CTE_pesos_especificos_materiales_construccion.py | 1 | # -*- coding: utf-8 -*-
'''Construction materials specific weights in N/m3 according to table tabla C.1
of CTE.'''
#Albañilería
pesoEspCTEArenisca=27.0e3
pesoEspCTEBasalto=31.0e3
pesoEspCTECalizaCompacta=28.0e3
pesoEspCTEMarmol=28.0e3
pesoEspCTEDiorita=30.0e3
pesoEspCTEGneis=30.0e3
pesoEspCTEGranito=30.0e3
pesoEspCTE... |
JustinSGray/Hyperloop | refs/heads/master | src/hyperloop/tube_wall_temp.py | 8 | """
tubeModel.py -
Determines the steady state temperature of the hyperloop tube.
Calculates Q released/absorbed by hyperloop tube due to:
Internal Convection, Tube Conduction, Ambient Natural Convection, Solar Flux In, Radiation Out
-original calculations from Jeff Berton, por... |
revmischa/boto | refs/heads/develop | tests/integration/gs/test_versioning.py | 135 | # -*- coding: utf-8 -*-
# Copyright (c) 2012, Google, Inc.
# All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rig... |
jk1/intellij-community | refs/heads/master | python/testData/refactoring/pullup/simple.py | 166 | class Foo:
def foo(self):
print("a")
class Boo(Foo):
def boo(self):
print "rrrrr" |
SoLoHiC/mezzanine | refs/heads/master | mezzanine/pages/context_processors.py | 30 |
def page(request):
"""
Adds the current page to the template context and runs its
``set_helper`` method. This was previously part of
``PageMiddleware``, but moved to a context processor so that
we could assign these template context variables without
the middleware depending on Django's ``Temp... |
joebowen/LogMyRocket_API | refs/heads/master | LogMyRocket/libraries/sys_packages/docutils/writers/odf_odt/pygmentsformatter.py | 244 | # $Id: pygmentsformatter.py 5853 2009-01-19 21:02:02Z dkuhlman $
# Author: Dave Kuhlman <[email protected]>
# Copyright: This module has been placed in the public domain.
"""
Additional support for Pygments formatter.
"""
import pygments
import pygments.formatter
class OdtPygmentsFormatter(pygments.formatter.For... |
codewarrior0/Shiboken | refs/heads/master | tests/samplebinding/oddbool_test.py | 3 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# This file is part of the Shiboken Python Bindings Generator project.
#
# Copyright (C) 2009-2011 Nokia Corporation and/or its subsidiary(-ies).
#
# Contact: PySide team <[email protected]>
#
# This program is free software; you can redistribute it and/or
# modify it un... |
buuck/root | refs/heads/master | interpreter/llvm/src/utils/lit/lit/ShCommands.py | 87 | class Command:
def __init__(self, args, redirects):
self.args = list(args)
self.redirects = list(redirects)
def __repr__(self):
return 'Command(%r, %r)' % (self.args, self.redirects)
def __eq__(self, other):
if not isinstance(other, Command):
return False
... |
Lyleo/OmniMarkupPreviewer | refs/heads/master | OmniMarkupLib/Renderers/libs/python2/textile/tools/imagesize.py | 2 | def getimagesize(url):
"""
Attempts to determine an image's width and height, and returns a string
suitable for use in an <img> tag, or an empty string in case of failure.
Requires that PIL is installed.
>>> getimagesize("http://www.google.com/intl/en_ALL/images/logo.gif")
... #doctest: +ELLIPS... |
dhalperi/incubator-beam | refs/heads/master | sdks/python/apache_beam/internal/gcp/auth.py | 9 | #
# 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... |
kreatorkodi/repository.torrentbr | refs/heads/master | script.module.urlresolver/lib/urlresolver/plugins/putload.py | 2 | '''
urlresolver XBMC Addon
Copyright (C) 2016 Gujal
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.
... |
GitAngel/django | refs/heads/master | tests/extra_regress/models.py | 166 | from __future__ import unicode_literals
import copy
import datetime
from django.contrib.auth.models import User
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class RevisionableModel(models.Model):
base = models.ForeignKey('self', null=Tru... |
tntnatbry/tensorflow | refs/heads/master | tensorflow/python/saved_model/main_op_impl.py | 25 | # 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... |
steppicrew/useful-scripts | refs/heads/master | KindleBooks/lib/cmbtc_v2.2.py | 1 | #! /usr/bin/python2
"""
Comprehensive Mazama Book DRM with Topaz Cryptography V2.2
-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDdBHJ4CNc6DNFCw4MRCw4SWAK6
M8hYfnNEI0yQmn5Ti+W8biT7EatpauE/5jgQMPBmdNrDr1hbHyHBSP7xeC2qlRWC
B62UCxeu/fpfnvNHDN/wPWWH4jynZ2M6cdcnE5LQ+FfeKqZn7gnG2No1U9h7oOHx
y2/pHuYme7U1... |
zonk1024/moto | refs/heads/master | tests/test_cloudformation/fixtures/rds_mysql_with_read_replica.py | 19 | from __future__ import unicode_literals
template = {
"AWSTemplateFormatVersion" : "2010-09-09",
"Description" : "AWS CloudFormation Sample Template RDS_MySQL_With_Read_Replica: Sample template showing how to create a highly-available, RDS DBInstance with a read replica. **WARNING** This template creates an Amazon... |
htwenhe/DJOA | refs/heads/master | env/Lib/site-packages/libpasteurize/fixes/fix_unpacking.py | 60 | u"""
Fixer for:
(a,)* *b (,c)* [,] = s
for (a,)* *b (,c)* [,] in d: ...
"""
from lib2to3 import fixer_base
from itertools import count
from lib2to3.fixer_util import (Assign, Comma, Call, Newline, Name,
Number, token, syms, Node, Leaf)
from libfuturize.fixer_util import indentation, sui... |
kyokyos/bioinform | refs/heads/master | Diabetes_prediction.py | 1 | #DIY糖尿病预测器,请随访相关专业医师
#algorithm:
#total_points=gender+BMI+waist+age+race+family_gene+blood_pressure+psycho
#(total_points:0-6 low; 7-15 increased; 16-24 moderate; 25-47high)
#BMI=weight(kg)/height(m)**2
#value
gender="male"
height=1.65
weight=62
hypertension="True"
race="Chinese"
family_history="True"
age=65
waist=10... |
mglukhikh/intellij-community | refs/heads/master | python/testData/quickFixes/PyAddSpecifierToFormatQuickFixTest/unicodeEscapes.py | 29 | s = <warning descr="Format specifier character missing">u"\N{LATIN SMALL LETTER B}%s\N{NUMBER SIGN}\
%\N{LATIN SMALL <caret>LETTER B}"</warning> % ("a", "b") |
albertz/music-player | refs/heads/master | mac/pyobjc-framework-Cocoa/PyObjCTest/test_nsdistributednotificationcenter.py | 3 | from PyObjCTools.TestSupport import *
from Foundation import *
try:
unicode
except NameError:
unicode = str
class TestNSDistributedNotificationCenter (TestCase):
def testConstants(self):
self.assertIsInstance(NSLocalNotificationCenterType, unicode)
self.assertEqual(NSNotificationSuspensi... |
kvar/ansible | refs/heads/seas_master_2.9.5 | lib/ansible/modules/network/slxos/slxos_interface.py | 91 | #!/usr/bin/python
#
# (c) 2018 Extreme Networks Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any late... |
Cisco-Talos/pyrebox | refs/heads/master | volatility/volatility/plugins/gui/vtypes/win10.py | 3 | # Volatility
# Copyright (C) 2007-2017 Volatility Foundation
# Copyright (C) 2017 Michael Hale Ligh <[email protected]>
#
# This file is part of Volatility.
#
# Volatility 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 Softwa... |
2014c2g14/2014c2 | refs/heads/master | exts/w2/static/Brython2.0.0-20140209-164925/Lib/xml/etree/ElementInclude.py | 784 | #
# ElementTree
# $Id: ElementInclude.py 3375 2008-02-13 08:05:08Z fredrik $
#
# limited xinclude support for element trees
#
# history:
# 2003-08-15 fl created
# 2003-11-14 fl fixed default loader
#
# Copyright (c) 2003-2004 by Fredrik Lundh. All rights reserved.
#
# [email protected]
# http://www.pythonware... |
jonyroda97/redbot-amigosprovaveis | refs/heads/develop | lib/pip/_vendor/chardet/utf8prober.py | 290 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is mozilla.org code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights Reserved.
#
# Con... |
laslabs/odoo-connector-carepoint | refs/heads/release/10.0 | connector_carepoint/__init__.py | 1 | # -*- coding: utf-8 -*-
# Copyright 2015-2016 LasLabs Inc.
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from . import models
from . import backend
from . import connector
from . import consumer
from . import related_action
|
shubhamdhama/zulip | refs/heads/master | zerver/webhooks/buildbot/view.py | 4 | from typing import Any, Dict
from django.http import HttpRequest, HttpResponse
from zerver.decorator import api_key_only_webhook_view
from zerver.lib.request import REQ, has_request_variables
from zerver.lib.response import json_success
from zerver.lib.webhooks.common import check_send_webhook_message
from zerver.mod... |
manisandro/QGIS | refs/heads/master | python/plugins/processing/algs/saga/versioncheck.py | 22 | # -*- coding: utf-8 -*-
"""
***************************************************************************
versioncheck.py
---------------------
Date : December 2014
Copyright : (C) 2014 by Victor Olaya
Email : volayaf at gmail dot com
************************... |
botswana-harvard/edc-dispatch | refs/heads/develop | edc_dispatch/urls.py | 1 | from django.conf.urls import patterns, url
from .views import return_items
urlpatterns = patterns('',
url(r'^return/', return_items),
url(r'^return/(?P<identifier>\w+)/', 'return_households', name='return_household'),
url(r'^return/(?P<identifier>\w+)/', 'return_households', name='return_household'),
... |
harshita-gupta/Harvard-FRSEM-Catalog-2016-17 | refs/heads/master | flask/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/constants.py | 3007 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Universal charset detector code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 2001
# the Initial Developer. All R... |
Tithen-Firion/youtube-dl | refs/heads/master | youtube_dl/extractor/theplatform.py | 11 | # coding: utf-8
from __future__ import unicode_literals
import re
import time
import hmac
import binascii
import hashlib
from .once import OnceIE
from .adobepass import AdobePassIE
from ..compat import (
compat_parse_qs,
compat_urllib_parse_urlparse,
)
from ..utils import (
determine_ext,
ExtractorEr... |
neopenx/Dragon | refs/heads/master | Dragon/python/dragon/vm/theano/configdefaults.py | 1 | # --------------------------------------------------------
# Theano @ Dragon
# Copyright(c) 2017 SeetaTech
# Written by Ting Pan
# --------------------------------------------------------
class TheanoConfig(object):
floatX = 'float32'
config = TheanoConfig() |
opensourcechipspark/platform_external_chromium_org | refs/heads/master | chrome/test/functional/media/media_basic_playback.py | 65 | #!/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.
"""Basic playback test. Checks playback, seek, and replay based on events.
This test uses the bear videos from the test matrix in... |
bluestar-solutions/account-invoicing | refs/heads/9.0 | account_invoice_uom/__openerp__.py | 5 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2014-15 Agile Business Group sagl (<http://www.agilebg.com>)
# Author: Lorenzo Battistini <[email protected]>
#
# This program is free software: you can redistribute it and/or m... |
Sofcom/treeio | refs/heads/2.0 | treeio/core/rss.py | 3 | # encoding: utf-8
# Copyright 2011 Tree.io Limited
# This file is part of Treeio.
# License www.tree.io/license
"""
Global RSS Framework
"""
from django.contrib.syndication.views import Feed
from django.contrib.sites.models import RequestSite
from treeio.core.models import Object, UpdateRecord, User
import hashlib
imp... |
attakei/readthedocs-oauth | refs/heads/master | readthedocs/rtd_tests/tests/test_project.py | 29 | import json
from django.test import TestCase
from readthedocs.builds.constants import LATEST
from readthedocs.projects.models import Project
from rest_framework.reverse import reverse
from django_dynamic_fixture import get
from readthedocs.restapi.serializers import ProjectSerializer
from readthedocs.rtd_tests.mocks.pa... |
dymkowsk/mantid | refs/heads/master | Testing/SystemTests/tests/analysis/SANS2DMultiPeriodAddFiles.py | 3 | #pylint: disable=no-init
from __future__ import (absolute_import, division, print_function)
import stresstesting
from mantid.simpleapi import *
from mantid import config
from ISISCommandInterface import *
class SANS2DMultiPeriodAddFiles(stresstesting.MantidStressTest):
def requiredMemoryMB(self):
"""Re... |
justhalf/weak-semi-crf-naacl2016 | refs/heads/master | data/sms_corpus/students/18/fix.py | 1 | # -*- coding: utf-8 -*-
"""
Fix annotations for 1000451
"""
# Import statements
def main():
with open('sms_corpus.txt') as infile:
text = infile.read()
with open('sms_corpus.ann_') as infile:
anns = [ann.strip() for ann in infile.readlines()]
with open('fixed.ann', 'w') as outfile:
... |
mxOBS/deb-pkg_trusty_chromium-browser | refs/heads/master | tools/auto_bisect/bisect_results.py | 9 | # Copyright 2014 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 math
import os
import bisect_utils
import math_utils
import source_control
import ttest
from bisect_state import RevisionState
class BisectResults... |
apyrgio/snf-ganeti | refs/heads/stable-2.10-bpo2 | lib/watcher/state.py | 1 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 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:
#
# 1. Redistributions of source code must retain the above copyright notice,
... |
terentjew-alexey/market-analysis-system | refs/heads/master | data/to_windowed.py | 1 | import numpy as np
from mas_tools.data import create_timeseries_matrix
from files import FILES, PERIODS, CSV
print('Warning! Process may be very long.')
# lpath = 'E:/Projects/market-analysis-system/data/transformed/'
lpath = 'E:/Projects/market-analysis-system/data/normalized/'
spath = 'E:/Projects/market-analysis-... |
uarka/binutils | refs/heads/master | gdb/testsuite/gdb.perf/lib/perftest/__init__.py | 41 | # Copyright (C) 2013-2014 Free Software Foundation, 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 progr... |
makingspace/umeboshi | refs/heads/master | umeboshi/serializer.py | 1 | import pickle
from importlib import import_module
from django.core.exceptions import ImproperlyConfigured
from django.conf import settings
class DefaultSerializer(object):
def dumps(self, value):
return pickle.dumps(value)
def loads(self, value):
return pickle.loads(value)
def load_class(pat... |
mateon1/servo | refs/heads/master | components/script/dom/bindings/codegen/parser/tests/test_interface_identifier_conflicts_across_members.py | 276 | def WebIDLTest(parser, harness):
threw = False
try:
parser.parse("""
interface IdentifierConflictAcrossMembers1 {
const byte thing1 = 1;
readonly attribute long thing1;
};
""")
results = parser.finish()
except:
threw = True... |
comandrei/django-haystack | refs/heads/master | test_haystack/test_utils.py | 13 | # encoding: utf-8
from __future__ import absolute_import, division, print_function, unicode_literals
from django.test import TestCase
from django.test.utils import override_settings
from test_haystack.core.models import MockModel
from haystack.utils import _lookup_identifier_method, get_facet_field_name, get_identif... |
rgom/Pydev | refs/heads/development | plugins/org.python.pydev.jython/Lib/modjy/modjy_input.py | 29 | ###
#
# Copyright Alan Kennedy.
#
# You may contact the copyright holder at this uri:
#
# http://www.xhaus.com/contact/modjy
#
# The licence under which this code is released is the Apache License v2.0.
#
# The terms and conditions of this license are listed in a file contained
# in the distribution that also contained... |
revoer/keystone-8.0.0 | refs/heads/master | swift/common/header_key_dict.py | 5 | # Copyright (c) 2010-2012 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agree... |
michaelpacer/python-future | refs/heads/master | src/future/backports/email/mime/application.py | 83 | # Copyright (C) 2001-2006 Python Software Foundation
# Author: Keith Dart
# Contact: [email protected]
"""Class representing application/* type MIME documents."""
from __future__ import unicode_literals
from __future__ import division
from __future__ import absolute_import
from future.backports.email import encode... |
tealover/nova | refs/heads/master | nova/tests/unit/api/openstack/compute/test_v21_extensions.py | 37 | # Copyright 2013 IBM Corp.
# Copyright 2014 NEC Corporation. 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-... |
mydongistiny/external_chromium_org | refs/heads/benzo | third_party/cython/src/Cython/Debugger/libpython.py | 101 | #!/usr/bin/python
# NOTE: this file is taken from the Python source distribution
# It can be found under Tools/gdb/libpython.py. It is shipped with Cython
# because it's not installed as a python module, and because changes are only
# merged into new python versions (v3.2+).
'''
From gdb 7 onwards, gdb's build can be... |
gymnasium/edx-platform | refs/heads/open-release/hawthorn.master | lms/djangoapps/courseware/tests/test_course_tools.py | 13 | """
Unit tests for course tools.
"""
import crum
import datetime
from mock import patch
from nose.plugins.attrib import attr
import pytz
from django.test import RequestFactory
from course_modes.models import CourseMode
from course_modes.tests.factories import CourseModeFactory
from courseware.course_tools import Ver... |
rlowrance/python_lib | refs/heads/master | applied_data_science3/dirutility.py | 1 | '''utilities for managing directories
Copyright 2017 Roy E. Lowrance
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 ... |
andersbll/deeppy-website | refs/heads/gh-pages | _downloads/mlp_mnist.py | 5 | #!/usr/bin/env python
"""
Digit classification
====================
"""
import numpy as np
import matplotlib.pyplot as plt
import deeppy as dp
# Fetch MNIST data
dataset = dp.dataset.MNIST()
x_train, y_train, x_test, y_test = dataset.data(flat=True, dp_dtypes=True)
# Normalize pixel intensities
scaler = dp.Standa... |
nsh87/medicare-claims-query-api | refs/heads/master | db/data_loader.py | 1 | """Load the CMS 2008-2010 Medicare Beneficiary Summary tables into Postgres.
See https://www.cms.gov/Research-Statistics-Data-and-Systems/Downloadable-Public-Use-Files/SynPUFs/DE_Syn_PUF.html
for more info on the data.
This file is intended to be run during Vagrant or AWS provisioning.
See https://github.com/nsh87/me... |
nuobit/odoo-addons | refs/heads/11.0 | stock_picking_partner_ref/__manifest__.py | 1 | # Copyright NuoBiT Solutions, S.L. (<https://www.nuobit.com>)
# Eric Antones <[email protected]>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl)
{
'name': "Stock picking partner reference",
'summary': "Adds a partner reference on pickingg",
'author': 'NuoBiT Solutions, S.L., Eric Antones',... |
enthought/etsproxy | refs/heads/master | enthought/envisage/ui/action/action_set_manager.py | 1 | # proxy module
from __future__ import absolute_import
from envisage.ui.action.action_set_manager import *
|
zhuwei136295/project-config | refs/heads/master | nodepool/scripts/common.py | 27 | #!/usr/bin/env python
# Copyright (C) 2011-2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... |
sanjeevtripurari/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/utils_tests/test_itercompat.py | 569 | from django.test import TestCase
from .models import Category, Thing
class TestIsIterator(TestCase):
def test_regression(self):
"""This failed on Django 1.5/Py2.6 because category has a next method."""
category = Category.objects.create(name='category')
Thing.objects.create(category=categ... |
smkr/pyclipse | refs/heads/master | plugins/com.python.pydev.fastparser/tests/pysrc/filetoparse1.py | 5 | def GlobalMethod(param1):
'''GlobalMethod docs''' |
friedrich420/N3-AEL-Kernel-NF1-v5- | refs/heads/master | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <[email protected]>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... |
JonathanStein/odoo | refs/heads/8.0 | addons/account_bank_statement_extensions/res_partner_bank.py | 381 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
#
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under ... |
js0701/chromium-crosswalk | refs/heads/master | tools/telemetry/third_party/modulegraph/modulegraph_tests/testpkg-regr4/script.py | 23 | from pkg.core.listener import Listener as listen
|
wkrzemien/DIRAC | refs/heads/integration | FrameworkSystem/Service/UserProfileManagerHandler.py | 2 | ########################################################################
# $HeadURL$
########################################################################
""" ProfileManager manages web user profiles
in the DISET framework
"""
from __future__ import print_function
__RCSID__ = "$Id$"
import types
from DIRAC.Co... |
Beauhurst/django | refs/heads/master | tests/forms_tests/views.py | 452 | from django import forms
from django.views.generic.edit import UpdateView
from .models import Article
class ArticleForm(forms.ModelForm):
content = forms.CharField(strip=False, widget=forms.Textarea)
class Meta:
model = Article
fields = '__all__'
class ArticleFormView(UpdateView):
mode... |
bdoner/SickRage | refs/heads/master | lib/unrar2/unix.py | 13 | # Copyright (c) 2003-2005 Jimmy Retzlaff, 2008 Konstantin Yegupov
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy... |
sumeetchhetri/FrameworkBenchmarks | refs/heads/master | frameworks/Python/cherrypy/satool.py | 79 | import cherrypy
__all__ = ['SATool']
class SATool(cherrypy.Tool):
def __init__(self):
"""
The SA tool is responsible for associating a SA session
to the SA engine and attaching it to the current request.
Since we are running in a multithreaded application,
we use the scoped... |
castroflavio/ryu | refs/heads/master | ryu/tests/unit/ofproto/test_parser_compat.py | 22 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 YAMAMOTO Takashi <yamamoto at valinux co jp>
#
# 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:... |
mapleoin/braintree_python | refs/heads/master | tests/integration/test_http.py | 2 | from tests.test_helper import *
from distutils.version import LooseVersion
import platform
import braintree
import requests
class TestHttp(unittest.TestCase):
if LooseVersion(requests.__version__) >= LooseVersion('1.0.0'):
SSLError = requests.exceptions.SSLError
else:
SSLError = requests.models... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.