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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
19po/rtl102.5-playlist | rtl1025-playlist.py | 1 | 2354 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
# ------------------ #
# RTL 102.5 info #
# ------------------ #
import urllib
from xml.dom.minidom import parse
import re
import json
def uni(s):
"""
Decode text.
"""
ascii_char = re.findall(r'\[e\]\[c\](\d+)\[p\]', s)
other_char = re.findall(r'\[[a-z]\]+', s)... | mit | 7,107,818,560,704,207,000 | 24.586957 | 82 | 0.601529 | false | 2.805721 | false | false | false |
crossbario/crossbar-examples | django/realtimemonitor/django_project/settings.py | 1 | 2805 | """
Django settings for django_project 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 | 6,791,827,221,270,810,000 | 25.971154 | 86 | 0.694118 | false | 3.32346 | false | false | false |
whtsky/WeRoBot | werobot/crypto/__init__.py | 1 | 4581 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import base64
import socket
import struct
import time
try:
from cryptography.hazmat.primitives.ciphers import (
Cipher, algorithms, modes
)
from cryptography.hazmat.backends import default_backend
except ImportError: ... | mit | 7,696,962,301,549,961,000 | 28.701389 | 79 | 0.581015 | false | 3.264885 | false | false | false |
maestromusic/maestro | maestro/plugins/audiocd/gui.py | 1 | 21270 | # -*- coding: utf-8 -*-
# Maestro Music Manager - https://github.com/maestromusic/maestro
# Copyright (C) 2013-2015 Martin Altmayer, Michael Helmling
#
# 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 Foun... | gpl-3.0 | 4,208,703,697,890,041,300 | 41.370518 | 101 | 0.625153 | false | 4.040653 | true | false | false |
GNOME/pygtkimageview | tests/test_module.py | 1 | 24286 | import gobject
import gtk
from gtk import gdk
import gtkimageview
import time
def test_version_string():
'''
The module has a __version__ attribute which is a string
containing three numbers separted by periods. The version string
is >= 1.0.0.
'''
major, minor, micro = gtkimageview.__version__.... | lgpl-2.1 | -5,955,185,135,464,154,000 | 29.898219 | 76 | 0.614881 | false | 3.466952 | true | false | false |
techtonik/pip | tests/functional/test_completion.py | 1 | 8458 | import os
import sys
import pytest
def test_completion_for_bash(script):
"""
Test getting completion for bash shell
"""
bash_completion = """\
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \\
COMP_CWORD=$COMP_CWORD \\
PIP_AUTO_COMPLETE=1 $1... | mit | 7,235,039,292,148,112,000 | 29.756364 | 79 | 0.608536 | false | 3.867398 | true | false | false |
CeON/avroknife | avroknife/test/example_data_stores.py | 1 | 3754 | # Copyright 2013-2015 University of Warsaw
#
# 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 agree... | apache-2.0 | 484,122,910,533,058,300 | 49.053333 | 126 | 0.627064 | false | 3.437729 | false | false | false |
yasserglez/pytiger2c | packages/pytiger2c/types/arraytype.py | 1 | 1741 | # -*- coding: utf-8 -*-
"""
Clase de la jerarquía de tipos de Tiger representando el tipo array.
"""
from pytiger2c.types.tigertype import TigerType
class ArrayType(TigerType):
"""
Clase de la jerarquía de tipos de Tiger representando el tipo array.
"""
def _get_code_name(self):
"""
... | mit | 6,491,093,563,361,914,000 | 27.409836 | 82 | 0.588575 | false | 3.486922 | false | false | false |
mpetyx/pychatbot | SemanticWebApproach/RoboWriter/allegrordf-1.0.1/franz/openrdf/vocabulary/xmlschema.py | 1 | 3739 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# pylint: disable-msg=C0103
##***** BEGIN LICENSE BLOCK *****
##Version: MPL 1.1
##
##The contents of this file are subject to the Mozilla Public License Version
##1.1 (the "License") you may not use this file except in compliance with
##the License. You may obtain a copy ... | apache-2.0 | -5,239,778,649,766,541,000 | 40.544444 | 77 | 0.696175 | false | 3.452447 | false | false | false |
hguemar/cinder | cinder/tests/test_vmware_vmdk.py | 1 | 128129 | # Copyright (c) 2013 VMware, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | 8,798,432,270,065,571,000 | 45.507804 | 79 | 0.584107 | false | 3.939522 | true | false | false |
joeywen/nlpy | nlpy/optimize/solvers/ldfp.py | 3 | 3868 | """
A limited-memory DFP method for unconstrained minimization. A symmetric and
positive definite approximation of the Hessian matrix is built and updated at
each iteration following the Davidon-Fletcher-Powell formula. For efficiency,
only the recent observed curvature is incorporated into the approximation,
resulting... | gpl-3.0 | 7,327,404,677,815,587,000 | 35.149533 | 79 | 0.660031 | false | 3.788443 | false | false | false |
qyzxg/myblog | app/api_0_1/comments.py | 1 | 1674 | #!/usr/bin/python
# -*- coding:utf-8 -*-
from flask import jsonify, request, url_for
from ..models import Post, Comment
from . import api
from ..shares import do_pagination
@api.route('/comments/')
def get_comments():
query = Comment.query.order_by(Comment.created.desc())
page = request.args.get('p... | gpl-3.0 | -2,697,877,208,270,583,000 | 30.823529 | 85 | 0.603943 | false | 3.402439 | false | false | false |
Kobzol/debug-visualizer | debugger/debugger_api.py | 1 | 10713 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015-2016 Jakub Beranek
#
# This file is part of Devi.
#
# Devi 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, version 3 of the License, or
# (at yo... | gpl-3.0 | 7,285,009,671,657,888,000 | 25.917085 | 78 | 0.592084 | false | 4.401397 | false | false | false |
AhmadHamzeei/Amir-Accounting | amir/calverter.py | 1 | 11050 | #!/usr/bin/env python
## calverter.py (2008/08/16)
##
## Copyright (C) 2008 Mehdi Bayazee (Bayazee@Gmail.com)
##
## Iranian (Jalali) calendar:
## http://en.wikipedia.org/wiki/Iranian_calendar
## Islamic (Hijri) calendar:
## http://en.wikipedia.org/wiki/Islamic_calendar
## Gregor... | gpl-3.0 | 5,848,496,295,162,893,000 | 35.205387 | 132 | 0.486425 | false | 3.322309 | false | false | false |
ZimboPy/zimfarm | farm_project/accounts/migrations/0001_initial.py | 1 | 1858 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-05-25 00:59
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 = [
migratio... | apache-2.0 | 4,105,231,202,751,320,000 | 41.227273 | 179 | 0.597417 | false | 4.222727 | false | false | false |
Whatang/DrumBurp | src/GUI/DBColourPicker.py | 1 | 14438 | # Copyright 2016 Michael Thomas
#
# See www.whatang.org for more information.
#
# This file is part of DrumBurp.
#
# DrumBurp 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 | 4,722,268,532,639,419,000 | 36.21134 | 94 | 0.599113 | false | 4.279194 | false | false | false |
itsmeolivia/interview | simple-database.py | 1 | 1853 | #!/usr/bin/env python
var_map = {}
val_map = {}
undo = []
rolling_back = False
def in_transaction_block():
return len(undo) != 0 and not rolling_back
def set_var(name, value):
if name in var_map:
if in_transaction_block():
undo.append((set_var, name, var_map[name]))
val_map[var_... | mit | -1,301,698,002,153,495,600 | 17.908163 | 55 | 0.533189 | false | 3.412523 | false | false | false |
CloverHealth/pycon2017 | etl_nested/tests/conftest.py | 1 | 2618 | import os
from collections import namedtuple
import pytest
import sqlalchemy as sa
import sqlalchemy.engine as sa_engine
import sqlalchemy.orm as sa_orm
import testing.postgresql
from app import models
# re-useable test database subdirectory
KEEPDB_PATH = '.test_db'
# Test database options
DatabaseConfig = namedtup... | bsd-3-clause | -166,317,570,797,609,380 | 26.851064 | 108 | 0.700153 | false | 4.009188 | true | false | false |
akretion/rma | __unported__/crm_claim_rma/tests/test_lp_1282584.py | 5 | 3990 | # -*- coding: utf-8 -*-
##############################################################################
#
# Author: Yannick Vaucher
# Copyright 2014 Camptocamp SA
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# pub... | agpl-3.0 | -6,670,841,462,261,813,000 | 35.944444 | 100 | 0.573684 | false | 3.900293 | true | false | false |
nave91/teak-nbtree | src/table.py | 1 | 1430 | from globfile import *
from lib import *
def tableprint(z): #prints table with the summary
print rowprint(colname[z]),'%10s' % 'notes'
print rowprint(expected(colname[z],z)), '%10s' % 'expected'
temp = [ c for c in range(len(colname[z]))]
for c in colname[z]:
if c in nump[z]:
temp[co... | gpl-2.0 | 2,276,006,926,522,703,400 | 30.086957 | 96 | 0.502098 | false | 2.831683 | false | false | false |
rht/zulip | zerver/lib/streams.py | 1 | 13621 | from typing import Any, Iterable, List, Mapping, Set, Tuple, Optional, Union
from django.utils.translation import ugettext as _
from zerver.lib.actions import check_stream_name, create_streams_if_needed
from zerver.lib.request import JsonableError
from zerver.models import UserProfile, Stream, Subscription, \
Rea... | apache-2.0 | -5,349,482,631,936,922,000 | 43.224026 | 109 | 0.65722 | false | 4.234069 | false | false | false |
markstory/lint-review | lintreview/web.py | 1 | 2433 | import logging
import pkg_resources
from flask import Flask, request, Response
from lintreview.config import load_config
from lintreview.github import get_repository, get_lintrc
from lintreview.tasks import process_pull_request
config = load_config()
app = Flask("lintreview")
app.config.update(config)
log = logging.... | mit | -8,445,128,408,838,647,000 | 34.779412 | 76 | 0.622688 | false | 3.760433 | true | false | false |
matheuscas/pyfuzzy_toolbox | tests/test_features.py | 1 | 20690 | from pyfuzzy_toolbox import transformation as trans
from pyfuzzy_toolbox import preprocessing as pre
import pyfuzzy_toolbox.features.count as count_features
import pyfuzzy_toolbox.features.max as max_features
import pyfuzzy_toolbox.features.sum as sum_features
import test_preprocessing as tpre
import nose
print 'Load... | bsd-3-clause | -8,388,361,246,177,500,000 | 42.375262 | 187 | 0.7174 | false | 2.884428 | true | false | false |
mjsauvinen/P4UL | pyLib/plotTools.py | 1 | 32566 | #!/usr/bin/env python3
import sys
import glob
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
from utilities import dataFromDict
from matplotlib.ticker import FormatStrFormatter
# 08.04.2016: Mona added an option for colorbar bounds to addImagePlot
plt.rc('xtick', labelsize=2... | mit | -5,993,872,331,603,090,000 | 29.751653 | 140 | 0.53347 | false | 2.426134 | false | false | false |
giefferre/gestpypay | gestpypay/gestpypay.py | 1 | 11978 | # coding=utf-8
'''
GestPYPay 1.0.0
(C) 2012 Gianfranco Reppucci <gianfranco@gdlabs.it>
https://github.com/giefferre/gestpypay
GestPYPay is an implementation in Python of GestPayCrypt and
GestPayCryptHS italian bank Banca Sella Java classes. It allows to
connect to online credit card payment GestPay.
This program is... | lgpl-3.0 | 4,937,968,520,034,323,000 | 23.446939 | 100 | 0.688178 | false | 2.942275 | false | false | false |
macarthur-lab/xbrowse | xbrowse_server/base/management/commands/add_project.py | 1 | 1500 | from django.core.management.base import BaseCommand
from xbrowse_server.base.model_utils import create_xbrowse_model
from xbrowse_server.base.models import Project
import sys
from django.utils import timezone
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument("project_id")
... | agpl-3.0 | -3,050,226,718,671,357,000 | 39.540541 | 141 | 0.636 | false | 4.076087 | false | false | false |
synappio/chapman | chapman/model/m_task.py | 1 | 2068 | import logging
from random import getrandbits
from ming import Field
from ming.declarative import Document
from ming import schema as S
from .m_base import doc_session, dumps, pickle_property, Resource
log = logging.getLogger(__name__)
class TaskState(Document):
class __mongometa__:
name = 'chapman.tas... | mit | 6,082,227,630,684,573,000 | 27.722222 | 65 | 0.583172 | false | 3.609075 | false | false | false |
mahangu/ocon | scraper/scrape.py | 1 | 2935 | # The Open Corpus of Newswriting (OCON)
# Copyright (C) 2014 Mahangu Weerasinghe (mahangu@gmail.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 3 of the License, ... | gpl-3.0 | 4,495,185,156,545,178,000 | 30.902174 | 120 | 0.689949 | false | 3.25388 | false | false | false |
LeResKP/pyramid_auth | pyramid_auth/forms.py | 1 | 1566 | import tw2.forms as twf
import tw2.core as twc
class UserExists(twc.Validator):
"""Validate the user exists in the DB. It's used when we want to
authentificate it.
"""
__unpackargs__ = ('login', 'password', 'validate_func', 'request')
msgs = {
'mismatch': ('Login failed. Please check your ... | mit | 2,895,962,187,333,698,000 | 32.319149 | 77 | 0.581098 | false | 4.302198 | false | false | false |
qurben/mopidy-jukebox | backend/mopidy_jukebox/web.py | 1 | 9095 | """
RequestHandlers for the Jukebox application
IndexHandler - Show version
TracklistHandler - Show current tracklist
SongHandler - Show track information
VoteHandler - Add and remove votes
SkipHandler - Add and remove skips
SearchHandler - Search the library
"""
from __future__ import absolute_import, unicode_litera... | mit | -5,404,643,345,612,076,000 | 29.830508 | 115 | 0.561407 | false | 4.2087 | false | false | false |
citrix-openstack-build/ironic-lib | ironic_lib/disk_utils.py | 1 | 20287 | # Copyright 2014 Red Hat, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by... | apache-2.0 | -111,548,274,905,857,920 | 38.856582 | 79 | 0.587618 | false | 3.959212 | true | false | false |
bgris/ODL_bgris | examples/tomo/filtered_backprojection_cone_2d_partial_scan.py | 1 | 2456 | """
Example using a filtered back-projection (FBP) in fan beam using `fbp_op`.
Note that the FBP is only approximate in this geometry, but still gives a
decent reconstruction that can be used as an initial guess in more complicated
methods.
Here we look at a partial scan, where the angular interval is not 2 * pi.
Thi... | gpl-3.0 | -4,292,229,415,815,887,000 | 34.594203 | 78 | 0.747557 | false | 3.206266 | false | false | false |
elshaka/Romano | romano/ui/add_carrier.py | 1 | 3446 | # -*- coding: utf-8 -*-
from PySide import QtGui, QtCore
from .ui_add_carrier import Ui_AddCarrier
from mango.models.carrier import Carrier
from .error_message_box import ErrorMessageBox
class AddCarrier(QtGui.QDialog):
def __init__(self, parent):
super(AddCarrier, self).__init__(parent)
self.api = parent.... | gpl-3.0 | 5,968,440,507,558,739,000 | 33.808081 | 93 | 0.700232 | false | 3.516327 | false | false | false |
a0x77n/chucky-ng | chucky/joernInterface/nodes/Node.py | 2 | 1093 | from joernInterface.JoernInterface import jutils
class Node(object):
def __init__(self, node_id, properties = None):
self.node_id = node_id
self.properties = properties
self.node_selection = 'g.v("{}")'.format(self.node_id)
def __str__(self):
return str(self.node_id)
... | gpl-3.0 | -5,819,698,073,411,503,000 | 23.840909 | 62 | 0.561757 | false | 3.903571 | false | false | false |
robobario/repl | server.py | 1 | 2679 | from __future__ import print_function
from tornado.gen import Task, Return, coroutine
import tornado.process
import tornado.web
from tornado.ioloop import IOLoop
import re
from repl import Repl
import os.path
import time
import json
import subprocess
repls = {}
pattern = re.compile(r"/(\d+)")
safe_repls = ["prolog","... | mit | 764,434,140,892,750,500 | 26.060606 | 94 | 0.610302 | false | 3.382576 | false | false | false |
brutalhonesty/pineapple-eyefi | main.py | 1 | 8225 | #!/usr/bin/env python
from flask import Flask, request, redirect, url_for, abort, render_template, make_response, after_this_request
import flickrapi
from werkzeug import secure_filename
import xml.etree.cElementTree as ET
import xml.etree.ElementTree as xml
import os
import md5
import tarfile
import hashlib
import bi... | mit | -2,527,520,502,396,802,600 | 35.074561 | 110 | 0.591489 | false | 3.723404 | false | false | false |
breandan/java-algebra-system | examples/prime-decomp_algeb_trans.py | 3 | 2178 | #
# jython examples for jas.
# $Id$
#
import sys
from java.lang import System
from jas import PolyRing, QQ, AN, RF
from jas import terminate, startLog
# polynomial examples: prime/primary decomposition in Q(sqrt(2))(x)(sqrt(x))[y,z]
Q = PolyRing(QQ(),"w2",PolyRing.lex);
print "Q = " + str(Q);
[e,a] = Q.gens();... | gpl-2.0 | 6,919,120,197,560,014,000 | 19.166667 | 81 | 0.522498 | false | 2.145813 | false | false | false |
darktears/chromium-crosswalk | tools/profile_chrome/systrace_controller.py | 7 | 3589 | # Copyright 2014 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.
import threading
import zlib
from profile_chrome import controllers
from profile_chrome import util
from pylib.constants import host_paths
with host_paths... | bsd-3-clause | 8,110,999,072,824,533,000 | 30.208696 | 77 | 0.669546 | false | 3.610664 | false | false | false |
sorenh/cc | vendor/boto/boto/ec2/autoscale/activity.py | 11 | 2215 | # Copyright (c) 2009 Reza Lotun http://reza.lotun.name/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | apache-2.0 | -4,411,640,662,643,931,000 | 39.272727 | 74 | 0.637923 | false | 4.56701 | false | false | false |
mahak/neutron | neutron/ipam/drivers/neutrondb_ipam/db_models.py | 8 | 3087 | # Copyright 2015 OpenStack LLC.
# 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 b... | apache-2.0 | -3,437,296,657,181,676,000 | 42.478873 | 78 | 0.641075 | false | 4.35402 | false | false | false |
csirtgadgets/csirtg-mail-py | csirtg_mail/client.py | 1 | 2098 | import sys
import logging
import textwrap
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
from pprint import pprint
import json
from csirtg_mail import parse_email_from_string
LOG_FORMAT = '%(asctime)s - %(levelname)s - %(name)s[%(lineno)s] - %(message)s'
logger = logging.getLogg... | lgpl-3.0 | -4,362,267,693,185,706,500 | 25.556962 | 112 | 0.613918 | false | 3.93621 | false | false | false |
zougloub/libchardet | python/setup.py | 1 | 1385 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup, Extension
except ImportError:
from distutils.core import setup, Extension
from Cython.Build import cythonize
extensions = [
Extension("libchardet._libchardet", ["libchardet/_libchardet.pyx"],
include_dirs = ["../src"],
... | mpl-2.0 | 550,494,486,899,818,400 | 26.8125 | 76 | 0.653651 | false | 3.501266 | false | false | false |
infinisql/infinisql | manager/infinisqlmgr/management/health.py | 1 | 8863 | __author__ = 'Christopher Nelson'
import os
import time
import psutil
from infinisqlmgr.management.metric import Metric
memory = ["total", "available", "percent", "used", "free", "active", "inactive", "buffers", "cached"]
swap = ["total", "used", "free", "percent", "sin", "sout"]
cpu = ["user", "nice", "system", "i... | gpl-3.0 | 4,261,215,599,936,240,000 | 43.762626 | 119 | 0.597089 | false | 3.711474 | false | false | false |
axanthos/orange3-textable | _textable/widgets/OWTextableIntersect.py | 1 | 18790 | """
Class OWTextableIntersect
Copyright 2012-2019 LangTech Sarl (info@langtech.ch)
-----------------------------------------------------------------------------
This file is part of the Orange3-Textable package.
Orange3-Textable is free software: you can redistribute it and/or modify
it under the terms of the GNU Gene... | gpl-3.0 | 1,970,531,423,506,143,500 | 34.790476 | 77 | 0.589835 | false | 4.546334 | false | false | false |
ucloud/uai-sdk | uaitrain/arch/tensorflow/uflag.py | 1 | 3122 | # Copyright 2017 The UAI-SDK Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 3,565,311,756,186,062,000 | 31.863158 | 95 | 0.633568 | false | 4.107895 | false | false | false |
campagnola/neuroanalysis | tools/import_spike_detection.py | 1 | 3323 | """Script used to generate evoked spike test data
Usage: python -i import_spike_detection.py expt_id cell_id
This will load all spikes evoked in the specified cell one at a time.
For each one you can select whether to write the data out to a new test file.
Note that files are saved without results; to generate thes... | mit | -9,213,058,678,356,565,000 | 29.209091 | 149 | 0.681011 | false | 3.38736 | true | false | false |
jeffh/describe | describe/mock/stub.py | 1 | 5002 | from describe.mock.utils import TWO_OPS_FULL, ONE_OPS, NIL
from describe.mock.expectations import Invoke, ExpectationList, ExpectationSet, Expectation
from describe.mock.mock import Mock
from describe.utils import Replace
def stub(*args, **attributes):
if args:
stub = Stub(args[0])
else:
stub ... | mit | 5,373,466,267,676,072,000 | 32.346667 | 113 | 0.579568 | false | 4.182274 | false | false | false |
fingeronthebutton/Selenium2Library | src/Selenium2Library/locators/windowmanager.py | 7 | 5724 | from types import *
from robot import utils
from selenium.webdriver.remote.webdriver import WebDriver
from selenium.common.exceptions import NoSuchWindowException
class WindowManager(object):
def __init__(self):
self._strategies = {
'title': self._select_by_title,
'name': self._sel... | apache-2.0 | 8,729,557,066,157,296,000 | 39.595745 | 162 | 0.587352 | false | 4.430341 | false | false | false |
EnstaBretagneClubRobo/enstaB-ros | ai_mapping_robot/scripts/waiter_subscriber.py | 1 | 3838 | #!/usr/bin/env python
import rospy
import smach
import smach_ros
import time
from std_msgs.msg import Empty,String,Int8
from gps_handler.srv import *
from ai_mapping_robot.msg import ErrorMessage
from ai_mapping_robot.msg import InitData
import tf.transformations as trans
from math import *
from pwm_serial_py.srv impo... | gpl-3.0 | -3,359,531,243,991,592,000 | 28.523077 | 89 | 0.634706 | false | 3.460775 | false | false | false |
puentesarrin/pymongolab | setup.py | 1 | 1854 | # -*- coding: utf-8 *-*
import os
import sys
import subprocess
try:
from setuptools import setup
except ImportError:
from distribute_setup import use_setuptools
use_setuptools()
from setuptools import setup
from distutils.cmd import Command
version = "1.2.+"
class doc(Command):
description = "ge... | apache-2.0 | -2,752,534,590,338,345,000 | 25.471429 | 79 | 0.606044 | false | 3.884696 | false | false | false |
cloudtools/troposphere | troposphere/iotsitewise.py | 1 | 5261 | # Copyright (c) 2012-2021, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
#
# *** Do not modify - this file is autogenerated ***
# Resource specification version: 31.0.0
from troposphere import Tags
from . import AWSObject, AWSProperty
class IamRole(AWSProperty):
props ... | bsd-2-clause | 3,051,025,688,730,493,000 | 20.386179 | 74 | 0.578977 | false | 3.712773 | false | false | false |
ohmu/pglookout | test/conftest.py | 1 | 4623 | """
pglookout - test configuration
Copyright (c) 2016 Ohmu Ltd
See LICENSE for details
"""
from pglookout import logutil, pgutil
from pglookout.pglookout import PgLookout
from py import path as py_path # pylint: disable=no-name-in-module
from unittest.mock import Mock
import os
import pytest
import signal
import subp... | apache-2.0 | -888,965,786,231,963,300 | 31.328671 | 84 | 0.587497 | false | 3.462921 | true | false | false |
rombie/contrail-controller | src/vnsw/opencontrail-vrouter-netns/opencontrail_vrouter_netns/cert_mgr/tls.py | 3 | 1366 | import os
from OpenSSL import crypto
class TLS:
def __init__(self, id=None, certificate=None, private_key=None,
passphrase=None, intermediates=None, primary_cn=None):
self.id = id
self.certificate = certificate
self.private_key = private_key
self.passphrase = pass... | apache-2.0 | -7,272,465,427,452,684,000 | 28.695652 | 72 | 0.564422 | false | 3.672043 | false | false | false |
baroquebobcat/pants | src/python/pants/backend/codegen/thrift/lib/apache_thrift_gen_base.py | 2 | 5609 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import re
... | apache-2.0 | 6,981,577,605,815,294,000 | 41.172932 | 97 | 0.679444 | false | 3.873619 | false | false | false |
edx/edxanalytics | src/edxanalytics/edxanalytics/mitx_settings.py | 1 | 2896 | import sys
import os
from path import path
XQUEUE_INTERFACE = {
"url": "http://127.0.0.1:3032",
"django_auth": {
"username": "lms",
"password": "abcd"
},
"basic_auth": ('anant', 'agarwal'),
}
MITX_FEATURES = {
'SAMPLE': False,
'USE_DJANGO_PIPELINE': True,
'DISPLAY_HIST... | agpl-3.0 | -8,380,245,411,244,201,000 | 32.287356 | 121 | 0.651243 | false | 3.544676 | false | false | false |
ampammam34/ActroidKinematics | ActroidKinematics.py | 1 | 8277 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- Python -*-
"""
@file ActroidKinematics.py
@brief ModuleDescription
@date $Date$
"""
import sys
import time
import numpy as np
import scipy as sp
import math
sys.path.append(".")
# Import RTM module
import RTC
import OpenRTM_aist
# Import Service implementatio... | gpl-3.0 | -1,119,475,930,547,662,300 | 22.747826 | 124 | 0.519224 | false | 2.926071 | false | false | false |
mohabusama/gevent-guacamole | guacg/app.py | 1 | 2391 | import gevent
from geventwebsocket import WebSocketApplication
from guacamole.client import GuacamoleClient, PROTOCOL_NAME
try:
# Add local_settings.py with RDP connection variables
from local_settings import (
PROTOCOL, USERNAME, PASSWORD, HOST, PORT, DOMAIN, APP, SEC)
except ImportError:
USERNA... | mit | -463,516,985,167,099,800 | 25.865169 | 76 | 0.570054 | false | 4.30036 | false | false | false |
elhoyos/colombiatransparente | settings.py | 1 | 2081 | # Settings para ColombiaTransparente
#
# Debe utilizar local_settings.py para inicializar variables especificas.
# Ver fin del archivo.
import os.path
PROJECT_DIR = os.path.dirname(__file__)
# A estos usarios se les manda emails
# cuando hay excepciones
ADMINS = (
('Julian Pulgarin', 'jp@julianpulgarin.com'),
)
... | gpl-3.0 | 7,379,405,612,311,434,000 | 24.378049 | 115 | 0.719846 | false | 3.256651 | false | false | false |
pacificclimate/pycds | tests/basics/conftest.py | 1 | 2154 | from pytest import fixture
from sqlalchemy.orm import sessionmaker
from pycds import Contact, Network, Station, History, Variable
@fixture
def empty_sesh(base_engine, set_search_path):
"""Test-function scoped database session, with no schema or content.
All session actions are rolled back on teardown.
"""... | gpl-3.0 | 3,304,209,749,878,142,000 | 28.506849 | 85 | 0.548282 | false | 3.663265 | false | false | false |
Jeff-Tian/mybnb | Python27/Lib/test/test_sysconfig.py | 2 | 13330 | """Tests for sysconfig."""
import unittest
import sys
import os
import shutil
import subprocess
from copy import copy, deepcopy
from test.test_support import run_unittest, TESTFN, unlink, get_attribute
import sysconfig
from sysconfig import (get_paths, get_platform, get_config_vars,
... | apache-2.0 | -7,487,843,109,434,952,000 | 37.672619 | 97 | 0.525056 | false | 3.843714 | true | false | false |
phracek/devassistant | test/integration/test_help.py | 2 | 4964 | from __future__ import unicode_literals
import sys
import pytest
from test.integration.misc import populate_dapath, run_da
class TestHelp(object):
top_level_help = '\n'.join([
'You can either run assistants with:',
'\033[1mda [--debug] {create,tweak,prepare,extras} [ASSISTANT [ARGUMENTS]] ...\033... | gpl-2.0 | -4,774,708,795,361,658,000 | 39.357724 | 105 | 0.574738 | false | 3.726727 | true | false | false |
open-craft/opencraft | instance/migrations/0039_auto_20160416_1729.py | 1 | 2134 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('instance', '0038_merge'),
]
operations = [
migrations.RenameField(
model_name='openstackserver',
old... | agpl-3.0 | 211,208,470,338,546,900 | 42.55102 | 280 | 0.550609 | false | 4.217391 | false | false | false |
rbianchi66/survey | src/qquestion.py | 1 | 1232 | from PyQt4 import QtGui, Qt
class Question(QtGui.QFrame):
def __init__(self, qnumber, question, card, *args):
super(QtGui.QFrame, self).__init__(*args)
print "qnumber:", qnumber
print "question:", question
self.card = card
self.main_layout = QtGui.QGridLayout()
... | gpl-2.0 | 7,829,553,505,050,234,000 | 39.133333 | 110 | 0.602273 | false | 3.560694 | false | false | false |
thautwarm/JavaProj | sqlclass.py | 1 | 1087 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 26 13:20:51 2017
@author: Thautwarm
"""
def EntityWrapper(func):
def _func(**kw2):
attrs=kw2['attrs']
types=kw2['types']
return func(attrs,types)
return _func
def InitWithTypeMapSet(Name,attrs,types):
Unit = lambda x,y:\
"""
Ty... | apache-2.0 | -2,187,566,233,595,417,900 | 20.76 | 120 | 0.577737 | false | 3.114613 | false | false | false |
wgm2111/wgm-my-data-tools | examples/view_amazon_meta.py | 1 | 1163 |
#
# me: Will Martin
# data: 3.12.2015
# license: BSD
#
"""
Run this program to look ad the amazon-meta data interactively.
"""
# future
from __future__ import print_function, division
# standard
import os
# works on unix machines
FILENAME = os.path.abspath(r"../amazon-meta/amazon-meta.txt")
# Parameters for t... | bsd-3-clause | -1,376,832,607,013,369,900 | 17.460317 | 63 | 0.601892 | false | 3.645768 | false | false | false |
USGSDenverPychron/pychron | pychron/experiment/health/analysis_health.py | 1 | 1125 | # ===============================================================================
# Copyright 2013 Jake Ross
#
# 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/licens... | apache-2.0 | -4,794,001,600,473,407,000 | 39.178571 | 81 | 0.534222 | false | 5.136986 | false | false | false |
bencord0/ListeningSocketHandler | ListeningSocketHandler/handlers.py | 1 | 2200 | #!/usr/bin/env python
"""
ListeningSocketHandler
======================
A python logging handler.
logging.handlers.SocketHandler is a TCP Socket client that sends log records to a tcp server.
This class is the opposite.
When a TCP client connects (e.g. telnet or netcat), log records are streamed... | apache-2.0 | -2,963,136,701,782,625,000 | 33.920635 | 104 | 0.587727 | false | 4.104478 | false | false | false |
kefin/django-garage | garage/html_utils.py | 1 | 5787 | # -*- coding: utf-8 -*-
"""
garage.html_utils
Utility functions to handle html-text conversions.
* FIXME: need to reorganize, refactor and delete unnecessary code.
* created: 2008-06-22 kevin chan <kefin@makedostudio.com>
* updated: 2014-11-21 kchan
"""
from __future__ import (absolute_import, unicode_literals)
im... | bsd-3-clause | -2,367,341,503,561,398,000 | 25.067568 | 77 | 0.593745 | false | 3.731141 | false | false | false |
freedomboxtwh/Plinth | plinth/modules/radicale/forms.py | 9 | 1466 | #
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distribute... | agpl-3.0 | 5,371,999,269,105,826,000 | 35.65 | 77 | 0.686221 | false | 4.274052 | false | false | false |
DeBortoliWines/Bika-LIMS | bika/lims/browser/__init__.py | 1 | 5104 | """Bika's browser views are based on this one, for a nice set of utilities.
"""
from Products.CMFCore.utils import getToolByName
from AccessControl import ClassSecurityInfo
from Products.CMFPlone.i18nl10n import ulocalized_time
from Products.Five.browser import BrowserView
from bika.lims import logger
from zope.cachede... | agpl-3.0 | 4,701,973,804,261,306,000 | 35.457143 | 104 | 0.633033 | false | 4.089744 | false | false | false |
flyte/zmq-io-modules | zmq_io/out_pifacedigitalio.py | 1 | 1283 | import argparse
import json
import pifacedigitalio as pfdio
import zmq
PINS = (
0b00000001,
0b00000010,
0b00000100,
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000
)
def parse_args():
"""
Specify and parse command line arguments.
"""
p = argparse.ArgumentP... | unlicense | 6,201,230,335,833,343,000 | 21.12069 | 95 | 0.636009 | false | 3.39418 | false | false | false |
flipmarley/encrypt-and-wrap | enc.py | 1 | 1985 | #!/usr/bin/python
"""
Generate encrypted messages wrapped in a self-decrypting python script
usage: python enc.py password > out.py
where password is the encryption password and out.py is the message/script file
to decrypt use: python out.py password
this will print the message to stdout.
"""
import sys, random
def e... | mit | 1,148,674,825,854,159,400 | 26.957746 | 97 | 0.582872 | false | 3.063272 | false | false | false |
jrichte43/ProjectEuler | Problem-0358/solutions.py | 1 | 1809 |
__problem_title__ = "Cyclic numbers"
__problem_url___ = "https://projecteuler.net/problem=358"
__problem_description__ = "A with digits has a very interesting property: When it is multiplied " \
"by 1, 2, 3, 4, ... , all the products have exactly the same digits, " \
... | gpl-3.0 | -6,630,862,513,542,238,000 | 46.342105 | 99 | 0.550862 | false | 4.024609 | false | false | false |
ryfeus/lambda-packs | Tensorflow_OpenCV_Nightly/source/tensorflow/contrib/seq2seq/ops/gen_beam_search_ops.py | 3 | 2306 | """Python wrappers around TensorFlow ops.
This file is MACHINE GENERATED! Do not edit.
"""
import collections as _collections
from google.protobuf import text_format as _text_format
from tensorflow.core.framework import op_def_pb2 as _op_def_pb2
# Needed to trigger the call to _set_call_cpp_shape_fn.
from tensorfl... | mit | 8,465,168,776,607,803,000 | 25.204545 | 75 | 0.655247 | false | 3.22067 | false | false | false |
iivvoo/resturo | resturo/serializers.py | 1 | 2545 | from django.contrib.auth.models import User
from rest_framework import serializers
from rest_framework_jwt.settings import api_settings
from .models import EmailVerification, modelresolver
class UserSerializer(serializers.ModelSerializer):
class Meta:
model = User
fields = ('id', 'username', 'fi... | isc | -2,698,504,682,134,451,000 | 28.941176 | 72 | 0.634578 | false | 4.365352 | false | false | false |
toshka/torrt | torrt/notifiers/mail.py | 1 | 2079 | import logging
import socket
from email.mime.text import MIMEText
from smtplib import SMTP, SMTPAuthenticationError
from torrt.base_notifier import BaseNotifier
from torrt.utils import NotifierClassesRegistry
LOGGER = logging.getLogger(__name__)
class EmailNotifier(BaseNotifier):
alias = 'email'
def __init... | bsd-3-clause | -2,388,599,502,392,679,400 | 29.573529 | 111 | 0.599327 | false | 4.158 | false | false | false |
nagyv/account-financial-tools | account_netting/wizard/account_move_make_netting.py | 14 | 4813 | # -*- coding: utf-8 -*-
# (c) 2015 Pedro M. Baeza
# License AGPL-3 - See http://www.gnu.org/licenses/agpl-3.0.html
from openerp import models, fields, api, exceptions, _
class AccountMoveMakeNetting(models.TransientModel):
_name = "account.move.make.netting"
journal = fields.Many2one(
comodel_name="... | agpl-3.0 | -521,005,906,590,457,400 | 40.852174 | 79 | 0.534178 | false | 4.09617 | false | false | false |
boraklavun/python- | Kullanıcı Veritabanı.py | 1 | 1722 |
babaListe=list()
Ad_Soyad = input('Ad_Soyad:')
babaListe.insert(1,Ad_Soyad)
Yas = input('Yas:')
babaListe.insert(2,Yas)
Boy = input('Boy:')
babaListe.insert(3,Boy)
print(babaListe)
print('======================')
anneListe=list()
Ad_Soyad = input('Ad_Soyad:')
anneListe.insert(1,Ad_Soyad)
Yas = input('Yas:')
anneList... | gpl-3.0 | 6,551,307,017,379,564,000 | 18.568182 | 32 | 0.622532 | false | 2.202046 | false | true | false |
levilucio/SyVOLT | UMLRT2Kiltera_MM/Properties/unit_contracts/HUnitR03b_ConnectedLHS.py | 1 | 2112 | from core.himesis import Himesis, HimesisPreConditionPatternLHS
import uuid
class HUnitR03b_ConnectedLHS(HimesisPreConditionPatternLHS):
def __init__(self):
"""
Creates the himesis graph representing the AToM3 model HUnitR03b_ConnectedLHS
"""
# Flag this instance as compiled now
self.is_compiled = True
s... | mit | 7,741,502,801,073,365,000 | 29.608696 | 100 | 0.645833 | false | 2.721649 | false | false | false |
desbma/glances | glances/exports/glances_export.py | 1 | 5467 | # -*- coding: utf-8 -*-
#
# This file is part of Glances.
#
# Copyright (C) 2015 Nicolargo <nicolas@nicolargo.com>
#
# Glances is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the Lic... | lgpl-3.0 | 1,691,273,024,867,034,400 | 32.335366 | 85 | 0.532468 | false | 4.441105 | false | false | false |
rpwagner/tiled-display | flWii/moteCursor.py | 1 | 3801 | import time, sys, os
from mote import detectAllPossible
from moteCache import MoteCache
from mote import Mote
import traceback
from connectToMote import connectToMote
from moteX11 import MoteX11, Rect
class MoteMouseProcessor:
def __init__(self, connectedMote):
self.mote = connectedMote
def processM... | apache-2.0 | -2,776,247,221,308,069,400 | 37.01 | 130 | 0.534333 | false | 3.816265 | false | false | false |
oldm/OldMan | oldman/iri.py | 1 | 3706 | from uuid import uuid1
from .exception import OMDataStoreError, OMRequiredHashlessIRIError
class IriGenerator(object):
"""An :class:`~oldman.iri.IriGenerator` object generates
the IRIs of some new :class:`~oldman.resource.Resource` objects.
"""
def __init__(self):
pass
def generate(self,... | bsd-3-clause | 6,700,871,481,564,555,000 | 33.635514 | 116 | 0.650027 | false | 3.797131 | false | false | false |
abhilashnta/edx-platform | openedx/core/djangoapps/profile_images/views.py | 23 | 6206 | """
This module implements the upload and remove endpoints of the profile image api.
"""
from contextlib import closing
import datetime
import logging
from django.utils.translation import ugettext as _
from django.utils.timezone import utc
from rest_framework import permissions, status
from rest_framework.parsers impo... | agpl-3.0 | 1,304,677,595,282,145,000 | 33.670391 | 114 | 0.662101 | false | 4.600445 | false | false | false |
samrose3/eventhunt | src/eventhunt/settings/base.py | 1 | 2084 | """Django settings for eventhunt project."""
import datetime
import os
BASE_DIR = os.path.dirname(os.path.dirname(os.path.dirname(__file__))) # remove /sswmain/settings to get base folder
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ajsdgas7&*kosdsa21[]jaksdhlka-;kmcv8l$#diepsm8&... | mit | -7,201,158,964,377,637,000 | 24.108434 | 117 | 0.706334 | false | 3.383117 | false | false | false |
rmg/Skoarcery | Skoarcery/factoary/Code_Parser_Py.py | 1 | 4401 | import unittest
from Skoarcery import langoids, terminals, nonterminals, dragonsets, parsetable, emissions
from Skoarcery.langoids import Terminal, Nonterminal
class Code_Parser_Py(unittest.TestCase):
def setUp(self):
terminals.init()
nonterminals.init()
langoids.init()
dragonsets... | artistic-2.0 | -8,356,453,499,325,439,000 | 24.293103 | 111 | 0.416951 | false | 3.954178 | false | false | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/gpuarray/tests/rnn_support.py | 1 | 8280 | from __future__ import absolute_import, print_function, division
import theano
import theano.tensor as T
import numpy as np
class Model(object):
def __init__(self, name=""):
self.name = name
self.layers = []
self.params = []
self.other_updates = {}
def add_layer(self, layer):... | agpl-3.0 | 5,858,367,406,402,465,000 | 34.844156 | 111 | 0.575242 | false | 3.179724 | false | false | false |
google-research/google-research | ebp/ebp/common/generator.py | 1 | 17042 | # 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 | -4,928,008,984,375,269,000 | 33.084 | 80 | 0.600047 | false | 3.191984 | false | false | false |
GeoMop/GeoMop | src/gm_base/model_data/validation/validator.py | 1 | 7817 | """Validator for Flow123D data structure
.. codeauthor:: Tomas Krizek <tomas.krizek1@tul.cz>
"""
from ..notifications import Notification
from gm_base.geomop_util import TextValue, Span, Parameter
from . import checks
from ..data_node import DataNode
from ..format import is_scalar, is_param
class Validator:
"""... | gpl-3.0 | 4,545,214,501,728,727,600 | 41.950549 | 94 | 0.594346 | false | 4.740449 | false | false | false |
aevri/phabricator-tools | py/phl/phlgit_fetch__t.py | 4 | 3223 | """Test suite for phlgit_fetch."""
# =============================================================================
# TEST PLAN
# -----------------------------------------------------------------------------
# Here we detail the things we are concerned to test and specify which tests
# ... | apache-2.0 | -1,273,190,873,056,103,700 | 35.625 | 79 | 0.56345 | false | 4.013699 | true | false | false |
seasonstar/bibi | application/services/jobs/image.py | 1 | 2773 | from PIL import Image, ImageOps
import urllib.request
from io import StringIO
import boto
from boto.s3.key import Key
from configs import settings
from application.cel import celery
@celery.task
def upload(space, path, image=None, url=None, async=True, make_thumbnails=True):
conn = boto.connect_s3(settings.AWS_... | apache-2.0 | -7,345,736,648,261,493,000 | 26.186275 | 86 | 0.612333 | false | 3.305125 | false | false | false |
BrainTech/openbci | obci/interfaces/bci/p300_fda_lines/signalParser.py | 2 | 12389 | from xml.dom import minidom
import numpy as np
import os.path as osp
# A map from xml`s sample_type string to numpy.fromfile function argument.
# Numpy treats 'float' as float64 (=double) and 'float32' as float32
NP_TYPES = {'double': 'float',
'float': 'float32'}
class signalParser(object):
"""This c... | gpl-3.0 | 2,992,136,461,262,662,000 | 36.429003 | 142 | 0.563161 | false | 4.150419 | false | false | false |
beckdaniel/GPyOpt | GPyOpt/core/bo.py | 2 | 13393 | # Copyright (c) 2015, Javier Gonzalez
# Copyright (c) 2015, the GPy Authors (see GPy AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
import time
from ..util.general import best_value, reshape, spawn
from ..core.optimization import lp_batch_optimization, random_batch_optimiza... | bsd-3-clause | -6,851,183,451,001,491,000 | 47.701818 | 191 | 0.583962 | false | 4.034036 | false | false | false |
bcaine/maddux | maddux/objects/obstacle.py | 1 | 3774 | """
A stationary rectangular solid that something may collide with
"""
import numpy as np
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from static import StaticObject
class Obstacle(StaticObject):
def __init__(self, pt1, pt2, color='r'):
"""Create a 3D Rectangle from 2 points
:param p... | mit | 888,665,443,313,857,300 | 27.164179 | 78 | 0.515633 | false | 3.203735 | false | false | false |
UU-Hydro/PCR-GLOBWB_model | modflow/scripts/groundwater_MODFLOW.py | 1 | 104750 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# PCR-GLOBWB (PCRaster Global Water Balance) Global Hydrological Model
#
# Copyright (C) 2016, Ludovicus P. H. (Rens) van Beek, Edwin H. Sutanudjaja, Yoshihide Wada,
# Joyce H. C. Bosmans, Niels Drost, Inge E. M. de Graaf, Kor de Jong, Patricia Lopez Lopez,
# Stefanie Pes... | gpl-3.0 | 8,623,587,767,162,142,000 | 59.795125 | 217 | 0.561718 | false | 4.021576 | false | false | false |
rosswhitfield/mantid | Framework/PythonInterface/test/python/mantid/kernel/ArrayOrderedPairsValidatorTest.py | 3 | 2171 | # Mantid Repository : https://github.com/mantidproject/mantid
#
# Copyright © 2018 ISIS Rutherford Appleton Laboratory UKRI,
# NScD Oak Ridge National Laboratory, European Spallation Source,
# Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
# SPDX - License - Identifier: GPL - 3.0 +
impo... | gpl-3.0 | -2,631,381,919,034,988,500 | 36.431034 | 91 | 0.655919 | false | 3.788831 | true | false | false |
pra85/calibre | src/calibre/ebooks/oeb/transforms/jacket.py | 4 | 8883 | #!/usr/bin/env python
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:ai
from __future__ import with_statement
__license__ = 'GPL v3'
__copyright__ = '2009, Kovid Goyal <kovid@kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
import sys
from xml.sax.saxutils import escape
from lxml import etree
from calibre ... | gpl-3.0 | 1,269,841,315,977,730,300 | 32.647727 | 98 | 0.545874 | false | 3.880734 | false | false | false |
Scienziatopazzo/machine-learning | logistic_regression_test.py | 1 | 2071 | from logistic_regression import LogRegression
import random
def random_point():
'''
Returns a random 2-dimensional vector of floats between -1 and +1
'''
return [random.uniform(-1., 1.), random.uniform(-1., 1.)]
def generate_line():
'''
Randomly generates a line from 2 random points in [-1,1]x... | mit | -4,998,428,522,859,220,000 | 26.613333 | 119 | 0.571222 | false | 3.340323 | false | false | false |
ojimac/RenoirKensaku-by-Titanium | scripts/crowl.py | 1 | 2707 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import urllib
import chardet
from pyquery import PyQuery as pq
#urls = [
# 'http://standard.navitime.biz/renoir/AroundMapSearch.act?acode=13&count=127',
# 'http://standard.navitime.biz/renoir/AroundMapSearch.act?page=1&count=127&acode=13&cond=0.0.0.0.0.0&isDefaultSearch... | apache-2.0 | -4,669,841,154,816,645,000 | 55.395833 | 127 | 0.700776 | false | 2.511132 | false | false | false |
csdms-contrib/gc2d | python/src/models/gc2d.py | 1 | 76335 | #!/usr/bin/env python
import sys
import getopt
import numpy
import time
import scipy
import logging
from scipy import interpolate
from scipy import signal
from scipy.io.numpyio import fwrite
# Available Mass Balance
class MassBalance:
( BAD_VAL ,
ZERO_BALANCE ,
CONSTANT_ELA ,
ELA_LOWERING ,
EL... | apache-2.0 | -1,780,222,918,545,055,700 | 36.272949 | 260 | 0.514888 | false | 3.08499 | false | false | false |
cindy-zimmerman/vmb-mrest | flask_mrest/models.py | 1 | 12211 | import base64
import json
from sqlalchemy.exc import IntegrityError, InvalidRequestError
import sqlalchemy as sa
from alchemyjsonschema import BaseModelWalker, SingleModelWalker, SchemaFactory
from errorhandlers import page_not_found
from flask import current_app, make_response, request
from jsonschema import validate,... | mit | 398,567,916,959,636,160 | 34.291908 | 114 | 0.577266 | false | 3.994439 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.