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 -*- """ Created on Sat Jan 27 11:57:11 2018 @author: daniel """ import locale # Set to German locale to get comma decimal separater locale.setlocale(locale.LC_NUMERIC, 'deu_deu') import Tomography as tom #import Tomography_old_detection as tom_o import EIT import quPy as qp #from scipy.optimize im...
dtiarks/ThesisPlot
Chap6/darktime.py
Python
mit
5,156
#!/usr/bin/env python # -------------------------------------------------------- # Fast R-CNN # Copyright (c) 2015 Microsoft # Licensed under The MIT License [see LICENSE for details] # Written by Dennis Dam # -------------------------------------------------------- """Set up paths for Fast R-CNN.""" from os import ch...
djdam/faster-rcnn-scenarios
examples/different_scales.py
Python
mit
2,963
# encoding: utf-8 '''Unit tests for ckan/logic/auth/delete.py. ''' import nose import ckan.tests.helpers as helpers import ckan.tests.factories as factories import ckan.logic.auth.delete as auth_delete from ckan import model import ckan.plugins as p logic = helpers.logic assert_equals = nose.tools.assert_equals ...
NicoVarg99/daf-recipes
ckan/ckan/ckan/ckan/tests/logic/auth/test_delete.py
Python
gpl-3.0
4,533
import time def random(): """ Pseudo random number generator for micro python. I make no claims about its randomness or suitability for use Adpoted from: NUMERICAL RECIPIES: THE ART OF SCIENTIFIC COMPUTING THIRD EDITION WILLIAM H. PRESS SAUL A. TEVKOLSKY WILLIAM T. VETTERLING BRIAN P. FLANNERY CAMBRIDG...
ichbinjakes/CodeExamples
random.py
Python
gpl-3.0
969
from CGlobalState import CGlobalState from CInformTable import CInformTable from HashableDict import HashableDict print("--------------first hashable dict-------------------------") fistHashableDict = HashableDict() fistHashableDict.add(1, 1.0) fistHashableDict.add(2, 2.0) fistHashableDict.add(3, 3.0) fistHashableDic...
Aardvarky/Rough-set
RoughSet/tests/TestCInformTable.py
Python
gpl-3.0
6,841
#!/usr/bin/env python # -*- coding: utf8 -*- """ Damage Calculator for my character, Krag Written by Christopher Durien Ward 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...
bagelbits/dnd-3.5-tools
character-specific/Krag/weapons/gore.py
Python
gpl-2.0
2,526
# # This file is protected by Copyright. Please refer to the COPYRIGHT file # distributed with this source distribution. # # This file is part of REDHAWK bulkioInterfaces. # # REDHAWK bulkioInterfaces is free software: you can redistribute it and/or modify it under # the terms of the GNU Lesser General Public License a...
ryanbauman/bulkioInterfaces
libsrc/testing/attic/test_foo.py
Python
lgpl-3.0
1,265
# -*- coding:utf-8 -*- __author__ = 'Ulric Qin' from .bean import Bean from frame.config import MAINTAINERS from frame.api import uic import time class Nodata(Bean): _tbl = 'mockcfg' _cols = 'id, name, obj, obj_type, metric, tags, dstype, step, mock, creator, t_create, t_modify' _max_obj_items = 5 _ma...
muntoya/of-web
web/model/nodata.py
Python
apache-2.0
3,246
# -*- coding: UTF8 -*- import time import ACLMessage import MessageReceiver import threading import types import copy import colors import sys import traceback from xmpp import Node, Message, Presence, Iq import xmpp import re class BehaviourTemplate: """ Template operators """ def __init__(...
exic/spade2
spade/Behaviour.py
Python
lgpl-2.1
24,138
from xml.dom import minidom import py, sys, os def runandparse(testdir, *args): resultpath = testdir.tmpdir.join("junit.xml") result = testdir.runpytest("--junitxml=%s" % resultpath, *args) xmldoc = minidom.parse(str(resultpath)) return result, xmldoc def assert_attr(node, **kwargs): __tracebackh...
npinto/pytest
testing/test_junitxml.py
Python
mit
14,461
#!/usr/bin/python """ Copyright (C) 2009-2012 Oracle Corporation This file is part of VirtualBox Open Source Edition (OSE), as available from http://www.virtualbox.org. This file is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License (GPL) as published by the Free...
VirtualMonitor/VirtualMonitor
src/libs/xpcom18a4/python/gen_python_deps.py
Python
gpl-2.0
3,204
""" """ import logging import time import hiro import mock from flask import Flask, request from werkzeug.exceptions import BadRequest from flask_limiter.extension import C, Limiter from flask_limiter.util import get_remote_address def test_reset(extension_factory): app, limiter = extension_factory({C.DEFAULT_...
alisaifee/flask-limiter
tests/test_flask_ext.py
Python
mit
20,218
""" Copyright 2008, 2009 Free Software Foundation, Inc. This file is part of GNU Radio GNU Radio Companion 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 ...
osh/gnuradio
grc/gui/Constants.py
Python
gpl-3.0
2,506
import bpy settings = bpy.context.edit_movieclip.tracking.settings settings.default_pattern_size = 31 settings.default_search_size = 91 settings.default_motion_model = 'Loc' settings.use_default_brute = True settings.use_default_normalization = False settings.use_default_mask = False settings.default_frames_limit = 0...
cschenck/blender_sim
fluid_sim_deps/blender-2.69/2.69/scripts/presets/tracking_settings/blurry_footage.py
Python
gpl-3.0
557
# Protocol Buffers - Google's data interchange format # Copyright 2008 Google Inc. All rights reserved. # http://code.google.com/p/protobuf/ # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions o...
TextusData/Mover
thirdparty/protobuf-2.2.0/python/google/protobuf/internal/output_stream.py
Python
gpl-3.0
4,884
# Copyright 2013, Big Switch Networks, 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 applic...
zouyapeng/horizon-newtouch
openstack_dashboard/dashboards/project/loadbalancers/workflows.py
Python
apache-2.0
29,825
from .base import EventBuilder from .._misc import utils class Raw(EventBuilder): """ Raw events are not actual events. Instead, they are the raw :tl:`Update` object that Telegram sends. You normally shouldn't need these. Example .. code-block:: python from telethon import ev...
LonamiWebs/Telethon
telethon/_events/raw.py
Python
mit
581
# Copyright 2019 DeepMind Technologies 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 required by applicable law or agr...
deepmind/open_spiel
open_spiel/python/examples/matrix_game_example.py
Python
apache-2.0
4,191
class FilterBase(object): def __init__(self, content, filter_type=None, verbose=0): self.type = filter_type self.content = content self.verbose = verbose def input(self, **kwargs): raise NotImplementedError def output(self, **kwargs): raise NotImplementedError ...
strogo/djpcms
djpcms/contrib/medplate/filters/__init__.py
Python
bsd-3-clause
1,265
# -*- coding: utf-8 -*- """ sphinx.websupport.search ~~~~~~~~~~~~~~~~~~~~~~~~ Server side search support for the web support package. :copyright: Copyright 2007-2016 by the Sphinx team, see AUTHORS. :license: BSD, see LICENSE for details. """ import re from six import text_type class BaseSearc...
bgris/ODL_bgris
lib/python3.5/site-packages/Sphinx-1.5.1-py3.5.egg/sphinx/websupport/search/__init__.py
Python
gpl-3.0
4,903
import kivy kivy.require('1.0.6') # replace with your current kivy version ! # pylint: disable=unused-import from kivy.app import App from kivy.uix.tabbedpanel import TabbedPanel from kivy.properties import NumericProperty, ReferenceListProperty, ObjectProperty, StringProperty # noqa from kivy.storage.jsonstore impo...
kdahlhaus/stock_watch
main.py
Python
gpl-3.0
8,511
# Copyright (C) 2014 Andrey Antukh <niwi@niwi.be> # Copyright (C) 2014 Jesús Espino <jespinog@gmail.com> # Copyright (C) 2014 David Barragán <bameda@dbarragan.com> # This program 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 F...
Tigerwhit4/taiga-back
taiga/projects/issues/serializers.py
Python
agpl-3.0
3,701
#!/usr/bin/python2.5 # # Copyright 2009 the Melange 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 applicable...
jamslevy/gsoc
app/soc/logic/models/timeline.py
Python
apache-2.0
1,237
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright (C) 2005-2007 Carabos Coop. V. All rights reserved # Copyright (C) 2008-2019 Vicent Mas. All rights reserved # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License...
uvemas/ViTables
examples/scripts/nested_samples.py
Python
gpl-3.0
3,046
# -*- coding: utf-8 -*- # Form implementation generated from reading ui file 'gpsDialog.ui' # # Created: Sat Aug 29 20:06:08 2015 # by: PyQt4 UI code generator 4.10.4 # # WARNING! All changes made in this file will be lost! from PyQt4 import QtCore, QtGui try: _fromUtf8 = QtCore.QString.fromUtf8 except Attr...
robotican/ric
ric_board/scripts/GPSStatus/GUI/Shceme/gpsDialog.py
Python
bsd-3-clause
7,609
# Copyright (C) 2010-2011 gevent contributors. See LICENSE for details. # Get the standard Python httplib as __httplib__, ensuring we get a version # that hasn't already been modified by monkey patching of any of its members. # HTTPSConnection must use the standard HTTPConnection because libevent-http # does not curre...
PhysikOnline-FFM/sagenb
sagenb/notebook/lib/gevent/httplib.py
Python
gpl-3.0
6,915
#!/usr/bin/env python """Bootstrap setuptools installation To use setuptools in your package's setup.py, include this file in the same directory and add this to the top of your setup.py:: from ez_setup import use_setuptools use_setuptools() To require a specific version of setuptools, set a download mirror, ...
victorlin/billy-client
ez_setup.py
Python
mit
11,426
from __future__ import unicode_literals from .. import Provider as PhoneNumberProvider class Provider(PhoneNumberProvider): formats = ( # Mobile # Government website: http://www.uke.gov.pl/numeracja-843 '50# ### ###', '51# ### ###', '53# ### ###', '57# ### ###', ...
deanishe/alfred-fakeum
src/libs/faker/providers/phone_number/pl_PL/__init__.py
Python
mit
937
""" Class that contains client access to the job monitoring handler. """ from DIRAC.Core.Base.Client import Client, createClient from DIRAC.Core.Utilities.DEncode import ignoreEncodeWarning from DIRAC.Core.Utilities.JEncode import strToIntDict from DIRAC.Core.Utilities.Decorators import deprecated @createClient("Wor...
ic-hep/DIRAC
src/DIRAC/WorkloadManagementSystem/Client/JobMonitoringClient.py
Python
gpl-3.0
2,585
#!/usr/bin/python import sys, os, copy sys.path.append("../../../common/") import nc_run import lst_parse import logger # defines debug = True do_compile = True do_elaborate = True do_simulate = True do_lint = False do_coverage = False opt_waves = True opt_mems = True opt_tasks = ...
rkrajnc/minimig-de1
sim/tg68k/nc/run/test.py
Python
gpl-3.0
1,007
import os import re import argparse import json import cmd INIT_PATH2="/mnt/data/Multimedia/Music/Collection/" INIT_PATH3="/mnt/data/Multimedia/Music/SORT/" INIT_PATH="/run/media/marek/Storage/Music/SORT/" INIT_PATH_SD="/run/media/marek/7266-0950" class Argumentor: def __init__(self): self....
MarekOsrman/maids
test1.py
Python
gpl-3.0
10,869
from plone.server import app_settings from plone.server import logger from plone.server.commands import Command from plone.server.testing import PloneRequester from plone.server.testing import TESTING_SETTINGS from pprint import pformat import asyncio import logging import threading import time def format_headers(he...
plone/plone.server
src/plone.server/plone/server/commands/cli.py
Python
bsd-2-clause
2,320
from . import db class PanelPermission(db.Model): """Super-Admin Panel Permissions """ __tablename__ = 'panel_permissions' id = db.Column(db.Integer, primary_key=True) # Super Admin panel name panel_name = db.Column(db.String) # Custom System Role role_id = db.Column(db.Integer, db.Fo...
gaeun/open-event-orga-server
app/models/panel_permissions.py
Python
gpl-3.0
876
""" module for generating C, C++, Fortran77, Fortran90 and python routines that evaluate sympy expressions. This module is work in progress. Only the milestones with a '+' character in the list below have been completed. --- How is sympy.utilities.codegen different from sympy.printing.ccode? --- We considered the id...
pernici/sympy
sympy/utilities/codegen.py
Python
bsd-3-clause
34,640
from sqlalchemy import engine_from_config from sqlalchemy.orm import sessionmaker from sqlalchemy.orm import configure_mappers import zope.sqlalchemy from .meta import Base # import or define all models here to ensure they are attached to the # Base.metadata prior to any initialization routines #from .mymodel import ...
asif-mahmud/Pyramid-Apps
blogsite/blogsite/models/__init__.py
Python
gpl-2.0
2,287
# 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/datashare/azure-mgmt-datashare/azure/mgmt/datashare/aio/operations/_data_set_mappings_operations.py
Python
mit
17,945
#!/usr/bin/evn python """ Senty Project Copyright(c) 2018 Senty. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License, version 2, as published by the Free Software Foundation. This program is distributed in the hope it will be useful...
Kamalheib/senty
senty/packages/storage/storage_package.py
Python
gpl-2.0
1,321
import asyncio @asyncio.coroutine def foo(): yield from asyncio.sleep(1) return 3 async def bar(): return await foo() * 2
asedunov/intellij-community
python/testData/inspections/PyUnresolvedReferencesInspection3K/UsageOfFunctionDecoratedWithAsyncioCoroutine/a.py
Python
apache-2.0
136
""" Test compiling and executing using the gdc tool. """ # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to...
timj/scons
test/D/HSTeoh/sconstest-linkingProblem_dmd.py
Python
mit
1,375
from datetime import datetime, timedelta from PyQt5 import QtWidgets import Xlib import Xlib.display from .workspaces import WorkspacesProvider class WindowTitleProvider(object): delay = 0 def __init__(self, main_window): self.changed = False self.labels = [] self.window_names = [] ...
darvelo/panel
widgets/window_title.py
Python
mit
3,948
# vim: fileencoding=UTF-8:expandtab:autoindent:ts=4:sw=4:sts=4 from __future__ import absolute_import from __future__ import division from __future__ import print_function from __future__ import unicode_literals # To import from calibre, some things need to be added to `sys` first. Do not import # anything from calibr...
NiLuJe/calibre-kobo-driver
tests/test_common.py
Python
gpl-3.0
4,914
# -*- coding: utf-8 -*- # Copyright (C) 1998-2015 by the Free Software Foundation, Inc. # # This file is part of Postorius. # # Postorius 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...
khushboo9293/postorius
src/postorius/views/settings.py
Python
gpl-3.0
4,486
# Copyright 2010-2011 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...
tantexian/sps-2014-12-4
sps/tests/unit/test_context.py
Python
apache-2.0
6,408
# -*- coding: utf-8 -*- # Copyright (C) 2013 Sebastian Wiesner <lunaryorn@gmail.com> # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version 2.1 of the License, or (at your # opti...
schlizbaeda/yamuplay
pyudev/src/pyudev/_os/poll.py
Python
gpl-3.0
4,112
import sys sys.path.append('../common/tests') import uuid import json from flexmock import flexmock, Mock from testtools.matchers import Equals, Contains, Not import stevedore.extension from test_utils import * from test_common import TestCase, setup_extra_flexmock import ConfigParser from vnc_cfg_api_server import vn...
Juniper/contrail-dev-controller
src/config/vnc_openstack/vnc_openstack/tests/test_case.py
Python
apache-2.0
2,974
import matplotlib as mpl import matplotlib.pyplot as plt import pandas as pd import numpy as np import time # # INFO: Your Parameters. # You can adjust them after completing the lab C = 1 kernel = 'linear' gamma = 'auto' iterations = 5000 # TODO: Change to 200000 once you get to Question#2 # # INFO: You can set...
FernanOrtega/DAT210x
Module6/assignment1.py
Python
mit
5,367
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015-2015: Alignak team, see AUTHORS.txt file for contributors # # This file is part of Alignak. # # Alignak 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 So...
gst/alignak
test/test_service_on_missing_template.py
Python
agpl-3.0
2,362
import uuid import os import cPickle import urllib import struct import glob import uuid from dpark.env import env from dpark.util import compress, decompress, mkdir_p from dpark.tracker import GetValueMessage, AddItemMessage from dpark.dependency import HashPartitioner from collections import OrderedDict class LRUDic...
quxiaolong1504/dpark
dpark/mutable_dict.py
Python
bsd-3-clause
7,165
import vx from vx.window import window from vx.keybindings import barebones, alt, ctrl, keys, keybinding_tables from vx.scratchbuffer import scratchbuffer from vx.pane import pane from vx.pointer import organizer def start(): vx.default_keybindings = barebones.load keybindings = ''' Ctrl+q - quit Ctrl+n - move...
philipdexter/vx
vx/new_user.py
Python
mit
2,544
import pyjd # dummy in pyjs from pyjamas.ui.Button import Button from pyjamas.ui.RootPanel import RootPanel from pyjamas.ui.Label import Label from pyjamas.ui.Grid import Grid from pyjamas.ui.CellFormatter import CellFormatter from pyjamas.ui.RowFormatter import RowFormatter from pyjamas.ui.HTMLTable import HTMLTable ...
minghuascode/pyj
examples/gridedit/GridEdit.py
Python
apache-2.0
2,336
# -*- coding: utf-8 -*- """ Forms """ from django import forms from django.utils.translation import ugettext from django.contrib.auth.models import User from crispy_forms.helper import FormHelper from crispy_forms.layout import Layout, Fieldset, Div, Submit from crispy_forms.bootstrap import AppendedText from allianc...
sveetch/welovepy
alliance/forms.py
Python
mit
2,748
# -*- coding: utf-8 -*- import unittest from glassure.core.scattering_factors import * class ScatteringFactorTest(unittest.TestCase): def setUp(self): self.q = np.linspace(1, 12, 1000) self.form_factor_vitali = { 'Si': 3.7464 * np.exp(-1.3104 * (self.q / 4 / np.pi) ** 2) + 1.4345 + 4....
Luindil/Glassure
glassure/tests/test_scattering_factors.py
Python
mit
4,145
# -*- coding: utf-8 -*- ############################################################################## # # This program 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 L...
trabacus-softapps/docker-magicecommerce
additional_addons/product_pricelist_fixed_price/model/__init__.py
Python
agpl-3.0
909
#----------------------------------------------------------------------------- # Copyright (c) 2012 - 2017, Anaconda, Inc. All rights reserved. # # Powered by the Bokeh Development Team. # # The full license is in the file LICENSE.txt, distributed with this software. #---------------------------------------------------...
stonebig/bokeh
tests/integration/tools/test_range_tool.py
Python
bsd-3-clause
8,508
#! /usr/bin/env python3 # -*- coding: utf-8 -*- import math import random import pylab as p n = int(input("Ile ruchów? ")) x = y = 0 lx = [0] ly = [0] nazwapliku = "rbrowna.xls" with open(nazwapliku, "w") as plik: plik.write("x\ty") plik.write(str(x) + "\t" + str(y)) for i in range(0, n): rad = fl...
koduj-z-klasa/python101
docs/pylab/rbrowna.py
Python
mit
916
# 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 from frappe.utils import cstr, nowdate, cint from erpnext.setup.doctype.item_group.item_group import get_item_for_list_in_html from erpnex...
Zlash65/erpnext
erpnext/templates/pages/product_search.py
Python
gpl-3.0
1,755
########################################################################## # # Copyright (c) 2012, John Haddon. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # * Redistributions of so...
hradec/gaffer
python/GafferArnold/__init__.py
Python
bsd-3-clause
2,708
# -*- coding: utf-8 -*- # Este archivo es parte de GPLib - http://gplib.org/ # # GPlib es software libre desarrollado en la Facultad de Filosofía y Letras de # la Universidad de Buenos Aires y liberado bajo los términos de la licencia # GPLIB FILO www.gplib.org/licencia bajo los términos de GPL de GNU. Usted # puede ...
gplib/gplib
gplib/apps/couchflow/management/commands/update_database.py
Python
gpl-3.0
6,456
from plenum.common.constants import TRUSTEE, STEWARD from indy_common.auth import Authoriser from indy_common.constants import NAME, TGB, TRUST_ANCHOR, SCHEMA def test_schema_adding(): roles = {TRUSTEE, STEWARD, TRUST_ANCHOR} for role in roles: r, msg = _authorised_for_schemas(role) assert r ...
spivachuk/sovrin-node
indy_common/test/auth/test_auth_schema.py
Python
apache-2.0
633
# UrbanFootprint v1.5 # Copyright (C) 2017 Calthorpe Analytics # # This file is part of UrbanFootprint version 1.5 # # UrbanFootprint is distributed under the terms of the GNU General # Public License version 3, as published by the Free Software Foundation. This # code is distributed WITHOUT ANY WARRANTY, without impl...
CalthorpeAnalytics/urbanfootprint
footprint/main/publishing/data_export_publishing.py
Python
gpl-3.0
8,848
# -*- 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 'ContactPlugin' db.create_table(u'blogging_contactplugin',...
PirateLearner/pi
PirateLearner/blogging/migrations/0004_auto__add_contactplugin__add_sectionplugin__del_field_blogparent_previ.py
Python
gpl-2.0
12,969
#! /usr/bin/env python # -*- coding: utf-8 -*- # vim:fenc=utf-8 import unittest from drove.command import Command class TestCommand(unittest.TestCase): def test_command(self): cmd = Command.from_name("list", None, None, None) assert cmd.__class__.__name__ == "ListCommand"
droveio/drove
drove/tests/test_command.py
Python
gpl-3.0
297
__author__ = 'namukhtar' import pandas as pd import numpy as np import matplotlib.pyplot as plt s = pd.Series([1,3,5,np.nan,6,8]) s dates = pd.date_range('20130101',periods=6) dates df = pd.DataFrame(np.random.randn(6,4),index=dates,columns=list('ABCD')) print df df2 = pd.DataFrame({ 'A' : 1., ...
Chaparqanatoos/kaggle-knowledge
src/main/python/pandas_test.py
Python
apache-2.0
4,853
# (c) Nelen & Schuurmans. GPL licensed, see LICENSE.txt. from django.conf.urls.defaults import include from django.conf.urls.defaults import patterns from django.conf.urls.defaults import url from django.contrib import admin from lizard_ui.urls import debugmode_urlpatterns import lizard_fewsnorm.views admin.autodisc...
lizardsystem/lizard-fewsnorm
lizard_fewsnorm/urls.py
Python
gpl-3.0
794
from typing import Union import string def configurable_find_missing_letter(alphabet: str, chars: Union[str, list]) -> str: assert chars offset = alphabet.index(chars[0]) for i,c in enumerate(chars[1:]): next_letter = alphabet[i + offset + 1] if c != next_letter: return next_...
AustinTSchaffer/DailyProgrammer
CodeWars/6kyu-FindTheMissingLetter/python/app.py
Python
mit
495
#!/usr/bin/env python2 # Based on example.py from DIGITS # https://github.com/NVIDIA/DIGITS """ Classify an image using individual model files imported from DIGITS This tool is for testing your deployed model with images from the test folder. All the configuration params are removed or commented out as compared to ...
gyurisc/DigitsRest
use_archive.py
Python
mit
8,394
# -*- coding: utf-8 -*- TRANSLATED_WEBHOOK_DATA = {"stamp": {"serial": "DEV-STAMP"}, "receipt": "2DJ2fkRJQdGhaLwLjIZL9Zpz/84=", "secure": False, "created": "2014-04-26 14:35:43.543350"} WEBHOOK_POSTED_DATA = {'data': u'W1syODAsMjgxXSxbMjY3LDExMF0sWzkzLDU3XSxbMjAzLDUxXSxbMTAzLDI5MV1d'} VALID_VIEW_RESPONSE = {u'serial':...
rosscdh/django-paymill-redux
dj_paymill/tests/__init__.py
Python
mit
590
#!/usr/bin/env python # # Electrum - lightweight Bitcoin client # Copyright (C) 2011 thomasv@gitorious # # 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...
kepppu/electrum-n900
remote_wallet.py
Python
gpl-3.0
3,756
# -*- coding: utf-8 -*- # Generated by Django 1.9.1 on 2016-05-01 14:46 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('feer', '0021_auto_20160501_1551'), ] operations = [ migrations.AddField( ...
mKaloer/Feer-Club
feer_club/feer/migrations/0022_auto_20160501_1646.py
Python
apache-2.0
678
r""" Definition ---------- Calculates the form factor for a rectangular solid with a core-shell structure. The thickness and the scattering length density of the shell or "rim" can be different on each (pair) of faces. The three dimensions of the core of the parallelepiped (strictly here a cuboid) may be given in *any...
SasView/sasmodels
sasmodels/models/core_shell_parallelepiped.py
Python
bsd-3-clause
10,772
#!/usr/bin/env python # encoding: utf-8 import json import zmq class Client(object): server_addr = None ctx = None socket = None poller = None connected = False timeout = None def __init__(self, server_addr, timeout=5000): self.server_addr = server_addr self.timeout = t...
abh1nav/ezrpc
ezrpc/client.py
Python
apache-2.0
1,674
# Copyright Iris contributors # # This file is part of Iris and is released under the LGPL license. # See COPYING and COPYING.LESSER in the root of the repository for full # licensing details. """Unit tests for the :mod:`iris._data_manager` module."""
pp-mo/iris
lib/iris/tests/unit/data_manager/__init__.py
Python
lgpl-3.0
252
''' Program prediksi waktu pemenuhan biaya pernikahan Input berupa biaya pernikahan (dalam rupiah) Keluaran berupa hasil prediksi waktu pemenuhan biaya pernikahan dalam format: Anda harus bekerja selama x tahun, y bulan, z minggu, a hari untuk memenuhi biaya pernikahan. # Asumsi: # 1 tahun = 12 bulan # 1 bulan = ...
giovanism/TarungLab
lab/01/lab01_b_d_s2.py
Python
mit
1,220
import csv import datetime import json import os import StringIO import unittest from time import sleep from django.conf import settings from django.core.files.storage import get_storage_class from django.core.urlresolvers import reverse from django.utils.dateparse import parse_datetime from xlrd import open_workbook ...
awemulya/fieldsight-kobocat
onadata/apps/viewer/tests/test_exports.py
Python
bsd-2-clause
50,413
""" sentry.models.releasefile ~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import from django.db import models from sentry.db.models import BoundedPositiveIntegerField, FlexibleF...
jean/sentry
src/sentry/models/releasefile.py
Python
bsd-3-clause
2,065
#!/usr/bin/env python3 # Script for generating RVC period information for ARIB STD-T109. # Copyright (C) 2016 Julian Heinovski <julian.heinovski@ccs-labs.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 Softwa...
jheinovski/arib-t109-tools
scripts/generate-rvc-period-information.py
Python
gpl-3.0
1,518
import ckan.plugins as plugins import ckan.plugins.toolkit as toolkit from ckanext.iauth.action import check_loaded_plugin import ckanext.iauth.auth as auth import ckan.logic as logic from ckanext.iauth.auth import package_delete from ckanext.iauth.auth import resource_update from ckanext.iauth.auth import package_upd...
ccca-dc/ckanext-iauth
ckanext/iauth/plugin.py
Python
agpl-3.0
4,267
#!/usr/bin/env python # # euclid graphics maths module # # Copyright (c) 2006 Alex Holkner # Alex.Holkner@mail.google.com # # This library is free software; you can redistribute it and/or modify it # under the terms of the GNU Lesser General Public License as published by the # Free Software Foundation; either version ...
swiftcoder/aurae
euclid.py
Python
mit
72,372
# -*- coding: utf-8 -*- # Copyright(C) 2010-2015 Julien Veyssier, Laurent Bachelier # # This file is part of weboob. # # weboob 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 L...
sputnick-dev/weboob
modules/piratebay/browser.py
Python
agpl-3.0
2,463
# encoding: 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): # Removing unique constraint on 'MarketPlace', fields ['charge_on_card_as'] db.delete_unique('market_marke...
StephenPower/CollectorCity-Market-Place
marketplaces/apps/market/migrations/0011_auto__del_unique_marketplace_charge_on_card_as.py
Python
apache-2.0
9,779
# # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under ...
crashlytics/aurora
src/main/python/apache/aurora/client/cli/jobs.py
Python
apache-2.0
27,008
import operator from django.db import models from django.core.urlresolvers import reverse from django.http import Http404, HttpResponse, HttpResponseForbidden import json from django.utils.encoding import smart_str class AlreadyRegistered(Exception): pass class AutocompleteSettings(object): """ >>> cla...
guilleCoro/django-autocomplete
autocomplete/views.py
Python
mit
5,596
#!/usr/bin/env python import rospy from tf.transformations import * from sensor_msgs.msg import LaserScan from geometry_msgs.msg import Quaternion, PoseStamped, Pose, Point from nav_msgs.msg import Odometry import math import numpy as np # LA NODE NE MARCHE PAS COMPLETEMENT. Le dev a ete arrete parce que ca causait ...
clubcapra/Ibex
src/capra_lidar/scripts/capra6_lidar_filter.py
Python
gpl-3.0
1,753
# Copyright 2013-2020 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) """Components that manage Spack's installation tree. An install tree, or "build store" consists of two parts: 1. A pac...
rspavel/spack
lib/spack/spack/store.py
Python
lgpl-2.1
4,128
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ] operations = [ migrations.CreateModel( name='PlantDetailPost', fields=[ ('id', models.AutoFi...
simsarulhaqv/PetGarden
PetPlant/plant_details/migrations/0001_initial.py
Python
gpl-3.0
652
#!/usr/bin/python #coding:utf-8 s = """ - 列表解析 语法格式 [expression for target1 in iterable1 [if condition1] for target2 in iterable2 [if condition2] ... for targetN in iterableN [if conditionN]] """ print s.decode('utf-8') print [ x+y for x in [1,2,3] for y in [200,300]] print [...
gensmusic/test
l/python/book/learning-python/c20/list-expression.py
Python
gpl-2.0
1,188
"""Implementations of installation abstract base class searches.""" # 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 inc...
mitsei/dlkit
dlkit/abstract_osid/installation/searches.py
Python
mit
12,778
import time from dronekit import connect, VehicleMode from dronekit.test import with_sitl from nose.tools import assert_equals @with_sitl def test_115(connpath): v = connect(connpath, wait_ready=True) # Dummy callback def mavlink_callback(*args): mavlink_callback.count += 1 mavlink_callback....
dronekit/dronekit-python
dronekit/test/sitl/test_115.py
Python
apache-2.0
1,139
# Copyright (c) 2017 Red Hat, Inc. # # This software is licensed to you under the GNU General Public License, # version 2 (GPLv2). There is NO WARRANTY for this software, express or # implied, including the implied warranties of MERCHANTABILITY or FITNESS # FOR A PARTICULAR PURPOSE. You should have received a copy of G...
candlepin/subscription-manager
src/rhsmlib/services/consumer.py
Python
gpl-2.0
1,142
# # Copyright 2018 Analytics Zoo 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 applicable law or agreed to...
intel-analytics/analytics-zoo
pyzoo/zoo/pipeline/api/onnx/mapper/hardsigmoid.py
Python
apache-2.0
1,080
# For copyright and license notices, see __manifest__.py file in module root from . import invoice_analysis
jobiols/odoo-addons
invoice_lines_analysis_fix/report/__init__.py
Python
agpl-3.0
108
#!/usr/bin/env python """ Horn Concerto - Mining Horn clauses in RDF datasets using SPARQL queries. Author: Tommaso Soru <tsoru@informatik.uni-leipzig.de> Version: 0.0.3-eval Usage: Use with default hyperparameters, current directory as output folder, all available cores > python horn_concerto_parallel.py <ENDP...
mommi84/horn-concerto
horn_concerto_eval.py
Python
mit
9,228
# progress reporting # Author:: Sam Steingold (<sds@magnetic.com>) # Copyright:: Copyright (c) 2014, 2015, 2016 Magnetic Media Online, Inc. # License:: Apache License, Version 2.0 # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # Yo...
Magnetic/proficiency-metric
predeval/progress.py
Python
apache-2.0
8,580
# -*- coding: utf-8 -*- # # Test link: # http://mystore.to/dl/mxcA50jKfP import re from ..internal.SimpleHoster import SimpleHoster class MystoreTo(SimpleHoster): __name__ = "MystoreTo" __type__ = "hoster" __version__ = "0.08" __status__ = "testing" __pattern__ = r'https?://(?:www\.)?mystore\...
Arno-Nymous/pyload
module/plugins/hoster/MystoreTo.py
Python
gpl-3.0
1,461
#!/usr/bin/env python """A module with test utilities for working with Google Cloud Storage.""" import io import re from typing import Any from typing import Tuple import requests class FakeUploadHandler: """A fake handler for upload session requests. This class tries to provide a very simple emulation of the s...
google/grr
grr/test_lib/gcs_test_lib.py
Python
apache-2.0
1,837
import sys import argparse class Parser: def createParser(self): self.parser = argparse.ArgumentParser() self.parser.add_argument('-i', '--ip', default="0.0.0.0") self.parser.add_argument('-p', '--port', default=5000, type=int) return self.parser if __name__ == "__main__": p...
volodink/itstime4science
web/backend/modules/params.py
Python
mit
467
# -*- coding: utf-8 -*- # # 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 #...
adamhaney/airflow
airflow/executors/dask_executor.py
Python
apache-2.0
3,521
#! /usr/bin/python2.4 # Copyright 2007 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 i...
marksatt/distcc
include_server/include_analyzer_memoizing_node.py
Python
gpl-2.0
27,129
#!/usr/bin/env python3 # The MIT License # Copyright (c) 2016 Estonian Information System Authority (RIA), Population Register Centre (VRK) # # 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 ...
ria-ee/X-Road
src/systemtest/op-monitoring/integration/testcases/test_simple_store_and_query.py
Python
mit
17,171
# coding=utf-8 from __future__ import print_function import locale import os import re import subprocess import sys import platform import time # init libs PROGRAM_DIR = os.path.dirname(os.path.normpath(os.path.abspath(os.path.join(__file__, os.pardir)))) LIBS_DIR = os.path.join(PROGRAM_DIR, 'libs') sys.path.insert...
agentxan/nzbToMedia
core/__init__.py
Python
gpl-3.0
37,120