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 |
|---|---|---|---|---|---|---|---|---|---|---|
gpanders/Janitor | src/pushbroom/console.py | 1 | 4525 | """
Pushbroom entry point
"""
import argparse
import configparser
import fnmatch
import logging
import os
import re
import sys
from pathlib import Path
from typing import Dict
from pushbroom import __version__, sweep
def run() -> None:
"""Main entry point"""
args = parse_args()
setup_logging(args)
co... | mit | -6,263,718,687,116,045,000 | 31.553957 | 86 | 0.62232 | false |
tombstone/models | research/skip_thoughts/skip_thoughts/vocabulary_expansion.py | 1 | 7375 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -7,316,208,268,084,766,000 | 35.330049 | 80 | 0.70739 | false |
liosha2007/temporary-groupdocs-python-sdk | groupdocs/models/AddCollaboratorResponse.py | 1 | 1165 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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 | -8,842,829,589,295,494,000 | 29.657895 | 77 | 0.649785 | false |
shoyer/xray | xarray/core/utils.py | 1 | 18865 | """Internal utilties; not for external use
"""
import contextlib
import functools
import itertools
import os.path
import re
import warnings
from collections import OrderedDict
from typing import (
AbstractSet, Any, Callable, Container, Dict, Hashable, Iterable, Iterator,
Mapping, MutableMapping, MutableSet, Opt... | apache-2.0 | -7,918,667,577,346,718,000 | 29.825163 | 79 | 0.608958 | false |
cyrta/sandbox | ml/pytorch/two_layer_net_custom_function.py | 1 | 2350 | # Code in file autograd/two_layer_net_custom_function.py
import torch
from torch.autograd import Variable
class MyReLU(torch.autograd.Function):
"""
We can implement our own custom autograd Functions by subclassing
torch.autograd.Function and implementing the forward and backward passes
which operate on Tensor... | unlicense | -2,534,284,823,519,713,300 | 33.057971 | 80 | 0.712766 | false |
boegel/easybuild-easyblocks | easybuild/easyblocks/e/esmf.py | 1 | 4996 | ##
# Copyright 2013-2020 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 (F... | gpl-2.0 | -1,994,086,380,646,885,400 | 39.290323 | 117 | 0.619295 | false |
korepwx/tfsnippet | tfsnippet/examples/utils/jsonutils.py | 1 | 5598 | import json
from base64 import b64encode, b64decode
from datetime import datetime
import numpy as np
import six
__all__ = [
'JsonBinary', 'JsonEncoder', 'JsonDecoder',
]
class JsonBinary(object):
"""
Wrapper class for binary objects.
In Python2, ordinary strings are binary strings, thus we cannot e... | mit | -2,111,988,705,628,866,800 | 32.722892 | 80 | 0.566274 | false |
utcoupe/coupe18 | ros_ws/src/processing_belt_interpreter/src/belt_parser.py | 1 | 2839 | #!/usr/bin/env python
import xml.etree.ElementTree as ET
import rospy
class BeltParser(object):
"""Class used to parse the definition XML"""
def __init__(self, file):
super(BeltParser, self).__init__()
rospy.logdebug("Parsing belt definition...")
root = ET.parse(file).getroot()
... | gpl-3.0 | 5,276,671,905,392,511,000 | 36.853333 | 126 | 0.549489 | false |
spencerpomme/coconuts-on-fire | DSA/ArrayQueue.py | 1 | 2810 | # python implemented queue ADT
# A new exception class defined for handling empty errors
class Empty(Exception):
'''
Error attempting to access an element from an empty container.
'''
pass
class ArrayQueue:
'''FIFO queue implementation using a python list as underlying storage.'''
DEFAULT_CAPA... | apache-2.0 | 7,368,616,952,017,347,000 | 38.027778 | 91 | 0.484698 | false |
renatosamperio/context_task_queue | Tools/create_service.py | 1 | 21855 | #!/usr/bin/env python
# -*- coding: latin-1 -*-
import sys, os
from optparse import OptionParser, OptionGroup
import xml.etree.ElementTree as ET
## Importing Utils from parent path
file_path = os.path.dirname(__file__)
join_path = os.path.join(file_path, '../Utils')
abs_path = os.path.abspath(join_path)
sys.path.app... | gpl-3.0 | -4,830,159,946,343,961,000 | 33.418898 | 101 | 0.666941 | false |
rojinva/Email-classifier | Text classification with probability.py | 1 | 2058 |
__author__="rojin.varghese"
__date__ ="$Nov 8, 2013 8:48:18 PM$"
import os
from xlrd import open_workbook
import re
import xlwt
j = os.path.join
def train(text):
c = {}
lastword = ""
line = re.sub('[\-#*>]', '', text)
line = re.sub('[\n]', '', line)
for word in line.split():
word = word.l... | unlicense | -6,348,697,365,323,838,000 | 26.44 | 112 | 0.556365 | false |
mark-up/django-autoslug | doc/conf.py | 1 | 6508 | # -*- coding: utf-8 -*-
#
# Django Autoslug documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 21 22:35:51 2009.
#
# 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.... | lgpl-3.0 | 2,734,622,607,506,859,500 | 31.703518 | 80 | 0.714352 | false |
huertatipografica/huertatipografica-fl-scripts | AT_Compatibility/AT_Compatible.py | 1 | 1585 | #FLM: AT Compatibility check
#Check compatibility of selected glyphs between the current font and declared fontCompare (Postcrit Full Name)
# By Andres Torresi
# http://www.huertatipografica.com
#fullName of font you want to compare with current font
fontCompare='ABBvoice Bold';
colorCompatible=150
colorIncompatible=... | apache-2.0 | -4,392,702,551,218,769,000 | 23.384615 | 110 | 0.681388 | false |
vortex-ape/scikit-learn | conftest.py | 2 | 2347 | # Even if empty this file is useful so that when running from the root folder
# ./sklearn is added to sys.path by pytest. See
# https://docs.pytest.org/en/latest/pythonpath.html for more details. For
# example, this allows to build extensions in place and run pytest
# doc/modules/clustering.rst and use sklearn from th... | bsd-3-clause | -6,816,286,950,562,045,000 | 35.107692 | 79 | 0.663826 | false |
jzahedieh/django-tennis-ladder | tennis/settings.py | 1 | 6946 | # Django settings for tennis project.
import os
SETTINGS_DIR = os.path.abspath(os.path.dirname(__file__))
DEBUG = os.environ.get("DEBUG_VALUE") == 'True'
ADMINS = (
('Admin User', 'admin@highgate-ladder.co.uk'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
... | mit | 8,503,064,163,933,158,000 | 32.080952 | 85 | 0.670746 | false |
blakerohde/sidewalk | setup.py | 1 | 1124 | import os
from distutils.core import setup
import sidewalk
setup(
name='sidewalk',
version=sidewalk.__version__,
url= 'http://www.blakerohde.com/projects/sidewalk',
author='Blake Rohde',
author_email='blake@blakerohde.com',
description='The Simple Activity Aggregator.',
long_description=open('README.rst').rea... | isc | -2,525,365,965,505,527,000 | 23.977778 | 70 | 0.630783 | false |
drewokane/xray | xarray/core/groupby.py | 1 | 20086 | import functools
import numpy as np
import pandas as pd
from . import ops
from .combine import concat
from .common import (
ImplementsArrayReduce, ImplementsDatasetReduce, _maybe_promote,
)
from .pycompat import zip
from .utils import peek_at, maybe_wrap_array, safe_cast_to_index
from .variable import as_variable,... | apache-2.0 | 8,235,435,103,712,422,000 | 37.478927 | 81 | 0.590959 | false |
forkbong/qutebrowser | qutebrowser/config/configexc.py | 1 | 5505 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2014-2021 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free S... | gpl-3.0 | -2,327,407,455,753,032,700 | 30.820809 | 75 | 0.581471 | false |
panda4life/idpserver | mysite/idp/plotting.py | 1 | 3702 | # -*- coding: utf-8 -*-
"""
Created on Wed Apr 30 16:43:00 2014
@author: jahad
"""
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import os
def phasePlot(fp,fm,seqname,saveAs):
if(os.path.exists(saveAs)):
os.remove(saveAs)
for x,y,label in zip(fp,fm,seqname):
... | gpl-3.0 | 7,079,705,620,649,945,000 | 34.605769 | 187 | 0.615613 | false |
mzszym/oedes | oedes/__init__.py | 1 | 1135 | # -*- coding: utf-8; -*-
#
# oedes - organic electronic device simulator
# Copyright (C) 2017-2018 Marek Zdzislaw Szymanski (marek@marekszymanski.com)
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License, version 3,
# as published by the ... | agpl-3.0 | -7,962,736,429,399,198,000 | 31.428571 | 77 | 0.755066 | false |
iut-ibk/P8-WSC-GUI | 3dparty/Editra/tests/unittests/testSyntaxDataBase.py | 1 | 2697 | ###############################################################################
# Name: testSyntaxDataBase.py #
# Purpose: Unit tests for syntax.syndata Base Class #
# Author: Cody Precord <cprecord@editra.org> #
... | gpl-2.0 | 5,417,375,356,736,835,000 | 35.445946 | 82 | 0.54987 | false |
likit/dementia | webapp/manage.py | 1 | 2123 | #!/usr/bin/env python
import os
from app import create_app, db
from flask.ext.script import Manager, Shell
from flask.ext.migrate import Migrate, MigrateCommand
from werkzeug.security import generate_password_hash
from datetime import datetime
if os.environ.get('FLASK_COVERAGE'):
import coverage
COV = coverag... | gpl-2.0 | -6,631,071,479,762,149,000 | 28.901408 | 68 | 0.597739 | false |
robwarm/gpaw-symm | doc/tutorials/fxc_correlation/gs_diamond.py | 1 | 1096 | from ase import *
from ase.lattice import bulk
from ase.dft import monkhorst_pack
from ase.parallel import paropen
from gpaw import *
from gpaw.wavefunctions.pw import PW
from gpaw.xc.exx import EXX
# Monkhorst-Pack grid shifted to be gamma centered
k = 8
kpts = monkhorst_pack([k, k, k])
kpts += [1. / (2 * k), 1. / ( ... | gpl-3.0 | 2,567,397,908,081,199,600 | 25.095238 | 59 | 0.601277 | false |
hdemeyer/king-phisher | king_phisher/version.py | 1 | 3552 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# king_phisher/version.py
#
# 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 lis... | bsd-3-clause | 2,827,822,948,980,709,400 | 36.389474 | 92 | 0.739583 | false |
Vito2015/tcc3-portal | tcc3portal/api/users.py | 1 | 1150 | # coding:utf-8
"""
tcc3portal.api.users
~~~~~~~~~~~~~~~~~~~~
User endpoints.
:copyright: (c) 2015 by Vito.
:license: GNU, see LICENSE for more details.
"""
from flask import Blueprint, current_app
from flask_login import login_required
# from flask import json
# from . import route
from ..tcc_core ... | gpl-2.0 | 2,390,627,513,436,331,000 | 27.75 | 81 | 0.629565 | false |
momahajogami/Prime-Numbers | practical_sieve.py | 1 | 1165 | def primes_in_block(small_primes, L, R, B):
# Algorithm 3.2.1 in Prime Numbers, A Computational Perspective.
# p. 122
# 0. Choose R>L even,
# L > P := int_sqrt(R),
# B|R-L
primes_in_range = []
# 1. Initialize offsets.
primes_with_offsets = []
for p in small_... | mit | 5,651,048,751,521,574,000 | 28.125 | 68 | 0.499571 | false |
cpcloud/ibis | ibis/pandas/tests/test_core.py | 1 | 4872 | from typing import Any
import pandas as pd
import pandas.util.testing as tm
import pytest
from multipledispatch.conflict import ambiguities
import ibis
import ibis.common.exceptions as com
import ibis.expr.datatypes as dt
import ibis.expr.operations as ops
from ibis.pandas.client import PandasClient
from ibis.pandas.... | apache-2.0 | 1,048,607,088,477,634,700 | 25.769231 | 76 | 0.634442 | false |
k4cg/nichtparasoup | examples/nichtparasoup-imagecrawler-plugin/tests/test_10_nichtparasoup_placeholders/test_dummyimage.py | 1 | 4465 | import unittest
from typing import Type
from nichtparasoup_placeholders import DummyImage
from nichtparasoup.imagecrawler import BaseImageCrawler
from nichtparasoup.testing.imagecrawler import ImageCrawlerLoaderTest
_DUMMYIMAGE_RIGHT_CONFIG = {'width': 800, 'height': 600}
class DummyImageConfigCorrect(unittest.Tes... | mit | -6,405,216,303,146,802,000 | 33.346154 | 86 | 0.632027 | false |
porridge/apt-forktracer | lib/apt_forktracer/tests/test_reporter.py | 1 | 2589 | #!/usr/bin/python3
# apt-forktracer - a utility for managing package versions
# Copyright (C) 2008,2010,2019 Marcin Owsiany <porridge@debian.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... | gpl-2.0 | 3,654,835,441,928,508,000 | 34.465753 | 91 | 0.713403 | false |
rafaellehmkuhl/OpenCV-Python-GUI | CvPyGui/PlotContainer.py | 1 | 2407 | import pandas as pd
from PyQt5.QtCore import Qt
from PyQt5.QtWidgets import (QWidget, QLabel, QHBoxLayout,
QVBoxLayout, QPushButton, QSlider,
QComboBox)
from matplotlib.backends.backend_qt4agg import NavigationToolbar2QT as NavigationToolbar
from matplotlib.bac... | mit | -3,096,640,997,540,342,000 | 30.671053 | 97 | 0.641047 | false |
perey/python-gsl | tests/test_gsl.py | 1 | 1597 | #!/usr/bin/env python3
"""Tests for package-level objects in python-gsl."""
# Copyright © 2016 Timothy Pederick.
#
# Based on the GNU Scientific Library (GSL):
# Copyright © 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
# 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014, 2015 The GSL Team.
#... | gpl-3.0 | -2,551,407,467,596,602,400 | 34.444444 | 78 | 0.688401 | false |
coolharsh55/hdd-indexer | hdd_indexer/views.py | 1 | 19442 | """Views for hdd-indexer
/ - homepage
/crawler [GET/POST] - crawler interactions
/loader [GET/POST] - loader interactions
/settings [POST] - settings
/setup [POST] - setup
"""
# TODO: refactor validations into separate methods
# TODO: make validation a method of class
# HDDRoot.validate(path): Tr... | mit | 745,216,335,649,311,700 | 29.81141 | 75 | 0.562031 | false |
google/report2bq | application/classes/sa360_report_validation/visit.py | 1 | 1861 | """
Copyright 2020 Google LLC
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
di... | apache-2.0 | -4,312,721,375,928,980,500 | 25.225352 | 80 | 0.634605 | false |
sudhirmishra/edx-dl | edx_dl/common.py | 1 | 4327 | # -*- coding: utf-8 -*-
"""
Common type definitions and constants for edx-dl
The classes in this module represent the structure of courses in edX. The
structure is:
* A Course contains Sections
* Each Section contains Subsections
* Each Subsection contains Units
Notice that we don't represent the full tree structu... | lgpl-3.0 | 7,304,929,588,988,307,000 | 26.916129 | 79 | 0.610354 | false |
uc-cdis/cdis-python-utils | cdispyutils/profiling/profiler.py | 1 | 8064 | __all__ = ["Profiler"]
from collections import defaultdict
import cProfile
import datetime
import errno
import functools
import os
import time
from werkzeug.contrib.profiler import ProfilerMiddleware
def profile(category, *profiler_args, **profiler_kwargs):
"""
Decorate a function to run a profiler on the e... | apache-2.0 | 6,428,691,702,124,679,000 | 36.16129 | 88 | 0.598586 | false |
jordanpotti/AWSBucketDump | AWSBucketDump.py | 1 | 7239 | #!/usr/bin/env python
# AWSBucketDump is a tool to quickly enumerate AWS S3 buckets to look for loot.
# It's similar to a subdomain bruteforcer but is made specifically to S3
# buckets and also has some extra features that allow you to grep for
# delicous files as well as download interesting files if you're not
# afr... | mit | 4,622,916,681,330,770,000 | 29.544304 | 160 | 0.629231 | false |
pzia/keepmydatas | src/images_merge_datetree.py | 1 | 4138 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Compare all photos within a tree with those stored in a date tree (yyyy/mm/dd/*) and remove already existing pictures"""
import KmdImages
import KmdCmd
import PIL.Image as Image
import os, sys
import logging
class KmdImagesMergeDateTree(KmdCmd.KmdCommand):
def ext... | mit | -7,093,201,711,377,779,000 | 42.104167 | 124 | 0.518366 | false |
cameronmaske/skipper | tests/test_creds.py | 1 | 1769 | import pytest
import mock
from skipper.creds import Creds, JSONStorage
@pytest.fixture()
def creds():
storage = mock.MagicMock()
storage.retrieve.return_value = {}
creds = Creds(storage=storage)
return creds
def test_creds(creds):
assert creds == {}
creds['foo'] = 'bar'
assert creds == ... | bsd-2-clause | -2,971,130,151,624,621,000 | 22.586667 | 57 | 0.598643 | false |
greyshell/Exploit-Dev | find_safe_address/find_safe_address.py | 1 | 3098 | #!/usr/bin/env python3
# author: greyshell
# description: find safe return address
import argparse
import sys
from colorama import Fore
# global constant variable
PROGRAM_LOGO = """
___ __ __ ___ ___ __ __ __ ___ __ __
|__ | |\ | | \ /__` /\ |__ |__ /\ | \ | ... | mit | -1,507,579,297,391,570,400 | 25.478632 | 109 | 0.517431 | false |
T-002/python-project-template | tests/__init__.py | 1 | 1370 | # !/usr/bin/env python
# -*- coding: UTF-8 -*-
# Copyright (c) 2016-2017 Christian Schwarz
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitat... | mit | -4,959,437,430,437,986,000 | 46.241379 | 77 | 0.748905 | false |
jokey2k/sentry | src/sentry/api/base.py | 1 | 5659 | from __future__ import absolute_import
__all__ = ['DocSection', 'Endpoint', 'StatsMixin']
import logging
from datetime import datetime, timedelta
from django.utils.http import urlquote
from django.views.decorators.csrf import csrf_exempt
from enum import Enum
from pytz import utc
from rest_framework.authentication i... | bsd-3-clause | -3,169,921,191,962,351,000 | 30.265193 | 97 | 0.604877 | false |
foobarbazblarg/stayclean | stayclean-2019-december/serve-signups-with-flask.py | 1 | 8591 | #!/usr/bin/env python
import subprocess
import praw
from hashlib import sha1
from flask import Flask
from flask import Response
from flask import request
from cStringIO import StringIO
from base64 import b64encode
from base64 import b64decode
from ConfigParser import ConfigParser
import OAuth2Util
import os
import mar... | mit | -5,756,191,314,231,812,000 | 41.741294 | 129 | 0.67722 | false |
symbolicdata/code | src/sdeval/classes/computationproblems/GB_Z_lp.py | 1 | 4721 | from ComputationProblem import ComputationProblem
import os
class GB_Z_lp(ComputationProblem):
"""
This computation problem represents the computation of a Groebner basis of a given polynomial system
(commutative) with integer coefficients and the lexicographical ordering.
.. moduleauthor:: Albert Hei... | gpl-3.0 | -7,154,972,848,801,620,000 | 41.918182 | 136 | 0.640119 | false |
pombredanne/kitchen-1 | kitchen2/tests/test_i18n.py | 1 | 40979 | # -*- coding: utf-8 -*-
#
import unittest
from nose import tools
import os
import types
from kitchen import i18n
import base_classes
class TestI18N_UTF8(unittest.TestCase, base_classes.UnicodeTestData):
def setUp(self):
self.old_LC_ALL = os.environ.get('LC_ALL', None)
os.environ['LC_ALL'] = 'pt_... | gpl-2.0 | -4,151,479,420,773,446,700 | 48.97439 | 137 | 0.617389 | false |
mholtrop/Phys605 | Python/RTC/ReadClock.py | 1 | 1380 | #!/usr/bin/env python
#
# The wiringPi requires you to run as sudo.
# This is needed for access to /dev/mem, which we don't use here.
# There is no way around this though, so we start this code as a root user.
#
#
import wiringpi as wp
#
# Define a function to decode BCD encoded numbers.
def decBCD(num):
return( (n... | gpl-3.0 | -5,986,468,438,403,868,000 | 27.75 | 118 | 0.675362 | false |
hachreak/invenio-oauthclient | invenio_oauthclient/contrib/orcid.py | 1 | 7449 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2014, 2015, 2016, 2017 CERN.
#
# Invenio 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... | gpl-2.0 | 46,624,260,302,116,430 | 30.969957 | 79 | 0.657404 | false |
PyCQA/isort | tests/unit/test_place.py | 1 | 2623 | """Tests for the isort import placement module"""
from functools import partial
from isort import place, sections
from isort.settings import Config
def test_module(src_path):
place_tester = partial(place.module, config=Config(src_paths=[src_path]))
assert place_tester("isort") == sections.FIRSTPARTY
asse... | mit | 7,563,002,035,906,282,000 | 45.839286 | 100 | 0.700724 | false |
Aravinthu/odoo | addons/maintenance/models/maintenance.py | 1 | 20858 | # -*- coding: utf-8 -*-
from datetime import date, datetime, timedelta
from odoo import api, fields, models, SUPERUSER_ID, _
from odoo.exceptions import UserError
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT, DEFAULT_SERVER_DATETIME_FORMAT
class MaintenanceStage(models.Model):
""" Model for case stages. Th... | agpl-3.0 | 8,363,381,834,550,002,000 | 52.619537 | 195 | 0.651788 | false |
lbarahona/UdacityProject4 | main.py | 1 | 2446 | #!/usr/bin/env python
"""
main.py -- Udacity conference server-side Python App Engine
HTTP controller handlers for memcache & task queue access
$Id$
created by wesc on 2014 may 24
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
import webapp2
from google.appengine.api import app_identity
from google.appe... | apache-2.0 | -2,527,707,062,007,526,000 | 37.825397 | 109 | 0.657809 | false |
JohnSnowLabs/spark-nlp | python/tensorflow/lib/ner/ner_model.py | 1 | 21854 | import numpy as np
import tensorflow as tf
import random
import math
import sys
from sentence_grouper import SentenceGrouper
class NerModel:
# If session is not defined than default session will be used
def __init__(self, session=None, dummy_tags=None, use_contrib=True, use_gpu_device=0):
tf.disable_v... | apache-2.0 | -6,108,740,250,423,457,000 | 41.352713 | 167 | 0.541182 | false |
vlegoff/tsunami | src/primaires/vehicule/force.py | 1 | 2990 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 DAVY Guillaume
# 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 | -9,029,035,095,335,561,000 | 30.09375 | 79 | 0.669012 | false |
KDE/pykde4 | examples/kdeuiExamples/kaboutapplicationdialog.py | 1 | 2937 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from PyQt4.QtCore import SIGNAL, Qt
from PyQt4.QtGui import QLabel, QSizePolicy
from PyKDE4.kdecore import i18n, ki18n, KAboutData
from PyKDE4.kdeui import KVBox, KHBox, KPushButton, KAboutApplicationDialog
helpText = """The KAboutApplicationDialog is normally displayed ... | gpl-2.0 | 8,162,753,217,201,841,000 | 30.580645 | 84 | 0.646578 | false |
caesar0301/omnilab-misc | OmniperfTools/perf_aem.py | 1 | 1492 | #!/usr/bin/env python
# Evaluating Activity-Entity model
#
# By chenxm
#
import os
import sys
import groundtruth
from PyOmniMisc.model.aem import AEM
def print_usage():
print("Usage: python exHttp.py <omniperf_trace>")
cut_gap = 8 # sec
def modelAEM(etrs):
print("Modeling AEM ...")
# Modeling traffic wi... | gpl-2.0 | 667,371,110,707,126,800 | 22.328125 | 74 | 0.605228 | false |
plotly/plotly.py | packages/python/plotly/plotly/validators/layout/xaxis/_categoryorder.py | 1 | 1151 | import _plotly_utils.basevalidators
class CategoryorderValidator(_plotly_utils.basevalidators.EnumeratedValidator):
def __init__(
self, plotly_name="categoryorder", parent_name="layout.xaxis", **kwargs
):
super(CategoryorderValidator, self).__init__(
plotly_name=plotly_name,
... | mit | 5,048,350,118,352,210,000 | 32.852941 | 79 | 0.435274 | false |
mercycorps/tola-activity | htdocs/activitydb/migrations/0035_auto_20151028_0057.py | 1 | 3568 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('activitydb', '0034_auto_20151027_1851'),
]
operations = [
migrations.AddField(
model_name='projectagreement',
... | gpl-2.0 | -8,942,267,121,895,962,000 | 41.47619 | 126 | 0.607623 | false |
SolarLune/SolHelp | BGE/bghelper/time.py | 1 | 1469 | __author__ = 'SolarLune'
from bge import logic
# Time-based mechanics.
class TimerBank():
def __init__(self):
self.time = 0.0
self.timers = {}
def add(self, timer_name):
self.timers[timer_name] = Timer()
def set(self, timer_name, time):
self.timers[timer_name].set(... | mit | 7,765,912,870,802,807,000 | 16.081395 | 74 | 0.530293 | false |
michael-afanasiev/specfemHelperScripts | setup_specfem_lasif.py | 1 | 11312 | #!/usr/bin/env python
import os, errno, shutil
import sys, subprocess
import argparse
import xml.etree.ElementTree as ET
class ParameterError(Exception):
pass
class PathError(Exception):
pass
class MesherNotRunError(Exception):
pass
class colours:
ylw = '\033[93m'
blu = '\033[94m'
... | gpl-2.0 | 1,261,488,015,305,045,000 | 32.368732 | 80 | 0.613419 | false |
Vettejeep/Boulder_County_Home_Prices | value_vs_price.py | 1 | 4101 | # Simply uses the assessors estimate to predict price, so we can see how much better the machine learning models are.
# requires data from Assemble_Data.py
# Copyright (C) 2017 Kevin Maher
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lice... | gpl-3.0 | 4,022,882,354,570,326,500 | 40.71875 | 117 | 0.718118 | false |
stvstnfrd/edx-platform | cms/djangoapps/contentstore/management/commands/git_export.py | 1 | 2578 | """
This command exports a course from CMS to a git repository.
It takes as arguments the course id to export (i.e MITx/999/2020 ) and
the repository to commit too. It takes username as an option for identifying
the commit, as well as a directory path to place the git repository.
By default it will use settings.GIT_R... | agpl-3.0 | -4,141,749,198,761,361,000 | 39.28125 | 137 | 0.671063 | false |
CiNC0/Cartier | cartier-python-resign-linux/tests/test_public_interface.py | 1 | 1352 | from isign_base_test import IsignBaseTest
import os
from os.path import exists
from isign import isign
import logging
log = logging.getLogger(__name__)
class TestPublicInterface(IsignBaseTest):
def _test_signable(self, filename, output_path):
self.resign(filename, output_path=output_path)
assert... | apache-2.0 | 6,229,180,489,206,329,000 | 31.190476 | 80 | 0.678994 | false |
paulmathews/nova | nova/openstack/common/rpc/amqp.py | 1 | 15162 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
# Copyright 2011 - 2012, Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
... | apache-2.0 | -1,366,094,623,838,141,700 | 34.591549 | 79 | 0.618388 | false |
chaddienhart/UdacityP4-GAE-API | conference.py | 1 | 29852 | #!/usr/bin/env python
"""
conference.py -- Udacity conference server-side Python App Engine API;
uses Google Cloud Endpoints
$Id: conference.py,v 1.25 2014/05/24 23:42:19 wesc Exp wesc $
created by wesc on 2014 apr 21
"""
__author__ = 'wesc+api@google.com (Wesley Chun)'
from datetime import datetime
import ... | apache-2.0 | 2,507,629,036,731,198,000 | 38.696809 | 116 | 0.630946 | false |
csparpa/pyowm | tests/integration/agroapi10/test_integration_soil_data.py | 1 | 1137 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
import os
from pyowm import owm
from pyowm.agroapi10.polygon import GeoPolygon
from pyowm.agroapi10.soil import Soil
class IntegrationTestsSoilData(unittest.TestCase):
__owm = owm.OWM(os.getenv('OWM_API_KEY', None))
def test_call_soil_data(self)... | mit | -6,533,728,216,020,760,000 | 24.266667 | 68 | 0.598065 | false |
pasquantonio/blackjack_terminal | src/blackjack.py | 1 | 20969 | #!/usr/bin/env python
import sqlite3
import argparse
import sys
import time
from player_class import Player, Fore, randint
from bot_player_class import BotPlayer
from dealer_class import Dealer
from deck_class import Deck
"""
Global Game Functions
"""
def create_players(p, bots, minimum, maximum):
""" Create and ap... | mit | -4,642,748,919,596,337,000 | 25.883333 | 73 | 0.611665 | false |
bellowsj/aiopogo | aiopogo/pogoprotos/settings/fort_settings_pb2.py | 1 | 5612 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: pogoprotos/settings/fort_settings.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf i... | mit | -1,978,980,154,719,400,700 | 43.896 | 641 | 0.722559 | false |
apmichaud/vitess-apm | py/zk/zkocc.py | 1 | 9075 | import itertools
import json
import logging
import os
import random
import threading
from net import bsonrpc
from net import gorpc
class ZkOccError(Exception):
pass
#
# the ZkNode dict returned by these structures has the following members:
#
# Path string
# Data string
# Stat ZkStat
# Children []strin... | bsd-3-clause | -6,605,538,623,471,355,000 | 29.867347 | 116 | 0.641102 | false |
yourlabs/django-cities-light | src/cities_light/tests/base.py | 1 | 2657 | """."""
import os
from unittest import mock
from django import test
from django.core import management
from django.conf import settings
class FixtureDir:
"""Helper class to construct fixture paths."""
def __init__(self, rel_path='', base_dir=None):
"""Class constructor.
params:
rel_... | mit | 8,972,758,104,204,965,000 | 31.402439 | 109 | 0.585247 | false |
marcofucci/mooshell | models.py | 1 | 9791 | from datetime import date, timedelta, datetime
import os
from django.db import models
from django.db.models.signals import pre_save, post_save
from django.contrib.auth.models import User
from django.conf import settings
from managers import JSDependencyManager, JSLibraryManager, PastieManager, ShellManager
def ne... | mit | 6,345,273,455,268,990,000 | 26.121884 | 126 | 0.704525 | false |
AusTac/parma | b3/pkg_handler.py | 1 | 4322 | #
# BigBrotherBot(B3) (www.bigbrotherbot.net)
# Copyright (C) 2005 Michael "ThorN" Thornton
#
# 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 opti... | gpl-2.0 | 8,140,766,433,042,558,000 | 36.591304 | 103 | 0.63975 | false |
xiedidan/luna-network | resnext/createGroundTruth.py | 1 | 1336 | # -*- coding:utf-8 -*-
import os
from glob import glob
import numpy as np
try:
import cPickle as pickle
except:
import pickle
# create label for resnext tests
# glob filename from nodules/, write label to groundTruths/
class GroundTruthCreator(object):
def __init__(self, dataPath, phrase = "train"):
... | gpl-3.0 | -5,242,850,325,965,492,000 | 30.069767 | 83 | 0.599551 | false |
langcog/wordbank | instruments/schemas/English_American_WG.py | 1 | 79336 | from django.db import models
from instruments.base import BaseTable
class English_American_WG(BaseTable):
item_1_choices = [('yes', 'yes'), ('no', 'no')]
item_1 = models.CharField(max_length=3, choices=item_1_choices, null=True)
item_2_choices = [('yes', 'yes'), ('no', 'no')]
item_2 = models.CharField... | gpl-2.0 | 4,795,566,595,396,682,000 | 79.218402 | 95 | 0.678746 | false |
cinemapub/bright-response | scripts/lib/tweepy/tweepy/models.py | 1 | 12175 | # Tweepy
# Copyright 2009-2010 Joshua Roesslein
# See LICENSE for details.
from tweepy.error import TweepError
from tweepy.utils import parse_datetime, parse_html_value, parse_a_href
class ResultSet(list):
"""A list like object that holds results from a Twitter API query."""
def __init__(self, max_id=None, s... | mit | -6,371,270,057,078,195,000 | 27.313953 | 84 | 0.55269 | false |
FEniCS/instant | test/test07.py | 1 | 1463 | from __future__ import print_function
import pytest
import numpy as N
import time
from instant import build_module
import sys
from functools import reduce
c_code = """
void func(int n1, double* array1, int n2, double* array2){
double a;
if ( n1 == n2 ) {
for (int i=0; i<n1; i++) {
a = arra... | gpl-3.0 | -8,838,894,799,438,679,000 | 24.666667 | 95 | 0.535885 | false |
nextmovesoftware/smilesreading | scripts/WeiningerCEX.py | 1 | 1431 | import subprocess
import common
cex = """$D<MOL>
/_P<molecule>
/_V<Molecule>
/_S<1M>
/_L<XSMILES>
/_X<Molecule represented in XSMILES (Exchange SMILES)>
|
$MOL<%s>
|
"""
def isAromaticSmiles(smi):
N = len(smi)
for i in range(N):
x = smi[i]
if x == ":": return True
... | bsd-2-clause | -1,685,238,090,709,962,200 | 27.8125 | 111 | 0.542278 | false |
shanot/imp | modules/rmf/test/test_geometry.py | 2 | 3590 | from __future__ import print_function
import unittest
import IMP.rmf
import IMP.test
import RMF
from IMP.algebra import *
class Tests(IMP.test.TestCase):
def _assert_same(self, h0, h1):
self.assertAlmostEqual(IMP.atom.get_mass(h0),
IMP.atom.get_mass(h1), delta=1)
se... | gpl-3.0 | 5,892,105,699,499,598,000 | 39.795455 | 84 | 0.523677 | false |
lowlevel86/wakefulness-forecaster | 03_PlanRendezvous/genRendezvous.py | 1 | 2962 | import sys
import datetime
import time
true = 1
false = 0
if len(sys.argv) != 5:
print("This program creates a wake up schedule for catching an appointment.")
print("Usage: ")
print("python genRendezvous.py [date] [time] [minutes until end] [lengthen 'l' or shorten 's' sleep-wake cycle]")
print("date format: yyyy-... | mit | 4,711,496,272,851,396,000 | 34.686747 | 114 | 0.755908 | false |
botstory/todo-bot | todo/tasks/task_story_helper.py | 1 | 1160 | from botstory.ast import story_context
from todo.tasks import tasks_document
async def current_task(ctx):
"""
get current task from ctx
:param ctx:
:return:
"""
task_id = story_context.get_message_data(ctx, 'option', 'matches')[0]
return await tasks_document.TaskDocument.objects.find_by_id... | mit | 5,986,695,735,030,772,000 | 23.166667 | 85 | 0.626724 | false |
melecptp/trivial_pursuit_quiz | app.py | 1 | 2745 | # -*- coding:utf8 -*-
# !/usr/bin/env python
# Copyright 2017 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... | apache-2.0 | 8,824,544,032,651,616,000 | 27.852632 | 113 | 0.686246 | false |
keras-team/keras-io | examples/nlp/semantic_similarity_with_bert.py | 1 | 11604 | """
Title: Semantic Similarity with BERT
Author: [Mohamad Merchant](https://twitter.com/mohmadmerchant1)
Date created: 2020/08/15
Last modified: 2020/08/29
Description: Natural Language Inference by fine-tuning BERT model on SNLI Corpus.
"""
"""
## Introduction
Semantic Similarity is the task of determining how simila... | apache-2.0 | 7,685,159,664,534,825,000 | 29.536842 | 100 | 0.687004 | false |
tdyas/pants | tests/python/pants_test/backend/jvm/tasks/test_jar_publish_integration.py | 1 | 16213 | # Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import os
import re
from pants.base.build_environment import get_buildroot
from pants.testutil.pants_run_integration_test import PantsRunIntegrationTest
from pants.util.contextutil import... | apache-2.0 | -3,961,776,824,487,096,300 | 42.119681 | 103 | 0.576266 | false |
yakky/django-localflavor | localflavor/us/forms.py | 1 | 4819 | """
USA-specific Form helpers
"""
from __future__ import absolute_import, unicode_literals
import re
from django.core.validators import EMPTY_VALUES
from django.forms import ValidationError
from django.forms.fields import Field, RegexField, Select, CharField
from django.utils.encoding import smart_text
from django.u... | bsd-3-clause | 2,101,800,050,063,301,000 | 33.92029 | 112 | 0.600332 | false |
rwl/PyCIM | CIM14/IEC61970/Core/ReportingGroup.py | 1 | 5830 | # Copyright (C) 2010-2011 Richard Lincoln
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to
# deal in the Software without restriction, including without limitation the
# rights to use, copy, modify, merge, publish... | mit | -2,979,352,487,377,241,600 | 39.486111 | 135 | 0.693139 | false |
f0rk/sigdebug | sigdebug/__init__.py | 1 | 1776 | # Copyright 2011 Ryan P. Kelly <rpkelly@cpan.org>
#
# This code was inspired by this thread on stackoverflow:
# http://stackoverflow.com/questions/132058/getting-stack-trace-from-a-running-python-application
#
# This code is BSD licensed, please see LICENSE for the full text.
import sys
import signal
import traceback
... | bsd-2-clause | 5,138,224,729,121,091,000 | 26.75 | 97 | 0.693131 | false |
mswart/acme-mgmtserver | acmems/storages.py | 1 | 2870 | import os
import os.path
from hashlib import sha384
from datetime import datetime, timedelta
from cryptography import x509
from cryptography.hazmat.backends import default_backend
from acmems.config import ConfigurationError
class StorageImplementor():
def __init__(self, type, name, options):
self.type ... | gpl-3.0 | -8,599,793,053,521,439,000 | 31.613636 | 140 | 0.613937 | false |
arthurtyukayev/python-safer | safer/api.py | 1 | 1255 | from requests import Session
SAFER_KEYWORD_URL = 'https://safer.fmcsa.dot.gov/keywordx.asp'
SAFER_QUERY_URL = 'https://safer.fmcsa.dot.gov/query.asp'
sess = Session()
sess.headers.update({
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'Accept-Encoding': 'gzip, deflate',
'Acc... | mit | 7,464,027,450,929,518,000 | 26.888889 | 102 | 0.603984 | false |
todatamining/textclassifiction | utility.py | 1 | 3762 | # -*- coding: utf-8 -*-
# Author: HW <todatamining@gmail.com>
# See LICENSE.txt for details.
#!/usr/bin/env python
import re
import os
import math
import sys
import pickle
from nltk.stem.wordnet import WordNetLemmatizer
import os.path,subprocess
lmtzr = WordNetLemmatizer()
this_dir,this_filename = os.path.split(os.pa... | gpl-2.0 | 8,074,592,267,643,158,000 | 28.559055 | 212 | 0.59057 | false |
derdmitry/socraticqs2 | mysite/mysite/urls.py | 1 | 1282 | from django.conf.urls import patterns, include, url
from django.apps import apps
from mysite.views import *
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns(
'',
(r'^$', home_page),
# Examples:
# url(r'^$', 'mysite.views.h... | apache-2.0 | -236,776,820,969,100,900 | 28.136364 | 72 | 0.614665 | false |
Eficent/odoo-operating-unit | sale_stock_operating_unit/models/sale.py | 1 | 2065 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2015 Eficent (<http://www.eficent.com/>)
# <contact@eficent.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero ... | agpl-3.0 | 5,402,796,366,250,727,000 | 38.711538 | 78 | 0.583051 | false |
Geoportail-Luxembourg/geoportailv3 | geoportal/geoportailv3_geoportal/lib/sw_helper.py | 1 | 1302 | import os
import glob
import time
UNUSED = '/static-ngeo/UNUSED_CACHE_VERSION/build/'
BUILD_PATH = '/app/geoportailv3_geoportal/static-ngeo/build'
def get_built_filenames(pattern):
return [os.path.basename(name) for name in glob.glob(BUILD_PATH + '/' + pattern)]
def get_urls(request):
main_js_url = UNUSED ... | mit | -468,138,615,993,281,700 | 30.756098 | 102 | 0.635177 | false |
arpho/mmasgis5 | mmasgis/pvListQueryBuilderBase.py | 1 | 2003 | from constants import *
class PvListQueryBuilderBase:
"""
@param utbs:[Utb]
"""
def __init__(self,utbs):
self.utbs=utbs
self.cons=cons
def usesIstat(self):
b=False
for u in self.utbs:
b=b or u.usesIstat()
return b
def usesCap(self):
b=False
for u in self.utbs:
b=b or u.usesCap()
return... | mit | -6,272,507,948,375,201,000 | 16.275862 | 62 | 0.612581 | false |
RayRuizhiLiao/ITK_4D | Wrapping/Generators/Python/Tests/GeodesicActiveContourImageFilter.py | 1 | 6544 | #==========================================================================
#
# Copyright Insight Software Consortium
#
# 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 | -4,370,467,138,431,609,300 | 31.906736 | 79 | 0.6386 | false |
amyxchen/openhtf | examples/example_plug.py | 1 | 3172 | # Copyright 2014 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 agre... | apache-2.0 | 4,989,892,666,170,478,000 | 36.761905 | 75 | 0.703972 | false |
csarn/qthexedit | docks/struct_explorer.py | 1 | 8347 | from PySide.QtCore import *
from PySide.QtGui import *
from construct import *
from construct.adapters import *
from math import *
from binascii import *
#from ..mmapslice import *
def red(cons):
cons.color = Qt.red
return cons
class TreeNode(object):
def __init__(self, value, row, parent, cons, name=""... | gpl-2.0 | 6,008,047,980,486,020,000 | 32.25498 | 107 | 0.5487 | false |
arnomoonens/DeepRL | yarll/agents/actorcritic/a3c.py | 1 | 4785 | # -*- coding: utf8 -*-
"""
Asynchronous Advantage Actor Critic (A3C)
Most of the work is done in `a3c_worker.py`.
Based on:
- Pseudo code from Asynchronous Methods for Deep Reinforcement Learning
- Tensorflow code from https://github.com/yao62995/A3C/blob/master/A3C_atari.py and
https://github.com/openai/universe-st... | mit | 1,326,070,416,083,443,700 | 37.58871 | 110 | 0.622989 | false |
synth3tk/the-blue-alliance | controllers/main_controller.py | 1 | 14227 | import os
import logging
import datetime
import webapp2
from google.appengine.api import memcache
from google.appengine.ext import ndb
from google.appengine.ext.webapp import template
import tba_config
from base_controller import CacheableHandler
from consts.event_type import EventType
from consts.notification_type ... | mit | 7,097,353,811,669,205,000 | 33.7 | 146 | 0.605258 | false |
brvnl/master | parser/ArticleOrganizer.py | 1 | 6740 | # encoding=utf8
from parser.Calendar import Calendar
from parser.Definitions import Definitions
import logging
import datetime
import csv
import sys
#======================================================================================
# This file contains classes to help on the organization of the files. The basic ... | gpl-3.0 | -3,853,865,321,979,589,000 | 36.45 | 106 | 0.544659 | false |
mdrasmus/spimap | test/scripts/old/test_hky.py | 1 | 1196 | import scipy
from scipy.linalg import expm, logm, eig
from scipy import dot
def makeQ(bgfreq, tsvratio):
a, c, g, t = bgfreq
y = c + t
r = a + g
p = r / y
b = 1. / (2*r*y * (1 + tsvratio))
ay = (r*y*tsvratio - a*g - c*t) / \
(2*(1.+tsvratio)*(y*a*g*p + r*c*t))
ar = p * ay
... | gpl-2.0 | 8,262,586,175,940,815,000 | 19.271186 | 48 | 0.4699 | false |
tommo/gii | support/waf/waflib/Tools/python.py | 1 | 17525 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2007-2010 (ita)
# Gustavo Carneiro (gjc), 2007
"""
Support for Python, detect the headers and libraries and provide
*use* variables to link C/C++ programs against them::
def options(opt):
opt.load('compiler_c python')
def configure(conf):
conf.load('compile... | mit | -1,669,416,766,679,091,500 | 31.453704 | 163 | 0.674579 | false |
linsalrob/bioinformatics | bin/translate_longest_orf.py | 1 | 1066 | """
Translate a sequence (eg. a metagenome) and print the longest ORF
"""
import sys
import os
from robseq import translate
from rob import read_fasta
from rob import rc
try:
faf = sys.argv[1]
size = int(sys.argv[2])
except:
sys.exit(sys.argv[0] + " <fasta file> <min orf size in amino acids>")
fa = r... | mit | 4,582,330,701,247,208,400 | 21.208333 | 73 | 0.54878 | false |
oneklc/dimod | dimod/reference/composites/higherordercomposites.py | 1 | 14849 | # Copyright 2018 D-Wave Systems Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 7,922,676,447,443,684,000 | 34.694712 | 94 | 0.608728 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.