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
from PyQt4.QtCore import QObject, pyqtSignal from ems.notification.abstract import FormNotifier from ems.qt4.gui.widgets.balloontip import BalloonTip from ems import qt4 from ems.qt4.util import variant_to_pyobject as py class BalloonFormNotifier(FormNotifier): def __init__(self): self._widgetMap = {...
mtils/ems
ems/qt4/gui/notification/balloon_form_notifier.py
Python
mit
2,764
0.002171
# domain_backup # # Copyright Andrew Bartlett <abartlet@samba.org> # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # #...
kernevil/samba
python/samba/netcmd/domain_backup.py
Python
gpl-3.0
50,651
0.000138
# coding: utf-8 # ----------------------------------------------------------------------------- # Copyright 2015 Esri # 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...
jfrygeo/solutions-geoprocessing-toolbox
utils/test/patterns_tests/IncidentDensityTestCase.py
Python
apache-2.0
4,288
0.011194
# 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...
DinoCow/airflow
tests/api_connexion/schemas/test_connection_schema.py
Python
apache-2.0
7,097
0.000564
# 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. # ---------------------------------------------------------------------...
lmazuel/azure-sdk-for-python
azure-mgmt-network/azure/mgmt/network/version.py
Python
mit
348
0
# Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Rickard Lindberg, Roger Lindberg # # This file is part of Timeline. # # Timeline 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 th...
ezequielpereira/Time-Line
timelinelib/wxgui/components/filechooser.py
Python
gpl-3.0
2,868
0.001046
# encoding: utf-8 from __future__ import unicode_literals import operator import pytest from marrow.mongo import Filter from marrow.schema.compat import odict, py3 @pytest.fixture def empty_ops(request): return Filter() @pytest.fixture def single_ops(request): return Filter({'roll': 27}) def test_ops_iterat...
marrow/mongo
test/query/test_ops.py
Python
mit
5,358
0.035274
import unittest import os from json_validator.validator import validate_params, ValidationError arg1 = "something" arg2 = "something_else" schema_dirpath = os.path.dirname(os.path.realpath(__file__)) schema_filepath = os.path.join(schema_dirpath, "schema.json") correct_params = {"param1": "some string", ...
sliwinski-milosz/json_validator
tests/test_json_validator.py
Python
mit
4,213
0
#!/usr/bin/env python # -*- coding: utf8 -*- # ***************************************************************** # ** PTS -- Python Toolkit for working with SKIRT ** # ** © Astronomical Observatory, Ghent University ** # ***************************************************************** ##...
SKIRT/PTS
core/extract/scaling.py
Python
agpl-3.0
3,571
0.002241
"""star subcommand tests""" # (c) 2015-2021 Wibowo Arindrarto <contact@arindrarto.dev> import json import pytest from click.testing import CliRunner from crimson.cli import main from .utils import get_test_path @pytest.fixture(scope="module") def star_fail(): runner = CliRunner() in_file = get_test_path("s...
bow/crimson
tests/test_star.py
Python
bsd-3-clause
2,311
0
#!/usr/bin/python # # Retrieve information on an existing VPC. # # import module snippets from ansible.module_utils.basic import * from ansible.module_utils.ec2 import * import boto.vpc def main(): argument_spec = ec2_argument_spec() argument_spec.update(dict( resource_tags=dict(type='dict', require...
rackn/container-networking-ansible
test/common/library/ec2_vpc_facts.py
Python
apache-2.0
1,587
0.00063
#If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23. #Find the sum of all the multiples of 3 or 5 below 1000. print sum([x for x in xrange(1,1000) if (x % 3 == 0) or (x % 5 == 0)])
ecolitan/projecteuler-answers
Multiples_of_3_and_5.py
Python
gpl-2.0
260
0.015385
import os os.environ['KIVY_GL_BACKEND'] = 'gl' #need this to fix a kivy segfault that occurs with python3 for some reason from kivy.app import App class TestApp(App): pass if __name__ == '__main__': TestApp().run()
ISS-Mimic/Mimic
Pi/kivytest/Test_Kivy.py
Python
mit
225
0.026667
# -*- coding: iso-8859-1 -*- """ crypto.cipher.rijndael Rijndael encryption algorithm This byte oriented implementation is intended to closely match FIPS specification for readability. It is not implemented for performance. Copyright © (c) 2002 by Paul A. Lambert Read LICENSE.txt for license...
felipenaselva/felipe.repository
script.module.cryptopy/lib/crypto/cipher/rijndael.py
Python
gpl-2.0
14,723
0.051484
#!/usr/bin/env python3 # Copyright (C) British Crown (Met Office) & Contributors. # ----------------------------------------------------------------------------- import metomi.rose.macro class NullChecker(metomi.rose.macro.MacroBase): """Class to report errors for missing or null settings.""" REPORTS_INFO ...
metomi/rose
demo/rose-config-edit/demo_meta/app/05-validate/meta/lib/python/macros/null.py
Python
gpl-3.0
765
0
#!/usr/bin/env python from distutils.core import setup setup( name='memd', version='0.0.1', url='https://github.com/gvnn/memd', packages=['memd'], install_requires=['python-memcached'] )
gvnn/memd
setup.py
Python
mit
208
0.004808
"""fix invalid RAISE NOTICE in update_signatures_hourly. Revision ID: 495bf3fcdb63 Revises: 3f007539efc Create Date: 2014-07-07 20:33:34.634141 """ # revision identifiers, used by Alembic. revision = '495bf3fcdb63' down_revision = '1baef149e5d1' from alembic import op from socorro.lib import citexttype, jsontype, b...
AdrianGaudebert/socorro
alembic/versions/495bf3fcdb63_fix_invalid_notice_in_update_signatures_hourly.py
Python
mpl-2.0
692
0.011561
# -*- coding: utf8 -*- ''' Python SSAP API Version 1.5 © Indra Sistemas, S.A. 2014 SPAIN All rights reserved ''' import sys def bytes2String(data): ''' Converts a Python 3 bytes object to a string. ''' if sys.version_info[0] < 3: return data else: return data.decode("utf...
Sofia2/python-api
src/ssap/utils/strings.py
Python
apache-2.0
334
0.015015
import time, types, os, sys, signal import multiprocessing """ This class is simple enough to allow workers which take incomming log lines and do things with them. I really dont know what people will want to do with there logs and how they will want to output them but this is where they will be able to control the out...
wojons/transcribe
helpers/workerBase.py
Python
mit
4,287
0.013529
__author__ = 'johan'
joharei/QtChordii
utils/__init__.py
Python
gpl-3.0
21
0
"""Test code for upsampling""" import numpy as np import tvm import topi import topi.testing import math def verify_upsampling(batch, in_channel, in_height, in_width, scale, layout='NCHW', method="NEAREST_NEIGHBOR"): if layout == 'NCHW': A = tvm.placeholder((batch, in_channel, in_height, in_width), name=...
mlperf/training_results_v0.6
Fujitsu/benchmarks/resnet/implementations/mxnet/3rdparty/tvm/topi/tests/python/test_topi_upsampling.py
Python
apache-2.0
2,484
0.002818
import sys from math import * if __name__ == '__main__': try: if sys.argv[1] == '-h': print '''Cosmology calculator ala Ned Wright (www.astro.ucla.edu/~wright) input values = redshift, Ho, Omega_m, Omega_vac ouput values = age at z, distance in Mpc, kpc/arcsec, apparent to abs mag conversion ...
sniemi/SamPy
cosmology/cc.py
Python
bsd-2-clause
6,151
0.017396
# -*- coding:utf-8 -*- # # Copyright (C) 2011 Governo do Estado do Rio Grande do Sul # # Author: Lincoln de Sousa <lincoln@gg.rs.gov.br> # Author: Rodrigo Sebastiao da Rosa <rodrigo-rosa@procergs.rs.gov.br> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Aff...
gabinetedigital/gd
gd/govpergunta/__init__.py
Python
agpl-3.0
11,253
0.00329
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Taco Module for Python documentation build configuration file, created by # sphinx-quickstart on Mon Feb 17 16:17:48 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are prese...
grahambell/taco-python
doc/conf.py
Python
gpl-3.0
8,346
0.005991
import pyemto import numpy as np import os latpath = "../../../../" # Path do bmdl, kstr and shape directories # each system need to have same number of alloy elements #systems = [['Fe','Al'],['Fe','Cr']] #systems = [['Fe'],['Al']] systems = [['Al']] #concentrations = [[0.5,0.5]] concentrations = [[1.0]] magn = "NM...
hpleva/pyemto
pyemto/examples/alloy_discovery/make_alloy_final.py
Python
mit
8,645
0.014112
import pandas as pd from syscore.algos import calculate_weighted_average_with_nans from syscore.genutils import str2Bool from syscore.dateutils import ROOT_BDAYS_INYEAR from syscore.pdutils import turnover from sysquant.estimators.turnover import turnoverDataForTradingRule from systems.system_cache import diagnostic...
robcarver17/pysystemtrade
systems/accounts/account_costs.py
Python
gpl-3.0
12,395
0.002098
# coding=utf-8 from __future__ import unicode_literals from .. import BaseProvider class Provider(BaseProvider): def ean(self, length=13): code = [self.random_digit() for i in range(length - 1)] if length not in (8, 13): raise AssertionError("length can only be 8 or 13") if...
Nebucatnetzer/tamagotchi
pygame/lib/python3.4/site-packages/faker/providers/barcode/__init__.py
Python
gpl-2.0
761
0
from django.conf.urls.defaults import * from django.conf import settings prefix = settings.URL_PREFIX from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.views.generic import RedirectView urlpatterns = patterns('',) # init # November 20, 2013 # # We have three server types for now: # ...
lambdamusic/testproject
konproj/urls.py
Python
gpl-2.0
2,206
0.047597
"""A pseudo-file mapped into memory Provides better performance for frequent reads/writes, and makes reading/writing easier via regions (windows) of memory. Allows memory to be accessed via array reads/ writes as well. """ import mmap import logging log = logging.getLogger(__name__) class ReadOnlyError(Exception):...
Qix-/starfuse
starfuse/fs/mapped_file.py
Python
mit
7,231
0.001798
# Copyright (c) 2012-2016 Seafile Ltd. from django.contrib import admin # Register your models here.
miurahr/seahub
seahub/role_permissions/admin.py
Python
apache-2.0
102
0
import logging from datetime import datetime import math import numpy as np import pandas as pd from flask_sqlalchemy import SQLAlchemy from ..models import SchoolWithDescription2020 from ..utilities import init_flask, time_delta, chunks, ItmToWGS84 school_fields = { "school_id": "סמל_מוסד", "school_name": "...
hasadna/anyway
anyway/parsers/schools_with_description_2020.py
Python
mit
6,488
0.003967
""" EventHandler handles all events. The handler sets on every object. """ import random from muddery.utils import defines from muddery.statements.statement_handler import STATEMENT_HANDLER from muddery.utils import utils from muddery.worlddata.data_sets import DATA_SETS from django.conf import settings from django.ap...
MarsZone/DreamLand
muddery/utils/event_handler.py
Python
bsd-3-clause
7,071
0.003253
import unittest from subprocess import call, DEVNULL import time from tests.docker import docker_util class VMHelper(object): def __init__(self, vm_name: str, shell: str = "", ssh_username: str = None, ssh_port: str = None): self.vm_name = vm_name self.shell = shell # like cmd.exe /c sel...
splotz90/urh
tests/TestInstallation.py
Python
gpl-3.0
5,216
0.004793
import pdb def calc(i, n): j = i * n return j def f(n): for i in range(n): j = calc(i, n) print(i, j) return if __name__ == '__main__': pdb.set_trace() f(5)
jasonwee/asus-rt-n14uhp-mrtg
src/lesson_developer_tools/pdb_next.py
Python
apache-2.0
202
0.00495
# -*- coding: utf-8 -*- from gi.repository import GLib, GObject, Gio from dfeet import dbus_utils def args_signature_markup(arg_signature): return '<small><span foreground="#2E8B57">%s</span></small>' % (arg_signature) def args_name_markup(arg_name): return '<small>%s</small>' % (arg_name,) class DBusNod...
GNOME/d-feet
src/dfeet/introspection_helper.py
Python
gpl-2.0
7,626
0.001574
from scrapelib import HTTPError from openstates.utils import LXMLMixin from pupa.scrape import Person, Scraper class UTPersonScraper(Scraper, LXMLMixin): def scrape(self): PARTIES = {"R": "Republican", "D": "Democratic"} representative_url = "http://house.utah.gov/rep/{}" senator_url = "ht...
openstates/openstates
openstates/ut/people.py
Python
gpl-3.0
3,136
0.001276
""" Helper functions for CP apps """ import six from cherrypy._cpcompat import urljoin as _urljoin, urlencode as _urlencode from cherrypy._cpcompat import basestring import cherrypy def expose(func=None, alias=None): """ Expose the function or class, optionally providing an alias or set of aliases. """...
jealousrobot/PlexArt
lib/cherrypy/_helper.py
Python
gpl-3.0
10,332
0.000194
""" Settings and configuration for Django. Values will be read from the module specified by the DJANGO_SETTINGS_MODULE environment variable, and then from django.conf.global_settings; see the global settings file for a list of all possible variables. """ import logging import os import sys import time # Needed fo...
edisonlz/fruit
web_project/base/site-packages/django/conf/__init__.py
Python
apache-2.0
7,796
0.002437
from IPython.core import ipapi from IPython.core import macro ip = ipapi.get() import os,pprint def export(filename = None): lines = ['import IPython.core.ipapi', 'ip = IPython.core.ipapi.get()',''] vars = ip.db.keys('autorestore/*') vars.sort() varstomove = [] get = ip.db.get macros = ...
sodafree/backend
build/ipython/IPython/quarantine/ipy_exportdb.py
Python
bsd-3-clause
2,037
0.025037
"""passlib tests"""
charukiewicz/beer-manager
venv/lib/python3.4/site-packages/passlib/tests/__init__.py
Python
mit
20
0
#!/usr/bin/python # -*- coding: utf-8 -*- # Copyright: (c) 2018, Abhijeet Kasurde <akasurde@redhat.com> # GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt) from __future__ import absolute_import, division, print_function __metaclass__ = type ANSIBLE_METADATA = { 'metadata...
pgmillon/ansible
lib/ansible/modules/cloud/vmware/vmware_host_firewall_manager.py
Python
gpl-3.0
17,107
0.003975
from __future__ import print_function, unicode_literals import argparse import json import sys import textwrap from tagalog import io, stamp, tag, fields from tagalog import shipper parser = argparse.ArgumentParser(description=textwrap.dedent(""" Ship log data from STDIN to somewhere else, timestamping and prepro...
nickstenning/tagalog
tagalog/command/logship.py
Python
mit
1,992
0.002008
#! /usr/bin/env python # encoding: utf-8 # Thomas Nagy, 2007-2018 GPLV3 import os, sys, tarfile, io from xml.sax import make_parser from xml.sax.handler import ContentHandler def debug(s): sys.stderr.write(s) def protect(t): lst = t.split('&') t = "&amp;".join(lst) lst = t.split('<') t = "&lt;".join(lst) lst =...
ita1024/semantik
src/filters/others.py
Python
gpl-3.0
3,251
0.03199
# # 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...
mistercrunch/airflow
airflow/sensors/external_task.py
Python
apache-2.0
14,311
0.003005
# -*- coding: utf-8 -*- # # petl documentation build configuration file, created by # sphinx-quickstart on Fri Aug 19 11:16:43 2011. # # This file is execfile()d with the current directory set to its containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # All co...
alimanfoo/petl
docs/conf.py
Python
mit
7,473
0.006423
from distutils.core import setup setup( name='PyMonad', version='1.3', author='Jason DeLaat', author_email='jason.develops@gmail.com', packages=['pymonad', 'pymonad.test'], url='https://bitbucket.org/jason_delaat/pymonad', license=open('LICENSE.txt').read(), description='Collection of c...
fnl/pymonad
setup.py
Python
bsd-3-clause
824
0.033981
# Copyright 2014 Tesora, 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 ...
CMSS-BCRDB/RDSV1.0
trove/guestagent/strategies/replication/__init__.py
Python
apache-2.0
955
0
""" This module defines the attributes of the PyPI package for the mbed SDK test suite ecosystem tools """ """ mbed SDK Copyright (c) 2011-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 Licen...
bridadan/mbed-ls
setup.py
Python
apache-2.0
1,786
0.004479
from collections.abc import Iterable from TM1py.Services import CellService from TM1py.Services import ElementService from TM1py.Utils import require_pandas try: import pandas as pd _has_pandas = True except ImportError: _has_pandas = False class PowerBiService: def __init__(self, tm1_rest): ...
OLAPLINE/TM1py
TM1py/Services/PowerBiService.py
Python
mit
6,310
0.004596
# -*- coding: utf-8 -*- # # This file is part of NINJA-IDE (http://ninja-ide.org). # # NINJA-IDE 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 # any later version. # # NIN...
maxolasersquad/ninja-ide
ninja_ide/core/__init__.py
Python
gpl-3.0
712
0.001404
# -*- coding: utf-8 -*- ''' The service module for OpenBSD .. important:: If you feel that Salt should be using this module to manage services on a minion, and it is using a different module (or gives an error similar to *'service.start' is not available*), see :ref:`here <module-provider-override>`. '...
stephane-martin/salt-debian-packaging
salt-2016.3.3/salt/modules/openbsdservice.py
Python
apache-2.0
8,008
0.000999
# -*- coding: utf-8 -*- # # Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com> # # This file is part of Weblate <http://weblate.org/> # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, eithe...
leohmoraes/weblate
weblate/trans/views/basic.py
Python
gpl-3.0
14,336
0
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('sites', '0001_initial'), ] operations = [ migrations.CreateModel( name='FlatPage', fields=[ ('id', models.AutoField(verbose_name='ID', serialize=Fals...
sametmax/Django--an-app-at-a-time
ignore_this_directory/django/contrib/flatpages/migrations/0001_initial.py
Python
mit
1,710
0.004678
from __future__ import division def humanize_bytes(n, precision=2): # Author: Doug Latornell # Licence: MIT # URL: http://code.activestate.com/recipes/577081/ """Return a humanized string representation of a number of bytes. Assumes `from __future__ import division`. >>> humanize_bytes(1) ...
Irdroid/httpie
httpie/utils.py
Python
bsd-3-clause
1,164
0.000859
#!/bin/env python import os import re import sys import time import pickle import random import socket import os.path import traceback import subprocess from optparse import OptionParser VERSION='1.1.0.7' COLOR = { 'success' : '\33[2;32m', # Green 'fail' : '\033[2;31m', # Red 'bad' : '\033[31...
DarthMaulware/EquationGroupLeaks
Leak #4 - Don't Forget Your Base/EQGRP-Auction-File/Linux/etc/autoutils.py
Python
unlicense
22,459
0.005699
# 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/metricsadvisor/azure-ai-metricsadvisor/azure/ai/metricsadvisor/_generated/aio/_metrics_advisor.py
Python
mit
3,345
0.003886
# # 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...
wileeam/airflow
tests/providers/jdbc/operators/test_jdbc.py
Python
apache-2.0
1,539
0.0013
from spec.python import db_connection from sam import constants from sam import common from sam import integrity import traceback mysql_params = constants.dbconfig.copy() sqlite_params = constants.dbconfig.copy() mysql_params['dbn'] = 'mysql' mysql_params['db'] = 'samapper_test' sqlite_params['dbn'] = 'sqlite' sqlite...
JoePelz/SAM
spec/python/test_integrity.py
Python
gpl-3.0
4,602
0.002825
from pysv import ast_utils from pysv import ssa_converter from pysv import utils from pysv import loops from pysv import interm from pysv.smt2 import ProgramSmt2 def get_code_in_smt2(code, code_pre, code_post, program_vars, env, holes_decls = None): """Converts source codes of specification elements into program ...
iwob/pysv
pysv/smt_common.py
Python
mit
3,263
0.005823
# -*- encoding: utf-8 -*- from .cursebox import Cursebox from .colors import colors from .constants import EVENT_SKIP from .utils import hex_to_rgb logo = [u" █ ", u"█▀█ █ █ █▀█ █▀▀ █▀█ █▀▄ █▀█ █▄█", u"█ █ █ █ ▀▀█ █▄█ █ █ █ █ ▄█▄", u"█▄█ █▄█ █ ▄▄█ █▄▄ █▄█ █▄█...
Tenchi2xh/cursebox
cursebox/__main__.py
Python
mit
1,969
0.000542
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Intensity-based image registration """ from __future__ import absolute_import from __future__ import print_function import os import numpy as np import scipy.ndimage as nd from nibabel import Nifti1Ima...
alexis-roche/nireg
nireg/histogram_registration.py
Python
bsd-3-clause
23,075
0.000563
"""Test sensor of Brother integration.""" from datetime import datetime, timedelta import json from homeassistant.components.brother.const import UNIT_PAGES from homeassistant.const import ( ATTR_DEVICE_CLASS, ATTR_ENTITY_ID, ATTR_ICON, ATTR_UNIT_OF_MEASUREMENT, DEVICE_CLASS_TIMESTAMP, PERCENTA...
tchellomello/home-assistant
tests/components/brother/test_sensor.py
Python
apache-2.0
10,659
0.000281
############################################################################## # For copyright and license notices, see __manifest__.py file in module root # directory ############################################################################## from odoo import models, fields, api, _ from odoo.exceptions import UserE...
ingadhoc/purchase
purchase_stock_ux/models/purchase_order_line.py
Python
agpl-3.0
7,593
0
#!/usr/bin/env python __author__ = "Mari Wahl" __copyright__ = "Copyright 2014, The Cogent Project" __credits__ = ["Mari Wahl"] __license__ = "GPL" __version__ = "4.1" __maintainer__ = "Mari Wahl" __email__ = "marina.w4hl@gmail.com" from helpers import running, constants # change here for type of net: NETWORK_F...
bt3gl/NetAna-Complex-Network-Analysis
src/calculate_features_advanced/road.py
Python
mit
577
0.015598
#!/usr/bin/python # # 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 b...
wubr2000/googleads-python-lib
examples/dfp/v201505/audience_segment_service/get_first_party_audience_segments.py
Python
apache-2.0
2,062
0.009214
# django-openid-auth - OpenID integration for django.contrib.auth # # Copyright (C) 2009-2013 Canonical Ltd. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # * Redistributions of source code must retain the above ...
devs1991/test_edx_docmode
venv/lib/python2.7/site-packages/django_openid_auth/management/commands/openid_cleanup.py
Python
agpl-3.0
1,732
0
#!/usr/bin/python import re import sys import os import getopt import vcf def main(): params = parseArgs() vfh = vcf.Reader(open(params.vcf, 'r')) #grab contig sizes contigs = dict() for c,s in vfh.contigs.items(): contigs[s.id] = s.length regions = list() this_chrom = None start = int() stop = int() ...
tkchafin/scripts
findBreaksVCF.py
Python
gpl-3.0
3,606
0.044925
"""Compare gas/elec demand on Local Authority Districts with modelled demand """ import os import operator import logging import copy import numpy as np import matplotlib.pyplot as plt from scipy import stats from energy_demand.basic import lookup_tables from energy_demand import enduse_func from energy_demand.profile...
nismod/energy_demand
energy_demand/validation/lad_validation.py
Python
mit
33,133
0.003501
# Copyright 2007-2019 Red Hat, Inc. and others. # # This file is part of Bodhi. # # 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...
fedora-infra/bodhi
bodhi-server/bodhi/server/buildsys.py
Python
gpl-2.0
29,649
0.001889
# # 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...
hpproliant/ironic
ironic/tests/unit/drivers/modules/amt/test_management.py
Python
apache-2.0
10,845
0
# -*- encoding:utf-8 -*- from mako import runtime, filters, cache UNDEFINED = runtime.UNDEFINED __M_dict_builtin = dict __M_locals_builtin = locals _magic_number = 8 _modified_time = 1399593695.26071 _enable_loop = True _template_filename = u'/usr/lib/python2.7/site-packages/nikola/data/themes/base/templates/comments_h...
wcmckee/hamiltoncomputerclub.org.nz
static/cache/.mako.tmp/comments_helper_googleplus.tmpl.py
Python
mit
2,205
0.004989
# -*- coding: utf-8 -*- from __future__ import absolute_import import operator from django.conf import settings from django.utils import translation from django.utils.translation import ugettext as _ from django.utils.lru_cache import lru_cache from six.moves import urllib, zip_longest, zip, range from typing import ...
verma-varsha/zulip
zerver/lib/i18n.py
Python
apache-2.0
2,570
0.002724
# -*- coding: UTF-8 -*- ## Copyright 2008-2011 Luc Saffre ## This file is part of the Lino project. ## Lino is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## (at your op...
MaxTyutyunnikov/lino
obsolete/sales.old/fixtures/demo.py
Python
gpl-3.0
7,084
0.025692
"""Module which contains all spells that check something in a cgf file.""" # -------------------------------------------------------------------------- # ***** BEGIN LICENSE BLOCK ***** # # Copyright (c) 2007-2012, NIF File Format Library and Tools. # All rights reserved. # # Redistribution and use in source and binar...
griest024/PokyrimTools
pyffi-develop/pyffi/spells/cgf/check.py
Python
mit
9,081
0.002313
import atexit import os import tempfile import time import threading import unittest import nose.tools import smqtk.utils.file_utils __author__ = "paul.tunison@kitware.com" class TestFileModificationMonitor (unittest.TestCase): def _mk_test_fp(self): fd, fp = tempfile.mkstemp() os.close(fd) ...
Purg/SMQTK
python/smqtk/tests/utils/file_utils/test_FileModificationMonitor.py
Python
bsd-3-clause
6,758
0.000444
# 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 # d...
vedujoshi/os_tempest
tempest/common/waiters.py
Python
apache-2.0
5,919
0
# -*- coding: utf-8 -*- # Generated by Django 1.10.6 on 2017-04-25 01:27 from __future__ import unicode_literals from django.conf import settings from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ migratio...
giocastagno/I.W._Delpuppo_Kopech_Castagno
turismo/sitio/migrations/0001_initial.py
Python
mit
2,730
0.003297
# 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 import frappe.defaults from erpnext.controllers.selling_controller import SellingController from erpnext.stock.doctype.batch.batch import...
ESS-LLP/erpnext-healthcare
erpnext/stock/doctype/delivery_note/delivery_note.py
Python
gpl-3.0
20,437
0.026423
from __future__ import absolute_import from __future__ import division from __future__ import print_function import fnmatch import os import subprocess import sys import tempfile import time import psutil import ray class RayTestTimeoutException(Exception): """Exception used to identify timeouts from test util...
ujvl/ray-ng
python/ray/tests/utils.py
Python
apache-2.0
4,953
0
import pickle commits = {} def main(): output = "" for commit in range(0,3): output += "c*\n" for file in range(0,2): smells = str(commit+file*2) output += "class"+str(file)+" smells="+smells+"\n" result = open("mockpmdresult.txt","w") result.write(output) result.close() if __name__ == "__main__...
UBC-Victorious-410/project
tools/mock_pmd_parser.py
Python
mit
330
0.060606
# -*- coding: utf-8 -*- # ########################## Copyrights and license ############################ # # # Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> # # Copyright 2012 Zearin <zearin@gonk.net> ...
cytec/SickRage
lib/github/PaginatedList.py
Python
gpl-3.0
7,862
0.003689
#!/usr/bin/env python import sys import os import glob import json import re from argparse import ArgumentParser from argparse import RawDescriptionHelpFormatter def init_report_dir(metadata_dir, report_name): report_dir = metadata_dir + '/reports/' + report_name if not os.path.exists(report_dir): os...
ICGC-TCGA-PanCancer/pancancer-sandbox
pcawg_metadata_parser/pc_report-embl-dkfz_summary_counts.py
Python
gpl-2.0
8,651
0.007282
from django.template.defaultfilters import phone2numeric_filter from django.test import SimpleTestCase from django.utils.safestring import mark_safe from ..utils import render, setup class Phone2numericTests(SimpleTestCase): @setup({'phone2numeric01': '{{ a|phone2numeric }} {{ b|phone2numeric }}'}) def test...
webostin/django-btc
tests/template_tests/filter_tests/test_phone2numeric.py
Python
bsd-3-clause
1,450
0.002069
# Hidden Markov Models # # Author: Ron Weiss <ronweiss@gmail.com> # and Shiqiao Du <lucidfrontier.45@gmail.com> # API changes: Jaques Grobler <jaquesgrobler@gmail.com> """ The :mod:`sklearn.hmm` module implements hidden Markov models. **Warning:** :mod:`sklearn.hmm` is orphaned, undocumented and has known numerical s...
mrshu/scikit-learn
sklearn/hmm.py
Python
bsd-3-clause
46,104
0.000022
# -*- 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 "sample spider" class DmozItem(scrapy.Item): # define the fields for your item here like: # name = scrapy.Field() title = scrapy.Field() ...
Jetpie/web-scraper
commercial_web_navigation/commercial_web_navigation/items.py
Python
mit
429
0.011655
from django.conf.urls import url from api import views urlpatterns = [ url(r'stations/$', views.get_stations, name='api_stations'), url(r'entry/(?P<station_id>\d+)/$', views.make_entry, name='api_entry'), url(r'new/$', views.add_station, name='api_add_station'), # Booking api url(r'booking/(?P<res...
boyombo/django-stations
stations/api/urls.py
Python
mit
2,383
0
#!/usr/bin/env python """ pitchanalysis.py -- Christopher Kuech cjkuech@gmail.com -- Requires: Python 2.7 Instructions: python pitchanalysis.py [wav-file-name] """ import matplotlib from math import log matplotlib.use("TkAgg") from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg from matplotlib.fig...
chriskuech/wavelab
pitchanalysis.py
Python
mit
5,174
0.018748
# -*- coding: UTF-8 -*- import os from behave_common_steps import dummy, App from dogtail.config import config from time import sleep, localtime, strftime import problem import shutil def before_all(context): """Setup nautilus stuff Being executed before all features """ try: # Cleanup abrt ...
fedora-desktop-tests/nautilus
features/environment.py
Python
gpl-2.0
3,002
0.001332
#!/usr/bin/env python import sys from django.conf import settings from django.core.management import execute_from_command_line from tests import mongoutils settings.configure( DATABASES={ 'default': { 'ENGINE': 'django.db.backends.sqlite3', 'NAME': ':memory:', }, }, ...
qwiglydee/drf-mongo-filters
runtests.py
Python
gpl-2.0
751
0.001332
from lcs.agents import PerceptionString from lcs.representations import UBR class TestPerceptionString: def test_should_initialize_with_defaults(self): assert len(PerceptionString("foo")) == 3 assert len(PerceptionString(['b', 'a', 'r'])) == 3 def test_should_create_empty_with_defaults(self)...
khozzy/pyalcs
tests/lcs/agents/test_PerceptionString.py
Python
gpl-3.0
1,123
0
import json import os from textwrap import dedent import boto3 import moto import pytest from moto.ec2 import ec2_backend from moto.ec2 import utils as ec2_utils from ecs_deplojo.connection import Connection from ecs_deplojo.task_definitions import TaskDefinition BASE_DIR = os.path.dirname(os.path.abspath(__file__))...
LabD/ecs-deplojo
tests/conftest.py
Python
mit
3,378
0
''' -- imports from python libraries -- ''' # from datetime import datetime import datetime import json ''' -- imports from installed packages -- ''' from django.http import HttpResponseRedirect # , HttpResponse uncomment when to use from django.http import HttpResponse from django.http import Http404 from django.sho...
sunnychaudhari/gstudio
gnowsys-ndf/gnowsys_ndf/ndf/views/course.py
Python
agpl-3.0
54,618
0.005493
# Author: seedboy # URL: https://github.com/seedboy # # 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 Software Foundation, either version 3 of the License, or # (at your option) any la...
markrawlingson/SickRage
sickbeard/providers/iptorrents.py
Python
gpl-3.0
7,350
0.00449
# -*- coding: utf-8 -*- # # pyspark documentation build configuration file, created by # sphinx-quickstart on Thu Aug 28 15:17:47 2014. # # This file is execfile()d with the current directory set to its # containing dir. # # Note that not all possible configuration values are present in this # autogenerated file. # # A...
cloud-fan/spark
python/docs/source/conf.py
Python
apache-2.0
12,894
0.005584
# # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation # # 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, incl...
aubreyrjones/libesp
scons_local/scons-local-2.3.0/SCons/PathList.py
Python
mit
8,536
0.000937
# Copyright 2011 David Malcolm <dmalcolm@redhat.com> # Copyright 2011 Red Hat, Inc. # # This 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) a...
ruediger/gcc-python-plugin
tests/plugin/functions/script.py
Python
gpl-3.0
3,300
0.003636
#!/usr/bin/python import os import threading import time import Queue import signal import subprocess import collections from json_get import generate_list q = Queue.Queue() ls = collections.deque( generate_list()) def showstuff(): while ( True ): sb = subprocess.Popen(["feh", "-Z", "-g" ,"800x400",ls[0]...
Programvareverkstedet/pensieve
pensieve.py
Python
gpl-2.0
789
0.017744
#!/usr/bin/python # -*- coding: utf-8 -*- from lib.meos import MEoS from lib import unidades class MD2M(MEoS): """Multiparameter equation of state for decamethyltetrasiloxane""" name = "decamethyltetrasiloxane" CASNumber = "141-62-8" formula = "C10H30Si4O3" synonym = "MD2M" rhoc = unidades.De...
edusegzy/pychemqt
lib/mEoS/MD2M.py
Python
gpl-3.0
2,498
0.003205
#!/usr/bin/env python import subprocess import time from format import * class Video(): """ Class to represent a Youtube video.""" def __init__(self, data): self.id = data['id'] self.title = data['title'] self.description = data['description'] self.user = data['uploader'] ...
enchuu/yaytp
video.py
Python
mit
1,966
0.006104
"""Core implementation of path-based import. This module is NOT meant to be directly imported! It has been designed such that it can be bootstrapped into Python as the implementation of import. As such it requires the injection of specific modules and attributes in order to work. One should use importlib as the p...
prefetchnta/questlab
bin/x64bin/python/37/Lib/importlib/_bootstrap_external.py
Python
lgpl-2.1
60,574
0.000528