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 |
|---|---|---|---|---|---|
davesteele/pygsear-debian | examples/twisted-pygame/turtle_server.py | 1 | 1616 | # pygsear
# Copyright (C) 2003 Lee Harr
#
#
# This file is part of pygsear.
#
# pygsear 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.... | gpl-2.0 |
MikeAmy/django | django/core/files/temp.py | 462 | 2950 | """
The temp module provides a NamedTemporaryFile that can be reopened in the same
process on any platform. Most platforms use the standard Python
tempfile.NamedTemporaryFile class, but Windows users are given a custom class.
This is needed because the Python implementation of NamedTemporaryFile uses the
O_TEMPORARY f... | bsd-3-clause |
jon2718/ipycool_2.0 | hard_edge_sol.py | 1 | 4483 | from sol import Sol
from material import Material
from subregion import SubRegion
from sregion import SRegion
from icoolobject import ICoolObject
from repeat import Repeat
from modeledcommandparameter import *
class HardEdgeSol(SRegion):
"""
Hard edge solenoid comprises:
(1) Entrance focusing region;
... | mit |
PyQwt/PyQwt4 | configure/configure.py | 1 | 29680 | #!/usr/bin/python
#
# Generate the build trees and Makefiles for PyQwt.
import compileall
import glob
import optparse
import os
import pprint
import re
import shutil
import sys
import traceback
class Die(Exception):
def __init__(self, info):
Exception.__init__(self, info)
# __init__()
# class Die
... | gpl-2.0 |
WillianPaiva/1flow | oneflow/core/models/nonrel/tag.py | 2 | 7515 | # -*- coding: utf-8 -*-
"""
Copyright 2013-2014 Olivier Cortès <oc@1flow.io>
This file is part of the 1flow project.
1flow 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 versio... | agpl-3.0 |
ismailsunni/watchkeeper | django_project/event_mapper/views/user.py | 5 | 7480 | # coding=utf-8
"""Docstring for this file."""
__author__ = 'ismailsunni'
__project_name = 'watchkeeper'
__filename = 'user'
__date__ = '4/27/15'
__copyright__ = 'imajimatika@gmail.com'
__doc__ = ''
from django.shortcuts import render_to_response, redirect
from django.template import RequestContext, loader
from django.... | bsd-2-clause |
ellisk42/TikZ | synthesizer.py | 1 | 30155 | from learnedRanking import learnToRank
from similarity import analyzeFeatures
from render import render
#from fastRender import fastRender
from sketch import synthesizeProgram
from language import *
from utilities import showImage,loadImage,saveMatrixAsImage,mergeDictionaries,frameImageNicely
from recognitionModel impo... | gpl-3.0 |
broodplank/glass-omap-xrr02 | tools/perf/scripts/python/syscall-counts-by-pid.py | 11180 | 1927 | # system call counts, by pid
# (c) 2010, Tom Zanussi <tzanussi@gmail.com>
# Licensed under the terms of the GNU GPL License version 2
#
# Displays system-wide system call totals, broken down by syscall.
# If a [comm] arg is specified, only syscalls called by [comm] are displayed.
import os, sys
sys.path.append(os.env... | gpl-2.0 |
JT5D/Alfred-Popclip-Sublime | Sublime Text 2/GitGutter/view_collection.py | 1 | 1904 | import tempfile
import time
class ViewCollection:
views = {}
git_times = {}
git_files = {}
buf_files = {}
@staticmethod
def add(view):
key = ViewCollection.get_key(view)
try:
from GitGutter.git_gutter_handler import GitGutterHandler
except ImportError:
... | gpl-2.0 |
jitsin/miniblog | lib/markdown2/extensions/rss.py | 23 | 3675 | import markdown
from markdown.util import etree
DEFAULT_URL = "http://packages.python.org/Markdown/"
DEFAULT_CREATOR = "Yuri Takhteyev"
DEFAULT_TITLE = "Markdown in Python"
GENERATOR = "http://packages.python.org/Markdown/extensions/rss.html"
month_map = { "Jan" : "01",
"Feb" : "02",
"Marc... | bsd-3-clause |
lbryio/lbry | lbry/lbry/stream/downloader.py | 1 | 6570 | import asyncio
import typing
import logging
import binascii
from lbry.error import DownloadSDTimeout
from lbry.utils import resolve_host, lru_cache_concurrent
from lbry.stream.descriptor import StreamDescriptor
from lbry.blob_exchange.downloader import BlobDownloader
from lbry.dht.peer import KademliaPeer
if typing.TYP... | mit |
marcs77/MuonEngine | dependencies/freetype/src/tools/docmaker/utils.py | 45 | 3513 | #
# utils.py
#
# Auxiliary functions for the `docmaker' tool (library file).
#
# Copyright 2002-2016 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.TXT. By continuing to use, modify,... | mit |
henryseg/Fibonacci_designs | Fibonacci_apples_designs.py | 2 | 5245 | ### Fibonacci apples designs, by Henry Segerman http://segerman.org
### 17/07/15
### This python code produces a design of apple logos for lasering on your macbook.
### The pattern includes an apple where the backlit apple logo is, so that the backlit apple
### fits into the pattern. REMEMBER TO DELETE THE CENTRAL AP... | mit |
mxOBS/deb-pkg_xbmc-imx6 | tools/EventClients/examples/python/example_simple.py | 228 | 1272 | #!/usr/bin/python
# This is a simple example showing how you can send a key press event
# to XBMC using the XBMCClient class
import sys
sys.path.append("../../lib/python")
import time
from xbmcclient import XBMCClient
def main():
host = "localhost"
port = 9777
# Create an XBMCClient object and con... | gpl-2.0 |
saullocastro/pyNastran | pyNastran/gui/vtk_examples/highlight_selected_points.py | 1 | 4900 | from __future__ import print_function
#include <vtkVersion.h
#include <vtkSmartPointer.h
#include <vtkPointData.h
#include <vtkIdTypeArray.h
#include <vtkDataSetSurfaceFilter.h
#include <vtkRendererCollection.h
#include <vtkProperty.h
#include <vtkPlanes.h
#include <vtkObjectFactory.h
#include <vtkPolyDataMapper.h
#inc... | lgpl-3.0 |
idlead/scikit-learn | sklearn/linear_model/theil_sen.py | 38 | 14339 | # -*- coding: utf-8 -*-
"""
A Theil-Sen Estimator for Multiple Linear Regression Model
"""
# Author: Florian Wilhelm <florian.wilhelm@gmail.com>
#
# License: BSD 3 clause
from __future__ import division, print_function, absolute_import
import warnings
from itertools import combinations
import numpy as np
from scipy... | bsd-3-clause |
Meriipu/quodlibet | quodlibet/ext/covers/discogs.py | 2 | 4168 | # Copyright 2016 Mice Pápai
# 2018 Nick Boultbee
#
# Based on lastfm.py by Simonas Kazlauskas
#
# 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
# (a... | gpl-2.0 |
ICGC-TCGA-PanCancer/cli | scripts/commands/workflows.py | 1 | 4267 | import logging
import cliff.command
import workflowlister
import shutil
import urllib.request
import os
import datetime
class Workflows(cliff.command.Command):
"This command can help you configure and select workflows."
log = logging.getLogger(__name__)
def get_parser(self, prog_name):
parser = s... | apache-2.0 |
android-ia/platform_external_chromium_org | tools/json_schema_compiler/cpp_bundle_generator.py | 36 | 11933 | # 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 code
import cpp_util
from model import Platforms
from schema_util import CapitalizeFirstLetter
from schema_util import JsFunctionNameToClassName
... | bsd-3-clause |
plotly/plotly.py | packages/python/plotly/plotly/validators/splom/marker/__init__.py | 6 | 2113 | import sys
if sys.version_info < (3, 7):
from ._symbolsrc import SymbolsrcValidator
from ._symbol import SymbolValidator
from ._sizesrc import SizesrcValidator
from ._sizeref import SizerefValidator
from ._sizemode import SizemodeValidator
from ._sizemin import SizeminValidator
from ._size ... | mit |
jonashagstedt/tornado | tornado/ioloop.py | 1 | 39199 | #!/usr/bin/env python
#
# Copyright 2009 Facebook
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 |
40223104/2015cd_midterm | static/Brython3.1.1-20150328-091302/Lib/unittest/loader.py | 739 | 13883 | """Loading unittests."""
import os
import re
import sys
import traceback
import types
import functools
from fnmatch import fnmatch
from . import case, suite, util
__unittest = True
# what about .pyc or .pyo (etc)
# we would need to avoid loading the same tests multiple times
# from '.py', '.pyc' *and* '.pyo'
VALID... | gpl-3.0 |
matrixise/odoo | addons/account_budget/report/__init__.py | 444 | 1139 | # -*- 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 |
oemof/examples | oemof_examples/oemof.solph/v0.2.x/storage_investment/v1_invest_optimize_all_technologies.py | 2 | 6732 | # -*- coding: utf-8 -*-
"""
General description
-------------------
This example shows how to perform a capacity optimization for
an energy system with storage. The following energy system is modeled:
input/output bgas bel
| | | |
| ... | gpl-3.0 |
moylop260/odoo-dev | addons/portal_project/project.py | 103 | 1769 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013-TODAY OpenERP S.A (<http://www.openerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 |
Ensembles/ert | test-data/local/snake_oil/jobs/snake_oil_simulator.py | 1 | 7949 | #!/usr/bin/env python
from datetime import datetime
import os
import sys
from ert.ecl import EclSum, EclSumTStep
from ert.test import ExtendedTestCase
try:
from synthesizer import OilSimulator
except ImportError as e:
share_lib_path = ExtendedTestCase.createSharePath("lib")
sys.path.insert(0, share_lib_p... | gpl-3.0 |
leifos/treconomics | treconomics_project/treconomics/views.py | 1 | 20576 | from django.shortcuts import render
from django.http import HttpResponse, HttpResponseRedirect
from django.contrib.auth.models import User
from django.template import RequestContext
from django.contrib.auth import authenticate, login, logout
from django.core.urlresolvers import reverse
from django.shortcuts import red... | mit |
kartoza/geonode | geonode/contrib/monitoring/management/commands/render_metrics.py | 5 | 6626 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2017 OSGeo
#
# 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 ... | gpl-3.0 |
ZLLab-Mooc/edx-platform | lms/djangoapps/courseware/management/commands/clean_history.py | 30 | 7270 | """A command to clean the StudentModuleHistory table.
When we added XBlock storage, each field modification wrote a new history row
to the db. Now that we have bulk saves to avoid that database hammering, we
need to clean out the unnecessary rows from the database.
This command that does that.
"""
import datetime
... | agpl-3.0 |
szopu/django | django/core/management/commands/startproject.py | 503 | 1359 | from importlib import import_module
from django.core.management.base import CommandError
from django.core.management.templates import TemplateCommand
from django.utils.crypto import get_random_string
class Command(TemplateCommand):
help = ("Creates a Django project directory structure for the given "
... | bsd-3-clause |
plum-umd/pasket | pasket/meta/template.py | 1 | 14075 | #!/usr/bin/env python
import cStringIO
from itertools import ifilter
from functools import partial
import logging
import operator as op
import os
import sys
from lib.typecheck import *
import lib.const as C
import lib.visit as v
from .. import add_artifacts
from .. import util
from ..anno import parse_anno
from . i... | mit |
mbdimitrova/battle-city | battle-city/code/map.py | 1 | 1266 | import pygame
import pygame.locals
class TileCache:
"""Load the tilesets lazily into global cache"""
def __init__(self, filename, width=32, height=32):
self.width = width
self.height = height
self.cache = {}
def __getitem__(self, filename):
"""Return a table of tiles, loa... | mit |
Yukarumya/Yukarum-Redfoxes | taskcluster/taskgraph/transforms/build_attrs.py | 1 | 1163 | # 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 __future__ import absolute_import, print_function, unicode_literals
from taskgraph.transforms.base import Transform... | mpl-2.0 |
Samuel789/MediPi | MedManagementWeb/env/lib/python3.5/site-packages/dateparser/timezone_parser.py | 2 | 2184 | # -*- coding: utf-8 -*-
import regex as re
from datetime import datetime, timedelta, tzinfo
from .timezones import timezone_info_list
class StaticTzInfo(tzinfo):
def __init__(self, name, offset):
self.__offset = offset
self.__name = name
def tzname(self, dt):
return self.__name
... | apache-2.0 |
omtinez/micropython | tests/pyb/can.py | 18 | 4772 | from pyb import CAN
import pyb
# test we can correctly create by id or name
for bus in (-1, 0, 1, 2, 3, "YA", "YB", "YC"):
try:
CAN(bus, CAN.LOOPBACK)
print("CAN", bus)
except ValueError:
print("ValueError", bus)
CAN.initfilterbanks(14)
can = CAN(1)
print(can)
can.init(CAN.LOOPBACK)
p... | mit |
Aerojspark/PyFR | pyfr/readers/cgns.py | 1 | 14300 | # -*- coding: utf-8 -*-
from collections import defaultdict
from ctypes import POINTER, create_string_buffer, c_char_p, c_int, c_void_p
import re
import numpy as np
from pyfr.ctypesutil import load_library
from pyfr.readers import BaseReader, NodalMeshAssembler
from pyfr.readers.nodemaps import CGNSNodeMaps
# Poss... | bsd-3-clause |
snnn/tensorflow | tensorflow/contrib/distributions/python/kernel_tests/bijectors/chain_test.py | 25 | 8213 | # 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 |
ckirby/django | django/conf/locale/nn/formats.py | 504 | 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 = 'j. F Y'
TIME_FORMAT = 'H:i'
DATET... | bsd-3-clause |
steedos/odoo | addons/account/wizard/account_subscription_generate.py | 347 | 2254 | # -*- 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 |
barseghyanartur/python-social-auth | examples/django_me_example/example/app/views.py | 111 | 2194 | import json
from django.conf import settings
from django.http import HttpResponse, HttpResponseBadRequest
from django.shortcuts import redirect
from django.contrib.auth.decorators import login_required
from django.contrib.auth import logout as auth_logout, login
from social.backends.oauth import BaseOAuth1, BaseOAuth... | bsd-3-clause |
aleksandra-tarkowska/django | django/utils/module_loading.py | 18 | 6640 | from __future__ import absolute_import # Avoid importing `importlib` from this package.
import copy
from importlib import import_module
import os
import sys
import warnings
from django.core.exceptions import ImproperlyConfigured
from django.utils import six
from django.utils.deprecation import RemovedInDjango19Warni... | bsd-3-clause |
uyshero/rest-client | RestClient.py | 1 | 1347 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import json
import urllib
import urllib2
class RestClient:
def get(self,url,headers):
req = urllib2.Request(url,headers=headers)
response = urllib2.urlopen(req)
return response.read()
def post(self,url,para,headers):
#value = urlli... | apache-2.0 |
OddEssay/ansible | lib/ansible/executor/task_result.py | 130 | 2534 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 |
heechul/picar | picar-mini-kbd-drv8835.py | 1 | 4736 | #!/usr/bin/python
import os
import time
import atexit
import serial
import cv2
import math
import numpy as np
import sys
from threading import Thread
from pololu_drv8835_rpi import motors, MAX_SPEED
def deg2rad(deg):
return deg * math.pi / 180.0
def rad2deg(rad):
return 180.0 * rad / math.pi
def stop():
... | gpl-2.0 |
graetzer/arangodb | 3rdParty/V8/v5.7.0.0/tools/gyp/test/cxxflags/gyptest-cxxflags.py | 128 | 1034 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""
Verifies the use of the environment during regeneration when the gyp file
changes, specifically via build of an executable with C++ flag... | apache-2.0 |
acoburn/fedorapy-ingest | acdc/ingester.py | 1 | 30400 | import subprocess
import re
import tempfile
import sys
import MySQLdb
import ConfigParser
import hashlib
import traceback
import os
import logging
from lxml import etree
import eulfedora.server
import pystache
from . import rels as acdcRels
from . import rights as acdcRights
from . import models
class BatchIngester(o... | apache-2.0 |
vossman/ctfeval | appionlib/apCtf/canny.py | 1 | 5510 | #!/usr/bin/env python
import math
import time
import numpy
import random
from scipy import ndimage
#from appionlib.apImage import imagefile
"""
adapted from:
http://code.google.com/p/python-for-matlab-users/source/browse/Examples/scipy_canny.py
"""
#=======================
#=======================
def getRadialAndAn... | apache-2.0 |
linjoahow/cd0505 | static/Brython3.1.1-20150328-091302/Lib/time.py | 518 | 12346 | from browser import window
import javascript
# use Javascript Date constructor
date = javascript.JSConstructor(window.Date)
#daylight = 0 # fix me.. returns Non zero if DST timezone is defined
##############################################
# Added to pass some tests
# Are there timezone always in the browser?
# I'm ... | agpl-3.0 |
centaurialpha/edis | src/ui/containers/lateral/tab_container.py | 1 | 4798 | # -*- coding: utf-8 -*-
# EDIS - a simple cross-platform IDE for C
#
# This file is part of Edis
# Copyright 2014-2015 - Gabriel Acosta <acostadariogabriel at gmail>
# License: GPLv3 (see http://www.gnu.org/licenses/gpl.html)
from PyQt4.QtGui import (
QDockWidget,
QTabWidget
)
from PyQt4.QtCore import (
... | gpl-3.0 |
ajohnson23/depot_tools | third_party/gsutil/gslib/commands/setacl.py | 51 | 4917 | # Copyright 2011 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... | bsd-3-clause |
City-of-Helsinki/smbackend | services/migrations/0081_django3_support.py | 1 | 1851 | # Generated by Django 3.1.5 on 2021-01-22 11:14
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
("services", "0080_notification_add_external_url_title"),
]
operations = [
migrations.AlterField(
model_name="department",
... | agpl-3.0 |
paulmadore/Eric-IDE | 6-6.0.9/eric/QScintilla/Lexers/LexerFortran.py | 2 | 2111 | # -*- coding: utf-8 -*-
# Copyright (c) 2008 - 2015 Detlev Offenbach <detlev@die-offenbachs.de>
#
"""
Module implementing a Fortran lexer with some additional methods.
"""
from __future__ import unicode_literals
from PyQt5.Qsci import QsciLexerFortran
from .Lexer import Lexer
import Preferences
class LexerFortra... | gpl-3.0 |
irwinlove/django | tests/dbshell/test_postgresql_psycopg2.py | 225 | 3961 | # -*- coding: utf8 -*-
from __future__ import unicode_literals
import locale
import os
from django.db.backends.postgresql.client import DatabaseClient
from django.test import SimpleTestCase, mock
from django.utils import six
from django.utils.encoding import force_bytes, force_str
class PostgreSqlDbshellCommandTest... | bsd-3-clause |
Peddle/hue | desktop/core/ext-py/MarkupSafe-0.9.3/markupsafe/tests.py | 43 | 2405 | import gc
import unittest
from markupsafe import Markup, escape
class MarkupTestCase(unittest.TestCase):
def test_markup_operations(self):
# adding two strings should escape the unsafe one
unsafe = '<script type="application/x-some-script">alert("foo");</script>'
safe = Markup('<em>userna... | apache-2.0 |
droidlabour/git_intgrtn_aws_s3 | GitPull/cffi/vengine_cpy.py | 35 | 41370 | #
# DEPRECATED: implementation for ffi.verify()
#
import sys, imp
from . import model, ffiplatform
class VCPythonEngine(object):
_class_key = 'x'
_gen_python_module = True
def __init__(self, verifier):
self.verifier = verifier
self.ffi = verifier.ffi
self._struct_pending_verificat... | mit |
antonioUnina/neutron | neutron/db/migration/alembic_migrations/versions/5ac1c354a051_n1kv_segment_alloc.py | 15 | 2040 | # Copyright 2014 OpenStack Foundation
#
# 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 ... | apache-2.0 |
santoshsahoo/namebench | nb_third_party/dns/rcode.py | 248 | 3106 | # Copyright (C) 2001-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 ... | apache-2.0 |
jonathonwalz/ansible | test/units/module_utils/facts/hardware/test_linux.py | 71 | 7196 | # 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 in the hope that ... | gpl-3.0 |
thisisshi/cloud-custodian | tests/test_sfn.py | 2 | 4269 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .common import BaseTest
class TestStepFunction(BaseTest):
def test_invoke_batch(self):
factory = self.replay_flight_data('test_invoke_sfn_bulk')
p = self.load_policy({
'name': 'test-invoke-sfn-bulk',
... | apache-2.0 |
HyperBaton/ansible | lib/ansible/modules/cloud/hcloud/hcloud_network_info.py | 13 | 6688 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright: (c) 2019, Hetzner Cloud GmbH <info@hetzner-cloud.de>
# 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 = {
"met... | gpl-3.0 |
melsayedlab/daaz | app/models.py | 1 | 1728 | from . import daazdb
from . import login_manager
from flask import current_app
from werkzeug.security import generate_password_hash, check_password_hash
from flask.ext.login import UserMixin
from itsdangerous import TimedJSONWebSignatureSerializer as Serializer
from . import daazdb
# a callback function which will be ... | gpl-2.0 |
ryangallen/django | django/core/management/__init__.py | 74 | 14164 | from __future__ import unicode_literals
import collections
import os
import pkgutil
import sys
from importlib import import_module
import django
from django.apps import apps
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.core.management.base import (
BaseComma... | bsd-3-clause |
Naeka/vosae-app | www/invoicing/api/resources/embedded/invoice_note.py | 1 | 1160 | # -*- coding:Utf-8 -*-
from tastypie import fields as base_fields
from tastypie_mongoengine import fields
from core.api.utils import VosaeResource
from invoicing.models import InvoiceNote
from invoicing.api.doc import HELP_TEXT
__all__ = (
'InvoiceNoteResource',
)
class InvoiceNoteResource(VosaeResource):
... | agpl-3.0 |
lucach/spellcorrect | appengine/lib/jinja2/testsuite/utils.py | 415 | 2235 | # -*- coding: utf-8 -*-
"""
jinja2.testsuite.utils
~~~~~~~~~~~~~~~~~~~~~~
Tests utilities jinja uses.
:copyright: (c) 2010 by the Jinja Team.
:license: BSD, see LICENSE for more details.
"""
import gc
import unittest
import pickle
from jinja2.testsuite import JinjaTestCase
from jinja2.utils imp... | agpl-3.0 |
Yellowen/Sharamaan | auth/urls.py | 1 | 1901 | # -----------------------------------------------------------------------------
# Sharamaan Web client - Web client of Sharamaan GIS suite
# Copyright (C) 2012-2013 Yellowen Development Team <checkout AUTHORS>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of t... | gpl-2.0 |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pywin32-219/adodbapi/test/dbapi20.py | 8 | 33888 | #!/usr/bin/env python
''' Python DB API 2.0 driver compliance unit test suite.
This software is Public Domain and may be used without restrictions.
"Now we have booze and barflies entering the discussion, plus rumours of
DBAs on drugs... and I won't tell you what flashes through my mind each
time I read... | mit |
coldmind/django | tests/contenttypes_tests/models.py | 97 | 1787 | from __future__ import unicode_literals
from django.db import models
from django.utils.encoding import python_2_unicode_compatible
from django.utils.http import urlquote
@python_2_unicode_compatible
class Author(models.Model):
name = models.CharField(max_length=100)
def __str__(self):
return self.na... | bsd-3-clause |
xpenatan/libgdx-LWJGL3 | extensions/gdx-freetype/jni/freetype-2.5.5/src/tools/docmaker/docmaker.py | 146 | 3202 | #!/usr/bin/env python
#
# docmaker.py
#
# Convert source code markup to HTML documentation.
#
# Copyright 2002, 2004, 2008, 2013, 2014 by
# David Turner.
#
# This file is part of the FreeType project, and may only be used,
# modified, and distributed under the terms of the FreeType project
# license, LICENSE.T... | apache-2.0 |
lonerr/ansible | lib/ansible/runner/action_plugins/assert.py | 17 | 1919 | # Copyright 2012, Dag Wieers <dag@wieers.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 versi... | gpl-3.0 |
FusionSP/android_external_chromium_org | native_client_sdk/src/tools/httpd.py | 35 | 6987 | #!/usr/bin/env python
# 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 BaseHTTPServer
import logging
import multiprocessing
import optparse
import os
import SimpleHTTPServer # pylint: disable=W0... | bsd-3-clause |
andreparames/odoo | addons/product/product.py | 21 | 68721 | # -*- 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 |
Glottotopia/aagd | moin/local/moin/MoinMoin/support/pygments/lexer.py | 5 | 24265 | # -*- coding: utf-8 -*-
"""
pygments.lexer
~~~~~~~~~~~~~~
Base lexer classes.
:copyright: Copyright 2006-2010 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
from pygments.filter import apply_filters, Filter
from pygments.filters import get_fi... | mit |
marianinn/mingus | scripts/generate_wiki_docs.py | 7 | 7626 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# mingus - Music theory Python package, generate_wiki_docs module.
# Copyright (C) 2008, 2009, Bart Spaans
# Copyright (C) 2011, Carlo Stemberger
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Pub... | gpl-3.0 |
JockeTF/fimfarchive | tests/tasks/conftest.py | 1 | 2907 | """
Common task fixtures.
"""
#
# Fimfarchive, preserves stories from Fimfiction.
# Copyright (C) 2020 Joakim Soderlund
#
# 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 t... | gpl-3.0 |
DazWorrall/ansible | lib/ansible/modules/cloud/azure/azure_rm_securitygroup.py | 26 | 26825 | #!/usr/bin/python
#
# Copyright (c) 2016 Matt Davis, <mdavis@ansible.com>
# Chris Houseknecht, <house@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
ANS... | gpl-3.0 |
Microsoft/PTVS | Python/Product/Miniconda/Miniconda3-x64/Lib/site-packages/pythonwin/pywin/mfc/activex.py | 7 | 2544 | """Support for ActiveX control hosting in Pythonwin.
"""
import win32ui, win32uiole
from . import window
# XXX - we are still "classic style" classes in py2x, so we need can't yet
# use 'type()' everywhere - revisit soon, as py2x will move to new-style too...
try:
from types import ClassType as new_type
except ImportE... | apache-2.0 |
seem-sky/kbengine | kbe/src/lib/python/Tools/freeze/makefreeze.py | 37 | 2706 | import marshal
import bkfile
# Write a file containing frozen code for the modules in the dictionary.
header = """
#include "Python.h"
static struct _frozen _PyImport_FrozenModules[] = {
"""
trailer = """\
{0, 0, 0} /* sentinel */
};
"""
# if __debug__ == 0 (i.e. -O option given), set Py_OptimizeFlag in frozen... | lgpl-3.0 |
resmo/ansible | test/units/modules/network/fortios/test_fortios_log_memory_global_setting.py | 21 | 6618 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 |
renxinhe/EE40-Robot-Project | pyserial-2.7/serial/serialcli.py | 141 | 10038 | #! python
# Python Serial Port Extension for Win32, Linux, BSD, Jython and .NET/Mono
# serial driver for .NET/Mono (IronPython), .NET >= 2
# see __init__.py
#
# (C) 2008 Chris Liechti <cliechti@gmx.net>
# this is distributed under a free software license, see license.txt
import clr
import System
import System.IO.Ports... | mit |
AIML/scikit-learn | examples/decomposition/plot_pca_iris.py | 253 | 1801 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
=========================================================
PCA example with Iris Data-set
=========================================================
Principal Component Analysis applied to the Iris dataset.
See `here <http://en.wikipedia.org/wiki/Iris_flower_data_set>`_ fo... | bsd-3-clause |
leruce/iCJS | testProlog/CppTest/IntStackS/lib/googletest-master/googletest/test/gtest_xml_outfiles_test.py | 20 | 5339 | #!/usr/bin/env python
#
# Copyright 2008, 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... | apache-2.0 |
jsaveta/Lance | src/rescal/build/lib.linux-x86_64-2.7/setuptools/tests/test_test.py | 68 | 3738 | # -*- coding: UTF-8 -*-
"""develop tests
"""
import sys
import os, shutil, tempfile, unittest
import tempfile
import site
from StringIO import StringIO
from distutils.errors import DistutilsError
from setuptools.command.test import test
from setuptools.command import easy_install as easy_install_pkg
from setuptools.... | apache-2.0 |
xlqian/navitia | source/sql/alembic/versions/90f4275525_add_data.py | 5 | 2060 | """Add data
Revision ID: 90f4275525
Revises: 35c20e6103d6
Create Date: 2014-09-24 16:57:53.121569
"""
# revision identifiers, used by Alembic.
revision = '90f4275525'
down_revision = '35c20e6103d6'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.execute(
"""
INSERT INTO navitia.co... | agpl-3.0 |
LarryHillyer/PoolHost | PoolHost/env/Lib/site-packages/django/contrib/gis/db/models/aggregates.py | 414 | 2395 | from django.contrib.gis.db.models.fields import ExtentField
from django.db.models.aggregates import Aggregate
__all__ = ['Collect', 'Extent', 'Extent3D', 'MakeLine', 'Union']
class GeoAggregate(Aggregate):
function = None
is_extent = False
def as_sql(self, compiler, connection):
# this will be c... | gpl-3.0 |
b-jesch/service.fritzbox.callmonitor | resources/lib/PhoneBooks/pyicloud/vendorlibs/click/decorators.py | 204 | 10941 | import sys
import inspect
from functools import update_wrapper
from ._compat import iteritems
from ._unicodefun import _check_for_unicode_literals
from .utils import echo
from .globals import get_current_context
def pass_context(f):
"""Marks a callback as wanting to receive the current context
object as fir... | gpl-2.0 |
Y3K/django | tests/model_options/models/tablespaces.py | 342 | 1853 | from django.db import models
# Since the test database doesn't have tablespaces, it's impossible for Django
# to create the tables for models where db_tablespace is set. To avoid this
# problem, we mark the models as unmanaged, and temporarily revert them to
# managed during each test. We also set them to use the sam... | bsd-3-clause |
madscatt/zazzie | src/sassie/simulate/torsion_angle_monte_carlo/extensions/dna_overlap/setup_dna_overlap.py | 3 | 1293 | #!/usr/bin/evn python
# Author: Steven C. Howell
# Purpose: setup file for building the fortran dna overlap calculator
# Created: May 2014
# $Id: setup_dna_overlap.py 2545 2015-06-20 04:51:24Z schowell $
# Note: copied from setup_electrostatics.py
#
'''
SASSIE Copyright (C) 2011 Joseph E. Curtis
This program ... | gpl-3.0 |
talk-to/PjSip-Repo | tests/pjsua/inc_const.py | 38 | 1330 | # $Id$
# Useful constants
##########################
# MENU OUTPUT
#
##########################
# EVENTS
#
# Text to expect when there is incoming call
EVENT_INCOMING_CALL = "Press .* answer"
##########################
# CALL STATES
#
# Call state is CALLING
STATE_CALLING = "state.*CALLING"
# Call state is EARL... | gpl-2.0 |
tmimori/frappe | frappe/tests/ui/test_todo.py | 16 | 1072 | from __future__ import print_function
from frappe.utils.selenium_testdriver import TestDriver
import unittest
import time, os
class TestToDo(unittest.TestCase):
def setUp(self):
self.driver = TestDriver()
def test_todo(self):
self.driver.login()
# list view
self.driver.set_route('List', 'ToDo')
time.sle... | mit |
wada314/vbrwiki | plugins/macro/ListEquipsInCategory.py | 1 | 2299 | # -*- encoding: utf-8 -*-
import urllib2
import csv
from util import *
BGCOLOR_1 = '#ffffff'
BGCOLOR_2 = '#eafcf2'
def macro_ListEquipsInCategory(macro, _trailing_args=[]):
request = macro.request
formatter = macro.formatter
parser = macro.parser
requested_cat = _trailing_args[0] if len(_trailing_a... | gpl-3.0 |
Fishrock123/node-gyp | gyp/pylib/gyp/mac_tool.py | 1569 | 23354 | #!/usr/bin/env python
# Copyright (c) 2012 Google Inc. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Utility functions to perform Xcode-style build steps.
These functions are executed via gyp-mac-tool when using the Makefile generator.
""... | mit |
mitar/django | django/contrib/sessions/backends/file.py | 14 | 5246 | import errno
import os
import tempfile
from django.conf import settings
from django.contrib.sessions.backends.base import SessionBase, CreateError
from django.core.exceptions import SuspiciousOperation, ImproperlyConfigured
class SessionStore(SessionBase):
"""
Implements a file based session store.
"""
... | bsd-3-clause |
zstars/weblabdeusto | server/launch/sample_balanced2_concurrent_experiments/main_machine/lab_and_experiment/experiment8/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 |
nerdymcnerdyson/pythonPlay | openHouses/google-maps-services-python-master/test/test_distance_matrix.py | 13 | 6588 | #
# 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 ... | apache-2.0 |
lollipop-og/F93_LGE975_KK_Kernel | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
afandria/mojo | tools/valgrind/valgrind_test.py | 45 | 33079 | # 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.
"""Runs an exe through Valgrind and puts the intermediate files in a
directory.
"""
import datetime
import glob
import logging
import optparse
import os... | bsd-3-clause |
mrjaydee82/SinLessKernelNew1 | tools/perf/scripts/python/Perf-Trace-Util/lib/Perf/Trace/Util.py | 12527 | 1935 | # Util.py - Python extension for perf script, miscellaneous utility code
#
# Copyright (C) 2010 by Tom Zanussi <tzanussi@gmail.com>
#
# This software may be distributed under the terms of the GNU General
# Public License ("GPL") version 2 as published by the Free Software
# Foundation.
import errno, os
FUTEX_WAIT = 0... | gpl-2.0 |
endthestart/schwag | schwag/schwag/settings/production.py | 1 | 2871 | """Production settings and globals."""
from __future__ import absolute_import
from os import environ
from .base import *
# Normally you should not import ANYTHING from Django directly
# into your settings, but ImproperlyConfigured is an exception.
from django.core.exceptions import ImproperlyConfigured
DEBUG=True
... | mit |
j4/horizon | openstack_dashboard/dashboards/project/images/images/tests.py | 25 | 17104 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 |
KSanthanam/rethinkdb | test/scenarios/failover_to_secondary.py | 9 | 3257 | #!/usr/bin/env python
# Copyright 2010-2015 RethinkDB, all rights reserved.
import os, sys, time
from pprint import pformat
sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), os.path.pardir, 'common')))
import workload_runner, rdb_unittest, scenario_common, utils, vcoptparse
from utils import pri... | agpl-3.0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.