repo_name stringlengths 5 100 | ref stringlengths 12 67 | path stringlengths 4 244 | copies stringlengths 1 8 | content stringlengths 0 1.05M ⌀ |
|---|---|---|---|---|
NcLang/vimrc | refs/heads/master | sources_non_forked/YouCompleteMe/third_party/ycmd/third_party/JediHTTP/vendor/jedi/test/static_analysis/arguments.py | 20 | # -----------------
# normal arguments (no keywords)
# -----------------
def simple(a):
return a
simple(1)
#! 6 type-error-too-few-arguments
simple()
#! 10 type-error-too-many-arguments
simple(1, 2)
#! 10 type-error-too-many-arguments
simple(1, 2, 3)
# -----------------
# keyword arguments
# -----------------... |
synicalsyntax/zulip | refs/heads/master | zerver/lib/stream_recipient.py | 4 | from typing import Dict, List
from django.db import connection
from psycopg2.sql import SQL
from zerver.models import Recipient
class StreamRecipientMap:
'''
This class maps stream_id -> recipient_id and vice versa.
It is useful for bulk operations. Call the populate_* methods
to initialize the dat... |
SerCeMan/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/similar.py | 96 | # similar.py - mechanisms for finding similar files
#
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later version.
from i18n import _
import util
import mdiff
import bdiff
def _findexactmat... |
llvm-mirror/lldb | refs/heads/master | examples/python/lldbtk.py | 6 | #!/usr/bin/python
from __future__ import print_function
import lldb
import shlex
import sys
try:
from tkinter import *
import tkinter.ttk as ttk
except ImportError:
from Tkinter import *
import ttk
class ValueTreeItemDelegate(object):
def __init__(self, value):
self.value = value
de... |
rosswhitfield/mantid | refs/heads/master | Framework/PythonInterface/mantid/plots/mantidaxes.py | 3 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2017 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
# T... |
mattrobenolt/django | refs/heads/master | django/contrib/sites/middleware.py | 515 | from .shortcuts import get_current_site
class CurrentSiteMiddleware(object):
"""
Middleware that sets `site` attribute to request object.
"""
def process_request(self, request):
request.site = get_current_site(request)
|
bobcyw/django | refs/heads/master | tests/messages_tests/test_cookie.py | 299 | import json
from django.contrib.messages import constants
from django.contrib.messages.storage.base import Message
from django.contrib.messages.storage.cookie import (
CookieStorage, MessageDecoder, MessageEncoder,
)
from django.test import SimpleTestCase, override_settings
from django.utils.safestring import Safe... |
klen/aioauth-client | refs/heads/develop | example/google.py | 1 | """
enable Google+ API by visiting
https://console.developers.google.com/apis/api/plus.googleapis.com/overview
Requirements:
aioauth-client
asgi-tools
asgi-sessions
uvicorn
Run the example with uvicorn:
$ uvicorn --port 5000 example.google_example:app
"""
from asgi_tools import App, ResponseRed... |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/kombu/utils/text.py | 32 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from difflib import SequenceMatcher
from kombu import version_info_t
from kombu.five import string_t
def fmatch_iter(needle, haystack, min_ratio=0.6):
for key in haystack:
ratio = SequenceMatcher(None, needle, key).ratio()
if ratio >... |
newrocknj/horizon | refs/heads/master | openstack_dashboard/dashboards/project/database_backups/views.py | 33 | # Copyright 2013 Rackspace Hosting
#
# 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 ... |
supersven/intellij-community | refs/heads/master | python/lib/Lib/distutils/command/bdist_dumb.py | 81 | """distutils.command.bdist_dumb
Implements the Distutils 'bdist_dumb' command (create a "dumb" built
distribution -- i.e., just an archive to be unpacked under $prefix or
$exec_prefix)."""
# This module should be kept compatible with Python 2.1.
__revision__ = "$Id: bdist_dumb.py 38697 2005-03-23 18:54:36Z loewis $"... |
dalepartridge/seapy | refs/heads/master | oa.py | 1 | #!/usr/bin/env python
"""
oa
Objective analysis. This function will interpolate data using the
fortran routines written by Emanuelle Di Lorenzo and Bruce Cornuelle
Written by Brian Powell on 10/08/13
Copyright (c)2017 University of Hawaii under the BSD-License.
"""
import numpy as np
import seapy.oalib
_... |
veger/ansible | refs/heads/devel | lib/ansible/plugins/terminal/sros.py | 84 | #
# (c) 2016 Red Hat 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 later version.
#
# Ansible is d... |
pjdelport/django | refs/heads/master | tests/regressiontests/admin_ordering/tests.py | 60 | from __future__ import absolute_import, unicode_literals
from django.test import TestCase, RequestFactory
from django.contrib.admin.options import ModelAdmin
from django.contrib.auth.models import User
from .models import (Band, Song, SongInlineDefaultOrdering,
SongInlineNewOrdering, DynOrderingBandAdmin)
class... |
coderhaoxin/tornado | refs/heads/master | tornado/test/httputil_test.py | 36 | #!/usr/bin/env python
from __future__ import absolute_import, division, print_function, with_statement
from tornado.httputil import url_concat, parse_multipart_form_data, HTTPHeaders, format_timestamp, HTTPServerRequest, parse_request_start_line
from tornado.escape import utf8, native_str
from tornado.log import gen_... |
pyta-uoft/pyta | refs/heads/master | examples/ending_locations/class_def.py | 1 | @wrapper
class Foo(base1, base2):
pass
|
laonawuli/addrest | refs/heads/master | web2py/gluon/contrib/minify/htmlmin.py | 44 | # coding: utf-8
import re
def minify(response):
def _replace(match):
match = match.group()
# save whole <pre>, <textarea> tags, and opening <!-- (so it doesn't break <script>)
# otherwise, replace all whitespace with a single space character
return match if match.startswith(('<pre... |
JohnUrban/fast5tools | refs/heads/master | bin/fast5tofastx.py | 1 | #!/usr/bin/env python2.7
import h5py, os, sys
import cStringIO as StringIO
from Bio import SeqIO
from fast5tools.f5class import *
from fast5tools.f5ops import *
import argparse
from glob import glob
#################################################
## Argument Parser
#################################################... |
Neural-Space/shabd | refs/heads/master | shabd/tools/__init__.py | 12133432 | |
Wilee999/panda3d | refs/heads/master | direct/src/motiontrail/__init__.py | 12133432 | |
voidcc/PCTRL | refs/heads/master | pox/datapaths/__init__.py | 44 | # Copyright 2013 James McCauley
#
# 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 writi... |
HiSPARC/topaz | refs/heads/master | 160229_507_510/test_detector_positions.py | 1 | import itertools
from datetime import datetime
import tables
from numpy import array, histogram2d, linspace, pi
from artist import Plot
from sapphire import HiSPARCStations, ReconstructESDEvents, Station, download_coincidences
STATIONS = [507, 510]
COINDATA_PATH = '/Users/arne/Datastore/507_510/c_507_510.h5'
STAR... |
devs1991/test_edx_docmode | refs/heads/master | venv/lib/python2.7/site-packages/nltk/tokenize/sexpr.py | 17 | # Natural Language Toolkit: Tokenizers
#
# Copyright (C) 2001-2012 NLTK Project
# Author: Yoav Goldberg <yoavg@cs.bgu.ac.il>
# Steven Bird <sb@csse.unimelb.edu.au> (minor edits)
# URL: <http://nltk.sourceforge.net>
# For license information, see LICENSE.TXT
"""
S-Expression Tokenizer
``SExprTokenizer`` is use... |
samthor/intellij-community | refs/heads/master | python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/fixes/fix_except.py | 326 | """Fixer for except statements with named exceptions.
The following cases will be converted:
- "except E, T:" where T is a name:
except E as T:
- "except E, T:" where T is not a name, tuple or list:
except E as t:
T = t
This is done because the target of an "except" clause must be a
... |
mnesvold/freq | refs/heads/master | services/web/freq_demo/admin.py | 1 | from django.contrib import admin
from django.contrib.auth.forms import AuthenticationForm
def customize_admin():
admin.site.site_header = 'Feature Request Tracker'
admin.site.site_title = 'Freq'
admin.site.index_title = 'Track Feature Requests with Freq'
admin.site.site_url = None
# allow non-staf... |
dotcool/zulip | refs/heads/master | zerver/lib/cache.py | 116 | from __future__ import absolute_import
from functools import wraps
from django.core.cache import cache as djcache
from django.core.cache import get_cache
from django.conf import settings
from django.db.models import Q
from zerver.lib.utils import statsd, statsd_key, make_safe_digest
import time
import base64
import ... |
CoJMC/jaam | refs/heads/master | jaam/stories/tests.py | 6666 | """
This file demonstrates writing tests using the unittest module. These will pass
when you run "manage.py test".
Replace this with more appropriate tests for your application.
"""
from django.test import TestCase
class SimpleTest(TestCase):
def test_basic_addition(self):
"""
Tests that 1 + 1 a... |
Plexxi/st2 | refs/heads/master | st2common/tests/unit/test_stream_generator.py | 3 | # Copyright 2020 The StackStorm Authors.
# Copyright 2019 Extreme Networks, 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 ... |
SlimRoms/android_external_chromium_org | refs/heads/lp5.0 | tools/memory_inspector/memory_inspector/core/exceptions.py | 109 | # 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.
class MemoryInspectorException(Exception):
"""Base exception class used for all memory inspector related exceptions."""
def __init__(self, value):
su... |
rodxavier/open-pse-initiative | refs/heads/master | django_project/companies/urls.py | 1 | from django.conf.urls import patterns, url
from companies.views import CompanyListView
urlpatterns = patterns('',
url(r'^$', CompanyListView.as_view(), name='companies_list'),
)
|
dulems/hue | refs/heads/master | desktop/core/ext-py/Django-1.6.10/django/test/signals.py | 222 | import os
import time
from django.conf import settings
from django.db import connections
from django.dispatch import receiver, Signal
from django.utils import timezone
from django.utils.functional import empty
template_rendered = Signal(providing_args=["template", "context"])
setting_changed = Signal(providing_args=... |
RicardoJohann/frappe | refs/heads/develop | frappe/core/doctype/translation/__init__.py | 12133432 | |
autocorr/besl | refs/heads/master | besl/ppv_group.py | 1 | """
===========================
PPV Grouping and Clustering
===========================
Functions and routines to perform clustering analysis on the BGPS HCO+/N2H+
molecular line survey.
"""
from __future__ import division
import numpy as np
import pandas as pd
import cPickle as pickle
from collections import deque
... |
quru/rvsr | refs/heads/master | networkx/external/__init__.py | 12133432 | |
luxnovalabs/enjigo_door | refs/heads/master | web_interface/django/conf/locale/th/__init__.py | 12133432 | |
CIFASIS/pylearn2 | refs/heads/master | pylearn2/expr/__init__.py | 12133432 | |
gooddata/openstack-nova | refs/heads/master | nova/tests/unit/conductor/tasks/__init__.py | 12133432 | |
GenericUser666/Hienot_skriptit | refs/heads/master | loop_example.py | 12133432 | |
labordoc/labordoc-next | refs/heads/labordoc-next | modules/bibfield/lib/bibfield.py | 2 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011, 2013 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version ... |
b-jesch/service.fritzbox.callmonitor | refs/heads/master | resources/lib/PhoneBooks/pyicloud/vendorlibs/certifi/core.py | 69 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
certifi.py
~~~~~~~~~~
This module returns the installation location of cacert.pem.
"""
import os
import warnings
class DeprecatedBundleWarning(DeprecationWarning):
"""
The weak security bundle is being deprecated. Please bother your service
provider to g... |
mribeirodantas/metsheets | refs/heads/master | met/settings.py | 1 | # -*- coding: utf-8 -*-
"""
Django settings for met project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.jo... |
WillGuan105/django | refs/heads/master | tests/middleware/test_security.py | 291 | from django.http import HttpResponse
from django.test import RequestFactory, SimpleTestCase
from django.test.utils import override_settings
class SecurityMiddlewareTest(SimpleTestCase):
@property
def middleware(self):
from django.middleware.security import SecurityMiddleware
return SecurityMid... |
charukiewicz/beer-manager | refs/heads/master | venv/lib/python3.4/site-packages/pip/_vendor/distlib/metadata.py | 190 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012 The Python Software Foundation.
# See LICENSE.txt and CONTRIBUTORS.txt.
#
"""Implementation of the Metadata for Python packages PEPs.
Supports all metadata formats (1.0, 1.1, 1.2, and 2.0 experimental).
"""
from __future__ import unicode_literals
import codecs
from email... |
Nic30/hwtLib | refs/heads/master | hwtLib/peripheral/displays/hd44780/intf.py | 1 | # -*- coding: utf-8 -*-
from math import ceil
from hwt.interfaces.std import Signal, VectSignal
from hwt.synthesizer.interface import Interface
from hwt.synthesizer.param import Param
from pyMathBitPrecise.bit_utils import get_bit, mask, get_bit_range
from hwtSimApi.agents.base import AgentBase
from hwtSimApi.hdlSimu... |
tiexinliu/odoo_addons | refs/heads/8.0 | smile_checklist/__init__.py | 20 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2010 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... |
pedrobaeza/odoomrp-utils | refs/heads/8.0 | stock_planning_procurement_generated_by_plan/models/stock_planning.py | 3 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in root directory
##############################################################################
from openerp import models, fields, api
import openerp.addo... |
ebukoz/thrive | refs/heads/develop | erpnext/patches/v6_24/repost_valuation_rate_for_serialized_items.py | 59 | # 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 frappe
from frappe.utils import today
from erpnext.accounts.utils import get_fiscal_year
from erpnext.stock.stock_ledger import update_entries... |
hdmetor/scikit-learn | refs/heads/master | sklearn/manifold/spectral_embedding_.py | 128 | """Spectral Embedding"""
# Author: Gael Varoquaux <gael.varoquaux@normalesup.org>
# Wei LI <kuantkid@gmail.com>
# License: BSD 3 clause
import warnings
import numpy as np
from scipy import sparse
from scipy.linalg import eigh
from scipy.sparse.linalg import lobpcg
from ..base import BaseEstimator
from ..ext... |
rajsadho/django | refs/heads/master | tests/migrations/test_migrations_squashed_complex_multi_apps/app2/2_auto.py | 385 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [("app2", "1_auto")]
operations = [
migrations.RunPython(migrations.RunPython.noop)
]
|
leafclick/intellij-community | refs/heads/master | plugins/hg4idea/testData/bin/mercurial/hgweb/common.py | 92 | # hgweb/common.py - Utility functions needed by hgweb_mod and hgwebdir_mod
#
# Copyright 21 May 2005 - (c) 2005 Jake Edge <jake@edge2.net>
# Copyright 2005, 2006 Matt Mackall <mpm@selenic.com>
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2 or any later... |
Laucoonte/cpmx | refs/heads/master | object_detection/anchor_generators/multiple_grid_anchor_generator_test.py | 21 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... |
SlashNephy/PyChroner-Bot | refs/heads/master | plugins/Information/WikipediaDayTopic.py | 1 | # coding=utf-8
import re
import requests
import lxml.html
import json
from datetime import datetime
from pychroner import PluginMeta, PluginType
@PluginMeta(PluginType.Schedule, hours=[0], minutes=[0])
def do(pluginApi):
today = datetime.today()
url = f"https://ja.wikipedia.org/wiki/{today.month}%E6%9C%88{to... |
kkuunnddaannkk/vispy | refs/heads/master | vispy/util/tests/test_run.py | 18 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Vispy Development Team.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
from vispy.util import run_subprocess
from vispy.testing import run_tests_if_main, assert_raises
def test_run():
"""Test running subprocesses
"""
bad_name = 'foo_... |
massmutual/scikit-learn | refs/heads/master | sklearn/ensemble/gradient_boosting.py | 12 | """Gradient Boosted Regression Trees
This module contains methods for fitting gradient boosted regression trees for
both classification and regression.
The module structure is the following:
- The ``BaseGradientBoosting`` base class implements a common ``fit`` method
for all the estimators in the module. Regressio... |
mchristopher/PokemonGo-DesktopMap | refs/heads/master | app/pylibs/shared/pgoapi/protos/POGOProtos/Settings/Master/Pokemon/__init__.py | 24 | 'Generated'; import os; import sys; sys.path.append(os.path.dirname(os.path.realpath(__file__)))
|
javelinanddart/android_kernel_sense_ville | refs/heads/master | tools/perf/scripts/python/net_dropmonitor.py | 4235 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... |
errx/django | refs/heads/master | tests/test_client/__init__.py | 12133432 | |
jodal/mopidy | refs/heads/develop | tests/file/__init__.py | 12133432 | |
meghana1995/sympy | refs/heads/master | sympy/physics/optics/tests/__init__.py | 12133432 | |
ekosareva/networking-vsphere | refs/heads/master | networking_vsphere/tests/unit/agent/test_dvs_agent.py | 4 | # Copyright 2015 Mirantis, 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 requ... |
bsmrstu-warriors/Moytri--The-Drone-Aider | refs/heads/master | Lib/sgmllib.py | 306 | """A parser for SGML, using the derived class as a static DTD."""
# XXX This only supports those SGML features used by HTML.
# XXX There should be a way to distinguish between PCDATA (parsed
# character data -- the normal case), RCDATA (replaceable character
# data -- only char and entity references and end tags are ... |
chongtianfeiyu/kbengine | refs/heads/master | kbe/src/lib/python/Lib/lib2to3/pgen2/pgen.py | 161 | # Copyright 2004-2005 Elemental Security, Inc. All Rights Reserved.
# Licensed to PSF under a Contributor Agreement.
# Pgen imports
from . import grammar, token, tokenize
class PgenGrammar(grammar.Grammar):
pass
class ParserGenerator(object):
def __init__(self, filename, stream=None):
close_stream =... |
JackDanger/sentry | refs/heads/master | src/sentry/models/groupsnooze.py | 5 | from __future__ import absolute_import
from django.db import models
from sentry.db.models import Model, FlexibleForeignKey, sane_repr
class GroupSnooze(Model):
"""
A snooze marks an issue as ignored for a duration (specified by ``until``).
"""
__core__ = False
group = FlexibleForeignKey('sentry.... |
adamjmcgrath/glancydesign | refs/heads/master | django/conf/locale/sl/formats.py | 257 | # -*- encoding: utf-8 -*-
# This file is distributed under the same license as the Django package.
#
# The *_FORMAT strings use the Django date format syntax,
# see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date
DATE_FORMAT = 'd. F Y'
TIME_FORMAT = 'H:i:s'
DATETIME_FORMAT = 'j. F Y. H:i'
YEAR_MONTH_... |
StrellaGroup/erpnext | refs/heads/develop | erpnext/utilities/web_form/__init__.py | 12133432 | |
niconoe/django-nuages-tag | refs/heads/master | django_nuages_tag/__init__.py | 12133432 | |
davidliwei/mageck | refs/heads/master | mageck/testVisualCount.py | 1 | #
#
from __future__ import print_function;
import sys;
import re;
import os;
import logging;
from fileOps import *
from mageckCount import *
class VisualRCount:
'''
Class for generating reports of count command
'''
outprefix='sample1';
# internal variable, for R file
outrfh=None; # file handle for ... |
apanda/phantomjs-intercept | refs/heads/2.0 | src/qt/qtwebkit/Tools/Scripts/webkitpy/style/filereader.py | 182 | # Copyright (C) 2009 Google Inc. All rights reserved.
# Copyright (C) 2010 Chris Jerdonek (chris.jerdonek@gmail.com)
# Copyright (C) 2010 ProFUSION embedded systems
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# ... |
Jusedawg/SickRage | refs/heads/develop | tests/__init__.py | 12133432 | |
ungarj/erwin | refs/heads/master | __init__.py | 12133432 | |
xwolf12/django | refs/heads/master | django/conf/locale/bg/__init__.py | 12133432 | |
PaulKinlan/WebIntents | refs/heads/master | server/demos/imagestudio/__init__.py | 12133432 | |
ShinyROM/android_external_chromium_org | refs/heads/master | chrome/common/extensions/docs/server2/offline_file_system.py | 25 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from file_system import FileSystem, FileNotFoundError
from future import Gettable, Future
class OfflineFileSystem(FileSystem):
'''An offline FileSystem w... |
JizhouZhang/SDR | refs/heads/master | gr-wxgui/python/wxgui/histo_window.py | 47 | #
# Copyright 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later version.
#
#... |
idea4bsd/idea4bsd | refs/heads/idea4bsd-master | python/testData/completion/predefinedMethodNot.after.py | 83 | # no completion must happen here
class Foo:
def bar(self):
__rxo
|
stevenzhang18/Indeed-Flask | refs/heads/master | lib/pandas/tools/tests/test_merge.py | 9 | # pylint: disable=E1103
import nose
from datetime import datetime
from numpy.random import randn
from numpy import nan
import numpy as np
import random
import pandas as pd
from pandas.compat import range, lrange, lzip, zip, StringIO
from pandas import compat
from pandas.tseries.index import DatetimeIndex
from pandas... |
scripnichenko/nova | refs/heads/master | nova/keymgr/not_implemented_key_mgr.py | 112 | # Copyright (c) 2013 The Johns Hopkins University/Applied Physics Laboratory
# 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/... |
bcornwellmott/erpnext | refs/heads/develop | erpnext/accounts/doctype/shipping_rule_condition/shipping_rule_condition.py | 121 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
class ShippingRuleCondition(Document):
pa... |
appapantula/scikit-learn | refs/heads/master | examples/cluster/plot_agglomerative_clustering_metrics.py | 402 | """
Agglomerative clustering with different metrics
===============================================
Demonstrates the effect of different metrics on the hierarchical clustering.
The example is engineered to show the effect of the choice of different
metrics. It is applied to waveforms, which can be seen as
high-dimens... |
ahmedaljazzar/edx-platform | refs/heads/master | openedx/core/djangoapps/content/block_structure/block_structure.py | 13 | """
Module with family of classes for block structures.
BlockStructure - responsible for block existence and relations.
BlockStructureBlockData - responsible for block & transformer data.
BlockStructureModulestoreData - responsible for xBlock data.
The following internal data structures are implemented:
... |
40423112/2016fallcadp_hw | refs/heads/gh-pages | plugin/summary/test_summary.py | 339 | # -*- coding: utf-8 -*-
import unittest
from jinja2.utils import generate_lorem_ipsum
# generate one paragraph, enclosed with <p>
TEST_CONTENT = str(generate_lorem_ipsum(n=1))
TEST_SUMMARY = generate_lorem_ipsum(n=1, html=False)
from pelican.contents import Page
import summary
class TestSummary(unittest.TestCase... |
xfournet/intellij-community | refs/heads/master | python/lib/Lib/site-packages/django/core/__init__.py | 12133432 | |
gh0std4ncer/thug | refs/heads/master | src/Analysis/peepdf/__init__.py | 12133432 | |
macs03/demo-cms | refs/heads/master | cms/lib/python2.7/site-packages/django/conf/locale/vi/__init__.py | 12133432 | |
kaichogami/scikit-learn | refs/heads/master | sklearn/learning_curve.py | 30 | """Utilities to evaluate models with respect to a variable
"""
# Author: Alexander Fabisch <afabisch@informatik.uni-bremen.de>
#
# License: BSD 3 clause
import warnings
import numpy as np
from .base import is_classifier, clone
from .cross_validation import check_cv
from .externals.joblib import Parallel, delayed
fro... |
SnabbCo/neutron | refs/heads/master | neutron/plugins/nec/db/__init__.py | 216 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
#
# Copyright 2012 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.or... |
frdb194/django | refs/heads/master | tests/auth_tests/models/__init__.py | 268 | from .custom_permissions import CustomPermissionsUser
from .invalid_models import (
CustomUserBadRequiredFields, CustomUserNonListRequiredFields,
CustomUserNonUniqueUsername,
)
from .is_active import IsActiveTestUser1
from .uuid_pk import UUIDUser
from .with_foreign_key import CustomUserWithFK, Email
__all__ =... |
Just-D/chromium-1 | refs/heads/master | tools/telemetry/telemetry/internal/browser/possible_browser.py | 24 | # Copyright 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.internal.app import possible_app
class PossibleBrowser(possible_app.PossibleApp):
"""A browser that can be controlled.
Call Create() to... |
koniiiik/django | refs/heads/master | tests/max_lengths/tests.py | 380 | from __future__ import unicode_literals
import unittest
from .models import PersonWithCustomMaxLengths, PersonWithDefaultMaxLengths
class MaxLengthArgumentsTests(unittest.TestCase):
def verify_max_length(self, model, field, length):
self.assertEqual(model._meta.get_field(field).max_length, length)
... |
za/geodjango | refs/heads/master | geodjango/geodjango/settings.py | 1 | """
Django settings for geodjango project.
Generated by 'django-admin startproject' using Django 1.8.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pa... |
grilo/ansible-1 | refs/heads/devel | lib/ansible/modules/cloud/amazon/ecs_ecr.py | 4 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed... |
zhangjunli177/sahara | refs/heads/master | sahara/plugins/cdh/client/roles.py | 7 | # Copyright (c) 2014 Intel Corporation.
#
# 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... |
flavour/cedarbluff | refs/heads/master | models/zzz_1st_roles.py | 1 | # -*- coding: utf-8 -*-
# Populate default roles and permissions
# Set deployment_settings.base.prepopulate to 0 in Production
# (to save 1x DAL hit every page).
pop_list = deployment_settings.get_base_prepopulate()
if pop_list == 0:
pop_list = []
else:
table = db[auth.settings.table_group_name]
# The que... |
dismalpy/dismalpy | refs/heads/master | dismalpy/ssm/compat/varmax.py | 1 | """
Vector Autoregressive Moving Average with eXogenous regressors model
Author: Chad Fulton
License: Simplified-BSD
"""
from __future__ import division, absolute_import, print_function
from warnings import warn
from statsmodels.compat.collections import OrderedDict
import pandas as pd
import numpy as np
from dismal... |
chrisrburns/obstool | refs/heads/master | navigator/views.py | 1 | from django.db import models
from django.db.models import F
from django.core.exceptions import ObjectDoesNotExist
from django.core.files.base import ContentFile
from navigator.models import Object,genMWO
from django.http import HttpResponse,HttpResponseRedirect
from django.views.decorators.csrf import csrf_protect
from... |
awkspace/ansible | refs/heads/devel | lib/ansible/modules/cloud/cloudstack/cs_vpn_gateway.py | 15 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# (c) 2017, René Moser <mail@renemoser.net>
#
# 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 Lice... |
dfang/odoo | refs/heads/10.0 | addons/account_asset/__manifest__.py | 22 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
{
'name': 'Assets Management',
'depends': ['account_accountant'],
'description': """
Assets management
=================
Manage assets owned by a company or a person.
Keeps track of depreciations, and creates... |
JshWright/django-allauth | refs/heads/master | allauth/socialaccount/providers/douban/provider.py | 61 | from allauth.socialaccount import providers
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
class DoubanAccount(ProviderAccount):
def get_profile_url(self):
return self.account.extra_data.get('alt')
def get_av... |
jhona22baz/blog-flask | refs/heads/master | python2.7/lib/python2.7/site-packages/setuptools/tests/doctest.py | 332 | # Module doctest.
# Released to the public domain 16-Jan-2001, by Tim Peters (tim@python.org).
# Major enhancements and refactoring by:
# Jim Fulton
# Edward Loper
# Provided as-is; use at your own risk; no warranty; no promises; enjoy!
try:
basestring
except NameError:
basestring = str
try:
enum... |
noname007/ycmd | refs/heads/master | ycmd/completers/python/hook.py | 34 | # Copyright (C) 2011, 2012 Stephen Sugden <me@stephensugden.com>
#
# This file is part of YouCompleteMe.
#
# YouCompleteMe 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
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.