text
stringlengths
6
947k
repo_name
stringlengths
5
100
path
stringlengths
4
231
language
stringclasses
1 value
license
stringclasses
15 values
size
int64
6
947k
score
float64
0
0.34
# # 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...
spektom/incubator-airflow
tests/test_core.py
Python
apache-2.0
18,421
0.000869
# ##### 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...
AndrewPeelMV/Blender2.78c
2.78/scripts/addons/blender_cloud/texture_browser.py
Python
gpl-2.0
38,526
0.001609
# file: runme.py # This file illustrates the proxy class C++ interface generated # by SWIG. import example # ----- Object creation ----- print "Creating some objects:" cc = example.Circle(10) c = example.ShapePtr(cc) print " Created circle", c ss = example.Square(10) s = example.ShapePtr(ss) print " Created ...
jrversteegh/softsailor
deps/swig-2.0.4/Examples/python/smartptr/runme.py
Python
gpl-3.0
1,069
0.01029
# Copyright 2014 Cloudera Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing...
mariusvniekerk/impyla
impala/dbapi/beeswax.py
Python
apache-2.0
9,904
0
import src class CommandBook(src.items.Item): type = "CommandBook" """ call superclass constructor with modified parameters """ def __init__(self): super().__init__(display="cb") self.name = "command book" self.bolted = False self.walkable = True totalCo...
MarxMustermann/OfMiceAndMechs
src/itemFolder/obsolete/commandBook.py
Python
gpl-3.0
689
0.001451
# -*- coding: utf-8 -*- """ *************************************************************************** ogr2ogrclipextent.py --------------------- Date : November 2012 Copyright : (C) 2012 by Victor Olaya Email : volayaf at gmail dot com *******************...
Gaia3D/QGIS
python/plugins/processing/algs/gdal/ogr2ogrclipextent.py
Python
gpl-2.0
3,489
0.001433
import wx from toolib.wx.TestApp import TestApp from toolib.wx.grid.Grid import Grid from toolib.wx.grid.table.List2dTable import List2dTable from toolib.wx.grid.MDeleteSelection import MDeleteSelection class MyGrid(Grid, MDeleteSelection): def __init__(self, *args, **kwargs): Grid.__init__(self, *args, **kwargs)...
onoga/toolib
toolib/wx/grid/test/testDeleteSelection.py
Python
gpl-2.0
604
0.023179
# # Copyright (C) 2013 Savoir-Faire Linux Inc. # # This file is part of Sageo # # Sageo 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 optio...
smlacombe/sageo
app/controllers/side.py
Python
gpl-3.0
1,232
0.012175
import logging from catalog import ThumbnailGenerator from wiki import DokuWikiRemote if __name__ == '__main__': import sys import wikiconfig filename = 'thumb.png' if len(sys.argv) < 2: sys.exit('Usage: %s :wiki:thumbnail.png [ thumb.png ]' % sys.argv[0]) thumbname = sys.argv[1] logging.info("Connect...
stlemme/python-dokuwiki-export
create-thumbnail.py
Python
mit
575
0.034783
""" Model and manager used by the two-step (sign up, then activate) workflow. If you're not using that workflow, you don't need to have 'registration' in your INSTALLED_APPS. This is provided primarily for backwards-compatibility with existing installations; new installs of django-registration should look into the HMA...
tdruez/django-registration
registration/models.py
Python
bsd-3-clause
10,792
0
""" raven.handlers.logbook ~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2012 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import import logbook import sys import traceback from raven.base import Client from raven.utils.encoding imp...
AdrianGaudebert/socorro-crashstats
vendor-local/lib/python/raven/handlers/logbook.py
Python
mpl-2.0
2,760
0.003261
# vim: ft=python fileencoding=utf-8 sts=4 sw=4 et: # Copyright 2015-2017 Florian Bruhin (The Compiler) <mail@qutebrowser.org> # This file is part of qutebrowser. # # qutebrowser is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Sof...
NoctuaNivalis/qutebrowser
tests/unit/config/test_configexc.py
Python
gpl-3.0
3,233
0
# -*- 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 'SiteSettings.font_size' db.alter_column('cyclope_sitesettings', 'font_size', self.gf('dja...
CodigoSur/cyclope
cyclope/migrations/0026_auto__chg_field_sitesettings_font_size.py
Python
gpl-3.0
13,275
0.007684
#emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- #ex: set sts=4 ts=4 sw=4 et: ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ## # # See the COPYING file distributed along with the smile package for the # copyright and license terms. # ### ### ### ### ### ### ### ...
ischleifer/smile
docs/examples/oddball.py
Python
gpl-3.0
8,307
0.008908
''' Test load balance. Test step: 1. Create 2 VM with load balance l3 network service. 2. Create a LB with 2 VMs' nic 3. Check the LB 4. Destroy VMs @author: Youyk ''' import os import zstackwoodpecker.test_util as test_util import zstackwoodpecker.test_lib as test_lib import zstac...
zstackorg/zstack-woodpecker
integrationtest/vm/virtualrouter/lb/test_create_lb.py
Python
apache-2.0
2,080
0.004808
# Copyright 2015 Google LLC # # 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, s...
jonparrott/google-cloud-python
bigquery/tests/unit/test_job.py
Python
apache-2.0
189,727
0
# Copyright 2018 Google LLC # # 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, s...
GoogleCloudPlatform/cloud-opensource-python
badge_server/test_badge_server.py
Python
apache-2.0
18,516
0.0027
#!/usr/bin/env python """ timed_out_and_back.py - Version 1.1 2013-12-20 A basic demo of the using odometry data to move the robot along and out-and-back trajectory. Created for the Pi Robot Project: http://www.pirobot.org Copyright (c) 2012 Patrick Goebel. All rights reserved. This program is free software; you ca...
robertjacobs/zuros
zuros_test/src/timed_out-and-back.py
Python
mit
3,599
0.006669
#! /usr/bin/env python from openturns import * from math import * TESTPREAMBLE() RandomGenerator().SetSeed(0) try : dim = 2 transformation = NatafIndependentCopulaEvaluation(dim) print "transformation=", repr(transformation) point = NumericalPoint(dim, 0.75) print "transformation(", point, ")=",...
dbarbier/privot
python/test/t_NatafIndependentCopulaEvaluation_std.py
Python
lgpl-3.0
685
0.007299
"""This file contains code for use with "Think Bayes", by Allen B. Downey, available from greenteapress.com Copyright 2012 Allen B. Downey License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html """ tb = imp.load_source('thinkbayes', '/home/chris/installations/python/ThinkBayes/thinkbayes.py') from thinkbayes import ...
statwonk/thinkbayes
monty.py
Python
mit
596
0.008389
#!/usr/bin/env python # -*- coding: utf-8 -*- from .km_backend.km_plugin_manager import KMBaseController from .km_exception import log __author__ = 'hiroki' class KMEngine(KMBaseController): def get_name(self): return 'engine' def get_route_list(self): list = ( {'rule': '/engi...
hiroki8080/Kokemomo
kokemomo/plugins/engine/controller/km_engine.py
Python
mit
1,820
0.002747
"""Selector event loop for Unix with signal handling.""" import errno import os import signal import socket import stat import subprocess import sys import threading import warnings from . import base_events from . import base_subprocess from . import compat from . import constants from . import coroutines from . im...
MalloyPower/parsing-python
front-end/testsuite-python-lib/Python-3.5.0/Lib/asyncio/unix_events.py
Python
mit
34,324
0.000146
# Copyright 2014-2015 ARM 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 agreed to in w...
Sticklyman1936/workload-automation
wlauto/modules/__init__.py
Python
apache-2.0
585
0
from django.conf import settings from django.db import models from django_dropimages import settings as di_settings # if no custom image models is present I load my own if not di_settings.CONFIG['DROPIMAGEGALLERY_MODEL']: class DropimagesGallery(models.Model): gallery_identifier = models.CharField(max_le...
sittizen/django_dropimages
django_dropimages/models.py
Python
mit
859
0.002328
# -*- coding: utf-8 -*- # This program is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License # as published by the Free Software Foundation; either version 2 # of the License, or (at your option) any later version. # # This program is distributed in the hope tha...
tyll/bodhi
bodhi/tests/server/services/test_updates.py
Python
gpl-2.0
193,782
0.001099
# Copyright 2015 0xc0170 # # 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, soft...
0xc0170/project_generator
tests/test_tools/test_uvision5.py
Python
apache-2.0
3,726
0.00161
""" Module containing useful functions to link PASTIS MCMC posterior samples with the bayev package. """ import os import pickle import importlib import numpy as np import PASTIS_NM import PASTIS_NM.MCMC as MCMC from PASTIS_NM import resultpath, configpath def read_pastis_file(target, simul, pastisfile=None): ""...
exord/bayev
pastislib.py
Python
mit
7,786
0
# 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...
blowmage/gcloud-python
regression/pubsub.py
Python
apache-2.0
4,859
0
import db import queries import datetime FIELDS = ["asset_id", "name", "uri", "start_date", "end_date", "duration", "mimetype", "is_enabled", "nocache", "play_order"] create_assets_table = 'CREATE TABLE assets(asset_id text primary key, name text, uri text, md5 text, start_date timestamp, end_date timestamp...
cnwalter/screenly-ose
lib/assets_helper.py
Python
gpl-2.0
4,416
0.001359
from rpython.jit.backend.ppc.test.support import JitPPCMixin from rpython.jit.metainterp.test.test_dict import DictTests class TestDict(JitPPCMixin, DictTests): # for the individual tests see # ====> ../../../metainterp/test/test_dict.py pass
oblique-labs/pyVM
rpython/jit/backend/ppc/test/test_dict.py
Python
mit
258
0
# -*- coding:utf-8 -*- import unittest import mock from ..models import JobPosting class JobPostingTestCase(unittest.TestCase): def test_unicode_should_return_position_name(self): # setup model = JobPosting() model.position_name = 'Position Name' # action email = unicode(...
hellhovnd/dentexchange
dentexchange/apps/employer/tests/test_job_posting.py
Python
bsd-3-clause
398
0
''' #============================================================================= # FileName: evaluate_smartcyp_v2.py # Desc: # Author: jlpeng # Email: jlpeng1201@gmail.com # HomePage: # Version: 0.0.1 # Created: 2015-03-09 20:38:49 # LastChange: 2015-03-10 17:58:21 # Hi...
Jianlong-Peng/rp
python/evaluate_smartcyp_v2.py
Python
gpl-2.0
5,047
0.015257
#coding:utf-8 # Definition for singly-linked list. class ListNode: def __init__(self, x): self.val = x self.next = None def __unicode__(self): return u'val:%s'%(self.val,) def __str__(self): return self.__unicode__().encode('utf-8') @staticmethod def array2list(a): ...
freecoder-zrw/leetcode
data_struct.py
Python
apache-2.0
737
0.008141
""" Vector heads and tails ---------------------- Many modules in PyGMT allow plotting vectors with individual heads and tails. For this purpose, several modifiers may be appended to the corresponding vector-producing parameters for specifying the placement of vector heads and tails, their shapes, and the justificatio...
GenericMappingTools/gmt-python
examples/gallery/lines/vector_heads_tails.py
Python
bsd-3-clause
3,149
0.002223
# coding: utf8 # OeQ autogenerated lookup function for 'Window/Wall Ratio South in correlation to year of construction, based on the source data of the survey for the "German Building Typology developed by the "Institut für Wohnen und Umwelt", Darmstadt/Germany, 2011-2013' import math import numpy as np from . import ...
UdK-VPT/Open_eQuarter
mole3/stat_corr/window_wall_ratio_south_AVG_by_building_age_lookup.py
Python
gpl-2.0
2,492
0.140506
#!/usr/bin/env python # Copyright (c) 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import multiprocessing import optparse import os import posixpath import sys import urllib2 import buildbot_common import build_ve...
xin3liang/platform_external_chromium_org
native_client_sdk/src/build_tools/build_projects.py
Python
bsd-3-clause
11,275
0.012594
# -*- coding: utf-8 -*- # Define here the models for your scraped items # # See documentation in: # http://doc.scrapy.org/en/latest/topics/items.html import scrapy class MemescrapersItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() pass
jthurst3/MemeCaptcha
MemeScrapers/MemeScrapers/items.py
Python
mit
291
0
# -*- coding: utf-8 -*- ############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2010-Today OpenERP S.A. (<http://www.openerp.com>). # # This program is free software: you can redistribute it and/or modify # it under the term...
mallconnectionorg/openerp
rrhh/l10n_cl_banks/__openerp__.py
Python
agpl-3.0
1,624
0.005552
#!/usr/bin/python # -*- coding: utf-8 -*- # Distributed under the terms of MIT License (MIT) import pywikibot import time from pywikibot.data.api import Request import re site = pywikibot.Site('fa', fam='wikipedia') print "Fetching admins list" data = Request(site=site, action="query", list="allusers", augroup="sysop",...
PersianWikipedia/fawikibot
laupdate.py
Python
mit
3,731
0.001971
# Copyright 2015 Mellanox Technologies, Ltd # # 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...
silenci/neutron
neutron/tests/unit/plugins/ml2/drivers/mech_sriov/agent/extension_drivers/test_qos_driver.py
Python
apache-2.0
3,786
0.001321
# Copyright 2019 Camptocamp SA # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl) { "name": "Switzerland Account Tags", "category": "Localisation", "summary": "", "version": "14.0.1.0.0", "author": "Camptocamp SA, Odoo Community Association (OCA)", "website": "https://github.com/OCA...
OCA/l10n-switzerland
l10n_ch_account_tags/__manifest__.py
Python
agpl-3.0
561
0
#!/home/mjwtom/install/python/bin/python # -*- coding: utf-8 -*- ''' Created on Jan 12, 2015 @author: mjwtom ''' import os if __name__ == '__main__': os.system('/home/mjwtom/bin/swift -A http://127.0.0.1:8080/auth/v1.0 -U test:tester -K testing download mjw home/mjwtom/file')
mjwtom/swift
test/dedupe/bin/download-debug.py
Python
apache-2.0
283
0.003534
# -*- coding: utf-8 -*- import re import urlparse from module.plugins.internal.MultiHoster import MultiHoster, create_getInfo class ZeveraCom(MultiHoster): __name__ = "ZeveraCom" __type__ = "hoster" __version__ = "0.31" __pattern__ = r'https?://(?:www\.)zevera\.com/(getFiles\.ashx|Members/dow...
Zerknechterer/pyload
module/plugins/hoster/ZeveraCom.py
Python
gpl-3.0
883
0.011325
from __future__ import unicode_literals import datetime import re import sys import warnings from contextlib import contextmanager from unittest import SkipTest, skipIf from xml.dom.minidom import parseString from django.contrib.auth.models import User from django.core import serializers from django.core....
yephper/django
tests/timezones/tests.py
Python
bsd-3-clause
59,648
0.001794
""" WSGI config for GiftCircle 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/2.2/howto/deployment/wsgi/ """ import os from django.core.wsgi import get_wsgi_application os.environ.setdefault('DJANGO_SE...
jstitch/gift_circle
GiftCircle/GiftCircle/wsgi.py
Python
gpl-3.0
397
0
#----------------------------------------------------------------------------------------------------------------------------------------------------------------------# # Name: CalcLogitChoice # Purpose: Utilities for various calculations of different types of choice models. # a) CalcMultino...
joshchea/python-tdm
scripts/CalcLogitChoice.py
Python
mit
12,741
0.015462
#!/usr/bin/env python # -*- encoding: utf-8 -*- # # I find this on site: http://snippets.dzone.com/posts/show/2038 # sorry but, as the publisher, I don't know the origin and the owner of this code # Let me tell him thank you, very useful code ;) # # The procedure send an E-mail to recipient list with recipient attachm...
Micronaet/micronaet-migration
accounting_statistic_base/etl/__MOVED_SCHEDULED__/posta.py
Python
agpl-3.0
2,279
0.011847
# Generated by Django 2.0 on 2019-01-31 19:38 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('inscriptions', '0050_merge_20190131_0016'), ] operations = [ migrations.AlterField( model_name='equipier', name='cerfa...
Puyb/inscriptions_roller
inscriptions/migrations/0051_auto_20190131_2038.py
Python
gpl-3.0
978
0.002047
# -*- coding: utf-8 -*- from openerp import models, fields, api class RequisitosGarantia(models.Model): _name = 'solicitudes.requisitos_garantia' solicitudes_id = fields.Many2one('solicitudes.solicitudes', string="Número de expediente") documentos_garantia_id = fields.Many2one('politicas.documentos_garan...
sani-coop/tinjaca
addons/solicitudes/models/requisitos_garantia.py
Python
gpl-2.0
648
0.006182
# -*- coding: utf-8 -*- from __future__ import absolute_import import inspect import warnings from functools import wraps from flask import abort, jsonify, request from marshmallow.exceptions import ValidationError from six import string_types from werkzeug.wrappers import Response as WerkzeugResponse from eduid_co...
SUNET/eduid-common
src/eduid_common/api/decorators.py
Python
bsd-3-clause
7,549
0.002119
# encoding: utf-8 # module gtk._gtk # from /usr/lib/python2.7/dist-packages/gtk-2.0/gtk/_gtk.so # by generator 1.135 # no doc # imports import atk as __atk import gio as __gio import gobject as __gobject import gobject._gobject as __gobject__gobject class TextWindowType(__gobject.GEnum): # no doc def __init_...
ProfessorX/Config
.PyCharm30/system/python_stubs/-1247972723/gtk/_gtk/TextWindowType.py
Python
gpl-2.0
767
0.007823
############################################################################## # MDTraj: A Python Library for Loading, Saving, and Manipulating # Molecular Dynamics Trajectories. # Copyright 2012-2014 Stanford University and the Authors # # Authors: Jason Swails # Contributors: # # This code for reading Amber r...
ctk3b/mdtraj
mdtraj/formats/amberrst.py
Python
lgpl-2.1
33,272
0.002495
""" Unit test module covering utils module """ import ddt import six from django.test import TestCase from lms.djangoapps.learner_dashboard import utils @ddt.ddt class TestUtils(TestCase): """ The test case class covering the all the utils functions """ @ddt.data('path1/', '/path1/path2/', '/', ''...
edx-solutions/edx-platform
lms/djangoapps/learner_dashboard/tests/test_utils.py
Python
agpl-3.0
602
0.001661
#!/usr/bin/python # -*- encoding: utf-8; py-indent-offset: 4 -*- # +------------------------------------------------------------------+ # | ____ _ _ __ __ _ __ | # | / ___| |__ ___ ___| | __ | \/ | |/ / | # | | | | '_ \ / _ \/ __| |/ /...
xorpaul/check_mk
web/htdocs/default_permissions.py
Python
gpl-2.0
7,863
0.010556
from __future__ import absolute_import from sqlalchemy import * from migrate import * meta = MetaData() vieworderings = Table('vieworderings', meta, Column('id', Integer, primary_key=True), Column('tagset', Text()), Column('timestamp', Float, index=True), ) def upgrade(migrate_engine)...
inducer/synoptic
synoptic/schema_ver_repo/versions/001_Rename_tagset_column.py
Python
mit
467
0.006424
''' Created on 11May,2016 @author: linyufeng ''' from utils.TimeZoneConverter import TimeZoneConverter class Asset(object): ''' contain the values will be insert into table Asset ''' convert = TimeZoneConverter(); def __init__(self, startTime, endTime, directory, fileName, fileType, duration...
ericlyf/screenly-tools-schedulespreadsheet
src/model/Asset.py
Python
gpl-3.0
1,601
0.009369
# Author: Idan Gutman # Modified by jkaberg, https://github.com/jkaberg for SceneAccess # URL: http://code.google.com/p/sickbeard/ # # This file is part of SickRage. # # SickRage 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 So...
duramato/SickRage
sickbeard/providers/hdtorrents.py
Python
gpl-3.0
10,280
0.00428
# Copyright 2018 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...
annarev/tensorflow
tensorflow/python/keras/optimizer_v2/nadam.py
Python
apache-2.0
9,337
0.002356
# pyOCD debugger # Copyright (c) 2019 Arm Limited # SPDX-License-Identifier: Apache-2.0 # # 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 # # ...
mbedmicro/pyOCD
test/unit/test_notification.py
Python
apache-2.0
4,008
0.002745
""" Copyright (c) 2016 Jet Propulsion Laboratory, California Institute of Technology. All rights reserved """ import json import time import unittest import urllib from multiprocessing.pool import ThreadPool from unittest import skip from mock import MagicMock from nexustiles.nexustiles import NexusTileService from s...
dataplumber/nexus
analysis/tests/algorithms/longitudelatitudemap_test.py
Python
apache-2.0
3,692
0.003792
import glob import numpy as np from mpl_toolkits.mplot3d import Axes3D import matplotlib.pyplot as plt #plt.style.use('ggplot') dirlist=glob.glob("./mu-*.*") fig=plt.figure() ax=fig.add_subplot(111) for run in dirlist: rundata=np.loadtxt(run+"/debugout/tabulated_averages.txt") x=rundata[:,4]/(rundata[:,3]+r...
goirijo/thermoplotting
old/testing/dataset/rough_cooling_nuke_0/cool.py
Python
mit
472
0.027542
# Copyright 2003-2010 Jürgen Kayser <rjk23@columbia.edu> # Copyright 2017 Federico Raimondo <federaimondo@gmail.com> and # Denis A. Engemann <dengemann@gmail.com> # # # The original CSD Toolbox can be find at # http://psychophysiology.cpmc.columbia.edu/Software/CSDtoolbox/ # Authors: Denis A. Engeman <d...
olafhauk/mne-python
mne/preprocessing/_csd.py
Python
bsd-3-clause
6,319
0
"""Module for reading volumetric data from VASP calculations. Charge density and dipole moment Local potential Electron localization function """ import os import numpy as np from ase.calculators.vasp import Vasp, VaspChargeDensity from POTCAR import get_ZVAL def get_volumetric_data(self, filename='CHG', **kwargs): ...
jboes/jasp
jasp/volumetric_data.py
Python
gpl-2.0
5,279
0.001137
# coding=utf-8 # Author: Nic Wolfe <nic@wolfeden.ca> # URL: https://sickchill.github.io # # This file is part of SickChill. # # SickChill 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...
coderbone/SickRage-alt
sickchill/views/config/anime.py
Python
gpl-3.0
2,470
0.001619
import os import sys import time sys.path.append(os.path.join(os.path.dirname(__file__), "../")) import pyfbi @pyfbi.target def func1(): time.sleep(1) def func2(): time.sleep(2) @pyfbi.target def func3(): time.sleep(3) with pyfbi.watch(): [f() for f in (func1, func2, func3)] pyfbi.show() with py...
icoxfog417/pyfbi
tests/demo.py
Python
mit
404
0.007426
#!/usr/bin/python # 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 appli...
illfelder/compute-image-packages
packages/python-google-compute-engine/setup.py
Python
apache-2.0
3,041
0.002302
#!/usr/bin/env python import roslib; roslib.load_manifest('beginner_tutorials') import rospy import actionlib from beginner_tutorials.msg import * if __name__ == '__main__': rospy.init_node('do_dishes_client') client = actionlib.SimpleActionClient('do_dishes', DoDishesAction) client.wait_for_server() goal = DoDi...
utmi-2014/utmi-soft3
beginner_tutorials/scripts/simple_action_client.py
Python
mit
582
0.024055
import os import tempfile import unittest import logging from pyidf import ValidationLevel import pyidf from pyidf.idf import IDF from pyidf.setpoint_managers import SetpointManagerMultiZoneCoolingAverage log = logging.getLogger(__name__) class TestSetpointManagerMultiZoneCoolingAverage(unittest.TestCase): def s...
rbuffat/pyidf
tests/test_setpointmanagermultizonecoolingaverage.py
Python
apache-2.0
2,146
0.003728
try:from scipy.io.numpyio import * except ImportError: from extra.numpyio import * import os from time import strftime import shutil class getpoints: def __init__(self, elfile): datetime = strftime("%Y-%m-%d %H:%M:%S").replace(' ', '_') self.elfile = elfile if os.path.isfile(elfile) == Tru...
badbytes/pymeg
pdf2py/el.py
Python
gpl-3.0
2,695
0.017811
import re from thefuck.utils import get_all_matched_commands, replace_command, for_app @for_app('tsuru') def match(command): return (' is not a tsuru command. See "tsuru help".' in command.output and '\nDid you mean?\n\t' in command.output) def get_new_command(command): broken_cmd = re.findall(r...
scorphus/thefuck
thefuck/rules/tsuru_not_command.py
Python
mit
527
0
# # This file is part of the LibreOffice project. # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. # # This file incorporates work covered by the following license noti...
beppec56/core
wizards/com/sun/star/wizards/agenda/AgendaWizardDialogResources.py
Python
gpl-3.0
14,293
0.004128
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-10-27 22:00 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('mentoring', '0011_auto_20161027_1653'), ] operations = [ migrations.AlterField...
TomWerner/AlumniMentoring
mentoring/migrations/0012_auto_20161027_1700.py
Python
mit
5,231
0.001529
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-04-13 18:29 from __future__ import unicode_literals import datetime from django.conf import settings from django.db import migrations, models import django.db.models.deletion import mac_app.models class Migration(migrations.Migration): initial = True ...
stevarino/cmsc495
mac_app/migrations/0001_initial.py
Python
mit
4,401
0.004317
import dectools.dectools as dectools from print_buffer import print_buffer p = print_buffer() prnt = p.rint printed = p.rinted prnt("Testing the @dectools.make_call_if decorator") prnt("==================") prnt("*No additonal parameters...") @dectools.make_call_if def check_security(function, args, kwargs): prn...
merriam/dectools
dectools/test/test_make_call_if.py
Python
mit
5,089
0.005699
#!/usr/bin/python3 """ This plugin can be use to add ownership and group of a file in a post message (on_post) and change the owner/group of products at destination (on_file) Sample usage: plugin root_chown.py Options ------- If a users/groups differs from the source to the destination, the user can supply a mapp...
petersilva/metpx-sarracenia
sarra/plugins/root_chown.py
Python
gpl-2.0
4,501
0.037325
import logging from gluon import A from gluon import DIV from gluon import H3 from gluon import H4 from gluon import H5 from gluon import I from gluon import IS_IN_SET from gluon import LI from gluon import P from gluon import MARKMIN from gluon import SQLFORM from gluon import SPAN from gluon import TAG from gluon imp...
tessercat/ddj
modules/poems.py
Python
mit
7,006
0.003283
#!/usr/bin/env python # -*- UTF8 -*- import sys import argparse from .biz_func import * from .io import format_duplicates from utils.verbose import Verboser try: from _version import __version__ except ImportError: __version__ = '--development-instance--' def find_duplicates(root_dir): """ find_dupl...
volker-kempert/python-tools
src/find_duplicates/cli_find_dups.py
Python
mit
2,168
0.001384
#!/usr/bin/env python # import sys, cpp, kernel, glob, os, re, getopt, clean_header from defaults import * from utils import * def usage(): print """\ usage: %(progname)s [kernel-original-path] this program is used to update all the auto-generated clean headers used by the Bionic C library. it assumes t...
zunaid321/Lenovo_A820_kernel_kk
bionic/libc/kernel/tools/update_all.py
Python
gpl-2.0
2,397
0.01627
from functools import reduce from itertools import chain, combinations, product, permutations # This class is used to represent and examine algebras on atom tables. # It is intended to be used for nonassociative algebras, but this is not assumed. class AtomicAlgebra: # Create an algebra from a table of...
mdneuzerling/AtomicAlgebra
AtomicAlgebra.py
Python
gpl-3.0
23,406
0.007007
# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for # license information. # # Code generated by Microsoft (R) AutoRest Code Generator. # Changes ...
SUSE/azure-sdk-for-python
azure-mgmt-compute/azure/mgmt/compute/compute/v2016_04_30_preview/models/virtual_machine_scale_set_extension_profile.py
Python
mit
1,089
0.000918
"""Tests for data/messaging_service/gcp_pubsub_client.py.""" import unittest from unittest import mock from perfkitbenchmarker.scripts.messaging_service_scripts.gcp import gcp_pubsub_client NUMBER_OF_MESSAGES = 1 MESSAGE_SIZE = 10 PROJECT = 'pkb_test_project' TOPIC = 'pkb_test_topic' SUBSCRIPTION = 'pkb_test_subscrip...
GoogleCloudPlatform/PerfKitBenchmarker
tests/scripts/gcp_pubsub_client_test.py
Python
apache-2.0
1,810
0.003315
import sys import math import CSVReader import DecisionTree # GLOBALS attributes = list() data = list(list()) pre_prune_tree = True # MATH FUNCTIONS def Entropy( yesNo ): yes = yesNo[0]; no = yesNo[1] if no == 0 or yes == 0: return 0 total = no + yes return ( -( yes / total ) * math.log( yes / total, 2 ) ...
CKPalk/MachineLearning
Assignment1/id3.py
Python
mit
4,116
0.082119
# Generated by Django 2.1 on 2018-08-19 13:12 from django.db import migrations, models import django.utils.timezone class Migration(migrations.Migration): dependencies = [ ('world', '0003_auto_20180819_0036'), ] operations = [ migrations.AddField( model_name='tileevent', ...
jardiacaj/finem_imperii
world/migrations/0004_tileevent_create_timestamp.py
Python
agpl-3.0
501
0.001996
# Copyright 2014 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import v8_utilities UNION_H_INCLUDES = frozenset([ 'bindings/core/v8/Dictionary.h', 'bindings/core/v8/ExceptionState.h', 'bindings/core/v8/V8Bi...
mxOBS/deb-pkg_trusty_chromium-browser
third_party/WebKit/Source/bindings/scripts/v8_union.py
Python
bsd-3-clause
6,305
0.000952
from dependencies.dependency import getToolByName from lims.browser import BrowserView from dependencies.dependency import ViewPageTemplateFile from lims import bikaMessageFactory as _ from lims.utils import t from lims.utils import formatDateQuery, formatDateParms from dependencies.dependency import IViewView from dep...
yasir1brahim/OLiMS
lims/browser/reports/qualitycontrol_analysesrepeated.py
Python
agpl-3.0
5,554
0.00162
''' Grid Layout =========== .. only:: html .. image:: images/gridlayout.gif :align: right .. only:: latex .. image:: images/gridlayout.png :align: right .. versionadded:: 1.0.4 The :class:`GridLayout` arranges children in a matrix. It takes the available space and divides it into columns a...
LogicalDash/kivy
kivy/uix/gridlayout.py
Python
mit
19,254
0
from flask import Flask, Response, request app = Flask(__name__) @app.route('/', defaults={'path': ''}) @app.route('/<path:path>') def user(path): name = request.args.get('name') return Response("Hello %s" % (name), mimetype='text/html')
zeit/now-cli
packages/now-cli/test/dev/fixtures/python-flask/api/user.py
Python
apache-2.0
247
0.004049
import os from os import path from datetime import datetime import getpass import re import time from fabric.context_managers import cd, hide, settings from fabric.operations import require, prompt, get, run, sudo, local from fabric.state import env from fabric.contrib import files from fabric import utils def _setu...
qris/mailer-dye
dye/fablib.py
Python
gpl-3.0
29,664
0.001584
import cupy from cupy import core def array(obj, dtype=None, copy=True, ndmin=0): """Creates an array on the current device. This function currently does not support the ``order`` and ``subok`` options. Args: obj: :class:`cupy.ndarray` object or any other object that can be passe...
AlpacaDB/chainer
cupy/creation/from_data.py
Python
mit
3,203
0
with open('/tmp2/MicrosoftAcademicGraph/Papers.txt', 'r') as f, open('/tmp2/MicrosoftAcademicGraph_refine/papers_1_column.txt','w') as b: for line in f: a = line.split('\t') #a = a[1].split('\r') #b.write(a[0]+a[1]) b.write(a[2]+'\n') #break
chanhou/refine-client-py
parse_paper.py
Python
gpl-3.0
289
0.020761
# Copyright (c) 2014-2015, NVIDIA CORPORATION. All rights reserved. import os import re import time import math import subprocess import numpy as np from google.protobuf import text_format import caffe try: import caffe_pb2 except ImportError: # See issue #32 from caffe.proto import caffe_pb2 from train...
asifmadnan/DIGITS
digits/model/tasks/caffe_train.py
Python
bsd-3-clause
54,494
0.004
''' Problem 036 The decimal number, 585 = 10010010012 (binary), is palindromic in both bases. Find the sum of all numbers, less than one million, which are palindromic in base 10 and base 2. (Please note that the palindromic number, in either base, may not include leading zeros.) Solution: Copyright 2017 D...
daveinnyc/various
project_euler/036.double_palindromes.py
Python
mit
761
0.005256
#!/usr/bin/env python3 from powerdnsadmin import create_app if __name__ == '__main__': app = create_app() app.run(debug = True, host=app.config.get('BIND_ADDRESS', '127.0.0.1'), port=app.config.get('PORT', '9191'))
ngoduykhanh/PowerDNS-Admin
run.py
Python
mit
224
0.013393
dc = {'a' : 'a-ele', 'b' : 'b-ele', 'c' : 'c-ele'} print "id(dc) = ["+ str(id(dc)) +"] dict is : " + str(dc) print "========================" x = dc.fromkeys(dc, 'x-ele') print "type of dc.fromkeys(dc, 'x-ele') = [" + str(type(x)) + "]" print x print "========================" x = dict.fromkeys(dc, 'dict-ele') print ...
fengbohello/practice
python/dict/fromkeys.py
Python
lgpl-3.0
648
0.016975
############################################################################## # # OSIS stands for Open Student Information System. It's an application # designed to manage the core business of higher education institutions, # such as universities, faculties, institutes and professional schools. # The core bus...
uclouvain/osis
base/tests/factories/entity_version.py
Python
agpl-3.0
2,480
0.001614
#!/usr/bin/env python # -*- coding: utf-8 -*- import argparse import itertools import os import sys try: from urllib import quote_plus, urlencode from urlparse import parse_qsl, urlparse, urlunparse except ImportError: from urllib.parse import parse_qsl, quote_plus, urlencode, urlparse, urlunparse ERR_INV...
jdp/urp
urp.py
Python
mit
7,836
0.004977
# Copyright (c) Twisted Matrix Laboratories. # See LICENSE for details. """ Tests for L{twisted.python.threadable}. """ from __future__ import division, absolute_import import sys, pickle try: import threading except ImportError: threadingSkip = "Platform lacks thread support" else: threadingSkip = None...
skycucumber/Messaging-Gateway
webapp/venv/lib/python2.7/site-packages/twisted/test/test_threadable.py
Python
gpl-2.0
3,760
0.002926
from .utils import * vep_and_snpeff_inputs = [(input_prefix + '.vcf.gz', False), (input_prefix + '.snpeff.vcf.gz', True)] def test_case_control(): for vcf, snpeff in vep_and_snpeff_inputs: output = get_tmp_out() test_args = dict( input=vcf, snpeff=...
gantzgraf/vape
test/test_sample_filters.py
Python
gpl-3.0
6,155
0.0013
import time import datetime from OpenSSL import crypto as c from checks import AgentCheck class SSLCheckExpireDays(AgentCheck): def check(self, instance): metric = "ssl.expire_in_days" certfile = instance['cert'] cert_tag = 'cert:%s' % (certfile.split('/')[-1:],) date_format = "%Y%m...
LibreHealthIO/community-infra
ansible/files/monitoring/ssl_check_expire_days.py
Python
mpl-2.0
735
0.005442
""" Compute the GRS from genotypes and a GRS file. """ # This file is part of grstools. # # The MIT License (MIT) # # Copyright (c) 2017 Marc-Andre Legault # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # ...
legaultmarc/grstools
grstools/scripts/mendelian_randomization.py
Python
mit
3,401
0