code
stringlengths
2
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int32
2
1.05M
import cherrypy import jinja2 import time from datetime import datetime from jinja2 import Environment, FileSystemLoader import braubuddy class API(object): """ Braubuddy API """ @cherrypy.expose @cherrypy.tools.json_out() def index(self, **kwargs): """ Return recent status da...
amorphic/braubuddy
braubuddy/apps.py
Python
bsd-3-clause
3,792
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('rest_notifications', '0003_auto_20141220_0023'), ] operations = [ migrations.AddField( model_name='notification'...
sventech/YAK-server
yak/rest_notifications/migrations/0004_notification_template_override.py
Python
mit
452
import os import numpy as np from ..VideoClip import VideoClip from imageio import imread class ImageSequenceClip(VideoClip): """ A VideoClip made from a series of images. Parameters ----------- sequence Can be one of these: - The name of a folder (containing only pictures...
carlodri/moviepy
moviepy/video/io/ImageSequenceClip.py
Python
mit
4,285
#!python """\ Easy Install ------------ A tool for doing automatic download/extract/build of distutils-based Python packages. For detailed documentation, see the accompanying EasyInstall.txt file, or visit the `EasyInstall home page`__. __ http://packages.python.org/distribute/easy_install.html """ import sys, os.p...
igemsoftware/SYSU-Software2013
project/Python27_32/Lib/site-packages/setuptools/command/easy_install.py
Python
mit
70,187
import inspect from snakeguice import inject from snakeguice.interfaces import Injector from snakeguice.decorators import GuiceData, GuiceArg, enclosing_frame from snakeguice.errors import AssistError def assisted_inject(**kwargs): scope = kwargs.get('scope') if 'scope' in kwargs: del kwargs['scope'...
dstanek/snake-guice
snakeguice/assist.py
Python
mit
2,188
# vim: fileencoding=utf-8 et sw=4 ts=4 tw=80: # python-quilt - A Python implementation of the quilt patch system # # Copyright (C) 2012 - 2017 Björn Ricks <bjoern.ricks@gmail.com> # # See LICENSE comming with the source of python-quilt for details. import os from quilt.cli.meta import Command from quilt.cli.parser i...
vadmium/python-quilt
quilt/cli/revert.py
Python
mit
1,283
from bungiesearch.managers import BungiesearchManager from django.db import models class User(models.Model): name = models.TextField(db_index=True) user_id = models.TextField(blank=True) created = models.DateTimeField(auto_now_add=True) updated = models.DateTimeField(null=True) objects = Bungiese...
ChristopherRabotin/celery-bungiesearch
tests/core/models.py
Python
mit
334
import numpy as np from share import * def xor_data(num_points): X_xor = np.random.randn(num_points, 2) y_xor = np.logical_xor(X_xor[:, 0] > 0, X_xor[:, 1] > 0) y_xor = np.where(y_xor, 1, -1) return X_xor, y_xor def circle_data(num_points, radius): X = np.random.randn(num_points, 2) y = X[...
1iyiwei/pyml
code/ch03/kernel_svm.py
Python
mit
1,016
# -*- coding: utf-8 -*- # # This class was auto-generated from the API references found at # https://epayments-api.developer-ingenico.com/s2sapi/v1/ # from ingenico.connect.sdk.data_object import DataObject class EmptyValidator(DataObject): """ | A validator object that contains no additional properties. ...
Ingenico-ePayments/connect-sdk-python2
ingenico/connect/sdk/domain/product/definitions/empty_validator.py
Python
mit
573
from django.test import TestCase from django_token_auth.user import TokenAuthenticatedUser from django_token_auth.user import UserHasNoData class TokenAuthenticatedUserTestCase(TestCase): def test_user_class(self): user = TokenAuthenticatedUser('john', 'some_token') self.assertEqual(user.username...
bsod90/django-token-auth
tests/test_user.py
Python
mit
444
###### ###### channels_base.py called diversions.update() COMMENTED OUT !!!!! ## Copyright (c) 2001-2014, Scott D. Peckham ## ## Jan 2013. Revised handling of input/output names. ## ## Oct 2012. CSDMS Standard Names and BMI. ## ## May 2012. Q_outlet -> Q_outlet[0] (5/19/12) ## ## May 2010. Changes to initialize() ...
mcflugen/topoflow
topoflow/components/topoflow_driver.py
Python
mit
80,517
from plotly.basedatatypes import BaseLayoutHierarchyType as _BaseLayoutHierarchyType import copy as _copy class Tickformatstop(_BaseLayoutHierarchyType): # class properties # -------------------- _parent_path_str = "layout.xaxis" _path_str = "layout.xaxis.tickformatstop" _valid_props = {"dtickran...
plotly/python-api
packages/python/plotly/plotly/graph_objs/layout/xaxis/_tickformatstop.py
Python
mit
9,512
""" Unit tests for action plugins """ from django.test import TestCase from django.contrib.auth import get_user_model class SampleIntegrationPluginTests(TestCase): """ Tests for SampleIntegrationPlugin """ def setUp(self): # Create a user for auth user = get_user_model() user.objects...
inventree/InvenTree
InvenTree/plugin/samples/integration/test_samples_integration.py
Python
mit
723
""" Manage spans in documents. """ from cort.core import mixins __author__ = 'smartschat' class Span(mixins.ComparableMixin): """ Manage and compare spans in documents. Attributes: begin (int): The begin of the span. end (int): The end of the span (inclusive). """ def __init__(self...
Yegor-Budnikov/cort
cort/core/spans.py
Python
mit
2,285
import sys if sys.version_info[0] < 3: from _yaml2 import * else: from ._yaml3 import *
aukaost/SublimePrettyYAML
yaml/__init__.py
Python
mit
90
from django.contrib import admin from .models import Product, Variation, ProductImage # Register your models here. admin.site.register(Product) admin.site.register(Variation) admin.site.register(ProductImage)
vinayvit/E-commerce-using-jet-n-prduct-search.
src/products/admin.py
Python
mit
210
#!/usr/bin/env python import logging import os.path import subprocess from ..util.strings import parameterize from ..common import print_more_compatible as print try: from subprocess import DEVNULL except ImportError: # Python 3.2 or below import os import atexit DEVNULL = os.open(os.devnull, os.O...
cnbeining/you-get
src/you_get/processor/ffmpeg.py
Python
mit
8,680
#!/usr/bin/python # # 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...
h2so5/Twemoji4Android
nototools/noto_data.py
Python
mit
5,635
from app import db from datetime import datetime as dt from slugify import slugify class Post(db.Model): id = db.Column(db.Integer, primary_key = True) title = db.Column(db.String, nullable=False) description = db.Column(db.String, nullable=False) content = db.Column(db.String, nullable=False) slu...
naturaln0va/ackermann-io
web/models.py
Python
mit
1,289
import os from setuptools import setup, find_packages import uuid from versionone_to_jira_reflector import __version__ as version_string requirements_path = os.path.join( os.path.dirname(__file__), 'requirements.txt', ) try: from pip.req import parse_requirements requirements = [ str(req.req)...
lanshark/versionone-to-jira-reflector
setup.py
Python
mit
1,362
from __future__ import print_function # Time: O(n) # Space: O(h), h is height of binary tree # Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). # # For example, this binary tree is symmetric: # # 1 # / \ # 2 2 # / \ / \ # 3 4 4 3 # But the following is not: #...
tudennis/LeetCode---kamyu104-11-24-2015
Python/symmetric-tree.py
Python
mit
2,060
from __future__ import unicode_literals, division, absolute_import import logging from datetime import datetime from dateutil import parser from pytvmaze import get_show, episode_by_number, episodes_by_date from pytvmaze.exceptions import ShowNotFound, EpisodeNotFound, NoEpisodesForAirdate, IllegalAirDate, Connection...
antivirtel/Flexget
flexget/plugins/api_tvmaze.py
Python
mit
23,548
# if aaa: # ... else: # ... #
general-language-syntax/GLS
test/integration/ElseStart/else start.py
Python
mit
38
from .model import SkipthoughtModel
persiyanov/skip-thought-tf
skipthought/__init__.py
Python
mit
36
import django_tables2 as tables from django_tables2.utils import A from vocabs.models import * class SkosConceptTable(tables.Table): pref_label = tables.LinkColumn('vocabs:skosconcept_detail', args=[A('pk')]) # all_schemes = tables.Column(verbose_name='in SkosScheme', orderable=False) class Meta: ...
acdh-oeaw/vhioe
vocabs/tables.py
Python
mit
463
from abc import abstractmethod import cProfile, pstats, io import datetime from meerkat_abacus import model from meerkat_abacus import logger class ProcessingStep(object): """ Base class for all ProcessingSteps """ def __init__(self): self.step_name = "processing_step" self.session ...
who-emro/meerkat_abacus
meerkat_abacus/pipeline_worker/process_steps/__init__.py
Python
mit
1,754
# Copyright (c) 2006-2008 Andreas Kloeckner # # 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, modify, merge, publi...
hobophobe/tagpy
tagpy/ogg/flac.py
Python
mit
1,148
import time import logging from util import * from twisted.internet import reactor, defer from twisted.internet.defer import inlineCallbacks METADATA_CHECK_INTERVAL = 24*3600 class MetadataChecker(object): def __init__(self, database, config): self.logger = logging.getLogger(__name__) self.dat...
egbertbouman/billy
server/metadata.py
Python
mit
9,020
import os import tempfile from collections import namedtuple import pytest from django.conf import settings from osmaxx.conversion import coordinate_reference_system as crs, output_format, status from osmaxx.conversion.converters.converter_gis import detail_levels format_list = output_format.DEFINITIONS.keys() @py...
geometalab/osmaxx
tests/conversion/conftest.py
Python
mit
4,776
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
v-iam/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2016_04_30_preview/models/virtual_machine_instance_view.py
Python
mit
3,196
#!/usr/bin/python # -*- coding: utf-8 -*- import unittest import os, random from PIL import Image from requests import ConnectionError from nose.plugins.skip import Skip, SkipTest from six import PY3 from indicoio import config from indicoio import political, sentiment, fer, facial_features, facial_localization, cont...
nikolaik/IndicoIo-python
tests/test_remote.py
Python
mit
27,230
# -*- test-case-name: twisted.web.test.test_xml -*- # # Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ *S*mall, *U*ncomplicated *X*ML. This is a very simple implementation of XML/HTML as a network protocol. It is not at all clever. Its main features are that it does not: - support nam...
Varriount/Colliberation
libs/twisted/web/sux.py
Python
mit
20,923
""" https://github.com/drduh/macOS-Security-and-Privacy-Guide/blob/master/launchd/read_launch_plists.py Reads macOS system launch daemon and agent property lists. """ import glob import hashlib import os import plistlib import subprocess import csv HEADER = "filename,label,program,sha256,runatload,comment" PLIST_LOC...
drduh/macOS-Security-and-Privacy-Guide
launchd/read_launch_plists.py
Python
mit
2,806
""" Exception module : list exceptions that can be called all across the library """ class UnknownLemma(Exception): """ Exception raised on unknown lemma """ class InputError(Exception): """ Improper input from the user """
LBenzahia/cltk
cltk/exceptions.py
Python
mit
247
import sys sys.path.append('.') sys.path.append('..') from tasks import execute_login_task if __name__ == '__main__': # you should execute this file, because celery timer will execute login delayed execute_login_task()
yzsz/weibospider
first_task_execution/login_first.py
Python
mit
230
from unittest import TestCase import numpy from chainer import Variable from chainer.functions import identity class TestFunction(TestCase): def test_forward(self): xs = (Variable(numpy.array([0])), Variable(numpy.array([0])), Variable(numpy.array([0]))) xs[0].rank = 1 ...
ttakamura/chainer
tests/test_function.py
Python
mit
949
from django.conf.urls import url, include from .api import api_v1_router from .views import OperationsViewSet urlpatterns = ( url( r"^pzone/(?P<pzone_pk>\d+)/operations/$", OperationsViewSet.as_view(), name="pzone_operations" ), url( r"^pzone/(?P<pzone_pk>\d+)/operations/(?...
theonion/django-bulbs
bulbs/promotion/urls.py
Python
mit
486
#-*- coding: utf-8 -*- VERSION = (0, 2, 1) __version__ = "0.2.1" __authors__ = ["Stefan Foulis <stefan.foulis@gmail.com>", ]
jbinary/django-database-email-backend
database_email_backend/__init__.py
Python
mit
125
print("A hexacyclic sieve that reveals prime numbers") maxValue = int(input("Please input a maxValue ")) def pair(n): # return pairs (multipile of 6-1 and 6+1) in series up to n result = [] a = 6-1 b = 6+1 while a <= n: result.append(a) a = a+6 result.append(b) ...
Tusk-Bilasimo/Primes
Prime Code 01.py
Python
mit
2,371
import MySQLdb conn = MySQLdb.connect(host="127.0.0.1", port=3306, user="lighthouse", passwd="lighthousedb", db="shark") cursor = conn.cursor() cursor.execute("TRUNCATE TABLE lighthouse_lapack_eigen") conn.commit() cursor.close() conn.close()
LighthouseHPC/lighthouse
src/lighthouseProject/lighthouse/database/lapack_svd/truncateTables.py
Python
mit
250
#!/usr/bin/env python import unittest import modular4.ensemble as me import pdb,os,sys class test_ensemble(unittest.TestCase): mm_mcfg = os.path.join(os.getcwd(),'mcfgs','mm_kinetics.mcfg') cr_mcfg = os.path.join(os.getcwd(),'mcfgs','correl_demo.mcfg') rs_mcfg = os.path.join(os.getcwd(),'mcfgs','repre...
ctogle/dstoolm
tests/test.py
Python
mit
1,041
# -*- coding: utf-8 -*- import pytest from raiden.encoding.format import Field, namedbuffer from raiden.encoding.encoders import integer # pylint: disable=invalid-name byte = Field('byte', 1, 'B', None) hugeint = Field('huge', 100, '100s', integer(0, 2 ** (8 * 100))) SingleByte = namedbuffer('SingleByte', [byte]) Hug...
tomashaber/raiden
raiden/tests/unit/test_namedbuffer.py
Python
mit
1,583
import sys from SALib.analyze import morris from SALib.sample.morris import sample from SALib.test_functions import Sobol_G, Ishigami from SALib.util import read_param_file from SALib.plotting.morris import horizontal_bar_plot, covariance_plot, \ sample_histograms import matplot...
t2abdulg/SALib
examples/morris/morris.py
Python
mit
2,069
# This file is part of beets. # Copyright 2014, Adrian Sampson. # # 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, ...
iamdankaufman/beets
beets/ui/commands.py
Python
mit
51,609
from release import Release from nupic_release import NupicRelease from nupic_core_release import NupicCoreRelease
rhyolight/nupic.devtools
bin/releasetools/__init__.py
Python
mit
114
# -*- coding: utf-8 -*- from django.contrib.auth import get_user_model from django.utils.translation import ugettext_lazy as _ from django.contrib.auth import authenticate from rest_framework import serializers from django.utils import translation class LoginSerializer(serializers.Serializer): username = seriali...
scailer/picarchive
utils/rest/rest/auth/serializers.py
Python
mit
4,382
""" Code adapted from http://scikit-learn.org/stable/auto_examples/applications/plot_out_of_core_classification.html """ from glob import glob import os.path import re from HTMLParser import HTMLParser class ReutersParser(HTMLParser): """Utility class to parse a SGML file and yield documents one at a time.""" ...
lukedeo/fancy-cnn
datasets/reuters21578/parser.py
Python
mit
3,082
import logging from django.core.management.base import BaseCommand from django.template.defaultfilters import slugify from july.models import User from july.people.models import Location from july.utils import check_location from optparse import make_option class Command(BaseCommand): help = 'fix locations' ...
julython/julython.org
july/management/commands/fix_locations.py
Python
mit
2,252
#!/usr/bin/env python # -*- coding: utf-8 -*- from flask import render_template, request, jsonify from . import main @main.app_errorhandler(403) def forbidden(e): if request.accept_mimetypes.accept_json and \ not request.accept_mimetypes.accept_html: response = jsonify({'error': 'forbidden'})...
sysuwangrui/Flask-BBS
app/main/errors.py
Python
mit
1,065
# This file is part of Indico. # Copyright (C) 2002 - 2019 CERN # # Indico is free software; you can redistribute it and/or # modify it under the terms of the MIT License; see the # LICENSE file for more details. from __future__ import division, unicode_literals from collections import defaultdict from itertools impo...
mvidalgarcia/indico
indico/modules/events/abstracts/models/abstracts.py
Python
mit
24,786
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/v2016_12_01/operations/virtual_network_peerings_operations.py
Python
mit
16,813
import logging import re try: from dionaea.sip.extras import int2bytes except Exception: from extras import int2bytes logger = logging.getLogger('sip') logger.setLevel(logging.DEBUG) class Address(object): """ >>> a1 = Address.froms(b"sip:john@example.org") >>> b1 = Address.froms(b"<sip:john@exa...
CZ-NIC/dionaea
modules/python/dionaea/sip/rfc2396.py
Python
gpl-2.0
6,759
# -*- coding: utf-8 -*- # # This file is part of Invenio. # Copyright (C) 2017 CERN. # # Invenio is free software; you can redistribute it # and/or modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of the # License, or (at your option) any later...
omelkonian/cds
tests/unit/test_deposit_search.py
Python
gpl-2.0
2,580
# Opus/UrbanSim urban simulation software. # Copyright (C) 2005-2009 University of Washington # See opus_core/LICENSE import os from opus_core.database_management.configurations.scenario_database_configuration import ScenarioDatabaseConfiguration from opus_core.database_management.configurations.estimation_da...
christianurich/VIBe2UrbanSim
3rdparty/opus/src/psrc/configs/baseline_without_travel_model_subset_10_percent.py
Python
gpl-2.0
719
from __future__ import print_function import random from future.utils import viewitems from miasm.expression.expression import * from miasm.expression.expression_helper import ExprRandom from miasm.ir.translators import Translator random.seed(0) class ExprRandom_OpSubRange(ExprRandom): operations_by_args_number...
serpilliere/miasm
example/expression/expr_translate.py
Python
gpl-2.0
1,724
import re import logging import ipaddress from builtins import str from builtins import object from oa.regex import Regex _NETWORK_RE = Regex(r""" ^(?P<exclude>!?) \[? (?P<ip> [0-9.]+| # IPv4 [0-9a-f:]* # IPv6 ) \]? /?(?P<port>[0-9]{0,5})$ """, re...
SpamExperts/SpamPAD
oa/networks.py
Python
gpl-2.0
3,162
#python import k3d import testing setup = testing.setup_mesh_modifier_test("PolyCube", "TranslatePoints") selection = k3d.geometry.selection.create(0) selection.points = k3d.geometry.point_selection.create(selection, 1) setup.modifier.mesh_selection = selection setup.modifier.x = 1.0 testing.require_valid_mesh(se...
barche/k3d
tests/mesh/mesh.modifier.TranslatePoints.py
Python
gpl-2.0
504
from banyan import SortedSet, OverlappingIntervalsUpdator class IntervalTree(object): def __init__( self ): # Create tree self.tree = SortedSet(updator=OverlappingIntervalsUpdator) def check_interval( self, start, end ): ''' Check interv...
adam-rabinowitz/ngs_python
intervals/banyan_tree.py
Python
gpl-2.0
11,273
# Copyright 2018 Red Hat, 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 2 of the License, or # (at your option) any later version. # # This program is distributed in the ...
nirs/vdsm
lib/vdsm/tool/check_volume_leases.py
Python
gpl-2.0
6,629
# Auto-generated at Mon, 08 Oct 2012 15:04:21 +0000 # with the following command line: # ./py_output.py --explicit asn/RFC1157-SMI.asn import Yapasn1 as asn1 #module RFC1157-SNMP None Counter=asn1.TYPE(asn1.IMPLICIT(1,cls=asn1.APPLICATION_FLAG),asn1.INTEGER_class ([],0,4294967295)) ObjectName=asn1.OBJECT_IDENTIFIER Opa...
kerr-huang/Testerman
plugins/codecs/ber/Snmpv1Asn.py
Python
gpl-2.0
3,001
# This file is part of Buildbot. Buildbot 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, version 2. # # This program is distributed in the hope that it will be useful, but WITHOUT # ANY WARRANTY; without eve...
Lekensteyn/buildbot
master/buildbot/process/build.py
Python
gpl-2.0
27,622
#!/usr/bin/python3 import os from gi.repository import GLib, Gdk, Gtk, WebKit from configparser import ConfigParser import subprocess import sys import locale from optparse import OptionParser ''' A basic GTK widget (WebKit.WebView) which displays a slideshow in the ubiquity-slideshow format. Feel free to copy and p...
mohegan/ubiquity-slideshow-ubuntu
Slideshow.py
Python
gpl-2.0
5,649
""" Arithmetic operations for PandasObjects This is not a public API. """ # necessary to enforce truediv in Python 2.X from __future__ import division import operator import warnings import numpy as np import pandas as pd import datetime from pandas._libs import (lib, index as libindex, tsli...
Ziqi-Li/bknqgis
pandas/pandas/core/ops.py
Python
gpl-2.0
54,277
def rec(x): if x > 0: wat = x-1 rec(wat) print('This is fun') rec(10)
python-security/pyt
examples/example_inputs/recursive.py
Python
gpl-2.0
91
from cfme.utils.appliance.implementations.ui import navigate_to from cfme.utils.log import logger from cfme.utils.wait import wait_for def do_vm_provisioning(appliance, template_name, provider, vm_name, provisioning_data, request, num_sec=1500, wait=True, email="template_provisioner@example.com...
nachandr/cfme_tests
cfme/provisioning.py
Python
gpl-2.0
1,956
#!/usr/bin/env python # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # Michael A.G. Aivazis # California Institute of Technology # (C) 1998-2005 All Rights Reserved # # <LicenseText> # # ~~~~~~~~~~~~~~~~~~~~~~~~...
bmi-forum/bmi-pyre
pythia-0.8/packages/merlin/merlin/projects/__init__.py
Python
gpl-2.0
476
# debug.py: -*- Python -*- DESCRIPTIVE TEXT. ################################# DEBUGGING CONSTANTS ###################################### # debugging constants ... set debug to one of these # if adding new debug levels make sure the new ones are # a unique power of 2 (1, 2, 4, 8, 16...). Also, the new # ones should...
bjmc/kodos
modules/debug.py
Python
gpl-2.0
1,043
# SPDX-License-Identifier: GPL-2.0+ # Copyright (c) 2016 Google, Inc # Written by Simon Glass <sjg@chromium.org> # # Entry-type module for Intel Management Engine binary blob # from collections import OrderedDict from binman.entry import Entry from binman.etype.blob_ext import Entry_blob_ext from dtoc import fdt_util...
CTSRD-CHERI/u-boot
tools/binman/etype/intel_ifwi.py
Python
gpl-2.0
5,382
# install.py # Do the hard work of performing an installation. # # Copyright (C) 2012 Red Hat, Inc. # # This copyrighted material is made available to anyone wishing to use, # modify, copy, or redistribute it subject to the terms and conditions of # the GNU General Public License v.2, or (at your option) any later ver...
mairin/anaconda
pyanaconda/install.py
Python
gpl-2.0
7,233
# -*- coding: utf-8 -*- import pytest from cfme import test_requirements from cfme.cloud.provider.ec2 import EC2Provider from cfme.cloud.provider.openstack import OpenStackProvider from cfme.infrastructure.provider.rhevm import RHEVMProvider from cfme.infrastructure.provider.virtualcenter import VMwareProvider from cf...
lkhomenk/integration_tests
cfme/tests/intelligence/reports/test_views.py
Python
gpl-2.0
1,428
# This file is part of Lerot. # # Lerot 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 3 of the License, or # (at your option) any later version. # # Lerot is distributed in the hope tha...
m0re4u/LeRoT-SCLP
lerot/ranker/model/BM25Ensemble.py
Python
gpl-3.0
1,981
""" Copyright 2017 Oliver Smith This file is part of pmbootstrap. pmbootstrap 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. pmbootstrap ...
lawl/pmbootstrap
pmb/chroot/apk.py
Python
gpl-3.0
10,025
# -*- coding: utf-8 -*- ## ## ## This file is part of Indico. ## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN). ## ## Indico 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; eith...
pferreir/indico-backup
indico/MaKaC/common/xmlrpcTimeout.py
Python
gpl-3.0
3,015
import inspect import os import re from setuptools import setup INSTALL_REQUIRES = [ 'numpy', 'scipy', 'matplotlib', 'obspy', 'gdal', ] SETUP_DIRECTORY = os.path.dirname(os.path.abspath(inspect.getfile( inspect.currentframe()))) ENTRY_POINTS = { 'console_scripts': [ 'pySW4-plot...
shaharkadmiel/seispy
setup.py
Python
gpl-3.0
2,383
""" Embedded Python Blocks: Each this file is saved, GRC will instantiate the first class it finds to get ports and parameters of your block. The arguments to __init__ will be the parameters. All of them are required to have default values! """ import time import numpy as np from gnuradio import gr class blk (gr.syn...
Foo-Manroot/foo-manroot.github.io
assets/posts/2017-11-18-gnuradio-ook/flowgraphs/stats_collector_py3.py
Python
gpl-3.0
9,084
# -*- coding: utf-8 -*- # # phpMyAdmin documentation build configuration file, created by # sphinx-quickstart on Wed Sep 26 14:04:48 2012. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # ...
zh99998/jiongbiaoqing
phpmyadmin/doc/conf.py
Python
gpl-3.0
9,354
# -*- encoding: utf-8 -*- def select_all(): r'''Makes cyclic boolean pattern equal to all indices. .. container:: example **Example 1.** Selects all divisions for tie creation: :: >>> pattern = rhythmmakertools.select_all() :: >>> print(format(pattern)) ...
mscuthbert/abjad
abjad/tools/rhythmmakertools/select_all.py
Python
gpl-3.0
1,775
# Copyright (C) 2008, OLPC # # 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 hope...
sugarlabs/sugar
extensions/cpsection/datetime/view.py
Python
gpl-3.0
5,051
# -*- coding: utf-8 -*- """ 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 ...
chaosmaker/pyload
module/plugins/hoster/HellspyCz.py
Python
gpl-3.0
2,936
# (c) 2012, 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) any lat...
gtaylor/ansible
lib/ansible/module_utils/facts.py
Python
gpl-3.0
119,106
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2014-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # # This file is part of qutebrowser. # # qutebrowser 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 S...
bcb/qutebrowser
qutebrowser/browser/downloadview.py
Python
gpl-3.0
6,323
#!/usr/bin/env python ''' OWASP ZSC | ZCR Shellcoder ZeroDay Cyber Research Z3r0D4y.Com Ali Razmjoo ''' import random,binascii,string chars = string.digits + string.ascii_letters def start(shellcode,job): if 'chmod(' in job: t = True eax = str('0x0f') while t: eax_1 = binascii.b2a_hex(''.join(random.choice(...
Yas3r/OWASP-ZSC
lib/encoder/linux_x86/add_random.py
Python
gpl-3.0
18,020
# coding=utf-8 """ Impact Layer Merge Dialog. .. note:: This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. """ __...
Gustry/inasafe
safe/gui/tools/minimum_needs/needs_manager_dialog.py
Python
gpl-3.0
36,492
import urllib.request, urllib.error, urllib.parse from PyQt5 import QtCore, QtWidgets import modvault import util FormClass, BaseClass = util.THEME.loadUiType("modvault/uimod.ui") class UIModWidget(FormClass, BaseClass): FORMATTER_UIMOD = str(util.THEME.readfile("modvault/uimod.qthtml")) def __init__(sel...
GrotheFAF/client
src/modvault/uimodwidget.py
Python
gpl-3.0
1,946
# sensorBoosterActivePercentage # # Used by: # Modules from group: Sensor Booster (16 of 16) type = "active" def handler(fit, module, context): fit.ship.boostItemAttr("maxTargetRange", module.getModifiedItemAttr("maxTargetRangeBonus"), stackingPenalties=True) fit.ship.boostItemAttr(...
Ebag333/Pyfa
eos/effects/sensorboosteractivepercentage.py
Python
gpl-3.0
719
import os def tryme(): print("try me called!")
adjustive/dapp
thirdparty/test.py
Python
gpl-3.0
49
#!/usr/bin/env python ######################################################################## # $HeadURL$ # File : dirac-deploy-scripts # Author : Adria Casajus ######################################################################## """ Deploy all scripts and extensions """ from __future__ import print_function __R...
petricm/DIRAC
Core/scripts/dirac-deploy-scripts.py
Python
gpl-3.0
6,981
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2016, Ansible, a Red Hat company # 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 DOCUMENTATION = r''' module: meta short_descr...
pmarques/ansible
lib/ansible/modules/meta.py
Python
gpl-3.0
4,885
""" Tools for querying github. I tried using pygithub3, but it really sucks. """ import requests def _link_field_to_dict(field): """ Utility for ripping apart github's Link header field. It's kind of ugly. """ if not field: return dict() return dict([ ( part.split('...
zackp30/bugwarrior
bugwarrior/services/githubutils.py
Python
gpl-3.0
3,136
# c1218/urlhandler/protocol_unix.py # # Copyright 2013 Spencer J. McIntyre <SMcIntyre [at] SecureState [dot] net> # # 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 L...
firebitsbr/termineter
c1218/urlhandler/protocol_unix.py
Python
gpl-3.0
3,826
import IMP import IMP.test import IMP.atom from math import * class Test(IMP.test.TestCase): def setUp(self): IMP.test.TestCase.setUp(self) self.m = IMP.Model() self.ref_scores = {} self.ref_scores["1h68.pdb"] = -36.4341363762 self.ref_scores["1ors.pdb"] = -13.1726910037 ...
shanot/imp
modules/atom/test/test_ez_restraint.py
Python
gpl-3.0
1,025
# -*- coding: utf-8 -*- import time from core import httptools from core import scrapertools from platformcode import logger headers = {'User-Agent': 'Mozilla/5.0 (Linux; Android 6.0; Nexus 5 Build/MRA58N) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Mobile Safari/537.36'} def test_video_ex...
alfa-addon/addon
plugin.video.alfa/servers/bdupload.py
Python
gpl-3.0
1,391
# -*- coding: utf-8 -*- # Generated by Django 1.11.20 on 2019-05-10 13:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('geonode_themes', '0004_auto_20190503_1817'), ] operations = [ migrations.A...
mcldev/geonode
geonode/themes/migrations/0005_auto_20190510_1335.py
Python
gpl-3.0
1,750
""" Test suite to check compilance with PEP 247, the standard API for hashing algorithms """ import hmac import unittest from hashlib import md5, sha1, sha224, sha256, sha384, sha512 from test import support class Pep247Test(unittest.TestCase): def check_module(self, module, key=None): self.assertTrue(ha...
mancoast/CPythonPyc_test
fail/312_test_pep247.py
Python
gpl-3.0
2,082
"""Test class for Remote Execution Management UI""" from robottelo.decorators import stubbed, tier1, tier2 from robottelo.test import UITestCase class RemoteExecutionTestCase(UITestCase): """Test class for remote execution feature""" @stubbed() @tier1 def test_positive_create_simple_job_template(self...
blrm/robottelo
tests/foreman/ui/test_remoteexecution.py
Python
gpl-3.0
6,333
from __future__ import print_function, division, absolute_import, unicode_literals from fontTools.misc.py23 import * import unittest from .encodingTools import getEncoding class EncodingTest(unittest.TestCase): def test_encoding_unicode(self): self.assertEqual(getEncoding(3, 0, None), "utf_16_be") # MS Symbol is ...
MitchTalmadge/Emoji-Tools
src/main/resources/PythonScripts/fontTools/misc/encodingTools_test.py
Python
gpl-3.0
1,152
import urllib,urllib2,re,cookielib,sys,os import xbmc, xbmcgui, xbmcaddon, xbmcplugin from resources.libs import main #Mash Up - by Mash2k3 2012. from t0mm0.common.addon import Addon addon_id = 'plugin.video.movie25' selfAddon = xbmcaddon.Addon(id=addon_id) addon = Addon('plugin.video.movie25', sys.argv) art = main.a...
marduk191/plugin.video.movie25
resources/libs/live/vipplaylist.py
Python
gpl-3.0
5,453
# 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 nose.plugins.attrib import attr from nose.tools import eq_, assert_raises import psycopg2 import psycopg2.extras f...
rhelmer/socorro-lib
socorro/unittest/external/postgresql/test_products_builds.py
Python
mpl-2.0
7,255
# 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 bedrock.mozorg.util import page urlpatterns = ( page('', 'styleguide/index.html'), )
sgarrity/bedrock
bedrock/styleguide/urls.py
Python
mpl-2.0
295
# 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/. import l10n_utils def example(request): return l10n_utils.render(request, 'l10n_example/example.html')
mozilla/mwc
apps/l10n_example/views.py
Python
mpl-2.0
309