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
tiagofrepereira2012/tensorflow
tensorflow/python/ops/image_ops_impl.py
10
62547
# 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
ml-lab/pylearn2
pylearn2/models/tests/test_s3c_inference.py
4
14275
from pylearn2.models.s3c import S3C from pylearn2.models.s3c import E_Step_Scan from pylearn2.models.s3c import Grad_M_Step from pylearn2.models.s3c import E_Step from theano import function import numpy as np import theano.tensor as T from theano import config #from pylearn2.utils import serial import warnings def b...
bsd-3-clause
miloharper/neural-network-animation
matplotlib/tests/test_colors.py
9
9307
from __future__ import (absolute_import, division, print_function, unicode_literals) import six from nose.tools import assert_raises, assert_equal import numpy as np from numpy.testing.utils import assert_array_equal, assert_array_almost_equal import matplotlib.colors as mcolors import matpl...
mit
BrainDamage/Flexget
flexget/ui/plugins/schedule/schedule.py
16
3768
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime, timedelta import threading from sqlalchemy import Column, Integer, Unicode from flask import request, render_template, flash, Blueprint, redirect, url_for from flexget.ui.webui import register_plugin, db_s...
mit
NL66278/OCB
addons/knowledge/__openerp__.py
52
1788
# -*- coding: utf-8 -*- ############################################################################## # # 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...
agpl-3.0
wunderlins/learning
python/django/bin/activate_this.py
1076
1137
"""By using execfile(this_file, dict(__file__=this_file)) you will activate this virtualenv environment. This can be used when you must use an existing Python interpreter, not the virtualenv bin/python """ try: __file__ except NameError: raise AssertionError( "You must run this like execfile('path/to/...
gpl-2.0
apanju/GMIO_Odoo
addons/sale_analytic_plans/__openerp__.py
262
1634
# -*- 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
ericnewton/fluo-deploy
bin/impl/fluo_deploy/config.py
1
8132
# Copyright 2014 Fluo authors (see 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 t...
apache-2.0
MayOneUS/pledgeservice
lib/requests/packages/chardet/charsetgroupprober.py
2929
3791
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is Mozilla Communicator client 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 ...
apache-2.0
gojira/tensorflow
tensorflow/contrib/cluster_resolver/python/training/tpu_cluster_resolver_test.py
20
15535
# 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 applicable ...
apache-2.0
mmauroy/SickRage
tornado/template.py
142
31156
#!/usr/bin/env python # # Copyright 2009 Facebook # # 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 a...
gpl-3.0
111pontes/ydk-py
cisco-ios-xr/ydk/models/cisco_ios_xr/_meta/_Cisco_IOS_XR_aaa_diameter_oper.py
1
2653
import re import collections from enum import Enum from ydk._core._dm_meta_info import _MetaInfoClassMember, _MetaInfoClass, _MetaInfoEnum from ydk.types import Empty, YList, YLeafList, DELETE, Decimal64, FixedBitsDict from ydk._core._dm_meta_info import ATTRIBUTE, REFERENCE_CLASS, REFERENCE_LIST, REFERENCE_LEAFLI...
apache-2.0
Leotrinos/agpy
agpy/showspec.py
6
51670
""" showspec is my homegrown spectrum plotter, meant to somewhat follow STARLINK's SPLAT and have functionality similar to GAIA, but with an emphasis on producing publication-quality plots (which, while splat may do, it does unreproducibly) .. todo:: -add spectrum arithmetic tools (as is, you can use nump...
mit
powerlim2/project_free_insight
data_api/venv/lib/python2.7/site-packages/setuptools/command/upload.py
210
1077
import getpass from distutils.command import upload as orig class upload(orig.upload): """ Override default upload behavior to obtain password in a variety of different ways. """ def finalize_options(self): orig.upload.finalize_options(self) # Attempt to obtain password. Short cir...
bsd-3-clause
ymap/aioredis
tests/generic_commands_test.py
1
23698
import asyncio import time import math import pytest import sys from unittest import mock from aioredis import ReplyError async def add(redis, key, value): ok = await redis.connection.execute('set', key, value) assert ok == b'OK' @pytest.mark.run_loop async def test_delete(redis): await add(redis, 'my...
mit
open-iscsi/targetd
targetd/backends/zfs.py
1
16228
# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 3 of the # License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, # bu...
gpl-3.0
meabsence/python-for-android
python-modules/twisted/twisted/web/sux.py
55
21480
# -*- test-case-name: twisted.web.test.test_xml -*- # # Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ *S*mall, *U*ncomplicated *X*ML. This is a very simple implementation of XML/HTML as a network protocol. It is not at all clever. Its main features are that it does not: - s...
apache-2.0
ludwiktrammer/odoo
addons/project/tests/test_project_base.py
44
2594
# -*- coding: utf-8 -*- from openerp.addons.mail.tests.common import TestMail class TestProjectBase(TestMail): @classmethod def setUpClass(cls): super(TestProjectBase, cls).setUpClass() user_group_employee = cls.env.ref('base.group_user') user_group_project_user = cls.env.ref('proje...
agpl-3.0
romarcha/cantin_bo
python/demo_multiprocess.py
2
2382
#!/usr/bin/env python # ------------------------------------------------------------------------- # This file is part of BayesOpt, an efficient C++ library for # Bayesian optimization. # # Copyright (C) 2011-2014 Ruben Martinez-Cantin <rmcantin@unizar.es> # # BayesOpt is free software: you can redistribut...
gpl-3.0
merose/diff_drive
src/diff_drive/odometry.py
1
2663
from __future__ import division from math import pi, sin, cos from diff_drive.encoder import Encoder from diff_drive.pose import Pose class Odometry: """Keeps track of the current position and velocity of a robot using differential drive. """ def __init__(self): self.leftEncoder = Encoder() ...
bsd-3-clause
TathagataChakraborti/resource-conflicts
PLANROB-2015/py2.5/lib/python2.5/test/test_asynchat.py
19
2391
# test asynchat -- requires threading import thread # If this fails, we can't test this module import asyncore, asynchat, socket, threading, time import unittest from test import test_support HOST = "127.0.0.1" PORT = 54322 class echo_server(threading.Thread): def run(self): sock = socket.socket(socket....
mit
gauribhoite/personfinder
env/site-packages/pkg_resources/_vendor/packaging/_structures.py
906
1809
# Copyright 2014 Donald Stufft # # 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, so...
apache-2.0
adelina-t/nova
nova/tests/unit/objects/test_instance_mapping.py
60
4521
# 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 # d...
apache-2.0
abdhaleegit/avocado-misc-tests
memory/fork_mem.py
4
2846
#!/usr/bin/env python # # 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 distributed in the hope that...
gpl-2.0
jounex/hue
desktop/core/ext-py/Django-1.6.10/tests/aggregation/tests.py
59
21295
from __future__ import absolute_import import datetime from decimal import Decimal from django.db.models import Avg, Sum, Count, Max, Min from django.test import TestCase, Approximate from .models import Author, Publisher, Book, Store class BaseAggregateTestCase(TestCase): fixtures = ["aggregation.json"] ...
apache-2.0
sadven/Meisie-Kernel
tools/perf/scripts/python/event_analyzing_sample.py
4719
7393
# event_analyzing_sample.py: general event handler in python # # Current perf report is already very powerful with the annotation integrated, # and this script is not trying to be as powerful as perf report, but # providing end user/developer a flexible way to analyze the events other # than trace points. # # The 2 dat...
gpl-2.0
TheSimoms/Felleshoelet
spotifyconnector/venv/lib/python3.6/site-packages/pip/_internal/network/session.py
3
15842
"""PipSession and supporting code, containing all pip-specific network request configuration and behavior. """ # The following comment should be removed at some point in the future. # mypy: disallow-untyped-defs=False import email.utils import json import logging import mimetypes import os import platform import sys ...
gpl-2.0
donkirkby/django
tests/custom_columns/tests.py
89
4105
from __future__ import unicode_literals from django.core.exceptions import FieldError from django.test import TestCase from django.utils import six from .models import Article, Author class CustomColumnsTests(TestCase): def setUp(self): self.a1 = Author.objects.create(first_name="John", last_name="Smit...
bsd-3-clause
broferek/ansible
lib/ansible/module_utils/facts/ansible_collector.py
130
6000
# This code is part of Ansible, but is an independent component. # This particular file snippet, and this file snippet only, is BSD licensed. # Modules you write using this snippet, which is embedded dynamically by Ansible # still belong to the author of the module, and may assign their own license # to the complete wo...
gpl-3.0
40223119/cdaw11
static/Brython3.1.0-20150301-090019/Lib/site-packages/pygame/event.py
603
19086
#!/usr/bin/env python '''Pygame module for interacting with events and queues. Pygame handles all it's event messaging through an event queue. The routines in this module help you manage that event queue. The input queue is heavily dependent on the pygame display module. If the display has not been initialized and a ...
gpl-3.0
tuxfux-hlp-notes/python-batches
archieves/batch-60/modules/myenv/lib/python2.7/site-packages/setuptools/package_index.py
258
38941
"""PyPI and direct package downloading""" import sys import os import re import shutil import socket import base64 import hashlib from functools import wraps from pkg_resources import ( CHECKOUT_DIST, Distribution, BINARY_DIST, normalize_path, SOURCE_DIST, require, Environment, find_distributions, safe_name, s...
gpl-3.0
titienmiami/mmc.repository
plugin.video.tvalacarta/lib/atom/service.py
27
28345
#!/usr/bin/python # # Copyright (C) 2006, 2007, 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 app...
gpl-2.0
jonparrott/gcloud-python
error_reporting/google/cloud/errorreporting_v1beta1/proto/error_group_service_pb2_grpc.py
3
3205
# Generated by the gRPC Python protocol compiler plugin. DO NOT EDIT! import grpc from google.cloud.errorreporting_v1beta1.proto import common_pb2 as google_dot_devtools_dot_clouderrorreporting__v1beta1_dot_proto_dot_common__pb2 from google.cloud.errorreporting_v1beta1.proto import error_group_service_pb2 as google_do...
apache-2.0
newerthcom/savagerebirth
libs/python-2.72/Mac/Modules/folder/folderscan.py
34
2053
# Scan an Apple header file, generating a Python file of generator calls. import sys from bgenlocations import TOOLBOXDIR, BGENDIR sys.path.append(BGENDIR) from scantools import Scanner_OSX LONG = "Folders" SHORT = "folder" OBJECT = "NOTUSED" def main(): input = LONG + ".h" output = SHORT + "gen.py" defs...
gpl-2.0
PublicaMundi/pycsw
pycsw/log.py
1
3506
# -*- coding: iso-8859-15 -*- # ================================================================= # # Authors: Tom Kralidis <tomkralidis@gmail.com> # # Copyright (c) 2011 Tom Kralidis # # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation # files...
mit
D3f0/coreemu
daemon/core/xen/xen.py
11
31628
# # CORE # Copyright (c)2011-2012 the Boeing Company. # See the LICENSE file included in this distribution. # ''' xen.py: implementation of the XenNode and XenVEth classes that support generating Xen domUs based on an ISO image and persistent configuration area ''' from core.netns.vnet import * from core.netns.vnode ...
bsd-2-clause
hfp/tensorflow-xsmm
tensorflow/tools/test/file_name_test.py
69
1762
#!/usr/bin/python # 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 r...
apache-2.0
ageron/tensorflow
tensorflow/python/autograph/converters/error_handlers_test.py
13
1765
# 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
jamesblunt/overholt
overholt/api/__init__.py
9
1549
# -*- coding: utf-8 -*- """ overholt.api ~~~~~~~~~~~~~ overholt api application package """ from functools import wraps from flask import jsonify from flask_security import login_required from ..core import OverholtError, OverholtFormError from ..helpers import JSONEncoder from .. import factory def c...
mit
shubham0d/smc
salvus/scripts/ensure_file_exists.py
6
1378
#!/usr/bin/python ############################################################################### # # SageMathCloud: A collaborative web-based interface to Sage, IPython, LaTeX and the Terminal. # # Copyright (C) 2014, William Stein # # This program is free software: you can redistribute it and/or modify # it ...
gpl-3.0
deerwalk/voltdb
lib/python/vdm/tests/server/voltdeploy_status_test.py
2
1497
# This file is part of VoltDB. # Copyright (C) 2008-2017 VoltDB Inc. # # 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 # License, or (at your option) any later ver...
agpl-3.0
kou/zulip
zerver/management/commands/add_users_to_mailing_list.py
3
2983
import argparse from datetime import datetime from typing import Any, Optional import orjson import requests from django.conf import settings from django.core.management.base import BaseCommand, CommandError from django.utils.timezone import now as timezone_now from zerver.models import UserProfile class Command(Ba...
apache-2.0
aditisstillalive/android_kernel_lge_hammerhead_wake
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
MichaelMraka/dnf
dnf/yum/rpmsack.py
7
11476
# 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 distributed in the hope that it will be useful, # bu...
gpl-2.0
wbsavage/shinken
test/test_customs_on_service_hosgroups.py
2
2365
#!/usr/bin/env python # Copyright (C) 2009-2010: # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # # This file is part of Shinken. # # Shinken 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 F...
agpl-3.0
mbayon/TFG-MachineLearning
venv/lib/python3.6/site-packages/pkg_resources/_vendor/appdirs.py
335
22374
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2005-2010 ActiveState Software Inc. # Copyright (c) 2013 Eddy Petrișor """Utilities for determining application-specific dirs. See <http://github.com/ActiveState/appdirs> for details and usage. """ # Dev Notes: # - MSDN on where to store app data files: # ...
mit
chergert/libgit2-glib
tools/clang/enumerations.py
307
1077
#===- enumerations.py - Python Enumerations ------------------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===--------------------------------------------------------------...
lgpl-2.1
MycChiu/tensorflow
tensorflow/contrib/learn/python/learn/tests/dataframe/tensorflow_dataframe_test.py
7
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
ebukoz/thrive
erpnext/non_profit/doctype/grant_application/grant_application.py
24
1861
# -*- coding: utf-8 -*- # Copyright (c) 2017, Frappe Technologies Pvt. Ltd. and contributors # For license information, please see license.txt from __future__ import unicode_literals import frappe from frappe import _ from frappe.website.website_generator import WebsiteGenerator from frappe.contacts.address_and_contac...
gpl-3.0
pudquick/pyLoginItems
pyLoginItems.py
1
8789
# /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Headers/LSSharedFileList.h # Fun things: # kLSSharedFileListFavoriteItems # kLSSharedFileListFavoriteVolumes # kLSSharedFileListRecentApplicationItems # kLSSharedFileListRecentDocumentItems # kLSSharedFileList...
mit
Anaethelion/django-mapentity
mapentity/tests/test_attachments.py
1
5486
import mock from django.test import TestCase, RequestFactory from django.contrib.auth import get_user_model from django.contrib.contenttypes.models import ContentType from django.core.files.uploadedfile import SimpleUploadedFile from django.core.urlresolvers import reverse from paperclip.models import Attachment, Fil...
bsd-3-clause
jalr/privacyidea
privacyidea/lib/tokens/passwordtoken.py
1
4231
# -*- coding: utf-8 -*- # # privacyIDEA is a fork of LinOTP # 2014-12-05 Cornelius Kölbel <cornelius@privacyidea.org> # Migration to flask # # May 08, 2014 Cornelius Kölbel # License: AGPLv3 # contact: http://www.privacyidea.org # # Copyright (C) 2010 - 2014 LSE Leading Security Experts GmbH # Lice...
agpl-3.0
dpac-vlsi/SynchroTrace
tests/configs/memtest-ruby.py
7
3948
# Copyright (c) 2006-2007 The Regents of The University of Michigan # 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 conditions are # met: redistributions of source co...
bsd-3-clause
AlekhyaMallina-Vedams/openstack-manuals
doc/common/source/conf.py
1
4284
# 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...
apache-2.0
1986ks/chainer
chainer/functions/activation/softplus.py
19
1952
import numpy from chainer import cuda from chainer import function from chainer.utils import type_check class Softplus(function.Function): """Softplus function.""" def __init__(self, beta=1.0): self.beta = numpy.float32(beta) self.beta_inv = numpy.float32(1.0 / beta) def check_type_for...
mit
olapaola/olapaola-android-scripting
python/src/Lib/test/test_ftplib.py
56
15566
"""Test script for ftplib module.""" # Modified by Giampaolo Rodola' to test FTP class and IPv6 environment import ftplib import threading import asyncore import asynchat import socket import StringIO from unittest import TestCase from test import test_support from test.test_support import HOST # the dummy data re...
apache-2.0
cysnake4713/odoo
addons/product/wizard/__init__.py
452
1076
# -*- 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...
agpl-3.0
klarkc/devedeng
src/devedeng/vcdimager_converter.py
4
1865
#!/usr/bin/env python3 # Copyright 2014 (C) Raster Software Vigo (Sergio Costas) # # This file is part of DeVeDe-NG # # DeVeDe-NG 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 Licens...
gpl-3.0
zenmanenergy/Arduino
arduino-core/src/processing/app/i18n/python/requests/packages/charade/mbcsgroupprober.py
168
1903
######################## 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...
lgpl-2.1
vrv/tensorflow
tensorflow/contrib/slim/python/slim/nets/vgg_test.py
112
17429
# 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
Yong-Lee/decode-Django
Django-1.5.1/tests/modeltests/update/tests.py
118
4307
from __future__ import absolute_import, unicode_literals from django.test import TestCase from .models import A, B, C, D, DataPoint, RelatedPoint class SimpleTest(TestCase): def setUp(self): self.a1 = A.objects.create() self.a2 = A.objects.create() for x in range(20): B.objec...
gpl-2.0
mohamed--abdel-maksoud/chromium.src
third_party/typ/typ/fakes/tests/host_fake_test.py
84
2905
# Copyright 2014 Dirk Pranke. 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 applicable law or a...
bsd-3-clause
plotly/python-api
packages/python/plotly/plotly/validators/layout/ternary/baxis/__init__.py
3
3732
import sys if sys.version_info < (3, 7): from ._uirevision import UirevisionValidator from ._title import TitleValidator from ._tickwidth import TickwidthValidator from ._tickvalssrc import TickvalssrcValidator from ._tickvals import TickvalsValidator from ._ticktextsrc import TicktextsrcValida...
mit
tstieven/amiunique
website/venv/lib/python2.7/site-packages/pip/_vendor/lockfile/pidlockfile.py
536
6090
# -*- coding: utf-8 -*- # pidlockfile.py # # Copyright © 2008–2009 Ben Finney <ben+python@benfinney.id.au> # # This is free software: you may copy, modify, and/or distribute this work # under the terms of the Python Software Foundation License, version 2 or # later as published by the Python Software Foundation. # No ...
mit
skosukhin/spack
var/spack/repos/builtin/packages/vizglow/package.py
1
4498
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
lgpl-2.1
hoangt/tpzsimul.gem5
configs/topologies/BaseTopology.py
62
2958
# Copyright (c) 2012 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 conditions are # met: redistributions of source code must retain the above copyright # notice, this list of conditions...
bsd-3-clause
vilorious/pyload
module/lib/jinja2/_stringdefs.py
412
404256
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
gpl-3.0
j00bar/ansible
lib/ansible/inventory/group.py
32
5343
# (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
ariovistus/django-pipejam
pipejam/processors.py
1
3467
from importlib import import_module from toposort import toposort_flatten import os.path from django.conf import settings from django.utils.html import escape from django.contrib.staticfiles.templatetags.staticfiles import static from django.core.exceptions import ImproperlyConfigured from django.template.loader impo...
bsd-2-clause
drolando/SoftDev
tools/editor/scripts/tests/undotest.py
4
4095
# -*- coding: utf-8 -*- # #################################################################### # Copyright (C) 2005-2013 by the FIFE team # http://www.fifengine.net # This file is part of FIFE. # # FIFE is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public #...
lgpl-2.1
CAB-LAB/cablab-cubeio
ez_setup.py
17
11434
#!/usr/bin/env python """ Setuptools bootstrapping installer. Run this script to install or upgrade setuptools. """ import os import shutil import sys import tempfile import zipfile import optparse import subprocess import platform import textwrap import contextlib import warnings from distutils import log try: ...
gpl-3.0
kushalbhola/MyStuff
Practice/PythonApplication/env/Lib/site-packages/pandas/core/strings.py
1
105891
import codecs from functools import wraps import re import textwrap from typing import Dict, List import warnings import numpy as np import pandas._libs.lib as lib import pandas._libs.ops as libops from pandas.util._decorators import Appender, deprecate_kwarg from pandas.core.dtypes.common import ( ensure_object...
apache-2.0
maxtorete/frappe
frappe/website/website_generator.py
11
2938
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe.model.document import Document from frappe.website.utils import cleanup_page_name from frappe.website.render import clear_cache from frappe.modules impor...
mit
mzl9039/spark
python/pyspark/sql/session.py
14
25557
# # 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"); you may not us...
apache-2.0
bigdatauniversity/edx-platform
lms/djangoapps/course_api/blocks/transformers/navigation.py
24
3099
""" TODO """ from openedx.core.lib.block_cache.transformer import BlockStructureTransformer from .block_depth import BlockDepthTransformer class DescendantList(object): """ Contain """ def __init__(self): self.items = [] class BlockNavigationTransformer(BlockStructureTransformer): """ ...
agpl-3.0
jirikuncar/invenio
invenio/modules/records/recordext/functions/get_creation_date.py
15
1084
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2013 CERN. # # Invenio 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...
gpl-2.0
gholms/euca2ools
euca2ools/bundle/util.py
6
3249
# Copyright 2013-2014 Eucalyptus Systems, Inc. # # Redistribution and use of this software 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 ...
bsd-2-clause
arnedesmedt/dotfiles
.config/sublime-text-3/Packages.symlinkfollow/SublimeCodeIntel/libs/codeintel2/udl.py
7
23676
#!python # ***** BEGIN LICENSE BLOCK ***** # Version: MPL 1.1/GPL 2.0/LGPL 2.1 # # The contents of this file are subject to the Mozilla Public License # Version 1.1 (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.mozilla.org/MPL/ #...
mit
Shekharrajak/Django-facebook
docs/docs_env/Lib/encodings/utf_16.py
173
3264
""" Python 'utf-16' Codec Written by Marc-Andre Lemburg (mal@lemburg.com). (c) Copyright CNRI, All Rights Reserved. NO WARRANTY. """ import codecs, sys ### Codec APIs encode = codecs.utf_16_encode def decode(input, errors='strict'): return codecs.utf_16_decode(input, errors, True) class IncrementalEncoder(c...
bsd-3-clause
ricksladkey/generateDS
tests/out2_sup.py
2
153816
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Generated by generateDS.py. # import sys import getopt import re as re_ import base64 import datetime as datetime_ etree_ = None Verbose_import_ = False ( XMLParser_import_none, XMLParser_import_lxml, XMLParser_import_elementtree ) = range(3) XMLParser_impor...
mit
jodal/pyspotify
spotify/user.py
3
2597
from __future__ import unicode_literals import spotify from spotify import ffi, lib, serialized, utils __all__ = [ 'User', ] class User(object): """A Spotify user. You can get users from the session, or you can create a :class:`User` yourself from a Spotify URI:: >>> session = spotify.Se...
apache-2.0
abhilashnta/edx-platform
setup.py
24
2340
""" Setup script for the Open edX package. """ from setuptools import setup setup( name="Open edX", version="0.4", install_requires=["setuptools"], requires=[], # NOTE: These are not the names we should be installing. This tree should # be reorganized to be a more conventional Python tree. ...
agpl-3.0
lazywei/scikit-learn
examples/decomposition/plot_kernel_pca.py
353
2011
""" ========== Kernel PCA ========== This example shows that Kernel PCA is able to find a projection of the data that makes data linearly separable. """ print(__doc__) # Authors: Mathieu Blondel # Andreas Mueller # License: BSD 3 clause import numpy as np import matplotlib.pyplot as plt from sklearn.decomp...
bsd-3-clause
zubie7a/Algorithms
CodeSignal/Arcade/The_Core/Level_04_Loop_Tunnel/034_Count_Black_Cells.py
3
1344
# https://app.codesignal.com/arcade/code-arcade/loop-tunnel/RcK4vupi8sFhakjnh from math import floor, ceil def countBlackCells(n, m): # Theres a n * m rectangular grid, divided into two parts by a diagonal # line from the upper left to the lower right. Now lets paint the grid in # two different colors acco...
mit
qedi-r/home-assistant
homeassistant/components/prezzibenzina/sensor.py
3
3240
"""Support for the PrezziBenzina.it service.""" import datetime as dt from datetime import timedelta import logging import voluptuous as vol from homeassistant.const import ATTR_ATTRIBUTION, ATTR_TIME, CONF_NAME import homeassistant.helpers.config_validation as cv from homeassistant.helpers.config_validation import P...
apache-2.0
Appono/hey-orpheus
vendor/distribute-0.6.36/setuptools/tests/test_bdist_egg.py
70
1945
"""develop tests """ import sys import os, re, shutil, tempfile, unittest import tempfile import site from StringIO import StringIO from distutils.errors import DistutilsError from setuptools.command.bdist_egg import bdist_egg from setuptools.command import easy_install as easy_install_pkg from setuptools.dist import ...
mit
acecheese/CloudBot
plugins/google_translate.py
25
3804
import requests from cloudbot import hook max_length = 100 def goog_trans(api_key, text, source, target): url = 'https://www.googleapis.com/language/translate/v2' if len(text) > max_length: return "This command only supports input of less then 100 characters." params = { 'q': text, ...
gpl-3.0
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/webdriver/pylib/selenium/webdriver/support/event_firing_webdriver.py
23
12550
#!/usr/bin/python # # Copyright 2011 Software Freedom Conservancy. # # 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 ap...
gpl-3.0
Dwii/Master-Thesis
implementation/Palabos/palabos-master/scons/scons-local-2.1.0/SCons/Variables/BoolVariable.py
21
3070
"""engine.SCons.Variables.BoolVariable This file defines the option type for SCons implementing true/false values. Usage example: opts = Variables() opts.Add(BoolVariable('embedded', 'build for an embedded system', 0)) ... if env['embedded'] == 1: ... """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, ...
mit
DanaOshri/Open-Knesset
lobbyists/migrations/0006_auto__add_field_lobbyist_large_image_url.py
14
20731
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding field 'Lobbyist.large_image_url' db.add_column(u'lobbyists_lobby...
bsd-3-clause
magenta-aps/mox
oio_rest/tests/test_integration_create_facet.py
1
1390
# # Copyright (c) 2017-2018, Magenta ApS # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # from tests.test_integration_create_helper import TestCreateObject class T...
mpl-2.0
ron-rivest/2017-bayes-audit
from-2012-bayes-audit/bayes.py
1
21492
# bayes.py # Code for working with Bayes Post-Election Audits # Ronald L. Rivest and Emily Shen # 5/31/12 """ ---------------------------------------------------------------------- This code available under "MIT License" (open source). Copyright (C) 2012 Ronald L. Rivest and Emily Shen. Permission is hereby granted, f...
mit
zhaoxuan/baidu_restkin
restkin/api.py
1
4948
# Copyright 2012 Rackspace Hosting, 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 ...
apache-2.0
sunshine027/mic
mic/kickstart/custom_commands/desktop.py
7
3549
#!/usr/bin/python -tt # # Copyright (c) 2008, 2009, 2010 Intel, Inc. # # Yi Yang <yi.y.yang@intel.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; version 2 of the License # # This program...
gpl-2.0
qpython-android/QPypi-numpy
numpy/lib/tests/test_io.py
1
31157
import numpy as np import numpy.ma as ma from numpy.ma.testutils import * import StringIO import gzip import os from tempfile import mkstemp, NamedTemporaryFile import sys, time from datetime import datetime MAJVER, MINVER = sys.version_info[:2] def strptime(s, fmt=None): """This function is available in the d...
bsd-3-clause
UniMOOC/gcb-new-module
models/student_work.py
13
10530
# Copyright 2012 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or ...
apache-2.0
SmartElect/SmartElect
staff/admin.py
1
1127
from django.contrib.auth.models import User, Group, Permission from django.contrib.auth.admin import UserAdmin, GroupAdmin from libya_elections.admin_site import admin_site class LibyaUserAdmin(UserAdmin): list_display = ('username', 'email', 'first_name', 'last_name', 'is_active', 'is_staff', ...
apache-2.0
gylian/Sick-Beard
lib/beetsplug/embedart.py
3
6315
# This file is part of beets. # Copyright 2014, Adrian Sampson. # # 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, ...
gpl-3.0
keithlee/shakeAppPyDev
django/core/files/uploadedfile.py
402
4225
""" Classes representing uploaded files. """ import os try: from cStringIO import StringIO except ImportError: from StringIO import StringIO from django.conf import settings from django.core.files.base import File from django.core.files import temp as tempfile from django.utils.encoding import smart_str __al...
bsd-3-clause
Ldpe2G/mxnet
example/python-howto/data_iter.py
15
1824
"""Create a Cifar data iterator. This example shows how to create a iterator reading from recordio, introducing image augmentations and using a backend thread to hide IO cost. All you need to do is to set some parameters. """ import mxnet as mx dataiter = mx.io.ImageRecordIter( # Dataset Parameter # I...
apache-2.0