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
ktan2020/legacy-automation
win/Lib/site-packages/wx-3.0-msw/wx/lib/agw/customtreectrl.py
1
311049
# --------------------------------------------------------------------------------- # # CUSTOMTREECTRL wxPython IMPLEMENTATION # Inspired By And Heavily Based On wxGenericTreeCtrl. # # Andrea Gavana, @ 17 May 2006 # Latest Revision: 27 Aug 2012, 21.00 GMT # # # TODO List # # Almost All The Features Of wx.Tree...
mit
lodow/portia-proxy
slyd/slyd/html.py
4
3758
""" Removes JavaScript from HTML This module removes all existing JavaScript in an HTML document. """ import re from scrapely.htmlpage import HtmlTag, HtmlTagType, parse_html from slybot.utils import htmlpage_from_response from slybot.baseurl import insert_base_url from .annotations import add_tagids from .ut...
bsd-3-clause
lowitty/server
libsDarwin/twisted/conch/ssh/userauth.py
5
26771
# -*- test-case-name: twisted.conch.test.test_userauth -*- # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Implementation of the ssh-userauth service. Currently implemented authentication types are public-key and password. Maintainer: Paul Swartz """ import struct from twisted.conch impor...
mit
stevereyes01/pycbc
pycbc/population/rates_functions.py
11
15169
""" A set of helper functions for evaluating rates. """ from scipy import integrate, optimize import numpy as np, h5py from numpy import log import scipy.stats as ss import bisect from pycbc.conversions import mchirp_from_mass1_mass2 def process_full_data(fname, rhomin, mass1, mass2, lo_mchirp, hi_mchirp): """Re...
gpl-3.0
taotie12010/bigfour
lms/djangoapps/shoppingcart/processors/__init__.py
215
2574
""" Public API for payment processor implementations. The specific implementation is determined at runtime using Django settings: CC_PROCESSOR_NAME: The name of the Python module (in `shoppingcart.processors`) to use. CC_PROCESSOR: Dictionary of configuration options for specific processor implementations, ...
agpl-3.0
copyliu/acfun_live_speech
utils.py
1
1318
# -*- coding: UTF-8 -*- __author__ = 'Administrator' import struct acfun_magic_num=689 def acfunencode(d): """ 类似urllib.urlencode()的功能 不过是给ACFUN用的 :param d: @type dict :return: str """ #print d result="" if isinstance(d,dict): for k,v in d.items(): result += "%s@...
gpl-2.0
florian-dacosta/OCB
addons/mrp/__openerp__.py
52
3781
# -*- 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
mahim97/zulip
zilencer/models.py
2
1101
import datetime from typing import Text from django.db import models import zerver.models def get_remote_server_by_uuid(uuid: Text) -> 'RemoteZulipServer': return RemoteZulipServer.objects.get(uuid=uuid) class RemoteZulipServer(models.Model): uuid = models.CharField(max_length=36, unique=True) # type: Text...
apache-2.0
tareqalayan/ansible
lib/ansible/modules/clustering/k8s/k8s_facts.py
5
4805
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018, Will Thames <@willthames> # 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
bjolivot/ansible
test/units/modules/system/test_known_hosts.py
61
4114
import os import tempfile from ansible.compat.tests import unittest from ansible.module_utils._text import to_bytes from ansible.modules.system.known_hosts import compute_diff class KnownHostsDiffTestCase(unittest.TestCase): def _create_file(self, content): tmp_file = tempfile.NamedTemporaryFile(prefix...
gpl-3.0
matthijsvk/multimodalSR
code/Experiments/neon-master/examples/faster-rcnn/convert_xml_to_json.py
1
5828
# ---------------------------------------------------------------------------- # Copyright 2016 Nervana Systems 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.o...
mit
odoomrp/odoomrp-utils
stock_incoterm_extension/models/account_invoice.py
2
1915
# -*- coding: utf-8 -*- ############################################################################## # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the #...
agpl-3.0
lazycoder-ru/pelican
pelican/cache.py
25
5247
# -*- coding: utf-8 -*- from __future__ import unicode_literals import hashlib import logging import os from six.moves import cPickle as pickle from pelican.utils import mkdir_p logger = logging.getLogger(__name__) class FileDataCacher(object): """Class that can cache data contained in files""" def __ini...
agpl-3.0
PetrDlouhy/django
django/template/engine.py
9
9807
import warnings from django.core.exceptions import ImproperlyConfigured from django.utils import lru_cache, six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.functional import cached_property from django.utils.module_loading import import_string from .base import Context, Template, T...
bsd-3-clause
ncsulug/ncsulug-website
lug_people/migrations/0003_auto__add_accountrequest.py
1
6919
# -*- coding: 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): # Adding model 'AccountRequest' db.create_table('lug_people_accountrequest', ( ('id', self.gf('d...
gpl-3.0
Elizaveta239/PyDev.Debugger
tests_python/my_django_proj_17/my_django_proj_17/settings.py
48
2130
""" Django settings for my_django_proj_17 project. For more information on this file, see https://docs.djangoproject.com/en/1.7/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/1.7/ref/settings/ """ # Build paths inside the project like this: os.path.join(BASE_DI...
epl-1.0
AndrewPeelMV/Blender2.78c
2.78/scripts/addons/add_mesh_extra_objects/mesh_discombobulator.py
2
27573
# GPL # Original Authors: Evan J. Rosky (syrux), Chichiri, Jace Priester # import bpy import random import math from bpy.types import ( Operator, Menu, ) from mathutils import ( Vector, Quaternion, ) # ################### ...
gpl-2.0
scrapinghub/dateparser
tests/test_hijri.py
1
2000
import sys import unittest from datetime import datetime from parameterized import parameterized, param from tests import BaseTestCase is_python_supported = sys.version_info >= (3, 6) try: from dateparser.calendars.hijri import HijriCalendar except ImportError: if is_python_supported: raise @unitt...
bsd-3-clause
trankmichael/scipy
scipy/io/tests/test_mmio.py
2
12652
#!/usr/bin/env python from __future__ import division, print_function, absolute_import from tempfile import mkdtemp, mktemp import os import shutil from numpy import array,transpose, pi from numpy.testing import (TestCase, run_module_suite, assert_equal, assert_array_equal, assert_array_almost_equal, rand) import...
bsd-3-clause
stefanv/aandete
app/lib/pygments/lexer.py
27
31054
# -*- coding: utf-8 -*- """ pygments.lexer ~~~~~~~~~~~~~~ Base lexer classes. :copyright: Copyright 2006-2017 by the Pygments team, see AUTHORS. :license: BSD, see LICENSE for details. """ from __future__ import print_function import re import sys import time from pygments.filter import apply_f...
bsd-3-clause
jiaphuan/models
samples/outreach/blogs/blog_estimators_dataset.py
6
6245
# 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
Microsoft/PTVS
Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pythonwin/pywin/mfc/docview.py
7
3568
# document and view classes for MFC. import win32ui import win32con from . import object from . import window class View(window.Wnd): def __init__(self, initobj): window.Wnd.__init__(self, initobj) def OnInitialUpdate(self): pass # Simple control based views. class CtrlView(View): def __init__(self, doc, wndcl...
apache-2.0
pando85/django-registration
registration/models.py
3
23708
from __future__ import unicode_literals import datetime import hashlib import re import string from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.core.exceptions import ObjectDoesNotExist from django.core.mail import EmailMultiAlternatives from django.db import models...
bsd-3-clause
miquelo/caviar
packages/caviar/engine/__init__.py
1
3783
# # This file is part of CAVIAR. # # CAVIAR 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. # # CAVIAR is distributed in the hope that ...
gpl-3.0
harlowja/networkx
networkx/algorithms/flow/utils.py
41
5885
# -*- coding: utf-8 -*- """ Utility classes and functions for network flow algorithms. """ __author__ = """ysitu <ysitu@users.noreply.github.com>""" # Copyright (C) 2014 ysitu <ysitu@users.noreply.github.com> # All rights reserved. # BSD license. from collections import deque import networkx as nx __all__ = ['Curren...
bsd-3-clause
naziris/HomeSecPi
venv/lib/python2.7/site-packages/setuptools/tests/test_markerlib.py
449
2506
import os import unittest from setuptools.tests.py26compat import skipIf try: import ast except ImportError: pass class TestMarkerlib(unittest.TestCase): @skipIf('ast' not in globals(), "ast not available (Python < 2.6?)") def test_markers(self): from _markerlib import interpret, defa...
apache-2.0
elelsee/pycfn-elasticsearch
pycfn_elasticsearch/vendored/requests/packages/urllib3/contrib/ntlmpool.py
1010
4507
""" NTLM authenticating pool, contributed by erikcederstran Issue #10, see: http://code.google.com/p/urllib3/issues/detail?id=10 """ try: from http.client import HTTPSConnection except ImportError: from httplib import HTTPSConnection from logging import getLogger from ntlm import ntlm from urllib3 import HTT...
apache-2.0
harshita-gupta/Harvard-FRSEM-Catalog-2016-17
flask/lib/python2.7/site-packages/sqlalchemy/sql/schema.py
5
147636
# sql/schema.py # Copyright (C) 2005-2016 the SQLAlchemy authors and contributors # <see AUTHORS file> # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """The schema module provides the building blocks for database metadata. Each element...
mit
msikma/zembu.py
zembu.py
1
7381
#!/usr/bin/env python # coding=utf8 # # zembu.py 0.1 # Script that checks whether dictionary words are available as domain names. import subprocess import datetime import argparse import pprint import time import sys import os # Get current console size. ROWS, COLS = [int(n) for n in os.popen('stty size', 'r').read()...
mit
carlosb1/examples-python
ideas/forecast-example/forecast.py
1
6733
"""Docstring for MyClass.""" import datetime import requests from sqlalchemy import Column, Integer, String , create_engine from celery import Celery from sqlalchemy.sql import exists from sqlalchemy.orm import sessionmaker from sqlalchemy.ext.declarative import declarative_base Base = declarative_base() # define o...
gpl-2.0
rrrene/django
django/contrib/admin/templatetags/admin_list.py
173
17480
from __future__ import unicode_literals import datetime import warnings from django.contrib.admin.templatetags.admin_static import static from django.contrib.admin.templatetags.admin_urls import add_preserved_filters from django.contrib.admin.utils import ( display_for_field, display_for_value, label_for_field, l...
bsd-3-clause
alexzatsepin/omim
tools/unix/diff_size.py
25
1026
#!/usr/bin/python import os, sys if len(sys.argv) < 3: print('This tool shows very different file sizes') print('Usage: {0} <newdir> <olddir> [threshold_in_%]'.format(sys.argv[0])) sys.exit(0) new_path = sys.argv[1] old_path = sys.argv[2] threshold = (int(sys.argv[3]) if len(sys.argv) > 3 else 10) / 100.0 + 1 m...
apache-2.0
nwjs/chromium.src
tools/json_schema_compiler/model_test.py
4
5834
#!/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. from json_schema import CachedLoad from idl_schema import Load from model import Platforms import model import unittest class Mode...
bsd-3-clause
panpan0000/RackHD
test/tests/api/redfish_1_0/account_service_tests.py
15
5546
from config.redfish1_0_config import * from modules.logger import Log from modules.redfish_auth import Auth from on_http_redfish_1_0 import RedfishvApi as redfish from on_http_redfish_1_0 import rest from datetime import datetime from proboscis.asserts import assert_equal from proboscis.asserts import assert_false from...
apache-2.0
0x20h/graphite-web
misc/generate-apache-config.py
21
1339
#!/usr/bin/env python import sys, os from optparse import OptionParser option_parser = OptionParser() option_parser.add_option('--install-root',default='/opt/graphite/', help="The base directory of the graphite installation") option_parser.add_option('--libs',default=None, help="The directory where the graphite p...
apache-2.0
tpodowd/boto
boto/cloudsearch/document.py
153
9780
# 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
thepiper/standoff
venv/lib/python2.7/site-packages/werkzeug/contrib/securecookie.py
254
12206
# -*- coding: utf-8 -*- r""" werkzeug.contrib.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This module implements a cookie that is not alterable from the client because it adds a checksum the server checks for. You can use it as session replacement if all you have is a user id or something to mark ...
gpl-3.0
lupyuen/RaspberryPiImage
home/pi/GrovePi/Software/Python/others/temboo/core/exception.py
4
1932
############################################################################### # # temboo.core.exception.TembooError # temboo.core.exception.TembooHTTPError # temboo.core.exception.TembooCredentialError # temboo.core.exception.TembooObjectNotAccessibleError # # Classes for handling Temboo-related exceptions. # # Pytho...
apache-2.0
CSC301H-Fall2013/JuakStore
site-packages/django/contrib/auth/hashers.py
34
16332
from __future__ import unicode_literals import base64 import functools import hashlib from django.dispatch import receiver from django.conf import settings from django.test.signals import setting_changed from django.utils import importlib from django.utils.datastructures import SortedDict from django.utils.encoding i...
mit
vedujoshi/tempest
tempest/scenario/test_object_storage_basic_ops.py
1
2961
# Copyright 2013 IBM Corp. # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by app...
apache-2.0
AthinaB/synnefo
snf-pithos-app/pithos/api/test/unicode.py
7
18824
#!/usr/bin/env python #coding=utf8 # Copyright (C) 2010-2014 GRNET S.A. # # 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 versio...
gpl-3.0
garnaat/troposphere
troposphere/sqs.py
27
1054
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty from .validators import integer try: from awacs.aws import Policy policytypes = (dict, Policy) except ImportError: policytypes = dict, class RedrivePolic...
bsd-2-clause
Baumelbi/IntroPython2016
Solutions/Session02/fizz_buzz.py
3
1591
#!/usr/bin/env python """ Fizz Buzz examples -- from most straightforward, to most compact. """ # basic approach: def fizzbuzz1(n): for i in range(1, n + 1): if i % 3 == 0 and i % 5 == 0: print("FizzBuzz") elif i % 3 == 0: print ("Fizz") elif i % 5 == 0: ...
unlicense
edxnercel/edx-platform
common/djangoapps/track/tracker.py
239
2374
""" Module that tracks analytics events by sending them to different configurable backends. The backends can be configured using Django settings as the example below:: TRACKING_BACKENDS = { 'tracker_name': { 'ENGINE': 'class.name.for.backend', 'OPTIONS': { 'host': ... , ...
agpl-3.0
Dogeparty/dogepartyd
lib/broadcast.py
4
12334
#! /usr/bin/python3 """ Broadcast a message, with or without a price. Multiple messages per block are allowed. Bets are be made on the 'timestamp' field, and not the block index. An address is a feed of broadcasts. Feeds may be locked with a broadcast whose text field is identical to ‘lock’ (case insensitive). Bets ...
mit
qrkourier/ansible
lib/ansible/utils/module_docs_fragments/ce.py
126
2957
# # # 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 in the hope t...
gpl-3.0
sergeii/swat-julia-admin
fabfile/settings.py
1
3323
# -*- coding: utf-8 -*- import os from unipath import Path from fabric.api import * env.kits = { 'swat4': { 'mod': 'Mod', 'content': 'Content', 'server': 'Swat4DedicatedServer.exe', 'ini': 'Swat4DedicatedServer.ini', }, 'swat4exp': { 'mod': 'ModX', 'content...
mit
geekboxzone/lollipop_external_chromium_org_tools_grit
grit/tool/transl2tc.py
62
10859
#!/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. '''The 'grit transl2tc' tool. ''' from grit import grd_reader from grit import util from grit.tool import interface from grit.too...
bsd-2-clause
Lekensteyn/buildbot
master/buildbot/test/unit/test_data_steps.py
8
13691
# 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
yungyuc/solvcon
solvcon/io/tests/test_vtk.py
2
1549
# -*- coding: UTF-8 -*- import os from unittest import TestCase from ...testing import loadfile from .. import gambit class WriteTest(TestCase): __test__ = False blk = None str_neu_vtk = None def assertLines(self, str1, str2): """ Compare two input strings line by line. """ ...
bsd-3-clause
StackStorm/st2
st2api/st2api/controllers/v1/actionexecutions.py
3
42024
# Copyright 2020 The StackStorm Authors. # Copyright 2019 Extreme Networks, 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 ...
apache-2.0
jchome/LocalGuide-Mobile
database/localitydatareader.py
2
2287
#!/usr/bin/python # -*- coding: utf-8 -*- ### generated from template <objectdatareader.py> ### # AFTER CODE GENRATION : add this to the "__init__.py" file: # __all__ = ["datareader", ... , # "localitydatareader.LocalityDataReader", "localitydatareader.LocalityJsonRetriever" # ] ### from .datareader import DataRea...
gpl-2.0
whip112/Whip112
vendor/packages/translate/misc/progressbar.py
26
4765
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright 2004, 2005, 2010 Zuza Software Foundation # # This file is part of translate. # # translate 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...
mpl-2.0
andrewhillcode/holo
src/reddit.py
2
1554
from logging import debug, info, error, exception import praw # Initialization _r = None _config = None def init_reddit(config): global _config _config = config def _connect_reddit(): if _config is None: error("Can't connect to reddit without a config") return None return praw.Reddit(client_id=_config.r_o...
mit
securechain/securechain-wallet
contrib/testgen/gen_base58_test_vectors.py
1000
4343
#!/usr/bin/env python ''' Generate valid and invalid base58 address and private key test vectors. Usage: gen_base58_test_vectors.py valid 50 > ../../src/test/data/base58_keys_valid.json gen_base58_test_vectors.py invalid 50 > ../../src/test/data/base58_keys_invalid.json ''' # 2012 Wladimir J. van der Laan # R...
mit
isandlaTech/cohorte-demos
led/dump/led-demo-raspberry/cohorte/dist/cohorte-1.0.0-1.0.0-20141201.234602-19-python-distribution/repo/bundles/herald/__init__.py
4
3210
#!/usr/bin/env python # -- Content-Encoding: UTF-8 -- """ Herald core package :author: Thomas Calmant :copyright: Copyright 2014, isandlaTech :license: Apache License 2.0 :version: 0.0.2.dev :status: Alpha .. Copyright 2014 isandlaTech Licensed under the Apache License, Version 2.0 (the "License"); you ...
apache-2.0
travisdoor/ArgosRts
engine/thirdparty/pybind11/tests/test_builtin_casters.py
2
9913
# Python < 3 needs this: coding=utf-8 import pytest from pybind11_tests import builtin_casters as m from pybind11_tests import UserType, IncType def test_simple_string(): assert m.string_roundtrip("const char *") == "const char *" def test_unicode_conversion(): """Tests unicode conversion and error reporti...
mit
zofuthan/edx-platform
lms/djangoapps/lms_xblock/migrations/0001_initial.py
110
4883
# -*- coding: 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): # Adding model 'XBlockAsidesConfig' db.create_table('lms_xblock_xblockasidesconfig', ( ('id', se...
agpl-3.0
hammerlab/isovar
test/test_isovar_result.py
1
4692
from isovar import run_isovar from isovar import ProteinSequence from varcode import Variant from testing_helpers import data_path from nose.tools import eq_ def test_isovar_result_property_types(): for result in run_isovar( variants=data_path("data/b16.f10/b16.vcf"), alignment_file=data_...
apache-2.0
ubuntunux/GuineaPig
PyEngine3D/OpenGLContext/UniformBuffer.py
2
11521
import traceback import numpy as np from OpenGL.GL import * from PyEngine3D.Common import logger from PyEngine3D.App import CoreManager ignore_uniform_types = ["atomic_bool", "atomic_uint", "atomic_int", "atomic_float"] def CreateUniformDataFromString(data_type, strValue=None): """ return converted data from ...
bsd-2-clause
xiangel/hue
desktop/core/ext-py/Django-1.6.10/django/contrib/admin/views/main.py
47
17811
import sys import warnings from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured from django.core.paginator import InvalidPage from django.core.urlresolvers import reverse from django.db import models from django.db.models.fields import FieldDoesNotExist from django.utils import six from django....
apache-2.0
uskudnik/ggrc-core
src/ggrc_basic_permissions/migrations/versions/20140519175934_1d1573d5812f_update_context_related_object_where_.py
2
1906
"""Update Context.related_object where missing Revision ID: 1d1573d5812f Revises: 5560713e91b2 Create Date: 2014-05-19 17:59:34.819427 """ # revision identifiers, used by Alembic. revision = '1d1573d5812f' down_revision = '5560713e91b2' from alembic import op import sqlalchemy as sa from sqlalchemy.sql import tabl...
apache-2.0
jakirkham/ilastik
ilastik/applets/vigraWatershedViewer/opVigraWatershedViewer.py
4
10658
############################################################################### # ilastik: interactive learning and segmentation toolkit # # Copyright (C) 2011-2014, the ilastik developers # <team@ilastik.org> # # This program is free software; you can redistribute it and/or # mod...
gpl-3.0
strk/QGIS
tests/src/python/test_qgsdataitemproviderregistry.py
2
2696
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDataItemProviderRegistry .. note:: 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 ver...
gpl-2.0
HyperBaton/ansible
lib/ansible/modules/cloud/google/_gcspanner.py
37
9993
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2017, Google Inc. # 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
LaoZhongGu/kbengine
kbe/src/lib/python/Lib/plat-os2emx/IN.py
57
1869
# Generated by h2py from f:/emx/include/netinet/in.h # Included from sys/param.h PAGE_SIZE = 0x1000 HZ = 100 MAXNAMLEN = 260 MAXPATHLEN = 260 def htonl(X): return _swapl(X) def ntohl(X): return _swapl(X) def htons(X): return _swaps(X) def ntohs(X): return _swaps(X) IPPROTO_IP = 0 IPPROTO_ICMP = 1 IPPROTO_IGMP = 2 ...
lgpl-3.0
lexodistro/blissflixx
lib/chanutils/reddit/__init__.py
3
1251
import chanutils, playitem def search(subreddit, q, moviesubs=False): url = "http://www.reddit.com/r/" + subreddit + "/search.json" data = chanutils.get_json(url, params={'q':q, 'restrict_sr':'on'}) return _extract(data, moviesubs) def get_feed(feed, moviesubs=False): data = chanutils.get_json(feed['url']) ...
gpl-2.0
geminateCoder/Character-Archive-Website
Lib/site-packages/pycparser/__init__.py
41
2903
#----------------------------------------------------------------- # pycparser: __init__.py # # This package file exports some convenience functions for # interacting with pycparser # # Copyright (C) 2008-2015, Eli Bendersky # License: BSD #----------------------------------------------------------------- __all__ = ['c...
cc0-1.0
ssato/sos-analyzer
sos_analyzer/cli.py
1
3519
# # Author: Satoru SATOH <ssato redhat.com> # License: GPLv3+ # import anyconfig import logging import optparse import os import os.path import sys from sos_analyzer.globals import DATA_SUBDIR import sos_analyzer.archive import sos_analyzer.runner import sos_analyzer.utils LOGGER = logging.getLogger(__name__) DEFA...
gpl-3.0
vegetableman/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/filesystem_mock.py
122
16269
# 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 f...
bsd-3-clause
Dhivyap/ansible
lib/ansible/modules/network/ios/ios_ntp.py
10
8739
#!/usr/bin/python # Copyright: Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], 'supported_by': 'network'} DOCUMENTATION = ''' --- module: ios_ntp e...
gpl-3.0
TeslaProject/external_chromium_org
chrome/browser/metrics/variations/generate_resources_map.py
64
5458
#!/usr/bin/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 collections import hashlib import operator import os import re import sys RESOURCE_EXTRACT_REGEX = re.compile('^#define (\S*) (\d*...
bsd-3-clause
Nitaco/ansible
lib/ansible/plugins/lookup/__init__.py
54
4474
# (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.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) an...
gpl-3.0
ajayaa/keystone
keystone/credential/schema.py
25
1643
# 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 writing, software # distributed under the Li...
apache-2.0
nwjs/chromium.src
third_party/logilab/logilab/common/ureports/text_writer.py
92
5212
# 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...
bsd-3-clause
tombstone/models
research/object_detection/predictors/convolutional_keras_box_predictor_tf2_test.py
2
42980
# 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
JohnKendrick/PDielec
PDielec/pickled_reader.py
1
1689
#!/usr/bin/env python """Read the contents of a directory containing DFT output and create a csv style file of information""" from __future__ import print_function import sys import dill as pickle import PDielec.__init__ version = PDielec.__init__.__version__ def print_help(): print('pickled_reader filenames', fil...
mit
panxia6679/ursula
library/keystone_service.py
4
9799
#!/usr/bin/python # -*- coding: utf-8 -*- DOCUMENTATION = ''' --- module: keystone_service short_description: Manage OpenStack Identity (keystone) service endpoints options: name: description: - name of service (e.g., keystone) required: yes type: description: - type of service (e.g., i...
mit
google/tink
python/tink/core/_registry.py
1
9252
# Copyright 2019 Google LLC. # # 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 writing,...
apache-2.0
basicthinker/Sexain-MemController
gem5-stable/src/mem/slicc/ast/StallAndWaitStatementAST.py
34
2361
# Copyright (c) 1999-2008 Mark D. Hill and David A. Wood # Copyright (c) 2009 The Hewlett-Packard Development Company # Copyright (c) 2010 Advanced Micro Devices, Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following ...
apache-2.0
samfpetersen/gnuradio
gr-qtgui/apps/plot_spectrogram_form.py
47
7029
#!/usr/bin/env python # # Copyright 2013 Free Software Foundation, Inc. # # This file is part of GNU Radio # # GNU Radio 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, or (at your option) # ...
gpl-3.0
mnahm5/django-estore
Lib/site-packages/PIL/IcnsImagePlugin.py
26
10597
# # The Python Imaging Library. # $Id$ # # Mac OS X icns file decoder, based on icns.py by Bob Ippolito. # # history: # 2004-10-09 fl Turned into a PIL plugin; removed 2.3 dependencies. # # Copyright (c) 2004 by Bob Ippolito. # Copyright (c) 2004 by Secret Labs. # Copyright (c) 2004 by Fredrik Lundh. # Copyright (c) ...
mit
mikekestemont/ruzicka
code/04latin_test_o2.py
1
3340
from __future__ import print_function import os import time import json import pickle import sys from itertools import product, combinations import matplotlib import matplotlib.pyplot as plt import seaborn as sns import pandas as pd import numpy as np from sklearn.preprocessing import LabelEncoder from ruzicka.util...
mit
bazzile/THE_BIG_ONE
Main/Tenderplan/participants2excel.py
1
6915
from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.common.by import By from selenium.common.exceptions import TimeoutException from selenium.common.exceptions import NoSuchElementException from selenium.common.exceptions impor...
mit
yoer/hue
desktop/core/ext-py/httplib2-0.8/python3/httplib2test.py
61
74045
#!/usr/bin/env python3 """ httplib2test A set of unit tests for httplib2.py. Requires Python 3.0 or later """ __author__ = "Joe Gregorio (joe@bitworking.org)" __copyright__ = "Copyright 2006, Joe Gregorio" __contributors__ = ["Mark Pilgrim"] __license__ = "MIT" __history__ = """ """ __version__ = "0.2 ...
apache-2.0
sandeepgupta2k4/tensorflow
tensorflow/python/ops/split_benchmark.py
176
4403
# 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
lokeshjindal15/pd-gem5
src/mem/slicc/util.py
83
3124
# Copyright (c) 2009 The Hewlett-Packard Development Company # 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...
bsd-3-clause
mateoqac/unqTip
language/vgbs/web/base.py
1
1839
"Base classes for services." import web import local def have_role(role_id): "Return True iff the currently logged user has the given role." user_id = local.session.user_id it = local.db.select('role_assignments', where='user_id=$user_id AND role_id=$role_id', vars=locals() ...
gpl-3.0
oasiswork/odoo
openerp/report/render/rml2txt/rml2txt.py
442
16460
#!/usr/bin/env python # -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009, P. Christeas, Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or ...
agpl-3.0
whosonfirst/whosonfirst-www-boundaryissues
services/geojson-server/wof-geojson-server.py
1
7923
#!/usr/bin/env python import StringIO import sys import logging import os import re import flask from flask import Flask, request, jsonify import geojson import requests import json import mapzen.whosonfirst.geojson import mapzen.whosonfirst.export import mapzen.whosonfirst.search import mapzen.whosonfirst.utils impo...
bsd-3-clause
ZeitOnline/zeit.content.author
src/zeit/content/author/author.py
1
9296
from requests.exceptions import RequestException from zeit.cms.content.property import ObjectPathProperty from zeit.cms.i18n import MessageFactory as _ from zeit.content.author.interfaces import IAuthor import UserDict import grokcore.component as grok import lxml.objectify import requests import urllib import zeit.cms...
bsd-3-clause
pedropena/iteexe
exe/export/singlepage.py
1
14738
# =========================================================================== # eXe # Copyright 2004-2005, University of Auckland # Copyright 2004-2008 eXe Project, http://eXeLearning.org/ # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as...
gpl-2.0
ilblackdragon/tf_examples
seq2seq/data.py
1
2291
import tensorflow as tf from tensorflow.contrib import layers from tensorflow.contrib import learn def make_input_fn(mode, filename_in, filename_out, in_vocab_file, out_vocab_file, batch_size, vocab_size, input_max_length, output_max_length, queue_capacity=10000, num_threads=10): def input_fn():...
apache-2.0
ndingwall/scikit-learn
sklearn/dummy.py
5
21753
# Author: Mathieu Blondel <mathieu@mblondel.org> # Arnaud Joly <a.joly@ulg.ac.be> # Maheshakya Wijewardena <maheshakya.10@cse.mrt.ac.lk> # License: BSD 3 clause import warnings import numpy as np import scipy.sparse as sp from .base import BaseEstimator, ClassifierMixin, RegressorMixin from .base impo...
bsd-3-clause
insidenothing/3D-Printing-Software
skein_engines/skeinforge-35/fabmetheus_utilities/geometry/solids/cube.py
6
3514
""" This page is in the table of contents. The xml.py script is an import translator plugin to get a carving from an Art of Illusion xml file. An import plugin is a script in the interpret_plugins folder which has the function getCarving. It is meant to be run from the interpret tool. To ensure that the plugin works...
gpl-2.0
alx-eu/django
django/contrib/localflavor/de/forms.py
110
3266
""" DE-specific Form helpers """ from __future__ import absolute_import, unicode_literals import re from django.contrib.localflavor.de.de_states import STATE_CHOICES from django.core.validators import EMPTY_VALUES from django.forms import ValidationError from django.forms.fields import Field, RegexField, Select from...
bsd-3-clause
ychfan/tensorflow
tensorflow/python/debug/wrappers/local_cli_wrapper.py
11
25872
# 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
jicruz/heroku-bot
lib/youtube_dl/extractor/ruleporn.py
76
1514
from __future__ import unicode_literals from .nuevo import NuevoBaseIE class RulePornIE(NuevoBaseIE): _VALID_URL = r'https?://(?:www\.)?ruleporn\.com/(?:[^/?#&]+/)*(?P<id>[^/?#&]+)' _TEST = { 'url': 'http://ruleporn.com/brunette-nympho-chick-takes-her-boyfriend-in-every-angle/', 'md5': '86861...
gpl-3.0
applexiaohao/three.js
utils/exporters/blender/tests/scripts/review.py
305
3697
import os import json import stat import shutil import argparse os.chdir(os.path.dirname(os.path.realpath(__file__))) os.chdir('..') review = os.path.join(os.getcwd(), 'review') MASK = stat.S_IRWXU|stat.S_IRGRP|stat.S_IXGRP|stat.S_IROTH|stat.S_IXOTH HTML = '''<!doctype html> <html lang='en'> <head> <title>%(t...
mit
joseamaya/tambox
almacen/managers.py
1
2042
# -*- coding: utf-8 -*- from django.db import models class DetalleMovimientoManager(models.Manager): def guardar_detalles_con_referencia(self, objs, orden): requerimiento = None if orden.cotizacion is not None: requerimiento = orden.cotizacion.requerimiento for detalle in obj...
gpl-3.0