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 |
|---|---|---|---|---|---|
Shinoby1992/xstream | default.py | 1 | 1196 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
from os import getcwd
from os.path import join
from sys import path
import xbmc
from xbmc import log
from resources.lib import common
__settings__ = common.addon
__cwd__ = common.addonPath
# Add different library path
path.append(join(__cwd__, "resources",... | gpl-3.0 |
jupierce/openshift-tools | ansible/roles/lib_zabbix/library/zbx_action.py | 12 | 24841 | #!/usr/bin/env python
# vim: expandtab:tabstop=4:shiftwidth=4
'''
Ansible module for zabbix actions
'''
#
# Zabbix action ansible module
#
#
# Copyright 2015 Red Hat Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# Y... | apache-2.0 |
mkwiatkowski/pythoscope | pythoscope/generator/cleaner.py | 2 | 2911 | from pythoscope.generator.dependencies import objects_affected_by_side_effects,\
resolve_dependencies
from pythoscope.generator.lines import *
from pythoscope.generator.method_call_context import MethodCallContext
from pythoscope.side_effect import SideEffect
from pythoscope.serializer import ImmutableObject
from p... | mit |
aaltinisik/OCBAltinkaya | addons/hr_timesheet_invoice/report/account_analytic_profit.py | 281 | 5811 | # -*- 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... | agpl-3.0 |
Ingenico-ePayments/connect-sdk-python2 | examples/merchant/services/iin_details_example.py | 2 | 1113 | #
# This class was auto-generated from the API references found at
# https://epayments-api.developer-ingenico.com/s2sapi/v1/
#
import os
from ingenico.connect.sdk.factory import Factory
from ingenico.connect.sdk.domain.services.get_iin_details_request import GetIINDetailsRequest
class IINDetailsExample(object):
... | mit |
nuvotonmcu/uboot | tools/patman/series.py | 7 | 9140 | # Copyright (c) 2011 The Chromium OS Authors.
#
# See file CREDITS for list of people who contributed to this
# project.
#
# 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
# t... | gpl-2.0 |
wakermahmud/docker-registry | docker_registry/lib/checksums.py | 35 | 2253 | # -*- coding: utf-8 -*-
import hashlib
import logging
logger = logging.getLogger(__name__)
def sha256_file(fp, data=None):
h = hashlib.sha256(data or '')
if not fp:
return h.hexdigest()
while True:
buf = fp.read(4096)
if not buf:
break
h.update(buf)
retur... | apache-2.0 |
jyotsna1820/django | tests/comment_tests/tests/__init__.py | 13 | 2811 | from django.contrib.auth.models import User
from django.contrib.comments.forms import CommentForm
from django.contrib.comments.models import Comment
from django.contrib.contenttypes.models import ContentType
from django.contrib.sites.models import Site
from django.test import TestCase, override_settings
from ..models ... | bsd-3-clause |
steedos/odoo7 | openerp/addons/point_of_sale/__init__.py | 61 | 1191 | # -*- 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... | agpl-3.0 |
nirmeshk/oh-mainline | vendor/packages/celery/celery/tests/test_events/test_events_state.py | 18 | 10779 | from __future__ import absolute_import
from time import time
from itertools import count
from celery import states
from celery.events import Event
from celery.events.state import State, Worker, Task, HEARTBEAT_EXPIRE
from celery.utils import uuid
from celery.tests.utils import unittest
class replay(object):
d... | agpl-3.0 |
sokolic/miniSASS | minisass_registration/forms.py | 1 | 6601 | from django import forms
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
# Frank Sokolic: June 2018 - Disabled all the recaptcha code as version 1 is no longer supported
#from cmsplugin_contact.nospam.widgets import RecaptchaChallenge, RecaptchaResponse
from registration.forms ... | gpl-3.0 |
abhilashnta/edx-platform | lms/djangoapps/instructor/offline_gradecalc.py | 58 | 3278 | """
======== Offline calculation of grades =============================================================
Computing grades of a large number of students can take a long time. These routines allow grades to
be computed offline, by a batch process (eg cronjob).
The grades are stored in the OfflineComputedGrade table of... | agpl-3.0 |
julianprabhakar/eden_car | modules/s3db/skeleton.py | 15 | 7579 | # -*- coding: utf-8 -*-
"""
This is just a commented template to copy/paste from when implementing
new models. Be sure you replace this docstring by something more
appropriate, e.g. a short module description and a license statement.
The module prefix is the same as the filename (without the ".py"), in... | mit |
kwailamchan/programming-languages | python/facepp/cmdtools/cmdtool.py | 8 | 2521 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
# $File: cmdtool.py
# $Date: Sat Apr 06 15:42:43 2013 +0800
# $Author: jiakai@megvii.com
#
# This program is free software. It comes without any warranty, to
# the extent permitted by applicable law. You can redistribute it
# and/or modify it under the terms of the Do What... | mit |
wemanuel/smry | Crypto/Signature/PKCS1_v1_5.py | 126 | 8637 | # -*- coding: utf-8 -*-
#
# Signature/PKCS1-v1_5.py : PKCS#1 v1.5
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual,... | apache-2.0 |
jjffryan/pymtl | pclib/test/TestRandomDelay.py | 8 | 2895 | #=======================================================================
# TestRandomDelay
#=======================================================================
import random
from pymtl import *
from pclib.ifcs import InValRdyBundle, OutValRdyBundle
#----------------------------------------------------------... | bsd-3-clause |
EvolutionClip/pyload | module/plugins/hooks/OverLoadMe.py | 1 | 1605 | # -*- coding: utf-8 -*-
from module.plugins.internal.MultiHook import MultiHook
class OverLoadMe(MultiHook):
__name__ = "OverLoadMe"
__type__ = "hook"
__version__ = "0.04"
__config__ = [("pluginmode" , "all;listed;unlisted", "Use for plugins" , "all"),
... | gpl-3.0 |
RuudBurger/CouchPotatoV1 | library/hachoir_parser/misc/gnome_keyring.py | 86 | 6255 | """
Gnome keyring parser.
Sources:
- Gnome Keyring source code,
function generate_file() in keyrings/gkr-keyring.c,
Author: Victor Stinner
Creation date: 2008-04-09
"""
from hachoir_core.tools import paddingSize
from hachoir_parser import Parser
from hachoir_core.field import (FieldSet,
Bit, NullBits, NullBy... | gpl-3.0 |
weaver-viii/h2o-3 | h2o-py/tests/testdir_jira/pyunit_NOPASS_hex_1897_glm_offset.py | 3 | 2412 | import sys
sys.path.insert(1, "../../")
import h2o
def offset_1897(ip, port):
print 'Checking binomial models for GLM with and without offset'
print 'Import prostate dataset into H2O and R...'
prostate_hex = h2o.import_file(h2o.locate("smalldata/prostate/prostate.csv"))
print "Checking binomial ... | apache-2.0 |
dennex/DJMarlin | createTemperatureLookupMarlin.py | 56 | 4662 | #!/usr/bin/python
#
# Creates a C code lookup table for doing ADC to temperature conversion
# on a microcontroller
# based on: http://hydraraptor.blogspot.com/2007/10/measuring-temperature-easy-way.html
"""Thermistor Value Lookup Table Generator
Generates lookup to temperature values for use in a microcontroller in C ... | gpl-3.0 |
sillydan1/WhatEverEngine | packages/IronPython.StdLib.2.7.5/content/Lib/pkgutil.py | 74 | 20013 | """Utilities to support packages."""
# NOTE: This module must remain compatible with Python 2.3, as it is shared
# by setuptools for distribution with Python 2.3 and up.
import os
import sys
import imp
import os.path
from types import ModuleType
__all__ = [
'get_importer', 'iter_importers', 'get_loader', 'find_l... | apache-2.0 |
ChrisYammine/ChrisYammine.github.io | node_modules/grunt-docker/node_modules/docker/node_modules/pygmentize-bundled/vendor/pygments/pygments/styles/borland.py | 364 | 1562 | # -*- coding: utf-8 -*-
"""
pygments.styles.borland
~~~~~~~~~~~~~~~~~~~~~~~
Style similar to the style used in the Borland IDEs.
:copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
from pygments.style import Style
from pygments.token impo... | mit |
zathras777/pywind | pywind/elexon/cmd.py | 1 | 11805 | from datetime import timedelta, time, datetime, date
from pywind.elexon.api import B1420, B1330, B1320, FUELINST, \
DERSYSDATA, DERBMDATA, BMUNITSEARCH, \
B1610, B1630, UOU2T52W
from pywind.elexon.unit import BalancingData
from pywind.utils import StdoutForma... | unlicense |
dkodnik/arp | addons/document/odt2txt.py | 435 | 2110 | #!/usr/bin/python
# -*- 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 unde... | agpl-3.0 |
LLNL/spack | lib/spack/spack/cmd/configure.py | 2 | 3097 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
import argparse
import llnl.util.tty as tty
import spack.cmd
import spack.cmd.common.arguments as arguments
import spack.... | lgpl-2.1 |
amghost/myblog | node_modules/pygmentize-bundled/vendor/pygments/pygments/lexers/_phpbuiltins.py | 274 | 122046 | # -*- coding: utf-8 -*-
"""
pygments.lexers._phpbuiltins
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This file loads the function names and their modules from the
php webpage and generates itself.
Do not alter the MODULES dict by hand!
WARNING: the generation transfers quite much data over your
... | mit |
txemi/ansible | lib/ansible/modules/cloud/amazon/s3_lifecycle.py | 71 | 15738 | #!/usr/bin/python
#
# This is a 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 Ansible library is distributed in the hope that i... | gpl-3.0 |
spiceqa/virt-test | tests/dd_test.py | 3 | 3846 | """
Configurable on-guest dd test.
:author: Lukas Doktor <ldoktor@redhat.com>
:copyright: 2012 Red Hat, Inc.
"""
import logging
from autotest.client.shared import error
from virttest import aexpect
@error.context_aware
def run_dd_test(test, params, env):
"""
Executes dd with defined parameters and checks the ... | gpl-2.0 |
dracos/QGIS | python/plugins/processing/algs/lidar/lastools/las2dem.py | 9 | 3423 | # -*- coding: utf-8 -*-
"""
***************************************************************************
las2dem.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
---------------------
D... | gpl-2.0 |
qsnake/gpaw | gpaw/test/wannier_ethylene.py | 1 | 2008 | import os
from ase import Atom, Atoms
from gpaw import GPAW
from gpaw.test import equal
from gpaw.wannier import Wannier
import numpy as np
# GPAW wannier example for ethylene corresponding to the ASE Wannier
# tutorial.
a = 6.0 # Size of unit cell (Angstrom)
ethylene = Atoms([Atom('H', (-1.235,-0.936 , 0 )),
... | gpl-3.0 |
marratj/ansible | test/units/modules/cloud/amazon/test_s3.py | 22 | 1440 | import pytest
import unittest
try:
import ansible.modules.cloud.amazon.s3 as s3
except ImportError:
from nose.plugins.skip import SkipTest
raise SkipTest("This test requires the s3 Python libraries")
from ansible.module_utils.six.moves.urllib.parse import urlparse
boto3 = pytest.importorskip("boto3")
... | gpl-3.0 |
spvkgn/youtube-dl | youtube_dl/extractor/digg.py | 28 | 1882 | from __future__ import unicode_literals
from .common import InfoExtractor
from ..utils import js_to_json
class DiggIE(InfoExtractor):
_VALID_URL = r'https?://(?:www\.)?digg\.com/video/(?P<id>[^/?#&]+)'
_TESTS = [{
# JWPlatform via provider
'url': 'http://digg.com/video/sci-fi-short-jonah-dani... | unlicense |
jpypi/dup-image-search | simple_hash/fast_simple_hash.py | 1 | 1638 | #!/usr/bin/env python2
"""
simple_hash.py
Generates a hash using the "simple" method outlined on:
http://www.hackerfactor.com/blog/index.php?/archives/432-Looks-Like-It.html
:author: Brandon Arrendondo
:author: James Jenkins
:license: MIT
"""
import sys
import argparse
import numpy
import glo... | mit |
josephsnyder/VistA | Scripts/VistAMenuUtil.py | 2 | 8783 | #---------------------------------------------------------------------------
# Copyright 2013 The Open Source Electronic Health Record Agent
#
# 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
#
... | apache-2.0 |
taget/node | scripts/password.py | 1 | 2111 | #!/usr/bin/python
# password.py - Copyright (C) 2010 Red Hat, Inc.
# Written by Joey Boggs <jboggs@redhat.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; version 2 of the License.
#
# Thi... | gpl-2.0 |
jboeuf/grpc | tools/distrib/python/grpcio_tools/grpc_tools/protoc.py | 20 | 1198 | #!/usr/bin/env python
# Copyright 2016 gRPC authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 |
hendradarwin/ITK | Wrapping/Generators/Python/Tests/notYetUsable/itkCurvatureFlowTestPython2.py | 11 | 3693 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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... | apache-2.0 |
vybstat/scikit-learn | examples/linear_model/plot_sgd_iris.py | 286 | 2202 | """
========================================
Plot multi-class SGD on the iris dataset
========================================
Plot decision surface of multi-class SGD on iris dataset.
The hyperplanes corresponding to the three one-versus-all (OVA) classifiers
are represented by the dashed lines.
"""
print(__doc__)
... | bsd-3-clause |
gamingrobot/SpockBot | spockbot/plugins/helpers/entities.py | 1 | 6663 | """
An entity tracker
"""
from spockbot.mcdata.utils import Info
from spockbot.plugins.base import PluginBase, pl_announce
class MCEntity(Info):
eid = 0
status = 0
nbt = None
metadata = None
class MovementEntity(MCEntity):
x = 0
y = 0
z = 0
yaw = 0
pitch = 0
on_ground = True
... | mit |
netgroup/dreamer-ryu | ryu/services/protocols/vrrp/monitor_linux.py | 22 | 8398 | # Copyright (C) 2013 Nippon Telegraph and Telephone Corporation.
# Copyright (C) 2013 Isaku Yamahata <yamahata at private email ne jp>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# h... | apache-2.0 |
OpenERPJeff/gooderp_addons | sell/report/sell_summary_goods.py | 6 | 6707 | # -*- coding: utf-8 -*-
from odoo import fields, models, api
import odoo.addons.decimal_precision as dp
import datetime
class SellSummaryGoods(models.Model):
_name = 'sell.summary.goods'
_inherit = 'report.base'
_description = u'销售汇总表(按商品)'
id_lists = fields.Text(u'移动明细行id列表')
goods_categ = fiel... | agpl-3.0 |
0x46616c6b/ansible-modules-core | system/seboolean.py | 90 | 6637 | #!/usr/bin/python
# (c) 2012, Stephen Fromm <sfromm@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 optio... | gpl-3.0 |
IsCoolEntertainment/debpkg_python-paramiko | paramiko/kex_group1.py | 8 | 5300 | # Copyright (C) 2003-2007 Robey Pointer <robeypointer@gmail.com>
#
# This file is part of paramiko.
#
# Paramiko 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 2.1 of the License, or (a... | lgpl-2.1 |
pietroquaglio/elephant | elephant/unitary_event_analysis.py | 2 | 27650 | # -*- coding: utf-8 -*-
"""
Unitary Event (UE) analysis is a statistical method that
enables to analyze in a time resolved manner excess spike correlation
between simultaneously recorded neurons by comparing the empirical
spike coincidences (precision of a few ms) to the expected number
based on the firing rates of... | bsd-3-clause |
Tejal011089/osmosis_erpnext | erpnext/selling/doctype/sales_order/test_sales_order.py | 11 | 8741 | # 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.utils import flt, add_days
import frappe.permissions
import unittest
from erpnext.selling.doctype.sales_order.sales_order \
im... | agpl-3.0 |
yokose-ks/edx-platform | common/lib/sandbox-packages/verifiers/draganddrop.py | 70 | 15072 | """ Grader of drag and drop input.
Client side behavior: user can drag and drop images from list on base image.
Then json returned from client is:
{
"draggable": [
{ "image1": "t1" },
{ "ant": "t2" },
{ "molecule": "t3" },
]
}
values are target names.
or:
{
"dra... | agpl-3.0 |
closureplease/npm-closure-tools | closure-bin/labs/code/generate_jsdoc_test.py | 212 | 3494 | #!/usr/bin/env python
#
# Copyright 2013 The Closure Library 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
... | mit |
baoson2211/ardupilot | Tools/LogAnalyzer/tests/TestIMUMatch.py | 61 | 3781 | from LogAnalyzer import Test,TestResult
import DataflashLog
from math import sqrt
class TestIMUMatch(Test):
'''test for empty or near-empty logs'''
def __init__(self):
Test.__init__(self)
self.name = "IMU Mismatch"
def run(self, logdata, verbose):
#tuning parameters:
war... | gpl-3.0 |
boundlessgeo/qgis-connect-plugin | boundlessconnect/connect.py | 1 | 16927 | # -*- coding: utf-8 -*-
from builtins import object
import os
import re
import json
import base64
import urllib2
import tempfile
from copy import copy
import webbrowser
from qgis.PyQt.QtGui import QIcon, QCursor
from qgis.PyQt.QtCore import Qt, QUrl, QFile, QEventLoop
from qgis.PyQt.QtWidgets import QMessageBox, QAp... | gpl-2.0 |
WillianPaiva/1flow | oneflow/core/migrations/0045_auto__chg_field_subscription_name.py | 2 | 37393 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Subscription.name'
db.alter_column(u'core_subscription... | agpl-3.0 |
minorua/QGIS | python/plugins/processing/gui/PostgisTableSelector.py | 13 | 3823 | # -*- coding: utf-8 -*-
"""
***************************************************************************
PostgisTableSelector.py
---------------------
Date : November 2015
Copyright : (C) 2015 by Victor Olaya
Email : volayaf at gmail dot com
****************... | gpl-2.0 |
dataxu/ansible | lib/ansible/modules/network/aci/aci_tenant_span_dst_group.py | 14 | 6644 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
'status': ['preview'],
... | gpl-3.0 |
wwj718/murp-edx | cms/djangoapps/contentstore/features/problem-editor.py | 7 | 12170 | # disable missing docstring
# pylint: disable=C0111
import json
from lettuce import world, step
from nose.tools import assert_equal, assert_true # pylint: disable=E0611
from common import type_in_codemirror, open_new_course
from advanced_settings import change_value, ADVANCED_MODULES_KEY
from course_import import imp... | agpl-3.0 |
tomwire/AutobahnPython | examples/asyncio/websocket/testee/testee_server.py | 2 | 3666 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Softw... | mit |
astagi/django-cms | cms/admin/permissionadmin.py | 4 | 7322 | # -*- coding: utf-8 -*-
from copy import deepcopy
from django.contrib import admin
from django.contrib.admin import site
from django.contrib.auth.admin import UserAdmin
from django.utils.translation import ugettext as _
from cms.admin.forms import GlobalPagePermissionAdminForm, PagePermissionInlineAdminForm, ViewRestr... | bsd-3-clause |
11craft/pelican | pelican/tools/pelican_import.py | 5 | 31970 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals, print_function
import argparse
try:
from html import unescape # py3.4+
except ImportError:
from six.moves.html_parser import HTMLParser
unescape = HTMLParser().unescape
import os
import re
import subprocess
import sys
i... | agpl-3.0 |
bikong2/django | tests/null_fk_ordering/models.py | 210 | 1605 | """
Regression tests for proper working of ForeignKey(null=True). Tests these bugs:
* #7512: including a nullable foreign key reference in Meta ordering has un
xpected results
"""
from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
... | bsd-3-clause |
xxn59/weat | app/views.py | 1 | 14710 | from flask import render_template, flash, redirect, session, url_for, request, g, make_response
from flask.ext.login import login_user, logout_user, current_user, login_required
from . import db, lm
from . import app
from .forms import LoginForm, SignupForm, FoodForm, ChangePasswordForm, AddFoodForm, EditForm
from date... | mit |
saucelabs/Diamond | src/collectors/onewire/onewire.py | 15 | 2414 | # coding=utf-8
"""
The OneWireCollector collects data from 1-Wire Filesystem
You can configure which sensors are read in two way:
- add section [scan] with attributes and aliases,
(collector will scan owfs to find attributes)
or
- add sections with format id:$SENSOR_ID
See also: http://owfs.org/
Author: Tomas... | mit |
wmealem/VerbTrainer | languages/spanish.py | 1 | 8117 | # Spanish verb conjugations
from collections import namedtuple, OrderedDict
# Spanish has two forms of the sps familiar - 'tú' and 'vos'
SpanishCategory = namedtuple('SpanishCategory', 'fps sps spsv tps fpp spp tpp')
_PRONOUNS = SpanishCategory('yo', 'tú', 'vos', 'él/ella/usted',
'nosotros/... | mit |
kevinastone/sentry | src/sentry/web/frontend/debug/mail.py | 8 | 5009 | from __future__ import absolute_import, print_function
import logging
import traceback
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from sentry.models import (
Activity, Event, Group, Organization, Project, Rule, Team
)
from sentry.utils.samples import load_data
from... | bsd-3-clause |
bbansalWolfPack/servo | tests/wpt/css-tests/tools/manifest/manifest.py | 89 | 12720 | import json
import os
from collections import defaultdict
from item import item_types, ManualTest, WebdriverSpecTest, Stub, RefTest, TestharnessTest
from log import get_logger
from sourcefile import SourceFile
from utils import from_os_path, to_os_path
CURRENT_VERSION = 2
class ManifestError(Exception):
pass
... | mpl-2.0 |
ahmadiga/min_edx | common/lib/xmodule/xmodule/modulestore/draft_and_published.py | 71 | 5876 | """
This module provides an abstraction for Module Stores that support Draft and Published branches.
"""
import threading
from abc import ABCMeta, abstractmethod
from contextlib import contextmanager
from . import ModuleStoreEnum, BulkOperationsMixin
# Things w/ these categories should never be marked as version=DRAF... | agpl-3.0 |
leesavide/pythonista-docs | Documentation/matplotlib/mpl_examples/pylab_examples/multi_image.py | 12 | 2201 | #!/usr/bin/env python
'''
Make a set of images with a single colormap, norm, and colorbar.
It also illustrates colorbar tick labelling with a multiplier.
'''
from matplotlib.pyplot import figure, show, axes, sci
from matplotlib import cm, colors
from matplotlib.font_manager import FontProperties
from numpy import ami... | apache-2.0 |
wolfflow/electron | script/upload-windows-pdb.py | 156 | 1174 | #!/usr/bin/env python
import os
import glob
import sys
from lib.config import s3_config
from lib.util import atom_gyp, execute, rm_rf, safe_mkdir, s3put
SOURCE_ROOT = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))
SYMBOLS_DIR = 'dist\\symbols'
DOWNLOAD_DIR = 'vendor\\brightray\\vendor\\download\\libchr... | mit |
DARKPOP/external_chromium_org | chrome/test/chromedriver/run_buildbot_steps.py | 26 | 19204 | #!/usr/bin/env python
# Copyright (c) 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.
"""Runs all the buildbot steps for ChromeDriver except for update/compile."""
import bisect
import csv
import datetime
import glob... | bsd-3-clause |
pedrobaeza/OpenUpgrade | addons/fleet/migrations/8.0.0.1/post_migration.py | 16 | 1304 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2014 Akretion
# (<http://www.akretion.com>).
#
# This program is free software: you can redistribute it and/or modify
# it unde... | agpl-3.0 |
ajponte/yelpML | maps/tests/7.py | 1 | 4726 | test = {
'name': 'Problem 7',
'points': 3,
'suites': [
{
'cases': [
{
'answer': '7b94a2861b435311f9fceeb5e6f092c4',
'choices': [
'the restaurants in restaurants',
'the names of restaurants in restaurants',
'the extracted values for each res... | mit |
stephanehenry27/Sickbeard-anime | tests/db_tests.py | 4 | 1365 | # coding=UTF-8
# Author: Dennis Lutter <lad1337@gmail.com>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 ... | gpl-3.0 |
dvliman/jaikuengine | .google_appengine/lib/django-1.3/tests/regressiontests/backends/models.py | 55 | 2436 | from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db import models
from django.db import connection
class Square(models.Model):
root = models.IntegerField()
square = models.PositiveIntegerField()
def __unicode__(self):
return "%... | apache-2.0 |
ezequielpereira/Time-Line | libs64/wx/lib/agw/ribbon/control.py | 6 | 5517 | """
L{RibbonControl} serves as a base class for all controls which share the ribbon
charactertics of having a ribbon art provider, and (optionally) non-continous
resizing.
Description
===========
Despite what the name may imply, it is not the top-level control for creating a
ribbon interface - that is L{RibbonBar}. ... | gpl-3.0 |
dayatz/taiga-back | tests/integration/resources_permissions/test_projects_choices_resources.py | 1 | 96198 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-2017 Andrey Antukh <niwi@niwi.nz>
# Copyright (C) 2014-2017 Jesús Espino <jespinog@gmail.com>
# Copyright (C) 2014-2017 David Barragán <bameda@dbarragan.com>
# Copyright (C) 2014-2017 Alejandro Alonso <alejandro.alonso@kaleidos.net>
# Copyright (C) 2014-2017 Anler Hernández ... | agpl-3.0 |
ArmstrongYang/StudyShare | Python/PythonTest.py | 6 | 1104 | import unittest
class DictforTest(dict):
def __init__(self, **kw):
super(DictforTest, self).__init__(**kw)
def __getattr__(self, key):
try:
return self[key]
except KeyError:
raise AttributeError(r"'Dict' object has no attribute '%s'" % key)
def __setatt... | apache-2.0 |
eul721/The-Perfect-Pokemon-Team-Balancer | libs/env/Lib/site-packages/pip/vcs/subversion.py | 473 | 10640 | import os
import re
from pip.backwardcompat import urlparse
from pip.index import Link
from pip.util import rmtree, display_path, call_subprocess
from pip.log import logger
from pip.vcs import vcs, VersionControl
_svn_xml_url_re = re.compile('url="([^"]+)"')
_svn_rev_re = re.compile('committed-rev="(\d+)"')
_svn_url_r... | gpl-2.0 |
GoogleCloudPlatform/declarative-resource-client-library | python/services/iam/role.py | 1 | 11094 | # Copyright 2021 Google LLC. 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 o... | apache-2.0 |
zadarastorage/zadarapy | zadarapy/vpsaos/drives.py | 1 | 2669 | # Copyright 2019 Zadara Storage, Inc.
# Originally authored by Jeremy Brown - https://github.com/jwbrown77
#
# 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... | apache-2.0 |
yask123/scikit-learn | benchmarks/bench_plot_incremental_pca.py | 374 | 6430 | """
========================
IncrementalPCA benchmark
========================
Benchmarks for IncrementalPCA
"""
import numpy as np
import gc
from time import time
from collections import defaultdict
import matplotlib.pyplot as plt
from sklearn.datasets import fetch_lfw_people
from sklearn.decomposition import Incre... | bsd-3-clause |
zstackio/zstack-woodpecker | integrationtest/vm/virtualrouter/vip/test_multi_lbs_with_vip.py | 2 | 2982 | '''
Test load balance.
Test step:
1. Create 2 VM with load balance l3 network service.
2. Create a LB with 2 VMs' nic
3. Check the LB
4. Destroy VMs
@author: czhou25
'''
import os
import zstackwoodpecker.test_util as test_util
import zstackwoodpecker.test_lib as test_lib
import zst... | apache-2.0 |
caneruguz/osf.io | scripts/tests/test_migrate_manual_merged_user.py | 61 | 1583 | from tests.base import OsfTestCase
from tests.factories import UserFactory
from scripts.migrate_manual_merged_user import (
do_migration,
get_targets,
)
class TestMigrateManualMergedUser(OsfTestCase):
def test_get_targets(self):
user1 = UserFactory.build(merged_by=None)
user2 = UserFactory... | apache-2.0 |
miguelpalacio/python-for-android | python-build/python-libs/gdata/src/gdata/media/__init__.py | 221 | 12093 | # -*-*- encoding: utf-8 -*-*-
#
# This is gdata.photos.media, implementing parts of the MediaRSS spec in gdata structures
#
# $Id: __init__.py 81 2007-10-03 14:41:42Z havard.gulldahl $
#
# Copyright 2007 Håvard Gulldahl
# Portions copyright 2007 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "Lice... | apache-2.0 |
github4ry/pathomx | pathomx/kernel_helpers.py | 2 | 3634 | import os
import sys
import numpy as np
import pandas as pd
import re
import io
from matplotlib.figure import Figure, AxesStack
from matplotlib.axes import Subplot
from mplstyler import StylesManager
import warnings
from . import displayobjects
from .utils import scriptdir, basedir
from IPython.core import display
f... | gpl-3.0 |
sekikn/ambari | ambari-server/src/test/python/custom_actions/TestUpdateRepo.py | 2 | 5282 | #!/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 |
hbrunn/hr | hr_payroll_extension/__openerp__.py | 11 | 1856 | # -*- coding:utf-8 -*-
#
#
# Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>.
# All Rights Reserved.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published
# by the Free Software Foundation, eit... | agpl-3.0 |
luotao1/Paddle | python/paddle/dataset/cifar.py | 1 | 5299 | # Copyright (c) 2016 PaddlePaddle 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 applic... | apache-2.0 |
mspringett/namebench | nb_third_party/dns/tsig.py | 215 | 7851 | # Copyright (C) 2001-2007, 2009, 2010 Nominum, Inc.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose with or without fee is hereby granted,
# provided that the above copyright notice and this permission notice
# appear in all copies.
#
# THE SOFTWARE IS PROVIDED ... | apache-2.0 |
Permutatrix/servo | tests/wpt/web-platform-tests/webdriver/tests/state/get_element_tag_name.py | 5 | 6273 | from tests.support.asserts import assert_error, assert_dialog_handled, assert_success
from tests.support.inline import inline
from tests.support.fixtures import create_dialog
# 13.6 Get Element Tag Name
def test_no_browsing_context(session, create_window):
# 13.6 step 1
session.window_handle = create_window(... | mpl-2.0 |
ankurankan/scikit-learn | examples/bicluster/bicluster_newsgroups.py | 42 | 7098 | """
================================================================
Biclustering documents with the Spectral Co-clustering algorithm
================================================================
This example demonstrates the Spectral Co-clustering algorithm on the
twenty newsgroups dataset. The 'comp.os.ms-windows... | bsd-3-clause |
CyanogenMod/android_external_chromium_org | components/test/data/password_manager/tests.py | 8 | 15341 | # 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.
# -*- coding: utf-8 -*-
"""Automated tests for many websites"""
import argparse
import logging
from environment import Environment
from websitetest import ... | bsd-3-clause |
weolar/miniblink49 | third_party/WebKit/Tools/Scripts/webkitpy/style/checkers/xcodeproj_unittest.py | 48 | 3070 | # 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:
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the ... | apache-2.0 |
igordejanovic/textX | tests/functional/test_metamodel/test_model_params.py | 1 | 5362 | from __future__ import unicode_literals
from click.testing import CliRunner
import os.path
from pytest import raises
from textx import metamodel_from_str
from textx.cli import textx
from textx.exceptions import TextXError
from textx.generators import gen_file, get_output_filename
from textx import language, generator... | mit |
Gitlab11/odoo | addons/procurement/__openerp__.py | 267 | 2661 | # -*- 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... | agpl-3.0 |
HeadCow/ARPS | ML_model/model/utils.py | 3 | 5695 | # -*- coding:utf-8 -*-
from __future__ import division
try:
import cPickle as pickle
except ImportError:
import pickle
import io
import os
import random
from collections import Counter, defaultdict
from model.base.document import Document
def save_to_disk(path_to_disk, obj, overwrite=False):
""" Pickle... | mit |
joke2k/faker | faker/providers/internet/ru_RU/__init__.py | 2 | 1790 | from .. import Provider as InternetProvider
class Provider(InternetProvider):
user_name_formats = (
'{{last_name_female}}.{{first_name_female}}',
'{{last_name_male}}.{{first_name_male}}',
'{{last_name_male}}.{{first_name_male}}',
'{{first_name_male}}.{{last_name_male}}',
'{... | mit |
mulkieran/justbytes | src/justbytes/_errors.py | 1 | 3871 | # Copyright (C) 2015 - 2019 Red Hat, Inc.
#
# This library 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 2.1 of the License, or any later version.
#
# This library is distributed in t... | gpl-2.0 |
rebost/django | tests/modeltests/known_related_objects/tests.py | 16 | 3669 | from __future__ import absolute_import
from django.test import TestCase
from .models import Tournament, Pool, PoolStyle
class ExistingRelatedInstancesTests(TestCase):
fixtures = ['tournament.json']
def test_foreign_key(self):
with self.assertNumQueries(2):
tournament = Tournament.objects... | bsd-3-clause |
jumpojoy/neutron | neutron/db/metering/metering_rpc.py | 46 | 2075 | # Copyright (C) 2014 eNovance SAS <licensing@enovance.com>
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 |
hejuna/bite-project | deps/gdata-python-client/samples/apps/marketplace_sample/gdata/apps/audit/service.py | 93 | 9510 | # Copyright (C) 2008 Google, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 |
WillGuan105/django | django/utils/functional.py | 234 | 13622 | import copy
import operator
from functools import total_ordering, wraps
from django.utils import six
from django.utils.six.moves import copyreg
# You can't trivially replace this with `functools.partial` because this binds
# to classes and returns bound instances, whereas functools.partial (on
# CPython) is a type a... | bsd-3-clause |
MisterTea/HyperNEAT | boost_1_57_0/tools/build/src/util/order.py | 9 | 4322 | # Copyright (C) 2003 Vladimir Prus
# Use, modification, and distribution is subject to the Boost Software
# License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy
# at http://www.boost.org/LICENSE_1_0.txt)
class Order:
"""Allows ordering arbitrary objects with regard to arbitrary binary rel... | bsd-3-clause |
eneldoserrata/marcos_openerp | addons/fetchmail/fetchmail.py | 13 | 15320 | # -*- 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... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.