repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
zimmermegan/MARDA
refs/heads/master
nltk-3.0.3/nltk/classify/textcat.py
8
# -*- coding: utf-8 -*- # Natural Language Toolkit: Language ID module using TextCat algorithm # # Copyright (C) 2001-2015 NLTK Project # Author: Avital Pekker <avital.pekker@utoronto.ca> # # URL: <http://nltk.org/> # For license information, see LICENSE.TXT """ A module for language identification using the TextCat a...
JackNokia/robotframework
refs/heads/master
src/robot/libdocpkg/specbuilder.py
23
# Copyright 2008-2015 Nokia Solutions and Networks # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
Dapid/numpy
refs/heads/master
numpy/setup.py
148
#!/usr/bin/env python from __future__ import division, print_function def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numpy', parent_package, top_path) config.add_subpackage('compat') config.add_subpackage('core') con...
Ichag/odoo
refs/heads/8.0
addons/claim_from_delivery/__init__.py
374
############################################################################## # # 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 Affero General Publ...
hamelg/Diamond
refs/heads/master
src/collectors/ipmisensor/ipmisensor.py
28
# coding=utf-8 """ This collector uses the [ipmitool](http://openipmi.sourceforge.net/) to read hardware sensors from servers using the Intelligent Platform Management Interface (IPMI). IPMI is very common with server hardware but usually not available in consumer hardware. #### Dependencies * [ipmitool](http://ope...
Ensighten/Diamond
refs/heads/ens-master
src/collectors/cpuacct_cgroup/test/testcpuacct_cgroup.py
31
#!/usr/bin/python # coding=utf-8 ########################################################################## import os from test import CollectorTestCase from test import get_collector_config from test import unittest from mock import patch try: from cStringIO import StringIO except ImportError: from StringIO i...
PyNSKOrg/pynsk.ru
refs/heads/master
apps/tasks/search_indexes.py
2
# -*- encoding: utf-8 -*- from haystack import indexes from zinnia.managers import PUBLISHED from apps.tasks.models import Task class TaskIndex(indexes.SearchIndex, indexes.Indexable): text = indexes.CharField(document=True, use_template=True) content = indexes.CharField(model_attr='content') title = i...
vadimtk/chrome4sdp
refs/heads/master
third_party/mojo/src/mojo/public/python/mojo_application/application_runner.py
29
# Copyright 2015 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. """Helper for running Mojo applications in Python.""" from mojo_application.application_impl import ApplicationImpl import mojo_system def RunMojoApplicat...
miguelpalacio/python-for-android
refs/heads/master
python3-alpha/python-libs/gdata/tlslite/SharedKeyDB.py
48
"""Class for storing shared keys.""" from .utils.cryptomath import * from .utils.compat import * from .mathtls import * from .Session import Session from .BaseDB import BaseDB class SharedKeyDB(BaseDB): """This class represent an in-memory or on-disk database of shared keys. A SharedKeyDB can be passed t...
Backflipz/plugin.video.excubed
refs/heads/master
resources/lib/requests/packages/urllib3/request.py
853
try: from urllib.parse import urlencode except ImportError: from urllib import urlencode from .filepost import encode_multipart_formdata __all__ = ['RequestMethods'] class RequestMethods(object): """ Convenience mixin for classes who implement a :meth:`urlopen` method, such as :class:`~urllib3....
dsajkl/123
refs/heads/master
lms/djangoapps/course_wiki/plugins/markdownedx/mdx_image.py
151
#!/usr/bin/env python ''' Image Embedding Extension for Python-Markdown ====================================== Converts lone links to embedded images, provided the file extension is allowed. Ex: http://www.ericfehse.net/media/img/ef/blog/django-pony.jpg becomes <img src="http://www.ericfehse.net/media/img...
kkkarthik6/Lol
refs/heads/master
build/lib.linux-x86_64-2.7/opensfm/context.py
3
# -*- coding: utf-8 -*- import os import cv2 abspath = os.path.abspath(os.path.dirname(__file__)) SENSOR = os.path.join(abspath, 'data/sensor_data.json') OPENCV3 = int(cv2.__version__.split('.')[0]) >= 3
nive/nive_userdb
refs/heads/master
nive_userdb/userview/tests/test_views.py
1
# -*- coding: utf-8 -*- import unittest from nive_userdb.userview.view import UserForm, UserView from nive_userdb.userview.view import configuration as view_configuration from nive.views import BaseView from nive.security import User from nive_userdb.tests import __local from nive_userdb.tests import db_app from py...
southpawtech/TACTIC-DEV
refs/heads/master
src/client/__init__.py
9
########################################################### # # 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...
kkarbasi/GFFBlaster
refs/heads/master
GFFBlaster.py
1
# -*- coding: utf-8 -*- """ Created on Fri Dec 04 14:04:54 2015 @author: Kaveh """ import sys import os.path from Bio.Blast import NCBIWWW from Bio.Blast import NCBIXML class GFFBlaster: def __init__(self , fastaData , gffData): self.fastaData = fastaData self.gffData = gffData self.seqG...
rolando-contrib/scrapy
refs/heads/master
tests/test_cmdline/extensions.py
41
"""A test extension used to check the settings loading order""" class TestExtension(object): def __init__(self, settings): settings.set('TEST1', "%s + %s" % (settings['TEST1'], 'started')) @classmethod def from_crawler(cls, crawler): return cls(crawler.settings) class DummyExtension(obj...
githubashto/userinfuser
refs/heads/master
serverside/fantasm/constants.py
24
""" Fantasm: A taskqueue-based Finite State Machine for App Engine Python Docs and examples: http://code.google.com/p/fantasm/ Copyright 2010 VendAsta Technologies 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 ob...
yugangw-msft/azure-cli
refs/heads/dev
src/azure-cli/azure/cli/command_modules/reservations/_exception_handler.py
6
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
hlin117/scikit-learn
refs/heads/master
benchmarks/bench_isotonic.py
84
""" Benchmarks of isotonic regression performance. We generate a synthetic dataset of size 10^n, for n in [min, max], and examine the time taken to run isotonic regression over the dataset. The timings are then output to stdout, or visualized on a log-log scale with matplotlib. This allows the scaling of the algorit...
40423143/2017springcd_ag7
refs/heads/gh-pages
plugin/render_math/math.py
283
# -*- coding: utf-8 -*- """ Math Render Plugin for Pelican ============================== This plugin allows your site to render Math. It uses the MathJax JavaScript engine. For markdown, the plugin works by creating a Markdown extension which is used during the markdown compilation stage. Math therefore gets treated...
pjdufour/geonode
refs/heads/master
geonode/version.py
16
# -*- coding: utf-8 -*- ######################################################################### # # Copyright (C) 2016 OSGeo # # 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 ...
jdm/gemrb
refs/heads/master
gemrb/GUIScripts/iwd2/SPParty.py
2
# GemRB - Infinity Engine Emulator # Copyright (C) 2003 The GemRB 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 the License, or (at your option) any later versi...
sysadmin75/ansible
refs/heads/devel
lib/ansible/plugins/connection/local.py
11
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # (c) 2015, 2017 Toshio Kuratomi <tkuratomi@ansible.com> # 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 DOCUMENTATION = ''' co...
turbokongen/home-assistant
refs/heads/dev
tests/components/sun/test_trigger.py
2
"""The tests for the sun automation.""" from datetime import datetime from unittest.mock import patch import pytest from homeassistant.components import sun import homeassistant.components.automation as automation from homeassistant.const import ( ATTR_ENTITY_ID, ENTITY_MATCH_ALL, SERVICE_TURN_OFF, SE...
erkanay/django
refs/heads/master
tests/queryset_pickle/models.py
33
import datetime from django.db import models, DJANGO_VERSION_PICKLE_KEY from django.utils.translation import ugettext_lazy as _ from django.utils.version import get_major_version def standalone_number(): return 1 class Numbers(object): @staticmethod def get_static_number(): return 2 @class...
kawamon/hue
refs/heads/master
desktop/core/ext-py/PyYAML-5.4.1/tests/lib3/test_emitter.py
62
import yaml def _compare_events(events1, events2): assert len(events1) == len(events2), (events1, events2) for event1, event2 in zip(events1, events2): assert event1.__class__ == event2.__class__, (event1, event2) if isinstance(event1, yaml.NodeEvent): assert event1.anchor == event...
rlc2/pygame_maker
refs/heads/master
setup.py
1
from setuptools import setup, find_packages setup(name='pygame_maker', version='0.1', description='ENIGMA-like pygame-based game engine', classifiers=[ 'Development Status :: 2 - Pre-Alpha', 'License :: OSI Approved :: GNU Lesser General Public License v2 (LGPGv2)', 'Progamming Lang...
tempbottle/servo
refs/heads/master
python/servo/testing_commands.py
1
# Copyright 2013 The Servo Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT license # <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your #...
amith01994/intellij-community
refs/heads/master
python/testData/completion/className/module/module.py
71
exc<caret>
bgxavier/nova
refs/heads/master
nova/compute/hv_type.py
14
# 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...
mathiasertl/django-ca
refs/heads/master
ca/ca/wsgi.py
1
""" WSGI config for ca project. This module contains the WSGI application used by Django's development server and any production WSGI deployments. It should expose a module-level variable named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover this application via the ``WSGI_APPLICATION`` setti...
shookees/adventofcode
refs/heads/master
2015/day4part1.py
1
import hashlib with open('data/day4.txt') as f: data = f.read() number = 1 md5_hash = hashlib.md5(data + str(number)) while md5_hash.hexdigest()[0:5] != '00000': number += 1 print number md5_hash = hashlib.md5(data + str(number)) print 'Solution: {0}'.format(number)
OpenReliability/OpenReliability
refs/heads/master
veusz/setting/colors.py
1
# -*- coding: utf-8 -*- # Copyright (C) 2016 Emmanuel Chery # Email: Emmanuel Chery <emmanuel.chery@ams.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of ...
crmccreary/openerp_server
refs/heads/master
openerp/addons/hr_holidays/__openerp__.py
9
# -*- 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...
RAFTDevTeam/raft
refs/heads/master
core/data/DomFuzzerQueueDataModel.py
11
# # This module supports the data model for the responses data for TreeViews # # Author: Gregory Fleischer (gfleischer@gmail.com) # # Copyright (c) 2011 RAFT Team # # This file is part of RAFT. # # RAFT is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as pub...
igui/website
refs/heads/master
app/urls.py
2
from django.conf.urls import include, url import app.views urlpatterns = [ url(r'^$', app.views.index, name='index'), ]
jay-johnson/datanode
refs/heads/master
bins/demo-running-locally.py
2
#!/usr/bin/env python # Load common imports and system envs to build the core object import sys, os os.environ["ENV_SYSLOG_ENABLED"] = "1" os.environ["ENV_DEPLOYMENT_TYPE"] = "JustRedis" from src.common.inits_for_python import * ticker = "SPY" days_back = 366 # google does not allow more than on...
gort818/fallterm
refs/heads/master
fallterm.py
1
#!/usr/bin/env python3 from os import system import curses import subprocess import os import getpass #log viewer bash script script=""""""""" file="/home/$USER/.fallterm/path.txt" read -d $'\x04' path < "$file" echo "Please choose a log to view" echo "---------------------------" echo " " select d in $(find /home/$...
juliosueiras/atlas-vim
refs/heads/master
vim/plugged/UltiSnips/pythonx/UltiSnips/snippet/__init__.py
37
"""Code related to snippets."""
modm-io/modm-devices
refs/heads/develop
tools/generator/dfg/peripheral.py
1
# -*- coding: utf-8 -*- # Copyright (c) 2013-2016, Niklas Hauser # Copyright (c) 2016, Fabian Greif # All rights reserved. class Peripheral(): """ Peripheral Represents the names and masks of the peripherals control and data registers and methods for smart comparison. """ def __init__(self, n...
Hybrid-Cloud/cinder
refs/heads/master
cinder/interface/__init__.py
13
# Copyright 2016 Dell 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 app...
tyrchen/rockstar
refs/heads/master
examples/go_rockstar.py
14
from RockStar import RockStar go_code = "writeln('Hello world')" rock_it_bro = RockStar(days=400, file_name='helloWorld.go', code=go_code) rock_it_bro.make_me_a_rockstar()
xxsergzzxx/python-for-android
refs/heads/master
python-modules/twisted/twisted/trial/test/test_plugins.py
59
# Copyright (c) 2009 Twisted Matrix Laboratories. # See LICENSE for details. # # Maintainer: Jonathan Lange """ Tests for L{twisted.plugins.twisted_trial}. """ from twisted.plugin import getPlugins from twisted.trial import unittest from twisted.trial.itrial import IReporter class TestPlugins(unittest.TestCase): ...
petewarden/tensorflow
refs/heads/master
tensorflow/python/tpu/api.py
13
# Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
thomaspaulb/sale-workflow
refs/heads/8.0
setup/account_invoice_reorder_lines/odoo_addons/__init__.py
13048
__import__('pkg_resources').declare_namespace(__name__)
mementum/backtrader
refs/heads/master
samples/volumefilling/volumefilling.py
1
#!/usr/bin/env python # -*- coding: utf-8; py-indent-offset:4 -*- ############################################################################### # # Copyright (C) 2015-2020 Daniel Rodriguez # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License a...
telukir/PubMedPortable
refs/heads/master
BioC_export/bioc/meta/_iter.py
2
__all__ = [] class _MetaIter: def __iter__(self): return self._iterdata().__iter__()
apple/llvm-project
refs/heads/llvm.org/main
lldb/test/API/functionalities/data-formatter/data-formatter-stl/libcxx/tuple/TestDataFormatterLibcxxTuple.py
8
""" Test lldb data formatter subsystem. """ import lldb from lldbsuite.test.decorators import * from lldbsuite.test.lldbtest import * from lldbsuite.test import lldbutil class TestDataFormatterLibcxxTuple(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): TestBase.setUp(self) ...
snip/skylines
refs/heads/master
migrations/versions/559cfc0613d2_add_meetings_table.py
7
# revision identifiers, used by Alembic. revision = '559cfc0613d2' down_revision = '2aad9deb5e37' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Alembic - please adjust! ### op.create_table('flight_meetings', sa.Column('id', sa.Integer(), nullable=False), ...
hargup/sympy
refs/heads/master
sympy/series/tests/test_demidovich.py
116
from sympy import limit, Symbol, oo, sqrt, Rational, log, exp, cos, sin, tan, \ pi, asin, together, root # Numbers listed with the tests refer to problem numbers in the book # "Anti-demidovich, problemas resueltos, Ed. URSS" x = Symbol("x") def test_leadterm(): assert (3 + 2*x**(log(3)/log(2) - 1)).leadterm...
sabi0/intellij-community
refs/heads/master
python/testData/completion/smartFromUsedMethodsOfString.py
79
def func(x): x.upper x.<caret>
johnkeepmoving/oss-ftp
refs/heads/master
python27/win32/Lib/site-packages/requests/packages/chardet/euckrprober.py
2930
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org 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 Reserved. # # Con...
htj/suds-htj
refs/heads/master
suds/umx/__init__.py
204
# This program is free software; you can redistribute it and/or modify # it under the terms of the (LGPL) GNU Lesser General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will ...
bram85/topydo
refs/heads/master
topydo/lib/MultiCommand.py
1
# Topydo - A todo.txt client written in Python. # Copyright (C) 2014 - 2015 Bram Schoenmakers <bram@topydo.org> # # 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,...
ssadedin/seqr
refs/heads/master
seqr/utils/elasticsearch/es_gene_agg_search.py
1
from collections import defaultdict import logging from seqr.utils.elasticsearch.constants import MAX_COMPOUND_HET_GENES, HAS_ALT_FIELD_KEYS from seqr.utils.elasticsearch.es_search import EsSearch logger = logging.getLogger(__name__) class EsGeneAggSearch(EsSearch): AGGREGATION_NAME = 'gene aggregation' CAC...
willpatterson/LASubway
refs/heads/master
hopstack/yamlparser.py
2
""" TODO: Turn read_yaml() into LASDO factory explore multiple yaml files per actual file """ import yaml from collections import namedtuple def read_yaml(yaml_path): """ Reads YAML file and yields its objects """ YmlObj = namedtuple('YmlObj', ['name', 'data']) with open(yaml_path, 'r') a...
keymholio/kraang_api
refs/heads/master
fabfile.py
1
from fabric.api import * import os env.hosts=["api.kraang.io"] env.user=os.environ['KRAANG_SERVER_USER'] env.password=os.environ['KRAANG_SERVER_PW'] def deploy(): run("service nginx stop") if run("file '/tmp/master.pid'", warn_only=True).succeeded: if run("uwsgi --stop /tmp/master.pid", warn_only=True...
erinish/captains_log
refs/heads/master
captains_log/config.py
1
"""Configuration functions""" import configparser def load_configuration(filename): """Load a given configuration file""" try: config = configparser.ConfigParser() config.read(filename) except: raise SystemExit("Couldn't load configuration file") return config
klahnakoski/ActiveData
refs/heads/dev
tests/test_load_and_save_queries.py
1
# encoding: utf-8 # # # 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 http://mozilla.org/MPL/2.0/. # # Contact: Kyle Lahnakoski (kyle@lahnakoski.com) # from __future__ import absolute_import, divis...
aidankmcl/carpe-learning
refs/heads/master
app/models.py
2
from datetime import datetime import sys import json import os import re import parsedatetime as pdt from pymongo import MongoClient MONGO_URI = os.environ.get('MONGODB_URI') if not MONGO_URI: sys.exit("\nMONGODB_URI environment variable not set, see https://docs.mongodb.com/manual/reference/connection-string/\n...
Just-D/chromium-1
refs/heads/master
tools/telemetry/third_party/gsutilz/third_party/boto/boto/regioninfo.py
128
# Copyright (c) 2006-2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, Inc. # 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 res...
ricardogsilva/QGIS
refs/heads/master
tests/testdata/qgis_local_server/layer_attribute_form.py
41
from qgis.PyQt.QtWidgets import QLabel def formOpen(dialog, layer, feature): label = dialog.findChild(QLabel, 'label') assert(label.text() == 'Swimming Monkey') label.setText('Flying Monkey')
lzambella/Qyoutube-dl
refs/heads/master
youtube_dl/extractor/fczenit.py
24
# coding: utf-8 from __future__ import unicode_literals import re from .common import InfoExtractor class FczenitIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?fc-zenit\.ru/video/gl(?P<id>[0-9]+)' _TEST = { 'url': 'http://fc-zenit.ru/video/gl6785/', 'md5': '458bacc24549173fe5a5aa29174a...
zsl/CodeSample
refs/heads/master
PythonExtendAndEmbeg/Extend/sub_type/setup.py
1
from distutils.core import setup, Extension modulel = Extension('shoddy', sources = ['shoddy_module.c']) setup (name = 'PackageName', version = '1.0', description = 'This is a demo package', ext_modules = [modulel])
vicvinc/L2M
refs/heads/master
serverend/dev/scrapynews/scrapynews/spiders/wanmei_news.py
2
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Administrator # @Date: 2015-08-10 11:17:04 # @Last Modified by: Administrator # @Last Modified time: 2015-08-10 11:18:54 import scrapy class wanmeiSpider(scrapy.Spider): name = 'wanmei' allowed_domains = ['dmoz.org'] start_urls = [ 'http://www.dota2.co...
ProjectSWGCore/NGECore2
refs/heads/master
scripts/object/tangible/collection/col_force_shui_table_02.py
85615
import sys def setup(core, object): return
SaschaMester/delicium
refs/heads/master
tools/telemetry/telemetry/web_perf/metrics/mainthread_jank_stats.py
92
# 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. # A top level slice of a main thread can cause the webapp to behave # unresponsively if its thread duration is greater than or equals to # USER_PERCEIVABLE_...
nrc/servo
refs/heads/master
tests/wpt/css-tests/tools/html5lib/utils/iana_parse.py
437
#!/usr/bin/env python import sys import urllib.request, urllib.error, urllib.parse import codecs def main(): encodings = [] f = urllib.request.urlopen(sys.argv[1]) for line in f: if line.startswith("Name: ") or line.startswith("Alias: "): enc = line.split()[1] try: ...
damdam-s/OCB
refs/heads/8.0
addons/portal/wizard/portal_wizard.py
260
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2011 OpenERP S.A (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the terms ...
kopchik/qtile
refs/heads/develop
libqtile/bar.py
8
# Copyright (c) 2008, Aldo Cortesi. 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 # to use, copy, modify,...
jswope00/GAI
refs/heads/master
lms/lib/xblock/test/test_runtime.py
8
""" Tests of the LMS XBlock Runtime and associated utilities """ from django.contrib.auth.models import User from ddt import ddt, data from mock import Mock from unittest import TestCase from urlparse import urlparse from lms.lib.xblock.runtime import quote_slashes, unquote_slashes, LmsModuleSystem TEST_STRINGS = [ ...
goksie/newfies-dialer
refs/heads/master
newfies/sms_module/admin.py
3
# # Newfies-Dialer License # http://www.newfies-dialer.org # # 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 http://mozilla.org/MPL/2.0/. # # Copyright (C) 2011-2012 Star2Billing S.L. # # The Initia...
marinkaz/orange3
refs/heads/master
Orange/widgets/data/owpaintdata.py
2
import os import sys import unicodedata import itertools from functools import partial import numpy as np from PyQt4 import QtCore from PyQt4 import QtGui from PyQt4.QtGui import ( QListView, QAction, QIcon, QSizePolicy, QPen ) from PyQt4.QtCore import Qt, QObject, QTimer, QSize, QSizeF, QPointF, QRectF from P...
GenericStudent/home-assistant
refs/heads/dev
homeassistant/components/homematic/__init__.py
2
"""Support for HomeMatic devices.""" from datetime import datetime from functools import partial import logging from pyhomematic import HMConnection import voluptuous as vol from homeassistant.const import ( ATTR_ENTITY_ID, ATTR_MODE, ATTR_NAME, CONF_HOST, CONF_HOSTS, CONF_PASSWORD, CONF_P...
flavour/eden
refs/heads/master
modules/feedparser/mixin.py
6
# Copyright 2010-2019 Kurt McKee <contactme@kurtmckee.org> # Copyright 2002-2008 Mark Pilgrim # All rights reserved. # # This file is a part of feedparser. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # * Redistrib...
pfschwartz/openelisglobal-core
refs/heads/develop
liquibase/OE3.4/testCatalogCI_IPCI/scripts/sampleTypePanel.py
9
#!/usr/bin/env python # -*- coding: utf-8 -*- type = [] panel = [] done_combos = [] type_file = open('sampleType.txt','r') panel_file = open('panels.txt','r') type_panel_results = open("output/typePanelResults.txt", 'w') for line in type_file: if ',' in line: line = 'Variable' type.append...
emedvedev/st2
refs/heads/master
st2common/st2common/util/monkey_patch.py
3
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
dlazz/ansible
refs/heads/devel
lib/ansible/modules/cloud/google/gcp_dns_resource_record_set.py
2
#!/usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2017 Google # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) # ---------------------------------------------------------------------------- # # *** AUTO GENERATED CODE *** AUTO GENERATED CODE *** # ...
McIntyre-Lab/papers
refs/heads/master
newman_events_2017/python_workflow/programs/import_exon_skipping_annotations.py
1
#!/usr/bin/env python3 ####################################################################################################################### # # DATE: 2018-01-09 # NAME: import_exon_skipping_annotations.py # AUTHOR: Jeremy R. B. Newman (jrbnewman@ufl.edu) # # DESCRIPTION: Import exon-skipping annotations for each log...
sysalexis/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/encodings/punycode.py
250
""" Codec for the Punicode encoding, as specified in RFC 3492 Written by Martin v. Löwis. """ import codecs ##################### Encoding ##################################### def segregate(str): """3.1 Basic code point segregation""" base = bytearray() extended = set() for c in str: if ord...
jmankoff/data
refs/heads/master
Assignments/jmankoff-rss/lib/jinja2/runtime.py
335
# -*- coding: utf-8 -*- """ jinja2.runtime ~~~~~~~~~~~~~~ Runtime helpers. :copyright: (c) 2010 by the Jinja Team. :license: BSD. """ import sys from itertools import chain from jinja2.nodes import EvalContext, _context_function_types from jinja2.utils import Markup, soft_unicode, escape, missing...
davidzchen/bazel
refs/heads/master
src/test/py/bazel/first_time_use_test.py
12
# Copyright 2018 The Bazel 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 applicable la...
RedHatQE/splice-testing-tools
refs/heads/master
splice-tests/test_deleted_1_webui.py
1
import splicetestlib from splicetestlib.splice_testcase import * from splicetestlib.splice_testcase_web import * import nose class test_splice_deleted_1(SpliceTestcase, Splice_has_FAKE_SPACEWALK, Splice_has_Manifest, Splice_has_WebUI): def _setup(self): splicetestlib.fake_spacewalk_env(self.ss.Instances["...
nephila/djangocms-apphook-setup
refs/heads/develop
tests/sample_app_6/views.py
3
from django.http import HttpResponse from django.views.generic import View class BaseView(View): def get(self, *args, **kwargs): return HttpResponse("app 1")
CredoReference/edx-platform
refs/heads/integration-hawthorn-qa
common/lib/symmath/symmath/symmath_check.py
24
#!/usr/bin/python # -*- coding: utf-8 -*- # # File: symmath_check.py # Date: 02-May-12 (creation) # # Symbolic mathematical expression checker for edX. Uses sympy to check for expression equality. # # Takes in math expressions given as Presentation MathML (from ASCIIMathML), converts to Content MathML using Snuggl...
scienceopen/dmcutils
refs/heads/master
FileTick.py
1
#!/usr/bin/env python """ Reports first tick number in file vs filename I don't think spool filenames are monotonic w.r.t. ticks. ./FileTick.py ~/H/neo2012-12-25/spool_5/ -xy 320 270 -s 648 -z 4 ./FileTick.py ~/data/testdmc python FileTick.py ~/data/2017-04-27/spool """ from pathlib import Path from dmcutils.neospoo...
williamwu0220/wtforms-alchemy
refs/heads/master
tests/test_synonym.py
3
import sqlalchemy as sa from sqlalchemy.ext.hybrid import hybrid_property from tests import ModelFormTestCase from wtforms_alchemy import ModelForm class TestSynonym(ModelFormTestCase): def test_synonym_returning_column_property_with_include(self): class ModelTest(self.base): __tablename__ = ...
cbeck88/fifengine
refs/heads/master
tools/editor/scripts/gui/mapeditor.py
4
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
chfw/pyramid-excel
refs/heads/master
myproject/__init__.py
2
from pyramid.config import Configurator from sqlalchemy import create_engine from .models import ( DBSession, Base, ) def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ engine = create_engine('sqlite:///tmp.db') DBSession.configure(bind=engine) ...
macfreek/NBT
refs/heads/master
nbt/nbt.py
1
""" Handle the NBT (Named Binary Tag) data format For more information about the NBT format: https://minecraft.gamepedia.com/NBT_format """ from struct import Struct, error as StructError from gzip import GzipFile from collections import MutableMapping, MutableSequence, Sequence import sys _PY3 = sys.version_info >=...
jjmleiro/hue
refs/heads/master
desktop/core/ext-py/Django-1.6.10/tests/urlpatterns_reverse/included_named_urls.py
58
from __future__ import absolute_import from django.conf.urls import patterns, url, include from .views import empty_view urlpatterns = patterns('', url(r'^$', empty_view, name="named-url3"), url(r'^extra/(?P<extra>\w+)/$', empty_view, name="named-url4"), url(r'^(?P<one>\d+)|(?P<two>\d+)/$', empty_view),...
will-Do/avocado
refs/heads/master
avocado/core/log.py
1
# 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 is distributed in the hope that it will be useful, # bu...
dlazz/ansible
refs/heads/devel
test/legacy/cleanup_gce.py
77
''' Find and delete GCE resources matching the provided --match string. Unless --yes|-y is provided, the prompt for confirmation prior to deleting resources. Please use caution, you can easily delete your *ENTIRE* GCE infrastructure. ''' import optparse import os import re import sys import yaml try: from libclo...
narayanaditya95/Robotix
refs/heads/master
Robotix/users/urls.py
34
# -*- coding: utf-8 -*- from __future__ import absolute_import, unicode_literals from django.conf.urls import url from . import views urlpatterns = [ # URL pattern for the UserListView url(regex=r'^$', view=views.UserListView.as_view(), name='list'), # URL pattern for the UserRedirectView url(regex=...
brenton/openshift-ansible
refs/heads/master
roles/openshift_logging/filter_plugins/openshift_logging.py
6
''' Openshift Logging class that provides useful filters used in Logging ''' import random def random_word(source_alpha, length): ''' Returns a random word given the source of characters to pick from and resulting length ''' return ''.join(random.choice(source_alpha) for i in range(length)) def entry_from...
bgris/ODL_bgris
refs/heads/master
lib/python3.5/site-packages/qtconsole/styles.py
26
""" Style utilities, templates, and defaults for syntax highlighting widgets. """ #----------------------------------------------------------------------------- # Imports #----------------------------------------------------------------------------- from colorsys import rgb_to_hls from pygments.styles import get_style...
pandeyadarsh/sympy
refs/heads/master
sympy/core/tests/test_containers.py
49
from sympy import Matrix, Tuple, symbols, sympify, Basic, Dict, S, FiniteSet, Integer from sympy.core.containers import tuple_wrapper from sympy.utilities.pytest import raises from sympy.core.compatibility import is_sequence, iterable, u, range def test_Tuple(): t = (1, 2, 3, 4) st = Tuple(*t) assert set(...
viniciusgama/blog_gae
refs/heads/master
django/views/generic/dates.py
99
import time import datetime from django.db import models from django.core.exceptions import ImproperlyConfigured from django.http import Http404 from django.utils.encoding import force_unicode from django.utils.translation import ugettext as _ from django.views.generic.base import View from django.views.generic.detail ...
zhangjunli177/sahara
refs/heads/master
sahara/tests/unit/swift/test_swift_helper.py
6
# Copyright (c) 2013 Mirantis 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 writ...
mixman/djangodev
refs/heads/master
django/conf/locale/eu/formats.py
434
# -*- encoding: utf-8 -*- # 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 = r'Yeko M\re\n d\a' TIME_FORMAT = 'H:i:s' # DATETIME_FORMAT = # YEAR_MONTH...