repo_name
stringlengths
6
100
path
stringlengths
4
294
copies
stringlengths
1
5
size
stringlengths
4
6
content
stringlengths
606
896k
license
stringclasses
15 values
jonyroda97/redbot-amigosprovaveis
lib/youtube_dl/extractor/sevenplus.py
24
2923
# coding: utf-8 from __future__ import unicode_literals import re from .brightcove import BrightcoveNewIE from ..compat import compat_str from ..utils import ( try_get, update_url_query, ) class SevenPlusIE(BrightcoveNewIE): IE_NAME = '7plus' _VALID_URL = r'https?://(?:www\.)?7plus\.com\.au/(?P<path...
gpl-3.0
tpsatish95/Python-Workshop
Python Environment Setup/Alternate/1. Python/1. Installer/Python-3.4.0(Linux)/Lib/xml/etree/ElementTree.py
74
57368
"""Lightweight XML support for Python. XML is an inherently hierarchical data format, and the most natural way to represent it is with a tree. This module has two classes for this purpose: 1. ElementTree represents the whole XML document as a tree and 2. Element represents a single node in this tree. In...
apache-2.0
edisonlz/fruit
web_project/base/site-packages/django_extensions/tests/test_compile_pyc.py
38
2083
import os import six import fnmatch from django.test import TestCase from django.core.management import call_command from django_extensions.management.utils import get_project_root class CompilePycTests(TestCase): def setUp(self): self._settings = os.environ.get('DJANGO_SETTINGS_MODULE') os.enviro...
apache-2.0
wakatime/wakatime
wakatime/packages/urllib3/connectionpool.py
94
35358
from __future__ import absolute_import import errno import logging import sys import warnings from socket import error as SocketError, timeout as SocketTimeout import socket from .exceptions import ( ClosedPoolError, ProtocolError, EmptyPoolError, HeaderParsingError, HostChangedError, Locatio...
bsd-3-clause
codasus/django-blogages
blogages/django/core/files/uploadhandler.py
136
7193
""" Base file upload handler classes, and the built-in concrete subclasses """ try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.files.uploadedfile import TemporaryUplo...
mit
Zephor5/scrapy
scrapy/spiders/__init__.py
134
3606
""" Base class for Scrapy spiders See documentation in docs/topics/spiders.rst """ import logging import warnings from scrapy import signals from scrapy.http import Request from scrapy.utils.trackref import object_ref from scrapy.utils.url import url_is_from_spider from scrapy.utils.deprecate import create_deprecated...
bsd-3-clause
euphorie/Euphorie
src/euphorie/client/tests/test_functional_country.py
1
2524
# coding=utf-8 from euphorie.client.tests.utils import addSurvey from euphorie.client.tests.utils import registerUserInClient from euphorie.content.tests.utils import BASIC_SURVEY from euphorie.testing import EuphorieFunctionalTestCase import urllib class CountryFunctionalTests(EuphorieFunctionalTestCase): def t...
gpl-2.0
dan-bowerman/PAGER
PAGER_Scripts/publishService.py
1
21916
# -*- coding: UTF-8 -*- """Functions to aid in publishing a service in the publication workflow. """ import glob import json import os import random import string import urllib2 import xml.dom.minidom as DOM from xml.sax.saxutils import escape import arcpy import checkError def createMXD(inFolder, template,logs): ...
mit
tsnoam/python-telegram-bot
tests/test_update.py
1
2618
#!/usr/bin/env python # # A library that provides a Python interface to the Telegram Bot API # Copyright (C) 2015-2016 # Leandro Toledo de Souza <devs@python-telegram-bot.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 b...
gpl-3.0
jjgomera/pychemqt
lib/mEoS/MM.py
1
7485
#!/usr/bin/python3 # -*- coding: utf-8 -*- '''Pychemqt, Chemical Engineering Process simulator Copyright (C) 2009-2017, Juan José Gómez Romera <jjgomera@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 Softwar...
gpl-3.0
40223219/2015_midterm
static/Brython3.1.1-20150328-091302/Lib/heapq.py
628
18065
"""Heap queue algorithm (a.k.a. priority queue). Heaps are arrays for which a[k] <= a[2*k+1] and a[k] <= a[2*k+2] for all k, counting elements from 0. For the sake of comparison, non-existing elements are considered to be infinite. The interesting property of a heap is that a[0] is always its smallest element. Usag...
gpl-3.0
alexlib/Qt-Python-Binding-Examples
windows/custom_win_flags.py
1
1096
#!/usr/bin/env python #-*- coding:utf-8 -*- """ demo template Tested environment: Mac OS X 10.6.8 """ import sys try: from PySide import QtCore from PySide import QtGui except ImportError: from PyQt4 import QtCore from PyQt4 import QtGui class SheetWin(QtGui.QWidget): def __init__(self,...
bsd-3-clause
ContinuumIO/dask
dask/cache.py
2
2000
from .callbacks import Callback from timeit import default_timer from numbers import Number import sys overhead = sys.getsizeof(1.23) * 4 + sys.getsizeof(()) * 4 class Cache(Callback): """ Use cache for computation Examples -------- >>> cache = Cache(1e9) # doctest: +SKIP The cache ca...
bsd-3-clause
HybridF5/tempest
tempest/api/volume/test_volumes_negative.py
5
13622
# Copyright 2012 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
codecakes/random_games
single_linkedlist.py
1
8155
## Singly Linked List ## Each Node is relatively Head to the next node it refers to. ## The Linked List can be broken down into: ## Nodes. """ Single Linked List can: - Insert at Head, Tail, Inbetween - Delete at Head, Tail, Inbetween - Add another LinkedList to Existing """ class LinkedNode(object): ...
mit
googlefonts/fontbakery
Lib/fontbakery/reporters/__init__.py
1
4250
""" Separation of Concerns Disclaimer: While created specifically for checking fonts and font-families this module has no domain knowledge about fonts. It can be used for any kind of (document) checking. Please keep it so. It will be valuable for other domains as well. Domain specific knowledge should be encoded only i...
apache-2.0
JeyZeta/Dangerous
Dangerous/Golismero/thirdparty_libs/dns/zone.py
26
37794
# Copyright (C) 2003-2007, 2009-2011 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "...
mit
harshilasu/LinkurApp
y/google-cloud-sdk/platform/gsutil/third_party/boto/boto/ec2/bundleinstance.py
18
2754
# Copyright (c) 2010 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 rights to use, copy, modify, m...
gpl-3.0
NeovaHealth/odoo
addons/l10n_ve/__openerp__.py
260
2960
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 Tiny SPRL (<http://tiny.be>). All Rights Reserved ############################################################################## # Modu...
agpl-3.0
shreddd/newt-2.0
authnz/adapters/template_adapter.py
3
2418
"""Auth Adapter Template File IMPORTANT: NOT A FUNCTIONAL ADAPTER. FUNCTIONS MUST BE IMPLEMENTED Notes: - Each of the functions defined below must return a json serializable object, json_response, or valid HttpResponse object - A json_response creates an HttpResponse object given parameters: - c...
bsd-2-clause
miptliot/edx-platform
common/lib/capa/capa/tests/test_customrender.py
37
2295
from lxml import etree import unittest import xml.sax.saxutils as saxutils from capa.tests.helpers import test_capa_system from capa import customrender # just a handy shortcut lookup_tag = customrender.registry.get_class_for_tag def extract_context(xml): """ Given an xml element corresponding to the output...
agpl-3.0
anryko/ansible
test/units/modules/network/fortios/test_fortios_user_security_exempt_list.py
21
7891
# Copyright 2019 Fortinet, 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. # # This program is distributed in the...
gpl-3.0
deandunbar/html2bwml
venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/sjisprober.py
1182
3734
######################## 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...
mit
liuliwork/django
tests/model_options/models/default_related_name.py
414
1056
from django.db import models class Author(models.Model): first_name = models.CharField(max_length=128) last_name = models.CharField(max_length=128) class Editor(models.Model): name = models.CharField(max_length=128) bestselling_author = models.ForeignKey(Author, models.CASCADE) class Book(models.M...
bsd-3-clause
rghe/ansible
lib/ansible/modules/network/panos/panos_security_rule.py
16
19823
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2016, techbizdev <techbizdev@paloaltonetworks.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 ANSIBLE_METADATA = {'metadata_version':...
gpl-3.0
Jai-Chaudhary/termite-data-server
web2py/scripts/tickets2db.py
38
1391
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys import os import time import stat import datetime from gluon.utils import md5_hash from gluon.restricted import RestrictedError, TicketStorage from gluon import DAL SLEEP_MINUTES = 5 errors_path = os.path.join(request.folder, 'errors') try: db_string = op...
bsd-3-clause
proxysh/Safejumper-for-Mac
buildlinux/env32/lib/python2.7/site-packages/cffi/cffi_opcode.py
64
5477
class CffiOp(object): def __init__(self, op, arg): self.op = op self.arg = arg def as_c_expr(self): if self.op is None: assert isinstance(self.arg, str) return '(_cffi_opcode_t)(%s)' % (self.arg,) classname = CLASS_NAME[self.op] return '_CFFI_OP(...
gpl-2.0
buckket/weltklang
lib/rfk/xmpp_bot.py
4
3793
import ast import sys import logging import click from redis import StrictRedis from redis.exceptions import ConnectionError from sleekxmpp import ClientXMPP from sleekxmpp.exceptions import XMPPError import rfk from rfk.helper import get_path import rfk.helper.daemonize class RfKBot(ClientXMPP): def __init_...
bsd-3-clause
kobolabs/calibre
src/calibre/ebooks/pdb/header.py
24
2801
# -*- coding: utf-8 -*- ''' Read the header data from a pdb file. ''' __license__ = 'GPL v3' __copyright__ = '2009, John Schember <john@nachtimwald.com>' __docformat__ = 'restructuredtext en' import re import struct import time class PdbHeaderReader(object): def __init__(self, stream): self.stream = s...
gpl-3.0
sventech/YAK-server
test_project/test_app/tests/test_social.py
1
10812
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.urlresolvers import reverse from test_project.test_app.models import Post from test_project.test_app.tests.factories import UserFactory, PostFactory, CommentFactory...
mit
jwhonce/openshift-ansible
roles/lib_utils/library/oo_azure_rm_publish_image.py
3
10040
#!/usr/bin/env python # pylint: disable=missing-docstring # Copyright 2018 Red Hat, Inc. and/or its affiliates # and other contributors as indicated by the @author tags. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtai...
apache-2.0
asimshankar/tensorflow
tensorflow/python/debug/cli/base_ui.py
89
7715
# 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
blueshed/blueshed-py
src/blueshed/handlers/basic_auth.py
1
1716
''' Created on 30 Jan 2014 @author: peterb ''' import base64 import logging class BasicAuthMixin(object): """ BasicAuthMixin """ def _request_auth(self, realm): if self._headers_written: raise Exception('headers have already been written') self.set_status(401) ...
mit
stefanocasazza/FrameworkBenchmarks
frameworks/Python/web2py/app/standard/modules/controller.py
24
1725
# -*- coding: utf-8 -*- from random import randint from functools import partial import json as jsonOut from gluon import current from database import Dal, RawDal, num_queries def plaintext(): current.response.headers['Content-Type'] = 'text/plain' return 'Hello, World!' def json(): current.response.head...
bsd-3-clause
victor-rene/kivy-gamelib
stickman/bone.py
1
2072
import math from kivy.graphics.context_instructions import PopMatrix, PushMatrix, Rotate from kivy.properties import NumericProperty from kivy.uix.image import Image class Bone(Image): angle = NumericProperty() def __init__(self, **kw): super(Bone, self).__init__(**kw) self.name = kw['name'] if 'name' ...
mit
mykytamorachov/outpost
flask/lib/python2.7/site-packages/werkzeug/testsuite/formparser.py
97
18740
# -*- coding: utf-8 -*- """ werkzeug.testsuite.formparser ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the form parsing facilities. :copyright: (c) 2013 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from __future__ import with_statement import unittest from os.path import join, dirn...
gpl-2.0
joshzarrabi/e-mission-server
emission/storage/decorations/useful_queries.py
2
3911
# Standard imports from datetime import datetime, timedelta import logging # Our imports from emission.core.get_database import get_section_db import emission.core.wrapper.trip_old as rt def get_all_sections(section_id): """ Return all sections in the trip that the specified section is a part of For examp...
bsd-3-clause
pombredanne/MOG
nova/tests/virt/test_virt.py
5
5363
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2011 Isaku Yamahata # 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/...
apache-2.0
McHatters/HippieStation13
bot/C_rtd.py
67
3045
import random def rtd(data,debug,sender): backo = data try: arg1,arg2 = backo.split("d") except ValueError, err: return("Too many or too small amount of arguments") else: if debug: print sender+":!rtd "+arg1+"d"+arg2 #faster than using %s's die,die2 = [],[] current_mark = "" outcom...
agpl-3.0
kostajaitachi/shogun
tests/integration/python_modular/test_one.py
21
2671
#!/usr/bin/env python """ Test one data file """ from numpy import * import sys import kernel import distance import classifier import clustering import distribution import regression import preprocessor from modshogun import Math_init_random SUPPORTED=['kernel', 'distance', 'classifier', 'clustering', 'distribution...
gpl-3.0
Cyrillic327/p2pool
p2pool/test/test_node.py
198
10503
from __future__ import division import base64 import random import tempfile from twisted.internet import defer, reactor from twisted.python import failure from twisted.trial import unittest from twisted.web import client, resource, server from p2pool import data, node, work from p2pool.bitcoin import data as bitcoin...
gpl-3.0
liberatorqjw/scikit-learn
sklearn/tree/export.py
30
4529
""" This module defines export functions for decision trees. """ # Authors: Gilles Louppe <g.louppe@gmail.com> # Peter Prettenhofer <peter.prettenhofer@gmail.com> # Brian Holt <bdholt1@gmail.com> # Noel Dawe <noel@dawe.me> # Satrajit Gosh <satrajit.ghosh@gmail.com> # Licence: BSD 3 ...
bsd-3-clause
esthermm/odoomrp-utils
stock_picking_customer_ref/__openerp__.py
12
1446
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (c) # 2015 Serv. Tec. Avanzados - Pedro M. Baeza (http://www.serviciosbaeza.com) # 2015 AvanzOsc (http://www.avanzosc.es) # # This program is free software: you can redistribute it and/or modi...
agpl-3.0
djmaze/phantomjs
src/qt/qtwebkit/Tools/QueueStatusServer/handlers/patchstatus.py
146
1974
# 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...
bsd-3-clause
zsjohny/jumpserver
apps/assets/serializers/asset.py
1
6406
# -*- coding: utf-8 -*- # from rest_framework import serializers from django.db.models import Prefetch, F from django.utils.translation import ugettext_lazy as _ from orgs.mixins.serializers import BulkOrgResourceModelSerializer from common.serializers import AdaptedBulkListSerializer from ..models import Asset, Node...
gpl-2.0
Lloir/pc-kernel
scripts/gdb/linux/dmesg.py
367
2005
# # gdb helper commands and functions for Linux kernel debugging # # kernel log buffer dump # # Copyright (c) Siemens AG, 2011, 2012 # # Authors: # Jan Kiszka <jan.kiszka@siemens.com> # # This work is licensed under the terms of the GNU GPL version 2. # import gdb import string from linux import utils class LxDme...
gpl-2.0
menardorama/ReadyNAS-Add-ons
headphones-1.0.0/debian/headphones/etc/apps/headphones/lib/unidecode/x0b9.py
253
4704
data = ( 'ruk', # 0x00 'rut', # 0x01 'rup', # 0x02 'ruh', # 0x03 'rweo', # 0x04 'rweog', # 0x05 'rweogg', # 0x06 'rweogs', # 0x07 'rweon', # 0x08 'rweonj', # 0x09 'rweonh', # 0x0a 'rweod', # 0x0b 'rweol', # 0x0c 'rweolg', # 0x0d 'rweolm', # 0x0e 'rweolb', # 0x0f 'rweols',...
gpl-2.0
sosolimited/Cinder
docs/libs/bs4/builder/_html5lib.py
423
10647
__all__ = [ 'HTML5TreeBuilder', ] import warnings from bs4.builder import ( PERMISSIVE, HTML, HTML_5, HTMLTreeBuilder, ) from bs4.element import NamespacedAttribute import html5lib from html5lib.constants import namespaces from bs4.element import ( Comment, Doctype, NavigableStr...
bsd-2-clause
darkleons/BE
addons/hr_timesheet_sheet/hr_timesheet_sheet.py
35
34024
# -*- 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
dreikanter/public-static
publicstatic/conf.py
1
6519
# coding: utf-8 """Configuration-related fuctionality and defaults.""" import codecs from datetime import datetime import os import yaml from publicstatic import const from publicstatic import errors from publicstatic.version import __version__ _params = {} # Configuration parameters _path = '' # Configuration fil...
bsd-3-clause
midma101/m0du1ar
.venv/lib/python2.7/site-packages/pip/vcs/mercurial.py
280
4974
from __future__ import absolute_import import logging import os import tempfile import re from pip.utils import display_path, rmtree from pip.vcs import vcs, VersionControl from pip.download import path_to_url from pip._vendor.six.moves import configparser logger = logging.getLogger(__name__) class Mercurial(Vers...
mit
lmazuel/azure-sdk-for-python
azure-mgmt-commerce/azure/mgmt/commerce/models/recurring_charge.py
1
1457
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
js850/PyGMIN
examples/gui/NewLJ.py
1
3256
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'NewLJ.ui' # # Created: Thu May 10 03:10:06 2012 # by: PyQt4 UI code generator 4.8.6 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attribute...
gpl-3.0
AlexStarov/Shop
applications/sms_ussd/migrations/0001_initial.py
1
2850
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.Create...
apache-2.0
linglung/ytdl
youtube_dl/extractor/dw.py
84
4098
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( int_or_none, unified_strdate, ) from ..compat import compat_urlparse class DWIE(InfoExtractor): IE_NAME = 'dw' _VALID_URL = r'https?://(?:www\.)?dw\.com/(?:[^/]+/)+(?:av|e)-(?P<id>\d+)' ...
unlicense
motion2015/a3
common/lib/xmodule/xmodule/modulestore/perf_tests/generate_report.py
194
10493
""" Reads the data generated by performance tests and generates a savable report which can be viewed over time to examine the performance effects of code changes on various parts of the system. """ import sqlite3 from lxml.builder import E import lxml.html try: import click except ImportError: click = None ...
agpl-3.0
EKiefer/edge-starter
py34env/Lib/site-packages/pip/_vendor/packaging/specifiers.py
26
27825
# This file is dual licensed under the terms of the Apache License, Version # 2.0, and the BSD License. See the LICENSE file in the root of this repository # for complete details. from __future__ import absolute_import, division, print_function import abc import functools import itertools import re from ._compat impo...
mit
cctaylor/googleads-python-lib
examples/dfp/v201411/line_item_service/get_all_line_items.py
4
1764
#!/usr/bin/python # # 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 b...
apache-2.0
740521985/nw.js
tools/aws_uploader.py
42
3658
#!/usr/bin/env python import argparse import boto import datetime import json import os import sys import time # Set timeout, for retry #if not boto.config.has_section('Boto'): # boto.config.add_section('Boto') #boto.config.set('Boto','http_socket_timeout','30') ################################ # Parse command li...
mit
shermanng10/superathletebuilder
env/lib/python2.7/site-packages/setuptools/compat.py
456
2094
import sys import itertools PY3 = sys.version_info >= (3,) PY2 = not PY3 if PY2: basestring = basestring import __builtin__ as builtins import ConfigParser from StringIO import StringIO BytesIO = StringIO func_code = lambda o: o.func_code func_globals = lambda o: o.func_globals im_func...
mit
djeo94/CouchPotatoServer
couchpotato/core/notifications/pushover.py
45
2903
from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import getTitle, getIdentifier from couchpotato.core.logger import CPLog from couchpotato.core.notifications.base import Notification log = CPLog(__name__) autoload = 'Pushover' class Pushover(Notification): api_url...
gpl-3.0
martenson/tools-iuc
tools/gemini/gemini_mafify.py
16
9077
import string import sys so_to_maf = { 'splice_acceptor_variant': 'Splice_Site', 'splice_donor_variant': 'Splice_Site', 'transcript_ablation': 'Splice_Site', 'exon_loss_variant': 'Splice_Site', 'stop_gained': 'Nonsense_Mutation', 'stop_lost': 'Nonstop_Mutation', 'frameshift_variant': 'Fram...
mit
hmen89/odoo
addons/l10n_bo/__init__.py
2120
1456
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (c) 2011 Cubic ERP - Teradata SAC. (http://cubicerp.com). # # WARNING: This program as such is intended to be used by professional # programmers who take t...
agpl-3.0
DeeDee22/nelliepi
src/ch/fluxkompensator/nelliepi/ui/screen/ListScreen.py
1
8571
''' Created on Oct 4, 2013 @author: geraldine ''' from ch.fluxkompensator.nelliepi.ui.screen.ScreenWithFooter import ScreenWithFooter from ch.fluxkompensator.nelliepi.ui.widgets.TextButton import TextButton from ch.fluxkompensator.nelliepi.Constants import RED from ch.fluxkompensator.nelliepi.Constants import BLUE fro...
gpl-2.0
jachitech/AndroidPrebuiltPackages
packages/libxml2-2.9.4/python/tests/relaxng.py
35
1203
#!/usr/bin/python -u import libxml2 import sys # Memory debug specific libxml2.debugMemory(1) schema="""<?xml version="1.0"?> <element name="foo" xmlns="http://relaxng.org/ns/structure/1.0" xmlns:a="http://relaxng.org/ns/annotation/1.0" xmlns:ex1="http://www.example.com/n1" xmlns:e...
apache-2.0
ran5515/DeepDecision
tensorflow/user_ops/invalid_op_test.py
146
1217
# 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
crichardson17/starburst_atlas
Low_resolution_sims/DustFree_LowRes/Padova_inst/padova_inst_6/Optical1.py
33
7366
import csv import matplotlib.pyplot as plt from numpy import * import scipy.interpolate import math from pylab import * from matplotlib.ticker import MultipleLocator, FormatStrFormatter import matplotlib.patches as patches from matplotlib.path import Path import os # --------------------------------------------------...
gpl-2.0
ict-felix/stack
vt_manager/src/python/vt_manager/communication/sfa/managers/AggregateManager.py
4
2850
from vt_manager.communication.sfa.util.version import version_core from vt_manager.communication.sfa.util.xrn import Xrn from vt_manager.communication.sfa.util.callids import Callids from vt_manager.communication.sfa.drivers.VTSfaDriver import VTSfaDriver from vt_manager.communication.sfa.util.faults import MissingSf...
apache-2.0
AntonPalich/sublime-evernote
lib/pygments/lexers/_robotframeworklexer.py
57
18610
# -*- coding: utf-8 -*- """ pygments.lexers._robotframeworklexer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Lexer for Robot Framework. :copyright: Copyright 2006-2014 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ # Copyright 2012 Nokia Siemens Networks Oyj # # License...
mit
andfoy/margffoy-tuay-server
env/lib/python2.7/site-packages/django/template/response.py
61
8910
import warnings from django.http import HttpResponse from django.template import Context, RequestContext, Template, loader from django.template.backends.django import Template as BackendTemplate from django.template.context import _current_app_undefined from django.utils import six from django.utils.deprecation import...
gpl-2.0
DanielSlater/PyGamePlayer
games/mini_pong.py
2
5040
# Modified from http://www.pygame.org/project-Very+simple+Pong+game-816-.html import pygame from pygame.locals import * bar1_score, bar2_score = 0, 0 def run(screen_width=40., screen_height=40.): global bar1_score, bar2_score pygame.init() bar_width, bar_height = screen_width / 32., screen_height / 9.6 ...
mit
bgribble/mfp
mfp/gui/xyplot/scatterplot.py
1
7839
#! /usr/bin/env python ''' scatterplot.py Specialization of XYPlot for showing sets of discrete datapoints Copyright (c) 2012 Bill Gribble <grib@billgribble.com> ''' import math from .mark_style import MarkStyle from .xyplot import XYPlot from mfp import log class ScatterPlot (XYPlot): def __init__(self, eleme...
gpl-2.0
mtzirkel/skiff
quiz/multichoice/forms.py
2
1220
from django.forms import ModelForm, Textarea, NumberInput, SelectMultiple from django import forms from .models import MCQuestion, MCAnswer class MCQuestionForm(ModelForm): class Meta: model = MCQuestion fields = {'question_text', 'point_value', 'inquiz', ...
mit
ikool/metact06-djan
lib/Crypto/Signature/__init__.py
126
1202
# -*- coding: utf-8 -*- # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that dedication to the public domain is not available, # everyone is granted a worldwide, perpetual, royalty-free, # non-exclusive license to e...
bsd-3-clause
illicitonion/givabit
lib/sdks/google_appengine_1.7.1/google_appengine/lib/django_1_2/django/contrib/admin/views/decorators.py
45
3276
import base64 try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.4 fallback. from django import http, template from django.conf import settings from django.contrib.auth.models import User from django.contrib.auth import authenticate, login from django.sho...
apache-2.0
michael-yin/scrapy
scrapy/tests/test_log.py
10
4667
from cStringIO import StringIO from twisted.python import log as txlog, failure from twisted.trial import unittest from scrapy import log from scrapy.spider import BaseSpider from scrapy.settings import default_settings class LogTest(unittest.TestCase): def test_get_log_level(self): default_log_level = ...
bsd-3-clause
rriggio/empower-runtime
empower/apps/wifimobilitymanager/wifimobilitymanager.py
1
1790
#!/usr/bin/env python3 # # Copyright (c) 2019 Roberto Riggio # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicabl...
apache-2.0
twoh/leevee
env/Lib/encodings/zlib_codec.py
58
3048
""" Python 'zlib_codec' Codec - zlib compression encoding Unlike most of the other codecs which target Unicode, this codec will return Python string objects for both encode and decode. Written by Marc-Andre Lemburg (mal@lemburg.com). """ import codecs import zlib # this codec needs the optional zlib modu...
mit
HardTacos/techmodnotify-reddit-bot
techmodnotify.py
1
6960
#!/usr/bin/env python2.7 # ============================================================================= # IMPORTS # ============================================================================= import praw import MySQLdb import ConfigParser import time import parsedatetime.parsedatetime as pdt import pprint import lo...
mit
ShaguptaS/moviepy
moviepy/video/compositing/CompositeVideoClip.py
1
4062
import numpy as np from moviepy.video.VideoClip import VideoClip, ColorClip from moviepy.audio.AudioClip import CompositeAudioClip # CompositeVideoClip class CompositeVideoClip(VideoClip): """ A VideoClip made of other videoclips displayed together. This is the base class for most compositions. ...
mit
Vibek/Human_intention
src/skeleton_markers/msg/_recognitionActionFeedback.py
1
2852
"""autogenerated by genpy from skeleton_markers/recognitionActionFeedback.msg. Do not edit.""" import sys python3 = True if sys.hexversion > 0x03000000 else False import genpy import struct class recognitionActionFeedback(genpy.Message): _md5sum = "d41d8cd98f00b204e9800998ecf8427e" _type = "skeleton_markers/recog...
mit
eusi/MissionPlanerHM
Lib/site-packages/scipy/signal/setup.py
51
1049
#!"C:\Users\hog\Documents\Visual Studio 2010\Projects\ArdupilotMega\ArdupilotMega\bin\Debug\ipy.exe" def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('signal', parent_package, top_path) config.add_data_dir('tests') config....
gpl-3.0
yfried/ansible
lib/ansible/modules/cloud/rackspace/rax_files_objects.py
102
18489
#!/usr/bin/python # (c) 2013, Paul Durivage <paul.durivage@rackspace.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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
cledio66/pyglet
contrib/layout/layout/Plex/Actions.py
32
2348
#======================================================================= # # Python Lexical Analyser # # Actions for use in token specifications # #======================================================================= class Action: def same_as(self, other): return self is other class Return(Action): "...
bsd-3-clause
rphlypo/parietalretreat
setup_data_path_salma.py
1
6001
import glob import os.path from pandas import DataFrame import pandas def get_all_paths(data_set=None, root_dir="/"): # TODO # if data_set ... collections.Sequence # iterate over list if data_set is None: data_set = {"hcp", "henson2010faces", "ds105", "ds107"} list_ = list() head, tail...
bsd-2-clause
sudheesh001/oh-mainline
vendor/packages/twisted/twisted/protocols/pcp.py
71
7090
# -*- test-case-name: twisted.test.test_pcp -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Producer-Consumer Proxy. """ from zope.interface import implements from twisted.internet import interfaces class BasicProducerConsumerProxy: """ I can act as a man in the middle betwe...
agpl-3.0
hpcugent/easybuild-framework
easybuild/toolchains/gmpolf.py
2
1847
## # Copyright 2013-2019 Ghent University # # This file is triple-licensed under GPLv2 (see below), MIT, and # BSD three-clause licenses. # # 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...
gpl-2.0
mahirkukreja/delos3geurkernel
Documentation/networking/cxacru-cf.py
14668
1626
#!/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...
gpl-2.0
cuongnv23/ansible
lib/ansible/modules/database/postgresql/postgresql_schema.py
29
8233
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
yatinkumbhare/openstack-nova
nova/api/openstack/compute/plugins/v3/block_device_mapping_v1.py
37
2595
# 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
mysociety/yournextmp-popit
candidates/models/address.py
2
3191
from __future__ import unicode_literals from collections import defaultdict from django.conf import settings from django.core.exceptions import ValidationError from django.utils.six.moves.urllib_parse import urljoin from django.utils.text import slugify from django.utils.translation import ugettext as _ from pygeoco...
agpl-3.0
CSysTeam/SecurityPackage
RC4/RC4Test.py
1
1105
import unittest from RC4 import RC4 class RC4Test(unittest.TestCase): def test_RC4TestEnc1(self): algorithm = RC4() cipher = algorithm.Encrypt("abcd", "test") self.assertEqual(cipher, "ÏíDu") def test_RC4TestDec1(self): algorithm = RC4() cipher = algo...
gpl-3.0
sivu22/nltk-on-gae
GAE/nltk/corpus/util.py
5
2934
# Natural Language Toolkit: Corpus Reader Utility Functions # # Copyright (C) 2001-2012 NLTK Project # Author: Edward Loper <edloper@gradient.cis.upenn.edu> # URL: <http://www.nltk.org/> # For license information, see LICENSE.TXT ###################################################################### #{ Lazy Corpus Loa...
apache-2.0
benjaminjkraft/django
tests/template_tests/test_engine.py
116
1925
import os from django.template import Context from django.template.engine import Engine from django.test import SimpleTestCase from .utils import ROOT, TEMPLATE_DIR OTHER_DIR = os.path.join(ROOT, 'other_templates') class RenderToStringTest(SimpleTestCase): def setUp(self): self.engine = Engine(dirs=[T...
bsd-3-clause
ekalosak/boto
boto/swf/__init__.py
145
1792
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. # All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without...
mit
MQQiang/kbengine
kbe/src/lib/python/Lib/ctypes/wintypes.py
197
5628
# The most useful windows datatypes import ctypes BYTE = ctypes.c_byte WORD = ctypes.c_ushort DWORD = ctypes.c_ulong #UCHAR = ctypes.c_uchar CHAR = ctypes.c_char WCHAR = ctypes.c_wchar UINT = ctypes.c_uint INT = ctypes.c_int DOUBLE = ctypes.c_double FLOAT = ctypes.c_float BOOLEAN = BYTE BOOL = ctypes.c_long class ...
lgpl-3.0
lokeshh/lokeshh-stem
test/unit/response/authchallenge.py
9
2148
""" Unit tests for the stem.response.authchallenge.AuthChallengeResponse class. """ import unittest import stem.response import stem.response.authchallenge import stem.socket from test import mocking VALID_RESPONSE = '250 AUTHCHALLENGE \ SERVERHASH=B16F72DACD4B5ED1531F3FCC04B593D46A1E30267E636EA7C7F8DD7A2B7BAA05 \ ...
lgpl-3.0
wenyu1001/scrapy
tests/test_downloadermiddleware_decompression.py
133
1851
from unittest import TestCase, main from scrapy.http import Response, XmlResponse from scrapy.downloadermiddlewares.decompression import DecompressionMiddleware from scrapy.spiders import Spider from tests import get_testdata from scrapy.utils.test import assert_samelines def _test_data(formats): uncompressed_bod...
bsd-3-clause
embeddedarm/android_external_chromium_org
tools/telemetry/telemetry/page/page_filter_unittest.py
25
4195
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from telemetry.page import page as page_module from telemetry.page import page_filter as page_filter_module from telemetry.page import page_s...
bsd-3-clause
bartekjagiello/inteygrate_flaskapp
yowsup/layers/protocol_presence/protocolentities/iq_lastseen_result.py
61
1028
from yowsup.layers.protocol_iq.protocolentities.iq_result import ResultIqProtocolEntity from yowsup.structs.protocoltreenode import ProtocolTreeNode class ResultLastseenIqProtocolEntity(ResultIqProtocolEntity): def __init__(self, jid, seconds, _id = None): super(ResultLastseenIqProtocolEntity, self).__init_...
gpl-3.0