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
nathanielvarona/airflow
airflow/providers/google/cloud/hooks/functions.py
1
10000
# # 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...
apache-2.0
rorasa/KeeTerm
Crypto/SelfTest/Random/Fortuna/__init__.py
118
1825
# -*- coding: utf-8 -*- # # SelfTest/Random/Fortuna/__init__.py: Self-test for Fortuna modules # # Written in 2008 by Dwayne C. Litzenberger <dlitz@dlitz.net> # # =================================================================== # The contents of this file are dedicated to the public domain. To # the extent that de...
mit
argonemyth/sentry
src/sentry/migrations/0168_unfill_projectkey_user.py
34
36774
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import DataMigration from django.db import models class Migration(DataMigration): def forwards(self, orm): ProjectKey = orm['sentry.ProjectKey'] ProjectKey.objects.filter( u...
bsd-3-clause
jakubtyniecki/pact
tests/test_merge_rec.py
1
1117
""" merge rec sort tests module """ import unittest import random from sort import merge_rec from tests import helper class MergeSortTests(unittest.TestCase): """ merge rec sort unit tests class """ max = 100 arr = [] def setUp(self): """ setting up for the test """ self.arr = rand...
mit
git-cola/git-cola
cola/widgets/log.py
3
2617
from __future__ import absolute_import, division, unicode_literals import time from qtpy import QtGui from qtpy import QtWidgets from qtpy.QtCore import Qt from qtpy.QtCore import Signal from .. import core from .. import qtutils from ..i18n import N_ from . import defs from .text import VimTextEdit class LogWidget...
gpl-2.0
hassoon3/odoo
addons/l10n_us/__openerp__.py
341
1763
# -*- 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
ResByte/graph_slam
scripts/robot.py
1
1487
#!/usr/bin/env python import roslib import rospy import sys from geometry_msgs.msg import Twist import numpy as np from nav_msgs.msg import Odometry from tf.transformations import euler_from_quaternion import matplotlib.pyplot as plt from sensor_msgs.msg import PointCloud2 import sensor_msgs.point_cloud2 as pc2 imp...
gpl-2.0
erinspace/osf.io
tests/test_utils.py
1
18008
# -*- coding: utf-8 -*- import datetime import mock import os import pytest import time import unittest from django.utils import timezone from flask import Flask from nose.tools import * # noqa (PEP8 asserts) import blinker from tests.base import OsfTestCase, DbTestCase from osf_tests.factories import RegistrationFa...
apache-2.0
aerophile/django
tests/view_tests/tests/test_specials.py
66
1428
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.test import TestCase, override_settings @override_settings(ROOT_URLCONF='view_tests.generic_urls') class URLHandling(TestCase): """ Tests for URL handling in views and responses. """ redirect_target = "/%E4%B8%AD%E6%96%87/tar...
bsd-3-clause
lochiiconnectivity/boto
boto/ec2/autoscale/__init__.py
2
33259
# Copyright (c) 2009-2011 Reza Lotun http://reza.lotun.name/ # Copyright (c) 2011 Jann Kleen # 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 sof...
mit
18padx08/PPTex
PPTexEnv_x86_64/lib/python2.7/site-packages/sympy/plotting/pygletplot/plot_curve.py
25
2853
from __future__ import print_function, division from pyglet.gl import * from plot_mode_base import PlotModeBase from sympy.core import S from sympy.core.compatibility import xrange class PlotCurve(PlotModeBase): style_override = 'wireframe' def _on_calculate_verts(self): self.t_interval = self.inte...
mit
R3v1L/evogtk
evogtk/gui/accessclasslib/spinbutton.py
2
1871
# -*- coding: utf-8 -*- ############################################################################### # Copyright (C) 2008 EVO Sistemas Libres <central@evosistemas.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 F...
mit
2mny/mylar
lib/comictaggerlib/matchselectionwindow.py
1
4989
""" A PyQT4 dialog to select from automated issue matches """ """ Copyright 2012-2014 Anthony Beville 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 ...
gpl-3.0
p0psicles/SickGear
sickbeard/clients/deluge.py
3
8261
# Author: Mr_Orange <mr_orange@hotmail.it> # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickGear. # # SickGear 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 Lic...
gpl-3.0
helenst/django
django/conf/locale/zh_Hant/formats.py
634
1810
# -*- encoding: utf-8 -*- # This file is distributed under the same license as the Django package. # from __future__ import unicode_literals # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'Y年n月j日' # 2016年9月5...
bsd-3-clause
omni5cience/django-inlineformfield
.tox/py27/lib/python2.7/site-packages/IPython/core/displayhook.py
8
11365
# -*- coding: utf-8 -*- """Displayhook for IPython. This defines a callable class that IPython uses for `sys.displayhook`. Authors: * Fernando Perez * Brian Granger * Robert Kern """ #----------------------------------------------------------------------------- # Copyright (C) 2008-2011 The IPython Developmen...
mit
ntrrgc/snorky
snorky/tests/utils/rpc.py
1
2428
# 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 snorky.services.base import format_call from snorky.hashable import make_hashable class TestRequest(object): ...
mpl-2.0
mccheung/kbengine
kbe/src/lib/python/Lib/asyncio/events.py
61
18822
"""Event loop and event loop policy.""" __all__ = ['AbstractEventLoopPolicy', 'AbstractEventLoop', 'AbstractServer', 'Handle', 'TimerHandle', 'get_event_loop_policy', 'set_event_loop_policy', 'get_event_loop', 'set_event_loop', 'new_event_loop', 'get_child_watcher...
lgpl-3.0
skatsuta/aerospike-training
book/answers/Complete/Python/TweetService.py
2
9958
#!/usr/bin/env python # # * Copyright 2012-2014 by Aerospike. # * # * 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...
mit
wangli1426/heron
heron/examples/src/python/misc/test_task_hook.py
8
2350
# Copyright 2016 Twitter. 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 agree...
apache-2.0
guoxiaolongzte/spark
examples/src/main/python/avro_inputformat.py
51
3170
# # 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
dpendl00/headphones
lib/html5lib/constants.py
963
87346
from __future__ import absolute_import, division, unicode_literals import string import gettext _ = gettext.gettext EOF = None E = { "null-character": _("Null character in input stream, replaced with U+FFFD."), "invalid-codepoint": _("Invalid codepoint in stream."), "incorrectly-placed-so...
gpl-3.0
cselis86/edx-platform
lms/djangoapps/notes/api.py
165
7855
from opaque_keys.edx.locations import SlashSeparatedCourseKey from django.contrib.auth.decorators import login_required from django.http import HttpResponse, Http404 from django.core.exceptions import ValidationError from notes.models import Note from notes.utils import notes_enabled_for_course from courseware.courses...
agpl-3.0
shyamalschandra/seastar
tests/memcached/test_memcached.py
25
22367
#!/usr/bin/env python3 # # This file is open source software, licensed to you under the terms # of the Apache License, Version 2.0 (the "License"). See the NOTICE file # distributed with this work for additional information regarding copyright # ownership. You may not use this file except in compliance with the Licen...
apache-2.0
danielpalomino/gem5
src/arch/x86/isa/insts/general_purpose/control_transfer/jump.py
40
5389
# Copyright (c) 2007 The Hewlett-Packard Development Company # All rights reserved. # # The license below extends only to copyright in the software and shall # not be construed as granting a license to any other intellectual # property including but not limited to intellectual property relating # to a hardware implemen...
bsd-3-clause
gmacchi93/serverInfoParaguay
apps/venv/lib/python2.7/site-packages/django/middleware/locale.py
85
3156
"This is the locale selecting middleware that will look at accept headers" from django.conf import settings from django.core.urlresolvers import ( LocaleRegexURLResolver, get_resolver, get_script_prefix, is_valid_path, ) from django.http import HttpResponseRedirect from django.utils import translation from django....
apache-2.0
bwhmather/wmii
alternative_wmiircs/python/pyxp/client.py
9
9838
# Copyright (C) 2009 Kris Maglione import operator import os import re import sys from threading import * import traceback import pyxp from pyxp import fcall, fields from pyxp.mux import Mux from pyxp.types import * if os.environ.get('NAMESPACE', None): namespace = os.environ['NAMESPACE'] else: try: ...
mit
furkantokac/Faunus
src/utilinux.py
1
3351
#!/usr/bin/python3 # -*- coding: utf-8 -*- import subprocess, os, socket def validate_ip(addr): try: socket.inet_aton(addr) return True # legal except socket.error: return False # Not legal def get_stdout(pi): result = pi.communicate() if len(result[0])>0: return resu...
mit
zycdragonball/tensorflow
tensorflow/contrib/framework/python/framework/tensor_util.py
48
10771
# 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
kmolab/kmolab.github.io
data/Brython-3.3.4/Lib/test/test_urllib2.py
24
61773
import unittest from test import support import os import io import socket import array import sys import urllib.request # The proxy bypass method imported below has logic specific to the OSX # proxy config data structure but is testable on all platforms. from urllib.request import Request, OpenerDirector, _proxy_byp...
agpl-3.0
ywcui1990/nupic.research
projects/vehicle-control/agent/run_sm.py
6
7819
#!/usr/bin/env python # ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2015, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions ...
agpl-3.0
morelab/weblabdeusto
server/launch/sample_balanced2_concurrent_experiments/main_machine/lab_and_experiment1/experiment48/server_config.py
968
1526
#!/usr/bin/env python #-*-*- encoding: utf-8 -*-*- weblab_xilinx_experiment_xilinx_device = 'FPGA' weblab_xilinx_experiment_port_number = 1 # This should be something like this: # import os as _os # xilinx_home = _os.getenv('XILINX_HOME') # if xilinx_home == None: # if _os.name == 'nt': # xilinx_home = r'C:...
bsd-2-clause
ahujamoh/seldon-server
scripts/zookeeper/set-client-config.py
7
1898
#!/usr/bin/env python import sys, getopt, argparse from kazoo.client import KazooClient import json def loadZookeeperOptions(opts,zk): node = "/all_clients/"+opts['client']+"/offline/semvec" if zk.exists(node): data, stat = zk.get(node) jStr = data.decode("utf-8") print "Found zookeeper...
apache-2.0
mhabrnal/abrt
tests/runtests/abrt-cli-report-mantisbt/fakefaf.py
6
1502
#!/usr/bin/env python # Single purpose HTTP server # - accepts POST of ureport JSON and dumps it to a file import sys import json import BaseHTTPServer, cgi class Handler(BaseHTTPServer.BaseHTTPRequestHandler): def do_POST(self): # parse form data form = cgi.FieldStorage( fp=self.rfile...
gpl-2.0
h3biomed/ansible
lib/ansible/plugins/doc_fragments/default_callback.py
3
1911
# -*- coding: utf-8 -*- # Copyright: (c) 2017, Ansible Project # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) class ModuleDocFragment(object): DOCUMENTATION = r''' options: display_skipped_hosts: name: Show skipped hosts description: "Toggl...
gpl-3.0
pyfa-org/Pyfa
eos/saveddata/fighterAbility.py
2
5835
# =============================================================================== # Copyright (C) 2010 Diego Duclos # # This file is part of eos. # # eos 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, ...
gpl-3.0
jallohm/django
tests/template_tests/syntax_tests/test_extends.py
83
15481
from django.test import SimpleTestCase from ..utils import setup inheritance_templates = { 'inheritance01': "1{% block first %}&{% endblock %}3{% block second %}_{% endblock %}", 'inheritance02': "{% extends 'inheritance01' %}" "{% block first %}2{% endblock %}{% block second %}4{% endblo...
bsd-3-clause
adobecs5/urp2015
lib/python3.4/site-packages/setuptools/compat.py
456
2094
import sys import itertools PY3 = sys.version_info >= (3,) PY2 = not PY3 if PY2: basestring = basestring import __builtin__ as builtins import ConfigParser from StringIO import StringIO BytesIO = StringIO func_code = lambda o: o.func_code func_globals = lambda o: o.func_globals im_func...
apache-2.0
pgleeson/TestArea
lib/jython/Lib/test/test_cl.py
31
3929
#! /usr/bin/env python """Whimpy test script for the cl module Roger E. Masse """ import cl from test.test_support import verbose clattrs = ['ADDED_ALGORITHM_ERROR', 'ALAW', 'ALGORITHM_ID', 'ALGORITHM_VERSION', 'AUDIO', 'AWARE_ERROR', 'AWARE_MPEG_AUDIO', 'AWARE_MULTIRATE', 'AWCMP_CONST_QUAL', 'AWCMP_FIXED_RATE', 'A...
gpl-2.0
vrenaville/ngo-addons-backport
openerp/addons/base/ir/ir_exports.py
72
1721
# -*- 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...
agpl-3.0
josyb/myhdl
cosimulation/test/test_bin2gray.py
4
2691
import unittest from unittest import TestCase from myhdl import Simulation, Signal, delay, intbv, bin from bin2gray import bin2gray MAX_WIDTH = 10 def nextLn(Ln): """ Return Gray code Ln+1, given Ln. """ Ln0 = ['0' + codeword for codeword in Ln] Ln1 = ['1' + codeword for codeword in Ln] Ln1.reverse(...
lgpl-2.1
openstack/futurist
releasenotes/source/conf.py
1
8555
# -*- coding: utf-8 -*- # 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...
apache-2.0
anchore/anchore-engine
tests/integration/services/policy_engine/engine/policy/gates/test_vulnerabilities.py
1
5979
import pytest from anchore_engine.services.policy_engine.engine.policy.gates.vulnerabilities import ( VulnerabilitiesGate, UnsupportedDistroTrigger, FeedOutOfDateTrigger, VulnerabilityMatchTrigger, ) from anchore_engine.db import Image, get_thread_scoped_session from tests.integration.services.policy_e...
apache-2.0
codilime/cloudify-agent
cloudify_agent/api/pm/nssm.py
1
7393
######### # Copyright (c) 2015 GigaSpaces Technologies Ltd. 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...
apache-2.0
ghickman/django
tests/admin_widgets/tests.py
2
58590
# -*- coding: utf-8 -*- from __future__ import unicode_literals import gettext import os from datetime import datetime, timedelta from importlib import import_module from unittest import skipIf from django import forms from django.conf import settings from django.contrib import admin from django.contrib.admin import ...
bsd-3-clause
mediatum/mediatum
metadata/list.py
1
7868
""" mediatum - a multimedia content repository Copyright (C) 2007 Arne Seifert <seiferta@in.tum.de> Copyright (C) 2007 Matthias Kramm <kramm@in.tum.de> Copyright (C) 2012 Iryna Feuerstein <feuersti@in.tum.de> This program is free software: you can redistribute it and/or modify it under the terms of the GNU Gene...
gpl-3.0
varunkumta/azure-linux-extensions
CustomScript/azure/servicemanagement/websitemanagementservice.py
46
10015
#------------------------------------------------------------------------- # Copyright (c) Microsoft. 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.apac...
apache-2.0
codekaki/odoo
addons/hr_timesheet/hr_timesheet.py
39
9938
# -*- 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
matbu/ansible-modules-extras
cloud/centurylink/clc_modify_server.py
48
35314
#!/usr/bin/python # # Copyright (c) 2015 CenturyLink # # 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 la...
gpl-3.0
OndrejIT/pyload
module/gui/ConnectionManager.py
41
11002
# -*- coding: utf-8 -*- """ 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 ...
gpl-3.0
nakagami/reportlab
src/tools/utils/dumpttf.py
10
1887
__all__=('dumpttf',) def dumpttf(fn,fontName=None, verbose=0): '''dump out known glyphs from a ttf file''' import os if not os.path.isfile(fn): raise IOError('No such file "%s"' % fn) from reportlab.pdfbase.pdfmetrics import registerFont, stringWidth from reportlab.pdfbase.ttfonts import TTF...
bsd-3-clause
vrenaville/OCB
addons/gamification/models/res_users.py
386
4010
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2013 OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms of the ...
agpl-3.0
ampax/edx-platform-backup
lms/djangoapps/courseware/tests/test_courses.py
12
9342
# -*- coding: utf-8 -*- """ Tests for course access """ from django.conf import settings from django.test.utils import override_settings import mock from opaque_keys.edx.locations import SlashSeparatedCourseKey from courseware.courses import ( get_course_by_id, get_cms_course_link, course_image_url, get_course...
agpl-3.0
hickerson/bbn
fable/fable_sources/libtbx/utils.py
1
43577
from __future__ import division from libtbx.queuing_system_utils import sge_utils, pbs_utils from libtbx.str_utils import show_string try: import gzip except ImportError: gzip = None try: import bz2 except ImportError: bz2 = None try: import hashlib hashlib_md5 = hashlib.md5 except ImportError: import md5 hashl...
mit
ptphp/PyLib
src/tornado/demos/Vulpix-master/handlers.py
2
1560
# -*- coding: utf-8 -*- # AUTHOR: Zeray Rice <fanzeyi1994@gmail.com> # FILE: handlers.py # CREATED: 01:41:06 08/03/2012 # MODIFIED: 20:28:26 18/04/2012 # DESCRIPTION: URL Route from api import * from home import * from lang import * from forum import * from member import * from problem import * from contest import * ...
apache-2.0
nhomar/odoo-mirror
addons/auth_ldap/__openerp__.py
50
1567
############################################################################## # # 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
mitsuhiko/sqlalchemy
lib/sqlalchemy/ext/declarative/clsregistry.py
6
9816
# ext/declarative/clsregistry.py # Copyright (C) 2005-2013 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 """Routines to handle the string class registry used by declarative. Th...
mit
CeltonMcGrath/TACTIC
3rd_party/CherryPy/cherrypy/test/test_mime.py
6
3459
"""Tests for various MIME issues, including the safe_multipart Tool.""" from cherrypy.test import test test.prefer_parent_path() import cherrypy def setup_server(): class Root: def multipart(self, parts): return repr(parts) multipart.exposed = True def ...
epl-1.0
asurve/incubator-systemml
src/main/python/systemml/random/sampling.py
13
5293
#------------------------------------------------------------- # # 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...
apache-2.0
zigitax/pupy
pupy/modules/screenshot.py
27
3951
# -*- coding: UTF8 -*- # -------------------------------------------------------------- # Copyright (c) 2015, Nicolas VERDIER (contact@n1nj4.eu) # All rights reserved. # # Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: # ...
bsd-3-clause
PaddlePaddle/Paddle
python/paddle/fluid/tests/unittests/mkldnn/test_quantize_mkldnn_op.py
2
6353
# Copyright (c) 2018 PaddlePaddle 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 app...
apache-2.0
seler/gipsy
gipsy/dashboard/presets/google_analytics.py
4
1666
from gipsy.dashboard.dashboard import Dashboard from gipsy.dashboard.widgets import widgets, widgets_google_analytics class DashboardDefault(Dashboard): """ Defaut and exemple class for dashboards using google analytics specific widgets. This class simply uses a render method where widgets are added. The ...
bsd-3-clause
girishramnani/hacking-tools
pyhashcat/sre_yield/tests/test_cachingseq.py
3
2039
#!/usr/bin/env python2 # # Copyright 2011-2014 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 applicabl...
mit
earshel/PokeyPySnipe
POGOProtos/Networking/Requests/Messages/EncounterMessage_pb2.py
16
3623
# Generated by the protocol buffer compiler. DO NOT EDIT! # source: POGOProtos/Networking/Requests/Messages/EncounterMessage.proto import sys _b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message...
mit
google-code/android-scripting
python/src/Demo/sockets/telnet.py
47
3010
#! /usr/bin/env python # Minimal interface to the Internet telnet protocol. # # It refuses all telnet options and does not recognize any of the other # telnet commands, but can still be used to connect in line-by-line mode. # It's also useful to play with a number of other services, # like time, finger, smtp and even ...
apache-2.0
viralpandey/kivy
kivy/geometry.py
47
3795
''' Geometry utilities ================== This module contains some helper functions for geometric calculations. ''' __all__ = ('circumcircle', 'minimum_bounding_circle') from kivy.vector import Vector def circumcircle(a, b, c): ''' Computes the circumcircle of a triangle defined by a, b, c. See: http:...
mit
teodoc/home-assistant
homeassistant/components/device_tracker/luci.py
10
5820
""" homeassistant.components.device_tracker.luci ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Device tracker platform that supports scanning a OpenWRT router for device presence. It's required that the luci RPC package is installed on the OpenWRT router: # opkg install luci-mod-rpc Configuration: To use the Luci t...
mit
zmlabe/IceVarFigs
Scripts/SeaSurfaceTemperatures/plot_ersst5.py
1
5197
""" Plot selected years of monthly ERSSTv5 global data Website : https://www1.ncdc.noaa.gov/pub/data/cmb/ersst/v5/netcdf/ Author : Zachary M. Labe Date : 22 July 2017 """ from netCDF4 import Dataset import matplotlib.pyplot as plt from mpl_toolkits.basemap import Basemap, addcyclic, shiftgrid import numpy a...
mit
Chiru/NVE_Simulation
NS3/waf-tools/misc.py
69
11666
#!/usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2006-2010 (ita) """ This tool is totally deprecated Try using: .pc.in files for .pc files the feature intltool_in - see demos/intltool make-like rules """ import shutil, re, os from waflib import TaskGen, Node, Task, Utils, Build, Errors from waflib.TaskGen i...
bsd-3-clause
CompassionCH/compassion-modules
gift_compassion/wizards/collect_gifts_wizard.py
4
1439
# -*- coding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __manifest__.p...
agpl-3.0
CydarLtd/ansible
lib/ansible/modules/system/modprobe.py
69
3813
#!/usr/bin/python #coding: utf-8 -*- # (c) 2013, David Stygstra <david.stygstra@gmail.com> # # This file is part of Ansible # # This module 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 ...
gpl-3.0
CyrilPeponnet/Archipel
ArchipelAgent/archipel-agent-action-scheduler/archipelagentactionscheduler/__init__.py
5
2236
# -*- coding: utf-8 -*- # # __init__.py # # Copyright (C) 2010 Antoine Mercadal <antoine.mercadal@inframonde.eu> # Copyright, 2011 - Franck Villaume <franck.villaume@trivialdev.com> # This file is part of ArchipelProject # http://archipelproject.org # # This program is free software: you can redistribute it and/or modi...
agpl-3.0
yglazko/bedrock
bedrock/facebookapps/utils.py
21
3549
# 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/. import json import urllib from base64 import urlsafe_b64decode from django.conf import settings from django.utils.trans...
mpl-2.0
kaneod/physics
python/castep_special_atom.py
2
11802
#!/usr/bin/env python ################################################################################ # # castep_special_atom.py # # Version 2.0 # # Usage castep_special_atom.py SEED Z n # # Takes a .cell file SEED.cell, reads it in, changes the "nth" atom of type Z # to Zspec, writes the file to SEED_special.cell wit...
gpl-3.0
ThirdProject/android_external_chromium_org
chrome/test/functional/ap_lab/dlink_ap_configurator.py
76
12111
# 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. import logging import os import ap_configurator import selenium.common.exceptions class DLinkAPConfigurator(ap_configurator.APConfigurator): """Deri...
bsd-3-clause
RachitKansal/scikit-learn
examples/feature_selection/plot_rfe_with_cross_validation.py
226
1384
""" =================================================== Recursive feature elimination with cross-validation =================================================== A recursive feature elimination example with automatic tuning of the number of features selected with cross-validation. """ print(__doc__) import matplotlib.p...
bsd-3-clause
ambujone/breath-hackathon
gae/lib/PIL/ImageChops.py
40
7411
# # The Python Imaging Library. # $Id$ # # standard channel operations # # History: # 1996-03-24 fl Created # 1996-08-13 fl Added logical operations (for "1" images) # 2000-10-12 fl Added offset method (from Image.py) # # Copyright (c) 1997-2000 by Secret Labs AB # Copyright (c) 1996-2000 by Fredrik Lundh # # See...
mit
rcbau/hacks
gerrit/utility.py
1
1291
#!/usr/bin/python import decimal import types import unicodedata import urllib def DisplayFriendlySize(bytes): """DisplayFriendlySize -- turn a number of bytes into a nice string""" t = type(bytes) if t != types.LongType and t != types.IntType and t != decimal.Decimal: return 'NotANumber(%s=%s)' %(t, byte...
apache-2.0
digitalLumberjack/recalbox-configgen
runtest/case.py
2
2950
''' Created on Mar 6, 2016 @author: Laurent Marchelli ''' import os import sys import shutil import unittest from . import dir_res, dir_tmp class TestCase(unittest.TestCase): args_dict = {} @classmethod def setUpClass(cls, system, emulator): # Define test system configuration path cls.pa...
mit
lombritz/odoo
addons/product_margin/__init__.py
444
1092
# -*- 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
gitromand/phantomjs
src/qt/qtwebkit/Tools/Scripts/webkitpy/common/system/crashlogs.py
117
5490
# Copyright (c) 2011, Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the...
bsd-3-clause
tawsifkhan/scikit-learn
sklearn/linear_model/omp.py
127
30417
"""Orthogonal matching pursuit algorithms """ # Author: Vlad Niculae # # License: BSD 3 clause import warnings from distutils.version import LooseVersion import numpy as np from scipy import linalg from scipy.linalg.lapack import get_lapack_funcs from .base import LinearModel, _pre_fit from ..base import RegressorM...
bsd-3-clause
davidobrien1985/ansible-modules-core
cloud/amazon/ec2_vpc.py
6
29668
#!/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 distributed...
gpl-3.0
vicky2135/lucious
lib/python2.7/encodings/euc_kr.py
816
1027
# # euc_kr.py: Python Unicode Codec for EUC_KR # # Written by Hye-Shik Chang <perky@FreeBSD.org> # import _codecs_kr, codecs import _multibytecodec as mbc codec = _codecs_kr.getcodec('euc_kr') class Codec(codecs.Codec): encode = codec.encode decode = codec.decode class IncrementalEncoder(mbc.MultibyteIncrem...
bsd-3-clause
whitepacket/Stinger-Tor
stinger.py
1
6382
#!/usr/bin/env python #Stinger-Tor #Function names are written in the order metasploit launches attacks: RECON - EXPLOIT - PAYLOAD - LOOT for entertainment purposes. #Requires Socksipy (socks.py) in the current directory. Download it from here: https://raw.githubusercontent.com/mikedougherty/SocksiPy/master/socks.py #I...
mpl-2.0
DrDub/pilas
pilas/actores/temporizador.py
5
2558
# -*- encoding: utf-8 -*- # For Pilas engine - A video game framework. # # Copyright 2010 - Pablo Garrido # License: LGPLv3 (see http://www.gnu.org/licenses/lgpl.html) # # Website - http://www.pilas-engine.com.ar # import pilas from pilas.actores import Texto from pilas import colores class Temporizador(Texto): "...
lgpl-3.0
dandycheung/androguard
androguard/decompiler/dad/graph.py
34
17082
# This file is part of Androguard. # # Copyright (c) 2012 Geoffroy Gueguen <geoffroy.gueguen@gmail.com> # 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://...
apache-2.0
sambitgaan/nupic
tests/swarming/nupic/swarming/experiments/oneField/description.py
32
14387
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
agpl-3.0
ABaldwinHunter/django-clone-classic
tests/template_tests/test_custom.py
116
19622
from __future__ import unicode_literals import os from unittest import skipUnless from django.template import Context, Engine, TemplateSyntaxError from django.template.base import Node from django.template.library import InvalidTemplateLibrary from django.test import SimpleTestCase from django.test.utils import exten...
bsd-3-clause
lokirius/python-for-android
python3-alpha/python3-src/Lib/ctypes/test/test_find.py
65
2470
import unittest import sys from ctypes import * from ctypes.util import find_library from ctypes.test import is_resource_enabled if sys.platform == "win32": lib_gl = find_library("OpenGL32") lib_glu = find_library("Glu32") lib_gle = None elif sys.platform == "darwin": lib_gl = lib_glu = find_library("O...
apache-2.0
yannrouillard/weboob
modules/prixcarburants/test.py
5
1088
# -*- coding: utf-8 -*- # Copyright(C) 2012 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your opti...
agpl-3.0
CyanogenMod/android_external_chromium_org
tools/perf/benchmarks/session_restore.py
8
2414
# 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 tempfile from measurements import session_restore from measurements import session_restore_with_url import page_sets from profile_creators ...
bsd-3-clause
daenamkim/ansible
lib/ansible/modules/network/aruba/aruba_command.py
17
6873
#!/usr/bin/python # # Copyright: Ansible Team # 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
fujicoin/electrum-fjc
electrum/plugins/coldcard/coldcard.py
2
26391
# # Coldcard Electrum plugin main code. # # from struct import pack, unpack import os, sys, time, io import traceback from electrum.bip32 import BIP32Node, InvalidMasterKeyVersionBytes from electrum.i18n import _ from electrum.plugin import Device from electrum.keystore import Hardware_KeyStore, xpubkey_to_pubkey, Xpu...
mit
ah744/ScaffCC_RKQC
clang/bindings/python/tests/cindex/test_type.py
5
7493
from clang.cindex import CursorKind from clang.cindex import TypeKind from nose.tools import raises from .util import get_cursor from .util import get_tu kInput = """\ typedef int I; struct teststruct { int a; I b; long c; unsigned long d; signed long e; const int f; int *g; int ***h; }; """ def te...
bsd-2-clause
a-doumoulakis/tensorflow
tensorflow/python/ops/sparse_grad.py
61
10799
# 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
chipsecintel/chipsec
source/tool/chipsec/hal/ec.py
3
6172
#!/usr/local/bin/python #CHIPSEC: Platform Security Assessment Framework #Copyright (c) 2010-2016, Intel Corporation # #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. # #This program is...
gpl-2.0
pwhelan/djshouts
django/contrib/auth/tests/forms.py
97
9436
from django.contrib.auth.models import User from django.contrib.auth.forms import UserCreationForm, AuthenticationForm, PasswordChangeForm, SetPasswordForm, UserChangeForm, PasswordResetForm from django.db import connection from django.test import TestCase from django.utils import unittest class UserCreationFormTest...
bsd-3-clause
ConeyLiu/spark
python/pyspark/storagelevel.py
32
2640
# # 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
angelapper/edx-platform
lms/djangoapps/shoppingcart/pdf.py
22
18645
""" Template for PDF Receipt/Invoice Generation """ import logging from django.conf import settings from django.utils.translation import ugettext as _ from PIL import Image from reportlab.lib import colors from reportlab.lib.pagesizes import letter from reportlab.lib.styles import getSampleStyleSheet from reportlab.li...
agpl-3.0