repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
skycucumber/xuemc
refs/heads/master
python/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/charade/gb2312freq.py
3131
######################## 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...
dablak/boto
refs/heads/develop
tests/db/test_query.py
136
# Copyright (c) 2010 Chris Moyer http://coredumped.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, ...
aurzenligl/prophy
refs/heads/master
prophyc/generators/__init__.py
12133432
jiguanglizipao/ucore_os_lab
refs/heads/master
related_info/lab7/semaphore_condition/thr-ex2.py
48
#!/usr/bin/env python import threading import time count=1 class KissThread(threading.Thread): def run(self): global count print "Thread # %s:Pretending to do stuff" % count count+=1 time.sleep(2) print "done with stuff" for t in...
JavaRabbit/CS496_capstone
refs/heads/master
appengine/standard/Capstone_inPython/reportlab/graphics/samples/excelcolors.py
63
# define standard colors to mimic those used by Microsoft Excel from reportlab.lib.colors import CMYKColor, PCMYKColor #colour names as comments at the end of each line are as a memory jogger ONLY #NOT HTML named colours! #Main colours as used for bars etc color01 = PCMYKColor(40,40,0,0) # Lavender color02 = PCMYK...
cdrttn/samba-regedit
refs/heads/regedit-wip
lib/dnspython/dns/rdtypes/ANY/AFSDB.py
109
# 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 "...
gsnbng/erpnext
refs/heads/develop
erpnext/education/doctype/instructor_log/instructor_log.py
22
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class InstructorLog(Document): pass
direvus/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_port_facts.py
34
#!/usr/bin/python # Copyright (c) 2016 IBM # 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'], ...
deepsrijit1105/edx-platform
refs/heads/master
lms/djangoapps/coursewarehistoryextended/migrations/0001_initial.py
43
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion import coursewarehistoryextended.fields from django.conf import settings def bump_pk_start(apps, schema_editor): if not schema_editor.connection.alias == 'student_module_histor...
DMS-Aus/Roam
refs/heads/master
src/roam/biglist.py
1
from qgis.PyQt.QtCore import QModelIndex, pyqtSignal, QSize, Qt, QSortFilterProxyModel from qgis.PyQt.QtWidgets import QWidget from roam.ui.ui_list import Ui_BigList from roam.api import utils class BigList(Ui_BigList, QWidget): itemselected = pyqtSignal(QModelIndex) closewidget = pyqtSignal() savewidge...
kantlove/flask-simple-page
refs/heads/master
Lib/site-packages/pip/_vendor/requests/packages/chardet/chardistribution.py
2754
######################## 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...
rupran/ansible
refs/heads/devel
lib/ansible/plugins/lookup/passwordstore.py
60
# (c) 2017, Patrick Deelman <patrick@patrickdeelman.nl> # # 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 l...
opennode/waldur-mastermind
refs/heads/develop
src/waldur_core/core/migrations/0011_extend_description_limits.py
2
# Generated by Django 2.2.13 on 2020-09-02 11:03 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('core', '0010_changeemailrequest_uuid_unique'), ] operations = [ migrations.AlterField( model_name='user', name='des...
it-can/CodeIgniter
refs/heads/3.1-stable
user_guide_src/source/_themes/sphinx_rtd_theme/__init__.py
1504
"""Sphinx ReadTheDocs theme. From https://github.com/ryan-roemer/sphinx-bootstrap-theme. """ import os VERSION = (0, 1, 5) __version__ = ".".join(str(v) for v in VERSION) __version_full__ = __version__ def get_html_theme_path(): """Return list of HTML theme paths.""" cur_dir = os.path.abspath(os.path.dirn...
antoinecarme/pyaf
refs/heads/master
tests/model_control/detailed/transf_Difference/model_control_one_enabled_Difference_PolyTrend_Seasonal_Minute_ARX.py
1
import tests.model_control.test_ozone_custom_models_enabled as testmod testmod.build_model( ['Difference'] , ['PolyTrend'] , ['Seasonal_Minute'] , ['ARX'] );
tmpgit/intellij-community
refs/heads/master
python/testData/resolve/TrueDiv.py
83
def test(x): return 1 / x # <ref>
avsd/django-allauth
refs/heads/master
example/example/__init__.py
12133432
vxsx/django-cms
refs/heads/develop
cms/admin/useradmin.py
49
# -*- coding: utf-8 -*- from django.contrib import admin from django.contrib.auth import get_user_model from cms.admin.forms import PageUserForm, PageUserGroupForm from cms.admin.permissionadmin import GenericCmsPermissionAdmin from cms.exceptions import NoPermissionsException from cms.models import PageUser, PageUser...
ungarj/label_centerlines
refs/heads/master
label_centerlines/_src.py
1
from itertools import combinations import logging import networkx as nx from networkx.exception import NetworkXNoPath import numpy as np import operator from scipy.spatial import Voronoi from scipy.ndimage import filters from shapely.geometry import LineString, MultiLineString, Point, MultiPoint from label_centerlines...
DCSaunders/tensorflow
refs/heads/master
tensorflow/contrib/bayesflow/python/kernel_tests/special_math_test.py
12
# Copyright 2016 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...
disqus/menagerie
refs/heads/master
menagerie/__init__.py
1
from .helpers import configure # noqa
Dhivyap/ansible
refs/heads/devel
test/units/module_utils/basic/test_no_log.py
26
# -*- coding: utf-8 -*- # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type from units.compat import unittest ...
preo/ansible-modules-extras
refs/heads/devel
network/a10/a10_service_group.py
23
#!/usr/bin/python # -*- coding: utf-8 -*- """ Ansible module to manage A10 Networks slb service-group objects (c) 2014, Mischa Peters <mpeters@a10networks.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 publishe...
manastech/de-bee
refs/heads/master
gdata/tlslite/TLSConnection.py
278
""" MAIN CLASS FOR TLS LITE (START HERE!). """ from __future__ import generators import socket from utils.compat import formatExceptionTrace from TLSRecordLayer import TLSRecordLayer from Session import Session from constants import * from utils.cryptomath import getRandomBytes from errors import * from messages impor...
evernym/plenum
refs/heads/master
stp_core/loop/eventually.py
2
import asyncio import time from asyncio.coroutines import CoroWrapper from inspect import isawaitable from typing import Callable, TypeVar, Optional, Iterable import psutil from common.exceptions import PlenumValueError from stp_core.common.log import getlogger from stp_core.common.util import get_func_name, get_func...
omarkhan/ansible-modules-core
refs/heads/devel
source_control/git.py
47
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, 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...
rhymeswithcycle/openparliament
refs/heads/master
parliament/hansards/migrations/__init__.py
12133432
migueldvb/django-guardian
refs/heads/master
example_project/posts/__init__.py
12133432
UniversalMasterEgg8679/ansible
refs/heads/devel
test/units/plugins/lookup/__init__.py
12133432
CSC301H-Fall2013/JuakStore
refs/heads/master
site-packages/build/lib/django/contrib/formtools/tests/wizard/__init__.py
200
from django.contrib.formtools.tests.wizard.cookiestorage import TestCookieStorage from django.contrib.formtools.tests.wizard.forms import FormTests, SessionFormTests, CookieFormTests from django.contrib.formtools.tests.wizard.loadstorage import TestLoadStorage from django.contrib.formtools.tests.wizard.namedwizardtests...
bmbouter/Opus
refs/heads/master
opus/lib/__init__.py
10
############################################################################## # Copyright 2010 North Carolina State University # # # # Licensed under the Apache License, Version 2.0 (the "License"); # # ...
Ayub-Khan/edx-platform
refs/heads/master
cms/envs/debug_upload.py
182
""" A new cms ENV configuration to use a slow upload file handler to help test progress bars in uploads """ # pylint: disable=unused-wildcard-import from .dev import * # pylint: disable=wildcard-import FILE_UPLOAD_HANDLERS = ( 'contentstore.debug_file_uploader.DebugFileUploader', 'django.core.files.uploadhand...
kindersung/servo
refs/heads/master
tests/wpt/web-platform-tests/eventsource/resources/message2.py
258
import time def main(request, response): response.headers.set('Content-Type', 'text/event-stream') response.headers.set('Cache-Control', 'no-cache') response.explicit_flush = True response.write_status_headers() while True: response.writer.write("data:msg") response.writer.write("...
i13tum/i13monclient
refs/heads/master
rfpi/decoder.py
2
from datetime import datetime import logging import uuid from dto import rfdatatypes from util import cfg import struct from dto import temphdatatypes _logger = logging.getLogger(__name__) def create_decoder(): """ creates a decoder for decoding data frames :return: (Decoder) an instance of the Decoder ...
zhimin711/nova
refs/heads/master
nova/tests/functional/api_sample_tests/test_cloudpipe.py
8
# Copyright 2014 IBM Corp. # # 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 t...
IllusionRom-deprecated/android_platform_tools_idea
refs/heads/master
python/testData/psi/MissingListSeparators.py
83
a = [1 2 3]
eric-stanley/youtube-dl
refs/heads/master
youtube_dl/extractor/megavideoz.py
95
# encoding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( ExtractorError, float_or_none, xpath_text, ) class MegaVideozIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?megavideoz\.eu/video/(?P<id>[^/]+)(?:/(?P<display_id>[^/]+))?'...
Permutatrix/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/py/py/_process/forkedfunc.py
271
""" ForkedFunc provides a way to run a function in a forked process and get at its return value, stdout and stderr output as well as signals and exitstatusus. """ import py import os import sys import marshal def get_unbuffered_io(fd, filename): f = open(str(filename), "w") if fd != f.fileno(): ...
atul-bhouraskar/django
refs/heads/master
tests/or_lookups/tests.py
109
from __future__ import unicode_literals from datetime import datetime from operator import attrgetter from django.db.models import Q from django.test import TestCase from .models import Article class OrLookupsTests(TestCase): def setUp(self): self.a1 = Article.objects.create( headline='Hel...
azverkan/scons
refs/heads/master
src/engine/SCons/Tool/BitKeeper.py
5
"""SCons.Tool.BitKeeper.py Tool-specific initialization for the BitKeeper source code control system. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # __COPYRIGHT__ # # Permission is hereby granted, free ...
munkiat/libcloud
refs/heads/trunk
libcloud/test/compute/test_vultr.py
39
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
aidan-/ansible-modules-extras
refs/heads/devel
cloud/amazon/efs_facts.py
11
#!/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...
EvaSDK/sqlalchemy
refs/heads/master
examples/performance/large_resultsets.py
27
"""In this series of tests, we are looking at time to load a large number of very small and simple rows. A special test here illustrates the difference between fetching the rows from the raw DBAPI and throwing them away, vs. assembling each row into a completely basic Python object and appending to a list. The time sp...
jmagnusson/pip
refs/heads/develop
pip/vcs/git.py
280
from __future__ import absolute_import import logging import tempfile import os.path from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves.urllib import request as urllib_request from pip.utils import display_path, rmtree from pip.vcs import vcs, VersionControl urlsplit = urllib...
noa/hearthbreaker
refs/heads/master
tests/card_tests/__init__.py
12133432
crafty78/ansible
refs/heads/devel
lib/ansible/modules/network/netconf/__init__.py
12133432
ging/horizon
refs/heads/master
openstack_dashboard/fiware_middleware/__init__.py
12133432
caronc/nzb-subliminal
refs/heads/master
Subliminal/chared/util/__init__.py
12133432
wdv4758h/ZipPy
refs/heads/master
edu.uci.python.benchmark/src/benchmarks/sympy/sympy/printing/tests/__init__.py
12133432
fing520/Lawliet
refs/heads/master
lawliet/handler/__init__.py
2
# -*- coding: utf-8 -*- import json def json_loads(data): return json.loads(data)
koditr/xbmc-tr-team-turkish-addons
refs/heads/master
script.module.requests/lib/requests/packages.py
182
import sys # This code exists for backwards compatibility reasons. # I don't like it either. Just look the other way. :) for package in ('urllib3', 'idna', 'chardet'): locals()[package] = __import__(package) # This traversal is apparently necessary such that the identities are # preserved (requests.packag...
jiaphuan/models
refs/heads/master
research/slim/nets/mobilenet/mobilenet_v2.py
1
# 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...
Gitlab11/odoo
refs/heads/8.0
addons/website_report/controllers/__init__.py
7372
import main
dbunker/Flask-Tread
refs/heads/master
examples/blog/app/app_setup.py
1
import flask from flask.ext.migrate import Migrate import argparse import os def get_config(): parser = argparse.ArgumentParser() parser.add_argument('env', choices=['prod', 'qa', 'test', 'dev', 'env']) args = parser.parse_args() if args.env == 'prod': curconfig = 'config.ProdConfig' eli...
codeforeurope/stadtgedaechtnis_backend
refs/heads/master
services/serializer/__init__.py
6
__author__ = 'jpi'
popazerty/SDG-e2
refs/heads/master
lib/python/Screens/UnhandledKey.py
90
from Screen import Screen from Components.Pixmap import Pixmap class UnhandledKey(Screen): def __init__(self, session): Screen.__init__(self, session) self["UnhandledKeyPixmap"] = Pixmap()
ivandevp/django
refs/heads/master
tests/utils_tests/test_no_submodule.py
737
# Used to test for modules which don't have submodules.
matthdsm/bioconda-recipes
refs/heads/master
recipes/wdltool/wdltool.py
41
#!/usr/bin/env python # # Wrapper script for invoking the jar. # # This script is written for use with the Conda package manager and is ported # from a bash script that does the same thing, adapting the style in # the peptide-shaker wrapper # (https://github.com/bioconda/bioconda-recipes/blob/master/recipes/peptide-sha...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-59/files/myvenv/lib/python2.7/site-packages/pip/_vendor/re-vendor.py
1240
import os import sys import pip import glob import shutil here = os.path.abspath(os.path.dirname(__file__)) def usage(): print("Usage: re-vendor.py [clean|vendor]") sys.exit(1) def clean(): for fn in os.listdir(here): dirname = os.path.join(here, fn) if os.path.isdir(dirname): ...
griffy/sikwidgets
refs/heads/master
sikwidgets/__init__.py
12133432
davits/ycmd
refs/heads/master
ycmd/tests/testdata/python-future/standard_library/os.py
12133432
nebril/fuel-web
refs/heads/master
fuel_agent/fuel_agent/drivers/base.py
2
# Copyright 2015 Mirantis, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
Yukarumya/Yukarum-Redfoxes
refs/heads/master
testing/mozharness/configs/selfserve/production.py
7
config = { "selfserve_url": "https://secure.pub.build.mozilla.org/buildapi/self-serve", }
DeMille/emailhooks
refs/heads/master
django_nonrel/django/core/management/commands/loaddata.py
103
from __future__ import unicode_literals import sys import os import gzip import zipfile from optparse import make_option import traceback from django.conf import settings from django.core import serializers from django.core.management.base import BaseCommand, CommandError from django.core.management.color import no_s...
jesramirez/odoo
refs/heads/8.0
addons/purchase/res_config.py
357
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (C) 2004-2012 OpenERP S.A. (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms o...
Dronecode/MAVProxy
refs/heads/master
MAVProxy/modules/mavproxy_gasheli.py
10
""" helicopter monitoring and control module gas helicopters """ import os, sys, math, time from pymavlink import mavutil from MAVProxy.modules.lib import mp_util from MAVProxy.modules.lib import mp_module from MAVProxy.modules.lib import mp_settings class GasHeliModule(mp_module.MPModule): def __init__(self, mp...
paukenba/youtube-dl
refs/heads/master
youtube_dl/extractor/dbtv.py
128
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..compat import compat_str from ..utils import ( float_or_none, int_or_none, clean_html, ) class DBTVIE(InfoExtractor): _VALID_URL = r'http://dbtv\.no/(?P<id>[0-9]+)#(?P<display_id>.+)' _TEST...
javier3407/Plugin.Video.JavierTV
refs/heads/master
resources/__init__.py
12133432
WorldOfTanksMods/wot-teamspeak-mod
refs/heads/master
futes/fakes/gui/__init__.py
12133432
Xbalien/Mobile-Security-Framework-MobSF
refs/heads/master
StaticAnalyzer/tools/__init__.py
12133432
koomik/CouchPotatoServer
refs/heads/develop
couchpotato/core/media/movie/providers/trailer/youtube_dl/extractor/youtube.py
2
# coding: utf-8 import collections import errno import io import itertools import json import os.path import re import struct import traceback import zlib from .common import InfoExtractor, SearchInfoExtractor from .subtitles import SubtitlesInfoExtractor from ..jsinterp import JSInterpreter from ..utils import ( ...
tcstewar/testing_notebooks
refs/heads/master
spinnaker_speed/spdtest.py
1
import nengo import numpy as np import pytry class Speed(pytry.NengoTrial): def params(self): self.param('input dims', D_in=12) self.param('output dims', D_out=6) self.param('n_neurons', n_neurons=500) self.param('time to run', T=10) def model(self, p): model = nengo.Ne...
rajalokan/keystone
refs/heads/master
keystone/tests/unit/resource/backends/__init__.py
12133432
franky88/emperioanimesta
refs/heads/master
env/Lib/site-packages/django/conf/locale/te/__init__.py
12133432
vietpn/ghost-nodejs
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-3.3/pygments/formatter.py
94
# -*- coding: utf-8 -*- """ pygments.formatter ~~~~~~~~~~~~~~~~~~ Base formatter class. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import codecs from pygments.util import get_bool_opt from pygments.styles import get_style_by_nam...
pierce403/EmpirePanel
refs/heads/master
lib/modules/situational_awareness/network/portscan.py
19
from lib.common import helpers class Module: def __init__(self, mainMenu, params=[]): self.info = { 'Name': 'Invoke-Portscan', 'Author': ['Rich Lundeen'], 'Description': ('Does a simple port scan using regular sockets, based ' '(pretty) lo...
pgovers/oscar-wagtail-demo
refs/heads/master
wagtaildemo/__init__.py
12133432
beswarm/django-allauth
refs/heads/master
allauth/socialaccount/providers/oauth/__init__.py
12133432
Samuel789/MediPi
refs/heads/master
MedManagementWeb/env/lib/python3.5/site-packages/django/db/backends/oracle/__init__.py
12133432
Endika/django
refs/heads/master
tests/view_tests/app3/__init__.py
12133432
mbauskar/erpnext
refs/heads/develop
erpnext/docs/user/manual/de/stock/setup/__init__.py
12133432
lento/cortex
refs/heads/master
test/IECoreMaya/FromMayaSkinClusterConverterTest.py
12
########################################################################## # # Copyright (c) 2008-2011, Image Engine Design Inc. All rights reserved. # # Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios), # its affiliates and/or its licensors. # # Redistribution and use in source and binary ...
kapteyn-astro/kapteyn
refs/heads/master
doc/source/EXAMPLES/kmpfit_example_partialdervs.py
1
#!/usr/bin/env python #------------------------------------------------------------ # Script compares efficiency of automatic derivatives vs # analytical in mpfit.py # Vog, 31 okt 2011 #------------------------------------------------------------ import numpy from matplotlib.pyplot import figure, show, rc from kapteyn...
LLNL/spack
refs/heads/develop
var/spack/repos/builtin/packages/py-colorpy/package.py
5
# Copyright 2013-2020 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyColorpy(PythonPackage): """ColorPy is a Python package to convert physical descriptions ...
cgstudiomap/cgstudiomap
refs/heads/develop
main/parts/odoo/addons/mail/mail_message_subtype.py
387
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
PolyLAN/django-wiki
refs/heads/master
wiki/core/plugins/registry.py
10
from __future__ import absolute_import from __future__ import unicode_literals # -*- coding: utf-8 -*- from django.utils.importlib import import_module from six import string_types _cache = {} _settings_forms = [] _markdown_extensions = [] _article_tabs = [] _sidebar = [] def register(PluginClass): """ Regis...
blackrain-audio/supercollider
refs/heads/master
external_libraries/simplejson-2.3.2/__init__.py
44
r"""JSON (JavaScript Object Notation) <http://json.org> is a subset of JavaScript syntax (ECMA-262 3rd edition) used as a lightweight data interchange format. :mod:`simplejson` exposes an API familiar to users of the standard library :mod:`marshal` and :mod:`pickle` modules. It is the externally maintained version of ...
patrickwind/My_Blog
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/command/__init__.py
332
__all__ = [ 'alias', 'bdist_egg', 'bdist_rpm', 'build_ext', 'build_py', 'develop', 'easy_install', 'egg_info', 'install', 'install_lib', 'rotate', 'saveopts', 'sdist', 'setopt', 'test', 'install_egg_info', 'install_scripts', 'register', 'bdist_wininst', 'upload_docs', ] from setuptools.command import i...
ResolveWang/algrithm_qa
refs/heads/master
leetcode/162.寻找峰值.py
1
""" 问题描述: 峰值元素是指其值大于左右相邻值的元素。给定一个输入数组 nums, 其中 nums[i] ≠ nums[i+1],找到峰值元素并返回其索引。数组可能包含多 个峰值,在这种情况下,返回任何一个峰值所在位置即可。你可以假设 nums[-1] = nums[n] = -∞。 示例: nums = [1,2,3,1] => 2 3 是峰值元素,函数应该返回其索引 2。 思路: 由于最左和最右是最低点,因此中间一定存在局部最大值.二分查找的标准是每次都 往比mid更大的那边寻找,因为那边总会降低到无穷小 """ class Solution(object): def findPeakElement(self...
eg-zhang/scikit-learn
refs/heads/master
sklearn/mixture/dpgmm.py
208
"""Bayesian Gaussian Mixture Models and Dirichlet Process Gaussian Mixture Models""" from __future__ import print_function # Author: Alexandre Passos (alexandre.tp@gmail.com) # Bertrand Thirion <bertrand.thirion@inria.fr> # # Based on mixture.py by: # Ron Weiss <ronweiss@gmail.com> # Fabian Ped...
shadowmint/nwidget
refs/heads/master
lib/pyglet-1.4.4/contrib/wydget/wydget/widgets/checkbox.py
29
from pyglet.gl import * from pyglet import clock from pyglet.window import key, mouse from wydget import element, event, util, anim, data class Checkbox(element.Element): name='checkbox' is_focusable = True def __init__(self, parent, value=False, width=16, height=16, **kw): self.parent = parent ...
makerdao/keeper
refs/heads/master
tests/test_feed.py
2
# This file is part of Maker Keeper Framework. # # Copyright (C) 2017-2018 reverendus # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
dciabrin/ra-tester
refs/heads/master
ra/redis/__init__.py
1
from .scenarios import scenarios from . import tests as t __all__ = ["tests", "scenarios", "name"] tests = t.tests name = "Redis"
initcron/ansible
refs/heads/devel
v2/ansible/plugins/connections/__init__.py
8
# (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...
waseem18/gitpromote
refs/heads/master
requests/packages/chardet/__init__.py
745
######################## BEGIN LICENSE BLOCK ######################## # 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, or (at your option) any later ve...
erikriver/eduIntelligent-cynin
refs/heads/master
src/ubify.viewlets/ubify/viewlets/browser/overridenplonecommands.py
5
from zope.interface import implements from zope.component import getMultiAdapter, getUtility from zope.i18n import translate from zope.i18nmessageid.message import Message as i18nmessage from Products.statusmessages.message import Message from plone.portlets.interfaces import IPortletManager, IPortletRenderer from pl...
emencia/emencia-django-socialaggregator
refs/heads/master
socialaggregator/plugins/generic.py
1
""" generic class for aggregator plugin """ class GenericAggregator(object): connector = None def init_connector(self): pass def __init__(self): self.init_connector() def search(self, query): pass
mgeisler/vcrpy
refs/heads/master
setup.py
5
#!/usr/bin/env python import sys import logging from setuptools import setup, find_packages from setuptools.command.test import test as TestCommand import pkg_resources long_description = open('README.rst', 'r').read() class PyTest(TestCommand): def finalize_options(self): TestCommand.finalize_options...
sabi0/intellij-community
refs/heads/master
python/testData/inspections/PyPackageRequirementsInspection/MismatchBetweenPackageAndRequirement/test1.py
22
<warning descr="Package requirements 'factory-boy', 'python-magic', 'attrs', 'python-jenkins', 'python-dateutil', 'PyYAML', 'beautifulsoup4', 'scikit-learn', 'future', 'django-pipeline', 'django_jsonfield', 'django-simple-captcha', 'Pillow', 'pyzmq', 'robotframework', 'opencv-python', 'pyldap' are not satisfied">import...
Luminous311/gtgapp
refs/heads/master
equipment/__init__.py
12133432