repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
sql-machine-learning/sqlflow
refs/heads/develop
python/test_sql_data.py
1
# Copyright 2020 The SQLFlow 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 applicable law o...
Nico0084/domogik-plugin-ozwave
refs/heads/master
conversion/from_Opening_Sensor_to_DT_OpenClose.py
1
def from_Opening_Sensor_to_DT_OpenClose(x): if int(x) == 0 : return 1 if int(x) == 1 : return 0
ctrevino/DIGITS
refs/heads/master
digits/model/__init__.py
18
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. from job import ModelJob from images import *
MihaiMoldovanu/ansible
refs/heads/devel
lib/ansible/plugins/lookup/first_found.py
19
# (c) 2013, seth vidal <skvidal@fedoraproject.org> red hat, inc # (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 DOCUMENTATION = """ lookup: first_found ...
cyrustabatab/mptcp
refs/heads/master
bindings/python/ns3modulescan.py
167
#! /usr/bin/env python import sys import os.path import pybindgen.settings from pybindgen.gccxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning from pybindgen.typehandlers.codesink import FileCodeSink from pygccxml.declarations import templates from pygccxml.declarations.class_declaration im...
kuropatkin/lte
refs/heads/master
bindings/python/ns3modulescan.py
167
#! /usr/bin/env python import sys import os.path import pybindgen.settings from pybindgen.gccxmlparser import ModuleParser, PygenClassifier, PygenSection, WrapperWarning from pybindgen.typehandlers.codesink import FileCodeSink from pygccxml.declarations import templates from pygccxml.declarations.class_declaration im...
sigma-random/scrapyd
refs/heads/master
scrapyd/environ.py
8
import os from urlparse import urlparse, urlunparse from w3lib.url import path_to_file_uri from zope.interface import implements from .interfaces import IEnvironment class Environment(object): implements(IEnvironment) def __init__(self, config, initenv=os.environ): self.dbs_dir = config.get('dbs_di...
Changaco/oh-mainline
refs/heads/master
vendor/packages/Django/django/contrib/admindocs/models.py
634
# Empty models.py to allow for specifying admindocs as a test label.
m4h7/juriscraper
refs/heads/master
juriscraper/opinions/united_states_backscrapers/federal_special/cit_2000.py
2
# Scraper for the United States Court of International Trade # CourtID: cit # Court Short Name: Ct. Int'l Trade # Neutral Citation Format: Ct. Int'l Trade No. 12-1 from juriscraper.OpinionSite import OpinionSite import re import time from datetime import date from lxml import html class Site(OpinionSite): def __in...
onceuponatimeforever/oh-mainline
refs/heads/master
vendor/packages/celery/celery/tests/test_task/test_chord.py
18
from __future__ import absolute_import from mock import patch from celery import current_app from celery.task import chords from celery.task import TaskSet from celery.tests.utils import AppCase, Mock passthru = lambda x: x @current_app.task def add(x, y): return x + y class test_unlock_chord_task(AppCase): ...
hkawasaki/kawasaki-aio8-2
refs/heads/gacco2/0701_kim_again
cms/djangoapps/contentstore/management/commands/empty_asset_trashcan.py
37
from django.core.management.base import BaseCommand, CommandError from xmodule.course_module import CourseDescriptor from xmodule.contentstore.utils import empty_asset_trashcan from xmodule.modulestore.django import modulestore from .prompt import query_yes_no class Command(BaseCommand): help = '''Empty the trash...
ningchi/scikit-learn
refs/heads/master
sklearn/kernel_ridge.py
17
"""Module :mod:`sklearn.kernel_ridge` implements kernel ridge regression.""" # Authors: Mathieu Blondel <mathieu@mblondel.org> # Jan Hendrik Metzen <jhm@informatik.uni-bremen.de> # License: BSD 3 clause import numpy as np from .base import BaseEstimator, RegressorMixin from .metrics.pairwise import pairwise...
mitar/cmsplugin-markup
refs/heads/master
cmsplugin_markup/templatetags/markuptags.py
2
from django import template from django.conf import settings from django.utils import html, safestring register = template.Library() @register.tag def rendermarkup(parser, token): return RenderMarkupNode() class RenderMarkupNode(template.Node): def render(self, context): try: return conte...
signed/intellij-community
refs/heads/master
python/helpers/py3only/docutils/languages/en.py
246
# $Id: en.py 4564 2006-05-21 20:44:42Z wiemann $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translated...
zzeleznick/zDjango
refs/heads/master
venv/lib/python2.7/site-packages/django/conf/locale/sl/formats.py
200
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # 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' DAT...
adambrenecki/django
refs/heads/master
django/core/mail/backends/smtp.py
4
"""SMTP email backend class.""" import smtplib import ssl import threading from django.conf import settings from django.core.mail.backends.base import BaseEmailBackend from django.core.mail.utils import DNS_NAME from django.core.mail.message import sanitize_address from django.utils.encoding import force_bytes class...
t-wissmann/qutebrowser
refs/heads/master
qutebrowser/utils/error.py
1
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2020 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
zadgroup/edx-platform
refs/heads/master
cms/djangoapps/contentstore/features/advanced_settings.py
116
# pylint: disable=missing-docstring # pylint: disable=redefined-outer-name from lettuce import world, step from nose.tools import assert_false, assert_equal, assert_regexp_matches # pylint: disable=no-name-in-module from common import type_in_codemirror, press_the_notification_button, get_codemirror_value KEY_CSS = ...
chrismeyersfsu/ansible-modules-core
refs/heads/devel
utilities/logic/include_vars.py
10
# -*- mode: python -*- # Ansible is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Publ...
USGSDenverPychron/pychron
refs/heads/develop
pychron/entry/loaders/irradiation_holder_loader.py
1
# =============================================================================== # Copyright 2014 Jake Ross # # 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...
henrytao-me/openerp.positionq
refs/heads/master
openerp/addons/account_check_writing/report/check_print.py
18
# -*- 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...
code4futuredotorg/reeborg_tw
refs/heads/master
src/libraries/brython/Lib/tempfile.py
728
"""Temporary files. This module provides generic, low- and high-level interfaces for creating temporary files and directories. The interfaces listed as "safe" just below can be used without fear of race conditions. Those listed as "unsafe" cannot, and are provided for backward compatibility only. This module also pr...
tuxfux-hlp-notes/python-batches
refs/heads/master
archieves/batch-64/15-files/myenv/lib/python2.7/site-packages/pip/req/__init__.py
806
from __future__ import absolute_import from .req_install import InstallRequirement from .req_set import RequirementSet, Requirements from .req_file import parse_requirements __all__ = [ "RequirementSet", "Requirements", "InstallRequirement", "parse_requirements", ]
manevant/django-oscar
refs/heads/master
sites/demo/settings_test.py
29
from settings import * TEST_RUNNER = 'django_nose.NoseTestSuiteRunner' DEBUG_PROPAGATE_EXCEPTIONS = True NOSE_ARGS = ['-s'] # Disable logging import logging logging.disable(logging.ERROR) # Use proper cache CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', } }
alexeiramone/django-default-template
refs/heads/master
settings/remote.py
1
# -*- coding: utf-8 -*- # {% now "Y/m/d H:m" %} - Created from settings.base import * DEBUG = False TEMPLATE_DEBUG = False URL_PREFIX = u'http://www.{{ project_name }}.com.br' ALLOWED_HOSTS = ['.{{ project_name }}.uol.com.br', '.{{ project_name }}.com.br', '{{ project_name }}.amdb.com.br'] DATABASES['default']['PA...
christer155/PTVS
refs/heads/master
Python/Tests/TestData/WFastCgi/DjangoTestApp/MyApp/tests.py
224
""" 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...
catapult-project/catapult
refs/heads/master
telemetry/telemetry/internal/platform/android_device.py
3
# 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. from __future__ import absolute_import import logging import os from telemetry.internal.platform import cros_device from telemetry.internal.platform import ...
ammarkhann/FinalSeniorCode
refs/heads/master
lib/python2.7/site-packages/sympy/physics/vector/frame.py
7
from sympy import (diff, trigsimp, expand, sin, cos, solve, Symbol, sympify, eye, symbols, Dummy, ImmutableMatrix as Matrix) from sympy.core.compatibility import string_types, u, range from sympy.physics.vector.vector import Vector, _check_vector __all__ = ['CoordinateSym', 'ReferenceFrame'] class...
devs1991/test_edx_docmode
refs/heads/master
common/djangoapps/cors_csrf/views.py
50
"""Views for enabling cross-domain requests. """ import logging import json from django.conf import settings from django.views.decorators.cache import cache_page from django.http import HttpResponseNotFound from edxmako.shortcuts import render_to_response from cors_csrf.models import XDomainProxyConfiguration log = l...
ehashman/oh-mainline
refs/heads/master
vendor/packages/ghettoq/ghettoq/tests/runners.py
19
from django.conf import settings from django.test.simple import run_tests as django_test_runner def run_tests(test_labels, verbosity=1, interactive=True, extra_tests=None, **kwargs): """ Test runner that only runs tests for the apps listed in ``settings.TEST_APPS``. """ extra_tests = extra_tes...
OliWright/WinsfordASC
refs/heads/master
hytek_test.py
1
# Winsford ASC Google AppEngine App # hytek_test.py # Some code to help test the Hy-Tek file importing as a stand-alone # python script, without having to run in AppEngine # # Copyright (C) 2014 Oliver Wright # oli.wright.github@gmail.com # # This program is free software; you can redistribute it and/or modif...
dsvalenciah/soc-net
refs/heads/master
app.py
1
# bultin library from uuid import uuid4 # external libraries from sanic import Sanic from sanic.response import json from sanic_cors import CORS from passlib.hash import pbkdf2_sha256 app = Sanic() USERS = [] SALT = "aslkdfjl@@#&/askdjf@@%#$(()(/l2kjrlkjlkejrlkwjer" def hash_password(password): return pbkdf...
thomasalrin/Ghost
refs/heads/master
node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/util.py
269
# -*- coding: utf-8 -*- """ pygments.util ~~~~~~~~~~~~~ Utility functions. :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re import sys import codecs split_path_re = re.compile(r'[/\\ ]') doctype_lookup_re = re.compile(r'''(...
2uller/LotF
refs/heads/master
App/Lib/test/test_univnewlines2k.py
13
# Tests universal newline support for both reading and parsing files. import unittest import os import sys from test import test_support if not hasattr(sys.stdin, 'newlines'): raise unittest.SkipTest, \ "This Python does not have universal newline support" FATX = 'x' * (2**14) DATA_TEMPLATE =...
jerryblakley/libcloud
refs/heads/trunk
libcloud/test/compute/test_ec2.py
21
# 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 ...
timothyqiu/xiami-downloader
refs/heads/develop
xiami_downloader/cli.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import os import re import sys import json from xiami_downloader import __version__, core, http from xiami_downloader._compat import ( binary_type, ensure_binary, ensure_text, htmlparser, request, text_type, URLError, ) from xia...
cpfair/tapiriik
refs/heads/master
tapiriik/services/service_base.py
1
from tapiriik.services.ratelimiting import RateLimit, RateLimitExceededException from tapiriik.services.api import ServiceException, UserExceptionType, UserException class ServiceAuthenticationType: OAuth = "oauth" UsernamePassword = "direct" class InvalidServiceOperationException(Exception): pass class ...
CrushAndRun/Cloudbot-Fluke
refs/heads/master
plugins/twitch.py
24
import re import html from cloudbot import hook from cloudbot.util import http twitch_re = re.compile(r'(.*:)//(twitch.tv|www.twitch.tv)(:[0-9]+)?(.*)', re.I) multitwitch_re = re.compile(r'(.*:)//(www.multitwitch.tv|multitwitch.tv)/(.*)', re.I) def test_name(s): valid = set('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghi...
drasko/codezero
refs/heads/master
scripts/linux/build_atags.py
4
#! /usr/bin/env python2.6 # -*- mode: python; coding: utf-8; -*- # # Codezero -- a microkernel for embedded systems. # # Copyright © 2009 B Labs Ltd import os, sys, shelve, shutil from os.path import join PROJRELROOT = "../.." SCRIPTROOT = os.path.abspath(os.path.dirname(".")) sys.path.append(os.path.abspath(os.pa...
mrknow/filmkodi
refs/heads/master
plugin.video.fanfilm/resources/lib/resolvers/streamcloud.py
2
# -*- coding: utf-8 -*- ''' FanFilm Add-on Copyright (C) 2015 lambda 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 ...
boundlessgeo/QGIS
refs/heads/master
python/plugins/processing/algs/saga/SplitRGBBands.py
21
# -*- coding: utf-8 -*- """ *************************************************************************** SplitRGBBands.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *************************...
badloop/SickRage
refs/heads/master
lib/pyasn1/codec/der/decoder.py
193
# DER decoder from pyasn1.type import univ from pyasn1.codec.cer import decoder tagMap = decoder.tagMap typeMap = decoder.typeMap Decoder = decoder.Decoder decode = Decoder(tagMap, typeMap)
tianweizhang/nova
refs/heads/v0
nova/api/openstack/compute/contrib/user_data.py
100
# Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
temasek/android_external_chromium_org
refs/heads/cm-11.0
tools/json_to_struct/element_generator_test.py
115
#!/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. from element_generator import GenerateFieldContent from element_generator import GenerateElements import unittest class ElementGen...
aaltay/beam
refs/heads/master
sdks/python/apache_beam/options/pipeline_options_validator.py
1
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
Edraak/edraak-platform
refs/heads/master
openedx/core/djangoapps/bookmarks/tests/test_views.py
9
""" Tests for bookmark views. """ import json import urllib import ddt from django.conf import settings from django.urls import reverse from mock import patch from nose.plugins.attrib import attr from rest_framework.test import APIClient from openedx.core.djangolib.testing.utils import skip_unless_lms from xmodule.mo...
deboute/scrapy-howto
refs/heads/master
podtags/podtags/pipelines.py
1
# -*- coding: utf-8 -*- # -*- python -*- # use 4 spaces to indent, NO TAB # vim: ai ts=4 sts=4 et sw=4 """ Here goes item processing See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html """ # # IMPORTS # # BASE import re from collections import defaultdict # SCRAPY from scrapy.exceptions import DropItem # CU...
openstack/cinder
refs/heads/master
cinder/tests/unit/objects/test_consistencygroup.py
2
# Copyright 2015 Yahoo 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, softw...
szebenyib/mysql_backup
refs/heads/master
mysql_backup.py
1
#!/usr/bin/env python # Source: http://codepoets.co.uk/2010/python-script-to-backup-mysql-databases-on-debian/ import os import time import ConfigParser import unittest class Backup(): def __init__(self, configpath, backuppath, numbertokeep): """Creates a ...
CMLL/taiga-back
refs/heads/master
taiga/users/migrations/0004_auto_20140913_1914.py
29
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators import re class Migration(migrations.Migration): dependencies = [ ('users', '0003_auto_20140903_0925'), ] operations = [ migrations.AlterField( ...
h3/django-qooxdoo
refs/heads/master
django_qooxdoo/models.py
10644
from django.db import models # Create your models here.
Azulinho/ansible
refs/heads/devel
test/units/modules/network/ironware/test_ironware_command.py
57
# (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 dis...
nzavagli/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/numpy-1.9.2/numpy/core/code_generators/ufunc_docstrings.py
11
""" Docstrings for generated ufuncs The syntax is designed to look like the function add_newdoc is being called from numpy.lib, but in this file add_newdoc puts the docstrings in a dictionary. This dictionary is used in numpy/core/code_generators/generate_umath.py to generate the docstrings for the ufuncs in numpy.co...
suutari-ai/shoop
refs/heads/master
shuup_tests/core/test_service_providers.py
3
# This file is part of Shuup. # # Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved. # # This source code is licensed under the OSL-3.0 license found in the # LICENSE file in the root directory of this source tree. import parler.appsettings import pytest from shuup.core.models import CustomCarrier, Serv...
ubgarbage/gae-blog
refs/heads/master
django/contrib/sessions/backends/cache.py
55
from django.contrib.sessions.backends.base import SessionBase, CreateError from django.core.cache import cache KEY_PREFIX = "django.contrib.sessions.cache" class SessionStore(SessionBase): """ A cache-based session store. """ def __init__(self, session_key=None): self._cache = cache su...
Ashaba/rms
refs/heads/master
rmslocalenv/lib/python2.7/site-packages/django/utils/module_loading.py
320
import copy import os import sys from importlib import import_module from django.utils import six def import_string(dotted_path): """ Import a dotted module path and return the attribute/class designated by the last name in the path. Raise ImportError if the import failed. """ try: module...
PowerKiKi/mqueue
refs/heads/master
library/searchengine/nova/engines/legittorrents.py
1
#VERSION: 2.03 # AUTHORS: Christophe Dumez (chris@qbittorrent.org) # Douman (custparasite@gmx.se) # 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 cop...
isnnn/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/hachoir_parser/common/win32_lang_id.py
186
""" Windows 2000 - List of Locale IDs and Language Groups Original data table: http://www.microsoft.com/globaldev/reference/win2k/setup/lcid.mspx """ LANGUAGE_ID = { 0x0436: u"Afrikaans", 0x041c: u"Albanian", 0x0401: u"Arabic Saudi Arabia", 0x0801: u"Arabic Iraq", 0x0c01: u"Arabic Egypt", 0x10...
Mlieou/oj_solutions
refs/heads/master
leetcode/python/ex_791.py
3
class Solution: def customSortString(self, S, T): """ :type S: str :type T: str :rtype: str """ counter = collections.Counter(T) res = [] for c in S: if counter[c] > 0: res.append(c * counter[c]) counter[c] =...
seem-sky/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/test/test_largefile.py
96
"""Test largefile support on system where this makes sense. """ import os import stat import sys import unittest from test.support import TESTFN, requires, unlink import io # C implementation of io import _pyio as pyio # Python implementation of io # size of file to create (>2GB; 2GB == 2147483648 bytes) size = 2500...
samuel00xtr3/project_1.0
refs/heads/master
users/views.py
1
from django.shortcuts import render from django.views.generic import ListView, DetailView from .models import User class UserListView(ListView): model = User
zetaops/SpiffWorkflow
refs/heads/master
SpiffWorkflow/specs/ReleaseMutex.py
3
# -*- coding: utf-8 -*- from __future__ import division # Copyright (C) 2007 Samuel Abels # # 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 you...
kressi/erpnext
refs/heads/develop
erpnext/patches/v5_0/update_frozen_accounts_permission_role.py
97
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt import frappe def execute(): account_settings = frappe.get_doc("Accounts Settings") if not account_settings.frozen_accounts_modifier and account_settings.bde_auth_role: frappe.db.set_val...
DeadBugEngineering/myHDL_shenanigans
refs/heads/master
ssd1306_8x64bit_driver/myhdl_10dev/lib/python2.7/site-packages/pip/req/req_file.py
143
""" Requirements file parsing """ from __future__ import absolute_import import os import re import shlex import sys import optparse import warnings from pip._vendor.six.moves.urllib import parse as urllib_parse from pip._vendor.six.moves import filterfalse import pip from pip.download import get_file_content from ...
seanli9jan/tensorflow
refs/heads/master
tensorflow/contrib/estimator/python/estimator/rnn.py
19
# 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...
kenorb-contrib/BitTorrent
refs/heads/master
BTL/__init__.py
5
# 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 in the hope that it will be useful, # bu...
damonkohler/sl4a
refs/heads/master
python/src/Lib/plat-mac/lib-scriptpackages/StdSuites/Standard_Suite.py
73
"""Suite Standard Suite: Common terms for most applications Level 1, version 1 Generated from /Volumes/Sap/System Folder/Extensions/AppleScript AETE/AEUT resource version 1/0, language 0, script 0 """ import aetools import MacOS _code = 'core' from _builtinSuites.builtin_Suite import * class Standard_Suite_Events(b...
hoidn/LCLS
refs/heads/psana
dataccess/dataccess/plotting.py
1
""" Module implementing plotly and mpld3-based plots for the Jupyter notebook. """ import config import pdb from dataccess import utils import matplotlib.pyplot as mplt from bokeh.plotting import output_notebook output_notebook() class Plt: def __init__(self): self.show_legend = False def subplots(...
tactcomplabs/gc64-hmcsim
refs/heads/master
test/sst/7.2.0/goblin_singlestream1-trace.py
2
import sst # Define SST core options sst.setProgramOption("timebase", "1ps") sst.setProgramOption("stopAtCycle", "0 ns") # Define the simulation components comp_cpu = sst.Component("cpu", "miranda.BaseCPU") comp_cpu.addParams({ "verbose" : 0, "generator" : "miranda.SingleStreamGenerator", "generatorParams.verbose"...
plotly/plotly.py
refs/heads/master
packages/python/plotly/plotly/validators/funnel/stream/__init__.py
94
import sys if sys.version_info < (3, 7): from ._token import TokenValidator from ._maxpoints import MaxpointsValidator else: from _plotly_utils.importers import relative_import __all__, __getattr__, __dir__ = relative_import( __name__, [], ["._token.TokenValidator", "._maxpoints.MaxpointsValid...
kenshay/ImageScripter
refs/heads/master
ProgramData/SystemFiles/Python/Lib/site-packages/PIL/ImageGrab.py
4
# # The Python Imaging Library # $Id$ # # screen grabber (macOS and Windows only) # # History: # 2001-04-26 fl created # 2001-09-17 fl use builtin driver, if present # 2002-11-19 fl added grabclipboard support # # Copyright (c) 2001-2002 by Secret Labs AB # Copyright (c) 2001-2002 by Fredrik Lundh # # See the README...
jimjing/LTLMoP
refs/heads/development
src/lib/hsubConfigObjects.py
7
#!/usr/bin/env python """ ================================================ hsubConfigObjects.py - Defines necessary config objects for handlerSubsystem.py ================================================ This module defines objects for handler system. It also provides interface that deal with han...
ryanmiao/libvirt-test-API
refs/heads/master
repos/domain/autostart.py
1
#!/usr/bin/evn python # To test domain autostart import os import re import sys import libvirt from libvirt import libvirtError from src import sharedmod required_params = ('guestname', 'autostart',) optional_params = {} def check_guest_autostart(*args): """Check domain start automatically result, if setting d...
SU-ECE-17-7/ibeis
refs/heads/next
ibeis/algo/detect/qualifier/qualifier.py
1
#!/usr/bin/env python2.7 from __future__ import absolute_import, division, print_function import ibeis from os.path import isfile, join, exists, expanduser from ibeis.algo.detect.qualifier.model import Qualifier_Model # import ibeis.constants as const from os import listdir import utool as ut import vtool as vt import ...
MobinRanjbar/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/template_tests/test_context.py
49
# coding: utf-8 from django.template import Context, Variable, VariableDoesNotExist from django.utils.unittest import TestCase class ContextTests(TestCase): def test_context(self): c = Context({"a": 1, "b": "xyzzy"}) self.assertEqual(c["a"], 1) self.assertEqual(c.push(), {}) c["a"]...
indictranstech/frappe
refs/heads/develop
frappe/desk/moduleview.py
12
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.boot import get_allowed_pages @frappe.whitelist() def get(module): """Returns data (sections, list of reports, counts) to render m...
costypetrisor/scikit-learn
refs/heads/master
sklearn/linear_model/stochastic_gradient.py
1
# Authors: Peter Prettenhofer <peter.prettenhofer@gmail.com> (main author) # Mathieu Blondel (partial_fit support) # # License: BSD 3 clause """Classification and regression using Stochastic Gradient Descent (SGD).""" import numpy as np import scipy.sparse as sp from abc import ABCMeta, abstractmethod from ...
waytai/odoo
refs/heads/8.0
addons/base_geolocalize/__init__.py
389
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013_Today OpenERP SA (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
auready/django
refs/heads/master
tests/admin_autodiscover/admin.py
513
from django.contrib import admin from .models import Story admin.site.register(Story) raise Exception("Bad admin module")
bkulyk/git-rebase-talk
refs/heads/gh-pages
node_modules/node-sass/node_modules/node-gyp/gyp/pylib/gyp/MSVSUtil.py
1812
# Copyright (c) 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Utility functions shared amongst the Windows generators.""" import copy import os # A dictionary mapping supported target types to extensions. TARGET_TYPE_EX...
lwiecek/django
refs/heads/master
django/core/management/base.py
23
# -*- coding: utf-8 -*- """ Base classes for writing management commands (named commands which can be executed through ``django-admin`` or ``manage.py``). """ from __future__ import unicode_literals import os import sys from argparse import ArgumentParser import django from django.core import checks from django.core....
archf/ansible
refs/heads/devel
lib/ansible/errors/__init__.py
16
# (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...
calpeyser/google-cloud-python
refs/heads/master
logging/google/cloud/logging/resource.py
2
# Copyright 2017 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 or agreed to in writing, ...
stefano-maggiolo/pydocchecker
refs/heads/master
testsuite/test_importing.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # Pydoc Checker # Copyright © 2014 Giovanni Mascellani <mascellani@poisson.phc.unipi.it> # # 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 v...
ahmadshahwan/ipopo
refs/heads/master
pelix/shell/beans.py
3
#!/usr/bin/python # -- Content-Encoding: UTF-8 -- """ Definition of classes used by the Pelix shell service and its consumers :author: Thomas Calmant :copyright: Copyright 2016, Thomas Calmant :license: Apache License 2.0 :version: 0.6.4 :status: Alpha .. Copyright 2016 Thomas Calmant Licensed under the Apa...
leadbrick/django-lfs
refs/heads/master
lfs/tests/products.py
4
# django imports from django.test import TestCase from django.contrib.auth.models import User # test imports from lfs.tests.utils import DummyRequest # lfs imports from lfs.catalog.models import Product from lfs.catalog.models import Category class ProductsTestCase(TestCase): """ """ def setUp(self): ...
Belxjander/Kirito
refs/heads/master
Python-3.5.0-Amiga/Lib/test/leakers/test_selftype.py
195
# Reference cycles involving only the ob_type field are rather uncommon # but possible. Inspired by SF bug 1469629. import gc def leak(): class T(type): pass class U(type, metaclass=T): pass U.__class__ = U del U gc.collect(); gc.collect(); gc.collect()
Eric89GXL/scipy
refs/heads/master
scipy/ndimage/filters.py
5
# Copyright (C) 2003-2005 Peter J. Verveer # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following d...
dmourati/monitor-core
refs/heads/master
gmond/python_modules/process/procstat.py
9
### This script reports process metrics to ganglia. ### ### Notes: ### This script exposes values for CPU and memory utilization ### for running processes. You can retrieve the process ID from ### either providing a pidfile or an awk regular expression. ### Using a pidfile is the most efficient and direct...
ProgressiveFX/pyblish-pfx
refs/heads/master
pyblish_pfx/vendor/yaml/error.py
692
__all__ = ['Mark', 'YAMLError', 'MarkedYAMLError'] class Mark(object): def __init__(self, name, index, line, column, buffer, pointer): self.name = name self.index = index self.line = line self.column = column self.buffer = buffer self.pointer = pointer def get...
todaychi/hue
refs/heads/master
desktop/core/ext-py/tablib-0.10.0/tablib/packages/openpyxl/shared/exc.py
118
# file openpyxl/shared/exc.py # Copyright (c) 2010 openpyxl # # 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, mod...
ddemidov/ev3dev-lang-python-1
refs/heads/master
docs/conf.py
3
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # python-ev3dev documentation build configuration file, created by # sphinx-quickstart on Sat Oct 31 20:38:27 2015. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in thi...
EvanK/ansible-modules-core
refs/heads/devel
files/unarchive.py
12
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2013, Dylan Martin <dmartin@seattlecentral.edu> # (c) 2015, Toshio Kuratomi <tkuratomi@ansible.com> # (c) 2016, Dag Wieers <dag@wieers.com> # # This file is part of Ansible # # Ansible is free software: you can redist...
Wattpad/luigi
refs/heads/master
test/snakebite_test.py
25
# -*- coding: utf-8 -*- # # Copyright 2012-2015 Spotify AB # # 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...
LumaPictures/rez
refs/heads/pull_requests
src/rez/tests/data/solver/packages/pydad/3/package.py
8
name = "pydad" version = "3" requires = ["pymum-3"] # Copyright 2013-2016 Allan Johns. # # 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 3 of the License, or (at your ...
ronakkhunt/kuma
refs/heads/master
vendor/packages/pygments/lexers/haxe.py
72
# -*- coding: utf-8 -*- """ pygments.lexers.haxe ~~~~~~~~~~~~~~~~~~~~ Lexers for Haxe and related stuff. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from pygments.lexer import ExtendedRegexLexer, RegexLexer, include, by...
jptomo/rpython-lang-scheme
refs/heads/master
rpython/tool/jitlogparser/module_finder.py
2
import os, sys, marshal, types, struct, imp def _all_codes_from(code): res = {} more = [code] while more: next = more.pop() res[(next.co_firstlineno, next.co_name)] = next more += [co for co in next.co_consts if isinstance(co, types.CodeType)] return res def g...
gautamkrishnar/hatter
refs/heads/master
venv/lib/python2.7/site-packages/setuptools/script template.py
486
# EASY-INSTALL-SCRIPT: %(spec)r,%(script_name)r __requires__ = """%(spec)r""" import pkg_resources pkg_resources.run_script("""%(spec)r""", """%(script_name)r""")
MarekSuchanek/repocribro
refs/heads/master
tests/test_commands.py
1
import datetime import pytest from sqlalchemy.exc import OperationalError from repocribro.commands.assign_role import _assign_role from repocribro.commands.check_config import _check_config from repocribro.commands.db_create import _db_create from repocribro.commands.repocheck import _repocheck from repocribro.models ...
ustutz/dataquest
refs/heads/master
Data_Analyst/Step_1_Introduction_to_Python/5_List_operations/2_Parsing_the_file/script.py
1
import math as python_lib_Math import math as Math import builtins as python_lib_Builtins import inspect as python_lib_Inspect class Enum: _hx_class_name = "Enum" _hx_fields = ["tag", "index", "params"] _hx_methods = ["__str__"] def __init__(self,tag,index,params): self.tag = None self.index = None self.pa...