repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ralphm/udplog | udplog/scribe.py | 2 | 4622 | # Copyright (c) Mochi Media, Inc.
# Copyright (c) Ralph Meijer.
# See LICENSE for details.
"""
Asynchronous Scribe client support.
This provides a Twisted based Scribe client with an asynchronous interface for
sending logs and a consumer for L{udplog.twisted.DispatcherFromUDPLogProtocol}.
"""
from __future__ import ... | mit | -4,296,543,714,192,888,300 | 27.530864 | 79 | 0.625054 | false | 4.46139 | false | false | false |
chteuchteu/Simple-Backup-Script | backup.py | 1 | 10886 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Easy & simple yet flexible backup script """
import sys
import os
import argparse
import time
import socket
import traceback
import json
import plugins
import targets
from utils.stdio import CRESET, CBOLD, LGREEN, CDIM, LWARN
__author__ = 'Quentin Stoeckel'
__copyrig... | gpl-2.0 | -7,297,012,608,493,930,000 | 33.55873 | 127 | 0.591861 | false | 3.93992 | true | false | false |
fishilico/shared | java/keystore/parse_pkcs12.py | 1 | 24506 | #!/usr/bin/env python
# -*- coding:UTF-8 -*-
# Copyright (c) 2019 Nicolas Iooss
#
# 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
... | mit | -6,064,908,502,802,874,000 | 44.465677 | 182 | 0.634171 | false | 3.506367 | false | false | false |
CSCSI/Lost-Visions | lost_visions/ajax.py | 1 | 3140 | from lost_visions import forms
from lost_visions.utils.flickr import getImageTags
from lost_visions.views import get_random_image_data
from dajaxice.utils import deserialize_form
__author__ = 'ubuntu'
from dajax.core import Dajax
from dajaxice.decorators import dajaxice_register
def get_an_image():
# assume a ... | apache-2.0 | -2,239,828,213,102,041,900 | 23.539063 | 56 | 0.595223 | false | 3.540023 | false | false | false |
Mikkyo/heuristic_PRD | models/TaskDAG.py | 1 | 3716 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# --- Import Area
from enums.TaskStatus import TaskStatus
class TaskDAG:
"""Class to represent a DAG [Direct Acyclic Graph] for a Task"""
# --- Attributes
# Private
_tasks = None # All the tasks
# Constants
# --- Constructor
def __init__(self, ... | gpl-3.0 | -1,933,901,351,726,349,300 | 26.525926 | 91 | 0.532293 | false | 3.944798 | false | false | false |
torbjoernk/pySDC | examples/heat1d/TransferClass.py | 1 | 4670 | from __future__ import division
import numpy as np
from pySDC.Transfer import transfer
from pySDC.datatype_classes.mesh import mesh, rhs_imex_mesh
# FIXME: extend this to ndarrays
class mesh_to_mesh_1d(transfer):
"""
Custon transfer class, implements Transfer.py
This implementation can restrict and prolo... | bsd-2-clause | -4,636,805,818,447,047,000 | 38.584746 | 120 | 0.591435 | false | 3.105053 | false | false | false |
RecipeML/Recipe | recipe/classifiers/bernoulliNB.py | 1 | 1530 | # -*- coding: utf-8 -*-
"""
Copyright 2016 Walter José and Alex de Sá
This file is part of the RECIPE Algorithm.
The RECIPE 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 | -347,470,698,270,359,900 | 29.58 | 139 | 0.689791 | false | 3.681928 | false | false | false |
mefly2012/platform | src/parse_validate/qyxg_wscpws.py | 1 | 1948 | # -*- coding: utf-8 -*-
import sys
reload(sys)
sys.setdefaultencoding('utf-8')
import re
from common import public
class qyxg_wscpws():
"""开庭公告"""
need_check_ziduan = ['caseout_come',
'court_litigant',
# 'court_acceptance_fee',
# 'hi... | apache-2.0 | 7,655,155,474,370,721,000 | 27.172414 | 61 | 0.482864 | false | 2.533333 | false | false | false |
paksas/anim_tools | anim_tools/transform_utils.py | 1 | 2040 | import mathutils
import math
#
# General remarks regarding all functions presented here:
#
# Each motion is an array of transforms presented in form of tuples
# (loc:Vector, rot:Quaternion)
#
# =============================================================================
#
# Calculates a relative movement of 'chil... | gpl-2.0 | -1,699,437,732,264,732,400 | 25.467532 | 138 | 0.648675 | false | 3.816479 | false | false | false |
aliceinwire/virt-manager | virtinst/Storage.py | 2 | 51198 | #
# Copyright 2008, 2013 Red Hat, Inc.
# Cole Robinson <crobinso@redhat.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 2 of the License, or
# (at your option) any later ... | gpl-2.0 | 7,016,576,030,948,345,000 | 34.163462 | 104 | 0.562053 | false | 4.203793 | false | false | false |
openstack/mistral-dashboard | mistraldashboard/action_executions/views.py | 1 | 5486 | # Copyright 2016 - Nokia.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, softwar... | apache-2.0 | 1,265,832,847,031,783,200 | 33.2875 | 78 | 0.660955 | false | 4.016105 | false | false | false |
super7ramp/vertaal | versioncontrol/lib/types/subversion.py | 2 | 8277 | # -*- coding: utf-8 -*-
"""Copyright (c) 2009-2012 Sergio Gabriel Teves
All rights reserved.
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-3.0 | -4,671,312,419,987,366,000 | 36.116592 | 115 | 0.567718 | false | 4.027737 | false | false | false |
UAVCAN/gui_tool | uavcan_gui_tool/widgets/subscriber.py | 1 | 11412 | #
# Copyright (C) 2016 UAVCAN Development Team <uavcan.org>
#
# This software is distributed under the terms of the MIT License.
#
# Author: Pavel Kirienko <pavel.kirienko@zubax.com>
#
import time
import uavcan
import logging
import queue
from PyQt5.QtWidgets import QWidget, QDialog, QPlainTextEdit, QSpinBox, QHBoxL... | mit | 6,253,379,612,114,448,000 | 38.082192 | 120 | 0.61926 | false | 3.961125 | false | false | false |
Kefkius/electrum-frc | gui/qt/main_window.py | 1 | 114345 | #!/usr/bin/env python
#
# Electrum - lightweight Bitcoin client
# Copyright (C) 2012 thomasv@gitorious
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at... | gpl-3.0 | 3,402,617,299,634,712,000 | 38.375 | 458 | 0.586077 | false | 3.877285 | true | false | false |
lazyparser/opentuner | examples/unitary/input_generator.py | 5 | 2819 | import numpy as np
import math
import random
def generate_random_Ugoal_HARD(N, **kwargs):
# N is the length of random matrix multiplication yielding Ugoal
# N ~ 100 should be enough
# This method is hard because it creates Ugoal over the whole space
# Ugoal 2x2 unitary matrix
# create identity matrix
Ugo... | mit | -9,196,424,694,489,939,000 | 27.19 | 80 | 0.56332 | false | 2.684762 | false | false | false |
paulgclark/waveconverter | src/iqFileArgParse.py | 1 | 3934 | import re
def fileNameTextToFloat(valStr, unitStr):
# if there's a 'p' character, then we have to deal with decimal vals
if 'p' in valStr:
regex = re.compile(r"([0-9]+)p([0-9]+)")
wholeVal = regex.findall(valStr)[0][0]
decimalVal = regex.findall(valStr)[0][1]
baseVal = 1.0*int(w... | mit | 1,827,736,291,478,683,100 | 35.766355 | 82 | 0.5394 | false | 3.632502 | false | false | false |
citrusbyte/pimotion | pimotion/cloudapp/__init__.py | 1 | 1040 | import requests
from requests.auth import HTTPDigestAuth
import json
from cloudapp.exceptions import CloudAppHttpError
class CloudAppAPI:
def __init__(self, username, password):
self.username = username
self.password = password
def upload(self, path):
data = self.__get('http://my.cl.... | mit | -6,981,160,494,641,404,000 | 32.548387 | 107 | 0.613462 | false | 4.046693 | false | false | false |
edx/course-discovery | course_discovery/apps/edx_catalog_extensions/migrations/0002_create_professional_certificate_program_type.py | 1 | 1143 | # Generated by Django 1.9.11 on 2016-12-19 19:51
from django.db import migrations
PAID_SEAT_TYPES = ('credit', 'professional', 'verified',)
PROGRAM_TYPE = 'Professional Certificate'
def add_program_type(apps, schema_editor):
SeatType = apps.get_model('course_metadata', 'SeatType')
ProgramType = apps.get_mo... | agpl-3.0 | -5,059,052,367,050,130,000 | 28.307692 | 95 | 0.699038 | false | 3.313043 | false | false | false |
goldeneye-source/ges-python | ges/GamePlay/CaptureTheFlag.py | 1 | 28725 | ################ Copyright 2005-2016 Team GoldenEye: Source #################
#
# This file is part of GoldenEye: Source's Python Library.
#
# GoldenEye: Source's Python Library 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 Soft... | gpl-3.0 | -6,110,344,920,448,858,000 | 44.886581 | 203 | 0.621793 | false | 3.313531 | false | false | false |
funkring/fdoo | addons-funkring/at_sale/report/sale_order_report.py | 1 | 4550 | # -*- 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 | -7,761,827,827,090,585,000 | 39.990991 | 133 | 0.547692 | false | 3.807531 | false | false | false |
SuperDARNCanada/placeholderOS | brian/brian.py | 2 | 11673 | #!/usr/bin/python
# Copyright 2017 SuperDARN Canada
#
# brian.py
# 2018-01-30
# Communicate with all processes to administrate the borealis software
import sys
import os
import time
from datetime import datetime
import threading
import argparse
import zmq
sys.path.append(os.environ["BOREALISPATH"])
if __debug__:
... | gpl-3.0 | 2,562,039,298,006,661,600 | 37.147059 | 153 | 0.610469 | false | 3.963667 | false | false | false |
syjeon/new_edx | lms/djangoapps/verify_student/views.py | 2 | 12481 | """
"""
import json
import logging
import decimal
from mitxmako.shortcuts import render_to_response
from django.conf import settings
from django.core.urlresolvers import reverse
from django.http import HttpResponse, HttpResponseBadRequest, HttpResponseRedirect
from django.shortcuts import redirect
from django.views... | agpl-3.0 | 2,988,267,064,242,832,000 | 38.748408 | 108 | 0.662848 | false | 4.141009 | false | false | false |
rajalokan/nova | nova/tests/unit/compute/test_compute_utils.py | 1 | 45342 | # Copyright 2011 OpenStack Foundation
# All Rights Reserved.
# Copyright 2013 Red Hat, 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... | apache-2.0 | 1,194,183,343,546,489,300 | 42.724204 | 79 | 0.583631 | false | 4.023605 | true | false | false |
Holovin/D_GrabDemo | d_parser/old_configs/v25/d_spider_ele.py | 1 | 9841 | from urllib.parse import urljoin
from grab.spider import Spider, Task
from d_parser.helpers.cookies_init import cookies_init
from d_parser.helpers.el_parser import get_max_page
from d_parser.helpers.parser_extender import check_body_errors, process_error, common_init
from d_parser.helpers.re_set import Ree
from helper... | mit | 584,874,508,954,734,000 | 42.211454 | 129 | 0.485574 | false | 4.100753 | true | false | false |
olga-weslowskij/olga.weslowskij | mylibs/myList.py | 1 | 2762 | # Copyright (C) weslowskij
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope... | gpl-2.0 | 8,055,053,476,284,627,000 | 27.770833 | 81 | 0.573135 | false | 4.197568 | false | false | false |
hclivess/Stallion | nuitka/Cryptodome/SelfTest/Cipher/test_OFB.py | 2 | 9330 | # ===================================================================
#
# Copyright (c) 2015, Legrandin <helderijs@gmail.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributio... | gpl-3.0 | -7,998,060,312,913,902,000 | 38.533898 | 90 | 0.645016 | false | 3.106893 | true | false | false |
bmazin/SDR | DataReadout/ReadoutControls/lib/arcons_basic_gui.py | 1 | 47190 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'arcons_basic_gui.ui'
#
# Created: Tue Dec 11 17:40:34 2012
# by: PyQt4 UI code generator 4.8.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fr... | gpl-2.0 | -8,649,052,045,101,224,000 | 60.173913 | 148 | 0.679148 | false | 3.570942 | false | false | false |
marcotinacci/interbank-lending-systemic-risk | Plot.py | 1 | 2224 | # -*- coding: utf-8 -*-
"""
Created on Thu May 21 14:37:15 2015
@author: Marco Tinacci
"""
import networkx as nx
import matplotlib.pyplot as plt
import numpy as np
import Contagion
def plotGraph(g,alpha,node_scale=1, seed=None, pos=None):
# layout
if pos == None:
pos = nx.circular_layout(g)
# po... | mit | 7,015,643,916,021,559,000 | 33.75 | 97 | 0.543615 | false | 3.067586 | false | false | false |
sgolitsynskiy/sergey.cs.uni.edu | www/courses/cs1510/fall2017/sessions/092117.py | 1 | 1456 | # ask for int, report runnig total / version 1
num = 0
total = 0
while num != -1:
total = total + num
print("total so far = " + str(total))
num = int(input("next int: "))
# ask for int, report runnig total / version 2
total = 0
while True:
num = int(input("next int: "))
if num == -1:
break... | mit | -2,457,461,500,574,343,000 | 20.731343 | 50 | 0.517857 | false | 3.235556 | false | false | false |
callowayproject/django-articleappkit | articleappkit/admin.py | 1 | 1229 | from django.contrib import admin
from django.db import models
from django import forms
ARTICLE_BASE_FIELDSET = (
None, {
'fields': ('title', 'slug', 'subtitle', 'summary', 'content', 'update_date', )
}
)
ARTICLE_CONTENT_FIELDSET = (
None, {
'fields': ('title', 'subtitle', 'summary', 'conte... | apache-2.0 | -8,154,206,064,095,571,000 | 20.189655 | 86 | 0.548413 | false | 3.242744 | false | false | false |
marcysweber/hamadryas-social-sim | agent.py | 1 | 3855 | """
AGENT: individual attributes
"""
import random
class FemaleState:
juvenile, cycling, pregnant, nursing0, nursing1 = range(5)
class MaleState:
juvsol, sol, fol, lea = range(4)
class HamadryasRhp:
rhp = {
"1": {6: 30, 6.5: 48, 7: 61, 7.5: 65, 8.0: 68, 8.5: 71, 9.0: 73, 9.5: 75, 10.0: 76,
... | mit | -7,708,074,396,862,821,000 | 33.419643 | 101 | 0.530739 | false | 2.664133 | false | false | false |
deepmind/open_spiel | open_spiel/python/tests/tensor_game_utils_test.py | 1 | 2737 | # Copyright 2019 DeepMind Technologies Ltd. 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 appl... | apache-2.0 | 5,639,222,066,604,762,000 | 39.850746 | 80 | 0.680672 | false | 3.362408 | true | false | false |
jurcicek/extended-hidden-vector-state-parser | svc/ui/mlf.py | 1 | 3238 | # SVC library - usefull Python routines and classes
# Copyright (C) 2006-2008 Jan Svec, honza.svec@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, either version 3 of the License, o... | gpl-2.0 | 5,940,858,042,514,683,000 | 28.436364 | 71 | 0.590179 | false | 3.992602 | false | false | false |
rocky/python2-trepan | trepan/processor/command/info_subcmd/signals.py | 2 | 2200 | # -*- coding: utf-8 -*-
# Copyright (C) 2009, 2015 Rocky Bernstein <rocky@gnu.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your opti... | gpl-3.0 | -854,031,701,820,142,800 | 32.333333 | 75 | 0.689091 | false | 3.735144 | false | false | false |
cmac4603/Home-Utilities-App | archive/HomeUtilitiesApp v0.1.2.py | 1 | 1090 | from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.gridlayout import GridLayout
class HomeButtons(GridLayout):
def __init__(self, **kwargs):
super(HomeButtons, self).__init__(**kwargs)
self.cols = 2
self.rows = 2
btn1 = Button(text='BElGen Live Graph')
... | gpl-2.0 | -4,633,940,423,851,666,000 | 29.277778 | 60 | 0.647706 | false | 3.550489 | false | false | false |
kato-masahiro/RaspberryPiMouse-on-episode-task | particle_filter_on_episode.py | 1 | 17821 | #!/usr/bin/env python
#coding:utf-8
"""
パーティクルフィルタでエピソード的タスクを学習させる
全体的な流れ:
while(報酬==0):
センサ値をN回取得して平均を取る
latest_sen = 平均
パーティクルを尤度関数を用いて再配置する(報酬は前回得たものを用いる)
パーティクルの投票で行動を決定する
前回の報酬、観測、行動をepisode_setに追加
while(行動終了の条件を満たさない):
一瞬だけ行動する
N回センサ値を取得して平均を取る
... | mit | -5,122,817,194,274,757,000 | 31.307692 | 118 | 0.517619 | false | 2.363344 | true | false | false |
jiafengwu0301/App_BackEnd | api/views.py | 1 | 1474 | from rest_framework import generics, permissions, views, response,status
from .models import Account
from .serializers import AccountCreateSerializer, AccountSerializer, AuthenticateSerializer, \
UpdateAccountSerializer, AccountRetrieveSerializer
# Create your views here.
class AccountCreateView(generics.Create... | apache-2.0 | 9,186,457,815,436,140,000 | 33.302326 | 94 | 0.765265 | false | 4.563467 | false | false | false |
RNAer/qiita | qiita_pet/handlers/preprocessing_handlers.py | 2 | 1546 | from tornado.web import authenticated
from .base_handlers import BaseHandler
from qiita_ware.dispatchable import preprocessor
from qiita_db.data import RawData
from qiita_db.parameters import (PreprocessedIlluminaParams,
Preprocessed454Params)
from qiita_db.metadata_template import Pre... | bsd-3-clause | 280,697,794,406,818,800 | 41.944444 | 77 | 0.611902 | false | 4.235616 | false | false | false |
sternshus/arelle2.7 | svr-2.7/arelle/ViewFileRenderedGrid.py | 1 | 58703 | u'''
Created on Sep 13, 2011
@author: Mark V Systems Limited
(c) Copyright 2011 Mark V Systems Limited, All rights reserved.
'''
import os
from arelle import ViewFile
from lxml import etree
from arelle.RenderingResolver import resolveAxesStructure, RENDER_UNITS_PER_CHAR
from arelle.ViewFile import HTML, XML
... | apache-2.0 | -3,421,861,263,182,897,000 | 71.842767 | 222 | 0.479652 | false | 4.911152 | false | false | false |
yunbademo/yunba-live-video | stat/messenger.py | 1 | 3264 | #!/usr/bin/env python
import time
import sys
import logging
from socketIO_client import SocketIO
APPKEY = '56a0a88c4407a3cd028ac2fe'
TOPIC = 'test'
ALIAS = 'test'
logger = logging.getLogger('messenger')
class Messenger:
def __init__(self, appkey, alias, customid):
self.__logger = logging.getLogger('mes... | mit | 2,107,286,996,990,084,600 | 31 | 89 | 0.613971 | false | 3.050467 | false | false | false |
tomerfiliba/plumbum | tests/test_nohup.py | 1 | 2234 | # -*- coding: utf-8 -*-
import os
import sys
import time
import psutil
import pytest
from plumbum import NOHUP, local
try:
from plumbum.cmd import bash, echo
except ImportError:
bash = None
echo = None
from plumbum._testtools import skip_on_windows
from plumbum.path.utils import delete
@skip_on_windows... | mit | 61,400,480,994,359,310 | 28.012987 | 76 | 0.588183 | false | 3.177809 | true | false | false |
stephen2run/EcoDataLearn | src/math/mathtool.py | 1 | 1043 | # Copyright 2017 The EcoDataLearn. All Rights Reserved.
# Author Stephen (Yu) Shao
#
# 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
#
# Unles... | apache-2.0 | -7,336,470,810,491,666,000 | 28.828571 | 80 | 0.693193 | false | 3.862963 | false | false | false |
mitsuhiko/sentry | src/sentry/web/frontend/accounts.py | 1 | 10121 | """
sentry.web.frontend.accounts
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2012 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from django.contrib import messages
from django.contrib.auth import login as login_user, authenti... | bsd-3-clause | -231,246,322,902,996,860 | 31.232484 | 88 | 0.653394 | false | 4.087641 | false | false | false |
NaPs/Kolekto | kolekto/helpers.py | 1 | 1614 | """ Collection of helpers for Kolekto.
"""
import os
import gdbm
import json
def get_hash(input_string):
""" Return the hash of the movie depending on the input string.
If the input string looks like a symbolic link to a movie in a Kolekto
tree, return its movies hash, else, return the input directly in ... | mit | -5,483,582,171,683,210,000 | 25.47541 | 79 | 0.599752 | false | 3.927007 | false | false | false |
yausern/stlab | devices/BFDaemonOld/server/server.py | 1 | 2767 | import socket
from MySocket import MySocket
import datetime
import os.path
LOGFOLDER = 'D:\\log\\'
def tail( f, lines=20 ):
total_lines_wanted = lines
BLOCK_SIZE = 1024
f.seek(0, 2)
block_end_byte = f.tell()
lines_to_go = total_lines_wanted
block_number = -1
blocks = [] # blocks of size B... | gpl-3.0 | -9,217,473,270,939,096,000 | 34.037975 | 86 | 0.631731 | false | 3.489281 | false | false | false |
PhoenixBureau/PigeonComputer | old/nonon.py | 1 | 5828 | from co import bootstrap, send
from la import setUpTransformEngine
from metaii import comp
object_vt, vtvt = bootstrap()
symbol_vt, ast_vt = setUpTransformEngine(object_vt, vtvt)
context_vt = send(vtvt, 'delegated')
#########################################################################
## Simple Syntax to AST ... | gpl-3.0 | 7,676,236,102,455,079,000 | 25.252252 | 86 | 0.545642 | false | 3.649343 | false | false | false |
kontron/python-ipmi | tests/msgs/test_hpm.py | 1 | 1219 | #!/usr/bin/env python
from nose.tools import eq_
import pyipmi.msgs.hpm
from pyipmi.msgs import encode_message
from pyipmi.msgs import decode_message
def test_uploadfirmwareblockreq_encode():
m = pyipmi.msgs.hpm.UploadFirmwareBlockReq()
m.number = 1
m.data = [0, 1, 2, 3]
data = encode_message(m)
... | lgpl-2.1 | 1,573,575,823,836,667,000 | 25.5 | 60 | 0.69073 | false | 2.841492 | false | false | false |
reubano/csv2ofx | setup.py | 1 | 2830 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import sys
from os import path as p
import pkutils
try:
from setuptools import setup, find_packages
except ImportError:
from distutils.core import setup, find_packages
PARENT_DIR = p.abspath(p.di... | mit | 6,491,888,954,352,643,000 | 31.906977 | 77 | 0.658304 | false | 3.834688 | false | false | false |
ericholscher/cookiecutter | cookiecutter/utils.py | 3 | 1314 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
cookiecutter.utils
------------------
Helper functions used throughout Cookiecutter.
"""
from __future__ import unicode_literals
import errno
import logging
import os
import sys
import contextlib
PY3 = sys.version > '3'
if PY3:
pass
else:
import codecs
de... | bsd-3-clause | 5,354,811,305,813,673,000 | 19.53125 | 76 | 0.622527 | false | 3.74359 | false | false | false |
mantidproject/mantid | scripts/test/Muon/fitting_widgets/tf_asymmetry_fitting/tf_asymmetry_fitting_presenter_test.py | 3 | 27966 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2021 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 | -5,286,299,378,675,061,000 | 61.008869 | 137 | 0.709862 | false | 3.328889 | true | false | false |
theno/ctutlz | ctutlz/tls/sctlist.py | 1 | 1759 | import collections
from utlz import flo
from utlz import StructContext
_SctListEntry = collections.namedtuple(
typename='SctListEntry',
field_names=[
'sct_len',
'sct_der',
]
)
_TlsExtension18 = collections.namedtuple(
typename='TlsExtension18',
field_names=[
'tls_extens... | mit | 7,337,246,304,160,839,000 | 27.370968 | 78 | 0.593519 | false | 3.539235 | false | false | false |
all-of-us/raw-data-repository | rdr_service/alembic/versions/2e1d3f329efd_add_column_report_consent_removal_date_.py | 1 | 2206 | """add column report_consent_removal_date to genomic_set_member
Revision ID: 2e1d3f329efd
Revises: 1ea7864c251e
Create Date: 2020-09-25 15:51:21.977008
"""
from alembic import op
import sqlalchemy as sa
import rdr_service.model.utils
from rdr_service.participant_enums import PhysicalMeasurementsStatus, Questionnair... | bsd-3-clause | 7,623,654,461,418,293,000 | 34.015873 | 125 | 0.744787 | false | 3.523962 | false | false | false |
atlassian/asap-authentication-python | atlassian_jwt_auth/contrib/tests/aiohttp/test_verifier.py | 1 | 1491 | import asyncio
from asynctest import TestCase, CoroutineMock
from atlassian_jwt_auth.contrib.aiohttp import (
JWTAuthVerifier, HTTPSPublicKeyRetriever)
from atlassian_jwt_auth.tests import utils, test_verifier
class SyncJWTAuthVerifier(JWTAuthVerifier):
def __init__(self, *args, loop=None, **kwargs):
... | mit | 2,959,869,761,312,623,000 | 32.886364 | 78 | 0.702884 | false | 3.365688 | true | false | false |
iurisilvio/Flask-SQLAlchemy-Cache | flask_sqlalchemy_cache/tests/test_minimal.py | 1 | 1988 | # coding: UTF-8
import unittest
from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy, Model
from flask.ext.cache import Cache
from flask.ext.sqlalchemy_cache import CachingQuery, FromCache
Model.query_class = CachingQuery
db = SQLAlchemy()
cache = Cache()
class Country(db.Model):
id = db.Column(... | mit | -6,000,290,008,303,468,000 | 24.805195 | 82 | 0.623553 | false | 3.548214 | true | false | false |
skachuck/giapy | giapy/command_line.py | 1 | 8412 | from argparse import ArgumentParser, FileType
import sys, os
import numpy as np
from giapy.earth_tools.elasticlove import compute_love_numbers, hLK_asymptotic
from giapy.earth_tools.viscellove import compute_viscel_numbers
from giapy.earth_tools.earthParams import EarthParams
def ellove():
"""useage: giapy-ellove... | mit | -6,094,939,335,375,212,000 | 43.273684 | 100 | 0.580837 | false | 3.618065 | false | false | false |
rafidka/hadithhouse | hadiths/auth.py | 2 | 2532 | """
Contains Facebook-based authentication classes. These classes automatically
reads the tokens in the request and authenticate a Facebook user.
"""
from django.contrib.auth.models import User
from rest_framework.authentication import BaseAuthentication
from rest_framework.exceptions import NotAuthenticated
from had... | mit | 3,294,355,897,632,497,000 | 35.695652 | 80 | 0.656793 | false | 4.529517 | false | false | false |
cuttlefishh/emp | legacy/code/emp/alpha_diversity_by_sample_type.py | 1 | 3390 | #!/usr/bin/env python
from __future__ import division
__author__ = "Jai Ram Rideout"
__copyright__ = "Copyright 2012, The QIIME project"
__credits__ = ["Jai Ram Rideout", "Greg Caporaso"]
__license__ = "GPL"
__version__ = "1.5.0-dev"
__maintainer__ = "Jai Ram Rideout"
__email__ = "jai.rideout@gmail.com"
__status__ = "... | bsd-3-clause | 4,353,328,139,314,533,400 | 37.965517 | 78 | 0.629499 | false | 3.512953 | false | false | false |
Exploit-install/Veil-Pillage | lib/http.py | 4 | 2095 |
"""
HTTP-related methods.
Includes:
RequestHandler() - a customized handler to serve out /tmp/pillage/
VeilHTTPServer() - a small webserver for Veil that can run HTTP or HTTPS
"""
import BaseHTTPServer, threading, ssl, os
from SimpleHTTPServer import SimpleHTTPRequestHandler
# Prepend /tmp/pillag... | gpl-3.0 | -5,674,370,111,604,362,000 | 28.097222 | 101 | 0.621957 | false | 4.075875 | false | false | false |
vvinuv/HaloModel | halowlsz/pressure_profiles.py | 1 | 11370 | import os, sys
import numpy as np
from numba import jit
import pylab as pl
from CosmologyFunctions import CosmologyFunctions
from convert_NFW_RadMass import MfracToMvir, MvirToMRfrac
@jit(nopython=True)
def battaglia_profile_2d(x, y, Rs, M200, R200, z, rho_critical, omega_b0, omega_m0, cosmo_h, P01, P02, P03, xc1, xc2... | gpl-3.0 | -3,316,877,864,590,955,000 | 39.899281 | 298 | 0.569041 | false | 2.316154 | false | false | false |
a11r/grpc | tools/buildgen/build-cleaner.py | 44 | 3608 | #!/usr/bin/env python2.7
# Copyright 2015, Google Inc.
# 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 lis... | bsd-3-clause | 8,627,390,080,199,632,000 | 34.722772 | 91 | 0.696785 | false | 3.651822 | false | false | false |
huddlej/django_lims | samples/models.py | 1 | 1351 | from django.db import models
#import ncbi
class Clone(models.Model):
"""
Represents DNA for a clone identified by a unique name and living in a
cellular environment like a bacterium or yeast.
"""
name = models.CharField(max_length=100)
accessions = models.CharField(max_length=200, null=True, b... | gpl-2.0 | 4,268,282,638,533,947,000 | 31.95122 | 77 | 0.669134 | false | 3.411616 | false | false | false |
haadr/myodbus | sample.py | 1 | 3130 |
from myodbus import MyoDbus
import numpy
import argparse
import struct
import dbus
from dbus.mainloop.glib import DBusGMainLoop, threads_init
from gi.repository import GLib
################################################################################
#### Args
##################################################... | mit | -5,124,620,437,763,198,000 | 32.297872 | 143 | 0.505112 | false | 3.902743 | false | false | false |
luwei0917/awsemmd_script | compute_energy_helperFunctions.py | 1 | 49784 | import os
import sys
import random
import time
from random import seed, randint
import argparse
import platform
from datetime import datetime
import imp
import numpy as np
import fileinput
from itertools import product
import pandas as pd
from scipy.interpolate import griddata
from scipy.interpolate import interp2d
imp... | mit | 2,329,335,013,494,113,300 | 46.458532 | 248 | 0.574843 | false | 2.978046 | true | false | false |
simpeg/simpegem | simpegEM/Analytics/FDEMcasing.py | 2 | 4088 | from SimPEG import Utils, np
from scipy.constants import mu_0, epsilon_0
from simpegEM.Utils.EMUtils import k
def getKc(freq,sigma,a,b,mu=mu_0,eps=epsilon_0):
a = float(a)
b = float(b)
# return 1./(2*np.pi) * np.sqrt(b / a) * np.exp(-1j*k(freq,sigma,mu,eps)*(b-a))
return np.sqrt(b / a) * np.exp(-1j*k(f... | mit | -7,403,261,594,443,942,000 | 40.72449 | 114 | 0.662427 | false | 2.091049 | false | false | false |
homeworkprod/better-bomb-defusal-manual | bombdefusalmanual/subjects/passwords.py | 1 | 2091 | # -*- coding: utf-8 -*-
"""
On the Subject of Passwords
:Copyright: 2015 Jochen Kupperschmidt
:License: MIT, see LICENSE for details.
"""
from string import ascii_lowercase
PASSWORDS = frozenset([
'about', 'after', 'again', 'below', 'could',
'every', 'first', 'found', 'great', 'house',
'large', 'learn'... | mit | 6,338,308,990,574,762,000 | 29.75 | 77 | 0.618843 | false | 3.879406 | false | false | false |
kristerhedfors/nbportscan | fabfile.py | 1 | 1423 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright(c) 2014 Krister Hedfors
#
#
# Example:
# Portscan hosta, hostb, hostc (a->a, a->b, a->c, b->a, b->b, ...)
# on all tcp port numbers listening on at least one of hosta, hostb, hostc:
#
# $ fab -H hosta,hostb,hostc list_open_ports > ports.txt
# $ plist="`grep ... | bsd-3-clause | 4,957,014,512,817,538,000 | 24.410714 | 86 | 0.591708 | false | 2.921971 | false | false | false |
whelan957/leetcode | python3/Array/leetcode075. Sort Colors.py | 1 | 1433 | # Given an array with n objects colored red, white or blue, sort them in-place so that objects of the same color are adjacent, with the colors in the order red, white and blue.
# Here, we will use the integers 0, 1, and 2 to represent the color red, white, and blue respectively.
# Note: You are not suppose to use the... | gpl-3.0 | -977,085,949,206,133,100 | 33.95122 | 176 | 0.540823 | false | 3.637056 | false | false | false |
Data2Semantics/linkitup | linkitup/nifregistry/plugin.py | 1 | 2471 | '''
Created on 26 Mar 2013
@author: hoekstra
'''
from flask.ext.login import login_required
import xml.etree.ElementTree as ET
import requests
import re
from linkitup import app
from linkitup.util.baseplugin import plugin
from linkitup.util.provenance import provenance
NIF_REGISTRY_URL = "http://nif-services.neui... | mit | 840,909,001,955,806,600 | 27.744186 | 138 | 0.582355 | false | 3.928458 | false | false | false |
leiferikb/bitpop | src/native_client/pnacl/driver/pnacl-ranlib.py | 3 | 1269 | #!/usr/bin/python
# Copyright (c) 2012 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# IMPORTANT NOTE: If you make local mods to this file, you must run:
# % pnacl/build.sh driver
# in order for them to take eff... | gpl-3.0 | 8,640,538,835,697,295,000 | 31.538462 | 76 | 0.647754 | false | 3.594901 | false | false | false |
HPPTECH/hpp_IOSTressTest | IOST_0.23/Libs/IOST_Testcase/IOST_SaveConfig.py | 3 | 15318 | #!/usr/bin/python
#======================================================================
#
# Project : hpp_IOStressTest
# File : Libs/IOST_Testcase/IOST_SaveConfig.py
# Date : Dec 14, 2016
# Author : HuuHoang Nguyen
# Contact : hhnguyen@apm.com
# : hoangnh.hpp@gmail.com
# License : MIT License
# ... | mit | -7,475,310,437,211,625,000 | 43.923754 | 130 | 0.512861 | false | 4.038492 | true | false | false |
rocket-league-replays/rocket-league-replays | rocket_league/urls.py | 1 | 3392 | """URL config for rocket_league project."""
from cms.forms import CMSPasswordChangeForm
from cms.sitemaps import registered_sitemaps
from cms.views import TextTemplateView
from django.conf import settings
from django.conf.urls import include, patterns, url
from django.conf.urls.static import static
from django.contrib... | gpl-3.0 | -7,748,654,026,379,278,000 | 41.4 | 165 | 0.701061 | false | 3.332024 | false | false | false |
ltilve/chromium | tools/gn/bin/help_as_html.py | 105 | 3135 | #!/usr/bin/env python
# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Runs 'gn help' and various subhelps, and spits out html.
# TODO:
# - Handle numbered and dashed lists -> <ol> <ul>. (See "os" and "to... | bsd-3-clause | -7,027,008,553,045,315,000 | 28.857143 | 78 | 0.605423 | false | 3.538375 | false | false | false |
juliushaertl/i3pystatus | i3pystatus/xkblayout.py | 1 | 1546 | from i3pystatus import IntervalModule
import subprocess
class Xkblayout(IntervalModule):
"""Displays and changes current keyboard layout.
``change_layout`` callback finds the current layout in the
``layouts`` setting and enables the layout following it. If the
current layout is not in the ``layouts``... | mit | 3,405,981,075,283,309,600 | 35.809524 | 154 | 0.60608 | false | 3.752427 | false | false | false |
Trax-/data_analysis | data_analysis/matplotlib_example_gui.py | 1 | 3719 | import sys
import time
import matplotlib.pyplot as plt
import numpy as np
from PyQt5 import QtWidgets
from matplotlib.backends.backend_qt5agg import FigureCanvas
from matplotlib.backends.backend_qt5agg import NavigationToolbar2QT as NavToolbar
def main():
app = QtWidgets.QApplication(sys.argv)
main_window = ... | bsd-3-clause | -3,165,528,811,247,220,000 | 26.548148 | 81 | 0.596666 | false | 3.541905 | false | false | false |
Sisky/sdk | bindings/python/setup.py | 6 | 3647 | #!/bin/env python
# -*- coding: utf-8 -*-
"""
This setup is loosely following the instructions adapted from
https://hynek.me/articles/sharing-your-labor-of-love-pypi-quick-and-dirty/
"""
import os
import re
from setuptools import setup
def read(fname):
"""
Utility function to read the README file.
Used f... | bsd-2-clause | -864,611,293,662,145,200 | 32.154545 | 83 | 0.598026 | false | 3.710071 | false | false | false |
apache/incubator-trafodion | install/python-installer/scripts/dcs_setup.py | 2 | 3475 | #!/usr/bin/env python
# @@@ START COPYRIGHT @@@
#
# 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 Li... | apache-2.0 | -5,526,937,498,630,151,000 | 33.068627 | 85 | 0.66446 | false | 3.099911 | false | false | false |
UAVCAN/pyuavcan | pyuavcan/transport/can/media/_filter.py | 1 | 7507 | # Copyright (c) 2019 UAVCAN Consortium
# This software is distributed under the terms of the MIT License.
# Author: Pavel Kirienko <pavel@uavcan.org>
from __future__ import annotations
import typing
import itertools
import dataclasses
from ._frame import FrameFormat
@dataclasses.dataclass(frozen=True)
class FilterCo... | mit | 2,260,021,227,886,618,000 | 42.900585 | 120 | 0.685094 | false | 4.253258 | true | false | false |
google/grr | grr/server/grr_response_server/databases/db_test_utils.py | 1 | 6907 | #!/usr/bin/env python
"""Mixin class to be used in tests for DB implementations."""
import itertools
import random
from typing import Any, Callable, Dict, Iterable, Optional, Text
from grr_response_server.databases import db
class QueryTestHelpersMixin(object):
"""Mixin containing helper methods for list/query m... | apache-2.0 | 3,371,174,344,154,678,000 | 39.629412 | 105 | 0.618503 | false | 4.324984 | true | false | false |
SoftwareHeritage/swh-storage | swh/storage/proxies/filter.py | 1 | 4046 | # Copyright (C) 2019-2020 The Software Heritage developers
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top-level LICENSE file for more information
from typing import Dict, Iterable, List, Set
from swh.model.model i... | gpl-3.0 | -6,670,559,346,741,618,000 | 33.87931 | 88 | 0.629758 | false | 4.099291 | false | false | false |
pcolmant/repanier | repanier_v2/views/published_customer_view.py | 1 | 7951 | from os import sep as os_sep
from django.contrib.auth import get_user_model
from django.contrib.auth.decorators import login_required
from django.forms import widgets, forms, fields
from django.http import Http404
from django.shortcuts import render
from django.utils.translation import ugettext_lazy as _
from django.v... | gpl-3.0 | -919,595,278,697,615,900 | 38.361386 | 127 | 0.58936 | false | 4.011604 | false | false | false |
jinjin123/devops2.0 | devops/ops/views/zabbix/zabbix.py | 1 | 5284 | #!/usr/bin/python env
# coding=utf-8
import os,sys
from ops.views.ssh_settings import zabbixurl,zabbixpwd,zabbixuser
import time
from pyzabbix import ZabbixAPI
# 登录zabbix
zabbix = ZabbixAPI(zabbixurl)
zabbix.session.verify = False
zabbix.login(zabbixuser, zabbixpwd)
def group_list():
return zabbix.hostgroup.get(... | mit | 458,557,950,834,580,860 | 25.974359 | 117 | 0.486122 | false | 3.733144 | false | false | false |
tiltfactor/mg-game | nlp/config.py | 1 | 1091 | #!/usr/bin/env python
import logging, os
# Flask app debug value.
#DEBUG = False # DEBUG AND INFO log levels won't be shown..
DEBUG = True
# Used for running the flask server independent of mod_wsgi
# using SERVER_NAME as the var name makes views fail..
# Set servername to gameserver base url
#SERVERNAME = "127.0.... | agpl-3.0 | 741,703,959,555,211,600 | 32.060606 | 87 | 0.719523 | false | 3.430818 | false | false | false |
pyro-ppl/numpyro | numpyro/distributions/truncated.py | 1 | 14900 | # Copyright Contributors to the Pyro project.
# SPDX-License-Identifier: Apache-2.0
from jax import lax
import jax.numpy as jnp
import jax.random as random
from jax.scipy.special import logsumexp
from jax.tree_util import tree_map
from numpyro.distributions import constraints
from numpyro.distributions.continuous imp... | apache-2.0 | -6,576,997,587,028,816,000 | 35.881188 | 102 | 0.599732 | false | 3.463505 | false | false | false |
ray6/sdn | simple_django_switch.py | 1 | 1137 | import shortest_path_switch
import simple_switch
from ryu.controller.handler import MAIN_DISPATCHER, set_ev_cls
from ryu.controller import ofp_event
import os
import socket
import json
from ryu.lib import hub
SOCKFILE = '/tmp/hello_sock'
class ShortestRestSwitch(simple_switch.SimpleSwitch13):
def __init__(self, *a... | mit | -3,184,735,867,046,060,000 | 23.717391 | 74 | 0.708004 | false | 2.930412 | false | false | false |
uwcirg/true_nth_usa_portal | portal/migrations/versions/883fd1095361_.py | 1 | 2350 | from datetime import timedelta
from alembic import op
import sqlalchemy as sa
from sqlalchemy.orm import sessionmaker
from portal.models.audit import Audit
from portal.models.role import Role
from portal.models.user import User, UserRoles
from portal.models.user_consent import UserConsent
"""Correct user_consent acc... | bsd-3-clause | -7,790,015,832,514,473,000 | 32.098592 | 72 | 0.645957 | false | 3.637771 | false | false | false |
sql-machine-learning/sqlflow | python/runtime/dbapi/connection.py | 1 | 6425 | # Copyright 2020 The SQLFlow 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 applicable law o... | apache-2.0 | 8,163,382,623,264,675,000 | 27.056769 | 86 | 0.564825 | false | 4.486732 | false | false | false |
DemocracyClub/UK-Polling-Stations | polling_stations/apps/data_importers/management/commands/import_neath-pt.py | 1 | 2759 | from data_importers.management.commands import BaseHalaroseCsvImporter
from django.contrib.gis.geos import Point
class Command(BaseHalaroseCsvImporter):
council_id = "NTL"
addresses_name = (
"2021-03-25T10:36:12.245581/Neath PT polling_station_export-2021-03-23.csv"
)
stations_name = (
... | bsd-3-clause | -5,597,754,226,547,029,000 | 37.319444 | 83 | 0.59913 | false | 3.093049 | false | false | false |
djgroen/flee-release | datamanager/DataTable.py | 1 | 9598 | import sys
import numpy as np
import csv
from datetime import datetime
from datetime import timedelta
def subtract_dates(date1, date2):
"""
Takes two dates %Y-%m-%d format. Returns date1 - date2, measured in days.
"""
date_format = "%Y-%m-%d"
a = datetime.strptime(date1, date_format)
b = datetime.strptime(... | bsd-3-clause | -6,825,362,137,081,100,000 | 31.535593 | 192 | 0.64055 | false | 3.294885 | false | false | false |
victor-rene/bisector | bone.py | 1 | 2297 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Bone. Base component of the StickMan.
"""
import math
from kivy.graphics.context_instructions import PopMatrix, PushMatrix, Rotate
from kivy.properties import NumericProperty
from kivy.uix.image import Image
__author__ = "Victor RENÉ"
__copyright__ = "Copyright 2015... | mit | 6,350,086,245,058,398,000 | 25.697674 | 76 | 0.624401 | false | 3.17867 | false | false | false |
sektioneins/sandbox_toolkit | sb2dot/outputdot.py | 1 | 2858 | #
# sb2dot - a sandbox binary profile to dot convertor for iOS 9 and OS X 10.11
# Copyright (C) 2015 Stefan Esser / SektionEins GmbH <stefan@sektioneins.de>
# uses and extends code from Dionysus Blazakis with his permission
#
# module: outputdot.py
# task: cheap .dot file generator
#
# This program is free ... | gpl-2.0 | 628,843,913,595,146,000 | 32.433735 | 170 | 0.582225 | false | 3.229379 | false | false | false |
googlecodelabs/iot-data-pipeline | checkWeather.py | 1 | 3019 | # Copyright 2018 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 writin... | apache-2.0 | -474,512,927,489,647,500 | 32.921348 | 113 | 0.699901 | false | 3.419026 | false | false | false |
GoogleCloudPlatform/declarative-resource-client-library | python/services/storage/object.py | 1 | 13575 | # Copyright 2021 Google LLC. 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 o... | apache-2.0 | -7,514,142,920,335,237,000 | 38.577259 | 88 | 0.654733 | false | 3.835829 | false | false | false |
vespero89/Snoring_Challenge | feat_extraction/spectrogram_extraction.py | 1 | 5018 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri Feb 3 16:00:29 2017
@author: daniele
"""
#import matplotlib.pyplot as plt
import numpy as np
from scipy import signal
import librosa
from os import walk, path, makedirs
def wav_file_list(source):
# list all file in source directory
filenames... | gpl-3.0 | -6,006,183,952,996,391,000 | 36.162963 | 122 | 0.664142 | false | 2.752057 | false | false | false |
Andre-Tan/Pincer | pincer/objects/Sequence.py | 1 | 1818 | from Bio import SeqIO
from os import path
from sys import exit
from pincer.objects.Contig import Contig
class FileNotInPathException(Exception):
pass
class NotFastaException(Exception):
pass
class Sequence(object):
def __init__(self, filename):
self.file, self.name = self.get_f... | gpl-3.0 | 626,050,070,194,473,500 | 27.836066 | 94 | 0.562156 | false | 3.892934 | false | false | false |
datamade/la-metro-councilmatic | lametro/management/commands/refresh_guid.py | 1 | 5846 | from collections import ChainMap
from itertools import chain
from django.core.management.base import BaseCommand
from django.conf import settings
from django.db.utils import IntegrityError
from legistar.bills import LegistarAPIBillScraper
from opencivicdata.legislative.models import Bill
from lametro.models import L... | mit | -3,789,554,340,112,683,500 | 32.965116 | 106 | 0.575145 | false | 4.366218 | false | false | false |
scrbrd/scoreboard | model/api/loader.py | 1 | 6251 | """ Module: loader
Provide a Sqoreboard API for loading graph data into Sqoreboard objects.
Provides:
def load_node
def load_node_by_unique_property
def load_nodes_by_property
def load_edge
def load_edges
def load_neighbors
"""
from model.graph import GraphOutputError
from model.graph import... | mit | 2,964,769,322,987,463,700 | 26.416667 | 77 | 0.629019 | false | 4.090969 | false | false | false |
nowls/gnuradio | grc/core/Param.py | 4 | 28068 | """
Copyright 2008-2015 Free Software Foundation, Inc.
This file is part of GNU Radio
GNU Radio Companion is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any l... | gpl-3.0 | -1,952,335,247,916,471,800 | 36.574297 | 197 | 0.500499 | false | 4.318818 | false | false | false |
joewie/PySyft | tests/test_integrations_locally.py | 2 | 2952 | import unittest
import numpy as np
import pickle
from syft.nn.linear import LinearClassifier
from syft.he.paillier import KeyPair, PaillierTensor
from capsule.django_client import LocalDjangoCapsuleClient
class PySonarNotebooks(unittest.TestCase):
def model_training_demo_notebook(self):
"""If this test... | apache-2.0 | -4,713,357,466,685,288,000 | 31.8 | 98 | 0.590447 | false | 3.320585 | true | false | false |
RishiRamraj/interviews | solutions/algorithms/max_subarray.py | 1 | 1728 | '''
Problem:
Given [int], find a non-empty sub-array with the max sum.
'''
def subarray(target):
# Exit early.
if all(item >= 0 for item in target):
return target
if all(item <= 0 for item in target):
return [max(target)]
# Build an incremental sum lookup.
lookup = {}
sum = ... | mit | -1,594,383,956,390,017,800 | 21.153846 | 71 | 0.506944 | false | 3.848552 | false | false | false |
sam-m888/gramps | gramps/gui/views/navigationview.py | 1 | 17849 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham
# Copyright (C) 2009-2010 Nick Hall
#
# 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 v... | gpl-2.0 | 998,957,034,830,344,600 | 34.841365 | 80 | 0.535884 | false | 4.234638 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.