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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
goofwear/raspberry_pwn | src/pentest/voiper/win_fuzzer_gui.py | 8 | 1139 | #!/usr/bin/env python
#Boa:App:BoaApp
'''
This file is part of VoIPER.
VoIPER 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.
VoIPER is di... | gpl-3.0 | -265,676,488,160,268,130 | 26.119048 | 78 | 0.721686 | false | 3.559375 | false | false | false |
rspavel/spack | var/spack/repos/builtin/packages/groff/package.py | 5 | 1543 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Groff(AutotoolsPackage, GNUMirrorPackage):
"""Groff (GNU troff) is a typesetting system th... | lgpl-2.1 | 4,932,964,564,052,529,000 | 35.738095 | 96 | 0.692158 | false | 3.391209 | false | false | false |
QueroSerTech/Garibaldo | garibaldo-videos.py | 1 | 2737 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib
import urllib2
from bs4 import BeautifulSoup
from pymongo import MongoClient
import urlparse
import requests
import json
# Registra um Log no MongoDB
def mongolog(titulo, canal ,link, categoria):
client = MongoClient("mongodb://public:public@ds113660.mla... | gpl-3.0 | -8,048,498,934,342,614,000 | 29.422222 | 107 | 0.586774 | false | 3.573107 | false | false | false |
madedotcom/photon-pump | test/data/read_stream_events_conversation.py | 1 | 1469 | import json
from photonpump import messages as msg
from photonpump import messages_pb2 as proto
def read_stream_events_failure(conversation_id, result):
payload = proto.ReadStreamEventsCompleted()
payload.result = result
payload.last_event_number = 1
payload.next_event_number = 1
payload.last_com... | mit | -8,446,926,815,911,469,000 | 31.644444 | 87 | 0.688223 | false | 3.757033 | false | false | false |
google-research/google-research | mico/atari/metric_rainbow_agent.py | 1 | 9547 | # coding=utf-8
# Copyright 2021 The Google Research 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 applicab... | apache-2.0 | -2,766,447,711,842,826,000 | 40.872807 | 80 | 0.649838 | false | 3.69609 | false | false | false |
BackupTheBerlios/espressopp | src/FixedSingleList.py | 1 | 2511 | # Copyright (C) 2012,2013
# Max Planck Institute for Polymer Research
# Copyright (C) 2008,2009,2010,2011
# Max-Planck-Institute for Polymer Research & Fraunhofer SCAI
#
# This file is part of ESPResSo++.
#
# ESPResSo++ is free software: you can redistribute it and/or modify
# it under the terms of t... | gpl-3.0 | -976,496,327,871,296,400 | 31.623377 | 82 | 0.639188 | false | 3.821918 | false | false | false |
ericmjl/bokeh | tests/unit/bokeh/core/test_templates.py | 1 | 2997 | #-----------------------------------------------------------------------------
# Copyright (c) 2012 - 2020, Anaconda, Inc., and Bokeh Contributors.
# All rights reserved.
#
# The full license is in the file LICENSE.txt, distributed with this software.
#-------------------------------------------------------------------... | bsd-3-clause | 7,648,238,422,689,415,000 | 40.054795 | 91 | 0.372039 | false | 5.719466 | true | false | false |
firedrakeproject/dcore | tests/kernel_tests/test_weighting_kernel.py | 1 | 2939 | """
A test of the AverageWeightings kernel used for the Averager.
"""
from firedrake import (IntervalMesh, Function, RectangleMesh,
VectorFunctionSpace)
from gusto import kernels
import pytest
@pytest.fixture
def mesh(geometry):
L = 3.0
n = 3
if geometry == "1D":
m = Int... | mit | -1,475,313,976,253,508,600 | 29.298969 | 98 | 0.502212 | false | 3.42142 | false | false | false |
jorge-marques/shoop | shoop/core/templatetags/shoop_common.py | 1 | 3457 | # -*- coding: utf-8 -*-
# This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
from datetime import date
from json... | agpl-3.0 | -11,787,785,733,096,864 | 31.009259 | 86 | 0.692219 | false | 3.888639 | false | false | false |
chris-wood/ndnSIM-accounting | latency.py | 2 | 2485 | import csv
from pylab import *
rc('text', usetex=True)
rc('font', family='serif')
# This is 20 seconds
xaxis_mul = 20;
step = 1000000000.0 * xaxis_mul
file_names = ["dfn-pint-generation-overhead-latency-Cr80-PINT",
"dfn-pint-generation-overhead-latency-Cr80-NOPINT-NOCACHE",
"dfn-pint-gene... | gpl-3.0 | 5,819,395,112,365,602,000 | 32.581081 | 76 | 0.511469 | false | 3.083127 | false | false | false |
Machyne/pal | pal/grammars/text_to_int.py | 1 | 2178 | #!/usr/bin/env python
#
# Taken from:
# http://stackoverflow.com/questions/493174/is-there-a-way-to-convert-number-
# words-to-integers-python
import re
numwords = {}
def text_to_int(textnum):
if not numwords:
units = ['zero', 'one', 'two', 'three', 'four', 'fiv... | bsd-3-clause | 8,935,993,387,650,767,000 | 32 | 77 | 0.52112 | false | 3.397816 | false | false | false |
mlperf/training_results_v0.7 | Google/benchmarks/bert/implementations/bert-cloud-TF2.0-gpu-v100-8/modeling/losses/weighted_sparse_categorical_crossentropy.py | 2 | 4287 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -8,281,448,864,176,273,000 | 39.065421 | 80 | 0.709587 | false | 4.036723 | false | false | false |
inventree/InvenTree | InvenTree/InvenTree/status_codes.py | 2 | 7588 | from django.utils.translation import ugettext_lazy as _
class StatusCode:
"""
Base class for representing a set of StatusCodes.
This is used to map a set of integer values to text.
"""
colors = {}
@classmethod
def render(cls, key, large=False):
"""
Render the value as a H... | mit | 1,298,842,470,661,785,900 | 21.993939 | 80 | 0.560095 | false | 3.943867 | false | false | false |
ngageoint/scale | scale/job/management/commands/scale_clock.py | 1 | 3480 | """Defines the command line method for running the Scale clock process"""
from __future__ import unicode_literals
import logging
import math
import signal
import sys
import time
from django.core.management.base import BaseCommand
from django.utils.timezone import now
import job.clock as clock
from job.models import ... | apache-2.0 | -6,989,654,369,077,349,000 | 33.117647 | 117 | 0.601437 | false | 4.525358 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-2.5/Lib/idlelib/ScriptBinding.py | 1 | 7789 | """Extension to execute code outside the Python shell window.
This adds the following commands:
- Check module does a full syntax check of the current module.
It also runs the tabnanny to catch any inconsistent tabs.
- Run module executes the module's code in the __main__ namespace. The window
must have been sa... | mit | -37,865,689,102,359,510 | 36.090476 | 78 | 0.569136 | false | 4.258611 | false | false | false |
str4d/i2p-tools | i2pcontrol/i2pcontrol/pyjsonrpc/rpcresponse.py | 1 | 3850 | #!/usr/bin/env python
# coding: utf-8
import rpcjson
from bunch import Bunch
from rpcerror import InternalError
class Response(Bunch):
"""
Represents a JSON-RPC-response.
"""
class Error(Bunch):
def __init__(self, code, message, data):
"""
:param code: Error code
... | mit | 301,516,889,658,068,400 | 23.522293 | 75 | 0.488312 | false | 4.518779 | false | false | false |
jimmygkr/openviewer | update-svn-properties.py | 1 | 4631 | #!/usr/bin/env python
import os, os.path, popen2, re, string, sys
def textfile(file):
return {
"svn:eol-style" : "native"
}
def script(file):
return {
"svn:eol-style" : "native",
"svn:executable" : "*"
}
def executable(file):
return {
"svn:executa... | bsd-3-clause | -1,780,245,394,392,076,500 | 22.897849 | 96 | 0.51911 | false | 3.461136 | false | false | false |
Nichol4s/PyHead | tests/parser.py | 1 | 1095 | import re
import socket
from message import Request, Response, Message
from unreader import SocketUnreader, IterUnreader
class Parser(Message):
def __init__(self, mesg_class, source):
self.mesg_class = mesg_class
if isinstance(source, socket.socket):
self.unreader = SocketUnreader(sour... | mit | -3,293,412,175,641,263,000 | 26.375 | 71 | 0.595434 | false | 3.99635 | false | false | false |
blaze225/zulip | tools/lib/capitalization.py | 1 | 5038 | from __future__ import absolute_import
from typing import List, Tuple, Set, Pattern, Match
import re
from bs4 import BeautifulSoup
# The phrases in this list will be ignored.
#
# Keep the sublists lexicographically sorted.
IGNORED_PHRASES = [re.compile(regex) for regex in [
# Proper nouns and acronyms
r"API"... | apache-2.0 | -4,600,346,409,059,161,600 | 27.625 | 89 | 0.630409 | false | 3.648081 | false | false | false |
odicraig/kodi2odi | addons/plugin.video.salts/scrapers/rlshd_scraper.py | 1 | 3957 | """
SALTS XBMC Addon
Copyright (C) 2014 tknorris
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.
T... | gpl-3.0 | -7,352,630,036,702,318,000 | 42.966667 | 191 | 0.619156 | false | 3.65374 | false | false | false |
qedsoftware/commcare-hq | hqscripts/generic_queue.py | 1 | 5207 | from datetime import datetime
from functools import wraps
from time import sleep
from django import db
from django.core.management.base import BaseCommand
from django.db.utils import InterfaceError as DjangoInterfaceError
from psycopg2._psycopg import InterfaceError as Psycopg2InterfaceError
from dimagi.utils.couch i... | bsd-3-clause | -4,131,334,203,771,176,000 | 38.748092 | 95 | 0.63453 | false | 4.420204 | false | false | false |
MalwareSoup/MitreAttack | MitreAttack/Attack.py | 1 | 7019 | import requests
import json
from . import Technique
from . import Tactic
from . import Group
from . import Software
class Attack:
baseURL = "https://attack.mitre.org/api.php?action=ask&format=json&query="
allTechniques = {}
allTactics = {}
allGroups = {}
allSoftware = {}
def __init__(self):
self.getTechnique... | mit | 5,783,594,851,260,443,000 | 32.583732 | 94 | 0.68571 | false | 3.087989 | false | false | false |
jeremiahyan/odoo | addons/iap/tools/iap_tools.py | 1 | 9259 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import contextlib
import logging
import json
import requests
import uuid
from unittest.mock import patch
from odoo import exceptions, _
from odoo.tests.common import BaseCase
from odoo.tools import pycompat
_logger = l... | gpl-3.0 | 5,163,564,297,566,772,000 | 43.301435 | 161 | 0.594773 | false | 3.204915 | false | false | false |
jameskeaveney/ElecSus | elecsus/libs/RRFittingRoutine.py | 1 | 6567 | # Copyright 2014-2019 M. A. Zentile, J. Keaveney, L. Weller, D. Whiting,
# C. S. Adams and I. G. Hughes.
# 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/L... | apache-2.0 | 6,145,163,712,962,864,000 | 31.509901 | 140 | 0.690574 | false | 2.925167 | false | false | false |
Alexander-M-Waldman/local_currency_site | geodjango/members/migrations/0001_initial.py | 1 | 1748 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-01 21:00
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):
initial = True
dependencies = [
migration... | gpl-3.0 | -291,702,699,419,940,300 | 46.243243 | 178 | 0.594394 | false | 4.103286 | false | false | false |
AhmedDjoudi/Telegram.Group_logger | logger.py | 1 | 23004 | #----------------------------------------------#
# LogTBot | Jahus | 2015-09-03 #
#----------------------------------------------#----------------
# Forked from Dj4x 3.21.20
# Change log
# * 2015-09-03 :
# (1.0.0) - First code
# * 2015-09-04 :
# (1.0.1) - Showing send... | mit | 2,938,280,385,131,910,000 | 42.811429 | 227 | 0.627739 | false | 2.912867 | true | false | false |
cschenck/blender_sim | fluid_sim_deps/blender-2.69/2.69/scripts/addons/io_scene_x3d/__init__.py | 1 | 7447 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | 8,545,748,039,149,122,000 | 32.097778 | 87 | 0.489862 | false | 4.164989 | false | false | false |
HelloLily/hellolily | lily/messaging/email/migrations/0034_auto_20170929_1222.py | 1 | 1225 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2017-09-29 12:22
from __future__ import unicode_literals
from django.db import migrations
def integer_to_charfield(apps, schema_editor):
EmailOutboxMessage = apps.get_model('email', 'EmailOutboxMessage')
for email_outbox_message in EmailOutboxMessage.o... | agpl-3.0 | -8,424,531,384,340,083,000 | 39.833333 | 104 | 0.72898 | false | 3.689759 | false | false | false |
djaodjin/djaodjin-pages | pages/urls/api/assets.py | 1 | 2062 | # Copyright (c) 2020, DjaoDjin inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and t... | bsd-2-clause | 7,299,626,666,473,355,000 | 45.863636 | 77 | 0.752182 | false | 4.165657 | false | false | false |
xificurk/keelsbot | libs/sleekxmpp/stanza/iq.py | 2 | 8371 | """
SleekXMPP: The Sleek XMPP Library
Copyright (C) 2010 Nathanael C. Fritz
This file is part of SleekXMPP.
See the file LICENSE for copying permission.
"""
from sleekxmpp.stanza import Error
from sleekxmpp.stanza.rootstanza import RootStanza
from sleekxmpp.xmlstream import StanzaBase, ET
from sleekx... | gpl-3.0 | -100,229,171,829,734,030 | 34.621277 | 78 | 0.582248 | false | 4.346314 | false | false | false |
FirefoxMetzger/naoProject | src/core/Question.py | 1 | 2611 | import random
import logging
from naoqi import ALProxy
from Answer import Answer
import utility as util
class Question:
def __init__(self,path):
logging.basicConfig()
self.logger = logging.getLogger(__name__)
self.logger.info("Logging enabled for: " + __name__)
self.memory = ALPro... | gpl-2.0 | 5,107,103,839,752,820,000 | 33.355263 | 105 | 0.594408 | false | 4.073323 | false | false | false |
airypi/airypi-rpi | setup.py | 1 | 1196 | import os
from setuptools import setup, find_packages
def read(*paths):
"""Build a file path from *paths* and return the contents."""
with open(os.path.join(*paths), 'r') as f:
return f.read()
setup(
name = "airypi-rpi",
version = "0.0.1",
description = "The airypi client for Raspberry Pi"... | gpl-3.0 | -5,086,182,647,757,635,000 | 37.612903 | 143 | 0.60786 | false | 3.359551 | false | false | false |
kevinhikali/ml_kevin | tf/tf_softmax_regression.py | 1 | 1077 | # -*- coding: utf-8 -*-
"""
@author: kevinhikali
@email: hmingwei@gmail.com
"""
import tensorflow as tf
import numpy as np
xy = np.loadtxt('../res/data-softmax.csv',
delimiter=',', dtype=np.float32)
x_data = xy[:, 0:-3]
y_data = xy[:, 4:7]
# Placeholder
X = tf.placeholder("float", [None, 4])
Y = tf.pl... | gpl-3.0 | -4,884,340,009,572,404,000 | 26.615385 | 75 | 0.632312 | false | 2.768638 | false | false | false |
Zemanta/py-secretcrypt | secretcrypt/tests/test_local.py | 1 | 1434 | import base64
import mock
import os
import shutil
import tempfile
import six
from six.moves import reload_module
import unittest
from secretcrypt import local
class TestLocal(unittest.TestCase):
def setUp(self):
reload_module(local)
self.tmpdir = tempfile.mkdtemp()
self.key_file = os.pat... | apache-2.0 | -5,925,381,960,473,704,000 | 30.866667 | 80 | 0.647141 | false | 3.621212 | true | false | false |
us-ignite/us_ignite | us_ignite/hubs/views.py | 1 | 7414 | from django.db.models import Q
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.template.response import TemplateResponse
from django.shortcuts import get_object_or_404, redirect
from django.views.decorators.http import require_htt... | bsd-3-clause | -2,707,514,144,646,260,000 | 36.07 | 80 | 0.655786 | false | 3.707 | false | false | false |
bitesofcode/projexui | projexui/widgets/xorbtreewidget/xorbgroupitem.py | 2 | 4638 | """ Defines the grouping class for the orb tree widget. """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2011, Projex Software'
__license__ = 'LGPL'
# maintenance information
__ma... | lgpl-3.0 | 6,542,886,395,726,051,000 | 30.305556 | 78 | 0.537085 | false | 4.619522 | false | false | false |
snim2mirror/openihm | src/openihm/data/setup_foodrequirement_startupvalues.py | 3 | 2960 | #!/usr/bin/env python
"""
This file is part of open-ihm.
open-ihm 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.
open-ihm is di... | lgpl-3.0 | -1,405,736,206,406,508,500 | 36.947368 | 103 | 0.515203 | false | 4.111111 | false | false | false |
iWoz/doudizhu_solver | doudizhu_solver.py | 1 | 7248 | # -*- coding: UTF-8 -*-
# Author: Tim Wu
# Author: Carl King
# 牌型枚举
class COMB_TYPE:
PASS, SINGLE, PAIR, TRIPLE, TRIPLE_ONE, TRIPLE_TWO, FOURTH_TWO_ONES, FOURTH_TWO_PAIRS, STRIGHT, BOMB = range(10)
# 3-14 分别代表 3-10, J, Q, K, A
# 16, 18, 19 分别代表 2, little_joker, big_joker
# 将 2 与其他牌分开是为了方便计算顺子
# 定义 HAND_PASS 为过牌... | mit | 5,429,184,036,144,173,000 | 27.721461 | 129 | 0.547854 | false | 2.27816 | false | false | false |
Woile/commitizen | commitizen/cli.py | 1 | 11294 | import argparse
import logging
import sys
from functools import partial
import argcomplete
from decli import cli
from commitizen import commands, config
from commitizen.exceptions import CommitizenException, ExpectedExit, NoCommandFoundError
logger = logging.getLogger(__name__)
data = {
"prog": "cz",
"descri... | mit | 602,485,164,971,633,900 | 36.029508 | 91 | 0.37365 | false | 5.360228 | false | false | false |
PRECISE/ROSLab | resources/mechanics_lib/FourBar.py | 1 | 1381 | from api.component import Component
from api.shapes import Rectangle
from api.edge import Fold
class FourBar(Component):
def defParameters(self):
self.newParameter("flexlengthx")
self.newParameter("flexlengthy")
self.newParameter("flexwidth", 5)
self.newParameter("depth")
def a... | apache-2.0 | 5,155,377,260,055,110,000 | 29.688889 | 61 | 0.611875 | false | 3.062084 | false | false | false |
HaManhDong/pgscm | pgscm/admin/views.py | 2 | 13579 | from flask import render_template, current_app, request, \
flash, redirect, url_for, jsonify
from flask_security import roles_accepted, current_user, \
utils as security_utils
import uuid
from . import admin
from .forms import UserForm
from .forms import data_required, match_pass
from pgscm import sqla, user_... | apache-2.0 | -4,071,855,704,311,871,500 | 45.503425 | 79 | 0.519405 | false | 4.188464 | false | false | false |
celiao/django-rest-authemail | example_project/example_project/forms.py | 1 | 1748 | from django import forms
from django.forms.forms import NON_FIELD_ERRORS
from django.utils.translation import ugettext_lazy as _
class AddErrorMixin(object):
def add_error(self, field, msg):
field = field or NON_FIELD_ERRORS
if field in self._errors:
self._errors[field].append(msg)
... | gpl-3.0 | -8,255,657,159,712,654,000 | 29.137931 | 63 | 0.709382 | false | 3.8 | false | false | false |
OSSOS/MOP | src/ossos/utils/improve_filename_uniqueness.py | 1 | 1702 |
'''Rename the provisional designation to add information on which field
the object came from, due to a namespace collision at one point on len(2) designations.
'''
import os
from ossos import mpc
field_ids = {
'15BD+1+1':'E',
'15BD+1+0':'F',
'15BD+1-1':'G',
'15BD+1-2':'H',
'15BD+0+1':'J',
... | gpl-3.0 | 5,653,548,679,686,527,000 | 36.822222 | 113 | 0.568743 | false | 3.397206 | false | false | false |
GeoNode/geonode | geonode/people/migrations/0032_set_contributors_group.py | 3 | 1552 | # Assign the contributors group to users according to #7364
from django.contrib.auth import get_user_model
from django.contrib.auth.models import Group, Permission
from django.contrib.contenttypes.models import ContentType
from django.db import migrations
from django.db.migrations.operations import RunPython
def for... | gpl-3.0 | -4,616,498,912,103,880,000 | 30.673469 | 68 | 0.671392 | false | 3.851117 | false | false | false |
attm2x/m2x-python | m2x/tests/common.py | 1 | 1556 | from m2x.client import M2XClient
from m2x.api import APIBase, Response
class DummyResponse(Response):
def __init__(self, response):
super(DummyResponse, self).__init__(
response=response,
raw=response,
status=response.status_code,
headers=response.headers,
... | mit | 3,081,387,237,010,824,000 | 26.298246 | 72 | 0.613753 | false | 3.959288 | false | false | false |
geertj/draco2 | draco2/form/form.py | 1 | 2567 | # vi: ts=8 sts=4 sw=4 et
#
# form.py: base class for Draco forms
#
# This file is part of Draco2. Draco2 is free software and is made available
# under the MIT license. Consult the file "LICENSE" that is distributed
# together with this file for the exact licensing terms.
#
# Draco2 is copyright (c) 1999-2007 by the Dr... | mit | 3,816,079,969,276,028,400 | 27.842697 | 76 | 0.601091 | false | 4.036164 | false | false | false |
pierxco/djel | djel/admin/widgets.py | 1 | 1681 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.contrib.admin.widgets import ForeignKeyRawIdWidget
from django.contrib.admin.widgets import ManyToManyRawIdWidget
from django.core.urlresolvers import reverse
from django.utils.encoding import smart_unicode
from django.utils.html import escape
... | mit | -5,282,886,388,512,974,000 | 41.025 | 96 | 0.579417 | false | 3.794582 | false | false | false |
DiCarloLab-Delft/PycQED_py3 | pycqed/instrument_drivers/physical_instruments/RIGOL_DS4043.py | 1 | 19510 | # Written April 2018:
# Thijs Stavenga <thijsstavenga@msn.com>
#
# 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.
#
# T... | mit | 5,828,160,232,597,643,000 | 31.791597 | 108 | 0.532086 | false | 3.467828 | true | false | false |
talbrecht/pism_pik | site-packages/siple/gradient/nonlinear.py | 2 | 22461 | ############################################################################
#
# This file is a part of siple.
#
# Copyright 2010, 2014 David Maxwell
#
# siple 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 Foundati... | gpl-3.0 | -2,818,206,963,908,630,000 | 35.05297 | 137 | 0.651485 | false | 3.756648 | false | false | false |
jiahaoliang/group-based-policy | gbpservice/nfp/configurator/lib/schema_validator.py | 1 | 3954 | # 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, software
# d... | apache-2.0 | -4,168,622,346,182,930,400 | 37.38835 | 79 | 0.551088 | false | 4.930175 | true | false | false |
httpPrincess/instance-killer | run.py | 1 | 3364 | #!/usr/bin/env python
import logging
import threading
from time import sleep, time
from datetime import timedelta
from queue_managers import get_manager
from stores import instance_store
MAX_AGE = timedelta(hours=10)
MAX_IDLE = timedelta(minutes=10)
def get_obsolete_instances(field='created', older_than=None):
... | bsd-3-clause | -5,596,465,222,239,403,000 | 31.660194 | 78 | 0.64239 | false | 3.676503 | false | false | false |
Alenwang1/Python_Practice | Practice_02/qidian_crawler.py | 1 | 3253 | import re
import requests
from bs4 import BeautifulSoup
from collections import namedtuple
from pandas import DataFrame
import time
paramters = {
'kw':'玄幻',
'page':2
}
url = 'http://se.qidian.com/'
request = requests.get(url,params=paramters)
html_cont = request.text
bsobj = BeautifulSoup(html_cont,"html5lib"... | gpl-3.0 | -1,459,505,234,405,358,000 | 29.815534 | 135 | 0.605421 | false | 2.903019 | false | false | false |
timClicks/experior | Experior.Activity/tests/test_rpcserver.py | 1 | 3701 | #!/usr/bin/env python
# encoding: utf-8
"""
test_rpcserver.py
This file is part of sugarbot.
sugarbot 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 late... | gpl-3.0 | -4,868,617,395,937,886,000 | 23.509934 | 73 | 0.706025 | false | 3.349321 | true | false | false |
nexdatas/clients | nxssardanaclient/SardanaWriterDlg.py | 1 | 3108 | #!/usr/bin/env python
# This file is part of nexdatas - Tango Server for NeXus data writer
#
# Copyright (C) 2012-2013 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 | -3,935,636,519,802,684,000 | 33.533333 | 86 | 0.666345 | false | 3.924242 | false | false | false |
strfry/OpenNFB | blocks/server.py | 1 | 3816 |
from gnuradio import gr
import numpy
import threading
import time
import socket
import struct
main_socket = None
client_socket = None
CMD_ADD_CHANNEL = 1
CMD_CHANNEL_DATA = 5
CMD_START = 6
CMD_STOP = 8
class BEServer(gr.basic_block):
def __init__(self):
super(BEServer, self).__init__('BEServer', [num... | gpl-3.0 | -3,352,371,799,603,521,000 | 23.305732 | 77 | 0.545073 | false | 3.850656 | false | false | false |
Amechi101/indieapp | _backend_api/models.py | 1 | 7123 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.urlresolvers import reverse
from django.db import models
from cloudinary.models import CloudinaryField
from django.utils.translation import ugettext_lazy as _
from decimal import Decimal
from _backend_api.utils.fields import CurrencyField... | mit | -1,080,210,834,931,610,400 | 30.799107 | 112 | 0.653376 | false | 3.933186 | false | false | false |
kawamon/hue | desktop/core/ext-py/django_opentracing-1.1.0/django_opentracing/middleware.py | 2 | 3646 | from django.conf import settings
from django.utils.module_loading import import_string
from .tracing import DjangoTracing
from .tracing import initialize_global_tracer
try:
# Django >= 1.10
from django.utils.deprecation import MiddlewareMixin
except ImportError:
# Not required for Django <= 1.9, see:
... | apache-2.0 | -8,366,108,895,908,961,000 | 39.966292 | 111 | 0.633297 | false | 4.24447 | false | false | false |
Ban3/Limnoria | sandbox/check_trans.py | 6 | 2339 | #!/usr/bin/env python
import os
import sys
import glob
import operator
import subprocess
from supybot.i18n import parse
import supybot.ansi as ansi
def main():
directory = sys.argv[1]
if directory == '--core':
checkCore()
else:
for plugin in os.listdir(directory):
if plugin[0]... | bsd-3-clause | 5,086,488,026,006,871,000 | 28.987179 | 132 | 0.587003 | false | 3.512012 | false | false | false |
intel-analytics/analytics-zoo | pyzoo/zoo/orca/learn/pytorch/training_operator.py | 1 | 17196 | #
# Copyright 2018 Analytics Zoo 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... | apache-2.0 | 8,888,249,049,379,201,000 | 36.140389 | 95 | 0.596301 | false | 4.592949 | true | false | false |
hosseinoliabak/learningpy | 12_01_socket_get.py | 1 | 2481 | '''
Exploring the HyperText Transport Protocol
You are to retrieve the following document using the HTTP protocol in a way that
you can examine the HTTP Response headers.
http://data.pr4e.org/intro-short.txt
There are three ways that you might retrieve this web page and look at the
response headers:
1) Preferred: M... | gpl-3.0 | -1,878,858,952,013,048,000 | 44.109091 | 80 | 0.496574 | false | 4.183811 | false | false | false |
OCA/partner-contact | base_location/models/res_partner.py | 1 | 3175 | # Copyright 2016 Nicolas Bessi, Camptocamp SA
# Copyright 2018 Tecnativa - Pedro M. Baeza
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import _, api, fields, models
from odoo.exceptions import ValidationError
class ResPartner(models.Model):
_inherit = "res.partner"
zip_id = fiel... | agpl-3.0 | 229,053,051,067,403,780 | 38.197531 | 88 | 0.531969 | false | 3.523862 | false | false | false |
Anaphory/libpgm | libpgm/tablecpdfactorization.py | 1 | 11630 | # Copyright (c) 2012, CyberPoint International, LLC
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# * Redistributions of source code must retain the above copyright
# notice, this lis... | bsd-3-clause | 3,736,584,494,944,979,000 | 42.721805 | 486 | 0.628031 | false | 4.70279 | true | false | false |
fmcingvale/cherrypy_gae | test/test_static.py | 2 | 5795 | from cherrypy.test import test
test.prefer_parent_path()
import os
curdir = os.path.join(os.getcwd(), os.path.dirname(__file__))
has_space_filepath = os.path.join(curdir, 'static', 'has space.html')
import threading
import cherrypy
def setup_server():
if not os.path.exists(has_space_filepath):
file(has_s... | bsd-3-clause | 3,939,696,240,440,684,500 | 32.49711 | 79 | 0.572045 | false | 3.912897 | true | false | false |
leapcode/soledad | tests/responsiveness/watchdog.py | 1 | 1429 | from twisted.internet import defer, reactor
from twisted.internet.task import LoopingCall
from twisted.internet.threads import deferToThread
class Watchdog(object):
DEBUG = False
def __init__(self, delay=0.01):
self.delay = delay
self.loop_call = LoopingCall.withCount(self.watch)
sel... | gpl-3.0 | 7,887,116,236,810,049,000 | 25.962264 | 77 | 0.60112 | false | 3.851752 | false | false | false |
foreachsam/book-lang-python | example/subject/qt/systemtray/composite/demo-basic/main.py | 1 | 2840 | #!/usr/bin/env python3
import sys
from PyQt5.QtWidgets import QApplication
from PyQt5.QtWidgets import QWidget
from PyQt5.QtWidgets import qApp
from PyQt5.QtWidgets import QSystemTrayIcon
from PyQt5.QtWidgets import QMenu
from PyQt5.QtWidgets import QAction
from PyQt5.QtGui import QIcon
import signal
class Signal:... | mit | -2,684,736,941,046,824,400 | 17.562092 | 75 | 0.670423 | false | 2.651727 | false | false | false |
EvgeneOskin/termius-cli | termius/sync/commands.py | 2 | 1753 | # -*- coding: utf-8 -*-
"""Module with CLI command to retrieve SaaS and IaaS hosts."""
from stevedore.extension import ExtensionManager
from ..core.commands import AbstractCommand
from ..core.storage.strategies import (
RelatedSaveStrategy, RelatedGetStrategy
)
class SyncCommand(AbstractCommand):
"""Sync with... | bsd-3-clause | 6,857,343,207,342,054,000 | 32.711538 | 79 | 0.635482 | false | 4.437975 | false | false | false |
archen/django | tests/view_tests/tests/test_defaults.py | 14 | 3216 | from __future__ import unicode_literals
from django.test import TestCase
from django.test.utils import (setup_test_template_loader,
restore_template_loaders, override_settings)
from ..models import UrlArticle
class DefaultsTests(TestCase):
"""Test django views in django/views/defaults.py"""
urls = 'view... | bsd-3-clause | -7,836,204,034,724,813,000 | 39.708861 | 89 | 0.615672 | false | 4.055485 | true | false | false |
gmassei/wfrog | wfrender/renderer/scheduler.py | 5 | 1946 | ## Copyright 2009 Laurent Bovet <laurent.bovet@windmaster.ch>
## Jordi Puigsegur <jordi.puigsegur@gmail.com>
##
## This file is part of wfrog
##
## wfrog 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 Softwar... | gpl-3.0 | 8,680,972,898,610,956,000 | 29.40625 | 73 | 0.65776 | false | 4.140426 | false | false | false |
bcwalrus/git-tutorial | src/gitreview/git/svn.py | 2 | 2528 | #!/usr/bin/python -tt
#
# Copyright 2009-2010 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 applicab... | apache-2.0 | -841,235,286,619,469,400 | 31 | 79 | 0.647152 | false | 3.647908 | false | false | false |
pitcons/flask-spyne | setup.py | 1 | 1178 | from setuptools import setup
requirements = ['flask', 'spyne', 'sec-wall', 'pyyaml']
setup(
author='Robert Ayrapetyan',
author_email='robert.ayrapetyan@gmail.com',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
'Intended Audience :: Developers',
... | bsd-2-clause | 1,139,703,030,899,055,400 | 34.69697 | 70 | 0.611205 | false | 3.739683 | false | false | false |
devs1991/test_edx_docmode | venv/lib/python2.7/site-packages/edx_rest_api_client/auth.py | 1 | 1810 | import datetime
import jwt
from requests.auth import AuthBase
class JwtAuth(AuthBase):
"""Attaches JWT Authentication to the given Request object."""
def __init__(self, username, full_name, email, signing_key, issuer=None, expires_in=30, tracking_context=None):
self.issuer = issuer
self.expi... | agpl-3.0 | 8,780,595,933,770,168,000 | 27.730159 | 115 | 0.597238 | false | 3.995585 | false | false | false |
mulkieran/bytesize | src/bytesize/_util/misc.py | 1 | 5050 | # Copyright (C) 2015 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be u... | gpl-2.0 | 7,102,575,450,175,880,000 | 35.071429 | 80 | 0.658416 | false | 4.099026 | false | false | false |
fabiocaccamo/django-admin-interface | admin_interface/models.py | 1 | 10069 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from admin_interface.cache import del_cached_active_theme
from admin_interface.compat import FileExtensionValidator, force_str, gettext_lazy as _
from colorfield.fields import ColorField
from django.db import models
from django.db.models.signals import... | mit | -233,454,982,035,555,780 | 29.056716 | 103 | 0.572847 | false | 3.890649 | false | false | false |
dasseclab/dasseclab | clones/routersploit/tests/payloads/armle/test_reverse_tcp.py | 1 | 1516 | from routersploit.modules.payloads.armle.reverse_tcp import Payload
# armle reverse tcp with lhost=192.168.1.4 lport=4321
reverse_tcp = (
b"\x01\x10\x8f\xe2\x11\xff\x2f\xe1\x02\x20\x01\x21\x92\x1a\x0f"
b"\x02\x19\x37\x01\xdf\x06\x1c\x08\xa1\x10\x22\x02\x37\x01\xdf"
b"\x3f\x27\x02\x21\x30\x1c\x01\xdf\x01\... | gpl-2.0 | 8,165,723,872,896,371,000 | 39.972973 | 69 | 0.680739 | false | 1.688196 | false | false | false |
openfisca/openfisca-qt | openfisca_qt/gui/spyder_widgets/sourcecode/base.py | 1 | 37952 | # -*- coding: utf-8 -*-
#
# Copyright © 2009-2010 Pierre Raybaut
# Licensed under the terms of the MIT License
# (see spyderlib/__init__.py for details)
"""QPlainTextEdit base class"""
# pylint: disable=C0103
# pylint: disable=R0903
# pylint: disable=R0911
# pylint: disable=R0201
import re
import string
from ....gu... | agpl-3.0 | -7,173,119,474,551,779,000 | 36.988989 | 116 | 0.585149 | false | 4.148104 | false | false | false |
chispita/epiwork | apps/pollster/templatetags/pollster_extras.py | 1 | 1363 | from django import template
register = template.Library()
#import re
#from django import template
#from django.conf import settings
#
#numeric_test = re.compile("^\d+$")
#register = template.Library()
#def getattribute(value, arg):
# """Gets an attribute of an object dynamically from a string name"""
#
# if has... | agpl-3.0 | 2,574,886,552,921,094,000 | 22.101695 | 72 | 0.644167 | false | 3.477041 | false | false | false |
lypnol/graph-theory | problem-03/submissions/coco_opt2_all_perm.py | 1 | 2380 | from submission import Submission
import random
import time
def calculate_length(permutation, matrix):
n = len(permutation)
length = 0
for i in range(n-1):
length += matrix[permutation[i]][permutation[i+1]]
length += matrix[permutation[-1]][permutation[0]]
return length
def glouton(graphe,... | mit | -792,537,633,238,231,600 | 30.315789 | 85 | 0.570588 | false | 3.49486 | false | false | false |
trujunzhang/djzhang-targets | cwitune/cwitune/spiders/itune_browser_spider.py | 1 | 1525 | # -*- coding: utf-8 -*-
from random import Random
import scrapy
from scrapy.selector import Selector, HtmlXPathSelector
from cwitune.items import Itune
import urlparse
class ItunesBrowserSpider(scrapy.Spider):
name = "itune_browser"
allowed_domains = ["itunes.apple.com"]
start_urls = [
'https://... | mit | -5,008,557,440,842,640,000 | 34.465116 | 105 | 0.592131 | false | 4.099462 | false | false | false |
zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/370_AWisemanSowsSeeds/__init__.py | 1 | 3237 | # Made by disKret
import sys
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "370_AWisemanSowsSeeds"
#NPC
CASIAN = 30612
#MOBS
MOBS = [20082,20084,20086,20089,20090]
#IT... | gpl-3.0 | 6,363,384,710,338,670,000 | 32.040816 | 177 | 0.690145 | false | 2.655455 | false | false | false |
nvdnkpr/pushmanager | core/util.py | 3 | 5859 | import copy
import datetime
from tornado.escape import xhtml_escape
class EscapedDict:
"""A wrapper for a dict that HTML-escapes values as you ask for them"""
def __init__(self, doc):
self.doc = doc
def __getitem__(self, key):
item = self.doc[key]
if isinstance(item, str):
... | apache-2.0 | 2,295,590,398,087,530,200 | 29.357513 | 88 | 0.580474 | false | 3.772698 | false | false | false |
unreal666/outwiker | buildtools/defines.py | 2 | 3113 | # -*- coding: utf-8 -*-
import os
# Supported Ubuntu releases
UBUNTU_RELEASE_NAMES = ["xenial"]
# List of the supported plugins
PLUGINS_LIST = [
"autorenamer",
"counter",
"datagraph",
"diagrammer",
"export2html",
"externaltools",
"hackpage",
"htmlformatter",
"htmlheads",
"lig... | gpl-3.0 | -1,806,105,344,204,124,400 | 23.706349 | 75 | 0.640861 | false | 2.681309 | false | false | false |
a4a881d4/fs45g | fs45g/fs45g.py | 1 | 9882 | import tools
import os
import time
import fuse
import pickle
import syslog
import getopt
import sys
import errno
import stat
import shutil
import json
from fuse import Fuse
from keylayoutelement import KeyLayoutElement
from fs45gcache import fs45gCache
from fs45gstat import fs45gStat,fs45gROStat
from fs45gfile import ... | apache-2.0 | 1,100,308,079,021,668,000 | 20.482609 | 69 | 0.64663 | false | 2.616362 | false | false | false |
emergent-interfaces/open-playout | src/devices/switcher.py | 1 | 5719 | import gi
import sys
from device import Device
from observable_variable import ObservableVariable
from control_panels.switcher_control_panel import SwitcherControlPanel
try:
gi.require_version('Gst', '1.0')
except ValueError:
print 'Could not find required Gstreamer library'
sys.exit(1)
from gi.repositor... | gpl-3.0 | -1,378,207,922,180,259,600 | 32.840237 | 95 | 0.573177 | false | 3.449337 | false | false | false |
otterdude97/Machine-Learning-Implementations | mnist-beginner/mnist_softmax.py | 1 | 1198 | """
Implementing a simple softmax regression model on the MNIST data set
following Google's tensorflow tutorial.
"""
# Import TensorFlow
import tensorflow as tf
# Import the mnist data
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data/", one_hot = True)
# Model ... | mit | -2,161,579,017,444,417,500 | 30.526316 | 85 | 0.719533 | false | 2.950739 | false | false | false |
MERegistro/meregistro | meregistro/apps/reportes/views/cohortes.py | 1 | 3161 | # -*- coding: UTF-8 -*-
from django.http import HttpResponseRedirect
from datetime import datetime
from django.core.urlresolvers import reverse
from meregistro.shortcuts import my_render
from apps.seguridad.decorators import login_required, credential_required
from django.db import connection
from datetime import dat... | bsd-3-clause | 6,949,129,959,810,226,000 | 38.962025 | 131 | 0.57618 | false | 3.169679 | false | false | false |
CINPLA/expipe-dev | expipe-templates-cinpla/edit_templates.py | 1 | 1834 | import expipe
import os
import os.path as op
import json
import quantities as pq
def fix_list(value):
if isinstance(value, str):
if not len(value) == 0:
val = []
for cont in value.split(','):
try:
val.append(float(cont))
except Ex... | gpl-3.0 | 3,229,001,040,547,357,000 | 30.62069 | 104 | 0.509815 | false | 4.09375 | false | false | false |
jedimatt42/tipi | services/tifloat/tifloat.py | 1 | 1312 | # convert an integer from -9999 to 9999 to a bytearray with value encoded
# as a float
def asFloat(val):
bytes = bytearray(9)
bytes[0] = 8
word0 = 0
word1 = 0
tmp = val
if val < 0:
val *= -1
if val >= 100:
word0 = int(val // 100) | 0x4100
word1 = int(val % 100)
... | gpl-3.0 | 6,014,473,631,527,786,000 | 18.878788 | 73 | 0.488567 | false | 2.902655 | false | false | false |
debalance/hp | hp/core/forms.py | 1 | 2982 | # -*- coding: utf-8 -*-
#
# This file is part of the jabber.at homepage (https://github.com/jabber-at/hp).
#
# This project is free software: you can redistribute it and/or modify it under the terms of the
# GNU General Public License as published by the Free Software Foundation, either version 3 of the
# License, or (... | gpl-3.0 | 320,816,596,572,360,700 | 35.365854 | 99 | 0.644534 | false | 4.118785 | false | false | false |
NervanaSystems/coach | rl_coach/architectures/mxnet_components/general_network.py | 1 | 24307 | #
# Copyright (c) 2017 Intel Corporation
#
# 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... | apache-2.0 | 2,451,682,695,284,976,000 | 43.436929 | 116 | 0.637635 | false | 4.313576 | false | false | false |
pperrier27/ImgurSwitcher | src/imgurswitcher/windows.py | 1 | 4126 | # Copyright Patrick Perrier, 2015
# 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... | gpl-3.0 | -1,452,470,766,203,793,400 | 39.69697 | 114 | 0.701163 | false | 3.870544 | false | false | false |
TLEN5410/Examples | Module 3/addressbook_proceedural.py | 1 | 1825 | def add_person(address_book):
p = dict()
p['first_name'] = raw_input("Please enter the fist name: ")
p['last_name'] = raw_input("Please enter the last name: ")
p['address'] = raw_input("Please enter the address: ")
p['phone'] = raw_input("Please enter the phone number: ")
p['email'] = raw_input(... | gpl-2.0 | 4,165,591,644,111,439,400 | 28.918033 | 63 | 0.586301 | false | 3.732106 | false | false | false |
gabdube/native-windows-gui | docs/native-windows-docs/nav_update.py | 1 | 3013 | # Just a script that update the headers of every documentation page.
import glob, re
from os import path
APP_DIR = path.dirname(path.abspath(__file__))
NAV = r"""<!-- NAV BEGIN -->
<div id="nav">
<button id="toggle-nav">
<span class="sr-only">Toggle navigation</span>
<span class="bar"></span>
... | gpl-3.0 | 7,069,114,930,014,732,000 | 32.853933 | 90 | 0.567541 | false | 2.56644 | false | false | false |
muma7490/PyDIAMONDS-Background | pyDiamondsBackground/models/WhiteNoiseOscillationModel.py | 1 | 2492 | import numpy as np
from pyDiamondsBackground.models.BackgroundModel import BackgroundModel
class WhiteNoiseOscillationModel(BackgroundModel):
"""
This implementation of the Background model implements a solar like oscillator including granular components as
well as the white noise component.
"""
... | mit | -1,888,361,270,047,134,200 | 41.237288 | 117 | 0.676164 | false | 4.326389 | false | false | false |
slickqa/python-client | slickqa/connection.py | 1 | 18277 | """
slick.py is a library for talking to slick (http://code.google.com/p/slickqa).
Copyright 2013 AccessData Group, 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-2.0 | -5,663,237,295,567,189,000 | 40.164414 | 164 | 0.610768 | false | 4.092476 | true | false | false |
bmcage/centrifuge-1d | centrifuge1d/modules/fit_retention_curve/run.py | 1 | 1359 | from __future__ import division
import numpy as np
from ..shared.show import show_results
from ..shared.solver import simulate_inverse
def solve_direct(model, measurements):
# This is not needed when calling simulate_direct() as it resets the
# values automatically
measurements.reset_calc_measurements() #... | gpl-2.0 | -2,039,731,447,217,686,000 | 30.604651 | 80 | 0.62546 | false | 3.557592 | false | false | false |
EducationalTestingService/discourse-parsing | rstfinder/make_traindev_split.py | 1 | 1506 | #!/usr/bin/env python
"""
Split RSTDB training set into smaller training + development set.
This script splits up the RST discourse treebank training set JSON file
into new, smaller training set and a development set.
:author: Michael Heilman
:author: Nitin Madnani
:organization: ETS
"""
import argparse
import json... | mit | -7,836,322,220,952,563,000 | 29.734694 | 92 | 0.663347 | false | 3.577197 | false | false | false |
edwardgeorge/libgmail | demos/gmailftpd.py | 1 | 10951 | #!/usr/bin/env python
#
# gmailftpd.py -- Demo to allow retrieval of attachments via FTP.
#
# $Revision$ ($Date$)
#
# Author: follower@myrealbox.com
#
# License: Dual GPL 2.0 and PSF (This file only.)
#
#
# Based on smtpd.py by Barry Warsaw <barry@python.org> (Thanks Barry!)
#
# Major rewrite of the datachannel handeli... | gpl-2.0 | -7,383,127,762,100,451,000 | 27.370466 | 234 | 0.54826 | false | 3.91947 | false | false | false |
sclc/NAEF | src/native_conjugate_gradient.py | 1 | 5798 | """ """
import scipy
import numpy as np
from scipy.sparse.linalg import *
class NativeConjugateGradient(object):
""" """
def __init__(self, mat, X, B, tol, max_iteration):
""" """
self._mat=mat
self._X=X
self._B=B
self._tol=tol
self._max_iteration = max_iteratio... | gpl-3.0 | 8,256,002,007,778,983,000 | 31.757062 | 177 | 0.483098 | false | 2.913568 | false | false | false |
danieldmm/minerva | evaluation_runs/acl14_experiments.py | 1 | 10284 | # Reimplementation of the equivalent ACL14 experiments
#
# Copyright: (c) Daniel Duma 2016
# Author: Daniel Duma <danielduma@gmail.com>
# For license information, see LICENSE.TXT
from __future__ import print_function
from __future__ import absolute_import
import os, json
from proc.nlp_functions import AZ_ZONES_LIS... | gpl-3.0 | -8,962,535,567,347,124,000 | 44.706667 | 193 | 0.599475 | false | 3.109767 | true | false | false |
pepijnd/keecrypt | keecrypt/kdbx/header.py | 1 | 1968 | from construct import Int32ul, Int64ul, GreedyBytes, Bytes
from keecrypt.exception import KDBXException
class KDBXHeaderType:
def __init__(self, type_id, value_type):
self.type_id = type_id
self.value_type = value_type
class KDBXHeaders:
END = KDBXHeaderType(0, None) # type: None
COMME... | gpl-3.0 | -1,332,563,870,528,498,000 | 35.444444 | 70 | 0.629573 | false | 3.364103 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.