repo_name
stringlengths
5
100
path
stringlengths
4
294
copies
stringclasses
990 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
Allow2CEO/browser-ios
brave/node_modules/ad-block/vendor/depot_tools/third_party/logilab/common/cli.py
63
7042
# copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved. # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr # # This file is part of logilab-common. # # logilab-common is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License as publ...
mpl-2.0
popazerty/openblackhole-SH4
lib/python/Plugins/SystemPlugins/SoftwareManager/Flash_online.py
2
21333
from Plugins.SystemPlugins.Hotplug.plugin import hotplugNotifier from Components.Button import Button from Components.Label import Label from Components.ActionMap import ActionMap from Components.MenuList import MenuList from Components.FileList import FileList from Components.Task import Task, Job, job_manager, Condit...
gpl-2.0
chickenboy10/tgstation
tools/mapmerge/maintloot.py
118
1940
#!/usr/bin/env python3 import argparse import collections import re from map_helpers import parse_map if __name__=='__main__': parser = argparse.ArgumentParser() parser.add_argument("mapfile") args = parser.parse_args() M = parse_map(args.mapfile) # Format of this map parsing # dict(coordinat...
agpl-3.0
aslamplr/shorts
gdata/calendar/data.py
121
9852
#!/usr/bin/python # # Copyright (C) 2009 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 ...
mit
andreparames/odoo
addons/delivery/__init__.py
376
1103
# -*- 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
ifduyue/sentry
src/sentry/web/frontend/vsts_extension_configuration.py
1
2305
from __future__ import absolute_import from django.core.urlresolvers import reverse from django.utils.http import urlencode from sentry.integrations.pipeline import IntegrationPipeline from sentry.models import Organization from sentry.web.frontend.base import BaseView class VstsExtensionConfigurationView(BaseView)...
bsd-3-clause
x303597316/hue
apps/jobbrowser/src/jobbrowser/yarn_models.py
14
13800
#!/usr/bin/env python # Licensed to Cloudera, Inc. under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. Cloudera, Inc. licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you ma...
apache-2.0
tsabi/Odoo-tsabi-fixes
addons/hr_payroll/__init__.py
433
1137
#-*- coding:utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # d$ # # This program is free software: you can redistribute it and/or modify # it ...
agpl-3.0
darktears/chromium-crosswalk
native_client_sdk/src/build_tools/generate_make.py
61
8678
# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import sys import buildbot_common import build_version import getos from buildbot_common import ErrorExit from easy_template impor...
bsd-3-clause
zhengbli/TypeScript-Sublime-Plugin
typescript/libs/logger.py
5
1321
""" Exposes logging and debugging operations. Use the 'debug', 'info', 'warning', 'error', or 'critial' methods on the 'log' object to send messages to the stderr (which appear in the console in Sublime). A log file is also created in the plugin folder for messages at the level set by the properties below. """ impor...
apache-2.0
armersong/zato
code/alembic/versions/0011_1500abb1cf3_gh184_bring_up_to_date.py
7
12953
"""gh184 Bring Alembic migrations up to date Revision ID: 0011_1500abb1cf3 Revises: 0010_3f03ae0ef253 Create Date: 2014-04-11 09:25:03.206296 """ # revision identifiers, used by Alembic. revision = '0011_1500abb1cf3' down_revision = '0010_3f03ae0ef253' from alembic import op import sqlalchemy as sa from sqlalchemy....
gpl-3.0
ganeshnalawade/ansible-modules-core
network/nxos/nxos_udld_interface.py
5
15769
#!/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...
gpl-3.0
deberon/ansible-modules-extras
packaging/os/layman.py
41
6970
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2014, Jakub Jirutka <jakub@jirutka.cz> # # 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 Lice...
gpl-3.0
azaghal/ansible
lib/ansible/cli/config.py
47
7576
# Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import (absolute_import, division, print_function) __metaclass__ = type import os import shlex import subprocess import yaml from ansible import context from ansible.cli...
gpl-3.0
abagh0703/RetailTrail
flask/lib/python2.7/site-packages/setuptools/command/develop.py
477
6447
from setuptools.command.easy_install import easy_install from distutils.util import convert_path, subst_vars from pkg_resources import Distribution, PathMetadata, normalize_path from distutils import log from distutils.errors import DistutilsError, DistutilsOptionError import os, sys, setuptools, glob class develop(ea...
mit
NischalLal/Humpty-Dumpty-SriGanesh
myblog/migrations/0002_contact_project_socialsite.py
1
1637
# -*- coding: utf-8 -*- # Generated by Django 1.11.2 on 2017-07-13 18:19 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('myblog', '0001_initial'), ] operations = [ migrations.CreateModel( ...
bsd-3-clause
ccwang002/biocloud-server-kai
src/rna_seq/migrations/0003_rnaseqexedetail.py
1
1617
# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-07-03 09:52 from __future__ import unicode_literals import analyses.fields from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('rna_seq', '0002_auto_20160702_1000'),...
mit
open-infinity/health-monitoring
nodechecker/nodechecker/lib/python/nodechecker/config.py
1
2856
#!/usr/bin/env python2 import ConfigParser class Config(object): def __init__(self, conf_file): config = ConfigParser.SafeConfigParser() config.read(conf_file) self.hm_root = config.get('hm', 'root') self.node_mode = config.get('node', 'mode') self.node_log_level = confi...
apache-2.0
maxive/erp
addons/project_timesheet_holidays/models/hr_holidays.py
1
4228
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import api, fields, models, _ from odoo.exceptions import ValidationError class HolidaysType(models.Model): _inherit = "hr.leave.type" def _default_project_id(self): company = self.company_id...
agpl-3.0
valexandersaulys/airbnb_kaggle_contest
venv/lib/python3.4/site-packages/numpy/lib/_iotools.py
53
31491
"""A collection of functions designed to help I/O with ascii files. """ from __future__ import division, absolute_import, print_function __docformat__ = "restructuredtext en" import sys import numpy as np import numpy.core.numeric as nx from numpy.compat import asbytes, bytes, asbytes_nested, basestring if sys.vers...
gpl-2.0
fengbaicanhe/intellij-community
python/lib/Lib/encodings/cp856.py
593
12679
""" Python Character Mapping Codec cp856 generated from 'MAPPINGS/VENDORS/MISC/CP856.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
apache-2.0
marek-sezemsky/coreemu
daemon/core/session.py
7
49204
# # CORE # Copyright (c)2010-2013 the Boeing Company. # See the LICENSE file included in this distribution. # # authors: Tom Goff <thomas.goff@boeing.com> # Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com> # ''' session.py: defines the Session class used by the core-daemon daemon program that manages a CORE ses...
bsd-2-clause
gavrieltal/opencog
opencog/embodiment/Monitor/emotion_space_browser.py
17
8987
import numpy as np import zmq import json import matplotlib as mpl from matplotlib.figure import Figure from mpl_toolkits.mplot3d import Axes3D from matplotlib.backends.backend_qt4agg import FigureCanvasQTAgg as FigureCanvas from matplotlib.backends.backend_qt4agg import NavigationToolbar2QTAgg as NavigationTo...
agpl-3.0
zigitax/pupy
pupy/packages/windows/amd64/psutil/_common.py
68
6995
# /usr/bin/env python # Copyright (c) 2009, Giampaolo Rodola'. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """Common objects shared by all _ps* modules.""" from __future__ import division import errno import functools import os import soc...
bsd-3-clause
konstruktoid/ansible-upstream
test/units/modules/cloud/amazon/test_api_gateway.py
45
2355
# # (c) 2016 Michael De La Rue # # 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...
gpl-3.0
eugene1g/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/model/patchlog.py
119
3107
# Copyright (C) 2013 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 ...
bsd-3-clause
tastynoodle/django
tests/admin_changelist/models.py
64
2568
from django.db import models from django.utils.encoding import python_2_unicode_compatible class Event(models.Model): # Oracle can have problems with a column named "date" date = models.DateField(db_column="event_date") class Parent(models.Model): name = models.CharField(max_length=128) class Child(model...
bsd-3-clause
the-it/WS_THEbotIT
archive/online/2015/151022_orbis_insert_chapter.py
1
1745
# -*- coding: utf-8 -*- __author__ = 'eso' import sys sys.path.append('../../') #from tools.catscan import CatScan import re import requests import pywikibot #Skript doesn't work at the moment. It seems, that the database is lacking behind. Let's wait for a few days. #Mazbe then all backlinks will be found. def add_z...
mit
IntelLabs/numba
numba/cuda/tests/cudapy/test_reduction.py
6
2528
import numpy as np from numba import cuda from numba.core.config import ENABLE_CUDASIM from numba.cuda.testing import CUDATestCase import unittest # Avoid recompilation of the sum_reduce function by keeping it at global scope sum_reduce = cuda.Reduce(lambda a, b: a + b) class TestReduction(CUDATestCase): def _su...
bsd-2-clause
SOKP/external_chromium_org
chrome/common/extensions/docs/server2/samples_model_test.py
32
1264
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import json import os import unittest from server_instance import ServerInstance from test_file_system import TestFileSystem from test...
bsd-3-clause
githubutilities/LeetCode
Python/binary-watch.py
3
1396
# Time: O(1) # Space: O(1) # A binary watch has 4 LEDs on the top which represent the hours (0-11), # and the 6 LEDs on the bottom represent the minutes (0-59). # # Each LED represents a zero or one, with the least significant bit on the right. # # For example, the above binary watch reads "3:25". # # Given a non-neg...
mit
whitehorse-io/encarnia
pyenv/lib/python2.7/site-packages/pytz/exceptions.py
657
1333
''' Custom exceptions raised by pytz. ''' __all__ = [ 'UnknownTimeZoneError', 'InvalidTimeError', 'AmbiguousTimeError', 'NonExistentTimeError', ] class UnknownTimeZoneError(KeyError): '''Exception raised when pytz is passed an unknown timezone. >>> isinstance(UnknownTimeZoneError(), LookupError)...
mit
tedder/ansible-modules-core
cloud/amazon/ec2_scaling_policy.py
53
6900
#!/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 distributed...
gpl-3.0
mbkumar/pymatgen
pymatgen/command_line/mcsqs_caller.py
1
8263
""" Module to call mcsqs, distributed with AT-AT https://www.brown.edu/Departments/Engineering/Labs/avdw/atat/ """ import os import warnings from subprocess import Popen, TimeoutExpired from typing import Dict, Union, List, NamedTuple, Optional from pathlib import Path from monty.dev import requires from monty.os.pat...
mit
ethereum/pyrlp
rlp/lazy.py
1
5999
from collections.abc import Iterable, Sequence from .codec import consume_length_prefix, consume_payload from .exceptions import DecodingError from .atomic import Atomic def decode_lazy(rlp, sedes=None, **sedes_kwargs): """Decode an RLP encoded object in a lazy fashion. If the encoded object is a bytestring...
mit
rdeheele/odoo
addons/hw_posbox_upgrade/__openerp__.py
313
1696
# -*- 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
Idematica/django-oscar
sites/demo/urls.py
3
1030
from django.conf.urls import patterns, include from django.conf import settings from django.contrib import admin from django.conf.urls.static import static from stores.app import application as stores_app from stores.dashboard.app import application as dashboard_app from apps.app import application from datacash.dashb...
bsd-3-clause
ahorincar/bloodhound_solr_plugin
bhsolr/search_resources/wiki_search.py
1
1255
# -*- coding: UTF-8 -*- # 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 (t...
apache-2.0
angadpc/Alexa-Project-
requests/packages/chardet/mbcsgroupprober.py
2769
1967
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer. All R...
mit
raccoongang/edx-platform
cms/celery.py
3
1372
""" Import celery, load its settings from the django settings and auto discover tasks in all installed django apps. Taken from: http://celery.readthedocs.org/en/latest/django/first-steps-with-django.html """ from __future__ import absolute_import import os from celery import Celery from django.conf import settings ...
agpl-3.0
GNS3/gns3-server
gns3server/schemas/custom_adapters.py
1
1672
#!/usr/bin/env python # # Copyright (C) 2016 GNS3 Technologies Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # ...
gpl-3.0
strint/tensorflow
tensorflow/contrib/learn/python/learn/tests/dataframe/estimator_utils_test.py
9
6856
# Copyright 2016 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...
apache-2.0
buqing2009/MissionPlanner
Lib/site-packages/numpy/doc/misc.py
59
5765
""" ============= Miscellaneous ============= IEEE 754 Floating Point Special Values: ----------------------------------------------- Special values defined in numpy: nan, inf, NaNs can be used as a poor-man's mask (if you don't care what the original value was) Note: cannot use equality to test NaNs. E.g.: :: >>...
gpl-3.0
BeegorMif/HTPC-Manager
lib/concurrent/futures/_compat.py
179
4645
from keyword import iskeyword as _iskeyword from operator import itemgetter as _itemgetter import sys as _sys def namedtuple(typename, field_names): """Returns a new subclass of tuple with named fields. >>> Point = namedtuple('Point', 'x y') >>> Point.__doc__ # docstring for the new cla...
gpl-3.0
SoreGums/bitcoinxt
qa/rpc-tests/getchaintips.py
140
2130
#!/usr/bin/env python2 # Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # Exercise the getchaintips API. We introduce a network split, work # on chains of different lengths, and joi...
mit
karllessard/tensorflow
tensorflow/python/framework/dtypes_test.py
8
15771
# Copyright 2015 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...
apache-2.0
yongtang/tensorflow
tensorflow/lite/testing/op_tests/unfused_gru.py
17
2410
# 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...
apache-2.0
xmwu/pynt
docs/conf.py
1
8263
# -*- coding: utf-8 -*- # # PyNT documentation build configuration file, created by # sphinx-quickstart on Wed Jul 20 00:37:55 2016. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All ...
gpl-3.0
evansd/django
tests/utils_tests/test_archive.py
91
3007
import os import shutil import stat import sys import tempfile import unittest from django.utils.archive import Archive, extract TEST_DIR = os.path.join(os.path.dirname(__file__), 'archives') class ArchiveTester: archive = None def setUp(self): """ Create temporary directory for testing ext...
bsd-3-clause
robobrobro/ballin-octo-shame
lib/Python-3.4.3/Lib/test/test_statistics.py
8
60449
"""Test suite for statistics module, including helper NumericTestCase and approx_equal function. """ import collections import decimal import doctest import math import random import sys import types import unittest from decimal import Decimal from fractions import Fraction # Module to be tested. import statistics...
mit
wreckJ/intellij-community
plugins/hg4idea/testData/bin/hgext/inotify/common.py
94
1560
# server.py - inotify common protocol code # # Copyright 2006, 2007, 2008 Bryan O'Sullivan <bos@serpentine.com> # Copyright 2007, 2008 Brendan Cully <brendan@kublai.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import cStri...
apache-2.0
weisongchen/flaskapp
venv/lib/python2.7/site-packages/pip/exceptions.py
344
8121
"""Exceptions used throughout package""" from __future__ import absolute_import from itertools import chain, groupby, repeat from pip._vendor.six import iteritems class PipError(Exception): """Base pip exception""" class InstallationError(PipError): """General exception during installation""" class Unin...
mit
gusai-francelabs/datafari
debian7/elk/kibana/node/lib/node_modules/npm/node_modules/node-gyp/gyp/pylib/gyp/MSVSSettings.py
383
45223
# Copyright (c) 2012 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. r"""Code to validate and convert settings of the Microsoft build tools. This file contains code to validate and convert settings of the Microsoft build tools. Th...
apache-2.0
bratsche/Neutron-Drive
google_appengine/lib/django_1_3/tests/regressiontests/custom_columns_regress/tests.py
91
2919
from django.test import TestCase from django.core.exceptions import FieldError from models import Author, Article def pks(objects): """ Return pks to be able to compare lists""" return [o.pk for o in objects] class CustomColumnRegression(TestCase): def assertRaisesMessage(self, exc, msg, func, *args, **...
bsd-3-clause
amitjamadagni/sympy
sympy/assumptions/ask.py
1
11179
"""Module for querying SymPy objects about assumptions.""" from sympy.core import sympify from sympy.logic.boolalg import to_cnf, And, Not, Or, Implies, Equivalent from sympy.logic.inference import satisfiable from sympy.assumptions.assume import (global_assumptions, Predicate, AppliedPredicate) class Q: ...
bsd-3-clause
kderynski/acos-client
tests/unit/test_member.py
4
2240
# Copyright 2014, Doug Wiegley, A10 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 appli...
apache-2.0
jank3/django
django/template/backends/django.py
240
5574
# Since this package contains a "django" module, this is required on Python 2. from __future__ import absolute_import import sys import warnings from importlib import import_module from pkgutil import walk_packages from django.apps import apps from django.conf import settings from django.template import TemplateDoesN...
bsd-3-clause
ironchicken/pycoon
src/pycoon/serializers/html_serializer.py
1
2383
""" Copyright (C) Richard Lewis 2006 This software is licensed under the terms of the GNU GPL. """ from pycoon.serializers import serializer, SerializerError from pycoon.components import invokation_syntax from pycoon.helpers import correct_script_chars from lxml.etree import tounicode import os try: import tidy...
gpl-2.0
kennethreitz/httpbin
test_httpbin.py
3
32179
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import base64 import unittest import contextlib import six import json from werkzeug.http import parse_dict_header from hashlib import md5, sha256, sha512 from six import BytesIO import httpbin from httpbin.helpers import parse_multi_value_header @contextlib.co...
isc
priomsrb/vimswitch
vimswitch/test/test_SwitchProfileAction.py
1
6070
from .FakeFileDownloader import createFakeFileDownloader from .FileSystemTestCase import FileSystemTestCase from mock import MagicMock, patch from vimswitch.Application import Application from vimswitch.Profile import Profile from vimswitch.Settings import Settings from vimswitch.SwitchProfileAction import createSwitch...
gpl-2.0
VirtueSecurity/aws-extender
BappModules/boto/mws/response.py
152
23191
# Copyright (c) 2012-2014 Andy Davidoff http://www.disruptek.com/ # # 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...
mit
Kriechi/pathod
libpathod/language/writer.py
5
2083
import time from netlib.exceptions import TcpDisconnect import netlib.tcp BLOCKSIZE = 1024 # It's not clear what the upper limit for time.sleep is. It's lower than the # maximum int or float. 1 year should do. FOREVER = 60 * 60 * 24 * 365 def send_chunk(fp, val, blocksize, start, end): """ (start, end): ...
mit
JVenberg/PokemonGo-Bot-Desktop
pywin/Lib/encodings/raw_unicode_escape.py
852
1208
""" Python 'raw-unicode-escape' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs ### Codec APIs class Codec(codecs.Codec): # Note: Binding these as C functions will result in the class not # converting them to methods. This is ...
mit
klmitch/neutron
neutron/plugins/ml2/drivers/openvswitch/agent/openflow/native/br_int.py
7
10211
# Copyright (C) 2014,2015 VA Linux Systems Japan K.K. # Copyright (C) 2014,2015 YAMAMOTO Takashi <yamamoto at valinux co jp> # 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 t...
apache-2.0
nubark/odoo
addons/project_timesheet/report/project_report.py
41
1178
# -*- coding: utf-8 -*- from datetime import datetime from dateutil.relativedelta import relativedelta from openerp.osv import fields,osv from openerp import tools class report_project_task_user(osv.Model): _inherit = "report.project.task.user" _columns = { 'hours_planned': fields.float('Planned Hours...
gpl-3.0
resturp/Symilar
Window.py
1
2443
"""module:: symilar/Window :platform: Linix :synopsis: Class for a sliding window over a string population winnow array. .. moduleauthor:: Thomas Boose <thomas@boose.nl> .. license:: Copyright 2014 Thomas Boose thomas at boose dot nl. Licensed under the Apache License, Version 2.0 (the "License"); you may not use th...
apache-2.0
mozilla/stoneridge
python/src/Lib/encodings/shift_jisx0213.py
816
1059
# # shift_jisx0213.py: Python Unicode Codec for SHIFT_JISX0213 # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_jp, codecs import _multibytecodec as mbc codec = _codecs_jp.getcodec('shift_jisx0213') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEnc...
mpl-2.0
vlinhd11/vlinhd11-android-scripting
python-build/python-libs/xmpppy/doc/examples/logger.py
87
2608
#!/usr/bin/python # -*- coding: koi8-r -*- from xmpp import * import time,os #BOT=(botjid,password) BOT=('test@penza-gsm.ru','test') #CONF=(confjid,password) CONF=('talks@conference.jabber.ru','') LOGDIR='./' PROXY={} #PROXY={'host':'192.168.0.1','port':3128,'username':'luchs','password':'secret'} ####################...
apache-2.0
anbangr/trusted-juju
juju/providers/ec2/__init__.py
1
9518
import os import re from twisted.internet.defer import inlineCallbacks, returnValue from txaws.ec2.exception import EC2Error from txaws.service import AWSServiceRegion from txaws.util import parse as parse_url from .utils import ssl from juju.errors import ( MachinesNotFound, ProviderError, ProviderInteractionEr...
agpl-3.0
ajayapra/shoebox-spybot
catkin_ws/src/object_tracking/src/scripts/joy_start.py
1
2361
#!/usr/bin/env python # Use joystick input to launch object-tracking nodes in jackal # # Intro to Robotics - EE5900 - Spring 2017 # Assignment #6 # # Project #6 Group #2 # Prithvi # Aswin # Akhil (Team Lead) # # version: v1.3 # define imports import rospy import roslaun...
gpl-3.0
waseem18/oh-mainline
vendor/packages/twisted/doc/core/howto/listings/pb/copy_sender.py
18
1497
#!/usr/bin/env python # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. from twisted.spread import pb, jelly from twisted.python import log from twisted.internet import reactor class LilyPond: def setStuff(self, color, numFrogs): self.color = color self.numFrogs = numFrogs ...
agpl-3.0
GrimDerp/httpie
tests/test_stream.py
49
1828
import pytest from httpie.compat import is_windows from httpie.output.streams import BINARY_SUPPRESSED_NOTICE from utils import http, TestEnvironment from fixtures import BIN_FILE_CONTENT, BIN_FILE_PATH class TestStream: # GET because httpbin 500s with binary POST body. @pytest.mark.skipif(is_windows, ...
bsd-3-clause
unindented/streamcode
client/static/jsrepl/extern/python/closured/lib/python2.7/email/quoprimime.py
246
10848
# Copyright (C) 2001-2006 Python Software Foundation # Author: Ben Gertzfield # Contact: email-sig@python.org """Quoted-printable content transfer encoding per RFCs 2045-2047. This module handles the content transfer encoding method defined in RFC 2045 to encode US ASCII-like 8-bit data called `quoted-printable'. It...
mit
ganeshrn/ansible
lib/ansible/module_utils/distro/__init__.py
15
2026
# (c) 2018 Toshio Kuratomi <tkuratomi@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ...
gpl-3.0
muccg/rdrf
rdrf/rdrf/scripts/data_dictionary_generator.py
1
13263
# encoding: utf-8 import yaml import sys from string import strip import codecs def decode(l): return map(lambda s: s.decode('utf-8'), l) RANGE_DELIMITER = "|" # COUNTRIES = decode(["Afghanistan", "Åland Islands", "Albania", "Algeria", "American Samoa", "Andorra", "Angola", "Anguilla", "Antarctica", "Antigua an...
agpl-3.0
dev-zero/cp2k-tools
cp2k_tools/generator/cli.py
1
1081
#!/usr/bin/env python # vim: set fileencoding=utf-8 ts=8 sw=4 tw=0 : # Copyright (c) 2017 Tiziano Müller <tiziano.mueller@chem.uzh.ch>. # # 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 ...
apache-2.0
roidelapluie/Lexpage
app/profile/forms.py
2
5553
from django.contrib.auth.models import User from django.contrib.auth.forms import AuthenticationForm, PasswordChangeForm, SetPasswordForm from commons.widgets import DateTimePicker from django import forms from .models import Profile from captcha.fields import ReCaptchaField import datetime user_fields = ['first_na...
gpl-3.0
chris-allan/openmicroscopy
components/tools/registry/whois.py
4
4213
#!/usr/bin/env python # # OMERO Registry Whois Database # Copyright 2007 Glencoe Software, Inc. All Rights Reserved. # try: from pysqlite2 import dbapi2 as sqlite except: from sqlite3 import dbapi2 as sqlite from pprint import pprint import os, sys, exceptions class whoisdb: def __create__(self, dbname=...
gpl-2.0
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/site-packages/django/core/management/utils.py
405
2590
from __future__ import unicode_literals import os import sys from subprocess import PIPE, Popen from django.utils import six from django.utils.encoding import DEFAULT_LOCALE_ENCODING, force_text from .base import CommandError def popen_wrapper(args, os_err_exc_type=CommandError, universal_newlines=True): """ ...
mit
henryfjordan/django
django/contrib/auth/migrations/0001_initial.py
200
5063
# -*- coding: utf-8 -*- from __future__ import unicode_literals import django.contrib.auth.models from django.core import validators from django.db import migrations, models from django.utils import timezone class Migration(migrations.Migration): dependencies = [ ('contenttypes', '__first__'), ] ...
bsd-3-clause
ShassAro/ShassAro
Bl_project/blVirtualEnv/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/schema.py
36
3619
from django.db.backends.schema import BaseDatabaseSchemaEditor class DatabaseSchemaEditor(BaseDatabaseSchemaEditor): sql_create_sequence = "CREATE SEQUENCE %(sequence)s" sql_delete_sequence = "DROP SEQUENCE IF EXISTS %(sequence)s CASCADE" sql_set_sequence_max = "SELECT setval('%(sequence)s', MAX(%(column...
gpl-2.0
nens/raster-tools
raster_tools/groups.py
1
5563
# (c) Nelen & Schuurmans, see LICENSE.rst. # -*- coding: utf-8 -*- import logging from osgeo import gdal from osgeo import gdal_array from osgeo import ogr from osgeo import osr import numpy as np from raster_tools import datasets from raster_tools import utils logger = logging.getLogger(__name__) class Meta(obje...
gpl-3.0
anibali/pywebp
webp_build/builder.py
1
1460
import json import platform import tempfile from os import path, getcwd from cffi import FFI from conans.client import conan_api from importlib_resources import read_text conan, _, _ = conan_api.ConanAPIV1.factory() # Use Conan to install libwebp with tempfile.TemporaryDirectory() as tmp_dir: conan.install(path=...
mit
dgnorth/drift
drift/management/commands/ssh.py
1
2926
# -*- coding: utf-8 -*- import sys import os import os.path import subprocess import boto3 from click import echo from six import print_ from six.moves import input from drift.utils import get_config def get_options(parser): parser.add_argument("service", help="Service or deployable to connect to", nargs='?') ...
mit
smilusingjavascript/blink
Tools/Scripts/webkitpy/common/message_pool.py
61
12097
# 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: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the ...
bsd-3-clause
ops-hero/trebuchet
trebuchet/lib/controller.py
1
2427
import itertools from .package import get_packages from .my_yaml import load_yaml_config, print_pretty, get_yaml_config from .callbacks import do_web_callback, jsonfy_pkg def _get_all_packages(project, architecture=None, options=None, version_options=None): """ Generator of packages to be built. """ ...
gpl-3.0
davidcoallier/bigcouch
couchjs/scons/scons-local-2.0.1/SCons/Tool/sgilink.py
61
2219
"""SCons.Tool.sgilink Tool-specific initialization for the SGI MIPSPro linker on SGI. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2...
apache-2.0
sivertkh/gtrackcore
gtrackcore/core/Api.py
1
6929
import shutil, os, sys import logging from gtrackcore.input.adapters.TrackGenomeElementSource import TrackViewListGenomeElementSource from gtrackcore.preprocess.PreProcessTracksJob import PreProcessTrackGESourceJob from gtrackcore.track.hierarchy.ProcTrackNameSource import ProcTrackNameSource from gtrackcore.track.hie...
gpl-3.0
fengren/python_koans
python2/koans/about_proxy_object_project.py
78
4194
#!/usr/bin/env python # -*- coding: utf-8 -*- # Project: Create a Proxy Class # # In this assignment, create a proxy class (one is started for you # below). You should be able to initialize the proxy object with any # object. Any attributes called on the proxy object should be forwarded # to the target object. As e...
mit
bcferrycoder/holideck
requests/packages/chardet2/sbcharsetprober.py
25
4689
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Universal charset detector code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 2001 # the Initial Developer....
mit
google/rekall
setup.py
1
4076
#!/usr/bin/env python # Rekall # Copyright 2013 Google Inc. All Rights Reserved. # # Authors: # Michael Cohen <scudette@gmail.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 versi...
gpl-2.0
Caylo/easybuild-framework
easybuild/toolchains/mpi/craympich.py
2
3478
## # Copyright 2014-2016 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
gpl-2.0
luis-rr/saga-python
docs/concepts/exceptions.py
5
5931
import sys import traceback # ------------------------------------------------------------------------------ # class MyEx (Exception) : # -------------------------------------------------------------------------- # # the exception constructor always needs a message (no need complaining if # there is ...
mit
a-doumoulakis/tensorflow
tensorflow/contrib/distributions/python/ops/bijectors/sigmoid.py
85
1141
# 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...
apache-2.0
bruab/reddit_sna
src/compare_subreddits.py
1
4903
#!/usr/bin/env python3 import sys import praw from pprint import pprint def get_all_redditors_from_a_sub(praw_handle, sub, num_comments=None): """Return a list of users who submitted the last num_comments comments to sub""" # if num_comments == None, get as many comments as possible all_redditors = [] ...
mit
mmnelemane/neutron
neutron/tests/api/base_security_groups.py
48
2176
# Copyright 2013 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 requ...
apache-2.0
jokerdino/unity-tweak-tool
UnityTweakTool/config/logging.py
2
1498
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Team: # J Phani Mahesh <phanimahesh@gmail.com> # Barneedhar (jokerdino) <barneedhar@ubuntu.com> # Amith KK <amithkumaran@gmail.com> # Georgi Karavasilev <motorslav@gmail.com> # Sam Tran <samvtran@gmail.com> # Sam Hewitt <hewittsamuel@gmail.com> # Angel Ar...
gpl-3.0
jorgebodega/PDL
library/test/yacc_simple.py
174
1542
# ----------------------------------------------------------------------------- # yacc_simple.py # # A simple, properly specifier grammar # ----------------------------------------------------------------------------- import sys if ".." not in sys.path: sys.path.insert(0,"..") import ply.yacc as yacc from calclex imp...
gpl-3.0
joeythesaint/yocto-autobuilder
lib/python2.7/site-packages/autobuilder/YoctoMailer.py
3
4464
''' Created on June 28, 2013 __author__ = "Elizabeth 'pidge' Flanagan" __copyright__ = "Copyright 2012-2013, Intel Corp." __credits__ = ["Elizabeth Flanagan"] __license__ = "GPL" __version__ = "2.0" __maintainer__ = "Elizabeth Flanagan" __email__ = "elizabeth.flanagan@intel.com" ''' from buildbot.status.mail import Ma...
gpl-2.0
Imaginashion/cloud-vision
.fr-d0BNfn/django-jquery-file-upload/venv/lib/python3.5/site-packages/PIL/PcfFontFile.py
72
6194
# # THIS IS WORK IN PROGRESS # # The Python Imaging Library # $Id$ # # portable compiled font file parser # # history: # 1997-08-19 fl created # 2003-09-13 fl fixed loading of unicode fonts # # Copyright (c) 1997-2003 by Secret Labs AB. # Copyright (c) 1997-2003 by Fredrik Lundh. # # See the README file for informa...
mit