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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
vprusso/youtube_tutorials | natural_language_processing/nlp_1.py | 1 | 3973 | # LucidProgramming -- Natural Language Processing in Python: Part 1
# YouTube Video: https://www.youtube.com/watch?v=tP783g97C5o
# Prior to running this script, you will require Python to be installed on
# your machine. If so, you may run the following command via pip:
# pip install nltk
# Once installed, you shoul... | gpl-3.0 | -2,300,163,772,194,960,600 | 41.265957 | 103 | 0.726655 | false | 3.515929 | false | false | false |
cpitclaudel/dBoost | graphics/scalability.pdf.py | 1 | 2629 | #!/usr/bin/env python3
from utils import filename, save2pdf, setup, rcparams, to_inches
from utils.plots_helper import sensors
import matplotlib
from matplotlib import pyplot
from matplotlib.backends.backend_pdf import PdfPages
import itertools
matplotlib.rcParams['text.latex.preamble'] = [r"\usepackage{siunitx}"]
... | gpl-3.0 | 3,273,065,536,939,600,400 | 32.705128 | 139 | 0.58197 | false | 2.715909 | false | false | false |
jaygoswami2303/course_dashboard_api | v2/DiscussionAPI/permissions.py | 1 | 1727 | """
Permissions classes for Discussion-API views.
"""
from rest_framework import permissions
from django.http import HttpResponse
import MySQLdb
from course_dashboard_api.v2.dbv import *
sql_user = MYSQL_USER
sql_pswd = MYSQL_PSWD
mysql_db = MYSQL_DB
class IsStudent(permissions.BasePermission):
"""
Grants ac... | mit | 3,944,675,056,809,785,300 | 32.211538 | 124 | 0.658367 | false | 3.88964 | false | false | false |
JaneliaSciComp/Ax | ax1.py | 1 | 6102 | #!/home/arthurb/bin/anaconda/bin/python
# python ax1.py params_file FILEIN FILEOUT
# python ax1.py params_file FILEIN FILEOUT START STOP
# python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT
# python ax1.py FS NFFT NW K PVAL FILEIN FILEOUT START STOP
#
# analyze a set of time series with multi-taper spectral analysis and
#... | bsd-3-clause | 4,388,245,357,869,162,500 | 28.765854 | 157 | 0.632416 | false | 2.71683 | false | false | false |
ashoksekar/python | CodeJam/2011/Round2/AIWar/main.py | 1 | 5722 | #!/usr/bin/python
import networkx as nx
import matplotlib.pyplot as plt
num_of_test = 0 # number of test case (N)
debug = 0
num_P = 0
num_W = 0
gown = 0
gthtn = 0
th = []
class node(object):
""" data = n
child = child nodes """
def __init__(self, data = 0, child = [], parent = [], level = 0):
... | gpl-2.0 | -8,738,169,697,906,892,000 | 24.207048 | 90 | 0.436386 | false | 3.348157 | false | false | false |
PuzzleboxIO/synapse-python | Puzzlebox/Synapse/Device.py | 1 | 12424 | # -*- coding: utf-8 -*-
# Copyright Puzzlebox Productions, LLC (2010-2012)
#
# This code is released under the GNU Pulic License (GPL) version 2
# For more information please refer to http://www.gnu.org/copyleft/gpl.html
__changelog__ = """\
Last Update: 2012.04.23
"""
__todo__ = """
"""
### IMPORTS ###
import os, ... | agpl-3.0 | 6,322,157,607,286,303,000 | 24.883333 | 95 | 0.58717 | false | 3.324592 | true | false | false |
jamesjarlathlong/resourceful | two_agents_presleep.py | 1 | 8165 | import os
from agent import *
import asyncio
from qlearn import QLearn
from sarsa import Sarsa
import itertools
import functools
import json
import random
import sklearn
import collections
import websockets
import json
import copy
import time
import random
###Helper functions###
def merge(dicts):
super_dict = colle... | mit | -7,540,607,257,386,654,000 | 40.446701 | 112 | 0.658298 | false | 3.489316 | false | false | false |
Freso/listenbrainz-server | listenbrainz/domain/tests/test_spotify.py | 1 | 9004 | import time
import requests_mock
from flask import current_app
from listenbrainz.domain import spotify
from listenbrainz.webserver.testing import ServerTestCase
from unittest import mock
class SpotifyDomainTestCase(ServerTestCase):
def setUp(self):
super(SpotifyDomainTestCase, self).setUp()
se... | gpl-2.0 | 3,376,187,134,347,358,700 | 42.708738 | 103 | 0.615504 | false | 3.550473 | true | false | false |
dopuskh3/confluence-publisher | conf_publisher/confluence.py | 1 | 7678 | import os
import copy
from operator import attrgetter
try:
from lxml import etree
except ImportError:
import xml.etree.ElementTree as etree
class Content(object):
type = None
def __init__(self):
self.id = None
def __eq__(self, other):
return self.__dict__ == other.__dict__
cla... | mit | 1,458,645,083,216,607,500 | 29.347826 | 112 | 0.565642 | false | 3.99272 | false | false | false |
ampotty/uip-pc3 | Ejemplos/ejemplo16.py | 1 | 1153 | def isPalindromicNumber(num: int) -> bool:
"""
Determina sin un numero es palindromico
:param num: Numbero entero a evaluar
:type num: int
:return: Verdadero si es numero palindromico; Falso si no es numero palindromico
:rtype: bool
"""
try:
if type(num) != int:
raise... | mit | 7,433,402,708,684,758,000 | 27.825 | 84 | 0.62706 | false | 3.211699 | false | false | false |
Azure/azure-sdk-for-python | sdk/storage/azure-storage-blob/samples/blob_samples_service_async.py | 1 | 8293 | # 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.
# --------------------------------------------------------------------... | mit | -7,345,336,612,967,402,000 | 42.878307 | 134 | 0.633064 | false | 4.625209 | true | false | false |
Azure/azure-sdk-for-python | sdk/cognitiveservices/azure-cognitiveservices-search-visualsearch/setup.py | 1 | 2961 | #!/usr/bin/env python
#-------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#----------------------------------------------------------------... | mit | 5,800,291,530,648,143,000 | 32.647727 | 91 | 0.602499 | false | 3.896053 | false | false | false |
beeftornado/sentry | src/sentry/migrations/0023_hide_environment_none_20191126.py | 2 | 1733 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
def hide_environment_none(apps, schema_editor):
"""
Hide environments that are named none, since they're blacklisted and no longer can be created.
We should iterate over each environment row individua... | bsd-3-clause | -3,321,665,843,704,771,600 | 41.268293 | 119 | 0.709175 | false | 4.420918 | false | false | false |
denz/swarm | swarm/helpers.py | 1 | 11212 | # -*- coding: utf-8 -*-
import sys
import os
import pkgutil
from multiprocessing import RLock
from types import StringTypes
def get_root_path(import_name):
"""Returns the path to a package or cwd if that cannot be found. This
returns the path of a package or the folder that contains a module.
Not to be co... | bsd-3-clause | 4,586,606,665,246,934,000 | 38.206294 | 78 | 0.604085 | false | 4.287572 | false | false | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/numarray/numerictypes.py | 1 | 15882 | """numerictypes: Define the numeric type objects
This module is designed so 'from numerictypes import *' is safe.
Exported symbols include:
Dictionary with all registered number types (including aliases):
typeDict
Numeric type objects:
Bool
Int8 Int16 Int32 Int64
UInt8 UInt16 UInt32 UI... | gpl-3.0 | -3,608,736,657,460,471,300 | 26.981752 | 87 | 0.581287 | false | 3.405232 | false | false | false |
ryota-sugimoto/hackerrank | vmware/logical_hub.py | 1 | 1266 | #!/usr/bin/env python
def wire_port2port(d):
for host in d.keys():
hubs = d[host]
for i in range(len(hubs)):
for j in range(i+1,len(hubs)):
if hubs[i] == hubs[j]:
print "PORT_TO_PORT %s %i %i" % (host,i,j)
print "PORT_TO_PORT %s %i %i" % (host,j,i)
def make_hub_map(d):
hu... | gpl-2.0 | -9,089,723,739,468,877,000 | 23.346154 | 68 | 0.561611 | false | 2.567951 | false | false | false |
wbsavage/shinken | shinken/modules/glances_ui/plugins/cv_memory/cv_memory.py | 1 | 2398 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you can redis... | agpl-3.0 | -5,770,006,532,879,468,000 | 25.94382 | 100 | 0.634696 | false | 3.223118 | false | false | false |
trustpilot/python-lambdarest | lambdarest/__init__.py | 1 | 13223 | # -*- coding: utf-8 -*-
import json
import logging
from string import Template
from jsonschema import validate, ValidationError, FormatChecker
from werkzeug.routing import Map, Rule, NotFound
from werkzeug.http import HTTP_STATUS_CODES
from functools import wraps
__validate_kwargs = {"format_checker": FormatChecker(... | mit | -7,489,941,035,686,895,000 | 36.247887 | 138 | 0.571807 | false | 4.629902 | false | false | false |
zayamatias/retrotool | retroclasses.py | 1 | 6684 | class sprite:
# Sprite class, to make it easier to manipulate afterwards
spriteCount = 0
def __init__ (self,pattern,colors,ored,x,y):
self.pattern=pattern #binary pattern of the sprite
self.colors=colors #colors of the sprite
self.ored = ored #does this sprite c... | gpl-3.0 | -4,547,728,878,825,318,000 | 31.939086 | 117 | 0.524087 | false | 4.254615 | false | false | false |
akash1808/cachetools | cachetools/func.py | 1 | 3382 | import collections
import functools
import random
import time
from .lfu import LFUCache
from .lru import LRUCache
from .rr import RRCache
from .ttl import TTLCache
try:
from threading import RLock
except ImportError:
from dummy_threading import RLock
_CacheInfo = collections.namedtuple('CacheInfo', [
'h... | mit | -298,878,277,565,286,600 | 26.950413 | 77 | 0.611473 | false | 3.955556 | false | false | false |
cernops/cloudbase-init | cloudbaseinit/tests/plugins/windows/test_localscripts.py | 1 | 2254 | # Copyright 2014 Cloudbase Solutions Srl
#
# 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 l... | apache-2.0 | -5,743,922,069,370,638,000 | 37.862069 | 78 | 0.692103 | false | 3.612179 | true | false | false |
MalkmusT/coala-quickstart | coala_quickstart/interaction/Logo.py | 2 | 2373 | import textwrap
from coala_quickstart.Strings import COALA_BEAR_LOGO, WELCOME_MESSAGES
def print_side_by_side(printer,
left=[],
right=[],
left_color='white',
right_color='blue',
limit=80):
"""
Pr... | agpl-3.0 | 982,964,152,342,786,000 | 30.223684 | 70 | 0.574378 | false | 3.928808 | false | false | false |
jimfenton/notif-notifier | clockwatcherd.py | 1 | 5149 | #!/usr/bin/python
# clockwatcherd.py - Daemon to generate test notifs once a minute
#
# Copyright (c) 2015 Jim Fenton
#
# 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, i... | mit | 2,108,621,448,660,416,500 | 36.043165 | 110 | 0.629637 | false | 4.345148 | false | false | false |
anandka/SEWA | project/user/forms.py | 1 | 2007 | # project/user/forms.py
from flask_wtf import Form
from wtforms import TextField, PasswordField
from wtforms.validators import DataRequired, Email, Length, EqualTo
from project.models import User
class LoginForm(Form):
email = TextField('email', validators=[DataRequired()])
password = PasswordField('passwo... | mit | -8,264,770,392,331,245,000 | 26.121622 | 80 | 0.623817 | false | 4.087576 | false | false | false |
Abhino/GamifiedTodoList | app.py | 1 | 1583 | import logging
import logging.config
import sys
from flask import Flask,render_template
from werkzeug.contrib.fixers import ProxyFix
from datetime import datetime
from apis import api, db
import os
log = logging.getLogger('werkzeug')
log.setLevel(logging.ERROR)
DATE_FORMAT="%Y-%m-%d %H:%M:%S"
FORMAT = '%(asctime)s - %... | mit | -6,565,310,337,275,284,000 | 30.68 | 113 | 0.725205 | false | 3.166 | false | false | false |
python-xlib/python-xlib | Xlib/xobject/drawable.py | 1 | 34416 | # Xlib.xobject.drawable -- drawable objects (window and pixmap)
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public License
# as published by the Free Software Foundation; either v... | lgpl-2.1 | -8,560,134,836,506,674,000 | 40.216766 | 101 | 0.463389 | false | 4.683086 | false | false | false |
kiyoad/twimg2rss | url_db.py | 1 | 1450 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import datetime
import os
import sqlite3
from common import conf
class UrlDb:
def __init__(self):
self.conn = None
self.c = None
def _open_sqlite3(self, url_db_file):
self.conn = sqlite3.connect(
url_db_file,
dete... | mit | 1,711,929,013,310,290,000 | 27.431373 | 77 | 0.576552 | false | 3.502415 | false | false | false |
SCUEvals/scuevals-api | db/alembic/versions/20170927093446_fix_update_courses.py | 1 | 4925 | """Fix update_courses
Revision ID: 7004250e3ef5
Revises: 8a786f9bf241
Create Date: 2017-09-27 09:34:46.069174
"""
from alembic import op
import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = '7004250e3ef5'
down_revision = '8a786f9bf241'
branch_labels = None
depends_on = None
def upgrade():
... | agpl-3.0 | -5,163,401,731,827,070,000 | 25.196809 | 106 | 0.591269 | false | 3.278961 | false | false | false |
leonardr/botfriend | bots.sample/podcast/__init__.py | 1 | 2324 | from dateutil import parser
from pdb import set_trace
import random
from olipy.ia import Audio
from botfriend.bot import BasicBot
from botfriend.publish.podcast import PodcastPublisher
class PodcastBot(BasicBot):
COLLECTION = "podcasts"
def update_state(self):
# Grab the 100 most recently posted po... | mit | -460,678,980,916,038,300 | 29.986667 | 105 | 0.567986 | false | 3.899329 | false | false | false |
jbteixeir/Openflow-DC-Framework | pox/host_tracker/host_tracker.old.py | 1 | 12063 | # Copyright 2011 Dorgival Guedes
#
# This file is part of POX.
# Some of the arp/openflow-related code was borrowed from dumb_l3_switch.
#
# POX 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... | gpl-3.0 | -1,858,211,703,470,429,200 | 33.663793 | 80 | 0.655558 | false | 3.505667 | false | false | false |
jonaslu/thatswhatsup | python/bytecode/bytecode.py | 1 | 2290 | method_add = {
"code": [
# func add(x,y):
# return x + y
# STORE_NAME 0
# STORE_NAME 1
# LOAD_NAME 0
# LOAD_NAME 1
# ADD_TWO_VALUES
# RET
("STORE_NAME", 0),
("STORE_NAME", 1),
("LOAD_NAME", 0),
("LOAD_NAME", 1),
("ADD_TWO_VALUES", None),
... | mit | -5,269,336,586,440,504,000 | 26.590361 | 64 | 0.460262 | false | 3.62916 | false | false | false |
googleinterns/e2e-convrec | trainer/constants.py | 1 | 1779 | # Copyright 2020 Google LLC
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# https://www.apache.org/licenses/LICENSE-2.0
# Unless required by applicable law or agreed to in writing, sof... | apache-2.0 | 3,666,765,548,474,841,000 | 39.431818 | 75 | 0.704328 | false | 2.940496 | false | false | false |
MWisBest/PyBot | Commands/xbox/xbox.py | 1 | 2126 | ###########################################################################
## PyBot ##
## Copyright (C) 2015, Kyle Repinski ##
## Copyright (C) 2015, Andres Preciado (Glitch) ##
## ... | gpl-3.0 | -3,655,683,782,739,206,700 | 63.424242 | 106 | 0.489652 | false | 4.438413 | false | false | false |
pneff/wsgiservice | tests/test_application.py | 1 | 20489 | import io
from datetime import timedelta
from mox3 import mox
import wsgiservice
import wsgiservice.application
import wsgiservice.exceptions
from webob import Request
def test_getapp():
"""get_app returns a list of resources from the dictionary."""
app = wsgiservice.get_app(globals())
print(app)
pr... | bsd-2-clause | 3,326,394,759,695,108,600 | 32.699013 | 78 | 0.639123 | false | 3.437175 | true | false | false |
emailgregn/djtempl | djtempl/cli.py | 1 | 1278 | from djtempl import render_files
import argparse
import sys
def main():
parser = argparse.ArgumentParser()
parser.add_argument("-t", "--template",
metavar='file',
default='Dockerfile.tmpl',
type=argparse.FileType(mode='r'), # 2.7 argparse... | gpl-3.0 | 3,263,640,041,976,481,000 | 33.540541 | 109 | 0.516432 | false | 4.822642 | false | false | false |
ama-jharrison/agdc | agdc/agdc/abstract_ingester/dataset_record.py | 1 | 27323 | #!/usr/bin/env python
# ===============================================================================
# Copyright 2015 Geoscience Australia
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
... | apache-2.0 | 7,368,330,845,389,171,000 | 41.493002 | 101 | 0.569044 | false | 4.016907 | false | false | false |
chris-klinger/Goat | databases/database_config.py | 1 | 7681 | """
This module contains code for creating the underlying database structures
and also general code to perform basic actions: add, remove, update, list
"""
import os
import goat
from settings import settings_config
from databases import database_records,database_util,database_dirfiles
from util.inputs import prompts
... | gpl-3.0 | 8,086,966,148,088,573,000 | 35.751196 | 88 | 0.623096 | false | 3.664599 | false | false | false |
dragoon/kilogram | kilogram/dataset/edit_histories/wikipedia/libs/dewikify.py | 1 | 1518 | import re
class Parser(object):
"""
Parser to remove all kinds of wiki markup tags from an object
"""
def __init__(self):
"""
Constructor
"""
self.string = ''
# all the following regex remove all tags that cannot be rendered
# in text
self.wiki_... | apache-2.0 | 5,212,644,074,540,540,000 | 32.755556 | 89 | 0.431489 | false | 4.158904 | false | false | false |
rocktavious/DevToolsLib | DTL/maya/vertexColorUtils.py | 1 | 8982 | import os, sys, traceback
import maya.cmds as cmds
from functools import partial
#Needs refactoring
from ..utils.funcs import selection
from DTL.api import Safe
"""
#------------------------------------------------------------
def buildChannelMatrixFromUI():
'''Helper Function to build the channel matrix from th... | mit | 5,149,193,529,652,118,000 | 42.606796 | 181 | 0.599978 | false | 3.441379 | false | false | false |
MapofLife/MOL | earthengine/google-api-python-client/samples/oauth2/dailymotion/main.py | 1 | 3069 | #!/usr/bin/env python
#
# Copyright 2007 Google 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 o... | bsd-3-clause | -1,209,884,518,423,326,000 | 27.95283 | 74 | 0.706419 | false | 3.756426 | false | false | false |
fmetzger/videostreaming-bufferemulation | ytdl.py | 1 | 15813 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
ytdl_refactored.py
Required python packages:
python-gdata
python-matplotlib
python-numpy
"""
import urllib2
import urllib
import os
import subprocess
import sys
import string
import re
import socket
import datetime
from datetime import datetime
import gdata.youtube
im... | unlicense | 7,069,916,604,199,555,000 | 34.450673 | 201 | 0.537411 | false | 3.954727 | false | false | false |
quisas/albus | cli_tools/openpyxl/reader/comments.py | 1 | 3069 | # Copyright (c) 2010-2014 openpyxl
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distr... | agpl-3.0 | 6,218,087,853,442,427,000 | 44.132353 | 88 | 0.69306 | false | 3.807692 | false | false | false |
wimglenn/argboss | test_override_kwargs.py | 1 | 1470 | from override_kwargs import override_kwargs
from other_module import delegating_function, function
from datetime import datetime
from unittest import TestCase
def function_in_this_module(x=123):
"""hello I'm a docstring"""
return x
def MyClass(object):
def method_in_this_module(x=123):
return x
w... | mit | 6,979,320,661,274,152,000 | 34.853659 | 84 | 0.662585 | false | 3.394919 | false | false | false |
Fluent-networks/floranet | floranet/models/application.py | 1 | 1851 | from twisted.internet.defer import inlineCallbacks, returnValue
from floranet.models.model import Model
from floranet.models.appinterface import AppInterface
class Application(Model):
"""LoRa application class
Model representing a LoRa application.
Attributes:
name (str): a user friendly... | mit | -2,307,838,893,648,743,000 | 35.313725 | 86 | 0.593193 | false | 4.674242 | false | false | false |
collective/collective.anonfeedback | src/collective/anonfeedback/tests/test_views.py | 1 | 2732 | import unittest2 as unittest
from plone.testing.z2 import Browser
from Products.CMFCore.utils import getToolByName
from plone.app.testing import SITE_OWNER_NAME
from plone.app.testing import SITE_OWNER_PASSWORD
from plone.app.testing import login
from collective.anonfeedback.testing import\
COLLECTIVE_ANONFEEDBAC... | mit | -8,225,146,587,051,691,000 | 36.438356 | 91 | 0.639092 | false | 4.302362 | true | false | false |
kylef/goji | goji/client.py | 1 | 7210 | import datetime
import mimetypes
import os
import pickle
from typing import Any, List, Optional
import click
import requests
from requests.auth import AuthBase, HTTPBasicAuth
from requests.compat import urljoin
from goji.models import Attachment, Comment, Issue, Sprint, Transition, User
class JIRAException(click.Cl... | bsd-2-clause | 8,375,053,474,429,902,000 | 33.663462 | 88 | 0.603745 | false | 3.882606 | false | false | false |
tomazc/orange-bio | orangecontrib/bio/widgets/OWGeneNetwork.py | 1 | 16713 | from collections import namedtuple
from PyQt4.QtCore import QTimer, QThread, pyqtSlot as Slot
import Orange.data
import Orange.feature
import Orange.network
from Orange.orng.orngDataCaching import data_hints
from Orange.OrangeWidgets import OWWidget
from Orange.OrangeWidgets import OWGUI
from Orange.OrangeWidgets im... | gpl-3.0 | 4,020,125,862,851,062,000 | 31.389535 | 90 | 0.579609 | false | 3.739763 | false | false | false |
SkyTruth/pelagos-data | setup.py | 1 | 2925 | #!/usr/bin/env python
# This document is part of FS_Nav
# https://github.com/geowurster/FS_Nav
# =================================================================================== #
#
# New BSD License
#
# Copyright (c) 2014, Kevin D. Wurster
# All rights reserved.
#
# Redistribution and use in source and binary f... | mit | -8,811,666,424,475,370,000 | 35.5625 | 87 | 0.674188 | false | 4.479326 | false | false | false |
KRHS-GameProgramming-2016/Memefinity | Wall.py | 1 | 1721 | import pygame, sys, math
class Wall(pygame.sprite.Sprite):
def __init__(self, pos=[0,0], size=None):
pygame.sprite.Sprite.__init__(self, self.containers)
self.image = pygame.image.load("rsc/wall/wall.png")
if size:
self.image = pygame.transform.scale(self.image, [size,size])
... | mit | 727,751,280,407,669,500 | 35.617021 | 76 | 0.595003 | false | 3.462777 | false | false | false |
project-generator/project_generator | project_generator/commands/build.py | 1 | 3506 | # Copyright 2015 0xc0170
#
# 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, soft... | apache-2.0 | -4,970,498,958,962,731,000 | 45.746667 | 142 | 0.653451 | false | 4.095794 | false | false | false |
kfarr2/django-local-settings | local_settings/__init__.py | 1 | 3356 | import json
import os
import sys
from .color_printer import ColorPrinter
from .checker import Checker
from .exc import LocalSettingsError, SettingsFileNotFoundError
from .loader import Loader
from .types import LocalSetting, SecretSetting
from .util import NO_DEFAULT, get_file_name
from .__main__ import make_local_set... | mit | -7,191,827,870,245,881,000 | 38.023256 | 89 | 0.666865 | false | 4.163772 | false | false | false |
line/line-bot-sdk-python | tests/models/test_base.py | 1 | 2959 | # -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,... | apache-2.0 | 4,919,719,617,394,605,000 | 33.406977 | 76 | 0.560324 | false | 3.639606 | true | false | false |
brianlions/python-nebula | nebula/log.py | 1 | 13537 | #!/usr/bin/env python3
#
# Copyright (c) 2012 Brian Yi ZHANG <brianlions at gmail dot com>
#
# This file is part of pynebula.
#
# pynebula 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 th... | gpl-3.0 | -4,693,924,603,498,929,000 | 35.292225 | 114 | 0.540149 | false | 4.093438 | false | false | false |
tommo/gii | lib/mock/asset/AnimatorAsset.py | 1 | 1686 | import os.path
import json
from gii.core import *
from gii.qt.dialogs import requestString, alertMessage
from mock import _MOCK
##----------------------------------------------------------------##
class AnimatorDataCreator(AssetCreator):
def getAssetType( self ):
return 'animator_data'
def getLabel( self ):
... | mit | -5,049,870,976,723,200,000 | 29.107143 | 83 | 0.641756 | false | 3.572034 | false | false | false |
levilucio/SyVOLT | UMLRT2Kiltera_MM/Properties/from_thesis/HMM8_then1_ConnectedLHS.py | 1 | 2650 | from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HMM8_then1_ConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HMM8_then1_ConnectedLHS.
"""
#... | mit | 4,038,207,856,086,871,600 | 42.442623 | 125 | 0.47434 | false | 5.206287 | false | false | false |
weka511/bioinformatics | phylogeny.py | 1 | 34566 | # Copyright (C) 2020-2021 Greenweaves Software Limited
# 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.
# Th... | gpl-3.0 | -8,262,652,753,592,696,000 | 35.424658 | 149 | 0.549615 | false | 3.889064 | false | false | false |
lebek/reversible-raytracer | util.py | 1 | 1864 | import numpy as np
import theano
import theano.tensor as T
import matplotlib
matplotlib.use('Agg')
from matplotlib import pyplot as plt
from scipy.misc import imsave
def initialize_weight(n_vis, n_hid, W_name, numpy_rng, rng_dist):
if 'uniform' in rng_dist:
W = numpy_rng.uniform(low=-np.sqrt(6. / (n_vis ... | mit | -7,149,291,079,279,311,000 | 32.285714 | 88 | 0.551502 | false | 2.977636 | false | false | false |
tensorflow/lucid | lucid/modelzoo/caffe_models/others.py | 1 | 5766 | # Copyright 2018 The Lucid 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 l... | apache-2.0 | 5,251,851,677,240,020,000 | 45.5 | 91 | 0.626084 | false | 2.760172 | false | false | false |
seoweon/narajangteo | narajangteo_crawling.py | 1 | 9596 |
# coding: utf-8
# # <center> 나라장터 입찰공고 크롤링 with Python3</center>
#
# 나라장터에 올라오는 입찰공고를 모니터링하기 위해 개발된 간단한 프로그램으로, 검색어 리스트를 설정하면 그에 따라 최근 7일간 공고된 입찰공고 리스트를 가져와 엑셀파일로 정리해줍니다. 크롤링 프로그램이지만, BeautifulSoup을 사용하지 않습니다.
# In[18]:
import pandas as pd
import numpy as np
import requests
import os
import datetime, time
import s... | mit | 7,930,596,444,500,421,000 | 32.516245 | 285 | 0.588216 | false | 3.084385 | false | false | false |
lahosken/pants | contrib/go/src/python/pants/contrib/go/tasks/go_checkstyle.py | 1 | 1900 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import sub... | apache-2.0 | 7,952,592,629,862,693,000 | 36.254902 | 98 | 0.678947 | false | 3.941909 | false | false | false |
lucidfrontier45/RethinkPool | tests/test_pool.py | 1 | 1063 | import rethinkdb as r
from future.moves.queue import Empty
from nose.tools import assert_raises
from rethinkpool import RethinkPool
def test_pool_create():
max_conns = 50
initial_conns = 10
rp = RethinkPool(max_conns=max_conns, initial_conns=initial_conns)
assert rp.current_conns == initial_conns
de... | apache-2.0 | 2,208,437,086,947,595,500 | 24.309524 | 79 | 0.672625 | false | 3.301242 | false | false | false |
dmanatunga/uAMP-sim | trace_reader.py | 1 | 4325 | import dateutil
import events
from sim_interface import TraceReader
import json
import pickle
import gzip
class JsonTraceReader(TraceReader):
def __init__(self, filename):
self.trace_filename = filename
self.trace_logs = None
self.trace_pos = 0
self.start_time = None
self.... | mit | -3,759,522,340,739,681,000 | 27.833333 | 81 | 0.578497 | false | 3.982505 | false | false | false |
bt3gl/Numerical-Methods-for-Physics | homework3_linear_algebra_FFT/condition_number/gaussElimination.py | 1 | 2113 | """
This module calculates a linear system by Gaussian elimination with pivoting.
Almost a copy of on Mike Zingale's code, spring 2013.
"""
import numpy as npy
def gaussElim(A, b):
""" perform gaussian elimination with pivoting, solving A x = b A
is an NxN matrix, x and b are an N-element vector... | apache-2.0 | -48,295,339,072,040,350 | 26.802632 | 81 | 0.550402 | false | 3.338073 | false | false | false |
seem-sky/newspaper | newspaper/nlp.py | 1 | 5105 | # -*- coding: utf-8 -*-
"""
Anything natural language related should be abstracted into this file.
"""
__title__ = 'newspaper'
__author__ = 'Lucas Ou-Yang'
__license__ = 'MIT'
__copyright__ = 'Copyright 2014, Lucas Ou-Yang'
import re
import math
import operator
from collections import Counter
from . import settings
... | mit | 8,296,216,312,425,050,000 | 26.446237 | 77 | 0.59667 | false | 3.677954 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Python/Core/Lib/idlelib/MultiCall.py | 1 | 14654 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: MultiCall.py
"""
MultiCall - a class which inherits its methods from a Tkinter widget (Text, for
example), but enables multiple calls of functions pe... | unlicense | 1,765,385,453,857,526,300 | 33.64539 | 152 | 0.556435 | false | 3.825111 | false | false | false |
ilveroluca/seal | seal/dist_bcl2qseq.py | 1 | 9909 | # Copyright (C) 2011-2012 CRS4.
#
# This file is part of Seal.
#
# Seal 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.
#
# Seal is dis... | gpl-3.0 | -2,729,236,264,081,831,000 | 43.635135 | 136 | 0.610455 | false | 3.933704 | false | false | false |
vessemer/concept-to-clinic | interface/config/settings/base.py | 1 | 3697 | """
Adapted from pydanny/django-cookiecutter
Generated by 'django-admin startproject' using Django 1.11.2.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
import... | mit | 3,250,317,145,646,073,000 | 25.219858 | 98 | 0.675412 | false | 3.585839 | false | false | false |
nicoboss/Floatmotion | OpenGLLibrary/glLibOBJLoad.py | 1 | 3861 | import pygame, os
from OpenGL.GL import *
def MTL(filename):
contents = {}
mtl = None
for line in open(filename, "r"):
if line.startswith('#'): continue
values = line.split()
if not values: continue
if values[0] == 'newmtl':
mtl = contents[values[1]] = {}
... | agpl-3.0 | -8,005,413,216,815,216,000 | 36.125 | 79 | 0.465682 | false | 3.726834 | false | false | false |
akshaybabloo/Python-QT-5-Tutorial | 2_QTDesigner/2_8_SimpleFormDesigner/SimpleFormDesigner.py | 1 | 1647 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'SimpleFormDesigner.ui'
#
# Created by: PyQt5 UI code generator 5.4.2
#
# WARNING! All changes made in this file will be lost!
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Dialog(object):
def setupUi(self, Dialog):
Dialog... | mit | -401,647,907,074,165,570 | 39.170732 | 76 | 0.695811 | false | 4.311518 | false | false | false |
michael-christen/repo-monitor | repo_monitor/python/parsers.py | 1 | 3438 | import argparse
from .deserializers import CoverageDeserializer
from .deserializers import NosetestDeserializer
from .deserializers import RadonDeserializer
class CoverageParser(object):
def __init__(self):
self.base_parser = argparse.ArgumentParser(
description='Get Python Coverage',
... | mit | 3,296,597,069,242,023,400 | 33.38 | 77 | 0.57039 | false | 3.906818 | true | false | false |
aleperno/labotpfinal | src/labo.py | 1 | 1051 | #!/usr/bin/python
import RPi.GPIO as GPIO
import time
import sys,os
import serial
import socket
dir = "./log.txt"
port = '/dev/ttyACM0'
ser = serial.Serial(port,9600)
def getTime():
return time.strftime("%Y;%m;%d;%H;%M;%S")
def is_valid_number(number):
"""In this case numbers higher than 100 will be considered
s... | gpl-2.0 | -4,666,988,098,183,961,000 | 17.12069 | 59 | 0.644148 | false | 2.640704 | false | false | false |
mnestis/advent2015 | 18/part1.py | 1 | 1208 | #!/usr/bin/python
import numpy as np
import re
import itertools
def animated_lights(input_string):
other_chars = re.compile("[^#\.]")
lights = []
for row in input_string.split("\n"):
if row == "":
continue
row = other_chars.sub("", row)
row = row.replace("#", "1")
... | mit | -8,158,571,688,017,475,000 | 22.230769 | 83 | 0.56043 | false | 3.081633 | false | false | false |
mozilla-metrics/socorro-toolbox | src/main/python/checkimprovedskiplist.py | 1 | 1764 | import sys, os
file, = sys.argv[1:]
oldsignaturemap = {}
newsignaturemap = {}
for line in open(file):
line = line.rstrip('\n')
try:
oldsignature, newsignature, count, example = line.split('\t')
except ValueError:
print >>sys.stderr, "Questionable line: %r" % (line,)
continue
c... | apache-2.0 | -5,036,359,242,503,436,000 | 29.947368 | 97 | 0.663265 | false | 3.675 | false | false | false |
arseneyr/essentia | src/examples/python/streaming_extractor/highlevel.py | 1 | 4041 | #!/usr/bin/env python
# Copyright (C) 2006-2016 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 ... | agpl-3.0 | -1,231,980,796,570,652,200 | 34.080357 | 103 | 0.690423 | false | 3.489637 | false | false | false |
sepol/bp-neural-net | python/runner.py | 1 | 1182 | import sys
import numpy as np
from neuralNet import neuralNet
with open('input.txt') as f:
inputs = []
for line in f:
line = line.split()
if line:
line = [float(i) for i in line]
inputs.append(line)
with open('output.txt') as f:
outputs = []
for line in f:
line = line.split()
if line:
line = [int... | mit | 2,482,796,611,280,662,500 | 21.301887 | 78 | 0.63198 | false | 2.531049 | false | false | false |
idlesign/django-sitemessage | sitemessage/tests/test_messengers.py | 1 | 12035 | import pytest
from sitemessage.messengers.base import MessengerBase
from sitemessage.models import Subscription, DispatchError
from sitemessage.toolbox import recipients, schedule_messages, send_scheduled_messages
from sitemessage.utils import get_registered_messenger_objects
from .testapp.sitemessages import (
WO... | bsd-3-clause | -6,108,604,954,456,369,000 | 32.901408 | 111 | 0.637059 | false | 3.577586 | true | false | false |
red-hood/calendarserver | contrib/performance/benchmarks/bounded_recurrence.py | 1 | 1816 | ##
# Copyright (c) 2011-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | 3,689,230,688,405,523,000 | 33.264151 | 84 | 0.720815 | false | 3.799163 | false | false | false |
vialectrum/vialectrum | electrum_ltc/gui/kivy/uix/dialogs/lightning_tx_dialog.py | 1 | 3445 | import copy
from datetime import datetime
from decimal import Decimal
from typing import NamedTuple, Callable, TYPE_CHECKING
from kivy.app import App
from kivy.factory import Factory
from kivy.properties import ObjectProperty
from kivy.lang import Builder
from kivy.clock import Clock
from kivy.uix.label import Label
f... | mit | 6,040,807,483,877,699,000 | 30.036036 | 88 | 0.520464 | false | 4.322459 | false | false | false |
kernevil/samba | python/samba/tests/blackbox/smbcontrol_process.py | 1 | 4652 | # Blackbox tests for the smbcontrol fault injection commands
#
# Copyright (C) Andrew Bartlett <abartlet@samba.org> 2018
#
# 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... | gpl-3.0 | 2,958,449,365,037,097,500 | 34.242424 | 79 | 0.595658 | false | 4.153571 | true | false | false |
zaironne/SnippetDetector | SD_AddSnippet.py | 1 | 4637 | """
SD_AddSnippet Add a snippet to local/global database. A new snippet is defined by:
- snippet name: directly taken from the name of the function
- snippet description: taken from the comment (if there's one) of the function
- syntactic and semantic by... | gpl-3.0 | 6,602,680,185,730,456,000 | 47.302083 | 138 | 0.614622 | false | 4.085463 | false | false | false |
johngrantuk/piupdue | piupdue/ArduinoFlashEefc.py | 1 | 7591 | """ Handles main processor operations.
WriteFileToFlash()
LoadBuffer()
WritePage()
EraseFlash()
SetBootFlash()
Reset()
Not sure what all are doing but tests have worked.
"""
import ArduinoFlashSerial, ArduinoFlashHardValues
import ctypes, time, os
def WriteFileToFlash(SerialPort, Log, File, IsNativePort):
... | mit | -2,672,416,731,614,591,000 | 37.538071 | 247 | 0.577658 | false | 3.522506 | false | false | false |
zenefits/sentry | src/sentry/web/frontend/debug/mail.py | 1 | 19243 | from __future__ import absolute_import, print_function
import itertools
import logging
import time
import traceback
import uuid
from datetime import datetime, timedelta
from random import Random
import six
from django.contrib.webdesign.lorem_ipsum import WORDS
from django.core.urlresolvers import reverse
from django.... | bsd-3-clause | -3,899,513,468,241,302,000 | 27.298529 | 115 | 0.543938 | false | 4.157053 | false | false | false |
sabajt/Dinos-In-Space | endMessage.py | 1 | 25058 | """
EndMessage.py
message / menu that appears upon completion or failure of puzzle
EndMessage.win is where puzzle profile data is modified after completion
"""
import pygame
import dinosInSpace
import static56
import infoGraphic56
import tween
import soundFx56
import dino56
import dataStorage56
import sna... | mit | -114,837,720,802,108,850 | 33.997207 | 143 | 0.559901 | false | 3.505106 | false | false | false |
DMSalesman/Nemris | nemris.py | 1 | 6514 | """Core of the Nemris tool, APK extractor."""
import argparse
import os
# Custom modules necessary for Nemris to work
from modules import apkutils
from modules import configutils
from modules import dirutils
from modules import pkgutils
from modules import utils
##########
# Path of the configuratipn file and defau... | unlicense | -1,698,508,673,163,878,700 | 30.317308 | 166 | 0.618514 | false | 3.335381 | true | false | false |
Chiheb-Nexus/Calculatrice-PyGtk | pango_fonts.py | 1 | 3186 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Calculatrice PyGtk
#
# Copyright 2014 Chiheb Nexus
#
# 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.
#... | gpl-3.0 | 2,591,903,167,614,648,300 | 35.895349 | 106 | 0.624645 | false | 3.490649 | false | false | false |
pavel-paulau/perfrunner | perfrunner/tests/dcp.py | 1 | 1670 | from perfrunner.helpers import local
from perfrunner.helpers.cbmonitor import timeit, with_stats
from perfrunner.tests import PerfTest
class DCPThroughputTest(PerfTest):
def _report_kpi(self, time_elapsed: float):
self.reporter.post(
*self.metrics.dcp_throughput(time_elapsed)
)
@... | apache-2.0 | -4,941,375,111,631,714,000 | 28.298246 | 78 | 0.610778 | false | 3.830275 | true | false | false |
ToonTownInfiniteRepo/ToontownInfinite | toontown/suit/DistributedSuitBaseAI.py | 1 | 4836 | from otp.ai.AIBaseGlobal import *
from otp.avatar import DistributedAvatarAI
import SuitPlannerBase
import SuitBase
import SuitDNA
from direct.directnotify import DirectNotifyGlobal
from toontown.battle import SuitBattleGlobals
class DistributedSuitBaseAI(DistributedAvatarAI.DistributedAvatarAI, SuitBase.SuitBase):
... | mit | -5,873,388,987,407,674,000 | 25.431694 | 88 | 0.605873 | false | 3.519651 | false | false | false |
JMoravec/unkRadnet | fitToCurve/pyeq2/Models_3D/Trigonometric.py | 1 | 38712 | # pyeq2 is a collection of equations expressed as Python classes
#
# Copyright (C) 2012 James R. Phillips
# 2548 Vera Cruz Drive
# Birmingham, AL 35235 USA
#
# email: zunzun@zunzun.com
# web: http://zunzun.com
#
# License: BSD-style (see LICENSE.txt in main source directory)
# Version info: $Id:... | bsd-3-clause | -6,684,742,983,431,546,000 | 35.624409 | 184 | 0.692524 | false | 3.622684 | false | false | false |
lukaszb/django-guardian | example_project/articles/models.py | 2 | 1851 | from django.db import models
from django.urls import reverse
from guardian.models import GroupObjectPermissionBase, UserObjectPermissionBase
class Article(models.Model):
title = models.CharField('title', max_length=64)
slug = models.SlugField(max_length=64)
content = models.TextField('content')
crea... | bsd-2-clause | -4,053,829,553,794,031,000 | 32.053571 | 87 | 0.705024 | false | 4.226027 | false | false | false |
nitely/Spirit | spirit/category/migrations/0001_initial.py | 1 | 1333 | # -*- coding: utf-8 -*-
from django.db import models, migrations
import spirit.core.utils.models
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Category',
fields=[
('id', models.AutoField(primary_key=... | mit | -5,217,428,606,251,673,000 | 43.433333 | 158 | 0.582146 | false | 4.34202 | false | false | false |
ganeti-github-testing/ganeti-test-1 | lib/rpc_defs.py | 1 | 31147 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2014 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:
#
# 1. Redistributions of source code must retain the above copyri... | bsd-2-clause | -4,034,353,141,925,082,600 | 43.180142 | 80 | 0.654477 | false | 3.428398 | false | false | false |
iproduct/course-social-robotics | 11-dnn-keras/venv/Lib/site-packages/pandas/core/dtypes/base.py | 1 | 13190 | """
Extend pandas with custom array types.
"""
from typing import TYPE_CHECKING, Any, List, Optional, Tuple, Type, Union
import numpy as np
from pandas._typing import DtypeObj
from pandas.errors import AbstractMethodError
from pandas.core.dtypes.generic import ABCDataFrame, ABCIndexClass, ABCSeries
if TYPE_CHECKIN... | gpl-2.0 | -4,566,161,597,726,716,000 | 28.909297 | 86 | 0.59022 | false | 4.677305 | false | false | false |
miguelinux/vbox | src/VBox/Devices/EFI/Firmware/BaseTools/Source/Python/UPT/Object/Parser/InfLibraryClassesObject.py | 1 | 10522 | ## @file
# This file is used to define class objects of INF file [LibraryClasses] section.
# It will consumed by InfParser.
#
# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.<BR>
#
# This program and the accompanying materials are licensed and made available
# under the terms and conditions of the B... | gpl-2.0 | -620,824,427,983,713,900 | 40.588933 | 114 | 0.519958 | false | 4.763241 | false | false | false |
atztogo/phonopy | example/Si-gruneisen/Si-gruneisen.py | 1 | 2004 | import numpy as np
from phonopy import Phonopy, PhonopyGruneisen
from phonopy.interface.vasp import read_vasp
from phonopy.file_IO import parse_FORCE_SETS
def append_band(bands, q_start, q_end):
band = []
for i in range(51):
band.append(np.array(q_start) +
(np.array(q_end) - np.arra... | bsd-3-clause | -4,193,420,619,038,875,000 | 39.08 | 76 | 0.505988 | false | 2.726531 | false | false | false |
danpozmanter/monitor_requests | monitor_requests/__init__.py | 1 | 4730 | """Monitor Requests."""
import datetime
import re
import sys
import traceback
import mock
from requests.utils import urlparse
from .data import DataHandler
from .output import OutputHandler
__version__ = '2.1.1'
class Monitor(object):
"""Monitor class to handle patching."""
# Libraries which mock requests b... | bsd-3-clause | 4,755,888,305,894,752,000 | 34.56391 | 86 | 0.611628 | false | 4.408201 | false | false | false |
gameduell/pysupplies | tests/test_descr.py | 1 | 1053 | from supplies.annotate import attr, delay, refer
__author__ = 'dwae'
class Test:
def __init__(self, cnt=0):
self.cnt = cnt
@attr
def foo(self):
cnt = self.cnt
self.cnt += 1
return cnt
@delay
def bar(self):
cnt = self.cnt
self.cnt += 1
retu... | mit | -216,468,087,574,851,420 | 14.042857 | 48 | 0.503324 | false | 3.375 | false | false | false |
spcui/virt-test | virttest/libvirt_xml/nodedev_xml.py | 1 | 10435 | """
Module simplifying manipulation of XML described at
http://libvirt.org/formatnode.html
"""
import os
from virttest.libvirt_xml import base, xcepts, accessors
class CAPXML(base.LibvirtXMLBase):
"""
The base class for capability.
"""
def get_sysfs_sub_path(self):
"""
return the su... | gpl-2.0 | -8,236,994,242,723,432,000 | 30.717325 | 79 | 0.530331 | false | 4.060311 | false | false | false |
galactose/wviews | program/program.py | 1 | 13353 | """
program.py: Program structures for worldview solving
Copyright (C) 2014 Michael Kelly
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
... | gpl-3.0 | -5,458,440,010,236,815,000 | 42.353896 | 95 | 0.609002 | false | 3.873803 | false | false | false |
reubano/hdxscraper-undp-climate | config.py | 1 | 2244 | # -*- coding: utf-8 -*-
# vim: sw=4:ts=4:expandtab
"""
config
~~~~~~
Provides app configuration settings
"""
from __future__ import (
absolute_import, division, print_function, with_statement,
unicode_literals)
from os import path as p
BASEDIR = p.dirname(__file__)
PARENTDIR = p.dirname(BASEDIR)
DB_NAME = ... | mit | -7,815,678,056,294,117,000 | 28.92 | 79 | 0.610517 | false | 2.710145 | true | false | false |
wtpayne/hiai | a3_src/h70_internal/da/lwc/discover.py | 1 | 8741 | # -*- coding: utf-8 -*-
"""
Local working copy path aliasing.
---
type:
python_module
validation_level:
v00_minimum
protection:
k00_public
copyright:
"Copyright 2016 High Integrity Artificial Intelligence Systems"
license:
"Licensed under the Apache License, Version 2.0 (the License);
you m... | apache-2.0 | -1,385,293,988,689,755,400 | 37.170306 | 79 | 0.467795 | false | 3.909213 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.