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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
nkoep/blaplay | blaplay/blacore/bladb.py | 1 | 27735 | # blaplay, Copyright (C) 2012-2013 Niklas Koep
# 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 dist... | gpl-2.0 | -2,646,596,575,810,239,500 | 35.832669 | 79 | 0.549991 | false | 4.523732 | false | false | false |
surgebiswas/poker | PokerBots_2017/Johnny/keras/utils/generic_utils.py | 1 | 7167 | """Python utilities required by Keras."""
from __future__ import absolute_import
import numpy as np
import time
import sys
import six
import marshal
import types as python_types
def get_from_module(identifier, module_params, module_name,
instantiate=False, kwargs=None):
"""Retrieves a class ... | mit | -5,937,541,362,019,905,000 | 32.490654 | 79 | 0.512488 | false | 4.263534 | false | false | false |
ifearcompilererrors/fle_redesign | fle_redesign/apps/radpress/feeds.py | 1 | 1475 | from django.contrib.syndication.views import Feed
from django.core.urlresolvers import reverse_lazy as reverse
from radpress import settings as radpress_settings
from radpress.models import Article, Tag
class ArticleFeed(Feed):
def __init__(self):
self.title = radpress_settings.TITLE
self.descript... | mit | -1,843,545,360,349,315,300 | 26.314815 | 66 | 0.60678 | false | 4.226361 | false | false | false |
BhallaLab/moose | moose-examples/snippets/wildcard.py | 1 | 5154 | # wildcard.py ---
#
# Filename: wildcard.py
# Description:
# Author: Subhasis Ray
# Maintainer:
# Created: Tue Jun 4 11:20:57 2013 (+0530)
# Version:
# Last-Updated: Tue Jun 4 12:27:42 2013 (+0530)
# By: subha
# Update #: 143
# URL:
# Keywords:
# Compatibility:
#
#
# Commentary:
#
#
#
#
# Change log:
... | gpl-3.0 | 1,503,731,415,654,948,900 | 30.426829 | 85 | 0.652697 | false | 3.424585 | false | false | false |
cloudtools/troposphere | p3s/gen2.py | 1 | 3162 | import argparse
import json
# Python code generator to create new troposphere classes from the
# AWS resource specification.
#
# Todo:
# - Currently only handles the single files (not the all-in-one)
# (Note: but will deal with things like spec/GuardDuty*)
# - Handle adding in validators
# - Verify propery dependen... | bsd-2-clause | 3,961,049,537,514,334,700 | 26.982301 | 77 | 0.590765 | false | 3.818841 | false | false | false |
HearthSim/hearthstonejson | generate_hearthstonejson.py | 1 | 7878 | #!/usr/bin/env python
import json
import os
import sys
from argparse import ArgumentParser
from enum import IntEnum
from hearthstone.cardxml import load
from hearthstone.enums import CardType, Faction, GameTag, Locale
from hearthstone.utils import SCHEME_CARDS, SPELLSTONE_STRINGS
NBSP = "\u00A0"
MECHANICS_TAGS = [
... | mit | 6,121,663,610,467,085,000 | 23.61875 | 86 | 0.703224 | false | 2.6 | false | false | false |
wilderrodrigues/cloudstack_integration_tests | cit/integration/acs/tests/test_vpc_vpn.py | 1 | 13756 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -4,097,071,519,951,188,000 | 39.818991 | 115 | 0.585345 | false | 4.014006 | true | false | false |
widyono/djauction | views.py | 1 | 21166 | # Django libraries
from django.shortcuts import render_to_response
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect
from django.template import RequestContext
from django.contrib.auth.decorators import login_required
from django.conf import settings
# djauction models and forms... | gpl-3.0 | -3,870,451,111,225,259,500 | 32.332283 | 105 | 0.598696 | false | 3.70683 | false | false | false |
sdh11/gnuradio | gr-utils/python/modtool/core/base.py | 1 | 9285 | #
# Copyright 2013, 2018 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
# any later versio... | gpl-3.0 | -34,693,094,967,446,252 | 42.38785 | 96 | 0.58783 | false | 3.851099 | false | false | false |
LinkItONEDevGroup/LASS | LASS-Simulator/codes/cli.py | 1 | 4279 | # @file cli.py
# @brief cli of whole tool
# README: Command line interface
# MODULE_ARCH:
# CLASS_ARCH:
# GLOBAL USAGE:
#standard
import cmd
#extend
#library
import lib.globalclasses as gc
from lib.const import *
##### Code section #####
#Spec: local variable maintain, about, user commands, test commands
#How/Need... | mit | -1,479,609,700,034,908,700 | 31.424242 | 102 | 0.533068 | false | 3.598823 | false | false | false |
FedericoV/FractalMammaryLobule | modeler/window/MainWindow.py | 1 | 1222 | from PyQt4.QtCore import Qt
import PyQt4.QtGui as qtgui
from CutSlider import CutSlider
from Parameters import Parameters
from view.ModelView import ModelView
class MainWindow(qtgui.QMainWindow):
def __init__(self, **kwargs):
super(MainWindow, self).__init__(**kwargs)
top_frame = qtgui.QFrame()
... | gpl-3.0 | 6,894,830,961,617,749,000 | 32.027027 | 68 | 0.669394 | false | 3.993464 | false | false | false |
bslatkin/8-bits | appengine-ndb/stress.py | 1 | 2799 | """Stress test for ndb with Python 2.7 threadsafe."""
import logging
import random
import threading
import time
from google.appengine.api import apiproxy_stub_map
from google.appengine.datastore import datastore_stub_util
from google.appengine.ext import testbed
from ndb import model, tasklets
INSTANCES = 4
RUNS ... | apache-2.0 | 8,839,542,785,066,242,000 | 24.216216 | 75 | 0.634155 | false | 3.494382 | false | false | false |
gmimano/commcaretest | corehq/apps/smsbillables/tests/test_gateway_fees.py | 1 | 6842 | from django.conf import settings
from django.test import TestCase
from corehq.apps.sms.models import SMSLog
from corehq.apps.sms.util import get_available_backends
from corehq.apps.smsbillables.models import *
from corehq.apps.smsbillables import generator
class TestGatewayFee(TestCase):
def setUp(self):
... | bsd-3-clause | -4,394,894,291,763,778,600 | 46.513889 | 110 | 0.594709 | false | 4.136638 | true | false | false |
xSQL/pyqt5-pk2cmd | main.py | 1 | 4926 | #!/usr/bin/env python3
import sys, os
from PyQt5.QtWidgets import QApplication, qApp, QFileDialog,\
QTableWidgetItem as _t
from PyQt5.uic import loadUi
from PyQt5.QtGui import QIcon
from PyQt5 import QtCore
from inhx import Inhx8
from utils import functions as fn
from utils.pk2usb import Pk2USB
from gui import ... | gpl-3.0 | 419,459,163,938,756,540 | 31.196078 | 92 | 0.558262 | false | 3.427975 | false | false | false |
TaliesinSkye/evennia | wintersoasis-master/commands/character_commands.py | 1 | 5744 | """
Example command module template
Copy this module up one level to gamesrc/commands/ and name it as
befits your use. You can then use it as a template to define your new
commands. To use them you also need to group them in a CommandSet (see
examples/cmdset.py)
"""
import time
from ev import Command as BaseCommand... | bsd-3-clause | -1,670,971,468,829,161,500 | 32.202312 | 121 | 0.629004 | false | 3.72745 | false | false | false |
macarthur-lab/seqr | seqr/views/apis/project_api.py | 1 | 13962 | """
APIs for updating project metadata, as well as creating or deleting projects
"""
import json
import logging
from django.contrib.auth.decorators import login_required
from django.db.models import Count, Q
from django.utils import timezone
from django.views.decorators.csrf import csrf_exempt
from matchmaker.models ... | agpl-3.0 | 1,072,548,966,998,666,100 | 36.735135 | 124 | 0.667598 | false | 3.767404 | false | false | false |
UTSA-ICS/keystone-kerberos | keystone/tests/unit/test_ipv6.py | 1 | 1741 | # Copyright 2012 OpenStack Foundation
#
# 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 w... | apache-2.0 | 6,442,629,260,825,496,000 | 33.137255 | 74 | 0.666284 | false | 4.135392 | true | false | false |
stoewer/nixpy | docs/source/examples/irregularlySampledData.py | 1 | 2147 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright © 2014 German Neuroinformatics Node (G-Node)
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted under the terms of the BSD License. See
LICENSE file in the root of the Project.
Author: ... | bsd-3-clause | 2,646,880,914,750,909,000 | 31.029851 | 98 | 0.659832 | false | 3.155882 | false | false | false |
robk5uj/invenio | modules/bibcirculation/lib/bibcirculation_templates.py | 1 | 617445 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2008, 2009, 2010, 2011 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 ... | gpl-2.0 | -4,292,102,151,587,349,000 | 36.12609 | 283 | 0.389549 | false | 4.425329 | false | false | false |
budnyjj/calculator | calculator/corrector.py | 1 | 10092 | import re
import math
import logging
import definitions
# basic error
def CorrectorError(Exception):
pass
class Corrector(object):
def __init__(self):
self._expr = ""
self._funcPos = []
self.constantR = '(' + '|'.join( \
[ re.escape(const) for const in sorted(defi... | mit | 1,134,631,850,980,638,200 | 39.693548 | 123 | 0.551625 | false | 4.130986 | false | false | false |
Zinal001/pluginloader | Example Plugins/Python/Server Rules Mail/__init__.py | 1 | 2769 | #This plugin sends a "Server Rules" mail to every player that connects to the server.
#It also adds a /rules command to resend the mail if a player needs it.
import clr
clr.AddReferenceToFileAndPath(GameDir + "IR.exe")
import Game
from System import DateTime
#This function sends the "Server Rules" mail to a player
de... | agpl-3.0 | -1,079,181,363,375,957,400 | 52.269231 | 197 | 0.777176 | false | 3.672414 | false | false | false |
kobotoolbox/kpi | kobo/apps/help/models.py | 1 | 3061 | # coding: utf-8
# 😇
import datetime
from django.contrib.postgres.fields import JSONField as JSONBField
from django.conf import settings
from django.db import models
from django.utils.module_loading import import_string
from markdownx.models import MarkdownxField
from markdownx.settings import MARKDOWNX_MARKDOWNIFY_FU... | agpl-3.0 | -6,613,834,314,213,832,000 | 34.534884 | 87 | 0.684882 | false | 3.912932 | false | false | false |
normanjaeckel/OpenSlides | server/openslides/assignments/serializers.py | 1 | 6718 | from openslides.poll.serializers import (
BASE_OPTION_FIELDS,
BASE_POLL_FIELDS,
BASE_VOTE_FIELDS,
BaseOptionSerializer,
BasePollSerializer,
BaseVoteSerializer,
)
from openslides.utils.rest_api import (
BooleanField,
DecimalField,
IdPrimaryKeyRelatedField,
IntegerField,
ModelS... | mit | -3,370,312,460,869,476,400 | 30.990476 | 94 | 0.615064 | false | 4.069049 | false | false | false |
cdegroc/scikit-learn | sklearn/qda.py | 2 | 7065 | """
Quadratic Discriminant Analysis
"""
# Author: Matthieu Perrot <matthieu.perrot@gmail.com>
#
# License: BSD Style.
import warnings
import numpy as np
import scipy.ndimage as ndimage
from .base import BaseEstimator, ClassifierMixin
# FIXME :
# - in fit(X, y) method, many checks are common with other models
# ... | bsd-3-clause | 3,858,602,354,049,565,700 | 31.557604 | 78 | 0.541543 | false | 3.772023 | false | false | false |
mimikun/KCAC_Memo | kcacmemo/forms.py | 1 | 1106 | from django import forms
from django.utils.translation import ugettext_lazy as _
from .models import DropCard, BuildCard
class DropCardForm(forms.ModelForm):
class Meta:
model = DropCard
fields = ('ship_name', 'ship_type', 'get_map', 'satelite_no', 'place_name',)
labels = {
's... | mit | -1,765,666,264,349,892,900 | 29.903226 | 109 | 0.51357 | false | 2.547872 | false | false | false |
prajdabre/knmt | nmt_chainer/bleu_computer.py | 1 | 7302 | #!/usr/bin/env python
"""bleu_computer.py: compute BLEU score"""
__author__ = "Fabien Cromieres"
__license__ = "undecided"
__version__ = "1.0"
__email__ = "fabien.cromieres@gmail.com"
__status__ = "Development"
import argparse, os
from collections import defaultdict
import math, codecs
from itertools import izip
... | gpl-3.0 | 1,328,134,983,708,614,400 | 38.901639 | 140 | 0.550671 | false | 3.597044 | false | false | false |
homeworkprod/byceps | byceps/blueprints/admin/user_badge/forms.py | 1 | 1076 | """
byceps.blueprints.admin.user_badge.forms
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Copyright: 2006-2019 Jochen Kupperschmidt
:License: Modified BSD, see LICENSE for details.
"""
import re
from wtforms import BooleanField, SelectField, StringField, TextAreaField
from wtforms.validators import InputRequired, Lengt... | bsd-3-clause | 4,195,310,136,467,593,000 | 33.709677 | 155 | 0.687732 | false | 3.4377 | false | false | false |
Korchy/BIS | mesh_manager.py | 1 | 15956 | # Nikita Akimov
# interplanety@interplanety.org
#
# GitHub
# https://github.com/Korchy/BIS
import json
import os
import tempfile
import bpy
import zipfile
from shutil import copyfile
from .WebRequests import WebRequest, WebAuthVars
from .bis_items import BISItems
from .addon import Addon
from .file_manager import F... | gpl-3.0 | -1,886,573,480,069,411,300 | 45.115607 | 136 | 0.459075 | false | 4.655967 | false | false | false |
uzumaxy/pyspectator | pyspectator/collection.py | 1 | 2549 | from collections import MutableMapping, Container
from datetime import datetime, timedelta
from pyvalid import accepts
class LimitedTimeTable(MutableMapping, Container):
def __init__(self, time_span):
self.__storage = dict()
self.__time_span = None
self.time_span = time_span
@propert... | bsd-3-clause | 4,059,413,796,689,752,000 | 26.408602 | 60 | 0.56532 | false | 4.014173 | false | false | false |
Vignesh2208/Awlsim | awlsim/core/systemblocks/system_sfb_102.py | 1 | 13106 | from __future__ import division, absolute_import, print_function, unicode_literals
import socket
import sys
import os
from awlsim.core.systemblocks.connection import *
from awlsim.core.systemblocks.exceptions import *
from awlsim.common.compat import *
from awlsim.definitions import *
from awlsim.core.systemblocks.sy... | gpl-2.0 | -6,956,300,922,697,775,000 | 32.865633 | 171 | 0.663971 | false | 3.244059 | false | false | false |
umlfri/umlfri2 | umlfri2/application/commands/diagram/showelement.py | 1 | 1908 | from umlfri2.application.events.diagram import ElementShownEvent, ConnectionShownEvent
from ..base import Command, CommandNotDone
class ShowElementCommand(Command):
def __init__(self, diagram, element_object, point):
self.__diagram_name = diagram.get_display_name()
self.__diagram = diagram
... | gpl-3.0 | 3,139,851,682,524,925,000 | 35.692308 | 91 | 0.628931 | false | 4.366133 | false | false | false |
pekzeki/SNAofYelp | network_analysis/compare_graphs.py | 1 | 1712 | '''
Created on May 2, 2015
@author: pekzeki
'''
from pymongo import MongoClient
import networkx as nx
from networkx.algorithms import bipartite
from network_analysis import graph_analysis as GA
def biparted_graph():
B = nx.Graph()
for user in user_collection.find():
B.add_node(user.get("_id"), u... | mit | 3,601,097,473,015,926,300 | 27.081967 | 82 | 0.624416 | false | 3.370079 | false | false | false |
NeCTAR-RC/swift | swift/account/server.py | 1 | 14774 | # Copyright (c) 2010-2012 OpenStack Foundation
#
# 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 | -2,355,917,514,977,614,300 | 45.459119 | 79 | 0.575403 | false | 4.361972 | false | false | false |
orcasgit/django-tastypie-oauth | tastypie_oauth/authentication.py | 1 | 6827 | import logging
import json
import six
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.utils import timezone
from oauth2_provider.models import AccessToken
from tastypie.authentication import Authentication
from tastypie.http import HttpUnauthorized
"""
This is a simpl... | apache-2.0 | -5,448,112,228,179,889,000 | 40.126506 | 150 | 0.611982 | false | 4.634759 | false | false | false |
anaran/olympia | apps/browse/tests.py | 1 | 57306 | # -*- coding: utf-8 -*-
from datetime import datetime, timedelta
from dateutil.parser import parse as parse_dt
import re
from urlparse import urlparse
from django.conf import settings
from django.core.cache import cache
from django.test.utils import override_settings
from django.utils import http as urllib
from jingo... | bsd-3-clause | -6,452,959,788,579,240,000 | 38.750173 | 87 | 0.598132 | false | 3.623482 | true | false | false |
kkelly18/flask-on-predix | config-template.py | 1 | 1137 | from werkzeug import security
from flask import json
import os, base64, ssl
basedir = os.path.abspath(os.path.dirname(__file__))
class Config:
SECRET_KEY = security.gen_salt(32)
DEBUG = False
TESTING = False
URLLIB_REQUEST_DEBUG_LEVEL = 0
SQLALCHEMY_COMMIT_ON_TEARDOWN = True
SQLALCHEMY_TRACK... | apache-2.0 | -3,672,560,480,049,499,600 | 27.45 | 124 | 0.669305 | false | 3.149584 | false | false | false |
By0ute/pyqt-collapsable-widget | code/FrameLayout.py | 1 | 3949 | __author__ = 'Caroline Beyne'
from PyQt4 import QtGui, QtCore
class FrameLayout(QtGui.QWidget):
def __init__(self, parent=None, title=None):
QtGui.QFrame.__init__(self, parent=parent)
self._is_collasped = True
self._title_frame = None
self._content, self._content_layout = (None, N... | mit | 9,119,110,248,474,779,000 | 33.640351 | 118 | 0.574069 | false | 3.871569 | false | false | false |
astrofrog/ginga | ginga/gtkw/PluginManagerGtk.py | 1 | 12463 | #
# PluginManagerGtk.py -- Simple class to manage plugins.
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
#
import sys
import threading
import traceback
import gtk
fro... | bsd-3-clause | -7,718,921,470,319,167,000 | 32.412869 | 79 | 0.504774 | false | 3.947735 | false | false | false |
MrCubanfrog/NorDB | nordb/database/nordicSearch.py | 1 | 17679 | """
This module contains all commands for searching the database for events with given criteria. The most important function here is searchNordic and most other functions and classes are here just to support it.
Functions and Classes
---------------------
"""
import numpy as np
from datetime import date
from datetime ... | mit | 6,188,496,628,063,998,000 | 37.854945 | 207 | 0.605973 | false | 4.05854 | false | false | false |
FlorisTurkenburg/ManyMan | SCC_backend/messageprocessor.py | 1 | 8104 | """
ManyMan - A Many-core Visualization and Management System
Copyright (C) 2012
University of Amsterdam - Computer Systems Architecture
Jimi van der Woning and Roy Bakker
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
t... | gpl-2.0 | -6,171,721,281,092,342,000 | 37.339806 | 79 | 0.535168 | false | 4.145269 | false | false | false |
hip-odoo/odoo | addons/marketing_campaign/models/marketing_campaign.py | 11 | 28982 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from dateutil.relativedelta import relativedelta
from traceback import format_exception
from sys import exc_info
import re
from odoo import api, fields, models, _
from odoo.exceptions import UserError, ValidationError
... | agpl-3.0 | 5,673,022,709,663,759,000 | 45.745161 | 169 | 0.598509 | false | 4.208218 | true | false | false |
mistercrunch/panoramix | superset/dashboards/commands/update.py | 2 | 4004 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -5,064,120,856,786,912,000 | 37.873786 | 88 | 0.688561 | false | 4.342733 | false | false | false |
BenMotz/cubetoolkit | toolkit/members/member_views.py | 1 | 20515 | import logging
from django.http import HttpResponseRedirect, HttpResponseNotAllowed
from django.shortcuts import get_object_or_404, render
from django.db.models import Count, Q
from django.urls import reverse
from django.contrib.auth.decorators import permission_required
from django.contrib import messages
from django... | agpl-3.0 | 1,930,486,755,038,929,700 | 38.527938 | 80 | 0.59147 | false | 4.258875 | false | false | false |
qisanstudio/qsapp-microsite | setup.py | 1 | 2844 | #! /usr/bin/env python
# -*- coding: UTF-8 -*-
import os
import sys
import setuptools
from distutils.command.clean import clean as _clean
from distutils.command.build import build as _build
from setuptools.command.sdist import sdist as _sdist
from setuptools.command.build_ext import build_ext as _build_ext
try:
... | mit | 4,120,550,348,942,132,000 | 25.622642 | 64 | 0.516655 | false | 3.798116 | false | false | false |
Ratfink/micropython-png | test_png.py | 1 | 26464 | # This file comprises the tests that are internally validated (as
# opposed to tests which produce output files that are externally
# validated). Primarily they are unittests.
# There is a read/write asymmetry: It is fairly easy to
# internally validate the results of reading a PNG file because we
# can know what pix... | mit | -7,128,843,047,209,211,000 | 35.960894 | 82 | 0.554943 | false | 3.074707 | true | false | false |
bnaul/scikit-learn | sklearn/datasets/tests/test_common.py | 1 | 4057 | """Test loaders for common functionality."""
import inspect
import os
import pytest
import numpy as np
import sklearn.datasets
def is_pillow_installed():
try:
import PIL # noqa
return True
except ImportError:
return False
FETCH_PYTEST_MARKERS = {
"return_X_y": {
"fetch... | bsd-3-clause | 186,375,630,271,436,670 | 31.98374 | 76 | 0.653192 | false | 3.622321 | true | false | false |
cherrypy/cheroot | cheroot/test/test_makefile.py | 1 | 1214 | """Tests for :py:mod:`cheroot.makefile`."""
from cheroot import makefile
__metaclass__ = type
class MockSocket:
"""A mock socket."""
def __init__(self):
"""Initialize :py:class:`MockSocket`."""
self.messages = []
def recv_into(self, buf):
"""Simulate ``recv_into`` for Python 3... | bsd-3-clause | -2,588,368,252,095,247,000 | 22.346154 | 50 | 0.566722 | false | 3.735385 | false | false | false |
getsentry/raven-django | tests/urls.py | 1 | 1247 | from __future__ import absolute_import
from django.conf import settings
try:
from django.conf.urls import url, patterns
except ImportError:
# for Django version less than 1.4
from django.conf.urls.defaults import url, patterns # NOQA
from django.http import HttpResponse
def handler404(request):
ret... | bsd-3-clause | 8,245,334,469,823,232,000 | 37.96875 | 104 | 0.697674 | false | 3.435262 | true | false | false |
irdan/marionette | marionette_tg/executables/pioa.py | 1 | 10277 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import re
import sys
import random
import importlib
from twisted.python import log
sys.path.append('.')
import regex2dfa
import fte.encoder
import fte.bit_ops
import marionette_tg.channel
EVENT_LOOP_FREQUENCY_S = 0.001
# the following varibles are reserved ... | apache-2.0 | 8,659,055,025,360,515,000 | 31.115625 | 124 | 0.572151 | false | 3.906119 | false | false | false |
zombiezen/turbohvz | setup.py | 1 | 2396 | #!/usr/bin/env python
#
# setup.py
# TurboHvZ
#
# Copyright (C) 2008 Ross Light
#
# 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 opt... | gpl-3.0 | 8,758,832,950,359,684,000 | 28.95 | 77 | 0.628548 | false | 3.539143 | false | false | false |
jolyonb/edx-platform | lms/djangoapps/bulk_email/tasks.py | 1 | 38898 | # -*- coding: utf-8 -*-
"""
This module contains celery task functions for handling the sending of bulk email
to a course.
"""
import json
import logging
import random
import re
from collections import Counter
from smtplib import SMTPConnectError, SMTPDataError, SMTPException, SMTPServerDisconnected
from time import sl... | agpl-3.0 | -814,397,416,746,119,300 | 45.808664 | 119 | 0.647077 | false | 4.079497 | false | false | false |
catapult-project/catapult-csm | telemetry/telemetry/internal/util/binary_manager.py | 1 | 6694 | # 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.
import logging
import os
import py_utils
from py_utils import binary_manager
from py_utils import dependency_util
import dependency_manager
from dependency_... | bsd-3-clause | 6,332,878,173,932,040,000 | 32.979695 | 80 | 0.709441 | false | 3.764904 | true | false | false |
stochasticHydroTools/RotationalDiffusion | many_bodyMCMC/examples/boomerang_suspension/potential_pycuda_user_defined.py | 1 | 12051 | from __future__ import division, print_function
import numpy as np
import pycuda.driver as cuda
import pycuda.autoinit
from pycuda.compiler import SourceModule
mod = SourceModule("""
#include <stdio.h>
/*
Cumpute the enery coming from one blob potentials,
e.g. gravity or interactions with the wall.
In this ex... | gpl-3.0 | -7,603,794,846,525,446,000 | 32.107143 | 116 | 0.509418 | false | 3.726345 | false | false | false |
raviqqe/shakyo | shakyo/shakyo.py | 1 | 6105 | from . import consolekit as ck
from . import config
# classes
class Shakyo:
CURSOR_WIDTH = 1
def __init__(self, console, example_lines):
self._console = console
self._geometry = _Geometry(console)
self._input_line = ck.Line()
self._example_lines = _FoldedLines(example_lines,
... | unlicense | -6,293,638,704,046,279,000 | 33.106145 | 79 | 0.614906 | false | 3.616706 | true | false | false |
grammarly/browser-extensions | generate/build_tools/forge/cli.py | 3 | 2107 | """Helpers for cli interaction"""
import sys
import math
from getpass import getpass
def ask_confirm(confirm_event):
print "\n" + confirm_event.get('content')
if confirm_event['cancellable']:
user_input = raw_input("\nContinue? [Y/n]")
return user_input.strip() == "" or user_input.lower().startswith("y")
else:... | bsd-3-clause | 8,260,542,617,575,968,000 | 24.083333 | 71 | 0.644993 | false | 3.149477 | false | false | false |
ymym3412/DeepEmbeddedClustering | deep_embedded_clustering.py | 1 | 1849 | # coding: utf-8
import re
from itertools import chain, repeat
import chainer
import chainer.functions as F
from chainer import Initializer
from chainer import cuda
class DeepEmbeddedClustering(chainer.ChainList):
def __init__(self, chains):
l1, l2, l3, l4 = chains
super(DeepEmbeddedClustering, se... | mit | 4,867,836,424,438,036,000 | 29.833333 | 128 | 0.587345 | false | 3.56262 | false | false | false |
GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/14.Paypal-Basic-Payments/2.Setting-Up-To-Use-Django-Paypal/we_are_social/we_are_social/urls.py | 1 | 1849 | """we_are_social URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.11/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Cl... | mit | 6,455,648,596,367,666,000 | 42 | 105 | 0.698756 | false | 3.597276 | false | false | false |
vedujoshi/tempest | tempest/api/volume/base.py | 1 | 13803 | # Copyright 2012 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 requ... | apache-2.0 | -1,495,445,243,357,334,800 | 39.125 | 79 | 0.62001 | false | 3.916856 | true | false | false |
icemoon1987/stock_monitor | monitor/small_market_value_monitor.py | 1 | 4289 | #!/usr/bin/env python
#coding=utf-8
__author__ = 'Administrator'
import json
import datetime
import sys
import pandas as pd
import tushare as ts
import re
import mail
reload(sys)
sys.setdefaultencoding('utf-8')
class small_market_value_monitor:
def __init__(self):
self.__period = 20
self.__amount ... | gpl-2.0 | -5,387,296,275,444,191,000 | 35.565217 | 121 | 0.558383 | false | 3.156907 | false | false | false |
ondrokrc/gramps | gramps/plugins/webreport/webplugins.gpr.py | 1 | 2283 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 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 Free Software Foundation; either version 2 of the License, or
# (at your option) ... | gpl-2.0 | 6,109,182,053,258,769,000 | 33.074627 | 79 | 0.628121 | false | 3.38724 | false | false | false |
arximboldi/pigeoncide | src/test/base_observer.py | 1 | 1365 | #
# Copyright (C) 2009 Juan Pedro Bolivar Puente, Alberto Villegas Erce
#
# This file is part of Pigeoncide.
#
# Pigeoncide 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
# Lic... | gpl-3.0 | 4,964,096,118,397,080,000 | 27.4375 | 72 | 0.646886 | false | 3.679245 | true | false | false |
DBrianKimmel/PyHouse | Project/src/Modules/Core/Utilities/extract_tools.py | 1 | 1417 | """
@name: Modules/Core/Utilities/extract_tools.py
@author: D. Brian Kimmel
@contact: D.BrianKimmel@gmail.com
@copyright: (c) 2018-2019 by D. Brian Kimmel
@note: Created on Oct 3, 2018
@license: MIT License
@summary:
"""
__updated__ = '2019-08-20'
# Import system type stuff
def extract_quoted(p_st... | mit | -1,860,161,191,873,330,700 | 24.763636 | 81 | 0.627382 | false | 3.0671 | false | false | false |
Rusk85/pyload | module/plugins/hoster/DlFreeFr.py | 1 | 7907 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
import pycurl
from module.plugins.internal.SimpleHoster import SimpleHoster, create_getInfo, replace_patterns
from module.common.json_layer import json_loads
from module.network.Browser import Browser
from module.network.CookieJar import CookieJar
class Custom... | gpl-3.0 | 2,220,953,083,333,947,000 | 38.123762 | 146 | 0.572314 | false | 3.434594 | false | false | false |
DBernardes/ProjetoECC | Ruido_de_Leitura/Codigo/probPico.py | 1 | 1167 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
"""
Criado em 10 de Outubro de 2016
Descricao: este modulo tem como entrada uma serie de dados da FFT, assim como a posicao neste vetor de cada um dos picos. Retorna um vetor com a probabilidade de cada um dos picos nao ser um sinal verdadeiro. Essa probabilidade e c... | mit | -7,331,278,593,161,123,000 | 31.388889 | 377 | 0.687822 | false | 2.632054 | false | false | false |
yakcyll/cue2flac | src/cue2flac.py | 1 | 6700 | #!/usr/bin/env python3
import argparse
import os
import re
import shutil
import subprocess
import sys
class Cue2Flac(object):
CUE2FLAC_DESCRIPTION = "cue2flac - Split a FLAC image into tracks according to a .cue file."
def __init__(self):
self.parser = argparse.ArgumentParser(description=Cue2Flac.CU... | mit | 85,080,328,513,030,960 | 39.11976 | 101 | 0.472985 | false | 4.171856 | false | false | false |
gjelsas/paperwork-multiexport | paperwork-multiexport.py | 1 | 3542 | #Python
#created at https://github.com/gjelsas/paperwork-multiexport
import os
import shutil
from os.path import expanduser
#topdir = '/home/$USER/papers' #use this if your detection doesn't work!
home = expanduser("~")
for line in open(home + '/.config/paperwork.conf'): #get the paperworkdir from config... | gpl-3.0 | -2,564,393,758,644,220,400 | 37.5 | 166 | 0.527668 | false | 4.405473 | false | false | false |
glgerard/MDBN | src/dbn.py | 1 | 25760 | """
Copyright (c) 2016 Gianluca Gerard
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, distribute... | apache-2.0 | -275,578,852,434,232,200 | 38.329771 | 101 | 0.508812 | false | 4.459834 | false | false | false |
njncalub/hiddencloudserver | supersyncer/migrations/0002_auto__del_booktextquestionchoice__add_field_booktextquestion_choice_1_.py | 1 | 10046 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'BookTextQuestionChoice'
db.delete_table('supersyncer_bo... | gpl-3.0 | -552,893,781,564,322,200 | 63.819355 | 176 | 0.5652 | false | 3.581462 | false | false | false |
Yukarumya/Yukarum-Redfoxes | testing/marionette/client/setup.py | 1 | 1778 | # 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/.
import os
import re
from setuptools import setup, find_packages
THIS_DIR = os.path.dirname(os.path.realpath(__name__))
... | mpl-2.0 | -433,420,488,918,406,600 | 35.285714 | 81 | 0.62036 | false | 3.907692 | false | false | false |
clusterfudge/boomer | test/skills/core.py | 1 | 6423 | import unittest
from re import error
from os.path import join, dirname, abspath
from boomer.skills.core import load_regex_from_file, load_regex, \
load_vocab_from_file, load_vocabulary
from boomer.util.log import getLogger
__author__ = 'eward'
logger = getLogger(__name__)
class MockEmitter(object):
def __in... | gpl-3.0 | 6,149,371,600,193,996,000 | 39.396226 | 79 | 0.516581 | false | 3.933252 | true | false | false |
minlexx/pyevemon | esi_client/models/get_characters_character_id_not_found.py | 1 | 3020 | # coding: utf-8
"""
EVE Swagger Interface
An OpenAPI for EVE Online
OpenAPI spec version: 0.4.6
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class GetCharactersCharacterIdNotFound(object):
"""
NOTE... | gpl-3.0 | 8,722,867,332,169,676,000 | 24.811966 | 77 | 0.527152 | false | 4.617737 | false | false | false |
vakwetu/novajoin_tempest_plugin | novajoin_tempest_plugin/config.py | 1 | 1694 | # Copyright 2016 Red Hat
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 8,110,496,463,582,505,000 | 37.5 | 78 | 0.615702 | false | 4.377261 | false | false | false |
pgavin/or1k-gcc | libstdc++-v3/python/libstdcxx/v6/printers.py | 1 | 37565 | # Pretty-printers for libstc++.
# Copyright (C) 2008, 2009, 2010, 2011, 2012 Free Software Foundation, 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 3 of the License, or
... | gpl-2.0 | 8,451,296,234,823,861,000 | 34.981801 | 103 | 0.562359 | false | 3.819134 | false | false | false |
ElitosGon/medgoproject | medgointranet/migrations/0025_auto_20170812_0126.py | 1 | 1210 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.3 on 2017-08-12 01:26
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('medgointranet', '0024_especialidaddoctor_is_doctor'),
]
operations = [
migr... | apache-2.0 | -8,401,348,037,414,133,000 | 33.571429 | 114 | 0.595041 | false | 3.590504 | false | false | false |
DannyArends/genenetwork2 | wqflask/wqflask/export_traits.py | 1 | 1943 | from __future__ import print_function, division
import csv
import xlsxwriter
import StringIO
import datetime
import simplejson as json
from pprint import pformat as pf
def export_search_results_csv(targs):
table_data = json.loads(targs['export_data'])
table_headers = table_data['headers']
table_rows =... | agpl-3.0 | -4,327,021,057,811,982,000 | 32.517241 | 171 | 0.638703 | false | 3.390925 | false | false | false |
zeph/sqlhbase | sqlhbase/intake.py | 1 | 5191 | __author__ = 'zeph'
__hbase__ = "localhost"
__createtable__ = 'create'
__valuestable__ = 'values'
__compressed_nohistory__ = dict(
max_versions=1,
compression="gz", # FIXME https://github.com/twitter/hadoop-lzo/issues/56
)
import happybase
import time
import os
from datetime import datetime
from sqlhbase.popu... | gpl-3.0 | 6,153,604,465,253,617,000 | 37.738806 | 101 | 0.575034 | false | 3.707857 | false | false | false |
CMUSV-VisTrails/WorkflowRecommendation | vistrails/gui/vistrail_controller.py | 1 | 56940 | ###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... | bsd-3-clause | -3,092,456,162,503,853,000 | 39.613409 | 107 | 0.537689 | false | 4.442537 | false | false | false |
maveron58/indiana | positioning/links/transform/to_vectors_with_stats.py | 1 | 1170 | import numpy as np
from positioning.entities.fingerprint_data import FingerprintData
from positioning.links import Base
class ToVectorsWithStats(Base):
def __init__(self, vectorisation, **kwargs):
self.vectorisation = vectorisation
def calculate(self, fingerprints, **kwargs):
fingerprint_vec... | mit | 1,298,169,916,315,228,700 | 28.25 | 71 | 0.608547 | false | 4.333333 | false | false | false |
ireaderlab/zyredis | test/test_key.py | 1 | 1036 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2015,掌阅科技
All rights reserved.
摘 要: test_key.py
创 建 者: WangLichao
创建日期: 2015-08-18
"""
import sys
import os
sys.path.append(os.path.dirname(os.path.split(os.path.realpath(__file__))[0]))
import unittest
from zyredis.key import Key
class TestKeyModel... | mit | -7,468,999,410,153,419,000 | 19.73913 | 78 | 0.536688 | false | 2.620879 | true | false | false |
JanetMatsen/Machine_Learning_CSE_546 | HW3/code/kernel.py | 1 | 3858 | import numpy as np
from scipy.spatial.distance import pdist
class Fourier:
def __init__(self, X, k=60000, sigma=None):
self.X = X
self.k = k
self.N = X.shape[0]
self.d = k
if sigma is None:
sample_size = min(self.N, max(1000, int(X.shape[0]/10)))
self... | mit | 6,597,703,453,511,116,000 | 31.361345 | 80 | 0.586341 | false | 3.782908 | false | false | false |
rhyolight/nupic.son | app/soc/logic/allocations.py | 1 | 9087 | # Copyright 2009 the Melange authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in wr... | apache-2.0 | -8,429,122,770,888,543,000 | 27.756329 | 77 | 0.664356 | false | 3.883333 | false | false | false |
elebihan/clixtragen | clixtragen/parsers.py | 1 | 2723 | # -*- coding: utf-8 -*-
#
# clixtragen - generates helpers for a command line interpreter
#
# Copyright (C) 2013 Eric Le Bihan
#
# 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 ... | gpl-3.0 | -7,029,315,448,484,262,000 | 34.363636 | 73 | 0.543518 | false | 3.980994 | false | false | false |
markon/pygerrit2 | pygerrit2/rest/__init__.py | 1 | 11404 | # The MIT License
#
# Copyright 2013 Sony Mobile Communications. All rights reserved.
#
# 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 r... | mit | -6,413,818,994,184,886,000 | 30.590028 | 80 | 0.561119 | false | 4.583601 | false | false | false |
TradeHero/gitinspector | gitinspector/blame.py | 1 | 12114 | # coding: utf-8
#
# Copyright © 2012-2014 Ejwa Software. All rights reserved.
#
# This file is part of gitinspector.
#
# gitinspector 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 Lic... | gpl-3.0 | -8,566,646,468,045,941,000 | 39.376667 | 124 | 0.54198 | false | 3.482749 | false | false | false |
nicolasmcnair/magpy | old/1.0/magstim.py | 1 | 27240 | # -*- coding: utf-8 -*-
"""
Created on Thu Jan 07 15:26:27 2016
Code relating to controlling 200^2, BiStim^2, and Rapid^2 Magstim TMS units
@author: Nicolas McNair
"""
from misc import calcCRC, parseMagstimResponse, connectionRobot, serialPortController
from time import sleep
import multiprocessing
cla... | gpl-3.0 | 4,508,618,133,411,481,600 | 45.873462 | 217 | 0.60033 | false | 4.682021 | false | false | false |
kntem/webdeposit | modules/webdeposit/lib/webdeposit_autocomplete_utils.py | 1 | 2246 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 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) a... | gpl-2.0 | -8,789,314,424,753,844,000 | 31.550725 | 75 | 0.674533 | false | 3.819728 | false | false | false |
Crystal-SDS/dashboard | crystal_dashboard/dashboards/crystal/controllers/tabs.py | 1 | 2491 | from django.utils.translation import ugettext_lazy as _
from horizon import exceptions
from horizon import tabs
import json
from crystal_dashboard.api import controllers as api
from crystal_dashboard.dashboards.crystal import exceptions as sdsexception
from crystal_dashboard.dashboards.crystal.controllers.controllers i... | gpl-3.0 | 2,848,383,743,220,356,000 | 40.516667 | 114 | 0.674428 | false | 4.440285 | false | false | false |
chslion/raspy | raspytasks/notifier/task.py | 1 | 2902 | # -*- coding: utf-8 -*-
from pushbullet import Pushbullet
from util import Mailer
from raspysystem.raspytask import RasPyTask
from twitter import TwitterTask
"""
send report end of day via email
send reports to pushbullet
"""
class NotifierTask(RasPyTask):
def __init__(self, parent):
RasPyTask.__... | gpl-3.0 | -2,072,705,241,713,207,800 | 28.02 | 85 | 0.522054 | false | 3.803408 | false | false | false |
GoogleCloudPlatform/declarative-resource-client-library | python/services/compute/disk.py | 1 | 26753 | # Copyright 2021 Google 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 by applicable law o... | apache-2.0 | 6,752,649,520,716,390,000 | 38.811012 | 87 | 0.646058 | false | 3.940059 | false | false | false |
perror/checkproject | checkproject/case.py | 1 | 6013 | # -*- coding: utf-8
# Checkcase class implementation.
"""Checkcase class implementation.
There is three kinds of ways to fail a check:
- Warning: Generate a warning message but do not count as an error.
- Error: Generate an error message and count as an error.
- Failure: Generate a failure message and stop the run... | bsd-3-clause | 2,456,050,514,170,871,300 | 34.579882 | 78 | 0.635623 | false | 4.683022 | false | false | false |
matrumz/RPi_Custom_Files | Printing/hplip-3.15.2/base/imagesize.py | 1 | 5904 | # -*- coding: utf-8 -*-
#
# (c) Copyright 2001-2008 Hewlett-Packard Development Company, L.P.
#
# 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 opt... | gpl-2.0 | -5,979,330,888,798,306,000 | 26.207373 | 91 | 0.564871 | false | 3.247525 | false | false | false |
PetterS/easy-IP | plot_first_order.py | 1 | 1253 | #!/usr/bin/python3
# Petter Strandmark
import sys
import matplotlib.pyplot as plt
LOOKING_FOR_DATA = 1
READING_DATA = 2
state = LOOKING_FOR_DATA
iterations = []
objectives = []
relative_changes_in_x = []
relative_changes_in_y = []
feasibilities = []
optimal_value = None
for line in s... | bsd-2-clause | 7,260,223,779,671,984,000 | 23.568627 | 68 | 0.671987 | false | 2.997608 | false | false | false |
dubb-b/salt-pkg-tests | test_download/download.py | 1 | 5374 | #!/usr/bin/python
from BeautifulSoup import BeautifulSoup as bsoup
import BeautifulSoup
from shutil import copyfile
import argparse
import requests
import re
import os
# Miscellaneous variables
TMP_DOCKER_DIR = os.path.join('/tmp', 'docker', "{{ rand_dir }}")
LATEST = '2016.11'
check_steps = []
os_tabs = ['tab1-deb... | apache-2.0 | 1,571,443,880,166,233,900 | 31.969325 | 101 | 0.576293 | false | 3.431673 | false | false | false |
bjorgvino/lonelytogether | flask_utils.py | 1 | 1477 | from datetime import timedelta
from flask import make_response, request, current_app
from functools import update_wrapper
def crossdomain(origin=None, methods=None, headers=None, max_age=21600, attach_to_all=True, automatic_options=True):
if methods is not None:
methods = ', '.join(sorted(x.upper() for x in me... | apache-2.0 | -6,103,715,943,592,053,000 | 34.190476 | 118 | 0.675694 | false | 3.836364 | false | false | false |
BMJHayward/numpy | numpy/core/numeric.py | 1 | 86035 | from __future__ import division, absolute_import, print_function
import os
import sys
import warnings
import collections
from numpy.core import multiarray
from . import umath
from .umath import (invert, sin, UFUNC_BUFSIZE_DEFAULT, ERR_IGNORE,
ERR_WARN, ERR_RAISE, ERR_CALL, ERR_PRINT, ERR_LOG,
... | bsd-3-clause | -981,880,825,618,309,600 | 28.769896 | 94 | 0.573057 | false | 3.565035 | false | false | false |
gizela/gizela | gizela/pyplot/FigureLayoutEpochList2D.py | 1 | 16216 | # gizela
#
# Copyright (C) 2010 Michal Seidl, Tomas Kubin
# Author: Tomas Kubin <tomas.kubin@fsv.cvut.cz>
# URL: <http://slon.fsv.cvut.cz/gizela>
#
# $Id$
from gizela.pyplot.FigureLayoutErrEll import FigureLayoutErrEll
from gizela.pyplot.PlotPoint import PlotPoint
from gizela.util.Error import Error
#import mat... | gpl-3.0 | -1,789,572,953,385,198,300 | 34.718062 | 83 | 0.524482 | false | 4.139903 | true | false | false |
sandcage/sandcage-api-django | src/apigui/forms.py | 1 | 3544 | from django import forms
class TasksForm(forms.Form):
url = forms.URLField(label='Source file URL', max_length=200,
required=True)
reference_id = forms.CharField(label='Reference Id', max_length=100,
required=False)
overwrite_file = forms.ChoiceFi... | apache-2.0 | 2,641,546,734,880,941,600 | 53.523077 | 78 | 0.486174 | false | 4.935933 | false | false | false |
George-Gate/CERN-Video-Downloader | resetErrorStatus.py | 1 | 1538 | import os
import shutil
def recordToFile(record,msg):
'''Record msg to file, using binary mode'''
if len(msg.encode())>50:
while len(msg.encode())>47:
msg=msg[0:-int((len(msg.encode())-47)/2)-1]
msg=msg+'...'
written=record.write( '{: <50}'.format(msg).encode() )
record.seek... | mit | 1,908,818,274,527,336,400 | 31.723404 | 91 | 0.613134 | false | 3.585082 | false | false | false |
google/citest | citest/json_predicate/path_result.py | 1 | 11513 | # Copyright 2015 Google 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 applicable law or a... | apache-2.0 | -5,231,440,346,844,387,000 | 36.37987 | 79 | 0.657691 | false | 3.90536 | false | false | false |
projectcuracao/projectcuracao | housekeeping/setThresholds.py | 1 | 3072 | # sets the BatteryWatchdog Thresholds
# filename: setThreshold.py
# Version 1.0 10/31/13
#
#
#
import sys
import time
import RPi.GPIO as GPIO
import serial
import MySQLdb as mdb
sys.path.append('./pclogging')
sys.path.append('./util')
import pclogging
import util
sys.path.append('/home/pi/ProjectCuracao/main/confi... | gpl-3.0 | -8,892,609,151,379,324,000 | 25.713043 | 479 | 0.672201 | false | 2.911848 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.