repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
nijel/translate
refs/heads/master
translate/convert/test_rc2po.py
2
from translate.convert import rc2po, test_convert from translate.storage.po import pofile RC_SOURCE = r""" #include "other_file.h" // This must be ignored LANGUAGE LANG_ENGLISH, SUBLANG_DEFAULT ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_REGGHC_DIALOG DIALOGEX ...
fengbaicanhe/intellij-community
refs/heads/master
python/testData/highlighting/methodParams.py
83
class A: def <error descr="Method must have a first parameter, usually called 'self'">foo1</error>(): pass def foo2(<warning descr="Did not you mean 'self'?">elf</warning>): pass def foo3<info descr="Usually first parameter of a method is named 'self'">(this)</info>: pass
msiedlarek/qtwebkit
refs/heads/5.4
Tools/Scripts/webkitpy/w3c/test_parser.py
135
#!/usr/bin/env python # Copyright (C) 2013 Adobe Systems Incorporated. All rights reserved. # # 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 n...
cubieboard/openbox_external_protobuf
refs/heads/openbox
gtest/test/gtest_throw_on_failure_test.py
2917
#!/usr/bin/env python # # Copyright 2009, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list...
izgzhen/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pytest/_pytest/pastebin.py
181
""" submit failure or test session information to a pastebin service. """ import pytest import sys import tempfile def pytest_addoption(parser): group = parser.getgroup("terminal reporting") group._addoption('--pastebin', metavar="mode", action='store', dest="pastebin", default=None, choices=[...
n1ck3/dzentinel
refs/heads/master
lib/python3.3/site-packages/psutil/_error.py
4
#!/usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """psutil exception classes. Not supposed to be used / imported directly. Instead use psutil.NoSuchProcess, etc. """ class Error(E...
peterbraden/tensorflow
refs/heads/master
tensorflow/python/kernel_tests/constant_op_test.py
9
# Copyright 2015 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
ShySec/scrimmage-scoreboard
refs/heads/master
web2py/gluon/contrib/heroku.py
21
""" Usage: in web2py models/db.py from gluon.contrib.heroku import get_db db = get_db() """ import os from gluon import * from pydal.adapters import ADAPTERS, PostgreSQLAdapter from pydal.helpers.classes import UseDatabaseStoredFile class HerokuPostgresAdapter(UseDatabaseStoredFile,PostgreSQLAdapter): drivers = ...
python-openxml/python-docx
refs/heads/master
tests/styles/test_styles.py
1
# encoding: utf-8 """Unit test suite for the docx.styles.styles module""" from __future__ import absolute_import, division, print_function, unicode_literals import pytest from docx.enum.style import WD_STYLE_TYPE from docx.oxml.styles import CT_Style, CT_Styles from docx.styles.latent import LatentStyles from docx....
hurricup/intellij-community
refs/heads/master
python/testData/completion/doctest/importInDoctest.py
83
__author__ = 'ktisha' from functionInDoctest import foo def bar(): """ >>> fo<caret> """
opensgn/N8000
refs/heads/master
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...
barrysteyn/pre-commit
refs/heads/master
pre_commit/runner.py
2
from __future__ import unicode_literals import os import os.path from cached_property import cached_property import pre_commit.constants as C from pre_commit import git from pre_commit.clientlib.validate_config import load_config from pre_commit.repository import Repository from pre_commit.store import Store class...
bencharb/AutobahnPython
refs/heads/master
examples/twisted/wamp/rpc/progress/backend.py
2
############################################################################### # # The MIT License (MIT) # # Copyright (c) Tavendo GmbH # # 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 with...
goofwear/raspberry_pwn
refs/heads/master
src/pentest/metagoofil/hachoir_parser/archive/cab.py
21
""" Microsoft Cabinet (CAB) archive. Author: Victor Stinner Creation date: 31 january 2007 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, Enum, CString, String, UInt16, UInt32, Bit, Bits, PaddingBits, NullBits, DateTimeMSDOS32, RawBytes) from hachoir_parser.common.msdos im...
yceruto/django
refs/heads/master
tests/wsgi/tests.py
3
from __future__ import unicode_literals import unittest from django.core.exceptions import ImproperlyConfigured from django.core.servers.basehttp import get_internal_wsgi_application from django.core.signals import request_started from django.core.wsgi import get_wsgi_application from django.db import close_old_conne...
quru/rvsr
refs/heads/master
networkx/algorithms/chordal/__init__.py
89
from networkx.algorithms.chordal.chordal_alg import *
eleutherian/pOwly
refs/heads/master
tutorial/admin.py
13848
from django.contrib import admin # Register your models here.
rishilification/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/port/builders.py
118
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
CMPUT410W15T02/CMPUT410W15-project
refs/heads/master
testenv/lib/python2.7/site-packages/django/dispatch/__init__.py
758
"""Multi-consumer multi-producer dispatching mechanism Originally based on pydispatch (BSD) http://pypi.python.org/pypi/PyDispatcher/2.0.1 See license.txt for original license. Heavily modified for Django's purposes. """ from django.dispatch.dispatcher import Signal, receiver # NOQA
pinterb/st2
refs/heads/master
st2common/tests/unit/test_action_param_utils.py
3
# -*- coding: utf-8 -*- # Licensed to the StackStorm, Inc ('StackStorm') 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 "Licen...
LTD-Beget/sprutio
refs/heads/master
app/modules/sftp/actions/files/read.py
1
import traceback from core import FM class ReadFile(FM.BaseAction): def __init__(self, request, path, encoding, session, **kwargs): super(ReadFile, self).__init__(request=request, **kwargs) self.path = path self.session = session self.encoding = encoding def run(self): ...
hale36/SRTV
refs/heads/master
sickbeard/metadata/tivo.py
1
# Author: Nic Wolfe <nic@wolfeden.ca> # Author: Gordon Turner <gordonturner@gordonturner.ca> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Fre...
ideas4u/learngit
refs/heads/master
autoTrading.py
1
# -*- encoding: utf8 -*- __author__ = '人在江湖' import tkinter.messagebox import tkinter as tk import threading import time import win32gui import win32api import datetime import win32con import tushare as ts TIME = 100 is_start = False is_monitor = True items_list = [] trading_message = [] stock_name = '' stock_price...
pankshok/c3
refs/heads/master
iwi/api/views.py
2
import http from functools import wraps from flask import json, jsonify from flask import render_template, flash, redirect, request from iwi.api import app from iwi.forms import LoginForm from common.request import jsoned, send_request class Templates: index = "index.html" login = "login.html" @app.route(...
lahosken/pants
refs/heads/master
tests/python/pants_test/backend/python/tasks2/test_python_repl.py
4
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import (absolute_import, division, generators, nested_scopes, print_function, unicode_literals, with_statement) import os import sys...
arrabito/DIRAC
refs/heads/integration
Core/Utilities/LockRing.py
15
import random import time import threading import thread from hashlib import md5 from DIRAC.Core.Utilities.ReturnValues import S_ERROR, S_OK from DIRAC.Core.Utilities.DIRACSingleton import DIRACSingleton class LockRing( object ): __metaclass__ = DIRACSingleton def __init__( self ): random.seed() self.__...
akintoey/django
refs/heads/master
tests/model_options/test_tablespaces.py
337
from __future__ import unicode_literals from django.apps import apps from django.conf import settings from django.db import connection from django.test import TestCase, skipIfDBFeature, skipUnlessDBFeature from .models.tablespaces import ( Article, ArticleRef, Authors, Reviewers, Scientist, ScientistRef, ) def ...
nhomar/odoo
refs/heads/8.0
openerp/addons/test_new_api/tests/test_new_fields.py
69
# # test cases for new-style fields # from datetime import date, datetime from collections import defaultdict from openerp.tests import common from openerp.exceptions import except_orm class TestNewFields(common.TransactionCase): def test_00_basics(self): """ test accessing new fields """ # find...
thnee/ansible
refs/heads/devel
lib/ansible/modules/remote_management/redfish/redfish_config.py
9
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright (c) 2017-2018 Dell EMC Inc. # GNU General Public License v3.0+ (see LICENSE or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'status': ['preview'], ...
z-fork/gunicorn
refs/heads/master
gunicorn/util.py
6
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from __future__ import print_function import email.utils import fcntl import io import os import pkg_resources import random import resource import socket import sys import textwrap import ti...
mancoast/CPythonPyc_test
refs/heads/master
cpython/250_borrowed_ref_1.py
168
""" _PyType_Lookup() returns a borrowed reference. This attacks the call in dictobject.c. """ class A(object): pass class B(object): def __del__(self): print 'hi' del D.__missing__ class D(dict): class __missing__: def __init__(self, *args): pass d = D() a = A() a.cy...
eyohansa/django
refs/heads/master
django/core/files/move.py
554
""" Move a file in the safest way possible:: >>> from django.core.files.move import file_move_safe >>> file_move_safe("/tmp/old_file", "/tmp/new_file") """ import os from shutil import copystat from django.core.files import locks __all__ = ['file_move_safe'] def _samefile(src, dst): # Macintosh, Unix....
sinhrks/numpy
refs/heads/master
numpy/distutils/command/egg_info.py
144
from __future__ import division, absolute_import, print_function from setuptools.command.egg_info import egg_info as _egg_info class egg_info(_egg_info): def run(self): # We need to ensure that build_src has been executed in order to give # setuptools' egg_info command real filenames instead of fu...
Pluto-tv/chromium-crosswalk
refs/heads/master
tools/telemetry/third_party/gsutilz/gslib/boto_translation.py
12
# -*- coding: utf-8 -*- # Copyright 2013 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
enlighter/algorithms
refs/heads/master
utils/queue.py
1
"""Make a Queue class using a list! Hint: You can use any Python list method you'd like! Try to write each one in as few lines as possible. Make sure you pass the test cases too!""" # from timeit import default_timer as timer class Queue: def __init__(self, head=None): if head is not None: sel...
gurneyalex/odoo
refs/heads/13.0-improve_sale_coupon_perf
addons/payment_payulatam/tests/test_payulatam.py
9
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from lxml import objectify from werkzeug import urls from odoo.addons.payment.tests.common import PaymentAcquirerCommon from odoo.tests import tagged class PayUlatamCommon(PaymentAcquirerCommon): def setUp(self): ...
MQQiang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_urllib2net.py
60
import unittest from test import support from test.test_urllib2 import sanepathname2url import os import socket import urllib.error import urllib.request import sys try: import ssl except ImportError: ssl = None support.requires("network") TIMEOUT = 60 # seconds def _retry_thrice(func, exc, *args, **kwarg...
twitter/pants
refs/heads/master
contrib/python/tests/python/pants_test/contrib/python/checks/checker/test_newlines.py
1
# coding=utf-8 # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md). # Licensed under the Apache License, Version 2.0 (see LICENSE). from __future__ import absolute_import, division, print_function, unicode_literals from pants_test.contrib.python.checks.checker.plugin_test_base import CheckstylePluginTes...
plaes/numpy
refs/heads/master
doc/sphinxext/plot_directive.py
12
""" A special directive for generating a matplotlib plot. .. warning:: This is a hacked version of plot_directive.py from Matplotlib. It's very much subject to change! Usage ----- Can be used like this:: .. plot:: examples/example.py .. plot:: import matplotlib.pyplot as plt plt.plot...
JasonKessler/scattertext
refs/heads/master
scattertext/test/test_indexStoreFromList.py
1
from unittest import TestCase from scattertext.indexstore.IndexStoreFromList import IndexStoreFromList class TestIndexStoreFromList(TestCase): def test_index_store_from_dict(self): values = ['a', 'b', 'c'] idxstore = IndexStoreFromList.build(values) for idx, term in enumerate(values): self.assertEqual(idxs...
re4lfl0w/pyconkr-2015
refs/heads/master
pyconkr/migrations/0004_auto_20150816_1430.py
6
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('pyconkr', '0003_auto_20150523_0552'), ...
mlperf/training_results_v0.5
refs/heads/master
v0.5.0/google/cloud_v3.8/gnmt-tpuv3-8/code/gnmt/model/t2t/tensor2tensor/utils/t2t_model_test.py
3
# coding=utf-8 # Copyright 2018 The Tensor2Tensor Authors. # # 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...
brandond/ansible
refs/heads/devel
lib/ansible/modules/remote_management/imc/imc_rest.py
26
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2017, Dag Wieers <dag@wieers.com> # 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', ...
kaushik94/sympy
refs/heads/master
sympy/matrices/immutable.py
3
from __future__ import division, print_function from sympy.core import Basic, Dict, Integer, S, Tuple, sympify from sympy.core.cache import cacheit from sympy.core.sympify import converter as sympify_converter from sympy.matrices.dense import DenseMatrix from sympy.matrices.expressions import MatrixExpr from sympy.mat...
shizhai/wprobe
refs/heads/ar9344
build_dir/host/scons-2.1.0/build/lib.linux-i686-2.7/SCons/Platform/darwin.py
21
"""engine.SCons.Platform.darwin Platform-specific initialization for Mac OS X systems. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Platform.Platform() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008...
Iristyle/ChocolateyPackages
refs/heads/master
EthanBrown.SublimeText2.UtilPackages/tools/PackageCache/Package Control/package_control/commands/upgrade_all_packages_command.py
9
import time import threading import sublime import sublime_plugin from ..thread_progress import ThreadProgress from ..package_installer import PackageInstaller, PackageInstallerThread from ..package_renamer import PackageRenamer class UpgradeAllPackagesCommand(sublime_plugin.WindowCommand): """ A command to...
LambdaCast/LambdaCast
refs/heads/dev
portal/BitTornadoABC/BitTornado/PSYCO.py
2
# edit this file to enable/disable Psyco # psyco = 1 -- enabled # psyco = 0 -- disabled psyco = 0
daenamkim/ansible
refs/heads/devel
test/sanity/validate-modules/test_validate_modules_regex.py
162
#!/usr/bin/env python # This is a standalone test for the regex inside validate-modules # It is not suitable to add to the make tests target because the # file under test is outside the test's sys.path AND has a hyphen # in the name making it unimportable. # # To execute this by hand: # 1) cd <checkoutdir> # 2) so...
robotmaxtron/openshift-ansible
refs/heads/master
roles/lib_zabbix/library/zbx_application.py
16
#!/usr/bin/env python ''' Ansible module for application ''' # vim: expandtab:tabstop=4:shiftwidth=4 # # Zabbix application ansible module # # # Copyright 2015 Red Hat Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # ...
QuLogic/studyGroup
refs/heads/master
lessons/python/cpu-multiprocessing/dask_tutorial.py
5
''' From: http://distributed.readthedocs.io/en/latest/joblib.html ''' import distributed.joblib # Scikit-learn bundles joblib, so you need to import from # `sklearn.externals.joblib` instead of `joblib` directly # This is not true depending on the packaging (e.g. Fedora/Debian) # in this case, use the following: # fr...
2015fallproject/2015fallcase1
refs/heads/master
static/Brython3.2.2-20150927-180218/Lib/itertools.py
2
import operator class accumulate: def __init__(self, iterable, func = operator.add): self.it = iter(iterable) self._total = None self.func = func def __iter__(self): return self def __next__(self): if not self._total: self._total = ...
patrikpettersson/rest-engine
refs/heads/master
lib/passlib/tests/test_utils.py
20
"""tests for passlib.util""" #============================================================================= # imports #============================================================================= from __future__ import with_statement # core from binascii import hexlify, unhexlify import sys import random import warnin...
evilhero/mylar
refs/heads/master
mylar/cache.py
2
# This file is part of Mylar. # # Mylar 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. # # Mylar is distributed in the hope that...
ynkjm/ryu
refs/heads/master
ryu/ofproto/ofproto_v1_4.py
11
# Copyright (C) 2012,2013 Nippon Telegraph and Telephone Corporation. # Copyright (C) 2012 Isaku Yamahata <yamahata at valinux co jp> # # 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 # # ht...
tux-00/ansible
refs/heads/devel
lib/ansible/modules/monitoring/zabbix_host.py
35
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013-2014, Epic Games, 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 # (...
srvg/ansible
refs/heads/devel
lib/ansible/module_utils/facts/network/dragonfly.py
232
# 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 in the hope that ...
agry/NGECore2
refs/heads/master
scripts/object/tangible/component/item/quest_item/current_motivator.py
85615
import sys def setup(core, object): return
agry/NGECore2
refs/heads/master
scripts/object/static/structure/general/waypoint_large_yellow.py
85615
import sys def setup(core, object): return
kingvuplus/ZDE-gui
refs/heads/master
lib/python/Plugins/Extensions/MediaPlayer/settings.py
28
from Screens.Screen import Screen from Screens.HelpMenu import HelpableScreen from Components.FileList import FileList from Components.Sources.StaticText import StaticText from Components.MediaPlayer import PlayList from Components.config import config, getConfigListEntry, ConfigSubsection, configfile, ConfigText, Conf...
Leoniela/nipype
refs/heads/master
nipype/workflows/dmri/dipy/denoise.py
9
# coding: utf-8 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: import nipype.pipeline.engine as pe import nipype.interfaces.utility as niu from nipype.interfaces import fsl from nipype.interfaces import dipy def nlmeans_pipeline(name='Denoise', ...
RockySteveJobs/python-for-android
refs/heads/master
python-modules/twisted/twisted/spread/ui/__init__.py
81
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ Twisted Spread UI: UI utilities for various toolkits connecting to PB. """ # Undeprecating this until someone figures out a real plan for alternatives to spread.ui. ##import warnings ##warnings.warn("twisted.spread.ui is deprecate...
you21979/phantomjs
refs/heads/2.0
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/steps/commit_unittest.py
124
# Copyright (C) 2012 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
aristanetworks/neutron
refs/heads/master
neutron/tests/tempest/common/isolated_creds.py
15
# Copyright 2013 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...
nuncjo/odoo
refs/heads/8.0
addons/product/__openerp__.py
262
# -*- 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...
scottferg/web-console
refs/heads/master
django/contrib/gis/gdal/field.py
13
from ctypes import byref, c_int from datetime import date, datetime, time from django.contrib.gis.gdal.base import GDALBase from django.contrib.gis.gdal.error import OGRException from django.contrib.gis.gdal.prototypes import ds as capi # For more information, see the OGR C API source code: # http://www.gdal.o...
9and3r/RPi-InfoScreen-Kivy
refs/heads/master
screens/mopidy/screens/base_screen.py
1
from kivy.uix.screenmanager import Screen __author__ = 'ander' class BaseScreen(Screen): def __init__(self, ws, **kwargs): super(BaseScreen, self).__init__(**kwargs) self.ws = ws def tracklist_changed(self, tracklist): pass def track_playback_started(self, tl_track): p...
joshrule/LOTlib
refs/heads/master
LOTlib/Projects/Quantifier/Model/__init__.py
4
from Data import all_objects, TESTING_SET_SIZE, TESTING_SET, target, sample_context, generate_data from Grammar import grammar from Hypothesis import MyContext, GriceanQuantifierLexicon from Utilities import make_my_hypothesis, my_weight_function, gricean_weight, show_baseline_distribution, \ is_conservative, extr...
bjorand/django-allauth
refs/heads/master
allauth/socialaccount/providers/soundcloud/models.py
4209
# Create your models here.
emijrp/youtube-dl
refs/heads/master
youtube_dl/extractor/svt.py
113
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( determine_ext, ) class SVTBaseIE(InfoExtractor): def _extract_video(self, url, video_id): info = self._download_json(url, video_id) title = info['context']['title'] ...
agustin320/carpoolme
refs/heads/master
carpool/localidad/views.py
6445
from django.shortcuts import render # Create your views here.
agry/NGECore2
refs/heads/master
scripts/object/tangible/deed/event_perk/sparking_treasure_box_chest_deed.py
85615
import sys def setup(core, object): return
uberamd/NGECore2
refs/heads/master
scripts/object/mobile/warren_irradiated_worker_s01.py
85615
import sys def setup(core, object): return
fz6/pcachefs
refs/heads/master
pcachefs/ranges.py
3
#!/usr/bin/python """ Range and Ranges classes used by pCacheFS Copyright 2012 Jonny Tyers 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/LIC...
vijaylbais/boto
refs/heads/develop
boto/cloudformation/__init__.py
131
# Copyright (c) 2010-2011 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010-2011, Eucalyptus Systems, Inc. # # 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, includin...
StealthMicro/OctoPi-Makerbot
refs/heads/master
env/Lib/site-packages/makerbot_driver/Writer/__init__.py
7
__all__ = ['AbstractWriter', 'FileWriter', 'StreamWriter', 'errors'] from AbstractWriter import * from StreamWriter import * from FileWriter import * from errors import *
pschmitt/home-assistant
refs/heads/dev
tests/components/dsmr/test_sensor.py
5
"""Test for DSMR components. Tests setup of the DSMR component and ensure incoming telegrams cause Entity to be updated with new values. """ import asyncio import datetime from decimal import Decimal from itertools import chain, repeat import pytest from homeassistant.bootstrap import async_setup_component from ho...
polymer-spain/DeusCoNWeT
refs/heads/master
src/api_handlers/lib/pymongo/ssl_match_hostname.py
74
# Backport of the match_hostname logic introduced in python 3.2 # http://hg.python.org/releasing/3.3.5/file/993955b807b3/Lib/ssl.py import re class CertificateError(ValueError): pass def _dnsname_match(dn, hostname, max_wildcards=1): """Matching according to RFC 6125, section 6.4.3 http://tools.ietf.o...
popazerty/e2_sh4
refs/heads/master
lib/python/Components/About.py
1
from boxbranding import getBoxType, getImageVersion from sys import modules import socket, fcntl, struct def getVersionString(): return getImageVersion() def getEnigmaVersionString(): return getImageVersion() def getGStreamerVersionString(): import enigma return enigma.getGStreamerVersionString() def getKernelV...
bozzzzo/qpid-proton
refs/heads/master
examples/python/db_recv.py
14
#!/usr/bin/env python # # 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 # "...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/validators/barpolar/marker/colorbar/_lenmode.py
1
import _plotly_utils.basevalidators class LenmodeValidator(_plotly_utils.basevalidators.EnumeratedValidator): def __init__( self, plotly_name="lenmode", parent_name="barpolar.marker.colorbar", **kwargs ): super(LenmodeValidator, self).__init__( plotly_name=plotly_name, ...
kingvuplus/EGAMI-B
refs/heads/master
lib/python/Plugins/Extensions/Infopanel/MountManager.py
6
from Screens.Screen import Screen from enigma import eTimer from boxbranding import getMachineBrand, getMachineName, getBoxType from Screens.MessageBox import MessageBox from Screens.Standby import TryQuitMainloop from Components.ActionMap import ActionMap from Components.Label import Label from Components.Pixmap impor...
fevxie/odoo
refs/heads/8.0
addons/hr_attendance/hr_attendance.py
250
# -*- 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...
OMNIL-Infinity/volatility
refs/heads/master
volatility/plugins/gui/gahti.py
44
# Volatility # Copyright (C) 2007-2013 Volatility Foundation # Copyright (C) 2010,2011,2012 Michael Hale Ligh <michael.ligh@mnin.org> # # This file is part of Volatility. # # Volatility is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the F...
Tesora/tesora-horizon
refs/heads/master
openstack_dashboard/test/test_plugins/panel_group_config/_10_admin_add_panel_group.py
124
# The name of the panel group to be added to HORIZON_CONFIG. Required. PANEL_GROUP = 'plugin_panel_group' # The display name of the PANEL_GROUP. Required. PANEL_GROUP_NAME = 'Plugin Panel Group' # The name of the dashboard the PANEL_GROUP associated with. Required. PANEL_GROUP_DASHBOARD = 'admin'
2013Commons/hue
refs/heads/master
apps/sqoop/src/sqoop/api/__init__.py
2
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
912/M-new
refs/heads/master
virtualenvironment/tourism_industry/lib/python2.7/site-packages/setuptools/tests/__init__.py
412
"""Tests for the 'setuptools' package""" import sys import os import unittest from setuptools.tests import doctest import distutils.core import distutils.cmd from distutils.errors import DistutilsOptionError, DistutilsPlatformError from distutils.errors import DistutilsSetupError from distutils.core import Extension fr...
ahmadia/bokeh
refs/heads/master
sphinx/source/docs/user_guide/source_examples/plotting_legends.py
62
import numpy as np from bokeh.plotting import output_file, show, figure x = np.linspace(0, 4*np.pi, 100) y = np.sin(x) output_file("legend.html") p = figure() p.circle(x, y, legend="sin(x)") p.line(x, y, legend="sin(x)") p.line(x, 2*y, legend="2*sin(x)", line_dash=[4, 4], line_color="orange", line_width=2) ...
yashodhank/frappe
refs/heads/develop
frappe/utils/change_log.py
48
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import os import json from semantic_version import Version import frappe from frappe.utils import cstr def get_change_log(user=None): if not user: user = frappe.session.user l...
backmari/moose
refs/heads/devel
python/mooseutils/tests/test_MooseDataFrame.py
8
#!/usr/bin/env python import os import shutil import unittest import time import mooseutils class TestMooseDataFrame(unittest.TestCase): """ Test use of MooseDataFrame for loading/reloading csv files. """ def setUp(self): """ Define the test filename. """ self._filename...
bOOm-X/spark
refs/heads/master
examples/src/main/python/mllib/sampled_rdds.py
85
# # 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...
leonardowolf/bookfree
refs/heads/master
flask/lib/python3.5/site-packages/sqlalchemy/ext/orderinglist.py
55
# ext/orderinglist.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """A custom list that manages index/position information for contained elements....
stuntman723/rap-analyzer
refs/heads/master
rap_analyzer/lib/python2.7/site-packages/django/db/models/loading.py
81
import warnings from django.apps import apps from django.utils.deprecation import RemovedInDjango19Warning warnings.warn( "The utilities in django.db.models.loading are deprecated " "in favor of the new application loading system.", RemovedInDjango19Warning, stacklevel=2) __all__ = ('get_apps', 'get_app'...
Microvellum/Fluid-Designer
refs/heads/master
win64-vc/2.78/scripts/presets/cloth/silk.py
8
import bpy bpy.context.cloth.settings.quality = 5 bpy.context.cloth.settings.mass = 0.150 bpy.context.cloth.settings.structural_stiffness = 5 bpy.context.cloth.settings.bending_stiffness = 0.05 bpy.context.cloth.settings.spring_damping = 0 bpy.context.cloth.settings.air_damping = 1
thumbimigwe/echorizr
refs/heads/master
lib/python2.7/site-packages/django/conf/locale/ru/formats.py
1059
# -*- 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 E Y г.' TIME_FORMAT = 'G:i' DAT...
w1ndy/linux
refs/heads/master
tools/perf/scripts/python/event_analyzing_sample.py
4719
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
cafecivet/django_girls_tutorial
refs/heads/master
Lib/site-packages/django/core/servers/basehttp.py
30
""" HTTP server that implements the Python WSGI protocol (PEP 333, rev 1.21). Based on wsgiref.simple_server which is part of the standard library since 2.5. This is a simple server for use in testing or debugging Django apps. It hasn't been reviewed for security issues. DON'T USE IT FOR PRODUCTION USE! """ from __f...
zhjunlang/kbengine
refs/heads/master
kbe/src/lib/python/Lib/distutils/tests/test_build_scripts.py
118
"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution from distutils import sysconfig from distutils.tests import support from test.support import run_unittest class BuildScriptsTestCase(support.T...
bogdal/django-payments
refs/heads/master
payments/paypal/tests.py
3
from __future__ import unicode_literals from decimal import Decimal import json from unittest import TestCase from . import PaypalProvider from .. import PurchasedItem CLIENT_ID = 'abc123' PAYMENT_TOKEN = '5a4dae68-2715-4b1e-8bb2-2c2dbe9255f6' SECRET = '123abc' VARIANT = 'wallet' class Payment(object): id = 1...
belmiromoreira/nova
refs/heads/master
nova/scheduler/filters/utils.py
41
# 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 or agreed to in...
DualSpark/ansible
refs/heads/devel
v1/ansible/color.py
134
# (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...