repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
lewisc/spark-tk
refs/heads/master
python/sparktk/models/dimreduction/pca.py
13
# vim: set encoding=utf-8 # Copyright (c) 2016 Intel Corporation  # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # #       http://www.apache.org/licenses/LICENSE-2.0 # # Unless require...
shaileshgoogler/pyglet
refs/heads/master
contrib/layout/layout/gl/device.py
29
#!/usr/bin/env python ''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id$' from ctypes import * import re from pyglet.gl import * import pyglet.font from layout.base import * from layout.frame import * from layout.locator import * from pyglet import image class GLRenderDevice(RenderDevice): _stock...
meteorcloudy/tensorflow
refs/heads/master
tensorflow/contrib/autograph/converters/decorators_test.py
6
# 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...
eviljeff/zamboni
refs/heads/master
mkt/abuse/models.py
1
import logging from django.conf import settings from django.db import models from mkt.site.mail import send_mail from mkt.site.models import ModelBase from mkt.users.models import UserProfile from mkt.webapps.models import Webapp from mkt.websites.models import Website log = logging.getLogger('z.abuse') class Abu...
jfmartinez64/test
refs/heads/master
libs/rsa/bigfile.py
196
# -*- coding: utf-8 -*- # # Copyright 2011 Sybren A. Stüvel <sybren@stuvel.eu> # # 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 # # Unl...
0312birdzhang/opencc-for-sailfish
refs/heads/master
deps/gtest-1.7.0/test/gtest_break_on_failure_unittest.py
2140
#!/usr/bin/env python # # Copyright 2006, 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...
AgrAlert/AgrAlert_Backend
refs/heads/master
lib/python2.7/site-packages/werkzeug/contrib/sessions.py
295
# -*- coding: utf-8 -*- r""" werkzeug.contrib.sessions ~~~~~~~~~~~~~~~~~~~~~~~~~ This module contains some helper classes that help one to add session support to a python WSGI application. For full client-side session storage see :mod:`~werkzeug.contrib.securecookie` which implements a secure,...
follow99/django
refs/heads/master
tests/template_tests/filter_tests/test_wordcount.py
521
from django.template.defaultfilters import wordcount from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import setup class WordcountTests(SimpleTestCase): @setup({'wordcount01': '{% autoescape off %}{{ a|wordcount }} {{ b|wordcount }}{% endautoescape %}'}) def ...
ptemplier/ansible
refs/heads/devel
lib/ansible/modules/network/lenovo/cnos_interface.py
26
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Lenovo, 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 # ...
suncycheng/intellij-community
refs/heads/master
python/testData/intentions/SpecifyTypeInPy3AnnotationsIntentionTest/foo_decl_after.py
78
def foo(x, y) -> object: pass
rchicoli/linux
refs/heads/master
tools/perf/scripts/python/call-graph-from-postgresql.py
758
#!/usr/bin/python2 # call-graph-from-postgresql.py: create call-graph from postgresql database # Copyright (c) 2014, Intel Corporation. # # This program is free software; you can redistribute it and/or modify it # under the terms and conditions of the GNU General Public License, # version 2, as published by the Free So...
jackjshin/namebench
refs/heads/master
nb_third_party/dns/namedict.py
248
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
nafex/pyload
refs/heads/stable
module/plugins/hooks/FastixRuHook.py
12
# -*- coding: utf-8 -*- from module.common.json_layer import json_loads from module.plugins.internal.MultiHook import MultiHook class FastixRuHook(MultiHook): __name__ = "FastixRuHook" __type__ = "hook" __version__ = "0.06" __status__ = "testing" __config__ = [("pluginmode" , "all;list...
pmelchior/hydra
refs/heads/master
push_jobs.py
1
#!/bin/env python from os import system from sys import argv import json from time import sleep if len(argv) < 2: print "usage: " + argv[0] + " <job file>" exit(1) def push_to_hosts(config): counter = 0 counting = False sleep_time = 1 try: counting = config['counting'] counter...
wellenvogel/avnav
refs/heads/master
chartconvert/tiler_tools/hdr_pcx_merge.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # 2011-01-27 11:38:30 ############################################################################### # Copyright (c) 2010, Vadim Shlyakhov # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation...
JuniBao/POMOPLAN
refs/heads/master
manage.py
2
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "POMOPLAN.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
lmorchard/badg.us
refs/heads/master
vendor-local/lib/python/chardet/gb2312freq.py
323
######################## 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...
paran0ids0ul/infernal-twin
refs/heads/master
build/pillow/Tests/test_imagefont_bitmap.py
11
from helper import unittest, PillowTestCase from PIL import Image, ImageFont, ImageDraw class TestImageFontBitmap(PillowTestCase): def test_similar(self): text = 'EmbeddedBitmap' font_outline = ImageFont.truetype(font='Tests/fonts/DejaVuSans.ttf', size=24) font_bitmap = ImageFont.truetype(...
nirmeshk/oh-mainline
refs/heads/master
vendor/packages/requests/requests/packages/chardet/universaldetector.py
1775
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
EE/bestja
refs/heads/master
addons/bestja_volunteer/models.py
2
# -*- coding: utf-8 -*- import re from itertools import izip from lxml import etree from openerp import models, fields, api, exceptions, SUPERUSER_ID from openerp.addons.auth_signup.res_users import SignupError from openerp.addons.base.res.res_users import res_users class VolunteerWish(models.Model): _name = 'v...
Exgibichi/statusquo
refs/heads/0.15
contrib/seeds/makeseeds.py
1
#!/usr/bin/env python3 # Copyright (c) 2013-2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Generate seeds.txt from Pieter's DNS seeder # NSEEDS=512 MAX_SEEDS_PER_ASN=2 MIN_BLOCKS = 337600 #...
mdaniel/intellij-community
refs/heads/master
python/testData/completion/alias.after.py
83
import datetime as timedate timedate
tai/python-ucdev
refs/heads/master
bin/mpu6050-test.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import print_function import os import sys import time from struct import pack, unpack from argparse import ArgumentParser from ucdev.cy7c65211 import CyUSBSerial, CyI2C from ucdev.mpu6050 import * from IPython import embed import logging log = logging...
logmatic/logmatic-python
refs/heads/master
logmatic/__init__.py
1
import logging.handlers from pythonjsonlogger import jsonlogger import datetime import ssl class JsonFormatter(jsonlogger.JsonFormatter, object): def __init__(self, fmt="%(asctime) %(name) %(processName) %(filename) %(funcName) %(levelname) %(lineno) %(module) %(threadName) %(message)", ...
rdo-management/neutron
refs/heads/mgt-master
neutron/tests/unit/agent/linux/test_polling.py
2
# Copyright 2013 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. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
40223101/2015cd_midterm
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/webbrowser.py
735
from browser import window __all__ = ["Error", "open", "open_new", "open_new_tab"] class Error(Exception): pass _target = { 0: '', 1: '_blank', 2: '_new' } # hack... def open(url, new=0, autoraise=True): """ new window or tab is not controllable on the client side. autoraise not available. ""...
JohnDenker/brython
refs/heads/master
scripts/javascript_minifier.py
14
"""Javascript minifier""" import re def minify(src): _res, pos = '', 0 while pos < len(src): if src[pos] in ('"', "'") or \ (src[pos]=='/' and src[pos-1]=='('): # the end of the string is the next quote if it is not # after an odd number of backslashes ...
YangChihWei/w16b_test
refs/heads/master
static/Brython3.1.1-20150328-091302/Lib/pydoc_data/topics.py
694
# -*- coding: utf-8 -*- # Autogenerated by Sphinx on Sat Mar 23 15:42:31 2013 topics = {'assert': '\nThe ``assert`` statement\n************************\n\nAssert statements are a convenient way to insert debugging assertions\ninto a program:\n\n assert_stmt ::= "assert" expression ["," expression]\n\nThe simple form,...
mrknow/filmkodi
refs/heads/master
script.mrknow.urlresolver/lib/urlresolver9/plugins/lib/jsunpack.py
67
""" urlresolver XBMC Addon Copyright (C) 2013 Bstrdsmkr 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....
reingart/pyfpdf
refs/heads/master
fpdf/__init__.py
24
#!/usr/bin/env python # -*- coding: utf-8 -*- "FPDF for python" __license__ = "LGPL 3.0" __version__ = "1.7.2" from .fpdf import FPDF, FPDF_FONT_DIR, FPDF_VERSION, SYSTEM_TTFONTS, set_global, FPDF_CACHE_MODE, FPDF_CACHE_DIR try: from .html import HTMLMixin except ImportError: import warnings warnings.war...
SnabbCo/neutron
refs/heads/master
neutron/services/metering/drivers/__init__.py
252
# Copyright (C) 2013 eNovance SAS <licensing@enovance.com> # # Author: Sylvain Afchain <sylvain.afchain@enovance.com> # # 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.apach...
m1ssou/zulip
refs/heads/master
docs/conf.py
121
# -*- coding: utf-8 -*- # # zulip-contributor-docs documentation build configuration file, created by # sphinx-quickstart on Mon Aug 17 16:24:04 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 # autogenera...
chimeno/wagtail
refs/heads/master
wagtail/wagtailsearch/migrations/0001_initial.py
37
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('wagtailcore', '0002_initial_data'), ] operations = [ migrations.CreateModel( name='EditorsPick', fie...
lmallin/coverage_test
refs/heads/master
python_venv/lib/python2.7/site-packages/numpy/distutils/fcompiler/pg.py
167
# http://www.pgroup.com from __future__ import division, absolute_import, print_function from numpy.distutils.fcompiler import FCompiler from sys import platform compilers = ['PGroupFCompiler'] class PGroupFCompiler(FCompiler): compiler_type = 'pg' description = 'Portland Group Fortran Compiler' version...
eXcomm/cjdns
refs/heads/master
node_build/dependencies/libuv/build/gyp/test/hello/gyptest-regyp.py
268
#!/usr/bin/env python # Copyright (c) 2012 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. """ Verifies that Makefiles get rebuilt when a source gyp file changes. """ import TestGyp # Regenerating build files when a gyp file chan...
firebitsbr/raspberry_pwn
refs/heads/master
src/pentest/metagoofil/extractors/metadataExtractor.py
24
#!/usr/bin/env python import sys, re, os, subprocess class metaExtractor: def __init__(self,fname): self.fname=fname self.command="extract" #If any error put the full path self.data="" self.paths=[] self.users=[] def runExtract(self): comm=self.command+" "+self.fname try: process = subprocess.Pope...
wli/django-allauth
refs/heads/master
allauth/socialaccount/providers/stripe/views.py
9
import requests from allauth.socialaccount.providers.oauth2.views import (OAuth2Adapter, OAuth2LoginView, OAuth2CallbackView) from .provider import StripeProvider class StripeOAuth2Adapter(OAuth2Adapte...
osvalr/odoo
refs/heads/8.0
addons/gamification/__openerp__.py
299
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
schoolie/bokeh
refs/heads/master
bokeh/application/handlers/server_lifecycle.py
13
from __future__ import absolute_import, print_function import codecs import os from .handler import Handler from .code_runner import _CodeRunner from bokeh.util.callback_manager import _check_callback def _do_nothing(ignored): pass class ServerLifecycleHandler(Handler): """ Load a script which contains ser...
dhermes/gcloud-python
refs/heads/master
ndb/tests/unit/__init__.py
239
# Copyright 2018 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
gymnasium/edx-platform
refs/heads/open-release/hawthorn.master
openedx/core/djangoapps/content/block_structure/tests/test_tasks.py
25
""" Unit tests for the Course Blocks tasks """ from mock import patch from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase from ..tasks import update_course_in_cache_v2 class UpdateCourseInCacheTaskTest(ModuleStoreTestCase): """ Ensures that the update_course_in_cache task runs as expecte...
LimMingXuan/minefreedom-discord
refs/heads/master
node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/easy_xml_test.py
2698
#!/usr/bin/env python # Copyright (c) 2011 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. """ Unit tests for the easy_xml.py file. """ import gyp.easy_xml as easy_xml import unittest import StringIO class TestSequenceFunctions(...
zdohnal/system-config-printer
refs/heads/master
test_PhysicalDevice.py
4
#!/usr/bin/python3 ## Copyright (C) 2015 Red Hat, Inc. ## Authors: ## Tim Waugh <twaugh@redhat.com> ## 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 2 of the License, or ## (...
BORETS24/Zenfone-2-500CL
refs/heads/master
linux/kernel/tools/perf/scripts/python/failed-syscalls-by-pid.py
11180
# failed system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gangadharkadam/tailorfrappe
refs/heads/master
frappe/utils/fixtures.py
10
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, os from frappe.core.page.data_import_tool.data_import_tool import import_doc, export_fixture, export_csv def sync_fixtures(app=None): if app: apps = [app] ...
mogoweb/chromium-crosswalk
refs/heads/master
tools/telemetry/telemetry/core/platform/profiler/trace_profiler.py
1
# 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. import codecs from telemetry.core.platform import profiler class TraceProfiler(profiler.Profiler): def __init__(self, browser_backend, platform_backend...
BumblingBunny/ImageServer
refs/heads/master
Server/ImageServer/PlugDHandler.py
1
import os import time from PlugD import PlugD from ImageAnnotator import PlugIcon from StringIO import StringIO from Sensors import hum_tem class PlugDHandler(object): def __init__(self): self.plug = PlugD() def html(self): html = os.path.expanduser("~/.plug/toggle_index.html") if not...
thisispuneet/potato-blog
refs/heads/master
django/contrib/flatpages/models.py
410
from django.db import models from django.contrib.sites.models import Site from django.utils.translation import ugettext_lazy as _ class FlatPage(models.Model): url = models.CharField(_('URL'), max_length=100, db_index=True) title = models.CharField(_('title'), max_length=200) content = models.TextField(_(...
arcivanov/pybuilder
refs/heads/master
src/integrationtest/python/smoke_setup_tests.py
3
# -*- coding: utf-8 -*- # # This file is part of PyBuilder # # Copyright 2011-2020 PyBuilder Team # # 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/l...
marratj/ansible
refs/heads/devel
lib/ansible/plugins/action/nxos.py
14
# # (c) 2016 Red Hat Inc. # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is d...
bmaggard/luigi
refs/heads/master
luigi/scheduler.py
1
# -*- 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...
cmu-db/db-webcrawler
refs/heads/master
core/deployers/nodedeployer.py
2
import os, sys sys.path.append(os.path.join(os.path.dirname(__file__), os.pardir)) import logging import re import time from basedeployer import BaseDeployer from library.models import * import utils ## ===================================================================== ## LOGGING CONFIGURATION ## ================...
outcastgeek/mal
refs/heads/master
rpython/core.py
32
#import copy, time import time import mal_types as types from mal_types import (throw_str, MalType, MalMeta, nil, true, false, MalInt, MalSym, MalStr, MalList, MalVector, MalHashMap, MalAtom, MalFunc) import mal_readline import...
newsteinking/docker-registry
refs/heads/master
docker_registry/lib/rqueue.py
35
# -*- coding: utf-8 -*- # this module is a slight modification of Ted Nyman's QR # https://raw.github.com/tnm/qr/master/qr.py import logging from docker_registry.core import compat json = compat.json class NullHandler(logging.Handler): """A logging handler that discards all logging records.""" def emit(sel...
jitendra29/servo
refs/heads/master
tests/wpt/web-platform-tests/tools/pywebsocket/src/example/echo_wsh.py
494
# Copyright 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 f...
ajhager/copycat
refs/heads/master
lib/pyglet/window/xlib/__init__.py
1
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
w1ll1am23/home-assistant
refs/heads/dev
homeassistant/components/daikin/climate.py
16
"""Support for the Daikin HVAC.""" import logging import voluptuous as vol from homeassistant.components.climate import PLATFORM_SCHEMA, ClimateEntity from homeassistant.components.climate.const import ( ATTR_FAN_MODE, ATTR_HVAC_MODE, ATTR_PRESET_MODE, ATTR_SWING_MODE, HVAC_MODE_COOL, HVAC_MOD...
pedro2d10/SickRage-FR
refs/heads/develop
lib/cachecontrol/adapter.py
59
import functools from requests.adapters import HTTPAdapter from .controller import CacheController from .cache import DictCache from .filewrapper import CallbackFileWrapper class CacheControlAdapter(HTTPAdapter): invalidating_methods = set(['PUT', 'DELETE']) def __init__(self, cache=None, ...
glenndmello/luigi
refs/heads/master
luigi/worker.py
1
# -*- 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...
audibleblink/atreus-firmware
refs/heads/master
tmk/tmk_core/tool/mbed/mbed-sdk/workspace_tools/host_tests/host_tests_plugins/module_copy_mps2.py
30
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
Hernanarce/pelisalacarta
refs/heads/master
python/main-classic/lib/btserver/cache.py
4
# -*- coding: utf-8 -*- # ------------------------------------------------------------ # pelisalacarta 4 # Copyright 2015 tvalacarta@gmail.com # http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/ # # Distributed under the terms of GNU General Public License v3 (GPLv3) # http://www.gnu.org/licenses/gpl-3.0.html # --...
Dino0631/RedRain-Bot
refs/heads/develop
lib/youtube_dl/__main__.py
90
#!/usr/bin/env python from __future__ import unicode_literals # Execute with # $ python youtube_dl/__main__.py (2.6+) # $ python -m youtube_dl (2.7+) import sys if __package__ is None and not hasattr(sys, 'frozen'): # direct call of __main__.py import os.path path = os.path.realpath(os.path.absp...
xiao26/scrapy
refs/heads/master
tests/test_proxy_connect.py
130
import json import os import time from threading import Thread from libmproxy import controller, proxy from netlib import http_auth from testfixtures import LogCapture from twisted.internet import defer from twisted.trial.unittest import TestCase from scrapy.utils.test import get_crawler from scrapy.http import Reque...
chjw8016/GreenOdoo7-haibao
refs/heads/master
openerp/addons/mail/wizard/__init__.py
438
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
sonali0901/zulip
refs/heads/master
zerver/webhooks/crashlytics/tests.py
31
# -*- coding: utf-8 -*- from zerver.lib.test_classes import WebhookTestCase class CrashlyticsHookTests(WebhookTestCase): STREAM_NAME = 'crashlytics' URL_TEMPLATE = u"/api/v1/external/crashlytics?stream={stream}&api_key={api_key}" FIXTURE_DIR_NAME = 'crashlytics' def test_crashlytics_verification_messa...
sjfloat/youtube-dl
refs/heads/master
youtube_dl/extractor/byutv.py
102
from __future__ import unicode_literals import json import re from .common import InfoExtractor from ..utils import ExtractorError class BYUtvIE(InfoExtractor): _VALID_URL = r'^https?://(?:www\.)?byutv.org/watch/[0-9a-f-]+/(?P<video_id>[^/?#]+)' _TEST = { 'url': 'http://www.byutv.org/watch/6587b9a3-...
varunr047/homefile
refs/heads/dev
homeassistant/components/light/wink.py
6
""" Support for Wink lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.wink/ """ import colorsys from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_COLOR_TEMP, ATTR_RGB_COLOR, SUPPORT_BRIGHTNESS, SUPPORT_COLOR_TEMP, SU...
tridge/MAVProxy
refs/heads/master
MAVProxy/modules/mavproxy_serial.py
24
#!/usr/bin/env python '''serial_control MAVLink handling''' import time, os, fnmatch, sys from pymavlink import mavutil, mavwp from MAVProxy.modules.lib import mp_settings from MAVProxy.modules.lib import mp_module class SerialModule(mp_module.MPModule): def __init__(self, mpstate): super(SerialModule, se...
mosbasik/buzhug
refs/heads/master
javasrc/lib/Jython/Lib/test/test_time.py
9
from test import test_support import time import unittest class TimeTestCase(unittest.TestCase): def setUp(self): self.t = time.time() def test_data_attributes(self): time.altzone time.daylight time.timezone time.tzname def test_clock(self): time.clock() ...
jelugbo/hebs_master
refs/heads/master
lms/djangoapps/shoppingcart/migrations/0002_auto__add_field_paidcourseregistration_mode.py
182
# -*- 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): # Adding field 'PaidCourseRegistration.mode' db.add_column('shoppingcart_paidcourseregistration', 'mode', ...
elena/card-task
refs/heads/master
card-tasks/reijo/settings.py
2
""" Django settings for reijo project. For more information on this file, see https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) impo...
obi-two/Rebelion
refs/heads/master
data/scripts/templates/object/tangible/ship/components/weapon_capacitor/shared_cap_rss_imperial_1.py
2
#### NOTICE: THIS FILE IS AUTOGENERATED #### MODIFICATIONS MAY BE LOST IF DONE IMPROPERLY #### PLEASE SEE THE ONLINE DOCUMENTATION FOR EXAMPLES from swgpy.object import * def create(kernel): result = Tangible() result.template = "object/tangible/ship/components/weapon_capacitor/shared_cap_rss_imperial_1.iff" res...
Bloodyaugust/sugarlabcppboilerplate
refs/heads/master
lib/boost/libs/python/pyste/src/Pyste/policies.py
13
# Copyright Bruno da Silva de Oliveira 2003. Use, modification and # distribution is subject to the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) class Policy(object): 'Represents one of the call policies of boost.python...
moniqx4/bite-project
refs/heads/master
deps/gdata-python-client/src/gdata/Crypto/PublicKey/__init__.py
273
"""Public-key encryption and signature algorithms. Public-key encryption uses two different keys, one for encryption and one for decryption. The encryption key can be made public, and the decryption key is kept private. Many public-key algorithms can also be used to sign messages, and some can *only* be used for sig...
mmnelemane/nova
refs/heads/master
nova/tests/unit/objects/test_image_meta.py
21
# Copyright 2014 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. 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, ...
TripleDogDare/RadioWCSpy
refs/heads/master
env/lib/python2.7/site-packages/pip/utils/outdated.py
102
from __future__ import absolute_import import datetime import errno import json import logging import os.path import sys from pip._vendor import lockfile from pip._vendor import pkg_resources from pip.compat import total_seconds from pip.index import PyPI from pip.locations import USER_CACHE_DIR, running_under_virtu...
18padx08/PPTex
refs/heads/master
PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/printing/gtk.py
117
from __future__ import print_function, division from sympy.printing.mathml import mathml import tempfile import os def print_gtk(x, start_viewer=True): """Print to Gtkmathview, a gtk widget capable of rendering MathML. Needs libgtkmathview-bin""" from sympy.utilities.mathml import c2p tmp = tempfil...
Liyier/learning_log
refs/heads/master
env/Lib/site-packages/django/contrib/redirects/admin.py
472
from django.contrib import admin from django.contrib.redirects.models import Redirect @admin.register(Redirect) class RedirectAdmin(admin.ModelAdmin): list_display = ('old_path', 'new_path') list_filter = ('site',) search_fields = ('old_path', 'new_path') radio_fields = {'site': admin.VERTICAL}
dims/nova
refs/heads/master
nova/tests/unit/virt/xenapi/stubs.py
10
# Copyright (c) 2010 Citrix Systems, 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 la...
Jesus89/apio
refs/heads/develop
test/env_commands/test_boards.py
3
from apio.commands.boards import cli as cmd_boards def test_boards(clirunner, validate_cliresult): result = clirunner.invoke(cmd_boards) validate_cliresult(result) def test_boards_list(clirunner, validate_cliresult): result = clirunner.invoke(cmd_boards, ['--list']) validate_cliresult(result) def ...
sirex/Misago
refs/heads/master
misago/users/forms/modusers.py
8
from datetime import timedelta from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _, ungettext from django.utils import timezone from misago.conf import settings from misago.core import forms from misago.users.bans import ban_user class WarnUserForm(forms.Form): ...
clarko1/Cramd
refs/heads/master
appengine/standard/mail/handle_incoming_email_test.py
9
# Copyright 2016 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...
rigrassm/NZBandwidth
refs/heads/master
nzbandwidth/run.py
1
import daemon import logging import configparser from nzbandwidth import monitor if __name__ == '__main__': # Get configurations Config = configparser.ConfigParser() Config.read('config.ini') log_file = open(Config.get('nzbandwidth', 'log_file'), 'w') log_level = Config.get('nzbandwidth', 'log_le...
liulion/mayavi
refs/heads/master
examples/mayavi/mlab/protein.py
4
""" Visualize a protein graph structure downloaded from the protein database in standard pdb format. We parse the pdb file, but extract only a very small amount of information: the type of atoms, their positions, and the links between them. Most of the complexity of this example comes from the code turning the PDB in...
sam-m888/gprime
refs/heads/master
gprime/plugins/textreport/alphabeticalindex.py
1
# gPrime - A web-based genealogy program # # Copyright (C) 2012 Nick Hall # Copyright (C) 2012 Brian G. Matherly # Copyright (C) 2012-2014 Paul Franklin # # 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...
m1ck/bookadoptions
refs/heads/master
django/db/backends/mysql/creation.py
311
from django.db.backends.creation import BaseDatabaseCreation class DatabaseCreation(BaseDatabaseCreation): # This dictionary maps Field objects to their associated MySQL column # types, as strings. Column-type strings can contain format strings; they'll # be interpolated against the values of Field.__dict_...
supersven/intellij-community
refs/heads/master
python/testData/copyPaste/multiLine/IndentWithEmptyLine.dst.py
83
def foo(): if True: a = 1 <caret>
moijes12/oh-mainline
refs/heads/master
vendor/packages/docutils/docutils/readers/__init__.py
170
# $Id: __init__.py 7648 2013-04-18 07:36:22Z milde $ # Authors: David Goodger <goodger@python.org>; Ueli Schlaepfer # Copyright: This module has been placed in the public domain. """ This package contains Docutils Reader modules. """ __docformat__ = 'reStructuredText' import sys from docutils import utils, parsers,...
douwevandermeij/django-rest-framework
refs/heads/master
tests/test_serializer_nested.py
36
from django.http import QueryDict from rest_framework import serializers class TestNestedSerializer: def setup(self): class NestedSerializer(serializers.Serializer): one = serializers.IntegerField(max_value=10) two = serializers.IntegerField(max_value=10) class TestSerial...
RohitDas/cubeproject
refs/heads/master
lib/django/contrib/flatpages/views.py
475
from django.conf import settings from django.contrib.flatpages.models import FlatPage from django.contrib.sites.shortcuts import get_current_site from django.http import Http404, HttpResponse, HttpResponsePermanentRedirect from django.shortcuts import get_object_or_404 from django.template import loader from django.uti...
kernc/networkx
refs/heads/master
networkx/algorithms/community/tests/test_kclique.py
94
#!/usr/bin/env python from nose.tools import * import networkx as nx from itertools import combinations from networkx import k_clique_communities def test_overlaping_K5(): G = nx.Graph() G.add_edges_from(combinations(range(5), 2)) # Add a five clique G.add_edges_from(combinations(range(2,7), 2)) # Add anot...
coolblaze03/WSNNS3Port
refs/heads/master
src/applications/bindings/callbacks_list.py
331
callback_classes = [ ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', 'ns3::Address const&', 'ns3::Address const&', 'ns3::NetDevice::PacketType', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['bool', 'ns3::Ptr<ns3::NetDevice>', 'ns3::Ptr<ns3::Packet const>', 'unsigned short', ...
kittiu/sale-workflow
refs/heads/10.0
product_special_type_sale/sale.py
33
# -*- coding: utf-8 -*- # # # Author: Guewen Baconnier # Copyright 2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License...
zhuangshi23/muduo
refs/heads/master
examples/wordcount/slowsink.py
59
#!/usr/bin/python import os, socket, sys, time host = '' port = 2007 if len(sys.argv) > 1: mps = float(sys.argv[1]) else: mps = 1.0 bps = mps * 1000000 BUFSIZE = int(bps/10) # sleep 100ms at full speed print "Mbytes/s =", mps if len(sys.argv) > 3: host = sys.argv[2] port = int(sys.argv[3]) print "connecting t...
agidex/book_tools
refs/heads/master
CLI/pack/pack.py
1
def print_pack(pages, ppack): start = 1 finish = ppack i = 1 print('PAIRS: ') with open('packs.txt', 'w') as pf: while finish < pages + 1: s = '#{:<2} {:>3}-{:<3}'.format(i, start,finish) print(s) pf.write('%s\n'%(s)) i += 1 star...
m-lab/mlab-ns
refs/heads/master
server/mlabns/util/util.py
1
import json import os import jinja2 from mlabns.util import message def _get_jinja_environment(): current_dir = os.path.dirname(__file__) templates_dir = os.path.join(current_dir, '../templates') return jinja2.Environment(loader=jinja2.FileSystemLoader(templates_dir), exten...
Tehsmash/nova
refs/heads/master
nova/api/openstack/compute/contrib/cells.py
31
# Copyright 2011-2012 OpenStack Foundation # All Rights Reserved. # Copyright 2013 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. You may obtain # a copy of the License at # # http://www.apache.org/lic...
maxdm07/node-gyp
refs/heads/master
gyp/pylib/gyp/MSVSSettings_test.py
778
#!/usr/bin/env python # Copyright (c) 2012 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. """Unit tests for the MSVSSettings.py file.""" import StringIO import unittest import gyp.MSVSSettings as MSVSSettings class TestSequence...
tumbl3w33d/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_vpc_nat_gateway_info.py
13
#!/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'], ...
takis/odoo
refs/heads/8.0
addons/account_bank_statement_extensions/wizard/confirm_statement_line.py
381
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # # Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved. # # This program is free software: you can redistribute it and/or modify # it under ...