repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
alphagov/notifications-admin | tests/app/main/views/test_find_services.py | 1 | 3171 | from flask import url_for
from tests import service_json
def test_find_services_by_name_page_loads_correctly(client_request, platform_admin_user):
client_request.login(platform_admin_user)
document = client_request.get('main.find_services_by_name')
assert document.h1.text.strip() == 'Find services by na... | mit | 1,560,063,213,959,604,200 | 33.096774 | 116 | 0.668243 | false | 3.431818 | true | false | false |
rwl/PyCIM | CIM14/IEC61968/Metering/DynamicDemand.py | 1 | 2894 | # Copyright (C) 2010-2011 Richard Lincoln
#
# 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, merge, publish... | mit | -8,450,176,945,924,258,000 | 55.745098 | 663 | 0.719074 | false | 4.087571 | false | false | false |
cmrust/VineyardMonitor-ATT | tem.py | 1 | 1668 | import serial
import threading
from datetime import datetime
from m2x.client import M2XClient
# instantiate our M2X API client
client = M2XClient(key='#REMOVED#')
# instantiate our serial connection to the Arduino
arduino = serial.Serial('/dev/ttyUSB0', 9600)
# instantiate our global variables
temp = 0
light = 0
now... | mit | 6,485,409,181,414,895,000 | 23.173913 | 62 | 0.716427 | false | 3.189293 | false | false | false |
mscuthbert/abjad | abjad/tools/abjadbooktools/test/test_LaTeXDocumentHandler_hide.py | 1 | 2580 | # -*- encoding: utf-8 -*-
import platform
import unittest
from abjad.tools import abjadbooktools
from abjad.tools import systemtools
@unittest.skipIf(
platform.python_implementation() != 'CPython',
'Only for CPython',
)
class TestLaTeXDocumentHandler(unittest.TestCase):
def test_hide_1(self):
... | gpl-3.0 | 6,283,707,193,494,840,000 | 28.329545 | 81 | 0.468992 | false | 4.243421 | true | false | false |
dcherian/pyroms | pyroms/pyroms/remapping/remap.py | 1 | 5885 | import numpy as np
try:
import netCDF4 as netCDF
except:
import netCDF3 as netCDF
import pyroms
def remap(src_array, remap_file, src_grad1=None, src_grad2=None, \
src_grad3=None, spval=1e37, verbose=False):
'''
remap based on addresses and weights computed in a setup phase
'''
# ... | bsd-3-clause | 3,416,160,935,299,170,300 | 36.967742 | 83 | 0.492438 | false | 3.671241 | false | false | false |
joshzarrabi/e-mission-server | emission/net/api/cfc_webapp.py | 1 | 21790 | # Standard imports
import json
from random import randrange
from bottle import route, post, get, run, template, static_file, request, app, HTTPError, abort, BaseRequest, JSONPlugin
import bottle as bt
# To support dynamic loading of client-specific libraries
import sys
import os
import logging
logging.basicConfig(forma... | bsd-3-clause | -3,426,859,423,235,193,300 | 38.403255 | 128 | 0.716613 | false | 3.488633 | true | false | false |
igmhub/pyLyA | py/picca/data.py | 1 | 43998 | """This module defines data structure to deal with line of sight data.
This module provides with three classes (QSO, Forest, Delta)
to manage the line-of-sight data.
See the respective docstrings for more details
"""
import numpy as np
import iminuit
import fitsio
from picca import constants
from picca.utils import ... | gpl-3.0 | 5,412,465,735,005,068 | 36.097808 | 97 | 0.557275 | false | 4.019551 | false | false | false |
FylmTM/edX-code | MITx_6.00.1x/final_exam/problem_7.py | 1 | 1961 | class Frob(object):
def __init__(self, name):
self.name = name
self.before = None
self.after = None
def setBefore(self, before):
# example: a.setBefore(b) sets b before a
self.before = before
def setAfter(self, after):
# example: a.setAfter(b) sets b after a
... | mit | 4,611,521,960,080,144,400 | 26.236111 | 69 | 0.609893 | false | 3.340716 | false | false | false |
Razbit/razttthon | src/player.py | 1 | 2608 | # Razttthon, a python-implemented Tic-tac-toe game.
# Copyright Eetu 'Razbit' Pesonen, 2014
#
# This file is a part of Razttthon, which is free software: you can redistribute
# it and/or modify it under the terms of the GNU General Public License
# version 3 as published by the Free Software Foundation.
#
# Razttthoni... | gpl-3.0 | -5,719,532,197,032,230,000 | 32.435897 | 109 | 0.610813 | false | 3.812865 | false | false | false |
borjam/exabgp | src/exabgp/bgp/neighbor.py | 2 | 17189 | # encoding: utf-8
"""
neighbor.py
Created by Thomas Mangin on 2009-11-05.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
from collections import deque
from collections import Counter
from exabgp.protocol.family import AFI
from exabgp.util.dns import ho... | bsd-3-clause | -2,980,760,986,235,840,500 | 35.965591 | 116 | 0.507127 | false | 3.774484 | false | false | false |
malisal/bfdpie | setup.py | 1 | 1563 | import os
import distutils
from setuptools import setup, Extension, Command
from distutils.command import build as build_module
from distutils.command.install import install
BINUTILS_VERSION = "binutils-2.26"
module = Extension(
name = "bfdpie._bfdpie",
sources = ["bfdpie.c"],
# Include dir is our own binu... | mit | -7,680,653,282,204,861,000 | 22.681818 | 118 | 0.633397 | false | 3.488839 | false | false | false |
schreiberx/sweet | scripts/pp_plot_lonlat_csv.py | 1 | 2786 | #! /usr/bin/python3
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
import numpy as np
import sys
first = True
s = 2e-5
eta_contour_levels = np.append(np.arange(-1e-4, 0, s), np.arange(s, 1e-4, s))
hs = 5
h_contour_levels = np.append(np.arange(900, 1000-hs, hs), np.arange(1000+hs, 1100, hs))... | mit | 2,323,065,064,202,803,000 | 21.836066 | 131 | 0.660804 | false | 2.483066 | false | false | false |
skosukhin/spack | var/spack/repos/builtin/packages/aspell/package.py | 1 | 3695 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -2,902,301,946,385,594,400 | 42.470588 | 78 | 0.651421 | false | 4.038251 | false | false | false |
rwalk333/pyquadprog | test/test.py | 1 | 2107 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Test routines for the quadprog package. Excepted where noted, all examples are drawn
from the R quadprog package documentation and test suite.
"""
import numpy as np
import quadprog
import unittest
class TestQuadprog(unittest.TestCase):
def setUp(self):
... | lgpl-2.1 | -8,512,066,933,382,506,000 | 30.924242 | 100 | 0.505458 | false | 3.116864 | true | false | false |
crustycrab/Risk-Prototype | graphics.py | 1 | 1788 | import pygame
import os
import random
import res
class Camera:
def __init__(self):
self.x = self.y = 0
self.speed = 500
def update(self, dt, key_state):
speed = self.speed * dt
if key_state[0]:
self.x = min(self.x + speed, 0)
if key_state[1]:
self.x = max(self.x - speed, res.WIN_WIDTH - res.MAP_WID... | mit | 574,214,615,529,656,260 | 24.913043 | 108 | 0.553691 | false | 2.912052 | false | false | false |
tonybeltramelli/Deep-Lyrics | gather.py | 1 | 3064 | #!/usr/bin/env python
__author__ = 'Tony Beltramelli www.tonybeltramelli.com - 09/07/2016'
import argparse
import os
import urllib2
import re
import codecs
from threading import Thread
from HTMLParser import HTMLParser
DOMAIN = "songmeanings.com/"
ARTIST_PATH = 'artist/view/songs/'
def start_new_thread(task, arg):
... | mit | 6,959,599,421,735,938,000 | 26.357143 | 79 | 0.579308 | false | 3.462147 | false | false | false |
Naeka/vosae-app | www/notification/api/resources/invoicing_notifications/make_invoice.py | 1 | 3176 | # -*- coding:Utf-8 -*-
from tastypie_mongoengine import fields
from notification.api.resources.base import NotificationBaseResource
from notification.api.doc import HELP_TEXT
from notification.models import invoicing_notifications
__all__ = (
'QuotationMakeInvoiceResource',
'QuotationMakeDownPaymentInvoiceR... | agpl-3.0 | 2,691,955,120,545,300,000 | 37.26506 | 82 | 0.732997 | false | 4.229028 | false | false | false |
talapus/Ophidian | Flask_fu/shell.py | 1 | 1369 | import sys
from datetime import datetime
import logging
from logging.handlers import RotatingFileHandler
from flask import Flask
from os import popen
app = Flask(__name__)
@app.route('/')
def main_form():
# app.logger.warning('A warning occurred (%d apples)', 42)
# app.logger.error('An error occurred')
# ... | bsd-3-clause | 404,746,768,136,102,460 | 30.136364 | 141 | 0.652301 | false | 3.492347 | false | false | false |
PurpleMyst/porcupine | porcupine/_logs.py | 1 | 2465 | import itertools
import logging
import os
import platform
import sys
if platform.system() == 'Windows': # noqa
import msvcrt
else: # noqa
import fcntl
from porcupine import dirs
def _lock(fileno):
"""Try to lock a file. Return True on success."""
# closing the file unlocks it, so we don't need to... | mit | -8,319,217,412,416,285,000 | 28.698795 | 74 | 0.625963 | false | 3.975806 | false | false | false |
malirod/pylua | pylua/validator.py | 1 | 2300 | # -*- coding: utf-8 -*-
import xml.etree.ElementTree as etree
from json import JSONDecoder
class Validator:
_errors = [(0, 'Ok'), (1, "Function not found"), (2, "Validation error")]
_error_index_ok = 0
_error_index_not_found = 1
_error_index_error = 2
def __init__(self):
self._schema = ... | mit | -6,456,706,902,619,544,000 | 35.507937 | 77 | 0.600435 | false | 4.174229 | false | false | false |
gjover/Lima_subtree | applications/tango/camera/Maxipix.py | 1 | 25664 |
############################################################################
# This file is part of LImA, a Library for Image Acquisition
#
# Copyright (C) : 2009-2011
# European Synchrotron Radiation Facility
# BP 220, Grenoble 38043
# FRANCE
#
# This is free software; you can redistribute it and/or modify
# it under... | gpl-3.0 | -6,498,890,244,258,648,000 | 31.944801 | 122 | 0.501364 | false | 3.85519 | true | false | false |
earwig/earwigbot | earwigbot/commands/help.py | 1 | 3230 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009-2015 Ben Kurtovic <ben.kurtovic@gmail.com>
#
# 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 ... | mit | -3,154,985,194,490,449,000 | 39.375 | 120 | 0.635913 | false | 3.882212 | false | false | false |
qPCR4vir/orange3 | Orange/widgets/classify/owclassificationtree.py | 1 | 2938 | from collections import OrderedDict
from Orange.data import Table
from Orange.classification.tree import TreeLearner
from Orange.widgets import gui
from Orange.widgets.settings import Setting
from Orange.widgets.utils.owlearnerwidget import OWBaseLearner
class OWClassificationTree(OWBaseLearner):
name = "Classif... | bsd-2-clause | 3,757,405,505,065,211,000 | 36.666667 | 92 | 0.614364 | false | 3.917333 | false | false | false |
saltastro/pysalt | saltspec/InterIdentify.py | 1 | 46552 | # Copyright (c) 2009, South African Astronomical Observatory (SAAO) #
# All rights reserved. See LICENSE for more details #
"""INTERIDENTIFY provides an interactive method for identifying
lines in an arc image. The tasks displays the full image, a
line extracted from the image, and resid... | bsd-3-clause | -5,777,721,175,345,980,000 | 36.034208 | 135 | 0.576237 | false | 3.639719 | false | false | false |
boytm/transparent_proxy | tcp_proxy.py | 1 | 5604 | #!/usr/bin/env python
# vim: set fileencoding=utf-8 :
import sys
import socket
import struct
import tornado.ioloop
import tornado.tcpserver
import tornado.tcpclient
#import tornado.web
from tornado import gen
import functools
class TCPProxyHandler(tornado.tcpserver.TCPServer):
@gen.coroutine
def handle_str... | apache-2.0 | 2,496,638,393,646,806,000 | 29.791209 | 98 | 0.597252 | false | 3.738492 | false | false | false |
codingvirtual/fullstack-p4-conference | constants.py | 1 | 3218 | __author__ = 'Greg'
from protorpc import messages
from protorpc import message_types
from models import *
""" - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - """
""" Default values for a new conference. Used only if the user creating
the conference doesn't supply values for a given field and only fie... | apache-2.0 | -6,473,297,852,493,102,000 | 28.53211 | 77 | 0.699503 | false | 3.619798 | false | false | false |
CoDaS-Lab/image_analysis | demo/demo_features.py | 1 | 1262 | # Copyright 2017 Codas Lab
#
# 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, softwa... | apache-2.0 | -6,162,282,703,088,598,000 | 29.047619 | 80 | 0.654517 | false | 4.019108 | false | false | false |
edocappelli/crystalpy | crystalpy/diffraction/GeometryType.py | 1 | 2379 | """
Represents geometry types/setups: Bragg diffraction, BraggTransmission, Laue diffraction, Laue transmission.
"""
class GeometryType(object):
def __init__(self, description):
"""
Constructor.
:param description: Description of the geometry type, e.g. "Bragg transmission"
"""
... | mit | -4,599,577,668,534,421,500 | 26.662791 | 108 | 0.605717 | false | 4.548757 | false | false | false |
klahnakoski/TestFailures | pyLibrary/debugs/exceptions.py | 1 | 7358 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http://mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import
from _... | mpl-2.0 | 7,010,921,535,276,321,000 | 23.858108 | 117 | 0.554499 | false | 3.889006 | false | false | false |
vermouth1992/Leetcode | python/576.out-of-boundary-paths.py | 1 | 2536 | #
# @lc app=leetcode id=576 lang=python3
#
# [576] Out of Boundary Paths
#
# https://leetcode.com/problems/out-of-boundary-paths/description/
#
# algorithms
# Medium (36.32%)
# Total Accepted: 37.6K
# Total Submissions: 103.6K
# Testcase Example: '2\n2\n2\n0\n0'
#
# There is an m x n grid with a ball. The ball is i... | mit | -6,378,149,178,022,609,000 | 26.879121 | 94 | 0.521293 | false | 3.230573 | false | false | false |
richardliaw/ray | rllib/utils/exploration/ornstein_uhlenbeck_noise.py | 1 | 9037 | import numpy as np
from typing import Optional, Union
from ray.rllib.models.action_dist import ActionDistribution
from ray.rllib.utils.annotations import override
from ray.rllib.utils.exploration.gaussian_noise import GaussianNoise
from ray.rllib.utils.framework import try_import_tf, try_import_torch, \
get_variab... | apache-2.0 | -3,410,992,502,494,740,500 | 43.29902 | 79 | 0.565674 | false | 4.158767 | false | false | false |
zejn/babbage | tests/test_model.py | 1 | 2196 | from .util import TestCase, load_json_fixture
from babbage.model import Model
class ModelTestCase(TestCase):
def setUp(self):
super(ModelTestCase, self).setUp()
self.simple_model_data = load_json_fixture('models/simple_model.json')
self.simple_model = Model(self.simple_model_data)
de... | mit | 2,243,494,680,258,463,000 | 37.526316 | 78 | 0.636612 | false | 3.623762 | true | false | false |
sebastianlan/wedfairy-api | rsvp/migrations/0001_initial.py | 1 | 1612 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Attendance',
fields=[
('id', models.AutoField(s... | mit | 7,234,744,672,930,323,000 | 29.415094 | 96 | 0.466501 | false | 4.645533 | false | false | false |
lgfausak/sqlbridge | sqlbridge/scripts/cli.py | 1 | 4335 | #!/usr/bin/env python
###############################################################################
##
## Copyright (C) 2014 Greg Fausak
##
## 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... | apache-2.0 | 7,169,285,442,915,159,000 | 42.787879 | 138 | 0.599539 | false | 3.980716 | false | false | false |
bjura/pisak2 | pisak/resources.py | 1 | 1489 | import os.path
from PyQt5.QtCore import QObject, QStandardPaths, QDir, pyqtSlot, pyqtProperty
from .res import getRes
class Resources(QObject):
appDataDir = QStandardPaths.writableLocation(QStandardPaths.AppDataLocation)
soundFileExt = '.wav'
iconFileExt = '.svg'
homeAppDir = os.path.join(QStan... | gpl-3.0 | 8,239,106,199,094,781,000 | 29.387755 | 105 | 0.703156 | false | 3.631707 | false | false | false |
nitehawck/dem | dem/dependency/url.py | 1 | 1463 | import os
import wget
from dem.dependency.archive import ArchiveInstaller
from dem.project.reader import Config
class UrlInstaller:
def __init__(self, project, packages, cache):
self._packages = packages
self._project = project
self._download_directory = os.path.join('.devenv', project, '... | mit | 6,745,438,510,528,294,000 | 37.5 | 116 | 0.583049 | false | 4.063889 | false | false | false |
edx/edx-val | edxval/management/commands/verify_pact.py | 1 | 1671 | """
Management command to verify VEM pact.
"""
import logging
from django.conf import settings
from django.core.management.base import BaseCommand
from pact import Verifier
log = logging.getLogger(__name__)
class Command(BaseCommand):
"""
Management command to verify VAL provider pacts.
Example Usage... | agpl-3.0 | 2,924,957,101,037,660,700 | 29.381818 | 102 | 0.622382 | false | 4.23038 | false | false | false |
rcmorano/gecosws-config-assistant | firstboot/validation.py | 1 | 1642 | # -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# This file is part of Guadalinex
#
# This software 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, ... | gpl-2.0 | 2,564,201,980,378,884,000 | 31.156863 | 83 | 0.656098 | false | 3.111954 | false | false | false |
Micronaet/micronaet-product | inventory_field/inventory.py | 1 | 3807 | # -*- coding: utf-8 -*-
###############################################################################
#
# Copyright (C) 2001-2014 Micronaet SRL (<http://www.micronaet.it>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License a... | agpl-3.0 | 1,827,273,622,032,613,400 | 35.961165 | 79 | 0.628054 | false | 4.20663 | false | false | false |
powderblock/PyBad-Translator | translate.py | 1 | 3795 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# "THE BEER-WARE LICENSE" (Revision 42):
# <terry.yinzhe@gmail.com> wrote this file. As long as you retain this notice you
# can do whatever you want with this stuff. If we meet some day, and you think
# this stuff is w... | mit | -4,403,544,834,307,570,700 | 39.37234 | 156 | 0.566535 | false | 3.673766 | false | false | false |
SNET-Entrance/Entrance-UM | src/cm/models.py | 1 | 9801 | import uuid
from bootstrap import db, all_attr, policy_mode
from bootstrap.models import Ext, AttrAuth
from um.models import Contact, Attribute
class Container(db.Model, Ext):
id = db.Column(db.Integer, primary_key=True, autoincrement=True)
name = db.Column(db.Text, nullable=False) # name of the container
... | apache-2.0 | 6,430,938,400,690,601,000 | 49.261538 | 166 | 0.550352 | false | 4.638429 | false | false | false |
PXke/invenio | invenio/ext/assets/extensions.py | 1 | 8258 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2012, 2013 CERN.
##
## Invenio 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... | gpl-2.0 | -8,043,150,594,907,580,000 | 35.061135 | 85 | 0.553039 | false | 4.191878 | false | false | false |
gr33ndata/dysl | dysl/corpora/corpuslib/train.py | 1 | 3488 | import os
import codecs
import time
from datetime import datetime
class Train:
def __init__(self, root=''):
# Setting root directory for training data
if root:
self.root = root
self.using_builtin_training = False
else:
#self.root = 'corpora/corpus-esare... | mit | -8,860,003,400,784,678,000 | 28.820513 | 84 | 0.509461 | false | 4.192308 | false | false | false |
ondrokrc/gramps | gramps/gen/filters/rules/_hasldsbase.py | 1 | 2527 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2008 Brian G. Matherly
# Copyright (C) 2008 Jerome Rapinat
# Copyright (C) 2008 Benny Malengier
#
# 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 Fre... | gpl-2.0 | -4,215,482,488,620,058,600 | 34.591549 | 79 | 0.540166 | false | 4.402439 | false | false | false |
att-comdev/drydock | drydock_provisioner/control/health.py | 1 | 4369 | # Copyright 2018 AT&T Intellectual Property. All other 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 | 5,482,039,274,584,251,000 | 33.674603 | 89 | 0.642939 | false | 4.098499 | false | false | false |
thedemz/python-gems | scrypto.py | 1 | 5153 | #https://bitbucket.org/mhallin/py-scrypt/src
#pip3.4 install scrypt
#pip3.4 install pycrypto
import struct
from binascii import b2a_base64 as e64
from binascii import a2b_base64 as d64
import scrypt
import Crypto.Random
random = Crypto.Random.new().read
#from passlib.utils import consteq
def consteq(left, right):
... | mit | 2,875,160,194,208,963,600 | 34.784722 | 116 | 0.668737 | false | 3.720578 | false | false | false |
forScie/RAAED | RAAEDServer.py | 1 | 5949 | #!/usr/bin/env python3
# RAAED Server software: v1.0
# A GUI RAAED Server
# Detects a reverse SSH connection bound to port 22 from an RAAED Client.
#
# DESCRIPTION
# The server is designed to continually check for the prescence of a reverse SSH session on port 22.
# The GUI will then reflect the presence of the revers... | gpl-3.0 | -6,022,877,912,289,613,000 | 31.872928 | 126 | 0.723651 | false | 3.476914 | false | false | false |
nel215/py-sae | dataset.py | 1 | 1536 | #coding: utf-8
import requests
import os.path
import pickle
def get_binary_dataset():
# 0-1 dataset
dataset = requests.get('https://archive.ics.uci.edu/ml/machine-learning-databases/spect/SPECT.train').text
dataset = map(lambda row: row.split(','), dataset.split('\n'))
titles = dataset[0]
dataset =... | mit | -6,360,485,346,207,833,000 | 31.680851 | 110 | 0.617188 | false | 3.289079 | false | false | false |
MGautier/security-sensor | trunk/version-1-0/webapp/secproject/secproject/settings.py | 1 | 3617 | """
Django settings for secproject project.
Generated by 'django-admin startproject' using Django 1.9.
For more information on this file, see
https://docs.djangoproject.com/en/1.9/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.9/ref/settings/
"""
import os
... | mit | -4,357,623,697,613,626,400 | 25.021583 | 91 | 0.679292 | false | 3.421949 | false | false | false |
jwacalex/MULTEX-EAST-PoS-Tagger | MTEDownloader.py | 1 | 3734 | """
Downloader for multex east corpus.
"""
import os
from os.path import expanduser, abspath
import sys
import urllib
import zipfile
import nltk.data
isCustomPath = False
def main():
download()
def download():
try:
__download__()
except KeyboardInterrupt:
print("\nDiscarded download d... | lgpl-3.0 | 4,770,773,840,565,016,000 | 28.171875 | 118 | 0.580343 | false | 3.65362 | false | false | false |
bak1an/django | django/utils/timesince.py | 1 | 2806 | import calendar
import datetime
from django.utils.html import avoid_wrapping
from django.utils.timezone import is_aware, utc
from django.utils.translation import gettext, ngettext_lazy
TIMESINCE_CHUNKS = (
(60 * 60 * 24 * 365, ngettext_lazy('%d year', '%d years')),
(60 * 60 * 24 * 30, ngettext_lazy('%d month'... | bsd-3-clause | -6,810,944,789,384,965,000 | 34.974359 | 101 | 0.629722 | false | 3.542929 | false | false | false |
seece/cbpp | minifyoperation.py | 1 | 1252 | import re
from util import *
from operation import Operation, OperationResult
class Replacement:
def __init__(self, regex, substitution):
self.regex = regex
self.substitution = substitution
class MinifyOperation(Operation):
def __init__(self):
self.inMultilineComment = False
pass
def apply(self, line, sta... | mit | -1,057,761,309,854,611,000 | 23.54902 | 122 | 0.620607 | false | 2.884793 | false | false | false |
SummerLW/Perf-Insight-Report | dashboard/dashboard/bisect_stats.py | 1 | 3742 | # Copyright 2015 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.
"""URL endpoints to show bisect stats."""
import datetime
import json
from dashboard import layered_cache
from dashboard import request_handler
from dashbo... | bsd-3-clause | -2,050,621,821,403,550,200 | 27.564885 | 79 | 0.656868 | false | 3.574021 | false | false | false |
pytorch/fairseq | fairseq/modules/layer_norm.py | 1 | 1500 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
import torch
import torch.nn as nn
import torch.nn.functional as F
try:
from apex.normalization import FusedLayerNorm as _FusedLayerNorm... | mit | 4,775,746,740,642,711,000 | 29 | 81 | 0.639333 | false | 3.778338 | false | false | false |
sadig/DC2 | components/dc2-admincenter/dc2/admincenter/apps/main.py | 1 | 3768 | # -*- coding: utf-8 -*-
#
# (DC)² - DataCenter Deployment Control
# Copyright (C) 2010, 2011, 2012, 2013, 2014 Stephan Adig <sh@sourcecode.de>
# 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; eit... | gpl-2.0 | -5,261,619,635,792,575,000 | 31.196581 | 76 | 0.655694 | false | 3.812753 | false | false | false |
usc-isi-i2/etk | etk/utilities.py | 1 | 2077 | import datetime
import hashlib
import json
from typing import Dict
import uuid
import warnings
class Utility(object):
@staticmethod
def make_json_serializable(doc: Dict):
"""
Make the document JSON serializable. This is a poor man's implementation that handles dates and nothing else.
... | mit | 3,378,224,767,070,204,000 | 27.847222 | 117 | 0.585941 | false | 4.372632 | false | false | false |
postlund/home-assistant | homeassistant/components/rflink/switch.py | 1 | 2332 | """Support for Rflink switches."""
import logging
import voluptuous as vol
from homeassistant.components.switch import PLATFORM_SCHEMA, SwitchDevice
from homeassistant.const import CONF_NAME
import homeassistant.helpers.config_validation as cv
from . import (
CONF_ALIASES,
CONF_DEVICE_DEFAULTS,
CONF_DEVI... | apache-2.0 | 2,837,758,458,445,601,000 | 29.684211 | 86 | 0.602487 | false | 4 | true | false | false |
fmaguire/ete | ete3/tools/phylobuild_lib/task/phyml.py | 1 | 4152 | from __future__ import absolute_import
# #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU Gener... | gpl-3.0 | 8,228,641,529,093,788,000 | 34.186441 | 108 | 0.593931 | false | 3.545687 | false | false | false |
Mkebede/OmicsIntegrator | scripts/motif_regression.py | 1 | 11666 | '''
File to handle motif/expression regression
'''
__author__='Anthony Soltis'
__email__='asoltis@mit.edu'
import sys,os,pickle,re
from optparse import OptionParser
import numpy as np
from scipy import stats
import fileinput
import matplotlib
matplotlib.use('pdf')
from matplotlib import pyplot as plt
def load_tgm(tg... | bsd-2-clause | 4,813,545,824,401,240,000 | 36.271565 | 226 | 0.59232 | false | 3.383411 | false | false | false |
jodonnell/Minesweeper- | minesweeper/views.py | 1 | 4681 | # Create your views here.
from django.shortcuts import render_to_response
from django import forms
from django import http
from minesweeper.classes.create_board import CreateBoard
from minesweeper.classes.board import Board
from pymongo import Connection, DESCENDING, ASCENDING
import cPickle
import json
import datet... | unlicense | -8,034,674,039,468,431,000 | 30.206667 | 108 | 0.657979 | false | 3.289529 | false | false | false |
ActiveState/code | recipes/Python/491280_BackgroundCall_Threading_like/recipe-491280.py | 1 | 2587 | def example_BackgroundCall():
import urllib,time
def work():
return urllib.urlopen('http://www.python.org/').read()
bkcall=BackgroundCall(work)
print 'work() executing in background ...'
while not bkcall.is_done():
print '.',
time.sleep(0.010)
print 'done.'
print bkca... | mit | 7,555,456,405,313,564,000 | 32.166667 | 83 | 0.521067 | false | 4.261944 | false | false | false |
area3001/ColliScanner | barcode.py | 1 | 1301 | import io
from threading import Thread
import picamera
from PIL import Image
import zbar
class BarcodeScanner(Thread):
def __init__(self, resolutionX=800, resolutionY=600, callback=None):
self.callback = callback
self.scanner = zbar.ImageScanner()
self.scanner.parse_config("enable")
self.stream = io.BytesIO()... | lgpl-3.0 | 2,577,924,286,906,595,000 | 22.25 | 69 | 0.691007 | false | 3.119904 | false | false | false |
eammx/proyectosWeb | proyectoPython/env/lib/python3.6/site-packages/werkzeug/debug/tbtools.py | 2 | 20363 | # -*- coding: utf-8 -*-
"""
werkzeug.debug.tbtools
~~~~~~~~~~~~~~~~~~~~~~
This module provides various traceback related utility functions.
:copyright: 2007 Pallets
:license: BSD-3-Clause
"""
import codecs
import inspect
import json
import os
import re
import sys
import sysconfig
import traceback
... | mit | 8,006,801,681,762,134,000 | 31.425159 | 87 | 0.559201 | false | 3.914456 | false | false | false |
mit-dig/punya | appinventor/misc/emulator-support/aiWinStarter.py | 1 | 5833 | #!/usr/bin/python
from bottle import run,route,app,request,response,template,default_app,Bottle,debug,abort
import sys
import os
import platform
import subprocess
import re
#from flup.server.fcgi import WSGIServer
#from cStringIO import StringIO
#import memcache
app = Bottle()
default_app.push(app)
VERSION = "2.2"
p... | apache-2.0 | -4,360,912,690,102,491,000 | 37.124183 | 234 | 0.621464 | false | 3.522343 | false | false | false |
JeffRoy/mi-dataset | mi/dataset/driver/nutnr_b/dcl_conc/nutnr_b_dcl_conc_telemetered_driver.py | 1 | 1490 | #!/usr/local/bin/python2.7
##
# OOIPLACEHOLDER
#
# Copyright 2014 Raytheon Co.
##
__author__ = 'kustert,mworden'
import os
from mi.logging import config
from mi.core.log import get_logger
from mi.dataset.dataset_parser import DataSetDriverConfigKeys
from mi.dataset.dataset_driver import DataSetDriver
from mi.dataset.... | bsd-2-clause | -7,912,399,062,643,848,000 | 32.111111 | 97 | 0.639597 | false | 3.890339 | true | false | false |
ReubenAbrams/Chrubix | src/setbright.py | 1 | 3204 | #!/usr/local/bin/python3
'''simple brightness controller for Chrubix
'''
import sys
import os
# import hashlib
from chrubix.utils import logme, read_oneliner_file
# from chrubix import save_distro_record, load_distro_record
try:
from PyQt4.QtCore import QString
except ImportError:
QString = str
TIME_BETW... | gpl-3.0 | 2,982,620,355,699,736,600 | 31.693878 | 133 | 0.586454 | false | 3.778302 | false | false | false |
jelly/calibre | src/calibre/ebooks/rtf2xml/preamble_div.py | 2 | 22954 | #########################################################################
# #
# #
# copyright 2002 Paul Henry Tremblay #
# ... | gpl-3.0 | -456,268,684,472,462,900 | 38.037415 | 91 | 0.500218 | false | 3.565947 | false | false | false |
bigent/sinemalar-python | sinemalar/api.py | 1 | 13305 | import datetime, json
import requests
from .core import CallObject
from . import str2bool
class Artist(object):
def __init__(self, artist):
if type(artist) is not dict:
raise TypeError("Type of 'artist' must be 'dict'.")
self.id = int(artist['id'])
self.nameSurname = artist['... | mit | 7,511,655,941,144,440,000 | 29.798611 | 112 | 0.514543 | false | 3.949243 | false | false | false |
sammosummo/sammosummo.github.io | assets/_scripts/variable-precision.py | 1 | 4851 | # approximate sum of two von mises with a single von mises
import numpy as np
from scipy.stats import vonmises
def sim(a, b, plot=False, n=int(1e8)):
unwrapped = vonmises.rvs(a, size=n) + vonmises.rvs(b, size=n)
unwrapped = unwrapped
wrapped = (unwrapped + np.pi) % (2 * np.pi) - np.pi
kappa, _, _ = von... | mit | 1,727,707,249,573,825,000 | 30.506494 | 88 | 0.527726 | false | 2.622162 | false | false | false |
googleapis/googleapis-gen | google/cloud/retail/v2alpha/retail-v2alpha-py/google/cloud/retail_v2alpha/types/product.py | 1 | 11878 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 2,006,343,473,132,579,000 | 37.309677 | 144 | 0.616706 | false | 4.323262 | false | false | false |
gkonstantyno/construct | construct/debug.py | 1 | 4154 | """
Debugging utilities for constructs
"""
import sys
import traceback
import pdb
import inspect
from construct.core import Construct, Subconstruct
from construct.lib import HexString, Container, ListContainer
class Probe(Construct):
"""
A probe: dumps the context, stack frames, and stream content to the sc... | mit | -8,919,516,380,459,991,000 | 30.233083 | 109 | 0.545258 | false | 4.158158 | false | false | false |
liuenyan/django-blog | blog/views.py | 1 | 8259 | """
博客应用的视图函数。
"""
import json
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator, InvalidPage
from django.contrib import messages
from django.conf import settings
from django.http import HttpResponse
fro... | mit | 8,883,726,643,625,573,000 | 31.687243 | 85 | 0.591716 | false | 3.509943 | false | false | false |
alephu5/Soundbyte | environment/lib/python3.3/site-packages/sympy/utilities/lambdify.py | 1 | 18165 | """
This module provides convenient functions to transform sympy expressions to
lambda functions which can be used to calculate numerical values very fast.
"""
from __future__ import print_function, division
from sympy.external import import_module
from sympy.core.compatibility import exec_, is_sequence, iterable, st... | gpl-3.0 | 8,490,795,049,944,381,000 | 32.14781 | 93 | 0.600606 | false | 3.929267 | false | false | false |
daevaorn/kombu | kombu/transport/zmq.py | 1 | 8458 | """
kombu.transport.zmq
===================
ZeroMQ transport.
"""
from __future__ import absolute_import
import errno
import os
import socket
try:
import zmq
from zmq import ZMQError
except ImportError:
zmq = ZMQError = None # noqa
from kombu.five import Empty
from kombu.log import get_logger
from kom... | bsd-3-clause | -779,977,540,349,261,000 | 26.196141 | 73 | 0.567155 | false | 4.012334 | false | false | false |
daviddaub/pyssllabs | pyssllabs.py | 1 | 21480 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import argparse
import urllib2
import json
import time
from datetime import datetime
import sys
SSLLABS_API_ENTRYPOINT = 'https://api.ssllabs.com/api/v2/'
_FMT = '%Y-%m-%d %H:%M:%S'
hasColorama = False
def _c(c):
return c if hasColorama else ''
def _parse_args():
... | unlicense | 5,589,052,208,164,433,000 | 36.552448 | 113 | 0.506657 | false | 3.947804 | true | false | false |
geraldinepascal/FROGS | assessment/bin/treeSampling.py | 1 | 11792 | #!/usr/bin/env python2.7
#
# Copyright (C) 2016 INRA
#
# 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 ... | gpl-3.0 | -7,714,959,664,225,086,000 | 43.164794 | 313 | 0.556988 | false | 3.924126 | false | false | false |
symarroun/FSND-movie-trailers | fav_movies.py | 1 | 4818 | import media
import fav_movies_web
# Instances of my favorite movies:
# Deadpool movie: movie title, sotryline, poster image and movie trailer
deadpool = media.Movie("Deadpool",
""" Wade Wilson (Ryan Reynolds) is a former Special Forces
operative who now works as a mercenary. His world comes
crashin... | mit | -5,561,107,779,786,455,000 | 45.326923 | 149 | 0.706932 | false | 3.155206 | false | false | false |
statsmaths/stat665 | psets/pset01/pset01_starter.py | 1 | 1819 | """ Problem Set 01 starter code
Please make sure your code runs on Python version 3.5.0
Due date: 2016-02-05 13:00
"""
import numpy as np
from scipy import spatial
from scipy.stats import norm
def my_knn(X, y, k=1):
""" Basic k-nearest neighbor functionality
k-nearest neighbor regression for a numeric test... | gpl-2.0 | 2,707,504,578,652,846,000 | 32.072727 | 80 | 0.706432 | false | 4.200924 | false | false | false |
vhavlena/appreal | netbench/pattern_match/parser.py | 1 | 6267 | ###############################################################################
# parser.py: Module for PATTERN MATCH, mataclass wrapping any parser based
# on nfa_parser base class.
# Copyright (C) 2011 Brno University of Technology, ANT @ FIT
# Author(s): Vlastimil Kosar <ikosar@fit.vutbr.cz>
#########... | gpl-2.0 | -6,552,689,261,439,421,000 | 37.219512 | 109 | 0.588001 | false | 4.628508 | false | false | false |
ReneHollander/rep0st | rep0st/index/post.py | 1 | 2758 | from typing import Iterable, NamedTuple
from elasticsearch import Elasticsearch
from elasticsearch_dsl import Date, Document, InnerDoc, Integer, Keyword, Nested
from injector import Module, inject
from rep0st.analyze.feature_vector_analyzer import TYPE_NAME as FEATURE_VECTOR_TYPE
from rep0st.config.rep0st_elasticsear... | mit | -2,390,979,145,973,501,000 | 25.776699 | 92 | 0.603336 | false | 3.793673 | false | false | false |
TACC/tacc_stats | tacc_stats/site/machine/update_db.py | 1 | 7979 | #!/usr/bin/env python
import os,sys, pwd
from datetime import timedelta, datetime
from dateutil.parser import parse
from fcntl import flock, LOCK_EX, LOCK_NB
os.environ['DJANGO_SETTINGS_MODULE']='tacc_stats.site.tacc_stats_site.settings'
import django
django.setup()
from tacc_stats.site.machine.models import Job, Host,... | lgpl-2.1 | -1,956,235,082,091,073,300 | 40.557292 | 126 | 0.523499 | false | 3.650046 | false | false | false |
andrewlrogers/srvy | collection/setup_db.py | 1 | 1042 | #!/usr/bin/python
""" checks to see if srvy.db exists in ../archive. If not it creates the db and appropriate table """
import sqlite3
from sqlite3 import Error
def create_conection(db_file):
try:
conn = sqlite3.connect(db_file)
print(sqlite3.version)
except Error as e:
print(e)
fi... | mit | -6,962,049,424,461,966,000 | 27.162162 | 122 | 0.596929 | false | 3.88806 | false | false | false |
anurag-ks/eden | modules/s3db/cap.py | 1 | 140541 | # -*- coding: utf-8 -*-
""" Sahana Eden Common Alerting Protocol (CAP) Model
@copyright: 2009-2015 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to dea... | mit | 3,098,138,409,540,321,300 | 48.837234 | 517 | 0.431575 | false | 5.156522 | false | false | false |
maxamillion/product-definition-center | pdc/apps/component/serializers.py | 1 | 23374 | #
# Copyright (c) 2015 Red Hat
# Licensed under The MIT License (MIT)
# http://opensource.org/licenses/MIT
#
import json
from django.contrib.contenttypes.models import ContentType
from django.core.urlresolvers import reverse
from django.shortcuts import get_object_or_404
from django.utils import six
from django.utils.... | mit | 9,017,138,999,367,044,000 | 41.115315 | 129 | 0.609438 | false | 4.636778 | false | false | false |
iddl/git-events | messages.py | 1 | 1641 | import sys
from termcolor import colored
class Messages():
LOGFILE = "git-events.log"
#Status and operations
RUNNING = 'Successfully started gitevents'
WAS_RUNNING = 'Gitevents is already running'
NOT_RUNNING = 'Git-events is not running'
STOPPED = 'Successfully stopped gitevents'
#Error... | apache-2.0 | -2,440,621,822,528,702,500 | 29.388889 | 129 | 0.669714 | false | 3.992701 | false | false | false |
carmenfdezb/osmscout-server | scripts/import/valhalla_country_pack.py | 1 | 1633 | import glob
from poly import parse_poly
from shapely.geometry import Polygon
# directories used for searching for packages
valhalla_meta_dir = 'valhalla/packages_meta'
valhalla_packages_dir = 'valhalla/packages'
valhalla_tiles_timestamp = "valhalla/tiles/timestamp"
version = "1"
def getsize(sname):
f = open(sname... | gpl-3.0 | -4,252,452,534,935,834,600 | 31.66 | 103 | 0.581751 | false | 3.325866 | false | false | false |
aglitke/vdsm | client/vdsClient.py | 1 | 102506 | # Copyright 2011 Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the ... | gpl-2.0 | -6,174,053,681,563,520,000 | 39.057054 | 79 | 0.468451 | false | 4.414747 | false | false | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/ns/nsvariable.py | 1 | 16571 | #
# Copyright (c) 2008-2015 Citrix Systems, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | 4,863,755,548,847,731,000 | 35.181223 | 227 | 0.704001 | false | 3.525745 | true | false | false |
rickiepark/openbidder | protobuf/protobuf-2.6.1/python/ez_setup.py | 1 | 10431 | #!python
# This file was obtained from:
# http://peak.telecommunity.com/dist/ez_setup.py
# on 2011/1/21.
"""Bootstrap setuptools installation
If you want to use setuptools in your package's setup.py, just include this
file in the same directory with it, and add this to the top of your setup.py::
from ez_setup... | mit | 4,900,200,301,619,704,000 | 35.728873 | 86 | 0.654683 | false | 2.990539 | false | false | false |
ryfeus/lambda-packs | HDF4_H5_NETCDF/source2.7/pyhdf/VS.py | 1 | 95700 | # $Id: VS.py,v 1.4 2005-07-14 01:36:41 gosselin_a Exp $
# $Log: not supported by cvs2svn $
# Revision 1.3 2004/08/02 17:06:20 gosselin
# pyhdf-0.7.2
#
# Revision 1.2 2004/08/02 15:36:04 gosselin
# pyhdf-0.7-1
#
# Author: Andre Gosselin
# Maurice-Lamontagne Institute
# gosselina@dfo-mpo.gc.ca
"""
VS... | mit | -6,665,755,709,785,605,000 | 35.694785 | 89 | 0.558892 | false | 4.318202 | false | false | false |
OpenProvenance/python-bitcoinlib-scripting | 03-CTxIn.py | 1 | 2407 | ### Open Provenance February 2016 - https://myveryown.org
### Bitcoin Blockchain Information using python-bitcoinlib
### CTxIn & COutPoint Objects and Properties
### Donate to Open Provenance: 1opDUZQ9nsL1LJALBdV1dvqSMtcvNj9EC
## Import the modules required and setup a connection to bitcoin
import bitcoin
## Create a... | mit | -396,867,115,745,804,740 | 32.901408 | 99 | 0.645617 | false | 3.473304 | false | false | false |
lironsc/ORange | ORange1_LoadBalancers/Project1/Controller/Split/Elcp0Table.py | 1 | 1035 | import Flow,Range
from ryu.ofproto import ofproto_v1_3
#This file contains all the logic for populating the fourth table, used for the balancing of traffic
#Creates a flow for the table, one for each range, representing the start of a range
def createThirdTableFlow(flowRange, datapath):
ofproto=ofproto_v1_3
m... | apache-2.0 | -6,491,032,691,780,397,000 | 56.5 | 187 | 0.752657 | false | 3.532423 | false | false | false |
jet-code/multivariable-control-systems | cp2/cp2_method0.py | 1 | 3758 |
# coding: utf-8
# In[1]:
# Alexander Hebert
# ECE 6390
# Computer Project #2
# In[2]:
# Tested using Python v3.4 and IPython v2
##### Import libraries
# In[3]:
import numpy as np
# In[4]:
import scipy
# In[5]:
import sympy
# In[6]:
from IPython.display import display
# In[7]:
from sympy.interactiv... | mit | -1,500,753,311,782,675,700 | 9.438889 | 75 | 0.530601 | false | 2.182346 | false | false | false |
openstack/tacker | tacker/tests/unit/test_wsgi.py | 1 | 25815 | # Copyright 2013 OpenStack Foundation.
# 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 req... | apache-2.0 | 9,851,767,278,263,516 | 34.557851 | 79 | 0.595197 | false | 4.205082 | true | false | false |
freeipa/freeipa-pr-ci | tasks/test_tasks.py | 1 | 2171 | import os
import pytest
from .ansible import AnsiblePlaybook
from .common import PopenTask, TimeoutException, TaskException
from .vagrant import VagrantBoxDownload
def test_timeout():
PopenTask(['sleep', '0.1'])()
PopenTask(['sleep', '0.1'], timeout=None)()
PopenTask(['sleep', '0.1'], timeout=0.2)()
... | gpl-3.0 | -5,545,033,217,916,845,000 | 27.946667 | 77 | 0.628743 | false | 3.289394 | true | false | false |
Ebag333/Pyfa | gui/builtinStatsViews/rechargeViewFull.py | 1 | 5430 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 ... | gpl-3.0 | -1,832,182,773,703,005,200 | 41.093023 | 110 | 0.618785 | false | 3.851064 | false | false | false |
juju/juju-gui-charm | server/runserver.py | 1 | 1408 | # This file is part of the Juju GUI, which lets users view and manage Juju
# environments within a graphical interface (https://launchpad.net/juju-gui).
# Copyright (C) 2013 Canonical Ltd.
#
# This program is free software: you can redistribute it and/or modify it under
# the terms of the GNU Affero General Public Lice... | agpl-3.0 | 2,942,294,371,774,037,500 | 36.052632 | 79 | 0.724432 | false | 3.459459 | false | false | false |
snehil/CNN_Text_Classification_Tensorflow | cnn/text_cnn.py | 1 | 4202 | import tensorflow as tf
import numpy as np
class TextCNN(object):
"""
A CNN for text classification.
Uses an embedding layer, followed by a convolutional, max-pooling and softmax layer.
"""
def __init__(
self, sequence_length, num_classes, vocab_size,
embedding_size, filter_sizes, ... | apache-2.0 | -3,228,817,458,301,248,500 | 47.860465 | 126 | 0.540219 | false | 3.673077 | false | false | false |
sadikovi/pulsar | analytics/selector/selector.py | 1 | 9133 | #!/usr/bin/env python
# import libs
from types import StringType, ListType
import warnings
# import classes
import analytics.utils.queryengine as q
import analytics.utils.misc as misc
from analytics.algorithms.algorithmsmap import AlgorithmsMap
from analytics.core.map.clustermap import ClusterMap
from analytics.core.m... | apache-2.0 | -2,103,489,210,357,787,600 | 33.464151 | 79 | 0.630461 | false | 4.197151 | false | false | false |
mikf/gallery-dl | gallery_dl/extractor/bcy.py | 1 | 6802 | # -*- coding: utf-8 -*-
# Copyright 2020-2021 Mike Fährmann
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
"""Extractors for https://bcy.net/"""
from .common import Extractor, Me... | gpl-2.0 | -6,658,767,170,279,108,000 | 33.186869 | 79 | 0.448663 | false | 3.804947 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.