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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
allenai/allennlp | allennlp/training/trainer.py | 1 | 56811 | import datetime
import logging
import math
import os
import re
import time
import traceback
from contextlib import contextmanager
from typing import Any, Callable, Dict, Iterator, List, Optional, Tuple, Type, Union
from allennlp.common.util import int_to_device
import torch
import torch.distributed as dist
from torch... | apache-2.0 | 2,535,458,135,862,169,600 | 41.618905 | 114 | 0.608544 | false | 4.433856 | false | false | false |
google/playhvz | backend/constants.py | 1 | 1174 | #!/usr/bin/python
#
# Copyright 2017 Google 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 law or a... | apache-2.0 | -48,341,932,827,967,384 | 27.634146 | 74 | 0.707836 | false | 3.307042 | false | false | false |
t3dev/odoo | addons/stock/tests/test_report.py | 2 | 1121 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import odoo
import odoo.tests
class TestReports(odoo.tests.TransactionCase):
def test_reports(self):
product1 = self.env['product.product'].create({
'name': 'Mellohi',
'default_code':... | gpl-3.0 | 436,866,183,249,691,840 | 42.115385 | 180 | 0.597681 | false | 3.046196 | false | false | false |
scholer/cadnano2.5 | cadnano/color.py | 2 | 3229 | # -*- coding: utf-8 -*-
"""This allows the model to have a :class:`Color` object class without
the need for :class:`PyQt5.QtGui.QColor`
When running the Qt Application, :class:`QColor` will be used, otherwise an
API compatible class is used and exported as a :class:`Color` object
Currently :class:`Color` objects are ... | mit | 8,278,896,522,655,440,000 | 27.324561 | 85 | 0.5048 | false | 3.961963 | false | false | false |
jessicalucci/TaskManagement | taskflow/engines/dist_engine/dtclient.py | 1 | 7108 | # -*- coding: utf-8 -*-
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (C) 2013 Rackspace Hosting 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
#... | apache-2.0 | -4,631,248,882,896,480,000 | 37.215054 | 78 | 0.589617 | false | 4.58285 | false | false | false |
Dev-Cloud-Platform/Dev-Cloud | dev_cloud/cc1/src/clm/utils/decorators.py | 1 | 10248 | # -*- coding: utf-8 -*-
# @COPYRIGHT_begin
#
# Copyright [2010-2014] Institute of Nuclear Physics PAN, Krakow, Poland
#
# 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.apac... | apache-2.0 | 987,290,668,116,218,800 | 29.771772 | 160 | 0.620084 | false | 3.707308 | false | false | false |
opmuse/opmuse | opmuse/sizeof.py | 1 | 1750 | # stolen from http://code.activestate.com/recipes/577504/ with some minor changes
# for pep8 compatibility
from __future__ import print_function
from sys import getsizeof, stderr
from itertools import chain
from collections import deque
try:
from reprlib import repr
except ImportError:
pass
def total_size(o,... | agpl-3.0 | -667,687,790,504,563,000 | 31.407407 | 86 | 0.609143 | false | 4.475703 | false | false | false |
sunlightlabs/read_FEC | fecreader/summary_data/management/commands/update_all_candidate_times.py | 1 | 3767 | from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db.models import Sum
from summary_data.utils.summary_utils import summarize_committee_periodic_webk
from summary_data.models import Candidate_Overlay, Authorized_Candidate_Committees, Committee_Time_Summary, Comm... | bsd-3-clause | 9,153,019,869,231,300,000 | 46.696203 | 235 | 0.63605 | false | 4.090119 | false | false | false |
GedheFoundation/sidesa2.0 | surat_masuk.py | 1 | 6371 | #Boa:Frame:surat_masuk
import wx
import wx.richtext
import wx.lib.buttons
import input_administrasi_surat
def create(parent):
return surat_masuk(parent)
[wxID_SURAT_MASUK, wxID_SURAT_MASUKDARI, wxID_SURAT_MASUKDATEPICKERCTRL1,
wxID_SURAT_MASUKINPUT_KETERANGAN, wxID_SURAT_MASUKINPUT_NOMOR_SURAT,
wxID_SURAT_MA... | gpl-2.0 | -2,547,471,735,619,508,700 | 47.633588 | 189 | 0.638832 | false | 2.631557 | false | false | false |
calamares/calamares | src/modules/dummypythonqt/main.py | 1 | 8246 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# === This file is part of Calamares - <https://calamares.io> ===
#
# SPDX-FileCopyrightText: 2016-2017 Teo Mrnjavac <teo@kde.org>
# SPDX-FileCopyrightText: 2017 Alf Gaida <agaida@siduction.org>
# SPDX-License-Identifier: GPL-3.0-or-later
#
# Calamares is Free So... | gpl-3.0 | -682,205,914,237,107,000 | 42.861702 | 79 | 0.680936 | false | 4.162544 | false | false | false |
ofavre/cellulart | utils.py | 1 | 1311 | # -*- coding: utf-8 -*-
# License: See LICENSE file.
import math
CLASSIC = 0
WRAP = 1
#MOBIUS = 2
def distance(world_shape, type=CLASSIC):
def distance_classic(a,b):
val = 0.0
for ad,bd in zip(a,b):
val += (ad-bd)**2
return math.sqrt(val)
def distance_wrap(a,b):
... | bsd-3-clause | -2,513,885,121,454,406,000 | 23.735849 | 84 | 0.500381 | false | 3.431937 | false | false | false |
nathanbjenx/cairis | cairis/core/colourcodes.py | 1 | 3560 | # 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... | apache-2.0 | 3,056,037,936,750,514,000 | 33.901961 | 63 | 0.660674 | false | 3.032368 | false | false | false |
operasoftware/twisted-apns | apns/notification.py | 1 | 5424 | from datetime import datetime
import binascii
import json
import struct
from apns.commands import NOTIFICATION
from apns.utils import datetime_to_timestamp
class NotificationError(Exception):
"""To be thrown upon failures on notification processing."""
pass
class NotificationInvalidPriorityError(Notificati... | mit | 4,067,661,437,472,473,600 | 31.872727 | 79 | 0.615413 | false | 4.604414 | false | false | false |
vessemer/concept-to-clinic | prediction/src/tests/test_segmentation.py | 1 | 2579 | import os
import time
import pylidc as pl
import pytest
from config import Config
from . import get_timeout
from ..algorithms.identify.prediction import load_patient_images
from ..algorithms.segment.trained_model import predict
from ..preprocess.lung_segmentation import save_lung_segments, get_z_range
def test_cor... | mit | -8,960,259,686,865,526,000 | 32.934211 | 118 | 0.68166 | false | 3.532877 | true | false | false |
dabrahams/0install | zeroinstall/0launch-gui/main.py | 1 | 6132 | # Copyright (C) 2009, Thomas Leonard
# See the README file for details, or visit http://0install.net.
from __future__ import print_function
import os, sys
import logging
import warnings
from optparse import OptionParser
from zeroinstall import _, SafeException
from zeroinstall.injector import requirements
from zero... | lgpl-2.1 | 4,441,060,670,262,614,500 | 31.791444 | 134 | 0.708415 | false | 3.347162 | true | false | false |
otov4its/django-walletone | walletone/views.py | 1 | 1337 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import logging
from django.http.response import HttpResponse, HttpResponseBadRequest
from django.views.decorators.csrf import csrf_exempt
from .forms import WalletOneConfirmForm
from . import signals
logger = logging.getLogger(__name__)
@csrf_exempt
... | mit | 1,945,754,972,225,154,600 | 35.162162 | 80 | 0.646223 | false | 4.471572 | false | false | false |
amrishparmar/mal_cl_interface | nl_interface/search.py | 1 | 4686 | import html
from enum import Enum
import click
import requests
from bs4 import BeautifulSoup
import agent
import network
import ui
class StatusCode(Enum):
"""An Enum represented the type of result of database searches"""
NO_RESULTS = 0
USER_CANCELLED = 1
def display_entry_details(entry):
"""Displa... | mit | 740,526,283,656,575,100 | 39.396552 | 116 | 0.607981 | false | 4.26 | false | false | false |
vlegoff/tsunami | src/secondaires/peche/commandes/banc/editer.py | 1 | 2649 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
... | bsd-3-clause | -2,259,236,170,578,934,000 | 43.677966 | 79 | 0.709408 | false | 3.848175 | false | false | false |
reviewboard/rbtools | rbtools/clients/plastic.py | 1 | 13440 | """A client for Plastic SCM."""
from __future__ import unicode_literals
import logging
import os
import re
from rbtools.clients import SCMClient, RepositoryInfo
from rbtools.clients.errors import (InvalidRevisionSpecError,
TooManyRevisionsError,
... | mit | 1,965,228,939,996,342,800 | 34.368421 | 79 | 0.510714 | false | 4.543611 | false | false | false |
Statoil/SegyIO | python/examples/write.py | 1 | 2756 | import sys
import segyio
import numpy as np
def main():
if len( sys.argv ) < 2:
sys.exit("Usage: write.py [file]")
filename = sys.argv[1]
# the mode parameter is passed directly to C's fopen
# opening the file for writing requires r+, not rw because rw would
# truncate (effectively destro... | lgpl-3.0 | 8,186,660,944,869,912,000 | 31.809524 | 78 | 0.58164 | false | 3.770178 | false | false | false |
oblalex/gnuplot.py-py3k | PlotItems.py | 1 | 26123 | # $Id: PlotItems.py 299 2007-03-30 12:52:17Z mhagger $
# Copyright (C) 1998-2003 Michael Haggerty <mhagger@alum.mit.edu>
#
# This file is licensed under the GNU Lesser General Public License
# (LGPL). See LICENSE.txt for details.
"""PlotItems.py -- Objects that can be plotted by Gnuplot.
This module contains severa... | lgpl-2.1 | 6,933,519,582,789,603,000 | 33.87717 | 79 | 0.598515 | false | 4.180349 | false | false | false |
wtpayne/hiai | a3_src/h70_internal/da/lwc/env.py | 1 | 8714 | # -*- coding: utf-8 -*-
"""
Local working copy runtime environment control.
---
type:
python_module
validation_level:
v00_minimum
protection:
k00_public
copyright:
"Copyright 2016 High Integrity Artificial Intelligence Systems"
license:
"Licensed under the Apache License, Version 2.0 (the Licen... | apache-2.0 | -3,498,644,829,901,860,400 | 33.995984 | 79 | 0.506197 | false | 4.672386 | false | false | false |
mahabs/nitro | nssrc/com/citrix/netscaler/nitro/resource/config/cr/crvserver_binding.py | 1 | 4725 | #
# 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 | -5,411,408,159,442,030,000 | 27.810976 | 119 | 0.702646 | false | 3.348689 | false | false | false |
jfouca/confucius | confucius/models/conference.py | 1 | 7188 | from django.db import models
from django.db.models import Q
from django.db.models.signals import pre_save, post_delete
from django.dispatch import receiver
from datetime import datetime
from confucius.models import ConfuciusModel, User
class Action(ConfuciusModel):
name = models.CharField(max_length=155, verbose_... | bsd-3-clause | -5,912,912,759,637,472,000 | 31.378378 | 139 | 0.664719 | false | 3.821372 | false | false | false |
rajpushkar83/cloudmesh | cloudmesh/management/project.py | 1 | 12236 | from mongoengine import *
from mongoengine.context_managers import switch_db
from datetime import datetime
import hashlib
import uuid
from user import User, Users
# from comittee import Committee
from pprint import pprint
from cloudmeshobject import CloudmeshObject
from cloudmesh_base.ConfigDict import ConfigDict
from ... | apache-2.0 | -4,249,167,181,425,727,000 | 28.990196 | 100 | 0.505721 | false | 4.886581 | false | false | false |
bkold/CarbonCopy | ribbit_app/tests.py | 1 | 6847 | from django.test import TestCase
from django.test.client import Client
from django.contrib.auth.models import User
from django.conf.urls import url
from ribbit_app.models import Ribbit
from . import views
from django.core.urlresolvers import reverse
from django.test import LiveServerTestCase
from django.contrib.auth.... | mit | 3,674,270,257,799,125,000 | 32.89604 | 138 | 0.701913 | false | 3.116523 | true | false | false |
keans/dstools | dstools/utils.py | 1 | 1422 | import itertools
def pairwise(iterable):
"""
s -> (s0,s1), (s1,s2), (s2, s3), ...
"""
a, b = itertools.tee(iterable)
next(b, None)
return list(zip(a, b))
def str2bool(v):
"""
converts a string to a boolean
"""
return v.lower() in ("yes", "true", "t", "1")
def chunks(li, siz... | mit | -6,534,625,633,302,136,000 | 21.571429 | 66 | 0.530942 | false | 3.276498 | false | false | false |
OpenTrons/opentrons_sdk | api/src/opentrons/deck_calibration/endpoints.py | 1 | 24629 | from uuid import uuid1
from typing import Dict, Tuple, Optional, NamedTuple
import logging
from enum import Enum
try:
from opentrons import instruments
except ImportError:
pass
from opentrons.config import pipette_config, robot_configs, feature_flags
from opentrons.types import Mount, Point
from opentrons.hard... | apache-2.0 | 6,045,012,831,655,699,000 | 34.335725 | 79 | 0.618336 | false | 3.977552 | true | false | false |
benitesf/Skin-Lesion-Analysis-Towards-Melanoma-Detection | main.py | 1 | 9476 | # Import methods of features extraction
from features_extraction.feature_extraction import FeatureExtraction
# Import methods of learning
from learning.learning import neural_network
# Import methods of classification
from classification.classification import classify, confusion_matrix, total_error, local_error
#
fr... | mit | -516,867,449,965,981,630 | 32.132867 | 117 | 0.529232 | false | 3.194875 | true | false | false |
snakeleon/YouCompleteMe-x64 | third_party/ycmd/third_party/watchdog_deps/watchdog/src/watchdog/events.py | 2 | 16163 | # coding: utf-8
#
# Copyright 2011 Yesudeep Mangalapilly <yesudeep@gmail.com>
# Copyright 2012 Google, Inc & contributors.
#
# 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.a... | gpl-3.0 | -7,516,226,166,804,324,000 | 27.55477 | 99 | 0.619602 | false | 4.19139 | false | false | false |
igorgai/django-custom-user | custom_user/forms.py | 1 | 3880 | """EmailUser forms."""
import django
from django import forms
from django.contrib.auth import get_user_model
from django.contrib.auth.forms import ReadOnlyPasswordHashField
from django.utils.translation import ugettext_lazy as _
class EmailUserCreationForm(forms.ModelForm):
"""A form for creating new users.
... | bsd-3-clause | -1,206,752,125,892,193,000 | 28.846154 | 75 | 0.617268 | false | 4.439359 | false | false | false |
quater/calico-containers | calicoctl/calico_ctl/status.py | 1 | 9262 | # Copyright (c) 2015-2016 Tigera, 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 applicabl... | apache-2.0 | -3,644,788,646,197,634,000 | 35.464567 | 99 | 0.603865 | false | 4.109139 | false | false | false |
niwinz/Green-Mine | src/greenmine/wiki/views.py | 1 | 4981 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from django.template.defaultfilters import slugify
from django.shortcuts import get_object_or_404
from ..core.utils.slug import slugify_uniquely
from ..core.generic import GenericView
from ..core.decorators im... | bsd-3-clause | 2,264,128,126,756,378,400 | 28.64881 | 83 | 0.592853 | false | 3.79939 | false | false | false |
akesterson/dpath-python | tests/test_util_set.py | 1 | 1710 | import dpath.util
def test_set_existing_separator():
dict = {
"a": {
"b": 0,
},
}
dpath.util.set(dict, ';a;b', 1, separator=";")
assert(dict['a']['b'] == 1)
dict['a']['b'] = 0
dpath.util.set(dict, ['a', 'b'], 1, separator=";")
assert(dict['a']['b'] == 1)
def... | mit | 6,502,466,740,530,720,000 | 17.791209 | 60 | 0.391813 | false | 2.807882 | false | false | false |
openlawlibrary/pygls | examples/json-extension/server/tests/unit/test_features.py | 1 | 3751 | ############################################################################
# Copyright(c) Open Law Library. All rights reserved. #
# See ThirdPartyNotices.txt in the project root for additional notices. #
# #
# Licensed u... | apache-2.0 | 6,875,330,818,496,659,000 | 33.1 | 79 | 0.582245 | false | 4.546667 | true | false | false |
ustuehler/git-cvs | cvsgit/command/clone.py | 1 | 3887 | """Command to clone a CVS repository or module as a Git repository."""
import os.path
import shutil
from cvsgit.main import Command, Conduit
from cvsgit.i18n import _
from cvsgit.command.verify import Verify
class Clone(Command):
__doc__ = _(
"""Clone a CVS repository or module into a Git repository.
Us... | isc | 4,724,368,370,476,854,000 | 38.262626 | 79 | 0.565475 | false | 4.285557 | false | false | false |
Clinical-Genomics/scout | scout/server/blueprints/dashboard/controllers.py | 1 | 12437 | import logging
from flask import flash, redirect, request, url_for
from flask_login import current_user
from scout.server.extensions import store
from scout.server.utils import user_institutes
from .forms import DashboardFilterForm
LOG = logging.getLogger(__name__)
def institute_select_choices():
"""Return a ... | bsd-3-clause | -1,192,204,301,845,954,000 | 31.643045 | 98 | 0.617512 | false | 3.768788 | false | false | false |
Hitachi-Data-Systems/org-chart-builder | openpyxl/worksheet/dimensions.py | 1 | 6673 | from __future__ import absolute_import
# Copyright (c) 2010-2014 openpyxl
from openpyxl.compat import safe_string
from openpyxl.cell import get_column_interval, column_index_from_string
from openpyxl.descriptors import Integer, Float, Bool, Strict, String, Alias
from openpyxl.compat import OrderedDict
class Dimensio... | apache-2.0 | 5,091,376,572,354,088,000 | 30.476415 | 84 | 0.542335 | false | 4.433887 | false | false | false |
timberline-secondary/hackerspace | src/portfolios/views.py | 1 | 8722 | import os
from django.urls import reverse
from django.http import Http404
from django.contrib import messages
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.messages.views import Success... | gpl-3.0 | -2,756,887,367,504,752,600 | 35.957627 | 105 | 0.658794 | false | 3.608606 | false | false | false |
bzamecnik/sms-tools | tests/sprModel_test.py | 1 | 1710 | import math
import numpy as np
from scipy.signal import get_window
from smst.utils.math import rmse
from smst.utils import audio
from smst.models import spr
from .common import sound_path
# TODO: the test needs fixing after the model is fixed
def test_reconstruct_sound():
fs, x = audio.read_wav(sound_path("sax-... | agpl-3.0 | -4,352,714,113,328,351,000 | 34.625 | 97 | 0.70117 | false | 3.092224 | false | false | false |
hojel/epubia | markdown2pdf.py | 1 | 3489 | # -*- coding: utf-8 -*-
import markdown
import ho.pisa as pisa
import StringIO
import os
import re
from Cheetah.Template import Template
from tempfile import NamedTemporaryFile
debug = False
def markdown2pdf(text, pdffile, cssfile='xhtml2pdf.css', src_dir='.',
fontfile='arial.ttf', skipTo1st=False... | mit | -3,050,844,844,239,022,000 | 34.642105 | 116 | 0.554726 | false | 3.327916 | false | false | false |
kickapoo/prometheus | prometheus/__init__.py | 1 | 1867 | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.login import LoginManager
from flask.ext.moment import Moment
from flask.ext.bootstrap import Bootstrap
import pyowm
app = Flask(__name__, instance_relative_config=True)
# config.default
app.config.from_object('config.default')
# config... | gpl-3.0 | 4,680,024,369,101,816,000 | 38.723404 | 77 | 0.803964 | false | 3.660784 | true | false | false |
shuitian/pokemon_rpg | Assets/server/sqldata.py | 1 | 2027 | #-*- coding:utf-8 –*-
import sqlite3,os,time,json
class sql(object):
"""处理数据库的类"""
def __init__(self):
"""获取数据库连接"""
super(sql, self).__init__()
db = 'monsters.db'
self.conn = sqlite3.connect(db)
print "Open",db,"Success"
def __del__(self):
"""关闭数据库连接"""
self.conn.close()
def show_table(self, tab... | mit | 71,420,953,494,727,550 | 23.551282 | 91 | 0.602089 | false | 2.45828 | false | false | false |
jsonchin/nba_stats_scraper_db_storage | nba_ss_db/scrape/query_param_values.py | 1 | 2097 | """
Contains functions to retrieve fillable values for
API request jobs.
"""
import datetime
from .. import db, CONFIG
from ..scrape.utils import get_date_before, format_date_for_api_request, PROPER_DATE_FORMAT
QUERY_PARAM_VALUES = {}
def get_possible_query_param_values(query_param, is_daily):
"""
Valid quer... | apache-2.0 | -6,235,656,609,852,025,000 | 35.155172 | 118 | 0.592752 | false | 3.724689 | false | false | false |
wheeler-microfluidics/open-drop | pavement.py | 1 | 1896 | from collections import OrderedDict
import sys
from importlib import import_module
from paver.easy import task, needs, path, sh, cmdopts, options
from paver.setuputils import setup, find_package_data, install_distutils_tasks
try:
from base_node_rpc.pavement_base import *
except ImportError:
pass
sys.path.inse... | gpl-3.0 | -3,173,363,006,376,368,600 | 36.92 | 78 | 0.594937 | false | 3.885246 | false | false | false |
DiegoCorrea/ouvidoMusical | apps/similarities/Cosine/algorithm/views.py | 1 | 2656 | from .algorithm import CosineSimilarity
from apps.data.songs.models import Song, SongSimilarity
from apps.similarities.Cosine.benchmark.models import BenchCosine_SongTitle
from django.db import transaction
from django.utils import timezone
from multiprocessing.dummy import Pool as ThreadPool
from apps.CONSTANTS import ... | mit | 6,042,651,033,651,817,000 | 30.247059 | 101 | 0.643825 | false | 3.970105 | false | false | false |
Acimaz/Google_Apple_Financial_Reporter | Reporter.py | 1 | 5765 | # Reporting tool for querying Sales- and Financial Reports from iTunes Connect and Google Developer Console
#
# This tool can be used to download financial reports from both Google and Apple
# for the app of your choice (of course i assume that you are the owner of this app)
#
# Copyright (c) 2017 Ayhan Sakarya, Kaasa ... | mit | 5,068,535,535,105,347,000 | 48.273504 | 203 | 0.646487 | false | 4.462074 | false | false | false |
openstack/swift | swift/common/middleware/recon.py | 1 | 17726 | # 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 | -7,486,379,650,210,433,000 | 40.415888 | 79 | 0.518278 | false | 4.36601 | false | false | false |
eragonruan/text-detection-ctpn | utils/text_connector/detectors.py | 1 | 2097 | # coding:utf-8
import numpy as np
from utils.bbox.nms import nms
from .text_connect_cfg import Config as TextLineCfg
from .text_proposal_connector import TextProposalConnector
from .text_proposal_connector_oriented import TextProposalConnector as TextProposalConnectorOriented
class TextDetector:
def __init__(sel... | mit | -1,105,246,956,184,877,400 | 41.854167 | 108 | 0.633933 | false | 3.107251 | false | false | false |
ashleyjsands/machine-learning | benchmark.py | 1 | 1576 | """
This script is used to benchmark neural network performance to determine which optimisations are useful.
"""
from neural_network import *
from data import *
from neural_network import get_index_of_maximum_value
import time
def print_intro():
print "Benchmarking neural network implementation"
def get_neural_n... | mit | 7,466,109,914,126,193,000 | 34.818182 | 241 | 0.695431 | false | 3.533632 | false | false | false |
amanmehara/programming-app-data | Python/ScrappingHackerNewsWebsite/ScrappingHackerNewsWebsite.py | 1 | 3141 | '''
Copyright [2020] [Arun Kumar G]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | -5,395,644,967,868,740,000 | 45.191176 | 172 | 0.737663 | false | 3.734839 | false | false | false |
Bezoar/surrender-rides | bp_content/themes/default/handlers/forms.py | 1 | 5264 | # *-* coding: UTF-8 *-*
"""
Created on June 10, 2012
@author: peta15
"""
__author__ = 'coto'
from datetime import datetime
from wtforms import fields
from wtforms import Form
from wtforms import validators, ValidationError
from webapp2_extras.i18n import lazy_gettext as _
from webapp2_extras.i18n import ngettext, gett... | mit | 4,451,003,861,496,569,000 | 48.352381 | 156 | 0.650328 | false | 3.861401 | false | false | false |
shengqh/ngsperl | lib/GATK/mergeMutect.py | 1 | 4103 | import argparse
import sys
import logging
import os
import errno
import gzip
from asyncore import read
from Mutect import MutectItem, MutectResult
def check_file_exists(file):
if not os.path.exists(file):
raise FileNotFoundError(errno.ENOENT, os.strerror(errno.ENOENT), file)
def readFileMap(fileName):
check_f... | apache-2.0 | 5,800,809,459,799,280,000 | 33.771186 | 169 | 0.639288 | false | 3.235804 | false | false | false |
gprMax/gprMax | setup.py | 1 | 7984 | # Copyright (C) 2015-2020: The University of Edinburgh
# Authors: Craig Warren and Antonis Giannopoulos
#
# This file is part of gprMax.
#
# gprMax 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 Foundatio... | gpl-3.0 | -5,500,311,628,205,997,000 | 37.200957 | 204 | 0.600952 | false | 3.766038 | false | false | false |
lare-team/django-lare | django_lare/models.py | 1 | 2035 | from django_lare import VERSION
class Lare(object):
enabled = False
current_namespace = ""
previous_namespace = ""
version = VERSION
supported_version = "1.0.0"
def __init__(self, request):
super(Lare, self).__init__()
if 'HTTP_X_LARE' in request.META:
if 'HTTP_X_... | mit | 3,086,362,984,252,951,600 | 34.701754 | 103 | 0.594595 | false | 4.625 | false | false | false |
previtus/MGR-Project-Code | Downloader/PreprocessData/GenListOfUrls.py | 1 | 1499 | # GenListOfUrls.py
import sys
sys.path.append('..')
def GenListOfUrls(Segments, PIXELS_X, PIXELS_Y, PrependPath='', minimal_length=20, custom=False):
'''
Iterates over the segment list and returns a list of urls needed for download
Outputs list of tripples in [ (<url>, <filename>, <edge id>), ... ]
'''... | mit | 9,217,931,892,103,464,000 | 36.475 | 129 | 0.623082 | false | 3.486047 | false | false | false |
yeleman/snisi | snisi_core/migrations/0005_auto_20150205_1516.py | 1 | 1889 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
('snisi_core', '0004_auto_20150114_1650'),
]
operations = [
migrations.CreateModel(
... | mit | -7,704,077,489,148,694,000 | 32.140351 | 114 | 0.535733 | false | 4.562802 | false | false | false |
DomBennett/pG-lt | pglt/tools/setup_tools.py | 1 | 16996 | #! /bin/usr/env python
# D.J. Bennett
# 07/11/2014
"""
pglt setup tools
"""
# PACKAGES
import argparse
import sys
import os
import re
import pickle
import csv
import logging
import platform
from datetime import datetime
from reseter_tools import Reseter
from special_tools import clean
from special_tools import stats
f... | gpl-2.0 | -6,247,521,024,659,388,000 | 36.853007 | 93 | 0.595552 | false | 3.878594 | false | false | false |
mediafactory/yats | sites/web/web/models.py | 1 | 3394 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.functional import lazy
from django.core.cache import cache
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
from yats.models import tickets
from yats.models import base
import datetime
import base64
import ht... | mit | -4,443,041,059,347,932,700 | 33.632653 | 129 | 0.652033 | false | 3.822072 | false | false | false |
hh-italian-group/h-tautau | Production/crab/split_dataset.py | 1 | 2726 | #!/usr/bin/env python
# Create json files to split dataset into several parts.
# This file is part of https://github.com/hh-italian-group/h-tautau.
import argparse
from sets import Set
from FWCore.PythonUtilities.LumiList import LumiList
from dbs.apis.dbsClient import DbsApi
parser = argparse.ArgumentParser(descripti... | gpl-2.0 | -1,129,987,620,451,551,900 | 37.394366 | 102 | 0.676816 | false | 3.173458 | false | false | false |
UPDDI/mps-database-server | assays/forms.py | 1 | 247404 | import datetime
from django import forms
from django.contrib.auth.models import Group
from django.forms.models import (
BaseInlineFormSet,
inlineformset_factory,
BaseModelFormSet,
modelformset_factory,
)
from cellsamples.models import Biosensor
from assays.models import (
AssayStudyConfiguration,
... | mit | 1,930,131,250,192,173,600 | 41.53103 | 207 | 0.56811 | false | 4.19384 | false | false | false |
google-research/tensor2robot | hooks/async_export_hook_builder_tpu_test.py | 1 | 2533 | # coding=utf-8
# Copyright 2021 The Tensor2Robot 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 ... | apache-2.0 | -8,682,825,229,037,684,000 | 35.710145 | 76 | 0.731938 | false | 3.441576 | true | false | false |
mrven/origin_align_addon | OriginAlign.py | 1 | 5309 | #02.05.2015
#Ivan "mrven" Vostrikov
bl_info = {
"name": "Origin Align",
'author': 'Ivan Vostrikov',
'version': (1, 0, 1),
'blender': (2, 7, 4),
'location': '3d view > Object > Origin Align X/Y/Z',
'description': 'In object mode, sets object origin to selected axis of 3D Cursor',
'wiki_url'... | gpl-2.0 | -5,504,240,410,435,975,000 | 38.619403 | 111 | 0.600301 | false | 3.833213 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/services/services/google_ads_field_service/client.py | 1 | 21308 | # -*- 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 o... | apache-2.0 | 3,742,854,204,615,069,700 | 40.055877 | 140 | 0.62324 | false | 4.535547 | false | false | false |
doucol/mysite | mysite/settings.py | 1 | 2120 | """
Django settings for mysite project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | mit | -8,617,119,388,000,631,000 | 23.941176 | 71 | 0.723113 | false | 3.231707 | false | false | false |
labase/brython_crafty | src/crafty/graphics.py | 1 | 7243 | #! /usr/bin/env python
# -*- coding: UTF8 -*-
"""
############################################################
Graphic handling classes
############################################################
:Author: *Carlo E. T. Oliveira*
:Contact: carlo@nce.ufrj.br
:Date: 2014/09/17
:Status: This is a "work in progress"
:Revis... | gpl-2.0 | -4,888,606,017,845,747 | 31.195556 | 115 | 0.597542 | false | 4.057703 | false | false | false |
joa/haxe-sublime2-bundle | features/haxe_create_type.py | 1 | 3178 | import sublime_plugin
import sublime
import os
try: # Python 3
from ..HaxeHelper import HaxeComplete_inst, isType
except (ValueError): # Python 2
from HaxeHelper import HaxeComplete_inst, isType
class HaxeCreateType( sublime_plugin.WindowCommand ):
classpath = None
currentFile = None
currentSrc ... | apache-2.0 | 42,504,940,573,944,810 | 27.890909 | 118 | 0.499056 | false | 3.801435 | false | false | false |
hasgeek/funnel | funnel/models/reorder_mixin.py | 1 | 5123 | from __future__ import annotations
from typing import TypeVar, Union
from uuid import UUID
from coaster.sqlalchemy import Query
from . import db
__all__ = ['ReorderMixin']
# Use of TypeVar for subclasses of ReorderMixin as defined in this mypy ticket:
# https://github.com/python/mypy/issues/1212
Reorderable = Typ... | agpl-3.0 | 1,974,439,064,453,346,300 | 40.314516 | 88 | 0.626586 | false | 4.16843 | false | false | false |
csparkresearch/ExpEYES17-Qt | SPARK17/textManual/MarkdownPP/Processor.py | 1 | 2387 | # Copyright 2015 John Reese
# Licensed under the MIT license
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import sys
if sys.version_info[0] != 2:
basestring = str
class Processor:
"""
Framework for allowing modules to modify the in... | mit | -5,170,128,148,573,232,000 | 29.602564 | 79 | 0.600335 | false | 4.802817 | false | false | false |
rocky/python3-trepan | trepan/processor/command/ipython.py | 1 | 6554 | # -*- coding: utf-8 -*-
# Copyright (C) 2009-2010, 2013, 2015, 2017, 2020 Rocky Bernstein
#
# 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 op... | gpl-3.0 | 5,708,448,502,736,158,000 | 29.769953 | 88 | 0.623741 | false | 4.158629 | false | false | false |
alcides/rdflib | rdflib/syntax/parsers/rdfa/state.py | 1 | 20868 | # -*- coding: utf-8 -*-
"""
Parser's execution context (a.k.a. state) object and handling. The state includes:
- dictionary for namespaces. Keys are the namespace prefixes, values are RDFLib Namespace instances
- language, retrieved from C{@xml:lang}
- URI base, determined by <base> (or set explicitly). This is ... | bsd-3-clause | 117,368,649,494,514,380 | 47.983568 | 312 | 0.592658 | false | 4.122284 | false | false | false |
Connexions/openstax-cms | openstax/settings/base.py | 1 | 11195 | # Django settings for openstax project.
import os
import sys
import raven
import logging.config
from django.utils.log import DEFAULT_LOGGING
PROJECT_ROOT = os.path.join(os.path.dirname(__file__), '..', '..')
BASE_DIR = PROJECT_ROOT
# check if running local dev server - else default to DEBUG=False
if len(sys.argv) > ... | agpl-3.0 | -222,336,772,868,262,720 | 30.183844 | 303 | 0.677177 | false | 3.424595 | false | false | false |
LTD-Beget/sprutio-rpc | lib/FileManager/workers/local/moveToWebDav.py | 1 | 5842 | import os
import shutil
import threading
import time
import traceback
from lib.FileManager.FM import REQUEST_DELAY
from lib.FileManager.WebDavConnection import WebDavConnection
from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer
class MoveToWebDav(BaseWorkerCustomer):
def __init__(self, sou... | gpl-3.0 | -9,210,427,962,494,208,000 | 37.85906 | 111 | 0.518135 | false | 4.254225 | false | false | false |
dhylands/upy-examples | rotary.py | 1 | 2290 | import pyb
class rotary():
def __init__(self,Apin='X21',Bpin='X22'):
self.B = pyb.Pin(Bpin)
self.A = pyb.Pin(Apin)
self.prevA = self.A.value()
self.prevB = self.B.value()
self.CWcount = 0
self.CCWcount = 0
self.position = 0
self.Bint = pyb.ExtInt(... | mit | 4,238,425,825,374,999,600 | 26.926829 | 98 | 0.448472 | false | 3.453997 | false | false | false |
mozvip/Sick-Beard | sickbeard/versionChecker.py | 1 | 18840 | # Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of Sick Beard.
#
# Sick Beard 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 t... | gpl-3.0 | -4,442,054,767,377,110,000 | 34.941176 | 286 | 0.578556 | false | 4.001699 | false | false | false |
Transkribus/TranskribusDU | TranskribusDU/gcn/avg_checkpoints.py | 1 | 4652 | # Taken from https://github.com/tensorflow/tensor2tensor/blob/master/tensor2tensor/utils/avg_checkpoints.py
# coding=utf-8
# Copyright 2018 The Tensor2Tensor 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... | bsd-3-clause | -3,850,041,144,974,980,000 | 37.775 | 107 | 0.678848 | false | 3.785191 | false | false | false |
necozay/tulip-control | tulip/transys/export/graph2dot.py | 1 | 17106 | # Copyright (c) 2013-2014 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice,... | bsd-3-clause | -4,901,562,265,867,219,000 | 29.169312 | 76 | 0.592365 | false | 3.661387 | false | false | false |
moto-timo/robotframework | src/robot/utils/robotpath.py | 1 | 5342 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 | 160,849,017,757,947,400 | 35.094595 | 83 | 0.647885 | false | 3.556591 | false | false | false |
Edraak/edraak-platform | lms/djangoapps/course_api/tests/test_forms.py | 1 | 4312 | """
Tests for Course API forms.
"""
from itertools import product
from urllib import urlencode
import ddt
from django.contrib.auth.models import AnonymousUser
from django.http import QueryDict
from openedx.core.djangoapps.util.test_forms import FormTestMixin
from student.tests.factories import UserFactory
from xmodu... | agpl-3.0 | -8,221,865,995,090,685,000 | 27.368421 | 91 | 0.612013 | false | 3.974194 | true | false | false |
tastyproject/tasty | tasty/tastyc/tastyc.py | 1 | 9949 | # -*- coding: utf-8 -*-
"""tastyc configuration module"""
import copy
import sys
import os.path
from ast import *
import gc
from tasty import state
from tasty.exc import TastySyntaxError
from tasty.types import *
from tasty.tastyc import bases
from tasty.tastyc.codegen import to_source
from tasty.tastyc.analyzati... | gpl-3.0 | -1,735,557,266,108,462,600 | 34.280142 | 212 | 0.679666 | false | 3.663108 | true | false | false |
mitsei/dlkit | dlkit/json_/authorization/searches.py | 1 | 11337 | """JSON implementations of authorization searches."""
# pylint: disable=no-init
# Numerous classes don't require __init__.
# pylint: disable=too-many-public-methods,too-few-public-methods
# Number of methods are defined in specification
# pylint: disable=protected-access
# Access to protected methods allow... | mit | -2,990,941,319,276,016,000 | 40.988889 | 121 | 0.659963 | false | 4.49168 | false | false | false |
chrisguiney/mudpy | mudpy/character/__init__.py | 1 | 1901 | from functools import partial
from .. import races
from .. import classes
from ..magic import SpellBook
class Character(object):
def __init__(self, name, description, equipment, inventory, attributes, level=1, race="Human", base_class="Fighter",
spellbook=None):
"""
@param name... | apache-2.0 | -1,466,427,402,006,687,000 | 27.818182 | 120 | 0.624934 | false | 4.150655 | false | false | false |
kevinkahn/softconsole | screens/specificscreens/weatherscreen.py | 1 | 6148 | from collections import OrderedDict
import debug
import logsupport
from screens import screen
import screens.__screens as screens
from keyspecs import toucharea
from utils import utilities, fonts, hw
from stores import valuestore
from utils.utilfuncs import wc, fmt
from utils.weatherfromatting import CreateWeathBlock
... | apache-2.0 | 1,973,004,741,115,924,700 | 40.540541 | 141 | 0.658913 | false | 2.901369 | false | false | false |
TotalVerb/territory | territory/recurser.py | 1 | 3793 | # ------------------------------------------------------------------------
#
# This file is part of Territory.
#
# Territory 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 ... | gpl-3.0 | -9,116,925,893,547,967,000 | 39.351064 | 78 | 0.561033 | false | 3.770378 | false | false | false |
CERNDocumentServer/invenio | modules/weblinkback/lib/weblinkback_dblayer.py | 1 | 13993 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2011, 2012 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) any... | gpl-2.0 | -5,230,928,770,171,948,000 | 30.874715 | 128 | 0.517616 | false | 4.116799 | false | false | false |
lem9/weblate | openshift/wsgi_install.py | 1 | 3249 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright © 2014 Daniel Tschan <tschan@puzzle.ch>
#
# This file is part of Weblate <https://weblate.org/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foun... | gpl-3.0 | -2,372,140,518,733,032,000 | 24.178295 | 77 | 0.641933 | false | 3.120077 | false | false | false |
gibsjose/SpectrumSite | Utilities/SteeringGenerator.py | 1 | 3470 | #!/usr/bin/python
import sys
# Input dictionary from KVP file
d = {}
# Defaults dictionary
defaults = {}
# Checks whether the key exists in the input dictionary
def Write(_key, _file):
if _key in d:
if not d[_key].strip():
_file.write("; ")
_file.write(_key + ' = ' + d[_key])
el... | mit | -3,632,527,644,091,879,400 | 22.605442 | 64 | 0.627089 | false | 2.71518 | false | false | false |
mclaughlin6464/pearce | bin/mcmc/pearce_mcmc_xigg_emu1_shot.py | 1 | 2151 | from pearce.emulator import OriginalRecipe, ExtraCrispy, SpicyBuffalo
from pearce.inference import run_mcmc_iterator
import numpy as np
from os import path
import cPickle as pickle
#training_file = '/u/ki/swmclau2/des/xi_cosmo_trainer/PearceRedMagicXiCosmoFixedNd.hdf5'
training_file = '/scratch/users/swmclau2/xi_zheng... | mit | -2,329,669,638,456,525,000 | 32.609375 | 143 | 0.686657 | false | 2.478111 | false | false | false |
m4rx9/rna-pdb-tools | rna_tools/tools/PyMOL4RNA/libs/show_contacts.py | 1 | 15707 | #!/usr/bin/python
"""
PyMOL plugin that provides show_contacts command and GUI
for highlighting good and bad polar contacts.
Factored out of clustermols by Matthew Baumgartner.
The advantage of this package is it requires many fewer dependencies.
Modified: Marcin Magnus 2020
Source <https://pymolwiki.org/index.p... | mit | 992,679,597,646,326,900 | 39.903646 | 144 | 0.569364 | false | 3.886909 | false | false | false |
Axelrod-Python/axelrod-evolver | tests/integration/test_cycler_integration.py | 1 | 1543 | import os
import tempfile
import unittest
import axelrod as axl
import axelrod_dojo as axl_dojo
class TestCyclerParams(unittest.TestCase):
def setUp(self):
pass
def test_default_single_opponent_e2e(self):
temp_file = tempfile.NamedTemporaryFile()
# we will set the objective to be
... | mit | 2,311,307,298,383,570,400 | 33.288889 | 101 | 0.573558 | false | 4.227397 | false | false | false |
airelil/pywinauto | pywinauto/findbestmatch.py | 1 | 20748 | # GUI Application automation and testing library
# Copyright (C) 2006-2018 Mark Mc Mahon and Contributors
# https://github.com/pywinauto/pywinauto/graphs/contributors
# http://pywinauto.readthedocs.io/en/latest/credits.html
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or with... | bsd-3-clause | 5,249,343,812,821,854,000 | 34.272727 | 118 | 0.581309 | false | 4.02952 | false | false | false |
RIKILT/CITESspeciesDetect | CheckCriteriaBlastSingleSample.py | 1 | 5204 | #!/usr/bin/env python
# Script which test the different filtering thresholds per barcode
# Returns per barcode the detected species which match the criteria
import sys
import os
### Get the OTU abundance from the file (This is per barcode)
def GetOTUabundance(statFile, pOTU):
# Local variables
f = open(statFile)
... | bsd-3-clause | -4,412,462,166,043,438,600 | 26.828877 | 94 | 0.62452 | false | 3.048623 | false | false | false |
jberci/resolwe | resolwe/flow/views/data.py | 1 | 8515 | """Data viewset."""
from elasticsearch_dsl.query import Q
from django.db import transaction
from django.db.models import Count
from rest_framework import exceptions, mixins, status, viewsets
from rest_framework.decorators import list_route
from rest_framework.response import Response
from resolwe.elastic.composer im... | apache-2.0 | -4,215,530,313,429,322,000 | 43.348958 | 116 | 0.601996 | false | 4.232107 | false | false | false |
astroclark/bhextractor | bin/bhex_scalemassdemo.py | 1 | 4019 |
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2014-2015 James Clark <james.clark@ligo.org>
#
# 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
... | gpl-2.0 | -3,245,627,533,540,735,000 | 30.645669 | 90 | 0.693705 | false | 3.120342 | false | false | false |
jeremy24/rnn-classifier | letter_tools.py | 1 | 1759 | import glob
import imghdr
import os
import PIL
from PIL import ImageFont
from PIL import Image
from PIL import ImageDraw
def _is_ascii(s):
return all(ord(c) < 128 for c in s)
def text2png(text, fullpath, color="#FFF", bgcolor="#000",
fontfullpath="assets/fonts/Oswald-Bold.ttf",
fontsize=35, leftpadding=3,... | mit | -5,027,793,800,516,839,000 | 25.253731 | 104 | 0.667425 | false | 3.032759 | false | false | false |
mihaisoloi/conpaas | conpaas-director/setup.py | 1 | 2293 | #!/usr/bin/env python
import os
import sys
import shutil
from pwd import getpwnam
from grp import getgrnam
from setuptools import setup
from pkg_resources import Requirement, resource_filename
CPSVERSION = '1.2.0'
CONFDIR = '/etc/cpsdirector'
if not os.geteuid() == 0:
CONFDIR = 'cpsdirectorconf'
long_descript... | bsd-3-clause | 3,412,883,459,429,648,400 | 34.828125 | 115 | 0.627126 | false | 3.289813 | false | false | false |
sssilver/angler | rod/rod/handler/lesson.py | 1 | 3347 | import flask
import decimal
import dateutil.parser
import flask.ext.login
import rod
import rod.model.student
import rod.model.lesson
import rod.model.group
import rod.model.company
import rod.model.transaction
import rod.model.schemas
lesson_handler = flask.Blueprint('lesson', __name__)
@lesson_handler.route('/le... | bsd-3-clause | -5,314,708,541,440,655,000 | 35.78022 | 105 | 0.689573 | false | 3.614471 | false | false | false |
henry-ngo/VIP | vip_hci/preproc/skysubtraction.py | 1 | 4110 | #! /usr/bin/env python
"""
Module with sky subtraction function.
"""
from __future__ import division
__author__ = 'C. Gomez @ ULg'
__all__ = ['cube_subtract_sky_pca']
import numpy as np
def cube_subtract_sky_pca(sci_cube, sky_cube, mask, ref_cube=None, ncomp=2):
""" PCA based sky subtraction.
Parameters
... | mit | 7,069,799,869,590,812,000 | 36.027027 | 82 | 0.592457 | false | 3.16641 | false | false | false |
justrypython/EAST | svm_model_v2.py | 1 | 2801 | #encoding:UTF-8
import os
import numpy as np
import sys
import cv2
import matplotlib.pyplot as plt
from sklearn.svm import NuSVC, SVC
import datetime
import pickle
#calculate the area
def area(p):
p = p.reshape((-1, 2))
return 0.5 * abs(sum(x0*y1 - x1*y0
for ((x0, y0), (x1, y1)) in segme... | gpl-3.0 | 3,479,348,540,319,028,700 | 29.129032 | 69 | 0.551946 | false | 2.843655 | false | false | false |
BorgERP/borg-erp-6of3 | l10n_hr/l10n_hr_fiskal/__openerp__.py | 1 | 2505 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Module: l10n_hr_fiskal
# Author: Davor Bojkić
# mail: bole@dajmi5.com
# Copyright (C) 2012- Daj Mi 5,
# http://www.dajmi5.com
# Co... | agpl-3.0 | 3,083,689,587,987,897,000 | 35.26087 | 78 | 0.544764 | false | 3.706667 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.