repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
Innovahn/cybex | refs/heads/master | addons/procurement/__openerp__.py | 36 | # -*- 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... |
timoguic/sp_hub | refs/heads/master | drf_sp_hub/spkeyword/models.py | 1 | from django.db import models
from django.contrib.postgres.fields import JSONField
class SPCategory(models.Model):
name = models.CharField(max_length=200, null=False, blank=False, db_index=True, unique=True)
class Meta:
verbose_name = "SP Category"
verbose_name_plural = "SP Categories"
de... |
lumig242/Hue-Integration-with-CDAP | refs/heads/pull3 | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/tests/geoadmin/urls.py | 383 | from django.conf.urls import patterns, include
from django.contrib import admin
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
)
|
dmckinney5/SlackOff | refs/heads/master | slackoff/lib/python2.7/site-packages/pip/_vendor/distlib/_backport/shutil.py | 395 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Utility functions for copying and archiving files and directory trees.
XXX The functions here don't copy the resource fork or other metadata on Mac.
"""
import os
import sys
import stat
from os... |
Featuretools/featuretools | refs/heads/master | featuretools/selection/selection.py | 1 | def remove_low_information_features(feature_matrix, features=None):
"""Select features that have at least 2 unique values and that are not all null
Args:
feature_matrix (:class:`pd.DataFrame`): DataFrame whose columns are feature names and rows are instances
features (list[:class:`f... |
MakeHer/edx-platform | refs/heads/dashboard.2 | lms/djangoapps/debug/views.py | 119 | """Views for debugging and diagnostics"""
import pprint
import traceback
from django.http import Http404, HttpResponse, HttpResponseNotFound
from django.contrib.auth.decorators import login_required
from django.utils.html import escape
from django.views.decorators.csrf import ensure_csrf_cookie
from edxmako.shortcut... |
florianjacob/linkchecker | refs/heads/master | third_party/dnspython/dns/rdtypes/ANY/SOA.py | 100 | # Copyright (C) 2003-2007, 2009-2011 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED "... |
potash/scikit-learn | refs/heads/master | benchmarks/bench_rcv1_logreg_convergence.py | 149 | # Authors: Tom Dupre la Tour <tom.dupre-la-tour@m4x.org>
# Olivier Grisel <olivier.grisel@ensta.org>
#
# License: BSD 3 clause
import matplotlib.pyplot as plt
import numpy as np
import gc
import time
from sklearn.externals.joblib import Memory
from sklearn.linear_model import (LogisticRegression, SGDClassifi... |
zzzombat/lucid-python-django | refs/heads/master | django/forms/util.py | 311 | from django.utils.html import conditional_escape
from django.utils.encoding import StrAndUnicode, force_unicode
from django.utils.safestring import mark_safe
# Import ValidationError so that it can be imported from this
# module to maintain backwards compatibility.
from django.core.exceptions import ValidationError
d... |
jimcunderwood/MissionPlanner | refs/heads/master | Lib/encodings/cp861.py | 93 | """ Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP861.TXT' with gencodec.py.
"""#"
import codecs
### Codec APIs
class Codec(codecs.Codec):
def encode(self,input,errors='strict'):
return codecs.charmap_encode(input,errors,encoding_map)
def decode(self,input,errors=... |
Schrolli91/BOSWatch | refs/heads/master | plugins/BosMon/BosMon.py | 1 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
BOSWatch-Plugin to dispatch FMS-, ZVEI- and POCSAG - messages to BosMon
-U {The BosMon hompage<http://www.bosmon.de>}
@author: Jens Herrmann
@requires: BosMon-Configuration has to be set in the config.ini
"""
import logging # Global logger
import httplib #for the HTTP... |
sunils34/buffer-django-nonrel | refs/heads/master | tests/modeltests/signals/models.py | 87 | """
Testing signals before/after saving and deleting.
"""
from django.db import models
class Person(models.Model):
first_name = models.CharField(max_length=20)
last_name = models.CharField(max_length=20)
def __unicode__(self):
return u"%s %s" % (self.first_name, self.last_name)
class Car(models... |
xtiankisutsa/MARA_Framework | refs/heads/master | tools/qark/qark/lib/html5lib/serializer/__init__.py | 1731 | from __future__ import absolute_import, division, unicode_literals
from .. import treewalkers
from .htmlserializer import HTMLSerializer
def serialize(input, tree="etree", format="html", encoding=None,
**serializer_opts):
# XXX: Should we cache this?
walker = treewalkers.getTreeWalker(tree)
... |
tylertian/Openstack | refs/heads/master | openstack F/keystone/keystone/contrib/stats/backends/__init__.py | 12133432 | |
caseyrollins/osf.io | refs/heads/develop | addons/dropbox/migrations/__init__.py | 12133432 | |
indictranstech/omnitech-frappe | refs/heads/master | frappe/templates/includes/list/__init__.py | 12133432 | |
woylaski/notebook | refs/heads/master | graphic/kivy-master/kivy/tests/test_properties.py | 12 | '''
Test properties attached to a widget
'''
import unittest
from kivy.event import EventDispatcher
from functools import partial
class TestProperty(EventDispatcher):
pass
wid = TestProperty()
class PropertiesTestCase(unittest.TestCase):
def test_base(self):
from kivy.properties import Property
... |
EKiefer/edge-starter | refs/heads/master | py34env/Lib/site-packages/django/contrib/auth/middleware.py | 258 | from django.contrib import auth
from django.contrib.auth import load_backend
from django.contrib.auth.backends import RemoteUserBackend
from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import SimpleLazyObject
def get_user(request):
if not hasattr(request, '_cached_user'):
... |
endolith/scikit-image | refs/heads/master | viewer_examples/plugins/canny.py | 43 | from skimage import data
from skimage.viewer import ImageViewer
from skimage.viewer.plugins.canny import CannyPlugin
image = data.camera()
viewer = ImageViewer(image)
viewer += CannyPlugin()
canny_edges = viewer.show()[0][0]
|
philanthropy-u/edx-platform | refs/heads/master | lms/djangoapps/course_blocks/usage_info.py | 93 | """
Declares CourseUsageInfo class to be used by the transform method in
Transformers.
"""
from lms.djangoapps.courseware.access import _has_access_to_course
class CourseUsageInfo(object):
'''
A class object that encapsulates the course and user context to be
used as currency across block structure transf... |
flashycud/timestack | refs/heads/master | django/contrib/auth/admin.py | 122 | from django.db import transaction
from django.conf import settings
from django.contrib import admin
from django.contrib.auth.forms import UserCreationForm, UserChangeForm, AdminPasswordChangeForm
from django.contrib.auth.models import User, Group
from django.contrib import messages
from django.core.exceptions import Pe... |
jinie/sublime-wakatime | refs/heads/master | packages/wakatime/packages/pygments_py2/pygments/lexers/agile.py | 77 | # -*- coding: utf-8 -*-
"""
pygments.lexers.agile
~~~~~~~~~~~~~~~~~~~~~
Just export lexer classes previously contained in this module.
:copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.lexers.lisp import SchemeLexer
from p... |
yencarnacion/jaikuengine | refs/heads/master | .google_appengine/lib/django-1.4/django/contrib/localflavor/is_/is_postalcodes.py | 438 | # -*- coding: utf-8 -*-
IS_POSTALCODES = (
('101', u'101 Reykjavík'),
('103', u'103 Reykjavík'),
('104', u'104 Reykjavík'),
('105', u'105 Reykjavík'),
('107', u'107 Reykjavík'),
('108', u'108 Reykjavík'),
('109', u'109 Reykjavík'),
('110', u'110 Reykjavík'),
('111', u'111 Reykjavík'... |
iiSeymour/pandashells | refs/heads/master | pandashells/bin/p_lomb_scargle.py | 3 | #! /usr/bin/env python
# standard library imports
import argparse
import textwrap
import sys # noqa
from pandashells.lib import arg_lib, module_checker_lib
module_checker_lib.check_for_modules(['pandas', 'gatspy'])
from pandashells.lib import io_lib, lomb_scargle_lib
def main():
msg = textwrap.dedent(
... |
elkingtonmcb/h2o-2 | refs/heads/master | py/testdir_single_jvm/test_many_cols.py | 9 | import unittest, random, sys, time
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i
# the shared exec expression creator and executor
import h2o_exec as h2e
def write_syn_dataset(csvPathname, rowCount, colCount, SEED):
r1 = random.Random(SEED)
dsf = open(csvPa... |
PanDAWMS/panda-bigmon-core | refs/heads/master | core/admin/urls.py | 2 | from django.conf.urls import include, url
from django.conf import settings
from django.conf.urls.static import static
from django.views.generic import TemplateView
from django.conf import settings
from core.admin import views as adviews
urlpatterns = [
url(r'^$', adviews.adMain, name='adMain'),
url(r'^reqpl... |
NewEconomyMovement/blockexplorer | refs/heads/master | toolbox/hash_converter.py | 1 | '''
Distributed under the MIT License, see accompanying file LICENSE.txt
'''
import base64
import hashlib
import sys
import binascii
sys.path.insert(0, 'python-sha3')
from python_sha3 import *
def convert_to_address(signer, isTestNet=True):
pubkey = binascii.unhexlify(signer)
s = sha3_256()... |
xhqu1981/pymatgen | refs/heads/master | pymatgen/analysis/elasticity/tests/test_tensors.py | 1 | from __future__ import absolute_import
import unittest
import math
import os
import numpy as np
from monty.serialization import loadfn
from pymatgen.analysis.elasticity.tensors import *
from pymatgen.core.operations import SymmOp
from pymatgen.symmetry.analyzer import SpacegroupAnalyzer
from pymatgen.util.testing imp... |
chouseknecht/ansible | refs/heads/devel | lib/ansible/modules/network/aci/aci_tenant_span_src_group_to_dst_group.py | 8 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... |
maxspad/MGrader | refs/heads/master | autograder/modules/GSM.py | 1 | '''
Created on Mar 22, 2013
@author: max
'''
import questions.Result as Result
import autograder.TerminalHelper as t
import Database as dbm
import Students
import Repos
import Execenv as env
import Assignments
import XMLHelper
import os
import autograder.Questions as Questions
import importlib
import Grades
def initi... |
mathspace/django | refs/heads/master | django/__init__.py | 31 | from __future__ import unicode_literals
from django.utils.version import get_version
VERSION = (1, 11, 0, 'alpha', 0)
__version__ = get_version(VERSION)
def setup(set_prefix=True):
"""
Configure the settings (this happens as a side effect of accessing the
first setting), configure logging and populate ... |
bitesofcode/projexui | refs/heads/master | projexui/widgets/xscintillaedit/xlanguage.py | 2 | #!/usr/bin/python
""" Defines a language class that will be used for the XScintillaEdit """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2011, Projex Software'
__license__ = 'LGPL... |
windskyer/nova | refs/heads/master | nova/objectstore/s3server.py | 1 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# Copyright 2010 OpenStack Foundation
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with ... |
appneta/boto | refs/heads/develop | tests/integration/ec2/elb/test_cert_verification.py | 114 | # Copyright (c) 2012 Mitch Garnaat http://garnaat.org/
# Copyright (c) 2012 Amazon.com, Inc. or its affiliates.
# 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 withou... |
ngonzalvez/sentry | refs/heads/master | tests/sentry/nodestore/riak/__init__.py | 12133432 | |
xbonderos/gide_aion | refs/heads/master | aion/pageviews/__init__.py | 12133432 | |
nju520/django | refs/heads/master | tests/model_inheritance/same_model_name/__init__.py | 12133432 | |
dol-sen/portage | refs/heads/master | pym/portage/tests/resolver/soname/test_unsatisfiable.py | 10 | # Copyright 2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
from portage.tests import TestCase
from portage.tests.resolver.ResolverPlayground import (
ResolverPlayground, ResolverPlaygroundTestCase)
class SonameUnsatisfiableTestCase(TestCase):
def testSonameUnsatisfiable(s... |
bswartz/cinder | refs/heads/master | cinder/tests/unit/monkey_patch_example/example_a.py | 127 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... |
ATIX-AG/ansible | refs/heads/devel | lib/ansible/modules/network/avi/avi_alertscriptconfig.py | 41 | #!/usr/bin/python
#
# @author: Gaurav Rastogi (grastogi@avinetworks.com)
# Eric Anderson (eanderson@avinetworks.com)
# module_check: supported
#
# Copyright: (c) 2017 Gaurav Rastogi, <grastogi@avinetworks.com>
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
#
ANSIB... |
benjamindeleener/odoo | refs/heads/master | addons/report/__openerp__.py | 27 | {
'name': 'Report',
'category': 'Base',
'summary': 'Report',
'version': '1.0',
'description': """
Report
""",
'depends': ['base', 'web'],
'data': [
'views/layouts.xml',
'views/views.xml',
'data/report_paperformat.xml',
'security/ir.model.access.csv',
... |
fgesora/odoo | refs/heads/8.0 | openerp/addons/test_inherits/models.py | 295 | # -*- coding: utf-8 -*-
from openerp import models, fields, api, osv
# We just create a new model
class Unit(models.Model):
_name = 'test.unit'
_columns = {
'name': osv.fields.char('Name', required=True),
'state': osv.fields.selection([('a', 'A'), ('b', 'B')],
... |
shoheietzel/proj5-maps | refs/heads/master | env/lib/python3.6/site-packages/pip/_vendor/webencodings/labels.py | 512 | """
webencodings.labels
~~~~~~~~~~~~~~~~~~~
Map encoding labels to their name.
:copyright: Copyright 2012 by Simon Sapin
:license: BSD, see LICENSE for details.
"""
# XXX Do not edit!
# This file is automatically generated by mklabels.py
LABELS = {
'unicode-1-1-utf-8': 'utf-8',
'utf-... |
yglazko/socorro | refs/heads/master | socorro/external/postgresql/correlations.py | 10 | # 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/.
import logging
from socorro.external.postgresql.base import PostgreSQLBase
from socorro.lib import datetimeutil, extern... |
SurfasJones/cookie | refs/heads/master | cookie/users/admin.py | 46 | # -*- coding: utf-8 -*-
from django.contrib import admin
from django.contrib.auth.forms import UserCreationForm, UserChangeForm
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
from .models import User
class UserAdmin(AuthUserAdmin):
create_form_class = UserCreationForm
update_form_class = Us... |
Storm7874/Utils | refs/heads/master | Colorama/ansitowin32.py | 450 | # Copyright Jonathan Hartley 2013. BSD 3-Clause license, see LICENSE file.
import re
import sys
import os
from .ansi import AnsiFore, AnsiBack, AnsiStyle, Style
from .winterm import WinTerm, WinColor, WinStyle
from .win32 import windll, winapi_test
winterm = None
if windll is not None:
winterm = WinTerm()
def ... |
google-code-export/pyglet | refs/heads/master | contrib/spryte/rect.py | 29 |
class Rect(object):
'''Define a rectangular area.
Many convenience handles and other properties are also defined - all of
which may be assigned to which will result in altering the position
and sometimes dimensions of the Rect.
The Rect area includes the bottom and left borders but not the top an... |
abhattad4/Digi-Menu | refs/heads/master | build/lib.linux-x86_64-2.7/django/contrib/messages/storage/session.py | 478 | import json
from django.contrib.messages.storage.base import BaseStorage
from django.contrib.messages.storage.cookie import (
MessageDecoder, MessageEncoder,
)
from django.utils import six
class SessionStorage(BaseStorage):
"""
Stores messages in the session (that is, django.contrib.sessions).
"""
... |
2013Commons/HUE-SHARK | refs/heads/master | desktop/core/ext-py/Django-1.2.3/tests/regressiontests/middleware_exceptions/tests.py | 51 | import sys
from django.test import TestCase
from django.core.signals import got_request_exception
class TestException(Exception):
pass
class TestMiddleware(object):
def process_request(self, request):
raise TestException('Test Exception')
class MiddlewareExceptionTest(TestCase):
def setUp(self):... |
chjw8016/GreenOdoo7-haibao | refs/heads/master | openerp/netsvc.py | 21 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2012 OpenERP SA (<http://www.openerp.com>)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of... |
Y3K/django | refs/heads/master | tests/migrations/models.py | 386 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.apps.registry import Apps
from django.db import models
from django.utils import six
from django.utils.encoding import python_2_unicode_compatible
class CustomModelBase(models.base.ModelBase):
pass
class ModelWithCustomBase(six.with_met... |
felixma/nova | refs/heads/master | nova/tests/unit/api/openstack/compute/test_virtual_interfaces.py | 7 | # Copyright (C) 2011 Midokura KK
# 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 ... |
dainan13/py-aluminium | refs/heads/master | src/easychecker.py | 2 | #!/usr/bin/env python2.6
# coding: utf-8
import sys
import operator
import re
import types
from simpleparse import generator
from mx.TextTools import TextTools
from pprint import pprint
def checkerattr( *args ):
def setcheckerattr( func ):
setattr( func, 'type', ... |
Just-D/chromium-1 | refs/heads/master | tools/telemetry/telemetry/internal/backends/mandoline/mandoline_browser_backend.py | 6 | # Copyright 2015 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 re
from telemetry.core import exceptions
from telemetry.core import util
from telemetry.internal.backends import browser_backend
from ... |
marcetin/2bacco | refs/heads/master | contrib/seeds/makeseeds.py | 753 | #!/usr/bin/env python
#
# Generate pnSeed[] from Pieter's DNS seeder
#
NSEEDS=600
import re
import sys
from subprocess import check_output
def main():
lines = sys.stdin.readlines()
ips = []
pattern = re.compile(r"^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3}):9333")
for line in lines:
m = patte... |
plivo/plivo-python | refs/heads/master | tests/resources/test_messages.py | 1 | # -*- coding: utf-8 -*-
from plivo import exceptions
from tests.base import PlivoResourceTestCase
from tests.decorators import with_response
class MessageTest(PlivoResourceTestCase):
def test_send_message(self):
expected_response = {'message_uuid': 'adsdafkjadshf123123'}
self.client.set_expected_r... |
jlspyaozhongkai/Uter | refs/heads/master | third_party_build/Python-2.7.9/lib/python2.7/distutils/command/install_scripts.py | 241 | """distutils.command.install_scripts
Implements the Distutils 'install_scripts' command, for installing
Python scripts."""
# contributed by Bastian Kleineidam
__revision__ = "$Id$"
import os
from distutils.core import Command
from distutils import log
from stat import ST_MODE
class install_scripts (Command):
... |
fortmeier/yge-game-engine | refs/heads/master | test/gtest-1.7.0/test/gtest_output_test.py | 1733 | #!/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... |
emil-mi/exercises-in-programming-style | refs/heads/master | 18-aspects/tf-18.py | 17 | #!/usr/bin/env python
import sys, re, operator, string, time
#
# The functions
#
def extract_words(path_to_file):
with open(path_to_file) as f:
str_data = f.read()
pattern = re.compile('[\W_]+')
word_list = pattern.sub(' ', str_data).lower().split()
with open('../stop_words.txt') as f:
... |
Jeff-Tian/mybnb | refs/heads/master | Python27/Lib/test/test_cmd_line.py | 4 | # Tests invocation of the interpreter with various command line arguments
# All tests are executed with environment variables ignored
# See test_cmd_line_script.py for testing of script execution
import test.test_support
import sys
import unittest
from test.script_helper import (
assert_python_ok, assert_p... |
foodszhang/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/tkinter/test/test_ttk/test_widgets.py | 59 | import unittest
import tkinter
from tkinter import ttk
from test.support import requires
import sys
from tkinter.test.test_ttk.test_functions import MockTclObj
from tkinter.test.support import (AbstractTkTest, tcl_version, get_tk_patchlevel,
simulate_mouse_click)
from tkinter.test.wid... |
Danielhiversen/home-assistant | refs/heads/master | homeassistant/components/binary_sensor/rachio.py | 6 | """
Integration with the Rachio Iro sprinkler system controller.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.rachio/
"""
from abc import abstractmethod
import logging
from homeassistant.components.binary_sensor import BinarySensorDevice... |
onceuponatimeforever/oh-mainline | refs/heads/master | vendor/packages/twill/twill/other_packages/__init__.py | 9480 | #
|
edunham/servo | refs/heads/master | tests/wpt/web-platform-tests/XMLHttpRequest/resources/echo-method.py | 228 | def main(request, response):
response.send_body_for_head_request = True
headers = [("Content-type", "text/plain")]
content = request.method
return headers, content
|
MatthieuBizien/scikit-learn | refs/heads/master | sklearn/decomposition/tests/test_nmf.py | 23 | import numpy as np
from scipy import linalg
from sklearn.decomposition import (NMF, ProjectedGradientNMF,
non_negative_factorization)
from sklearn.decomposition import nmf # For testing internals
from scipy.sparse import csc_matrix
from sklearn.utils.testing import assert_true
from... |
tiangolo/ansible | refs/heads/devel | v1/ansible/inventory/__init__.py | 88 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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
# (at your option) an... |
takis/odoo | refs/heads/8.0 | addons/account_asset/__init__.py | 446 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of t... |
indranil93/Aspect-Based-Sentiment-Analysis | refs/heads/master | catpol.py | 1 | import pickle
import a
import sys
from nltk.stem.wordnet import WordNetLemmatizer
lem=WordNetLemmatizer()
sentic=pickle.load(open('sentic_dump.p','rb')) #sentnic dictionary
sentence=pickle.load(open('sentence_dump.p','rb')) #parser output dictionary
sentword=pickle.load(open('sentiword_dump.p','rb')) #sentiwordne... |
abramhindle/UnnaturalCodeFork | refs/heads/master | python/testdata/launchpad/lib/lp/services/authserver/tests/test_authserver.py | 1 | # Copyright 2009 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for the internal codehosting API."""
__metaclass__ = type
from zope.component import getUtility
from zope.publisher.xmlrpc import TestRequest
from lp.services.authserve... |
dukenmarga/civil-engineering-toolbox | refs/heads/master | controller/__init__.py | 12133432 | |
seanwestfall/django | refs/heads/master | tests/managers_regress/__init__.py | 12133432 | |
retomerz/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/conf/locale/sr/__init__.py | 12133432 | |
codepantry/django | refs/heads/master | tests/gis_tests/geoapp/__init__.py | 12133432 | |
gauravbose/digital-menu | refs/heads/master | tests/mail/__init__.py | 12133432 | |
hackerbot/DjangoDev | refs/heads/master | django/conf/locale/mk/__init__.py | 12133432 | |
rkokkelk/CouchPotatoServer | refs/heads/master | libs/suds/servicedefinition.py | 201 | # 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 ... |
tmimori/frappe | refs/heads/develop | frappe/patches/v4_1/enable_outgoing_email_settings.py | 73 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# MIT License. See license.txt
from __future__ import unicode_literals
import frappe
def execute():
frappe.reload_doc("core", "doctype", "outgoing_email_settings")
if (frappe.db.get_value("Outgoing Email Settings", "Outgoing Email Settings", "mail... |
upliftaero/MissionPlanner | refs/heads/master | Lib/encodings/utf_32.py | 86 | """
Python 'utf-32' Codec
"""
import codecs, sys
### Codec APIs
encode = codecs.utf_32_encode
def decode(input, errors='strict'):
return codecs.utf_32_decode(input, errors, True)
class IncrementalEncoder(codecs.IncrementalEncoder):
def __init__(self, errors='strict'):
codecs.Incrementa... |
Glasgow2015/team-10 | refs/heads/master | env/lib/python2.7/site-packages/django/forms/extras/__init__.py | 197 | from django.forms.extras.widgets import SelectDateWidget
__all__ = ['SelectDateWidget']
|
HoracioAlvarado/fwd | refs/heads/master | venv/Lib/site-packages/sqlalchemy/dialects/postgresql/psycopg2.py | 20 | # postgresql/psycopg2.py
# Copyright (C) 2005-2016 the SQLAlchemy authors and contributors
# <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""
.. dialect:: postgresql+psycopg2
:name: psycopg2
:dbapi: psycopg2... |
yoer/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/tests/admin_docs/urls.py | 53 | # coding: utf-8
from __future__ import absolute_import
from django.conf.urls import patterns
from . import views
urlpatterns = patterns('',
(r'^xview/func/$', views.xview_dec(views.xview)),
(r'^xview/class/$', views.xview_dec(views.XViewClass.as_view())),
)
|
marios-zindilis/musicbrainz-django-models | refs/heads/master | musicbrainz_django_models/tests/test_release_group_annotation.py | 10 | # Tests for this model are in musicbrainz_django_server/tests/test_model_annotation.py
|
thedrow/django | refs/heads/master | django/contrib/gis/db/backends/postgis/pgraster.py | 491 | import binascii
import struct
from django.forms import ValidationError
from .const import (
GDAL_TO_POSTGIS, GDAL_TO_STRUCT, POSTGIS_HEADER_STRUCTURE, POSTGIS_TO_GDAL,
STRUCT_SIZE,
)
def pack(structure, data):
"""
Pack data into hex string with little endian format.
"""
return binascii.hexli... |
scottsievert/swix | refs/heads/master | python_testing/testing.py | 6 |
from __future__ import division
from pylab import *
from sklearn import datasets
from sklearn import svm
#import cv2
def svmTest():
def sk_learn():
data = datasets.load_digits()
N_test = int(1050)
x_train = data['data'][:-N_test]
y_train = data['target'][:-N_test]
x_test ... |
adlius/osf.io | refs/heads/develop | website/identifiers/clients/datacite.py | 6 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import re
import datetime
from website.identifiers.clients.base import AbstractIdentifierClient
from website import settings
from datacite import DataCiteMDSClient, schema40
logger = logging.getLogger(__name__)
class DataCiteClient(Abstr... |
dimara/synnefo | refs/heads/develop | snf-cyclades-app/synnefo/db/migrations/0093_auto__add_field_ipaddress_ipversion.py | 10 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'IPAddress.ipversion'
db.add_column('db_ipaddress', 'ipversion',
self.g... |
ellisonbg/altair | refs/heads/master | altair/vega/data.py | 2 | import pandas as pd
from toolz.curried import curry, pipe
from ..utils.core import sanitize_dataframe
from ..utils.data import (
MaxRowsError, sample, to_csv, to_json, to_values, check_data_type
)
@curry
def limit_rows(data, max_rows=5000):
"""Raise MaxRowsError if the data model has more than max_rows."""
... |
favll/pogom | refs/heads/master | pogom/pgoapi/protos/POGOProtos/Networking/Requests/RequestType_pb2.py | 6 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: POGOProtos/Networking/Requests/RequestType.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf.internal import enum_type_wrapper
from google.protobuf import descriptor as _descriptor
from g... |
gustavo-guimaraes/siga | refs/heads/master | backend/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/big5prober.py | 2930 | ######################## BEGIN LICENSE BLOCK ########################
# The Original Code is Mozilla Communicator client code.
#
# The Initial Developer of the Original Code is
# Netscape Communications Corporation.
# Portions created by the Initial Developer are Copyright (C) 1998
# the Initial Developer. All Rights R... |
cheery/essence | refs/heads/master | treemode/argon/keyboard.py | 5 | import pygame
bindings = {
pygame.K_0: "0",
pygame.K_GREATER: "greater",
pygame.K_RALT: "ralt",
pygame.K_1: "1",
pygame.K_HASH: "hash",
pygame.K_RCTRL: "rctrl",
pygame.K_2: "2",
pygame.K_HELP: "help",
pygame.K_RETURN: "return",
pygame.K_3: "3",
pygame.K_HOME: "home",
pyg... |
aljex/iTerm2 | refs/heads/Aljex | tests/esctest/tests/apc.py | 25 | from esc import NUL, ST, S7C1T, S8C1T
import escargs
import esccmd
import escio
from escutil import AssertScreenCharsInRectEqual, knownBug, optionRequired
from esctypes import Rect
class APCTests(object):
@knownBug(terminal="iTerm2", reason="Not implemented.")
def test_APC_Basic(self):
esccmd.APC()
escio.W... |
komsas/OpenUpgrade | refs/heads/master | addons/crm_profiling/wizard/open_questionnaire.py | 44 | # -*- 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... |
mohanprasath/Course-Work | refs/heads/master | data_analysis/uh_data_analysis_with_python/hy-data-analysis-with-python-spring-2020/part05-e01_split_date_continues/test/test_split_date_continues.py | 1 | #!/usr/bin/env python3
import unittest
from unittest.mock import patch
import numpy as np
import pandas as pd
from tmc import points
from tmc.utils import load, get_out, patch_helper
module_name="src.split_date_continues"
split_date_continues = load(module_name, "split_date_continues")
main = load(module_name, "mai... |
sarvex/django | refs/heads/master | django/contrib/staticfiles/templatetags/__init__.py | 12133432 | |
chewable/django | refs/heads/master | tests/regressiontests/templates/__init__.py | 12133432 | |
chugunovyar/factoryForBuild | refs/heads/master | env/lib/python2.7/site-packages/django/contrib/sitemaps/management/commands/__init__.py | 12133432 | |
EricssonResearch/calvin-base | refs/heads/master | calvinextras/calvinsys/io/servomotor/raspberry_pi/__init__.py | 12133432 | |
apexdatasolutions/VistA | refs/heads/master | Scripts/Testing/PyUnit/RPCBrokerCheck.py | 5 | #---------------------------------------------------------------------------
# Copyright 2013 The Open Source Electronic Health Record Agent
#
# 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
#
... |
TheWardoctor/Wardoctors-repo | refs/heads/master | script.module.covenant/lib/resources/lib/sources/en/mzmovies.py | 7 | # -*- coding: utf-8 -*-
'''
Covenant Add-on
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 prog... |
mKeRix/home-assistant | refs/heads/dev | homeassistant/components/sonarr/config_flow.py | 6 | """Config flow for Sonarr."""
import logging
from typing import Any, Dict, Optional
from sonarr import Sonarr, SonarrAccessRestricted, SonarrError
import voluptuous as vol
from homeassistant.config_entries import CONN_CLASS_LOCAL_POLL, ConfigFlow, OptionsFlow
from homeassistant.const import (
CONF_API_KEY,
CO... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.