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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
City-of-Bloomington/green-rental | requests/sessions.py | 2 | 19337 | # -*- coding: utf-8 -*-
"""
requests.session
~~~~~~~~~~~~~~~~
This module provides a Session object to manage and persist settings across
requests (cookies, auth, proxies).
"""
import os
from collections import Mapping
from datetime import datetime
from .compat import cookielib, OrderedDict, urljoin, urlparse, buil... | agpl-3.0 | -5,915,871,198,872,897,000 | 33.96745 | 115 | 0.597921 | false | 4.408801 | false | false | false |
wackou/smewt | smewt/plugins/mplayer.py | 1 | 6062 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Smewt - A smart collection manager
# Copyright (c) 2013 Nicolas Wack <wackou@smewt.com>
#
# Smewt 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 versio... | gpl-3.0 | -6,679,881,905,324,740,000 | 26.935484 | 95 | 0.537281 | false | 3.910968 | false | false | false |
CCLab/RS_ref | rawsalad/rs/downloader.py | 1 | 6114 | # -*- coding: utf-8 -*-
import csv
import codecs
from cStringIO import StringIO
from zipfile import ZipFile
# prepare a single csv file to download
def single_file( file_descr ):
from sqldb import Collection
# if it's a full collection - read it from server
endpoint = file_descr['endpoint']
try:
... | bsd-3-clause | 8,970,994,117,284,679,000 | 30.515464 | 88 | 0.59879 | false | 4.038309 | false | false | false |
mvaled/sentry | tests/sentry/event_manager/test_validate_data.py | 2 | 11866 | from __future__ import absolute_import
import pytest
from datetime import datetime, timedelta
from sentry.constants import MAX_VERSION_LENGTH, MAX_CULPRIT_LENGTH
from sentry.event_manager import EventManager
def validate_and_normalize(data):
manager = EventManager(data)
manager.normalize()
return manag... | bsd-3-clause | -6,071,634,786,977,189,000 | 31.688705 | 97 | 0.605343 | false | 3.472637 | true | false | false |
statsmaths/dtv-toolkit | dvt/annotate/face.py | 1 | 6960 | # -*- coding: utf-8 -*-
"""Annotators to detect and identify faces.
Identifying individuals in an image generally requires two distinct steps. The
first is detecting bounding boxes for faces in the image and the second is
identifying the faces themselves. Currently the most common method for doing
the second step is t... | gpl-3.0 | -4,533,968,722,167,638,000 | 33.626866 | 79 | 0.564368 | false | 4.325668 | false | false | false |
fastinetserver/portage-idfetch | pym/portage/tests/ebuild/test_spawn.py | 1 | 1811 | # Copyright 1998-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
import codecs
import errno
import sys
from portage import os
from portage import _encodings
from portage import _unicode_encode
from portage.tests import TestCase
class SpawnTestCase(TestCase):
def testLogfile... | gpl-2.0 | -539,961,618,045,426,800 | 34.509804 | 69 | 0.712314 | false | 3.462715 | true | false | false |
Usiteam/SignInApp | SignInApp/mainApp.py | 1 | 3685 | from __future__ import print_function
import sys, os, operator
from datetime import datetime
from flask import Flask, render_template, request, flash, redirect, url_for
from flask_sqlalchemy import SQLAlchemy
from SignInApp.models import Member
from SignInApp import db, app
import requests
import time
import json
impo... | mit | 789,266,873,622,816,300 | 48.810811 | 255 | 0.7327 | false | 3.447147 | false | false | false |
jhfnetboy/jlab | NLP/NLPTest/tt.py | 1 | 1850 | from flask import Flask
app = Flask(__name__)
from flask import request
@app.route('/')
def index():
user_agent = request.headers.get('User-Agent')
return " <p>Your browser is %s</p> " % user_agent
@app.route('/')
def index():
response = make_response(<h1>This document carries a cookie.</h1>)
respon... | gpl-3.0 | 2,836,046,146,170,532,000 | 21.655738 | 70 | 0.704052 | false | 2.047407 | false | false | false |
kobejean/tensorflow | tensorflow/contrib/data/python/kernel_tests/optimization/optimize_dataset_op_test.py | 1 | 4276 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,346,288,642,438,640,000 | 38.229358 | 80 | 0.682413 | false | 3.859206 | true | false | false |
conejoninja/xbmc-seriesly | servers/veevr.py | 1 | 2122 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# seriesly - XBMC Plugin
# Conector para videos externos de veevr
# http://blog.tvalacarta.info/plugin-xbmc/seriesly/
#------------------------------------------------------------
import urlparse,urllib2,urllib,re
import os
from co... | gpl-3.0 | 6,383,998,120,604,920,000 | 31.106061 | 91 | 0.560642 | false | 3.25 | false | false | false |
ghorn/debian-casadi | experimental/joel/nmpc_example.py | 1 | 2047 | #
# This file is part of CasADi.
#
# CasADi -- A symbolic framework for dynamic optimization.
# Copyright (C) 2010-2014 Joel Andersson, Joris Gillis, Moritz Diehl,
# K.U. Leuven. All rights reserved.
# Copyright (C) 2011-2014 Greg Horn
#
# CasADi is free software; you can... | lgpl-3.0 | 3,061,494,841,166,758,400 | 29.552239 | 84 | 0.644358 | false | 2.704095 | false | false | false |
wufangjie/dnn | optimizers.py | 1 | 11461 | import numpy as np
import theano
import theano.tensor as T
from operator import itemgetter
from dnn.utils import npt
_unpack = itemgetter('lr', 'm', 'nesterov', 'weight_decay')
# I didn't know how `weight_decay` work with `nesterov`,
# before or after, so did not add it
# NOTE: custom grads is powerful
# for example... | gpl-3.0 | -6,412,979,850,873,242,000 | 36.211039 | 80 | 0.496379 | false | 2.713947 | false | false | false |
schristakidis/p2ner | p2ner/components/produceroverlay/centralproducerclient/centralproducerclient/messages/peerremovemessage.py | 1 | 1519 | # -*- coding: utf-8 -*-
# Copyright 2012 Loris Corazza, Sakis Christakidis
#
# 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
#
# U... | apache-2.0 | 3,916,878,670,359,468,500 | 32.755556 | 79 | 0.695194 | false | 3.826196 | false | false | false |
lokhman/donkey | handlers/UploadHandler.py | 1 | 4032 | # This code is part of Donkey project.
#
# Copyright (c) 2014 Alexander Lokhman <alex.lokhman@gmail.com>
#
# 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 witho... | mit | -4,402,082,242,806,788,600 | 39.727273 | 112 | 0.601687 | false | 4.097561 | false | false | false |
OpenKMIP/PyKMIP | kmip/services/server/session.py | 1 | 14016 | # Copyright (c) 2016 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | apache-2.0 | -2,008,278,226,942,411,000 | 38.041783 | 79 | 0.537029 | false | 5.243547 | false | false | false |
ovidiub13/MoneyManager | old_django/mm_transactions/migrations/0020_auto_20141201_2342.py | 1 | 1339 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.utils.timezone import utc
import datetime
class Migration(migrations.Migration):
dependencies = [
('mm_transactions', '0019_auto_20141201_2338'),
]
operations = [
migrati... | gpl-3.0 | -1,332,852,561,255,281,400 | 32.475 | 111 | 0.59298 | false | 4.145511 | false | false | false |
tjcorona/PyFR | pyfr/partitioners/base.py | 1 | 8814 | # -*- coding: utf-8 -*-
from collections import Counter, defaultdict, namedtuple
import re
import uuid
import numpy as np
Graph = namedtuple('Graph', ['vtab', 'etab', 'vwts', 'ewts'])
class BasePartitioner(object):
# Approximate element weighting table
_ele_wts = {'quad': 3, 'tri': 2, 'tet': 2, 'hex': 6, ... | bsd-3-clause | 4,110,940,802,936,767,000 | 31.167883 | 76 | 0.519628 | false | 3.361556 | false | false | false |
fabiolapozyk/IncrementalFCM | Tesi/FCM/TestIncrementalFCM.py | 1 | 6941 | from FCM.Class_File_Manager import FileManager
from FCM.Class_SemiSupervisedFCM import SemiSupervisedFCM
import numpy
from FCM.Class_FCM import FuzzyCMeans
from FCM.Class_ValidityMeasures import ValidityMeasures
from numpy import zeros
from FCM.Class_DataManager import DataManager
from shutil import copyfile
im... | cc0-1.0 | 4,589,228,920,182,099,500 | 44.898649 | 178 | 0.511742 | false | 3.910423 | true | false | false |
rbuffat/pyidf | tests/test_airflownetworkmultizonesurfaceeffectiveleakagearea.py | 1 | 2169 | import os
import tempfile
import unittest
import logging
from pyidf import ValidationLevel
import pyidf
from pyidf.idf import IDF
from pyidf.natural_ventilation_and_duct_leakage import AirflowNetworkMultiZoneSurfaceEffectiveLeakageArea
log = logging.getLogger(__name__)
class TestAirflowNetworkMultiZoneSurfaceEffectiv... | apache-2.0 | 5,069,681,410,482,297,000 | 39.185185 | 156 | 0.726602 | false | 3.922242 | false | false | false |
obulpathi/reversecoin | reversecoin/peermanager.py | 1 | 1576 | #!/usr/bin/python
#
# Distributed under the MIT/X11 software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
import random
import logging
from node import Node
from connection import Connection
class PeerManager(object):
def __init__(self, node, mempool, chaind... | gpl-2.0 | 3,518,615,832,401,925,000 | 27.654545 | 137 | 0.592005 | false | 3.806763 | false | false | false |
bmcivor/lego_autono | testing/drive_by_keyboard.py | 1 | 1783 | import serial
import pygame
from pygame.locals import *
class RCTest(object):
"""
Testing over USB serial for commanding by keyboard
Baudrate: 115200
"""
def __init__(self):
pygame.init()
self.ser = serial.Serial('/dev/tty.usbmodem1421', 115200, timeout=1)
self.send_inst = ... | mit | 5,637,171,927,666,838,000 | 30.298246 | 76 | 0.453169 | false | 4.607235 | false | false | false |
saurabh6790/tru_app_back | stock/doctype/item/item.py | 1 | 13788 | # Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import webnotes
from webnotes.utils import cstr, flt
from webnotes.model.doc import addchild
from webnotes.model.bean import getlist
from webnotes i... | agpl-3.0 | -3,459,522,931,822,363,000 | 37.733146 | 160 | 0.682115 | false | 2.990241 | true | false | false |
dgaston/ddb-core | src/ddb/vcf_parsing.py | 1 | 20020 | import sys
from cyvcf2 import VCF
from collections import defaultdict
def parse_caller_vcfs(sample_dict, caller_list):
caller_vcf_records = defaultdict(lambda: dict())
for caller in caller_list:
parse_vcf(sample_dict[caller], caller, caller_vcf_records)
return caller_vcf_records
def parse_vcf(v... | mit | 6,511,467,164,804,854,000 | 37.873786 | 125 | 0.535864 | false | 3.16072 | false | false | false |
plotly/dash | tests/unit/dash/test_utils.py | 1 | 1291 | import pytest
import dash._utils as utils
def test_ddut001_attribute_dict():
a = utils.AttributeDict()
assert str(a) == "{}"
with pytest.raises(AttributeError):
a.k
with pytest.raises(KeyError):
a["k"]
assert a.first("no", "k", "nope") is None
a.k = 1
assert a.k == 1
... | mit | 7,956,223,080,381,842,000 | 20.163934 | 80 | 0.543765 | false | 3.195545 | true | false | false |
linea-it/qlf | backend/framework/qlf/dashboard/bokeh/qaskyR/main.py | 1 | 1653 | from bokeh.layouts import column
from bokeh.models.widgets import Div
from dashboard.bokeh.plots.descriptors.table import Table
from dashboard.bokeh.plots.descriptors.title import Title
from qlf_models import QLFModels
import logging
from bokeh.resources import CDN
from bokeh.embed import file_html
logger = logging... | gpl-3.0 | -2,452,421,775,622,480,000 | 32.734694 | 90 | 0.632789 | false | 3.791284 | false | false | false |
sigmunau/nav | python/nav/web/seeddb/utils/delete.py | 1 | 5262 | #
# Copyright (C) 2011, 2012 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under the
# terms of the GNU General Public License version 2 as published by the Free
# Software Foundation.
#
# This program is distributed in th... | gpl-2.0 | -30,177,170,893,115,988 | 34.795918 | 94 | 0.644242 | false | 4.316653 | false | false | false |
dmizverev/robot-framework-library | library/RabbitMqManager.py | 1 | 16205 | # -*- coding: utf-8 -*-
from robot.api import logger
from robot.utils import ConnectionCache
import httplib
import base64
import json
import socket
import urlparse
import urllib
class RabbitMqManager(object):
"""
Библиотека для управления сервером RabbitMq.
Реализована на основе:
... | apache-2.0 | -8,961,411,459,969,314,000 | 32.004556 | 177 | 0.531886 | false | 3.167409 | false | false | false |
xpansa/pmis | project_time_sequence/wizard/project_task_link_predecessors.py | 1 | 5198 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -3,120,828,668,976,359,400 | 32.973856 | 78 | 0.560985 | false | 3.844675 | false | false | false |
letouriste001/SmartForest_2.0 | python3.4Smartforest/lib/python3.4/site-packages/django/forms/boundfield.py | 1 | 8691 | from __future__ import unicode_literals
import datetime
from django.forms.utils import flatatt, pretty_name
from django.forms.widgets import Textarea, TextInput
from django.utils import six
from django.utils.encoding import (
force_text, python_2_unicode_compatible, smart_text,
)
from django.utils.html import con... | mit | -1,490,052,181,959,970,800 | 37.286344 | 101 | 0.594638 | false | 3.755834 | false | false | false |
lixiangning888/whole_project | modules/signatures_orignal/antisandbox_unhook.py | 1 | 2429 | # Copyright (C) 2014 Claudio "nex" Guarnieri (@botherder), Accuvant, Inc. (bspengler@accuvant.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 3 of the License, or
# (at you... | lgpl-3.0 | -8,615,286,524,992,537,000 | 40.87931 | 139 | 0.613421 | false | 4.028192 | false | false | false |
condac/openAST | encoderProgram/python/encode.py | 1 | 7641 | import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--hex", help="Input hex strings to decode Ex: 0xff, 0xde, 0xed")
parser.add_argument("--status-nr", help="Input the number status message counters (1-7)")
parser.add_argument("number", help="Number to encode to AMB format")
args = parser.parse_args... | gpl-2.0 | -5,742,609,467,280,605,000 | 28.616279 | 114 | 0.528465 | false | 3.509876 | false | false | false |
merchise-autrement/js.typeahead | js/typeahead/release.py | 1 | 1692 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#----------------------------------------------------------------------
# js.typeahead.release
#----------------------------------------------------------------------
# Copyright (c) 2013 Merchise Autrement and Contributors
# All rights reserved.
#
# This is free software; ... | gpl-3.0 | 6,673,004,006,695,134,000 | 28.684211 | 79 | 0.524232 | false | 4.283544 | false | false | false |
maxime-beck/compassion-modules | mobile_app_connector/models/product_template.py | 1 | 1211 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2018 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Nathan Fluckiger <nathan.fluckiger@hotmail.ch>
#
# The licence is in the file __m... | agpl-3.0 | -4,466,873,178,079,749,600 | 27.162791 | 78 | 0.563997 | false | 4.175862 | false | false | false |
Jorgesolis1989/SIVORE | corporaciones/forms.py | 1 | 2011 | from django import forms
from django.db.models import Q
from corporaciones.models import Corporacion , Sede
class FormularioRegistroCorporacion(forms.Form):
id_corporation = forms.IntegerField(
widget=forms.NumberInput(attrs={'class': 'form-control', 'placeholder': 'Escriba aquí el id de la corporación',... | apache-2.0 | -967,116,502,575,162,000 | 49.1 | 156 | 0.722916 | false | 3.37774 | false | false | false |
mostaphaRoudsari/Honeybee | src/Honeybee_Read EP HVAC Result.py | 1 | 20502 | #
# Honeybee: A Plugin for Environmental Analysis (GPL) started by Mostapha Sadeghipour Roudsari
#
# This file is part of Honeybee.
#
# Copyright (c) 2013-2020, Chris Mackey <Chris@MackeyArchitecture.com>
# Honeybee is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-3.0 | -7,509,848,813,792,237,000 | 53.672 | 319 | 0.557555 | false | 4.115215 | false | false | false |
seung-lab/Julimaps | src/archive/import/import_raw.py | 2 | 1809 | from PIL import Image
import numpy as np
import h5py
import os
import sys
import cv2
# Maybe consider implemeting more involved auto-balancing
# http://wiki.cmci.info/documents/120206pyip_cooking/python_imagej_cookbook#automatic_brightnesscontrast_button
def open(fn):
print "Opening " + fn
ext = os.path.splitext(fn... | mit | -4,979,593,202,505,728,000 | 31.890909 | 111 | 0.684356 | false | 2.421687 | false | false | false |
gems-uff/labsys | labsys/auth/forms.py | 1 | 1141 | from flask_wtf import FlaskForm
from wtforms import (
StringField,
PasswordField,
BooleanField,
SubmitField,
ValidationError, )
from wtforms.validators import (
InputRequired,
Length,
Email,
Regexp,
EqualTo, )
from .models import User
class LoginForm(FlaskForm):
email = St... | mit | -289,837,565,530,055,900 | 27.475 | 78 | 0.648815 | false | 4.097122 | false | false | false |
jasonjoh/python_clientcred | clientcreds/o365service.py | 1 | 21562 | # Copyright (c) Microsoft. All rights reserved. Licensed under the MIT license. See full license at the bottom of this file.
from urllib.parse import quote
import requests
import json
import base64
import logging
import uuid
import datetime
# Used for debug logging
logger = logging.getLogger('clientcreds')
# Set to F... | mit | 8,741,338,520,297,368,000 | 43.006122 | 133 | 0.652398 | false | 3.712466 | false | false | false |
Nico0084/domogik-plugin-daikcode | lib/daikin_encode.py | 1 | 26117 | # !/usr/bin/python
#-*- coding: utf-8 -*-
""" This file is part of B{Domogik} project (U{http://www.domogik.org}$
License
=======
B{Domogik} 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 t... | gpl-3.0 | 143,012,794,896,520,750 | 47.458101 | 198 | 0.516717 | false | 3.354215 | false | false | false |
rfreiberger/Automate-the-Boring-Stuff | ch12/readCensusExcel.py | 1 | 1368 | #! python3
# readCensusExcel.py - Tabulates population and number of census tracts for
# each country.
import openpyxl, pprint
print('Opening workbook...')
wb = openpyxl.load_workbook('censuspopdata.xlsx')
sheet = wb.get_sheet_by_name('Population by Census Tract')
countyData = {}
# TODO: Fill in countyDa... | bsd-2-clause | -2,487,376,632,478,316,000 | 34.972973 | 75 | 0.692251 | false | 3.060403 | false | false | false |
OpenBfS/dokpool-plone | Plone/src/docpool.rei/docpool/rei/vocabularies.py | 1 | 15956 | # - * - coding: utf - 8 -*-
from AccessControl.SecurityInfo import allow_module
from datetime import date
from docpool.base.utils import simplevoc_from_dict
from plone.app.vocabularies.terms import safe_simplevocabulary_from_values
from zope.interface import implementer
from zope.schema.interfaces import IVocabularyFac... | gpl-3.0 | 1,771,874,793,611,862,000 | 41.921622 | 269 | 0.590013 | false | 2.64155 | false | false | false |
alaycock/SmartMirror | hover_passthrough.py | 1 | 1514 | import time
import subprocess
from Hover_library import Hover
hover = Hover(address=0x42, ts=23, reset=24)
try:
while True:
# Check if hover is ready to send gesture or touch events
if (hover.getStatus() == 0):
# Read i2c data and print the type of gesture or touch event
... | mit | -2,635,708,966,747,891,000 | 32.644444 | 144 | 0.540291 | false | 4.301136 | false | false | false |
goedson/photogram | photogram/transitions/Fading.py | 1 | 1761 | ######################################################################
##
## Copyright (C) 2008, Goedson Teixeira Paixao
##
## 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 Softwar... | gpl-3.0 | 3,764,300,942,978,175,500 | 37.282609 | 81 | 0.605338 | false | 4.038991 | false | false | false |
jackylee0424/YCHack-MakeHAL9000 | software/bio_sensing/parsebio.py | 1 | 2147 | import sys
import serial
import time
import os
import requests
import json
import pickle
import thread
#block_list = []
block_dict = dict()
machine_name = "lee_raspi"
if not os.path.exists("data"):
os.makedirs("data")
# remove old block
#if os.path.exists(os.path.join('data', "block.blk")):
# os.remove(os.pa... | mit | -4,227,737,070,311,292,400 | 24.559524 | 79 | 0.639031 | false | 2.839947 | false | false | false |
mstriemer/app-validator | appvalidator/testcases/markup/markuptester.py | 1 | 14070 | import re
import sys
import types
import appvalidator.unicodehelper as unicodehelper
from . import csstester
from appvalidator.contextgenerator import ContextGenerator
from appvalidator.constants import *
from appvalidator.csp import warn as message_csp
from appvalidator.python.HTMLParser import HTMLParser, HTMLParseE... | bsd-3-clause | 1,852,482,419,625,960,000 | 38.083333 | 81 | 0.526866 | false | 4.452532 | true | false | false |
CiscoSystems/quantum | neutron/db/agentschedulers_db.py | 1 | 16849 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2013 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-2.0 | 4,101,647,497,623,560,700 | 41.982143 | 79 | 0.578966 | false | 4.13777 | false | false | false |
nephila/djangocms-installer | djangocms_installer/install/__init__.py | 1 | 5269 | import logging
import os.path
import shutil
import subprocess
import sys
from djangocms_installer.utils import query_yes_no
logger = logging.getLogger("")
def check_install(config_data):
"""
Here we do some **really** basic environment sanity checks.
Basically we test for the more delicate and failing-... | bsd-3-clause | 5,813,255,974,248,857,000 | 36.906475 | 117 | 0.609224 | false | 4.161927 | true | false | false |
xcomponent/ReactiveXComponent.py | reactivexcomponent/tests/unit/configuration_test.py | 1 | 2484 | import unittest
import os
from reactivexcomponent.configuration.api_configuration import APIConfiguration
class TestConfiguration(unittest.TestCase):
def setUp(self):
self.configuration = APIConfiguration(
os.path.join("tests", "unit", "data", "WebSocket_NewDevinetteApi_test.xcApi"))
de... | apache-2.0 | 8,297,352,828,649,375,000 | 44.163636 | 125 | 0.681562 | false | 4.18887 | true | false | false |
nakagami/reportlab | docs/userguide/ch1_intro.py | 1 | 22431 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
__version__ = '$Id: ch1_intro.py 3960 2012-09-27 15:22:33Z guillaume $'
from tools.docco.rl_doc_utils import *
from reportlab.platypus.tableofcontents import TableOfContents
from datetime import datetime
import reportlab
title("ReportLab P... | bsd-3-clause | -5,239,754,640,853,911,000 | 41.398866 | 331 | 0.757591 | false | 3.800237 | true | false | false |
jeffeb3/YunThermostat | linux/thermostat/settings.py | 1 | 3522 |
# A place to store all the settings in a thread-safe (blocking) way.
#
# Settings just for the thermostat, of course.
import copy
import json
import threading
# ------- Module Data (Singletonish) -------
settingsLock = threading.RLock()
# Don't read this directly, use the methods below.
settings = {}
DAYS = ["Sund... | gpl-2.0 | -5,271,451,406,709,900,000 | 28.107438 | 85 | 0.642817 | false | 3.878855 | false | false | false |
erdc/proteus | proteus/TransportCoefficients.py | 1 | 506320 | """
Classes for implementing the coefficients of transport equations.
TC_base defines the interface. The classes derived from TC_base in
this module define common PDE's.
.. inheritance-diagram:: proteus.TransportCoefficients
:parts: 1
"""
from __future__ import print_function
from __future__ import absolute_import... | mit | -4,533,687,364,924,162,600 | 49.305017 | 243 | 0.357572 | false | 4.364978 | false | false | false |
ProgVal/Supybot-website | dpaste/highlight.py | 1 | 1261 | from pygments.lexers import get_all_lexers, get_lexer_by_name, guess_lexer
from pygments.styles import get_all_styles
from pygments.formatters import HtmlFormatter
from pygments.util import ClassNotFound
from pygments import highlight
LEXER_LIST_ALL = sorted([(i[1][0], i[0]) for i in get_all_lexers()])
LEXER_LIST = (
... | bsd-3-clause | -8,400,419,238,461,352,000 | 28.325581 | 86 | 0.620936 | false | 3.398922 | false | false | false |
arunkgupta/gramps | gramps/gui/editors/editsource.py | 1 | 12217 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2000-2006 Donald N. Allingham
# Copyright (C) 2009 Gary Burton
# Copyright (C) 2011 Tim G L Lyons
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published ... | gpl-2.0 | 6,801,621,006,899,222,000 | 41.127586 | 82 | 0.508717 | false | 4.369456 | false | false | false |
TejasM/wisely | wisely_project/users/forms.py | 1 | 1348 | from django import forms
from django.forms.extras.widgets import SelectDateWidget
from models import UserProfile, User
class UserProfileForm(forms.ModelForm):
picture = forms.ImageField(help_text="Please select a profile image to upload.", required=False)
current_city = forms.CharField(help_text="Please ente... | mit | -145,124,142,761,235,870 | 36.444444 | 114 | 0.667656 | false | 4.011905 | false | false | false |
magnunleno/calangohc | pelicanconf.py | 1 | 3291 | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = 'Calango'
SITENAME = 'Calango Hacker Club'
SITEURL = ''
PATH = 'content'
TIMEZONE = 'America/Sao_Paulo'
DEFAULT_LANG = 'pt'
ARTICLE_URL = 'blog/{slug}'
ARTICLE_SAVE_AS = 'blog/{slug}/index.html'
PAGE_URL = '{slug}'
PA... | gpl-3.0 | 8,623,926,174,115,135,000 | 24.703125 | 117 | 0.632827 | false | 2.9375 | false | false | false |
smart-classic/smart_ui_server | indivo_client_py/lib/iaux.py | 1 | 3555 |
class Reserved:
port = 'port'
host = 'host'
scheme = 'scheme'
default_port = 'default_port'
consumer_key = 'consumer_key'
consumer_secret = 'consumer_secret'
oauth_token = 'oauth_token'
oauth_token_secret = 'oauth_token_secret'
parameters = 'parameters'
... | apache-2.0 | 1,534,872,120,277,388,800 | 24.948905 | 72 | 0.512799 | false | 3.761905 | false | false | false |
HewlettPackard/oneview-ansible | test/test_oneview_drive_enclosure.py | 1 | 6775 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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/licen... | apache-2.0 | -3,338,548,277,672,912,000 | 32.539604 | 130 | 0.66524 | false | 3.355622 | true | false | false |
shantanu561993/FAndR | FindAndReplace/FindAndReplace.py | 1 | 1486 | # -*- coding: utf-8 -*-
# !/usr/bin/env python
from __future__ import print_function
import os
import shutil
import fnmatch
def replace_text(file_path, find_text, replacetext, file_regexp="", backup=False):
if type(file_path) != str or type(find_text) != str or type(replacetext) != str:
raise Exception("... | bsd-3-clause | -2,477,937,470,189,473,300 | 39.189189 | 99 | 0.615747 | false | 3.572115 | false | false | false |
ChrisThoung/national-rail | setup.py | 1 | 2385 | # -*- coding: utf-8 -*-
# For Python 2 compatibility
from __future__ import print_function
import csv
import os
from setuptools import setup
# Specify the file of station codes, available from:
# http://www.nationalrail.co.uk/stations_destinations/48541.aspx
station_codes = 'station_codes.csv'
# Write station code... | bsd-3-clause | -1,644,865,486,873,184,300 | 28.444444 | 74 | 0.634382 | false | 3.461538 | false | false | false |
pernici/sympy | sympy/core/__init__.py | 1 | 1121 | """Core module. Provides the basic operations needed in sympy.
"""
from sympify import sympify
from cache import cacheit
from basic import Basic, Atom, C
from singleton import S
from expr import Expr, AtomicExpr
from symbol import Symbol, Wild, Dummy, symbols, var, Pure
from numbers import Number, Real, Rational, Inte... | bsd-3-clause | -444,027,799,004,355,500 | 32.969697 | 77 | 0.76628 | false | 3.525157 | false | true | false |
parag2489/keras_superpixel_pooling | utils/vis_utils.py | 1 | 3493 | """Utilities related to model visualization."""
import os
try:
# pydot-ng is a fork of pydot that is better maintained.
import pydot_ng as pydot
except ImportError:
# Fall back on pydot if necessary.
try:
import pydot
except ImportError:
pydot = None
def _check_pydot():
if not... | mit | 7,753,939,550,123,792,000 | 31.95283 | 92 | 0.574864 | false | 3.937993 | false | false | false |
stuycs-softdev-fall-2013/proj3-7-cartwheels | website/urls.py | 1 | 1252 | from website import app, views
# Home and search
app.add_url_rule('/', view_func=views.index)
app.add_url_rule('/search', view_func=views.search_results)
# Carts
app.add_url_rule('/carts/<cid>', view_func=views.cart_page, methods=['GET', 'POST'])
app.add_url_rule('/carts/<cid>/menu', view_func=views.menu_page, method... | bsd-3-clause | 1,223,634,340,213,656,000 | 43.714286 | 96 | 0.688498 | false | 2.807175 | false | true | false |
MuckRock/muckrock | muckrock/squarelet/tasks.py | 1 | 1354 | """Celery tasks for squarelet app"""
# Django
from celery.task import task
# Standard Library
import logging
import sys
# Third Party
import requests
# MuckRock
from muckrock.accounts.models import Profile
from muckrock.core.utils import squarelet_get
from muckrock.organization.models import Organization
logger = l... | agpl-3.0 | 3,230,720,471,216,331,000 | 30.488372 | 86 | 0.64771 | false | 3.699454 | false | false | false |
0--key/lib | portfolio/2009_GoogleAppEngine/apps/OvivoStaff/concept.py | 1 | 1177 | import os, logging, md5, jinja2
import wsgiref.handlers
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.api import datastore
from google.appengine.ext import db
from google.appengine.api import users
from models import Company
from google.appengine.api impo... | apache-2.0 | -5,997,171,795,321,343,000 | 39.586207 | 104 | 0.721325 | false | 3.884488 | false | false | false |
dceresoli/AtomPy | plot_atom.py | 1 | 1540 | #!/usr/bin/env python
# AtomPy - atomic calcalations in python
# Copyright (C) 2010 Davide Ceresoli <dceresoli@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 version 3 of the Licen... | gpl-2.0 | -1,905,904,668,701,169,200 | 25.551724 | 90 | 0.718182 | false | 3.043478 | false | false | false |
CaiJiJi/Test | burp.py | 1 | 1749 | #!/url/bin/env python
# -*- coding: UTF-8 -*-
import urllib2
import urllib
import sys
import argparse
import threading
#headers = {"Content-Type":"application/x-www-form-urlencoded",
# "Connection":"Keep-Alive",
# "Referer":"http://www.baidu.com/"};
def BurpShell(host, password):
global h... | gpl-2.0 | -3,973,588,263,690,421,000 | 29.527273 | 81 | 0.54735 | false | 3.266537 | false | false | false |
Azure/WALinuxAgent | azurelinuxagent/daemon/main.py | 1 | 7285 | # Microsoft Azure Linux Agent
#
# Copyright 2018 Microsoft Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 5,402,407,201,127,245,000 | 39.027473 | 125 | 0.659712 | false | 3.980874 | false | false | false |
pedrotgn/pyactor | examples/Remote/s4_clientb.py | 1 | 1181 | """
Remote example with registry. CLIENT 2
@author: Daniel Barcelona Pons
"""
from pyactor.context import set_context, create_host, sleep, shutdown
from s4_registry import NotFound
class Server(object):
_ask = {'add', 'wait_a_lot'}
_tell = {'subtract'}
def add(self, x, y):
return x + y
def ... | lgpl-3.0 | -5,592,099,580,019,593,000 | 23.604167 | 73 | 0.563082 | false | 3.423188 | false | false | false |
eckardm/archivematica | src/dashboard/src/components/filesystem_ajax/views.py | 1 | 35413 | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the ... | agpl-3.0 | -8,081,688,574,389,084,000 | 41.769324 | 254 | 0.635925 | false | 4.083132 | false | false | false |
azumimuo/family-xbmc-addon | plugin.video.specto/resources/lib/sources/watch1080p_mv.py | 1 | 4257 | # -*- coding: utf-8 -*-
'''
Specto Add-on
Copyright (C) 2015 lambda
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 l... | gpl-2.0 | 6,371,464,794,726,099,000 | 39.542857 | 180 | 0.55673 | false | 3.811101 | false | false | false |
aluminiumgeek/cc-telegram | modules/user_img.py | 1 | 4170 | import json
import base64
import requests
from datetime import datetime, timedelta
from requests.exceptions import RequestException
from modules.utils.data import prepare_binary_from_url
def check_store(bot, url):
if bot.store:
return bot.store.get(url)
def response(bot, message, chat_id):
setattr(... | gpl-3.0 | -255,017,381,712,954,400 | 35.902655 | 229 | 0.595923 | false | 3.619792 | false | false | false |
geodynamics/spatialdata | spatialdata/spatialdb/generator/GenSimpleDBApp.py | 1 | 4028 | # ======================================================================
#
# Brad T. Aagaard, U.S. Geological Survey
#
# This code was developed as part of the Computational Infrastructure
# for Geodynamics (http://geodynamics.org).
#
# Copyright (c) 2010-2017 University of California, Davis
#
# See COPYING for license... | mit | 6,951,289,881,061,727,000 | 29.059701 | 120 | 0.540467 | false | 4.662037 | false | false | false |
cclauss/Pythonista_ui | TicTacToe.py | 1 | 8791 | # coding: utf-8
# Set HUMAN_WANTS_TO_PLAY to True to try to beat the computer
# Set HUMAN_WANTS_TO_PLAY to False to have the computer play against itself
HUMAN_WANTS_TO_PLAY = False
'''
http://en.m.wikipedia.org/wiki/Tic-tac-toe#Strategy
'X' or 'O') Win
'Draw') Draw
6) Block
5) Fork
... | apache-2.0 | 1,128,628,959,332,641,800 | 37.388646 | 94 | 0.533386 | false | 3.345129 | false | false | false |
allisnone/pytrade | tradeFee.py | 1 | 10774 | # -*- coding:utf-8 -*-
from numpy import save
#SURVEILLANT_FEE=0.0002 #buy and sell,证券监管费
#TRADE_HANDLE_FEE_A=0.000487 #buy and sell,沪深交易所,交易经手费
#TRADE_TRANSFER_FEE_A=0.0002 #buy and sell, 中国结算公司,交易过户费
#TRADE_FEE_B=0.000001 #buy and sell
#TRADE_FEE_FUND=0.0000975 #buy and sell
#TRADE_FEE_QUANZHENG=... | gpl-2.0 | 4,868,406,268,023,733,000 | 28.418919 | 116 | 0.678738 | false | 1.866473 | false | false | false |
SKA-ScienceDataProcessor/RC | MS6/visualize/html_plotter.py | 1 | 24686 | #!/usr/bin/python
"""
Program for creating HTML plots
"""
import os
import sys
import json
import time
from readevtlog import *
def write_prefix():
f.write('''
<!doctype html>
<html>
<head>
<title>DNA performance report</title>
<script src="http://code.jquery.com/jquery-latest.min.js"></script>
<script src... | apache-2.0 | 372,488,346,189,038,460 | 34.880814 | 119 | 0.503403 | false | 3.388607 | false | false | false |
nasonfish/algebra-py | linear.py | 1 | 1168 | """
This program is free and open source, released into the public domain.
Daniel Barnes http://nasonfish.com/
A library for linear equation operations, specifically
designed for linear_programming.py
Here, you can create an object simply by passing an
equation in the form ax+by>=c to the __init__ function.
The op... | unlicense | 3,831,743,989,059,726,000 | 24.391304 | 122 | 0.598459 | false | 2.814458 | false | false | false |
lyst/shovel | src/shovel/cli.py | 1 | 2412 | # -*- coding: utf-8 -*-
import argparse
import logging
import sys
from textwrap import dedent
from shovel import shovel
class Shovel(object):
def __init__(self):
parser = argparse.ArgumentParser(
description='High level library for storing and retrieving datasets from cloud stores',
... | apache-2.0 | -6,937,234,012,985,612,000 | 32.971831 | 99 | 0.59204 | false | 4.45841 | false | false | false |
greschd/kdotp-symmetry | tests/test_repr_utils.py | 1 | 2880 | # © 2017-2018, ETH Zurich, Institut für Theoretische Physik
# Author: Dominik Gresch <greschd@gmx.ch>
"""
Tests for utilities handling matrix representations of symmetries.
"""
import pytest
import sympy as sp
from kdotp_symmetry._repr_utils import frobenius_product, hermitian_basis, hermitian_to_vector
SIGMA_0 = s... | apache-2.0 | 6,424,822,430,358,461,000 | 34.975 | 94 | 0.431897 | false | 3.107991 | true | false | false |
DesertBot/DesertBot | desertbot/modules/commands/Find.py | 1 | 1787 | """
Created on May 20, 2014
@author: StarlitGhost
"""
import re
from twisted.plugin import IPlugin
from zope.interface import implementer
from desertbot.message import IRCMessage
from desertbot.moduleinterface import IModule
from desertbot.modules.commandinterface import BotCommand
from desertbot.response import IRC... | mit | 6,493,119,811,760,194,000 | 32.092593 | 98 | 0.645775 | false | 4.146172 | false | false | false |
romain-li/edx-platform | lms/djangoapps/courseware/access.py | 1 | 31999 | """
This file contains (or should), all access control logic for the courseware.
Ideally, it will be the only place that needs to know about any special settings
like DISABLE_START_DATES.
Note: The access control logic in this file does NOT check for enrollment in
a course. It is expected that higher layers check f... | agpl-3.0 | -2,278,162,162,872,042,200 | 34.833147 | 120 | 0.668177 | false | 4.128371 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/python/tvm/relay/ty.py | 1 | 8899 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 200,934,570,441,411,940 | 25.723724 | 79 | 0.603888 | false | 4.223541 | false | false | false |
Eric89GXL/mnefun | mnefun/_viz.py | 1 | 17918 | """Visualization helpers."""
from contextlib import contextmanager
import copy
import os.path as op
import numpy as np
from scipy import linalg
from mne import read_proj, read_events, pick_types
from mne.utils import verbose
from mne.viz.utils import tight_layout, plt_show
from ._sss import compute_good_coils
from ... | bsd-3-clause | 6,653,390,141,719,721,000 | 39.630385 | 79 | 0.589017 | false | 3.192801 | false | false | false |
PaulioSirvero/py-psyched | project/textual_water_marker.py | 1 | 25915 | #!/usr/bin/env python
"""
This code is copyrighted work by Paul Williams.
Distributed under the BSD-3-Clause license available:
https://opensource.org/licenses/BSD-3-Clause
"""
from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from random import randint
class WaterMarkerTypeError(TypeEr... | bsd-3-clause | 7,081,446,435,061,878,000 | 27.922991 | 72 | 0.579626 | false | 4.31557 | false | false | false |
LazySix/mymenu | mymenu/restaurant/migrations/0008_auto__add_bill.py | 1 | 4676 | # -*- 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):
# Adding model 'Bill'
db.create_table(u'restaurant_bill', (
(... | gpl-2.0 | 8,231,291,531,271,555,000 | 56.036585 | 159 | 0.551967 | false | 3.725896 | false | false | false |
ARTbio/tools-artbio | tools/mircounts/mature_mir_gff_translation.py | 1 | 4544 | import argparse
from datetime import datetime
def Parser():
the_parser = argparse.ArgumentParser()
the_parser.add_argument(
'--gff_path', action="store", type=str,
help="path to miRBase GFF3 file")
the_parser.add_argument(
'--output', action="store", type=str,
help="output ... | mit | 2,417,046,335,661,878,300 | 40.688073 | 77 | 0.502421 | false | 3.250358 | false | false | false |
p-slash/PythonAudio | tutorial scripts/freq-detect2.py | 1 | 1297 | #!/usr/bin/env python
# Read in a WAV and find the freq's
import wave
import sys
import numpy as np
import matplotlib.pyplot as plt
chunk = 2048
# open up a wave
wf = wave.open(sys.argv[1], 'rb')
swidth = wf.getsampwidth()
RATE = wf.getframerate()
# use a Blackman window
window = np.blackman(chunk)
# read som... | gpl-2.0 | -7,100,600,169,539,718,000 | 27.195652 | 91 | 0.605243 | false | 2.981609 | false | false | false |
jffm/pyanalyzer | metrics/HalsteadLength.py | 1 | 1907 | # Copyright (c) 2008-2009 Junior (Frederic) FLEURIAL MONFILS
#
# This file is part of PyAnalyzer.
#
# PyAnalyzer 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
# (a... | gpl-3.0 | 6,930,924,378,174,164,000 | 34.673077 | 76 | 0.679601 | false | 3.271012 | false | false | false |
slackhq/python-slackclient | tutorial/PythOnBoardingBot/async_app.py | 1 | 5520 | import os
import logging
import asyncio
import ssl as ssl_lib
import certifi
from slack_sdk.web import WebClient
from slack_sdk.rtm import RTMClient
from onboarding_tutorial import OnboardingTutorial
"""This file serves as an example for how to create the same app, but running asynchronously."""
# For simplicity we... | mit | -7,436,572,002,560,865,000 | 35.8 | 96 | 0.694203 | false | 3.734777 | false | false | false |
Brett55/moto | moto/ecs/responses.py | 1 | 12105 | from __future__ import unicode_literals
import json
from moto.core.responses import BaseResponse
from .models import ecs_backends
class EC2ContainerServiceResponse(BaseResponse):
@property
def ecs_backend(self):
"""
ECS Backend
:return: ECS Backend object
:rtype: moto.ecs.mo... | apache-2.0 | -7,829,434,111,432,760,000 | 37.674121 | 125 | 0.605122 | false | 4.208971 | false | false | false |
anakinsolo/backend | Lib/site-packages/venusian-1.0-py2.7.egg/venusian/advice.py | 1 | 2846 | ##############################################################################
#
# Copyright (c) 2003 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
# THIS SO... | mit | -5,566,342,791,102,429,000 | 36.946667 | 79 | 0.66163 | false | 3.969317 | false | false | false |
deepmind/dm_hard_eight | setup.py | 1 | 2206 | # Copyright 2020 DeepMind Technologies Limited. 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 a... | apache-2.0 | -3,531,367,304,449,295,400 | 35.766667 | 78 | 0.62874 | false | 4.351085 | false | false | false |
gbrammer/pabeta | driz_tools/vis_driz.py | 1 | 6050 | from drizzlepac import astrodrizzle, tweakreg, tweakback
from stwcs import updatewcs
import glob, os, shutil
from astropy.io import fits
from multiprocessing import Pool
from stsci.tools import teal
import argparse
def parse_args():
"""Parse command line arguments.
Parameters:
Nothing
Returns:
... | mit | 4,910,934,108,252,592,000 | 31.702703 | 107 | 0.597355 | false | 3.376116 | false | false | false |
markflyhigh/incubator-beam | sdks/python/apache_beam/examples/complete/tfidf.py | 1 | 8667 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | 6,701,466,834,010,000,000 | 38.940092 | 80 | 0.664705 | false | 3.707015 | false | false | false |
dieterich-lab/riboseq-utils | vars/simulate_data.py | 1 | 28958 | ######################################################################
# This file is an ad hoc script used to simulate data for the b-tea
# pipeline. TE can be estimated using a simulation approach based on
# modifying real data to introduce differences in RNA/RFP data.
# This script uses samtools to subsample exist... | mit | 4,468,393,841,472,886,000 | 44.03577 | 98 | 0.604841 | false | 3.600846 | false | false | false |
5monkeys/content-io | cio/pipeline/pipes/plugin.py | 1 | 2075 | # coding=utf-8
from __future__ import unicode_literals
from .base import BasePipe
from ...conf.exceptions import ImproperlyConfigured
from ...node import empty
from ...plugins import plugins
from ...plugins.exceptions import UnknownPlugin
class PluginPipe(BasePipe):
def render_response(self, response):
... | bsd-3-clause | 9,094,763,526,467,091,000 | 29.970149 | 117 | 0.559036 | false | 4.905437 | false | false | false |
ThePowderToy/The-Powder-Toy | .github/get-type.py | 1 | 1228 | import base64
import re
import sys
ref = sys.argv[1]
match_stable = re.match(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)', ref)
match_snapshot = re.match(r'refs/tags/snapshot-([0-9]+)', ref)
if match_stable:
print('::set-output name=TYPE::stable')
print('::set-output name=NAME::v%s.%s.%s' % (match_stable.group(1), ma... | gpl-3.0 | -2,806,000,864,566,309,000 | 52.391304 | 253 | 0.67671 | false | 2.663774 | false | true | false |
SwagKingTenK/VimSearch | plugin/vimSearch.py | 1 | 1552 | try:
import requests
import vim
import json
except Exception:
print("Error occurred while importing dependencies.")
URL = ["http://api.duckduckgo.com/?q=", "&format=json&t=VimSearch"]
def setUrl(query):
URL.insert(1, query)
return ''.join(URL)#Return a string of the final URL (list to str)
d... | mit | 1,079,010,468,318,620,800 | 28.283019 | 74 | 0.639175 | false | 3.567816 | false | false | false |
LK/Plato | plato-server/main.py | 1 | 1544 | import argparse
import logging
from server import EnvironmentServer, WeightServer
import signal
import sys
from torch.multiprocessing import Lock
def main():
logging.basicConfig(format='%(asctime)s [%(levelname)s] %(message)s',
datefmt='%m/%d/%Y %I:%M:%S %p', level=logging.INFO)
parser = arg... | mit | -8,134,490,152,090,467,000 | 29.9 | 95 | 0.667746 | false | 3.650118 | false | false | false |
hdm-dt-fb/rvt_model_services | commands/detect_str_col_changes_no_ws/data_handler.py | 1 | 1385 | import os
import re
from pathlib import Path
from . import elem_compare
from notify.email import send_mail
from utils import dir_purger
def data_pickup_and_compare(project_code):
model_path = os.environ["RVT_QC_PATH"]
model_title = os.path.basename(model_path).split(".rvt")[0]
re_string = r"\d{8}_\d{4}_... | mit | 7,602,985,594,855,279,000 | 31.97619 | 80 | 0.633935 | false | 3.386308 | false | false | false |
Ecogenomics/GTDBNCBI | scripts_dev/plot_genome_msa_stats.py | 1 | 6622 | #!/usr/bin/env python
###############################################################################
# #
# This program is free software: you can redistribute it and/or modify #
# it under the terms of the GNU General Public License... | gpl-3.0 | -5,967,608,435,753,648,000 | 37.057471 | 118 | 0.530957 | false | 3.881594 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.