repo_name stringlengths 6 100 | path stringlengths 4 294 | copies stringlengths 1 5 | size stringlengths 4 6 | content stringlengths 606 896k | license stringclasses 15
values |
|---|---|---|---|---|---|
flyingbanana1024102/transmission-line-simulator | src/views/materialwidget.py | 1 | 2230 | #
# Transmission Line Simulator
#
# Author(s): Jiacong Xu
# Created: Jun-28-2017
#
from kivy.uix.widget import Widget
from kivy.properties import *
from kivy.clock import Clock
from kivy.graphics.texture import Texture
from kivy.graphics import *
from PIL import Image, ImageDraw, ImageFilter
class MaterialWidget(Wid... | mit |
wskplho/sl4a | python/src/Lib/lib-tk/ScrolledText.py | 51 | 1701 | """A ScrolledText widget feels like a text widget but also has a
vertical scroll bar on its right. (Later, options may be added to
add a horizontal bar as well, to make the bars disappear
automatically when not needed, to move them to the other side of the
window, etc.)
Configuration options are passed to the Text wi... | apache-2.0 |
popazerty/SDG-e2 | lib/python/Components/Converter/SdgServName.py | 4 | 12811 | # -*- coding: utf-8 -*-
from Components.Converter.Converter import Converter
from enigma import iServiceInformation, iPlayableService, iPlayableServicePtr, eServiceReference, eServiceCenter, eTimer
from Components.Element import cached
from Components.config import config
class SdgServName(Converter, object):
NAME = ... | gpl-2.0 |
davy39/eric | Plugins/VcsPlugins/vcsMercurial/HgImportDialog.py | 1 | 3032 | # -*- coding: utf-8 -*-
# Copyright (c) 2011 - 2014 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a dialog to enter data for the Mercurial import command.
"""
from __future__ import unicode_literals
from PyQt5.QtCore import pyqtSlot, QDateTime
from PyQt5.QtWidgets import QDialog, QDialogButt... | gpl-3.0 |
plotly/python-api | packages/python/plotly/plotly/validators/sunburst/hoverlabel/_font.py | 2 | 1860 | import _plotly_utils.basevalidators
class FontValidator(_plotly_utils.basevalidators.CompoundValidator):
def __init__(self, plotly_name="font", parent_name="sunburst.hoverlabel", **kwargs):
super(FontValidator, self).__init__(
plotly_name=plotly_name,
parent_name=parent_name,
... | mit |
michalliu/OpenWrt-Firefly-Libraries | staging_dir/target-mipsel_1004kc+dsp_uClibc-0.9.33.2/usr/lib/python3.4/test/test_inspect.py | 8 | 119488 | import collections
import datetime
import functools
import importlib
import inspect
import io
import linecache
import os
from os.path import normcase
import _pickle
import re
import shutil
import sys
import types
import textwrap
import unicodedata
import unittest
import unittest.mock
try:
from concurrent.futures i... | gpl-2.0 |
vladimir-ipatov/ganeti | test/py/cmdlib/backup_unittest.py | 1 | 7854 | #!/usr/bin/python
#
# Copyright (C) 2013 Google Inc.
#
# 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 version.
#
# This program... | gpl-2.0 |
radicalbit/ambari | ambari-server/src/main/resources/common-services/HDFS/3.0.0.3.0/package/scripts/balancer-emulator/hdfs-command.py | 8 | 1394 | #!/usr/bin/env python
'''
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License")... | apache-2.0 |
johnbolia/plyer | plyer/facades/orientation.py | 2 | 1830 | '''
Orientation
==========
The :class:`Orientation` provides access to public methods to set orientation
of your device.
.. note::
These settings are generally guidelines, the operating
system may choose to ignore them, or they may be overridden by
other system components.
.. versionadded:: 1.2.4
Simple... | mit |
AlceConsorcio/account-closing | account_cutoff_prepaid/account_cutoff.py | 6 | 7911 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Account Cut-off Prepaid module for OpenERP
# Copyright (C) 2013 Akretion (http://www.akretion.com)
# @author Alexis de Lattre <alexis.delattre@akretion.com>
#
# This program is free software: you can... | agpl-3.0 |
evidation-health/bokeh | bokeh/tests/test_sources.py | 26 | 3245 | from __future__ import absolute_import
import unittest
from unittest import skipIf
import warnings
try:
import pandas as pd
is_pandas = True
except ImportError as e:
is_pandas = False
from bokeh.models.sources import DataSource, ColumnDataSource, ServerDataSource
class TestColumnDataSourcs(unittest.Test... | bsd-3-clause |
jriehl/numba | examples/mergesort.py | 2 | 3166 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
An inplace and an out-of-place implementation of recursive mergesort.
This is not an efficient sort implementation.
The purpose is to demonstrate recursion support.
"""
from __future__ import print_function, division, absolute_import
from timeit import default_timer as... | bsd-2-clause |
nischalsheth/contrail-controller | src/config/common/svc_info.py | 6 | 2572 | #
# Copyright (c) 2013 Juniper Networks, Inc. All rights reserved.
#
_MGMT_STR = "management"
_LEFT_STR = "left"
_RIGHT_STR = "right"
_SVC_VN_MGMT = "svc-vn-mgmt"
_SVC_VN_LEFT = "svc-vn-left"
_SVC_VN_RIGHT = "svc-vn-right"
_VN_MGMT_SUBNET_CIDR = '10.250.1.0/24'
_VN_LEFT_SUBNET_CIDR = '10.250.2.0/24'
_VN_RIGHT_SUBNET_... | apache-2.0 |
ericholscher/merchant | billing/forms/authorize_net_forms.py | 7 | 1214 | from django import forms
class AuthorizeNetDPMForm(forms.Form):
x_card_num = forms.CharField(max_length=16, label="Credit Card #")
x_exp_date = forms.CharField(max_length=5, label="Exp Date (mm/yy)")
x_card_code = forms.CharField(max_length=4, label="CVV")
x_first_name = forms.CharField(max_length=50... | bsd-3-clause |
nrackleff/capstone | vendor/psy/psysh/test/tools/vis.py | 710 | 3428 | """
vis.py
======
Ctypes based module to access libbsd's strvis & strunvis functions.
The `vis` function is the equivalent of strvis.
The `unvis` function is the equivalent of strunvis.
All functions accept unicode string as input and return a unicode string.
Constants:
----------
* to select alternate encoding for... | gpl-2.0 |
aimas/TuniErp-8.0 | addons/portal/mail_thread.py | 390 | 2004 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
WhisperingGibbon/Photonic3D | docs/conf.py | 13 | 9208 | # -*- coding: utf-8 -*-
#
# Photonic3D documentation build configuration file, created by
# sphinx-quickstart on Mon Mar 21 17:22:30 2016.
#
# 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
# autogenerated file.
#
... | gpl-3.0 |
AnimationInVR/avango | attic/avango-vrpn/python/avango/vrpn/_dtrack_device.py | 6 | 2118 | import avango.script
from avango.script import field_has_changed
from _vrpn import *
from _dtrack_device import *
class DTrackTaregtIdName(avango.script.Script):
Id = avango.SFLong()
Name = avango.SFString()
def __str__(self):
return str(self.Id.value) + " " + self.Name.value
cla... | lgpl-3.0 |
googlefonts/fontbakery | Lib/fontbakery/designers_pb2.py | 3 | 3980 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: designers.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _ref... | apache-2.0 |
dpmehta02/linkedin-scrapy | linkedin/spiders/linkedin_spider.py | 1 | 3589 | from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request
from linkedin.items import LinkedinItem
class LinkedinSpider(CrawlSpider):
"""
Define the crawler's start URIs, s... | mit |
ldong/vim_youcompleteme | third_party/requests/requests/packages/chardet/big5prober.py | 2931 | 1684 | ######################## 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... | gpl-3.0 |
shingonoide/odoo | addons/l10n_fr/wizard/fr_report_compute_resultant.py | 374 | 2312 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 |
DavidWittman/ansible-modules-extras | net_infrastructure/a10_virtual_server.py | 40 | 11515 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Ansible module to manage A10 Networks slb virtual server objects
(c) 2014, Mischa Peters <mpeters@a10networks.com>
This file is part of Ansible
Ansible is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... | gpl-3.0 |
catapult-project/catapult-csm | third_party/google-endpoints/requests/packages/urllib3/contrib/ntlmpool.py | 312 | 4478 | """
NTLM authenticating pool, contributed by erikcederstran
Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10
"""
from __future__ import absolute_import
from logging import getLogger
from ntlm import ntlm
from .. import HTTPSConnectionPool
from ..packages.six.moves.http_client import HTTPSConnecti... | bsd-3-clause |
RPI-OPENEDX/edx-platform | common/djangoapps/course_action_state/migrations/0001_initial.py | 50 | 1808 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
from django.conf import settings
import xmodule_django.models
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_US... | agpl-3.0 |
blaze/dask | dask/dataframe/hyperloglog.py | 3 | 2433 | """Implementation of HyperLogLog
This implements the HyperLogLog algorithm for cardinality estimation, found
in
Philippe Flajolet, Éric Fusy, Olivier Gandouet and Frédéric Meunier.
"HyperLogLog: the analysis of a near-optimal cardinality estimation
algorithm". 2007 Conference on Analysis of Algori... | bsd-3-clause |
phpcanada/phpcanada | src/AppBundle/Resources/private/node_modules/gulp-sass/node_modules/node-sass/node_modules/node-gyp/gyp/tools/pretty_vcproj.py | 2637 | 9586 | #!/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.
"""Make the format of a vcproj really pretty.
This script normalize and sort an xml. It also fetches all the properties
inside linked... | mit |
dls-controls/pymalcolm | tests/test_modules/test_ADCore/test_exposuredeadtimepart.py | 1 | 2080 | import unittest
from mock import MagicMock, call
from scanpointgenerator import CompoundGenerator, LineGenerator
from malcolm.core import PartRegistrar
from malcolm.modules.scanning.parts import ExposureDeadtimePart
def make_generator(duration):
line1 = LineGenerator("y", "mm", 0, 2, 3)
line2 = LineGenerato... | apache-2.0 |
sonuyos/couchpotato | libs/xmpp/features.py | 199 | 8578 | ## features.py
##
## Copyright (C) 2003-2004 Alexey "Snake" Nezhdanov
##
## 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, or (at your option)
## any later versio... | gpl-3.0 |
coder-james/mxnet | python/mxnet/contrib/tensorboard.py | 14 | 2390 | # coding: utf-8
"""TensorBoard functions that can be used to log various status during epoch."""
from __future__ import absolute_import
import logging
class LogMetricsCallback(object):
"""Log metrics periodically in TensorBoard.
This callback works almost same as `callback.Speedometer`, but write TensorBoard... | apache-2.0 |
lordB8r/polls | ENV/lib/python2.7/site-packages/django/contrib/comments/moderation.py | 101 | 13555 | """
A generic comment-moderation system which allows configuration of
moderation options on a per-model basis.
To use, do two things:
1. Create or import a subclass of ``CommentModerator`` defining the
options you want.
2. Import ``moderator`` from this module and register one or more
models, passing the model... | mit |
jscott1989/django-allauth | allauth/socialaccount/south_migrations/0006_auto__del_field_socialapp_site.py | 80 | 6229 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting field 'SocialApp.site'
db.delete_column('socialaccount_socialapp', 'site_id')
def backwards... | mit |
glovebx/odoo | addons/point_of_sale/controllers/main.py | 243 | 1576 | # -*- coding: utf-8 -*-
import logging
import simplejson
import os
import openerp
import time
import random
import werkzeug.utils
from openerp import http
from openerp.http import request
from openerp.addons.web.controllers.main import module_boot, login_redirect
_logger = logging.getLogger(__name__)
class PosContr... | agpl-3.0 |
tensorflow/nmt | nmt/utils/common_test_utils.py | 4 | 4744 | # Copyright 2017 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... | apache-2.0 |
ros/catkin | cmake/test/download_checkmd5.py | 1 | 5773 | from __future__ import print_function
import errno
import hashlib
import os
import sys
try:
from urllib.request import addinfourl, BaseHandler, build_opener, Request, URLError
except ImportError:
from urllib2 import addinfourl, BaseHandler, build_opener, Request, URLError
from argparse import ArgumentParser
N... | bsd-3-clause |
pfmoore/invoke | invoke/parser/context.py | 1 | 9145 | import itertools
from ..vendor.lexicon import Lexicon
from .argument import Argument
def translate_underscores(name):
return name.lstrip('_').rstrip('_').replace('_', '-')
def to_flag(name):
name = translate_underscores(name)
if len(name) == 1:
return '-' + name
return '--' + name
def sort... | bsd-2-clause |
PinguinoIDE/pinguino-multilanguage | files/ide/methods/syntax.py | 2 | 3043 | #! /usr/bin/python
#-*- coding: utf-8 -*-
import datetime
today = datetime.datetime.now()
Autocompleter = {}
Autocompleter["directive"] = ["define", "include", "ifndef", "endif", "undef", "if", "elif", "else", "error", "warning"]
#from const.h
const = [ "PI", "HALF_PI", "TWO_PI", "DEG_TO_RAD", "RAD_TO_DEG", "NULL", ... | gpl-2.0 |
facebook/fbthrift | thrift/lib/py/Thrift.py | 1 | 11042 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# 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 ... | apache-2.0 |
natefoo/ansible-modules-extras | database/vertica/vertica_role.py | 148 | 8202 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... | gpl-3.0 |
40223119/cdaw11 | static/Brython3.1.0-20150301-090019/Lib/site-packages/turtle.py | 619 | 105984 | import math
from javascript import console
from browser import document, html
import _svg
_CFG = {"width" : 0.5, # Screen
"height" : 0.75,
"canvwidth" : 400,
"canvheight": 300,
"leftright": None,
"topbottom": None,
"mode": "standard", # TurtleScre... | gpl-3.0 |
singular78/shadowsocks | shadowsocks/shell.py | 270 | 12676 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 clowwindy
#
# 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... | apache-2.0 |
zubair-arbi/edx-platform | lms/djangoapps/django_comment_client/base/tests.py | 1 | 70746 | """Tests for django comment client views."""
from contextlib import contextmanager
import logging
import json
import ddt
from django.conf import settings
from django.core.cache import get_cache
from django.test.client import Client, RequestFactory
from django.contrib.auth.models import User
from django.core.management... | agpl-3.0 |
ilay09/keystone | keystone/resource/routers.py | 3 | 4658 | # 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 ... | apache-2.0 |
yavuzovski/playground | python/Udacity/cs215/find_eulerian_tour.py | 1 | 1219 | def find_eulerian_tour(graph):
# find the node with biggest degree
biggest_degree, biggest_node = 0, None
for i, node in enumerate(graph):
for e in node:
count = 0
outer_graph = graph[:]
for inner_node in outer_graph:
if e in inner_node:
... | gpl-3.0 |
diplomacy/research | diplomacy_research/models/layers/noisy_networks.py | 1 | 4039 | # ==============================================================================
# Copyright 2019 - Philip Paquette
#
# NOTICE: 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 rest... | mit |
techtonik/warehouse | warehouse/packaging/urls.py | 3 | 1076 | # Copyright 2013 Donald Stufft
#
# 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, so... | apache-2.0 |
ksrajkumar/openerp-6.1 | openerp/addons/l10n_fr/wizard/fr_report_compute_resultant.py | 7 | 2284 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (c) 2008 JAILLET Simon - CrysaLEAD - www.crysalead.fr
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
#... | agpl-3.0 |
FarnazH/horton | setup.py | 4 | 17908 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public Licens... | gpl-3.0 |
khertan/ownNotes | python/requests/packages/charade/big5prober.py | 206 | 1726 | ######################## 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 Ri... | gpl-3.0 |
vmturbo/nova | nova/tests/unit/virt/ironic/test_client_wrapper.py | 2 | 6018 | # Copyright 2014 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 by... | apache-2.0 |
sudheesh001/oh-mainline | vendor/packages/sphinx/sphinx/search/__init__.py | 15 | 10995 | # -*- coding: utf-8 -*-
"""
sphinx.search
~~~~~~~~~~~~~
Create a full-text search index for offline search.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from __future__ import with_statement
import re
import itertools
import cPickle a... | agpl-3.0 |
plang85/rough_surfaces | rough_surfaces/surface.py | 1 | 2746 | import numpy as np
class Surface(np.ndarray):
"""
One- or two-dimensional surface height representation.
The assumption upon which this framework is based is a uniform lattice size in both directions.
This is tightly integrated here. 'Surface' is the fundamental class that most modules build
upon... | mit |
bryx-inc/boto | boto/configservice/__init__.py | 107 | 1672 | # Copyright (c) 2015 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 rights... | mit |
amyvmiwei/kbengine | kbe/src/lib/python/Lib/test/test_importlib/test_abc.py | 10 | 33823 | import contextlib
import inspect
import io
import marshal
import os
import sys
from test import support
import types
import unittest
from unittest import mock
import warnings
from . import util
frozen_init, source_init = util.import_importlib('importlib')
frozen_abc, source_abc = util.import_importlib('importlib.abc'... | lgpl-3.0 |
Pexego/account-financial-tools | account_invoice_constraint_chronology/__init__.py | 74 | 1270 | # -*- coding: utf-8 -*-
#
#
# Authors: Adrien Peiffer
# Copyright (c) 2014 Acsone SA/NV (http://www.acsone.eu)
# All Rights Reserved
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsibility of assessing all potential
# consequences result... | agpl-3.0 |
turbokongen/home-assistant | homeassistant/components/ubus/device_tracker.py | 15 | 7775 | """Support for OpenWRT (ubus) routers."""
import json
import logging
import re
import requests
import voluptuous as vol
from homeassistant.components.device_tracker import (
DOMAIN,
PLATFORM_SCHEMA,
DeviceScanner,
)
from homeassistant.const import CONF_HOST, CONF_PASSWORD, CONF_USERNAME, HTTP_OK
from home... | apache-2.0 |
duramato/SickRage | lib/concurrent/futures/_compat.py | 106 | 4976 | from keyword import iskeyword as _iskeyword
from operator import itemgetter as _itemgetter
import sys as _sys
def namedtuple(typename, field_names):
"""Returns a new subclass of tuple with named fields.
>>> Point = namedtuple('Point', 'x y')
>>> Point.__doc__ # docstring for the new cla... | gpl-3.0 |
40223139/203739test | static/Brython3.1.0-20150301-090019/Lib/xml/dom/pulldom.py | 850 | 11761 | 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(... | gpl-3.0 |
Yannig/ansible | lib/ansible/playbook/playbook_include.py | 55 | 6748 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
yati-sagade/RyDyrect | djangoappengine/management/commands/runserver.py | 6 | 6549 | from optparse import make_option
import logging
import sys
from django.db import connections
from ...boot import PROJECT_DIR
from ...db.base import DatabaseWrapper, get_datastore_paths
from django.core.management.base import BaseCommand
from django.core.management.commands.runserver import BaseRunserverCommand
from dj... | bsd-3-clause |
7kbird/chrome | tools/telemetry/telemetry/results/buildbot_output_formatter.py | 41 | 4594 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry import perf_tests_helper
from telemetry import value as value_module
from telemetry.results import output_formatter
from telemetry.value impor... | bsd-3-clause |
jaywreddy/django | tests/template_tests/filter_tests/test_make_list.py | 345 | 1611 | from django.template.defaultfilters import make_list
from django.test import SimpleTestCase
from django.test.utils import str_prefix
from django.utils.safestring import mark_safe
from ..utils import setup
class MakeListTests(SimpleTestCase):
"""
The make_list filter can destroy existing escaping, so the resu... | bsd-3-clause |
ramineni/myironic | ironic/tests/drivers/drac/utils.py | 10 | 2393 | # -*- coding: utf-8 -*-
#
# Copyright 2014 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... | apache-2.0 |
cleemesser/eeg-hdfstorage | scripts/edf2eeghdf.py | 1 | 51534 | # -*- coding: utf-8 -*-
from __future__ import division, absolute_import, print_function # py2.6 with_statement
import sys
import pprint
import h5py
import numpy as np
import os.path
# date related stuff
import datetime
import dateutil
import dateutil.tz
import dateutil.parser
import arrow
# compatibility
import f... | bsd-3-clause |
mikewiebe-ansible/ansible | lib/ansible/modules/cloud/vultr/vultr_dns_domain_info.py | 14 | 2916 | #!/usr/bin/python
#
# (c) 2018, Yanis Guenane <yanis+ansible@guenane.org>
# 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',
... | gpl-3.0 |
OpenCorpora/opencorpora | scripts/validators/year_valid.py | 2 | 3240 | # -*- coding: utf-8 -*-
import ConfigParser
import MySQLdb
import sys
import re
path = sys.argv[1]
cp = ConfigParser.ConfigParser()
cp.read(path)
hostname = cp.get ('mysql', 'host')
dbname = cp.get ('mysql', 'dbname')
username = cp.get ('mysql', 'user')
password = cp.get ('mysql', 'passwd')
db = MySQLdb.connect(... | gpl-2.0 |
tragiclifestories/django | django/contrib/contenttypes/migrations/0001_initial.py | 585 | 1227 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import django.contrib.contenttypes.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='ContentType',
fields=... | bsd-3-clause |
tsdmgz/ansible | lib/ansible/module_utils/facts/network/freebsd.py | 232 | 1190 | # This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is distributed in the hope that ... | gpl-3.0 |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_11_01/models/azure_reachability_report_py3.py | 1 | 1995 | # 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 ... | mit |
jholloman/node-gyp | gyp/test/generator-output/gyptest-rules.py | 74 | 1786 | #!/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 --generator-output= behavior when using rules.
"""
import TestGyp
# Ninja and Android don't support --generator-output.
test ... | mit |
mtanski/samba | buildtools/wafadmin/Constants.py | 16 | 1308 | #!/usr/bin/env python
# encoding: utf-8
# Yinon dot me gmail 2008
"""
these constants are somewhat public, try not to mess them
maintainer: the version number is updated from the top-level wscript file
"""
# do not touch these three lines, they are updated automatically
HEXVERSION=0x105019
WAFVERSION="1.5.19"
WAFREV... | gpl-3.0 |
syci/OCB | addons/bus/models/bus_presence.py | 12 | 4499 | # -*- coding: utf-8 -*-
import datetime
import random
import time
from openerp import api, fields, models
from openerp import tools
from openerp.tools.misc import DEFAULT_SERVER_DATETIME_FORMAT
from openerp.addons.bus.models.bus import TIMEOUT
DISCONNECTION_TIMER = TIMEOUT + 5
AWAY_TIMER = 600 # 10 minutes
class B... | agpl-3.0 |
allenp/odoo | addons/l10n_be_intrastat/l10n_be_intrastat.py | 18 | 5678 | # -*- encoding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from openerp import fields, models
class account_invoice_line(models.Model):
_inherit = "account.invoice.line"
intrastat_transaction_id = fields.Many2one('l10n_be_intrastat.transaction', 'Intrastat Transacti... | gpl-3.0 |
Kaushalop/apv | pdfview/scripts/pjpp.py | 111 | 7409 | #!/usr/bin/env pypy
import os, sys, logging, re
import argparse
import fnmatch
configurations = {'lite', 'pro'}
package_dirs = {
'lite': ('src/cx/hell/android/pdfview',),
'pro': ('src/cx/hell/android/pdfviewpro',)
}
file_replaces = {
'lite': (
'cx.hell.android.pdfview.',
'"cx.hell.an... | gpl-3.0 |
playm2mboy/edx-platform | lms/djangoapps/instructor/features/data_download.py | 59 | 3758 | """
Define steps for instructor dashboard - data download tab
acceptance tests.
"""
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from nose.tools import assert_in, assert_regexp_matches # pylint: disable=no-name-in-module
from terrain.steps import reload_t... | agpl-3.0 |
krocard/parameter-framework | test/functional-tests-legacy/PfwTestCase/Types/tUINT32_ARRAY.py | 2 | 16142 | #!/usr/bin/python2
# -*-coding:utf-8 -*
# Copyright (c) 2011-2015, Intel Corporation
# 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 co... | bsd-3-clause |
pyfisch/servo | tests/jquery/run_jquery.py | 13 | 9583 | #!/usr/bin/env python
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.
import os
import re
import subprocess
import sys
import BaseHTTPServer
import SimpleHTTPServer
i... | mpl-2.0 |
mkaluza/external_chromium_org | chrome/common/extensions/docs/server2/cron_servlet_test.py | 23 | 9487 | #!/usr/bin/env python
# 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 unittest
from appengine_wrappers import GetAppVersion
from app_yaml_helper import AppYamlHelper
from cron_servlet import CronSe... | bsd-3-clause |
coursemdetw/2014cdb | wsgi/static/Brython2.1.3-20140704-213726/Lib/linecache.py | 785 | 3864 | """Cache lines from files.
This is intended to read lines from modules imported -- hence if a filename
is not found, it will look down the module search path for a file by
that name.
"""
import sys
import os
import tokenize
__all__ = ["getline", "clearcache", "checkcache"]
def getline(filename, lineno, module_globa... | gpl-2.0 |
ray-project/ray | python/ray/serve/tests/test_fastapi.py | 1 | 12857 | import sys
import time
from typing import Any, List, Optional
import tempfile
import pytest
import inspect
import requests
from fastapi import (Cookie, Depends, FastAPI, Header, Query, Request,
APIRouter, BackgroundTasks, Response)
from fastapi.middleware.cors import CORSMiddleware
from fastapi.re... | apache-2.0 |
lavish205/olympia | src/olympia/reviewers/tests/test_views.py | 1 | 210461 | # -*- coding: utf-8 -*-
import json
import os
import time
import urlparse
from collections import OrderedDict
from datetime import datetime, timedelta
from django.conf import settings
from django.core import mail
from django.core.cache import cache
from django.core.files import temp
from django.core.files.base import... | bsd-3-clause |
gitizenme/ImprovWithAlexa | improvwithalexa_function.py | 1 | 6601 | import logging
from flask import Flask, render_template
from flask_ask import Ask, statement, question, session
from chatterbot import ChatBot
app = Flask(__name__)
ask = Ask(app, "/")
logging.getLogger("flask_ask").setLevel(logging.DEBUG)
# Create a new instance of a ChatBot
chatbot = ChatBot(
"Improv",
read... | mit |
rowhit/h2o-2 | py/testdir_multi_jvm/test_rf_libsvm_fvec.py | 8 | 3412 | import unittest
import random, sys, time, os
sys.path.extend(['.','..','../..','py'])
import h2o, h2o_cmd, h2o_browse as h2b, h2o_import as h2i
class Basic(unittest.TestCase):
def tearDown(self):
h2o.check_sandbox_for_errors()
@classmethod
def setUpClass(cls):
global SEED
SEED = h... | apache-2.0 |
DataKitchen/DKCloudCommand | DKCloudCommand/tests/TestCloudCommandRunner.py | 1 | 44253 | import re
import unittest
import datetime, time
import tempfile
import pickle
from sys import path, stdout
import os
import shutil
# if '../../' not in path:
# path.insert(0, '../../')
from BaseTestCloud import BaseTestCloud
from DKCloudCommandRunner import DKCloudCommandRunner
from DKActiveServingWatcher import *
... | agpl-3.0 |
endlessm/chromium-browser | third_party/angle/third_party/VK-GL-CTS/src/scripts/caselist_diff.py | 6 | 15197 | # -*- coding: utf-8 -*-
#-------------------------------------------------------------------------
# drawElements Quality Program utilities
# --------------------------------------
#
# Copyright 2015 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use t... | bsd-3-clause |
willprice/weboob | modules/weather/browser.py | 7 | 2349 | # -*- coding: utf-8 -*-
# Copyright(C) 2012 Arno Renevier
#
# This file is part of weboob.
#
# weboob 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, or
# (at your opti... | agpl-3.0 |
bdestombe/flopy-1 | autotest/t017_test.py | 2 | 9030 | # Test binary and formatted data readers
import numpy as np
def test_formattedfile_read():
import os
import flopy
h = flopy.utils.FormattedHeadFile(
os.path.join('..', 'examples', 'data', 'mf2005_test',
'test1tr.githds'))
assert isinstance(h, flopy.utils.FormattedHeadFile)... | bsd-3-clause |
devendermishrajio/nova_test_latest | nova/tests/unit/api/openstack/compute/test_versions.py | 5 | 13984 | # Copyright 2010-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... | apache-2.0 |
blackye/luscan-devel | golismero/api/data/information/traceroute.py | 8 | 8159 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Traceroute results.
"""
__license__ = """
GoLismero 2.0 - The web knife - Copyright (C) 2011-2014
Golismero project site: https://github.com/golismero
Golismero project mail: contact@golismero-project.com
This program is free software; you can redistribute it and/or... | gpl-2.0 |
witlox/elasticluster | elasticluster/providers/ec2_boto.py | 1 | 25751 | #
# Copyright (C) 2013, 2018 S3IT, University of Zurich
#
# 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.
#
# This progr... | gpl-3.0 |
bratsche/Neutron-Drive | google_appengine/lib/webob_0_9/webob/multidict.py | 32 | 15977 | # (c) 2005 Ian Bicking and contributors; written for Paste (http://pythonpaste.org)
# Licensed under the MIT license: http://www.opensource.org/licenses/mit-license.php
"""
Gives a multi-value dictionary object (MultiDict) plus several wrappers
"""
import cgi
import copy
import sys
from webob.util.dictmixin import Dict... | bsd-3-clause |
mwx1993/TACTIC | src/asset_security.py | 7 | 3762 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 |
tweemeterjop/thug | thug/ActiveX/modules/AnswerWorks.py | 1 | 1041 | # Vantage Linguistics AnserWorks ActiveX Controls
# CVE-2007-6387
import logging
log = logging.getLogger("Thug")
def GetHistory(self, arg):
if len(arg) > 215:
log.ThugLogging.log_exploit_event(self._window.url,
"AnswerWorks ActiveX",
... | gpl-2.0 |
blekhmanlab/hominid | hominid/sort_results.py | 1 | 6152 | """
Read a rvcf file with stability selection scores for taxa.
Sort the dataframe by rsq_median.
Print results.
usage:
python sort_results.py \
../example/stability_selection_example_output.vcf \
../example/hominid_example_taxon_table_input.txt \
arcsinsqrt \
0.5 \
10
"""
im... | mit |
pyfa-org/eos | tests/integration/container/unordered/test_type_unique_set.py | 1 | 8045 | # ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... | lgpl-3.0 |
franky88/emperioanimesta | env/Lib/site-packages/setuptools/command/bdist_egg.py | 130 | 17155 | """setuptools.command.bdist_egg
Build .egg distributions"""
from distutils.errors import DistutilsSetupError
from distutils.dir_util import remove_tree, mkpath
from distutils import log
from types import CodeType
import sys
import os
import textwrap
import marshal
import six
from pkg_resources import get_build_plat... | gpl-3.0 |
mauriceling/dose | examples/07_logging_database_extraction.py | 2 | 5093 | '''
Example 07: Extracting data from simulation logging database
'''
# needed to run this example without prior
# installation of DOSE into Python site-packages
try:
import run_examples_without_installation
except ImportError: pass
# Example codes starts from here
import dose.database_calls as d
print("Connecting t... | gpl-3.0 |
thumbimigwe/golber | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/build-2.7/pygments/styles/bw.py | 364 | 1355 | # -*- coding: utf-8 -*-
"""
pygments.styles.bw
~~~~~~~~~~~~~~~~~~
Simple black/white only style.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token import Keyword, Name, Comment, Strin... | mit |
nrb/ansible-modules-extras | database/vertica/vertica_facts.py | 148 | 9176 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# 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.
#... | gpl-3.0 |
Kodicine/repository.890m.com | plugin.video.armagedomfilmes/mechanize/_mechanize.py | 133 | 24916 | """Stateful programmatic WWW navigation, after Perl's WWW::Mechanize.
Copyright 2003-2006 John J. Lee <jjl@pobox.com>
Copyright 2003 Andy Lester (original Perl code)
This code is free software; you can redistribute it and/or modify it
under the terms of the BSD or ZPL 2.1 licenses (see the file COPYING.txt
included w... | gpl-2.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.