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 |
|---|---|---|---|---|---|
40123148/40123148 | static/Brython3.1.1-20150328-091302/Lib/inspect.py | 637 | 78935 | """Get useful information from live Python objects.
This module encapsulates the interface provided by the internal special
attributes (co_*, im_*, tb_*, etc.) in a friendlier fashion.
It also provides some help for examining source code and class layout.
Here are some of the useful functions provided by this module:... | lgpl-3.0 |
jozz68x/PyBrowser | src/browser.py | 1 | 7502 | #!usr/bin/python
__author__="Jose Diaz - email: jozz.18x@gmail.com"
__date__ ="$04/03/2015 05:55:19 AM$"
from homepage import Homepage
from tkinter import *
from tkinter import ttk
from PIL import Image, ImageTk
from urllib.request import urlopen # Interaccion con la web
from urllib.error import HTTPError,U... | gpl-3.0 |
daniel-kurushin/iisu | biu/khc.py | 1 | 6304 | import sys
from struct import pack, unpack
from time import sleep
class KHC(object):
NAME = 'KHC'
cmd_inc_engine = b'\xae\xae\x01\x00\x01\x08\x00' # увеличить обороты и подтвердить результат
cmd_dec_engine = b'\xae\xae\x01\x00\x02\x08\x00' # уменьшить обороты и подтвердить результат
cmd_stop_engine = b'\x... | gpl-3.0 |
musically-ut/numpy | numpy/lib/tests/test_nanfunctions.py | 85 | 26868 | from __future__ import division, absolute_import, print_function
import warnings
import numpy as np
from numpy.testing import (
run_module_suite, TestCase, assert_, assert_equal, assert_almost_equal,
assert_raises, assert_array_equal
)
# Test data
_ndat = np.array([[0.6244, np.nan, 0.2692, 0.0116, np.na... | bsd-3-clause |
seanli9jan/tensorflow | tensorflow/contrib/learn/python/learn/learn_io/pandas_io_test.py | 25 | 7883 | # 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 |
sometallgit/AutoUploader | Python27/Lib/hashlib.py | 51 | 7842 | # $Id$
#
# Copyright (C) 2005 Gregory P. Smith (greg@krypto.org)
# Licensed to PSF under a Contributor Agreement.
#
__doc__ = """hashlib module - A common interface to many hash functions.
new(name, string='') - returns a new hash object implementing the
given hash function; initializing th... | mit |
pigmej/solar-agent | solar_agent/core.py | 2 | 7841 | # Copyright 2015 Mirantis, 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 attached#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable la... | apache-2.0 |
markgw/jazzparser | src/jazzparser/utils/latex.py | 1 | 1979 | """Latex output utility functions to help with producing valid Latex files.
Utility functions for handling processing and output of Latex.
"""
"""
============================== License ========================================
Copyright (C) 2008, 2010-12 University of Edinburgh, Mark Granroth-Wilding
This file is... | gpl-3.0 |
ezequielpereira/Time-Line | timelinelib/wxgui/components/errorpanel.py | 2 | 2093 | # Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg
#
# This file is part of Timeline.
#
# Timeline 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 th... | gpl-3.0 |
noroutine/ansible | lib/ansible/modules/network/aos/aos_logical_device_map.py | 15 | 8922 | #!/usr/bin/python
#
# (c) 2017 Apstra Inc, <community@apstra.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 opt... | gpl-3.0 |
ttm/aa01 | aa.py | 2 | 1628 | #! /usr/bin/env python
#-*- coding: utf8 -*-
# use com:
# sudo cp aa.py /usr/local/bin/aa
# aí na linha de comando:
# $aa fazendo x pq y
# Configuration:
NICK="anonymous"
import sys, string, urllib2
if len(sys.argv)==1:
print("usage: aa this is a aa shout, for registering ongoing work")
else:
shout=string.joi... | artistic-2.0 |
waythe/closure-low-poly-background | closure-library/closure/bin/build/depstree.py | 455 | 6375 | # Copyright 2009 The Closure Library 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 a... | apache-2.0 |
thumbimigwe/echorizr | lib/python2.7/site-packages/django/core/cache/backends/base.py | 28 | 9775 | "Base Cache class."
from __future__ import unicode_literals
import time
import warnings
from django.core.exceptions import DjangoRuntimeWarning, ImproperlyConfigured
from django.utils.module_loading import import_string
class InvalidCacheBackendError(ImproperlyConfigured):
pass
class CacheKeyWarning(DjangoRun... | mit |
1245816264/fresco | run_comparison.py | 40 | 9509 | #!/usr/bin/env python
# This file provided by Facebook is for non-commercial testing and evaluation
# purposes only. Facebook reserves all rights not expressly granted.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL... | bsd-3-clause |
naousse/odoo | addons/account_analytic_plans/report/crossovered_analytic.py | 321 | 8149 | # -*- 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 |
brandond/ansible | lib/ansible/modules/network/netvisor/pn_vrouter_interface_ip.py | 9 | 7215 | #!/usr/bin/python
# Copyright: (c) 2018, Pluribus Networks
# 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': ['... | gpl-3.0 |
landier/imdb-crawler | crawler/libs/sqlalchemy/orm/deprecated_interfaces.py | 1 | 21785 | # orm/deprecated_interfaces.py
# Copyright (C) 2005-2012 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
from sqlalchemy import event, util
from .interfaces import EXT_CONTINUE
... | gpl-3.0 |
bgris/ODL_bgris | lib/python3.5/site-packages/networkx/algorithms/connectivity/tests/test_kcomponents.py | 50 | 8395 | # Test for Moody and White k-components algorithm
from nose.tools import assert_equal, assert_true, raises
import networkx as nx
from networkx.algorithms.connectivity.kcomponents import (
build_k_number_dict,
_consolidate,
)
##
## A nice synthetic graph
##
def torrents_and_ferraro_graph():
# Graph from htt... | gpl-3.0 |
Haynie-Research-and-Development/jarvis | deps/lib/python3.4/site-packages/netdisco/discoverables/__init__.py | 1 | 5004 | """Provides helpful stuff for discoverables."""
# pylint: disable=abstract-method
import ipaddress
from urllib.parse import urlparse
from ..const import (
ATTR_NAME, ATTR_MODEL_NAME, ATTR_HOST, ATTR_PORT, ATTR_SSDP_DESCRIPTION,
ATTR_SERIAL, ATTR_MODEL_NUMBER, ATTR_HOSTNAME, ATTR_MAC_ADDRESS,
ATTR_PROPERTIE... | gpl-2.0 |
nyterage/Galaxy_Tab_3_217s | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# 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.
from collections import defaultdict
def aut... | gpl-2.0 |
gokulnatha/GT-I9500 | tools/perf/scripts/python/net_dropmonitor.py | 4235 | 1554 | # Monitor the system for dropped packets and proudce a report of drop locations and counts
import os
import sys
sys.path.append(os.environ['PERF_EXEC_PATH'] + \
'/scripts/python/Perf-Trace-Util/lib/Perf/Trace')
from perf_trace_context import *
from Core import *
from Util import *
drop_log = {}
kallsyms = []
def... | gpl-2.0 |
stoqs/stoqs | stoqs/loaders/CANON/dorado_loadsep2013.py | 3 | 2698 | #!/usr/bin/env python
__author__ = 'Mike McCann,Duane Edgington,Reiko Michisaki'
__copyright__ = '2013'
__license__ = 'GPL v3'
__contact__ = 'duane at mbari.org'
__doc__ = '''
Dorado loader for all CANON activities in September 2013
Mike McCann; Modified by Duane Edgington and Reiko Michisaki
MBARI 02 Septemb... | gpl-3.0 |
dakcarto/QGIS | python/plugins/processing/algs/lidar/lastools/shp2las.py | 12 | 3019 | # -*- coding: utf-8 -*-
"""
***************************************************************************
shp2las.py
---------------------
Date : September 2013
Copyright : (C) 2013 by Martin Isenburg
Email : martin near rapidlasso point com
*****************... | gpl-2.0 |
krux/adspygoogle | examples/adspygoogle/dfp/v201208/get_licas_by_statement.py | 4 | 2264 | #!/usr/bin/python
#
# 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 b... | apache-2.0 |
jsidabras/GA-PMR | HFSS-loadbest.py | 1 | 1771 | # ----------------------------------------------
# Script Written by Jason W. Sidabras (jason.sidabras@cec.mpg.de)
# requires jsidabras/hycohanz as of 20-04-2017
# Loads a file with a list of 1s and 0s and implements it to HFSS as Silv/Vac
# used to load the best results per generation or final
# ----------------... | mit |
axitkhurana/stem | stem/response/events.py | 3 | 31598 | # Copyright 2012-2013, Damian Johnson
# Copyright 2012, Sean Robinson
# See LICENSE for licensing information
import datetime
import io
import re
import time
import stem
import stem.control
import stem.descriptor.router_status_entry
import stem.response
import stem.version
from stem.util import connection, log, str_... | lgpl-3.0 |
guoshimin/kubernetes | cluster/saltbase/salt/_states/container_bridge.py | 32 | 5829 | #!/usr/bin/env python
# Copyright 2014 The Kubernetes 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
#
# Unle... | apache-2.0 |
ajgallegog/gem5_arm | configs/topologies/Cluster.py | 41 | 4886 | # 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 |
jaromil/faircoin2 | qa/rpc-tests/mempool_spendcoinbase.py | 14 | 2705 | #!/usr/bin/env python2
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test spending coinbase transactions.
# The coinbase transaction in block N can appear in block
# N+10... | mit |
bmazin/SDR | DataReadout/ReadoutControls/lib/LabJackPython-8-26-2011/build/lib/u12.py | 2 | 114714 | """
Name: u12.py
Desc: Defines the U12 class, which makes working with a U12 much easier. The
functions of the U12 class are divided into two categories: UW and
low-level.
Most of the UW functions are exposed as functions of the U12 class. With
the exception of the "e" functions, UW fun... | gpl-2.0 |
ShieldKteam/shield_osprey | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Core.py | 11088 | 3246 | # Core.py - Python extension for perf script, core functions
#
# 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.
from collections import defaultdict
def aut... | gpl-2.0 |
hectord/lettuce | lettuce/django/management/commands/harvest.py | 3 | 9169 | # -*- coding: utf-8 -*-
# <Lettuce - Behaviour Driven Development for python>
# Copyright (C) <2010-2012> Gabriel Falcão <gabriel@nacaolivre.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 Foundatio... | gpl-3.0 |
SaganBolliger/nupic | examples/tp/tp_test.py | 34 | 87763 | #!/usr/bin/env python
# ----------------------------------------------------------------------
# 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 ... | agpl-3.0 |
eeriks/velo.lv | velo/payment/forms.py | 1 | 19328 | from django import forms
from django.contrib import messages
from django.utils import timezone
from django.core.urlresolvers import reverse
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from crispy_forms.layout import Layout, Div, HTML, Field
from crispy_forms.he... | gpl-3.0 |
monkeypants/MAVProxy | MAVProxy/modules/mavproxy_output.py | 10 | 4229 | #!/usr/bin/env python
'''enable run-time addition and removal of UDP clients , just like --out on the cnd line'''
''' TO USE:
output add 10.11.12.13:14550
output list
output remove 3 # to remove 3rd output
'''
from pymavlink import mavutil
from MAVProxy.modules.lib import mp_module
from MAVProxy.mod... | gpl-3.0 |
TeamExodus/external_chromium_org | content/test/gpu/page_sets/gpu_rasterization_tests.py | 34 | 2394 | # 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.
from telemetry.page import page as page_module
from telemetry.page import page_set as page_set_module
class GpuRasterizationTestsPage(page_module.Page):
... | bsd-3-clause |
chainer/chainer | chainermn/iterators/synchronized_iterator.py | 8 | 2898 | import chainer
import numpy
class _SynchronizedIterator(chainer.dataset.iterator.Iterator):
def __init__(self, actual_iterator, communicator):
if not hasattr(actual_iterator, 'order_sampler'):
raise ValueError('actual_iterator must have order_sampler')
else:
super(_Synchro... | mit |
extremetempz/Wingray-Kernel | arch/ia64/scripts/unwcheck.py | 13143 | 1714 | #!/usr/bin/python
#
# Usage: unwcheck.py FILE
#
# This script checks the unwind info of each function in file FILE
# and verifies that the sum of the region-lengths matches the total
# length of the function.
#
# Based on a shell/awk script originally written by Harish Patil,
# which was converted to Perl by Matthew Ch... | gpl-2.0 |
pshowalter/solutions-geoprocessing-toolbox | military_aspects_of_weather/scripts/MultidimensionSupplementalTools/MultidimensionSupplementalTools/Scripts/mds/netcdf/convention/coordinate.py | 2 | 7086 | # -*- coding: utf-8 -*-
import mds.ordered_set
import convention
class Coordinate(convention.Convention):
"""
This class implements the `Coordinate Attribute Convention`_.
.. _Coordinate Attribute Convention: http://www.unidata.ucar.edu/software/netcdf-java/reference/CoordinateAttributes.html
"""
... | apache-2.0 |
resmo/ansible | lib/ansible/modules/network/aci/mso_schema_template_externalepg.py | 5 | 6606 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2018, Dag Wieers (@dagwieers) <dag@wieers.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_ve... | gpl-3.0 |
JamesClough/networkx | networkx/algorithms/bipartite/tests/test_generators.py | 7 | 7518 | #!/usr/bin/env python
from nose.tools import *
from networkx import *
from networkx.algorithms.bipartite.generators import *
"""Generators - Bipartite
----------------------
"""
class TestGeneratorsBipartite():
def test_complete_bipartite_graph(self):
G=complete_bipartite_graph(0,0)
assert_true(i... | bsd-3-clause |
palaniyappanBala/robobrowser | robobrowser/helpers.py | 5 | 2534 | """
Miscellaneous helper functions
"""
import re
from bs4 import BeautifulSoup
from bs4.element import Tag
from robobrowser.compat import string_types, iteritems
def match_text(text, tag):
if isinstance(text, string_types):
return text in tag.text
if isinstance(text, re._pattern_type):
retu... | bsd-3-clause |
sss/calibre-at-bzr | src/calibre/devices/mtp/unix/driver.py | 3 | 15469 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2012, Kovid Goyal <kovid at kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
... | gpl-3.0 |
tdyas/pants | contrib/node/src/python/pants/contrib/node/subsystems/resolvers/node_resolver_base.py | 2 | 2786 | # Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import re
import shutil
from abc import ABC, abstractmethod
from pants.base.build_environment import get_buildroot
from pants.util.dirutil import safe_mkdir
class NodeResolver... | apache-2.0 |
liangjg/openmc | examples/lattice/nested/build_xml.py | 8 | 5536 | import openmc
###############################################################################
# Simulation Input File Parameters
###############################################################################
# OpenMC simulation parameters
batches = 20
inactive = 10
particles = 10000
##########... | mit |
zycdragonball/tensorflow | tensorflow/python/framework/versions.py | 127 | 1607 | # 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 |
Sorsly/subtle | google-cloud-sdk/platform/gsutil/gslib/resumable_streaming_upload.py | 36 | 8165 | # Copyright 2014 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 a... | mit |
jbedorf/tensorflow | tensorflow/python/distribute/multi_worker_util_test.py | 10 | 6775 | # 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 |
brianjgeiger/osf.io | osf/migrations/0077_add_noderequest_model.py | 18 | 4686 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-16 20:26
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
import osf.models.base
import osf.utils.fields
class Migration... | apache-2.0 |
saffsd/assignmentprint | assignmentprint.py | 1 | 15044 | """
Utility funtions and classes for preparing project marking bundles
for student assignments.
Marco Lui <saffsd@gmail.com>, November 2012
"""
import os, sys, csv, re
import tokenize, textwrap, token
import trace, threading
import imp
import contextlib
from cStringIO import StringIO
from pprint import pformat
impor... | gpl-3.0 |
zerkrx/zerkbox | lib/aiohttp/abc.py | 19 | 2147 | import asyncio
import sys
from abc import ABC, abstractmethod
from collections.abc import Iterable, Sized
PY_35 = sys.version_info >= (3, 5)
class AbstractRouter(ABC):
@asyncio.coroutine # pragma: no branch
@abstractmethod
def resolve(self, request):
"""Return MATCH_INFO for given request"""
... | gpl-3.0 |
pasberth/autojump | tools/autojump_ipython.py | 29 | 1181 | # This module was contributed by Mario Pastorelli <pastorelli.mario@gmail.com>
# It is released in the public domain
# This tool provides "j" for ipython
# To use it, copy it in your ~/.ipython directory
# and add the following line to ipy_user_conf.py:
# import autojump_ipython
import os
import subprocess as sub
fro... | gpl-3.0 |
artificialnull/IshanBoot | aliasbot.py | 1 | 9126 | #!/usr/bin/python3
import requests
import json
import os
import time
import random as rand
import subprocess
#telegram bot stuff
url = "https://api.telegram.org/bot%s/%s"
token = open("token.txt").read().replace('\n', '')
print(url % (token, "getUpdates"))
path = os.path.dirname(__file__)
#globals
locked = []
aliase... | gpl-3.0 |
fnouama/intellij-community | python/helpers/pydev/tests/test_jyserver.py | 54 | 5760 | '''
@author Fabio Zadrozny
'''
import sys
import unittest
import socket
import urllib
IS_JYTHON = sys.platform.find('java') != -1
if IS_JYTHON:
import os
#make it as if we were executing from the directory above this one (so that we can use jycompletionserver
#without the need for it being in the p... | apache-2.0 |
persepolisdm/translation-API | pdm_api/views/default.py | 1 | 1257 | from pyramid.response import Response
from pyramid.view import view_config
from pyramid.httpexceptions import HTTPForbidden
from pyramid import request
from sqlalchemy.exc import DBAPIError
from ..models.mymodel import MyModel, request_log, access_log, banlist
from ..settings import get_settings
import datetime
@view... | gpl-3.0 |
AevumDecessus/fragforce.org | ffdonations/migrations/0004_auto_20181004_1921.py | 3 | 1156 | # Generated by Django 2.1.2 on 2018-10-04 23:21
import django.contrib.postgres.fields.jsonb
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('ffdonations', '0003_auto_20181004_1916'),
]
operations = [
migrations.AlterField(
model_name=... | gpl-2.0 |
incaser/odoo-odoo | addons/account_analytic_plans/report/__init__.py | 445 | 1084 | # -*- 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 |
AbhilashReddyM/GeometricMultigrid | mgd3d.py | 1 | 4921 | """
2017 (c) A. R. Malipeddi
3D geometric multigrid code for poissons equation in a cube.
- Finite difference method
- 7pt operator
- trilinear interpolation
- Two-color Gauss Seidel smoothing
"""
import numpy as np
def GSrelax(nx,ny,nz,u,f,iters=1,flag=1):
'''
Red-Black Gauss Seidel smoothing
flag : 1 ... | mit |
raildo/nova | nova/scheduler/filters/affinity_filter.py | 56 | 4923 | # Copyright 2012, Piston Cloud Computing, Inc.
# 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... | apache-2.0 |
kevin8909/xjerp | openerp/addons/pad_project/__openerp__.py | 119 | 1478 | # -*- 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 |
Infernoman/Sembro-Token | contrib/bitrpc/bitrpc.py | 2348 | 7835 | from jsonrpc import ServiceProxy
import sys
import string
# ===== BEGIN USER SETTINGS =====
# if you do not set these you will be prompted for a password for every command
rpcuser = ""
rpcpass = ""
# ====== END USER SETTINGS ======
if rpcpass == "":
access = ServiceProxy("http://127.0.0.1:8332")
else:
access = Ser... | mit |
a40423239/2017springcd_hw | plugin/liquid_tags/test_notebook.py | 311 | 3042 | import re
from pelican.tests.support import unittest
from . import notebook
class TestNotebookTagRegex(unittest.TestCase):
def get_argdict(self, markup):
match = notebook.FORMAT.search(markup)
if match:
argdict = match.groupdict()
src = argdict['src']
star... | agpl-3.0 |
ol-loginov/intellij-community | python/testData/MockSdk2.7/python_stubs/__builtin__.py | 40 | 174842 | # encoding: utf-8
# module __builtin__
# from (built-in)
# by generator 1.136
from __future__ import print_function
"""
Built-in functions, exceptions, and other objects.
Noteworthy: None is the `nil' object; Ellipsis represents `...' in slices.
"""
# imports
from exceptions import (ArithmeticError, AssertionError, A... | apache-2.0 |
takis/django | django/middleware/locale.py | 358 | 2983 | "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.... | bsd-3-clause |
aalien/mib | mib.py | 1 | 7386 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# mib: Modular irc bot
# Copyright Antti Laine <antti.a.laine@tut.fi>
#
# 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 ... | mit |
daigotanaka/kawaraban | wsgi.py | 1 | 1445 | """
WSGI config for the website project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATIO... | mit |
yugang/crosswalk-test-suite | webapi/tct-websetting-tizen-tests/inst.xpk.py | 176 | 6857 | #!/usr/bin/env python
import os
import shutil
import glob
import time
import sys
import subprocess
import string
from optparse import OptionParser, make_option
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
PKG_NAME = os.path.basename(SCRIPT_DIR)
PARAMETERS = None
#XW_ENV = "export DBUS_SESSION_BUS_ADDRESS=... | bsd-3-clause |
0x010C/Pywikibot-scripts | notif-bot.py | 2 | 1806 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
#Autor: Antoine "0x010C" Lamielle
#Creation date: 28 October 2015
#Last modification: 10 February 2017
#License: GNU GPL v3
import sys
import time
import pywiki
#Paramètres
version = "2.0"
reply = {
"section_title": "Bonjour $1 !",
"content": ... | gpl-3.0 |
fiji-flo/servo | components/script/dom/bindings/codegen/parser/tests/test_method.py | 83 | 7795 | import WebIDL
def WebIDLTest(parser, harness):
parser.parse("""
interface TestMethods {
void basic();
static void basicStatic();
void basicWithSimpleArgs(boolean arg1, byte arg2, unsigned long arg3);
boolean basicBoolean();
static boolean basicStaticBoolean... | mpl-2.0 |
Simage/shinken | shinken/objects/realm.py | 3 | 13800 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2014:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | agpl-3.0 |
dynaryu/inasafe | safe/engine/test/test_interpolation_qgis.py | 6 | 5184 | # coding=utf-8
"""Tests for interpolation functionality done with QGIS API."""
import unittest
from qgis.core import QgsFeatureRequest, QgsVectorLayer
from safe.test.utilities import get_qgis_app, TESTDATA
from safe.gis.qgis_vector_tools import create_layer
from safe.engine.interpolation_qgis import interpolate_poly... | gpl-3.0 |
joshuajan/odoo | openerp/addons/base/ir/ir_model.py | 3 | 59396 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Business Applications
# Copyright (C) 2004-2014 OpenERP S.A. (<http://openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms ... | agpl-3.0 |
PaulWay/spacewalk | backend/server/apacheUploadServer.py | 2 | 5758 | #
# Copyright (c) 2008--2013 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 MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. You should have received a c... | gpl-2.0 |
team-vigir/vigir_behaviors | vigir_flexbe_states/src/vigir_flexbe_states/read_dynamic_parameter_state.py | 1 | 2586 | #!/usr/bin/env python
from flexbe_core import EventState, Logger
import rospy
from dynamic_reconfigure.client import Client
"""
Created on 11/03/2014
@author: Philipp Schillinger
"""
class ReadDynamicParameterState(EventState):
"""
Reads a given trajectory controller parameter.
"""
LEFT_ARM_WRX = ['left_arm_t... | bsd-3-clause |
amyvmiwei/kbengine | kbe/res/scripts/common/Lib/test/test_bz2.py | 72 | 32972 | from test import support
from test.support import bigmemtest, _4G
import unittest
from io import BytesIO
import os
import pickle
import random
import subprocess
import sys
from test.support import unlink
try:
import threading
except ImportError:
threading = None
# Skip tests if the bz2 module doesn't exist.
... | lgpl-3.0 |
digital-abyss/ansible-modules-extras | cloud/vmware/vmware_vmkernel_ip_config.py | 45 | 4192 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2015, Joseph Callen <jcallen () csc.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 Li... | gpl-3.0 |
will-iam/Variant | script/process/ergodicity_scaling.py | 1 | 4083 | #!/usr/bin/python3
# -*- coding:utf-8 -*-
import __future__
import parser
import sys
import matplotlib.pyplot as plt
#plt.style.use('ggplot')
import numpy as np
import operator
from collections import *
caseSize = (8192, 8192)
if parser.args.res:
maxAvailableNode = parser.args.res
else:
maxAvailableNode = 8
... | mit |
rfleschenberg/django-shop | example/myshop/migrations/polymorphic/0003_add_polymorphic.py | 1 | 9751 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import cms.models.fields
import djangocms_text_ckeditor.fields
class Migration(migrations.Migration):
dependencies = [
('cms', '0013_urlconfrevision'),
('cont... | bsd-3-clause |
Seedstars/django-react-redux-jwt-base | src/accounts/migrations/0002_clean_user_model.py | 7 | 1653 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('accounts', '0001_initial'),
]
operations = [
migrations.RemoveField(
... | mit |
gymnasium/edx-platform | common/test/acceptance/pages/common/auto_auth.py | 17 | 3483 | """
Auto-auth page (used to automatically log in during testing).
"""
import json
import os
import urllib
from bok_choy.page_object import PageObject, unguarded
# The URL used for user auth in testing
HOSTNAME = os.environ.get('BOK_CHOY_HOSTNAME', 'localhost')
CMS_PORT = os.environ.get('BOK_CHOY_CMS_PORT', 8031)
AUTH... | agpl-3.0 |
anryko/ansible | test/units/modules/network/check_point/test_cp_mgmt_run_script.py | 19 | 2549 | # Ansible module to manage CheckPoint Firewall (c) 2019
#
# 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 dist... | gpl-3.0 |
pipermerriam/django | django/db/backends/oracle/utils.py | 539 | 1252 | import datetime
from django.utils.encoding import force_bytes, force_text
from .base import Database
# Check whether cx_Oracle was compiled with the WITH_UNICODE option if cx_Oracle is pre-5.1. This will
# also be True for cx_Oracle 5.1 and in Python 3.0. See #19606
if int(Database.version.split('.', 1)[0]) >= 5 and... | bsd-3-clause |
v1bri/gnuradio | gr-digital/python/digital/qa_correlate_access_code.py | 37 | 3173 | #!/usr/bin/env python
#
# Copyright 2006,2007,2010,2011,2013 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or... | gpl-3.0 |
kamalx/edx-platform | lms/djangoapps/instructor/features/bulk_email.py | 116 | 6813 | """
Define steps for bulk email acceptance test.
"""
# pylint: disable=missing-docstring
# pylint: disable=redefined-outer-name
from lettuce import world, step
from lettuce.django import mail
from nose.tools import assert_in, assert_equal # pylint: disable=no-name-in-module
from django.core.management import call_co... | agpl-3.0 |
ahhda/sympy | sympy/functions/special/elliptic_integrals.py | 75 | 11975 | """ Elliptic integrals. """
from __future__ import print_function, division
from sympy.core import S, pi, I
from sympy.core.function import Function, ArgumentIndexError
from sympy.functions.elementary.hyperbolic import atanh
from sympy.functions.elementary.trigonometric import sin, tan
from sympy.functions.elementary... | bsd-3-clause |
ajose01/rethinkdb | test/rql_test/connections/http_support/werkzeug/testsuite/contrib/cache.py | 145 | 7212 | # -*- coding: utf-8 -*-
"""
werkzeug.testsuite.cache
~~~~~~~~~~~~~~~~~~~~~~~~
Tests the cache system
:copyright: (c) 2014 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
import os
import time
import unittest
import tempfile
import shutil
from werkzeug.testsuite import Werkzeug... | agpl-3.0 |
oandrew/home-assistant | homeassistant/components/notify/llamalab_automate.py | 11 | 1880 | """
LlamaLab Automate notification service.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/notify.llamalab_automate/
"""
import logging
import requests
import voluptuous as vol
from homeassistant.components.notify import (BaseNotificationService,
... | mit |
elastic/elasticsearch-py | test_elasticsearch/test_types/async_types.py | 1 | 3095 | # Licensed to Elasticsearch B.V. under one or more contributor
# license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright
# ownership. Elasticsearch B.V. licenses this file to you under
# the Apache License, Version 2.0 (the "License"); you may
# not use ... | apache-2.0 |
gemagomez/keepnote | keepnote/gui/main_window.py | 1 | 52638 | """
KeepNote
Graphical User Interface for KeepNote Application
"""
#
# KeepNote
# Copyright (c) 2008-2009 Matt Rasmussen
# Author: Matt Rasmussen <rasmus@mit.edu>
#
# 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... | gpl-2.0 |
shakamunyi/neutron-dvr | neutron/openstack/common/processutils.py | 28 | 9401 | # Copyright 2011 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 req... | apache-2.0 |
shakamunyi/ansible | lib/ansible/runner/lookup_plugins/redis_kv.py | 176 | 2469 | # (c) 2012, Jan-Piet Mens <jpmens(at)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) any later ver... | gpl-3.0 |
capoe/espressopp.soap | src/integrator/Settle.py | 2 | 2534 | # Copyright (C) 2012,2013
# 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 t... | gpl-3.0 |
EUDAT-B2SHARE/invenio-old | modules/bibformat/lib/elements/bfe_pagination.py | 39 | 1082 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2007, 2008, 2009, 2010, 2011 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
## Licens... | gpl-2.0 |
kou/zulip | zerver/lib/url_preview/oembed.py | 7 | 1586 | import json
from typing import Any, Dict, Optional
from pyoembed import PyOembedException, oEmbed
def get_oembed_data(url: str,
maxwidth: int=640,
maxheight: int=480) -> Optional[Dict[str, Any]]:
try:
data = oEmbed(url, maxwidth=maxwidth, maxheight=maxheight)
e... | apache-2.0 |
heytcass/homeassistant-config | deps/cherrypy/_cpreqbody.py | 1 | 37427 | """Request body processing for CherryPy.
.. versionadded:: 3.2
Application authors have complete control over the parsing of HTTP request
entities. In short,
:attr:`cherrypy.request.body<cherrypy._cprequest.Request.body>`
is now always set to an instance of
:class:`RequestBody<cherrypy._cpreqbody.RequestBody>`,
and *... | mit |
lykops/lykops | lykops/urls.py | 1 | 5817 | """lykops URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-bas... | apache-2.0 |
sgenoud/scikit-learn | sklearn/datasets/lfw.py | 6 | 16362 | """Loader for the Labeled Faces in the Wild (LFW) dataset
This dataset is a collection of JPEG pictures of famous people collected
over the internet, all details are available on the official website:
http://vis-www.cs.umass.edu/lfw/
Each picture is centered on a single face. The typical task is called
Face Veri... | bsd-3-clause |
dk379/asn-tryst | src/load_asns.py | 1 | 3927 |
import argparse
import logging
from multiprocessing import Pool
import MySQLdb
import netaddr
import requests
import sys
from read_config import asntryst_read_config
#
# Project specific settings
#
CONFIG = asntryst_read_config()
DB_HOST = CONFIG["database"]["hostname"]
DB_NAME = CONFIG["database"]["database"]
DB_U... | bsd-3-clause |
raphaelmerx/django | tests/model_fields/test_durationfield.py | 296 | 2724 | import datetime
import json
from django import forms
from django.core import exceptions, serializers
from django.db import models
from django.test import SimpleTestCase, TestCase
from .models import DurationModel, NullDurationModel
class TestSaveLoad(TestCase):
def test_simple_roundtrip(self):
duration... | bsd-3-clause |
lmprice/ansible | lib/ansible/modules/network/f5/bigip_timer_policy.py | 18 | 18820 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright: (c) 2017, F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata_version': '1.1',
... | gpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.