repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hohehohe2/hohe2PyUtils | hohehohe2/utils/propertyHolder.py | 1 | 13916 | # -*- coding: utf-8 -*-
"""
propertyモジュール。
propertyは各種オブジェクトに付属するkey-valueペアで、keyはASCII文字列。
オブジェクトはparentを持ち継承をサポートする。
"""
import os, logging, time, datetime, json
from hohehohe2.utils.fileLock import FileLock
from hohehohe2.utils.myException import MyException
#=====================================================... | mit | -6,909,172,965,416,801,000 | 24.801567 | 113 | 0.708257 | false | 1.793141 | false | false | false |
Mezgrman/TweetPony | tweetpony/api.py | 2 | 17497 | # Copyright 2013-2015 Julian Metzler
"""
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 version 3 of the License, or
(at your option) any later version.
This program is distributed in... | agpl-3.0 | -1,040,592,635,794,343,600 | 32.519157 | 271 | 0.674516 | false | 3.184747 | false | false | false |
grow/pygrow | grow/performance/profile_test.py | 2 | 1623 | """Test the profiling timer"""
import unittest
import mock
from . import profile
class TimerTestCase(unittest.TestCase):
"""Tests for the Timer"""
def setUp(self):
self.mock_time = mock.Mock()
self.mock_time.time.side_effect = [0, 10]
self.profile = profile.Profile()
def test_add... | mit | 7,160,889,957,525,398,000 | 22.521739 | 65 | 0.548367 | false | 4.027295 | true | false | false |
AutorestCI/azure-sdk-for-python | azure-cognitiveservices-vision-computervision/azure/cognitiveservices/vision/computervision/models/computer_vision_api_enums.py | 2 | 2509 | # 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 | -7,020,285,954,869,814,000 | 21.20354 | 76 | 0.594659 | false | 3.3498 | false | false | false |
Cisco-Talos/pyrebox | volatility/volatility/plugins/linux/bash_hash.py | 4 | 6322 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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. You may not use, modify or
# distribu... | gpl-2.0 | 3,124,635,684,615,092,000 | 33.546448 | 163 | 0.534166 | false | 3.785629 | false | false | false |
conorpp/napkis | napkis/settings.py | 1 | 2450 | """
Django settings for napkis 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, ...)
imp... | mit | -8,054,264,290,517,960,000 | 23.747475 | 134 | 0.693878 | false | 3.194263 | false | false | false |
FrodeSolheim/fs-uae-launcher | fsgamesys/input2/inputservice.py | 1 | 3247 | from typing import List, Optional
from fscore.types import SimpleCallable
from fsgamesys.input2.dataclasses import InputDevice
from fsgamesys.input.device import Device
from fsgamesys.input.devicemanager import DeviceManager
# FIXME: Suspend InputService polling/waiting on device updates while
# emulation is running
... | gpl-2.0 | 8,594,878,489,659,868,000 | 33.542553 | 77 | 0.639667 | false | 4.216883 | false | false | false |
davinwang/caffe2 | caffe2/python/context.py | 4 | 4040 | # Copyright (c) 2016-present, Facebook, 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 agreed... | apache-2.0 | 2,273,660,529,448,661,500 | 29.37594 | 78 | 0.606188 | false | 3.829384 | false | false | false |
mcgonagle/ansible_f5 | library/iworkflow_license_pool_member.py | 1 | 11592 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2017 F5 Networks Inc.
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {
'status': ['preview'],
'supp... | apache-2.0 | 4,382,128,059,484,962,300 | 30.672131 | 99 | 0.561939 | false | 4.354621 | false | false | false |
xxxIsaacPeralxxx/anim-studio-tools | grind/python/util/glWidget.py | 5 | 11356 |
import sys
import math
from pimath import *
from PyQt4 import QtCore, QtGui, QtOpenGL
from camera import Camera
import grind
#-----------------------------------------------------------------------------
from rodin import logging
log = logging.get_logger('grind.mangle.gl_widget')
try:
from OpenGL.GL import *
... | gpl-3.0 | 294,229,719,129,183,600 | 30.72067 | 153 | 0.552659 | false | 3.413285 | false | false | false |
NachE/pytweena | pytweena/easy.py | 1 | 1514 | # Pytweena
# Copyright 2013 J.A. Nache
# See LICENSE for details.
import json
from pytweena.api import PytweenaAPI
from pytweena.objects import *
class PytweenaEasy(PytweenaAPI):
# json.contributors = Tweet
# json[0].contributors = Tweet (json list of tweets)
# contributors_enabled = Users
# hashtags = Entities
# at... | gpl-3.0 | 9,079,060,086,272,824,000 | 19.739726 | 68 | 0.704756 | false | 3.089796 | false | false | false |
pyfa-org/eos | tests/mod_builder/testcase.py | 1 | 1802 | # ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... | lgpl-3.0 | 6,311,967,209,856,474,000 | 36.541667 | 80 | 0.653163 | false | 4.25 | true | false | false |
sbobovyc/LabNotes | SolarViz/display_frame.py | 1 | 5920 | """
Created on September 12, 2011
@author: sbobovyc
"""
"""
Copyright (C) 2011 Stanislav Bobovych
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 | 6,817,503,934,374,005,000 | 37.947368 | 184 | 0.581419 | false | 3.718593 | false | false | false |
zesoup/gts2 | libs/renderer.py | 1 | 25559 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pygame
import db
import json
from random import random
import sys
import threading
import multiprocessing
#import cairo
import rastermap
import time
#import datetime
#import cP... | mit | -4,776,384,879,009,633,000 | 35.617479 | 295 | 0.62166 | false | 3.008003 | false | false | false |
jwvhewitt/dmeternal | pbge/randmaps/terrset.py | 1 | 11948 | from .rooms import Room
from .. import container,scenes
import inspect
import random
import itertools
class TerrSet( Room ):
# A Terrainset is a handler for TerrSetTerrain terrain.
# Terrain Type is the TerrSetTerrain to be used.
# TerrainMap is a tuple of tuples giving frame numbers for
# the tiles. I... | gpl-2.0 | -1,113,671,197,504,768,500 | 39.917808 | 144 | 0.548627 | false | 3.17766 | false | false | false |
ChrisLeeGit/colored | src/colored.py | 1 | 4266 | #!/usr/bin/env python3
# -*-coding: utf-8-*-
# Author : Christopher L
# License: MIT license
# Blog : http://blog.chriscabin.com
# GitHub : https://www.github.com/chrisleegit
# File : colored.py
# Date : 2016/12/02 22:31
# Version: 0.1
# Description: some descriptions of this file.
__version__ = '0.1'
# Some c... | mit | 4,334,791,512,410,139,000 | 17.153191 | 97 | 0.612752 | false | 2.537775 | false | false | false |
jappa/VizStack | python/slurmlauncher.py | 1 | 4799 | # VizStack - A Framework to manage visualization resources
# Copyright (C) 2009-2010 Hewlett-Packard
#
# 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... | gpl-2.0 | 7,023,430,132,787,161,000 | 34.029197 | 128 | 0.656387 | false | 3.972682 | false | false | false |
Heteroskedastic/chills-pos | chills_pos/pos/views.py | 1 | 1514 | from django.conf import settings
from django.contrib.staticfiles.views import serve
from django.shortcuts import render, redirect
from django.utils.decorators import method_decorator
from django.views.decorators.csrf import csrf_exempt
from django.views.generic import View
from chills_pos.helpers.utils import Permissi... | mit | 4,051,998,776,018,459,600 | 33.409091 | 96 | 0.701453 | false | 4.026596 | false | false | false |
Backfeed/BF-API-Server | tester/value_distributer.py | 2 | 6665 | from protocol_function import BidInfo,FIn,ProtocolFunctionV1
import classes as cls
from operator import attrgetter
class ValueDistributerBase(object):
def process_bid(self,current_bid,session,logger = None):
pass
class ValueDistributer(ValueDistributerBase):
def __init__(self,logger = None):
self.logger = ... | mit | 1,055,446,628,276,237,400 | 33.179487 | 177 | 0.724081 | false | 2.979437 | false | false | false |
dschien/energy-aggregator | ep_rayleigh_importer/tests.py | 1 | 3808 | import logging
from unittest.mock import patch
from django.test import TestCase
from ep.models import Node, Device, DeviceParameter
import json
from .controllers.rayleigh_client import default_rayleigh_api_host, RayleighClient
from .data_tests import devices_data_resp, device_id, sensor_data_resp
__author__ = 'mitch... | mit | 1,153,865,283,815,063,800 | 36.70297 | 119 | 0.663078 | false | 3.834844 | true | false | false |
guglielmino/pushetta-api-django | pushetta/api/messages_sl.py | 1 | 2011 | # coding=utf-8
# Progetto: Pushetta API
# Service layer con le funzionalità dei messaggi storati
from datetime import datetime
from rest_framework import generics
from rest_framework.response import Response
from rest_framework import status
from django.shortcuts import get_object_or_404
from django.db.models impo... | gpl-3.0 | 2,647,349,314,029,950,000 | 36.222222 | 126 | 0.7199 | false | 3.792453 | false | false | false |
yezune/kicomav | Engine/plugins/egg.py | 1 | 18594 | # -*- coding:utf-8 -*-
"""
Copyright (C) 2013 Nurilab.
Author: Kei Choi(hanul93@gmail.com)
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... | gpl-2.0 | 4,065,015,436,233,875,500 | 35.747036 | 93 | 0.398301 | false | 3.02686 | false | false | false |
sujoykroy/motion-picture | editor/MotionPicture/shape_creators/curve_shape_creator.py | 1 | 5244 | from ..commons import *
from ..shapes import CurveShape, OvalEditBox, EditLine
from ..settings import config
class CurveShapeCreator(object):
@classmethod
def create_blank(cls, point):
shape = CurveShape(Point(0, 0), Color(0,0,0,1),
config.DEFAULT_BORDER_WIDTH, Color(1,1,1,0), 1... | gpl-3.0 | 2,971,105,244,713,003,500 | 38.134328 | 101 | 0.604882 | false | 3.225092 | false | false | false |
rickyschools/JARVIS | gideon.py | 1 | 2731 | from GIDEON.core import *
from GIDEON.core.events import Brain
from GIDEON.ml import ActionModeler
tests = ['Gideon who is Barry Allen?', 'Gideon where is New York?',
'Gideon what time is it?',
'Gideon what is the distance between Philadelphia and New York?',
'Gideon who is Wally West?', 'Gi... | mit | 2,448,927,178,386,235,400 | 32.716049 | 89 | 0.552911 | false | 3.841069 | false | false | false |
aaronkvanmeerten/jibri | jibri-xmpp-client/jibriselenium.py | 1 | 12354 | #!/usr/bin/env python3
import sys, getopt, os
import signal
import time
import pprint
import logging
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options
from seleni... | apache-2.0 | -6,212,361,379,676,638,000 | 35.550296 | 171 | 0.640602 | false | 3.962155 | false | false | false |
Fenugreek/comprehend | features.py | 1 | 4082 | """
Some utilities for manipulating feature arrays trained from datasets.
Copyright 2016 Deepak Subburam
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 ... | gpl-3.0 | 2,181,169,908,476,992,800 | 32.735537 | 79 | 0.644047 | false | 3.558849 | false | false | false |
morishin/alfred-xcfind-workflow | xcfind.py | 1 | 1495 | import os
import subprocess
import sys
sys.path.append(os.path.dirname(os.path.abspath(__file__))+ '/enum')
sys.path.append(os.path.dirname(os.path.abspath(__file__))+ '/workflow')
from enum import Enum
from workflow import Workflow
class FileType(Enum):
xcodeproj = 'xcode-project_Icon.icns'
xcworkspace = '... | mit | 8,208,482,562,429,563,000 | 28.9 | 105 | 0.644147 | false | 3.322222 | false | false | false |
ZHAW-INES/rioxo-uClinux-dist | user/python/python-2.4.4/Lib/smtplib.py | 5 | 26774 | #! /usr/bin/env python
'''SMTP/ESMTP client class.
This should follow RFC 821 (SMTP), RFC 1869 (ESMTP), RFC 2554 (SMTP
Authentication) and RFC 2487 (Secure SMTP over TLS).
Notes:
Please remember, when doing ESMTP, that the names of the SMTP service
extensions are NOT the same thing as the option keywords for the RC... | gpl-2.0 | 822,359,389,768,418,800 | 35.034993 | 89 | 0.577463 | false | 4.154228 | false | false | false |
hooram/ownphotos-backend | ownphotos/settings.py | 1 | 6635 | """
Django settings for ownphotos project.
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 | -7,379,247,198,946,081,000 | 25.54 | 91 | 0.638433 | false | 3.322484 | false | false | false |
saezlab/kinact | kinact/networkin.py | 1 | 9479 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
#
# ######################################################################################################################
#
# File author(s): Jakob Wirbel (jakob.wirbel@gmail.com)
#
#
# Distributed under the GNU GPLv3 License.
# See accompanying file LICENSE.txt or cop... | gpl-3.0 | -6,887,009,983,899,363,000 | 48.369792 | 121 | 0.615888 | false | 3.705629 | false | false | false |
emonty/pyos | samples/cloud_blockstorage/delete_volume.py | 1 | 1371 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c)2012 Rackspace US, 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.ap... | apache-2.0 | 4,018,381,447,292,380,000 | 31.642857 | 78 | 0.691466 | false | 3.598425 | false | false | false |
leandroreox/gnocchi | gnocchi/indexer/alembic/versions/0718ed97e5b3_add_tablename_to_resource_type.py | 3 | 1847 | # Copyright 2016 OpenStack Foundation
#
# 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 ... | apache-2.0 | -920,018,202,894,029,700 | 33.203704 | 78 | 0.666486 | false | 3.716298 | false | false | false |
charlesthomas/moth | examples/mail_moth.py | 1 | 1555 | #!/usr/bin/env python
# THIS CODE HAS NOT BEEN TESTED AND MAY NOT WORK.
# EVEN IF IT DOES, YOU SHOULDN'T RUN IT.
# IT IS INTENDED TO BE A GUIDE, NOT AN IMPLEMENTATION.
from base64 import b64decode, b64encode
from smtplib import SMTP
from tornado.web import RequestHandler
from moth import Moth
class LoginHandler(Re... | mit | 406,839,398,430,585,150 | 31.395833 | 80 | 0.58135 | false | 3.455556 | false | false | false |
ssamot/distnet | neuralnetworks.py | 1 | 7155 | s__author__ = 'ssamot'
from keras.layers.embeddings import Embedding
from keras.layers.core import Activation, Dropout, TimeDistributedDense, Dense, Merge
from keras.models import Sequential
from layers import InputDropout, AttentionMerge, AttentionRecurrent, DownSample1D
from keras.layers.normalization import Batch... | gpl-2.0 | -5,954,656,173,299,928,000 | 30.659292 | 137 | 0.609504 | false | 3.538576 | false | false | false |
jgsogo/lingwars-games | games/word2def/views.py | 3 | 6030 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from django.conf import settings
from django.core.urlresolvers import reverse
from django.views.generic import FormView, ListView
from django.core.urlresolvers import reverse_lazy
from django.contrib import messages
from django.utils.safestring import mark_safe
from django... | gpl-2.0 | -7,798,022,337,443,587,000 | 39.716216 | 159 | 0.639562 | false | 3.801893 | false | false | false |
GenericMappingTools/gmt-python | pygmt/tests/test_sphinx_gallery.py | 1 | 1294 | """
Test the sphinx-gallery scraper and code required to make it work.
"""
import os
from tempfile import TemporaryDirectory
import pytest
try:
import sphinx_gallery
except ImportError:
sphinx_gallery = None
from pygmt.figure import SHOWED_FIGURES, Figure
from pygmt.sphinx_gallery import PyGMTScraper
@pyte... | bsd-3-clause | -1,121,685,870,779,716,100 | 29.093023 | 77 | 0.639876 | false | 3.506775 | false | false | false |
ivanamihalek/tcga | icgc/60_nextgen_production/45_stats_table.py | 1 | 2103 | #! /usr/bin/python3
#
# This source code is part of icgc, an ICGC processing pipeline.
#
# Icgc 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 ... | gpl-3.0 | -3,788,316,020,517,693,400 | 29.042857 | 70 | 0.630528 | false | 3.181543 | false | false | false |
anu7495/airmozilla | airmozilla/main/utils.py | 13 | 1236 | from collections import defaultdict
from airmozilla.main.models import Event, Channel
def get_event_channels(events):
"""
Given an iterable of events (e.g. queryset), return a dict (based on
collections.defaultdict) that maps event *objects* to *lists* of
channel *objects*.
"""
channels = def... | bsd-3-clause | 5,698,172,335,605,153,000 | 32.405405 | 75 | 0.661812 | false | 3.779817 | false | false | false |
reillychase/python-hangman | main.py | 1 | 5177 | import random
word_list = '''
put
your
hangman
words
here
one
per
line
'''
class game:
words = []
for line in word_list.split():
words.append(line)
chosen_word = (random.choice(words))
chosen_word_letters = list(chosen_word)
chosen_word_num_letters = []
for letter in chosen_word_letters... | gpl-3.0 | 2,717,271,408,748,539,400 | 24.628713 | 120 | 0.428047 | false | 3.590153 | false | false | false |
juergenhamel/cuon | cuon_client/setup.py | 2 | 40348 | #!/usr/bin/python
import os, sys
import pygtk
import gtk
import gtk.glade
import gobject
import ConfigParser
import commands
class setup:
def __init__(self):
self.IP = None
self.sPrefix = None
self.sshPort = None
self.XmlrpcPort = None
self.Locale = None
self.Proto... | gpl-3.0 | 7,346,171,371,419,101,000 | 42.904244 | 569 | 0.555294 | false | 3.227324 | true | false | false |
hansenhahn/playton-2 | Programas/tl_dumper.py | 1 | 22219 | #!/usr/bin/env python
# -*- coding: windows-1252 -*-
'''
Created on 01/08/2013
@author: Hansen
'''
import time
import re
import glob
import os.path
import struct
import array
import sys
import mmap
from rhCompression import lzss
from pytable import normal_table
DEBUG = 0
FULL_PATH = '../ROM Original/Splitted/LAYTON... | cc0-1.0 | 493,017,280,298,212,540 | 42.99802 | 132 | 0.328458 | false | 4.81139 | false | false | false |
joealcorn/lab_assistant | lab_assistant/tests/test_storage.py | 1 | 2837 | from lab_assistant.storage.backends.base import StorageBackend
from lab_assistant.storage.backends.null import NullBackend
from lab_assistant.storage.backends.redis import RedisBackend
from lab_assistant.tests import cases
import lab_assistant
class FakeStorage(StorageBackend):
pass
class TestGetStorage(cases.T... | mit | -2,973,466,531,176,898,600 | 35.371795 | 74 | 0.670427 | false | 3.934813 | true | false | false |
MajidLashgarian/HackerRank | Superman.py | 1 | 2131 | class Building:
jumpPower = 0
rescues = []
numOfResc = 0
currentHeight = 0
rescued = 0
def __init__(self):
inputs = map(int , raw_input().strip().split(" "))
self.numOfResc = inputs[0]
if(self.numOfResc):
self.rescues = inputs[1:];
def clear(self):
self.rescued = 0
def setHeight(self , h):... | mit | -2,202,228,286,491,416,600 | 20.744898 | 67 | 0.61755 | false | 2.605134 | false | false | false |
ravrahn/HangoutsBot | hangupsbot/plugins/forwarding.py | 1 | 1797 | import os, io
import aiohttp
import asyncio
import hangups
def _initialise(Handlers, bot=None):
Handlers.register_handler(_handle_forwarding, type="message")
return []
@asyncio.coroutine
def _handle_forwarding(bot, event, command):
"""Handle message forwarding"""
# Test if message forwarding is enabl... | gpl-3.0 | -7,287,355,948,662,000,000 | 38.065217 | 135 | 0.574847 | false | 3.95815 | false | false | false |
capdevc/reverse-indexer | threshold.py | 1 | 1304 | #!/usr/bin/env python
import argparse
import operator
# build a list of word counts, then sort it
def build_counts(wcfile):
counts = []
wcfile.seek(0)
for line in wcfile:
tokens = line.split('\t')
counts.append(int(tokens[1]))
counts.sort(reverse=True)
return counts
# calculate a... | mit | 287,490,120,197,572,860 | 30.047619 | 79 | 0.615798 | false | 3.904192 | false | false | false |
GiulioRossetti/dynetx | dynetx/utils/misc.py | 1 | 1465 | """
Miscellaneous Helpers for DyNetx.
"""
# Copyright (C) 2004-2015 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
import sys
# itertools.accumulate is only available on Python 3.2 or later.
#
# Once support... | bsd-2-clause | -298,932,470,058,747,200 | 28.3 | 79 | 0.608874 | false | 3.635236 | false | false | false |
fle/django-multi-email-field | multi_email_field/fields.py | 1 | 1388 | from django.db import models
from multi_email_field.forms import MultiEmailField as MultiEmailFormField
try:
from django.utils import six
string_types = six.string_types
except ImportError:
string_types = str
class MultiEmailField(models.Field):
description = "A multi e-mail field stored as a multi... | lgpl-3.0 | -1,376,270,000,716,743,700 | 29.173913 | 74 | 0.636888 | false | 4.323988 | false | false | false |
rralcala/random-scripts | py/stream-calc.py | 1 | 1500 | import heapq
from typing import List
import unittest
"""
highest non zero count that has a number = or > to the lenght of the stream
"""
class Calculator:
def __init__(self, channel: List):
self.channel = [-x for x in channel if x > 0]
heapq.heapify(self.channel)
self.stack = []
def ... | gpl-2.0 | 121,684,675,346,192,320 | 25.315789 | 75 | 0.564 | false | 3.26087 | true | false | false |
shenfei/oj_codes | leetcode/python/n307_Range_Sum_Query_Mutable.py | 1 | 2517 | from typing import List
class SegmentTree:
def __init__(self, begin: int, end: int, value: int):
self.begin = begin
self.end = end
self.value = value
self.left = None
self.right = None
self.parent = None
class NumArray:
def __init__(self, nums: List[int]):
... | mit | -2,924,580,012,039,016,400 | 24.17 | 73 | 0.508542 | false | 3.247742 | false | false | false |
ingadhoc/openerp-travel | travel_journey_plane/__openerp__.py | 2 | 1878 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# This module copyright (C) 2013 Savoir-faire Linux
# (<http://www.savoirfairelinux.com>).
#
# This program is free software: you can redistribute it and/or m... | agpl-3.0 | 1,839,804,705,122,040,800 | 34.433962 | 78 | 0.605431 | false | 3.704142 | false | false | false |
Fedik/gramps | gramps/gui/widgets/reorderfam.py | 4 | 8095 | # Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham
# Copyright (C) 2009-2010 Gary Burton
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either v... | gpl-2.0 | -8,444,032,522,934,620,000 | 34.04329 | 79 | 0.531563 | false | 3.916304 | false | false | false |
pombredanne/toolz | toolz/functoolz.py | 1 | 25136 | from functools import reduce, partial, wraps
import inspect
import operator
from operator import attrgetter
from textwrap import dedent
import sys
from .compatibility import PY3, PY34, PYPY
__all__ = ('identity', 'thread_first', 'thread_last', 'memoize', 'compose',
'pipe', 'complement', 'juxt', 'do', 'curr... | bsd-3-clause | 4,965,721,593,215,442,000 | 27.563636 | 79 | 0.552634 | false | 3.89645 | false | false | false |
reviewboard/ReviewBot | bot/reviewbot/tools/pyflakes.py | 1 | 4277 | """Review Bot tool to run pyflakes."""
from __future__ import unicode_literals
import re
from reviewbot.config import config
from reviewbot.tools.base import BaseTool
from reviewbot.utils.process import execute
class PyflakesTool(BaseTool):
"""Review Bot tool to run pyflakes."""
name = 'Pyflakes'
vers... | mit | -6,853,659,067,471,577,000 | 29.769784 | 77 | 0.462708 | false | 4.752222 | false | false | false |
johnnygreco/hugs | scripts/pipe-development.py | 1 | 5364 | import os
import numpy as np
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.pyplot as plt
plt.style.use('../notebooks/jpg.mplstyle')
import warnings
warnings.filterwarnings(action='ignore', category=UserWarning)
import hugs
from hugs.synths.catalog import GlobalSynthCat as SynthCat
from hugs.utils import ... | mit | -5,856,038,435,581,946,000 | 35.489796 | 79 | 0.525354 | false | 3.496741 | true | false | false |
Udzu/pudzu | dataviz/eureddit.py | 1 | 3027 | from pudzu.charts import *
from pudzu.sandbox.bamboo import *
FONT = verdana
flags = pd.read_csv("datasets/countries.csv").split_columns('country', "|").explode('country').set_index('country').flag
flags["Sealand (current post)"] = "https://upload.wikimedia.org/wikipedia/commons/thumb/e/e5/Flag_of_Sealand.svg/1... | mit | -4,898,705,596,233,553,000 | 77.710526 | 327 | 0.677899 | false | 2.802778 | false | false | false |
muhammadfredo/FrMaya | FrMaya/core/rig.py | 1 | 20601 | """
## SCRIPT HEADER ##
Created By : Muhammad Fredo
Email : muhammadfredo@gmail.com
Start Date : 13 Sep 2020
Info :
"""
import collections
import pymel.core as pm
from FrMaya.vendor import path
from FrMaya import utility as util
from . import system, general, transformation
def get_skincluster_... | mit | -4,077,221,583,621,608,400 | 35.461947 | 109 | 0.625018 | false | 3.655252 | false | false | false |
mic4ael/indico | indico/modules/rb/controllers/backend/common.py | 1 | 1200 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from marshmallow_enum import EnumField
from webargs import fields... | mit | 4,827,361,764,343,071,000 | 31.432432 | 65 | 0.671667 | false | 3.399433 | false | false | false |
steinnymir/RegAscope2017 | test_scripts/GUI_test/PyQt5 Examples/dragAndDrop.py | 1 | 1373 | import sys
from PyQt5.QtWidgets import QApplication, QWidget, QPushButton, QLineEdit, QLabel
from PyQt5.QtGui import QIcon
from PyQt5.QtCore import pyqtSlot
class App(QWidget):
def __init__(self):
super().__init__()
self.title = 'PyQt5 drag and drop - pythonspot.com'
self.left = ... | mit | 6,632,195,963,014,916,000 | 23.90566 | 81 | 0.564457 | false | 3.761644 | false | false | false |
praneetb/contrail-neutron-plugin | neutron/extensions/policy.py | 9 | 3020 | from abc import abstractmethod
from neutron.api.v2 import attributes as attr
from neutron.api.v2 import base
from neutron.common import exceptions as qexception
from neutron.api import extensions
from neutron import manager
from oslo.config import cfg
# Policy Exceptions
class PolicyNotFound(qexception.NotFound):
... | apache-2.0 | 9,188,009,748,910,904,000 | 27.761905 | 76 | 0.557285 | false | 4.383164 | false | false | false |
chriskiehl/python-stix | stix/campaign/__init__.py | 1 | 10491 | # Copyright (c) 2015, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
import stix
from stix.utils.deprecated import deprecated
from stix.common import Activity, Confidence, Statement, VocabString
from stix.common.related import (
GenericRelationshipList, RelatedCampaign, RelatedIn... | bsd-3-clause | -8,451,650,756,009,571,000 | 34.086957 | 95 | 0.646554 | false | 3.748124 | false | false | false |
AdrianArmaselu/aDi-music | graphmodel/Generator.py | 1 | 6702 | import logging
from random import randint
import midi
from graphmodel.NGram import MultiInstrumentNGram
from graphmodel.appio import reader
from graphmodel.appio.scheduler import AbstractEventsScheduledTrack, NotesAndEventsScheduledTrack, PatternSchedule
from graphmodel.appio.writer import MidiFileWriter
from graphmo... | mit | 3,790,266,253,864,824,000 | 39.618182 | 126 | 0.68114 | false | 4.008373 | false | false | false |
corradio/electricitymap | parsers/CA_PE.py | 1 | 6573 | #!/usr/bin/env python3
import json
# The arrow library is used to handle datetimes consistently with other parsers
import arrow
# The request library is used to fetch content through HTTP
import requests
timezone = 'Canada/Atlantic'
def _find_pei_key(pei_list, sought_key):
matching_item = [item for item in p... | gpl-3.0 | 8,195,085,911,495,252,000 | 33.962766 | 103 | 0.622547 | false | 3.518737 | false | false | false |
Tethik/slDeparturesCLI | sitedepartures.py | 1 | 3720 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# coding: UTF-8
import xml.etree.ElementTree as ET
import httplib2
import pickle, os, gflags
import conf
import re
import datetime
import time
from datetime import datetime, timedelta
class SiteDeparture:
namespace = '{http://www1.sl.se/realtidws/}'
def _ParseDis... | mit | -5,550,802,309,409,017,000 | 29.727273 | 109 | 0.666218 | false | 2.900156 | false | false | false |
Gimpneek/cv_gen | cvtool/cv/migrations/0009_auto_20160402_2247.py | 1 | 1262 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.5 on 2016-04-02 22:47
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('cv', '0008_project'),
]
operations = [
migrations.CreateModel(
n... | gpl-3.0 | 6,470,330,235,308,305,000 | 38.4375 | 118 | 0.586371 | false | 4.263514 | false | false | false |
jonathanslenders/libpymux | examples/rot13_bash.py | 1 | 2311 | #!/usr/bin/env python
"""
Usage:
rot13_bash.py
Apply rot13 transformation on any application running inside this pane.
"""
from asyncio.protocols import BaseProtocol
from libpymux.input import InputProtocol
from libpymux.panes import ExecPane
from libpymux.renderer import PipeRenderer
from libpymux.session import ... | bsd-2-clause | 5,681,005,698,253,707,000 | 28.628205 | 108 | 0.641281 | false | 3.950427 | false | false | false |
terranodo/eventkit-cloud | eventkit_cloud/tasks/tests/test_styles.py | 1 | 2699 | # -*- coding: utf-8 -*-
import datetime
import os
from unittest.mock import patch
from django.conf import settings
from django.test import TestCase
from eventkit_cloud.tasks.helpers import generate_qgs_style
class TestStyles(TestCase):
@patch("eventkit_cloud.tasks.helpers.render_to_string")
@patch("builtins... | bsd-3-clause | -819,782,205,110,284,000 | 41.84127 | 116 | 0.523527 | false | 3.425127 | true | false | false |
google/sling | sling/nlp/parser/trainer/train_util.py | 1 | 6157 | # Copyright 2017 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 or agreed to in writing, s... | apache-2.0 | 721,208,738,202,685,200 | 33.982955 | 79 | 0.559851 | false | 4.37909 | false | false | false |
tanzquotient/tq_website | courses/models/regular_lesson.py | 2 | 1586 | from datetime import datetime, timedelta
from django.db import models
from . import Weekday
class RegularLesson(models.Model):
course = models.ForeignKey('Course', related_name='regular_lessons', on_delete=models.CASCADE)
weekday = models.CharField(max_length=3, choices=Weekday.CHOICES, default=None)
ti... | gpl-2.0 | -5,446,625,962,835,129,000 | 36.761905 | 113 | 0.627364 | false | 3.840194 | false | false | false |
TorinCooperBennun/fracc | src/Algorithms/mandelbrot_test.py | 1 | 2453 | import numpy as np
import matplotlib
matplotlib.use("Qt5Agg")
import matplotlib.pyplot as plt
import subprocess
import os
USE_C = False
def output_older(out_filename, in_filename):
try:
out_stat = os.stat(out_filename)
except OSError:
return True
in_stat = os.stat(in_filename)
if out_... | gpl-3.0 | -695,663,569,813,209,000 | 26.875 | 105 | 0.599266 | false | 2.966143 | false | false | false |
KiChjang/servo | tests/wpt/web-platform-tests/tools/third_party/websockets/src/websockets/auth.py | 17 | 5414 | """
:mod:`websockets.auth` provides HTTP Basic Authentication according to
:rfc:`7235` and :rfc:`7617`.
"""
import functools
import http
from typing import Any, Awaitable, Callable, Iterable, Optional, Tuple, Type, Union
from .exceptions import InvalidHeader
from .headers import build_www_authenticate_basic, parse_... | mpl-2.0 | 831,890,026,572,006,900 | 32.8375 | 83 | 0.64795 | false | 4.716028 | false | false | false |
AsymmetricVentures/asymmetricbase | asymmetricbase/logging/audit.py | 1 | 4606 | # -*- coding: utf-8 -*-
# Asymmetric Base Framework - A collection of utilities for django frameworks
# Copyright (C) 2013 Asymmetric Ventures 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 S... | gpl-2.0 | 6,762,564,599,801,556,000 | 27.608696 | 87 | 0.706253 | false | 3.294707 | false | false | false |
nexdatas/configtool | nxsconfigtool/ListCommands.py | 1 | 14852 | #!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2017 DESY, Jan Kotanski <jkotan@mail.desy.de>
#
# nexdatas is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the ... | gpl-3.0 | -7,124,615,525,261,086,000 | 34.111111 | 79 | 0.603959 | false | 4.409739 | false | false | false |
roloram/Carbonico | carbonico/fs/file.py | 1 | 1787 | '''
Nov 20, 2013
Copyright (C) 2013 rolando
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 th... | gpl-3.0 | 6,953,241,878,657,100,000 | 30.350877 | 75 | 0.632345 | false | 4.204706 | false | false | false |
s910324/Sloth | bokehPlotter/BokehGraphEditor/MaterialDesignList/viewBoxListWidget.py | 2 | 1659 | import sys
from PySide import QtGui
from PySide.QtGui import *
from PySide.QtCore import *
class viewBoxListWidget(QWidget):
def __init__(self, lineMode = True, parent = None):
super(viewBoxListWidget, self).__init__(parent)
self.focus_color = QColor(200, 200, 200)
self.setFocusPolicy(Qt.StrongFocus)
... | lgpl-3.0 | 521,050,115,587,229,700 | 20.828947 | 75 | 0.671489 | false | 2.568111 | false | false | false |
timrchavez/capomastro | jenkins/tests/test_tasks.py | 1 | 5758 | from django.test import TestCase
from django.test.utils import override_settings
import mock
from jenkinsapi import jenkins
from jenkins.tasks import build_job, push_job_to_jenkins, import_build
from .factories import (
JobFactory, JenkinsServerFactory, JobTypeFactory)
class BuildJobTaskTest(TestCase):
def... | mit | -6,479,740,906,685,831,000 | 36.38961 | 88 | 0.624522 | false | 3.729275 | true | false | false |
corradio/electricitymap | parsers/FR_O.py | 1 | 10453 | #!/usr/bin/env python3
# coding=utf-8
import arrow
import json
import logging
import requests
# APIs
HISTORICAL_API_ENDPOINT = 'https://opendata-corse-outremer.edf.fr/api/records/1.0/search/'
REAL_TIME_APIS = {
'RE': 'https://opendata-reunion.edf.fr/api/records/1.0/search/'
}
# Sources
HISTORICAL_SOURCE = 'https:... | gpl-3.0 | -4,251,530,251,398,477,300 | 31.867925 | 163 | 0.54602 | false | 3.221948 | false | false | false |
fgregg/seqlearn | setup.py | 1 | 1655 | from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import sys
setup_options = dict(
name="seqlearn",
version="0.0.0",
description="Sequence learning toolkit",
maintainer="Lars Buitinck",
maintainer_email="L.J.Buitinck@uva.nl",
licen... | mit | -1,239,171,715,670,697,700 | 39.365854 | 86 | 0.649547 | false | 3.752834 | false | false | false |
zerovip/EMS | 环境监测系统/django/EMS/emsys/migrations/0001_initial.py | 1 | 2863 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-10-05 13:26
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.Create... | apache-2.0 | 5,818,458,129,954,491,000 | 42.075758 | 114 | 0.541681 | false | 4.327245 | false | false | false |
ajrichards/notebook | visualization/weighted_network.py | 2 | 3569 | #!/usr/bin/env python
#import re,csv,sys
#import numpy as np
import matplotlib.pyplot as plt
import networkx as nx
import matplotlib as mpl
import warnings
warnings.filterwarnings("ignore")
def draw_weighted_network(edge_weights,fig_name='toy_graph.png',font_size = 12):
"""
INPUT: dictionary with edge weight... | bsd-3-clause | 4,655,275,021,040,335,000 | 39.556818 | 136 | 0.567946 | false | 2.529412 | false | false | false |
emilianobilli/backend | dam/cawas/Controller/SliderController.py | 1 | 19613 | import os, datetime, json
from LogController import LogController
from django.shortcuts import render,redirect
from ..models import Asset, Setting, Slider,Country, Movie, Episode, Serie, Girl, Category, Language, Device, Image, Girl, PublishZone, Channel, PublishQueue, ImageQueue
from ..Helpers.PublishHelper import Pub... | gpl-3.0 | -6,339,064,842,402,465,000 | 41.360691 | 169 | 0.528578 | false | 4.182768 | false | false | false |
rbardaji/oceanobs | mooda/input/read_nc_emodnet.py | 1 | 2794 | """ Implementation of a function to read NetCDF files from EMODNET """
import xarray as xr
from ..waterframe import WaterFrame
def read_nc_emodnet(path, clean_data=True):
"""
Open a NetCDF file from EMODNET physics. The file should be from a fixed point observatory due
to this function delete the ... | mit | 7,173,421,358,337,915,000 | 31.261905 | 98 | 0.573372 | false | 3.81694 | false | false | false |
batermj/algorithm-challenger | code-analysis/programming_anguage/python/source_codes/Python3.8.0/Python-3.8.0/Tools/importbench/importbench.py | 4 | 9140 | """Benchmark some basic import use-cases.
The assumption is made that this benchmark is run in a fresh interpreter and
thus has no external changes made to import-related attributes in sys.
"""
from test.test_importlib import util
import decimal
import imp
import importlib
import importlib.machinery
import json
impor... | apache-2.0 | -5,731,925,842,575,714,000 | 36.459016 | 83 | 0.594967 | false | 4.132007 | true | false | false |
deepmind/dm-haiku | haiku/_src/base.py | 1 | 27503 | # Copyright 2019 DeepMind Technologies Limited. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by ... | apache-2.0 | -1,887,310,441,172,309,800 | 30.649022 | 80 | 0.661273 | false | 3.568574 | false | false | false |
lstep/dsacheck | dsacheck/dsacheck.py | 1 | 1976 | # -*- coding: latin-1 -*-
"""
Copyright (C) 2007 Adelux <contact@adelux.fr>
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.
Th... | gpl-2.0 | 2,142,309,255,191,086,000 | 30.870968 | 107 | 0.668522 | false | 3.859375 | false | false | false |
dbaelz/adbons | test/test_adbons.py | 1 | 8227 | import subprocess
import yaml
from unittest import TestCase
from unittest.mock import patch
from unittest import mock
from click.testing import CliRunner
from src.adbons import cli as adbons
class TestAdbons(TestCase):
@patch.object(subprocess, "run", autospec=True)
def test_command_list_devices(self, mock... | bsd-2-clause | -1,467,551,909,323,435,000 | 43.711957 | 79 | 0.53762 | false | 3.943912 | true | false | false |
ryanl/missile-defence | projectiles.py | 1 | 4831 | """
Missile Defence Game
Projectile drawing and simulation module.
Copyright (C) 2011-2012 Ryan Lothian.
See LICENSE (GNU GPL version 3 or later).
"""
import pygame
from background import grad
import random
from random import uniform
import numpy
class Projectile(object):
def __init__(self, p... | apache-2.0 | 5,261,498,052,510,004,000 | 36.449612 | 79 | 0.522873 | false | 3.969597 | false | false | false |
mdhaman/superdesk-core | superdesk/vocabularies/commands.py | 2 | 4028 | # -*- coding: utf-8; -*-
#
# This file is part of Superdesk.
#
# Copyright 2013, 2014 Sourcefabric z.u. and contributors.
#
# For the full copyright and license information, please see the
# AUTHORS and LICENSE files distributed with this source code, or
# at https://www.sourcefabric.org/superdesk/license
import super... | agpl-3.0 | -7,072,612,523,270,974,000 | 33.42735 | 96 | 0.623386 | false | 3.976308 | false | false | false |
yhenon/pyimgsaliency | pyimgsaliency/saliency_mbd.py | 1 | 6119 | import math
import sys
import operator
import networkx as nx
#import matplotlib.pyplot as plt
import numpy as np
import scipy.spatial.distance
import scipy.signal
import skimage
import skimage.io
from skimage.segmentation import slic
from skimage.util import img_as_float
from scipy.optimize import minimize
#import pdb
... | apache-2.0 | 2,759,650,898,613,506,600 | 23.285714 | 106 | 0.608596 | false | 2.269659 | false | false | false |
jakobzhao/ashcrawler | core/baidu.py | 1 | 4738 | # !/usr/bin/python
# -*- coding: utf-8 -*-
#
# Created on Feb 25, 2016
# @author: Bo Zhao
# @email: bo_zhao@hks.harvard.edu
# @website: http://yenching.org
# @organization: Harvard Kennedy School
import time
import urllib
import platform
from pymongo import MongoClient, errors
from selenium import we... | lgpl-3.0 | 1,526,996,600,757,857,000 | 38.333333 | 157 | 0.617373 | false | 3.530292 | false | false | false |
karesansui/karesansui | karesansui/gadget/hostby1networksettingsgeneral.py | 1 | 7500 | # -*- coding: utf-8 -*-
#
# This file is part of Karesansui.
#
# Copyright (C) 2009-2012 HDE, Inc.
#
# 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 lim... | mit | 1,408,021,564,081,805,800 | 36.688442 | 99 | 0.572267 | false | 3.914405 | false | false | false |
thermokarst/advent-of-code-2015 | day15.py | 1 | 4601 | # Matthew Ryan Dillon
# github.com/thermokarst
#
# --- Day 15: Science for Hungry People ---
#
# Today, you set out on the task of perfecting your milk-dunking cookie recipe.
# All you have to do is find the right balance of ingredients.
#
# Your recipe leaves room for exactly 100 teaspoons of ingredients. You make a
#... | mit | -113,694,413,195,186,720 | 35.808 | 84 | 0.660726 | false | 3.353499 | false | false | false |
johnmgregoire/vanDover_CHESS | ui_highlowDialog.py | 1 | 2451 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'C:\Users\JohnnyG\Documents\XRDproject_Python_11June2010Release backup\highlowDialog.ui'
#
# Created: Mon Jun 14 16:20:37 2010
# by: PyQt4 UI code generator 4.5.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 impor... | bsd-3-clause | -1,503,504,455,576,978,700 | 51.148936 | 149 | 0.723378 | false | 3.741985 | false | false | false |
mikofski/pvlib-python | benchmarks/benchmarks/irradiance.py | 3 | 2710 | """
ASV benchmarks for irradiance.py
"""
import pandas as pd
from pvlib import irradiance, location
class Irradiance:
def setup(self):
self.times = pd.date_range(start='20180601', freq='1min',
periods=14400)
self.days = pd.date_range(start='20180601', freq='d',... | bsd-3-clause | -8,498,944,163,638,447,000 | 38.852941 | 78 | 0.544649 | false | 3.822285 | false | false | false |
jamalex/kolibri | kolibri/content/management/commands/exportchannel.py | 5 | 1091 | import logging as logger
import os
from kolibri.tasks.management.commands.base import AsyncCommand
from ...utils import paths, transfer
logging = logger.getLogger(__name__)
class Command(AsyncCommand):
def add_arguments(self, parser):
parser.add_argument("channel_id", type=str)
parser.add_argu... | mit | 845,017,681,798,610,300 | 32.060606 | 103 | 0.656279 | false | 3.952899 | false | false | false |
poplav/incubator-toree | test_toree.py | 1 | 5575 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -6,294,444,699,907,620,000 | 39.693431 | 167 | 0.603587 | false | 4.093245 | true | false | false |
geberl/droppy-workspace | Tasks/Markdown.AddToc/test_task.py | 1 | 1107 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import codecs
import py
import os
import shutil
import task
files_dir = py.path.local(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir, 'Test', 'files'))
def test_input_empty(tmpdir):
input_dir = tmpdir.join('0')
o... | mit | 6,497,506,360,195,685,000 | 24.674419 | 105 | 0.593297 | false | 3.083799 | false | false | false |
hvanhovell/spark | examples/src/main/python/ml/chi_square_test_example.py | 52 | 1842 | #
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not us... | apache-2.0 | -7,736,826,196,534,998,000 | 34.423077 | 74 | 0.676439 | false | 3.482042 | true | false | false |
novoid/Memacs | memacs/battery.py | 1 | 2511 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import argparse
import datetime
import logging
import sys
import batinfo
from orgformat import OrgFormat
from memacs.lib.memacs import Memacs
from memacs.lib.orgproperty import OrgProperties
ROOT = '/sys/class/power_supply'
class Battery(Memacs):
def _parser_add_... | gpl-3.0 | 9,052,141,076,116,196,000 | 27.213483 | 75 | 0.568299 | false | 4.116393 | false | false | false |
brunotougeiro/python | xenmigrate/xenmigrate (2).py | 2 | 18222 | """
Xen Migrate
Migrate XenServer to Open Source Xen
2009 Mark Pace -- Jolokia Networks
pace@jolokianetworks.com
GPL License
USE THIS SOFTWARE AT YOUR OWN RISK!
"""
import gzip
import os
import subprocess
import sys
def docmd(cmd):
"""
run a command and return the communicate PIPE
"""
if debug:
... | gpl-2.0 | -412,743,132,070,623,040 | 35.96146 | 185 | 0.522555 | false | 4.087483 | false | false | false |
eteq/ginga | ginga/GingaPlugin.py | 2 | 2668 | #
# GingaPlugin.py -- Base classes for plugins in Ginga FITS viewer
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
from ginga.misc import Bunch
class PluginError(Exc... | bsd-3-clause | 2,406,369,083,263,198,700 | 25.949495 | 78 | 0.593703 | false | 4.073282 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.