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
ryanrhymes/panns
panns/utils.py
2
5104
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2014 Liang Wang <liang.wang@cs.helsinki.fi> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html # # Liang Wang @ CS Dept, Helsinki Univ, Finland # 2014.05.01 # import logging import numpy import tempfile from scipy import linalg fr...
gpl-2.0
bbc/kamaelia
Sketches/MH/RTP/ConnectedSocketAdapter.py
3
12440
# -*- coding: utf-8 -*- # ConnectedSocketAdapter Component Class # # Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1) # # (1) Kamaelia Contributors are listed in the AUTHORS file and at # http://www.kamaelia.org/AUTHORS - please extend this file, # not this notice. # # Licensed under...
apache-2.0
rohitwaghchaure/digitales_erpnext
erpnext/buying/doctype/quality_inspection/quality_inspection.py
37
1831
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document class QualityInspection(Document): def get_item_specification_details(self): self.set...
agpl-3.0
codemac/servo
tests/wpt/css-tests/tools/wptserve/wptserve/server.py
41
17484
import BaseHTTPServer import errno import os import re import socket from SocketServer import ThreadingMixIn import ssl import sys import threading import time import traceback import types import urlparse import routes as default_routes from logger import get_logger from request import Server, Request from response i...
mpl-2.0
sushantgoel/Flask
Work/Trivia - Module 5/env/Lib/site-packages/flask/blueprints.py
773
16320
# -*- coding: utf-8 -*- """ flask.blueprints ~~~~~~~~~~~~~~~~ Blueprints are the recommended way to implement larger or more pluggable applications in Flask 0.7 and later. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ from functools import update_wrap...
apache-2.0
ryfeus/lambda-packs
Sklearn_scipy_numpy/source/numpy/polynomial/hermite.py
49
56931
""" Objects for dealing with Hermite series. This module provides a number of objects (mostly functions) useful for dealing with Hermite series, including a `Hermite` class that encapsulates the usual arithmetic operations. (General information on how this module represents and works with such polynomials is in the d...
mit
superphy/backend
app/modules/qc/qc.py
1
4021
from __future__ import division import os import tempfile import subprocess import argparse import pandas as pd from middleware.graphers.turtle_grapher import generate_turtle_skeleton def create_blast_db(query_file): ''' :param query_file: genome file that was given by the user. ''' tempdir = tempfi...
apache-2.0
yaii/yai
share/extensions/rtree.py
3
2561
#!/usr/bin/env python ''' Copyright (C) 2005 Aaron Spike, aaron@ekips.org This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Thi...
gpl-2.0
2014c2g14/2015cd_midterm
static/Brython3.1.1-20150328-091302/Lib/importlib/__init__.py
610
3472
"""A pure Python implementation of import.""" __all__ = ['__import__', 'import_module', 'invalidate_caches'] # Bootstrap help ##################################################### # Until bootstrapping is complete, DO NOT import any modules that attempt # to import importlib._bootstrap (directly or indirectly). Since...
gpl-3.0
CenterForOpenScience/osf.io
addons/onedrive/tests/test_models.py
13
3765
# -*- coding: utf-8 -*- import mock import pytest import unittest from framework.auth import Auth from addons.base.tests.models import OAuthAddonNodeSettingsTestSuiteMixin from addons.base.tests.models import OAuthAddonUserSettingTestSuiteMixin from addons.onedrive.models import NodeSettings, OneDriveProvider from ad...
apache-2.0
andreivasiliu2211/upm
examples/python/wheelencoder.py
14
1854
#!/usr/bin/python # Author: Jon Trulson <jtrulson@ics.com> # Copyright (c) 2015 Intel Corporation. # # 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 l...
mit
jinluyuan/osf.io
scripts/consistency/impute_wiki_date.py
64
1064
"""Due to an unknown bug, wiki pages were saved without dates between September 4 and 6. This script identifies wiki pages without dates and imputes dates using ObjectIds. Dry run: python -m scripts/consistency/impute_wiki_date Real: python -m scripts/consistency/impute_wiki_date false """ from bson import ObjectId ...
apache-2.0
Azure/azure-sdk-for-python
sdk/purview/azure-purview-scanning/azure/purview/scanning/aio/_azure_purview_scanning_client.py
1
4355
# 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 may ...
mit
justinjfu/doodad
doodad/test_mount.py
1
1128
import unittest import os import os.path as path import shutil import tempfile import contextlib from doodad import mount from doodad.utils import TESTING_DIR from doodad.credentials import ssh, ec2 class TestLocal(unittest.TestCase): def test_filter(self): local_mount = mount.MountLocal('dummy', filter_...
gpl-3.0
plotly/plotly.py
packages/python/plotly/plotly/tests/test_core/test_subplots/test_get_subplot.py
2
6220
from __future__ import absolute_import from unittest import TestCase from plotly.graph_objs import Figure from plotly import subplots import plotly.graph_objs as go from plotly.subplots import SubplotXY, SubplotDomain class TestGetSubplot(TestCase): def test_get_subplot(self): # Make Figure with subplot ...
mit
mohamed--abdel-maksoud/chromium.src
third_party/android_testrunner/errors.py
171
1340
#!/usr/bin/python2.4 # # # Copyright 2008, The Android Open Source Project # # 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 requir...
bsd-3-clause
mattrberry/hnpy
hnpy.py
1
4988
import requests import time baseURL = "https://hacker-news.firebaseio.com/v0/" # itemid is the string of the numerical id def makeItem(itemid): itemjson = requests.get(baseURL + "item/" + itemid + ".json").json() itemtype = itemjson["type"] if "story" in itemtype: # Items of type "ask" say they a...
mit
40223209/test1
static/Brython3.1.1-20150328-091302/Lib/logging/__init__.py
733
66279
# Copyright 2001-2013 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose and without fee is hereby granted, # provided that the above copyright notice appear in all copies and that # both that copyright notice and this permissio...
agpl-3.0
FedoraScientific/salome-paravis
test/VisuPrs/CutPlanes/A1.py
1
1512
# Copyright (C) 2010-2014 CEA/DEN, EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library ...
lgpl-2.1
guschmue/tensorflow
tensorflow/contrib/learn/python/learn/estimators/estimator_input_test.py
72
12865
# 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
taxpon/sverchok
nodes/list_struct/flip.py
3
2953
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
pkoutsias/SickRage
tests/sickrage_tests/show/history_tests.py
4
2948
# coding=utf-8 # This file is part of SickRage. # # URL: https://SickRage.GitHub.io # Git: https://github.com/SickRage/SickRage.git # # SickRage 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...
gpl-3.0
miing/mci_migo
acceptance/tests/edit/edit_warn_about_backup_device.py
1
1552
# Test enabling/disabling the warn_about_backup_device preference from sst.actions import ( assert_checkbox_value, click_button, fails, go_to, set_checkbox_value, ) from u1testutils.sst import config from acceptance.devices import ( add_device, delete_device, ) from acceptance import help...
agpl-3.0
meiavy/python-weixin
lib/python2.7/site-packages/web/python23.py
75
1266
"""Python 2.3 compatabilty""" import threading class threadlocal(object): """Implementation of threading.local for python2.3. """ def __getattribute__(self, name): if name == "__dict__": return threadlocal._getd(self) else: try: return object.__getatt...
apache-2.0
Alberdi/ancientest
test/test_creature.py
1
1084
import unittest import country, creature class TestCreature(unittest.TestCase): def setUp(self): self.c = creature.Creature() def test_where_do_i_live(self): country1 = country.Country() country1.add_area([(0,0), (100,0), (100, 100)]) country2 = country.Country() country2.add_area([(0,0), (100, 0), (10...
mit
tardyp/buildbot
master/buildbot/test/unit/scripts/test_start.py
3
4828
# This file is part of Buildbot. Buildbot is free software: you can # redistribute it and/or modify it under the terms of the GNU General Public # License as published by the Free Software Foundation, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
gpl-2.0
qqbuby/redmine_book
redmine_book/packages/redmine/packages/requests/packages/chardet/latin1prober.py
1778
5232
######################## 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
anshumanchatterji/selenium
py/selenium/webdriver/phantomjs/service.py
5
2041
# Licensed to the Software Freedom Conservancy (SFC) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The SFC licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
gnowxilef/youtube-dl
youtube_dl/extractor/la7.py
53
2209
# coding: utf-8 from __future__ import unicode_literals from .common import InfoExtractor from ..utils import ( js_to_json, smuggle_url, ) class LA7IE(InfoExtractor): IE_NAME = 'la7.it' _VALID_URL = r'''(?x)(https?://)?(?: (?:www\.)?la7\.it/([^/]+)/(?:rivedila7|video)/| tg\.la7\.it/re...
unlicense
peak6/st2
st2common/tests/unit/test_rbac_resolvers_action.py
6
24920
# Licensed to the StackStorm, Inc ('StackStorm') under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not use th...
apache-2.0
karyon/django
tests/delete_regress/models.py
325
3172
from django.contrib.contenttypes.fields import ( GenericForeignKey, GenericRelation, ) from django.contrib.contenttypes.models import ContentType from django.db import models class Award(models.Model): name = models.CharField(max_length=25) object_id = models.PositiveIntegerField() content_type = mode...
bsd-3-clause
wenderen/servo
tests/wpt/web-platform-tests/tools/py/py/_builtin.py
259
6521
import sys try: reversed = reversed except NameError: def reversed(sequence): """reversed(sequence) -> reverse iterator over values of the sequence Return a reverse iterator """ if hasattr(sequence, '__reversed__'): return sequence.__reversed__() if not hasa...
mpl-2.0
atvcaptain/enigma2
lib/python/Components/TimerSanityCheck.py
1
12252
from __future__ import print_function from __future__ import absolute_import import NavigationInstance from time import localtime, mktime, gmtime from ServiceReference import ServiceReference from enigma import iServiceInformation, eServiceCenter, eServiceReference, getBestPlayableServiceReference from timer import Tim...
gpl-2.0
davidzchen/tensorflow
tensorflow/python/kernel_tests/linalg/linear_operator_circulant_test.py
14
31865
# Copyright 2018 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
zhuzhezhe/weibobash
env/lib/python3.4/site-packages/pip/compat/dictconfig.py
921
23096
# This is a copy of the Python logging.config.dictconfig module, # reproduced with permission. It is provided here for backwards # compatibility for Python versions prior to 2.7. # # Copyright 2009-2010 by Vinay Sajip. All Rights Reserved. # # Permission to use, copy, modify, and distribute this software and its # docu...
mit
plamut/superdesk
server/apps/saved_searches/saved_searches.py
3
6183
# -*- coding: utf-8; -*- # # This file is part of Superdesk. # # Copyright 2013, 2014 Sourcefabric z.u. and contributors. # # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license import json...
agpl-3.0
vianuevm/Webparser
ENV/Lib/site-packages/decorator.py
112
10639
########################## LICENCE ############################### # Copyright (c) 2005-2012, Michele Simionato # 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 so...
gpl-2.0
plxaye/chromium
src/tools/sharding_supervisor/sharding_supervisor_unittest.py
6
4964
#!/usr/bin/env python # 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. """Verify basic usage of sharding_supervisor.""" import difflib import os import subprocess import sys import unittest from xml.d...
apache-2.0
nivwusquorum/tensorflow-deepq
tf_rl/utils/geometry.py
4
1404
""" This module assumes that all geometrical points are represented as 1D numpy arrays. It was designed and tested on 2D points, but if you try it on 3D points you may be pleasantly surprised ;-) """ import numpy as np def point_distance(x, y): """Returns euclidean distance between points x and y""" return ...
mit
VCTLabs/openadams
_naf_feature.py
1
6222
# -*- coding: utf-8 -*- # $Id$ # ------------------------------------------------------------------- # Copyright 2010 Achim Köhler # # This file is part of openADAMS. # # openADAMS is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published # b...
gpl-2.0
TheTypoMaster/chromium-crosswalk
tools/telemetry/telemetry/testing/system_stub.py
5
15406
# Copyright 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. """Provides stubs for os, sys and subprocess for testing This test allows one to test code that itself uses os, sys, and subprocess. """ import os import r...
bsd-3-clause
nojhan/weboob-devel
modules/agendadulibre/browser.py
6
2004
# -*- coding: utf-8 -*- # Copyright(C) 2014 Bezleputh # # This file is part of weboob. # # weboob 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 opt...
agpl-3.0
kobejean/tensorflow
tensorflow/contrib/nn/python/ops/scaled_softplus_test.py
66
3039
# 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
agcooke/Sofie-HDF-Format
sofiehdfformat/gefilereader/GeFile.py
1
3237
import logging """ Read packets from the GCE File format. used on the sparkfun logger. """ import __builtin__ import os import struct from ant.core import exceptions as antException import ant.core.constants as constants import ant.core.message as message from sofiehdfformat.core.SofieUtils import convertRawDataToHex...
bsd-3-clause
apanda/modeling
mcnet/components/security_groups.py
1
1358
from . import Core import z3 class SecurityGroups (Core): def _init (self, name, security_groups, ctx, net): """Name is used to name this oracle in z3. Allows multiple mappings """ self.name = name self.constraints = list () self.ctx = ctx self.net = net self.ctx.Add...
bsd-3-clause
screwt/tablib
tablib/packages/odf/draw.py
93
5598
# -*- coding: utf-8 -*- # Copyright (C) 2006-2007 Søren Roug, European Environment Agency # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at you...
mit
supriyasingh01/github_basics
Internetworking Distributed Project/finalProject/ovs/pox-master/tests/unit/lib/ioworker/io_worker_test.py
5
3839
#!/usr/bin/env python ### auto generate sha1: 26c6550c27d0274b9338b2b85891aeaf01146ed8 import itertools import os.path import sys import unittest sys.path.append(os.path.join(os.path.dirname(__file__), *itertools.repeat("..", 3))) from pox.lib.mock_socket import MockSocket from pox.lib.ioworker.io_worker import IOWo...
cc0-1.0
kenshay/ImageScripter
ProgramData/SystemFiles/Python/Lib/site-packages/pylint/test/functional/too_many_lines_disabled.py
20
1147
"""Test that disabling too-many-lines on any line works.""" # pylint: disable=too-many-lines __revision__ = 0 ...
gpl-3.0
jtakayama/ics691-setupbooster
makahiki/apps/managers/player_mgr/migrations/0003_auto__del_dailystatus.py
7
7098
# 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 model 'DailyStatus' db.delete_table('player_mgr_dailystatus') def backwards(self, orm): ...
mit
axbaretto/beam
learning/katas/python/log_elements.py
8
2144
# 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"); y...
apache-2.0
marcore/edx-platform
common/lib/xmodule/xmodule/modulestore/split_mongo/caching_descriptor_system.py
21
16650
import sys import logging from contracts import contract, new_contract from fs.osfs import OSFS from lazy import lazy from xblock.runtime import KvsFieldData, KeyValueStore from xblock.fields import ScopeIds from xblock.core import XBlock from opaque_keys.edx.locator import BlockUsageLocator, LocalId, CourseLocator, L...
agpl-3.0
danielharbor/openerp
openerp/tools/which.py
456
6884
#!/usr/bin/env python """ Which - locate a command * adapted from Brian Curtin's http://bugs.python.org/file15381/shutil_which.patch * see http://bugs.python.org/issue444582 * uses ``PATHEXT`` on Windows * searches current directory before ``PATH`` on Windows, but not before an explicitly passed ...
agpl-3.0
msincenselee/vnpy
vnpy/chart/item.py
1
8512
from abc import abstractmethod from typing import List, Dict, Tuple import pyqtgraph as pg from vnpy.trader.ui import QtCore, QtGui, QtWidgets from vnpy.trader.object import BarData from .base import UP_COLOR, DOWN_COLOR, PEN_WIDTH, BAR_WIDTH from .manager import BarManager class ChartItem(pg.GraphicsObject): ...
mit
maritaria/Isomurphy
tests/graph_explorer.py
2
1251
import unittest from graph.explorer import DfsExplorer, BfsExplorer from graph.graphs import Graph, Vertex class ExplorerTest(unittest.TestCase): def test_dfs(self): g = Graph() v1 = g.addvertex() v2 = g.addvertex() v3 = g.addvertex() v4 = g.addvertex() v5 = g.addvertex() e1 = g.addedge(v1, v2) e2 =...
mit
Eagles2F/werkzeug
werkzeug/__init__.py
23
6922
# -*- coding: utf-8 -*- """ werkzeug ~~~~~~~~ Werkzeug is the Swiss Army knife of Python web development. It provides useful classes and functions for any WSGI application to make the life of a python web developer much easier. All of the provided classes are independent from each other so yo...
bsd-3-clause
Codefans-fan/odoo
addons/base_vat/__openerp__.py
52
2942
# -*- 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
sahiljain/catapult
tracing/tracing_build/trace2html_unittest.py
3
3175
# Copyright (c) 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 codecs import gzip import os import shutil import tempfile import unittest from tracing_build import trace2html class Trace2HTMLTests(unittest....
bsd-3-clause
jife94/wwmmo
website/ctrl/doc.py
4
7554
import datetime import difflib import re import logging import random from google.appengine.api import memcache from google.appengine.ext import db import model.doc import html2text class DocPage(object): """Represents everything we need to display a specific page.""" def __init__(self): self.key = None ...
mit
Willyham/tchannel-python
tests/tornado/test_peer.py
1
4561
# encoding=utf8 # Copyright (c) 2015 Uber Technologies, 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, mo...
mit
jessekl/flixr
venv/lib/python2.7/site-packages/werkzeug/testsuite/datastructures.py
145
28212
# -*- coding: utf-8 -*- """ werkzeug.testsuite.datastructures ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the functionality of the provided Werkzeug datastructures. TODO: - FileMultiDict - Immutable types undertested - Split up dict tests :copyright: (c) 2014 by Armin Ronacher....
mit
rosswhitfield/mantid
qt/python/mantidqt/widgets/observers/test/test_ads_observer.py
3
1563
# Mantid Repository : https://github.com/mantidproject/mantid # # Copyright &copy; 2019 ISIS Rutherford Appleton Laboratory UKRI, # NScD Oak Ridge National Laboratory, European Spallation Source, # Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS # SPDX - License - Identifier: GPL - 3.0 + # T...
gpl-3.0
alvarolopez/nova
nova/db/sqlalchemy/migrate_repo/versions/271_sqlite_postgresql_indexes.py
33
2976
# Copyright 2014 Rackspace Hosting # 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...
apache-2.0
zchking/odoo
addons/calendar/__init__.py
391
1038
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Business Applications # Copyright (c) 2011 OpenERP S.A. <http://openerp.com> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GN...
agpl-3.0
Azure/azure-sdk-for-python
sdk/compute/azure-mgmt-compute/azure/mgmt/compute/v2020_06_30/aio/_compute_management_client.py
1
4855
# 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 may ...
mit
nextgis/quickmapservices_server
qms_server/qms_core/migrations/0001_initial.py
1
3318
# -*- coding: utf-8 -*- # Generated by Django 1.9.4 on 2016-04-01 19:16 from __future__ import unicode_literals import django.core.validators from django.db import migrations, models import django.utils.timezone import qms_core.models import uuid class Migration(migrations.Migration): initial = True depend...
gpl-2.0
goodmami/xigt
xigt/scripts/xigt_sort.py
2
3575
#!/usr/bin/env python from __future__ import print_function import re import argparse import logging from xigt.codecs import xigtxml from xigt import XigtCorpus, Igt, xigtpath as xp def run(args): xc = xigtxml.load(args.infile) if args.igt_key: logging.info('Sorting %s IGTs' % args.infile) xc...
mit
mbartling/Hadoop_playground
FrogSAT/reduceCNF.py
1
3251
#! /usr/bin/env python import sys import os sys.path.append('.') literals = set() clauseList = [] WINDOWSMODE = 0 verbosity = 0 MSVERBOSITY = " -verb={0}".format(verbosity) def runMiniSat(filename, filenameout): if WINDOWSMODE == 1: minisat = "./minisat_static.exe " minisat = minisat + filename + ...
gpl-2.0
z4y4ts/flask-script
setup.py
7
1762
""" Flask-Script -------------- Flask support for writing external scripts. Links ````` * `documentation <http://flask-script.readthedocs.org>`_ """ import sys from setuptools import setup version='2.0.6' # Hack to prevent stupid TypeError: 'NoneType' object is not callable error on # exit of python setup.py tes...
bsd-3-clause
fuziontech/sentry
tests/sentry/api/endpoints/test_project_key_details.py
33
1384
from __future__ import absolute_import from django.core.urlresolvers import reverse from sentry.models import ProjectKey from sentry.testutils import APITestCase class UpdateProjectKeyTest(APITestCase): def test_simple(self): project = self.create_project() key = ProjectKey.objects.get_or_create...
bsd-3-clause
hyowon/servo
tests/wpt/css-tests/tools/html5lib/html5lib/tests/test_parser.py
451
3612
from __future__ import absolute_import, division, unicode_literals import os import sys import traceback import warnings import re warnings.simplefilter("error") from .support import get_data_files from .support import TestData, convert, convertExpected, treeTypes from html5lib import html5parser, constants # Run t...
mpl-2.0
wimberosa/samba
source4/scripting/python/samba/netcmd/drs.py
1
20147
#!/usr/bin/env python # # implement samba_tool drs commands # # Copyright Andrew Tridgell 2010 # Copyright Giampaolo Lauria 2011 <lauria2@yahoo.com> # # based on C implementation by Kamen Mazdrashki <kamen.mazdrashki@postpath.com> # # This program is free software; you can redistribute it and/or modify # it under the t...
gpl-3.0
tensorflow/probability
tensorflow_probability/python/math/psd_kernels/polynomial.py
1
10635
# Copyright 2018 The TensorFlow Probability Authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
tectronics/pywo
tests/actions/moveresize_test.py
6
9023
#!/usr/bin/env python import unittest import sys sys.path.insert(0, '../') sys.path.insert(0, './') from tests.common_test import MockedXlibTests from tests.common_test import DESKTOP_WIDTH, DESKTOP_HEIGHT from tests.common_test import WIN_WIDTH, WIN_HEIGHT from pywo import actions, core TOP_LEFT = core.Gravity.p...
gpl-3.0
anaran/kuma
kuma/wiki/views/translate.py
4
9949
# -*- coding: utf-8 -*- from django.conf import settings from django.core.exceptions import ObjectDoesNotExist, PermissionDenied from django.shortcuts import get_object_or_404, redirect, render from django.utils.translation import ugettext_lazy as _ from jingo.helpers import urlparams import kuma.wiki.content from kum...
mpl-2.0
modulexcite/chromium-dashboard
scripts/oauth2client/util.py
6
5535
#!/usr/bin/env python # # Copyright 2010 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 o...
bsd-3-clause
conejoninja/pelisalacarta
python/main-classic/lib/elementtree/HTMLTreeBuilder.py
103
7826
# # ElementTree # $Id: HTMLTreeBuilder.py 2325 2005-03-16 15:50:43Z fredrik $ # # a simple tree builder, for HTML input # # history: # 2002-04-06 fl created # 2002-04-07 fl ignore IMG and HR end tags # 2002-04-07 fl added support for 1.5.2 and later # 2003-04-13 fl added HTMLTreeBuilder alias # 2004-12-02 fl ...
gpl-3.0
ajfriend/cvxpy
examples/extensions/mixed_integer/noncvx_variable.py
12
2144
""" Copyright 2013 Steven Diamond This file is part of CVXPY. CVXPY 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. CVXPY is distributed i...
gpl-3.0
christianblunden/googmuze
resources/lib/oauth2client/file.py
253
3160
# Copyright (C) 2010 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
gpl-3.0
mSenyor/sl4a
python-build/python-libs/gdata/tests/gdata_tests/youtube/service_test.py
89
23513
#!/usr/bin/python # # Copyright (C) 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Multimac/ansible-modules-extras
windows/win_iis_webapppool.py
153
3531
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Henrik Wallström <henrik@wallstroms.nu> # # 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 t...
gpl-3.0
opendreambox/python-coherence
coherence/backends/lastfm_storage.py
5
14057
# Licensed under the MIT license # http://opensource.org/licenses/mit-license.php """ INFO lastFM_user Dez 14 17:35:27 Got new sessionid: '1488f34a1cbed7c9f4232f8fd563c3bd' (coherence/backends/lastfm_storage.py:60) DEBUG lastFM_stream Dez 14 17:35:53 render <GET /da525474-5357-4d1b-a89...
mit
toontownfunserver/Panda3D-1.9.0
Pmw/Pmw_1_3/lib/PmwComboBox.py
6
11924
# Based on iwidgets2.2.0/combobox.itk code. import os import string import types import Tkinter import Pmw class ComboBox(Pmw.MegaWidget): def __init__(self, parent = None, **kw): # Define the megawidget options. INITOPT = Pmw.INITOPT optiondefs = ( ('autoclear', 0, INITOPT), ('but...
bsd-3-clause
ali1234/synergy-old
tools/gtest-1.6.0/test/gtest_catch_exceptions_test.py
414
9312
#!/usr/bin/env python # # Copyright 2010 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 o...
gpl-2.0
koolkhel/linux
tools/perf/scripts/python/failed-syscalls-by-pid.py
1996
2233
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
gpl-2.0
bopo/peewee
playhouse/tests/test_gfk.py
16
3545
from peewee import * from playhouse.gfk import * from playhouse.tests.base import database_initializer from playhouse.tests.base import ModelTestCase db = database_initializer.get_in_memory_database() class BaseModel(Model): class Meta: database = db def add_tag(self, tag): t = Tag(tag=tag) ...
mit
florianjacob/webassets
src/webassets/filter/pyscss.py
12
5882
import os from webassets.filter import Filter from webassets.utils import working_directory __all__ = ('PyScss',) class PyScss(Filter): """Converts `Scss <http://sass-lang.com/>`_ markup to real CSS. This uses `PyScss <https://github.com/Kronuz/pyScss>`_, a native Python implementation of the Scss lan...
bsd-2-clause
zscproject/OWASP-ZSC
lib/encoder/osx_x86/sub_yourvalue.py
3
2978
#!/usr/bin/env python ''' OWASP ZSC https://www.owasp.org/index.php/OWASP_ZSC_Tool_Project https://github.com/zscproject/OWASP-ZSC http://api.z3r0d4y.com/ https://groups.google.com/d/forum/owasp-zsc [ owasp-zsc[at]googlegroups[dot]com ] ''' def start(type, shellcode, job): if job == "exec": value = str(type.rspli...
gpl-3.0
density215/d215-miniblog
django/conf/locale/__init__.py
157
9257
LANG_INFO = { 'ar': { 'bidi': True, 'code': 'ar', 'name': 'Arabic', 'name_local': u'\u0627\u0644\u0639\u0631\u0628\u064a\u0651\u0629', }, 'az': { 'bidi': True, 'code': 'az', 'name': 'Azerbaijani', 'name_local': u'az\u0259rbaycan dili', }, ...
bsd-3-clause
vincepandolfo/django
tests/admin_views/test_adminsite.py
23
2861
from __future__ import unicode_literals from django.conf.urls import url from django.contrib import admin from django.contrib.auth.models import User from django.test import TestCase, override_settings from django.test.client import RequestFactory from django.urls import reverse from .models import Article site = ad...
bsd-3-clause
jsvine/csvkit
setup.py
1
2208
#!/usr/bin/env python from setuptools import setup setup( name='csvkit', version='0.5.0', description='A library of utilities for working with CSV, the king of tabular file formats.', long_description=open('README').read(), author='Christopher Groskopf', author_email='staringmonkey@gmail.com',...
mit
chriskmanx/qmole
QMOLEDEV64/nmap-4.76/zenmap/build/lib/radialnet/util/drawing.py
3
1032
# vim: set fileencoding=utf-8 : # Copyright (C) 2007 Insecure.Com LLC. # # Author: João Paulo de Souza Medeiros <ignotus21@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 ve...
gpl-3.0
ltiao/scikit-learn
examples/svm/plot_svm_kernels.py
329
1971
#!/usr/bin/python # -*- coding: utf-8 -*- """ ========================================================= SVM-Kernels ========================================================= Three different types of SVM-Kernels are displayed below. The polynomial and RBF are especially useful when the data-points are not linearly sep...
bsd-3-clause
etzhou/edx-platform
common/lib/xmodule/xmodule/tests/test_annotator_mixin.py
223
1932
""" This test will run for annotator_mixin.py """ import unittest from lxml import etree from xmodule.annotator_mixin import get_instructions, get_extension, html_to_text class HelperFunctionTest(unittest.TestCase): """ Tests to ensure that the following helper functions work for the annotation tool """...
agpl-3.0
bdero/edx-platform
lms/djangoapps/instructor/hint_manager.py
63
11158
""" Views for hint management. Get to these views through courseurl/hint_manager. For example: https://courses.edx.org/courses/MITx/2.01x/2013_Spring/hint_manager These views will only be visible if FEATURES['ENABLE_HINTER_INSTRUCTOR_VIEW'] = True """ import json import re from django.http import HttpResponse, Http...
agpl-3.0
pjg101/SickRage
lib/js2py/legecy_translators/utils.py
96
2705
import sys import unicodedata from collections import defaultdict def is_lval(t): """Does not chceck whether t is not resticted or internal""" if not t: return False i = iter(t) if i.next() not in IDENTIFIER_START: return False return all(e in IDENTIFIER_PART for e in i) def is_val...
gpl-3.0
endlessm/chromium-browser
build/android/pylib/symbols/apk_native_libs_unittest.py
7
14098
# Copyright 2018 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 logging import unittest from pylib.symbols import apk_native_libs # Mock ELF-like data MOCK_ELF_DATA = '\x7fELFFFFFFFFFFFFFFFF' class MockApkZipInf...
bsd-3-clause
ObsidianBlk/GemRB--Unofficial-
gemrb/GUIScripts/bg2/CharGen2.py
11
1084
# -*-python-*- # GemRB - Infinity Engine Emulator # Copyright (C) 2003-2004 The GemRB Project # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your opt...
gpl-2.0
harayz/raspberry_pwn
src/pentest/voiper/sulley/sulley/sessions.py
8
44977
import re import sys import zlib import time import socket import cPickle import threading import BaseHTTPServer import pedrpc import pgraph import sex import primitives ######################################################################################################################## class target: ''' ...
gpl-3.0
jh23453/privacyidea
privacyidea/lib/tokenclass.py
2
54866
# -*- coding: utf-8 -*- # privacyIDEA is a fork of LinOTP # # 2017-04-27 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Change dateformat # 2016-06-21 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Add method to set the next_pin_change and next_password_change. # 2016-04-29 Corne...
agpl-3.0
alejo8591/maker
knowledge/migrations/0001_initial.py
1
11953
# encoding: utf-8 # Copyright 2013 maker # License import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'KnowledgeFolder' db.create_table('knowledge_knowledgefol...
mit