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
auto-mat/klub
apps/aklub/migrations/0101_auto_20210416_1631.py
1
3249
# Generated by Django 2.2.19 on 2021-04-16 14:31 import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('aklub', '0100_auto_20210416_1347'), ] operations = [ migrations.AddField( ...
gpl-3.0
MeshCollider/bitcoin
contrib/devtools/pixie.py
21
13221
#!/usr/bin/env python3 # Copyright (c) 2020 Wladimir J. van der Laan # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. ''' Compact, self-contained ELF implementation for bitcoin-core security checks. ''' import struct import types fr...
mit
pratikmallya/hue
desktop/core/ext-py/Django-1.6.10/tests/many_to_one/tests.py
59
21778
from __future__ import absolute_import from copy import deepcopy import datetime from django.core.exceptions import MultipleObjectsReturned, FieldError from django.test import TestCase from django.utils import six from django.utils.translation import ugettext_lazy from .models import Article, Reporter class ManyTo...
apache-2.0
margguo/python-ivi
ivi/agilent/agilentMSOX2024A.py
7
1695
""" Python Interchangeable Virtual Instrument Library Copyright (c) 2012-2014 Alex Forencich Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the...
mit
mattilyra/gensim
gensim/sklearn_api/w2vmodel.py
1
8438
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Chinmaya Pancholi <chinmayapancholi13@gmail.com> # Copyright (C) 2017 Radim Rehurek <radimrehurek@seznam.cz> # Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html """Scikit learn interface for :class:`~gensim.models.word2vec.Word2Vec`. Fol...
lgpl-2.1
amarandon/smeuhsocial
apps/friends/management.py
1
1401
from django.conf import settings from django.db.models import signals from django.utils.translation import ugettext_noop as _ from django.apps import apps if "notification" in settings.INSTALLED_APPS: from notification import models as notification notification_appconfig = apps.get_app_config('notification') ...
mit
uwafsl/MissionPlanner
Lib/distutils/archive_util.py
58
8065
"""distutils.archive_util Utility functions for creating archive files (tarballs, zip files, that sort of thing).""" __revision__ = "$Id$" import os from warnings import warn import sys from distutils.errors import DistutilsExecError from distutils.spawn import spawn from distutils.dir_util import mkpa...
gpl-3.0
xlongfeng/agreement
testcase/accrediting.py
1
5773
#!/usr/bin/env python # -*- coding: utf-8 -*- from datetime import date from jinja2 import Environment, FileSystemLoader from huizi import * sampleItems = [ { "name": "咪啊(山头尾顶)", # 会头 "quantity": 2, # 名数 "startdate": date(2010, 1, 9), # 开始时间 "tip": 300, # 会头钱 "checkin": 200...
gpl-3.0
psychopy/versions
psychopy/visual/backends/_base.py
1
5316
#!/usr/bin/env python # -*- coding: utf-8 -*- # Part of the PsychoPy library # Copyright (C) 2002-2018 Jonathan Peirce (C) 2019-2020 Open Science Tools Ltd. # Distributed under the terms of the GNU General Public License (GPL). """A Backend class defines the core low-level functions required by a Window class, such a...
gpl-3.0
mrdon/bottle
test/test_mako.py
50
2041
import unittest from tools import warn from bottle import MakoTemplate, mako_template, mako_view, touni class TestMakoTemplate(unittest.TestCase): def test_string(self): """ Templates: Mako string""" t = MakoTemplate('start ${var} end').render(var='var') self.assertEqual('start var end', t)...
mit
naousse/odoo
addons/document/wizard/__init__.py
444
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
KillerLink/gl-engine
glad/glad/lang/volt/loader/__init__.py
9
1540
LOAD_OPENGL_DLL = ''' private global Library libGL; extern(System) private alias gladGetProcAddressPtrType = void* function(const(char)*); private global gladGetProcAddressPtrType gladGetProcAddressPtr; %(pre)s bool %(init)s() { version(Windows) { libGL = Library.load("opengl32.dll"); } else version(O...
gpl-3.0
mckold/limbo-android
jni/qemu/scripts/tracetool/backend/__init__.py
111
3423
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Backend management. Creating new backends --------------------- A new backend named 'foo-bar' corresponds to Python module 'tracetool/backend/foo_bar.py'. A backend module should provide a docstring, whose first non-empty line will be considered its short descripti...
gpl-2.0
natetrue/ReplicatorG
skein_engines/skeinforge-40/fabmetheus_utilities/geometry/geometry_utilities/evaluate_elements/document.py
2
3353
""" Boolean geometry utilities. """ from __future__ import absolute_import #Init has to be imported first because it has code to workaround the python bug where relative imports don't work if the module is imported as a main module. import __init__ __author__ = 'Enrique Perez (perez_enrique@yahoo.com)' __credits__ ...
gpl-2.0
cloudposse/build-harness
bin/generate_related_references.py
1
3607
#!/usr/bin/env python3 import json import os import subprocess import requests from github import Github from iteration_utilities import unique_everseen from ruamel.yaml import YAML GH_TOKEN = os.environ["GITHUB_TOKEN"] GH_ORG_NAME = os.getenv("GH_ORG_NAME", "cloudposse") GH_SEARCH_PATTERN = os.getenv("GH_SEARCH_PAT...
apache-2.0
DirectXMan12/nova-hacking
nova/api/openstack/compute/contrib/deferred_delete.py
7
2985
# 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 requ...
apache-2.0
s87485759/Monad2015-trial
LookAhead/mutation.py
1
2963
import random from datetime import datetime, timedelta import struct import time from itertools import repeat from collections import Sequence formatString = '%H:%M' def strTimeProp(start, end, format, prop): """Get a time at a proportion of a range of two formatted times. start and end should be strings s...
apache-2.0
gauravbose/digital-menu
tests/signals/tests.py
311
10273
from __future__ import unicode_literals from django.db import models from django.db.models import signals from django.dispatch import receiver from django.test import TestCase from django.utils import six from .models import Author, Book, Car, Person class BaseSignalTest(TestCase): def setUp(self): # Sa...
bsd-3-clause
muffl0n/ansible-cmdb
lib/mako/cache.py
60
7730
# mako/cache.py # Copyright (C) 2006-2015 the Mako authors and contributors <see AUTHORS file> # # This module is part of Mako and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php from mako import compat, util _cache_plugins = util.PluginLoader("mako.cache") register_plugin = _...
mit
pitsios-s/MissionariesAndCannibals
src/World.py
1
1874
#!/usr/bin/python3 from State import State class World: """Every instance of this class represents the world of the game, in a specific state.""" def __init__(self, missionaries = 3, cannibals = 3, state = None, history = None): self.missionaries = missionaries self.c...
mit
ToontownUprising/src
toontown/effects/FireworkShows.py
6
638065
from FireworkGlobals import * from toontown.toonbase import ToontownGlobals from toontown.parties import PartyGlobals shows = {ToontownGlobals.JULY4_FIREWORKS: [((2, ROCKET, RED, RED, ...
mit
rhelmer/socorro-lib
socorro/unittest/cron/jobs/base.py
13
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 socorro.unittest.cron.setup_configman import ( get_config_manager_for_crontabber, ) from crontabber.tests impo...
mpl-2.0
marcore/edx-platform
lms/djangoapps/commerce/migrations/0002_commerceconfiguration.py
59
1477
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('commerce...
agpl-3.0
sivertkh/gtrackcore
gtrackcore/track/format/SegmentToPointFormatConverter.py
2
3905
import numpy from math import floor, ceil from gtrackcore.track.core.TrackView import TrackView from gtrackcore.track.core.VirtualNumpyArray import VirtualNumpyArray from gtrackcore.track.format.FormatConverter import FormatConverter class VirtualStartFromInterval(VirtualNumpyArray): def __init__(self, startArra...
gpl-3.0
cxhernandez/msmbuilder
msmbuilder/tests/test_dataset.py
7
6441
from __future__ import print_function, absolute_import, division import os import shutil import tempfile import numpy as np from mdtraj.testing import get_fn from nose.tools import assert_raises, assert_raises_regexp from sklearn.externals.joblib import Parallel, delayed from msmbuilder.dataset import dataset from ....
lgpl-2.1
FLYKingdom/MyCode
PycharmProjects/PythonTest/venv/lib/python2.7/site-packages/pip/_vendor/requests/packages/chardet/codingstatemachine.py
2931
2318
######################## BEGIN LICENSE BLOCK ######################## # The Original Code is mozilla.org code. # # The Initial Developer of the Original Code is # Netscape Communications Corporation. # Portions created by the Initial Developer are Copyright (C) 1998 # the Initial Developer. All Rights Reserved. # # Con...
mit
TeamEOS/kernel_oppo_r7plus
tools/perf/scripts/python/syscall-counts.py
11181
1522
# system call counts # (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 import sys sys.path.append(os.envir...
gpl-2.0
JonathanSalwan/Triton
src/examples/python/ctf-writeups/hackcon-2016-angry-reverser/solve.py
1
14781
#!/usr/bin/env python3 ## -*- coding: utf-8 -*- ## ## Jonathan Salwan - 2018-11-02 ## ## This code solve the angry-reverser from the HackCon 2016 CTF. ## The particularity of this sample is that we use an external solver to solve ## queries instead of using the internal Triton's solver (even if in both cases ## it...
apache-2.0
turter99/android_kernel_samsung_jaltektt_perseus_4.2.2
tools/perf/scripts/python/sctop.py
11180
1924
# system call top # (c) 2010, Tom Zanussi <tzanussi@gmail.com> # Licensed under the terms of the GNU GPL License version 2 # # Periodically displays system-wide system call totals, broken down by # syscall. If a [comm] arg is specified, only syscalls called by # [comm] are displayed. If an [interval] arg is specified,...
gpl-2.0
elg/passhport
passhport-admin/manager/requests_functions.py
3
8892
# -*-coding:Utf-8 -*- """Contains functions which make requests to the server""" # Compatibility 2.7-3.4 from __future__ import absolute_import from __future__ import unicode_literals from builtins import input import sys, locale import requests, re from . import user as user from . import target as target from . i...
agpl-3.0
jamesblunt/edx-platform
common/test/acceptance/pages/studio/course_page.py
172
1522
""" Base class for pages specific to a course in Studio. """ import os from opaque_keys.edx.locator import CourseLocator from bok_choy.page_object import PageObject from . import BASE_URL class CoursePage(PageObject): """ Abstract base class for page objects specific to a course in Studio. """ # Ove...
agpl-3.0
civicdocs/civicdocs.io
server/civicdocs/views.py
1
8038
import datetime from pyramid.response import Response from pyramid.view import view_config from sqlalchemy.exc import DBAPIError from .models import ( Users, Municipalities, Entities, Addresses, DocumentTypes, Jobs, Scrapers, Dispatchers, Workers, JobRuns, Documents, D...
gpl-3.0
tbinjiayou/Odoo
addons/l10n_in/__init__.py
702
1046
# -*- 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
heli522/scikit-learn
examples/model_selection/plot_precision_recall.py
249
6150
""" ================ Precision-Recall ================ Example of Precision-Recall metric to evaluate classifier output quality. In information retrieval, precision is a measure of result relevancy, while recall is a measure of how many truly relevant results are returned. A high area under the curve represents both ...
bsd-3-clause
maestromusic/maestro
maestro/plugins/renamer/plugin.py
1
7742
# -*- coding: utf-8 -*- # Maestro Music Manager - https://github.com/maestromusic/maestro # Copyright (C) 2009-2015 Martin Altmayer, Michael Helmling # # 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 Foun...
gpl-3.0
xouillet/sigal
docs/conf.py
1
5694
# -*- coding: utf-8 -*- import os import re import sys import alabaster # If extensions (or modules to document with autodoc) are in another directory, # add these directories to sys.path here. If the directory is relative to the # documentation root, use os.path.abspath to make it absolute, like shown here. sys.pat...
mit
mandeepdhami/stevedore
stevedore/sphinxext.py
34
3790
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
apache-2.0
shsingh/ansible
test/support/integration/plugins/module_utils/cloud.py
194
8653
# # (c) 2016 Allen Sanabria, <asanabria@linuxdynasty.org> # # 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...
gpl-3.0
Jorge-Rodriguez/ansible
lib/ansible/modules/cloud/rackspace/rax_cdb_user.py
102
5930
#!/usr/bin/python # Copyright: 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 ANSIBLE_METADATA = {'metadata_version': '1.1', 'status': ['preview'], ...
gpl-3.0
jamesbeebop/CouchPotatoServer
couchpotato/core/media/movie/providers/metadata/xbmc.py
55
13374
from xml.etree.ElementTree import Element, SubElement, tostring import os import re import traceback import xml.dom.minidom from couchpotato.core.media.movie.providers.metadata.base import MovieMetaData from couchpotato.core.helpers.encoding import toUnicode from couchpotato.core.helpers.variable import getTitle from ...
gpl-3.0
akopich/spark
examples/src/main/python/mllib/regression_metrics_example.py
158
2104
# # 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
dpetzold/django
django/core/signing.py
84
7072
""" Functions for creating and restoring url-safe signed JSON objects. The format used looks like this: >>> signing.dumps("hello") 'ImhlbGxvIg:1QaUZC:YIye-ze3TTx7gtSv422nZA4sgmk' There are two components here, separated by a ':'. The first component is a URLsafe base64 encoded JSON of the object passed to dumps(). T...
bsd-3-clause
RicterZ/riXSS
lib/valid.py
2
1394
""" Check input.data are valid or not """ import re from lib.language.en import email_invalid, password_not_same, password_invalid, something_null class ValidChecker(object): is_valid = True error = '' def null_check(self, data): for key in data.keys(): if data[key] == '': ...
gpl-2.0
elkingtonmcb/django
tests/generic_views/test_dates.py
119
35036
# -*- coding: utf-8 -*- from __future__ import unicode_literals import datetime from django.core.exceptions import ImproperlyConfigured from django.test import TestCase, override_settings, skipUnlessDBFeature from django.test.utils import requires_tz_support from django.utils import timezone from .models import Arti...
bsd-3-clause
ZachRiegel/scriptbin
pypyjs/modules/test/test_mhlib.py
126
11142
""" Tests for the mhlib module Nick Mathewson """ ### BUG: This suite doesn't currently test the mime functionality of ### mhlib. It should. import unittest from test.test_support import run_unittest, TESTFN, import_module import os, StringIO import sys mhlib = import_module('mhlib', deprecated=True) if ...
gpl-3.0
wanliming11/MurlocAlgorithms
Last/OpenSource/Python-3.6.1/Tools/demo/eiffel.py
60
3906
#!/usr/bin/env python3 """ Support Eiffel-style preconditions and postconditions for functions. An example for Python metaclasses. """ import unittest from types import FunctionType as function class EiffelBaseMetaClass(type): def __new__(meta, name, bases, dict): meta.convert_methods(dict) ret...
mit
abircse06/youtube-dl
youtube_dl/extractor/hellporno.py
153
2279
from __future__ import unicode_literals import re from .common import InfoExtractor from ..utils import ( js_to_json, remove_end, ) class HellPornoIE(InfoExtractor): _VALID_URL = r'https?://(?:www\.)?hellporno\.com/videos/(?P<id>[^/]+)' _TEST = { 'url': 'http://hellporno.com/videos/dixie-is-...
unlicense
nbcesar/sabergrade
lib/python2.7/site-packages/jinja2/_stringdefs.py
990
404291
# -*- coding: utf-8 -*- """ jinja2._stringdefs ~~~~~~~~~~~~~~~~~~ Strings of all Unicode characters of a certain category. Used for matching in Unicode-aware languages. Run to regenerate. Inspired by chartypes_create.py from the MoinMoin project, original implementation from Pygments. :co...
apache-2.0
rolandgeider/wger
wger/core/tests/test_robots_txt.py
1
1124
# This file is part of wger Workout Manager. # # wger Workout Manager is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # wger W...
agpl-3.0
shad7/trakt.py
tests/test_user_list.py
1
7839
from tests.core.helpers import authenticated_response from datetime import datetime from dateutil.tz import tzutc from trakt import Trakt import responses @responses.activate def test_movies_get(): responses.add_callback( responses.GET, 'http://mock/users/me/lists/movies', callback=authenticated_...
mit
dpyro/servo
components/script/dom/bindings/codegen/parser/tests/test_constructor.py
102
5283
import WebIDL def WebIDLTest(parser, harness): def checkArgument(argument, QName, name, type, optional, variadic): harness.ok(isinstance(argument, WebIDL.IDLArgument), "Should be an IDLArgument") harness.check(argument.identifier.QName(), QName, "Argument has the right QName") ...
mpl-2.0
taaviteska/django
django/conf/locale/fi/formats.py
65
1323
# This file is distributed under the same license as the Django package. # # The *_FORMAT strings use the Django date format syntax, # see http://docs.djangoproject.com/en/dev/ref/templates/builtins/#date DATE_FORMAT = 'j. E Y' TIME_FORMAT = 'G.i' DATETIME_FORMAT = r'j. E Y \k\e\l\l\o G.i' YEAR_MONTH_FORMAT = 'F Y' MON...
bsd-3-clause
softak/webfaction_demo
vendor-local/lib/python/celery/tests/__init__.py
32
2469
from __future__ import absolute_import import logging import os import sys from importlib import import_module config_module = os.environ.setdefault("CELERY_TEST_CONFIG_MODULE", "celery.tests.config") os.environ.setdefault("CELERY_CONFIG_MODULE", config_module) os.environ["CELE...
bsd-3-clause
sbesson/snoopycrimecop
test/integration/test_tag_release.py
2
3603
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2012-2013 University of Dundee & Open Microscopy Environment # All Rights Reserved. # # 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 Foundat...
gpl-2.0
bsmr-ansible/ansible-modules-core
network/junos/junos_command.py
15
7937
#!/usr/bin/python # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Ansible is distribut...
gpl-3.0
badreddinetahir/pwn_plug_sources
src/metagoofil/pdfminer/cmapdb.py
53
11181
#!/usr/bin/env python2 """ Adobe character mapping (CMap) support. CMaps provide the mapping between character codes and Unicode code-points to character ids (CIDs). More information is available on the Adobe website: http://opensource.adobe.com/wiki/display/cmap/CMap+Resources """ import sys import re import o...
gpl-3.0
Andrew-McNab-UK/DIRAC
Core/Utilities/test/Test_Pfn.py
9
5256
######################################################################## # Author: Krzysztof.Ciba@NOSPAMgmail.com # Date: 2011/12/14 15:07:01 ######################################################################## """ :mod: PfnTestCase ======================= .. module: PfnTestCase :synopsis: test case f...
gpl-3.0
marcore/edx-platform
openedx/core/djangoapps/programs/tasks/v1/tasks.py
9
7735
""" This file contains celery tasks for programs-related functionality. """ from celery import task from celery.utils.log import get_task_logger # pylint: disable=no-name-in-module, import-error from django.conf import settings from django.contrib.auth.models import User from edx_rest_api_client.client import EdxRestA...
agpl-3.0
andrewleech/SickRage
lib/sqlalchemy/interfaces.py
79
10918
# sqlalchemy/interfaces.py # Copyright (C) 2007-2014 the SQLAlchemy authors and contributors <see AUTHORS file> # Copyright (C) 2007 Jason Kirtland jek@discorporate.us # # This module is part of SQLAlchemy and is released under # the MIT License: http://www.opensource.org/licenses/mit-license.php """Deprecated core ev...
gpl-3.0
bearstech/ansible
lib/ansible/plugins/action/ios_config.py
126
4162
# # (c) 2017, Red Hat, 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. # # Ansible is...
gpl-3.0
alazyer/oscar
frobshop/oscar/apps/dashboard/catalogue/widgets.py
4
1581
import six from django.forms.util import flatatt from django.core.urlresolvers import reverse from django.utils.safestring import mark_safe from django import forms from six.moves import filter from six.moves import map class ProductSelect(forms.Widget): is_multiple = False css = 'select2 input-xlarge' d...
gpl-2.0
barnsnake351/nova
nova/tests/functional/api_sample_tests/test_hosts.py
4
2564
# Copyright 2012 Nebula, Inc. # Copyright 2013 IBM Corp. # # 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...
apache-2.0
cprov/snapcraft
snapcraft/plugins/jhbuild.py
2
10057
# -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*- # # Copyright (C) 2017 Canonical Ltd # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License version 3 as # published by the Free Software Foundation. # # This program is distributed in the h...
gpl-3.0
Juraci/tempest
tempest/api_schema/response/compute/v2_1/quotas.py
34
2714
# Copyright 2014 NEC Corporation. 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 ...
apache-2.0
baiyunping333/BurpSuite-Plugins
faraday/test_cases/command_history.py
2
4271
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Faraday Penetration Test IDE - Community Version Copyright (C) 2013 Infobyte LLC (http://www.infobytesec.com/) See the file 'doc/LICENSE' for the license information ''' import unittest import sys import os sys.path.append(os.path.abspath(os.getcwd())) # from plugins...
gpl-2.0
vizual54/MissionPlanner
Lib/hashlib.py
53
5159
# $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; initia...
gpl-3.0
ThomasFeher/audacity
lib-src/lv2/lv2/plugins/eg-metro.lv2/waflib/Configure.py
181
9880
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,sys,time from waflib import ConfigSet,Utils,Options,Logs,Context,Build,Errors try: from urllib import request except ImportError: from urllib import urlopen ...
gpl-2.0
omasanori/gyp
pylib/gyp/__init__.py
574
21473
#!/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. import copy import gyp.input import optparse import os.path import re import shlex import sys import traceback from gyp.common import GypErr...
bsd-3-clause
dragly/conan
conans/client/detect.py
1
5953
import re from subprocess import Popen, PIPE, STDOUT import platform from conans.client.output import Color from conans.model.version import Version import os def _execute(command): proc = Popen(command, shell=True, bufsize=1, stdout=PIPE, stderr=STDOUT) output_buffer = [] while True: line = proc...
mit
mmjbot/muslogger
lib/werkzeug/security.py
302
8407
# -*- coding: utf-8 -*- """ werkzeug.security ~~~~~~~~~~~~~~~~~ Security related helpers such as secure password hashing tools. :copyright: (c) 2013 by the Werkzeug Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ import os import hmac import hashlib import posi...
apache-2.0
Drooids/odoo
addons/account/project/project.py
273
2423
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU...
agpl-3.0
shanemcd/ansible
lib/ansible/modules/cloud/amazon/ec2_key.py
12
8606
#!/usr/bin/python # -*- coding: utf-8 -*- # 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. # ...
gpl-3.0
wiltonlazary/arangodb
3rdParty/boost/1.61.0/tools/build/test/core_nt_cmd_line.py
45
8815
#!/usr/bin/python # Copyright 2001 Dave Abrahams # Copyright 2011 Steven Watanabe # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # Tests Windows command line construction. # # Note that the regular 'echo' is an i...
apache-2.0
williamsmichael/FishFace2
lib/fishface_logging.py
2
1405
import logging import logging.handlers import json import etc.fishface_config as ff_conf logger = logging.getLogger('fishface') logger.setLevel(ff_conf.OVERALL_LOG_LEVEL) formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s') file_handler = logging.FileHandler(ff_conf.LOG_FILE_PATH) file_ha...
gpl-2.0
RJVB/audacity
lib-src/lv2/lilv/waflib/Scripting.py
63
10597
#! /usr/bin/env python # encoding: utf-8 # WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file import os,shlex,shutil,traceback,errno,sys,stat from waflib import Utils,Configure,Logs,Options,ConfigSet,Context,Errors,Build,Node build_dir_override=None no_climb_commands=[...
gpl-2.0
mabrosim/mGerritStats
pull_reviews.py
1
4773
#!/usr/bin/python3 """ Copyright (c) 2014, Maxim Abrosimov 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 c...
bsd-3-clause
5GExchange/escape
pox/pox/misc/full_payload.py
46
1079
# Copyright 2012 James McCauley # # 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 writi...
apache-2.0
oonid/dilingkari
lib/flask/testsuite/ext.py
563
5156
# -*- coding: utf-8 -*- """ flask.testsuite.ext ~~~~~~~~~~~~~~~~~~~ Tests the extension import thing. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import sys import unittest try: from imp import reload as reload_module except ImportError: reload...
mit
cernops/neutron
neutron/db/vpn/vpn_db.py
5
31254
# (c) Copyright 2013 Hewlett-Packard Development Company, L.P. # 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
xaxa89/mitmproxy
test/mitmproxy/addons/test_serverplayback.py
1
9754
import urllib import pytest from mitmproxy.test import taddons from mitmproxy.test import tflow import mitmproxy.test.tutils from mitmproxy.addons import serverplayback from mitmproxy import options from mitmproxy import exceptions from mitmproxy import io def tdump(path, flows): w = io.FlowWriter(open(path, "w...
mit
edenmark/SAMtoCIRCOS
SAMtoCIRCOS.py
1
17032
#!/usr/bin/env python ############################################################################### # # genomeCoverage.py version 1.0 # # Calculates windowed coverage across a genome and finds mate # matches and positions for each genome scaffold using a SAM file # # Calculates GC content across genom...
mit
sjperkins/tensorflow
tensorflow/python/util/decorator_utils.py
126
3588
# 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
lucafavatella/intellij-community
python/helpers/py3only/docutils/parsers/rst/languages/pt_br.py
52
3956
# $Id: pt_br.py 7119 2011-09-02 13:00:23Z milde $ # Author: David Goodger <goodger@python.org> # Copyright: This module has been placed in the public domain. # New language mappings are welcome. Before doing a new translation, please # read <http://docutils.sf.net/docs/howto/i18n.html>. Two files must be # translate...
apache-2.0
Nepherhotep/django
tests/multiple_database/routers.py
379
1927
from __future__ import unicode_literals from django.db import DEFAULT_DB_ALIAS class TestRouter(object): """ Vaguely behave like primary/replica, but the databases aren't assumed to propagate changes. """ def db_for_read(self, model, instance=None, **hints): if instance: retu...
bsd-3-clause
g19-hs/personfinder
app/babel/dates.py
9
43645
# -*- coding: utf-8 -*- """ babel.dates ~~~~~~~~~~~ Locale dependent formatting and parsing of dates and times. The default locale for the functions in this module is determined by the following environment variables, in that order: * ``LC_TIME``, * ``LC_ALL``, and * ``LANG`` ...
apache-2.0
brianmhunt/SIWorldMap
jinja2/utils.py
113
18640
# -*- coding: utf-8 -*- """ jinja2.utils ~~~~~~~~~~~~ Utility functions. :copyright: (c) 2010 by the Jinja Team. :license: BSD, see LICENSE for more details. """ import re import sys import errno try: from thread import allocate_lock except ImportError: from dummy_thread import allocate_lo...
mit
lmallin/coverage_test
python_venv/lib/python2.7/site-packages/numpy/ma/tests/test_regression.py
35
2602
from __future__ import division, absolute_import, print_function import warnings import numpy as np from numpy.testing import (assert_, TestCase, assert_array_equal, assert_allclose, run_module_suite, suppress_warnings) from numpy.compat import sixu rlevel = 1 ...
mit
sputnick-dev/weboob
modules/voyagessncf/pages.py
7
4455
# -*- coding: utf-8 -*- # Copyright(C) 2013 Romain Bignon # # This file is part of weboob. # # weboob is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your...
agpl-3.0
Kast0rTr0y/ansible
lib/ansible/modules/storage/netapp/netapp_e_amg_sync.py
45
10696
#!/usr/bin/python # (c) 2016, NetApp, 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....
gpl-3.0
Taapat/enigma2-openpli-fulan
lib/python/Components/Sources/RecordState.py
4
1126
from Source import Source from Components.Element import cached from enigma import iRecordableService from Components.SystemInfo import SystemInfo class RecordState(Source): def __init__(self, session): Source.__init__(self) self.records_running = 0 self.session = session session.nav.record_event.append(self....
gpl-2.0
ivan73/smarthome
plugins/dmx/__init__.py
4
4891
#!/usr/bin/env python3 # vim: set encoding=utf-8 tabstop=4 softtabstop=4 shiftwidth=4 expandtab ######################################################################### # Copyright 2011-2013 Marcus Popp marcus@popp.mx ######################################################################### # ...
gpl-3.0
googleapis/gapic-generator-python
tests/integration/goldens/logging/samples/generated_samples/logging_generated_logging_v2_config_service_v2_update_cmek_settings_async.py
1
1539
# -*- coding: utf-8 -*- # Copyright 2020 Google LLC # # 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
andremissaglia/ekaaty_liveusbcreator
liveusb/creator.py
1
51203
# -*- coding: utf-8 -*- # # Copyright © 2008-2010 Red Hat, Inc. All rights reserved. # Copyright © 2008-2010 Luke Macken <lmacken@redhat.com> # # 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 Lic...
gpl-2.0
pinax/pinax-project-symposion
project_name/proposals/forms.py
2
1233
from django import forms from markitup.widgets import MarkItUpWidget from .models import TalkProposal, TutorialProposal class ProposalForm(forms.ModelForm): def clean_description(self): value = self.cleaned_data["description"] if len(value) > 400: raise forms.ValidationError( ...
mit
DTMilodowski/LiDAR_canopy
src/least_squares_fitting.py
1
3720
import numpy as np # This function calculates best fitting polynomial line (up to order 3) for a # given set of input points x and y, using linear least squares inversion. # Default is for 1st order. # x and y are one dimensional arrays def oneD_least_squares_polynomial(x,y,order=1): # first up - mask nodata values...
gpl-3.0
foss-for-synopsys-dwc-arc-processors/openocd
contrib/xsvf_tools/svf2xsvf.py
101
26710
#!/usr/bin/python3.0 # Copyright 2008, SoftPLC Corporation http://softplc.com # Dick Hollenbeck dick@softplc.com # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the Lic...
gpl-2.0
AntouanK/rethinkdb
test/rdb_workloads/pretty_print.py
50
1498
#!/usr/bin/env python # Copyright 2010-2012 RethinkDB, all rights reserved. # coding=utf8 # Environment variables: # HOST: location of server (default = "localhost") # PORT: port that server listens for RDB protocol traffic on (default = 14356) # DB_NAME: database to look for test table in (default = "Welcome-db") # T...
agpl-3.0
PeterWangIntel/blink-crosswalk
Tools/Scripts/webkitpy/common/net/web_mock.py
184
2241
# Copyright (C) 2011 Google Inc. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of source code must retain the above copyright # notice, this list of conditions and the f...
bsd-3-clause
anlar/prismriver
prismriver/plugin/lyricsfreak.py
2
1774
from prismriver.plugin.common import Plugin from prismriver.struct import Song class LyricsFreakPlugin(Plugin): ID = 'lyricsfreak' def __init__(self, config): super(LyricsFreakPlugin, self).__init__('LyricsFreak', config) def search_song(self, artist, title): link = 'http://www.lyricsfre...
mit
carlosefr/quicklook
components/connections.py
1
6270
#!/usr/bin/env python # -*- coding: iso8859-1 -*- # # connections.py - network connections statistics # # Copyright (c) 2005-2007, Carlos Rodrigues <cefrodrigues@mail.telepac.pt> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License (version 2) ...
gpl-2.0