repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
ofer43211/unisubs
refs/heads/staging
apps/teams/forms.py
2
# Amara, universalsubtitles.org # # Copyright (C) 2013 Participatory Culture Foundation # # 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, either version 3 of the # License, or (at your op...
grimmjow8/ansible
refs/heads/devel
lib/ansible/plugins/test/mathstuff.py
98
# (c) 2016, Ansible, Inc # # 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 di...
mozilla/treeherder
refs/heads/master
treeherder/perf/auto_perf_sheriffing/factories.py
2
from datetime import timedelta from treeherder.perf.auto_perf_sheriffing.backfill_reports import ( BackfillReportMaintainer, AlertsPicker, IdentifyAlertRetriggerables, ) from treeherder.perf.auto_perf_sheriffing.backfill_tool import BackfillTool from treeherder.perf.auto_perf_sheriffing.sherlock import She...
rboman/progs
refs/heads/master
sandbox/wxwidgets/wx5.py
1
#! /usr/bin/env python3 # -*- coding: utf-8 -*- from wxPython.wx import * import os ID_ABOUT=101 ID_OPEN=102 ID_BUTTON1=110 ID_EXIT=200 class MainWindow(wxFrame): def __init__(self,parent,id,title): self.dirname='' wxFrame.__init__(self,parent,wxID_ANY, title, style=wxDEFAULT_FRAME_STYLE| ...
Carrefour/linux-replication
refs/heads/replication-v3.6
Documentation/networking/cxacru-cf.py
14668
#!/usr/bin/env python # Copyright 2009 Simon Arlott # # 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 i...
abarnert/pykeycode
refs/heads/master
test.py
1
#!/usr/bin/env python import keycode import sys for arg in sys.argv[1:]: if arg and arg[0] == '-': print arg[1:], keycode.tostring(int(arg[1:])) else: for ch in arg: print ch, keycode.tokeycode(ch)
SkyRocknRoll/drawnby
refs/heads/master
core/migrations/0006_auto__del_field_drawing_data.py
2
# encoding: 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 'Drawing.data' db.delete_column('core_drawing', 'data') def backwards(self, orm): ...
intridea/REBIN
refs/heads/master
rebin/executables/example/ystock.py
2
#!/usr/bin/env python import urllib import sys def __request(symbol, stat): url = 'http://finance.yahoo.com/d/quotes.csv?s=%s&f=%s' % (symbol, stat) return urllib.urlopen(url).read().strip().strip('"') def get_all(symbol): """ Get all available quote data for the given ticker symbol. Retu...
partofthething/home-assistant
refs/heads/dev
homeassistant/components/blinksticklight/__init__.py
36
"""The blinksticklight component."""
TeamPlaceholder/android_kernel_lge_gee
refs/heads/cm-10.2
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py
11088
# Core.py - Python extension for perf script, core functions # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. from collections import defaultdict def aut...
jk1/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/httprepo.py
87
# httprepo.py - HTTP repository proxy classes for mercurial # # Copyright 2005, 2006 Matt Mackall <mpm@selenic.com> # Copyright 2006 Vadim Gelfer <vadim.gelfer@gmail.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. from node i...
IwraStudios/NoSSL
refs/heads/master
sslstrip2-master/build/lib.linux-i686-2.7/sslstrip/ClientRequest.py
10
# Copyright (c) 2004-2009 Moxie Marlinspike # # 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 program is distri...
staticlibs/android-ndk-r9d-arm-linux-androideabi-4.8
refs/heads/master
lib/python2.7/unittest/signals.py
1016
import signal import weakref from functools import wraps __unittest = True class _InterruptHandler(object): def __init__(self, default_handler): self.called = False self.original_handler = default_handler if isinstance(default_handler, int): if default_handler == signal.SIG_D...
sysalexis/kbengine
refs/heads/master
kbe/src/lib/python/Lib/test/test_int_literal.py
182
"""Test correct treatment of hex/oct constants. This is complex because of changes due to PEP 237. """ import unittest from test import support class TestHexOctBin(unittest.TestCase): def test_hex_baseline(self): # A few upper/lowercase tests self.assertEqual(0x0, 0X0) self.assertEqual(0...
gminds/rapidnewsng
refs/heads/master
django/db/models/expressions.py
109
import datetime from django.utils import tree class ExpressionNode(tree.Node): """ Base class for all query expressions. """ # Arithmetic connectors ADD = '+' SUB = '-' MUL = '*' DIV = '/' MOD = '%%' # This is a quoted % operator - it is quoted # because it can be u...
Menooker/gem5_pcm
refs/heads/master
src/arch/x86/isa/insts/simd128/floating_point/data_transfer/move.py
88
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
stephanie-wang/ray
refs/heads/master
rllib/utils/debug.py
1
import numpy as np import pprint import time from ray.rllib.policy.sample_batch import SampleBatch, MultiAgentBatch _logged = set() _disabled = False _periodic_log = False _last_logged = 0.0 _printer = pprint.PrettyPrinter(indent=2, width=60) def log_once(key): """Returns True if this is the "first" call for a ...
Tejal011089/paypal_erpnext
refs/heads/develop
erpnext/stock/page/__init__.py
37694
from __future__ import unicode_literals
gangadhar-kadam/nassimapp
refs/heads/master
hr/doctype/employment_type/__init__.py
37694
from __future__ import unicode_literals
standage/genhub
refs/heads/master
genhub/proteins.py
1
#!/usr/bin/env python # # ----------------------------------------------------------------------------- # Copyright (c) 2016 Daniel Standage <daniel.standage@gmail.com> # Copyright (c) 2016 Indiana University # Copyright (c) 2016 The Regents of the University of California # # This file is part of genhub (http://...
zimmermegan/smarda
refs/heads/master
nltk-3.0.3/nltk/stem/rslp.py
7
# -*- coding: utf-8 -*- # Natural Language Toolkit: RSLP Stemmer # # Copyright (C) 2001-2015 NLTK Project # Author: Tiago Tresoldi <tresoldi@gmail.com> # URL: <http://nltk.org/> # For license information, see LICENSE.TXT # This code is based on the algorithm presented in the paper "A Stemming # Algorithm for the Port...
pniedzielski/fb-hackathon-2013-11-21
refs/heads/master
src/repl.it/jsrepl/extern/python/closured/lib/python2.7/distutils/command/bdist_dumb.py
75
"""distutils.command.bdist_dumb Implements the Distutils 'bdist_dumb' command (create a "dumb" built distribution -- i.e., just an archive to be unpacked under $prefix or $exec_prefix).""" __revision__ = "$Id$" import os from sysconfig import get_python_version from distutils.util import get_platform from distutil...
RealTimeWeb/wikisite
refs/heads/master
MoinMoin/support/passlib/_setup/__init__.py
29
"""passlib.setup - helpers used by passlib's setup.py script"""
jmehnle/ansible
refs/heads/devel
lib/ansible/modules/database/proxysql/proxysql_mysql_users.py
46
#!/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. #...
ryfeus/lambda-packs
refs/heads/master
Tensorflow/source/tensorflow/contrib/rnn/python/tools/checkpoint_convert.py
37
# Copyright 2017 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...
Endika/pos-addons
refs/heads/8.0
pos_session_custom2/__openerp__.py
3
{ 'name' : 'Custom pos session report (2)', 'version' : '1.0.0', 'author' : 'IT-Projects LLC, Ivan Yelizariev', 'license': 'GPL-3', 'category' : 'Custom', 'website' : 'https://yelizariev.github.io', 'description': """ Tested on Odoo 8.0 258a4cac82ef3b7e6a086f691f3bf8140d37b51c """, 'dat...
Soya93/Extract-Refactoring
refs/heads/master
python/lib/Lib/site-packages/django/bin/make-messages.py
186
#!/usr/bin/env python if __name__ == "__main__": import sys name = sys.argv[0] args = ' '.join(sys.argv[1:]) print >> sys.stderr, "%s has been moved into django-admin.py" % name print >> sys.stderr, 'Please run "django-admin.py makemessages %s" instead.'% args print >> sys.stderr sys.exit(1...
jnewland/home-assistant
refs/heads/ci
tests/components/conversation/__init__.py
39
"""Tests for the conversation component."""
iNecas/katello
refs/heads/master
cli/src/katello/client/core/activation_key.py
1
# # Katello Organization actions # Copyright (c) 2012 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You...
LizardCoin/lizardcoin
refs/heads/master
share/difficulty_adjustment/dump_block_times.py
33
#!/usr/bin/env python import codecs from bitcoin.rpc import Proxy if __name__ == '__main__': url = raw_input('Please enter the RPC url: ') username = raw_input('Please enter the RPC username: ') password = raw_input('Please enter the RPC password: ') proxy = Proxy(url, username, password) ...
vikatory/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/distutils/tests/test_version.py
165
"""Tests for distutils.version.""" import unittest from distutils.version import LooseVersion from distutils.version import StrictVersion from test.support import run_unittest class VersionTestCase(unittest.TestCase): def test_prerelease(self): version = StrictVersion('1.2.3a1') self.assertEqual(v...
waseem18/oh-mainline
refs/heads/master
vendor/packages/Django/tests/modeltests/field_subclassing/models.py
109
""" Tests for field subclassing. """ from __future__ import absolute_import from django.db import models from django.utils.encoding import force_text from .fields import SmallField, SmallerField, JSONField from django.utils.encoding import python_2_unicode_compatible @python_2_unicode_compatible class MyModel(mode...
stanlyxiang/incubator-hawq
refs/heads/master
tools/bin/pythonSrc/pexpect-4.2/tests/test_run_out_of_pty.py
20
#!/usr/bin/env python ''' PEXPECT LICENSE This license is approved by the OSI and FSF as GPL-compatible. http://opensource.org/licenses/isc-license.txt Copyright (c) 2012, Noah Spurrier <noah@noah.org> PERMISSION TO USE, COPY, MODIFY, AND/OR DISTRIBUTE THIS SOFTWARE FOR ANY PURPOSE WITH OR WIT...
AnhellO/DAS_Sistemas
refs/heads/development
Ene-Jun-2019/Practicas/2do Parcial/Examen/srp.py
1
import json from json2html import * class Usuario(object): """docstring for Usuario""" def __init__(self, **args): self.nombre = args.get('nombre') self.edad = args.get('edad') self.direccion = args.get('direccion') def set_nombre(self, nombre): self.nombre = nombre d...
bioinfo-center-pasteur-fr/python-solutions-1
refs/heads/master
source/_static/code/fasta_object.py
2
class Sequence(object): def __init__(self, id_, sequence, comment=''): self.id = id_ self.comment = comment self.sequence = sequence def gc_percent(self): seq = self.sequence.upper() return float(seq.count('G') + seq.count('C')) / float(len(seq)) class FastaParser(obje...
fritsvanveen/QGIS
refs/heads/master
python/plugins/processing/algs/lidar/lastools/lasduplicatePro.py
5
# -*- coding: utf-8 -*- """ *************************************************************************** lasduplicate.py --------------------- Date : October 2014 Copyright : (C) 2014 by Martin Isenburg Email : martin near rapidlasso point com **************...
italou/interactive-python-2014
refs/heads/master
week7-ship.py
1
""" Week 7 Mini-project Descprition: Implementation of Spaceship Author: Itamar M. B. Lourenço Date: 2014-11-05 """ import simplegui import math import random # globals for user interface WIDTH = 800 HEIGHT = 600 score = 0 lives = 3 time = 0.5 TURN_FACTOR = math.radians(4) # degrees to radians THRUST_FAC...
ychen820/microblog
refs/heads/master
y/google-cloud-sdk/platform/gsutil/third_party/boto/tests/devpay/test_s3.py
136
#!/usr/bin/env python # Copyright (c) 2006,2007 Mitch Garnaat http://garnaat.org/ # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the ri...
raccoongang/edx-platform
refs/heads/ginkgo-rg
lms/djangoapps/badges/admin.py
23
""" Admin registration for Badge Models """ from config_models.admin import ConfigurationModelAdmin from django.contrib import admin from badges.models import BadgeClass, CourseCompleteImageConfiguration, CourseEventBadgesConfiguration admin.site.register(CourseCompleteImageConfiguration) admin.site.register(BadgeCla...
adaxi/couchpotato
refs/heads/master
libs/requests/packages/urllib3/filepost.py
551
# urllib3/filepost.py # Copyright 2008-2013 Andrey Petrov and contributors (see CONTRIBUTORS.txt) # # This module is part of urllib3 and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php import codecs import mimetypes from uuid import uuid4 from io import BytesIO from .packages ...
subramani95/neutron
refs/heads/master
neutron/tests/unit/hyperv/test_hyperv_utilsv2.py
4
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 Cloudbase Solutions SRL # 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.ap...
vFense/vFenseAgent-nix
refs/heads/development
agent/deps/rpm6-32/Python-2.7.5/lib/python2.7/bsddb/db.py
194
#---------------------------------------------------------------------- # Copyright (c) 1999-2001, Digital Creations, Fredericksburg, VA, USA # and Andrew Kuchling. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following c...
poiesisconsulting/openerp-restaurant
refs/heads/master
poi_product_property/__init__.py
6
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # Copyright (C) 2011-2013 Serpent Consulting Services Pvt. Ltd. (<http://serpentcs.com>). # # This progr...
ivanmeler/android_kernel_samsung_zerolte
refs/heads/master
scripts/exynos_checkpatch_helper.py
169
""" exynos_checkpatch_helper.py - a helper script for exynos_checkpatch.sh Dept : S/W Solution Dev Team Author : Solution3 Power Part Update : 2014.12.08 """ import subprocess as sp import sys def print_log(color, log): colored_log = '' if color == 'r': colored_log = "\033[31m" + log + "\033...
acsone/connector-magento
refs/heads/8.0
magentoerpconnect_options_active/product.py
16
# -*- coding: utf-8 -*- ############################################################################## # # Author: Markus Schneider # Copyright 2014 initOS GmbH & Co. KG # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as ...
bgossele/geminicassandra
refs/heads/master
geminicassandra/gemini_annotate.py
1
#!/usr/bin/env python import os import sys import sqlite3 from collections import defaultdict, namedtuple import json import subprocess import numpy as np from scipy.stats import mode import pysam from geminicassandra.annotations import annotations_in_region, guess_contig_naming def add_requested_columns(args, ...
saisaizhang/Food
refs/heads/master
flask/lib/python2.7/site-packages/werkzeug/testsuite/formparser.py
146
# -*- coding: utf-8 -*- """ werkzeug.testsuite.formparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the form parsing facilities. :copyright: (c) 2014 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os.path import join, dirn...
th3infinity/libavg
refs/heads/master
src/samples/ondown.py
4
#!/usr/bin/env python # -*- coding: utf-8 -*- from libavg import app, avg class MainDiv(app.MainDiv): def onInit(self): self.node = avg.WordsNode(pos=(10,10), text="Hello World", parent=self) self.node.subscribe(avg.Node.CURSOR_DOWN, self.onDown) def onDown(self, event): self.node.x =...
zhouhoo/conceptNet_55_client
refs/heads/master
app/ResultParse.py
1
import ast from conf.settings import intered_lang from tools.debug import print_debug from tools.util import is_arg_valid # These are the primary keys returned by a query SUPPORTED_KEYS = ['@context', '@id', 'edges', 'view', 'related'] class ResultParse: ''' This class implements the necessary methods for p...
yezorat/mbserializer
refs/heads/development
mbserializer/fields/declarations.py
2
# coding: utf-8 __author__ = 'Junki Ishida' import pytz from .. import converters from .._xml import _getxmlns from .._compat import str_types, iteritems import sys class FieldBase(object): _dump_converters = None _parse_converters = None index = 0 options = None def __init__(self, key=None, re...
printedheart/philogl
refs/heads/master
examples/winds/data/BeautifulSoup.py
379
"""Beautiful Soup Elixir and Tonic "The Screen-Scraper's Friend" http://www.crummy.com/software/BeautifulSoup/ Beautiful Soup parses a (possibly invalid) XML or HTML document into a tree representation. It provides methods and Pythonic idioms that make it easy to navigate, search, and modify the tree. A well-formed X...
pietroalbini/botogram
refs/heads/master
botogram/objects/__init__.py
1
# Copyright (c) 2015-2019 The Botogram Authors (see AUTHORS) # # 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, mod...
nin042/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/commands/sheriffbot.py
121
# Copyright (c) 2009 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
nkalodimas/invenio
refs/heads/master
modules/miscutil/lib/xapianutils_bibrank_indexer.py
25
# -*- coding: utf-8 -*- ## ## This file is part of Invenio. ## Copyright (C) 2011 CERN. ## ## Invenio is free software; you can redistribute it and/or ## modify it under the terms of the GNU General Public License as ## published by the Free Software Foundation; either version 2 of the ## License, or (at your option) a...
kvar/ansible
refs/heads/seas_master_2.9.5
lib/ansible/modules/network/nxos/nxos_snmp_community.py
1
#!/usr/bin/python # # 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 distribut...
cyberark-bizdev/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/elasticache_facts.py
66
#!/usr/bin/python # Copyright (c) 2017 Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'community'} DOCUMENTATION = ''' module: ela...
yencarnacion/jaikuengine
refs/heads/master
.google_appengine/lib/django-1.5/tests/regressiontests/utils/datetime_safe.py
205
import unittest from datetime import date as original_date, datetime as original_datetime from django.utils.datetime_safe import date, datetime class DatetimeTests(unittest.TestCase): def setUp(self): self.just_safe = (1900, 1, 1) self.just_unsafe = (1899, 12, 31, 23, 59, 59) self.really_...
eestay/edx-platform
refs/heads/master
lms/djangoapps/django_comment_client/base/tests.py
39
import logging import json from django.test.client import Client, RequestFactory from django.contrib.auth.models import User from django.core.management import call_command from django.core.urlresolvers import reverse from mock import patch, ANY, Mock from nose.tools import assert_true, assert_equal # pylint: disable...
jcfr/ITK
refs/heads/master
Wrapping/Generators/Python/Tests/templated_pipeline.py
19
#========================================================================== # # 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...
sopier/django
refs/heads/master
tests/apps/models.py
380
from __future__ import unicode_literals from django.apps.registry import Apps from django.db import models # We're testing app registry presence on load, so this is handy. new_apps = Apps(['apps']) class TotallyNormal(models.Model): name = models.CharField(max_length=255) class SoAlternative(models.Model): ...
doganov/edx-platform
refs/heads/master
openedx/core/djangoapps/course_groups/management/commands/tests/test_post_cohort_membership_fix.py
32
""" Test for the post-migration fix commands that are included with this djangoapp """ from django.core.management import call_command from django.test.client import RequestFactory from openedx.core.djangoapps.course_groups.views import cohort_handler from openedx.core.djangoapps.course_groups.cohorts import get_cohor...
odoo-turkiye/odoo
refs/heads/8.0
addons/report_webkit/wizard/report_webkit_actions.py
382
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (c) 2010 Camptocamp SA (http://www.camptocamp.com) # All Right Reserved # # Author : Vincent Renaville # # WARNING: This program as such is intended to be used by professional # programmers who take the...
rosarior/mayan
refs/heads/master
apps/tags/cleanup.py
2
from __future__ import absolute_import from taggit.models import Tag def cleanup(): Tag.objects.all().delete()
songfj/scrapy
refs/heads/master
scrapy/commands/settings.py
114
from __future__ import print_function from scrapy.commands import ScrapyCommand class Command(ScrapyCommand): requires_project = False default_settings = {'LOG_ENABLED': False} def syntax(self): return "[options]" def short_desc(self): return "Get settings values" def add_option...
paninetworks/neutron
refs/heads/master
neutron/db/quota/api.py
4
# Copyright (c) 2015 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 ...
int19h/PTVS
refs/heads/master
Python/Tests/TestData/VirtualEnv/env/Lib/encodings/euc_jp.py
816
# # euc_jp.py: Python Unicode Codec for EUC_JP # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('euc_jp') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrem...
sekikn/incubator-airflow
refs/heads/master
airflow/providers/apache/sqoop/hooks/__init__.py
5130
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
NixaSoftware/CVis
refs/heads/master
venv/lib/python2.7/site-packages/numpy/ma/tests/test_mrecords.py
15
# pylint: disable-msg=W0611, W0612, W0511,R0201 """Tests suite for mrecords. :author: Pierre Gerard-Marchant :contact: pierregm_at_uga_dot_edu """ from __future__ import division, absolute_import, print_function import warnings import pickle import numpy as np import numpy.ma as ma from numpy import recarray from n...
orchidinfosys/odoo
refs/heads/master
openerp/addons/test_access_rights/models.py
82
from openerp import fields, models class SomeObj(models.Model): _name = 'test_access_right.some_obj' val = fields.Integer() class Container(models.Model): _name = 'test_access_right.container' some_ids = fields.Many2many('test_access_right.some_obj', 'test_access_right_rel', 'container_id', 'some_i...
stylianos-kampakis/scikit-learn
refs/heads/master
sklearn/feature_extraction/text.py
110
# -*- coding: utf-8 -*- # Authors: Olivier Grisel <olivier.grisel@ensta.org> # Mathieu Blondel <mathieu@mblondel.org> # Lars Buitinck <L.J.Buitinck@uva.nl> # Robert Layton <robertlayton@gmail.com> # Jochen Wersdörfer <jochen@wersdoerfer.de> # Roman Sinayev <roman.sinayev@gma...
kikokubo/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/unidecode/x09f.py
252
data = ( 'Cu ', # 0x00 'Qu ', # 0x01 'Chao ', # 0x02 'Wa ', # 0x03 'Zhu ', # 0x04 'Zhi ', # 0x05 'Mang ', # 0x06 'Ao ', # 0x07 'Bie ', # 0x08 'Tuo ', # 0x09 'Bi ', # 0x0a 'Yuan ', # 0x0b 'Chao ', # 0x0c 'Tuo ', # 0x0d 'Ding ', # 0x0e 'Mi ', # 0x0f 'Nai ', # 0x10 'Ding ...
adedayo/intellij-community
refs/heads/master
python/testData/override/kwargs.py
83
class A(): def m(self, *args, **kwargs): pass class B(A): pass
jfdsmabalot/kernel_sony_msm8974
refs/heads/master
tools/perf/scripts/python/syscall-counts-by-pid.py
11180
# system call counts, by pid # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os, sys sys.path.append(os.env...
listingmirror/boto
refs/heads/develop
boto/gs/resumable_upload_handler.py
153
# Copyright 2010 Google Inc. # # 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, merge, publish, dis- # trib...
gnowxilef/plexpy
refs/heads/master
lib/pythontwitter/__init__.py
25
#!/usr/bin/env python # # vim: sw=2 ts=2 sts=2 # # Copyright 2007 The Python-Twitter Developers # # 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-...
robinro/ansible
refs/heads/devel
lib/ansible/modules/cloud/amazon/ec2_group.py
8
#!/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. # ...
Verizon/libcloud
refs/heads/trunk
libcloud/common/cloudstack.py
25
# Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use ...
maestrano/odoo
refs/heads/master
openerp/addons/test_workflow/__init__.py
2074
# -*- coding: utf-8 -*- import models # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
mszewczy/odoo
refs/heads/8.0
openerp/addons/test_inherits/tests/test_inherits.py
266
# -*- coding: utf-8 -*- from openerp.tests import common class test_inherits(common.TransactionCase): def test_create_3_levels_inherits(self): """ Check that we can create an inherits on 3 levels """ pallet = self.env['test.pallet'].create({ 'name': 'B', 'field_in_box': 'b...
gentoo/gentoo-keys
refs/heads/master
gkeys-ldap/gkeyldap/actions.py
1
# #-*- coding:utf-8 -*- """ Gentoo-keys - gkeyldap/actions.py Primary api interface module @copyright: 2012 by Brian Dolbec <dol-sen@gentoo.org> @license: GNU GPL2, see COPYING for details. """ import re from collections import defaultdict, OrderedDict from gkeys.seed import Seeds from gkeyldap.con...
cntnboys/410Lab6
refs/heads/master
build/django/build/lib.linux-x86_64-2.7/django/contrib/formtools/tests/wizard/wizardtests/forms.py
103
import os import tempfile from django import forms from django.contrib.auth.models import User from django.core.files.storage import FileSystemStorage from django.forms.formsets import formset_factory from django.forms.models import modelformset_factory from django.http import HttpResponse from django.template import ...
djenniex/CouchPotatoServer
refs/heads/master
libs/subliminal/exceptions.py
170
# -*- coding: utf-8 -*- # Copyright 2011-2012 Antoine Bertin <diaoulael@gmail.com> # # This file is part of subliminal. # # subliminal is free software; you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as published by # the Free Software Foundation; either version 3 of...
philanthropy-u/edx-platform
refs/heads/master
openedx/core/djangoapps/content/course_overviews/management/commands/tests/test_simulate_publish.py
13
""" Tests the simulate_publish management command. """ from openedx.core.djangoapps.content.course_overviews.management.commands.simulate_publish import ( Command, name_from_fn ) from openedx.core.djangoapps.content.course_overviews.models import CourseOverview import openedx.core.djangoapps.content.course_overview...
CYBAI/servo
refs/heads/master
tests/wpt/grouping_formatter.py
2
# 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/. from mozlog.formatters import base import collections import json import os import sys import subprocess import platfor...
foreni-packages/hachoir-wx
refs/heads/master
hachoir_wx/field_view/field_menu.py
1
# -*- coding: utf-8 -*- from hachoir_wx.dialogs import file_save_dialog import wx class field_menu_t: def __init__(self, parent, menu): self.parent = parent self.menu = menu # forward this call because xrc doesn't allow menu # subclassing (as of 2.6.3) self.Bind = self.men...
flgiordano/netcash
refs/heads/master
+/google-cloud-sdk/lib/surface/container/clusters/list.py
1
# Copyright 2014 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 ag...
kartikdhar/djangotest
refs/heads/master
virt1/lib/python2.7/site-packages/django/db/migrations/operations/fields.py
92
from __future__ import unicode_literals from django.db.models.fields import NOT_PROVIDED from django.utils import six from django.utils.functional import cached_property from .base import Operation class AddField(Operation): """ Adds a field to a model. """ def __init__(self, model_name, name, fiel...
pieleric/odemis
refs/heads/master
src/odemis/driver/pvcam_h.py
4
from ctypes import * STRING = c_char_p NORMAL_COOL = 0 OPEN_NO_CHANGE = 4 OPEN_PRE_TRIGGER = 3 OPEN_PRE_SEQUENCE = 2 OPEN_PRE_EXPOSURE = 1 PBC_ENABLED = 1 OUTPUT_IMAGE_SHIFT = 10 READOUT_PORT_NORMAL = 1 OUTPUT_ACQUIRING = 12 SCR_PRE_OPEN_SHTR = 0 def ML32_BYTE(four_byte_val): return ((uns8) ((four_byte_val) >> 8)) #...
biomodels/BIOMD0000000417
refs/heads/master
BIOMD0000000417/model.py
1
import os path = os.path.dirname(os.path.realpath(__file__)) sbmlFilePath = os.path.join(path, 'BIOMD0000000417.xml') with open(sbmlFilePath,'r') as f: sbmlString = f.read() def module_exists(module_name): try: __import__(module_name) except ImportError: return False else: ret...
jasimpson/gnuradio-jasimpson
refs/heads/master
gr-msdd6000/src/python_test/udp_stream_rate_test.py
8
#!/usr/bin/python from socket import * import string import time import struct; import random; import array; import cmath; from numpy import *; from numpy.fft import *; from pylab import *; myport = random.randint(1025,65535); filename = "output.dat"; msdd_port = 10001 msdd_host = "10.45.4.46" buf = 100000; my_udp...
patriciolobos/desa8
refs/heads/master
openerp/addons/account/tests/test_bank_stmt_reconciliation_widget_ui.py
320
import openerp.tests @openerp.tests.common.at_install(False) @openerp.tests.common.post_install(True) class TestUi(openerp.tests.HttpCase): def test_01_admin_bank_statement_reconciliation(self): self.phantom_js("/", "openerp.Tour.run('bank_statement_reconciliation', 'test')", "openerp.Tour.tours.bank_stat...
ovnicraft/odoo_addons
refs/heads/8.0
smile_product_uom_multi/models/__init__.py
5
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012 Smile (<http://www.smile.fr>). All Rights Reserved # # This program is free software: you can redistribute it and/or modify # it under th...
40423114/2017springcd_hw
refs/heads/gh-pages
plugin/liquid_tags/include_code.py
246
""" Include Code Tag ---------------- This implements a Liquid-style video tag for Pelican, based on the octopress video tag [1]_ Syntax ------ {% include_code path/to/code [lang:python] [Title text] [codec:utf8] %} The "path to code" is specified relative to the ``code`` subdirectory of the content directory Option...
ayepezv/GAD_ERP
refs/heads/master
addons/website_mass_mailing/controllers/main.py
22
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo.http import route, request from odoo.addons.mass_mailing.controllers.main import MassMailController class MassMailController(MassMailController): @route('/mail/mailing/<int:mailing_id>/unsubscribe', type...
uri-mog/dreampie
refs/heads/master
dreampielib/gui/__init__.py
1
# Copyright 2010 Noam Yorav-Raphael # # This file is part of DreamPie. # # DreamPie 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. # ...
gangadhar-kadam/mtn-erpnext
refs/heads/master
accounts/search_criteria/invoices_overdue/__init__.py
37694
from __future__ import unicode_literals
armink/rt-thread
refs/heads/master
bsp/nrf5x/tools/sdk_dist.py
5
import os import sys import shutil cwd_path = os.getcwd() sys.path.append(os.path.join(os.path.dirname(cwd_path), 'rt-thread', 'tools')) # BSP dist function def dist_do_building(BSP_ROOT, dist_dir): from mkdist import bsp_copy_files import rtconfig library_dir = os.path.join(dist_dir, 'libraries') p...
mesako/basil
refs/heads/master
basil/contrib/sites/__init__.py
238
""" To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """
fabricehong/zim-desktop
refs/heads/master
tests/environ.py
5
# -*- coding: utf-8 -*- # Copyright 2013 Jaap Karssenberg <jaap.karssenberg@gmail.com> from __future__ import with_statement import tests import os from zim.environ import environ from zim.fs import File, Dir class EnvironmentContext(object): '''Context manager to be able to run test cases for environment para...
darkdukey/sdkbox-facebook-sample-v2
refs/heads/master
external/emscripten/third_party/ply/test/lex_empty.py
174
# lex_empty.py # # No rules defined import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.lex as lex tokens = [ "PLUS", "MINUS", "NUMBER", ] lex.lex()