repo_name
stringlengths
5
100
ref
stringlengths
12
67
path
stringlengths
4
244
copies
stringlengths
1
8
content
stringlengths
0
1.05M
⌀
fhaoquan/kbengine
refs/heads/master
kbe/res/scripts/common/Lib/ctypes/test/__main__.py
105
from ctypes.test import load_tests import unittest unittest.main()
kikokubo/Sick-Beard-TPB
refs/heads/ThePirateBay
lib/unidecode/x053.py
252
data = ( 'Yun ', # 0x00 'Mwun ', # 0x01 'Nay ', # 0x02 'Gai ', # 0x03 'Gai ', # 0x04 'Bao ', # 0x05 'Cong ', # 0x06 '[?] ', # 0x07 'Xiong ', # 0x08 'Peng ', # 0x09 'Ju ', # 0x0a 'Tao ', # 0x0b 'Ge ', # 0x0c 'Pu ', # 0x0d 'An ', # 0x0e 'Pao ', # 0x0f 'Fu ', # 0x10 'Gong...
pdellaert/ansible
refs/heads/devel
lib/ansible/modules/cloud/azure/azure_rm_devtestlabvirtualnetwork_info.py
20
#!/usr/bin/python # # Copyright (c) 2019 Zim Kalinowski, (@zikalino) # # 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', ...
pescobar/easybuild-easyblocks
refs/heads/master
easybuild/easyblocks/a/adf.py
1
## # Copyright 2016-2019 Ghent University # # This file is part of EasyBuild, # originally created by the HPC team of Ghent University (http://ugent.be/hpc/en), # with support of Ghent University (http://ugent.be/hpc), # the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be), # Flemish Research Foundation (F...
soundcloud/essentia
refs/heads/master
test/src/unittest/spectral/test_energybandratio.py
10
#!/usr/bin/env python # Copyright (C) 2006-2013 Music Technology Group - Universitat Pompeu Fabra # # This file is part of Essentia # # Essentia 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 (FSF), e...
kleientertainment/ds_mod_tools
refs/heads/master
pkg/win32/Python27/Lib/encodings/cp857.py
93
""" Python Character Mapping Codec generated from 'VENDORS/MICSFT/PC/CP857.TXT' with gencodec.py. """#" import codecs ### Codec APIs class Codec(codecs.Codec): def encode(self,input,errors='strict'): return codecs.charmap_encode(input,errors,encoding_map) def decode(self,input,errors=...
AdamIsrael/PerfKitBenchmarker
refs/heads/master
perfkitbenchmarker/linux_benchmarks/mongodb_ycsb_benchmark.py
2
# Copyright 2015 PerfKitBenchmarker 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 appli...
jos4uke/getSeqFlankBlatHit
refs/heads/master
lib/python2.7/site-packages/numpy/f2py/tests/test_kind.py
69
from __future__ import division, absolute_import, print_function import os import math from numpy.testing import * from numpy import array import util def _path(*a): return os.path.join(*((os.path.dirname(__file__),) + a)) from numpy.f2py.crackfortran import _selected_int_kind_func as selected_int_kind from nu...
evgeny-boger/root
refs/heads/master
interpreter/llvm/src/tools/clang/bindings/python/clang/enumerations.py
307
#===- enumerations.py - Python Enumerations ------------------*- python -*--===# # # The LLVM Compiler Infrastructure # # This file is distributed under the University of Illinois Open Source # License. See LICENSE.TXT for details. # #===--------------------------------------------------------------...
snazy2000/netbox
refs/heads/develop
netbox/circuits/forms.py
1
from __future__ import unicode_literals from django import forms from django.db.models import Count from dcim.models import Site, Device, Interface, Rack from extras.forms import CustomFieldForm, CustomFieldBulkEditForm, CustomFieldFilterForm from tenancy.forms import TenancyForm from tenancy.models import Tenant fro...
asanfilippo7/osf.io
refs/heads/develop
tests/test_registrations/base.py
26
import datetime as dt from modularodm import Q from framework.auth import Auth from website.util import permissions from website.models import MetaSchema from website.project.model import ensure_schemas from tests.base import OsfTestCase from tests.factories import AuthUserFactory, ProjectFactory, DraftRegistration...
Joev-/HoNCore
refs/heads/master
honcore/lib/construct/formats/document/postscript.py
1
""" Postscript document """
brendanmckenzie/flask-cms
refs/heads/master
web/api/templates.py
1
from cms import main_app, config from . import cms_api, json_response from .. import requires_admin @cms_api.route('/templates', methods=['GET']) @requires_admin def templates(): templates = main_app.jinja_env.loader.list_templates() templates = [t[len(config['template_root']):] for t in templates if t.start...
indictranstech/Das_frappe
refs/heads/develop
frappe/core/page/data_import_tool/exporter.py
32
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals import frappe, json, os from frappe import _ import frappe.permissions import re from frappe.utils.csvutils import UnicodeWriter from frappe.utils import cstr, cint, flt, formatd...
tedder/ansible
refs/heads/devel
test/units/modules/network/f5/test_bigip_iapp_template.py
21
# -*- 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 import os import json import pytest import sys if sys.version_info < (2, ...
matus-stehlik/glowing-batman
refs/heads/master
base/permissions.py
1
# Based on wiki/core/permissions.py def wiki_can_read(article, user): if not user.is_staff: return False else: # Deny reading access to deleted articles if user has no delete access article_is_deleted = (article.current_revision and article.current_revisio...
domcleal/tito
refs/heads/master
src/tito/zstreamtagger.py
11
from tito.tagger import VersionTagger class zStreamTagger(VersionTagger): """ Tagger which increments the spec file zstream number instead of version. Used for: - Red Hat Service Packs (zstream) """ def _tag_release(self): """ Tag a new zstream of the package. (i.e. x.y.z...
oser-cs/oser-website
refs/heads/master
tests/test_visits/test_participation_api.py
1
"""Participation API tests.""" from django.test import override_settings from rest_framework import status from rest_framework.test import APITestCase from tests.utils import HyperlinkedAPITestCase from users.factory import UserFactory from visits.factory import ParticipationFactory, VisitFactory from visits.serializ...
batxes/4c2vhic
refs/heads/master
SHH_WT_models/SHH_WT_models_final_output_0.1_-0.1_11000/SHH_WT_models30779.py
2
import _surface import chimera try: import chimera.runCommand except: pass from VolumePath import markerset as ms try: from VolumePath import Marker_Set, Link new_marker_set=Marker_Set except: from VolumePath import volume_path_dialog d= volume_path_dialog(True) new_marker_set= d.new_marker_set marker_set...
k-shukla/heisenberg_model-py
refs/heads/master
Shukla - Ising Model 2D Histogram.py
1
# -*- coding: utf-8 -*- ''' Here, we create a static 2D N-by-M Ising grid of spins up and down, an update mechanism to update the spin at every site, and finally include the presence of an inter-spin coupling and an external magnetic field in the grids. This script then performs a histogram analysis of the...
bobobox/ansible
refs/heads/devel
lib/ansible/modules/cloud/openstack/os_project.py
15
#!/usr/bin/python # Copyright (c) 2015 IBM Corporation # # This module is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This softwar...
analyseuc3m/ANALYSE-v1
refs/heads/master
lms/djangoapps/certificates/views/xqueue.py
16
""" Views used by XQueue certificate generation. """ import json import logging from django.contrib.auth.models import User from django.db import transaction from django.http import HttpResponse, Http404, HttpResponseForbidden from django.views.decorators.csrf import csrf_exempt from django.views.decorators.http impor...
TheWardoctor/Wardoctors-repo
refs/heads/master
plugin.video.salts/scrapers/hdmoviefree_scraper.py
7
""" SALTS XBMC Addon Copyright (C) 2014 tknorris 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. T...
40423132/2017springcd_hw
refs/heads/gh-pages
course/pelican.py
39
# https://github.com/getpelican/pelican # 為何要使用 Pelican? 如何使用 Pelican? # 為何要使用 Leo Editor? 如何使用 Leo Editor? # 為何要使用 Python? 如何使用 Python? # 為何要使用 Brython? 如何使用 Brython? # 為何要使用 Brython-Server? 如何使用 Brython-Server? # 為何要使用 CMSimfly? 如何使用 CMSimfly? # 為何要使用 Pygrouf? 如何使用 Pygrouf? # 機械設計工程師在選擇一項工具時, 必須自問, 為何要使用這項工具? 如何使用這項工...
sbalde/edxplatform
refs/heads/master
common/djangoapps/student/migrations/0011_auto__chg_field_courseenrollment_user__del_unique_courseenrollment_use.py
188
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # This table is dropped in a subsequent migration. This migration was causing problems when using InnoDB, # ...
bigswitch/horizon
refs/heads/master
openstack_dashboard/test/integration_tests/tests/test_volumetypes.py
8
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # d...
edcast-inc/edx-platform-edcast
refs/heads/master
common/lib/xmodule/xmodule/modulestore/inheritance.py
23
""" Support for inheritance of fields down an XBlock hierarchy. """ from __future__ import absolute_import from datetime import datetime from pytz import UTC from xmodule.partitions.partitions import UserPartition from xblock.fields import Scope, Boolean, String, Float, XBlockMixin, Dict, Integer, List from xblock.run...
ehashman/oh-mainline
refs/heads/master
vendor/packages/Django/tests/regressiontests/admin_custom_urls/tests.py
41
from __future__ import absolute_import, unicode_literals import warnings from django.contrib.admin.util import quote from django.core.urlresolvers import reverse from django.template.response import TemplateResponse from django.test import TestCase from django.test.utils import override_settings from .models import A...
douggeiger/gnuradio
refs/heads/master
gnuradio-runtime/examples/volk_benchmark/volk_math.py
59
#!/usr/bin/env python from gnuradio import gr from gnuradio import blocks import argparse from volk_test_funcs import * try: from gnuradio import blocks except ImportError: sys.stderr.write("This example requires gr-blocks.\n") def multiply_const_cc(N): k = 3.3 op = blocks.multiply_const_cc(k) tb...
ariabuckles/pyobjc-core
refs/heads/master
PyObjCTest/test_synthesize.py
2
""" Tests for objc.synthesize """ from PyObjCTools.TestSupport import * from PyObjCTest.fnd import NSObject import objc class TestSynthesizeCopier (NSObject): def copy(self): return 42 class TestSynthesizeHelper (NSObject): objc.synthesize('someTitle', copy=True) objc.synthesize('stringValue', cop...
finnhaedicke/metaSMT
refs/heads/development
bindings/python/tests/core.py
4
#!/usr/bin/python import inspect import random import sys import unittest sys.path.insert( 0, sys.path[0] + '/..' ) from metasmt.core import * def skipIfNoSolver(obj): if obj.solver is not None: return lambda func: func return unittest.skip("solver is unavailable") class LogicTest( object ): solver = ...
gangadharkadam/shfr
refs/heads/master
frappe/core/doctype/custom_field/__init__.py
2292
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors # MIT License. See license.txt from __future__ import unicode_literals
wink-app/wink
refs/heads/master
lib/flask/sessions.py
348
# -*- coding: utf-8 -*- """ flask.sessions ~~~~~~~~~~~~~~ Implements cookie based sessions based on itsdangerous. :copyright: (c) 2012 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import uuid import hashlib from datetime import datetime from werkzeug.http import http_date, ...
alexforster/sisqo
refs/heads/master
sisqo/configuration.py
1
# -*- coding: UTF-8 -*- # # Copyright © 2017 Alex Forster. All rights reserved. # This software is licensed under the 3-Clause ("New") BSD license. # See the LICENSE file for details. # import re class Line(object): def __init__(self, lineNumber, indent, value): """ :type number: int :t...
cessor/pywinauto
refs/heads/master
pywinauto/win32functions.py
14
# GUI Application automation and testing library # Copyright (C) 2006 Mark Mc Mahon # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 # of the License, or (at you...
yaroslavprogrammer/django
refs/heads/master
django/contrib/admin/forms.py
117
from __future__ import unicode_literals from django import forms from django.contrib.auth import authenticate from django.contrib.auth.forms import AuthenticationForm from django.utils.translation import ugettext_lazy ERROR_MESSAGE = ugettext_lazy("Please enter the correct %(username)s and password " "for a ...
Oslandia/vizitown_plugin
refs/heads/master
twisted/scripts/htmlizer.py
53
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. # """HTML pretty-printing for Python source code.""" __version__ = '$Revision: 1.8 $'[11:-2] from twisted.python import htmlizer, usage from twisted import copyright import os, sys header = '''<html><head> <title>%(title)s</title> <meta name=...
maximumG/exscript
refs/heads/master
Exscript/parselib/token.py
3
# # Copyright (C) 2010-2017 Samuel Abels # The MIT License (MIT) # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files # (the "Software"), to deal in the Software without restriction, # including without limitation the rights to use, copy,...
vegetableman/phantomjs
refs/heads/master
src/qt/qtwebkit/Tools/Scripts/webkitpy/tool/servers/reflectionhandler.py
126
# 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 ...
ujjwalwahi/odoo
refs/heads/8.0
openerp/addons/base/tests/test_acl.py
338
import unittest2 from lxml import etree import openerp from openerp.tools.misc import mute_logger from openerp.tests import common # test group that demo user should not have GROUP_TECHNICAL_FEATURES = 'base.group_no_one' class TestACL(common.TransactionCase): def setUp(self): super(TestACL, self).setU...
WillGuan105/django
refs/heads/master
tests/test_client/views.py
109
from xml.dom.minidom import parseString from django.contrib.auth.decorators import login_required, permission_required from django.core import mail from django.forms import fields from django.forms.forms import Form, ValidationError from django.forms.formsets import BaseFormSet, formset_factory from django.http import...
kernevil/openchange
refs/heads/master
mapiproxy/services/ocsmanager/ocsmanager/controllers/as.py
5
import logging import datetime from time import time from pylons import request, response, session, tmpl_context as c, url from pylons import config from pylons.controllers.util import abort, redirect from pylons.decorators.rest import restrict import rpclib from rpclib.application import Application from rpclib.dec...
Pingmin/linux
refs/heads/master
scripts/kconfig/tests/rand_nested_choice/__init__.py
182
# SPDX-License-Identifier: GPL-2.0 """ Set random values recursively in nested choices. Kconfig can create a choice-in-choice structure by using 'if' statement. randconfig should correctly set random choice values. Related Linux commit: 3b9a19e08960e5cdad5253998637653e592a3c29 """ def test(conf): for i in range...
kho0810/likelion_Web
refs/heads/master
lib/setuptools/tests/test_resources.py
4
#!/usr/bin/python # -*- coding: utf-8 -*- # NOTE: the shebang and encoding lines are for ScriptHeaderTests do not remove import os import sys import tempfile import shutil from unittest import TestCase import pkg_resources from pkg_resources import (parse_requirements, VersionConflict, parse_version, Distribution...
openstack/python-openstacksdk
refs/heads/master
openstack/tests/unit/compute/v2/test_aggregate.py
1
# 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 # distributed under t...
MTK6580/walkie-talkie
refs/heads/master
ALPS.L1.MP6.V2_HEXING6580_WE_L/alps/cts/apps/CameraITS/tests/scene0/test_gyro_bias.py
3
# Copyright 2014 The Android Open Source Project # # 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...
esturdivant-usgs/plover_transect_extraction
refs/heads/master
TransectExtraction/archive/pre_prepandas/Pre_CreateShorelinePoly_Cobb.py
1
""" Create shoreline polygon """ import arcpy, os, pythonaddins sys.path.append(r"\\Mac\Home\Documents\scripting\TransectExtraction") # path to TransectExtraction module from TransectExtraction import * """ Inputs """ site = 'Cobb' year = '2014' MHW = 0.34 MLW = -0.59 MTL = MHW-((MHW-MLW)/2) arcpy.env.workspace= ho...
cdgeeko/butterknife
refs/heads/master
host/butterknife/transport/http.py
1
import click import urllib import json import subprocess from butterknife.subvol import Subvol from butterknife.pool import LocalPool class WebPool(LocalPool): def __init__(self, hostname, port=None, path=None, user=None, secure=False): self.secure = secure self.hostname = hostname self.p...
Taikatou/oxygine-framework
refs/heads/master
tools/others/fileslist.py
2
import os import sys path = sys.argv[1] prefix = sys.argv[2] ls = os.listdir(path) ext = [".c", ".cpp", ".h"] fn = open("ls.txt", "w") def write(*ext): for name in ls: e = os.path.splitext(name)[1] if e in ext: nm = "\t" + prefix + "/" + name fn.write(nm + " \ \n") write(".c", ".cpp") w...
duducosmos/pgs4a
refs/heads/master
python-install/lib/python2.7/test/inspect_fodder.py
85
# line 1 'A module docstring.' import sys, inspect # line 5 # line 7 def spam(a, b, c, d=3, (e, (f,))=(4, (5,)), *g, **h): eggs(b + d, c + f) # line 11 def eggs(x, y): "A docstring." global fr, st fr = inspect.currentframe() st = inspect.stack() p = x q = y // 0 # line 20 class StupidGit...
krzysz00/rust
refs/heads/master
src/etc/check-sanitycheck.py
37
#!/usr/bin/env python # # Copyright 2012-2014 The Rust Project Developers. See the COPYRIGHT # file at the top-level directory of this distribution and at # http://rust-lang.org/COPYRIGHT. # # Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or # http://www.apache.org/licenses/LICENSE-2.0> or the MIT lice...
baslr/ArangoDB
refs/heads/3.1-silent
3rdParty/V8/V8-5.0.71.39/build/gyp/pylib/gyp/generator/dump_dependency_json.py
1534
# 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 collections import os import gyp import gyp.common import gyp.msvs_emulation import json import sys generator_supports_multiple_toolsets = True generator_...
quentinsf/ansible
refs/heads/devel
lib/ansible/errors/yaml_strings.py
264
# (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...
eneldoserrata/marcos_openerp
refs/heads/master
addons/report_geraldo/lib/geraldo/site/newsite/site-geraldo/django/core/handlers/profiler-hotshot.py
382
import hotshot, time, os from django.core.handlers.modpython import ModPythonHandler PROFILE_DATA_DIR = "/var/log/cmsprofile" def handler(req): ''' Handler that uses hotshot to store profile data. Stores profile data in PROFILE_DATA_DIR. Since hotshot has no way (that I know of) to append profile da...
RedHatQE/cfme_tests
refs/heads/master
cfme/tests/test_rest_manual.py
1
# -*- coding: utf-8 -*- """Manual tests""" import pytest from cfme import test_requirements @pytest.mark.manual @test_requirements.rest @pytest.mark.tier(3) def test_cloud_volume_types(): """ Polarion: assignee: pvala casecomponent: Rest caseimportance: high initialEstimate: 1...
unho/pootle
refs/heads/master
pootle/core/markup/filters.py
5
# -*- coding: utf-8 -*- # # Copyright (C) Pootle contributors. # # This file is a part of the Pootle project. It is distributed under the GPL3 # or later license. See the LICENSE file for a copy of the license and the # AUTHORS file for copyright and authorship information. from django.conf import settings from django...
aozima/rt-thread
refs/heads/master
components/dfs/filesystems/romfs/mkromfs.py
5
#!/usr/bin/env python import sys import os import struct from collections import namedtuple import StringIO import argparse parser = argparse.ArgumentParser() parser.add_argument('rootdir', type=str, help='the path to rootfs') parser.add_argument('output', type=argparse.FileType('wb'), nargs='?', help='output file n...
rabitt/motif
refs/heads/master
motif/version.py
1
#!/usr/bin/env python # -*- coding: utf-8 -*- """Version info""" short_version = '1.1' version = '1.1.2'
waytai/networkx
refs/heads/master
examples/advanced/iterated_dynamical_systems.py
59
""" Digraphs from Integer-valued Iterated Functions =============================================== Sums of cubes on 3N ------------------- The number 153 has a curious property. Let 3N={3,6,9,12,...} be the set of positive multiples of 3. Define an iterative process f:3N->3N as follows: for a given n, take each d...
rolanddenis/DGtal
refs/heads/master
wrap/deploy/increase_version.py
2
#!/usr/bin/env python import os import sys import argparse import re parser = argparse.ArgumentParser(description='Increase version of DGtal.') parser.add_argument("-c", "--component", dest="version_component", default="patch", help="What version component to update, options: ...
greut/chain-reaction
refs/heads/master
myauth/models.py
1
from django.db import models from django.utils.translation import ugettext_lazy as _ from authtools.models import AbstractNamedUser class User(AbstractNamedUser): name = models.CharField(_('name'), max_length=255, unique=True) is_active = models.BooleanField(default=True) # Required for Python Social App...
aosagie/spark
refs/heads/master
python/pyspark/ml/tests/test_training_summary.py
11
# # 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...
YuxuanLing/trunk
refs/heads/master
trunk/code/study/python/core_python_appilication/ch11/mysite/blog/urls.py
1
# urls.py from django.conf.urls.defaults import * urlpatterns = patterns('blog.views', url(r'^$', 'archive'), url(r'^create/', 'create_blogpost'), )
916253/Kurisu
refs/heads/master
addons/mod.py
1
import datetime import discord import json import re import time from discord.ext import commands from subprocess import call from addons.checks import is_staff from addons import converters class Mod: """ Staff commands. """ def __init__(self, bot): self.bot = bot print('Addon "{}" loa...
KevinNorth/codeswarm
refs/heads/master
convert_logs/hg_log.py
23
# coding=utf8 """ Get the log from a mercurial repository and save it in a code_swarm-readable XML-File. Most options are accessible via the command line, but within this script you can define a list of user names that will be replace with other names, which might become usefull if you have two different names and wa...
hackersql/sq1map
refs/heads/master
waf/profense.py
3
#!/usr/bin/env python """ Copyright (c) 2006-2017 sqlmap developers (http://sqlmap.org/) See the file 'doc/COPYING' for copying permission """ import re from lib.core.enums import HTTP_HEADER from lib.core.settings import WAF_ATTACK_VECTORS __product__ = "Profense Web Application Firewall (Armorlogic)" def detect(...
primepix/queues
refs/heads/master
queues/backends/memcached.py
1
""" Backend for queues that implement the memcache protocol, including starling. This backend requires either the memcache or cmemcache libraries to be installed. """ from queues.backends.base import BaseQueue from queues import InvalidBackend, QueueException import os, re from uuid import uuid1 try: from cmemca...
srh/rethinkdb
refs/heads/next
drivers/java/convert_tests.py
2
#!/usr/bin/env python3 # -*- coding: utf-8 -*- '''Finds yaml tests, converts them to Java tests.''' from __future__ import print_function import sys import os import os.path import re import time import ast import argparse import metajava import process_polyglot import logging from process_polyglot import Unhandled, S...
peterdocter/zxing
refs/heads/master
cpp/scons/scons-local-2.0.0.final.0/SCons/Tool/aixlink.py
34
"""SCons.Tool.aixlink Tool-specific initialization for the IBM Visual Age linker. There normally shouldn't be any need to import this module directly. It will usually be imported through the generic SCons.Tool.Tool() selection method. """ # # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 T...
alphafoobar/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/hgext/hgk.py
93
# Minimal support for git commands on an hg repository # # Copyright 2005, 2006 Chris Mason <mason@suse.com> # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. '''browse the repository in a graphical way The hgk extension allows bro...
fkolacek/FIT-VUT
refs/heads/master
bp-revok/python/lib/python2.7/lib2to3/fixes/fix_xreadlines.py
7
"""Fix "for x in f.xreadlines()" -> "for x in f". This fixer will also convert g(f.xreadlines) into g(f.__iter__).""" # Author: Collin Winter # Local imports from .. import fixer_base from ..fixer_util import Name class FixXreadlines(fixer_base.BaseFix): PATTERN = """ power< call=any+ trailer< '.' 'xreadlin...
inventivehack/yaus
refs/heads/master
links/models.py
1
from django.db import models from .utils import gen_url class Link(models.Model): name = models.CharField(max_length=80, blank=True) url = models.CharField(max_length=900, blank=True, unique=True) redirect_url = models.URLField() hits = models.IntegerField(default=0) # Metadata created = m...
ioram7/keystone-federado-pgid2013
refs/heads/master
build/eventlet/eventlet/pool.py
14
from eventlet import coros, proc, api from eventlet.semaphore import Semaphore import warnings warnings.warn("The pool module is deprecated. Please use the " "eventlet.GreenPool and eventlet.GreenPile classes instead.", DeprecationWarning, stacklevel=2) class Pool(object): def __init__(self, min_...
cytec/Sick-Beard
refs/heads/master
lib/hachoir_parser/image/png.py
90
""" PNG picture file parser. Documents: - RFC 2083 http://www.faqs.org/rfcs/rfc2083.html Author: Victor Stinner """ from lib.hachoir_parser import Parser from lib.hachoir_core.field import (FieldSet, Fragment, ParserError, MissingField, UInt8, UInt16, UInt32, String, CString, Bytes, RawBytes, B...
philanthropy-u/edx-platform
refs/heads/master
common/djangoapps/third_party_auth/tests/test_lti.py
25
""" Unit tests for third_party_auth LTI auth providers """ import unittest from oauthlib.common import Request from third_party_auth.lti import LTI_PARAMS_KEY, LTIAuthBackend from third_party_auth.tests.testutil import ThirdPartyAuthTestMixin class UnitTestLTI(unittest.TestCase, ThirdPartyAuthTestMixin): """ ...
kelsoncm/django_brfied
refs/heads/master
django_brfied/migrations/__init__.py
1
# -*- coding: utf-8 -*- """ The MIT License (MIT) Copyright 2015 Umbrella Tech. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use...
fiunchinho/ansible-modules-extras
refs/heads/devel
windows/win_robocopy.py
48
#!/usr/bin/python # -*- coding: utf-8 -*- # (c) 2015, Corwin Brown <blakfeld@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 Lic...
trondeau/gnuradio
refs/heads/master
gnuradio-runtime/examples/volk_benchmark/volk_math.py
59
#!/usr/bin/env python from gnuradio import gr from gnuradio import blocks import argparse from volk_test_funcs import * try: from gnuradio import blocks except ImportError: sys.stderr.write("This example requires gr-blocks.\n") def multiply_const_cc(N): k = 3.3 op = blocks.multiply_const_cc(k) tb...
sourcefabric/Booktype
refs/heads/master
lib/booktype/apps/importer/models.py
10644
from django.db import models # Create your models here.
willprice/arduino-sphere-project
refs/heads/master
scripts/example_direction_finder/temboo/Library/Facebook/Reading/Music.py
5
# -*- coding: utf-8 -*- ############################################################################### # # Music # Retrieves music associated with a specified user. # # Python versions 2.6, 2.7, 3.x # # Copyright 2014, Temboo Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use t...
jittat/ku-eng-direct-admission
refs/heads/master
application/migrations/0028_add_review_info_to_submission_info.py
2
# -*- coding: utf-8 -*- from south.db import db from django.db import models from adm.application.models import * class Migration: def forwards(self, orm): # Adding field 'SubmissionInfo.doc_reviewed_complete' db.add_column('application_submissioninfo', 'doc_reviewed_complete', orm['...
coolbho3k/Xoom-OC
refs/heads/android-tegra-2.6.36-honeycomb
tools/perf/scripts/python/failed-syscalls-by-pid.py
944
# failed 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 failed system call totals, broken down by pid. # If a [comm] arg is specified, only syscalls called by [comm] are displayed. import os import sys sys.pa...
soarpenguin/ansible
refs/heads/devel
lib/ansible/modules/source_control/gitlab_group.py
8
#!/usr/bin/python # (c) 2015, Werner Dijkerman (ikben@werner-dijkerman.nl) # 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.0', ...
stefanseibert/DataMining
refs/heads/master
experiment01/01_energy/energyClustering.py
2
import pandas from pylab import find from scipy import spatial, cluster from sklearn import preprocessing from numpy import * import matplotlib.pyplot as plt NUM_CLUSTER = 4 ENERGYFORMS = ['Oil', 'Gas', 'Coal', 'Nuclear', 'Hydro'] NUM_ENERGYFORMS = len(ENERGYFORMS) energyInfo = pandas.read_csv('../resource...
hatchery/Genepool2
refs/heads/master
genes/alpine/traits.py
2
from functools import wraps from typing import List, TypeVar, Callable, Tuple, Dict from typing import Optional from genes.lib.logging import log_warn, log_error from genes.lib.traits import ErrorLevel from genes.linux.traits import get_distro, get_version, get_codename T = TypeVar('T') def is_alpine(versions: Opti...
Nic30/hwtLib
refs/heads/master
hwtLib/logic/crcComb_test.py
1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from binascii import crc32, crc_hqx import os from hwt.hdl.constants import Time from hwt.simulator.simTestCase import SimTestCase from hwtLib.logic.crcComb import CrcComb from hwtLib.logic.crcPoly import CRC_1, CRC_8_CCITT, CRC_16_CCITT, CRC_32, \ CRC_8_SAE_J1850, C...
Outernet-Project/outernetrx-linux
refs/heads/pillar
tools/perf/scripts/python/net_dropmonitor.py
2669
# 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...
eckardm/archivematica
refs/heads/stable/1.5.x
src/MCPServer/lib/RPCServer.py
1
#!/usr/bin/env python2 # This file is part of Archivematica. # # Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com> # # Archivematica 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, ...
kgblll/libresoft-gymkhana
refs/heads/master
libs/semanticManager/SemanticManager.py
2
# Copyright (C) 2009 GSyC/LibreSoft # # 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 distri...
opendaylight/archived-net-virt-platform
refs/heads/master
sdncon/clusterAdmin/models.py
4
# # Copyright (c) 2013 Big Switch Networks, Inc. # # Licensed under the Eclipse Public License, Version 1.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.eclipse.org/legal/epl-v10.html # # Unless required by applicable l...
affo/nova
refs/heads/master
tools/install_venv.py
123
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # # Copyright 2010 OpenStack Foundation # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this...
pasiegel/SickGear
refs/heads/master
lib/sqlalchemy/dialects/mssql/zxjdbc.py
79
# mssql/zxjdbc.py # Copyright (C) 2005-2014 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 """ .. dialect:: mssql+zxjdbc :name: zxJDBC for Jython :dbapi: zxjdbc :con...
oxtopus/nupic
refs/heads/master
nupic/regions/ImageSensor.py
6
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2013, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
minhphung171093/GreenERP_V7
refs/heads/master
openerp/addons/base_report_designer/openerp_sxw2rml/__init__.py
423
# -*- 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...
BorisJeremic/Real-ESSI-Examples
refs/heads/master
analytic_solution/test_cases/8NodeBrick/cantilever_different_element_number/NumberOfElement1/compare_essi_version.py
409
#!/usr/bin/python import h5py import sys import numpy as np import os # automatically find the script directory. # script_dir=sys.argv[1] cur_dir=os.getcwd() sep='test_cases' test_DIR=cur_dir.split(sep,1)[0] scriptDIR=test_DIR+'compare_function' sys.path.append(scriptDIR) # import my own command line color function # ...
firebitsbr/pwn_plug_sources
refs/heads/master
src/sslstrip/sslstrip/ClientRequest.py
20
# Copyright (c) 2004-2009 Moxie Marlinspike # # 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 distri...
colinligertwood/odoo
refs/heads/master
addons/base_import/__openerp__.py
62
{ 'name': 'Base import', 'description': """ New extensible file import for OpenERP ====================================== Re-implement openerp's file import system: * Server side, the previous system forces most of the logic into the client which duplicates the effort (between clients), makes the import s...
fxsjy/pybrain
refs/heads/master
pybrain/rl/environments/twoplayergames/gomokuplayers/gomokuplayer.py
31
__author__ = 'Tom Schaul, tom@idsia.ch' from pybrain.rl.agents.agent import Agent from pybrain.rl.environments.twoplayergames import GomokuGame class GomokuPlayer(Agent): """ a class of agent that can play Go-Moku, i.e. provides actions in the format: (playerid, position) playerid is self.color, by conv...
Lekanich/intellij-community
refs/heads/master
plugins/hg4idea/testData/bin/mercurial/mpatch.py
96
# mpatch.py - Python implementation of mpatch.c # # Copyright 2009 Matt Mackall <mpm@selenic.com> and others # # This software may be used and distributed according to the terms of the # GNU General Public License version 2 or any later version. import struct try: from cStringIO import StringIO except ImportError:...
mpollachek/Recipe_website_project
refs/heads/master
recipes/recipe_app/populate_db.py
1
from recipe_app.models import * def populate_db(rec=3): count=0 while count < rec: x = MealType(name='Breakfast') y = MealType(name='Lunch') z = MealType(name='Dinner') x.save() y.save() z.save() a = Recipe(name='mozz', description='yummy', meal_type=x, d...