repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
pozytywnie/webapp-health-monitor | webapp_health_monitor/management/commands/verify.py | 1 | 1307 | import importlib
import sys
from django.apps import apps
from django.core.management.base import BaseCommand
from webapp_health_monitor.verification_suit import VerificationSuit
class Command(BaseCommand):
SUBMODULE_NAME = 'verificators'
def add_arguments(self, parser):
parser.add_argument('--tag', ... | mit | -4,889,517,402,081,881,000 | 35.305556 | 88 | 0.625096 | false |
cbears/octoform | test/forms/studentaid.py | 1 | 4935 | # -*- coding: utf-8 -*-
from django.core.management import setup_environ
import forms.form_models.bfsql as bfsql
import forms.form_models.bform as bforms
from forms.form_models.bfbdb import *
bf = bforms.BerkeleyForm()
bf.baseFont='palatino'
bf.theme=('demos',)
"""
Don't just write documents, create an information ... | gpl-3.0 | 6,844,074,033,647,561,000 | 34.76087 | 198 | 0.599189 | false |
MeGotsThis/BotGotsThis | bot/_config.py | 1 | 7551 | import configparser
import os
import aiofiles
from typing import Dict, List, Optional, Union # noqa: F401
class BotConfig:
def __init__(self) -> None:
self.development: bool = False
self.botnick: str = ''
self.password: str = ''
self.owner: str = ''
self.awsServer: str... | gpl-3.0 | 39,929,747,576,081,740 | 36.197044 | 73 | 0.521388 | false |
michalfita/nis2ldap | tests/test_ldap_group.py | 1 | 4491 | # nis2ldap - Smarter NIS to LDAP synchronization tool
# Copyright (C) 2015 Michal Fita
#
# 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) an... | gpl-3.0 | 1,420,281,667,251,838,500 | 35.217742 | 99 | 0.670452 | false |
fastcoinproject/fastcoin | contrib/spendfrom/spendfrom.py | 1 | 10059 | #!/usr/bin/env python
#
# Use the raw transactions API to spend bitcoins received on particular addresses,
# and send any change back to that same address.
#
# Example usage:
# spendfrom.py # Lists available funds
# spendfrom.py --from=ADDRESS --to=ADDRESS --amount=11.00
#
# Assumes it will talk to a bitcoind or Bit... | mit | 3,699,015,106,062,077,400 | 36.394052 | 111 | 0.619445 | false |
andrei987/services | src/releng_tooltool/releng_tooltool/aws.py | 1 | 4871 | # 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/.
from __future__ import absolute_import
import boto
import boto.s3
import boto.sqs
import importlib
import json
from bac... | mpl-2.0 | -1,744,845,335,647,182,600 | 33.062937 | 79 | 0.571546 | false |
MoRgUiJu/morguiju.repo | plugin.video.pelisalacarta/channels/pelisadicto.py | 1 | 10054 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# pelisalacarta - XBMC Plugin
# Canal para cuevana
# http://blog.tvalacarta.info/plugin-xbmc/pelisalacarta/
#------------------------------------------------------------
import re
import sys
import urlparse
from core import config
f... | gpl-2.0 | 6,785,634,815,207,113,000 | 57.22093 | 579 | 0.67156 | false |
Inspq/ansible | lib/ansible/plugins/action/fetch.py | 1 | 8462 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | -1,681,434,668,187,707,000 | 44.010638 | 152 | 0.589931 | false |
MikeAmy/django-webtest | setup.py | 1 | 1559 | #!/usr/bin/env python
from distutils.core import setup
for cmd in ('egg_info', 'develop'):
import sys
if cmd in sys.argv:
from setuptools import setup
version='1.7.4'
setup(
name='django-webtest',
version=version,
author='Mikhail Korobov',
author_email='kmike84@gmail.com',
packag... | mit | 169,190,286,577,443,620 | 33.644444 | 87 | 0.610006 | false |
polyaxon/polyaxon | sdks/python/http_client/v1/polyaxon_sdk/models/v1_compiled_operation.py | 1 | 21129 | #!/usr/bin/python
#
# Copyright 2018-2021 Polyaxon, 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 ... | apache-2.0 | 1,406,717,811,419,982,800 | 25.847522 | 439 | 0.582328 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/troubleshooting_details.py | 1 | 1830 | # 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 ... | mit | 1,079,771,110,420,915,600 | 39.666667 | 108 | 0.610929 | false |
Mathew/psychoanalysis | psychoanalysis/apps/pa/aggregation.py | 1 | 6791 | from south.db import db
from south.v2 import SchemaMigration
from django.db import models
from itertools import chain
def make_query(query_dict):
query_type = 0
if 'result type' in query_dict:
if query_dict['result type'] == 'percent':
query_type = 1
data_set = 0
if 'data set' in ... | mit | -728,023,969,507,841,200 | 38.254335 | 206 | 0.566485 | false |
chitr/neutron | neutron/cmd/netns_cleanup.py | 1 | 6192 | # Copyright (c) 2012 OpenStack Foundation.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless... | apache-2.0 | -7,532,679,411,237,745,000 | 32.652174 | 79 | 0.66053 | false |
kernelci/lava-ci-staging | lib/test_configs.py | 1 | 15454 | # Copyright (C) 2018 Collabora Limited
# Author: Guillaume Tucker <guillaume.tucker@collabora.com>
#
# This module is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (... | lgpl-2.1 | -5,836,779,994,696,674,000 | 32.092077 | 86 | 0.603015 | false |
gregpuzzles1/Sandbox | Example Programs/Ch_07_Student_Files/pilimages.py | 1 | 4982 | """
images.py
This module, writtn by Kenneth Lambert, supports simple image processing.
The Image class represents either an image loaded from a GIF file or a
blank image.
To instantiate an image from a file, enter
image = Image(aGifFileName)
To instantiate a blank image, enter
image = Ima... | gpl-3.0 | -1,244,779,245,137,367,800 | 27.965116 | 76 | 0.540145 | false |
suqinhuang/virt-test | qemu/tests/block_mirror.py | 1 | 5705 | import re, os, logging, time
from autotest.client.shared import utils, error
from virttest import qemu_monitor, storage, env_process, data_dir, utils_misc
@error.context_aware
def run_block_mirror(test, params, env):
"""
Test block mirroring functionality
Test consists of two subtests:
1) Mirror the... | gpl-2.0 | 8,536,157,792,847,916,000 | 36.781457 | 83 | 0.568975 | false |
ernstblecha/gen.sh | waitforstring.py | 1 | 1698 | #!/usr/bin/python3 -u
# using -u here to make stdin unbuffered
# This file is part of gen.sh.
#
# gen.sh 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) ... | gpl-3.0 | -159,925,529,795,135,940 | 29.321429 | 77 | 0.691402 | false |
klmitch/nova | nova/tests/functional/notification_sample_tests/test_compute_task.py | 1 | 5997 | # 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 | 3,927,317,950,531,222,000 | 46.220472 | 78 | 0.591462 | false |
Charley-fan/metaArray | metaFunc.py | 1 | 10584 | # 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 ... | gpl-3.0 | -2,785,566,513,698,070,000 | 31.268293 | 115 | 0.606293 | false |
mveitas/metrics | docs/source/conf.py | 1 | 9611 | # -*- coding: utf-8 -*-
#
# Dropwizard documentation build configuration file, created by
# sphinx-quickstart on Mon Feb 13 11:29:49 2012.
#
# 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.
#
# ... | apache-2.0 | 7,791,638,484,242,115,000 | 30.930233 | 80 | 0.699927 | false |
alenickwork/python_training | fixture/orm.py | 1 | 4159 | from pony.orm import *
from datetime import datetime
from model.group import Group
from model.contact import Contact
from pymysql.converters import decoders
from pymysql.converters import encoders, decoders, convert_mysql_timestamp
conv = encoders
conv.update(decoders)
conv[datetime] = convert_mysql_timestamp
clas... | apache-2.0 | -884,994,360,897,504,300 | 39.378641 | 135 | 0.591248 | false |
Den1al/JSShell | web/content/routes.py | 1 | 1400 | from flask import render_template, url_for, Response
from common.config import read_config
from common.utils import concat_url_path
from web.content import content
@content.route('/jquery', methods=['GET'])
def get_jquery():
""" Returns the jQuery.js file """
return render_template('javascript/jquery.js')
... | mit | 1,664,180,753,557,208,800 | 29.434783 | 72 | 0.656429 | false |
buzzer/tams_pr2 | robot_motion_param/nodes/get_motion_param.py | 1 | 1163 | #!/usr/bin/env python
#
# 2014-08-04 Sebastian Rockel (rockel@informatik.uni-hamburg.de)
# Provides a service interface to read the robot motion parameters
# uses the dynamic_reconfigure client
#
import roslib; roslib.load_manifest('robot_motion_param')
from robot_motion_param.srv import *
import rospy
import dynamic_r... | bsd-2-clause | -6,549,244,026,538,426,000 | 34.242424 | 116 | 0.729149 | false |
linted/Skip-Trace | common/STcommon.py | 1 | 1245 | try:
import logging
from Crypto.PublicKey import RSA
except ImportError as e:
print("[-] {}, exiting".format(e))
exit(1)
def configDebugLog(logFileName):
log_file = logging.FileHandler(logFileName,mode='w')
log_file.setLevel(logging.DEBUG)
log_file.setFormatter(logging.Formatter('%(asctime)s - %(levelname)s - %... | mit | -4,271,112,123,629,025,000 | 28.666667 | 86 | 0.724498 | false |
klen/simpletree | docs/conf.py | 1 | 1144 | # -*- coding: utf-8 -*-
import os
import sys
from simpletree import __version__ as release
project = 'SimpleTree'
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
templates_path = ['_templates']
source_suffix = '.rst'
mas... | bsd-3-clause | -5,772,293,872,016,142,000 | 28.333333 | 82 | 0.653846 | false |
MaxTyutyunnikov/lino | lino/projects/min2/settings.py | 1 | 2156 | # -*- coding: UTF-8 -*-
## Copyright 2012-2013 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 y... | gpl-3.0 | 804,034,290,664,175,200 | 32.774194 | 71 | 0.641466 | false |
vlegoff/tsunami | src/primaires/scripting/actions/equiper.py | 1 | 5397 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | 5,963,677,848,703,850,000 | 40.757813 | 79 | 0.674275 | false |
fiduswriter/fiduswriter | fiduswriter/base/tests/test_prelogin.py | 1 | 2855 | from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from testing.testcases import LiveTornadoTestCase
from testing.selenium_helper import SeleniumHelper
class PreloginTest(LiveTornadoTestCase, SeleniumHe... | agpl-3.0 | -6,557,665,526,337,172,000 | 29.361702 | 67 | 0.539944 | false |
TobleMiner/fahrschulcard | solver.py | 1 | 2470 | import sqlite3
from question import Question, Answer
conn = sqlite3.connect('license.db')
c = conn.cursor()
c.execute('CREATE TABLE IF NOT EXISTS "answers" (\
`id` INTEGER PRIMARY KEY AUTOINCREMENT,\
`answer` TEXT,\
`question` INTEGER)')
c.execute('CREATE TABLE IF NOT EXISTS "questions" (\
`id` INTEGER PRIMARY K... | mit | 8,390,763,817,388,021,000 | 34.285714 | 81 | 0.604453 | false |
r-martin-/Code_College | PythonProgramming/poker_hands_v2.py | 1 | 1983 | """Count poker hands
Sample program to count poker hands and thus estimate the probability of a given hand occurring .
The file contains 1 million records randomly distributed and is, therefore, statistically valid.
The data looks like this:
1,1,1,13,2,4,2,3,1,12,0
3,12,3,2,3,11,4,5,2,5,1
1,9,4,6,1,4,3,2,3,9,1
1,4,3... | mit | -5,603,430,153,374,674,000 | 30.47619 | 115 | 0.672718 | false |
tvuillemin/nicetypes | setup.py | 1 | 2325 | import codecs
import os
import re
from setuptools import setup, find_packages
###################################################################
NAME = "nicetypes"
PACKAGES = find_packages(where="src")
META_PATH = os.path.join("src", "nicetypes", "__init__.py")
KEYWORDS = ["class", "attribute", "boilerplate"]
CLAS... | mit | -7,027,364,177,655,694,000 | 28.43038 | 77 | 0.569892 | false |
martynovp/edx-platform | lms/djangoapps/instructor_task/tasks_helper.py | 1 | 62345 | """
This file contains tasks that are designed to perform background operations on the
running state of a course.
"""
import json
from collections import OrderedDict
from datetime import datetime
from django.conf import settings
from eventtracking import tracker
from itertools import chain
from time import time
import... | agpl-3.0 | -3,188,295,569,391,423,000 | 43.820273 | 142 | 0.663117 | false |
aubzen/sheltermanager | src/waitinglist.py | 1 | 14773 | #!/usr/bin/python
import additional
import al
import animal
import audit
import configuration
import db
import diary
import log
import media
import utils
from i18n import _, after, now, python2display, subtract_years, add_days, date_diff
def get_waitinglist_query():
"""
Returns the SELECT and JOIN commands ne... | gpl-3.0 | -4,002,365,165,038,267,000 | 42.967262 | 145 | 0.6057 | false |
RedbackThomson/LoLShadow | sleekxmpp/test/sleektest.py | 1 | 31939 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz, Lance J.T. Stout
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
import unittest
from xml.parsers.expat import ExpatError
from sleekxmpp import ClientXMPP, ComponentXMPP
from sleekxmpp.util i... | mit | -1,355,327,946,575,225,300 | 40.479221 | 81 | 0.519052 | false |
pwwang/bioprocs | bioprocs/utils/meme.py | 1 | 5335 | """
Read or write MEME motif file
"""
import re
import math
from collections import OrderedDict
class MemeRecord(object):
def __init__(self,
name,
matrix,
altname = '',
mtype = 'letter-probability',
alength = None,
w = None,
nsites = 20,
E = 0,
URL = None
):
self.name = nam... | mit | -8,825,826,625,067,057,000 | 23.813953 | 124 | 0.597938 | false |
50wu/gpdb | src/backend/gporca/concourse/build_and_test.py | 10 | 3342 | #!/usr/bin/python
import optparse
import os
import shutil
import subprocess
import sys
def num_cpus():
# Use multiprocessing module, available in Python 2.6+
try:
import multiprocessing
return multiprocessing.cpu_count()
except (ImportError, NotImplementedError):
pass
# Get PO... | apache-2.0 | -4,175,105,556,896,641,500 | 29.381818 | 91 | 0.566427 | false |
fin/froide | froide/publicbody/csv_import.py | 1 | 3665 | # -*- encoding: utf-8 -*-
import requests
from django.contrib.auth import get_user_model
from django.contrib.sites.models import Site
from django.template.defaultfilters import slugify
from django.utils.six import StringIO, BytesIO, PY3
from taggit.utils import parse_tags
if PY3:
import csv
else:
import unic... | mit | 4,057,306,953,763,655,700 | 32.623853 | 88 | 0.583356 | false |
OpenTransportDataProject/ckanext-customharvesters | ckanext/dcat/harvesters/createorg.py | 1 | 2400 | # Description: create harvested organizations from orgfile.txt
# Author: Shanshan Jiang, last modified 14.12.2016
import json
import urllib
import urllib2
import pprint
print "create organizations"
org_dict = {
'name': 'testagain',
'title': 'test again',
'image_url': ''
}
def create_org(dataset_dict)... | agpl-3.0 | -3,692,371,861,684,130,000 | 26.586207 | 80 | 0.646667 | false |
tusharmakkar08/AlphaPy | Syntax/syntaxhighlighter.py | 1 | 2865 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# syntaxhighlighter.py
#
# Copyright 2013 tusharmakkar08 <tusharmakkar08@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 Free Software Foundation; eit... | mit | 668,118,477,405,931,000 | 20.222222 | 72 | 0.669459 | false |
mjtamlyn/django-denorm | test_project/test_app/tests.py | 1 | 17380 | from djangosanetesting import cases
from django.contrib.auth.models import User,Permission
from django.contrib.contenttypes.models import ContentType
import denorm
from denorm import denorms
import models
class TestSkip(cases.DestructiveDatabaseTestCase):
"""
Tests for the skip feature.
"""
def ... | bsd-3-clause | -3,809,027,810,471,516,000 | 37.030635 | 111 | 0.637112 | false |
dvdotsenko/git_http_backend.py | test_git_http_backend.py | 1 | 4625 | import os
import sys
import threading
import socket
import tempfile
import shutil
import random
import time
try:
# 3.x style module
import urllib.request as urlopenlib
except:
# 2.x style module
import urllib as urlopenlib
import git_http_backend
import cherrypy as wsgiserver
import ... | gpl-2.0 | 5,822,722,147,818,892,000 | 30.584507 | 96 | 0.604541 | false |
novoid/tstest | tagstore-src/tsgui/tagcompleter.py | 1 | 17006 | #!/usr/bin/env python
# -*- coding: iso-8859-15 -*-
## this file is part of tagstore, an alternative way of storing and retrieving information
## Copyright (C) 2010 Karl Voit, Christoph Friedl, Wolfgang Wintersteller
##
## This program is free software; you can redistribute it and/or modify it under the terms
## of t... | gpl-3.0 | 8,625,634,577,607,266,000 | 39.684211 | 141 | 0.604728 | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.0/Lib/distutils/sysconfig.py | 1 | 20130 | """Provide access to Python's configuration information. The specific
configuration variables available depend heavily on the platform and
configuration. The values may be retrieved using
get_config_var(name), and the list of variables is available via
get_config_vars().keys(). Additional convenience functions are a... | mit | 3,387,479,919,306,659,000 | 35.467391 | 95 | 0.572827 | false |
fgirault/smeuhsocial | apps/threadedcomments/tests/test_views.py | 1 | 26436 | from django.core.urlresolvers import reverse
from django.test import TestCase
from json import loads
from django.contrib.auth.models import User
from django.contrib.contenttypes.models import ContentType
from threadedcomments.models import FreeThreadedComment, ThreadedComment
from threadedcomments.models import TestM... | mit | 5,914,407,054,020,151,000 | 30.174528 | 76 | 0.511235 | false |
delfick/harpoon | harpoon/helpers.py | 1 | 2085 | from contextlib import contextmanager
from io import StringIO
import tempfile
import logging
import time
import os
log = logging.getLogger("harpoon.helpers")
@contextmanager
def a_temp_file():
"""Yield the name of a temporary file and ensure it's removed after use"""
filename = None
try:
tmpfile ... | mit | -888,619,971,368,138,900 | 26.077922 | 78 | 0.606235 | false |
memsharded/conan | conans/test/integration/conanfile_errors_test.py | 1 | 5092 | import unittest
from conans.test.utils.tools import TestClient
class ConanfileErrorsTest(unittest.TestCase):
def copy_error_test(self):
client = TestClient()
conanfile = '''
from conans import ConanFile
class HelloConan(ConanFile):
name = "Hello"
version = "0.1"
exports = "*"
de... | mit | -8,369,451,500,046,241,000 | 33.639456 | 92 | 0.597211 | false |
simbha/GAE-appswell | appspot/framework/lib/error_handling.py | 1 | 1373 | """
Appswell Error Handling Lib
functions for handling errors
USAGE
from lib import error_handling
error_details = error_handling.get_error_details()
error_page = error_handling.render_error_page(error_details)
"""
#
# IMPORTS
#
import sys, os, logging, inspect
from os.path import (abspath, di... | mit | 4,580,432,256,818,936,000 | 29.511111 | 76 | 0.654042 | false |
edgedb/edgedb | edb/schema/schema.py | 1 | 63607 | #
# This source file is part of the EdgeDB open source project.
#
# Copyright 2008-present MagicStack Inc. and the EdgeDB authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http... | apache-2.0 | -8,112,427,022,049,611,000 | 30.118885 | 79 | 0.517647 | false |
yytang2012/novels-crawler | simpleSpiders/m-ifuwen.py | 1 | 1913 | import os
import requests
from parsel import Selector
from urllib.parse import urljoin
from libs.polish import polish_content, polish_title, polish_subtitle
def parse_content(url):
page = requests.get(url)
html = page.text
sel = Selector(text=html)
title = sel.xpath('//title/text()').extract()[0]
... | mit | -1,006,423,881,069,310,800 | 29.365079 | 95 | 0.598014 | false |
kvar/ansible | lib/ansible/modules/network/nxos/nxos_ospf_vrf.py | 1 | 17083 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | gpl-3.0 | -7,757,120,865,278,113,000 | 37.649321 | 94 | 0.572323 | false |
hortonworks/hortonworks-sandbox | apps/oozie/src/oozie/management/commands/oozie_setup.py | 1 | 3188 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (... | apache-2.0 | -7,638,046,287,902,017,000 | 38.8375 | 119 | 0.709131 | false |
ddworken/cubeOfResistors | 2D.py | 1 | 2155 | DIFF_THRESHOLD = 1e-40
width = height = 10
class Fixed:
FREE = 0
A = 1
B = 2
class Node:
__slots__ = ["voltage", "fixed"]
def __init__(self, v=0.0, f=Fixed.FREE):
self.voltage = v
self.fixed = f
def set_boundary(mesh):
mesh[width / 2][height / 2] = Node(1.0, Fixed.A)
m... | gpl-2.0 | 5,152,036,103,168,269,000 | 26.278481 | 99 | 0.508121 | false |
mjvakili/ccppabc | ccppabc/code/archive/wp_covariance.py | 1 | 1717 | from halotools.empirical_models import Zheng07 , model_defaults
from halotools.mock_observables import wp
from halotools.mock_observables.clustering import tpcf
from halotools.empirical_models.mock_helpers import (three_dim_pos_bundle,
infer_mask_from_kwargs)
from ha... | mit | 7,285,614,063,505,886,000 | 32.019231 | 90 | 0.664531 | false |
vprime/puuuu | env/bin/pilfile.py | 1 | 2645 | #!/Users/Vincent/lm_svn/checkouts/personal/papertrail-django/env/bin/python
#
# The Python Imaging Library.
# $Id$
#
# a utility to identify image files
#
# this script identifies image files, extracting size and
# pixel mode information for known file formats. Note that
# you don't need the PIL C extension to use thi... | mit | 2,741,384,306,119,726,000 | 26.842105 | 77 | 0.564461 | false |
swegener/gruvi | src/build_http.py | 1 | 3155 | #
# This file is part of Gruvi. Gruvi is free software available under the
# terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2012-2017 the Gruvi authors. See the file "AUTHORS" for a
# complete list.
from __future__ import a... | mit | 1,236,139,961,076,085,500 | 30.868687 | 78 | 0.626941 | false |
aroberge/docpicture | examples/fake_turtle.py | 1 | 7015 | """
This is a fake turtle module (with no relevant executable code, other than
a local docpicture parser included for testing) obtained through
severely amputating the original turtle module, for the purpose of
demonstrating the docpicture concept.
We start by including a drawing made with a docpicture "parser"
that i... | bsd-3-clause | 6,207,094,637,867,796,000 | 28.351464 | 95 | 0.594726 | false |
jbrendel/RESTx | src/python/restx/components/test/test_Filter.py | 1 | 7040 | """
RESTx: Sane, simple and effective data publishing and integration.
Copyright (C) 2010 MuleSoft Inc. http://www.mulesoft.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 Free Software Foundation, either version... | gpl-3.0 | 3,631,399,253,228,486,000 | 33.851485 | 128 | 0.484517 | false |
hmarkus/dynclasp | DflatDecomposition.py | 1 | 2536 | #!/bin/python
class DflatIdentifiable(object):
def __init__(self, keys):
self._keys = keys
def add(self, val):
self._keys.append(val)
def __repr__(self):
return self.__str__()
def __str__(self):
return str(self._keys)
def id(self):
return DflatIdentifiable.idstr(self._keys)
def keys(self):
retu... | gpl-3.0 | 3,731,327,717,661,745,700 | 18.658915 | 102 | 0.630521 | false |
QueenMargaretsCompSci/PiWars2016 | source/wii_remote_test.py | 1 | 3219 | #!/usr/bin/python
# import our modules
import cwiid
import time
import RPi.GPIO as GPIO
import piconzero as pz
import sensorlibs as sl
from picamera import PiCamera
# setup our camera
cam = PiCamera()
# setup our constants
button_delay = 0.1
PIN_LED = sl.GPIOtoBoard(4)
GPIO.setup(PIN_LED, GPIO.OUT)
GPIO.output(PIN_L... | gpl-3.0 | 1,293,673,930,725,031,700 | 22.326087 | 70 | 0.636533 | false |
google/closure-templates | python/runtime.py | 1 | 22615 | # 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... | apache-2.0 | -4,886,007,463,098,833,000 | 28.446615 | 87 | 0.691576 | false |
nodakai/watchman | tests/integration/test_sock_perms.py | 1 | 10512 | # vim:ts=4:sw=4:et:
# Copyright 2016-present Facebook, Inc.
# Licensed under the Apache License, Version 2.0
# no unicode literals
from __future__ import absolute_import, division, print_function
import os
import random
import stat
import string
import sys
import time
import pywatchman
import WatchmanInstance
import... | apache-2.0 | 3,227,173,042,821,205,500 | 35.884211 | 88 | 0.612348 | false |
dgrtwo/gleam | examples/baseball.py | 1 | 2364 | import os
from collections import OrderedDict
from flask import Flask
from wtforms import fields
from ggplot import (aes, stat_smooth, geom_point, geom_text, ggtitle, ggplot,
xlab, ylab)
import numpy as np
import pandas as pd
from gleam import Page, panels
# setup
stats = ['At-Bats (AB)', 'Runs... | mit | 4,333,654,083,607,356,400 | 28.924051 | 77 | 0.60533 | false |
NeCTAR-RC/horizon | openstack_dashboard/dashboards/project/key_pairs/tests.py | 1 | 7827 | # Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 Nebula, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the... | apache-2.0 | 6,792,557,284,657,845,000 | 39.345361 | 78 | 0.60138 | false |
gangadhar-kadam/mic-erpnext | stock/report/delivery_note_trends/delivery_note_trends.py | 1 | 1058 | # ERPNext - web based ERP (http://erpnext.com)
# Copyright (C) 2012 Web Notes Technologies Pvt Ltd
#
# 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 yo... | agpl-3.0 | -2,810,063,489,910,439,000 | 36.821429 | 71 | 0.751418 | false |
sevikkk/django-sql-explorer | explorer/forms.py | 1 | 3003 | from django import forms
from django.forms import ModelForm, Field, ValidationError
from explorer.models import Query, MSG_FAILED_BLACKLIST
from django.db import DatabaseError, connections
from crontab import CronTab
from explorer.utils import get_connections_list
_ = lambda x: x
class SqlField(Field):
def vali... | mit | 8,805,063,488,350,659,000 | 25.584071 | 118 | 0.586414 | false |
ywang037/delta-ntu-slerp4 | Training/train_mobilenet_casia_1771.py | 1 | 7420 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Oct 4 14:47:47 2017
@author: slerp4
Compared with _debug version, this version excludes RMSprop optimizer
"""
#import tensorflow as tf
from keras import backend as K
from keras.applications.mobilenet import MobileNet
from keras.preprocessing.image im... | mit | -1,016,345,155,239,914,100 | 35.732673 | 120 | 0.684097 | false |
gslab-econ/gslab_python | gslab_make/get_externals.py | 1 | 4632 | #! /usr/bin/env python
import os
import private.preliminaries as prelim
import private.metadata as metadata
import private.messages as messages
from private.getexternalsdirectives import SystemDirective
def get_externals(externals_file,
external_dir = '@DEFAULTVALUE@',
... | mit | -6,831,750,537,376,042,000 | 45.265306 | 106 | 0.618523 | false |
anselmobd/fo2 | script/TussorBipaRolo.py | 1 | 1346 | import sys
import android
import os
import json
import urllib.request
print('\n'*10)
print('='*30)
print(' Tussor')
print(' Coletor de códigos de barras')
print('='*30)
droid = android.Android()
print('\nCelular: "{}"'.format(os.environ['QPY_USERNO']))
choice = ' '
while choice == ' ':
print('')
print('='*... | mit | 2,331,994,624,095,525,400 | 25.27451 | 75 | 0.54403 | false |
facelessuser/TabsExtra | tabs_extra.py | 1 | 32989 | """
TabsExtra.
Copyright (c) 2014 - 2016 Isaac Muse <isaacmuse@gmail.com>
License: MIT
"""
import sublime_plugin
import sublime
import time
import sys
from TabsExtra import tab_menu
import os
import functools
from operator import itemgetter
import sublime_api
from urllib.parse import urljoin
from urllib.request impor... | mit | 4,686,407,101,717,471,000 | 32.593686 | 173 | 0.5363 | false |
annayqho/TheCannon | presentations/for_michigan/make_talk_plots.py | 1 | 4618 | import pickle
import matplotlib
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.gridspec as gridspec
# make sample spectra
plot(dataset.wl, dataset.tr_flux[2,:], alpha=0.7, c='k')
title(r"Typical High-S/N LAMOST Spectrum", fontsize=27)
xlim(3500, 9500)
tick_params(axis='x', labelsize=27)
tick_para... | mit | -7,311,588,117,771,364,000 | 35.650794 | 99 | 0.639454 | false |
Justaphf/BitcoinUnlimited | qa/rpc-tests/mempool_push.py | 1 | 9835 | #!/usr/bin/env python3
# Copyright (c) 2015-2019 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import test_framework.loginit
# This is a template to make creating new QA tests easy.
# You can als... | mit | -8,783,700,860,843,381,000 | 51.037037 | 175 | 0.642501 | false |
tonioo/modoboa | modoboa/core/app_settings.py | 1 | 16059 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from django.conf import settings
from django.contrib.auth import password_validation
from django.utils.translation import ugettext as _, ugettext_lazy
from modoboa.core.password_hashers import get_dovecot_schemes
from modoboa.co... | isc | -478,008,678,375,216,060 | 34.845982 | 79 | 0.609067 | false |
luzfcb/saefacto | saefacto/config/settings.py | 1 | 24164 | # -*- coding: utf-8 -*-
"""
Django settings for saefacto project.
For more information on this file, see
https://docs.djangoproject.com/en/dev/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/dev/ref/settings/
"""
# Build paths inside the project like this: os.pa... | bsd-3-clause | 4,225,165,152,637,254,000 | 34.167394 | 119 | 0.63005 | false |
gbd-consult/CartoCSS-Export | CartoCSSExport/ce/cartocss.py | 1 | 66477 | """CartoCSS properties."""
# extracted from https://raw.githubusercontent.com/mapbox/carto/master/docs/latest.md
Properties = {
"background-color": {
"default": None,
"description": "Map Background color.",
"type": "color"
},
"background-image": {
"default": "",
"de... | gpl-2.0 | 491,658,651,293,921,540 | 33.713838 | 684 | 0.521985 | false |
Linaro/lava-dispatcher | lava_dispatcher/actions/deploy/mps.py | 1 | 5714 | # Copyright (C) 2018 Linaro Limited
#
# Author: Dean Arnold <dean.arnold@linaro.org>
#
# This file is part of LAVA Dispatcher.
#
# LAVA Dispatcher 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... | gpl-2.0 | -8,694,243,085,509,229,000 | 38.958042 | 117 | 0.685159 | false |
nikodtbVf/aima-si | search.py | 1 | 41693 | """Search (Chapters 3-4)
The way to use this code is to subclass Problem to create a class of problems,
then create problem instances and solve them with calls to the various search
functions."""
from utils import (
is_in, argmin, argmax, argmax_random_tie, probability,
weighted_sample_with_replacement, memoi... | mit | 3,359,287,629,173,186,000 | 34.604611 | 105 | 0.571223 | false |
manxueitp/cozmo-test | cozmo_sdk_examples/tutorials/02_cozmo_face/03_alarm_clock.py | 1 | 9691 | #!/usr/bin/env python3
# Copyright (c) 2016 Anki, 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 in the file LICENSE.txt or at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unles... | mit | -5,040,915,958,097,453,000 | 33.610714 | 136 | 0.640594 | false |
dnaextrim/django_adminlte_x | adminlte/static/plugins/ckeditor/samples/old/api.html.py | 1 | 6969 | XXXXXXXXX XXXXX
XXXX
XXXXXXXXX XXX XXXXXXXXXX XXXXXXXX X XXXXXXXXX XXXXXXXX XXX XXXXXX XXXXXXXXX
XXX XXXXXXXXXX XXX XXXXXXXXXX XX XXXXXXXXXXXXXXXXXXXXXXXXXXX
XXX
XXXXXX
XXXXXX
XXXXX XXXXXXXXXXXXXXXX
XXXXXXXXXX XXXXX XXXXXXX XXXXXXXX XXXXXXXXXXXXXX
XXXXXXX XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXX XXXXXXXXXXXXXXXXX XX... | mit | 2,327,210,525,161,143,300 | 32.185714 | 216 | 0.841584 | false |
JioCloud/tempest-lib | tempest_lib/services/identity/v3/token_client.py | 1 | 6711 | # Copyright 2015 NEC Corporation. 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 ... | apache-2.0 | 876,780,352,556,253,000 | 36.49162 | 79 | 0.56996 | false |
spark-test/spark | python/pyspark/sql/tests/test_types.py | 1 | 43002 | # -*- encoding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the ... | apache-2.0 | -5,974,779,664,881,302,000 | 42.076152 | 100 | 0.565062 | false |
okolisny/integration_tests | cfme/tests/infrastructure/test_snapshot.py | 1 | 15608 | # -*- coding: utf-8 -*-
import fauxfactory
import pytest
from widgetastic.exceptions import NoSuchElementException
from cfme import test_requirements
from cfme.automate.explorer.domain import DomainCollection
from cfme.automate.simulation import simulate
from cfme.common.vm import VM
from cfme.infrastructure.provider.... | gpl-2.0 | -8,239,839,360,710,147,000 | 42.719888 | 100 | 0.695861 | false |
cprogrammer1994/ModernGL | examples/old-examples/GLWindow/particle_system_2.py | 1 | 1794 | import math
import random
import struct
import GLWindow
import ModernGL
# Window & Context
wnd = GLWindow.create_window()
ctx = ModernGL.create_context()
prog = ctx.program(
ctx.vertex_shader('''
#version 330
uniform vec2 Screen;
in vec2 vert;
void main() {
gl_Posit... | mit | 3,263,518,089,570,220,000 | 19.386364 | 82 | 0.574136 | false |
rliskovenko/DataRobot | app/test.py | 1 | 3085 | import random
import string
import app
import json
import unittest
from datetime import datetime
App = app.app
testSet = {
True : [
'''[{"date": "2015-05-12T14:36:00.451765",
"md5checksum": "e8c83e232b64ce94fdd0e4539ad0d44f",
"name": "John Doe",
"uid": "1"},
... | bsd-2-clause | 1,129,024,472,684,088,200 | 33.662921 | 146 | 0.506969 | false |
tanzer/ls-emacs | scripts/lse_compile_language.py | 1 | 3736 | # -*- coding: utf-8 -*-
# Copyright (C) 1994-2017 Mag. Christian Tanzer. All rights reserved
# Glasauergasse 32, A--1130 Wien, Austria. tanzer@swing.co.at
#
#++
# Name
# lse_compile_language
#
# Purpose
# Compile emacs language definition
#
# Revision Dates
# 14-Nov-2007 (MG) Creation (ported from bash script)... | gpl-2.0 | -165,061,289,321,706,660 | 36.666667 | 78 | 0.539287 | false |
bartoldeman/easybuild-framework | test/framework/filetools.py | 1 | 75056 | # #
# Copyright 2012-2018 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# Flemish Research Foundation (... | gpl-2.0 | 6,844,606,036,654,685,000 | 46.806369 | 153 | 0.617366 | false |
Cadair/solarbextrapolation | solarbextrapolation/analyticalmodels/base.py | 1 | 8605 | # -*- coding: utf-8 -*-
"""
Created on Mon Sep 28 19:30:22 2015
@author: alex_
"""
# General Imports
import matplotlib as mpl
mpl.use('TkAgg') # Force mpl backend not to use qt. Else we have a conflict.
import numpy as np
#import pickle
import time
from datetime import datetime
#from collections import namedtuple
imp... | mit | -4,708,356,561,791,386,000 | 39.21028 | 264 | 0.604648 | false |
RNAcentral/rnacentral-import-pipeline | rnacentral_pipeline/rnacentral/r2dt/parser.py | 1 | 3852 | # -*- coding: utf-8 -*-
"""
Copyright [2009-2018] EMBL-European Bioinformatics Institute
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 | 3,470,230,791,381,858,300 | 34.666667 | 82 | 0.60514 | false |
keras-team/autokeras | examples/automodel_with_cnn.py | 1 | 1358 | # Library import
import numpy as np
import tensorflow as tf
import autokeras as ak
# Prepare example Data - Shape 1D
num_instances = 100
num_features = 5
x_train = np.random.rand(num_instances, num_features).astype(np.float32)
y_train = np.zeros(num_instances).astype(np.float32)
y_train[0 : int(num_instances / 2)] = ... | apache-2.0 | 1,371,042,242,022,571,300 | 27.291667 | 81 | 0.72975 | false |
jeremy-miller/life-python | life/display.py | 1 | 1176 | """This module displays the Life 'grid'."""
import numpy
class DisplayClass(object): # pylint: disable=R0903
"""This class displays the Life 'grid'.
No OpenGL or Matplotlib UI is used since this program is being executed
in a Docker container. The 'curses' Python package is also not used
since it also has... | mit | 8,947,968,542,597,361,000 | 31.666667 | 96 | 0.654762 | false |
edmundgentle/schoolscript | SchoolScript/bin/Debug/pythonlib/Lib/test/test_pipes.py | 1 | 7288 | import pipes
import os
import string
import unittest
from test.support import TESTFN, run_unittest, unlink, reap_children
if os.name != 'posix':
raise unittest.SkipTest('pipes module only works on posix')
TESTFN2 = TESTFN + "2"
# tr a-z A-Z is not portable, so make the ranges explicit
s_command = 'tr... | gpl-2.0 | 2,743,070,504,171,000,300 | 32.704762 | 75 | 0.552415 | false |
jeffsilverm/presentation | SeaGL-2018/network_stats_result_2_csv.py | 1 | 3115 | #! /usr/bin/python3
# -*- coding: utf-8 -*-
import csv
import datetime
import sys
def str_to_time_delta(string) -> datetime.timedelta:
"""
:param string: Input in format 0:01:37.083557
:return: datetime.timedelta
"""
flds = string.split(":")
hours = flds[0]
minutes = flds[1]
second... | gpl-2.0 | 7,128,494,810,145,858,000 | 36.53012 | 113 | 0.50626 | false |
floydhub/dockerfiles | dl/pytorch/tests/0.3.1/mnist.py | 1 | 5122 | # MNIST from official PyTorch Docs
from __future__ import print_function
import argparse
import torch
import torchvision
import torch.nn as nn
import torch.nn.functional as F
import torch.optim as optim
import psutil
from torchvision import datasets, transforms
from torch.autograd import Variable
# Training settings
... | apache-2.0 | 7,196,416,950,406,013,000 | 36.386861 | 98 | 0.613627 | false |
bcgsc/ProbeGenerator | probe_generator/reference.py | 1 | 2779 | """Parse and extract base pair sequences from an Ensembl reference genome.
"""
from probe_generator import sequence
from probe_generator.exceptions import NonFatalError
def bases(sequence_range, genome):
"""Return the bases from a SequenceRange object.
"""
raw_bases = _raw_bases(
sequence_range.c... | gpl-3.0 | 8,711,707,107,422,563,000 | 28.252632 | 79 | 0.618928 | false |
bakhtout/odoo-educ | addons/openeducat_erp/op_course/__init__.py | 1 | 1082 | # -*- coding: utf-8 -*-
#/#############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2004-TODAY Tech-Receptives(<http://www.tech-receptives.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under th... | agpl-3.0 | 997,262,159,016,272,500 | 44.083333 | 80 | 0.617375 | false |
crackinglandia/pype32 | setup.py | 1 | 4235 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (c) 2013, Nahuel Riva
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyrigh... | bsd-3-clause | 1,081,775,200,471,822,000 | 39.721154 | 92 | 0.677922 | false |
myvoice-nigeria/myvoice | myvoice/clinics/migrations/0013_auto__chg_field_visit_service.py | 1 | 13197 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'Visit.service'
db.alter_column(u'clinics_visit', 'serv... | bsd-2-clause | -2,682,326,157,635,498,500 | 74.850575 | 195 | 0.548079 | false |
m00nlight/hackerrank | algorithm/contests/Counter-Code-2015/C.py | 1 | 1148 | from __future__ import division
from sys import stdin
def solve(n, m):
if n % 2 == 0:
if m % n == 0:
return n // 2 + 1
elif m % n % 2 == 1:
return (m % n + 1) // 2
else:
return n + 1 - m % n // 2
else:
idx = m % (2 * n)
if idx == 0:
... | gpl-2.0 | -6,132,813,347,740,916,000 | 27.02439 | 70 | 0.313589 | false |
Bezoar/surrender-rides | bp_includes/handlers.py | 1 | 64168 | # -*- coding: utf-8 -*-
"""
A real simple app for using webapp2 with auth and session.
It just covers the basics. Creating a user, login, logout
and a decorator for protecting certain handlers.
Routes are setup in routes.py and added in main.py
"""
# standard library imports
import logging
import jso... | mit | -1,630,761,658,250,618,400 | 42.562797 | 142 | 0.522597 | false |
linsalrob/PhageHosts | code/codon_distance.py | 1 | 2853 | '''
Calculate the distance between two codon usages.
We have two files, the first with just the phages and the second
with their hosts. Then we need to calculate which of the hosts is
closest
'''
import os
import sys
sys.path.append('/home3/redwards/bioinformatics/Modules')
import numpy as np
import scipy
remove_am... | mit | -4,651,376,398,173,520,000 | 29.351064 | 72 | 0.539783 | false |
MTgeophysics/mtpy | tests/analysis/test_pt.py | 1 | 7128 | # -*- coding: utf-8 -*-
"""
TEST mtpy.core.mt.MT
@author: YG
"""
from unittest import TestCase
# -*- coding: utf-8 -*-
"""
Created on Tue Oct 31 13:19:35 2017
@author: u64125
Alison.Kirkby@ga.gov.au
"""
import os
import numpy as np
from mtpy.core.mt import MT
from tests import TEST_MTPY_ROOT
import mtpy.analysis.ge... | gpl-3.0 | 4,011,371,443,513,376,300 | 34.824121 | 108 | 0.542789 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.