repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
40123148/w17b
refs/heads/master
static/Brython3.1.3-20150514-095342/Lib/_imp.py
625
"""(Extremely) low-level import machinery bits as used by importlib and imp.""" class __loader__(object):pass def _fix_co_filename(*args,**kw): raise NotImplementedError("%s:not implemented" % ('_imp.py:_fix_co_filename')) def acquire_lock(*args,**kw): """acquire_lock() -> None Acquires the interpreter's...
precious-project/precious
refs/heads/master
qa/rpc-tests/rawtransactions.py
17
#!/usr/bin/env python3 # Copyright (c) 2014-2016 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Test re-org scenarios with a mempool that contains transactions # that spend (directly or indirectly)...
Dhivyap/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_network_info.py
3
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
chef-buddy/chef-buddy-django
refs/heads/master
manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "chef_buddy_django.settings.prod") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
kishorevasan/python_game
refs/heads/master
csProject/hangman.py
1
#HANGMAN GAME import SimpleGUICS2Pygame.simpleguics2pygame as simplegui import random num_guesses=6 happ=["_","_",'_','_','_','_'] game_1,play,head,body,left_arm,right_arm,left_leg,right_leg,word=False,False,False,False,False,False,False,False,False secret,game=True,True start= True win_image = simplegui.load_i...
hyrole/scrapy
refs/heads/master
scrapy/contrib/linkextractors/lxmlhtml.py
144
import warnings from scrapy.exceptions import ScrapyDeprecationWarning warnings.warn("Module `scrapy.contrib.linkextractors.lxmlhtml` is deprecated, " "use `scrapy.linkextractors.lxmlhtml` instead", ScrapyDeprecationWarning, stacklevel=2) from scrapy.linkextractors.lxmlhtml import *
CristianCantoro/flask-registration
refs/heads/master
project/user/views.py
2
# project/user/views.py ################# #### imports #### ################# import datetime from flask import render_template, Blueprint, url_for, \ redirect, flash, request from flask_login import login_user, logout_user, \ login_required, current_user from project.models import User from project.email ...
saurabh6790/test-erp
refs/heads/develop
erpnext/controllers/buying_controller.py
17
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe import _, msgprint from frappe.utils import flt from erpnext.setup.utils import get_company_currency from erpnext.accounts.pa...
Epirex/android_external_chromium_org
refs/heads/cm-11.0
build/android/enable_asserts.py
83
#!/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. """Enables dalvik vm asserts in the android device.""" from pylib import android_commands import optparse import sys def main(...
atruberg/django-custom
refs/heads/master
django/db/models/query.py
3
""" The main QuerySet implementation. This provides the public API for the ORM. """ import copy import itertools import sys import warnings from django.conf import settings from django.core import exceptions from django.db import connections, router, transaction, DatabaseError from django.db.models.constants import L...
Boukefalos/docker-deployment
refs/heads/master
build/parts.py
1
import sys import os import re # Arguments file = sys.argv[1] docker = open(sys.argv[2], 'a') # Parameters tmp = '/build/tmp' config = '/build/config' shell = '/bin/bash' # Remove all normal comments path = '{}/build/scripts/{}.sh'.format(os.environ['DOCKER_HOME'], file) contents = '' for line in open(path): li...
BC7/mp3PCDLer
refs/heads/master
build/lib/mp3PCDLer/__main__.py
1
# import mp3PCDLer from __future__ import unicode_literals import sys import tkinter as tk import youtube_dl import os import json from mp3PCDLer import id3Updater from tkinter import filedialog def startDownload(urlString, metadata): global cwd ydl_opts = { 'format': 'bestaudio/best', 'postprocessor...
tximikel/kuma
refs/heads/master
vendor/packages/translate/lang/test_team.py
26
#!/usr/bin/env python # -*- coding: utf-8 -*- from translate.lang.team import guess_language def test_simple(): """test the regex, team snippet and language name snippets at a high level""" # standard regex guess assert guess_language(u"ab@li.org") == "ab" # We never suggest 'en', it's always a m...
zhukaixy/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_int_literal.py
182
"""Test correct treatment of hex/oct constants. This is complex because of changes due to PEP 237. """ import unittest from test import support class TestHexOctBin(unittest.TestCase): def test_hex_baseline(self): # A few upper/lowercase tests self.assertEqual(0x0, 0X0) self.assertEqual(0...
ulope/django
refs/heads/master
django/contrib/gis/db/backends/mysql/base.py
25
from django.db.backends.mysql.base import ( DatabaseWrapper as MySQLDatabaseWrapper, DatabaseFeatures as MySQLDatabaseFeatures, ) from django.contrib.gis.db.backends.base import BaseSpatialFeatures from django.contrib.gis.db.backends.mysql.creation import MySQLCreation from django.contrib.gis.db.backends.mysql....
frappe/erpnext
refs/heads/develop
erpnext/selling/doctype/industry_type/__init__.py
37694
from __future__ import unicode_literals
Fireblend/chromium-crosswalk
refs/heads/master
tools/telemetry/third_party/pyserial/serial/tools/list_ports_posix.py
118
#!/usr/bin/env python # portable serial port access with python # This is a module that gathers a list of serial ports on POSIXy systems. # For some specific implementations, see also list_ports_linux, list_ports_osx # # this is a wrapper module for different platform implementations of the # port enumeration feature...
Epirex/android_external_chromium_org
refs/heads/cm-11.0
chrome/common/extensions/docs/server2/patch_servlet.py
23
# 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 fnmatch import fnmatch import logging from urlparse import urlparse from appengine_url_fetcher import AppEngineUrlFetcher from caching_rietveld_patcher...
nh0815/QueryLikelihood
refs/heads/master
src/main.py
1
__author__ = 'Nick Hirakawa' from parse import * from query import * import operator import os import subprocess def main(): qp = QueryParser(filename='../text/queries.txt') cp = CorpusParser(filename='../text/corpus.txt') qp.parse() print 'parsing queries' queries = qp.get_queries() print 'parsing corpus' c...
gram526/VTK
refs/heads/master
Common/Transforms/Testing/Python/TestThinPlateWarp3D.py
20
#!/usr/bin/env python import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Image pipeline reader = vtk.vtkImageReader() reader.ReleaseDataFlagOff() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) reader.SetDataSpacing(3.2,3.2,1...
houssemFat/MeeM-Dev
refs/heads/master
teacher/__init__.py
1
default_app_config = 'teacher.apps.apps.AppConfig'
metaml/nupic
refs/heads/master
tests/unit/nupic/encoders/geospatial_coordinate_test.py
28
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
patsissons/Flexget
refs/heads/develop
flexget/plugins/filter/queue_base.py
23
from __future__ import unicode_literals, division, absolute_import from datetime import datetime import logging from sqlalchemy import Column, Integer, Boolean, String, Unicode, DateTime from flexget import db_schema from flexget.plugin import priority from flexget.utils.sqlalchemy_utils import table_add_column log ...
ellisonleao/pyshorteners
refs/heads/main
tests/test_base.py
1
from pyshorteners.base import BaseShortener from pyshorteners.exceptions import BadURLException, ExpandingErrorException import pytest def test_base_init_params_become_properties(): # pylint: disable=E1101 shortener = BaseShortener(a=1, b=2) assert shortener.a == 1 assert shortener.b == 2 # check...
jbonofre/beam
refs/heads/master
sdks/python/apache_beam/runners/worker/sdk_worker.py
2
# # 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...
suiyuan2009/tensorflow
refs/heads/master
tensorflow/contrib/timeseries/python/timeseries/state_space_models/level_trend_test.py
91
# 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...
psesh/Effective-Quadratures
refs/heads/master
tests/test_basis.py
1
from unittest import TestCase import unittest from equadratures import * import numpy as np class TestBasis(TestCase): def test_tensor(self): tensor = Basis('tensor-grid', [4, 4, 4]) np.testing.assert_almost_equal(tensor.cardinality, 125, decimal=7, err_msg = "Difference greated than imposed toler...
gnu-sandhi/sandhi
refs/heads/master
modules/gr36/gr-howto-write-a-block/apps/howto_square.py
36
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Howto Square # Generated: Thu Nov 12 11:26:07 2009 ################################################## import howto from gnuradio import eng_notation from gnuradio import gr from gnuradio.eng_option import eng...
chauhanhardik/populo
refs/heads/master
common/djangoapps/student/migrations/0021_remove_askbot.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models ASKBOT_AUTH_USER_COLUMNS = ( 'website', 'about', 'gold', 'email_isvalid', 'real_name', 'location', 'reputation', 'gravatar', 'bronze', 'last_seen', ...
hugovk/frosted
refs/heads/develop
frosted/checker.py
2
"""frosted/checker.py. The core functionality of frosted lives here. Implements the core checking capability models Bindings and Scopes 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 res...
beni55/django
refs/heads/master
tests/admin_scripts/management/commands/base_command.py
531
from django.core.management.base import BaseCommand class Command(BaseCommand): help = 'Test basic commands' requires_system_checks = False def add_arguments(self, parser): parser.add_argument('args', nargs='*') parser.add_argument('--option_a', '-a', default='1') parser.add_argum...
g7755725/Fitsugly
refs/heads/TW
tools/perf/scripts/python/futex-contention.py
11261
# futex contention # (c) 2010, Arnaldo Carvalho de Melo <acme@redhat.com> # Licensed under the terms of the GNU GPL License version 2 # # Translation of: # # http://sourceware.org/systemtap/wiki/WSFutexContention # # to perf python scripting. # # Measures futex contention import os, sys sys.path.append(os.environ['PER...
dahlstrom-g/intellij-community
refs/heads/master
python/testData/refactoring/move/dunderAllSingleElementTuple/before/src/a.py
79
__all__ = 'func', def func(): pass class C: pass
aronsky/home-assistant
refs/heads/dev
homeassistant/components/sensor/rainmachine.py
3
""" This platform provides support for sensor data from RainMachine. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.rainmachine/ """ import logging from homeassistant.components.rainmachine import ( DATA_RAINMACHINE, SENSOR_UPDATE_TOPIC, SENS...
openstack/trove-dashboard
refs/heads/master
tools/install_venv.py
1
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 OpenStack, LLC # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this ...
MrHalfman/gabbler
refs/heads/master
core/templatetags/__init__.py
1
__author__ = 'halfman'
meyt/sqlalchemy-dict
refs/heads/master
sqlalchemy_dict/base_model.py
1
import functools from typing import Union, Generator, Tuple, Any, Callable, List from datetime import datetime, date, time from decimal import Decimal from sqlalchemy import Column from sqlalchemy.orm import Query, CompositeProperty from sqlalchemy.orm.attributes import InstrumentedAttribute from sqlalchemy.orm.rela...
kave/collab
refs/heads/master
core/migrations/0005_auto__del_wikihighlight.py
5
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Deleting model 'WikiHighlight' db.delete_table(u'core_wikihighlight') def backwards(self, orm): ...
bitifirefly/edx-platform
refs/heads/master
common/test/acceptance/pages/xblock/acid.py
172
""" PageObjects related to the AcidBlock """ from bok_choy.page_object import PageObject from bok_choy.promise import EmptyPromise, BrokenPromise from .utils import wait_for_xblock_initialization class AcidView(PageObject): """ A :class:`.PageObject` representing the rendered view of the :class:`.AcidBlock`....
getnikola/coil
refs/heads/master
docs/conf.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Coil CMS documentation build configuration file, created by # sphinx-quickstart on Sat Jan 10 17:53:36 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 this # au...
dut3062796s/PTVS
refs/heads/master
Python/Tests/TestData/Repl/Program.py
18
def f(): return 42 100
markYoungH/chromium.src
refs/heads/nw12
third_party/pycoverage/coverage/files.py
209
"""File wrangling.""" from coverage.backward import to_string from coverage.misc import CoverageException import fnmatch, os, os.path, re, sys import ntpath, posixpath class FileLocator(object): """Understand how filenames work.""" def __init__(self): # The absolute path to our current directory. ...
zzcclp/carbondata
refs/heads/master
python/pycarbon/reader.py
3
# 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 ...
piquadrat/django
refs/heads/master
tests/gis_tests/test_spatialrefsys.py
115
import re from django.test import TestCase, skipUnlessDBFeature from .utils import SpatialRefSys, oracle, postgis, spatialite test_srs = ({ 'srid': 4326, 'auth_name': ('EPSG', True), 'auth_srid': 4326, # Only the beginning, because there are differences depending on installed libs 'srtext': 'GEOG...
USGSDenverPychron/pychron
refs/heads/develop
pychron/envisage/tasks/base_editor.py
1
# =============================================================================== # Copyright 2013 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/licens...
RudolfCardinal/crate
refs/heads/master
crate_anon/crateweb/research/html_functions.py
1
#!/usr/bin/env python """ crate_anon/crateweb/research/html_functions.py =============================================================================== Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com). This file is part of CRATE. CRATE is free software: you can redistribute it and/or modify ...
LuqueDaniel/ninja-ide
refs/heads/master
ninja_ide/gui/editor/checkers/__init__.py
7
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
SomethingExplosive/android_external_chromium_org
refs/heads/somex-4.4
third_party/closure_linter/closure_linter/common/tokens.py
139
#!/usr/bin/env python # # Copyright 2008 The Closure Linter 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 #...
fangeugene/the-blue-alliance
refs/heads/master
models/account.py
5
from google.appengine.ext import ndb class Account(ndb.Model): """ Accounts represent accounts people use on TBA. """ # Set by login/registration # Not editable by the user email = ndb.StringProperty() nickname = ndb.StringProperty() registered = ndb.BooleanProperty() permissions =...
jcoady9/python-for-android
refs/heads/master
python3-alpha/python3-src/Lib/test/test_filecmp.py
51
import os, filecmp, shutil, tempfile import unittest from test import support class FileCompareTestCase(unittest.TestCase): def setUp(self): self.name = support.TESTFN self.name_same = support.TESTFN + '-same' self.name_diff = support.TESTFN + '-diff' data = 'Contents of file go he...
acsone/server-tools
refs/heads/8.0
setup/mass_sorting/setup.py
7073
import setuptools setuptools.setup( setup_requires=['setuptools-odoo'], odoo_addon=True, )
dkarakats/edx-platform
refs/heads/master
common/djangoapps/student/tests/test_certificates.py
14
"""Tests for display of certificates on the student dashboard. """ import unittest import ddt from django.conf import settings from django.core.urlresolvers import reverse from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from xmodule.modulestore.tests.factories import CourseFactory from student...
metaperl/mpa
refs/heads/master
src/main.py
1
#!/usr/bin/env python # Core from __future__ import print_function from decimal import * from functools import wraps import logging import math import pprint import random import re import time import ConfigParser # Third-Party import argh from clint.textui import progress import funcy import html2text from PIL im...
venthur/wyrm
refs/heads/master
test/test_convert_mushu_data.py
2
from __future__ import division import unittest import numpy as np from wyrm.io import convert_mushu_data CHANNELS = 5 SAMPLES = 3 FS = 10 class TestConvertMushuData(unittest.TestCase): def setUp(self): xv, yv = np.meshgrid(list(range(CHANNELS)), list(range(SAMPLES))) self.data = xv * 10 + y...
jraede/dd-agent
refs/heads/master
tests/checks/integration/test_supervisord.py
34
# stdlib import os from time import sleep # 3p from nose.plugins.attrib import attr # project from checks import AgentCheck from tests.checks.common import AgentCheckTest PROCESSES = ["program_0", "program_1", "program_2"] STATUSES = ["down", "up", "unknown"] @attr(requires='supervisord') class TestSupervisordChec...
TeamLe-Shop/zordzman-plus-plus
refs/heads/master
python/tests/test_pipeline.py
1
import types import pytest import zm.pipeline class Pipeline(zm.pipeline.Pipeline): """A pipeline to be used by tests.""" class TestPipelineMeta: def test_subscribe(self): subscriber = pytest.Mock() assert Pipeline.subscribe( "test", unpack=True, silence=True)(subscriber) is s...
fxfitz/ansible
refs/heads/devel
lib/ansible/modules/net_tools/lldp.py
103
#!/usr/bin/python # # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'],...
jcfr/mystic
refs/heads/master
models/__init__.py
1
#!/usr/bin/env python # # Author: Mike McKerns (mmckerns @caltech and @uqfoundation) # Author: Patrick Hung (patrickh @caltech) # Copyright (c) 1997-2015 California Institute of Technology. # License: 3-clause BSD. The full license text is available at: # - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/m...
joeshaw/luigi
refs/heads/master
examples/__init__.py
475
# -*- 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...
bowlofstew/changes
refs/heads/master
tests/changes/utils/test_agg.py
2
from changes.constants import Result, Status from changes.utils.agg import aggregate_result, aggregate_status def test_aggregate_result(): status_list = [Result.passed, Result.failed, Result.unknown] assert aggregate_result(status_list) == Result.failed status_list = [Result.passed, Result.unknown] a...
DavidNorman/tensorflow
refs/heads/master
tensorflow/python/saved_model/load_v1_in_v2.py
2
# Copyright 2019 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...
mrquim/repository.mrquim
refs/heads/master
repo/script.module.youtube.dl/lib/youtube_dl/extractor/screencastomatic.py
59
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import js_to_json class ScreencastOMaticIE(InfoExtractor): _VALID_URL = r'https?://screencast-o-matic\.com/watch/(?P<id>[0-9a-zA-Z]+)' _TEST = { 'url': 'http://screencast-o-matic.com/watch/c2lD3BeOP...
thobrla/apitools
refs/heads/master
apitools/base/protorpclite/__init__.py
38
# # Copyright 2015 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...
yidongliu/scrapy
refs/heads/master
scrapy/linkextractors/__init__.py
61
""" scrapy.linkextractors This package contains a collection of Link Extractors. For more info see docs/topics/link-extractors.rst """ import re from six.moves.urllib.parse import urlparse from parsel.csstranslator import HTMLTranslator from scrapy.utils.misc import arg_to_iter from scrapy.utils.url import ( ca...
jjmachan/activityPointsApp
refs/heads/master
activitypoints/lib/python3.5/site-packages/django/contrib/gis/admin/__init__.py
523
from django.contrib.admin import ( HORIZONTAL, VERTICAL, AdminSite, ModelAdmin, StackedInline, TabularInline, autodiscover, register, site, ) from django.contrib.gis.admin.options import GeoModelAdmin, OSMGeoAdmin from django.contrib.gis.admin.widgets import OpenLayersWidget __all__ = [ 'HORIZONTAL', 'VERT...
staslev/beam
refs/heads/master
sdks/python/apache_beam/runners/dataflow/dataflow_metrics_test.py
16
# # 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...
vadimtk/chrome4sdp
refs/heads/master
tools/perf/measurements/thread_times.py
17
# 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 telemetry.page import page_test from telemetry.timeline import tracing_category_filter from telemetry.web_perf.metrics import layout from measurements ...
SwagColoredKitteh/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/manifest/__init__.py
45
from . import item from . import manifest from . import sourcefile from . import tree from . import update
dsqmoore/0install
refs/heads/master
zeroinstall/injector/trust.py
1
""" Records who we trust to sign feeds. Trust is divided up into domains, so that it is possible to trust a key in some cases and not others. @var trust_db: Singleton trust database instance. """ # Copyright (C) 2009, Thomas Leonard # See the README file for details, or visit http://0install.net. from zeroinstall i...
philanthropy-u/edx-platform
refs/heads/master
lms/djangoapps/experiments/factories.py
19
import factory import factory.fuzzy from experiments.models import ExperimentData, ExperimentKeyValue from student.tests.factories import UserFactory class ExperimentDataFactory(factory.DjangoModelFactory): class Meta(object): model = ExperimentData user = factory.SubFactory(UserFactory) experim...
alqfahad/odoo
refs/heads/8.0
addons/website_mail/tests/__init__.py
261
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 20123TODAY OpenERP S.A. <http://www.openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms...
modulexcite/PTVS
refs/heads/master
Python/Tests/TestData/DebuggerProject/LocalReprRestrictionsTest.py
18
s = "01234567890123456789012345678901234567890123456789" sa1 = [s] sa2 = [sa1, sa1] sa3 = [sa2, sa2, sa2] sa4 = [sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3, sa3] da1 = {s : s} da2 = {s : da1, '1' : da1} da3 = {s : da2, '1' : da2, '2' : da2} da4 = {s : da3, ...
rldhont/Quantum-GIS
refs/heads/master
python/pyplugin_installer/installer_data.py
22
# -*- coding:utf-8 -*- """ /*************************************************************************** Plugin Installer module ------------------- Date : May 2013 Copyright : (C) 2013 by Borys Jurgiel Email :...
sebastic/QGIS
refs/heads/master
python/plugins/processing/script/ScriptAlgorithm.py
2
# -*- coding: utf-8 -*- """ *************************************************************************** ScriptAlgorithm.py --------------------- Date : August 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com ***********************...
chiu/vincent
refs/heads/master
vincent/charts.py
8
# -*- coding: utf-8 -*- """ Charts: Constructors for different chart types in Vega grammar. """ from .visualization import Visualization from .data import Data from .transforms import Transform from .values import ValueRef from .properties import PropertySet from .scales import DataRef, Scale from .marks import MarkP...
kwikteam/global_superclustering
refs/heads/master
global_code/testing_cat.py
1
#Be sure to run #python setup.py build_ext --inplace #before running this script import pickle import numpy as np #import matplotlib.pyplot as plt #import sorting #from supercluster import * #from klustakwik2 import * import imp # lets you reload modules using e.g.imp.reload(sorting) from IPython import embed import...
fernand/scipy
refs/heads/master
scipy/linalg/tests/test_procrustes.py
111
from itertools import product, permutations import numpy as np from numpy.testing import assert_array_less, assert_allclose, assert_raises from scipy.linalg import inv, eigh, norm from scipy.linalg import orthogonal_procrustes def test_orthogonal_procrustes_ndim_too_large(): np.random.seed(1234) A = np.rand...
wlamond/scikit-learn
refs/heads/master
sklearn/utils/tests/test_multiclass.py
58
from __future__ import division import numpy as np import scipy.sparse as sp from itertools import product from sklearn.externals.six.moves import xrange from sklearn.externals.six import iteritems from scipy.sparse import issparse from scipy.sparse import csc_matrix from scipy.sparse import csr_matrix from scipy.sp...
jstasiak/python-cg
refs/heads/master
tests/context_tests.py
1
# -*- coding: utf-8 -*- from __future__ import absolute_import, division, print_function, unicode_literals from mock import Mock from nose.tools import eq_ from cg.context import Context, ContextFactory class TestContextFactory(object): def test_context_gets_created_correctly(self): handle = 123 bridge = Mock()...
xerosanyam/yowsup
refs/heads/master
yowsup/layers/protocol_media/protocolentities/message_media_downloadable.py
45
from .message_media import MediaMessageProtocolEntity from yowsup.common.tools import WATools import mimetypes import os class DownloadableMediaMessageProtocolEntity(MediaMessageProtocolEntity): ''' <message t="{{TIME_STAMP}}" from="{{CONTACT_JID}}" offline="{{OFFLINE}}" type="text" id="{{MESSAGE_ID}}"...
ucloud/uai-sdk
refs/heads/master
uaitrain/arch/caffe/train.py
1
#!/usr/bin/env python # Copyright 2017 The UAI-SDK 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 ...
DR08/mxnet
refs/heads/stable
python/mxnet/gluon/model_zoo/__init__.py
61
# 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 u...
marcsances/SITW-Project2016
refs/heads/master
musicdb/musicdb/views.py
1
#views.py from forms import * from django.contrib.auth.decorators import login_required from django.contrib.auth import logout from django.views.decorators.csrf import csrf_protect from django.shortcuts import render from django.http import HttpResponseRedirect from django.template import RequestContext @csrf_protect ...
eicher31/compassion-modules
refs/heads/dev
partner_communication/models/report_with_omr.py
3
# -*- coding: utf-8 -*- # © 2014-2016 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl). import StringIO import logging from odoo import models, api _logger = logging.getLogger(__name__) try: from pyPdf import PdfFileWriter, PdfFileReader except ImportError: _logger.warning("Please...
pmacosta/pplot
refs/heads/master
docs/support/plot_example_1.py
1
# plot_example_1.py # Copyright (c) 2013-2019 Pablo Acosta-Serafini # See LICENSE for details # pylint: disable=C0111,C0410,C0413,W0613 from __future__ import print_function import os, sys, numpy, pplot def main(fname, no_print): """Show how to use pplot library to generate presentation-quality plots.""" ###...
agrista/odoo-saas
refs/heads/master
addons/note/note.py
153
# -*- 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...
heisencoder/route-finder
refs/heads/master
third_party/lib/python/django/conf/locale/he/formats.py
237
# -*- 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 = 'j בF Y' TIME_FORMAT = 'H:i:s' DAT...
VishvajitP/django-social-auth
refs/heads/master
social_auth/backends/contrib/mixcloud.py
14
from social.backends.mixcloud import MixcloudOAuth2 as MixcloudBackend
jesuscript/topo-mpi
refs/heads/cleanmpi
contrib/JLStevens-TCAL/MastersVersion/models/modelUtils/VSDUtils.py
1
import topo from topo import param from topo.sheet.basic import JointNormalizingCFSheet_Continuous from topo.transferfn.basic import Hysteresis as Hysteresis import numpy # Source: topographica/topo/base/projection.py class VSDContinuous(JointNormalizingCFSheet_Continuous): """ CFSheet that runs continuously, ...
cpennington/edx-platform
refs/heads/master
openedx/core/djangolib/markup.py
8
""" Utilities for use in Mako markup. """ import markupsafe import bleach from lxml.html.clean import Cleaner from mako.filters import decode # Text() can be used to declare a string as plain text, as HTML() is used # for HTML. It simply wraps markupsafe's escape, which will HTML-escape if # it isn't already escape...
buntyke/Flask
refs/heads/master
microblog/flask/lib/python2.7/site-packages/sqlalchemy/testing/suite/test_sequence.py
114
from .. import fixtures, config from ..config import requirements from ..assertions import eq_ from ... import testing from ... import Integer, String, Sequence, schema from ..schema import Table, Column class SequenceTest(fixtures.TablesTest): __requires__ = ('sequences',) __backend__ = True run_creat...
lpryszcz/bin
refs/heads/master
sam2inverted_repeats.py
1
#!/usr/bin/env python # Report pairs in FR RF orientations # USAGE: samtools view -h repeats.bam | ./sam2inverted_repeats.py | samtools view -Sbu - | samtools view -Sb - repeats.inverted import sys for l in sys.stdin: ldata = l.split() if l.startswith('@') or int(ldata[1]) & 16 or int(ldata[1]) & 32: ...
rooshilp/CMPUT410Lab6
refs/heads/master
virt_env/virt1/lib/python2.7/site-packages/django/utils/crypto.py
58
""" Django's standard crypto functions and utilities. """ from __future__ import unicode_literals import hmac import struct import hashlib import binascii import time # Use the system PRNG if possible import random try: random = random.SystemRandom() using_sysrandom = True except NotImplementedError: impo...
butfriendly/friendly-django-topcoat
refs/heads/master
example/manage.py
1
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "example.settings") sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), ".."))) from django.core.management import execute_from_command_line execute_from_comm...
samithaj/headphones
refs/heads/master
headphones/cuesplit.py
3
# This file is part of Headphones. # # Headphones 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. # # Headphones is distributed i...
sohaibfarooqi/flask-stargate
refs/heads/master
tests/test_sorting.py
1
from . import SimpleTestBase from flask import json import datetime from app.models import User, City, Location from app import db class TestSorting(SimpleTestBase): @classmethod def setUpClass(self): super(TestSorting, self).setUpClass() def test_sort_desc(self): response = self.client.get('/api/user?...
jicruz/heroku-bot
refs/heads/master
lib/chardet/langhungarianmodel.py
269
######################## 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...
sinkuri256/python-for-android
refs/heads/master
python3-alpha/extra_modules/pyxmpp2/version.py
46
# pylint: disable=C0111,C0103 version = '2.0alpha2'
rubikloud/scikit-learn
refs/heads/0.17.1-RUBIKLOUD
examples/calibration/plot_compare_calibration.py
241
""" ======================================== Comparison of Calibration of Classifiers ======================================== Well calibrated classifiers are probabilistic classifiers for which the output of the predict_proba method can be directly interpreted as a confidence level. For instance a well calibrated (bi...
GdZ/scriptfile
refs/heads/master
software/googleAppEngine/lib/django_1_3/django/contrib/staticfiles/storage.py
154
import os from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.storage import FileSystemStorage from django.utils.importlib import import_module from django.contrib.staticfiles import utils class StaticFilesStorage(FileSystemStorage): """ Standard fi...