repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
daStrauss/subsurface | src/superSolve/wrapCvxopt.py | 1 | 2619 | '''
Created on Jul 9, 2012
Copyright © 2013
The Board of Trustees of The Leland Stanford Junior University.
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.apac... | apache-2.0 | -7,317,539,029,297,520,000 | 30.926829 | 99 | 0.688694 | false | 3.2725 | false | false | false |
rouxcode/django-filer-addons | filer_addons/tests/test_management_commands.py | 1 | 2189 | # -*- coding: utf-8 -*-
from django.test import TestCase
from filer.tests import create_superuser
from filer.models import File, Folder
from filer_addons.tests.utils import create_django_file
class ManagementCommandsTests(TestCase):
def setUp(self):
self.superuser = create_superuser()
self.client... | mit | -3,994,054,243,302,470,000 | 30.724638 | 88 | 0.602101 | false | 4.106942 | true | false | false |
pmarti/pyclutter | examples/hello.py | 1 | 1992 | import sys
import clutter
class HelloClutter:
def __init__ (self, message):
self.stage = clutter.Stage()
self.stage.set_color(clutter.color_from_string('DarkSlateGrey'))
self.stage.set_size(800, 600)
self.stage.set_title('My First Clutter Application')
self.stage.connect('ke... | lgpl-2.1 | -3,097,715,510,959,132,000 | 32.2 | 72 | 0.601908 | false | 3.325543 | false | false | false |
AtalM2/iAtal | src/python/test_broken.py | 1 | 1071 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import elements
import enums
#globals
ended = False
compteur = 0
map_ = False
def init(aMap):
global map_
map_ = aMap
def robot_init():
global undergroundSensor
undergroundSensor = sensor(enums.Level.Underground, 1)
global greenActuator
greenActuator = actuator... | gpl-3.0 | 7,224,220,530,610,876,000 | 19.557692 | 63 | 0.703461 | false | 2.920765 | false | false | false |
3liz/QgisQuickOSMPlugin | quick_osm_processing/advanced/download_overpass.py | 1 | 3441 | """
/***************************************************************************
QuickOSM QGIS plugin
OSM Overpass API frontend
-------------------
begin : 2017-11-11
copyright : (C) 2017 by Etienne Trimaille
email ... | gpl-2.0 | 8,111,771,314,235,636,000 | 34.112245 | 78 | 0.503051 | false | 4.752762 | false | false | false |
anselg/handy-scripts | latency/plot_histogram.py | 1 | 4785 | #! /usr/bin/env python
##########################################################################
# Import modules
##########################################################################
import sys
import os
import re
import h5py as h5
import numpy as np
import pandas as pd
from matplotlib.backends.backend_pdf imp... | gpl-3.0 | 245,206,177,885,361,280 | 25.731844 | 84 | 0.491118 | false | 3.858871 | false | false | false |
mivade/qCamera | qcamera/camprops.py | 1 | 5831 | """Camera properties"""
import os.path
import json
# TODO: don't allow updating of properties that don't exist in the
# default self.props set in __init__
from . exceptions import CameraPropertiesError
PATH = os.path.split(os.path.abspath(__file__))[0]
class CameraProperties(object):
"""Class used for... | bsd-2-clause | 4,954,028,469,685,111,000 | 31.130682 | 79 | 0.513291 | false | 4.80709 | false | false | false |
osantana/quickstartup | tests/website/tests.py | 1 | 2616 | import pytest
from django.test import override_settings
from django.urls import NoReverseMatch
from quickstartup.qs_pages.models import Page
from quickstartup.qs_pages.urlresolver import page_reverse
from ..base import TEMPLATES, check_contains, check_in_html, check_template_used
pytestmark = pytest.mark.django_db
... | mit | -3,780,522,163,532,078,000 | 30.071429 | 96 | 0.708046 | false | 3.625 | true | false | false |
Gorah/py_accuracy_report | runreport.py | 1 | 34212 | #Script written for Python 2.7
#Dependencies to download: pyodbc (SQL Server Drivers)
import pyodbc
import datetime
import sys
import re
from contextlib import contextmanager
LATE_CASES = {}
@contextmanager
def get_connection():
"""
Connect to DB
"""
cnxn = pyodbc.connect('DRIVER={SQL SERVER};SER... | gpl-2.0 | -7,754,132,641,585,172,000 | 40.519417 | 123 | 0.512949 | false | 4.150431 | false | false | false |
closeio/socketshark | socketshark/utils.py | 1 | 3506 | import asyncio
import ssl
import time
from urllib.parse import urlsplit, urlunsplit
import aiohttp
from . import constants as c
def _get_rate_limit_wait(log, resp, opts):
"""
Returns the number of seconds we should wait given a 429 HTTP response and
HTTP options.
"""
max_wait = 3600
wait =... | mit | -1,969,585,453,855,249,400 | 32.711538 | 78 | 0.51911 | false | 4.393484 | false | false | false |
Architizer/Feedly | feedly/serializers/cassandra/aggregated_activity_serializer.py | 1 | 1244 | from feedly.activity import AggregatedActivity
from feedly.serializers.aggregated_activity_serializer import AggregatedActivitySerializer
import pickle
class CassandraAggregatedActivitySerializer(AggregatedActivitySerializer):
def __init__(self, model):
self.model = model
def dumps(self, aggregated)... | bsd-3-clause | -4,981,306,401,176,553,000 | 35.588235 | 90 | 0.67283 | false | 4.47482 | false | false | false |
Micutio/CAB_Simulations | SugarScape/ca/ss_cell.py | 1 | 1856 | """
Module containing the cell definition for the Sugarscape world.
"""
from cab.ca.cell import CellHex
__author__ = 'Michael Wagner'
__version__ = '1.0'
class WorldCell(CellHex):
def __init__(self, x, y, gc):
super().__init__(x, y, gc)
self.t_gen = None
self.sugar = 0
self.spice... | mit | 2,815,983,188,803,360,300 | 28.460317 | 72 | 0.542026 | false | 3.145763 | false | false | false |
michaellaier/pymor | src/pymortests/fixtures/discretization.py | 1 | 1548 | # This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
from itertools import product
import pytest
f... | bsd-2-clause | -357,065,425,509,571,400 | 37.7 | 120 | 0.72739 | false | 3.071429 | false | false | false |
HopeFOAM/HopeFOAM | ThirdParty-0.1/ParaView-5.0.1/Examples/Catalyst/PythonDolfinExample/simulation-catalyst-step2.py | 1 | 5483 | """This demo program solves the incompressible Navier-Stokes equations
on an L-shaped domain using Chorin's splitting method."""
# Copyright (C) 2010-2011 Anders Logg
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Publi... | gpl-3.0 | 4,628,511,660,132,762,000 | 26.552764 | 94 | 0.683932 | false | 3.012637 | false | false | false |
jimi-c/ansible | lib/ansible/modules/cloud/amazon/ec2_instance.py | 1 | 67394 | #!/usr/bin/python
# Copyright: Ansible Project
# 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_version': '1.1',
'status': ['preview'],
... | gpl-3.0 | 1,229,012,916,601,802,200 | 41.253292 | 160 | 0.574932 | false | 4.471174 | false | false | false |
mblayman/markwiki | markwiki/storage/fs/user.py | 1 | 4620 | # Copyright (c) 2016, Matt Layman
import json
import hashlib
import os
from markwiki.exceptions import UserStorageError
from markwiki.models.user import User
from markwiki.storage.user import UserStorage
class FileUserStorage(UserStorage):
'''A file system based user storage'''
def __init__(self, config):
... | bsd-2-clause | 3,899,588,193,903,150,000 | 35.377953 | 78 | 0.588528 | false | 3.719807 | false | false | false |
RUB-NDS/PRET | fuzzer.py | 1 | 1263 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
class fuzzer():
vol = ["", ".", "\\", "/", "file:///", "C:/"]
var = ["~", "$HOME"]
win = ["%WINDIR%", "%SYSTEMROOT%", "%HOMEPATH%", "%PROGRAMFILES%"]
smb = ["\\\\127.0.0.1\\"]
web = ["http://127.0.0.1/"] # "http://hacking-printers.net/log.me"
dir = ["..", "...... | gpl-2.0 | 3,648,293,130,167,252,500 | 41.1 | 69 | 0.475851 | false | 2.950935 | false | false | false |
oxyum/python-tlogger | tlogger/logger.py | 1 | 4372 | # -*- mode: python; coding: utf-8; -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
from .action_binder import ActionBinder
from .action_stack import action_stack
from .actions import Action
from .constants import ... | mit | 1,517,032,221,352,195,000 | 32.891473 | 79 | 0.623056 | false | 3.845207 | false | false | false |
pombreda/eggy | eggy/model/Model.py | 1 | 94271 | #!/usr/bin/env python
# eggy - a useful IDE
# Copyright (c) 2008 Mark Florisson
#
# 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 la... | gpl-3.0 | 8,457,566,645,242,356,000 | 34.175746 | 97 | 0.546923 | false | 4.733668 | false | false | false |
jasondunsmore/heat | heat/engine/update.py | 1 | 11487 | #
# 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
# ... | apache-2.0 | -289,319,108,590,892,350 | 40.172043 | 79 | 0.582746 | false | 4.419777 | false | false | false |
ray-project/ray | release/xgboost_tests/workloads/tune_32x4.py | 1 | 1835 | """Moderate Ray Tune run (32 trials, 4 actors).
This training run will start 32 Ray Tune trials, each starting 4 actors.
The cluster comprises 32 nodes.
Test owner: krfricke
Acceptance criteria: Should run through and report final results, as well
as the Ray Tune results table. No trials should error. All trials sho... | apache-2.0 | 452,494,953,157,767,740 | 24.486111 | 73 | 0.621253 | false | 3.410781 | false | false | false |
cdapio/website | scripts/generate-videos/main.py | 1 | 4086 | #!/usr/bin/python
# Copyright © 2015-2019 Cask Data, 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 appli... | apache-2.0 | 3,500,132,186,289,563,600 | 35.150442 | 204 | 0.682742 | false | 3.570804 | false | false | false |
morgangalpin/duckomatic | tests/utils/test_subscriber.py | 1 | 1612 | # -*- coding: utf-8 -*-
from pytest import raises
# The parametrize function is generated, so this doesn't work:
#
# from pytest.mark import parametrize
#
import pytest
parametrize = pytest.mark.parametrize
# from duckomatic import metadata
from duckomatic.utils.subscriber import (Subscriber, NoDataException)
c... | gpl-3.0 | -1,296,764,209,724,166,700 | 27.785714 | 69 | 0.620347 | false | 4.01995 | true | false | false |
scottwittenburg/web-hpc-manager | python/webserver/SecureRemoteLauncher.py | 1 | 5903 |
import paramiko
import select
import argparse
import sys
import threading
import uuid
import tempfile
import os
import getpass
from ForwardSshTunnel import ForwardSshTunnel
class SecureRemoteLauncher(object) :
#-------------------------------------------------------------------------
# SecureRemoteLauncher... | bsd-3-clause | 8,105,040,297,267,630,000 | 42.725926 | 308 | 0.509571 | false | 5.058269 | false | false | false |
RealTimeWeb/wikisite | MoinMoin/macro/OrphanedPages.py | 1 | 1487 | # -*- coding: iso-8859-1 -*-
"""
MoinMoin - OrphanedPages Macro
@copyright: 2001 Juergen Hermann <jh@web.de>
@license: GNU GPL, see COPYING for details.
"""
Dependencies = ["pages"]
def macro_OrphanedPages(macro):
_ = macro.request.getText
if macro.request.mode_getpagelinks: # prevent recursion
... | apache-2.0 | 3,464,022,933,834,179,600 | 28.156863 | 67 | 0.599193 | false | 3.755051 | false | false | false |
zepto/musio-python2 | examples/musioencode.py | 1 | 8751 | #!/usr/bin/env python2
# vim: sw=4:ts=4:sts=4:fdm=indent:fdl=0:
# -*- coding: UTF8 -*-
#
# Test the vorbis encoder.
# Copyright (C) 2013 Josiah Gordon <josiahg@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the... | gpl-3.0 | 5,520,849,006,102,449,000 | 40.278302 | 88 | 0.531368 | false | 4.225495 | false | false | false |
locke105/mc-watchdog | watchdog.py | 1 | 3354 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Mathew Odden <locke105@gmail.com>
#
# 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:... | apache-2.0 | -536,500,030,523,389,630 | 27.666667 | 77 | 0.596899 | false | 4.34456 | false | false | false |
lino-framework/tera | lino_tera/lib/invoicing/models.py | 1 | 1528 | # -*- coding: UTF-8 -*-
# Copyright 2016-2019 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""The :xfile:`models.py` module for :mod:`lino_voga.lib.invoicing`.
"""
from __future__ import unicode_literals
from lino_xl.lib.invoicing.models import *
from lino.api import... | bsd-2-clause | -857,604,811,259,924,500 | 23.645161 | 78 | 0.684555 | false | 3.395556 | false | false | false |
NORDUnet/opennsa | opennsa/config.py | 1 | 11031 | """
Configuration reader and defaults.
Author: Henrik Thostrup Jensen <htj@nordu.net>
Copyright: NORDUnet (2011)
"""
import os
import configparser
from opennsa import constants as cnt
# defaults
DEFAULT_CONFIG_FILE = '/etc/opennsa.conf'
DEFAULT_LOG_FILE = '/var/log/opennsa.log'
DEFAULT_TLS ... | bsd-3-clause | -2,675,240,323,979,953,000 | 30.42735 | 121 | 0.619164 | false | 3.516417 | true | false | false |
NoBodyCam/TftpPxeBootBareMetal | nova/network/api.py | 1 | 16995 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 | 8,339,819,754,926,506,000 | 40.756757 | 78 | 0.540983 | false | 4.474724 | false | false | false |
electrumalt/electrum-ixc | lib/blockchain.py | 1 | 20235 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@ecdsa.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... | gpl-3.0 | 960,714,723,618,996,600 | 31.584541 | 97 | 0.540252 | false | 3.792877 | false | false | false |
sebgoa/client-python | kubernetes/client/models/v1_container_state.py | 2 | 4601 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.7.4
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | -1,741,430,488,379,125,000 | 26.224852 | 105 | 0.562921 | false | 4.714139 | false | false | false |
manparvesh/manparvesh.github.io | oldsitejekyll/markdown_generator/professional.py | 1 | 3829 |
# coding: utf-8
# # Publications markdown generator for academicpages
#
# Takes a TSV of publications with metadata and converts them for use with [academicpages.github.io](academicpages.github.io). This is an interactive Jupyter notebook, with the core python code in publications.py. Run either from the `markdown_g... | mit | 1,995,675,648,712,673,500 | 34.453704 | 346 | 0.665709 | false | 3.26428 | false | false | false |
qxf2/qxf2-page-object-model | utils/excel_compare.py | 1 | 2729 | """
Qxf2 Services: Utility script to compare two excel files using openxl module
"""
import openpyxl
import os
class Excel_Compare():
def is_equal(self,xl_actual,xl_expected):
"Method to compare the Actual and Expected xl file"
result_flag = True
if not os.path.exists(xl_actual):
... | mit | 4,930,645,045,380,420,000 | 39.746269 | 154 | 0.585562 | false | 3.983942 | false | false | false |
HackatONG-ProgramAR/cordoba-aprende | aulalibre/aulavirtual/models.py | 1 | 4354 | # -*- coding: utf-8 -*-
from django.db import models
from educar import get_descripciones_ebooks
# Create your models here.
class Alumno(models.Model):
apellido = models.CharField(max_length=100)
nombre = models.CharField(max_length=100)
colegio = models.ForeignKey('Colegio')
curso = models.ForeignKe... | gpl-2.0 | 926,056,478,757,999,900 | 26.320755 | 79 | 0.617173 | false | 3.323642 | false | false | false |
zsjohny/jumpserver | apps/users/views/login.py | 1 | 6958 | # ~*~ coding: utf-8 ~*~
from __future__ import unicode_literals
from django.shortcuts import render
from django.views.generic import RedirectView
from django.core.files.storage import default_storage
from django.shortcuts import reverse, redirect
from django.utils.translation import ugettext as _
from django.views.gen... | gpl-2.0 | 1,119,947,825,107,735,700 | 35.621053 | 83 | 0.624174 | false | 4.07377 | false | false | false |
centaurialpha/ninja-ide | ninja_ide/core/file_handling/file_manager.py | 1 | 10239 | # -*- 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... | gpl-3.0 | 8,059,544,523,464,693,000 | 28.938596 | 78 | 0.64518 | false | 3.876941 | false | false | false |
pkimber/checkout | checkout/migrations/0002_auto_20150625_1159.py | 1 | 1640 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def _init_state(model, name, slug):
try:
model.objects.get(slug=slug)
except model.DoesNotExist:
instance = model(**dict(name=name, slug=slug))
instance.save()
instance.ful... | apache-2.0 | -5,201,387,871,116,438,000 | 28.818182 | 75 | 0.643902 | false | 3.636364 | false | false | false |
dials/dials | algorithms/background/gmodel/algorithm.py | 1 | 2792 | import pickle
class ModelCache:
"""
A class to cache the model
"""
def __init__(self):
"""
Create a model dictionary
"""
self.model = dict()
def get(self, name):
"""
Get the model
"""
if name is None:
raise RuntimeError(... | bsd-3-clause | -6,660,291,910,596,019,000 | 26.372549 | 81 | 0.59563 | false | 4.584565 | false | false | false |
solackerman/sqlalchemy-redshift | sqlalchemy_redshift/dialect.py | 1 | 30445 | import re
from collections import defaultdict
import pkg_resources
import sqlalchemy as sa
from sqlalchemy import Column, exc, inspect, schema
from sqlalchemy.dialects.postgresql.base import PGCompiler, PGDDLCompiler
from sqlalchemy.dialects.postgresql.psycopg2 import PGDialect_psycopg2
from sqlalchemy.engine import r... | mit | 1,824,985,647,472,262,000 | 35.461078 | 79 | 0.570636 | false | 4.021797 | false | false | false |
wgwoods/blivet | blivet/flags.py | 1 | 3889 | # flags.py
#
# Copyright (C) 2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that... | gpl-2.0 | -8,068,387,037,196,000,000 | 31.957627 | 79 | 0.646953 | false | 3.846686 | false | false | false |
beaker-project/beaker | Server/bkr/server/model/openstack.py | 1 | 1285 |
# 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.
from sqlalchemy.schema import Column, ForeignKey
from sqlalchemy.types... | gpl-2.0 | 1,555,254,236,307,001,600 | 46.592593 | 84 | 0.768093 | false | 4.158576 | false | false | false |
talset/monitoring-plugins | disk/check_disk.py | 1 | 4769 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Author: Florian Lambert <flambert@redhat.com>
#
# 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... | apache-2.0 | -8,505,828,684,046,612,000 | 32.118056 | 135 | 0.563011 | false | 3.915435 | false | false | false |
feend78/evennia | evennia/typeclasses/migrations/0008_lock_and_perm_rename.py | 2 | 1717 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.11 on 2017-01-25 22:30
from __future__ import unicode_literals
import re
from django.db import migrations
def update_perms_and_locks(apps, schema_editor):
# update all permissions
Tag = apps.get_model('typeclasses', 'Tag')
perm_map = {"guests": "guest", ... | bsd-3-clause | -2,164,045,350,960,106,800 | 33.34 | 99 | 0.585323 | false | 3.511247 | false | false | false |
beeryardtech/scripts | python/dk_test/scenarios/scenario_common.py | 2 | 4295 |
__author__ = "Travis Goldie"
__email__ = "test_automation@us.sios.com"
__date__ = "11/14/12"
__copyright__ = "(c) SIOS Technology Corp 2012"
#For unittesting
import os
import sys
from time import sleep
sys.path.insert(0, r"C:\Program Files\dk_test\libs")
from dkconfig import dkconfig
from exect... | apache-2.0 | 98,617,112,899,321,780 | 26.071895 | 74 | 0.677299 | false | 3.460919 | true | false | false |
vergecurrency/VERGE | test/functional/wallet_txn_doublespend.py | 1 | 5648 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there is a double-spend conflict."""
from decimal import Decimal... | mit | -443,130,276,645,554,200 | 41.787879 | 111 | 0.633853 | false | 3.677083 | true | false | false |
NavarraBiomed/clips | clips_app/management/commands/test.py | 1 | 12162 | from django.core.management.base import BaseCommand, CommandError
from clips_app.models import Case
import django
import csv
def parse_num(value):
if value.isdigit():
return int(value)
else:
return None;
def parse_date(value):
pieces = value.split("/")
try:
return (pieces[2]+... | gpl-2.0 | 2,221,978,827,972,849,400 | 49.443983 | 122 | 0.492185 | false | 3.850491 | false | false | false |
yoseforb/lollypop | src/sync_mtp.py | 1 | 12625 | #!/usr/bin/python
# Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.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 opti... | gpl-3.0 | 2,710,664,522,675,087,400 | 38.952532 | 77 | 0.493228 | false | 4.099026 | false | false | false |
NLeSC/pointcloud-benchmark | python/pointcloud/postgres/blocks/LoaderOrdered.py | 1 | 2424 | #!/usr/bin/env python
################################################################################
# Created by Oscar Martinez #
# o.rubi@esciencecenter.nl #
#######################################################... | apache-2.0 | 3,891,968,732,836,190,000 | 49.5 | 154 | 0.616337 | false | 4.351885 | false | false | false |
rajalokan/glance | glance/db/sqlalchemy/alembic_migrations/versions/ocata_expand01_add_visibility.py | 1 | 5764 | # 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... | apache-2.0 | 7,434,511,919,462,939,000 | 37.172185 | 78 | 0.637058 | false | 3.897228 | false | false | false |
ahirner/TabulaRazr-OS | data_query.py | 1 | 6364 | from datetime import date
import dateutil.parser as date_parser
from backend import config
from fuzzywuzzy import fuzz
from itertools import product
# Cascades:
# 1) case sensitive partial ratio on character level with penalty
# 2) case insensitive partial ratio on character level with penalty
# 3) token sorted cas... | agpl-3.0 | -6,371,302,341,923,677,000 | 38.042945 | 127 | 0.575896 | false | 3.659574 | false | false | false |
dan-cristian/haiot | presence/__init__.py | 1 | 4256 | from main.logger_helper import L
from pydispatch import dispatcher
from main import thread_pool, sqlitedb
if sqlitedb:
from storage.sqalc import models
from common import Constant
from presence import presence_bt
from presence import presence_wifi
from storage.model import m
__author__ = 'Dan Cristian<dan.cristian... | gpl-2.0 | -5,611,527,734,522,979,000 | 41.989899 | 107 | 0.626175 | false | 3.710549 | false | false | false |
pombredanne/quirinus | data/codecs/.base/rename.py | 1 | 1084 | import os
import re
import codecs
import struct
paths = [p for p in os.listdir(".") if not(p.endswith(".ct"))]
for src in os.listdir("."):
if (src.endswith(".py")):
continue
dest = src.replace(".cpp", ".ct")
with codecs.open(src, "rb") as stream:
data = stream.read()
pattern = re.compile(b"\\s*(0x[0-9A... | lgpl-3.0 | 3,352,182,879,483,439,000 | 24.209302 | 75 | 0.558118 | false | 2.890667 | false | false | false |
sephii/django | django/contrib/contenttypes/models.py | 1 | 7903 | from __future__ import unicode_literals
from django.apps import apps
from django.db import models
from django.db.utils import OperationalError, ProgrammingError
from django.utils.translation import ugettext_lazy as _
from django.utils.encoding import force_text
from django.utils.encoding import python_2_unicode_compat... | bsd-3-clause | -7,295,056,630,378,533,000 | 38.515 | 105 | 0.594205 | false | 4.157286 | false | false | false |
OpenCV-Python-Tutorials/Filter | filter.py | 1 | 1678 | import cv2
img_name = raw_input("Enter the image filename:")
img = cv2.imread(img_name,0)
def menu():
print "Select filter type:"
print "Press '1' for Low Pass filter."
print "Press '2' for High Pass filter."
print "Press '3' for Band Pass filter."
print "Press '4' for Notch filter."
print "Pres... | mit | 1,386,468,332,461,299,000 | 24.815385 | 59 | 0.558999 | false | 3.107407 | false | false | false |
mldbai/mldb | container_files/init/mldb_logger.py | 1 | 2869 | #!/usr/bin/env python
# Copyright mldb.ai inc 2016
# Author: Jean Raby <jean@mldb.ai>
# TODO:
# - configure logging so that access/error logs go somewhere else than stderr
import fcntl
import functools
import grp
import jinja2
import os
import pwd
import pytz
import sys
import time
import tornado.web
from tornado.... | apache-2.0 | 2,752,010,964,470,450,000 | 24.389381 | 89 | 0.654932 | false | 3.149286 | false | false | false |
davibe/pygobject | tests/test_repository.py | 1 | 17918 | # -*- Mode: Python; py-indent-offset: 4 -*-
# vim: tabstop=4 shiftwidth=4 expandtab
#
# Copyright (C) 2013 Simon Feltman <sfeltman@gnome.org>
#
# test_repository.py: Test for the GIRepository module
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General... | lgpl-2.1 | -2,148,817,928,267,952,600 | 49.331461 | 105 | 0.683726 | false | 3.723608 | true | false | false |
Dolyphin/FSI_1D | initialize_data_structure.py | 1 | 1765 | # % ---------------------------------
# % filename: initialize_data_structure.py
# %
# % we set the physical data of the structure.
# %============================================================
# % physical data of the structure
# %===========================================================
import numpy as np
... | gpl-3.0 | 3,326,060,273,394,111,000 | 35.553191 | 81 | 0.504816 | false | 3.006814 | false | false | false |
dhellmann/athensdocket | docket/server/browse.py | 1 | 2993 | import calendar
import datetime
from .app import app, mongo
from .filters import date
from .nav import set_navbar_active
from flask import render_template, g
from flask.ext.pymongo import ASCENDING
@app.route('/browse')
@set_navbar_active
def browse():
locations = sorted(mongo.db.cases.distinct('location'))
... | apache-2.0 | 2,354,671,943,219,793,000 | 36.4125 | 70 | 0.495155 | false | 4.31268 | false | false | false |
sprymix/importkit | importkit/utils/adapter.py | 1 | 4422 | ##
# Copyright (c) 2008-2013 Sprymix Inc.
# All rights reserved.
#
# See LICENSE for details.
##
class AdapterError(Exception):
pass
class Adapter(type):
adapters = {}
instance_adapters = {}
def __new__(mcls, name, bases, clsdict, *, adapts=None,
adapts_instances_of=None, pure... | mit | -4,098,590,764,919,314,400 | 28.878378 | 79 | 0.558345 | false | 4.211429 | false | false | false |
elki-project/elki | addons/joglvis/src-manual/build.py | 1 | 1307 | #!/usr/bin/python
from lxml import etree
import gzip, re, copy, tempfile, subprocess, os
SVG_NAMESPACE="http://www.w3.org/2000/svg"
INKSCAPE_NAMESPACE="http://www.inkscape.org/namespaces/inkscape"
_safe = re.compile("^[A-Za-z]+$")
sizes=[64,32,16,8,4]
tree = etree.parse(gzip.open("Markers.svgz"))
labels = etree.ETX... | agpl-3.0 | -8,183,996,135,032,793,000 | 29.395349 | 113 | 0.644989 | false | 2.552734 | false | false | false |
bonus85/tilt-editor | tilt_hack.py | 1 | 13660 | #!/usr/bin/env python
"""
Analyze and edit .sketch files (internal in .tilt)
Also supports generating .sketch files from json
@author: Sindre Tosse
"""
import struct
import json
import pdb
import numpy as np
try:
from stl import mesh
STL_SUPPORTED = True
STL_COLOR = (1., 0., 0., 1.)
STL_BRUSH_SIZE = 0.... | gpl-3.0 | 1,189,793,421,834,732,800 | 38.252874 | 91 | 0.527965 | false | 3.774523 | false | false | false |
Micronaet/micronaet-order | auto_order_nomail_check/auto.py | 1 | 3871 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 | 5,362,938,094,823,373,000 | 35.518868 | 87 | 0.54172 | false | 4.511655 | false | false | false |
cgchemlab/chemlab | tools/convert_gromacs2espp.py | 1 | 4036 | #!/usr/bin/env python
# Copyright (C) 2012,2013,2015(H),2016
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or mo... | gpl-3.0 | 4,729,603,492,576,089,000 | 31.031746 | 87 | 0.582755 | false | 3.500434 | false | false | false |
FAForever/api | api/leaderboards.py | 1 | 8221 | from faf.api import LeaderboardSchema
from faf.api import LeaderboardStatsSchema
from flask import request
from pymysql.cursors import DictCursor
from api import app
from api.error import ApiException, ErrorCode
from api.error import Error
from api.query_commons import fetch_data
from faf import db
MAX_PAGE_SIZE = 50... | gpl-3.0 | -7,423,851,992,924,885,000 | 28.256228 | 129 | 0.505291 | false | 3.933493 | false | false | false |
johncadigan/CategoryGenerator | db_hyponym_trees.py | 1 | 2540 | import os
CURRENT_DIR = os.path.dirname(__file__)
###Default Settings
DATA_DIR = 'data'
COUNTS_FILE = 'word-totals.txt'
WHITE_LIST = 'whitelist.csv'
DEFAULT_LIMIT = 50000
DEFAULT_DEPTH = 5
DEFAULT_SYNSETS = 3
##### DB Dependent variables
MYSQL_URL = 'mysql://user:password@host/database?charset=utf8'
from sqlalchemy ... | mit | -2,648,622,299,959,671,000 | 30.75 | 127 | 0.720079 | false | 3.211125 | false | false | false |
CTR-BFX/CambridgeHackathon | rRNA_MT_count.py | 1 | 4956 | #!/usr/bin/python
# Malwina Prater, mn367@cam.ac.uk, 2017, Copyright
# Centre for Trophoblast Research, University of Cambridge
#
# Script version: v01.
#
# Script to calculate the percent of transcripts mapping to rRNA
#
# INPUTS :
# 1. HTseq_counts file
# 2. Original reference transcriptome alignned to
#
# USAGE ... | gpl-3.0 | -3,703,518,415,631,307,300 | 32.04 | 180 | 0.583535 | false | 3.068731 | false | false | false |
codeofdusk/ProjectMagenta | src/update/update.py | 1 | 5042 | from logging import getLogger
logger = getLogger('update')
import contextlib
import io
import os
import platform
import requests
import tempfile
from wxUI import commonMessageDialogs
import widgetUtils
import webbrowser
try:
import czipfile as zipfile
except ImportError:
import zipfile
from platform_utils import pa... | gpl-2.0 | 3,068,892,833,140,432,000 | 39.344 | 211 | 0.754859 | false | 3.656273 | false | false | false |
txomon/SpockBot | spock/plugins/helpers/physics.py | 1 | 6091 | """
PhysicsPlugin is planned to provide vectors and tracking necessary to implement
SMP-compliant client-side physics for entities. Primarirly this will be used to
keep update client position for gravity/knockback/water-flow etc. But it should
also eventually provide functions to track other entities affected by SMP
ph... | mit | 4,147,684,726,026,790,000 | 35.915152 | 79 | 0.602036 | false | 3.212553 | false | false | false |
jhpyle/docassemble | docassemble_base/docassemble/base/mako/doc/build/conf.py | 1 | 9486 | # -*- coding: utf-8 -*-
#
# Mako documentation build configuration file
#
# 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 configuration values have a default; values that are commented ... | mit | -6,735,364,583,275,619,000 | 31.047297 | 80 | 0.700822 | false | 3.645657 | true | false | false |
Skeletrox/usb-backend-pinut | file_upload/fileupload/USBFinder.py | 1 | 5689 | import os, inspect, json, re #needed for os files
from django.conf import settings
from glob import glob #Needed for directories
import subprocess ... | apache-2.0 | -8,428,731,860,846,621,000 | 49.794643 | 198 | 0.465108 | false | 4.780672 | false | false | false |
pyfa-org/eos | eos/eve_obj/buff_template.py | 1 | 1741 | # ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... | lgpl-3.0 | -2,537,342,386,661,229,600 | 32.480769 | 80 | 0.593912 | false | 3.930023 | false | false | false |
fracpete/wekamooc | moredataminingwithweka/class-2.1.py | 1 | 2401 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | 7,711,363,147,533,410,000 | 36.515625 | 119 | 0.669304 | false | 3.551775 | false | false | false |
ntduong/ML | DecisionTree/treepredict.py | 1 | 6510 | '''
Created on Feb 21, 2013
@author: Administrator
'''
from collections import defaultdict
from math import log
def readDataFromFile(filename='decision_tree_example.txt'):
with open(filename, 'rt') as f:
data = []
for line in f:
data.append(line.strip().split('\t'))
return ... | mit | 9,111,104,916,089,302,000 | 29.85782 | 111 | 0.541782 | false | 3.43717 | false | false | false |
eknowles/CV | app.py | 1 | 2096 | import os
from flask import Flask, render_template, send_from_directory
from calendar_parser import CalendarParser
# initialization
app = Flask(__name__)
app.config.update(
DEBUG=True,
)
events = {}
# settings
ics_url = "https://www.google.com/calendar/ical/88kil28s7t686h1p5aoem6ui24%40group.calendar.google.com/pub... | gpl-2.0 | -1,447,502,892,584,952,000 | 22.043956 | 120 | 0.68416 | false | 2.855586 | false | false | false |
hzlf/openbroadcast | website/djangorestframework/tests/views.py | 1 | 1564 | from django.conf.urls.defaults import patterns, url
from django.test import TestCase
from django.test import Client
urlpatterns = patterns('djangorestframework.utils.staticviews',
url(r'^robots.txt$', 'deny_robots'),
url(r'^favicon.ico$', 'favicon'),
url(r'^accounts/login$', 'api_login'),
url(r'^accou... | gpl-3.0 | 8,763,692,571,406,726,000 | 35.372093 | 78 | 0.658568 | false | 3.919799 | true | false | false |
iLoop2/ResInsight | ThirdParty/Ert/devel/python/python/ert_gui/viewer/slice_viewer.py | 1 | 8469 | import os
from OpenGL.GL import *
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QApplication, QMainWindow, QDockWidget
import sys
import traceback
from ert.ecl import EclTypeEnum, EclKW, EclGrid
from ert.ecl.faults import FaultCollection
from ert.geo.xyz_io import XYZIo
from ert_gui.viewer import Texture3D, Bou... | gpl-3.0 | 4,388,381,655,475,250,700 | 33.149194 | 154 | 0.627465 | false | 3.26107 | false | false | false |
blade2005/dosage | scripts/mklanguages.py | 1 | 1450 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
'''update languages.py from pycountry'''
from __future__ import absolute_import, division, print_function
import os
import... | mit | -1,067,473,444,864,903,400 | 28.591837 | 86 | 0.631034 | false | 3.215078 | false | false | false |
imeteora/cocos2d-x-3.x-Qt | tools/jenkins-scripts/watchdog.py | 1 | 1716 | import jenkinsapi
from jenkinsapi.jenkins import Jenkins
import sys
import time
import os
#check & kill dead buid
def build_time(_job,_threshold):
#get jenkins-job-watchdog-threshold
#Get last build running
build = _job.get_last_build()
running = build.is_running()
print 'build_job:',_job,'running:... | gpl-2.0 | 4,595,123,461,525,334,500 | 26.677419 | 73 | 0.598485 | false | 3.538144 | false | false | false |
gviejo/ThalamusPhysio | python/main_pop_corr_nucleus.py | 1 | 7266 |
import numpy as np
import pandas as pd
# from matplotlib.pyplot import plot,show,draw
import scipy.io
from functions import *
import _pickle as cPickle
import time
import os, sys
import ipyparallel
import neuroseries as nts
import scipy.stats
from pylab import *
from multiprocessing import Pool
data_directory = '/mn... | gpl-3.0 | 3,322,972,831,613,027,300 | 39.366667 | 126 | 0.579136 | false | 2.895974 | false | false | false |
timlau/FedoraReview | src/FedoraReview/helpers_mixin.py | 1 | 5574 | # -*- 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 ... | gpl-2.0 | -8,841,794,272,914,089,000 | 34.503185 | 76 | 0.577861 | false | 4.101545 | false | false | false |
cuauv/software | visualizer/configure.py | 1 | 1691 | #!/usr/bin/env python3
from build import ninja_common
build = ninja_common.Build("visualizer")
# Only build if all dependencies are present.
# TODO Create a better means of dependency checking.
import os
sources = ['gl_utils.cpp',
'graphics_engine.cpp',
'material.cpp',
'obj_build... | bsd-3-clause | -7,491,380,834,800,671,000 | 33.510204 | 83 | 0.603193 | false | 3.315686 | false | false | false |
Clarity-89/clarityv2 | src/clarityv2/portfolio/migrations/0001_initial.py | 1 | 1263 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.6 on 2018-02-27 19:20
from __future__ import unicode_literals
import autoslug.fields
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
... | mit | -5,629,408,718,103,012,000 | 36.147059 | 128 | 0.578781 | false | 4.416084 | false | false | false |
reedessick/pedagogy | coherentLikelihood/coherentLikelihood.py | 1 | 23070 | #!/usr/bin/python
usage = "coherentLikelihood.py [--options]"
description = "builds figures to demonstrate a heuristic burst search"
author = "Reed Essick (reed.essick@ligo.org)"
#-------------------------------------------------
import waveforms
import numpy as np
import subprocess as sp
import matplotlib
matplot... | mit | -2,642,448,682,214,172,000 | 35.103286 | 299 | 0.650975 | false | 2.560204 | false | false | false |
Gorbagzog/StageIAP | HorizonPhotometricNumpy.py | 1 | 82759 | #!/usr/bin/env python3
# -*-coding:Utf-8 -*
"""H-AGN LightCone photometric Catalog.
Load catalog and make a match with the true lightcone catalog.
"""
import numpy as np
import matplotlib.pyplot as plt
import pyfits
# from scipy.spatial import cKDTree
# from timeit import default_timer as timer
import numpy.lib.rec... | gpl-3.0 | -2,726,468,782,197,244,400 | 39.112942 | 99 | 0.574976 | false | 2.674023 | false | false | false |
gdietz/OpenMEE | imputation/ui_mice_parameters_page.py | 1 | 5170 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'mice_parameters_page.ui'
#
# Created: Fri Mar 7 09:30:08 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
... | gpl-3.0 | 7,559,098,870,301,518,000 | 51.755102 | 103 | 0.706576 | false | 3.751814 | false | false | false |
RenolY2/battalion-tools | bw_archive/bw_archive_base.py | 1 | 3311 | import io
import struct
from array import array
from rxet.helper import read_uint32
class BWResource(object):
def __init__(self, name, size, memview):
self.name = name
self._size = size
self._data = memview
self._fileobj = io.BytesIO(self._data)
@property
def fileobj(self... | mit | 4,123,272,925,999,109,000 | 26.363636 | 97 | 0.595892 | false | 3.724409 | false | false | false |
Rfam/rfam-production | scripts/support/mirnas/auto_commit.py | 1 | 5214 | import os
import sys
import argparse
import subprocess
import json
import time
from datetime import date
from subprocess import Popen, PIPE
search_dirs = ["/hps/nobackup/production/xfam/rfam/RELEASES/14.3/miRNA_relabelled/batch1_chunk1_searches",
"/hps/nobackup/production/xfam/rfam/RELEASES/14.3/miRNA_r... | apache-2.0 | 9,119,662,882,263,894,000 | 29.313953 | 135 | 0.561949 | false | 3.314685 | false | false | false |
mscuthbert/abjad | abjad/tools/documentationtools/ReSTAutosummaryDirective.py | 1 | 2421 | # -*- encoding: utf-8 -*-
from abjad.tools import datastructuretools
from abjad.tools.documentationtools.ReSTDirective import ReSTDirective
class ReSTAutosummaryDirective(ReSTDirective):
r'''A ReST Autosummary directive.
::
>>> toc = documentationtools.ReSTAutosummaryDirective()
>>> for item... | gpl-3.0 | 665,987,143,855,517,400 | 25.043011 | 78 | 0.518381 | false | 4.5 | false | false | false |
apdavison/elephant | elephant/test/test_spike_train_dissimilarity.py | 1 | 29313 | # -*- coding: utf-8 -*-
"""
Tests for the spike train dissimilarity measures module.
:copyright: Copyright 2016 by the Elephant team, see `doc/authors.rst`.
:license: Modified BSD, see LICENSE.txt for details.
"""
import unittest
from neo import SpikeTrain
import numpy as np
from numpy.testing import assert_array_equ... | bsd-3-clause | -2,688,211,261,997,703,700 | 55.371154 | 79 | 0.495821 | false | 3.430026 | true | false | false |
icsnju/nap-core | nap_rest/orchestration/test/createFromTable.py | 1 | 1102 | from orchestration.nap_api.project_create import create_project_from_table
table = []
t = {}
t['name'] = 'master'
t['cpu_shares'] = '1024'
t['mem_limit'] = '32m'
t['command'] = '/usr/sbin/sshd -D'
t['image'] = 'docker.iwanna.xyz:5000/hmonkey/mpi:v1'
t['volumes'] = [{'container_path': '/data', 'host_path': '/va', 'mode... | apache-2.0 | -3,719,459,185,290,209,000 | 44.916667 | 151 | 0.596189 | false | 2.562791 | false | true | false |
simphony/simphony-common | simphony/io/tests/test_h5_cuds.py | 1 | 9192 | import unittest
import os
from contextlib import closing
import shutil
import tempfile
import tables
from simphony.core import CUBA
from simphony.core.data_container import DataContainer
from simphony.io.h5_cuds import H5CUDS
from simphony.io.h5_mesh import H5Mesh
from simphony.io.h5_particles import H5Particles
from ... | bsd-2-clause | 6,869,646,592,674,389,000 | 32.794118 | 79 | 0.619017 | false | 3.633202 | true | false | false |
lindenb/bedtools2 | docs/conf.py | 2 | 8228 | # -*- coding: utf-8 -*-
#
# 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 configuration values have a default; values that are commented out
# serve to show the default.
import sys, os... | gpl-2.0 | 4,217,841,412,627,542,500 | 32.311741 | 88 | 0.69227 | false | 3.689686 | false | false | false |
jbudynk/sherpa | sherpa/logposterior.py | 1 | 3090 | #
# Copyright (C) 2009 Smithsonian Astrophysical Observatory
#
#
# 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.
... | gpl-3.0 | 2,770,907,433,389,379,000 | 31.87234 | 76 | 0.609385 | false | 3.867334 | false | false | false |
jimstorch/python-read-filepro | read_filepro/fpdatabase.py | 1 | 4921 | #------------------------------------------------------------------------------
# read_filepro/database.py
# Copyright 2010 Jim Storch
# 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 ... | apache-2.0 | 5,153,057,967,458,974,000 | 32.705479 | 79 | 0.58037 | false | 4.253241 | false | false | false |
sunu/oppia-test-2 | apps/image/tests.py | 1 | 1768 | # coding: utf-8
#
# Copyright 2013 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 ... | apache-2.0 | 6,075,939,482,199,800,000 | 33.666667 | 74 | 0.671946 | false | 4.027335 | true | false | false |
JohnReid/biopsy | Python/gapped_pssms/score_pssms.py | 1 | 5645 | #
# Copyright John Reid 2008
#
"""
Code to rank PSSMs by "interesting-ness".
Information content.
Low-order predictability.
Number of sequences with sites.
"""
from gapped_pssms.parse_gapped_format import parse_models
from itertools import imap
from gapped_pssms.pssm_score import *
from cookbook import DictOfLists
i... | mit | -1,598,437,059,165,579,800 | 33.631902 | 121 | 0.586005 | false | 3.077972 | false | false | false |
lutianming/leetcode | reverse_nodes_in_k_group.py | 1 | 1097 | from leetcode import ListNode
class Solution:
# @param head, a ListNode
# @param k, an integer
# @return a ListNode
def reverseKGroup(self, head, k):
if not head or not head.next or k==1:
return head
newhead = None
head = head
tail = head
prev = Non... | mit | -468,447,601,640,617,300 | 22.340426 | 51 | 0.44485 | false | 4.318898 | false | false | false |
ChampionZP/DeepLearningImplementations | Colorful/src/utils/general_utils.py | 1 | 4257 | import os
import numpy as np
from skimage import color
import matplotlib.pylab as plt
def remove_files(files):
"""
Remove files from disk
args: files (str or list) remove all files in 'files'
"""
if isinstance(files, (list, tuple)):
for f in files:
if os.path.isfile(os.path.e... | mit | -6,095,970,284,944,061,000 | 34.181818 | 108 | 0.603477 | false | 2.830452 | false | false | false |
visionegg/visionegg | VisionEgg/win32_maxpriority.py | 1 | 2142 | # This file was created automatically by SWIG.
# Don't modify this file, modify the SWIG interface instead.
# This file is compatible with both classic and new-style classes.
import _win32_maxpriority
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "this"):
if isinstance(val... | lgpl-2.1 | 1,918,292,327,711,323,000 | 38.666667 | 84 | 0.737162 | false | 3.449275 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.