repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
ly0/xxadmin | refs/heads/master | tests/urls.py | 8 | from django.conf.urls import patterns, include
urlpatterns = patterns('',
(r'^view_base/', include('xtests.view_base.urls')),
) |
jpirates1/Django-python-pro | refs/heads/master | venv/lib/python2.7/site-packages/pip/_vendor/html5lib/filters/whitespace.py | 1730 | from __future__ import absolute_import, division, unicode_literals
import re
from . import _base
from ..constants import rcdataElements, spaceCharacters
spaceCharacters = "".join(spaceCharacters)
SPACES_REGEX = re.compile("[%s]+" % spaceCharacters)
class Filter(_base.Filter):
spacePreserveElements = frozenset... |
Maximilian-Reuter/SickRage-1 | refs/heads/master | lib/tvdb_api/__init__.py | 386048 | |
mathstuf/udiskie | refs/heads/master | udiskie/notify.py | 1 | """
Notification utility.
"""
import logging
import sys
from gi.repository import GLib
from udiskie.mount import DeviceActions
from udiskie.dbus import DBusException
from udiskie.locale import _
__all__ = ['Notify']
class Notify(object):
"""
Notification tool.
Can be connected to udisks daemon in o... |
domenicosolazzo/practice-django | refs/heads/master | static_site_generator/venv/lib/python2.7/site-packages/setuptools/command/setopt.py | 125 | import os
import distutils
from setuptools import Command
from distutils.util import convert_path
from distutils import log
from distutils.errors import DistutilsOptionError
__all__ = ['config_file', 'edit_config', 'option_base', 'setopt']
def config_file(kind="local"):
"""Get the filename of the distutils, loca... |
Scarygami/mirror-api-examples | refs/heads/master | hangout-comment-tracker/service.py | 1 | #!/usr/bin/python
# Copyright (C) 2013 Gerwin Sturm, FoldedSoft e.U.
#
# 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... |
jhoos/django | refs/heads/master | tests/test_client_regress/auth_backends.py | 406 | from django.contrib.auth.backends import ModelBackend
from .models import CustomUser
class CustomUserBackend(ModelBackend):
def authenticate(self, username=None, password=None):
try:
user = CustomUser.custom_objects.get_by_natural_key(username)
if user.check_password(password):
... |
chongtianfeiyu/kbengine | refs/heads/master | kbe/res/scripts/common/Lib/asynchat.py | 77 | # -*- Mode: Python; tab-width: 4 -*-
# Id: asynchat.py,v 2.26 2000/09/07 22:29:26 rushing Exp
# Author: Sam Rushing <rushing@nightmare.com>
# ======================================================================
# Copyright 1996 by Sam Rushing
#
# All Rights Reserved
#
# Permission... |
Bjwebb/detecting-clouds | refs/heads/master | parselogs.py | 1 | import datetime
import subprocess
import re
from collections import defaultdict
# NOTE: this code ignores windspeed events since there are none in the data
"""
find | grep log | xargs -d'\n' cat | grep weather= | sort | uniq -c
36525 finished weather Returned from weather_status, weather=0
2905 finished weather R... |
felipenaselva/felipe.repository | refs/heads/master | script.module.urlresolver/lib/urlresolver/plugins/vidmad.py | 13 | '''
urlresolver Kodi plugin
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.
... |
t0mk/python-stdnum | refs/heads/master | stdnum/at/uid.py | 5 | # vat.py - functions for handling Austrian VAT numbers
#
# Copyright (C) 2012, 2013 Arthur de Jong
#
# 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, o... |
miguelparaiso/OdooAccessible | refs/heads/master | addons/delivery/delivery.py | 64 | # -*- 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... |
dparlevliet/zelenka-report-storage | refs/heads/master | server-local/twisted/names/test/test_names.py | 4 | # -*- test-case-name: twisted.names.test.test_names -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Test cases for twisted.names.
"""
import socket, operator, copy
from StringIO import StringIO
from functools import partial, reduce
from twisted.trial import unittest
from twisted.inte... |
0jpq0/kbengine | refs/heads/master | kbe/src/lib/python/Lib/encodings/cp1253.py | 272 | """ Python Character Mapping Codec cp1253 generated from 'MAPPINGS/VENDORS/MICSFT/WINDOWS/CP1253.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_table)
def decode(self,in... |
dsolimando/Hot | refs/heads/master | hot-framework/src/test/resources/python-script.py | 1 | while True:
n+=1
if n == i:
break
result = n
|
sajeeshcs/nested_projects_keystone | refs/heads/master | keystone/contrib/simple_cert/__init__.py | 27 | # 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
# distributed under t... |
ptoraskar/django | refs/heads/master | django/contrib/gis/gdal/geomtype.py | 297 | from django.contrib.gis.gdal.error import GDALException
from django.utils import six
class OGRGeomType(object):
"Encapulates OGR Geometry Types."
wkb25bit = -2147483648
# Dictionary of acceptable OGRwkbGeometryType s and their string names.
_types = {0: 'Unknown',
1: 'Point',
... |
adit-chandra/tensorflow | refs/heads/master | tensorflow/python/distribute/values_test.py | 3 | # Copyright 2018 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... |
sysalexis/kbengine | refs/heads/master | kbe/src/lib/python/Lib/test/test_importlib/source/__init__.py | 538 | import os
from test.support import load_package_tests
def load_tests(*args):
return load_package_tests(os.path.dirname(__file__), *args)
|
openiitbombayx/edx-platform | refs/heads/master | lms/djangoapps/mobile_api/social_facebook/groups/serializers.py | 128 | """
Serializer for user API
"""
from rest_framework import serializers
from django.core.validators import RegexValidator
class GroupSerializer(serializers.Serializer):
"""
Serializes facebook groups request
"""
name = serializers.CharField(max_length=150)
description = serializers.CharField(ma... |
endlessm/chromium-browser | refs/heads/master | third_party/catapult/telemetry/telemetry/util/statistics.py | 1 | # 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.
"""A collection of statistical utility functions to be used by metrics."""
import math
def Clamp(value, low=0.0, high=1.0):
"""Clamp a value between som... |
dionhaefner/veros | refs/heads/master | veros/setup/wave_propagation/__init__.py | 1 | from veros.setup.wave_propagation.wave_propagation import WavePropagationSetup
|
jamespcole/home-assistant | refs/heads/master | homeassistant/components/vlc/__init__.py | 65 | """The vlc component."""
|
BeATz-UnKNoWN/python-for-android | refs/heads/master | python3-alpha/python3-src/Lib/token.py | 46 | """Token constants (from "token.h")."""
__all__ = ['tok_name', 'ISTERMINAL', 'ISNONTERMINAL', 'ISEOF']
# This file is automatically generated; please don't muck it up!
#
# To update the symbols in this file, 'cd' to the top directory of
# the python source tree after building the interpreter and run:
#
# python... |
tomchristie/django | refs/heads/master | tests/select_related_regress/__init__.py | 12133432 | |
mixman/djangodev | refs/heads/master | tests/regressiontests/generic_inline_admin/__init__.py | 12133432 | |
MAKOSCAFEE/oppia | refs/heads/develop | core/platform/taskqueue/__init__.py | 12133432 | |
foursquare/pants | refs/heads/master | tests/python/pants_test/reporting/__init__.py | 12133432 | |
diorcety/intellij-community | refs/heads/master | python/testData/inspections/PyPep8NamingInspection/test/unittest/case.py | 133 | class TestCase(object):
pass |
GeoCat/QGIS | refs/heads/master | python/plugins/processing/algs/qgis/SpatialIndex.py | 3 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SpatialIndex.py
---------------------
Date : January 2016
Copyright : (C) 2016 by Alexander Bruy
Email : alexander dot bruy at gmail dot com
************... |
serialdoom/ansible | refs/heads/devel | test/units/cli/test_galaxy.py | 4 | # (c) 2016, Adrian Likins <alikins@redhat.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) any later vers... |
jakwings/librime | refs/heads/develop | thirdparty/src/gtest/scripts/gen_gtest_pred_impl.py | 2538 | #!/usr/bin/env python
#
# Copyright 2006, 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... |
MiltosD/CEFELRC | refs/heads/master | lib/python2.7/site-packages/dateutil/relativedelta.py | 257 | """
Copyright (c) 2003-2010 Gustavo Niemeyer <gustavo@niemeyer.net>
This module offers extensions to the standard python 2.3+
datetime module.
"""
__author__ = "Gustavo Niemeyer <gustavo@niemeyer.net>"
__license__ = "PSF License"
import datetime
import calendar
__all__ = ["relativedelta", "MO", "TU", "WE", "TH", "F... |
b-me/django | refs/heads/master | tests/forms_tests/tests/__init__.py | 12133432 | |
ihash/jomlak | refs/heads/master | posts/migrations/__init__.py | 12133432 | |
Hoshiyo/fabric_navitia | refs/heads/master | integration_tests/test_kraken/__init__.py | 12133432 | |
goodwinnk/intellij-community | refs/heads/master | python/helpers/pydev/runfiles.py | 10 | '''
Entry point module (keep at root):
Used to run with tests with unittest/pytest/nose.
'''
import os
try:
xrange
except:
xrange = range
def main():
import sys
# Separate the nose params and the pydev params.
pydev_params = []
other_test_framework_params = []
found_other_test_framework... |
Mechazawa/WordOn-HD-Bot | refs/heads/master | wordonhd/Game.py | 1 | from Word import Word
from Letter import Letter
from Grid import Grid
from time import sleep
from Util import post
class Game(object):
SERVER = 'http://game.wordonhd.com'
SERVER_LISTEN = 'http://listen.wordonhd.com/listen'
def __init__(self, parent, data):
self.parent = parent
self.gamed... |
openstate/yournextrepresentative | refs/heads/master | candidates/management/commands/candidates_add_identifier.py | 1 | from django.core.management.base import BaseCommand, CommandError
from candidates.models import PopItPerson
from candidates.popit import create_popit_api_object
class Command(BaseCommand):
args = "<PERSON-ID> <SCHEME> <IDENTIFIER>"
help = "Add an identifier to a particular person"
def handle(self, *args,... |
mhnatiuk/phd_sociology_of_religion | refs/heads/master | scrapper/build/scrapy/scrapy/utils/jsonrpc.py | 18 | """
This module implements the JSON-RPC 2.0 protocol, as defined in:
http://groups.google.com/group/json-rpc/web/json-rpc-2-0
"""
import urllib
import json
import traceback
from scrapy.utils.serialize import ScrapyJSONDecoder
# JSON-RPC 2.0 errors, as defined in:
class jsonrpc_errors:
PARSE_ERROR = -32700
IN... |
georgestarcher/TA-SyncKVStore | refs/heads/master | bin/ta_synckvstore/solnlib/packages/requests/packages/urllib3/util/connection.py | 353 | from __future__ import absolute_import
import socket
try:
from select import poll, POLLIN
except ImportError: # `poll` doesn't exist on OSX and other platforms
poll = False
try:
from select import select
except ImportError: # `select` doesn't exist on AppEngine.
select = False
def is... |
openstack/swift | refs/heads/master | swift/common/wsgi.py | 1 | # 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... |
jinhyunglee/yass | refs/heads/master | src/yass/process/mask.py | 1 | from scipy.stats import chi2
import numpy as np
def getmask(score, group, mask_th, n_features):
"""
"""
th = 1.5*(chi2.ppf(mask_th, 1)*n_features)
n_data, n_features, n_channels = score.shape
if n_data > 0:
n_group = np.max(group) + 1
# find the average score per group
sco... |
deandunbar/bitwave | refs/heads/master | hackathon_version/venv/lib/python2.7/site-packages/django/views/i18n.py | 68 | import importlib
import json
import os
import gettext as gettext_module
from django import http
from django.apps import apps
from django.conf import settings
from django.template import Context, Template
from django.utils.translation import check_for_language, to_locale, get_language, LANGUAGE_SESSION_KEY
from django.... |
rtyler/graphy | refs/heads/master | graphy/line_chart.py | 205 | #!/usr/bin/python2.4
#
# Copyright 2008 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... |
maestrotf/pymepps-streaming | refs/heads/master | pymeppsstream/streams/ncsubset.py | 1 | #!/bin/env python
# -*- coding: utf-8 -*-
#
#Created on 31.03.17
#
#Created for pymepps-streaming
#
#@author: Tobias Sebastian Finn, tobias.sebastian.finn@studium.uni-hamburg.de
#
# Copyright (C) {2017} {Tobias Sebastian Finn}
#
# This program is free software: you can redistribute it and/or modify
# it under... |
noironetworks/nova | refs/heads/master | nova/tests/unit/network/security_group/test_neutron_driver.py | 8 | # Copyright 2013 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 requi... |
minhphung171093/OpenERP_V8 | refs/heads/master | openerp/addons/web_view_editor/__openerp__.py | 423 | {
'name': 'View Editor',
'category': 'Hidden',
'description': """
OpenERP Web to edit views.
==========================
""",
'version': '2.0',
'depends':['web'],
'data' : [
'views/web_view_editor.xml',
],
'qweb': ['static/src/xml/view_editor.xml'],
'auto_install': Tr... |
rahul67/hue | refs/heads/master | desktop/libs/libzookeeper/src/libzookeeper/tests.py | 6 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... |
zenoss/ZenPacks.Opengear.ConsoleServer | refs/heads/master | ZenPacks/Opengear/ConsoleServer/modeler/plugins/Emds.py | 3 | ###############################################################################
#
# Emds command parser plugin
#
###############################################################################
__doc__ = """ Emds
Emds maps Opengear the "config -g config" command to zenoss data
$id: $"""
__version__ = "$Revision: 1.4... |
jalavik/inspire-next | refs/heads/master | inspire/dojson/hep/fields/bd70x75x.py | 2 | # -*- coding: utf-8 -*-
#
# This file is part of INSPIRE.
# Copyright (C) 2014, 2015 CERN.
#
# INSPIRE 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... |
carstooon/AliPhysics | refs/heads/master | PWGJE/EMCALJetTasks/__init__.py | 123 | #**************************************************************************
#* Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
#* *
#* Author: The ALICE Off-line Project. *
#* Contributors ... |
olexiim/edx-platform | refs/heads/master | common/lib/xmodule/xmodule/tests/xml/factories.py | 50 | """
Factories for generating edXML for testing XModule import
"""
import inspect
from fs.memoryfs import MemoryFS
from factory import Factory, lazy_attribute, post_generation, Sequence
from lxml import etree
from xmodule.modulestore.inheritance import InheritanceMixin
from xmodule.modulestore import only_xmodules
... |
jspargo/AneMo | refs/heads/master | django/lib/python2.7/site-packages/django/contrib/admin/templatetags/admin_urls.py | 553 | from django import template
from django.contrib.admin.utils import quote
from django.core.urlresolvers import Resolver404, get_script_prefix, resolve
from django.utils.http import urlencode
from django.utils.six.moves.urllib.parse import parse_qsl, urlparse, urlunparse
register = template.Library()
@register.filter
... |
mesosphere-mergebot/mergebot-test-dcos | refs/heads/master | gen/tests/test_config.py | 3 | import json
import tempfile
import pkg_resources
import pytest
import yaml
import gen
import pkgpanda.util
from gen.tests.utils import make_arguments, true_false_msg, validate_error, validate_error_multikey, validate_success
@pytest.mark.skipif(pkgpanda.util.is_windows, reason="configuration not present on windows"... |
xzturn/tensorflow | refs/heads/master | tensorflow/python/data/util/traverse.py | 27 | # Copyright 2018 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... |
pshchelo/heat | refs/heads/master | heat/engine/lifecycle_plugin.py | 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
# ... |
iTerminate/class5 | refs/heads/master | lecture5_lib.py | 1 | '''
library of functions used in APS 2016 Python lecture 5
.. autosummary::
peak_position
center_of_mass
fwhm
'''
def _get_peak_index(y):
'''
report the index of the first point with maximum in y[i]
:param [float] y: array (list of float) of values
:return int: index of y
'''
... |
alda519/GreenTea | refs/heads/master | apps/api/migrations/__init__.py | 12133432 | |
vinc/oximon | refs/heads/master | oximon/__init__.py | 12133432 | |
argyleref/twitch-plays | refs/heads/master | config/__init__.py | 12133432 | |
crystalxiaoou/python | refs/heads/master | learn_python/pickle_exer/__init__.py | 12133432 | |
joberreiter/pyload | refs/heads/stable | module/plugins/hoster/SmoozedCom.py | 2 | # -*- coding: utf-8 -*-
from module.common.json_layer import json_loads
from module.plugins.internal.MultiHoster import MultiHoster
class SmoozedCom(MultiHoster):
__name__ = "SmoozedCom"
__type__ = "hoster"
__version__ = "0.09"
__status__ = "testing"
__pattern__ = r'^unmatchable$' #: Sin... |
Zlash65/erpnext | refs/heads/develop | erpnext/patches/v6_4/fix_modified_in_sales_order_and_purchase_order.py | 79 | from __future__ import unicode_literals
import frappe
def execute():
for doctype in ("Sales Order", "Purchase Order"):
data = frappe.db.sql("""select parent, modified_by, modified
from `tab{doctype} Item` where docstatus=1 group by parent""".format(doctype=doctype), as_dict=True)
for item in data:
frappe.db... |
icomms/wqmanager | refs/heads/master | apps/requestlogger/admin.py | 4 | #!/usr/bin/env python
# vim: ai ts=4 sts=4 et sw=4
from django.contrib import admin
from requestlogger.models import *
admin.site.register(RequestLog) |
tkanemoto/django-celery | refs/heads/master | djcelery/backends/database.py | 17 | from __future__ import absolute_import, unicode_literals
from celery import current_app
from celery.backends.base import BaseDictBackend
from celery.utils.timeutils import maybe_timedelta
from ..models import TaskMeta, TaskSetMeta
class DatabaseBackend(BaseDictBackend):
"""The database backend.
Using Djang... |
40223201/w16b_test | refs/heads/master | static/Brython3.1.1-20150328-091302/Lib/site-packages/pygame/draw.py | 603 | from javascript import console
from browser import timer
import math
class Queue:
def __init__(self):
self._list=[]
def empty(self):
return len(self._list) == 0
def put(self, element):
self._list.append(element)
def get(self):
if len(self._list) == 0:
raise BaseError
... |
darrencheng0817/AlgorithmLearning | refs/heads/master | Python/webCrawler/simpleCrawler.py | 1 | '''
Created on 2016年1月12日
@author: Darren
'''
#encoding:UTF-8
import time
import urllib.request
import re
from collections import deque
def crawlerData(url):
urlop = urllib.request.urlopen(url)
if 'html' not in urlop.getheader('Content-Type'):
print("not html")
return
# 避免程序异常中止, 用tr... |
kevinlee12/oppia | refs/heads/develop | core/domain/platform_parameter_registry.py | 1 | # coding: utf-8
#
# Copyright 2020 The Oppia 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 requi... |
luhn/AutobahnPython | refs/heads/master | examples/asyncio/wamp/beginner/server.py | 1 | ###############################################################################
##
## Copyright (C) 2014 Tavendo GmbH
##
## 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:/... |
katholt/Kleborate | refs/heads/master | test/test_contig_stats.py | 1 | """
Copyright 2020 Kat Holt
Copyright 2020 Ryan Wick (rrwick@gmail.com)
https://github.com/katholt/Kleborate/
This file is part of Kleborate. Kleborate 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 versi... |
0x90sled/catapult | refs/heads/master | third_party/gsutil/third_party/boto/boto/rds/statusinfo.py | 180 | # Copyright (c) 2013 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 without restriction, including
# without limitation the rights... |
kenda/codingcontest2012 | refs/heads/master | tastypie/utils/formatting.py | 3 | import email
import datetime
from django.utils import dateformat
from tastypie.utils.timezone import make_aware, make_naive, aware_datetime
# Try to use dateutil for maximum date-parsing niceness. Fall back to
# hard-coded RFC2822 parsing if that's not possible.
try:
from dateutil.parser import parse as mk_datetim... |
lhaze/dharma | refs/heads/master | pca/domain/__init__.py | 1 | from .entity import ( # noqa: F401
AutoId,
Entity,
NaturalId,
SequenceId,
Uuid4Id,
)
from .repository import Factory # noqa: F401
from .repository import Repository # noqa: F401
from .value_object import ValueObject # noqa: F401
|
mmitucha/blavanet-web | refs/heads/master | blog/templatetags/search.py | 1 | from haystack.utils import Highlighter
from django.utils.html import strip_tags
class MyHighlighter(Highlighter):
"""
Custom highlighter
"""
def highlight(self, text_block):
self.text_block = strip_tags(text_block)
highlight_locations = self.find_highlightable_words()
start_offs... |
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8 | refs/heads/master | lib/python2.7/test/test_collections.py | 42 |
import unittest, doctest, operator
import inspect
from test import test_support
from collections import namedtuple, Counter, OrderedDict
from test import mapping_tests
import pickle, cPickle, copy
from random import randrange, shuffle
import keyword
import re
import sys
from collections import Hashable, Iterable, Iter... |
ESS-LLP/erpnext | refs/heads/develop | erpnext/accounts/doctype/shipping_rule/__init__.py | 12133432 | |
agusmakmun/simpleDjango | refs/heads/master | project/__init__.py | 12133432 | |
lumig242/Hue-Integration-with-CDAP | refs/heads/pull3 | desktop/core/ext-py/Django-1.6.10/django/contrib/gis/maps/__init__.py | 12133432 | |
DasIch/django | refs/heads/master | tests/bash_completion/__init__.py | 12133432 | |
EmadMokhtar/Django | refs/heads/master | tests/migrations/migrations_test_apps/unspecified_app_with_conflict/models.py | 12133432 | |
3dfxmadscientist/odoo-infrastructure | refs/heads/master | addons/infrastructure/wizard/__init__.py | 4 | # -*- coding: utf-8 -*-
##############################################################################
#
# Infrastructure
# Copyright (C) 2014 Ingenieria ADHOC
# No email
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License... |
philanthropy-u/edx-platform | refs/heads/master | openedx/core/djangoapps/content/course_overviews/management/commands/generate_course_overview.py | 18 | """
Command to load course overviews.
"""
import logging
from django.core.management.base import BaseCommand, CommandError
from opaque_keys import InvalidKeyError
from openedx.core.djangoapps.content.course_overviews.tasks import (
DEFAULT_ALL_COURSES,
DEFAULT_CHUNK_SIZE,
DEFAULT_FORCE_UPDATE,
enque... |
dsajkl/reqiop | refs/heads/master | lms/djangoapps/psychometrics/management/__init__.py | 12133432 | |
AdrianGaudebert/socorro-crashstats | refs/heads/master | crashstats/auth/__init__.py | 12133432 | |
eayunstack/neutron | refs/heads/master | neutron/agent/common/polling.py | 10 | # Copyright 2015 Cloudbase Solutions.
# 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... |
heathseals/CouchPotatoServer | refs/heads/master | libs/subliminal/services/opensubtitles.py | 106 | # -*- coding: utf-8 -*-
# Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com>
#
# This file is part of subliminal.
#
# subliminal 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... |
digwanderlust/pants | refs/heads/master | src/python/pants/backend/maven_layout/__init__.py | 12133432 | |
stewartpark/django | refs/heads/master | tests/mail/__init__.py | 12133432 | |
saurabh6790/OFF-RISLIB | refs/heads/master | website/doctype/about_us_settings/templates/__init__.py | 12133432 | |
csdl/makahiki | refs/heads/master | makahiki/apps/lib/avatar/templatetags/__init__.py | 12133432 | |
mociepka/saleor | refs/heads/master | saleor/userprofile/management/commands/__init__.py | 12133432 | |
chugunovyar/factoryForBuild | refs/heads/master | env/lib/python2.7/site-packages/pybrain/datasets/unsupervised.py | 4 | #! /usr/bin/env python2.5
# -*- coding: utf-8 -*-
__author__ = 'Justin S Bayer, bayer.justin@googlemail.com'
__version__ = '$Id$'
from pybrain.datasets.dataset import DataSet
class UnsupervisedDataSet(DataSet):
"""UnsupervisedDataSets have a single field 'sample'."""
def __init__(self, dim):
... |
c86j224s/snippet | refs/heads/master | Python_asyncio_binary_echo/pyclient2/Lib/site-packages/pip/_internal/req/req_set.py | 7 | from __future__ import absolute_import
import logging
from collections import OrderedDict
from pip._internal.exceptions import InstallationError
from pip._internal.utils.logging import indent_log
from pip._internal.wheel import Wheel
logger = logging.getLogger(__name__)
class RequirementSet(object):
def __ini... |
blacked/py-zabbix | refs/heads/master | pyzabbix/api.py | 2 | # -*- encoding: utf-8 -*-
#
# Copyright © 2014 Alexey Dubkov
#
# This file is part of py-zabbix.
#
# Py-zabbix 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 opt... |
mydongistiny/external_chromium_org | refs/heads/benzo | native_client_sdk/src/tools/tests/oshelpers_test.py | 159 | #!/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.
import os
import shutil
import subprocess
import sys
import tempfile
import unittest
import zipfile
SCRIPT_DIR = os.path.dirname(o... |
renyi533/tensorflow | refs/heads/master | tensorflow/python/keras/layers/merge.py | 2 | # 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... |
raphaelmerx/django | refs/heads/master | tests/foreign_object/tests.py | 157 | import datetime
from operator import attrgetter
from django.core.exceptions import FieldError
from django.test import TestCase, skipUnlessDBFeature
from django.utils import translation
from .models import (
Article, ArticleIdea, ArticleTag, ArticleTranslation, Country, Friendship,
Group, Membership, NewsArtic... |
allmende/synnefo | refs/heads/develop | snf-cyclades-app/synnefo/logic/subnets.py | 6 | # Copyright (C) 2010-2014 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed i... |
delinhabit/django | refs/heads/master | django/contrib/gis/db/backends/spatialite/features.py | 326 | from django.contrib.gis.db.backends.base.features import BaseSpatialFeatures
from django.contrib.gis.geos import geos_version_info
from django.db.backends.sqlite3.features import \
DatabaseFeatures as SQLiteDatabaseFeatures
from django.utils.functional import cached_property
class DatabaseFeatures(BaseSpatialFeat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.