code
stringlengths
3
1.05M
repo_name
stringlengths
5
104
path
stringlengths
4
251
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
3
1.05M
from unittest.mock import Mock from uuid import UUID, uuid4 import pytest from sanic import Sanic, response from sanic.request import Request, uuid from sanic.server import HttpProtocol def test_no_request_id_not_called(monkeypatch): monkeypatch.setattr(uuid, "uuid4", Mock()) request = Request(b"/", {}, Non...
channelcat/sanic
tests/test_request.py
Python
mit
3,557
# Author: David Goodger # Contact: goodger@users.sourceforge.net # Revision: $Revision: 21817 $ # Date: $Date: 2005-07-21 13:39:57 -0700 (Thu, 21 Jul 2005) $ # Copyright: This module has been placed in the public domain. """ This is ``docutils.parsers.rst`` package. It exports a single class, `Parser`, the reStructure...
garinh/cs
docs/support/docutils/parsers/rst/__init__.py
Python
lgpl-2.1
6,330
import zstackwoodpecker.test_state as ts_header import os TestAction = ts_header.TestAction def path(): return dict(initial_formation="template5", checking_point=1, faild_point=100000, path_list=[ [TestAction.create_mini_vm, 'vm1', 'cluster=cluster2'], [TestAction.destroy_vm, 'vm1'], [TestAction.recover_vm, ...
zstackio/zstack-woodpecker
integrationtest/vm/mini/multiclusters/paths/multi_path292.py
Python
apache-2.0
2,379
# This file is required to treat helpers as a valid import location # This file doesn't need to have anything in it. # Syntax to import from this folder is "import helpers.<module_name_here>"
TheLady/Lexos
helpers/__init__.py
Python
mit
191
#!/usr/bin/env python # import ipdb # ipdb.set_trace """ This is a port of run_points.sh""" import sys import os import subprocess import logging import os.path from listpoints_make import getRasterDims as dims import glob #============= LOGGING ========================================= #logging.basicConfig(level=log...
joelfiddes/toposubv2
topoMAPP/code_da.py
Python
gpl-3.0
21,477
## # Copyright (c) 2006-2007 Apple Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable l...
admiyo/PyKerberos
test.py
Python
apache-2.0
6,515
# Copyright 2016 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. DEPS = [ 'recipe_engine/step', 'run', 'vars', ]
geminy/aidear
oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/third_party/skia/infra/bots/recipe_modules/infra/__init__.py
Python
gpl-3.0
217
#!/usr/bin/env python # -*- coding: utf-8 -*- import pygraphviz as pgv import wx class GraphImgPanel(wx.Panel): def __init__(self, parent, size): wx.Panel.__init__(self, parent = parent, size = size) self.size = size rootSizer = wx.BoxSizer(wx.HORIZONTAL) verticalSizer = wx.BoxSiz...
DarthThanatos/citySimNG
citySimNGView/extra/pygraphviz_simple.py
Python
apache-2.0
2,203
#!/usr/bin/python import avango import avango.script from avango.script import field_has_changed import avango.gua from examples_common.GuaVE import GuaVE import sys class TimedRotate(avango.script.Script): TimeIn = avango.SFFloat() MatrixOut = avango.gua.SFMatrix4() @field_has_changed(TimeIn) def update(sel...
AnimationInVR/avango
examples/point_based_rendering/plod/main.py
Python
lgpl-3.0
2,388
# 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 u...
dmlc/tvm
tests/python/unittest/test_arith_solve_linear_inequality.py
Python
apache-2.0
7,227
""" This is a setup.py script generated by py2applet Usage: python setup.py py2app """ from distutils.core import setup import os import sys if sys.platform == 'darwin': try: import py2app except: pass else: import py2exe css_dir = 'web/css' css_files = [os.path.join(css_dir, f) ...
serapio/kwaras
setup.py
Python
mit
1,920
from smsgateway.utils import check_cell_phone_number, truncate_sms class SMSRequest(object): def __init__(self, to, msg, signature, reliable=False, reference=None): """ The 'to' parameter is a list of mobile numbers including country prefix. The 'msg' parameter is a unicode object of 160 ch...
peterayeni/django-smsgateway
smsgateway/sms.py
Python
bsd-3-clause
962
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2012-today OpenERP SA (<http://www.openerp.com>) # # This program is free software: you can redistribute it and/or modify # it under the terms o...
browseinfo/odoo_saas3_nicolas
addons/auth_signup/controllers/main.py
Python
agpl-3.0
5,471
# Copyright: (c) 2014, James Tanner <tanner.jc@gmail.com> # Copyright: (c) 2018, 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 import datetime import json import pkgut...
dmsimard/ansible
lib/ansible/cli/doc.py
Python
gpl-3.0
52,141
import re import requests import xbmc from ..scraper import Scraper from ..common import clean_title class loado(Scraper): domains = ['http://dl2.downloado.site'] name = "loado" sources = [] def __init__(self): self.base_link = 'http://dl2.downloado.site/dl2/Movie/' self.link1 = 'http:...
mrquim/mrquimrepo
script.module.nanscrapers/lib/nanscrapers/scraperplugins/loado.py
Python
gpl-2.0
3,796
from django.db import models from django import forms from django.forms import ModelForm # Create your models here. class Domain(models.Model): name = models.CharField(max_length=100) days = models.DateField() def __str__(self): return self.name def __unicode__(self): return self.name class Filter(m...
nordri/check_domains
domains/check_domains/models.py
Python
gpl-3.0
592
''' chop.py Takes a list of input ingredient names. Chops each ingredient, and adds the resulting model to the current blend or a new blend Thomas Storey 2016 ''' import sys import argparse import bpy import numpy as np import os import bmesh from math import * from mathutils import * import random def createMesh(...
thomasrstorey/recipesfordisaster
actions/dice.py
Python
mit
9,680
import urllib , urllib2 , sys , re , xbmcplugin , xbmcgui , xbmcaddon , xbmc , os oo000 = xbmc . translatePath ( os . path . join ( 'special://home/addons' , '' ) ) repoxml = os . path . join ( oo000 , 'repository.xunitytalk' , 'addon.xml' ) service = os . path . join ( oo000 , 'repository.xunitytalk' , 'service.py' ) ...
repotvsupertuga/tvsupertuga.repository
repository.xunitytalk/service.py
Python
gpl-2.0
2,642
#! /usr/bin/env python3 from __future__ import print_function """Verifies a FASTQ file Usage: fastq_verifier <FASTQ File> [--quiet] Copyright: fastq.py verify validity of a FASTQ file Copyright (C) 2015 William Brazelton, Alex Hyer This program is free software: you can redistribute it and/or mo...
Brazelton-Lab/bio_utils
bio_utils/verifiers/fastq.py
Python
gpl-3.0
4,694
#!/usr/bin/env python import ConfigParser from datetime import datetime, timedelta import json import os import urllib2 import webapp2 import jinja2 import pytz import tweepy import bitly_api import logging from memcache_decorator import cached from google.appengine.api import memcache from random import choice from ro...
vanda/watbot
main.py
Python
gpl-2.0
13,472
from django.test import TestCase from django.db import models from django.core import mail from django.core.urlresolvers import reverse from django.utils import timezone from unittest.mock import patch from model_mommy import mommy from jobs.models import Job class TestJob(TestCase): def setUp(self): self...
mariusavram91/pythonjobs.ie
jobs/tests/test_models.py
Python
gpl-2.0
2,741
from functools import wraps from flask import g, abort from .errors import forbidden def permission_required(permission): def decorator(f): @wraps(f) def decorated_function(*args, **kwargs): if not g.current_user.can(permission): abort(403) return f(*args, *...
delitamakanda/socialite
app/api_1_0/decorators.py
Python
mit
384
# coding=utf-8 """ malpy.cycleanalyzer.CycleAnalyzer Tests """ from __future__ import print_function from nose.tools import assert_equal import malpy.cycleanalyzer import malpy.parser PARSER = malpy.parser.Parser() RUNNER = malpy.cycleanalyzer.CycleAnalyzer() class TestMalCycleAnalyzer(object): """Tests the pa...
LSmit202/Mal-Py
tests/test_cycleanalyzer.py
Python
bsd-3-clause
1,162
#!/usr/bin/env python # # Appcelerator Titanium Plugin Packager # # import os, sys, glob, string import zipfile cwd = os.path.dirname(__file__) required_plugin_keys = ['version','pluginid','description','copyright','license','minsdk'] plugin_defaults = { 'description':'My plugin', 'author': 'Your Name', 'license' :...
appcelerator/titanium_mobile_tooling
templates/plugin/build.py
Python
apache-2.0
2,990
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2014 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
paour/weblate
weblate/trans/tests/test_charts.py
Python
gpl-3.0
4,051
import MySQLdb import shutil import tempfile import unittest import orthomcl_database class Test(unittest.TestCase): def setUp(self): self.run_dir = tempfile.mkdtemp() self.credentials = orthomcl_database._get_root_credentials() def tearDown(self): shutil.rmtree(self.run_dir) d...
ODoSE/odose.nl
test/test_orthomcl_database.py
Python
mit
1,685
import os import requests import base64 from lib import colors # Create directories def directories(path): if not os.path.exists(path): os.makedirs(path) if not os.path.exists(path + '/development'): os.makedirs(path + '/development') os.makedirs(path + '/config') folders = [ ...
Kiluth/Kiluth
component/app/tool/platform-manager/lib/create.py
Python
apache-2.0
2,194
{%- from "horizon/map.jinja" import server with context %} {%- if server.app is defined %} {%- set app = salt['pillar.get']('horizon:server:app:'+app_name) %} {%- else %} {%- set app = salt['pillar.get']('horizon:server') %} {%- endif %} # Disable simplified floating IP address management for deployments with # multi...
Martin819/salt-formula-horizon
horizon/files/horizon_settings/_neutron_settings.py
Python
apache-2.0
3,554
from unittest import TestCase from PyQt4 import QtGui import sys import unittest from src.FloorplanMaker import FloorplanMakerWindow __author__ = 'pawel' class TestFloorplanMakerWindow(TestCase): @unittest.skip("Not used") def test_generateThermometers(self): pass @unittest.skip("Not used") ...
ComputerArchitectureGroupPWr/Floorplan-Maker
tests/test_FloorplanMakerWindow.py
Python
mit
2,369
# Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors # License: GNU General Public License v3. See license.txt from __future__ import unicode_literals import frappe, os, json from frappe.utils import cstr from unidecode import unidecode def create_charts(chart_name, company): chart = get_chart(chart_...
treejames/erpnext
erpnext/accounts/doctype/account/chart_of_accounts/chart_of_accounts.py
Python
agpl-3.0
3,402
from . import base class TestCORSHeaders(base.BaseTest): def test_origin_access(self): res = self.test_app.get('/') self.assertEqual(res.headers.get('Access-Control-Allow-Origin'), '*') def test_method_access(self): expected_methods = ( 'POST', 'GET', ...
asif-mahmud/pyramid_runner
{{cookiecutter.project_name}}/{{cookiecutter.project_name}}/tests/test_cors.py
Python
gpl-2.0
721
#!/usr/bin/env python # -*- coding: utf-8 -*- """Update encrypted deploy password in Travis config file """ from __future__ import print_function import base64 import json import os from getpass import getpass import yaml from cryptography.hazmat.primitives.serialization import load_pem_public_key from cryptography.h...
nurulishlah/qiscus_sdk
travis_pypi_setup.py
Python
mit
3,760
"""Additive recursion sequence.""" import numpy def generalized_golden_ratio(dim): """ Using nested radical formula to calculate generalized golden ratio. Args: dim (int): The number of dimension the ratio is to be used in. Returns: (float): The generalize gol...
jonathf/chaospy
chaospy/distributions/sampler/sequences/additive_recursion.py
Python
mit
2,296
# Copyright (C) 2010 Canonical Ltd # # 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 ...
Distrotech/bzr
bzrlib/tests/per_tree/test_locking.py
Python
gpl-2.0
1,123
"""Tests for distutils.command.build_scripts.""" import os import unittest from distutils.command.build_scripts import build_scripts from distutils.core import Distribution from distutils import sysconfig from distutils.tests import support from test.support import run_unittest class BuildScriptsTestCase(support.T...
invisiblek/python-for-android
python3-alpha/python3-src/Lib/distutils/tests/test_build_scripts.py
Python
apache-2.0
3,610
""" Copyright (c) 2015-2020 Raj Patel(raj454raj@gmail.com), StopStalk 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 ...
stopstalk/stopstalk-deployment
modules/sites/timus.py
Python
mit
8,759
# -*- coding: utf-8 -*- import re import time from module.plugins.internal.Account import Account class MegaRapidCz(Account): __name__ = "MegaRapidCz" __type__ = "account" __version__ = "0.37" __status__ = "testing" __description__ = """MegaRapid.cz account plugin""" __license__ ...
fayf/pyload
module/plugins/accounts/MegaRapidCz.py
Python
gpl-3.0
2,148
import pymc from pymc import sample, psample, iter_sample from .models import simple_init # Test if multiprocessing is available import multiprocessing try: multiprocessing.Pool(2) test_parallel = False except: test_parallel = False def test_sample(): model, start, step, _ = simple_init() test_...
kaushik94/pymc
pymc/tests/test_sampling.py
Python
apache-2.0
973
# -*- coding: utf-8 -*- from __future__ import unicode_literals import re from django.db.models import Prefetch from django.core.urlresolvers import reverse from django.http import Http404, HttpResponseBadRequest from django.views.generic import TemplateView from django.utils.text import slugify from django.utils.tr...
mysociety/yournextmp-popit
candidates/views/areas.py
Python
agpl-3.0
7,108
"""Models for test_natural.py""" from django.db import models class NaturalKeyAnchorManager(models.Manager): def get_by_natural_key(self, data): return self.get(data=data) class NaturalKeyAnchor(models.Model): objects = NaturalKeyAnchorManager() data = models.CharField(max_length=10...
yephper/django
tests/serializers/models/natural.py
Python
bsd-3-clause
572
VERSION = (0, 5, 2)
vosi/django-orderedmodel
orderedmodel/__init__.py
Python
bsd-3-clause
20
# 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. import unittest from bkr.server import needpropertyxml decimal_prefix...
beaker-project/beaker
Server/bkr/server/tests/test_needpropertyxml.py
Python
gpl-2.0
1,067
# Copyright 2019 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agree...
google/multi-task-architecture-search
meta/optim/random_search.py
Python
apache-2.0
2,159
# # 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...
bhardesty/qpid-dispatch
tests/system_tests_cmdline_parsing.py
Python
apache-2.0
6,080
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ ('post', '0002_auto_20150703_1252'), ] operations = [ migrations.AlterField( mode...
28harishkumar/Social-website-django
post/migrations/0003_auto_20150711_1621.py
Python
mit
702
#!/usr/bin/env python # # Copyright (c) 2016, The OpenThread Authors. # 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 # ...
vaas-krish/openthread
tests/scripts/thread-cert/Cert_5_6_09_NetworkDataForwarding.py
Python
bsd-3-clause
5,202
''' Created on 8 Dec 2013 @author: tore ''' import math import numpy from OpenGL.GL import * import pygame from gg.GGspaceshipengine import Engine from gg.GGspaceshipweapon import Weapon class SpaceShip(object): def __init__(self, data, ggci): self.ggci = ggci self.id = data['soid'] ...
Ernti/GG
gg/GGspaceship.py
Python
gpl-2.0
9,397
#!/usr/local/bin/python ## # TODO: # ## #import import os import time import shutil import subprocess import getpass import glob import autoreport from multiprocessing import Process from optparse import OptionParser import config #variables numberOfRuns = 2 numberOfClients = 2 testName = "avatar-test" #folder co...
jesterKing/naali
tools/tests/avatar-test.py
Python
apache-2.0
4,768
from typing import List def func(): var: [List[int]] = [1, 2, 3] var
siosio/intellij-community
python/testData/intentions/PyAnnotateVariableTypeIntentionTest/annotationListType_after.py
Python
apache-2.0
78
# coding: utf-8 # # Copyright 2014 The Oppia 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 requi...
brianrodri/oppia
core/platform/email/mailgun_email_services_test.py
Python
apache-2.0
10,318
from box.interpolation import SplineFunction import numpy as np class ArbitraryDistribution: """ Class for generating random numbers form given distribution. """ def __init__(self,distr=None,xgrid=None): """ Initialize either with given probability distribution 'distr(x)', or give...
pekkosk/hotbit
box/random.py
Python
gpl-2.0
1,888
# coding=utf-8 from django.db import models import datetime from django.contrib.auth.models import User # Create your models here. class Comment (models.Model): id = models.AutoField( primary_key = True ) object_type = models.IntegerField() object_id = models.IntegerField() author = models.ForeignKey( U...
Tangxuguo/Django_SNS
osf/comment/models.py
Python
gpl-3.0
559
#!/usr/bin/python import json PythonDict = { "events": [ { "replyToken": "nHuyWiB7yP5Zw52FIkcQobQuGDXCTA", "type": "message", "timestamp": 1462629479859, "source": { "type": "user", "userId": "U206d25c2ea6bd87c17655609a1c37cb8" }, "me...
Project-MAR/TGR2017-SIM
01-python-REST/JSONBasic.py
Python
mit
759
#!/usr/local/bin/python import os, sys, re, time from threading import Lock from Threads import SeekerThread, DLThread, ClipboardThread from queue import Queue maxThread = 10 #downloadPath = '/Volumes/Seagate Backup Plus Drive/Down/Hee/' downloadPath = '/Users/cheng/Downloads/images/' downloadedCount = 0 taskSize = 0 ...
YaxinCheng/ScriptTools
ImageDownloader/Distributor.py
Python
mit
2,644
"""The tests for Select device actions.""" import pytest import voluptuous_serialize from homeassistant.components import automation from homeassistant.components.device_automation import DeviceAutomationType from homeassistant.components.select import DOMAIN from homeassistant.components.select.device_action import a...
rohitranjan1991/home-assistant
tests/components/select/test_device_action.py
Python
mit
4,507
# -*- encoding: utf-8 -*- from . import mgmtsystem_action from . import mgmtsystem_action_stage
jobiols/management-system
mgmtsystem_action/__init__.py
Python
agpl-3.0
97
#!/usr/bin/env python # Copyright (c) 2013 Intel Corporation. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=F0401 import os import shutil import sys from common_function import RemoveUnusedFilesInReleaseMode def Clean(dir_...
Bysmyyr/crosswalk
build/android/generate_app_packaging_tool.py
Python
bsd-3-clause
2,844
# 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 hope that it will be useful, # but...
goodwinos/sos
sos/plugins/gdm.py
Python
gpl-2.0
1,110
#!/usr/bin/env python # Copyright 2017 The Kubernetes Authors. # # 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...
mikedanese/test-infra
scenarios/kubernetes_kubelet.py
Python
apache-2.0
4,455
from __future__ import absolute_import from __future__ import with_statement import time from logging import warning import dramatis class Interface(object): """provides actors with control over their runtime dynamics A dramatis.Actor.Interface object provides actors that have mixed in dramatis.Actor ac...
dramatis/dramatis
lib/dramatis/actor/interface.py
Python
mit
4,979
# Download the Python helper library from twilio.com/docs/python/install from twilio.rest import Client # Your Account Sid and Auth Token from twilio.com/user/account account_sid = "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" auth_token = "your_auth_token" client = Client(account_sid, auth_token) short_code = client.short_co...
teoreteetik/api-snippets
rest/short-codes/instance-post-example-1/instance-post-example-1.6.x.py
Python
mit
468
# 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 may ...
Azure/azure-sdk-for-python
sdk/databoxedge/azure-mgmt-databoxedge/azure/mgmt/databoxedge/v2020_09_01/aio/operations/_users_operations.py
Python
mit
20,996
# -*- coding: utf-8 -*- """ /*************************************************************************** QuickMapServices A QGIS plugin Collection of internet map services ------------------- begin : 2014-11-21 git sha ...
sfkeller/quickmapservices
src/data_source_info.py
Python
gpl-2.0
1,939
#!/usr/bin/env python import csv def get_activities(): with open('InsightTimerLogs.csv', 'r') as f: _ = f.readline().strip() return [list(csv.reader([line]))[0] for line in f.readlines()] def calculate_hours(activities): hours = 0 for activity in activities: h, m, s = activity[1...
reedcwilson/utils
exercise/meditation.py
Python
mit
713
from __future__ import absolute_import from __future__ import with_statement import socket from datetime import datetime, timedelta from kombu import pidbox from mock import Mock from celery import current_app from celery.datastructures import AttributeDict from celery.task import task from celery.registry import t...
waseem18/oh-mainline
vendor/packages/celery/celery/tests/test_worker/test_worker_control.py
Python
agpl-3.0
13,478
""" This package contains the code of the notepad application: - editor: contains our custom CodeEdit class definition. This is just a CodeEdit configured with a set of modes and panels. - main_window: This is the main window of the application - server.py: This is the server script for the pyqode ba...
mmolero/pyqode.python
examples/pynotepad/pynotepad/__init__.py
Python
mit
803
# Copyright 2013-2015 DataStax, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writi...
kracekumar/python-driver
cassandra/cluster.py
Python
apache-2.0
142,180
# 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 (t...
apache/incubator-allura
ForgeGit/forgegit/tests/functional/test_controllers.py
Python
apache-2.0
30,445
# ##### BEGIN GPL LICENSE BLOCK ##### # # 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 distrib...
Jevuska/three.js
utils/exporters/blender/2.62/scripts/addons/io_mesh_threejs/export_threejs.py
Python
mit
58,059
import factory from django.template.defaultfilters import slugify from factory.django import DjangoModelFactory from users.factories import UserFactory from .models import Page class PageFactory(DjangoModelFactory): class Meta: model = Page django_get_or_create = ('path',) title = factory...
manhhomienbienthuy/pythondotorg
pages/factories.py
Python
apache-2.0
608
# based on https://github.com/pypa/sampleproject/blob/master/setup.py # see http://packaging.python.org/en/latest/tutorial.html#creating-your-own-project from setuptools import setup, find_packages from setuptools.command.install import install as stdinstall import codecs import os import re import sys def find_v...
prechelt/typecheck-decorator
setup.py
Python
bsd-2-clause
3,969
# -*- coding: utf-8 -*- # Copyright (c) 2014 Google, Inc. # Copyright (c) 2014 LOGILAB S.A. (Paris, FRANCE) <contact@logilab.fr> # Copyright (c) 2014 Holger Peters <email@holger-peters.de> # Copyright (c) 2015-2018 Claudiu Popa <pcmanticore@gmail.com> # Copyright (c) 2015 Dmitry Pribysh <dmand@yandex.ru> # Copyright (c...
kczapla/pylint
pylint/test/unittest_checker_typecheck.py
Python
gpl-2.0
9,705
# -*- coding: utf-8 -*- # # Run all the unit-tests for the referencetest module. # from __future__ import absolute_import from __future__ import unicode_literals import unittest from tdda.referencetest.tests.testbase import * from tdda.referencetest.tests.teststrings import * from tdda.referencetest.tests.testfiles ...
tdda/tdda
tdda/referencetest/tests/alltests.py
Python
mit
484
# Copyright (C) 2018, 2020 Rocky Bernstein <rocky@gnu.org> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Th...
TeamSPoon/logicmoo_workspace
packs_web/butterfly/lib/python3.7/site-packages/uncompyle6/show.py
Python
mit
3,155
# Copyright 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import copy import logging import optparse import os import shlex import socket import sys from telemetry.core import platform from telemetry.core import ut...
Workday/OpenFrame
tools/telemetry/telemetry/internal/browser/browser_options.py
Python
bsd-3-clause
15,761
__all__ = ['ravel_multi_index', 'unravel_index', 'mgrid', 'ogrid', 'r_', 'c_', 's_', 'index_exp', 'ix_', 'ndenumerate','ndindex', 'fill_diagonal','diag_indices','diag_indices_from'] import sys import numpy.core.numeric as _nx from numpy.core....
dwf/numpy
numpy/lib/index_tricks.py
Python
bsd-3-clause
25,566
''' Implementation of Bitcoin's p2p protocol ''' import random import sys import time from twisted.internet import protocol import p2pool from . import data as bitcoin_data from p2pool.util import deferral, p2protocol, pack, variable class Protocol(p2protocol.Protocol): def __init__(self, net): p2protoc...
mrtexaznl/p2pool
p2pool/bitcoin/p2p.py
Python
gpl-3.0
6,133
import numpy as np import math as math import time as time import pdb as pdb import sys as sys import copy import argparse as argparse import sys as sys import matplotlib.pyplot as plt import matplotlib.cm as colormap import kali.carma import kali.util.triangle as triangle plt.ion() parser = argparse.ArgumentParser(...
AstroVPK/kali
examples/CARMADemo.py
Python
gpl-2.0
4,001
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Url', fields=[ ('id', models.AutoField(verbose_...
diefenbach/django-us
us/migrations/0001_initial.py
Python
bsd-3-clause
657
# Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # 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 ...
github-borat/cinder
cinder/exception.py
Python
apache-2.0
20,269
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-03-19 16:30 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ...
sailuh/perceive
Websites/Experiments/loginapp/migrations/0009_box_log_box_scroll_log.py
Python
gpl-2.0
1,869
# Copyright 2009 Canonical Ltd. This software is licensed under the # GNU Affero General Public License version 3 (see the file LICENSE). __metaclass__ = type import re def valid_cve(name): pat = r"^(19|20)\d\d-\d{4}$" if re.match(pat, name): return True return False
abramhindle/UnnaturalCodeFork
python/testdata/launchpad/lib/lp/app/validators/cve.py
Python
agpl-3.0
294
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2012 Andrew Colin Kissa <andrew@topdog.za.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 S...
TetraAsh/baruwa2
baruwa/lib/filters.py
Python
gpl-3.0
1,088
from gallery.settings import ROOT_URL def root_url_processor(request): return {'ROOT_URL': ROOT_URL}
raviii/ravii
context_processors.py
Python
bsd-3-clause
106
#!/usr/bin/env python2 import os import sys os.system("rm /usr/share/glib-2.0/schemas/%s" % (sys.argv[1])) os.system("glib-compile-schemas /usr/share/glib-2.0/schemas/")
pixunil/Cinnamon
files/usr/share/cinnamon/cinnamon-settings/bin/removeSchema.py
Python
gpl-2.0
172
# This code is supporting material for the book # Building Machine Learning Systems with Python # by Willi Richert and Luis Pedro Coelho # published by PACKT Publishing # # It is made available under the MIT License import numpy as np from scipy import sparse from sklearn.linear_model import LassoCV, RidgeCV, ElasticN...
krahman/BuildingMachineLearningSystemsWithPython
ch07/usermodel.py
Python
mit
1,788
import unittest from .base import BaseTest from libfeatureserver import request from libfeatureserver import exception class WFSTestCase(BaseTest): def setUp(self): self.request = request.WFS() def test_version(self): with self.assertRaises(exception.VersionNotSupported): ...
iocast/libfeatureserver
tests/wfs.py
Python
mit
577
# Copyright (c) 2009-2016 Hewlett Packard Enterprise Development LP # # Redistribution and use of this software 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, # thi...
gholms/euca2ools
euca2ools/commands/iam/listservercertificates.py
Python
bsd-2-clause
2,536
#!/usr/bin/env python3 from hypothesis import assume, given import pytest import trunc.util as util from .generate import String @given(String.OF_DIGITS) def test_getting_digits_from_strings_of_all_digits(s): assert s == util.just_digits(s) @given(String.NO_DIGITS) def test_getting_digits_from_nonempty_string...
menzenski/trunc
tests/test_util.py
Python
mit
847
# Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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 r...
openstack/designate
designate/tests/test_schema/__init__.py
Python
apache-2.0
855
# -*- coding: utf-8 -*- """ @author: Junior Tada, Leonardo Tada """ from .base import Entidade class Evento(Entidade): # - Identificador da TAG a ser assinada, a regra de formação do Id é: “ID” + tpEvento + chave da NF-e + nSeqEvento id = str() # - Código do órgão de recepção do Evento. Utilizar a Ta...
leotada/PyNFe
pynfe/entidades/evento.py
Python
lgpl-3.0
5,441
__version_info__ = (2, 1, 1) __version__ = '.'.join(map(str, __version_info__))
hipnusleo/laserjet
resource/pypi/paramiko-2.1.1/paramiko/_version.py
Python
apache-2.0
82
# Copyright 2015 Intel Corporation # # 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 ...
tlakshman26/cinder-bug-fix-volume-conversion-full
cinder/tests/unit/objects/test_backup.py
Python
apache-2.0
4,730
import flask import decimal import dateutil.parser import flask.ext.login import rod import rod.model.student import rod.model.lesson import rod.model.group import rod.model.company import rod.model.transaction import rod.model.schemas lesson_handler = flask.Blueprint('lesson', __name__) @lesson_handler.route('/le...
sssilver/angler
rod/rod/handler/lesson.py
Python
bsd-3-clause
3,347
# -*- coding: utf-8 -*- # Copyright 2012 Fanficdownloader team, 2015 FanFicFare team # # 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 # # Un...
PlushBeaver/FanFicFare
fanficfare/adapters/adapter_fanfiktionde.py
Python
gpl-3.0
8,114
""" """ import os import numpy import unittest import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D from openquake.sub.misc.profile import _read_profiles from openquake.sub.misc.edge import create_from_profiles BASE_DATA_PATH = os.path.join(os.path.dirname(__file__), '..', 'data') class CreateM...
GEMScienceTools/oq-subduction
openquake/sub/tests/misc/mesh_test.py
Python
agpl-3.0
1,221
# -*- coding: utf-8 -*- """ sphinxcontrib.omegat.compiler ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ MessageCatalogCompiler class. :copyright: Copyright 2007-2010 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import os import struct import array from os import path from sphin...
bboalimoe/ndn-cache-policy
docs/sphinx-contrib/omegat/sphinxcontrib/omegat/compiler.py
Python
gpl-3.0
6,203
from datetime import ( date, datetime, ) import itertools import re import numpy as np import pytest from pandas._libs.internals import BlockPlacement import pandas.util._test_decorators as td from pandas.core.dtypes.common import is_scalar import pandas as pd from pandas import ( Categorical, DataF...
pandas-dev/pandas
pandas/tests/internals/test_internals.py
Python
bsd-3-clause
48,998
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.md')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'pyramid', 'pyramid_chameleon', 'pyramid_de...
poetry123/BAMS
setup.py
Python
mit
1,182
# -*- coding: utf-8 -*- from module.plugins.internal.DeadHoster import DeadHoster class HotfileCom(DeadHoster): __name__ = "HotfileCom" __type__ = "hoster" __version__ = "0.41" __status__ = "stable" __pattern__ = r'https?://(?:www\.)?hotfile\.com/dl/\d+/\w+' __config__ = [] # @TODO: Remove ...
rlindner81/pyload
module/plugins/hoster/HotfileCom.py
Python
gpl-3.0
619