repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
jgelens/AutobahnTestSuite
refs/heads/master
autobahntestsuite/autobahntestsuite/case/case5_4.py
14
############################################################################### ## ## Copyright 2011 Tavendo GmbH ## ## 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...
jamestwebber/scipy
refs/heads/master
scipy/io/matlab/tests/test_mio5_utils.py
25
""" Testing mio5_utils Cython module """ from __future__ import division, print_function, absolute_import import sys from io import BytesIO cStringIO = BytesIO import numpy as np from numpy.testing import assert_array_equal, assert_equal, assert_ from pytest import raises as assert_raises from scipy._lib.six impo...
qingkaikong/useful_script
refs/heads/master
python/plot_util.py
1
import matplotlib.pyplot as plt import numpy as np def plot_stations_fromFile(station_loc, evla = None, evlo = None, llat = 37, ulat = 39, llon = -123.5, ulon = -121.5, figsize = (8, 8), resolution = 'l', mer = (-123.5, -121, 1), par = (37, 39.5, 1), **kwargs): lats, lons = [], [] dt = dict...
kingvuplus/nn-gui
refs/heads/master
lib/python/Components/TimerSanityCheck.py
8
import NavigationInstance from time import localtime, mktime, gmtime from ServiceReference import ServiceReference from enigma import iServiceInformation, eServiceCenter, eServiceReference from timer import TimerEntry class TimerSanityCheck: def __init__(self, timerlist, newtimer=None): print "sanitycheck" self.l...
subramani95/neutron
refs/heads/master
neutron/plugins/ml2/drivers/mech_hyperv.py
26
# Copyright (c) 2013 OpenStack Foundation # 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 ...
sk413025/thug
refs/heads/master
src/Logging/modules/MITRE/__init__.py
6
import MAEC11
misdoro/python-ase
refs/heads/master
ase/test/atoms_distance.py
3
from ase import Atoms # Setup a chain of H,O,C # H-O Dist = 2 # O-C Dist = 3 # C-H Dist = 5 with mic=False # C-H Dist = 4 with mic=True a = Atoms('HOC', positions=[(1, 1, 1), (3, 1, 1), (6, 1, 1)]) a.set_cell((9, 2, 2)) a.set_pbc((True, False, False)) # Calculate indiviually with mic=True assert a.get_distance(0, 1,...
androidarmv6/android_external_chromium_org
refs/heads/cm-11.0
tools/telemetry/telemetry/core/user_agent.py
51
# 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. UA_TYPE_MAPPING = { 'desktop': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) ' 'AppleWebKit/537.22 (KHTML, like Gecko) ' 'Chrome/27...
0k/OpenUpgrade
refs/heads/8.0
addons/project_timesheet/report/__init__.py
441
# -*- 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...
BondAnthony/ansible
refs/heads/devel
test/units/ansible_test/ci/test_shippable.py
27
from __future__ import (absolute_import, division, print_function) __metaclass__ = type from .util import common_auth_test def test_auth(): # noinspection PyProtectedMember from ansible_test._internal.ci.shippable import ( ShippableAuthHelper, ) class TestShippableAuthHelper(ShippableAuthHel...
brett-patterson/pyface
refs/heads/master
pyface/tasks/action/schema.py
2
# Enthought library imports. from pyface.action.api import Action, ActionItem, Group, \ MenuManager, MenuBarManager, ToolBarManager from pyface.util.id_helper import get_unique_id from traits.api import Bool, Callable, Enum, HasTraits, Instance, \ List, Property, Str, Trait, Tuple, Unicode # Trait definition...
sim9108/SDKS
refs/heads/master
LibOpenCv/opencv_core/src/opencl/runtime/generator/common.py
10
import sys, os, re # # Parser helpers # def remove_comments(s): def replacer(match): s = match.group(0) if s.startswith('/'): return "" else: return s pattern = re.compile( r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"', re.DOTALL | r...
mortonjt/scipy
refs/heads/master
scipy/integrate/tests/test_integrate.py
53
# Authors: Nils Wagner, Ed Schofield, Pauli Virtanen, John Travers """ Tests for numerical integration. """ from __future__ import division, print_function, absolute_import import numpy as np from numpy import (arange, zeros, array, dot, sqrt, cos, sin, eye, pi, exp, allclose) from scipy._lib.six i...
Kagee/youtube-dl
refs/heads/master
youtube_dl/extractor/mpora.py
175
from __future__ import unicode_literals from .common import InfoExtractor from ..utils import int_or_none class MporaIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?mpora\.(?:com|de)/videos/(?P<id>[^?#/]+)' IE_NAME = 'MPORA' _TEST = { 'url': 'http://mpora.de/videos/AAdo8okx4wiz/embed?locale...
ravenland/ycmWinRepo
refs/heads/master
third_party/ycmd/third_party/bottle/test/tools.py
43
# -*- coding: utf-8 -*- import bottle import sys import unittest import wsgiref import wsgiref.util import wsgiref.validate import mimetypes import uuid from bottle import tob, tonat, BytesIO, py3k, unicode def warn(msg): sys.stderr.write('WARNING: %s\n' % msg.strip()) def tobs(data): ''' Transforms bytes o...
genome21/dcos-cli
refs/heads/master
dcos/emitting.py
2
from __future__ import print_function import abc import collections import json import os import pydoc import re import sys import pager import pygments import six from dcos import constants, errors, util from pygments.formatters import Terminal256Formatter from pygments.lexers import JsonLexer logger = util.get_log...
agrc/agrc.github.io
refs/heads/master
scripts/gdoc-find.py
2
#!/usr/bin/env python # * coding: utf8 * ''' email.py A module that finds all of the unique email addresses in our website ''' import re import sys from os import path from os import walk known_extensions = ['.html', '.htm', '.md'] pattern = r'(:\/\/docs.google.com.*?)[\"|\'|>|\]|\)]' def one_offs(walk_dir): th...
oscaro/django-o18n
refs/heads/master
o18n/country.py
1
from contextlib import contextmanager from threading import local from . import util _country = local() def get_country(): """Return the currently selected country or None.""" try: return _country.value except AttributeError: return None def activate(country): """Select the countr...
doge-search/webdoge
refs/heads/master
liqian/umich/scrap_professors.py
1
#!/usr/bin/python #coding=utf-8 import urllib2 import HTMLParser import sys import xml.dom.minidom as minidom from htmlentitydefs import entitydefs import glob reload(sys) sys.setdefaultencoding('utf-8') class MyParser(HTMLParser.HTMLParser): def __init__(self): HTMLParser.HTMLParser.__init__(self) self.hasname =...
grow/grow
refs/heads/dependabot/npm_and_yarn/grow/ui/postcss-7.0.36
grow/extensions/core/node_extension.py
2
"""Node core extension.""" from grow import extensions from grow.extensions import hooks class NodeDevFileChangeHook(hooks.DevFileChangeHook): """Handle the dev file change hook.""" # pylint: disable=arguments-differ def trigger(self, previous_result, pod_path, *_args, **_kwargs): """Trigger the...
WebReply/django-photologue
refs/heads/master
photologue/__init__.py
18
VERSION = (2, 3)
carlvlewis/bokeh
refs/heads/master
examples/compat/ggplot/line.py
34
from ggplot import aes, geom_line, ggplot, meat import matplotlib.pyplot as plt from bokeh import mpl from bokeh.plotting import output_file, show g = ggplot(aes(x='date', y='beef'), data=meat) + geom_line() g.draw() plt.title("Line ggplot-based plot in Bokeh.") output_file("line.html") show(mpl.to_bokeh())
TheSeven/p2pool
refs/heads/master
nattraverso/utils.py
288
""" Various utility functions used in the nattraverso package. @author: Raphael Slinckx @copyright: Copyright 2005 @license: LGPL @contact: U{raphael@slinckx.net<mailto:raphael@slinckx.net>} @version: 0.1.0 """ __revision__ = "$id" def is_rfc1918_ip(ip): """ Checks if the given ip address is a rfc1918 one. ...
deeperic/SpikeFlow
refs/heads/master
tf/helper.py
1
#!/usr/bin/env python # -*- coding: UTF-8 -*- # deeperic char_list = ['cheung', 'chin2', 'chiu', 'cup', 'ho', 'ka', 'ma', 'sheung', 'shi', 'yi', 'sin', 'ngou', 'lai'] char_list_chinese = ['場', '錢', '超', '級', '號', '卡', '碼', '賞', '市', '易', '鮮', '牛', '奶']
MrSenko/Nitrate
refs/heads/develop
tcms/xmlrpc/api/version.py
2
# -*- coding: utf-8 -*- from tcms.xmlrpc.decorators import log_call from tcms.xmlrpc import get_version __all__ = ( 'get', ) __xmlrpc_namespace__ = 'Version' @log_call(namespace=__xmlrpc_namespace__) def get(request): ''' Description: Retrieve XMLRPC's version Params: No parameters. Retu...
pschmitt/home-assistant
refs/heads/dev
tests/components/vera/test_sensor.py
6
"""Vera tests.""" from typing import Any, Callable, Tuple import pyvera as pv from homeassistant.const import UNIT_PERCENTAGE from homeassistant.core import HomeAssistant from .common import ComponentFactory, new_simple_controller_config from tests.async_mock import MagicMock async def run_sensor_test( hass: ...
lordkman/burnman
refs/heads/master
contrib/CHRU2014/__init__.py
50
# intentionally left empty
mark-me/Pi-Jukebox
refs/heads/master
venv/Lib/site-packages/pip-19.0.3-py3.7.egg/pip/_vendor/idna/uts46data.py
63
# This file is automatically generated by tools/idna-data # vim: set fileencoding=utf-8 : """IDNA Mapping Table from UTS46.""" __version__ = "11.0.0" def _seg_0(): return [ (0x0, '3'), (0x1, '3'), (0x2, '3'), (0x3, '3'), (0x4, '3'), (0x5, '3'), (0x6, '3'), (0x7, '3'), (0x8, '3...
ustramooner/zeitgeist-lucenepp
refs/heads/clucene
_zeitgeist/engine/upgrades/core_0_1.py
2
import os import sys import logging import sqlite3 log = logging.getLogger("zeitgeist.sql") INTERPRETATION_RENAMES = \ [ ("http://www.semanticdesktop.org/ontologies/2007/03/22/nfo#SourceCode", "http://www.semanticdesktop.org/ontologies/2007/03/22/nfo/#ManifestationCode"), ("http://www.semanticdesktop.org/ontolo...
nCoda/lychee
refs/heads/main
lychee/converters/tests/abjad_test_case.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- #-------------------------------------------------------------------------------------------------- # Program Name: Lychee # Program Description: MEI document manager for formalized document control # # Filename: lychee/converters/abjad_to_lmei.p...
mariopro/youtube-dl
refs/heads/master
test/test_aes.py
124
#!/usr/bin/env python from __future__ import unicode_literals # Allow direct execution import os import sys import unittest sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from youtube_dl.aes import aes_decrypt, aes_encrypt, aes_cbc_decrypt, aes_decrypt_text from youtube_dl.utils impo...
DarioGT/Zim-QDA
refs/heads/master
zim/plugins/distractionfree.py
1
# -*- coding: utf-8 -*- # Copyright 2012 Jaap Karssenberg <jaap.karssenberg@gmail.com> import gtk import logging from zim.plugins import PluginClass from zim.gui import PATHBAR_NONE, PATHBAR_RECENT logger = logging.getLogger('zim.plugins.distractionfree') _minsize = 300 # prevent pageview from disappearing alto...
mitya57/debian-buildbot
refs/heads/master
buildbot/test/unit/test_steps_package_rpm_mock.py
3
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
akash1808/nova
refs/heads/master
nova/tests/unit/test_cinder.py
55
# Copyright 2011 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
muntasirsyed/intellij-community
refs/heads/master
python/testData/copyPaste/SelectionReverse1.src.py
498
<selection>if True: a = 1 b = 2 </selection> def f(): c = 3
tkasp/OsmHiCheck
refs/heads/master
detect/detect_guideposts.py
1
import cv2 import numpy as np import imutils import argparse import os import json import math from PIL import Image, ExifTags #import pytesseract import csv import sys import time import warnings # Command line parameters handling parser = argparse.ArgumentParser() parser.add_argument("--dir") parser.add_argument("--...
MortalViews/incubator-airflow
refs/heads/master
tests/contrib/operators/test_fs_operator.py
5
# -*- coding: utf-8 -*- # # 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, software ...
siosio/intellij-community
refs/heads/master
python/testData/override/importsForTypeAnnotations1.py
19
from .importsForTypeAnnotations1_import import Foo class Bar(Foo): pass
kofron/bigcouch
refs/heads/master
couchjs/scons/scons-local-2.0.1/SCons/Platform/os2.py
61
"""SCons.Platform.os2 Platform-specific initialization for OS/2 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, 2009, 2010 T...
kabracity/Flexget
refs/heads/develop
tests/test_cached_input.py
22
from __future__ import unicode_literals, division, absolute_import from datetime import timedelta import os from tests import FlexGetBase, with_filecopy from flexget.utils.cached_input import cached from flexget import plugin from flexget.entry import Entry class InputPersist(object): """Fake input plugin to tes...
ReproducibleBuilds/diffoscope
refs/heads/master
tests/test_difference.py
1
# -*- coding: utf-8 -*- # # diffoscope: in-depth comparison of files, archives, and directories # # Copyright © 2015 Jérémy Bobbio <lunar@debian.org> # # diffoscope 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 Foundati...
jeroenj/CouchPotatoServer
refs/heads/master
libs/pyutil/iputil.py
92
# from the Python Standard Library import os, re, socket, sys, subprocess # from Twisted from twisted.internet import defer, threads, reactor from twisted.internet.protocol import DatagramProtocol from twisted.python.procutils import which from twisted.python import log try: import resource def increase_rlimi...
2014c2g12/c2g12
refs/heads/master
wsgi/exts/w2/static/Brython2.0.0-20140209-164925/Lib/xml/dom/pulldom.py
850
import xml.sax import xml.sax.handler START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" PROCESSING_INSTRUCTION = "PROCESSING_INSTRUCTION" IGNORABLE_WHITESPACE = "IGNORABLE_WHITESPACE" CHARACTERS = "CHARACTERS" class PullDOM(...
sugartom/tensorflow-alien
refs/heads/master
tensorflow/contrib/training/python/training/failure_tolerator.py
72
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
hectorip/DIM-web
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/input_test.py
1841
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
CLAV88/FEWD
refs/heads/master
node_modules/node-gyp/gyp/pylib/gyp/input_test.py
1841
#!/usr/bin/env python # Copyright 2013 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Unit tests for the input.py file.""" import gyp.input import unittest import sys class TestFindCycles(unittest.TestCase): def setUp(self...
dmarteau/QGIS
refs/heads/master
python/plugins/MetaSearch/link_types.py
55
# -*- coding: utf-8 -*- ############################################################################### # # MetaSearch Catalog Client # # Copyright (C) 2014 Tom Kralidis (tomkralidis@gmail.com) # # This source is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License...
joshuahoman/vivisect
refs/heads/master
envi/memory.py
1
import re import struct import collections import envi """ A module containing memory utilities and the definition of the memory access API used by all vtoys trace/emulators/workspaces. """ # Memory Map Permission Flags # TODO: move these into envi.const MM_NONE = 0x0 MM_READ = 0x4 MM_WRITE = 0x2 MM_EXEC = 0x1 MM_SH...
JorisBolsens/PYNQ
refs/heads/master
python/pynq/iop/grove_buzzer.py
2
# Copyright (c) 2016, Xilinx, 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: # # 1. Redistributions of source code must retain the above copyright notice, # this list of ...
KodeKracker/Rotto-Links-Scraper
refs/heads/master
setup.py
1
from setuptools import setup, find_packages # Always prefer setuptools over distutils from codecs import open # To use a consistent encoding from os import path import rottoscraper here = path.abspath(path.dirname(__file__)) # Get the long description from the relevant file with open(path.join(here, 'README.md'), e...
r-icarus/openstack_microserver
refs/heads/master
openstack_dashboard/test/test_data/glance_data.py
10
# Copyright 2012 Nebula, 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 agree...
foxmask/dj-diabetes
refs/heads/master
dj_diabetes/views/exercises.py
1
# coding: utf-8 from __future__ import unicode_literals import logging from django.views.generic import CreateView, UpdateView, DeleteView # dj_diabetes from dj_diabetes.models import InitMixin, SuccessMixin, PaginateMixin from dj_diabetes.views import LoginRequiredMixin from dj_diabetes.models.sports import Exercise...
mrtyler/gpii-infra
refs/heads/master
gcp/modules/locust/tasks/flowmanager.py
2
from locust import HttpLocust, TaskSet, task import random class FlowmanagerTasks(TaskSet): _keys = ["carla", "vladimir", "wayne", "omar", "nvda"] @task def post_access_token(self): self.client.post("/access_token", { "username": random.choice(self._keys), "password": "dummy", "cl...
ivanhorvath/openshift-tools
refs/heads/prod
openshift/installer/vendored/openshift-ansible-3.7.42-1/roles/openshift_health_checker/openshift_checks/logging/kibana.py
16
""" Module for performing checks on a Kibana logging deployment """ import json import ssl try: from urllib2 import HTTPError, URLError import urllib2 except ImportError: from urllib.error import HTTPError, URLError import urllib.request as urllib2 from openshift_checks.logging.logging import Logging...
jemekite/p2pool-deepcoin
refs/heads/master
p2pool/work.py
1
from __future__ import division import base64 import random import re import sys import time from twisted.internet import defer from twisted.python import log import bitcoin.getwork as bitcoin_getwork, bitcoin.data as bitcoin_data from bitcoin import helper, script, worker_interface from util import forest, jsonrpc,...
tswast/google-cloud-python
refs/heads/master
websecurityscanner/tests/unit/gapic/v1alpha/test_web_security_scanner_client_v1alpha.py
2
# -*- coding: utf-8 -*- # # Copyright 2019 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...
alxgu/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_compute_target_https_proxy_facts.py
9
#!/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 *** # ...
iradul/qtwebkit
refs/heads/pjs
Tools/Scripts/webkitpy/tool/steps/applywatchlist_unittest.py
124
# 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 f...
MenZil/kuma
refs/heads/master
kuma/core/views.py
29
from django.shortcuts import render def _error_page(request, status): """Render error pages with jinja2.""" return render(request, '%d.html' % status, status=status) handler403 = lambda request: _error_page(request, 403) handler404 = lambda request: _error_page(request, 404) handler500 = lambda request: _err...
dsaraujo/circulante
refs/heads/master
django/contrib/messages/context_processors.py
628
from django.contrib.messages.api import get_messages def messages(request): """ Returns a lazy 'messages' context variable. """ return {'messages': get_messages(request)}
alexmorozov/django
refs/heads/master
django/contrib/auth/decorators.py
356
from functools import wraps from django.conf import settings from django.contrib.auth import REDIRECT_FIELD_NAME from django.core.exceptions import PermissionDenied from django.shortcuts import resolve_url from django.utils import six from django.utils.decorators import available_attrs from django.utils.six.moves.urll...
csrocha/OpenUpgrade
refs/heads/8.0
addons/mass_mailing/models/__init__.py
313
# -*- coding: utf-8 -*- import mass_mailing import mass_mailing_stats import mail_mail import mail_thread import res_config import mass_mailing_report
yangfl/sudoku
refs/heads/master
lottery.py
1
#!/usr/bin/python3 #encoding=utf-8 from __future__ import with_statement, print_function import sys, random import tkinter_addon if sys.version_info < (3,): import Tkinter as tkinter import tkFileDialog, tkMessageBox, tkFont tkinter.filedialog = tkFileDialog tkinter.messagebox = tkMessageBox tkinter...
thundernet8/WRGameVideos-Server
refs/heads/master
venv/lib/python2.7/site-packages/pip/cmdoptions.py
239
""" shared options and groups The principle here is to define options once, but *not* instantiate them globally. One reason being that options with action='append' can carry state between parses. pip parses general options twice internally, and shouldn't pass on state. To be consistent, all options will follow this de...
Linutux/Gourmet
refs/heads/master
gourmet/plugins/import_export/mastercook_import_plugin/mastercook_importer_plugin.py
1
from gourmet.plugin import ImporterPlugin import mastercook_plaintext_importer import mastercook_importer import gourmet.importers.importer as importer class MastercookImporterPlugin (ImporterPlugin): name = _('Mastercook XML File') patterns = ['*.mx2','*.xml','*.mxp'] mimetypes = ['text/plain','text/xml'...
hustodemon/spacewalk
refs/heads/master
backend/satellite_tools/exporter/xmlWriter.py
2
# -*- coding: ISO-8859-1 -*- # # Copyright (c) 2008--2014 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE....
imiyoo2010/mitmproxy
refs/heads/master
test/test_protocol_http.py
1
from libmproxy.protocol.http import * from libmproxy.protocol import KILL from cStringIO import StringIO import tutils, tservers def test_HttpAuthenticationError(): x = HttpAuthenticationError({"foo": "bar"}) assert str(x) assert "foo" in x.headers def test_stripped_chunked_encoding_no_content(): ""...
n2o/dpb
refs/heads/master
intern/apps.py
1
from django.apps import AppConfig class InternConfig(AppConfig): name = "intern" verbose_name = "Interner Bereich"
prasanna08/oppia
refs/heads/develop
core/domain/interaction_jobs_one_off_test.py
1
# coding: utf-8 # # Copyright 2020 The Oppia 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 requi...
rouxcode/django-text-ckeditor
refs/heads/master
testproject/testapp/admin.py
1
from django import forms from django.contrib import admin from text_ckeditor.widgets import CKEditorWidget from .models import TestModel class TestModelAdminForm(forms.ModelForm): class Meta: fields = '__all__' model = TestModel widgets = { 'text_html': CKEditorWidget ...
bitmovin/bitmovin-python
refs/heads/master
bitmovin/resources/resource_response.py
1
class ResourceResponse: def __init__(self, response, resource): self.response = response self.resource = resource
danielharbor/openerp
refs/heads/master
addons/website_event/tests/__init__.py
413
# -*- 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...
plissonf/scikit-learn
refs/heads/master
examples/applications/face_recognition.py
191
""" =================================================== Faces recognition example using eigenfaces and SVMs =================================================== The dataset used in this example is a preprocessed excerpt of the "Labeled Faces in the Wild", aka LFW_: http://vis-www.cs.umass.edu/lfw/lfw-funneled.tgz (2...
cyx1231st/nova
refs/heads/eventually-consistent-host-state-mitaka
nova/tests/unit/api/openstack/compute/test_cloudpipe.py
9
# Copyright 2011 OpenStack Foundation # 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 requ...
ddzialak/boto
refs/heads/develop
boto/ec2/spotpricehistory.py
152
# Copyright (c) 2006-2009 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modi...
miladh/lgn-simulator
refs/heads/dev
apps/firingSynchrony/analysis/irf_spatiotemp.py
1
#!/usr/bin/python from pylab import* import os, sys current_path = os.path.dirname(os.path.realpath(__file__)) sys.path.append(os.path.abspath(os.path.join(current_path,"../../../tools"))) from analysis.data_extractor import* from analysis.pretty_plotting import* import seaborn.apionly as sns sns.set_color_codes() impo...
ju1ius/clisnips
refs/heads/master
clisnips/tui/widgets/dialog.py
1
import enum from typing import Optional import urwid from .divider import HorizontalDivider class ResponseType(enum.Enum): NONE = 0 ACCEPT = 1 REJECT = 2 class DialogFrame(urwid.WidgetWrap): def __init__(self, parent, body, title=None): self.parent = parent self.line_box = urwid.L...
UstadMobile/eXePUB
refs/heads/master
twisted/internet/process.py
14
# -*- test-case-name: twisted.test.test_process -*- # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """UNIX Process management. Do NOT use this module directly - use reactor.spawnProcess() instead. Maintainer: U{Itamar Shtull-Trauring<mailto:twisted@itamarst.org>} """ # System Im...
hiikezoe/android_kernel_stm_st3200
refs/heads/master
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...
Mafarricos/Mafarricos-modded-xbmc-addons
refs/heads/master
plugin.video.streamajoker/resources/site-packages/xbmcswift2/__init__.py
32
''' xbmcswift2 ---------- A micro framework to enable rapid development of XBMC plugins. :copyright: (c) 2012 by Jonathan Beluch :license: GPLv3, see LICENSE for more details. ''' from types import ModuleType class module(ModuleType): '''A wrapper class for a module used to override __getatt...
newsapps/beeswithmachineguns
refs/heads/master
beeswithmachineguns/bees.py
1
#!/bin/env python """ The MIT License Copyright (c) 2010 The Chicago Tribune & Contributors Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the ...
kennedyshead/home-assistant
refs/heads/dev
homeassistant/components/garmin_connect/config_flow.py
1
"""Config flow for Garmin Connect integration.""" import logging from garminconnect_aio import ( Garmin, GarminConnectAuthenticationError, GarminConnectConnectionError, GarminConnectTooManyRequestsError, ) import voluptuous as vol from homeassistant import config_entries from homeassistant.const impor...
iedparis8/duck_examen
refs/heads/master
migrations/0013_deroulementexamenmodel_annee.py
1
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('duck_examen', '0012_auto_20160220_0032'), ] operations = [ migrations.AddField( model_name='deroulementexamenmod...
songfj/calibre
refs/heads/master
src/calibre/ebooks/pdb/formatwriter.py
24
# -*- coding: utf-8 -*- ''' Interface defining the necessary public functions for a pdb format writer. ''' __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' class FormatWriter(object): def __init__(self, opts, log): raise NotImpl...
samaitra/kafka
refs/heads/trunk
tests/kafkatest/services/security/security_config.py
6
# 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 ...
ltilve/chromium
refs/heads/igalia-sidebar
tools/json_schema_compiler/code.py
21
# 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. class Code(object): """A convenience object for constructing code. Logically each object should be a block of code. All methods except |Render| an...
googleapis/googleapis-gen
refs/heads/master
google/cloud/accessapproval/v1/accessapproval-v1-py/google/cloud/accessapproval_v1/services/access_approval/client.py
1
# -*- coding: utf-8 -*- # Copyright 2020 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 # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
catapult-project/catapult-csm
refs/heads/master
third_party/google-endpoints/pyasn1_modules/rfc3412.py
127
# # SNMPv3 message syntax # # ASN.1 source from: # http://www.ietf.org/rfc/rfc3412.txt # from pyasn1.type import univ, namedtype, namedval, tag, constraint from pyasn1_modules import rfc1905 class ScopedPDU(univ.Sequence): componentType = namedtype.NamedTypes( namedtype.NamedType('contextEngineId', univ.Oc...
matthijsvk/multimodalSR
refs/heads/master
code/Experiments/neon-master/tests/test_recurrent.py
2
# ---------------------------------------------------------------------------- # Copyright 2015-2016 Nervana 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.apa...
bioinformatics-centre/AsmVar
refs/heads/master
src/AsmvarVarScore/modul/VCF.py
2
""" =================================================== A class for VCF format =================================================== """ import re class VCFHeader: def __init__(self, hInfo = None): self.header = {} if hInfo and (type(hInfo) is not dict): raise ValueError ('The data type should b...
pozdnyakov/chromium-crosswalk
refs/heads/master
chrome/test/functional/wifi_downloads.py
51
#!/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. import hashlib import logging import os import time import urllib2 import pyauto_functional # Must be imported before pyauto impo...
calico/basenji
refs/heads/master
bin/upgrade_tf1.py
1
#!/usr/bin/env python from optparse import OptionParser import h5py import numpy as np import pdb import tensorflow as tf from basenji import dataset from basenji import params from basenji import seqnn ''' upgrade_tf1.py Read in tf1 model and write into a preset tf2 hdf5. ''' ####################################...
dseomn/art
refs/heads/main
piano-axioms-suite-1/melody.py
1
import random # Notes to use in a melody, (main note, is sharp, treble clef). notes = [ ("C,", False, False), ("C,", True, False), ("D,", False, False), ("D,", True, False), ("E,", False, False), ("F,", False, False), ("F,", True, False), ("G,", False, False), ("G,", True, False), ("A,", False, Fal...
suqinhuang/avocado-vt
refs/heads/master
virttest/libvirt_xml/nwfilter_protocols/ah.py
26
""" ah protocl support class(es) http://libvirt.org/formatnwfilter.html#nwfelemsRulesProtoMisc """ from virttest.libvirt_xml import accessors, xcepts from virttest.libvirt_xml.nwfilter_protocols import base class Ah(base.TypedDeviceBase): """ Create new Ah xml instances Properties: attrs: libv...
gilshwartz/tortoisehg-caja
refs/heads/master
tortoisehg/hgqt/messageentry.py
1
# messageentry.py - TortoiseHg's commit message editng widget # # Copyright 2011 Steve Borho <steve@borho.org> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2, incorporated herein by reference. import os from PyQt4.QtCore import * from PyQt4...
golharam/StarCluster
refs/heads/develop
starcluster/commands/removekey.py
19
# Copyright 2009-2014 Justin Riley # # This file is part of StarCluster. # # StarCluster is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by the Free # Software Foundation, either version 3 of the License, or (at your option) any # later ...
CDKAssoc/ns3
refs/heads/master
build/c4che/_cache.py
1
APPNAME = 'ns' AR = '/usr/bin/ar' ARFLAGS = 'rcs' BINDIR = '/usr/local/bin' BUILD_PROFILE = 'debug' BUILD_SUFFIX = '-debug' CC = ['/usr/bin/gcc'] CCDEFINES = ['_DEBUG'] CCFLAGS = ['-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasi...
lrocheWB/navitia
refs/heads/dev
source/sql/alembic/versions/795308e6d7c_add_parameter_parse_pois_from_osm.py
20
"""Add parameter parse_pois_from_osm Revision ID: 795308e6d7c Revises: 53c1e84535f8 Create Date: 2015-03-03 10:50:58.000922 """ # revision identifiers, used by Alembic. revision = '795308e6d7c' down_revision = '53c1e84535f8' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto gener...
simudream/disco
refs/heads/develop
examples/util/simple_innerjoin.py
13
from disco.core import Job, result_iterator import csv, sys class CsvInnerJoiner(Job): partitions = 2 sort = True def map(self, row, params): yield row[0], row[1:] @staticmethod def map_reader(fd, size, url, params): reader = csv.reader(fd, delimiter=',') for row in reade...
fitermay/intellij-community
refs/heads/master
python/testData/formatter/newLineAfterColonMultiClause.py
83
try: pass finally: pass