repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cjbrasher/LipidFinder | LipidFinder/Configuration/LFParametersGUI.py | 1 | 38609 | # Copyright (c) 2019 J. Alvarez-Jarreta and C.J. Brasher
#
# This file is part of the LipidFinder software tool and governed by the
# 'MIT License'. Please see the LICENSE file that should have been
# included as part of this software.
"""Graphical User Interface (GUI) to manage the parameters' collection.
"""
from co... | mit | -4,986,626,818,987,311,000 | 45.34934 | 80 | 0.596623 | false | 4.573984 | false | false | false |
savioabuga/phoenix-template | phoenix/apps/records/views.py | 1 | 5138 | from django.contrib import messages
from django.shortcuts import HttpResponseRedirect
from django.core.urlresolvers import reverse
from smartmin.views import SmartCRUDL, SmartCreateView, SmartReadView, SmartListView
from phoenix.apps.animals.models import Animal
from phoenix.apps.utils.upload.views import UploadView, U... | bsd-3-clause | -1,207,090,966,957,749,500 | 36.510949 | 106 | 0.602374 | false | 3.704398 | false | false | false |
0lidaxiang/WeArt | chapter/view/getChapter.py | 1 | 2117 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import sys
import json
from django.http import JsonResponse
from django.shortcuts import render
from book.models import book
from chapter.models import chapter
def bookChapter(request):
context = {}
# get the book id of user input if it is not null
if 'idBook' no... | bsd-3-clause | 3,381,290,190,217,921,000 | 30.044118 | 108 | 0.639981 | false | 3.789946 | false | false | false |
quasiyoke/RandTalkBot | randtalkbot/stats.py | 1 | 1668 | # RandTalkBot Bot matching you with a random person on Telegram.
# Copyright (C) 2016 quasiyoke
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
import datetime
import json
import logging
from peewee import DateTimeFiel... | agpl-3.0 | 3,084,319,754,593,820,700 | 25.47619 | 74 | 0.615707 | false | 3.641921 | false | false | false |
tedlaz/pyted | misthodosia/m13a/f_newCoWizard.py | 1 | 16787 | # -*- coding: utf-8 -*-
'''
Created on 15 Φεβ 2013
@author: tedlaz
'''
sqlco = u"INSERT INTO m12_co VALUES (1,'{0}','{1}','{2}',{3},'{4}','{5}','{6}','{7}','{8}','{9}','{10}','{11}','{12}','{13}')"
from PyQt4 import QtCore, QtGui,Qt
import utils_db,widgets
import osyk
from utils_qt import fFindFromList... | gpl-3.0 | 6,554,847,959,938,570,000 | 37.832061 | 129 | 0.590009 | false | 2.875459 | false | false | false |
denex/snafucator | Python/pin/pin_generator.py | 1 | 1028 | def _create_pins():
"""
:rtype: Iterable[int]
"""
middle = 5000
for i in range(0, 2 * middle):
if i % 2 == 0:
yield middle - i // 2 - 1
else:
yield middle + i // 2
PINS = tuple(_create_pins())
assert len(PINS) == 10000, "Len = %d" % len(PINS)
assert min(PINS... | gpl-3.0 | 7,676,437,677,112,655,000 | 20.87234 | 74 | 0.571984 | false | 3.005848 | false | false | false |
nodesign/weioMinima | weioLib/weioParser.py | 1 | 10962 | ###
#
# WEIO Web Of Things Platform
# Copyright (C) 2013 Nodesign.net, Uros PETREVSKI, Drasko DRASKOVIC
# All rights reserved
#
# ## ## ######## #### #######
# ## ## ## ## ## ## ##
# ## ## ## ## ## ## ##
# ## ## ## ###### ... | bsd-3-clause | -1,069,625,149,442,586,900 | 29.032877 | 89 | 0.614213 | false | 3.386469 | false | false | false |
wahaha02/myblog | blog/templatetags/highlight.py | 1 | 1181 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from django.template import Library
import re
DEBUG = False
register = Library()
@register.filter
def highlight_format(value):
p_sub = re.compile('__codestart__ (\w+)')
value = p_sub.sub(r'<pre name="code" class="\g<1>">', value)
p_sub = re.compile(r'__codee... | bsd-3-clause | 7,682,443,373,309,620,000 | 28.525 | 95 | 0.515665 | false | 3.473529 | false | false | false |
OmkarPathak/Python-Programs | CompetitiveProgramming/HackerEarth/Algorithms/String/P11_CaesarsCipher.py | 1 | 2255 | # Caesar's Cipher is a very famous encryption technique used in cryptography. It is a type of substitution
# cipher in which each letter in the plaintext is replaced by a letter some fixed number of positions down
# the alphabet. For example, with a shift of 3, D would be replaced by G, E would become H, X would become... | gpl-3.0 | -6,465,062,925,664,911,000 | 30.535211 | 110 | 0.659669 | false | 3.203147 | false | false | false |
lmprice/ansible | lib/ansible/playbook/role/__init__.py | 13 | 18914 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible 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) an... | gpl-3.0 | -2,407,202,554,963,732,500 | 37.837782 | 156 | 0.596437 | false | 4.219991 | false | false | false |
shaih/HElib | utils/tests/diff-threshold.py | 1 | 3144 | #!/usr/bin/env python3
# Copyright (C) 2020 IBM Corp.
# This program is Licensed under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
# Unless required by applic... | apache-2.0 | -4,331,664,892,367,646,000 | 36.428571 | 84 | 0.57729 | false | 3.35539 | false | false | false |
Videonauth/passgen | tool/keyboard_list_generator.py | 1 | 2612 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
############################################################################
#
# keyboard_list_generator.py
#
############################################################################
#
# Author: Videonauth <videonauth@googlemail.com>
# Date: 09.07.2016
# Purpose:
# ... | mit | 7,557,594,228,450,199,000 | 41.688525 | 76 | 0.504224 | false | 3.059929 | false | false | false |
CNR-ISMAR/rectifiedgrid | rectifiedgrid/hillshade.py | 1 | 1108 | from matplotlib.colors import LightSource
# Adapted from https://github.com/jobar8/graphics
def alpha_blend(rgb, intensity, alpha=0.7):
return alpha * rgb + (1 - alpha) * intensity
def get_hs(data,
cmap,
norm=None,
zf=10,
azdeg=315,
altdeg=45,
dx=... | gpl-3.0 | 3,936,537,537,660,941,000 | 28.157895 | 74 | 0.447653 | false | 3.971326 | false | false | false |
HyechurnJang/pygics | sample/simple_database.py | 1 | 1764 | # -*- coding: utf-8 -*-
'''
____ ___ ____________ ___ ___ ____ _________________
/ __ \/ _ | / __/ _/ __/ / _ \/ _ \/ __ \__ / / __/ ___/_ __/
/ /_/ / __ |_\ \_/ /_\ \ / ___/ , _/ /_/ / // / _// /__ / /
\____/_/ |_/___/___/___/ /_/ /_/|_|\____/\___/___/\___/ /_/
Operational Aid Source ... | apache-2.0 | -6,248,814,847,715,503,000 | 34.28 | 131 | 0.521542 | false | 3.005111 | false | false | false |
markvdw/GParML | scg_adapted_local_MapReduce.py | 2 | 8715 | '''
A bunch of support functions used for SCG optimisation. They depend on the
parallel implementation framework, but may change for other optimisers.
'''
import glob
import time
import numpy
from os.path import splitext
from local_MapReduce import load, save
time_acc = {
'embeddings_set_grads' : [],
'embeddi... | bsd-3-clause | -4,492,889,811,067,905,000 | 34.864198 | 109 | 0.618589 | false | 3.226583 | true | false | false |
KarolBedkowski/photomagic | photomagick/filters/bw.py | 1 | 1431 | #!usr/bin/python
# -*- coding: utf-8 -*-
__plugins__ = ('BwLuminosity', 'BwGreen', 'BwOrange', 'BwRed', 'BwYellow',
'BwInfrared')
__version__ = '2011-03-20'
__author__ = 'Karol Będkowski'
__copyright__ = "Copyright (c) Karol Będkowski, 2011"
import ImageOps
from photomagick.common import colors
from photomagick.co... | gpl-2.0 | -3,300,862,538,246,330,000 | 20.651515 | 74 | 0.664801 | false | 2.593466 | false | false | false |
ReedAnders/deepmap | deepmap/nn.py | 1 | 5374 | # Copyright (C) 2016 Reed Anderson.
# From: https://github.com/ReedAnders/deepmap
# License: MIT BY https://opensource.org/licenses/MIT
import pickle, os, binascii
from collections import deque
import numpy as np
from math import exp
from random import random
class NodeMap:
def __init__(self, input_node_populatio... | mit | -437,573,294,550,352,260 | 32.798742 | 103 | 0.600298 | false | 3.601877 | false | false | false |
aaronst/macholibre | macholibre/dictionary.py | 1 | 12913 | #!/usr/bin/env python
"""
Copyright 2016 Aaron Stephens <aaronjst93@gmail.com>
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 a... | apache-2.0 | 3,063,381,205,710,470,000 | 22.912963 | 79 | 0.521567 | false | 2.603427 | false | false | false |
Multiscale-Genomics/mg-process-fastq | tadbit_model_wrapper.py | 1 | 10041 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. See the NOTICE file distributed with this work for additional information
regarding copyright ownership.
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 cop... | apache-2.0 | 7,750,510,198,224,055,000 | 35.915441 | 100 | 0.591077 | false | 4.224232 | true | false | false |
sjdv1982/seamless | seamless/communion_encode.py | 1 | 3566 | """
Encoding/decoding of communion messages
message must be a dict containing:
"mode": "request" or "response"
"id": 32-bit identifier, should increase
"content": None, bool, bytes, str, int, float, or tuple of str/int/float/bool
remaining keys: anything JSON-serializable
encoded message is binary, and... | mit | -6,822,255,612,640,416,000 | 32.327103 | 96 | 0.576837 | false | 3.442085 | false | false | false |
wmaciel/van-crime | src/run_demo.py | 1 | 4046 | # coding=utf-8
__author__ = 'walthermaciel'
from geopy.geocoders import DataBC
from geopy.exc import GeopyError
from time import sleep
import sys
from ssl import SSLError
from create_feature_vector import create_vector
import os
import pandas as pd
from sklearn.externals import joblib
from sklearn.ensemble import Ran... | mit | 1,701,064,191,257,659,000 | 27.9 | 79 | 0.555116 | false | 3.440476 | false | false | false |
ESEGroup/Paraguai | domain/usuario/servico_crud_usuario.py | 1 | 3946 | #-*- coding: utf-8 -*-
from .usuario import Usuario
from .nivel_acesso import *
from .senha_criptografada import *
from domain.excecoes import *
from domain.email import EmailUsuarioCadastrado, EmailUsuarioAlterado, EmailUsuarioRemovido
class ServicoCRUDUsuario():
"""Essa classe modela um serviço CRUD para Usuário... | apache-2.0 | 3,734,639,932,427,047,000 | 30.894309 | 91 | 0.653581 | false | 2.910237 | false | false | false |
lotharwissler/bioinformatics | python/gff/droso-chromosome-reconstruction.py | 1 | 2939 | #!/usr/bin/python
import os, sys # low level handling, such as command line stuff
import string # string methods available
import getopt # comand line argument handling
from collections import defaultdict
from low import * # custom functions, written by myself
# ========================================... | mit | 1,956,595,199,548,383,200 | 33.988095 | 96 | 0.50051 | false | 4.180654 | false | false | false |
kawamon/hue | apps/hbase/src/hbase/hbase_site.py | 2 | 3316 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 4,130,980,423,032,617,500 | 28.607143 | 102 | 0.721653 | false | 3.090401 | false | false | false |
windelbouwman/ppci-mirror | ppci/binutils/disasm.py | 1 | 1210 | """ Contains disassembler stuff. """
from ..arch.data_instructions import DByte
class Disassembler:
""" Base disassembler for some architecture """
def __init__(self, arch):
self.arch = arch
for instruction in arch.isa.instructions:
# print(instruction, instruction.patterns)
... | bsd-2-clause | -6,070,502,765,213,653,000 | 29.25 | 62 | 0.52562 | false | 4.384058 | false | false | false |
Domatix/stock-logistics-workflow | stock_split_picking/models/stock_picking.py | 2 | 3356 | # Copyright 2013-2015 Camptocamp SA - Nicolas Bessi
# Copyright 2018 Camptocamp SA - Julien Coux
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, models
from odoo.exceptions import UserError
from odoo.tools.float_utils import float_compare
class StockPicking(models.Model):
... | agpl-3.0 | 3,325,539,118,000,248,000 | 40.95 | 76 | 0.470203 | false | 4.801144 | false | false | false |
tjctw/PythonNote | thinkstat/install_test.py | 2 | 1432 | """This file contains code used in "Think Stats",
by Allen B. Downey, available from greenteapress.com
Copyright 2010 Allen B. Downey
License: GNU GPLv3 http://www.gnu.org/licenses/gpl.html
"""
import math
import matplotlib.pyplot as pyplot
import myplot
import Pmf
def NormalPdf(x):
"""Computes the PDF of x i... | cc0-1.0 | -2,332,128,312,569,563,000 | 23.689655 | 77 | 0.587291 | false | 3.140351 | false | false | false |
LiqunHu/MVPN | testing/testUser.py | 1 | 2284 | # -*- coding: utf-8 -*-
"""
Created on Thu May 12 16:25:02 2016
@author: huliqun
"""
import requests
import json
import uuid
import base64
_SERVER_HOST = '127.0.0.1'
_SERVER_PORT = 8000
_SERVER_BASE_URL = 'http://{0}:{1}/api/users'.format(_SERVER_HOST, _SERVER_PORT)
headers = {'content-type':'applic... | gpl-3.0 | -2,363,591,250,241,619,500 | 31.101449 | 136 | 0.662434 | false | 2.646582 | false | false | false |
End of preview. Expand in Data Studio
- Downloads last month
- 460