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
# -*- coding: utf-8 -*- # Copyright 2016 Serpent Consulting Services Pvt. Ltd # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from . import res_company
Vauxoo/account-financial-tools
partner_report_open_invoices/models/__init__.py
Python
agpl-3.0
174
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # ...
jumpstarter-io/keystone
keystone/server/common.py
Python
apache-2.0
1,405
from dronekit import connect import time import argparse import pprint import rospy import copy from gf_beacon.srv import * import hostapd import beaconencoder import findap class sample_beacon_data: def __init__(self, connect_string): print "init" self.missing_AP = False try: ...
geofrenzy/utm-mbsb
beacon/dkbeacon.py
Python
apache-2.0
5,335
# Copyright (c) Jupyter Development Team. # Distributed under the terms of the Modified BSD License. import pytest from .. import jslink, jsdlink, ToggleButton from .utils import setup, teardown def test_jslink_args(): with pytest.raises(TypeError): jslink() w1 = ToggleButton() with pytest.raises...
sserrot/champion_relationships
venv/Lib/site-packages/ipywidgets/widgets/tests/test_link.py
Python
mit
1,005
# -*- coding: utf-8 -*- # Licensed under a 3-clause BSD style license - see LICENSE.rst from __future__ import (absolute_import, division, print_function, unicode_literals) from .. import profiling from .. import util class KCachegrindGui(profiling.ProfilerGui): name = 'kcachegrind' ...
mdboom/asv
asv/plugins/kcachegrind.py
Python
bsd-3-clause
742
""" LICENCE ------- Copyright 2013 by Kitware, Inc. All Rights Reserved. Please refer to KITWARE_LICENSE.TXT for licensing information, or contact General Counsel, Kitware, Inc., 28 Corporate Drive, Clifton Park, NY 12065. """ import atexit import logging import json import multiprocessing import os.path as osp impor...
anguoyang/SMQTK
OLD_ROOT/Backend/SMQTK_Backend/SmqtkController.py
Python
bsd-3-clause
25,337
# Copyright 2016 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
hfp/tensorflow-xsmm
tensorflow/python/keras/layers/gru_test.py
Python
apache-2.0
8,147
# Copyright 2016 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 a...
mfigurnov/sact
act_test.py
Python
apache-2.0
18,276
# Generated by Django 2.2.2 on 2019-06-15 10:26 import diventi.accounts.models from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('accounts', '0193_auto_20190615_1200'), ] operations = [ migrations.AlterModelManagers( name='diventiuser'...
flavoi/diventi
diventi/accounts/migrations/0194_auto_20190615_1226.py
Python
apache-2.0
452
#!/usr/bin/env python import rospy import random from std_msgs.msg import String #comment def text_publisher(): rospy.init_node('string_node',anonymous=True) pub=rospy.Publisher('/info',String, queue_size=10) r = rospy.Rate(0.5) while not rospy.is_shutdown(): text=['Run','Faster','EvenFaster','Stop'] i = ran...
ipa-lth/rviz_utils
rviz_text_publisher/src/string_publisher.py
Python
mit
494
# $Id: uas-subscribe-terminated-retry.py 4188 2012-06-29 09:01:17Z nanang $ # import inc_const as const PJSUA = ["--null-audio --max-calls=1 --id sip:pjsua@localhost --add-buddy $SIPP_URI"] PJSUA_EXPECTS = [[0, "", "s"], [0, "Subscribe presence of:", "1"], [0, "Presence subscription .* is TERMINATED", "...
AlexanderVangelov/pjsip
tests/pjsua/scripts-sipp/uas-subscribe-terminated-retry.py
Python
gpl-2.0
374
import logging import wx from odemis.acq.feature import FEATURE_ACTIVE, FEATURE_ROUGH_MILLED, FEATURE_DEACTIVE, save_features, FEATURE_POLISHED from odemis.gui.model import TOOL_FEATURE from odemis.gui.util.widgets import VigilantAttributeConnector class CryoFeatureController(object): """ controller to handle t...
delmic/odemis
src/odemis/gui/cont/features.py
Python
gpl-2.0
9,202
#!/usr/bin/python import sys import os.path import xml.parsers.expat class Configuration: map={} def __init__(self, parentDir, defaultFileName, siteFileName): self.parse(parentDir, defaultFileName) self.parse(parentDir, siteFileName) def parse(self, parentDir, fileName): file = open(parentDir + '/' + fileN...
babokim/cloudata
bin/cconf.py
Python
apache-2.0
1,836
#!/usr/bin/env python # -*- coding: utf-8 -*- # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
appium/python-client
test/functional/android/webelement_tests.py
Python
apache-2.0
2,097
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2014 Micomicona # a.sexto@micomicona.com # http://micomicona.com # This software 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 versio...
micomicona/audiomd
audiomd.py
Python
gpl-3.0
6,190
import pytest from meta_scrape import utils def test_clean_title(): assert utils.clean_title("test [DVD]") == "test" assert utils.clean_title("test [Blu-ray]") == "test" assert utils.clean_title("test space") == "test space" assert utils.clean_title("test Blu-ray版") == "test" assert utils.clean_ti...
MrTimscampi/metascrape
tests/test_utils.py
Python
gpl-3.0
478
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2012 Rackspace Hosting # 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.apach...
maheshp/novatest
nova/tests/compute/test_compute_cells.py
Python
apache-2.0
8,621
#!/usr/bin/env python3 # Copyright (c) 2017 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. """Test debug logging.""" import os from test_framework.test_framework import BitcoinTestFramework class Log...
stamhe/bitcoin
test/functional/feature_logging.py
Python
mit
2,388
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('scrape', '0006_remove_article_testing'), ] operations = [ migrations.AlterField( model_name='article', ...
ajerneck/rand-art
randart/scrape/migrations/0007_auto_20150613_1411.py
Python
gpl-2.0
440
from collections import OrderedDict from sqlalchemy import Boolean, Column, Date, Index, Integer, String from radar.database import db from radar.models.common import MetaModelMixin, patient_id_column, patient_relationship, uuid_pk_column from radar.models.logs import log_changes OUTCOMES = OrderedDict([ ('ID_L...
renalreg/radar
radar/models/pregnancies.py
Python
agpl-3.0
1,703
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Adding model 'UserProfile' db.create_table(u'catalog_userprofile', ( ...
Makeystreet/makeystreet
woot/apps/catalog/migrations/0068_auto__add_userprofile__chg_field_productimage_user__chg_field_voteshop.py
Python
apache-2.0
52,087
import os import matplotlib.pyplot as plt import pyPLUTO as pp import numpy as np I = pp.Image() plutodir = os.environ['PLUTO_DIR'] wdir = plutodir+'/Test_Problems/HD/Viscosity/Flow_Past_Cylinder/' try: D = pp.pload(10,datatype='hdf5',level=3, w_dir=wdir) except IndexError: print 'data.0010.hdf5...
JohannesBuchner/PLUTO
Tools/pyPLUTO/examples/flow_past_cyc.py
Python
gpl-2.0
872
"""Group events by institution and export them for research purposes""" import logging import os import gzip from collections import defaultdict import gnupg import luigi import luigi.date_interval import yaml from edx.analytics.tasks.encrypt import make_encrypted_file from edx.analytics.tasks.mapreduce import Multi...
open-craft/edx-analytics-pipeline
edx/analytics/tasks/event_exports.py
Python
agpl-3.0
13,658
from __future__ import division, absolute_import, print_function import os import warnings from distutils.dist import Distribution __metaclass__ = type class EnvironmentConfig(object): def __init__(self, distutils_section='ALL', **kw): self._distutils_section = distutils_section self._conf_keys =...
ahaldane/numpy
numpy/distutils/fcompiler/environment.py
Python
bsd-3-clause
3,457
# # Licensed to the Apache Software Foundation (ASF) under one or more # contributor license agreements. See the NOTICE file distributed with # this work for additional information regarding copyright ownership. # The ASF licenses this file to You under the Apache License, Version 2.0 # (the "License"); you may not us...
fharenheit/template-spark-app
src/main/python/mllib/ranking_metrics_example.py
Python
apache-2.0
2,197
#!/usr/bin/env python def myfunction(): grains = {} grains['a_custom'] = {'k2': 'v2'} return grains
stephane-martin/salt-debian-packaging
salt-2016.3.3/tests/integration/files/file/base/_grains/test_custom_grain2.py
Python
apache-2.0
115
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='Producto', fields=[ ('nombre', models.CharField...
AngelValera/proyectoIV-Modulo-1
merka/migrations/0001_initial.py
Python
mit
918
#!/usr/bin/env python """ @author: Sindre Tosse """ import numpy as np from stl import mesh def main(opts): m = mesh.Mesh.from_file(opts.file_name) if opts.verbose: for p0, p1, p2 in zip(m.v0, m.v1, m.v2): print p0, p1, p2 volume, cog, inertia = m.get_mass_properties() print(...
bonus85/tilt-editor
stl/debug_stl.py
Python
gpl-3.0
999
from __future__ import division, absolute_import, print_function import argparse import heapq from operator import itemgetter import sys import numpy import h5py from Bio import SeqIO from . import utils __all__ = ["compare", "createDB"] class RankedList(list): def __init__(self, *args, **kwargs): supe...
giorgiomaccari/seqFP
seqFP/seqFP.py
Python
gpl-3.0
4,207
#!/usr/bin/env python ################################################## # Gnuradio Python Flow Graph # Title: Top Block # Generated: Sat Nov 21 01:42:43 2015 ################################################## from gnuradio import blocks from gnuradio import digital from gnuradio import eng_notation from gnuradio impo...
bitrat/alarm-fingerprint
AlarmGnuRadioFiles/Bosch3000_FileInput_To_BinarySlice_Local_and_External.py
Python
gpl-2.0
9,100
# # LayerImage.py -- Abstraction of an generic layered image. # # Eric Jeschke (eric@naoj.org) # # Copyright (c) Eric R. Jeschke. All rights reserved. # This is open-source software licensed under a BSD license. # Please see the file LICENSE.txt for details. # import numpy import time import Bunch import BaseImage ...
astrofrog/ginga
ginga/LayerImage.py
Python
bsd-3-clause
7,562
UNICODE=1 UNDEF_NDEBUG=1 INSTALL_MULTIVERSION=1 FLAVOUR="" EP_ADD_OPTS=1 EP_FULL_VER=0 WX_CONFIG="None" WXPORT="msw" MONOLITHIC=0 FINAL=0 HYBRID=1
beiko-lab/gengis
bin/Lib/site-packages/wx-2.8-msw-unicode/wx/build/build_options.py
Python
gpl-3.0
160
def toposorted(graph, parents): """ Returns vertices of a directed acyclic graph in topological order. Arguments: graph -- vetices of a graph to be toposorted parents -- function (vertex) -> vertices to preceed given vertex in output """ result = [] used = set() def...
kazcw/NGCCCBase
coloredcoinlib/toposort.py
Python
mit
636
from __future__ import unicode_literals from django import VERSION from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import IntegrityError, models, transaction from django.db.models.query import QuerySet from django.template.defau...
aninternetof/bremen
bremenenv/lib/python3.5/site-packages/taggit/models.py
Python
mit
6,628
from pymongo import Connection from openpds.core.models import Profile from openpds import settings import random """ connection = Connection( host=random.choice(getattr(settings, "MONGODB_HOST", None)), port=getattr(settings, "MONGODB_PORT", None), readPreference='nearest' ) """ def getInternalDataStore(...
eschloss/FluFuture
openpds/backends/base.py
Python
mit
1,743
from builder import ERTBuilder
AndrejMaris/facefit
facefit/ert/__init__.py
Python
mit
31
# coding: utf-8 from __future__ import unicode_literals import os from django.contrib.contenttypes.models import ContentType from django.test import TestCase from django.test.utils import override_settings from django.utils import translation @override_settings( USE_I18N=True, LOCALE_PATHS=( os.path...
rebost/django
tests/regressiontests/i18n/contenttypes/tests.py
Python
bsd-3-clause
1,043
from db_info import db_xpmanager class Project: def __init__(self): pass def get_workflow(self, i): workflow_list = [] workflow = list(db_xpmanager.select('project', where='id = %d' % int(i.project_id)))[0].workflow for w in workflow.split(';'): s = list(db_xpmanager.select('status',...
bizet/xpmanager
server/project.py
Python
mit
463
#!/usr/bin/env python import os import sys if __name__ == "__main__": os.environ.setdefault("DJANGO_SETTINGS_MODULE", "djangoApp.settings") from django.core.management import execute_from_command_line execute_from_command_line(sys.argv)
karttrak/cs3240-s15-team10
djangoApp/manage.py
Python
mit
252
# -*- coding: utf-8 -*- """ Created on Sun Mar 12 20:24:53 2017 @author: Shabaka """ import numpy as np import matplotlib.pyplot as plt # Perform linear regression: a, b a, b = np.polyfit(x, y, 1) # Print the slope and intercept print(a, b) # Generate theoretical x and y data: x_theor, y_theor x_t...
qalhata/Python-Scripts-Repo-on-Data-Science
Linear_Regression_Anscombe.py
Python
gpl-3.0
2,113
"""Subpackage where each product is defined. Each product is created by adding a a .py file containing a __wptrunner__ variable in the global scope. This must be a dictionary with the fields "product": Name of the product, assumed to be unique. "browser": String indicating the Browser implementation used to launch tha...
saneyuki/servo
tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/__init__.py
Python
mpl-2.0
1,730
# -*- coding: utf-8 -*- from nose.tools import * # flake8: noqa from website.models import NodeLog from website.project.model import Auth from website.util import permissions from api.base.settings.defaults import API_BASE from tests.base import ApiTestCase from tests.factories import ( ProjectFactory, Auth...
zamattiac/osf.io
api_tests/nodes/views/test_node_contributors_detail.py
Python
apache-2.0
22,156
# -*- coding: utf-8 -*- # Copyright 2014 Mirantis, 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 requi...
zhaochao/fuel-web
fuel_upgrade_system/fuel_upgrade/fuel_upgrade/tests/test_supervisor_client.py
Python
apache-2.0
4,280
import pandas as pd import pytest from .. import testing def test_frames_equal_not_frames(): frame = pd.DataFrame({'a': [1]}) with pytest.raises(AssertionError) as info: testing.assert_frames_equal(frame, 1) assert info.value.message == 'Inputs must both be pandas DataFrames.' def test_frames...
osPlanning/activitysim
activitysim/util/test/test_testing.py
Python
bsd-3-clause
1,627
from django.http import HttpResponseNotAllowed, HttpResponseServerError from django.utils import simplejson as json from util import to_json_response from util import to_dojo_data try: from functools import wraps except ImportError: from django.utils.functional import wraps # Python 2.3, 2.4 fallback. def e...
google-code-export/dojango
dojango/decorators.py
Python
bsd-3-clause
5,423
# Copyright 2015 VMware. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, sof...
ramineni/my_congress
congress_dashboard/policies/forms.py
Python
apache-2.0
2,578
import shutil import traceback import configparser from discord import User as discord_User class PermissionsDefaults: perms_file = 'config/permissions.ini' CommandWhiteList = set() CommandBlackList = set() IgnoreNonVoice = set() GrantToRoles = set() UserList = set() MaxSongs = 0 Ma...
ErenTD/Eren-s-Music-Bot
musicbot/permissions.py
Python
mit
5,949
#!/usr/bin/env python3 # This file is subject to the terms and conditions of the GPLv3 (see file 'LICENSE' as part of this source code package) u""" This script takes two data likelihood matrices with the same number of columns (genomes/classes) and an arbitrary number of rows (data points). The truth (null hypothesis...
fungs/mglex
mglex/cli/significance.py
Python
gpl-3.0
4,846
# ---------------------------------------------------------------------------- # pyglet # Copyright (c) 2006-2008 Alex Holkner # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistribu...
mpasternak/pyglet-fix-issue-552
pyglet/input/__init__.py
Python
bsd-3-clause
7,205
import _plotly_utils.basevalidators class TextfontValidator(_plotly_utils.basevalidators.CompoundValidator): def __init__(self, plotly_name="textfont", parent_name="funnelarea", **kwargs): super(TextfontValidator, self).__init__( plotly_name=plotly_name, parent_name=parent_name, ...
plotly/python-api
packages/python/plotly/plotly/validators/funnelarea/_textfont.py
Python
mit
1,867
# Result object copied from scipy 0.11 __all__=['Result'] class Result(dict): """ Represents the optimization result. Attributes ---------- coords : ndarray The solution of the optimization. success : bool Whether or not the optimizer exited successfully. status : int T...
js850/PyGMIN
pygmin/optimize/result.py
Python
gpl-3.0
2,911
# make the DEBUG setting available to templates in hydroshare from mezzanine.conf import register_setting register_setting( name="TEMPLATE_ACCESSIBLE_SETTINGS", description=("Sequence of setting names available within templates."), editable=True, default=("DEBUG",), append=True, )
hydroshare/hydroshare
hydroshare/defaults.py
Python
bsd-3-clause
304
# coding: utf-8 from fabric.api import env, local, cd, run, sudo from fabric.operations import put env.use_ssh_config = True env.keepalive = 60 def tarball(): """Create tarball for june.""" local('make static') local('python setup.py sdist --formats=gztar', capture=False) def upload(): """Upload t...
fanne/june
fabfile.py
Python
bsd-3-clause
1,679
# -*- coding: utf-8 -*- # Generated by Django 1.10.8 on 2017-12-10 16:53 from __future__ import unicode_literals from django.db import migrations, models # Clear out title_override if it's the same as the automatically generated title. def forwards_func(apps, schema_editor): Task = apps.get_model("guidedmodules",...
GovReady/govready-q
guidedmodules/migrations/0034_title_override.py
Python
gpl-3.0
1,513
from sqlalchemy.testing import assert_raises, assert_raises_message from sqlalchemy.orm import util as orm_util from sqlalchemy import Column from sqlalchemy import util from sqlalchemy import Integer from sqlalchemy import MetaData from sqlalchemy import Table from sqlalchemy.orm import aliased, with_polymorphic, syno...
wfxiang08/sqlalchemy
test/orm/test_utils.py
Python
mit
23,966
# # @lc app=leetcode id=513 lang=python3 # # [513] Find Bottom Left Tree Value # class TreeNode: def __init__(self, x): self.val = x self.left = None self.right = None # @lc code=start # Definition for a binary tree node. class Solution: def findBottomLeftValue(self, root: TreeNode) -...
heyf/cloaked-octo-adventure
leetcode/513_find-bottom-left-tree-value.py
Python
mit
1,024
# # Overlap-add FIR filter, (c) Joachim Thiemann 2016 # LICENCE: MIT # import numpy as np def olafilt(b, x, zi=None): """ Filter a one-dimensional array with an FIR filter Filter a data sequence, `x`, using a FIR filter given in `b`. Filtering uses the overlap-add method converting both `x` and `b` ...
sunits/rir_simulator_python
olafilt.py
Python
gpl-3.0
2,024
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mp', '0001_initial'), ] operations = [ migrations.AlterField( model_name='privatetopic', name='subti...
DevHugo/zds-site
zds/mp/migrations/0002_auto_20150416_1750.py
Python
gpl-3.0
469
# Copyright (C) 2003-2007 Nominum, Inc. # # Permission to use, copy, modify, and distribute this software and its # documentation for any purpose with or without fee is hereby granted, # provided that the above copyright notice and this permission notice # appear in all copies. # # THE SOFTWARE IS PROVIDED "AS IS" AND ...
ostinelli/pyopenspime
lib/dns/rdtypes/ANY/KEY.py
Python
gpl-3.0
874
# -*- coding: utf-8 -*- # Copyright (C) 2015 KillerInstinct # # 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 p...
lixiangning888/whole_project
modules/signatures_merge_tmp/hawkeye_apis.py
Python
lgpl-3.0
6,041
# -*- coding: utf-8 -*- ############################################################################## # # Author: Yannick Buron and Valeureux Copyright Valeureux.org # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # ...
Valeureux/wezer-exchange
__unreviewed__/community_crm/__openerp__.py
Python
agpl-3.0
1,363
# -*- coding: utf-8 -*- # # This file is part of INGInious. See the LICENSE and the COPYRIGHTS files for # more information about the licensing of this file. """ Task file managers """ from abc import ABCMeta, abstractmethod class AbstractTaskFileReader(object, metaclass=ABCMeta): """ Manages a type of task file...
JuezUN/INGInious
inginious/common/task_file_readers/abstract_reader.py
Python
agpl-3.0
755
""" Generate simulated logs, placing new items into the queue. Process the Queue, generating summary data and appending entries to the log store """ import analyzer import simulatedLogs # simulate_logs simulatedLogs.simulate() # process queue analyzer.complete()
rgardler/acs-logging-test
src/runSimulation.py
Python
apache-2.0
269
#!/usr/bin/env python2 # -*- coding:utf-8 -*- # Author: cbin # mail: yu.cbin@gmail.com #from django.contrib import admin from projectchart.models import CproChart,CproadManager import xadmin from django.conf import settings #from mptt.admin import MPTTModelAdmin #xadmin.site.register(MPTTFood, MPTTModelAdmin) class ...
cbingos/cpro
projectchart/adminx.py
Python
mit
1,277
# -*- 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): # Adding field 'Artist.slug' db.add_column(u'artist_artist', 'slug', self.gf('django.d...
hcwiley/the-front
the_front/the_front/artist/migrations/0004_auto__add_field_artist_slug.py
Python
gpl-2.0
5,556
# 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-servicefabric/azure/servicefabric/models/deployed_application_health_evaluation.py
Python
mit
2,889
import numpy as np import os, sys, math from random import randint BASE_DIR = "./build" DICT_FILE = "dictionary.txt" VEC_SIZE = 256 dictionary = [] dictionary_fast = {} verbs_to_check = [ 'sleep', 'snooze', 'nap', 'doze', 'slumber', 'snore', 'laugh', 'giggle', 'stroll', 'walk', 'march', 'die...
QMUL/wacky
python/closest.py
Python
gpl-3.0
2,477
# 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...
RealImpactAnalytics/airflow
airflow/example_dags/example_kubernetes_operator.py
Python
apache-2.0
1,706
# -*- coding: utf-8 -*- """ Sahana Eden Hospital Management System Model @copyright: 2009-2014 (c) Sahana Software Foundation @license: MIT Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in...
devinbalkind/eden
modules/s3db/hms.py
Python
mit
61,408
#encoding=utf-8 # -----------------------------------------------------------libraries------------------------------------------------------ # Standard library import time # Third-party libraries import MySQLdb import MySQLdb.cursors # User define module # --------------------------------------------------------Gl...
dengliangshi/MySQLdb-Wrapper
mysqldbex.py
Python
mit
10,711
# -*- coding: utf-8 -*- # kate: indent-width 4; ########################################################################### # Copyright (C) 2008 Håvard Gulldahl # <havard@gulldahl.no> # # Lisens: GPL2 # # $Id: faktura.py 260 2008-05-11 08:59:23Z havard.gulldahl $ # #############################################...
kkoksvik/finfaktura
finfaktura/gui_firma.py
Python
gpl-2.0
9,113
from fork import * @cpu_bound def cpu_a(): print('cpu_a') for _ in range(30): fork(cpu_b) print('cpu_a end') @cpu_bound def cpu_b(): print('cpu_b') for _ in range(30): fork(cpu_c) print('cpu_b end') @cpu_bound def cpu_c(): print('cpu_c') pass @io_bound def io_a(): ...
srkunze/fork
test_cascading_forks.py
Python
mit
668
# Copyright 2015 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 a...
jtk54/spinnaker
testing/citest/spinnaker_testing/spinnaker_test_scenario.py
Python
apache-2.0
10,554
# -*- coding: utf-8 -*- # ----------------------------------------------------------------------------- # Copyright 2015-2018 by Exopy Authors, see AUTHORS for more details. # # Distributed under the terms of the BSD license. # # The full license is in the file LICENCE, distributed with this software. # ---------------...
Ecpy/ecpy
tests/tasks/tasks/util/test_formula_task.py
Python
bsd-3-clause
3,000
from player import Player
Greymerk/python-rpg
src/player/__init__.py
Python
gpl-3.0
26
# 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/marketplaceordering/azure-mgmt-marketplaceordering/azure/mgmt/marketplaceordering/operations/_marketplace_agreements_operations.py
Python
mit
20,608
# # This file is part of pysnmp software. # # Copyright (c) 2005-2016, Ilya Etingof <ilya@glas.net> # License: http://pysnmp.sf.net/license.html # from pysnmp.smi.rfc1902 import * from pysnmp.entity.rfc3413 import ntforg from pysnmp.hlapi.auth import * from pysnmp.hlapi.context import * from pysnmp.hlapi.lcd import * f...
filippog/pysnmp
pysnmp/hlapi/asyncore/ntforg.py
Python
bsd-3-clause
5,496
# -*- coding: utf8 -*- # This file is part of PyBossa. # # Copyright (C) 2013 SF Isle of Man Limited # # PyBossa is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at...
geotagx/geotagx-pybossa-archive
test/test_privacy.py
Python
agpl-3.0
16,591
# ========== Copyright Header Begin ========================================== # # OpenSPARC T1 Processor File: riesling_n1.py # Copyright (c) 2006 Sun Microsystems, Inc. All Rights Reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES. # # The above named program is free software; you can redistribute it and/or # mo...
trivoldus28/pulsarch-verilog
tools/local/bas-release/bas,3.9/lib/riesling_n1.py
Python
gpl-2.0
74,747
# -*- coding: utf-8 # All rules must have: # # "invoice" method, which takes: a source event, and produces a list of pik.billing.InvoiceLine objects from pik.event import SimpleEvent from pik.flights import Flight from pik.billing import InvoiceLine import datetime as dt import re import numbers import sys class Bas...
tazle/pik-laskutin
pik/rules.py
Python
gpl-2.0
9,358
#!/usr/bin/env python3 import sys import os import stat import shutil import unittest from unittest import mock from unittest.mock import patch import getpass import fsquery import create_and_write_file import mvtools_test_fixture import backup_preparation import git_test_fixture import git_wrapper import path_utils ...
mvendra/mvtools
tests/backup_preparation_test.py
Python
mit
84,237
from django.conf.urls import patterns, url from django.views.generic import RedirectView from . import views urlpatterns = [ url(r'^objednavaci-list/pridat/$', views.KkadavyOrderCreate.as_view(), name='objedn_list'), ]
dresl/leonardo-kkadavy-orders
leonardo_kkadavy_orders/urls.py
Python
bsd-3-clause
225
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Richard Hoop - wrhoop@gmail.com # import sys import argparse import logging import glob import json import netsnmp import socket import time import signal import threading from raven import Client # ====( headers )==== # import pprint pprint = pprint.pprint from dae...
rhoop/snmp2graphite
metricD.py
Python
apache-2.0
6,600
#!/usr/bin/python # pep8.py - Check Python source code formatting, according to PEP 8 # Copyright (C) 2006 Johann C. Rocholl <johann@rocholl.net> # # 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 Soft...
hinesmr/mica
util/pydevd/pysrc/third_party/pep8/pep8.py
Python
apache-2.0
40,130
# coding=utf-8 # Copyright 2020 The TF-Agents 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable la...
tensorflow/agents
tf_agents/bandits/environments/bernoulli_py_environment.py
Python
apache-2.0
2,821
""" Provider that returns GeoJSON data responses from Solr spatial queries. This is an example of a provider that does not return an image, but rather queries a Solr instance for raw data and replies with a string of GeoJSON. Read more about the GeoJSON spec at: http://geojson.org/geojson-spec.html Caveats: Example...
kartta-labs/mapwarper
lib/tilestache/TileStache-1.51.5/TileStache/Goodies/Providers/SolrGeoJSON.py
Python
mit
6,857
import interface # C++ handshaking module class Stub: def __init__(self, object): self.wrapped = object def __add__(self, other): # 'Stub + other', 'Stub + Stub' return self.toPython() + other def __radd__(self, other): # 'oth...
simontakite/sysadmin
pythonscripts/programmingpython/Integrate/Embed/prioredition-2x/coerce1.py
Python
gpl-2.0
1,065
""" Output paths in C header file format """ import sys import os.path import re from pyang import plugin from pyang import statements from pyang import error def pyang_plugin_init(): plugin.register_plugin(PathPlugin()) class PathPlugin(plugin.PyangPlugin): def add_output_format(self, fmts): se...
alliedtelesis/apteryx-kermond
cpaths.py
Python
lgpl-3.0
3,993
# Copyright 2014 - 2016 OpenMarket Ltd # Copyright 2021 The Matrix.org Foundation C.I.C. # # 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 # #...
matrix-org/synapse
synapse/handlers/register.py
Python
apache-2.0
41,808
# -*- coding: utf-8 -*- # # Copyright (c) 2017, the cclib development team # # This file is part of cclib (http://cclib.github.io) and is distributed under # the terms of the BSD 3-Clause License. """Tools for identifying, reading and writing files and streams.""" from __future__ import print_function import io imp...
gaursagar/cclib
src/cclib/io/ccio.py
Python
bsd-3-clause
14,822
from __future__ import unicode_literals from django.db import models, migrations from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('challenge', '0007_auto_20150902_1636'), ] operations = [...
defivelo/db
apps/challenge/migrations/0008_qualification_helpers.py
Python
agpl-3.0
576
__doc__ = """ Test basic sync and conflbfnicts: files are modified and deleted by one or both workers (winner and loser); optionally remove local state db on one of the clients (loser). There are four clients (workers): - creator - populates the directory initially and also performs a final check - winner - is syn...
owncloud/smashbox
lib/test_basicSync.py
Python
agpl-3.0
12,013
from engine.constants import BOARD_INDEX, C_PERM_INDEX, WK_SQ_INDEX, BK_SQ_INDEX, EN_PAS_INDEX, NORTH, SOUTH, \ RANK2, RANK7, WKC_INDEX, WQC_INDEX, BKC_INDEX, BQC_INDEX, CASTLE_VOIDED, CASTLED, A1, A8, E1, E8, C1, C8, G1, \ G8, H1, H8, WHITE, BLACK, HALF_MOVE_INDEX, FULL_MOVE_INDEX, TURN_INDEX, B8, B1, D1, D8, ...
ElliotVilhelm/IZII
engine/move.py
Python
mit
5,236
"Base Fts class." from django.db import transaction from django.db import models from django.conf import settings from django.core.exceptions import ImproperlyConfigured class InvalidFtsBackendError(ImproperlyConfigured): pass class BaseClass(object): class Meta: abstract = True clas...
dudarev/django-fts
fts/backends/base.py
Python
bsd-3-clause
3,839
from django.contrib import admin from issue_tracker.app import models admin.site.register(models.Issue) admin.site.register(models.IssueComment)
iamkelroy/CS673_G1_T3_BUGTRACKER
issue_tracker/app/admin.py
Python
mit
146
from unittest import TestCase from gdt.aggregators import UniquesAggregator, SimpleAggregator class AggregatorTestCase(TestCase): def test_uniques_aggregator(self): a = UniquesAggregator(['foo', 'bar']) a.aggregate({ 'timestamp': '2014', 'foo': '1', 'bar': '1'...
praekelt/vumi-go-data-tools
gdt/tests/test_aggregators.py
Python
bsd-3-clause
990
from logging import getLogger from os import path from PyQt5.QtGui import QPainter, QPen, QColor from PyQt5.QtGui import QPixmap, QPixmapCache from golem.task.taskstate import SubtaskStatus from apps.core.task.coretaskstate import TaskDefinition from gui.controller.customizer import Customizer from gui.guidirmanage...
scorpilix/Golemtest
gui/controller/previewcontroller.py
Python
gpl-3.0
7,622
from django.utils.translation import ugettext_lazy as _ from django.core.urlresolvers import reverse from menus.base import Modifier, Menu, NavigationNode from menus.menu_pool import menu_pool from cms.menu_bases import CMSAttachMenu from profiles.models import Profile class ProfileMenu(CMSAttachMenu): na...
hzlf/openbroadcast
website/apps/profiles/menu.py
Python
gpl-3.0
1,133
import unittest from atcodertools.fmtprediction.models.calculator import CalcNode, EvaluateError class TestCalculator(unittest.TestCase): def test_parse_to_calc_node(self): self.assertEqual("N-(1-1)+1000*N*(N+1)", str(CalcNode.parse("N-(1-1)+1000*N*(N+1)"))) def test_evaluat...
kyuridenamida/atcoder-tools
tests/test_calculator.py
Python
mit
887
# coding: utf-8 import os import unittest from tornado.escape import to_unicode from tomako.loader import MakoTemplateLoader class MakoTemplateLoaderTest(unittest.TestCase): def setUp(self): path = os.path.join(os.path.dirname(__file__), "templates") self.loader = MakoTemplateLoader(path) d...
rcmachado/tomako
tomako/tests/mako_loader_test.py
Python
mit
532