repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ceerik/gitinspector
refs/heads/master
tests/__init__.py
118
# coding: utf-8 # # Copyright © 2013 Ejwa Software. All rights reserved. # # This file is part of gitinspector. # # gitinspector 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,...
ArnossArnossi/django
refs/heads/master
tests/utils_tests/test_html.py
160
# -*- coding: utf-8 -*- from __future__ import unicode_literals import os from datetime import datetime from django.test import SimpleTestCase, ignore_warnings from django.utils import html, safestring, six from django.utils._os import upath from django.utils.deprecation import RemovedInDjango110Warning from django.u...
adist/drunken-sansa
refs/heads/master
openerp/pooler.py
61
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
stumoodie/VisualLanguageToolkit
refs/heads/master
lib/antlr-3.4/runtime/Python/tests/t058rewriteAST.py
16
import unittest import textwrap import antlr3 import antlr3.tree import testbase import sys class TestRewriteAST(testbase.ANTLRTest): def parserClass(self, base): class TParser(base): def __init__(self, *args, **kwargs): base.__init__(self, *args, **kwargs) self...
valexandersaulys/airbnb_kaggle_contest
refs/heads/master
venv/lib/python3.4/site-packages/pip/_vendor/distlib/_backport/__init__.py
1429
"""Modules copied from Python 3 standard libraries, for internal use only. Individual classes and functions are found in d2._backport.misc. Intended usage is to always import things missing from 3.1 from that module: the built-in/stdlib objects will be used if found. """
Ninjakow/TrueSkill
refs/heads/master
lib/flask/wrappers.py
121
# -*- coding: utf-8 -*- """ flask.wrappers ~~~~~~~~~~~~~~ Implements the WSGI wrappers (request and response). :copyright: (c) 2015 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from werkzeug.wrappers import Request as RequestBase, Response as ResponseBase from werkzeug.exce...
mdj2/django
refs/heads/master
tests/commands_sql/tests.py
58
from __future__ import unicode_literals from django.core.management.color import no_style from django.core.management.sql import (sql_create, sql_delete, sql_indexes, sql_destroy_indexes, sql_all) from django.db import connections, DEFAULT_DB_ALIAS, models from django.test import TestCase from django.utils import ...
HDPxbmc/plugin.video.115
refs/heads/master
bencode.py
1
# The contents of this file are subject to the BitTorrent Open Source License # Version 1.1 (the License). You may not copy or use this file, in either # source code or executable form, except in compliance with the License. You # may obtain a copy of the License at http://www.bittorrent.com/license/. # # Software di...
rkotulla/python_module_packer
refs/heads/master
pypack.py
1
#!/usr/bin/env python import os, sys import types import modulefinder import optparse if __name__ == "__main__": parser = optparse.OptionParser() parser.add_option("-v", "--verbose", action="store_true", dest="verbose", default=False, help="print additional ou...
jiwanlimbu/aura
refs/heads/master
controllers.py
1
#Copyright 2013 Metacloud, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required b...
minhphung171093/GreenERP
refs/heads/master
openerp/addons/bus/models/__init__.py
67
# -*- coding: utf-8 -*- import bus import bus_presence import res_users import res_partner
andrespires/python-buildpack
refs/heads/master
vendor/pip-pop/pip/_vendor/html5lib/treewalkers/_base.py
436
from __future__ import absolute_import, division, unicode_literals from pip._vendor.six import text_type, string_types __all__ = ["DOCUMENT", "DOCTYPE", "TEXT", "ELEMENT", "COMMENT", "ENTITY", "UNKNOWN", "TreeWalker", "NonRecursiveTreeWalker"] from xml.dom import Node DOCUMENT = Node.DOCUMENT_NODE DOCTYPE...
bright-sparks/chromium-spacewalk
refs/heads/master
tools/cr/cr/base/linux.py
138
# 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. """The linux specific host and platform implementation module.""" import os import cr class LinuxHost(cr.Host): """The implementation of Host for linux...
saintfrank/tabu-benchmark
refs/heads/master
dtu_lcf.py
2
## ## @author Francesco Cervigni ## @date 2012-10 ## ## This file contains the main logic of the application. ## The specific functions used are defined in separte files in the same folder. ## from data_structures import Mapping from load import taskLoad from analysis import DM_guarantee import sys, operator, math...
willingc/oh-mainline
refs/heads/master
vendor/packages/twisted/twisted/conch/ttymodes.py
82
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # import tty # this module was autogenerated. VINTR = 1 VQUIT = 2 VERASE = 3 VKILL = 4 VEOF = 5 VEOL = 6 VEOL2 = 7 VSTART = 8 VSTOP = 9 VSUSP = 10 VDSUSP = 11 VREPRINT = 12 VWERASE = 13 VLNEXT = 14 VFLUSH = 15 VSWTCH = 16 VSTATUS = 17 VDISCARD ...
fujunwei/chromium-crosswalk
refs/heads/master
third_party/cython/src/Cython/Compiler/Tests/TestUtilityLoad.py
129
import unittest from Cython.Compiler import Code, UtilityCode def strip_2tup(tup): return tup[0] and tup[0].strip(), tup[1] and tup[1].strip() class TestUtilityLoader(unittest.TestCase): """ Test loading UtilityCodes """ expected = "test {{loader}} prototype", "test {{loader}} impl" requir...
lesina/Hack70
refs/heads/master
env/lib/python3.5/site-packages/setuptools/command/bdist_wininst.py
991
import distutils.command.bdist_wininst as orig class bdist_wininst(orig.bdist_wininst): def reinitialize_command(self, command, reinit_subcommands=0): """ Supplement reinitialize_command to work around http://bugs.python.org/issue20819 """ cmd = self.distribution.reinitiali...
leafclick/intellij-community
refs/heads/master
python/testData/refactoring/pullup/abstractMethodPy3AddMeta/SuperClass.py
80
from abc import object class Parent(object): pass
mmcbride1/python-coretemp
refs/heads/master
coretemp/sensor_reading.py
1
import re import os import sys import subprocess import sensors as r import coretemp_log as log import coretemp_config as conf from collections import OrderedDict ''' Get sensor constants ''' from coretemp_constants import SUB_MAX_TYPE, SUB_CRT_TYPE, CHIP, NORM, HIGH, CRTC class SensorReading: ''' Store sensor t...
yogo1212/RIOT
refs/heads/master
examples/micropython/boot.py
21
print("boot.py: MicroPython says hello!")
creativecommons/cc.license
refs/heads/master
cc/license/selectors/__init__.py
1
from cc.license._lib import rdf_helper from cc.license._lib.exceptions import CCLicenseError import classes SELECTORS = {} __all__ = ['choose', 'list', # functions ] for uri in rdf_helper.get_selector_uris(): sel = classes.LicenseSelector(uri) SELECTORS[sel.id] = sel del sel # cleanup referenc...
jseabold/statsmodels
refs/heads/master
examples/python/discrete_choice_overview.py
5
# coding: utf-8 # DO NOT EDIT # Autogenerated from the notebook discrete_choice_overview.ipynb. # Edit the notebook and then sync the output with this file. # # flake8: noqa # DO NOT EDIT # # Discrete Choice Models Overview import numpy as np import statsmodels.api as sm # ## Data # # Load data from Spector and Maz...
vrenaville/ngo-addons-backport
refs/heads/master
addons/delivery/stock.py
2
# -*- 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...
mollstam/UnrealPy
refs/heads/master
UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/boto-2.38.0/tests/unit/dynamodb2/test_layer1.py
126
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. # All rights reserved. # # 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 right...
dlazz/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/aws_region_facts.py
34
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = { 'metadata_version': '1.1', 'supported_by': 'community', 'status': ['preview'] } DOCUMENTATION = ''' module: aws_region_facts short_descri...
ttsirkia/a-plus
refs/heads/master
exercise/api/full_serializers.py
2
from rest_framework import serializers from rest_framework_extensions.fields import NestedHyperlinkedIdentityField from lib.api.serializers import ( AlwaysListSerializer, CompositeListSerializer, AplusSerializerMeta, AplusModelSerializerBase, ) from course.api.serializers import CourseBriefSerializer f...
elpaso/QGIS
refs/heads/master
python/plugins/processing/tests/GdalAlgorithmsRasterTest.py
6
# -*- coding: utf-8 -*- """ *************************************************************************** GdalAlgorithmRasterTest.py --------------------- Date : January 2016 Copyright : (C) 2016 by Matthias Kuhn Email : matthias@opengis.ch ******************...
gauribhoite/personfinder
refs/heads/master
env/google_appengine/lib/yaml/lib/yaml/representer.py
120
__all__ = ['BaseRepresenter', 'SafeRepresenter', 'Representer', 'RepresenterError'] from error import * from nodes import * import datetime try: set except NameError: from sets import Set as set import sys, copy_reg, types class RepresenterError(YAMLError): pass class BaseRepresenter(object): ...
mrwulff/shair-gui
refs/heads/master
simpleui.py
1
import pygame import socket from string import * UDP_IP = "127.0.0.1" UDP_PORT =5555 sock = socket.socket(socket.AF_INET, # Internet socket.SOCK_DGRAM) # UDP sock.bind((UDP_IP, UDP_PORT)) pygame.init() #screen = pygame.display.set_mode((640, 480),pygame.FULLSCREEN) screen = pygame.display.set...
apporc/neutron
refs/heads/master
neutron/tests/api/test_networks_negative.py
47
# Copyright 2013 Huawei Technologies Co.,LTD. # Copyright 2012 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.apac...
melphi/algobox
refs/heads/master
python/algobox/src/algobox/client/generated/api/models/strategy_registration_request_dto.py
1
# coding: utf-8 """ No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) Generated by: https://github.com/swagger-api/swagger-codegen.git Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in com...
srluge/SickRage
refs/heads/master
lib/unidecode/x06a.py
252
data = ( 'Di ', # 0x00 'Zhuang ', # 0x01 'Le ', # 0x02 'Lang ', # 0x03 'Chen ', # 0x04 'Cong ', # 0x05 'Li ', # 0x06 'Xiu ', # 0x07 'Qing ', # 0x08 'Shuang ', # 0x09 'Fan ', # 0x0a 'Tong ', # 0x0b 'Guan ', # 0x0c 'Ji ', # 0x0d 'Suo ', # 0x0e 'Lei ', # 0x0f 'Lu ', # 0x1...
nocarryr/python-slack
refs/heads/master
python_slack/slackobjects/timeutils.py
1
import datetime import numbers try: import pytz UTC = pytz.UTC except ImportError: UTC = None from python_slack.slackobjects.base import AttributeValue def make_dt_aware(dt): if UTC is not None: if dt.tzinfo is not None: dt = UTC.normalize(dt) else: dt ...
Jajcus/cjc
refs/heads/master
plugins/roster_ei.py
1
# Console Jabber Client # Copyright (C) 2004-2010 Jacek Konieczny # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License version 2 as published # by the Free Software Foundation # # This program is distributed in the hope that it will be useful, #...
maxziv/SEApp
refs/heads/master
server/lib/werkzeug/contrib/iterio.py
89
# -*- coding: utf-8 -*- r""" werkzeug.contrib.iterio ~~~~~~~~~~~~~~~~~~~~~~~ This module implements a :class:`IterIO` that converts an iterator into a stream object and the other way round. Converting streams into iterators requires the `greenlet`_ module. To convert an iterator into a stream...
brunoliveira8/distributed-systems
refs/heads/master
StorageServer.py
1
# -*- coding: utf-8 -*- import os from abc import ABCMeta, abstractmethod import Pyro4 import serpent class AbstractStorage(object): """Implementa a interface Storage""" __metaclass__ = ABCMeta @abstractmethod def save(self, file, filename): """Colocar definição aqui.""" return @...
DirtyUnicorns/android_external_chromium-org
refs/heads/kitkat
build/win/setup_cygwin_mount.py
92
# 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 os import sys def main(): if len(sys.argv) != 2 or sys.argv[1] != '--win-only': return 1 if sys.platform in ('win32', 'cygwin'): self...
adambrenecki/django
refs/heads/master
django/contrib/gis/gdal/srs.py
219
""" The Spatial Reference class, represensents OGR Spatial Reference objects. Example: >>> from django.contrib.gis.gdal import SpatialReference >>> srs = SpatialReference('WGS84') >>> print(srs) GEOGCS["WGS 84", DATUM["WGS_1984", SPHEROID["WGS 84",6378137,298.257223563, AUTHOR...
m-weigand/ccd_tools
refs/heads/master
tests/ccd_single/Fitquality/StartingModelsCC/generate_test_cases.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Generate multiple SIP spectra by varying the Cole-Cole parameters m, tau, and c """ import os import numpy as np import lib_cc.main frequencies = np.logspace(-2, 4, 20) cc_obj = lib_cc.main.get('logrho0_m_logtau_c', {'frequencies': frequencies}) data_list = [] for m in...
joalder/bill-angels
refs/heads/master
bills/models.py
10644
from django.db import models # Create your models here.
dorotan/pythontraining
refs/heads/master
env/Lib/hmac.py
142
"""HMAC (Keyed-Hashing for Message Authentication) Python module. Implements the HMAC algorithm as described by RFC 2104. """ import warnings as _warnings from _operator import _compare_digest as compare_digest import hashlib as _hashlib trans_5C = bytes((x ^ 0x5C) for x in range(256)) trans_36 = bytes((x ^ 0x36) fo...
scylladb/scylla-longevity-tests
refs/heads/master
sdcm/results_analyze.py
1
import os import logging import math import jinja2 import pprint from es import ES from send_email import Email from datetime import datetime from db_stats import TestStatsMixin log = logging.getLogger(__name__) pp = pprint.PrettyPrinter(indent=2) class QueryFilter(object): """ Definition of query filtering...
163gal/Time-Line
refs/heads/master
libs/wx/lib/agw/ultimatelistctrl.py
2
# -*- coding: utf-8 -*- # --------------------------------------------------------------------------------- # # ULTIMATELISTCTRL wxPython IMPLEMENTATION # Inspired by and heavily based on the wxWidgets C++ generic version of wxListCtrl. # # Andrea Gavana, @ 08 May 2009 # Latest Revision: 16 Apr 2010, 23.00 GMT # # # TO...
djgagne/scikit-learn
refs/heads/master
sklearn/externals/joblib/_memory_helpers.py
303
try: # Available in Python 3 from tokenize import open as open_py_source except ImportError: # Copied from python3 tokenize from codecs import lookup, BOM_UTF8 import re from io import TextIOWrapper, open cookie_re = re.compile("coding[:=]\s*([-\w.]+)") def _get_normal_name(orig_enc): ...
hemmerling/codingdojo
refs/heads/master
src/game_of_life/python_coderetreat_socramob/cr_socramob01/pyunit/widgettests.py
3
#!/usr/bin/env python # # Unit tests for Widgets. Some of these tests intentionally fail. # # $Id: widgettests.py,v 1.8 2001/08/06 09:10:00 purcell Exp $ from widget import Widget import unittest class WidgetTestCase(unittest.TestCase): def setUp(self): self.widget = Widget("The widget") def tearDow...
mozilla/rna
refs/heads/master
rna/fields.py
1
from django import forms from django.utils.dateparse import parse_datetime class ISO8601DateTimeField(forms.DateTimeField): def strptime(self, value, format): return parse_datetime(value)
tsgit/invenio
refs/heads/prod
modules/websubmit/lib/functions/Print_Success_MBI.py
39
## This file is part of Invenio. ## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN. ## ## Invenio 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 (at your ...
ubc/edx-platform
refs/heads/release
lms/djangoapps/discussion_api/tests/test_render.py
154
""" Tests for content rendering """ from unittest import TestCase import ddt from discussion_api.render import render_body def _add_p_tags(raw_body): """Return raw_body surrounded by p tags""" return "<p>{raw_body}</p>".format(raw_body=raw_body) @ddt.ddt class RenderBodyTest(TestCase): """Tests for re...
alianmohammad/pd-gem5-latest
refs/heads/master
src/arch/x86/isa/insts/simd64/integer/data_reordering/shuffle_and_swap.py
91
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
tinyx/crabfactory
refs/heads/master
todolist/forms.py
1
from django.contrib.auth.forms import UserCreationForm from django.contrib.auth.models import User from django import forms class TodoUserForm(UserCreationForm): email = forms.EmailField(required=True) class Meta: model = User fields = ('username', 'password1', 'password2', 'email')
xifle/greensd
refs/heads/master
lib/greensd/plugins/fsck.py
1
import greensd.plugin import greensd.logger import subprocess class fsck(greensd.plugin.Plugin): checkDone = False def isIdlePlugin(self): return True def _cleanup(self): # reload smb and mythtv-backend subprocess.call(['mount', '/home']) subprocess.call(['service', 'mythtv-backend', 'start']) subproces...
Santei/django-profile
refs/heads/master
userprofile/views.py
8
from django.shortcuts import render_to_response from django.contrib.auth.decorators import login_required from django.http import HttpResponseRedirect, HttpResponse from django.shortcuts import render_to_response, get_object_or_404 from django.utils.translation import ugettext as _ from userprofile.forms import AvatarF...
SrNetoChan/Quantum-GIS
refs/heads/master
tests/src/python/test_qgsdatetimestatisticalsummary.py
45
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDateTimeStatisticalSummary. .. note:: 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 (at your option) any later ...
csdl/makahiki
refs/heads/master
makahiki/apps/widgets/prizes/templatetags/prize_tags.py
9
"""template tag definition for Prize page""" from django import template register = template.Library() def user_tickets(raffle_prize, user): """return the allocate ticket for user""" return raffle_prize.allocated_tickets(user) def user_odds(raffle_prize, user): """return the user odd for the prize""" ...
hainm/statsmodels
refs/heads/master
statsmodels/sandbox/distributions/try_pot.py
34
# -*- coding: utf-8 -*- """ Created on Wed May 04 06:09:18 2011 @author: josef """ from __future__ import print_function import numpy as np def mean_residual_life(x, frac=None, alpha=0.05): '''emprirical mean residual life or expected shortfall Parameters ---------- todo: check formula for std of m...
FireWRT/OpenWrt-Firefly-Libraries
refs/heads/master
staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/sqlite3/test/dump.py
119
# Author: Paul Kippes <kippesp@gmail.com> import unittest import sqlite3 as sqlite class DumpTests(unittest.TestCase): def setUp(self): self.cx = sqlite.connect(":memory:") self.cu = self.cx.cursor() def tearDown(self): self.cx.close() def CheckTableDump(self): expected_s...
mcltn/ansible-modules-extras
refs/heads/devel
packaging/os/macports.py
161
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2013, Jimmy Tang <jcftang@gmail.com> # Based on okpg (Patrick Pelletier <pp.pelletier@gmail.com>), pacman # (Afterburn) and pkgin (Shaun Zinck) modules # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public ...
Fale/ansible
refs/heads/devel
lib/ansible/module_utils/common/_utils.py
97
# Copyright (c) 2018, Ansible Project # Simplified BSD License (see licenses/simplified_bsd.txt or https://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function __metaclass__ = type """ Modules in _utils are waiting to find a better home. If you need to use them, be ...
Goutte/Ni
refs/heads/master
v1/web/apostrophePlugin/js/fckeditor/editor/filemanager/connectors/py/wsgi.py
39
#!/usr/bin/env python """ FCKeditor - The text editor for Internet - http://www.fckeditor.net Copyright (C) 2003-2009 Frederico Caldeira Knabben == BEGIN LICENSE == Licensed under the terms of any of the following licenses at your choice: - GNU General Public License Version 2 or later (the "GPL") http://www.gn...
clonetwin26/buck
refs/heads/master
programs/file_locks.py
11
# Copyright 2016-present Facebook, 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 i...
asajeffrey/servo
refs/heads/master
tests/wpt/web-platform-tests/service-workers/service-worker/resources/success.py
20
def main(request, response): headers = [] if b"ACAOrigin" in request.GET: for item in request.GET[b"ACAOrigin"].split(b","): headers.append((b"Access-Control-Allow-Origin", item)) return headers, b"{ \"result\": \"success\" }"
craigcook/bedrock
refs/heads/master
bedrock/base/tests/test_context_processors.py
10
from django.template.loader import render_to_string from django.test import TestCase, RequestFactory import jinja2 from lib.l10n_utils import translation class TestContext(TestCase): def setUp(self): translation.activate('en-US') self.factory = RequestFactory() translation.activate('en-...
TomLottermann/django-avatar
refs/heads/master
tests/settings.py
71
from django.conf.urls.defaults import patterns, include, handler500, handler404 DEFAULT_CHARSET = 'utf-8' DATABASE_ENGINE = 'sqlite3' DATABASE_NAME = ':memory:' ROOT_URLCONF = 'settings' STATIC_URL = '/site_media/static/' SITE_ID = 1 INSTALLED_APPS = ( 'django.contrib.sessions', 'django.contrib.auth', ...
haoyunfeix/crosswalk-test-suite
refs/heads/master
apptools/apptools-linux-tests/apptools/manifest_package_id.py
15
#!/usr/bin/env python # # Copyright (c) 2015 Intel Corporation. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistributions of works must retain the original copyright notice, this # list of conditions and t...
fidomason/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/site-packages/pip/_vendor/html5lib/treewalkers/pulldom.py
1729
from __future__ import absolute_import, division, unicode_literals from xml.dom.pulldom import START_ELEMENT, END_ELEMENT, \ COMMENT, IGNORABLE_WHITESPACE, CHARACTERS from . import _base from ..constants import voidElements class TreeWalker(_base.TreeWalker): def __iter__(self): ignore_until = None...
splotz90/urh
refs/heads/master
src/urh/ui/delegates/SimulatorSettingsComboBoxDelegate.py
1
from PyQt5.QtWidgets import QItemDelegate, QStyle, QStyleOptionViewItem, QComboBox, QWidget from PyQt5.QtCore import Qt, QModelIndex, QAbstractItemModel, pyqtSlot from urh.controller.SendRecvSettingsDialogController import SendRecvSettingsDialogController from urh.dev.BackendHandler import BackendHandler from urh imp...
plotly/python-api
refs/heads/master
packages/python/plotly/plotly/graph_objs/layout/template/data/_funnelarea.py
2
from plotly.graph_objs import Funnelarea
tangyiyong/odoo
refs/heads/8.0
openerp/report/printscreen/ps_list.py
381
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
wagnerand/addons-server
refs/heads/master
src/olympia/versions/migrations/0005_auto_20200518_1259.py
6
# Generated by Django 2.2.12 on 2020-05-18 12:59 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('versions', '0004_auto_20200512_1718'), ] operations = [ migrations.AlterField( model_name='version', name='source_g...
NKSG/ns-3-tcpbolt
refs/heads/master
src/energy/bindings/callbacks_list.py
85
callback_classes = [ ['void', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'int', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty', 'ns3::empty'], ['void', 'ns3::Ptr<ns3...
Distrotech/intellij-community
refs/heads/master
python/testData/quickFixes/PyMakeFunctionFromMethodQuickFixTest/usageImport_after.py
83
import test b = test b.foo(1)
shft117/SteckerApp
refs/heads/master
erpnext/hr/doctype/employee_internal_work_history/employee_internal_work_history.py
121
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class EmployeeInternalWorkHistory(Document): pass
JioCloud/nova_test_latest
refs/heads/master
nova/api/openstack/compute/contrib/volumes.py
30
# Copyright 2011 Justin Santa Barbara # 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...
smarkwell/asuswrt-merlin
refs/heads/master
release/src/router/samba36/source4/scripting/python/samba/netcmd/newuser.py
20
#!/usr/bin/env python # # Adds a new user to a Samba4 server # Copyright Jelmer Vernooij 2008 # # Based on the original in EJS: # Copyright Andrew Tridgell 2005 # # 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 Soft...
lowitty/alarmfiles
refs/heads/master
lib/pysnmp/smi/mibs/instances/__SNMPv2-MIB.py
6
from sys import version from time import time from pysnmp import __version__ ( MibScalarInstance, TimeTicks) = mibBuilder.importSymbols( 'SNMPv2-SMI', 'MibScalarInstance', 'TimeTicks' ) ( sysDescr, sysObjectID, sysUpTime, sysContact, sysName, sysLocation, sysServices, sysORLastChange, ...
mmnelemane/neutron
refs/heads/master
neutron/services/qos/qos_consts.py
24
# Copyright (c) 2015 Red Hat 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...
ms-iot/python
refs/heads/develop
cpython/Lib/idlelib/idle_test/test_autoexpand.py
20
"""Unit tests for idlelib.AutoExpand""" import unittest from test.support import requires from tkinter import Text, Tk #from idlelib.idle_test.mock_tk import Text from idlelib.AutoExpand import AutoExpand class Dummy_Editwin: # AutoExpand.__init__ only needs .text def __init__(self, text): self.text =...
malemburg/epcon
refs/heads/ep2017
documents/badge/ep2012/conf.py
7
# -*- coding: UTF-8 -*- from PIL import Image, ImageFont from PyQRNative import QRCode, QRErrorCorrectLevel _FONT_NAME = 'Arial_Unicode.ttf' _FONTS = { 'name': ImageFont.truetype(_FONT_NAME, 16 * 8), 'name_small': ImageFont.truetype(_FONT_NAME, 10 * 8), 'info': ImageFont.truetype(_FONT_NAME, 8 * 8), } PY_L...
mattclay/ansible
refs/heads/devel
lib/ansible/utils/sentinel.py
93
# Copyright (c) 2019 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # Make coding more python3-ish from __future__ import (absolute_import, division, print_function) __metaclass__ = type class Sentinel: """ Object which can be used to mark whether...
aostapenko/manila
refs/heads/master
manila/tests/runtime_conf.py
2
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compli...
anistark/mozillians
refs/heads/master
vendor-local/lib/python/rest_framework/utils/mediatypes.py
7
""" Handling of media types, as found in HTTP Content-Type and Accept headers. See http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.7 """ from __future__ import unicode_literals from django.http.multipartparser import parse_header from rest_framework import HTTP_HEADER_ENCODING def media_type_matches(lhs, ...
ITNG/ng-utils
refs/heads/master
itng/common/views/__init__.py
1
from ..decorators import login_exempt from .form import MultipleFormView __all__ = ('LoginExemptMixin', 'PublicMixin', 'MultipleFormView') class LoginExemptMixin(object): @classmethod def as_view(cls, **kwargs): view = super(LoginExemptMixin, cls).as_view(**kwargs) return login_exempt(view)...
okamstudio/godot
refs/heads/master
platform/osx/platform_osx_builders.py
21
"""Functions used to generate source files during build time All such functions are invoked in a subprocess on Windows to prevent build flakiness. """ import os from platform_methods import subprocess_main def make_debug_osx(target, source, env): if (env["macports_clang"] != 'no'): mpprefix = os.environ...
cournape/pig-it
refs/heads/master
pygit/test.py
1
import os from binascii import \ a2b_hex from object import \ from_filename, Blob, Tree, RawEntry, parse_object, CommitHeader, \ Commit SHA1_TO_FILE = { '1b8ae996b7685aa07180a050332df81e0a6be40e': 'commit1', '815fa52ea791bf9a0d152ca3386d61d3ad023a5a': 'tree1', '00909da...
AutorestCI/azure-sdk-for-python
refs/heads/master
azure-mgmt-rdbms/azure/mgmt/rdbms/mysql/operations/check_name_availability_operations.py
1
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
gdimitris/ChessPuzzlerBackend
refs/heads/master
Virtual_Environment/lib/python2.7/site-packages/migrate/versioning/util/__init__.py
33
#!/usr/bin/env python # -*- coding: utf-8 -*- """.. currentmodule:: migrate.versioning.util""" import warnings import logging from decorator import decorator from pkg_resources import EntryPoint import six from sqlalchemy import create_engine from sqlalchemy.engine import Engine from sqlalchemy.pool import StaticPool...
meolu/walle-web
refs/heads/master
walle/config/settings.py
1
# -*- coding: utf-8 -*- """Application configuration.""" import os from datetime import timedelta class Config(object): """Base configuration.""" VERSION = '2.0.1' SECRET_KEY = os.environ.get('WALLE_SECRET', 'secret-key') APP_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) ...
m8ttyB/socorro
refs/heads/master
alembic/versions/e4d30f140ed_add_new_rule_to_copy.py
14
"""Add new rule to copy Plugin url and comment Revision ID: e4d30f140ed Revises: 22e4e60e03f Create Date: 2013-05-22 08:01:54.873655 """ # revision identifiers, used by Alembic. revision = 'e4d30f140ed' down_revision = '22e4e60e03f' from alembic import op import sqlalchemy as sa from sqlalchemy.dialects import post...
juanmirocks/LocText
refs/heads/develop
resources/features/selected/0_False_LinearSVC-1486292275.065055-NAMES.py
2
[ "SentenceFeatureGenerator::1.1_counts_individual_int_individual_e_1_[0]", # 0 "SentenceFeatureGenerator::1.1_counts_individual_int_individual_e_3_[0]", # 1 "SentenceFeatureGenerator::3_order_[0]", # 2 "DependencyFeatureGenerator::19_LD_pos_N_gram_LD_1_<NOUN>_[0]", # 3 "DependencyFeatureGenerat...
adelton/django
refs/heads/master
django/utils/feedgenerator.py
183
""" Syndication feed generation library -- used for generating RSS, etc. Sample usage: >>> from django.utils import feedgenerator >>> feed = feedgenerator.Rss201rev2Feed( ... title="Poynter E-Media Tidbits", ... link="http://www.poynter.org/column.asp?id=31", ... description="A group Weblog by the sharpes...
Cisco-Talos/pyrebox
refs/heads/master
mw_monitor2/ida_scripts/mw_monitor_binary_log_reader.py
2
# ------------------------------------------------------------------------- # # Copyright (C) 2018 Cisco Talos Security Intelligence and Research Group # # PyREBox: Python scriptable Reverse Engineering Sandbox # Author: Xabier Ugarte-Pedrero # # This program is free software; you can redistribute it and/or mod...
reinout/django
refs/heads/master
django/conf/locale/id/formats.py
65
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j N Y' DATETIME_FORMAT = "j N Y, G.i" TIME_FORMAT = 'G.i' YEAR_MONTH_FORMAT = 'F Y' MONTH_DAY_FORMAT...
fake-name/ReadableWebProxy
refs/heads/master
WebMirror/management/rss_parser_funcs/feed_parse_extract50Translations.py
1
def extract50Translations(item): """ Parser for '50% Translations' """ vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title']) if not (chp or vol) or 'preview' in item['title'].lower(): return None if 'WATTT' in item['tags']: return buildReleaseMessageWithType(item, 'WATTT', vol, chp, frag=f...
heke123/chromium-crosswalk
refs/heads/master
chrome/browser/resources/chromeos/chromevox/tools/publish_webstore_extension.py
15
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. '''Publishes a set of extensions to the webstore. Given an unpacked extension, compresses and sends to the Chrome webstore. Relea...
BFH-E2d/iotdemo
refs/heads/master
lorawan/migrations/0005_message.py
2
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-11 13:35 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('lorawan', '0004_device_status'), ] operations = [ ...
hendrikwout/pynacolada
refs/heads/master
trash/procnc.py
2
import os import pickle import pylab as pl from operator import itemgetter import netcdf import numpy as np import sys from operator import mul from ncdftools import nccopydimension from Scientific.IO import NetCDF from array import array import struct def nctypecode(dtype): # purose: netcdf-typecode from array...
nthien/zulip
refs/heads/master
zilencer/models.py
126
from django.db import models import zerver.models def get_deployment_by_domain(domain): return Deployment.objects.get(realms__domain=domain) class Deployment(models.Model): realms = models.ManyToManyField(zerver.models.Realm, related_name="_deployments") is_active = models.BooleanField(default=True) ...
HumboldtCoin/humboldtcoin
refs/heads/master
share/qt/make_spinner.py
4415
#!/usr/bin/env python # W.J. van der Laan, 2011 # Make spinning .mng animation from a .png # Requires imagemagick 6.7+ from __future__ import division from os import path from PIL import Image from subprocess import Popen SRC='img/reload_scaled.png' DST='../../src/qt/res/movies/update_spinner.mng' TMPDIR='/tmp' TMPNAM...
spring-week-topos/horizon-week
refs/heads/spring-week
openstack_dashboard/dashboards/admin/models.py
172
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # no...
encbladexp/ansible
refs/heads/devel
lib/ansible/plugins/lookup/password.py
11
# (c) 2012, Daniel Hokka Zakrisson <daniel@hozac.com> # (c) 2013, Javier Candeira <javier@candeira.com> # (c) 2013, Maykel Moya <mmoya@speedyrails.com> # (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, divisio...