repo_name
stringlengths
5
100
path
stringlengths
4
375
copies
stringclasses
991 values
size
stringlengths
4
7
content
stringlengths
666
1M
license
stringclasses
15 values
ujvl/ray-ng
python/ray/tune/examples/mnist_pytorch.py
1
4582
# Original Code here: # https://github.com/pytorch/examples/blob/master/mnist/main.py from __future__ import absolute_import from __future__ import division from __future__ import print_function import os import numpy as np import argparse from filelock import FileLock import torch import torch.nn as nn import torch.n...
apache-2.0
rdkit/rdkit-orig
rdkit/utils/REFile.py
2
2195
# # Copyright (C) 2000 greg Landrum # """ contains class REFile, for working with files containing comments """ import re class REFile: """behaves more or less like a normal file, but removes comments Any read from the file skips lines beginning with a comment character and cleaves off any portion of the...
bsd-3-clause
0-wiz-0/audacity
lib-src/lv2/lv2/plugins/eg-amp.lv2/waflib/ansiterm.py
177
8189
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import sys,os try: if not(sys.stderr.isatty()and sys.stdout.isatty()): raise ValueError('not a tty') from ctypes import Structure,windll,c_short,c_ushort,c_ulong,c_int,byr...
gpl-2.0
splodingsocks/iTerm2
tests/esctest/tests/ris.py
28
2812
from esc import ESC, NUL, TAB import esccmd import escio import esclog from escutil import AssertEQ, AssertScreenCharsInRectEqual, AssertTrue, GetCursorPosition, GetScreenSize, GetIconTitle, GetWindowTitle, knownBug, vtLevel from esctypes import InternalError, Point, Rect class RISTests(object): def test_RIS_ClearsS...
gpl-2.0
djr7C4/aenea
client/_aenea.py
6
5546
# This is a command module for Dragonfly. It provides support for several of # Aenea's built-in capabilities. This module is NOT required for Aenea to # work correctly, but it is strongly recommended. # This file is part of Aenea # # Aenea is free software: you can redistribute it and/or modify it under # the terms of...
lgpl-3.0
sloanyang/android_external_webkit
Tools/Scripts/webkitpy/tool/commands/rebaselineserver_unittest.py
15
11435
# Copyright (C) 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 of conditions and the f...
gpl-2.0
LingxiaoJIA/gem5
src/cpu/o3/FUPool.py
69
2002
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 ...
bsd-3-clause
mmetak/streamlink
src/streamlink/plugins/aftonbladet.py
2
3010
"""Plugin for swedish news paper Aftonbladet's streaming service.""" import re from streamlink.plugin import Plugin from streamlink.plugin.api import http, validate from streamlink.stream import HDSStream, HLSStream PLAYLIST_URL_FORMAT = "http://{address}/{path}/{filename}" STREAM_TYPES = { "hds": HDSStream.pars...
bsd-2-clause
sillywilly42/simian
src/tests/simian/mac/munki/handlers/catalogs_test.py
1
1886
#!/usr/bin/env python # # Copyright 2016 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 require...
apache-2.0
pmghalvorsen/gramps_branch
gramps/gui/selectors/selectcitation.py
2
2470
# # Gramps - a GTK+/GNOME based genealogy program # # Copyright (C) 2003-2006 Donald N. Allingham # 2009 Gary Burton # Copyright (C) 2011 Tim G L Lyons, Nick Hall # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as publi...
gpl-2.0
tttthemanCorp/CardmeleonAppEngine
django/contrib/staticfiles/management/commands/runserver.py
163
1264
from optparse import make_option from django.conf import settings from django.core.management.commands.runserver import BaseRunserverCommand from django.contrib.staticfiles.handlers import StaticFilesHandler class Command(BaseRunserverCommand): option_list = BaseRunserverCommand.option_list + ( make_opti...
bsd-3-clause
Hellowlol/PyTunes
libs/engines/other/piratebay.py
1
4507
#VERSION: 1.53 #AUTHORS: Fabien Devaux (fab@gnux.info) #CONTRIBUTORS: Christophe Dumez (chris@qbittorrent.org) # 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...
gpl-3.0
mfalesni/cfme_tests
cfme/tests/test_db_restore.py
2
3688
import fauxfactory import pytest from cfme.cloud.provider.ec2 import EC2Provider from cfme.common.vm import VM from cfme.infrastructure.provider.virtualcenter import VMwareProvider from fixtures.pytest_store import store from cfme.utils.log import logger from cfme.utils.providers import list_providers_by_class def p...
gpl-2.0
defance/edx-platform
openedx/core/lib/api/tests/test_exceptions.py
11
2703
""" Test Custom Exceptions """ import ddt from django.test import TestCase from rest_framework import exceptions as drf_exceptions from .. import exceptions @ddt.ddt class TestDictExceptionsAllowDictDetails(TestCase): """ Standard DRF exceptions coerce detail inputs to strings. We want to use dicts to a...
agpl-3.0
craigderington/studentloan5
studentloan5/Lib/_dummy_thread.py
106
4872
"""Drop-in replacement for the thread module. Meant to be used as a brain-dead substitute so that threaded code does not need to be rewritten for when the thread module is not present. Suggested usage is:: try: import _thread except ImportError: import _dummy_thread as _thread """ # Exports ...
bsd-3-clause
rahul67/hue
desktop/core/ext-py/boto-2.38.0/boto/glacier/vault.py
153
17601
# -*- coding: utf-8 -*- # Copyright (c) 2012 Thomas Parslow http://almostobsolete.net/ # Copyright (c) 2012 Robie Basak <robie@justgohome.co.uk> # # 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 Softw...
apache-2.0
RanmaRaj/Tak-tivity
pythonds/trees/bst.py
7
18324
#!/bin/env python3.1 # Bradley N. Miller, David L. Ranum # Introduction to Data Structures and Algorithms in Python # Copyright 2005, 2010 # import unittest class BinarySearchTree: ''' Author: Brad Miller Date: 1/15/2005 Description: Imlement a binary search tree with the following interface ...
apache-2.0
marcore/edx-platform
common/djangoapps/microsite_configuration/tests/test_admin.py
46
1635
""" Tests for microsite admin """ from django.contrib.admin.sites import AdminSite from django.http import HttpRequest from microsite_configuration.admin import MicrositeAdmin from microsite_configuration.models import Microsite from microsite_configuration.tests.tests import DatabaseMicrositeTestCase class Microsit...
agpl-3.0
stanley-cheung/grpc
src/python/grpcio_tests/tests/unit/_server_shutdown_scenarios.py
18
2916
# Copyright 2018 gRPC 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 or agreed to in writing...
apache-2.0
zpfang/FreeNOS
site_scons/iso.py
3
1803
# # Copyright (C) 2010 Niek Linnenbank # # 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...
gpl-3.0
holmes/intellij-community
python/lib/Lib/site-packages/django/utils/numberformat.py
290
1632
from django.conf import settings from django.utils.safestring import mark_safe def format(number, decimal_sep, decimal_pos, grouping=0, thousand_sep=''): """ Gets a number (as a number or string), and returns it as a string, using formats definied as arguments: * decimal_sep: Decimal separator symbol...
apache-2.0
gimite/personfinder
app/vendors/idna/idnadata.py
63
40899
# This file is automatically generated by tools/idna-data __version__ = "11.0.0" scripts = { 'Greek': ( 0x37000000374, 0x37500000378, 0x37a0000037e, 0x37f00000380, 0x38400000385, 0x38600000387, 0x3880000038b, 0x38c0000038d, 0x38e000003a2, ...
apache-2.0
slohse/ansible
lib/ansible/plugins/callback/grafana_annotations.py
22
9217
# -*- coding: utf-8 -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
gpl-3.0
aboutsajjad/Bridge
app_packages/youtube_dl/extractor/worldstarhiphop.py
57
1344
from __future__ import unicode_literals from .common import InfoExtractor class WorldStarHipHopIE(InfoExtractor): _VALID_URL = r'https?://(?:www|m)\.worldstar(?:candy|hiphop)\.com/(?:videos|android)/video\.php\?.*?\bv=(?P<id>[^&]+)' _TESTS = [{ 'url': 'http://www.worldstarhiphop.com/videos/video.php?...
mit
jonparrott/google-cloud-python
logging/google/cloud/logging/handlers/transports/sync.py
3
2028
# Copyright 2016 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, s...
apache-2.0
JimCircadian/ansible
lib/ansible/modules/storage/glusterfs/gluster_volume.py
20
15711
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2014, Taneli Leppä <taneli@crasman.fi> # 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
grnet/synnefo
snf-cyclades-app/synnefo/db/migrations/old/0086_auto__add_ipaddresslog.py
10
19362
# -*- 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 'IPAddressLog' db.create_table('db_ipaddresslog', ( ('id', self.gf('django.db.mod...
gpl-3.0
ycsoft/FatCat-Server
LIBS/boost_1_58_0/tools/build/src/tools/package.py
9
6990
# Status: ported # Base revision: 64488 # # Copyright (c) 2005, 2010 Vladimir Prus. # Copyright 2006 Rene Rivera. # # Use, modification and distribution is subject to the Boost Software # License Version 1.0. (See accompanying file LICENSE_1_0.txt or # http://www.boost.org/LICENSE_1_0.txt) # Provides mechani...
mit
heeraj123/oh-mainline
vendor/packages/requests/requests/packages/chardet/eucjpprober.py
2919
3678
######################## 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...
agpl-3.0
commshare/testLiveSRS
trunk/objs/CherryPy-3.2.4/build/lib.linux-armv7l-2.7/cherrypy/wsgiserver/wsgiserver2.py
19
87973
"""A high-speed, production ready, thread pooled, generic HTTP server. Simplest example on how to use this module directly (without using CherryPy's application machinery):: from cherrypy import wsgiserver def my_crazy_app(environ, start_response): status = '200 OK' response_headers = [('Cont...
mit
nicolargo/intellij-community
python/helpers/pydev/third_party/pep8/lib2to3/lib2to3/main.py
250
11605
""" Main program for 2to3. """ from __future__ import with_statement import sys import os import difflib import logging import shutil import optparse from . import refactor def diff_texts(a, b, filename): """Return a unified diff of two strings.""" a = a.splitlines() b = b.splitlines() return diffl...
apache-2.0
0k/OpenUpgrade
addons/sale_margin/__init__.py
441
1042
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
agpl-3.0
Frzk/Rig
setup.py
1
1377
#!/usr/bin/env python # coding: utf-8 import re from setuptools import setup # Get version from `ellis/main.py`: version = re.search('^__version__\s*=\s*"(.*)"', open('ellis/main.py').read(), re.M) \ .group(1) setup(name='ellis', version=version, de...
gpl-3.0
OSSESAC/odoopubarquiluz
addons/portal_project/__openerp__.py
55
1669
# -*- 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
yesho/MITMf
core/sslstrip/SSLServerConnection.py
26
5607
# Copyright (c) 2014-2016 Moxie Marlinspike, Marcello Salvati # # 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...
gpl-3.0
jerryz1982/neutron
neutron/tests/unit/extensions/test_extraroute.py
4
22953
# Copyright 2013, Nachi Ueno, NTT MCL, 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 # # Unles...
apache-2.0
senttech/OctoPrint
tests/plugin/test_types_blueprint.py
9
4161
import unittest import mock import octoprint.plugin class BlueprintPluginTest(unittest.TestCase): def setUp(self): self.basefolder = "/some/funny/basefolder" self.plugin = octoprint.plugin.BlueprintPlugin() self.plugin._basefolder = self.basefolder class MyAssetPlugin(octoprint.plugin.BlueprintPlugin, oct...
agpl-3.0
mexeniz/django-oscar
src/oscar/apps/offer/benefits.py
22
11536
from decimal import Decimal as D from django.utils.translation import ugettext_lazy as _ from oscar.apps.offer import conditions, results, utils from oscar.core.loading import get_model from oscar.templatetags.currency_filters import currency Benefit = get_model('offer', 'Benefit') __all__ = [ 'PercentageDiscou...
bsd-3-clause
TEAM-Gummy/android_kernel_samsung_d2
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Displays system-wide system call totals, broken down by syscall. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.path.append(os.envir...
gpl-2.0
akshaydeo/thrift
test/py/TestSocket.py
99
2888
#!/usr/bin/env python # # 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 # "L...
apache-2.0
zhangh43/incubator-hawq
tools/bin/ext/simplejson/encoder.py
62
13024
""" Implementation of JSONEncoder """ import re try: from simplejson import _speedups except ImportError: _speedups = None ESCAPE = re.compile(r'[\x00-\x19\\"\b\f\n\r\t]') ESCAPE_ASCII = re.compile(r'([\\"/]|[^\ -~])') ESCAPE_DCT = { # escape all forward slashes to prevent </script> attack '/': '\\/', ...
apache-2.0
moutai/scikit-learn
sklearn/externals/funcsigs.py
118
29982
# Copyright 2001-2013 Python Software Foundation; All Rights Reserved """Function signature objects for callables Back port of Python 3.3's function signature tools from the inspect module, modified to be compatible with Python 2.6, 2.7 and 3.2+. """ from __future__ import absolute_import, division, print_function imp...
bsd-3-clause
Cactuslegs/audacity-of-nope
lib-src/lv2/sord/waflib/Node.py
62
10698
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,re,sys,shutil from waflib import Utils,Errors exclude_regs=''' **/*~ **/#*# **/.#* **/%*% **/._* **/CVS **/CVS/** **/.cvsignore **/SCCS **/SCCS/** **/vssver.scc **/....
gpl-2.0
cloudera/hue
desktop/core/ext-py/pytest-4.6.11/src/_pytest/pathlib.py
3
11264
# -*- coding: utf-8 -*- from __future__ import absolute_import import atexit import errno import fnmatch import itertools import operator import os import shutil import sys import uuid import warnings from functools import partial from functools import reduce from os.path import expanduser from os.path import expandva...
apache-2.0
sysalexis/kbengine
kbe/src/lib/python/Tools/demo/vector.py
110
1452
#!/usr/bin/env python3 """ A demonstration of classes and their special methods in Python. """ class Vec: """A simple vector class. Instances of the Vec class can be constructed from numbers >>> a = Vec(1, 2, 3) >>> b = Vec(3, 2, 1) added >>> a + b Vec(4, 4, 4) subtracted >>> a...
lgpl-3.0
ashishnitinpatil/vnitstudnotifs
django/contrib/admin/views/main.py
49
17582
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....
bsd-3-clause
cholcombe973/autodock
verify.py
5
7544
''' This class performs a few functions: 1. If the host is up and the container is down it starts the container 2. Verifies a container is running 3. Verifies a container has cron running. Calls start.sh if needed. ''' import paramiko import salt.client import time from circularlist import CircularList from ...
mit
firebitsbr/infernal-twin
build/pip/pip/_vendor/six.py
878
29664
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2015 Benjamin Peterson # # 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 with...
gpl-3.0
she11c0de/cubes
cubes/backends/slicer/browser.py
1
4972
# -*- coding=utf -*- import urllib2 import json import logging import urllib from ...logging import get_logger from ...browser import * class SlicerBrowser(AggregationBrowser): """Aggregation browser for Cubes Slicer OLAP server.""" def __init__(self, cube, store, locale=None, **options): """Browser ...
mit
ljwolf/pysal
pysal/contrib/handler/tests/test_error_sp.py
6
7995
import unittest import scipy import pysal import numpy as np from pysal.spreg import error_sp as SP from pysal.contrib.handler import Model from functools import partial GM_Error = partial(Model, mtype='GM_Error') GM_Endog_Error = partial(Model, mtype='GM_Endog_Error') GM_Combo = partial(Model, mtype='GM_Combo') cla...
bsd-3-clause
kuri65536/python-for-android
python-modules/twisted/twisted/internet/serialport.py
56
1908
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # See LICENSE for details. """ Serial Port Protocol """ # http://twistedmatrix.com/trac/ticket/3725#comment:24 # Apparently applications use these names even though they should # be imported from pyserial __all__ = ["serial", "PARITY_ODD", "PARITY_EVEN", "PARITY...
apache-2.0
codeforamerica/skillcamp
ENV/lib/python2.7/site-packages/sqlalchemy/sql/compiler.py
76
111426
# sql/compiler.py # Copyright (C) 2005-2014 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 """Base SQL and DDL compiler implementations. Classes provided include: :class:`.com...
mit
FireWRT/OpenWrt-Firefly-Libraries
staging_dir/host/lib/python2.7/ctypes/test/test_wintypes.py
134
1466
import sys import unittest from ctypes import * @unittest.skipUnless(sys.platform.startswith('win'), 'Windows-only test') class WinTypesTest(unittest.TestCase): def test_variant_bool(self): from ctypes import wintypes # reads 16-bits from memory, anything non-zero is True for true_value in...
gpl-2.0
goozbach/ansible
lib/ansible/playbook/role/metadata.py
64
3373
# (c) 2014 Michael DeHaan, <michael@ansible.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ve...
gpl-3.0
dharmabumstead/ansible
lib/ansible/modules/net_tools/lldp.py
103
2499
#!/usr/bin/python # # 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', 'status': ['preview'],...
gpl-3.0
tensorflow/tensor2tensor
tensor2tensor/models/research/residual_shuffle_exchange.py
1
8731
# coding=utf-8 # Copyright 2021 The Tensor2Tensor 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...
apache-2.0
nthien/pulp
client_lib/test/unit/client/commands/repo/test_sync_publish.py
7
23765
""" Testing this stuff is a nightmare. To ease the pain, these tests only cover the commands themselves and ensure they call into the status rendering module. The status module itself will be tested apart from what happens in the commands. """ import copy import unittest import mock from pulp.bindings import respons...
gpl-2.0
moijes12/oh-mainline
vendor/packages/celery/celery/tests/test_app/test_app_defaults.py
19
1060
from __future__ import absolute_import from __future__ import with_statement import sys from importlib import import_module from celery.tests.utils import unittest, pypy_version, sys_platform class test_defaults(unittest.TestCase): def setUp(self): self._prev = sys.modules.pop("celery.app.defaults", N...
agpl-3.0
nyuwireless/ns3-mmwave
src/visualizer/visualizer/base.py
160
3799
import ns.point_to_point import ns.csma import ns.wifi import ns.bridge import ns.internet import ns.mesh import ns.wimax import ns.wimax import ns.lte import gobject import os.path import sys PIXELS_PER_METER = 3.0 # pixels-per-meter, at 100% zoom level class PyVizObject(gobject.GObject): __gtype_name__ = "PyVi...
gpl-2.0
benc-uk/skytap-ansible
library/skytap_environment.py
1
5233
#!/usr/bin/python # Copyright (c) 2016 Ben Coleman # Software provided under the terms of the Apache 2.0 license http://www.apache.org/licenses/LICENSE-2.0.txt DOCUMENTATION = ''' --- module: skytap_environment short_description: Build and control Skytap cloud environments ''' import json import requests import sys i...
apache-2.0
hongbincao/azure-quickstart-templates
hortonworks-on-centos/scripts/vm-bootstrap.py
89
53170
# # vm-bootstrap.py # # This script is used to prepare VMs launched via HDP Cluster Install Blade on Azure. # # Parameters passed from the bootstrap script invocation by the controller (shown in the parameter order). # Required parameters: # action: "bootstrap" to set up VM and initiate cluster deployment. "check" f...
mit
dpiers/coderang-meteor
public/jsrepl/extern/python/unclosured/lib/python2.7/encodings/iso8859_9.py
593
13412
""" Python Character Mapping Codec iso8859_9 generated from 'MAPPINGS/ISO8859/8859-9.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_table) def decode(self,input,errors='...
mit
molokov/mezzanine
mezzanine/galleries/tests.py
54
2140
from __future__ import unicode_literals from future.builtins import str from future.utils import native import os from shutil import rmtree from uuid import uuid4 from mezzanine.conf import settings from mezzanine.core.templatetags.mezzanine_tags import thumbnail from mezzanine.galleries.models import Gallery, GALLER...
bsd-2-clause
ahu-odoo/odoo
openerp/report/pyPdf/generic.py
136
29129
# vim: sw=4:expandtab:foldmethod=marker # # Copyright (c) 2006, Mathieu Fenniak # 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 copyrig...
agpl-3.0
namuyan/kumacoin
test/functional/test_framework/socks5.py
18
5690
#!/usr/bin/env python3 # Copyright (c) 2015-2018 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Dummy Socks5 server for testing.""" import socket import threading import queue import logging logger...
mit
owais/django-allauth
allauth/socialaccount/providers/instagram/provider.py
75
1150
from allauth.socialaccount import providers from allauth.socialaccount.providers.base import ProviderAccount from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider class InstagramAccount(ProviderAccount): PROFILE_URL = 'http://instagram.com/' def get_profile_url(self): return sel...
mit
codeworldprodigy/lab2
lib/werkzeug/wrappers.py
298
76131
# -*- coding: utf-8 -*- """ werkzeug.wrappers ~~~~~~~~~~~~~~~~~ The wrappers are simple request and response objects which you can subclass to do whatever you want them to do. The request object contains the information transmitted by the client (webbrowser) and the response object contains al...
apache-2.0
sygard/dns_mdb
scripts/rrd_service.py
1
4083
#!/usr/bin/env python # coding: utf-8 import os,sys,datetime,argparse,threading,time,Queue from commands import getstatusoutput parser = argparse.ArgumentParser(description = 'Ping hosts from mdb') parser.add_argument('-t', '--type', default='all',\ help="Which type of host to operate on") parser.add_argument('-d',...
gpl-2.0
jarn0ld/gnuradio
gr-filter/examples/synth_filter.py
58
2552
#!/usr/bin/env python # # Copyright 2010,2012,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 ...
gpl-3.0
xuxiao19910803/edx
common/test/acceptance/pages/lms/courseware_search.py
81
1330
""" Courseware search """ from .course_page import CoursePage class CoursewareSearchPage(CoursePage): """ Coursware page featuring a search form """ url_path = "courseware/" search_bar_selector = '#courseware-search-bar' @property def search_results(self): """ search results lis...
agpl-3.0
mKaloer/rpi-radio-player
web-radio/web-radio/radiomessages_pb2_grpc.py
2
4849
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc import google.protobuf.empty_pb2 as google_dot_protobuf_dot_empty__pb2 import radiomessages_pb2 as radiomessages__pb2 class RadioStub(object): def __init__(self, channel): """Constructor. Args: channel: A grpc.Channel...
mit
azureplus/chromium_depot_tools
third_party/boto/roboto/param.py
91
4533
# Copyright (c) 2010 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2010, Eucalyptus Systems, 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 # withou...
bsd-3-clause
gdimitris/FleetManagerBackend
virtual_env/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/fields.py
1007
5833
import email.utils import mimetypes from .packages import six def guess_content_type(filename, default='application/octet-stream'): """ Guess the "Content-Type" of a file. :param filename: The filename to guess the "Content-Type" of using :mod:`mimetypes`. :param default: If no "Cont...
mit
phil-lopreiato/the-blue-alliance
controllers/cron_controller.py
2
31586
import datetime import logging import os import json from google.appengine.api import taskqueue from google.appengine.ext import ndb from google.appengine.ext import webapp from google.appengine.ext.webapp import template from consts.district_type import DistrictType from consts.event_type import EventType from co...
mit
quickresolve/accel.ai
flask-aws/lib/python2.7/site-packages/docutils/utils/code_analyzer.py
9
4929
#!/usr/bin/python # coding: utf-8 """Lexical analysis of formal languages (i.e. code) using Pygments.""" # :Author: Georg Brandl; Felix Wiemann; Günter Milde # :Date: $Date: 2015-04-20 16:05:27 +0200 (Mo, 20. Apr 2015) $ # :Copyright: This module has been placed in the public domain. from docutils import Application...
mit
rupran/ansible
lib/ansible/modules/utilities/logic/pause.py
6
3075
# -*- mode: python -*- # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distr...
gpl-3.0
tareqalayan/ansible
lib/ansible/modules/network/cloudengine/ce_snmp_community.py
43
32872
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
nozuono/calibre-webserver
src/odf/xforms.py
96
1231
# -*- 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...
gpl-3.0
srsdanitest/stockacercloudmobilekernel
tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py
12527
1935
# Util.py - Python extension for perf script, miscellaneous utility code # # Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com> # # This software may be distributed under the terms of the GNU General # Public License ("GPL") version 2 as published by the Free Software # Foundation. import errno, os FUTEX_WAIT = 0...
gpl-2.0
g-k/servo
components/script/dom/bindings/codegen/parser/tests/test_typedef.py
106
1874
def WebIDLTest(parser, harness): parser.parse(""" typedef long mylong; typedef long? mynullablelong; interface Foo { const mylong X = 5; const mynullablelong Y = 7; const mynullablelong Z = null; void foo(mylong arg); }; """) results = parser.finish()...
mpl-2.0
PriceChild/ansible
lib/ansible/modules/network/nxos/nxos_ntp.py
19
13134
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
weijia/djangoautoconf
djangoautoconf/django_rest_framework_utils/serializer_generator.py
1
6042
from django.conf.urls import url, include from rest_framework import serializers from rest_framework.generics import ListCreateAPIView, RetrieveUpdateDestroyAPIView from rest_framework.serializers import ModelSerializer from rest_framework.urlpatterns import format_suffix_patterns from djangoautoconf.model_utils.mode...
bsd-3-clause
nobukatsu/deep-learning-from-scratch
common/functions.py
6
1179
# coding: utf-8 import numpy as np def identity_function(x): return x def step_function(x): return np.array(x > 0, dtype=np.int) def sigmoid(x): return 1 / (1 + np.exp(-x)) def sigmoid_grad(x): return (1.0 - sigmoid(x)) * sigmoid(x) def relu(x): return np.maximum(0, x) def relu_g...
mit
h4r5h1t/django-hauthy
django/views/i18n.py
82
11043
import gettext as gettext_module import importlib import json import os from django import http from django.apps import apps from django.conf import settings from django.template import Context, Engine from django.utils import six from django.utils._os import upath from django.utils.encoding import smart_text from dja...
bsd-3-clause
josephmfaulkner/stoqs
stoqs/loaders/CANON/loadCANON_october2010.py
1
5132
#!/usr/bin/env python __author__ = 'Mike McCann' __copyright__ = '2011' __license__ = 'GPL v3' __contact__ = 'mccann at mbari.org' __doc__ = ''' Master loader for all CANON activities in October 2010 Mike McCann MBARI 22 April 2012 @var __date__: Date of last svn commit @undocumented: __doc__ parser @status:...
gpl-3.0
franekp/millandict
ankidict/thirdparty/sqlalchemy/dialects/mssql/base.py
2
71442
# mssql/base.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 """ .. dialect:: mssql :name: Microsoft SQL Server Auto Increment Behavior -----...
mit
ivan-fedorov/intellij-community
python/lib/Lib/__future__.py
91
3906
"""Record of phased-in incompatible language changes. Each line is of the form: FeatureName = "_Feature(" OptionalRelease "," MandatoryRelease "," CompilerFlag ")" where, normally, OptionalRelease < MandatoryRelease, and both are 5-tuples of the same form as sys.version_info: (...
apache-2.0
timlinux/QGIS
tests/src/python/test_qgsdelimitedtextprovider.py
9
38800
# -*- coding: utf-8 -*- """QGIS Unit tests for QgsDelimitedTextProvider. .. 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 versi...
gpl-2.0
rhots/automation
automation/rotation.py
1
2732
from bs4 import BeautifulSoup import requests from .hero import Hero class Rotation: """Rotation is able to get the latest free hero rotation.""" FORUM_URL = "https://us.battle.net/heroes/en/forum/topic/17936383460" # TODO: omg get this outta here SECOND_SPRITESHEET_HEROES = ["Samuro", "Ragnaros", "...
isc
GustavWi/mbed
workspace_tools/toolchains/__init__.py
18
25949
""" mbed SDK Copyright (c) 2011-2013 ARM Limited 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 wr...
apache-2.0
DNESS/cocos2d-objc
tools/compatibility_with_0_8/classes_0_8.py
50
4022
classes = { "AccelAmplitude" : "", "AccelDeccelAmplitude" : "", "Action" : "", "ActionManager" : "", "Animate" : "", "Animation" : "", "AtlasAnimation" : "", "AtlasNode" : "", "AtlasSprite" : "", "AtlasSpriteFrame" : "", "AtlasSpriteManager" : "", "BezierBy" : "", "BezierTo" : "", "BitmapFontAtlas" : "", "BitmapFontCon...
mit
atollena/commons
tests/python/twitter/common/testing/test_clock.py
13
2792
# ================================================================================================== # Copyright 2015 Twitter, Inc. # -------------------------------------------------------------------------------------------------- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use thi...
apache-2.0
AreaScout/dante-doom3-odroid
neo/sys/scons/scons_utils.py
2
5123
# -*- mode: python -*- import sys, os, string, time, commands, re, pickle, StringIO, popen2, commands, pdb, zipfile, tempfile import SCons # system detection ------------------------------- # CPU type cpu = commands.getoutput('uname -m') exp = re.compile('i?86') if exp.match(cpu): cpu = 'x86' else: if (commands.get...
gpl-3.0
privacyidea/privacyidea
tools/privacyidea-sync-owncloud.py
1
8313
#!/usr/bin/env python # -*- coding: utf-8 -*- # # 2020-04-28 Cornelius Kölbel <cornelius.koelbel@netknights.it> # Read tables oc_accounts and oc_users from owncloud # from __future__ import print_function __doc__ = """You can use this script to read the tables oc_accounts and oc_users from owncloud and fil...
agpl-3.0
geekboxzone/lollipop_external_chromium_org
tools/telemetry/telemetry/core/platform/profiler/tcpdump_profiler.py
48
4160
# 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 os import signal import subprocess import sys import tempfile from telemetry.core.platform import profiler from telemetry.core.platform.profiler impo...
bsd-3-clause
hunanlike/foursquared
mock_server/playfoursquare.py
134
2253
#!/usr/bin/python2.6 # # Simple http server to emulate api.playfoursquare.com import logging import shutil import sys import urlparse import SimpleHTTPServer import BaseHTTPServer class RequestHandler(BaseHTTPServer.BaseHTTPRequestHandler): """Handle playfoursquare.com requests, for testing.""" def do_GET(self...
apache-2.0
sahildua2305/eden
controllers/xforms.py
8
14374
# -*- coding: utf-8 -*- """ XForms - Controllers """ module = request.controller # ----------------------------------------------------------------------------- def create(): """ Given a Table, returns an XForms to create an instance: http://code.javarosa.org/wiki/buildxforms http://w...
mit
WmHHooper/aima-python
submissions/Brock/mygames.py
1
13497
from collections import namedtuple from games import (Game) from queue import PriorityQueue from copy import deepcopy # class GameState: # def __init__(self, to_move, board, label=None, depth=8): # self.to_move = to_move # self.board = board # self.label = label # self.maxDepth = ...
mit
Jusedawg/SickRage
lib/guessit/rules/properties/crc.py
34
2273
#!/usr/bin/env python # -*- coding: utf-8 -*- """ crc and uuid properties """ from rebulk.remodule import re from rebulk import Rebulk from ..common.validators import seps_surround def crc(): """ Builder for rebulk object. :return: Created Rebulk object :rtype: Rebulk """ rebulk = Rebulk().re...
gpl-3.0
spvkgn/youtube-dl
youtube_dl/extractor/rutube.py
20
11470
# coding: utf-8 from __future__ import unicode_literals import re import itertools from .common import InfoExtractor from ..compat import ( compat_str, compat_parse_qs, compat_urllib_parse_urlparse, ) from ..utils import ( determine_ext, bool_or_none, int_or_none, try_get, unified_time...
unlicense