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
Jorge-Rodriguez/ansible
test/units/modules/network/nos/test_nos_facts.py
30
2127
# # (c) 2018 Extreme Networks Inc. # # 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. # # Ans...
gpl-3.0
nisse3000/pymatgen
pymatgen/analysis/tests/test_transition_state.py
4
3285
# coding: utf-8 # Copyright (c) Pymatgen Development Team. # Distributed under the terms of the MIT License. from __future__ import division, unicode_literals import os import unittest import warnings from pymatgen.util.testing import PymatgenTest from pymatgen.analysis.transition_state import NEBAnalysis import json...
mit
osmanbaskaya/formality-classifier-cnn
build_model.py
2
1627
import sys import data import codecs import cPickle import os from model import create_logistic_model, create_regression_model, train_model fn = sys.argv[1] model_output_dir = sys.argv[2] problem_type = sys.argv[3] use_pretrained_embeddings = True if sys.argv[4].lower() == 'true' else False print >> sys.stderr, fn, ...
mit
a1d3s/linux-bpi
tools/perf/scripts/python/netdev-times.py
1544
15191
# Display a process of packets and processed time. # It helps us to investigate networking or network device. # # options # tx: show only tx chart # rx: show only rx chart # dev=: show only thing related to specified device # debug: work with debug mode. It shows buffer status. import os import sys sys.path.append(os...
gpl-2.0
sadanandb/pmt
src/context/client/create_set_asset.py
6
2651
########################################################### # # Copyright (c) 2005, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
epl-1.0
chirilo/phantomjs
src/qt/qtwebkit/Source/ThirdParty/gtest/scripts/gen_gtest_pred_impl.py
294
21993
#!/usr/bin/env python # # Copyright 2006, 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...
bsd-3-clause
Tesla-Redux/android_external_skia
tools/skpdiff/generate_pmetric_tables.py
179
4156
#!/usr/bin/python # -*- coding: utf-8 -*- from __future__ import print_function from math import * COPYRIGHT = '''/* * Copyright 2013 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */''' HELP = '// To regenerate SkPMetricUtil_generated.h, si...
bsd-3-clause
vmindru/ansible
lib/ansible/modules/cloud/vmware/vmware_host_package_facts.py
47
4254
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # 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...
gpl-3.0
remoteur/ospurge
ospurge/ospurge.py
2
34513
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # This software is released under the MIT License. # # Copyright (c) 2014 Cloudwatt # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without...
mit
samklr/mesos-cli
tests/integration/test_completion.py
2
2442
# 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 u...
apache-2.0
mnahm5/django-estore
Lib/site-packages/awscli/customizations/configure/configure.py
1
5970
# Copyright 2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file acc...
mit
mihirskulkarni/Marathi_entropy
vishwakosh_book.py
1
2497
"""This file downloads a particular volume of Marathi Vishwakosh (https://marathivishwakosh.maharashtra.gov.in/) and saves the pages spread across twenty files using a modulo of 20 to the number of Vishkosh page entry. Run using 'python vishwkosh_book.py volume' from terminal where volume is the Volume of Vishwakosh y...
mit
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/_gtk/Button.py
1
10341
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject from Bin import Bin from Activatable import Activatable class But...
gpl-2.0
nerith/servo
tests/wpt/web-platform-tests/tools/pywebsocket/src/test/test_dispatch.py
488
13127
#!/usr/bin/env python # # Copyright 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...
mpl-2.0
googleapis/oauth2client
tests/contrib/test_sqlalchemy.py
21
4827
# 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 required by applicable law or ...
apache-2.0
notmatthancock/notmatthancock.github.io
code/py/region_growing/test_rg_c_nbhds.py
1
1325
import numpy as np import time import region_growing_python as rgp import region_growing as rgc from mayavi import mlab nx = 61; ny = 51; nz = 71; tx = np.linspace(-3,3,nx) ty = np.linspace(-3,3,ny) tz = np.linspace(-3,3,nz) x,y,z = np.meshgrid(tx,ty,tz) w = x**4 - 5*x**2 + y**4 - 5*y**2 + z**4 - 5*z**2 vol = -np....
mit
wpoely86/vsc-base
lib/vsc/utils/docs.py
2
2359
# # # Copyright 2015-2015 Ghent University # # This file is part of vsc-base, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en), # the Hercules foundation (htt...
lgpl-2.1
lingcheng99/Algorithm
UnorderedList.py
1
2979
""" Implement Unordered List, or linked list, in python. The building block is the class Node. Refer to http://interactivepython.org/runestone/static/pythonds/BasicDS/ImplementinganUnorderedListLinkedLists.html With added functions append(),index(),insert(),pop() """ class Node: def __init__(self,initdata): ...
mit
gangadhar-kadam/lgnlvefrape
frappe/core/report/permitted_documents_for_user/permitted_documents_for_user.py
32
1678
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe from frappe import _, throw import frappe.utils.user from frappe.permissions import check_admin_or_system_manager from frappe.model.db_schema import type_map def...
mit
orgito/ansible
lib/ansible/module_utils/common/dict_transformations.py
27
5003
# -*- coding: utf-8 -*- # Copyright: (c) 2018, 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 import re from copy import deepcopy def camel_dict_to_snake_dict(camel_d...
gpl-3.0
lastweek/gem5
tests/configs/rubytest-ruby.py
10
4114
# Copyright (c) 2006-2007 The Regents of The University of Michigan # Copyright (c) 2009 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
JasonDean-1/Script-Python-WebServer
www/transwarp/db.py
16
13973
#!/usr/bin/env python # -*- coding: utf-8 -*- __author__ = 'Michael Liao' ''' Database operation module. ''' import time, uuid, functools, threading, logging # Dict object: class Dict(dict): ''' Simple dict but support access as x.y style. >>> d1 = Dict() >>> d1['x'] = 100 >>> d1.x 100 ...
gpl-2.0
CopeX/odoo
addons/point_of_sale/account_bank_statement.py
313
2159
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2008 PC Solutions (<http://pcsol.be>). All Rights Reserved # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free...
agpl-3.0
avneesh91/django
tests/admin_docs/models.py
244
1941
""" Models for testing various aspects of the djang.contrib.admindocs app """ from django.db import models class Company(models.Model): name = models.CharField(max_length=200) class Group(models.Model): name = models.CharField(max_length=200) class Family(models.Model): last_name = models.CharField(m...
bsd-3-clause
JioCloud/nova
nova/tests/unit/virt/libvirt/test_dmcrypt.py
47
2461
# Copyright (c) 2014 The Johns Hopkins University/Applied Physics Laboratory # 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/l...
apache-2.0
nicklhy/mxnet
python/mxnet/registry.py
28
4653
# 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 u...
apache-2.0
lrowe/experimental.cssselect
src/experimental/cssselect.py
1
32885
# Copyright (c) 2004 Ian Bicking. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the fo...
bsd-3-clause
comradealain/project_SM
simulation.py
1
2956
import random def generateTBA(rda): if rda == 0: return 4 elif rda >= 1 and rda <= 25: return 1 elif rda >= 26 and rda <= 65: return 2 elif rda >= 66 and rda <= 85: return 3 else: return 4 def ward_1_service_time(rds): if rds == 0: return 6 elif rds >= 1 and rds <= 20: return 4 e...
apache-2.0
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/addons/add_mesh_extra_objects/add_mesh_polysphere.py
1
3014
# ##### BEGIN GPL LICENSE BLOCK ##### # # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distrib...
gpl-3.0
OptiPop/external_chromium_org
tools/deep_memory_profiler/accumulate.py
100
9536
#!/usr/bin/env python # 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. # A script to accumulate values from the 'dmprof cat' command into CSV or else. # # Usage: # ./accumulate.py -f <format> -t <template...
bsd-3-clause
jumpstarter-io/glance
glance/api/v2/model/metadef_tag.py
20
1139
# Copyright (c) 2014 Hewlett-Packard Development Company, L.P. # # 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
ocadotechnology/boto
boto/s3/cors.py
240
8941
# Copyright (c) 2012 Mitch Garnaat http://garnaat.org/ # Copyright (c) 2012 Amazon.com, Inc. or its affiliates. All Rights Reserved # # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without ...
mit
shub0/algorithm-data-structure
python/find_all_anagrams_in_a_string.py
1
1819
''' Given a string s and a non-empty string p, find all the start indices of p's anagrams in s. Strings consists of lowercase English letters only and the length of both strings s and p will not be larger than 20,100. The order of output does not matter. Example 1: Input: s: "cbaebabacd" p: "abc" Output: [0, 6] E...
bsd-3-clause
mrb/letsencrypt
letsencrypt/plugins/null.py
17
1439
"""Null plugin.""" import logging import zope.component import zope.interface from letsencrypt import interfaces from letsencrypt.plugins import common logger = logging.getLogger(__name__) class Installer(common.Plugin): """Null installer.""" zope.interface.implements(interfaces.IInstaller) zope.inter...
apache-2.0
jondo/shogun
examples/undocumented/python_modular/regression_chaidtree_modular.py
21
1195
#!/usr/bin/env python from numpy import array, dtype, int32 # set input attribute as continuous i.e. 2 feattypes = array([2],dtype=int32) parameter_list = [[500,50,15,0.2,feattypes]] def regression_chaidtree_modular(num_train=500,num_test=50,x_range=15,noise_var=0.2,ft=feattypes): try: from modshogun import RealF...
gpl-3.0
getvasanth/QtSpeech
festival/speech_tools/wrappers/python/EST_Wave.py
2
7329
# This file was automatically generated by SWIG (http://www.swig.org). # Version 1.3.40 # # Do not make changes to this file unless you know what you are doing--modify # the SWIG interface file instead. # This file is compatible with both classic and new-style classes. from sys import version_info if version_info >= (...
lgpl-3.0
kiyukuta/chainer
chainer/datasets/dict_dataset.py
7
1331
import six class DictDataset(object): """Dataset of a dictionary of datasets. It combines multiple datasets into one dataset. Each example is represented by a dictionary mapping a key to an example of the corresponding dataset. Args: datasets: Underlying datasets. The keys are used as the k...
mit
Vvucinic/Wander
venv_2_7/lib/python2.7/site-packages/pip/_vendor/lockfile/__init__.py
475
9162
""" lockfile.py - Platform-independent advisory file locks. Requires Python 2.5 unless you apply 2.4.diff Locking is done on a per-thread basis instead of a per-process basis. Usage: >>> lock = LockFile('somefile') >>> try: ... lock.acquire() ... except AlreadyLocked: ... print 'somefile', 'is locked already...
artistic-2.0
redhat-openstack/django
django/conf/locale/sl/formats.py
200
2120
# -*- 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 = 'd. F Y' TIME_FORMAT = 'H:i:s' DAT...
bsd-3-clause
jaredks/euler
011/011.py
1
2013
from operator import mul grid = ''' 08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 08 49 49 99 40 17 81 18 57 60 87 17 40 98 43 69 48 04 56 62 00 81 49 31 73 55 79 14 29 93 71 40 67 53 88 30 03 49 13 36 65 52 70 95 23 04 60 11 42 69 24 68 56 01 32 56 71 37 02 36 91 22 31 16 71 51 67 63 89 41 92 36 54 22 40 4...
bsd-3-clause
batxes/4c2vhic
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models26485.py
4
17581
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
gpl-3.0
vladnicoara/SDLive-Blog
documentor/libraries/Sphinx-1.1.3-py3.2/sphinx/util/texescape.py
2
2680
# -*- coding: utf-8 -*- """ sphinx.util.texescape ~~~~~~~~~~~~~~~~~~~~~ TeX escaping helper. :copyright: Copyright 2007-2011 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ tex_replacements = [ # map TeX special chars ('$', r'\$'), ('%', r'\%'), ('&', ...
agpl-3.0
XiaosongWei/chromium-crosswalk
content/browser/devtools/protocol/devtools_protocol_handler_generator.py
6
25134
#!/usr/bin/env python # Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import sys import string import json blink_protocol_path = sys.argv[1] browser_protocol_path = sys.argv[2] output_cc_path = sys.argv[3...
bsd-3-clause
scottdangelo/RemoveVolumeMangerLocks
cinder/api/views/types.py
28
1450
# Copyright 2012 Red Hat, 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...
apache-2.0
kenorb-contrib/BitTorrent
twisted/internet/gtk2reactor.py
2
9930
# Copyright (c) 2001-2004 Twisted Matrix Laboratories. # See LICENSE for details. """ This module provides support for Twisted to interact with the glib/gtk2 mainloop. In order to use this support, simply do the following:: | from twisted.internet import gtk2reactor | gtk2reactor.install() Then use twist...
gpl-3.0
espressopp/espressopp
src/analysis/Energy.py
1
3336
# Copyright (C) 2012,2013,2016 # Max Planck Institute for Polymer Research # Copyright (C) 2008,2009,2010,2011 # Max-Planck-Institute for Polymer Research & Fraunhofer SCAI # # This file is part of ESPResSo++. # # ESPResSo++ is free software: you can redistribute it and/or modify # it under the terms of ...
gpl-3.0
kidaa30/spacewalk
client/rhel/rhnlib/rhn/rpclib.py
3
23949
# # This module contains all the RPC-related functions the RHN code uses # # Copyright (c) 2005--2015 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTAB...
gpl-2.0
RyanChinSang/ECNG3020-ORSS4SCVI
BETA/TestCode/OpenCV/APP-HaarCasObjDet.py
1
1432
import cv2 import winsound face_cascade = cv2.CascadeClassifier('haarcascade_frontalface_default.xml') eye_cascade = cv2.CascadeClassifier('haarcascade_eye.xml') cap = cv2.VideoCapture(0) while 1: ret, img = cap.read() gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) faces = face_cascade.detectMultiScale(gra...
gpl-3.0
wangxiangyu/horizon
horizon/test/tests/middleware.py
61
2400
# Copyright 2012 OpenStack Foundation # 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 requ...
apache-2.0
bulislaw/mbed-os
tools/test/targets/target_test.py
17
1446
#!/usr/bin/env python """ mbed Copyright (c) 2017-2017 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 applicab...
apache-2.0
thenewguy/wagtail
wagtail/wagtailsearch/views/queries.py
6
1771
from django.shortcuts import render from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger from django.contrib.auth.decorators import permission_required from wagtail.wagtailadmin.modal_workflow import render_modal_workflow from wagtail.wagtailadmin.forms import SearchForm from wagtail.wagtailsearch...
bsd-3-clause
ludmilamarian/invenio
invenio/utils/memoise.py
18
1488
# -*- 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
instantchow/home-assistant
tests/components/sensor/test_template.py
2
3987
"""The test for the Template sensor platform.""" import homeassistant.components.sensor as sensor from tests.common import get_test_home_assistant class TestTemplateSensor: """Test the Template sensor.""" def setup_method(self, method): """Setup things to be run when tests are started.""" se...
mit
JWarmenhoven/seaborn
seaborn/external/six.py
1
22856
"""Utilities for writing code that runs on Python 2 and 3""" # Copyright (c) 2010-2014 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...
bsd-3-clause
mrunge/horizon
openstack_dashboard/dashboards/project/access_and_security/tabs.py
7
5158
# Copyright 2012 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2012 Nebula, Inc. # Copyright 2012 OpenStack Foundation # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use t...
apache-2.0
cytec/SickRage
lib/guessit/rules/processors.py
22
6025
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Processors """ from collections import defaultdict import copy import six from rebulk import Rebulk, Rule, CustomRule, POST_PROCESS, PRE_PROCESS, AppendMatch, RemoveMatch from guessit.rules.common.words import iter_words from .common.formatters import cleanup from .co...
gpl-3.0
Azure/azure-sdk-for-python
tools/azure-devtools/src/azure_devtools/scenario_tests/base.py
1
8281
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
linhdh/SnakeRepellerOnMbed50
mbed-os/tools/compliance/ioper_test_target_id.py
106
5090
""" mbed SDK Copyright (c) 2011-2015 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...
gpl-2.0
kevalds51/sympy
sympy/matrices/expressions/tests/test_transpose.py
71
1194
from sympy.functions import adjoint, conjugate, transpose from sympy.matrices.expressions import MatrixSymbol, Adjoint, trace, Transpose from sympy.matrices import eye, Matrix from sympy import symbols, S from sympy import refine, Q n, m, l, k, p = symbols('n m l k p', integer=True) A = MatrixSymbol('A', n, m) B = Mat...
bsd-3-clause
mezz64/home-assistant
tests/components/sleepiq/test_sensor.py
5
1493
"""The tests for SleepIQ sensor platform.""" import homeassistant.components.sleepiq.sensor as sleepiq from homeassistant.setup import async_setup_component from tests.async_mock import MagicMock from tests.components.sleepiq.test_init import mock_responses CONFIG = {"username": "foo", "password": "bar"} async def ...
apache-2.0
welenofsky/python_koans
python3/koans/about_proxy_object_project.py
82
4104
#!/usr/bin/env python # -*- coding: utf-8 -*- # Project: Create a Proxy Class # # In this assignment, create a proxy class (one is started for you # below). You should be able to initialize the proxy object with any # object. Any attributes called on the proxy object should be forwarded # to the target object. As e...
mit
OpenCanada/website
core/migrations/0021_streampage.py
1
10814
# -*- coding: utf-8 -*- from __future__ import unicode_literals import wagtail.core.blocks import wagtail.embeds.blocks import wagtail.images.blocks from django.db import migrations, models import articles.fields import interactives.models class Migration(migrations.Migration): dependencies = [ ('core'...
mit
Conservatory/quark
pymouse/build/lib.linux-x86_64-2.7/pymouse/__init__.py
7
1119
# -*- coding: iso-8859-1 -*- # Copyright 2010 Pepijn de Vos # # 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...
gpl-2.0
boooka/GeoPowerOff
venv/lib/python2.7/site-packages/django/conf/locale/sl/formats.py
200
2120
# -*- 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 = 'd. F Y' TIME_FORMAT = 'H:i:s' DAT...
apache-2.0
tafaRU/odoo
addons/payment_ogone/controllers/main.py
389
1179
# -*- coding: utf-8 -*- import logging import pprint import werkzeug from openerp import http, SUPERUSER_ID from openerp.http import request _logger = logging.getLogger(__name__) class OgoneController(http.Controller): _accept_url = '/payment/ogone/test/accept' _decline_url = '/payment/ogone/test/decline' ...
agpl-3.0
aabdin01/concourse
concourse-driver-python/concourse/concourse.py
7
49719
__author__ = "Jeff Nelson" __copyright__ = "Copyright 2015, Cinchapi Inc." __license__ = "Apache, Version 2.0" from thrift import Thrift from thrift.transport import TSocket from thriftapi import ConcourseService from thriftapi.shared.ttypes import * from utils import * from collections import OrderedDict import ujson...
apache-2.0
ignatenkobrain/dnf
dnf/yum/misc.py
1
17291
# misc.py # Copyright (C) 2012-2014 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later version. # This program is distributed in the hope th...
gpl-2.0
thjashin/tensorflow
tensorflow/python/training/session_run_hook.py
31
9435
# 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
fernandog/osmc
package/mediacenter-addon-osmc/src/script.module.osmcsetting.networking/resources/lib/osmc_bluetooth_agent.py
15
7110
#!usr/bin/python from optparse import OptionParser import traceback import dbus import dbus.service import dbus.mainloop.glib try: from gi.repository import GObject except ImportError: import gobject as GObject import bluezutils import json PEXPECT_SOL = 'SOL@' PEXPECT_EOL = '@EOL' BUS_NAME = 'org.bluez' AGE...
gpl-2.0
TribeMedia/synapse
synapse/storage/search.py
2
21943
# -*- coding: utf-8 -*- # Copyright 2015, 2016 OpenMarket Ltd # # 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
us-ignite/us_ignite
us_ignite/visualize/views.py
1
4853
from collections import Counter from itertools import chain, combinations from django.conf import settings from django.core.urlresolvers import reverse from django.utils.http import urlquote from django.template.response import TemplateResponse from us_ignite.apps.models import Application, Domain from us_ignite.acti...
bsd-3-clause
gajim/gajim
setup.py
1
6382
#!/usr/bin/env python3 import os import sys if sys.version_info < (3, 7): sys.exit('Gajim needs Python 3.7+') from setuptools import setup, find_packages from setuptools import Command from setuptools.command.build_py import build_py as _build from setuptools.command.install import install as _install from distu...
gpl-3.0
Workday/OpenFrame
tools/telemetry/third_party/webpagereplay/third_party/dns/rdtypes/ANY/__init__.py
243
1191
# Copyright (C) 2003-2007, 2009, 2010 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED ...
bsd-3-clause
HazyResearch/snorkel
snorkel/learning/structure/gen_learning.py
2
12973
from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals from builtins import * from .constants import * from numba import jit import numpy as np class DependencySelector(object): """ Fast method for identifying depen...
apache-2.0
ruleant/weblate
weblate/trans/migrations/0043_auto__add_vote__add_unique_vote_suggestion_user.py
2
18461
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
gpl-3.0
whn09/tensorflow
tensorflow/examples/learn/iris_custom_decay_dnn.py
30
2039
# 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 appl...
apache-2.0
anuragpapineni/Hearthbreaker-evolved-agent
hearthbreaker/cards/minions/warrior.py
2
2859
from hearthbreaker.effects.minion import Buff, IncreaseArmor, GiveCharge import hearthbreaker.targeting from hearthbreaker.constants import CHARACTER_CLASS, CARD_RARITY from hearthbreaker.game_objects import MinionCard, Minion, WeaponCard, Weapon class ArathiWeaponsmith(MinionCard): def __init__(self): su...
mit
aperigault/ansible
lib/ansible/modules/crypto/acme/acme_inspect.py
20
12317
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2018 Felix Fontein (@felixfontein) # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = {'metadata_version': '1.1', ...
gpl-3.0
garrettjonesgoogle/api-client-staging
generated/python/gapic-google-iam-admin-v1/google/cloud/gapic/iam_admin/v1/enums.py
8
2472
# 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 required by applicable law or agree...
bsd-3-clause
chirilo/remo
vendor-local/lib/python/rest_framework/authentication.py
8
5945
""" Provides various authentication policies. """ from __future__ import unicode_literals import base64 from django.contrib.auth import authenticate from django.middleware.csrf import CsrfViewMiddleware from django.utils.translation import ugettext_lazy as _ from rest_framework import exceptions, HTTP_HEADER_ENCODING f...
bsd-3-clause
eclecticitguy/pynet_paid
class3/ex1_cfg_change_checker.py
1
1466
#!/usr/bin/env python from snmp_helper import snmp_get_oid_v3,snmp_extract from time import localtime, asctime COMMUNITY_STRING = 'galileo' SNMP_PORT = 161 SYS_NAME = '1.3.6.1.2.1.1.5.0' SYS_UPTIME = '1.3.6.1.2.1.1.3.0' RUN_LAST_CHANGED = '1.3.6.1.4.1.9.9.43.1.1.1.0' SYS_TIME_SEC = 100 DEBUG = True class NetworkDevi...
apache-2.0
yugangw-msft/autorest
src/generator/AutoRest.Python.Tests/Expected/AcceptanceTests/UrlMultiCollectionFormat/autoresturlmutlicollectionformattestservice/auto_rest_url_mutli_collection_format_test_service.py
5
2307
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
mit
petewarden/tensorflow
tensorflow/lite/python/convert_saved_model.py
17
7669
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
apache-2.0
JohnAdders/domoticz
plugins/examples/HTTP.py
9
7970
# Google Home page example # # Author: Dnpwwo, 2017 - 2018 # # Demonstrates HTTP/HTTPS connectivity. # After connection it performs a GET on www.google.com and receives a 302 (Page Moved) response # It then does a subsequent GET on the Location specified in the 302 response and receives a 200 response. # """ <pl...
gpl-3.0
31415us/trajectory
py/env/lib/python2.7/site-packages/shapely/geometry/linestring.py
3
8309
"""Line strings and related utilities """ from ctypes import c_double, cast, POINTER from ctypes import ArgumentError from shapely.coords import required from shapely.geos import lgeos, TopologicalError from shapely.geometry.base import BaseGeometry, geom_factory from shapely.geometry.proxy import CachingGeometryProx...
mit
markrawlingson/SickRage
lib/hachoir_parser/image/bmp.py
95
6682
""" Microsoft Bitmap picture parser. - file extension: ".bmp" Author: Victor Stinner Creation: 16 december 2005 """ from hachoir_parser import Parser from hachoir_core.field import (FieldSet, UInt8, UInt16, UInt32, Bits, String, RawBytes, Enum, PaddingBytes, NullBytes, createPaddingField) from hachoir_cor...
gpl-3.0
ksrajkumar/openerp-6.1
openerp/addons/point_of_sale/wizard/pos_receipt.py
9
2286
# -*- 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
semonte/intellij-community
python/helpers/coveragepy/coverage/backunittest.py
95
1515
# Licensed under the Apache License: http://www.apache.org/licenses/LICENSE-2.0 # For details: https://bitbucket.org/ned/coveragepy/src/default/NOTICE.txt """Implementations of unittest features from the future.""" # Use unittest2 if it's available, otherwise unittest. This gives us # back-ported features for 2.6. t...
apache-2.0
Malpp/Mouse
main.py
1
1323
import win32api, win32con, win32gui, sys from flask import Flask, send_from_directory, request def click(): (x,y) = win32gui.GetCursorPos() win32api.mouse_event(win32con.MOUSEEVENTF_LEFTDOWN,x,y,0,0) win32api.mouse_event(win32con.MOUSEEVENTF_LEFTUP,x,y,0,0) def rclick(): (x,y) = win32gui.GetC...
mit
mscuthbert/abjad
abjad/tools/rhythmmakertools/Talea.py
1
4052
# -*- encoding: utf-8 -*- from abjad.tools import datastructuretools from abjad.tools import durationtools from abjad.tools import mathtools from abjad.tools.abctools import AbjadValueObject class Talea(AbjadValueObject): '''Talea. .. container:: example :: >>> talea = rhythmmakertools...
gpl-3.0
hothHowler/pymc3
pymc3/theanof.py
13
5296
from .vartypes import typefilter, continuous_types from theano import theano, scalar, tensor as t from theano.gof.graph import inputs from .memoize import memoize from .blocking import ArrayOrdering __all__ = ['gradient', 'hessian', 'hessian_diag', 'inputvars', 'cont_inputs', 'jacobian', 'CallableTensor', 'join_nonsh...
apache-2.0
berkeley-stat159/project-beta
code/utils/vmt_utils.py
4
3559
# General utility functions for vm_tools """ These functions are meant to manipulate and reshape data, to facilitate bootstrapping, Statistical functions (those concerned with prediction accuracy, significance levels) """ import numpy as np def _svd(M,**kwargs): """ same as np.linagle.svd() function add e...
bsd-3-clause
SHASHANKB/spark
examples/src/main/python/sql/streaming/structured_network_wordcount.py
76
2534
# # 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
ChristianKniep/QNIB
serverfiles/usr/local/lib/networkx-1.6/networkx/algorithms/centrality/tests/test_current_flow_betweenness_centrality_subset.py
75
7708
#!/usr/bin/env python from nose.tools import * from nose import SkipTest import networkx from nose.plugins.attrib import attr from networkx import edge_current_flow_betweenness_centrality \ as edge_current_flow from networkx import edge_current_flow_betweenness_centrality_subset \ as edge_current_flow_subset ...
gpl-2.0
zhangwengame/shadowsocks
shadowsocks/crypto/rc4_md5.py
1042
1339
#!/usr/bin/env python # # Copyright 2015 clowwindy # # 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
2rs2ts/moto
moto/ec2/utils.py
3
17955
from __future__ import unicode_literals import random import re import six EC2_RESOURCE_TO_PREFIX = { 'customer-gateway': 'cgw', 'dhcp-options': 'dopt', 'image': 'ami', 'instance': 'i', 'internet-gateway': 'igw', 'nat-gateway': 'nat', 'network-acl': 'acl', 'network-acl-subnet-assoc': 'a...
apache-2.0
fangxingli/hue
desktop/core/ext-py/pysaml2-2.4.0/src/saml2/aes.py
34
3421
#!/usr/bin/env python import os from Crypto import Random from Crypto.Cipher import AES from base64 import b64encode, b64decode __author__ = 'rolandh' POSTFIX_MODE = { "cbc": AES.MODE_CBC, "cfb": AES.MODE_CFB, "ecb": AES.MODE_CFB, } BLOCK_SIZE = 16 class AESCipher(object): def __init__(self, key, i...
apache-2.0
ondras/TeaJS
deps/v8/third_party/icu/source/test/depstest/depstest.py
14
6906
#! /usr/bin/python # -*- coding: utf-8 -*- # # Copyright (C) 2011, International Business Machines # Corporation and others. All Rights Reserved. # # file name: depstest.py # # created on: 2011may24 """ICU dependency tester. This probably works only on Linux. The exit code is 0 if everything is fine, 1 for errors, 2...
bsd-3-clause
Vegasvikk/django-cms
cms/utils/django_load.py
25
3794
# -*- coding: utf-8 -*- """ This is revision from 3058ab9d9d4875589638cc45e84b59e7e1d7c9c3 of https://github.com/ojii/django-load. ANY changes to this file, be it upstream fixes or changes for the cms *must* be documented clearly within this file with comments. For documentation on how to use the functions described ...
bsd-3-clause
aviciimaxwell/odoo
addons/anonymization/anonymization.py
77
28690
# -*- encoding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). All Rights Reserved # $Id$ # # This program is free software: you can redistribute it and/or modify # ...
agpl-3.0