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
import csv import os import pytest import shutil import subprocess from morphct import run_MorphCT from morphct.definitions import TEST_ROOT from testing_tools import TestCommand from morphct.code import helper_functions as hf @pytest.fixture(scope="module") def run_simulation(request): # ---=====================...
matty-jones/MorphCT
tests/test_init_wd.py
Python
gpl-3.0
1,642
import numpy import pandas import statsmodels.api as sm ''' In this exercise, we will perform some rudimentary practices similar to those of an actual data scientist. Part of a data scientist's job is to use her or his intuition and insight to write algorithms and heuristics. A data...
rmhyman/DataScience
Lesson1/titanic_data_heuristic1.py
Python
mit
2,937
#!/usr/bin/env python # Copyright 2016 Canonical UK Limited # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
coreycb/snap.openstack
snap_openstack/renderer.py
Python
apache-2.0
1,736
from pymongo import MongoClient import config ## # creates a connection to the remote Mongo DB # and sets up variables for each collection we use client = MongoClient(config.MONGODB_URL) db = client.exercisedb user_collection = db.Users exercise_collection = db.Exercises
CampfireBros/Fitness-Tracker
app/database/db_connection.py
Python
mit
273
# 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 copy of t...
zhimin711/nova
nova/tests/unit/test_fixtures.py
Python
apache-2.0
16,280
#!/usr/bin/env python # Copyright (C) 2015 Umberto De Giovannini # # 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, or (at your option) # any later version. # # This program...
gimunu/octopus-scripts
bands2h.py
Python
gpl-2.0
32,587
# -*- coding: utf-8 -*- # emma # # Copyright (C) 2006 Florian Schmidt (flo@fastflo.de) # 2014 Nickolay Karnaukhov (mr.electronick@gmail.com) # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software F...
fastflo/emma
emmalib/providers/sqlite/test.py
Python
gpl-2.0
1,782
# Generated by Django 2.2.1 on 2019-05-24 05:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ebooks', '0036_section_super_title'), ] operations = [ migrations.AlterField( model_name='book', name='color', ...
flavoi/diventi
diventi/ebooks/migrations/0037_auto_20190524_0738.py
Python
apache-2.0
4,683
from ldaptor.protocols.ldap.autofill import ObjectMissingObjectClassException class Autofill_samba: #TODO baseclass def start(self, ldapObject): assert 'objectClass' in ldapObject if 'sambaAccount' not in ldapObject['objectClass']: raise ObjectMissingObjectClassException, ldapObject ...
antong/ldaptor
ldaptor/protocols/ldap/autofill/sambaAccount.py
Python
lgpl-2.1
1,694
## This code is written by Davide Albanese, <albanese@fbk.eu>. ## (C) 2011 mlpy Developers. ## 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 op...
manhtuhtk/mlpy
mlpy/golub.py
Python
unlicense
3,516
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() readme = open('README.md').read() history = open('history.md')...
arnaldorusso/WindArrow
setup.py
Python
mit
1,236
import logging import urllib from typing import Any, Dict, List, Mapping, Tuple, Union import orjson import requests from django.conf import settings from django.forms.models import model_to_dict from django.utils.translation import gettext as _ from analytics.models import InstallationCount, RealmCount from version ...
andersk/zulip
zerver/lib/remote_server.py
Python
apache-2.0
7,292
# This script is a part of Hsalf. # # Copyright (c) 2011, Nam T. Nguyen # Released under the MIT license from hsalf import swf from cStringIO import StringIO import Image import sys import subprocess import optparse def list_stream(inp): fi = swf.SwfFile(inp) for tag in fi.iter_body(): ...
kozz/hsalf
scripts/svout.py
Python
mit
2,471
# -*- coding: utf-8 -*- # Copyright: (c) 2012, Matt Wright <matt@nobien.net> # 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 = ''' --- module: pip short_description: Manag...
renard/ansible
lib/ansible/modules/pip.py
Python
gpl-3.0
30,533
""" This module implements a set of :class:`revscoring.Feature` for use in scoring revisions. :class:`revscoring.Feature` lists can be provided to a :func:`revscoring.dependencies.solve`, or more commonly, to a :class:`revscoring.Extractor` to obtain simple numerical/boolean vaklues that can be used when modeling revi...
ToAruShiroiNeko/revscoring
revscoring/features/__init__.py
Python
mit
1,392
from tincan import Verb, LanguageMap class XAPIVerb(object): verbs = { 'viewed': 'http://id.tincanapi.com/verb/viewed', 'commented': 'http://adlnet.gov/expapi/verbs/commented', 'authored': 'http://activitystrea.ms/schema/1.0/author', 'removed': 'https://w3id.org/xapi/dod-isd/verbs/r...
ubc/compair
compair/learning_records/xapi/verb.py
Python
gpl-3.0
1,959
# Copyright (c) 2021 Ultimaker B.V. from typing import Optional from .PaginationMetadata import PaginationMetadata class ResponseMeta: """Class representing the metadata included in a Digital Library response (if any)""" def __init__(self, page: Optional[PaginationMetadata] = None, ...
Ultimaker/Cura
plugins/DigitalLibrary/src/ResponseMeta.py
Python
lgpl-3.0
658
import unittest from unittest.mock import patch import os from sys import path; path.append( os.path.join(os.path.dirname(__file__), "../amazondiscounts.src/camelcamelcamel/") ) from AMZNCamelScraper import AMZNCamelScraper from AMZNPriceHistory import AMZNPriceHistory priceHistory = AMZNPriceHistory(...
cristiangonzales/Amazon-Discounts
testing/AMZNTests.py
Python
mit
3,395
# Copyright 2014 OpenStack Foundation # All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requ...
MayankGo/ec2-api
ec2api/tests/functional/api/test_addresses.py
Python
apache-2.0
21,708
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-20 09:49 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('events', '0024_auto_20170217_1318'), ] operations ...
abecede753/trax
website/events/migrations/0025_pitlogentry_pitapitstop.py
Python
mit
570
import bpy from compas.geometry import Point class BlenderGeometry: """Base class for Blender Geometry and Object wrappers. Blender scene objects have an underlying data block that represents the actual geometry of the object. Multiple objects can share the same data block. Every object adds a "loca...
compas-dev/compas
src/compas_blender/conversions/_geometry.py
Python
mit
4,119
import sys PY3 = sys.version_info[0] == 3 if PY3: text_type = str binary_type = bytes else: text_type = unicode binary_type = str if PY3: def iteritems(d, **kw): return iter(d.items(**kw)) else: def iteritems(d, **kw): return iter(d.iteritems(**kw)) if PY3: import urllib....
andrewgiessel/folium
folium/six.py
Python
mit
418
""" WSGI config for HW3 project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see https://docs.djangoproject.com/en/1.7/howto/deployment/wsgi/ """ import os os.environ.setdefault("DJANGO_SETTINGS_MODULE", "HW3.settings") from django.core.wsgi impo...
dperlee/HW3
HW3/wsgi.py
Python
gpl-2.0
492
# -*- coding: utf-8 -*- # Copyright (C) Duncan Macleod (2018-2020) # # This file is part of GWpy. # # GWpy 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)...
gwpy/gwpy
gwpy/plot/tests/test_plot.py
Python
gpl-3.0
4,934
# Copyright 2014 Darsh Ranjan # # This file is part of python-plyfile. # # python-plyfile 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 ...
amonszpart/globOpt
evaluation/deps/plyfile.py
Python
apache-2.0
20,622
import os from os.path import join from yawp import static, wrapper, Link from yawp.static import Leaf import collect from collect import BASE_PATH, DATA, get_licenses class Root(Leaf): @wrapper def index(self, content, path=''): content['sub'] = [Link(Root.index, {'path': join(path, d.name)}, name=d...
ufoai/ufoai
contrib/licenses/base.py
Python
gpl-2.0
1,111
from __future__ import absolute_import from __future__ import print_function import os import csv import six import numpy as np import time import json import warnings from collections import deque from collections import OrderedDict from collections import Iterable from .utils.generic_utils import Progbar from . im...
sarwojowo/KerasProject
keras/callbacks.py
Python
mit
39,842
from django.conf import settings from django.contrib.auth import get_user_model from django.contrib.sites.shortcuts import get_current_site from django.core import mail from django.test.utils import override_settings from djet import assertions from rest_framework import status from rest_framework.reverse import revers...
sunscrapers/djoser
testproject/testapp/tests/test_reset_username.py
Python
mit
4,166
from abc import ABCMeta, abstractmethod # noinspection PyClassHasNoInit class IO: """Interface like class for classes that have input-output operations""" __metaclass__ = ABCMeta @abstractmethod def get_input(self): pass @abstractmethod def get_output(self): pass # noinspe...
issey173/DeepFramework
dframe/dataset/sample.py
Python
mit
4,227
# -*- coding: utf-8 -*- # code for console Encoding difference. Dont' mind on it import sys import imp imp.reload(sys) try: sys.setdefaultencoding('UTF8') except Exception as E: pass import testValue from popbill import CashbillService, PopbillException cashbillService = CashbillService(testValue.LinkID, te...
linkhub-sdk/popbill.cashbill.example.py
cancelIssue.py
Python
mit
1,363
# -*- coding: utf-8 -*- """Plotting features.""" #------------------------------------------------------------------------------ # Imports #------------------------------------------------------------------------------ import numpy as np from six import string_types from vispy import gloo from ._vispy_utils import...
nsteinme/phy
phy/plot/features.py
Python
bsd-3-clause
21,675
from django.conf.urls import url, include from transaction import views urlpatterns = [ url(r'^$', views.index, name='transaction.index'), url(r'^punchin/(?P<car_id>[0-9a-zA-Z]+)/$', views.punchin, name='transaction.punchin'), url(r'^punchin/(?P<car_id>[0-9a-zA-Z]+)/property/(?P<property_id>[0-9]+)/$', vi...
ScaleXY/speedby
speedby/transaction/urls.py
Python
gpl-2.0
748
#!/usr/bin/env python # encoding: utf-8 import glob import os import subprocess ''' Convert 23andMe files to PLINK format ''' def twenty3_and_me_files(): """Return the opensnp files that are 23 and me format""" all_twenty3_and_me_files= glob.glob('../opensnp_datadump.current/*.23andme.txt') fifteen_mb = 15 * 100...
gedankenstuecke/opensnp-fun
run_plink_reformat.py
Python
mit
968
print "is", 2*2 print("is", 2*2) print x, print(x, end=" ") print print() print >>sys.stderr, "er" print("er", file=sys.stderr) print (x, y) print((x, y)) print : source.python, support.function.builtin.python : source.python " : punctuation.definition.string.begin.python, source.p...
MagicStack/MagicPython
test/calls/print1.py
Python
mit
8,142
# 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. """Migrate from 0.11 to 0.12 Revision ID: 442672570b8f Revises: None C...
beaker-project/beaker
Server/bkr/server/alembic/versions/442672570b8f_011_to_012.py
Python
gpl-2.0
2,614
import logging import numpy as NP logger = logging.getLogger('pyrsss.util.nan') def nan_helper(y): """ Helper to handle indices and logical indices of NaNs. Input: - y, 1d numpy array with possible NaNs Output: - nans, logical indices of NaNs - index, a function, with signat...
butala/pyrsss
pyrsss/util/nan.py
Python
mit
1,196
# -*- coding: utf-8 -*- from paste.fixture import TestApp from paste.registry import RegistryManager import paste.httpexceptions as httpexceptions import pylons from pylons.controllers import WSGIController from pylons.controllers.util import redirect_to from __init__ import TestWSGIController, SetupCacheGlobal, Cont...
santisiri/popego
envs/ALPHA-POPEGO/lib/python2.5/site-packages/Pylons-0.9.6.1-py2.5.egg/tests/test_units/test_controller.py
Python
bsd-3-clause
4,909
# GUI Application automation and testing library # Copyright (C) 2006-2017 Mark Mc Mahon and Contributors # https://github.com/pywinauto/pywinauto/graphs/contributors # http://pywinauto.readthedocs.io/en/latest/credits.html # All rights reserved. # # Redistribution and use in source and binary forms, with or with...
MagazinnikIvan/pywinauto
pywinauto/tests/missingextrastring.py
Python
bsd-3-clause
6,285
# -*- coding: utf8 -*- # Copyright (c) 2017-2021 THL A29 Limited, a Tencent company. 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...
tzpBingo/github-trending
codespace/python/tencentcloud/btoe/v20210303/models.py
Python
mit
28,282
#!-*- coding:utf-8 -*- import time def retries(times=3, timeout=1): """对未捕获异常进行重试""" def decorator(func): def _wrapper(*args, **kw): att, retry = 0, 0 while retry < times: retry += 1 try: return func(*args, **kw) ...
wanghuafeng/spider_tools
decorator.py
Python
mit
1,524
import requests as req import json from . import classes from .. import utils import subprocess import time import os def newWalletFromViewKey(address, view_key, wallet_dir, wallet_file, wallet_pass): ''' newWalletFromViewKey(address, view_key, wallet_file, wallet_pass) :: initialize a new wallet using si...
Monero-Monitor/pymonero
pymonero/simplewallet/rpc.py
Python
bsd-3-clause
13,321
class Solution(object): def wiggleMaxLength(self, nums): """ :type nums: List[int] :rtype: int """ if len(nums) == 0: return 0 ret = 1 tag = 1 for i in range(1, len(nums)): if tag == 1 and nums[i] > nums[i-1]: ret += 1 t...
xingjian-f/Leetcode-solution
376. Wiggle Subsequence.py
Python
mit
723
from nogroth.models import Carrier, Shipper from satchmo_utils import load_once load_once('nogroth', 'nogroth') def get_methods(): return [Shipper(carrier) for carrier in Carrier.objects.filter(active=True)]
kevinharvey/satchmo-nogroth
nogroth/__init__.py
Python
mit
214
# To change this license header, choose License Headers in Project Properties. # To change this template file, choose Tools | Templates # and open the template in the editor. __author__="rasmadeus" __date__ ="$14.10.2014 19:16:28$" if __name__ == "__main__": from equre import equre equre_curve = equre.EqureCu...
rasmadeus/Equre
src/main.py
Python
gpl-2.0
480
############################################################################################## # Copyright 2014-2015 Cloud Media Sdn. Bhd. # # This file is part of Xuan Application Development SDK. # # Xuan Application Development SDK is free software: you can redistribute it and/or modify # it under the terms of...
TheStackBox/xuansdk
SDKLibrary/com/cloudMedia/theKuroBox/sdk/util/httpUtil.py
Python
gpl-3.0
1,866
import re from rednotebook.data import HASHTAG_PATTERN def test_hashtags(): vals = [ ("test #hashtag", ["hashtag"]), ("text #hash0tag", ["hash0tag"]), ("text #1tag", ["1tag"]), ("text #hash_tag", ["hash_tag"]), ("text #1234", []), ("text #12é34", ["12é34"]), ...
jendrikseipp/rednotebook
tests/test_hashtags.py
Python
gpl-2.0
1,495
"""Order/create a dedicated server.""" # :license: MIT, see LICENSE for more details. import SoftLayer from SoftLayer.CLI import environment from SoftLayer.CLI import exceptions from SoftLayer.CLI import formatting from SoftLayer.CLI import helpers from SoftLayer.CLI import template import click @click.command(epil...
briancline/softlayer-python
SoftLayer/CLI/server/create.py
Python
mit
4,914
import re import sys PROGRAM = sys.argv[0] VERSION = sys.argv[1] defs = [] for i in open (VERSION).readlines (): i = re.sub ('#.*','', i) m = re.search ('([^ =]*)[\t ]*=[ \t]*([^ \t]*)[ \t]*\n', i) if m: defs.append ((m.group (1), m.group (2))) sys.stdout.write (r''' /* Automatically generated ...
sehe/Lilypond
stepmake/bin/make-version.py
Python
gpl-3.0
975
from setuptools import setup, find_packages import os import re here = os.path.abspath(os.path.dirname(__file__)) # Read the version number from a source file. # Code taken from pip's setup.py def find_version(*file_paths): with open(os.path.join(here, *file_paths), 'r') as f: version_file = f.read() ...
robin92/pwravg
setup.py
Python
mit
1,702
# -*- coding: utf-8 -*- import datetime as dt import os import re import time import zipfile def mkdir(path): if not os.path.exists(path): os.makedirs(path) def read(path, loader=None, binary_file=False): open_mode = 'rb' if binary_file else 'r' with open(path, mode=open_mode) as fh: if ...
asaolabs/python-lambda
aws_lambda/helpers.py
Python
isc
1,843
# Copyright 2019 Virgil Dupras # # This software is licensed under the "GPLv3" License as described in the "LICENSE" file, # which should be included with this package. The terms are also available at # http://www.gnu.org/licenses/gpl-3.0.html from datetime import date from ..testutil import eq_ from ..base import T...
brownnrl/moneyguru
core/tests/gui/custom_date_range_panel_test.py
Python
gpl-3.0
1,773
# -*- coding: utf-8 -*- # vim: ai ts=4 sts=4 et sw=4 # Baruwa - Web 2.0 MailScanner front-end. # Copyright (C) 2010-2015 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...
akissa/baruwa2
baruwa/model/auth.py
Python
gpl-3.0
3,091
# 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 ...
lmazuel/azure-sdk-for-python
azure-batch/azure/batch/models/compute_node_paged.py
Python
mit
936
""" Copyright (c) 2015 Francisco Zamora-Martinez (francisco.zamora@uch.ceu.es) 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 right...
ESAI-CEU-UCH/picudo-manual-supervision
scripts/ANNOTATE/generate_wav_mat.py
Python
mit
2,487
"""Class to hold all thermostat accessories.""" import logging from pyhap.const import CATEGORY_THERMOSTAT from homeassistant.components.climate.const import ( ATTR_CURRENT_TEMPERATURE, ATTR_HVAC_ACTION, ATTR_HVAC_MODE, ATTR_HVAC_MODES, ATTR_MAX_TEMP, ATTR_MIN_TEMP, ATTR_TARGET_TEMP_HIGH, ...
leppa/home-assistant
homeassistant/components/homekit/type_thermostats.py
Python
apache-2.0
16,630
import xml.sax import xml.sax.handler START_ELEMENT = "START_ELEMENT" END_ELEMENT = "END_ELEMENT" COMMENT = "COMMENT" START_DOCUMENT = "START_DOCUMENT" END_DOCUMENT = "END_DOCUMENT" PROCESSING_INSTRUCTION = "PROCESSING_INSTRUCTION" IGNORABLE_WHITESPACE = "IGNORABLE_WHITESPACE" CHARACTERS = "CHARACTERS" class PullDOM(...
xyuanmu/XX-Net
python3.8.2/Lib/xml/dom/pulldom.py
Python
bsd-2-clause
11,997
from django.conf.urls import patterns, include, url # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # url(r'^$', 'photob.views.home', name='home'), url(r'^', include('home.urls')), url(r'^admin/', include(admin.site.u...
buddylindsey/photo-blogger
photob/urls.py
Python
bsd-2-clause
425
# Copyright (c) 2015 Rackspace Hosting 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 t...
roaet/quark
quark/environment.py
Python
apache-2.0
1,422
from testing.test_interpreter import BaseTestInterpreter class TestArray(BaseTestInterpreter): def test_bzip2(self): output = self.run(''' $in = "HippyVM"; $out = bzdecompress(bzcompress($in)); echo $out; ''') space = self.space assert space.str_w(output[...
xhava/hippyvm
testing/test_bzip2.py
Python
mit
337
# -*- coding: utf-8 -*- from mock import Mock from unittest2 import TestCase from raven.processors import SanitizePasswordsProcessor, RemovePostDataProcessor, \ RemoveStackLocalsProcessor class SantizePasswordsProcessorTest(TestCase): def test_stacktrace(self): data = { 'sentry.interfaces.S...
collective/mr.poe
tests/processors/tests.py
Python
bsd-3-clause
5,945
from datetime import datetime, timedelta, date, time import nose from pandas.compat import lrange, zip import numpy as np from numpy.testing.decorators import slow from numpy.testing import assert_array_equal from pandas import Index, Series, DataFrame from pandas.tseries.index import date_range, bdate_range from p...
webmasterraj/FogOrNot
flask/lib/python2.7/site-packages/pandas/tseries/tests/test_plotting.py
Python
gpl-2.0
41,563
#from setuptools import setup from distutils.core import setup setup( name='pilfer', version='2.0', description='pilfer command line tool to record audio and video from Kodi', url='https://github.com/NapoleonWils0n/pilfer', author='NapoleonWils0n', maintainer='NapoleonWils0n', license='GPL'...
NapoleonWils0n/pilfer
setup.py
Python
gpl-3.0
605
""" Has to be run in the same directory that containing this script """ import os import re import shutil import zipfile from distutils.core import setup import py2exe version = "0.10" setup( name="OwnVsRent", windows=['OwnVsRent.py'], version=version, author="Herman Tai", author_email="htaihm@gma...
hermantai/beta-programs
OwnVsRent/setup.py
Python
apache-2.0
737
# -*- coding: utf-8 -*- """WebSocketBaseTestCase is based on combination of Tornado and Django test systems. It require to use decorator '@gen.coroutine' for each test case method( see documentation: http://www.tornadoweb.org/en/stable/testing.html). It requires implementation of 'get_app' method to initialize tornado...
sonali0901/zulip
zerver/tests/test_tornado.py
Python
apache-2.0
11,648
# # # Copyright (C) 2011, 2012 Google 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 distri...
damoxc/ganeti
lib/build/sphinx_ext.py
Python
gpl-2.0
17,154
# 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 ...
jlachowski/clonedigger
clonedigger/logilab/common/configuration.py
Python
gpl-3.0
34,521
import datetime from Vacation import TrackRequest, Departures, Destinations, Duration SQ_LITE_FILE = '../data/vactrack.sqlite' SERVER_MODE = False THREAD_WORKERS_COUNT = 10 DEFAULT_START_DATE = datetime.date(2017, 6, 1) DEFAULT_END_DATE = datetime.date(2017, 6, 10) TRACK_REQUESTS = [ TrackRequest(Departures.OTT...
astone282/vactrack
vactrack/Settings.py
Python
apache-2.0
529
import os import sys import uuid from contextlib import contextmanager from django.apps import AppConfig, apps from django.db import connection from psqlextra.models import ( PostgresMaterializedViewModel, PostgresModel, PostgresPartitionedModel, PostgresViewModel, ) def define_fake_model( fiel...
SectorLabs/django-postgres-extra
tests/fake_model.py
Python
mit
3,375
#!BPY # -*- coding: utf-8 -*- # ################################################### # Copyright (C) 2008-2010 The Zero-Projekt team # http://zero-projekt.net # info@zero-projekt.net # This file is part of Zero "Was vom Morgen blieb" # # The Zero-Projekt codebase is free software; you can redistribute it and/or modify #...
parpg/parpg
tools/utilities/blender_isometric_rendering.py
Python
gpl-3.0
14,230
###################################################### # -*- coding: utf-8 -*- # File Name: lambda_function.py # Author: Qian Li # Created Date: 2017-10-26 # Description: demonstrate how to call an executable # and pass the parameters from Lambda function ###################################################### import j...
qinglan233/vass
tests/lambda-executable/src/lambda_function.py
Python
apache-2.0
1,354
########################################################### # # Copyright (c) 2009, Southpaw Technology # All Rights Reserved # # PROPRIETARY INFORMATION. This software is proprietary to # Southpaw Technology, and is not to be reproduced, transmitted, # or disclosed in any way without written permi...
Southpaw-TACTIC/TACTIC
src/tactic/ui/examples/base_example_wdg.py
Python
epl-1.0
1,706
#!/usr/bin/env python """igcollect - Directory Size Copyright (c) 2017 InnoGames GmbH """ import os from argparse import ArgumentParser from time import time def main(): args = parse_args() template = '{}.{{}} {{}} {}'.format(args.prefix, int(time())) for directory in args.directories: total_si...
innogames/igcollect
igcollect/directory_size.py
Python
mit
869
########################################################################## # # Copyright (c) 2015, Image Engine Design 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: # # * Redistrib...
chippey/gaffer
python/GafferDispatch/TaskSwitch.py
Python
bsd-3-clause
2,756
#!/usr/bin/env python ## begin license ## # # "Digitale Collectie ErfGeo Enrichment" is a service that attempts to automatically create # geographical enrichments for records in "Digitale Collectie" (http://digitalecollectie.nl) # by querying the ErfGeo search API (https://erfgeo.nl/search). # "Digitale Collectie ErfGe...
seecr/dc-erfgeo-enrich
test/_alltests.py
Python
gpl-2.0
2,769
# -*- 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): # Changing field 'TestResult.test_case' db.alter_column('autograde_testresult', 'test_case_id', self.gf('dj...
hbradlow/autograde
autograde/migrations/0004_auto__chg_field_testresult_test_case.py
Python
gpl-3.0
7,406
#!/usr/bin/python3 from smbus2 import SMBus import requests import requests.adapters import pytz import time import os import json import datetime import logging as _logging import traceback LOG_FORMAT = '%(asctime)s [%(levelname)s] %(name)s:%(filename)s:%(lineno)d %(msg)s' logger = _logging.getLogger(__name__) cla...
yuuki0xff/temvote
cli/bme280d/bme280d.py
Python
mit
11,906
from __future__ import unicode_literals from reviewboard.hostingsvcs.tests.testcases import ServiceTests class RedmineTests(ServiceTests): """Unit tests for the Redmine hosting service.""" service_name = 'redmine' fixtures = ['test_scmtools'] def test_service_support(self): """Testing the R...
davidt/reviewboard
reviewboard/hostingsvcs/tests/test_redmine.py
Python
mit
899
from WMCore.Configuration import Configuration config = Configuration() config.section_("General") config.General.requestName = "privateMCProduction#REQUESTDATE##WHOAMI#" config.General.workArea = 'crab_privateMCProduction' config.General.transferLogs = True config.section_("JobType") config.JobType.pluginName = 'Pri...
mharrend/privateMCproduction
crabconfig_draft.py
Python
mit
1,114
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
chemelnucfin/tensorflow
tensorflow/compiler/tests/reduce_ops_test.py
Python
apache-2.0
8,975
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Slash. Rotable and scalable image. The temperature property sets the color. """ from kivy.graphics import Color, Rectangle from kivy.graphics.context_instructions import PushMatrix, PopMatrix, Rotate from kivy.graphics.instructions import InstructionGroup from kivy.pr...
victor-rene/bisector
slash.py
Python
mit
1,804
# Copyright 2017 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
wangyum/tensorflow
tensorflow/python/tools/saved_model_cli_test.py
Python
apache-2.0
15,971
#!/usr/bin/env python import sys import dbus import getopt import os APPLICATION_DBUS_IFACE="org.conduit.Application" SYNCSET_DBUS_IFACE="org.conduit.SyncSet" CONDUIT_DBUS_IFACE="org.conduit.Conduit" EXPORTER_DBUS_IFACE="org.conduit.Exporter" DATAPROVIDER_DBUS_IFACE="org.conduit.DataProvider" def main(useGui, quitWh...
arsfeld/conduit
tools/example-dbus-conduit-client.py
Python
gpl-2.0
2,963
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RIllumina450probevariantsDb(RPackage): """Annotation Package combining variant data from 1...
LLNL/spack
var/spack/repos/builtin/packages/r-illumina450probevariants-db/package.py
Python
lgpl-2.1
718
from django.shortcuts import render from .models import Applications def search_app(request): ctx = {'applications': Applications.objects.filter(visible=True)} return render(request, 'search_app/home.html', ctx)
JacekKarnasiewicz/HomePage
apps/search_app/views.py
Python
mit
215
# encoding: utf-8 from __future__ import absolute_import import os import json from flask_restful.inputs import boolean # sql queries will return an exception if the query did not succeed before `statement_timeout` DEFAULT_SQLALCHEMY_ENGINE_OPTIONS = {"connect_args": {"options": "-c statement_timeout=1000"}} # 1000m...
CanalTP/navitia
source/jormungandr/jormungandr/default_settings.py
Python
agpl-3.0
10,617
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "agrostore.settings") try: from django.core.management import execute_from_command_line except ImportError: # The above import may fail for some other reason. Ensure that th...
pymelibre/ecolepo
agrostore/manage.py
Python
gpl-3.0
807
# coding: utf-8 import unittest import os import logging import tempfile from niamoto.testing import set_test_path set_test_path() from niamoto import log log.STREAM_LOGGING_LEVEL = logging.CRITICAL log.FILE_LOGGING_LEVEL = logging.DEBUG from niamoto.conf import settings, NIAMOTO_HOME from niamoto.api.raster_api i...
dimitri-justeau/niamoto-core
tests/data_publishers/test_raster_data_publisher.py
Python
gpl-3.0
1,747
#encoding:utf-8 import TestData.VirtualMachine.ITC05_SetUp as ModuleData from TestAPIs.VirtualMachineAPIs import VmSnapshotAPIs from TestData.VirtualMachine.scenarios1_Snapshot import description ''' @note: PreData ''' ''' @note: 创建虚拟机的离线快照 ''' vmsnapshotapi = VmSnapshotAPIs() snapshot_id = vmsnapshotapi.getVmSnapsho...
faylau/oVirt3.3WebAPITest
src/TestData/VirtualMachine/scenarios2_Snapshot.py
Python
apache-2.0
739
# C.py # language emitter implementation # author: Christophe VG from util.visitor import stacked from util.check import isstring import codecanvas.language as language import codecanvas.instructions as code import codecanvas.structure as structure from codecanvas.platform import Platform # a few additio...
christophevg/codecanvas
src/codecanvas/languages/C.py
Python
bsd-3-clause
31,538
# Copyright (c) 2014 The Bitcoin Core developers # Distributed under the MIT/X11 software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. # # Helpful routines for regression testing # # Add python-bitcoinrpc to module search path: import os import sys sys.path.append...
GNUDimarik/dimecoin
qa/rpc-tests/util.py
Python
mit
5,261
# These checks have to come first because aiohttp looks # for opencensus, too, and raises a different error otherwise. import opencensus # noqa: F401 import prometheus_client # noqa: F401 import aiohttp # noqa: F401 import aiohttp.web # noqa: F401 import aiohttp_cors # noqa: F401 from aiohttp import hdrs # noqa...
ray-project/ray
dashboard/optional_deps.py
Python
apache-2.0
426
from django.test import TestCase from django.core.urlresolvers import reverse from django.contrib.auth.models import User from tasks.models import Project, Task, Phase from .ext_test_case import ExtTestCase class TaskListTest(TestCase): def test_reverse(self): self.assertEqual(reverse('tasks:tasks'), '/ta...
jarnoln/mitasny
tasks/tests/test_views_task.py
Python
mit
22,436
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
samedder/azure-cli
src/command_modules/azure-cli-cognitiveservices/azure/cli/command_modules/cognitiveservices/_help.py
Python
mit
2,325
"""Implementations of installation abstract base class queries.""" # pylint: disable=invalid-name # Method names comply with OSID specification. # pylint: disable=no-init # Abstract classes do not define __init__. # pylint: disable=too-few-public-methods # Some interfaces are specified as 'markers' and incl...
mitsei/dlkit
dlkit/abstract_osid/installation/queries.py
Python
mit
49,175
# (c) Frienductions Inc, all rights reserved # This is proprietary code, you have not been granted any rights to use or distribute this code import config
jvrijn/httpBL-django
httpBL/__init__.py
Python
mit
157
#!/usr/bin/env python # 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 https://mozilla.org/MPL/2.0/. # Copyright (c) 2014 Mozilla Corporation from lib.alerttask import AlertTask from mozdef_util.q...
mpurzynski/MozDef
alerts/ldap_bruteforce_user.py
Python
mpl-2.0
1,810
# -*- coding: utf-8 -*- # # Copyright (C) 2010-2016 Red Hat, Inc. # # Authors: # Thomas Woerner <twoerner@redhat.com> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the Li...
firewalld/firewalld
src/firewall/core/fw.py
Python
gpl-2.0
53,071
# ##### 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...
kilon/sverchok
nodes/generator/basic_spline.py
Python
gpl-3.0
6,037
""" Test data """ EMPTY_SCENARIO = """ <?xml version='1.0' encoding='UTF-8' standalone='no'?> <om:scenario xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' name='name' schemaVersion='32' xsi:schemaLocation='http://openmalaria.org/schema/scenario_32 scenario_32.xsd' ...
vecnet/vnetsource
ts_om/tests/data.py
Python
mpl-2.0
443
# coding=utf-8 """Zonal statistics on a raster layer.""" import logging from qgis.analysis import QgsZonalStatistics from qgis.core import QgsFeatureRequest from safe.gis.sanity_check import check_layer from safe.gis.vector.tools import copy_layer, create_memory_layer from safe.gis.vector.prepare_vector_layer import...
Gustry/inasafe
safe/gis/raster/zonal_statistics.py
Python
gpl-3.0
3,963