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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
V155/qutebrowser | tests/unit/test_app.py | 1 | 1406 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016-2018 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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-3.0 | 1,243,102,487,170,191,000 | 35.051282 | 76 | 0.738265 | false | 3.739362 | false | false | false |
caslei/TfModels | slim/LungCT.py | 1 | 11676 | # This Python 3 environment comes with many helpful analytics libraries installed
# It is defined by the kaggle/python docker image: https://github.com/kaggle/docker-python
# For example, here's several helpful packages to load in
import numpy as np # linear algebra
import pandas as pd # data processing, CSV file I/O... | apache-2.0 | 7,217,647,246,437,348,000 | 29.847887 | 139 | 0.562009 | false | 2.979592 | false | false | false |
adamhaney/airflow | airflow/contrib/operators/kubernetes_pod_operator.py | 1 | 8693 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 5,386,223,288,133,237,000 | 41.82266 | 87 | 0.622685 | false | 4.462526 | true | false | false |
uniomni/system_administration | security/utilities.py | 1 | 3473 | """Utilities
"""
import os
from math import sqrt, pi, sin, cos, acos
from subprocess import Popen, PIPE
import sys
def run(cmd,
stdout=None,
stderr=None,
verbose=True):
s = cmd
if stdout:
s += ' > %s' % stdout
if stderr:
s += ' 2... | gpl-3.0 | 6,292,243,001,345,281,000 | 23.985612 | 71 | 0.56061 | false | 3.808114 | false | false | false |
hychrisli/PyAlgorithms | src/solutions/part2/q081_rotated_search_ii.py | 1 | 2506 | from src.base.solution import Solution
from src.tests.part2.q081_test_rotated_search_ii import RotatedSearchIiTestCases
class RotatedSearchIi(Solution):
def gen_test_cases(self):
return RotatedSearchIiTestCases()
def run_test(self, input):
return self.search(input[0], input[1])
def searc... | apache-2.0 | -5,759,805,069,112,625,000 | 25.670213 | 80 | 0.401437 | false | 4.411972 | true | false | false |
ysegorov/jukoro | jukoro/redis/cache.py | 1 | 2370 | # -*- coding: utf-8 -*-
"""
Module to create and use Redis-based cache
Uses :mod:`jukoro.pickle` to transparently pickle/unpickle cached
Python values
"""
import hashlib
import logging
from jukoro import pickle
logger = logging.getLogger(__name__)
TTL = 60 * 60 * 24
class RedisCache(object):
"""
Abstra... | mit | 7,185,600,339,710,488,000 | 22.235294 | 72 | 0.54346 | false | 4.003378 | false | false | false |
drabastomek/practicalDataAnalysisCookbook | Codes/Chapter06/regression_linear.py | 1 | 2521 | # this is needed to load helper from the parent folder
import sys
sys.path.append('..')
# the rest of the imports
import helper as hlp
import pandas as pd
import numpy as np
import sklearn.linear_model as lm
@hlp.timeit
def regression_linear(x,y):
'''
Estimate a linear regression
'''
# create the ... | gpl-2.0 | 7,152,624,957,063,952,000 | 24.72449 | 89 | 0.687822 | false | 3.291123 | false | false | false |
freevo/freevo1 | src/skins/main/skin_utils.py | 1 | 12315 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# Some utils for the skin
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Ho... | gpl-2.0 | 3,118,684,690,214,898,000 | 32.464674 | 193 | 0.532603 | false | 3.812693 | false | false | false |
mdeff/ntds_2016 | project/reports/airbnb_booking/preprocessing_helper.py | 1 | 16716 | # Functions to preprocess Train_user and Test_user
# Pecoraro Cyril
import pandas as pd
import numpy as np
import os
from IPython.display import Image
from IPython.core.display import HTML
import matplotlib.pyplot as plt
import random
from datetime import datetime
import seaborn as sns
from pandas.tools.plotting im... | mit | -4,159,481,853,177,038,300 | 40.7925 | 170 | 0.642438 | false | 3.377652 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/minigame/TwoDStomperMgr.py | 1 | 1843 | from panda3d.core import *
from panda3d.direct import *
from direct.directnotify import DirectNotifyGlobal
from direct.showbase.DirectObject import DirectObject
from toontown.minigame import ToonBlitzGlobals
from toontown.minigame import TwoDStomper
class TwoDStomperMgr(DirectObject):
notify = DirectNotifyGlobal.d... | apache-2.0 | -1,768,594,169,914,763,800 | 31.333333 | 76 | 0.661964 | false | 3.451311 | false | false | false |
kleingeist/muster | favit/views.py | 1 | 1470 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.auth.decorators import login_required
from django.http import HttpResponseNotAllowed, HttpResponseBadRequest, JsonResponse
from .models import Favorite
@login_required
def add_or_remove(request):
if not request.is_ajax():
... | gpl-2.0 | 7,228,029,283,924,477,000 | 22.709677 | 84 | 0.651701 | false | 3.888889 | false | false | false |
bioinform/somaticseq | somaticseq/utilities/trimSoftClippedReads.py | 1 | 3893 | #!/usr/bin/env python3
import argparse, pysam, re
parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument('-bamin', '--bam-file-in', type=str, help='Input BAM file', required=True, default=None)
parser.add_argument('-bamout', '--bam-file-out', type=str, ... | bsd-2-clause | -2,832,544,413,480,428,000 | 41.315217 | 127 | 0.476496 | false | 3.385217 | false | false | false |
six0four/StudentSenseHat | firmware/BME280.py | 1 | 7662 | #!/usr/bin/python
#
# Reference: Matt Hawkins's Code on
# http://www.raspberrypi-spy.co.uk/
# Revised by Austin Tian
#--------------------------------------
import smbus
import time
from ctypes import c_short
from ctypes import c_byte
from ctypes import c_ubyte
from time import sleep
DEVICE = 0x77 # Default device I... | agpl-3.0 | -6,507,152,263,423,666,000 | 33.986301 | 173 | 0.59645 | false | 2.810712 | false | false | false |
ic-hep/DIRAC | WorkloadManagementSystem/JobWrapper/Watchdog.py | 1 | 36346 | ########################################################################
# File : Watchdog.py
# Author: Stuart Paterson
########################################################################
""" The Watchdog class is used by the Job Wrapper to resolve and monitor
the system resource consumption. The Watchdog... | gpl-3.0 | 5,347,971,081,046,772,000 | 39.116998 | 143 | 0.588593 | false | 3.975282 | true | false | false |
kyoren/https-github.com-h2oai-h2o-3 | h2o-py/tests/testdir_algos/glm/pyunit_link_functions_tweedie_basicGLM.py | 1 | 1074 | import sys
sys.path.insert(1, "../../../")
import h2o, tests
def link_functions_tweedie_basic():
print "Read in prostate data."
hdf = h2o.upload_file(tests.locate("smalldata/prostate/prostate_complete.csv.zip"))
print "Testing for family: TWEEDIE"
print "Set variables for h2o."
y = "CAP... | apache-2.0 | 8,664,512,071,080,691,000 | 36.034483 | 124 | 0.631285 | false | 2.871658 | false | false | false |
sorgerlab/belpy | indra/tools/gene_network.py | 1 | 12457 | from __future__ import absolute_import, print_function, unicode_literals
from builtins import dict, str
import os
import pickle
import logging
from indra.sources import bel, biopax
import indra.tools.assemble_corpus as ac
from indra.preassembler import Preassembler
from indra.preassembler.hierarchy_manager import hiera... | mit | -4,088,684,390,378,063,000 | 43.971119 | 80 | 0.604158 | false | 4.334377 | false | false | false |
gratipay/gratipay.com | gratipay/models/package/__init__.py | 1 | 3715 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function, unicode_literals
from postgres.orm import Model
from .emails import Emails
from .team import Team
NPM = 'npm' # We are starting with a single package manager. If we see
# traction we will expand.
class Package(... | mit | 8,777,672,437,096,483,000 | 29.45082 | 89 | 0.584118 | false | 4.174157 | false | false | false |
flurischt/KickassAPI | KickassAPI.py | 1 | 10178 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Version: 2.7
# Author: FEE1DE4D
"""
This is an unofficial python API for kat.cr (formerly kickass.to) partially
inspired by https://github.com/karan/TPB
by FEE1DE4D (fee1de4d@gmail.com)
under GPLv2 (http://www.gnu.org/licenses/gpl-2.0.html)
"""
# IMPORTS
from pyquery... | gpl-2.0 | -3,462,835,106,760,817,000 | 26.657609 | 86 | 0.534093 | false | 3.886216 | false | false | false |
jmesteve/saas3 | openerp/addons_extra/product_images_website/ir_ui_view.py | 1 | 1284 | # -*- coding: utf-8 -*-
import urlparse
from openerp.osv import osv, fields
class view(osv.osv):
_inherit = "ir.ui.view"
def save_embedded_field(self, cr, uid, el, context=None):
Model = self.pool[el.get('data-oe-model')]
field = el.get('data-oe-field')
column = Model._all_column... | agpl-3.0 | 6,792,533,428,540,582,000 | 40.451613 | 101 | 0.573988 | false | 3.616901 | false | false | false |
dkhedekar/ProxyDataRouter | MddProxyGit/test/MddProxyControl.py | 1 | 1430 | #!/usr/bin/python
import sys
import argparse
class MddProxyClient(object):
def __init__(self,sock):
if sock==None:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
else:
self.sock = sock
def connect(self,host,port):
self.sock.connect(host,port)
... | isc | 3,812,018,808,058,440,000 | 27.039216 | 109 | 0.607692 | false | 3.753281 | false | false | false |
flavoi/diventi | diventi/adventures/migrations/0025_auto_20200901_1950.py | 1 | 2494 | # Generated by Django 2.2.13 on 2020-09-01 17:50
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('adventures', '0024_auto_20200830_1804'),
]
operations = [
migrations.AlterField(
model_name='adventure',
name='titl... | apache-2.0 | 273,108,533,508,920,260 | 33.164384 | 83 | 0.554531 | false | 4.163606 | false | false | false |
bilalel/reveal2py | modules/smarthumb.py | 1 | 1571 | from gluon import current
import os
try:
from PIL import Image
except:
import Image
def SMARTHUMB(image, box, fit=True, name="thumb"):
'''Downsample the image.
@param img: Image - an Image-object
@param box: tuple(x, y) - the bounding box of the result image
@param fit: boolean - crop the ... | apache-2.0 | -3,116,646,950,460,300,300 | 34.727273 | 90 | 0.528326 | false | 3.314346 | false | false | false |
fabiansinz/pipeline | python/pipeline/treadmill.py | 1 | 8809 | import datajoint as dj
from datajoint.jobs import key_hash
import numpy as np
from commons import lab
import os
from . import experiment, notify
from .utils import h5
from .exceptions import PipelineException
schema = dj.schema('pipeline_treadmill', locals())
@schema
class Sync(dj.Computed):
definition = """ #... | lgpl-3.0 | 4,239,849,200,164,297,000 | 47.674033 | 116 | 0.609944 | false | 3.704373 | false | false | false |
sunlightlabs/django-citizendialer3000 | citizendialer3000/management/commands/importcontacts.py | 1 | 3952 | from django.core.management.base import BaseCommand, CommandError
from django.template.defaultfilters import slugify
from citizendialer3000 import *
from citizendialer3000.loading import load_sunlightapi
from citizendialer3000.models import Campaign, Contact
from optparse import make_option
import sys
class Command(Ba... | bsd-3-clause | 4,958,709,180,648,765,000 | 45.505882 | 145 | 0.537702 | false | 4.501139 | false | false | false |
velodee/vcs | vcs/backends/__init__.py | 1 | 1841 | # -*- coding: utf-8 -*-
"""
vcs.backends
~~~~~~~~~~~~
Main package for scm backends
:created_on: Apr 8, 2010
:copyright: (c) 2010-2011 by Marcin Kuzminski, Lukasz Balcerzak.
"""
import os
from pprint import pformat
from vcs.conf import settings
from vcs.exceptions import VCSError
from vcs.utils.he... | mit | -2,042,279,614,064,055,000 | 28.222222 | 80 | 0.648561 | false | 3.908705 | false | false | false |
2degrees/twapi-authn | setup.py | 1 | 1919 | ##############################################################################
#
# Copyright (c) 2015-2016, 2degrees Limited.
# All Rights Reserved.
#
# This file is part of twapi-authn
# <https://github.com/2degrees/twapi-authn>, which is subject to the
# provisions of the BSD at
# <http://dev.2degreesnetwork.com/p/2d... | bsd-3-clause | -2,813,852,848,168,004,600 | 35.207547 | 79 | 0.623241 | false | 3.876768 | false | false | false |
DirectXMan12/should_be | should_be/extensions/sized.py | 1 | 4985 | from should_be.core import BaseMixin, alias_method
try:
from collections.abc import Sized
except ImportError:
# python < 3.3
from collections import Sized
class SizedMixin(BaseMixin):
target_class = Sized
def should_be_size(self, target):
msg = '{txt} should have been size {val}, but was ... | isc | -3,073,971,879,870,417,000 | 40.198347 | 79 | 0.525376 | false | 3.753765 | false | false | false |
kaysinds/PoopDog | lib/Dictionary.py | 1 | 16534 | # -*- coding: UTF-8 -*-
import os,pickle,glob,time,sys
from tools import *
from entity import *
from Word import Word
from Syllable import Syllable
from ipa import ipa
import codecs
class Dictionary: # cf Word, in that Text.py will really instantiate Dictionary_en,Dictionary_fi,usw.
classnames=['Phoneme','Onset','Nu... | gpl-3.0 | 2,618,036,646,348,765,700 | 24.956044 | 249 | 0.640377 | false | 2.728833 | false | false | false |
yangshaoshun/OMOOC2py | _src/om2py2w/2wex0/main.py | 1 | 2739 | # -*- coding: utf-8 -*-
'''文件说明:极简日志系统-桌面版
作者信息:yangshaoshun
版本自述:v1.3
更新:添加了滚动条,解决了内容超过显示框不自动跟随的问题
待解决问题1:因为 idle 编码问题,mac下无法输入中文 (windows下可以运行,tk版本为8.5 python为2.7.1)
待解决问题2:不止输入一行字符,使用 txt 输入一段文字,甚至可以输入 md 格式,下面展示转换后的内容
代办事项:书写 readme.md
代办事项2:docopt 的使用
'''
#全局引用
from Tkinter import *
from ttk import *
from sys impo... | mit | 2,372,642,613,958,885,400 | 22.775281 | 77 | 0.672813 | false | 1.810788 | false | false | false |
FederatedAI/FATE | python/fate_flow/scheduler/detector.py | 1 | 6910 | #
# Copyright 2019 The FATE 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 appli... | apache-2.0 | -6,846,159,331,902,992,000 | 48.71223 | 165 | 0.593632 | false | 3.860335 | false | false | false |
w3s7y/scubatools | blending.py | 1 | 1822 | """Gas blending functions (Very approximate).
Whenever a function calls for a gas mix it must be tuple in form (O2%, He%) e.g.
18/35Tx would be (18, 35)
Air would be (21, 00)
32% Nitrox would be (32, 00)."""
import math
from . import utils
def decant(s_cyl_size, s_cyl_pressure, r_cyl_size, r_cyl_pr... | gpl-3.0 | -5,665,349,761,014,266,000 | 35.183673 | 115 | 0.622942 | false | 2.735736 | false | false | false |
endlessm/chromium-browser | third_party/depot_tools/compile_single_file.py | 1 | 2732 | #!/usr/bin/env python
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import print_function
import argparse
import os
import subprocess
import sys
# This function is inspired from the on... | bsd-3-clause | -3,596,226,354,109,505,500 | 33.582278 | 80 | 0.680454 | false | 3.632979 | false | false | false |
MTASZTAKI/ApertusVR | plugins/physics/bulletPhysics/3rdParty/bullet3/examples/pybullet/examples/frictionCone.py | 2 | 1428 | import pybullet as p
import time
import math
p.connect(p.GUI)
useMaximalCoordinates = False
p.setGravity(0, 0, -10)
plane = p.loadURDF("plane.urdf", [0, 0, -1], useMaximalCoordinates=useMaximalCoordinates)
p.setRealTimeSimulation(0)
velocity = 1
num = 40
p.configureDebugVisualizer(p.COV_ENABLE_GUI, 0)
p.configureDe... | mit | -7,391,915,528,216,929,000 | 30.043478 | 89 | 0.69888 | false | 2.756757 | false | false | false |
mfasDa/raadev | analysis/base/WeightHandler.py | 1 | 4146 | '''
Created on 26.09.2014
@author: markusfasel
'''
from base.DataCollection import DataCollection, Datapoint
class PtHatBin:
"""
Data entry of the pt-hat bin
"""
def __init__(self, binId, weighthist, trialsHist):
"""
Construct pt-hat bin. Automatically calculates the weight
... | gpl-3.0 | 6,686,758,008,336,999,000 | 28.834532 | 114 | 0.543898 | false | 3.944814 | false | false | false |
sinnwerkstatt/landmatrix | apps/landmatrix/models/deal.py | 1 | 45041 | import json
from typing import Optional, Set
from django.contrib.postgres.fields import ArrayField as _ArrayField, JSONField
from django.core.validators import MaxValueValidator, MinValueValidator
from django.db import models, transaction
from django.db.models import Sum, F
from django.utils import timezone
from djang... | agpl-3.0 | -6,320,456,179,746,793,000 | 33.431193 | 102 | 0.579847 | false | 3.997515 | false | false | false |
team172011/ps_cagebot | helper/res_ex.py | 1 | 1351 | """
Pyhton script for resizing existing images
@author: wimmer simon-justus
@param dir: 1 directory that contains the raw data
@param w: width of file
@param h: height of file
"""
import sys
import os
import cv2
import numpy as np
from time import sleep
# function for resizing existing images
def resize_images(dir,w... | mit | -462,203,332,837,399,500 | 27.145833 | 84 | 0.597335 | false | 3.091533 | false | false | false |
NSLS-II-HXN/ipython_ophyd | profile_collection/startup/90-alignment.py | 1 | 21703 | from scipy.optimize import curve_fit
import scipy
import pickle
import numpy as np
def erfunc3(z,a,b,c,d,e):
return d+e*z+c*(scipy.special.erf((z-a)/(b*np.sqrt(2.0)))+1.0)
def erfunc4(z,a,b,c,d,e):
return d+e*z+c*(1.0-scipy.special.erf((z-a)/(b*np.sqrt(2.0))))
def erfunc1(z,a,b,c):
return c*(scipy.special... | bsd-2-clause | -1,949,531,605,902,140,400 | 33.7248 | 132 | 0.561766 | false | 2.369582 | false | false | false |
glyuck/pyazure | pyazure/storage/blob.py | 1 | 4994 | #!/usr/bin/env python
# encoding: utf-8
"""
Python wrapper around Windows Azure storage and management APIs
Authors:
Sriram Krishnan <sriramk@microsoft.com>
Steve Marx <steve.marx@microsoft.com>
Tihomir Petkov <tpetkov@gmail.com>
License:
GNU General Public Licence (GPL)
This file is part of ... | gpl-3.0 | 3,742,457,949,542,161,400 | 40.272727 | 142 | 0.639167 | false | 3.721311 | false | false | false |
finder/mako_base | comments/migrations/0001_initial.py | 1 | 2619 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Comment'
db.create_table('comments_comment', (
('created', self.gf('django... | mit | -989,954,441,979,735,000 | 49.365385 | 136 | 0.569683 | false | 3.868538 | false | false | false |
forin-xyz/statistical-learning-method | naive_bayes_MLE.py | 1 | 1494 | import numpy as np
def naive_bayes_MLE_train(x, X, y, xl=None, yl=None):
x = np.array(x)
X = np.array(X)
y = np.array(y)
N, n = X.shape
if not xl:
xl = [list(set(X[:,i])) for i in range(n)]
if not yl:
yl = list(set(y))
K = len(yl)
# 统计y各个结果出现的频次
yf = np.array([(y==yl... | mit | 6,628,210,675,403,508,000 | 26.461538 | 67 | 0.452381 | false | 2.227769 | false | false | false |
rzinkstok/skymap | skymap/stars/cluster_points.py | 1 | 5734 | import numpy as np
from skymap.geometry import rotation_matrix, sky2cartesian, cartesian2sky, distance
# Brute force clustering
def brute_cluster(points, threshold):
"""Naive method for clustering points that are closer than the given threshold.
Args:
points (numpy.ndarray): a (Nx2) array containing ... | gpl-3.0 | 479,544,851,786,517,950 | 31.39548 | 120 | 0.606209 | false | 3.537323 | false | false | false |
tutRPi/Snake-Game-MAX7219 | Point.py | 1 | 1275 | #!/usr/bin/env python
# ---------------------------------------------------------
# Filename: Points.py
# ---------------------------------------------------------
# 2D Point Class with elementary functions
#
# v1.0
# F.Stern 2014
# ---------------------------------------------------------
class Point(object):
__slot... | mit | -1,374,413,793,477,428,200 | 31.717949 | 99 | 0.523922 | false | 3.277635 | false | false | false |
googleapis/googleapis-gen | google/ads/googleads/v7/googleads-py/google/ads/googleads/v7/services/services/campaign_simulation_service/transports/base.py | 1 | 3788 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -8,053,536,719,708,833,000 | 36.137255 | 79 | 0.656283 | false | 4.359033 | false | false | false |
luiscape/hdxscraper-worldpop | collector/parser.py | 1 | 2112 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
PARSER:
-------
This parser will intake dataverse dataset classes and
generate an HDX-like dictionary. It was designed to
register datasets in HDX in a posterior process.
'''
import os
import sys
import json
import requests
from copy import copy
from slugify import slugif... | mit | 3,010,196,625,316,848,600 | 31.492308 | 167 | 0.586174 | false | 3.591837 | false | false | false |
ktsitsikas/odemis | src/odemis/util/test/img_test.py | 1 | 23632 | # -*- coding: utf-8 -*-
'''
Created on 19 Sep 2012
@author: piel
Copyright © 2012-2013 Éric Piel & Kimon Tsitsikas, Delmic
This file is part of Odemis.
Odemis 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
Fo... | gpl-2.0 | -1,478,070,857,941,330,700 | 35.403698 | 92 | 0.573859 | false | 3.3262 | true | false | false |
jtara1/MiscScripts | misc_scripts/images_to_pdf.py | 1 | 1706 | from fpdf import FPDF
import os
import glob
import PIL
from PIL import Image
import click
__doc__ = """
saves each image in a directory on a page of a newly created PDF
"""
letter_width_inches = 8.5
letter_height_inches = 11
def images_to_pdf(path, offset_coords=(-5, 0), ext='.png'):
path = os... | apache-2.0 | -5,656,233,141,856,130,000 | 22.724638 | 88 | 0.576202 | false | 3.599156 | false | false | false |
orbkit/orbkit | orbkit/read/tools.py | 1 | 4394 | '''
Some tools needed by Orbkit functions
'''
import gzip
import numpy
import os
import re
from orbkit.display import display
from orbkit.tools import *
from orbkit import options
def descriptor_from_file(filename, index=0, ci_descriptor=False):
from .tar import is_tar_file, get_file_from_tar
if is_tar_file(fil... | lgpl-3.0 | 2,306,039,931,406,107,000 | 29.303448 | 125 | 0.636322 | false | 3.298799 | false | false | false |
jayshonzs/ESL | Boosting/AdaBoost_M1_stump.py | 1 | 4396 | '''
Created on 2014-7-21
@author: xiajie
'''
import numpy as np
'''
Useful for simple classifiers
'''
def simulate_data():
kai = 9.34
X = np.zeros((200,10))
Y = np.zeros(200)
for i in range(200):
x = []
for j in range(10):
xj = np.random.standard_normal(1)[0]
x... | mit | -5,393,195,133,004,806,000 | 22.382979 | 93 | 0.44586 | false | 2.691978 | false | false | false |
dhermes/bezier | src/python/bezier/_base.py | 1 | 3784 | # 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, software
# distributed under t... | apache-2.0 | 7,216,606,857,195,215,000 | 29.764228 | 78 | 0.62685 | false | 4.227933 | false | false | false |
jeremiah-c-leary/vhdl-style-guide | vsg/rules/concurrent/rule_008.py | 1 | 8198 |
from vsg import parser
from vsg import rule
from vsg import token
from vsg import violation
from vsg.rules import utils as rules_utils
from vsg.vhdlFile import utils
lTokens = []
lTokens.append(parser.comment)
lSkip = []
lSkip.append(parser.comment)
oLeftToken = token.architecture_body.begin_keyword
oRightToken ... | gpl-3.0 | -2,131,509,014,755,846,700 | 39.584158 | 127 | 0.537814 | false | 4.3102 | false | false | false |
japareaggae/smtracker-python | smtracker/utils/parse.py | 1 | 14941 | #!/usr/bin/python3
# Copyright (C) 2016 Renan Guilherme Lebre Ramos
# This file is a part of smtracker.
#
# smtracker 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 y... | gpl-3.0 | 1,061,561,790,680,995,600 | 30.857143 | 87 | 0.578475 | false | 3.5422 | false | false | false |
rrallo/GenomeBrowser | GenomeBrowser/mkII.py | 1 | 5855 | import os
import sys
import time
from multiprocessing import Process
from wikitools import wiki, category, page
import json
VCF_FILE = 'data/example.vcf'
OUTPUT_TEMPLATE = 'snpediaMap'
LOCAL_SNPEDIA = 'data/localsnpedia.json'
LOCAL_RSNUMS = 'data/localrsnums.txt'
NUM_OF_PROCESSES = 10
if(not os.path.isfi... | apache-2.0 | -9,495,163,808,366,236 | 27.872449 | 110 | 0.642357 | false | 2.786768 | false | false | false |
wtsi-hgi/CoGS-Webapp | cogs/scheduler/constants.py | 1 | 2866 | """
Copyright (c) 2017, 2018 Genome Research Ltd.
Authors:
* Christopher Harrison <ch12@sanger.ac.uk>
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
y... | agpl-3.0 | -8,237,669,403,853,655,000 | 34.382716 | 87 | 0.659456 | false | 3.986092 | false | false | false |
maruel/fortuna | testdata/generate_generator.py | 1 | 1027 | #!/usr/bin/env python
# Copyright 2013 Marc-Antoine Ruel. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Generates the test data for generator_test.go in generator.json.
The data is base64 encoded.
"""
import json
import os... | apache-2.0 | 8,679,376,572,794,414,000 | 19.959184 | 75 | 0.605648 | false | 3.22956 | false | false | false |
CoSandu/PythonCourses | Database_with_python/week_3/tracks.py | 1 | 2714 | import xml.etree.ElementTree as ET
import sqlite3
conn = sqlite3.connect('trackdb.sqlite')
cur = conn.cursor()
# Make some fresh tables using executescript()
cur.executescript('''
DROP TABLE IF EXISTS Artist;
DROP TABLE IF EXISTS Album;
DROP TABLE IF EXISTS Track;
DROP TABLE IF EXISTS Genre;
CREATE TABLE Artist (
... | apache-2.0 | -3,735,514,575,106,256,000 | 26.693878 | 68 | 0.627119 | false | 3.492921 | false | false | false |
ssoto/hack4medAND | lisa_graph/lisa_search/views.py | 1 | 3321 | from django.shortcuts import render
from django.template import RequestContext
from django.shortcuts import render_to_response, get_object_or_404, redirect
from lisa_search.forms import UploadDataForm
from lisa_modules.csv_reader import CSV
from lisa_models.table import Table_Model
from lisa_modules.db_middleware impor... | gpl-2.0 | 7,278,657,375,242,269,000 | 35.9 | 94 | 0.609756 | false | 4.203797 | false | false | false |
tjcsl/ion | intranet/apps/users/migrations/0016_auto_20170802_1355.py | 1 | 1233 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-02 17:55
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('users', '0015_auto_2017073... | gpl-2.0 | -1,936,351,148,027,555,600 | 33.25 | 147 | 0.580697 | false | 3.770642 | false | false | false |
ysegorov/wt | tests/wt/jinja/test_jinja.py | 1 | 2505 | # -*- coding: utf-8 -*-
from unittest import mock
import jinja2
import pytest
from wt import jinja
def describe_Registry():
def must_properly_register_filter(jinja_registry):
assert len(list(jinja_registry)) == 0
def fltr(d):
return d
res = jinja_registry.add(fltr)
... | mit | -8,136,741,219,537,568,000 | 21.981651 | 66 | 0.584032 | false | 3.853846 | false | false | false |
FederatedAI/FATE | python/fate_client/pipeline/param/cross_validation_param.py | 1 | 3233 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2019 The FATE 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/lic... | apache-2.0 | -6,524,227,808,206,576,000 | 38.91358 | 128 | 0.69069 | false | 3.881152 | false | false | false |
BrechtBa/webopt | django/customauth/migrations/0001_initial.py | 1 | 2816 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-14 13:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0007_alter_validators_add_error_mess... | gpl-3.0 | 1,186,491,150,130,176,500 | 66.047619 | 266 | 0.649148 | false | 4.30581 | false | false | false |
edineicolli/daruma-exemplo-python | scripts/fiscal/ui_fiscal_rverificarnumeroseriecodificado.py | 1 | 4510 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_fiscal_rverificarnumeroseriecodificado.ui'
#
# Created: Mon Nov 24 22:26:36 2014
# by: pyside-uic 0.2.15 running on PySide 1.2.2
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
from pydaruma... | gpl-2.0 | 4,459,383,970,151,381,500 | 60.739726 | 261 | 0.761926 | false | 3.147346 | false | false | false |
hbiyik/tribler | src/tribler-core/tribler_core/modules/metadata_store/restapi/channels_endpoint.py | 1 | 16551 | import base64
import codecs
from binascii import unhexlify
from aiohttp import ClientSession, ContentTypeError, web
from aiohttp_apispec import docs, json_schema
from ipv8.REST.schema import schema
from ipv8.database import database_blob
from marshmallow.fields import Boolean, Dict, Integer, String
from pony.orm i... | lgpl-3.0 | 263,258,750,905,813,950 | 44.345205 | 120 | 0.565404 | false | 4.303432 | false | false | false |
molmod/yaff | yaff/analysis/test/test_blav.py | 1 | 1509 | # -*- coding: utf-8 -*-
# YAFF is yet another force-field code.
# Copyright (C) 2011 Toon Verstraelen <Toon.Verstraelen@UGent.be>,
# Louis Vanduyfhuys <Louis.Vanduyfhuys@UGent.be>, Center for Molecular Modeling
# (CMM), Ghent University, Ghent, Belgium; all rights reserved unless otherwise
# stated.
#
# This file is pa... | gpl-3.0 | 5,426,821,956,627,277,000 | 33.295455 | 84 | 0.70444 | false | 3.266234 | false | false | false |
thombashi/pytablewriter | pytablewriter/writer/_table_writer.py | 1 | 39176 | """
.. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.hombashi@gmail.com>
"""
import abc
import copy
import math
import warnings
from typing import Any, Dict, List, Mapping, Optional, Sequence, Union, cast
import typepy
from dataproperty import (
ColumnDataProperty,
DataProperty,
DataPropertyExtractor,
Form... | mit | 1,817,155,229,100,829,200 | 32.115807 | 100 | 0.591459 | false | 4.095766 | false | false | false |
kanairen/RegularIcosahedronDict | src/view/qt_gl.py | 1 | 7087 | #!/usr/bin/env python
# coding: utf-8
from PyQt4 import QtCore, QtGui, QtOpenGL
from OpenGL import GL
from src.util.qt_util import Color
class GLWidget(QtOpenGL.QGLWidget):
"""
OpenGLを用いた3D描画を行うQtウィジェットクラス
"""
class GLLight(object):
def __init__(self, type, position, diffuse):
se... | mit | -1,250,920,222,807,381,000 | 26.532189 | 75 | 0.53749 | false | 2.643181 | false | false | false |
Sildra/PyTester | PyTester/data/Color.py | 1 | 1677 | """ Module used to colorize strings """
red_color = ""
green_color = ""
yellow_color = ""
orange_color = ""
blue_color = ""
violet_color = ""
reset = ""
def debug():
return violet_color + "[DEBUG]" + reset
def module():
return violet_color + "[MODULE]" + reset
def core():
return orange_color + "[_COR... | apache-2.0 | -3,903,670,671,379,794,400 | 16.28866 | 44 | 0.60167 | false | 3.128731 | false | false | false |
AEDA-Solutions/matweb | backend/Database/Controllers/Ass_turma_sala_horario.py | 1 | 1420 | from Framework.BancoDeDados import BancoDeDados
from Database.Models.Ass_turma_sala_horario import Ass_turma_sala_horario as ModelAss_turma_sala_horario
class Ass_turma_sala_horario(object):
def pegarAss_turma_sala_horarios(self, condicao, valores):
associacoes = []
for associacao in BancoDeDados().consultarM... | mit | 4,347,031,136,120,827,000 | 53.615385 | 188 | 0.760563 | false | 2.482517 | false | false | false |
google/brax | brax/tests/mujoco_test.py | 1 | 2866 | # Copyright 2021 The Brax Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wri... | apache-2.0 | 4,757,807,615,098,514,000 | 39.942857 | 133 | 0.634334 | false | 2.889113 | true | false | false |
Koellmannco/Sturmfrei-API | project/user.py | 1 | 3440 | from project.database import db
from sqlalchemy.sql import func
from flask import g
from marshmallow import Schema, fields, post_load
from itsdangerous import SignatureExpired, BadSignature, TimedJSONWebSignatureSerializer
from flask_httpauth import HTTPBasicAuth
from project.security import pwd_context
import os
aut... | mit | 5,093,339,332,674,536,000 | 30.272727 | 115 | 0.639826 | false | 3.822222 | false | false | false |
davidam/python-examples | sparql/surnames.py | 1 | 1463 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright (C) 2019 David Arroyo Menéndez
# Author: David Arroyo Menéndez <davidam@gnu.org>
# Maintainer: David Arroyo Menéndez <davidam@gnu.org>
# This file is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-3.0 | -5,587,727,338,471,887,000 | 31.444444 | 84 | 0.718493 | false | 3.371824 | false | false | false |
Met48/League-of-Legends-DB | loldb/skin.py | 1 | 1036 | class Skin(object):
id = -1
name = ''
portrait_path = ''
splash_path = ''
is_base = False
champion_id = -1
rank = -1
def __init__(self, internal_name):
self.internal_name = internal_name
def __lt__(self, other):
return self.rank < other.rank
def __repr__(self):... | mit | 6,803,336,650,610,015,000 | 24.9 | 79 | 0.612934 | false | 2.951567 | false | false | false |
fcarsten/ai_playground | legacy/battle_toe.py | 1 | 3977 | #
# Copyright 2017 Carsten Friedrich (Carsten.Friedrich@gmail.com). All rights reserved
#
# Based on: http://efavdb.com/battleship/ by Jonathan Landy
#
import tensorflow as tf
import numpy as np
import legacy.ttt_board as ttt
BOARD_SIZE = 9
hidden_units = BOARD_SIZE
output_units = BOARD_SIZE
input_positions = tf.pl... | apache-2.0 | 2,107,856,686,815,271,200 | 30.314961 | 115 | 0.62434 | false | 3.333613 | false | false | false |
samjabrahams/anchorhub | anchorhub/lib/armedswitch.py | 1 | 2249 | """
Class file for the ArmedSwitch class
"""
class ArmedSwitch(object):
"""
ArmedSwitch is a boolean switch that must be explicitly re-armed after
each time it switches, or else it keeps the same state.
"""
# __init__: ArmedSwitch initializer
def __init__(self, switched=False, armed=True):
... | apache-2.0 | -1,738,622,528,995,806,200 | 27.1125 | 80 | 0.573144 | false | 4.435897 | false | false | false |
GNS3/vboxwrapper | setup.py | 1 | 1941 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2013 GNS3 Technologies Inc.
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
... | gpl-2.0 | -8,821,394,577,161,628,000 | 37.82 | 81 | 0.667182 | false | 4.201299 | false | false | false |
nullic/DPLocalizationManager | dpstrings.py | 1 | 6046 | import io
import argparse
import codecs
import os
import re
class DPStringExtractor:
pattern_src_1 = re.compile("(?<=DPLocalizedString\(@\").*?(?=\")")
pattern_src_2 = re.compile(".*?\.autolocalizationKey\s*=\s*@?\"(.*?)\"")
pattern_src_3 = re.compile("\[.*?\ssetAutolocalizationKey:\s*@\"(.*?)\"\]")
pa... | mit | 4,202,086,629,707,676,700 | 36.320988 | 139 | 0.559709 | false | 3.75995 | false | false | false |
Autostew/autostew | autostew_back/event_handlers/notification_winner_finished_race.py | 1 | 1059 | from autostew_back.event_handlers.base_event_handler import BaseEventHandler
from autostew_web_enums.models import EventType, SessionStage
from autostew_web_session.models.event import Event
first_player_finished = [
"",
"",
"Congratulations to {winner_name} for winning this race!",
"See this race resu... | agpl-3.0 | -2,808,436,810,670,851,000 | 35.517241 | 81 | 0.68933 | false | 3.907749 | false | false | false |
UNINETT/nav | setup.py | 1 | 1774 | import os
from glob import glob
from setuptools import setup, find_packages
from distutils.command.build import build
TOP_SRCDIR = os.path.abspath(os.path.dirname(__file__))
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def etc_files():
return [(d, [os.path.join(d, f) ... | gpl-2.0 | -5,029,524,893,007,105,000 | 25.477612 | 77 | 0.598083 | false | 3.695833 | false | false | false |
datascopeanalytics/nhl-streak | Codes/parse_nhl.py | 1 | 5658 | import sys
from bs4 import BeautifulSoup
import glob
import pickle
from pprint import pprint
filenames = glob.glob('../web/data/html_per_year/*')
filenames = sorted(filenames,reverse=True)
# filenames = ['../web/data/html_per_year/NHL_1993_games.html']
nhl_dict = {}
tie_count=0
game_count=0
ppg = []
for fname in f... | mit | 7,000,501,841,323,862,000 | 28.936508 | 73 | 0.486921 | false | 3.875342 | false | false | false |
jortel/gofer | src/gofer/messaging/adapter/connect.py | 1 | 1190 | from time import sleep
from logging import getLogger
from gofer import Thread
from gofer.messaging.adapter.reliability import YEAR
DELAY = 10
MAX_DELAY = 90
RETRIES = YEAR / MAX_DELAY
DELAY_MULTIPLIER = 1.2
log = getLogger(__name__)
def retry(*exception):
def _fn(fn):
def inner(connection):
... | lgpl-2.1 | -4,496,474,766,036,852,000 | 26.674419 | 64 | 0.458824 | false | 4.798387 | false | false | false |
mjg2203/edx-platform-seas | common/lib/xmodule/xmodule/modulestore/__init__.py | 1 | 16932 | """
This module provides an abstraction for working with XModuleDescriptors
that are stored in a database an accessible using their Location as an identifier
"""
import logging
import re
from collections import namedtuple
from abc import ABCMeta, abstractmethod
from .exceptions import InvalidLocationError, Insuffic... | agpl-3.0 | 5,191,680,666,560,372,000 | 31.87767 | 121 | 0.613277 | false | 4.611111 | false | false | false |
flightwatching/wilco-api | python/sampleCsvToWilco.py | 1 | 1329 | import sys, getopt
import io
import datetime
import requests
import json
apikey = sys.argv[1]
eventId = 9846
def pushToWilco(sample):
sample.pop('id', None)
sample.pop('paramId', None)
sample.pop('minScale', None)
sample.pop('maxScale', None)
sample.pop('minOK', None)
sample.pop('maxOK' , Non... | apache-2.0 | 1,933,878,786,630,401,000 | 29.204545 | 128 | 0.65237 | false | 2.895425 | false | false | false |
brandon-rhodes/publicanus | publican/frontend/documents.py | 1 | 2015 | """Views that know how to generate non-HTML documents.
To prevent confusion, we keep special views like this separate from the
template-driven bread-and-butter views over in views.py.
"""
import os
from decimal import Decimal
from django.http import Http404, HttpResponse
from pyPdf import PdfFileWriter, PdfFileReader... | mit | -8,005,846,556,782,075,000 | 29.530303 | 78 | 0.648635 | false | 3.637184 | false | false | false |
Curious72/sympy | sympy/solvers/ode.py | 2 | 331427 | r"""
This module contains :py:meth:`~sympy.solvers.ode.dsolve` and different helper
functions that it uses.
:py:meth:`~sympy.solvers.ode.dsolve` solves ordinary differential equations.
See the docstring on the various functions for their uses. Note that partial
differential equations support is in ``pde.py``. Note t... | bsd-3-clause | 3,555,591,517,086,862,300 | 38.834976 | 279 | 0.530753 | false | 3.062134 | false | false | false |
magul/pywikibot-core | scripts/casechecker.py | 1 | 30973 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""Bot to find all pages on the wiki with mixed latin and cyrilic alphabets."""
#
# (C) Pywikibot team, 2006-2017
#
# Distributed under the terms of the MIT license.
#
from __future__ import absolute_import, unicode_literals
import codecs
import itertools
import os
import re
f... | mit | -4,263,445,044,048,832,000 | 38.451985 | 86 | 0.471862 | false | 4.388549 | false | false | false |
1905410/Misago | misago/markup/pipeline.py | 1 | 1055 | from importlib import import_module
from django.conf import settings
from django.utils import six
from bs4 import BeautifulSoup
class MarkupPipeline(object):
"""
Small framework for extending parser
"""
def extend_markdown(self, md):
for extension in settings.MISAGO_MARKUP_EXTENSIONS:
... | gpl-2.0 | -4,104,574,123,998,761,000 | 30.969697 | 63 | 0.633175 | false | 4.22 | false | false | false |
guoxiaoyong/simple-useful | stdlib.py | 1 | 1094 | # You may need to use setuptools.distutils depending on Python distribution.
import distutils
import glob
import os
import pkgutil
import sys
def get_python_library():
# Get list of the loaded source modules on sys.path.
modules = {
module
for _, module, package in list(pkgutil.iter_modules())
if... | cc0-1.0 | 6,357,847,452,291,048,000 | 31.176471 | 78 | 0.698355 | false | 3.634551 | false | false | false |
Whatang/Listen--Learn--Play | src/midiLearnPairedDialog.py | 1 | 1792 | """
Created on 29 Jan 2012
@author: Mike Thomas
"""
from PyQt4.QtGui import QDialog
from ui_midiLearnPaired import Ui_MidiLearnPairedDialog
from midiMessages import MidiControlThread
from controlSet import PairedMidi
class MidiLearnPairedDialog(QDialog, Ui_MidiLearnPairedDialog):
"""
classdocs
"""
... | gpl-3.0 | 2,788,645,504,491,347,500 | 27.444444 | 67 | 0.638951 | false | 3.764706 | false | false | false |
QISKit/qiskit-sdk-py | examples/python/ibmq/using_qiskit_terra_level_2.py | 1 | 3798 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2018.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | apache-2.0 | -6,309,878,272,910,645,000 | 26.521739 | 77 | 0.75961 | false | 3.02148 | false | false | false |
conwetlab/ckanext-oauth2 | ckanext/oauth2/tests/test_plugin.py | 1 | 9248 | # -*- coding: utf-8 -*-
# Copyright (c) 2014 CoNWeT Lab., Universidad Politécnica de Madrid
# Copyright (c) 2018 Future Internet Consulting and Development Solutions S.L.
# This file is part of OAuth2 CKAN Extension.
# OAuth2 CKAN Extension is free software: you can redistribute it and/or modify
# it under the terms... | agpl-3.0 | -5,949,973,789,040,639,000 | 44.107317 | 126 | 0.588515 | false | 4.095217 | true | false | false |
GeoscienceAustralia/PyRate | tests/test_covariance.py | 1 | 10145 | # This Python module is part of the PyRate software package.
#
# Copyright 2020 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
#
# http://www.apache.org/... | apache-2.0 | -2,516,326,680,450,531,300 | 38.321705 | 117 | 0.547659 | false | 2.701012 | true | false | false |
rjschwei/azure-sdk-for-python | azure-mgmt-eventhub/azure/mgmt/eventhub/models/resource_list_keys.py | 1 | 2071 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -4,411,591,858,105,520,600 | 43.06383 | 142 | 0.648479 | false | 4.36 | false | false | false |
ProfessorX/Config | .PyCharm30/system/python_stubs/-1247971765/PyQt4/QtNetwork/QHostInfo.py | 1 | 3066 | # encoding: utf-8
# module PyQt4.QtNetwork
# from /usr/lib/python3/dist-packages/PyQt4/QtNetwork.cpython-34m-x86_64-linux-gnu.so
# by generator 1.135
# no doc
# imports
import PyQt4.QtCore as __PyQt4_QtCore
class QHostInfo(): # skipped bases: <class 'sip.simplewrapper'>
"""
QHostInfo(int id=-1)
QHostInfo... | gpl-2.0 | 8,235,246,424,030,505,000 | 32.692308 | 113 | 0.621331 | false | 3.851759 | false | false | false |
stephanie-wang/ray | rllib/tests/mock_worker.py | 1 | 1674 | import numpy as np
from ray.rllib.evaluation import SampleBatch
from ray.rllib.utils.filter import MeanStdFilter
class _MockWorker:
def __init__(self, sample_count=10):
self._weights = np.array([-10, -10, -10, -10])
self._grad = np.array([1, 1, 1, 1])
self._sample_count = sample_count
... | apache-2.0 | -3,996,345,101,757,121,000 | 32.48 | 78 | 0.603943 | false | 3.687225 | false | false | false |
Feasoron/red-squirrel | red_squirrel_api/settings.py | 1 | 2986 | """
Django settings for red_squirrel_api project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR... | apache-2.0 | 7,430,413,582,235,650,000 | 26.915888 | 74 | 0.672137 | false | 3.546318 | false | false | false |
nikhilponnuru/codeCrumbs | code/create_file.py | 1 | 4006 | #!/usr/bin/env python
#to create a file in codesnippets folder
import pyperclip
import os
import re
import subprocess
def get_extension(file_name):
if file_name.find('.')!=-1:
ext = file_name.split('.')
return (ext[1])
else:
return 'txt'
def cut(str, len1):
return str[len1 + ... | mit | 5,022,439,893,287,783,000 | 25.183007 | 233 | 0.579131 | false | 3.939036 | false | false | false |
oVirt/ovirt-engine-cli | src/ovirtcli/state/dfsastate.py | 1 | 1455 | #
# Copyright (c) 2013 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | 6,227,748,644,943,980,000 | 33.642857 | 74 | 0.659107 | false | 3.76943 | false | false | false |
enanablancaynumeros/OpenWeatherForecast | open_weather_forecast/info_extractor/forecast/get_forecast.py | 1 | 1571 | from datetime import datetime
from open_weather_forecast.info_extractor.get_info import GetInfo
from open_weather_forecast.info_extractor.forecast.forecast_weather_info import Base, ForecastWeather, Temperature
from open_weather_forecast.conf.constants import WEATHER_DATE_FORMAT
class GetForecast(GetInfo):
def ... | mit | 3,966,293,941,133,073,400 | 35.534884 | 140 | 0.629535 | false | 3.776442 | false | false | false |
andersonsilvade/python_C | Python32/web2py/applications/welcome/controllers/default.py | 3 | 2497 | # -*- coding: utf-8 -*-
# this file is released under public domain and you can use without limitations
#########################################################################
## This is a samples controller
## - index is the default action of any application
## - user is required for authentication and authorizatio... | mit | 3,264,892,465,878,544,000 | 32.293333 | 79 | 0.607529 | false | 4.073409 | false | false | false |
MrHalfman/gabbler | core/templatetags/extras.py | 1 | 1530 | from django import template
from django.utils.safestring import mark_safe
from core.models import User
import re
register = template.Library()
@register.filter
def userlink(user):
return mark_safe("<a href='/user/%s'>%s</a>" % (user.username, user.username))
@register.filter
def toArray(object):
return [obj... | gpl-2.0 | -2,104,744,418,143,281,400 | 23.693548 | 100 | 0.647712 | false | 3.06 | false | false | false |
jseabold/statsmodels | statsmodels/regression/mixed_linear_model.py | 4 | 104783 | """
Linear mixed effects models are regression models for dependent data.
They can be used to estimate regression relationships involving both
means and variances.
These models are also known as multilevel linear models, and
hierarchical linear models.
The MixedLM class fits linear mixed effects models to data, and
p... | bsd-3-clause | 7,344,253,325,813,677,000 | 34.423597 | 79 | 0.551483 | false | 3.784009 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.