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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
openpassword/blimey | features/steps/agile_keychain_locking_steps.py | 1 | 1674 | from behave import given, when, then, step
import os
import blimey
from blimey.exceptions import IncorrectPasswordException
TEMP_KEYCHAIN_PATH = os.path.join('tests', 'fixtures', 'temp.agilekeychain')
CORRECT_PASSWORD = "correctpassword"
INCORRECT_PASSWORD = "incorrectpassword"
@given('I have a locked keychain')
def... | mit | -3,032,840,553,746,170,400 | 23.985075 | 76 | 0.728793 | false | 3.473029 | false | false | false |
schuhumi/autocut | Software/Main Module/Commandserver/CommandServer/main.py | 1 | 10546 | #!/usr/bin/env python3
# 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 ho... | gpl-3.0 | -8,487,945,163,286,426,000 | 46.080357 | 109 | 0.59634 | false | 3.534182 | false | false | false |
uperetz/AstroTools | models/parameters.py | 1 | 2116 | '''
Created on 15-Oct-2016
@author: kabanus
'''
from collections import UserDict
class Primitive(object):
def __eq__(self,other):
return self.val == other
def __repr__(self):
return str(self)
def __str__(self):
return str(self.val)
class... | apache-2.0 | 691,603,404,933,640,100 | 29.228571 | 81 | 0.543951 | false | 3.933086 | false | false | false |
JeffBain/wedding-website | wedding_site/rsvp/models.py | 1 | 4244 | import uuid
from django.core.exceptions import ValidationError
from django.db import models
class ReplyError(Exception):
def __init__(self, errors_dict):
self.errors_dict = errors_dict
@property
def errors(self):
return self.errors_dict
class Invitation(models.Model):
name = models.C... | mit | 1,859,371,657,923,783,400 | 30.909774 | 92 | 0.569746 | false | 3.840724 | false | false | false |
vmiller/Munki-Helper-Scripts | catalogcompare.py | 1 | 3752 | #!/usr/bin/python
#
# Written by Vaughn Miller
#
# Simple script to comb the munki catalogs and list items missing from individual catalogs
#
#
# You should edit REPO_ROOT to reflect local path to the repo
# If using email option, you should edit RECIPIENTS to a list of valid email addresses to be notified
#
# Usage ... | mit | -3,360,009,525,904,002,000 | 35.794118 | 109 | 0.623401 | false | 3.642718 | false | false | false |
Lapin-Blanc/django_stages | django_calendar/admin.py | 1 | 1740 | from django.contrib import admin
from django_calendar.models import Eleve, Professeur, Convention, Lieu, Periode
# Custom model admin
class EleveAdmin(admin.ModelAdmin):
exclude = ("user",)
list_display = ("username", "first_name", "last_name", "email", "phone")
search_fields = ("first_name", "last_name")
... | gpl-3.0 | 2,175,956,584,626,778,400 | 39.465116 | 131 | 0.682184 | false | 3.246269 | false | false | false |
osDanielLee/SelfThinkingRobot | AnalyzeData/chatterbot/utils/parsing.py | 1 | 21565 | # -*- coding: utf-8 -*-
import re
from datetime import timedelta, date, datetime
import calendar
# Variations of dates that the parser can capture
year_variations = ['year', 'years', 'yrs']
day_variations = ['days', 'day']
minute_variations = ['minute', 'minutes', 'mins']
hour_variations = ['hrs', 'hours', 'hour']
wee... | bsd-3-clause | 6,527,969,531,210,402,000 | 31.234679 | 120 | 0.515094 | false | 3.407331 | false | false | false |
kvaps/vdsm | lib/vdsm/netlink/addr.py | 1 | 3899 | # Copyright 2014 Red Hat, Inc.
#
# 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 ... | gpl-2.0 | -2,480,733,445,614,762,500 | 40.924731 | 79 | 0.679661 | false | 3.309847 | false | false | false |
voicesauce/opensauce-python | opensauce/praat.py | 1 | 15421 | """Estimate F0 and formants using Praat
"""
# Licensed under Apache v2 (see LICENSE)
# Based on VoiceSauce files func_PraatPitch.m (authored by Yen-Liang Shue
# and Kristine Yu) and func_PraatFormants.m (authored by Yen-Liang Shue and
# Kristine Yu)
from __future__ import division
import os
import numpy as np
from... | apache-2.0 | 5,595,630,815,300,315,000 | 44.355882 | 113 | 0.592504 | false | 3.797341 | false | false | false |
alexsalo/genenetwork2 | wqflask/wqflask/gsearch.py | 1 | 3840 | from __future__ import absolute_import, print_function, division
from flask import Flask, g
from base.data_set import create_dataset
from base.trait import GeneralTrait
from dbFunction import webqtlDatabaseFunction
class GSearch(object):
def __init__(self, kw):
self.type = kw['type']
self.terms = kw['terms']
... | agpl-3.0 | 4,886,738,426,443,709,000 | 40.73913 | 154 | 0.682292 | false | 2.790698 | false | false | false |
phil65/script.module.kodi65 | lib/kodi65/player.py | 1 | 1274 | # -*- coding: utf8 -*-
# Copyright (C) 2015 - Philipp Temminghoff <phil65@kodi.tv>
# This program is Free Software see LICENSE file for details
from __future__ import absolute_import
from __future__ import unicode_literals
import xbmc
import xbmcgui
from kodi65 import busy
from kodi65 import utils
class VideoPlay... | lgpl-2.1 | -4,301,733,571,184,211,500 | 26.106383 | 65 | 0.600471 | false | 3.968847 | false | false | false |
alphagov/digitalmarketplace-search-api | tests/app/views/test_status.py | 1 | 1614 | import json
import mock
from elasticsearch import TransportError
from tests.helpers import BaseApplicationTest
class TestStatus(BaseApplicationTest):
def test_status(self):
with self.app.app_context():
response = self.client.get('/_status')
assert response.status_code == 200
... | mit | -6,317,243,366,131,860,000 | 34.866667 | 108 | 0.627014 | false | 4.214099 | true | false | false |
SimonSapin/tinycss | tinycss/token_data.py | 2 | 13442 | # coding: utf-8
"""
tinycss.token_data
------------------
Shared data for both implementations (Cython and Python) of the tokenizer.
:copyright: (c) 2012 by Simon Sapin.
:license: BSD, see LICENSE for more details.
"""
from __future__ import unicode_literals
import functools
import operator
impo... | bsd-3-clause | 5,626,437,258,436,213,000 | 28.579295 | 79 | 0.567578 | false | 3.584891 | false | false | false |
rocky/python-uncompyle6 | test/simple_source/bug37/02_and_or.py | 1 | 1062 | # from 3.7 decompyle3/pytest/validate.py
# 3.7 changes changes "and" to use JUMP_IF_FALSE_OR_POP instead of
# POP_JUMP_IF_FALSE
# RUNNABLE!
def are_instructions_equal(a, b, c, d):
return a and (b or c) and d
for a, b, c, d, expect in (
(True, True, False, True, True),
(True, False, True, True, Tru... | gpl-3.0 | -2,715,332,422,001,388,500 | 24.285714 | 66 | 0.541431 | false | 2.780105 | false | false | false |
griffinfoster/pulsar-polarization-sims | scripts/smoothProfile.py | 1 | 5844 | #!/usr/bin/env python
"""
Apply a low pass filter to a pulsar profile
"""
#broaden filter
import pyfits as pf
import numpy as n
import pylab as p
import os
import sys
import shutil
import time
from scipy import signal
def smooth(x,window_len=11,window='hanning'):
"""smooth the data using a window with requested ... | mit | 6,862,823,692,675,452,000 | 32.586207 | 121 | 0.629535 | false | 2.954499 | false | false | false |
zmike/cef-rebase | tools/repack_locales.py | 2 | 5884 | #!/usr/bin/env python
# Copyright (c) 2011 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.
"""Helper script to repack paks for a list of locales.
Gyp doesn't have any built-in looping capability, so this just provides a w... | bsd-3-clause | -2,680,853,143,702,160,000 | 29.806283 | 80 | 0.640891 | false | 3.381609 | false | false | false |
amasiero/approach_control | approach_control_people/nodes/approach_control_people/skeleton/GetSkeleton.py | 1 | 2217 | #!/usr/bin/env python
import rospy
import smach
import math
from openni import *
class GetSkeleton(smach.State):
def __init__(self):
smach.State.__init__(self, outcomes=['success'])
self.pose_to_use = ''
self.ctx = Context()
self.ctx.init()
self.user = UserGenerator()
... | gpl-2.0 | 7,401,824,473,174,456,000 | 34.190476 | 127 | 0.616148 | false | 3.328829 | false | false | false |
V-Alexeev/nginxmailauth | nginxmailauth/forms.py | 1 | 1131 | from django import forms
from models import MailUser
class PasswordChangeForm(forms.Form):
username = forms.CharField(max_length=50)
old_password = forms.CharField(max_length=50, widget=forms.PasswordInput)
new_password = forms.CharField(max_length=50, widget=forms.PasswordInput)
confirm_new_password ... | bsd-2-clause | 1,274,770,516,183,966,000 | 44.28 | 110 | 0.707339 | false | 4.284091 | false | false | false |
sklam/numba | numba/cuda/cudadrv/devicearray.py | 1 | 26501 | """
A CUDA ND Array is recognized by checking the __cuda_memory__ attribute
on the object. If it exists and evaluate to True, it must define shape,
strides, dtype and size attributes similar to a NumPy ndarray.
"""
import warnings
import math
import functools
import operator
import copy
from ctypes import c_void_p
i... | bsd-2-clause | -4,734,918,334,190,783,000 | 32.888747 | 88 | 0.574129 | false | 4.062078 | false | false | false |
pallets/flask | examples/tutorial/tests/test_auth.py | 1 | 2102 | import pytest
from flask import g
from flask import session
from flaskr.db import get_db
def test_register(client, app):
# test that viewing the page renders without template errors
assert client.get("/auth/register").status_code == 200
# test that successful registration redirects to the login page
... | bsd-3-clause | 5,532,598,004,876,098,000 | 29.463768 | 85 | 0.642721 | false | 4.097466 | true | false | false |
blue-yonder/pyscaffold | src/pyscaffold/contrib/setuptools_scm/integration.py | 1 | 1320 | from pkg_resources import iter_entry_points
from .version import _warn_if_setuptools_outdated
from .utils import do, trace_exception
from . import _get_version, Configuration
def version_keyword(dist, keyword, value):
_warn_if_setuptools_outdated()
if not value:
return
if value is True:
v... | mit | 8,208,289,837,319,875,000 | 26.5 | 79 | 0.627273 | false | 3.882353 | true | false | false |
tachang/django_friendlyurls | friendlyurls/models.py | 1 | 1219 | from django.contrib.auth.models import User
from django.db import models
from django.contrib.contenttypes import generic
from django.contrib.contenttypes.models import ContentType
from django.db.models.signals import pre_save, post_save, pre_delete, post_delete
from django.core.cache import cache
from django.dispatch i... | bsd-3-clause | 6,290,254,148,189,393,000 | 37.09375 | 81 | 0.757178 | false | 3.716463 | false | false | false |
JanCaha/Line-of-Sight-Analyst | src/los/functions_visibility.py | 1 | 8679 | # coding=utf-8
import math
import arcpy
from operator import itemgetter
def fuzzyVisibility(dist, b1, beta, h):
b2 = h / ( 2 * math.tan(beta/2))
if dist < b1:
return 1
else:
return 1/(1 + math.pow((dist-b1)/b2, 2))
def isHorizon(points, i, ANG,limit_angle):
if i < len(points)-2:
... | gpl-3.0 | -8,222,276,226,658,664,000 | 36.575758 | 151 | 0.568153 | false | 3.383626 | false | false | false |
PinguinoIDE/pinguino-ide | pinguino/qtgui/gide/bloques/widgets/control_spin.py | 1 | 2553 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/yeison/Documentos/Desarrollo/Pinguino/GitHub/pinguino-ide/pinguino/qtgui/gide/bloques/widgets/control_spin.ui'
#
# Created: Wed Mar 16 13:19:35 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in ... | gpl-2.0 | 4,581,333,034,625,237,000 | 40.852459 | 170 | 0.673717 | false | 3.521379 | false | false | false |
kincl/oncall | api/models.py | 1 | 6075 | from datetime import date
from database import db
class Cron(db.Model):
""" Manages pseudo-cron """
__tablename__ = 'cron'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64))
date_updated = db.Column(db.Date)
# _search_on = 'name'
def __init__(self, name):
... | gpl-3.0 | 7,226,677,344,060,738,000 | 29.837563 | 82 | 0.503045 | false | 3.844937 | false | false | false |
Shephexd/MachineLearning | tensorflow/NN/perception.py | 1 | 1040 | import tensorflow as tf
import numpy as np
xy = np.loadtxt('xor.txt', unpack=True)
x_data = xy[0:-1]
y_data = xy[1]
X = tf.placeholder(tf.float32)
Y = tf.placeholder(tf.float32)
W = tf.Variable(tf.random_uniform([1, len(x_data)], -1.0, 1.0))
# Our hypothesis
h = tf.matmul(W, X)
hypothesis = tf.div(1., 1.+tf.exp(-h)... | mit | -4,401,845,927,400,025,000 | 26.368421 | 84 | 0.649038 | false | 2.653061 | false | false | false |
hilbrichtsoftware/random-parallel-player | designer/editor.py | 1 | 7967 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'editor.ui'
#
# Created by: PyQt5 UI code generator 5.8.1
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow... | gpl-3.0 | -8,802,980,585,933,562,000 | 53.197279 | 97 | 0.70428 | false | 4.204222 | false | false | false |
ageis/securedrop | testinfra/common/test_cron_apt.py | 1 | 4848 | import pytest
import re
@pytest.mark.parametrize('dependency', [
'cron-apt',
'ntp'
])
def test_cron_apt_dependencies(Package, dependency):
"""
Ensure critical packages are installed. If any of these are missing,
the system will fail to receive automatic updates.
The current apt config uses cr... | agpl-3.0 | -3,967,250,146,400,525,300 | 33.628571 | 107 | 0.643564 | false | 3.48777 | true | false | false |
GNOME/orca | test/keystrokes/firefox/line_nav_button_in_link_position_relative_on_focus.py | 1 | 2080 | #!/usr/bin/python
from macaroon.playback import *
import utils
sequence = MacroSequence()
#sequence.append(WaitForDocLoad())
sequence.append(PauseAction(5000))
# Work around some new quirk in Gecko that causes this test to fail if
# run via the test harness rather than manually.
sequence.append(KeyComboAction("<Con... | lgpl-2.1 | -3,756,263,770,291,534,000 | 32.770492 | 70 | 0.672816 | false | 3.208723 | false | true | false |
wpjesus/codematch | ietf/doc/views_help.py | 1 | 2923 | from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.http import Http404
from ietf.doc.models import State, StateType, IESG_SUBSTATE_TAGS
from ietf.name.models import DocRelationshipName, DocTagName
from ietf.doc.utils import get_tags_for_stream_id
... | bsd-3-clause | -3,303,286,786,709,662,700 | 43.287879 | 205 | 0.613753 | false | 3.761905 | false | false | false |
gentlecolts/booru-browse | BooruIcon.py | 1 | 3490 | import gi
gi.require_version("Gtk", "3.0")
from gi.repository import Gtk, GObject, GdkPixbuf
import urllib.request, urllib.parse
from concurrent.futures import ThreadPoolExecutor
import sqlite3
import os, sys
import blacklist
#my directory
mydir=os.path.dirname(sys.argv[0])
#sqlite stuff
conn=sqlite3.connect(os.pat... | mit | 1,002,950,031,111,605,900 | 26.265625 | 134 | 0.718911 | false | 2.955123 | false | false | false |
Reuben-Thorpe/Code.Eval | code.eval/01-hard/string_searching/string.searching.py | 1 | 1706 | # Reuben Thorpe (2016), codeEval [String Search v1.0]
from sys import argv
def check(string, second):
# Checks if second is in string, with regular expression "*"
if "*" not in second:
# Standard search
return(compare(string, second))
else:
# Found regex or escaped "*" char
... | gpl-3.0 | 8,596,018,237,998,165,000 | 26.967213 | 78 | 0.501758 | false | 4.385604 | false | false | false |
PeterSchichtel/hepstore | hepstore/core/docker/__init__.py | 1 | 1958 | #!/usr/bin/env python
######################################################################################
# module : hepstore.core.docker
# author(s): Peter Schichtel
# year : 2017
# version : 0.1
######################################################################################
########################... | gpl-3.0 | 5,850,259,041,542,286,000 | 32.186441 | 86 | 0.280388 | false | 6.659864 | false | false | false |
galaxy-genome-annotation/python-apollo | arrow/commands/annotations/add_transcripts.py | 1 | 1090 | import click
from arrow.cli import pass_context, json_loads
from arrow.decorators import custom_exception, dict_output
@click.command('add_transcripts')
@click.option(
"--transcripts",
help="Transcript data",
type=str,
multiple=True
)
@click.option(
"--suppress_history",
help="Suppress the his... | mit | -2,200,512,477,220,343,600 | 24.348837 | 176 | 0.701835 | false | 3.670034 | false | false | false |
tellian/muddpy | muddpy/commands/comUtil.py | 1 | 1228 | import inform
import movement
command_list = {
'look':"1",
'score':"1",
'move':"1",
'sit':"1",
'stand':"1",
'sleep':"1",
'wake':"1",
}
alias_list = {
'l':'look',
'sc':'score',
'n':'move n',
's':'move s',
'e':'move e',
'w':'move w',
'sl':'sleep',
'wa':'wake',
}
function_list = { 'look': inform.c_look,... | gpl-3.0 | -1,387,818,873,584,182,500 | 20.928571 | 90 | 0.612378 | false | 2.495935 | false | false | false |
joykuotw/python-endpoints | productController.py | 1 | 1252 | from endpoints import Controller, CorsMixin
import sqlite3
from datetime import datetime
conn = sqlite3.connect('databaseForTest.db')
cur = conn.cursor()
class Default(Controller, CorsMixin):
def GET(self):
return "CIUK"
def POST(self, **kwargs):
return '{}, {}, {}'.format(kwargs['title'], kwargs['desc']... | mit | 7,337,343,055,022,102,000 | 30.3 | 102 | 0.648562 | false | 3.693215 | false | false | false |
zimmed/zimmed-core | dotdict.py | 1 | 2091 | """Dot-notation dictionary data structures.
Used to make dictionaries where keys can be accessed like properties through
dot notation.
.. moduleauthor:: Dave Zimmelman <zimmed@zimmed.io>
Exports:
:class DotDict -- Standard mutable dot-notation dictionary.
:class ImmutableDotDict -- Dot-notation dictionary th... | mit | -8,458,185,753,710,186,000 | 29.304348 | 78 | 0.548063 | false | 4.615894 | false | false | false |
Jumpscale/jumpscale_core8 | tests/tools/cuisine/TestCuisineCore.py | 1 | 15362 | """
Test CuisineCore module
"""
import unittest
from unittest.mock import patch, PropertyMock
import copy
from JumpScale import j
@patch('JumpScale.core.redis.Redis.hget')
@patch('JumpScale.core.redis.Redis.hset')
class TestCuisineCore(unittest.TestCase):
def setUp(self):
self.dump_env = {
'... | apache-2.0 | 3,649,448,108,831,329,000 | 43.143678 | 259 | 0.581695 | false | 3.523394 | true | false | false |
David-OConnor/tune-time | misc_examples/midiExample.py | 1 | 1956 | '''
File: midiExample
Author: Jeff Kinne
Contents: basic example showing how to play midi sounds using pygame.
Requires: this example was run in Python 2.7 with pygame 1.9.2 installed.
Sources: I took the pygame.examples.midi file and extracted out only
what is needed to play a few notes.... | gpl-3.0 | -1,291,831,729,141,502,500 | 26.942857 | 81 | 0.618098 | false | 3.227723 | false | false | false |
martflu/adaptive-audio | src/sound.py | 1 | 4783 | import pygame
import os
import random
class sound:
def __init__(self):
self.level = 1
self.sound_level = 1
self.state = 0
self.laststate = 0
self.available_sounds = {}
self.sounds = {}
self.music_channel = pygame.mixer.Channel(0)
def update(... | gpl-2.0 | 3,664,423,815,304,221,000 | 33.666667 | 79 | 0.491951 | false | 3.969295 | false | false | false |
google-research/language | language/boolq/utils/tokenization.py | 1 | 1874 | # coding=utf-8
# Copyright 2018 The Google AI Language Team Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -1,229,734,867,187,086,600 | 34.358491 | 79 | 0.707577 | false | 4.021459 | false | false | false |
hasgeek/lastuser | migrations/versions/4e206c5ddabd_uuid_userid.py | 1 | 8269 | # -*- coding: utf-8 -*-
"""Replace userid of principals with uuid
Revision ID: 4e206c5ddabd
Revises: 83d3ede06c
Create Date: 2017-06-28 18:17:08.664550
"""
from alembic import op
from sqlalchemy.sql import column, table
from sqlalchemy_utils import UUIDType
import sqlalchemy as sa
from progressbar import ProgressBar... | bsd-2-clause | 1,080,581,238,328,136,000 | 32.613821 | 98 | 0.631394 | false | 3.547405 | false | false | false |
galaxor/Nodewatcher | nodewatcher/web/nodes/management/commands/loadtestdata.py | 1 | 1882 | import urllib
import tarfile
import optparse
import os
from django.conf import settings
from django.core import management
from django.core.management import base as management_base
# TODO: Change all prints to self.stdout.write for Django 1.3
class Command(management_base.NoArgsCommand):
"""
This class defines ... | agpl-3.0 | 7,334,603,007,649,327,000 | 32.017544 | 107 | 0.657279 | false | 3.840816 | false | false | false |
PaloAltoNetworks/minemeld-core | minemeld/flask/loginapi.py | 1 | 1472 | # Copyright 2015-2016 Palo Alto Networks, Inc
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 2,131,421,641,942,659,600 | 29.040816 | 91 | 0.702446 | false | 3.755102 | false | false | false |
dayongxie/zeroc-ice-androidndk | js/test/Glacier2/router/run.py | 1 | 1687 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2014 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | gpl-2.0 | 3,369,688,341,995,037,000 | 36.488889 | 103 | 0.580913 | false | 3.089744 | true | false | false |
IntegerMan/Pi-MFD | PiMFD/Applications/System/DiskPages.py | 1 | 11017 | # coding=utf-8
"""
Contains Disk Drive Pages
"""
from datetime import datetime
from PiMFD.Applications.System.ByteFormatting import format_size
from PiMFD.UI.Widgets.Charts import BarChart
from PiMFD.UI.Panels import StackPanel
from PiMFD.UI.Widgets.DashboardWidget import DashboardStatus
try:
import psutil
... | gpl-2.0 | 1,394,788,403,436,694,800 | 33.217391 | 117 | 0.599165 | false | 4.074334 | false | false | false |
xgds/xgds_plot | xgds_plot/value.py | 1 | 1737 | #__BEGIN_LICENSE__
# Copyright (c) 2015, United States Government, as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All rights reserved.
#
# The xGDS platform is licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance ... | apache-2.0 | -5,122,960,189,123,208,000 | 34.44898 | 83 | 0.70639 | false | 4.002304 | false | false | false |
ngsutils/ngsutils | ngsutils/bam/expressed.py | 1 | 5212 | #!/usr/bin/env python
## category General
## desc Finds regions expressed in a BAM file
'''
Finds regions expressed in a BAM file
This will scan a BAM file, looking for regions of mapped reads. The found
regions are output in BED format. These regions are found in a model-free
manner, so they may represent novel or kn... | bsd-3-clause | -6,833,483,277,306,761,000 | 29.658824 | 124 | 0.555065 | false | 3.860741 | false | false | false |
kurvenschubser/pyheinzel | heinzel/core/connection.py | 1 | 5132 | try:
import sqlite3 as sqlite
except ImportError:
from pysqlite2 import dbapi2 as sqlite
import os
from datetime import datetime
from heinzel import settings
from heinzel.core import utils
from heinzel.core.exceptions import DatabaseError, \
DatabaseSanityError, SQLSyntaxError
sqlite.registe... | mit | 7,595,494,895,647,458,000 | 25.287234 | 118 | 0.640351 | false | 3.269598 | false | false | false |
PeWu/python-geneteka | generate.py | 1 | 14396 | #!/usr/bin/python3
"""
Matches birth, death and marriage records and writes one HTML file per
family, including spouses, children and links to other families.
"""
from collections import defaultdict
from jinja2 import Environment, FileSystemLoader, select_autoescape
import glob
import itertools
import json
import os
... | apache-2.0 | -5,440,053,246,281,242,000 | 28.893971 | 80 | 0.654566 | false | 3.416251 | false | false | false |
plxaye/chromium | src/ppapi/generators/idl_c_header.py | 1 | 10770 | #!/usr/bin/env python
# Copyright (c) 2012 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.
""" Generator for C style prototypes and definitions """
import glob
import os
import re
import sys
from idl_log import ErrOut, I... | apache-2.0 | -8,352,939,221,035,694,000 | 31.835366 | 78 | 0.633426 | false | 3.415794 | false | false | false |
Benoss/EazyReport | src/pages/updatedb.py | 1 | 2166 | from src.web_page import WebPage
import src.model
from libs.bottle import request, redirect
import pprint
class UpdateDB(WebPage):
def __init__(self, pagepath, page_id):
WebPage.__init__(self, pagepath)
self.main_template = "update_db.tpl"
self.request_params = dict(request.params)
... | gpl-3.0 | -657,533,313,710,009,000 | 53.175 | 166 | 0.572484 | false | 3.916817 | false | false | false |
eckardm/michigan-technic | additional-commands.py | 1 | 1705 | '''
import what we need'''
# os provides a portable way of using operating system dependent functionality
import os
from os.path import join
# nltk is a leading platform for building python programs to work with human language data, you'll need to install it
import nltk
from dictionaries import dictionary_sho
'''
... | gpl-2.0 | 4,300,889,201,646,752,300 | 25.246154 | 117 | 0.587683 | false | 4.108434 | false | false | false |
PaddlePaddle/models | PaddleCV/3d_vision/SMOKE/smoke/core/kitti_eval.py | 1 | 3181 | # Copyright (c) 2021 PaddlePaddle 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 applic... | apache-2.0 | 8,598,648,397,942,612,000 | 33.967033 | 117 | 0.646966 | false | 3.627138 | false | false | false |
fracpete/wekamooc | moredataminingwithweka/class-2.5.py | 1 | 1774 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# bu... | gpl-3.0 | 7,347,292,716,167,464,000 | 35.204082 | 119 | 0.75761 | false | 3.340866 | false | false | false |
tofay/mediagoblin-indexedsearch | indexedsearch/backends/__init__.py | 1 | 2310 | # GNU MediaGoblin -- federated, autonomous media hosting
# Copyright (C) 2011, 2012 MediaGoblin contributors. See AUTHORS.
#
# This program 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 versio... | agpl-3.0 | 5,528,912,567,620,566,000 | 32.478261 | 77 | 0.647619 | false | 4.333959 | false | false | false |
laanwj/urbit-tools | urbit_sniffer.py | 1 | 8852 | #!/usr/bin/python3
# Copyright (c) 2014 Wladimir J. van der Laan, Visucore
# Distributed under the MIT software license, see
# http://www.opensource.org/licenses/mit-license.php.
'''
urbit UDP sniffer
Usage: urbit_sniffer.py [-p <port1>-<port2>,<port3>,...] [-i <interface>]
'''
import struct, sys, io, argparse, dateti... | mit | 7,522,326,760,407,594,000 | 37.311688 | 165 | 0.58565 | false | 3.386912 | false | false | false |
mitsei/dlkit | dlkit/json_/id/objects.py | 1 | 8819 | """JSON implementations of id objects."""
# pylint: disable=no-init
# Numerous classes don't require __init__.
# pylint: disable=too-many-public-methods,too-few-public-methods
# Number of methods are defined in specification
# pylint: disable=protected-access
# Access to protected methods allowed in packag... | mit | -3,107,439,973,159,181,300 | 33.182171 | 142 | 0.638168 | false | 4.387562 | false | false | false |
nburn42/tensorflow | tensorflow/contrib/distribute/python/values.py | 1 | 28667 | # 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 | -1,132,225,829,850,685,800 | 34.566998 | 106 | 0.672585 | false | 3.765533 | false | false | false |
rhinstaller/docker-anaconda-addon | docs/conf.py | 1 | 11366 | # -*- coding: utf-8 -*-
#
# src documentation build configuration file, created by
# sphinx-quickstart on Wed Apr 8 13:46:00 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All c... | gpl-2.0 | 3,941,723,574,973,202,400 | 30.837535 | 82 | 0.704645 | false | 3.678317 | true | false | false |
arpitprogressive/arpittest | apps/admin/migrations/0018_auto__add_field_track_create_date__add_field_track_write_date__add_fie.py | 1 | 23856 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Track.create_date'
db.add_column(u'admin_track', 'create_date',
self.g... | bsd-3-clause | -3,442,914,386,709,368,300 | 71.734756 | 218 | 0.559524 | false | 3.568053 | false | false | false |
nyu-dl/dl4mt-cdec | character_biscale/train_wmt15_deen_adam.py | 1 | 3194 | import os
from collections import OrderedDict
from nmt import train
from char_biscale import *
layers = {'ff': ('param_init_fflayer', 'fflayer'),
'fff': ('param_init_ffflayer', 'ffflayer'),
'gru': ('param_init_gru', 'gru_layer'),
'biscale_decoder': ('param_init_biscale_decoder',
... | bsd-3-clause | 675,555,731,908,241,400 | 35.712644 | 83 | 0.605197 | false | 3.49453 | false | false | false |
smokku/libgmbus | doxygen.py | 1 | 5445 | # vim: set et sw=3 tw=0 fo=awqorc ft=python:
#
# Astxx, the Asterisk C++ API and Utility Library.
# Copyright (C) 2005, 2006 Matthew A. Nicholson
# Copyright (C) 2006 Tim Blechmann
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License v... | gpl-2.0 | -1,007,487,436,464,831,000 | 25.177885 | 96 | 0.642975 | false | 3.03681 | false | false | false |
pramen/python-training | knapsack.py | 1 | 2109 | #!/usr/bin/env python2.7
def knapsack(capacity, items):
"""Be greedy!
One item:
>>> knapsack(100, ((1, 1),))
[100]
>>> knapsack(100, ((100, 1),))
[1]
Two items:
>>> knapsack(100, ((1, 1), (3, 4)))
[1, 33]
>>> knapsack(100, ((60, 80), (50, 50)))
[1, 0]
Three items:
... | gpl-3.0 | 7,510,738,872,287,453,000 | 21.677419 | 93 | 0.445235 | false | 2.724806 | false | false | false |
gammasky/cta-dc | sky_model/pwn/model_pwn.py | 1 | 14950 | """
Make synthetic PNW population for CTA 1DC
"""
import numpy as np
import astropy.units as u
from astropy.coordinates import SkyCoord
from astropy.table import Table, Column
from gammapy.astro.population import make_base_catalog_galactic
from gammapy.utils.random import get_random_state
from gammapy.utils import coor... | bsd-3-clause | -3,282,055,394,426,144,300 | 38.655172 | 139 | 0.624816 | false | 2.927355 | false | false | false |
gudnm/dhash | ConsistentHashing.py | 1 | 3613 | from Resizer import Resizer
class ConsistentHashing(Resizer):
"""Implement a consistent hashing ring.
Part of 'Functional Core' - methods of this class don't change
any state or objects, all they do is take values and return values.
E.g. add_node will take new node and all existing nodes and return
... | mit | 1,410,172,184,830,659,600 | 35.13 | 78 | 0.590645 | false | 4.073281 | false | false | false |
marco-hoyer/statusfile-writer | build.py | 1 | 2093 | from pybuilder.core import use_plugin, init, Author
use_plugin("python.install_dependencies")
use_plugin("python.core")
use_plugin("python.unittest")
use_plugin("python.distutils")
use_plugin('copy_resources')
use_plugin("python.coverage")
authors = [Author('Marco Hoyer', 'marco.hoyer@immobilienscout24.de')]
descript... | gpl-2.0 | -5,810,403,602,339,373,000 | 34.474576 | 98 | 0.688485 | false | 3.791667 | false | false | false |
JulyKikuAkita/PythonPrac | cs15211/HouseRobberII.py | 1 | 5916 | __source__ = 'https://leetcode.com/problems/house-robber-ii/'
# https://github.com/kamyu104/LeetCode/blob/master/Python/house-robber-ii.py
# Time: O(n)
# Space: O(1)
#
# Description: Leetcode # 213. House Robber II
#
# Note: This is an extension of House Robber.
#
# After robbing those houses on that street, the thief... | apache-2.0 | -7,242,519,038,697,054,000 | 32.055866 | 104 | 0.596349 | false | 3.143464 | true | false | false |
kron4eg/django-btt | btt/lib/bencoding/utilities.py | 1 | 2611 | from decimal import Decimal
from string import digits
from itertools import takewhile
class Iterator:
def __init__(self, seq):
self.seq = seq
self.index = -1
def __iter__(self):
return self
def _next(self):
try:
return self.seq[self.index + 1]... | gpl-3.0 | 4,002,829,640,567,681,000 | 23.641509 | 90 | 0.497128 | false | 3.82284 | false | false | false |
b-hub/autonomacy | democracy.py | 1 | 2156 | import sys
import random
def normalise(arr):
s = float(sum(arr))
return map(lambda x: x/s, arr)
# can improve with matrix multiplication
def decisionMatrix(n):
maxPoint = 10
matrix = []
i = 0
while i < n:
row = []
selfVote = random.randint(n * (maxPoint/2), n * (maxPoint/2) * 9)
j = 0
while j < n:
if... | apache-2.0 | 2,747,655,040,370,577,400 | 18.25 | 85 | 0.602041 | false | 2.610169 | false | false | false |
bn0x/hulQ | hulQ.py | 1 | 2167 | """
HTTP UNBEARBALE LOAD QUEEN
A HULK EDIT BY @OBN0XIOUS
THE ORIGINAL MAKER OF HULK PLEASE GO BACK TO CODECADEMY
"""
import sys
import argparse
import random
from threading import Thread
import hulqThreading
import hulqRequest
parser = argparse.ArgumentParser()
parser.add_argument('--threads', '-t', d... | gpl-3.0 | -8,859,428,919,696,827,000 | 38.886792 | 154 | 0.668205 | false | 2.397124 | false | false | false |
mancellin/capytaine | capytaine/bodies/predefined/cylinders.py | 1 | 10585 | #!/usr/bin/env python
# coding: utf-8
"""Generate meshes of cylinders and disks"""
# Copyright (C) 2017-2019 Matthieu Ancellin
# See LICENSE file at <https://github.com/mancellin/capytaine>
import logging
from itertools import product
import numpy as np
from capytaine.meshes.geometry import xOy_Plane, xOz_Plane, yOz... | gpl-3.0 | -7,422,420,102,022,764,000 | 36.01049 | 146 | 0.578838 | false | 3.657567 | false | false | false |
nico-ralf-ii-fpuna/paper | waf/data_sets/base.py | 1 | 4529 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Nico Epp and Ralf Funk
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from urllib import parse
from typing import Dict, ... | mpl-2.0 | -8,369,973,412,284,340,000 | 30.671329 | 99 | 0.52219 | false | 3.761628 | false | false | false |
cans/vcs-ssh | ssh_harness/contexts/inthrowabletempdir.py | 1 | 2764 | # -*- coding: utf-8-unix; -*-
#
# Copyright © 2014, Nicolas CANIART <nicolas@caniart.net>
#
# This file is part of vcs-ssh.
#
# vcs-ssh 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.
#
# vcs-s... | gpl-2.0 | 3,010,028,942,525,771,300 | 30.397727 | 79 | 0.621426 | false | 4.057269 | false | false | false |
Limpan/bytardag | web/tests/test_auth.py | 1 | 1483 | import pytest
#from flask import url_for
from app.models import User
from app import mail
def test_login_and_logout(client, db):
# Add test user.
user = User(email='test@example.com', password='secretsauce', confirmed=True)
db.session.add(user)
db.session.commit()
# Login
rv = client.post('/a... | mit | -4,428,305,790,840,297,500 | 29.142857 | 81 | 0.658091 | false | 3.341629 | true | false | false |
nathanielvarona/airflow | airflow/providers/cncf/kubernetes/utils/pod_launcher.py | 1 | 11754 | # 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 | 2,309,559,137,049,038,300 | 37.162338 | 109 | 0.605241 | false | 4.026721 | false | false | false |
mderomph-coolblue/dd-agent | checks.d/haproxy.py | 1 | 21037 | # stdlib
from collections import defaultdict
import re
import time
# 3rd party
import requests
# project
from checks import AgentCheck
from config import _is_affirmative
from util import headers
STATS_URL = "/;csv;norefresh"
EVENT_TYPE = SOURCE_TYPE_NAME = 'haproxy'
class Services(object):
BACKEND = 'BACKEND'
... | bsd-3-clause | -8,030,950,205,512,526,000 | 39.300766 | 232 | 0.554024 | false | 3.992598 | true | false | false |
feliam/opaf | opaflib/__init__.py | 1 | 33178 | from opaflib.parser import parse,bruteParser,normalParser,xrefParser,multiParser
from opaflib.xmlast import etree #payload,setpayload,xmlToPy,etree,create_node
from opaflib.filters import defilterData
from opaflib.xref import *
#Logging facility
import logging
logging.basicConfig(filename='opaf.log',level=logging.DEBUG... | mit | -1,018,853,350,570,824,200 | 38.310427 | 168 | 0.587618 | false | 3.560253 | false | false | false |
mk23/snmpy | lib/snmpy/module/disk_utilization.py | 1 | 1260 | import datetime
import logging
import os
import snmpy.module
import subprocess
LOG = logging.getLogger()
class disk_utilization(snmpy.module.TableModule):
def __init__(self, conf):
conf['table'] = [
{'dev': 'string'},
{'wait': 'integer'},
{'util': 'integer'},
... | mit | -3,023,664,530,996,468,700 | 33.054054 | 174 | 0.545238 | false | 3.396226 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v7/services/services/feed_mapping_service/client.py | 1 | 22895 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -6,497,433,497,029,600,000 | 40.627273 | 128 | 0.614152 | false | 4.554406 | false | false | false |
SaschaMester/delicium | tools/perf/page_sets/simple_mobile_sites_fling.py | 1 | 1904 | # 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.
from page_sets import fling_gesture_supported_shared_state
from telemetry.page import page as page_module
from telemetry import story
class SimpleFlingPage... | bsd-3-clause | 6,131,503,250,534,057,000 | 34.259259 | 78 | 0.677521 | false | 3.565543 | false | false | false |
JulyKikuAkita/PythonPrac | cs15211/TheMaze.py | 1 | 5847 | __source__ = 'https://leetcode.com/problems/the-maze/'
# Time: O(m*n)
# Space: O(m*n)
#
# Description: 490. The Maze
#
# There is a ball in a maze with empty spaces and walls.
# The ball can go through empty spaces by rolling up, down, left or right,
# but it won't stop rolling until hitting a wall. When the ball stop... | apache-2.0 | -7,793,920,266,317,784,000 | 31.488889 | 113 | 0.554643 | false | 3.344966 | true | false | false |
dfdx/flavorite | flavorite/__init__.py | 1 | 4326 | #!/usr/bin/env python
import os
import sys
import pickle
import heapq as hq
import scipy.sparse as sp
from datetime import datetime
from scipy import *
## cosine similarity
def mult_scalar(v1, v2):
"""Computes scalar multiplication of 2 vectors.
Vectors should be represented as 1xN matrices (row vectors)... | mit | -5,548,505,196,272,214,000 | 32.796875 | 79 | 0.542765 | false | 3.893789 | false | false | false |
buffer/thug | thug/Logging/Features.py | 1 | 3905 | #!/usr/bin/env python
#
# Features.py
#
# This program 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 the hope that it will be useful,
# but WITHOUT ANY WARRANTY; ... | gpl-2.0 | -5,477,481,925,730,934,000 | 28.141791 | 70 | 0.599232 | false | 4.005128 | false | false | false |
archcra/brt | train/round03/Deep-NN-xavier-train.py | 1 | 2638 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# 使用重复棋子的多个图片训练
import tensorflow as tf
import numpy as np
import loadTrainData
# parameters
learning_rate = 0.001
training_epochs = 300
x_data = loadTrainData.getImagesData()
pixels = 70*74
# y_data = np.array([[0, 0, 1], [0, 1, 0], [0, 1, 1], [1, 0, ... | gpl-3.0 | 3,268,879,788,946,558,000 | 26.389474 | 116 | 0.651038 | false | 2.765143 | false | false | false |
Coelhon/MasterRepo.repository | plugin.video.zen/resources/lib/sources/scnlog.py | 1 | 4616 | # -*- coding: utf-8 -*-
'''
zen Add-on
Copyright (C) 2016 zen
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later v... | gpl-2.0 | 1,319,470,004,483,706,400 | 35.642857 | 210 | 0.627383 | false | 3.384164 | false | false | false |
GoogleCloudPlatform/gsutil | gslib/addlhelp/versions.py | 1 | 4056 | # -*- coding: utf-8 -*-
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | 4,909,620,895,616,947,000 | 45.62069 | 82 | 0.75715 | false | 4.442497 | false | false | false |
wichert/po-push | src/popush/cli.py | 1 | 1592 | import os
import click
import polib
from . import ignore_msg
from .po import rewrite_po
from .pt import rewrite_pt
from .python import rewrite_python
REWRITERS = {
'.po': rewrite_po,
'.pt': rewrite_pt,
'.py': rewrite_python,
}
@click.command()
@click.argument('po-file', type=click.Path(exists=True))
@cl... | bsd-2-clause | -4,306,632,180,257,741,300 | 30.215686 | 80 | 0.579774 | false | 3.537778 | false | false | false |
bytesized/Snappy-Symbolication-Server | tests/test_stress.py | 1 | 10026 | import unittest
import os
import shutil
import json
import threading
import Queue
import time
import random
import memcache
import testUtils
testUtils.addSymServerToPath()
import quickstart
# WARNING: Setting this too high will result in problems with too many handles
# open.
REQUEST_COUNT = 300
TEST_DIR = os.path.d... | mpl-2.0 | 2,369,446,377,841,446,400 | 35.458182 | 90 | 0.629463 | false | 4.444149 | true | false | false |
weizhongli/cdhit | usecases/Miseq-16S/NG-Omics-WF.py | 1 | 31596 | #!/usr/bin/env python
# =============================== NG-Omics-WF ==================================
# _ _ _____ ____ _ __ ________
# | \ | |/ ____| / __ \ (_) \ \ / / ____|
# | \| | | __ ______| | | |_ __ ___ _ ___ ___ _____\ \ /\... | gpl-2.0 | -3,652,667,587,678,658,600 | 34.581081 | 173 | 0.553614 | false | 3.071449 | true | false | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2016_09_01/models/effective_network_security_group.py | 1 | 1777 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -8,439,212,237,528,157,000 | 43.425 | 112 | 0.659539 | false | 4.533163 | false | false | false |
edx/edxanalytics | deployment/old/fabfile.py | 1 | 7094 | """
This fabfile currently works to deploy this repo and mitx to a new server.
A lot of settings and names will need to be changed around for your specific config, so
look through carefully.
"""
from __future__ import with_statement
from fabric.api import local, lcd, run, env, cd, settings, prefix, sudo, shell_env
fro... | agpl-3.0 | 3,251,062,548,504,040,000 | 43.622642 | 149 | 0.62433 | false | 3.66615 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-dns/azure/mgmt/dns/_configuration.py | 1 | 3286 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -4,565,406,021,957,686,300 | 45.28169 | 129 | 0.673463 | false | 4.557559 | true | false | false |
hevi9/mknew | creat/__main__.py | 1 | 2948 | """ mk CLI. """
from pathlib import Path
from typing import List
import typer
from rich.console import Console
from rich.table import Table
from creat.context import make_root_context
from . import get_console, setup_logger
from .find import update_index_from_roots
from .index import Index
from .run import run
from... | lgpl-2.1 | 7,143,451,663,883,802,000 | 22.212598 | 68 | 0.570896 | false | 3.612745 | false | false | false |
citizenline/citizenline | bettertexts/admin.py | 1 | 6287 | from __future__ import unicode_literals
from django.contrib import admin
# Register your models here.
from .models import Type
from .models import Text
from .models import Rating
from .models import UserRating
from .models import Question
from .models import TextComment
from django.http import HttpResponse
from djan... | mit | -1,378,802,489,356,193,300 | 29.519417 | 88 | 0.603945 | false | 3.873691 | false | false | false |
charanpald/wallhack | wallhack/modelselect/ToyDataExp.py | 1 | 8556 | import sys
import os
import numpy
import logging
import multiprocessing
from apgl.predictors.LibSVM import LibSVM
from sandbox.util.PathDefaults import PathDefaults
from sandbox.util.Util import Util
from sandbox.util.FileLock import FileLock
from sandbox.util.Sampling import Sampling
from sandbox.util.Evaluator impor... | gpl-3.0 | 3,560,920,297,110,790,700 | 48.172414 | 160 | 0.569542 | false | 3.935603 | true | false | false |
Asher256/python-cmdwrapper | cmdwrapper/cmdoutput.py | 1 | 3633 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Author: Asher256
# Github: https://github.com/Asher256/python-cmdwrapper
# License: LGPL 2.1
#
# This source code follows the PEP-8 style guide:
# https://www.python.org/dev/peps/pep-0008/
#
"""The output of a command (stdout or stderr)."""
import sys
assert sys.vers... | lgpl-2.1 | -6,956,623,118,773,756,000 | 28.298387 | 78 | 0.544178 | false | 4.229336 | true | false | false |
yv84/bearded-computing-machine | question_answer/question_answer/settings.py | 1 | 2142 | """
Django settings for question_answer project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR,... | mit | -7,266,823,641,435,520,000 | 22.538462 | 71 | 0.716153 | false | 3.201794 | false | false | false |
lmcuende/myphotos | myphotos/mainapp/views.py | 1 | 3662 | from django.shortcuts import render, render_to_response, get_object_or_404
from django.contrib.auth.models import User
from mainapp.models import Photo, Comment
from mainapp.forms import PhotoForm, CommentForm, ContactForm
from django.http import HttpResponse, HttpResponseRedirect
from django.template import RequestCon... | gpl-2.0 | 4,790,825,687,937,959,000 | 35.63 | 117 | 0.74331 | false | 3.517771 | false | false | false |
tleonhardt/CodingPlayground | python/swig/fibonacci/test_swig.py | 1 | 1331 | #!/usr/bin/env python
""" Python wrapper to time the SWIG wrapper for computing the nth fibonacci number
in a non-recursive fashion and compare it to the pure Python implementation.
"""
import fibonacci
import fib_python
if __name__ == '__main__':
import sys
import timeit
n = 20
try:
n = int(s... | mit | -2,929,186,664,090,764,300 | 31.463415 | 82 | 0.595793 | false | 3.27027 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.