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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
silverapp/silver | silver/api/views/transaction_views.py | 1 | 4548 | # Copyright (c) 2015 Presslabs SRL
#
# 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 writ... | apache-2.0 | 2,897,298,705,134,729,000 | 35.97561 | 95 | 0.645339 | false | 4.593939 | false | false | false |
maojrs/riemann_book | exact_solvers/burgers_demos.py | 2 | 10422 | """
Additional functions and demos for Burgers' equation.
"""
import sys, os
from clawpack import pyclaw
from clawpack import riemann
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import animation
from IPython.display import HTML
import numpy as np
from utils import riemann_tools
from . import burge... | bsd-3-clause | 5,794,931,405,617,469,000 | 38.477273 | 112 | 0.572059 | false | 2.933296 | false | false | false |
unicef/un-partner-portal | backend/unpp_api/settings/base.py | 1 | 10700 | from __future__ import absolute_import
import os
import sys
####
# Change per project
####
from django.urls import reverse_lazy
from django.utils.text import slugify
PROJECT_NAME = 'unpp_api'
# project root and add "apps" to the path
PROJECT_ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path... | apache-2.0 | 250,126,248,760,582,600 | 30.378299 | 120 | 0.647477 | false | 3.324014 | true | false | false |
hendrycks/robustness | old/Icons-50/models/wrn.py | 1 | 3908 | import math
import torch
import torch.nn as nn
import torch.nn.functional as F
class BasicBlock(nn.Module):
def __init__(self, in_planes, out_planes, stride, dropRate=0.0):
super(BasicBlock, self).__init__()
self.bn1 = nn.BatchNorm2d(in_planes)
self.relu1 = nn.ReLU(inplace=True)
se... | apache-2.0 | -3,741,773,476,238,839,300 | 39.708333 | 116 | 0.56781 | false | 3.273032 | false | false | false |
Connexions/cnx-authoring | cnxauthoring/tests/test_functional.py | 1 | 173550 | # -*- coding: utf-8 -*-
# ###
# Copyright (c) 2013, Rice University
# This software is subject to the provisions of the GNU Affero General
# Public License version 3 (AGPLv3).
# See LICENCE.txt for details.
# ###
"""Functional tests of API."""
import datetime
import json
import os
import sys
import re
import unittest
f... | agpl-3.0 | 2,964,078,937,698,059,000 | 39.794775 | 121 | 0.510653 | false | 4.054667 | true | false | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/summary_lsa/types_of_service/type_of_service/state/__init__.py | 1 | 20811 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | -3,628,145,791,548,564,000 | 40.291667 | 440 | 0.575273 | false | 4.118543 | true | false | false |
praekelt/jmbo-foundry | foundry/migrations/0037_auto__add_field_country_country_code__add_unique_country_slug.py | 1 | 27780 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Country.country_code'
db.add_column('foundry_country', 'country_code',
... | bsd-3-clause | 169,661,863,726,752,320 | 83.43769 | 208 | 0.546724 | false | 3.649501 | false | false | false |
siliconsmiley/QGIS | python/plugins/processing/gui/ParametersPanel.py | 1 | 16790 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ParametersPanel.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
(C) 2013 by CS Systemes d'information (CS SI)
... | gpl-2.0 | 8,098,731,851,604,483,000 | 42.492228 | 143 | 0.58792 | false | 4.84922 | false | false | false |
SKIRT/PTS | core/extract/progress.py | 1 | 16047 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# *****************************************************************
# ** PTS -- Python Toolkit for working with SKIRT **
# ** © Astronomical Observatory, Ghent University **
# *****************************************************************
##... | agpl-3.0 | 3,470,374,518,671,627,000 | 31.881148 | 134 | 0.491836 | false | 5.149551 | false | false | false |
felipenaselva/felipe.repository | script.module.resolveurl/lib/resolveurl/plugins/trt.py | 1 | 1776 | '''
vidzi resolveurl plugin
Copyright (C) 2014 Eldorado
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distri... | gpl-2.0 | 3,321,776,893,372,562,000 | 37.608696 | 98 | 0.671734 | false | 3.609756 | false | false | false |
mikesname/python-ocrlab | ocrsite/ocrlab/forms/__init__.py | 1 | 1274 | """Ocrlab forms."""
from django import forms
from django.template.defaultfilters import filesizeformat
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from ocrlab.models import Preset
# Add to your settings file
CONTENT_TYPES = ['image', 'video']
# 2.5MB - 2621440
# 5MB - 524... | mit | -1,963,474,988,661,655,800 | 28.627907 | 103 | 0.658556 | false | 3.758112 | false | false | false |
all-of-us/raw-data-repository | rdr_service/dao/questionnaire_response_dao.py | 1 | 57185 | import json
import logging
import os
import re
from datetime import datetime
from dateutil import parser
from hashlib import md5
import pytz
from sqlalchemy import or_
from sqlalchemy.orm import joinedload, subqueryload
from typing import Dict
from werkzeug.exceptions import BadRequest
from rdr_service.lib_fhir.fhircl... | bsd-3-clause | 193,286,261,942,352,830 | 52.594189 | 120 | 0.611594 | false | 4.392089 | true | false | false |
akunze3/pytrajectory | examples/ex8_ConstrainedDoublePendulum.py | 1 | 8675 | # constrained double pendulum
# import all we need for solving the problem
from pytrajectory import ControlSystem
import numpy as np
import sympy as sp
from sympy import cos, sin, Matrix
from numpy import pi
# to define a callable function that returns the vectorfield
# we first solve the motion equations of form Mx... | bsd-3-clause | -5,700,278,940,750,666,000 | 30.660584 | 102 | 0.566686 | false | 3.080611 | false | false | false |
phageghost/pg_tools | pgtools/rnatools.py | 1 | 13893 | import os
import itertools
import numpy
import scipy
import pandas
import seaborn
import matplotlib.pyplot as plt
from pgtools import toolbox
PSEUDO_COUNT = 1
EXPRESSION_THRESHOLD = 1
FIG_EXTS = ['pdf', 'png']
PNG_DPI = 600
def load_and_clean(datafile):
exp_data = pandas.read_csv(datafile, sep='\t', index_col=0)... | mit | 1,190,259,456,043,873,800 | 45.620805 | 180 | 0.618081 | false | 3.602956 | false | false | false |
IvarsKarpics/mxcube | gui/bricks/TreeBrick.py | 1 | 53816 | # Project: MXCuBE
# https://github.com/mxcube
#
# This file is part of MXCuBE software.
#
# MXCuBE is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | lgpl-3.0 | -3,314,555,617,902,337,000 | 41.44164 | 100 | 0.579697 | false | 4.01522 | false | false | false |
mhspradlin/go-lite-bot | bot.py | 1 | 1582 | # Simply the class definitions for the bot and worker declarations
# Nice way to make HTTP get requests
import requests
# A nice holder for information we need between function calls
class Bot:
double_resets = {}
def __init__ (self, token):
self.token = token
handlers = {}
# Adds a singl... | mit | 952,455,742,594,944,600 | 38.575 | 79 | 0.513274 | false | 4.152231 | false | false | false |
AlexRiina/django-money | tests/test_form.py | 1 | 2341 | # -*- coding: utf-8 -*-
"""
Created on May 7, 2011
@author: jake
"""
from decimal import Decimal
import moneyed
import pytest
from moneyed import Money
from .testapp.forms import (
MoneyForm,
MoneyFormMultipleCurrencies,
MoneyModelForm,
OptionalMoneyForm,
)
from .testapp.models import ModelWithVanill... | bsd-3-clause | -7,676,951,155,857,008,000 | 23.642105 | 79 | 0.620248 | false | 3.121333 | true | false | false |
uw-it-aca/mdot-developers | mdotdevs/views.py | 1 | 3614 | from django.conf import settings
from django.template.loader import get_template
from django.template import RequestContext, Context
from django.shortcuts import render_to_response, render
from django.core.mail import send_mail, BadHeaderError
from django.http import HttpResponse, HttpResponseRedirect
import urllib
im... | apache-2.0 | -5,927,210,176,114,259,000 | 38.714286 | 76 | 0.589651 | false | 4.17321 | false | false | false |
yayoiukai/signalserver | policies/views.py | 1 | 11360 | import os
import datetime
from django.shortcuts import render
from django.http import HttpResponse
from django.template import loader
from django.http import HttpResponseRedirect
from django.core.urlresolvers import reverse
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_req... | mit | -2,504,476,941,914,115,600 | 35.178344 | 79 | 0.617077 | false | 4.126408 | false | false | false |
sixty-north/cosmic-ray | tests/resources/example_project/adam/adam_1.py | 1 | 1178 | """adam.adam_1
"""
# pylint: disable=C0111
import operator
from math import * # noqa: F401,F403
# Add mutation points for comparison operators.
def constant_number():
return 42
def constant_true():
return True
def constant_false():
return False
def bool_and():
return object() and None
def ... | mit | 6,149,737,179,712,978,000 | 11.804348 | 62 | 0.611205 | false | 3.346591 | false | false | false |
bytescout/ByteScout-SDK-SourceCode | PDF.co Web API/Add Text And Images To PDF/Python/Add Image by finding target coordinates/AddImageByFindingTargetCoordinates.py | 1 | 3639 | import os
import requests # pip install requests
# The authentication key (API Key).
# Get your own by registering at https://app.pdf.co/documentation/api
API_KEY = "**************************************"
# Base URL for PDF.co Web API requests
BASE_URL = "https://api.pdf.co/v1"
# Direct URL of source PDF file.
Sour... | apache-2.0 | 3,477,542,829,167,449,600 | 29.082645 | 110 | 0.623523 | false | 3.814465 | false | false | false |
numberly/graphitesend | tests/test_all.py | 1 | 10724 | #!/usr/bin/env python
from graphitesend import graphitesend
import unittest
import socket
import os
class TestAll(unittest.TestCase):
""" Basic tests ( better than nothing ) """
def setUp(self):
""" reset graphitesend """
# Drop any connections or modules that have been setup from other test... | apache-2.0 | -6,224,074,902,658,010,000 | 39.014925 | 81 | 0.631854 | false | 3.875678 | true | false | false |
reedessick/pointy-Poisson | stripRawUnsafe.py | 1 | 1801 | #!/usr/bin/python
usage = "stripRawUnsafe.py unsafe.txt interesting.txt"
description = "reads in a list of unsafe channels from unsafe.txt. If these are not \"raw\" channel names, it converts them to that form. I then reads in a channel list from interesting.txt and performs a filter based on the unsafe channels. Chann... | mit | -4,477,093,486,662,943,000 | 33.634615 | 350 | 0.60633 | false | 3.848291 | false | false | false |
terasaur/tstracker | mqclient/src/tstracker/stats_db.py | 1 | 2493 | #
# Copyright 2012 ibiblio
#
# 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.txt
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | 6,713,933,945,272,915,000 | 29.777778 | 74 | 0.686723 | false | 3.280263 | false | false | false |
ESSS/qmxgraph | qmxgraph/widget.py | 1 | 23408 | from __future__ import absolute_import
import json
import os
import weakref
from PyQt5.QtCore import QDataStream, QIODevice, QObject, Qt, pyqtSignal
from PyQt5.QtGui import QPainter
from PyQt5.QtWidgets import QDialog, QGridLayout, QShortcut, QSizePolicy, \
QWidget, QStyleOption, QStyle
from qmxgraph import cons... | mit | -7,056,639,670,278,203,000 | 34.253012 | 96 | 0.600436 | false | 4.238276 | false | false | false |
commaai/openpilot | selfdrive/locationd/models/car_kf.py | 1 | 4757 | #!/usr/bin/env python3
import math
import sys
from typing import Any, Dict
import numpy as np
from selfdrive.locationd.models.constants import ObservationKind
from selfdrive.swaglog import cloudlog
from rednose.helpers.kalmanfilter import KalmanFilter
if __name__ == '__main__': # Generating sympy
import sympy as... | mit | 7,562,025,558,407,216,000 | 27.656627 | 164 | 0.615304 | false | 2.669473 | false | false | false |
excelly/xpy-ml | ex/ml/liblinear.py | 1 | 3853 | from common import *
import ex.ml.libsvm.linearutil as lu
def a2l(X, y = None):
'''convert arrays to list
'''
if y is not None:
y = y.tolist()
if issparse(X):
X = [dict(zip(find(row)[1], row.data)) for row in X]
else:
X = X.tolist()
if y is not None:
... | apache-2.0 | -1,892,333,781,465,634,600 | 24.516556 | 95 | 0.509473 | false | 3.062798 | false | false | false |
googleads/google-ads-python | google/ads/googleads/v6/common/types/metrics.py | 1 | 42787 | # -*- 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 | 7,806,873,479,053,634,000 | 47.843607 | 126 | 0.65375 | false | 4.40422 | false | false | false |
iandees/all-the-places | locations/spiders/aubonpain.py | 1 | 2580 | import scrapy
import re
import json
from locations.items import GeojsonPointItem
from locations.hours import OpeningHours
class AuBonPainSpider(scrapy.Spider):
name = "aubonpain"
download_delay = 0.5
allowed_domains = [
"www.aubonpain.com",
]
start_urls = (
'https://www.aubonpain.c... | mit | -4,718,689,655,118,514,000 | 35.857143 | 119 | 0.527907 | false | 3.722944 | false | false | false |
douglasbgatti/rango-tutorial | tango_with_django_project/rango/bing_search.py | 1 | 2360 | import json
import urllib, urllib2
BING_API_KEY = '6uAUnyT0WuPBRqv5+AZIuWrpNsKJ++t0E9Sp9DDkh3Q'
def run_query(search_terms):
# Specify the base
root_url = 'https://api.datamarket.azure.com/Bing/Search/v1/'
source = 'Web'
# Specify how many results we wish to be returned per page.
# Offset specifi... | apache-2.0 | 702,510,726,307,883,600 | 34.238806 | 79 | 0.659322 | false | 3.959732 | false | false | false |
njwilson23/scipy | scipy/cluster/hierarchy.py | 1 | 91969 | """
========================================================
Hierarchical clustering (:mod:`scipy.cluster.hierarchy`)
========================================================
.. currentmodule:: scipy.cluster.hierarchy
These functions cut hierarchical clusterings into flat clusterings
or find the roots of the forest f... | bsd-3-clause | 6,255,493,199,539,831,000 | 32.899373 | 155 | 0.588742 | false | 3.920749 | false | false | false |
cloudera/Impala | tests/unittests/test_command.py | 2 | 1791 | # 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 | -3,043,633,197,999,597,600 | 35.55102 | 86 | 0.717476 | false | 3.919037 | true | false | false |
danielecook/gist-alfred | urllib3/contrib/socks.py | 5 | 6386 | # -*- coding: utf-8 -*-
"""
This module contains provisional support for SOCKS proxies from within
urllib3. This module supports SOCKS4 (specifically the SOCKS4A variant) and
SOCKS5. To enable its functionality, either install PySocks or install this
module with the ``socks`` extra.
The SOCKS implementation supports t... | mit | 9,006,006,380,867,902,000 | 32.260417 | 79 | 0.612903 | false | 4.407177 | false | false | false |
AutorestCI/azure-sdk-for-python | azure-servicefabric/azure/servicefabric/models/chaos_context_map_item.py | 1 | 1090 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | -7,523,740,089,934,637,000 | 28.459459 | 76 | 0.544954 | false | 4.192308 | false | false | false |
mirumee/python-invoicible | examples/cli.py | 1 | 7581 | import cmd
import copy
import httplib
import oauth.oauth as oauth
import pprint
import readline
import sys
import urlparse
import webbrowser
import invoicible
# key and secret granted by the service provider for this consumer application
CONSUMER_KEY = ''
CONSUMER_SECRET_KEY = ''
# access token for this consumer app... | lgpl-3.0 | -4,260,646,054,423,910,400 | 37.678571 | 225 | 0.664688 | false | 3.863914 | false | false | false |
dials/dials | util/version.py | 1 | 4510 | # DIALS version numbers are constructed from
# 1. a common prefix
__dials_version_format = "DIALS %s"
# 2. the most recent annotated git tag (or failing that: a default string)
__dials_version_default = "3.5"
# 3. a dash followed by the number of commits since that tag
# 4. a dash followed by a lowercase 'g' and th... | bsd-3-clause | 3,118,716,970,657,075,000 | 35.967213 | 106 | 0.531486 | false | 4.278937 | false | false | false |
sigmavirus24/pip | tasks/vendoring/__init__.py | 1 | 3688 | """"Vendoring script, python 3.5 needed"""
from pathlib import Path
import re
import shutil
import invoke
TASK_NAME = 'update'
FILE_WHITE_LIST = (
'Makefile',
'vendor.txt',
'__init__.py',
'README.rst',
)
def drop_dir(path):
shutil.rmtree(str(path))
def remove_all(paths):
for path in path... | mit | 8,446,935,301,462,685,000 | 26.729323 | 74 | 0.594902 | false | 3.325518 | false | false | false |
pivonroll/Qt_Creator | share/qtcreator/debugger/dumper.py | 1 | 74430 | ############################################################################
#
# Copyright (C) 2016 The Qt Company Ltd.
# Contact: https://www.qt.io/licensing/
#
# This file is part of Qt Creator.
#
# Commercial License Usage
# Licensees holding valid commercial Qt licenses may use this file in
# accordance with the co... | gpl-3.0 | 2,995,124,426,568,365,000 | 36.45848 | 103 | 0.55573 | false | 4.051494 | false | false | false |
chapinb/shattered | libs/liblogcat.py | 1 | 4282 | #!/usr/bin/env python3
##################################################################################
## ##
## _____ _ _ _ _ ##
## | __| |_ ___| |_| |_ ___ ___ ___ _... | gpl-3.0 | 5,323,526,873,882,407,000 | 35.234783 | 94 | 0.429939 | false | 4.378323 | false | false | false |
zzir/white | update_content.py | 1 | 3484 | import sqlite3
from wtforms.fields import StringField, IntegerField
from wtforms import validators
from wtforms_tornado import Form
from config import CONFIG
from get_content import TContents
class CheckContents(Form):
title = StringField(validators=[validators.length(min=1, max=100)])
slug = StringField(va... | mit | 5,526,406,091,569,730,000 | 30.192661 | 76 | 0.573235 | false | 3.687636 | false | false | false |
IntegerMan/Pi-MFD | PiMFD/Applications/Navigation/MapLocations.py | 1 | 9253 | # coding=utf-8
"""
This file contains map locations information
"""
from PiMFD.Applications.MFDPage import MFDPage
from PiMFD.UI.Button import MFDButton
from PiMFD.UI.TextBoxes import TextBox
from PiMFD.UI.Widgets.MenuItem import TextMenuItem
__author__ = 'Matt Eland'
class MapLocation(object):
"""
Represe... | gpl-2.0 | -5,634,889,265,219,760,000 | 31.584507 | 118 | 0.608451 | false | 3.795324 | false | false | false |
Superjom/bad_source | python/paper/spider/spider/spiders/amazon_notebook.py | 1 | 2872 | # -*- coding: utf-8 -*-
from __future__ import division
import sys
sys.path.append('../../')
import re
import time
import random
import urlparse as up
from scrapy.contrib.spiders import CrawlSpider, Rule
from scrapy.contrib.linkextractors.sgml import SgmlLinkExtractor
from scrapy.exceptions import CloseSpider
from scra... | gpl-2.0 | 4,343,573,823,116,785,700 | 26.883495 | 134 | 0.614206 | false | 3.493917 | false | false | false |
freezeeedos/revshelly | python_reverse_shell.py | 1 | 3523 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# Copyright (c) 2013 Quentin Gibert
# All rights reserved.
# Based on the work of:
# David Kennedy: http://www.secmaniac.com/june-2011/creating-a-13-line-backdoor-worry-free-of-av/
# Xavier Garcia: www.shellguardians.com
#Permission is hereby granted, free of charge, to... | mit | -661,312,054,476,301,800 | 32.552381 | 98 | 0.598354 | false | 3.658359 | false | false | false |
WoLpH/EventGhost | eg/Classes/PluginItem.py | 1 | 6391 | # -*- coding: utf-8 -*-
#
# This file is part of EventGhost.
# Copyright © 2005-2016 EventGhost Project <http://www.eventghost.net/>
#
# EventGhost 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 versio... | gpl-2.0 | -8,394,167,896,932,475,000 | 30.019417 | 79 | 0.6 | false | 4.190164 | true | false | false |
FabriceSalvaire/Musica | Musica/Geometry/Path.py | 1 | 2215 | ####################################################################################################
#
# Musica - A Music Theory Package for Python
# Copyright (C) 2017 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | 6,031,306,140,311,497,000 | 31.101449 | 100 | 0.463657 | false | 5.139211 | false | false | false |
ikargis/horizon_fod | horizon/decorators.py | 1 | 3388 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Copyright 2012 CRS4
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use th... | apache-2.0 | -4,795,479,006,821,248,000 | 35.042553 | 79 | 0.679752 | false | 4.21393 | false | false | false |
quiltdata/quilt | api/python/quilt3/registry.py | 1 | 1604 | """
Microservice that provides temporary user credentials to the catalog
"""
from datetime import timedelta
import boto3
import requests
from botocore.exceptions import ClientError
from flask import Flask
from flask_cors import CORS
from flask_json import as_json
app = Flask(__name__) # pylint: disable=invalid-name... | apache-2.0 | -7,490,552,160,810,158,000 | 22.588235 | 79 | 0.642768 | false | 3.912195 | false | false | false |
DarthMaulware/EquationGroupLeaks | Leak #5 - Lost In Translation/windows/Resources/Dsz/PyScripts/Lib/dsz/windows/driver/__init__.py | 1 | 11721 | # uncompyle6 version 2.9.10
# Python bytecode 2.7 (62211)
# Decompiled from: Python 3.6.0b2 (default, Oct 11 2016, 05:27:10)
# [GCC 6.2.0 20161005]
# Embedded file name: __init__.py
import dsz
import dsz.file
import dsz.path
import dsz.version
def Install(project, driverName, localDriverName, startValue, typeValue, a... | unlicense | 6,155,391,410,086,799,000 | 38.073333 | 158 | 0.594233 | false | 3.225371 | false | false | false |
Roshan2017/spinnaker | dev/generate_bom.py | 1 | 12830 | #!/usr/bin/python
#
# Copyright 2017 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... | apache-2.0 | 735,947,141,761,425,800 | 37.878788 | 117 | 0.628059 | false | 3.833284 | true | false | false |
bakostamas/weather-station | weather.py | 1 | 9237 |
import json, pprint, app_settings, pytz
import connected_sensor
from datetime import datetime
from urllib.request import urlopen # Only in Python 3
weather_list = {}
def get_weather_data(p_city_id, p_type, p_cnt):
"""
Get weather data from openweathermap.org
:param p_city_id: ID of the city
:param ... | gpl-3.0 | 1,599,481,039,528,907,800 | 42.570755 | 141 | 0.598354 | false | 3.596963 | false | false | false |
michaelBenin/sqlalchemy | lib/sqlalchemy/engine/result.py | 1 | 36000 | # engine/result.py
# Copyright (C) 2005-2014 the SQLAlchemy authors and contributors <see AUTHORS file>
#
# This module is part of SQLAlchemy and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
"""Define result set constructs including :class:`.ResultProxy`
and :class:`.RowProxy... | mit | 7,757,144,335,151,465,000 | 33.582133 | 84 | 0.566028 | false | 4.828974 | false | false | false |
atitus5/MiniPlaces | DataLoader_multi.py | 1 | 9187 | import os
import numpy as np
import scipy.misc
import h5py
import random
np.random.seed(123)
# loading data from .h5
class DataLoaderH5(object):
def __init__(self, **kwargs):
self.load_size = int(kwargs['load_size'])
self.fine_size = int(kwargs['fine_size'])
self.data_mean = np.array(kwar... | mit | 7,697,863,647,594,161,000 | 40.949772 | 142 | 0.534669 | false | 3.411437 | false | false | false |
khosrow/metpx | sundew/lib/PDSLatencies.py | 1 | 7398 | #!/usr/bin/env python
"""
MetPX Copyright (C) 2004-2006 Environment Canada
MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file
named COPYING in the root of the source directory tree.
"""
"""
#############################################################################################
# Name: PDSLa... | gpl-2.0 | -795,901,474,159,940,700 | 42.011628 | 181 | 0.499594 | false | 3.895735 | false | false | false |
CodeYellowBV/django-binder | tests/test_set_nullable_relation.py | 1 | 2202 | from binder.exceptions import BinderValidationError
from binder.router import Router
from binder.views import ModelView
from .testapp.views import AnimalView
from .testapp.models import Animal, Caretaker
from django.test import TestCase
class TestSetNullableRelations(TestCase):
def test_standard_filling_in_relati... | mit | 7,358,221,550,644,352,000 | 26.185185 | 99 | 0.624886 | false | 3.890459 | true | false | false |
STIXProject/python-stix | stix/core/stix_header.py | 1 | 5004 | # Copyright (c) 2017, The MITRE Corporation. All rights reserved.
# See LICENSE.txt for complete terms.
from mixbox import fields
import stix
from stix.utils import deprecated
from stix.common import InformationSource, StructuredTextList, Profiles
from stix.common.vocabs import VocabField, PackageIntent
from stix.dat... | bsd-3-clause | 8,210,940,760,186,117,000 | 34.489362 | 119 | 0.666267 | false | 4.381786 | false | false | false |
moio/sumaform | salt/grafana/setup_grafana.py | 1 | 1107 | #!/usr/bin/env python
import base64
import errno
import httplib
import json
import socket
import sys
import time
def do(method, connection, headers, path, body=None):
connection.request(method, path, headers=headers, body=json.dumps(body))
resp = connection.getresponse()
content = resp.read()
if resp... | bsd-3-clause | 7,001,299,087,362,661,000 | 26 | 88 | 0.68112 | false | 3.629508 | false | false | false |
RysavyD/platby | models/db_model.py | 1 | 5519 | # coding: utf8
import locale
from mz_wkasa_platby import fix_login, Uc_sa
# Uc_sa - id účtů účtové osnovy - při importu zde je vidí controléry i views
locale.setlocale(locale.LC_ALL, 'cs_CZ.UTF-8')
class IS_IN_DB_(IS_IN_DB):
def build_set(self):
super(IS_IN_DB_, self).build_set()
... | agpl-3.0 | -6,709,750,360,438,365,000 | 33.940789 | 94 | 0.581549 | false | 2.855724 | false | false | false |
MSusik/invenio | invenio/base/bundles.py | 1 | 2885 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 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 | 4,890,553,612,865,183,000 | 23.65812 | 113 | 0.625303 | false | 3.118919 | false | false | false |
tsdfsetatata/xserver | Server/dump_srv/print_wanyaogu.py | 1 | 3005 | #!/usr/bin/python
# coding: UTF-8
import sys
from socket import *
import struct
import raid_pb2
import wanyaogu_pb2
import login_pb2
import cast_skill_pb2
import move_direct_pb2
import team_pb2
import datetime
import get_one_msg
import scene_transfer_pb2
import horse_pb2
WATCH_PLAYER = {8589935415}
HOST='127.0.0.1'
... | gpl-3.0 | 5,305,513,111,979,851,000 | 27.45 | 140 | 0.603515 | false | 2.508818 | false | false | false |
coddingtonbear/jira | jira/client.py | 1 | 100626 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from __future__ import print_function
"""
This module implements a friendly (well, friendlier) interface between the raw JSON
responses from JIRA and the Resource/dict abstractions provided by this library. Users
will construct a JIRA ob... | bsd-2-clause | 4,014,760,144,798,227,500 | 38.09324 | 203 | 0.59418 | false | 4.251024 | false | false | false |
poojavade/Genomics_Docker | Dockerfiles/gedlab-khmer-filter-abund/pymodules/python2.7/lib/python/gemini-0.10.0-py2.7.egg/gemini/annotations.py | 1 | 30633 | #!/usr/bin/env python
import pysam
import sqlite3
import os
import sys
import collections
import re
from unidecode import unidecode
from bx.bbi.bigwig_file import BigWigFile
from gemini.config import read_gemini_config
# dictionary of anno_type -> open Tabix file handles
annos = {}
def get_anno_files( args ):
con... | apache-2.0 | 5,353,853,671,318,104,000 | 37.726928 | 369 | 0.565338 | false | 3.255713 | false | false | false |
tarrow/librarybase-pwb | addpapers.py | 1 | 1993 | import queryCiteFile
import librarybase
import pywikibot
from epmclib.getPMCID import getPMCID
from epmclib.exceptions import IDNotResolvedException
import queue
import threading
import time
def rununthreaded():
citefile = queryCiteFile.CiteFile()
citations = citefile.findRowsWithIDType('pmc')
... | mit | 4,137,417,748,321,423,400 | 27.776119 | 92 | 0.60562 | false | 3.746241 | false | false | false |
Autoplectic/dit | dit/pid/iwedge.py | 1 | 1110 | """
The I_wedge measure, as proposed by Griffith et al.
"""
from __future__ import division
from .pid import BasePID
from .. import Distribution
from ..algorithms import insert_meet
from ..multivariate import coinformation
class PID_GK(BasePID):
"""
The Griffith et al partial information decomposition.
... | bsd-3-clause | 7,420,420,584,193,200,000 | 24.227273 | 69 | 0.587387 | false | 3.922261 | false | false | false |
CanuxCheng/Nagios-Auto | nrobot/host/host.py | 1 | 9599 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
######################################################################
# Copyright C 2015 Faurecia (China) Holding Co.,Ltd. #
# All rights reserved #
# Name: host.py
# Author: Canux canuxcheng@163.com ... | bsd-3-clause | -2,004,714,789,927,656,400 | 42.238739 | 79 | 0.449213 | false | 4.331679 | false | false | false |
radomd92/botjagwar | api/decorator.py | 1 | 3279 | import datetime
import multiprocessing
import threading
import time
def critical_section(cs_lock: threading.Lock):
"""
Decorator which uses acquires the specified lock when entering in the decorated function
and releases it once out of the decorated function.
:param cs_lock:
:return:
"""
d... | mit | -8,227,460,502,292,809,000 | 24.818898 | 92 | 0.548033 | false | 4.193095 | false | false | false |
LegoStormtroopr/canard | SQBLWidgets/sqblUI/logicNodeText.py | 1 | 3374 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui/logicNodeText.ui'
#
# Created: Sat Jul 25 12:16:46 2015
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
excep... | gpl-3.0 | -7,360,708,022,024,144,000 | 54.311475 | 334 | 0.698281 | false | 3.748889 | false | false | false |
rodgzilla/project-euler | problem_058/problem.py | 1 | 1801 | def _try_composite(a, d, n, s):
if pow(a, d, n) == 1:
return False
for i in range(s):
if pow(a, 2**i * d, n) == n-1:
return False
return True # n is definitely composite
def is_prime(n, _precision_for_huge_n=16):
if n in _known_primes or n in (0, 1):
return True
... | gpl-3.0 | -2,561,185,032,495,983,000 | 32.351852 | 84 | 0.514159 | false | 2.712349 | false | false | false |
cdegroc/scikit-learn | sklearn/linear_model/ridge.py | 1 | 19134 | """
Ridge regression
"""
# Author: Mathieu Blondel <mathieu@mblondel.org>
# License: Simplified BSD
import numpy as np
from .base import LinearModel
from ..utils.extmath import safe_sparse_dot
from ..utils import safe_asarray
from ..preprocessing import LabelBinarizer
from ..grid_search import GridSearchCV
def _so... | bsd-3-clause | -420,045,437,906,127,550 | 31.157983 | 79 | 0.580799 | false | 3.860775 | false | false | false |
davidvicenteranz/drf-api-dump | setup.py | 1 | 1451 | # -*- coding: utf-8 -*-
from setuptools import setup
DESCRIPTION = """
This Django app is intended for **dump data from apps or models via HTTP**. Basically exposes
dumdata command to http.
Features:
- Just accesible by superusers
- Ability to include or exclude any specific app or model
Requirements:
-... | mit | -2,079,235,607,391,890,700 | 27.470588 | 93 | 0.641626 | false | 3.89008 | false | false | false |
edeposit/edeposit.amqp | bin/edeposit_amqp_ltpd.py | 1 | 2504 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
"""
AMQP binding for LTP exporter. See `edeposit.amqp.ltp
<https://github.com/edeposit/edeposit.amqp.ltp>`_ for details.
"""
import os
import sys
import os... | gpl-2.0 | 4,022,404,615,706,803,700 | 26.217391 | 79 | 0.567492 | false | 3.793939 | false | false | false |
garibaldi0/SecureCRT | s_nexthop_summary.py | 1 | 13227 | # $language = "python"
# $interface = "1.0"
import os
import sys
import logging
# Add script directory to the PYTHONPATH so we can import our modules (only if run from SecureCRT)
if 'crt' in globals():
script_dir, script_name = os.path.split(crt.ScriptFullName)
if script_dir not in sys.path:
sys.path.... | apache-2.0 | -3,942,150,797,001,814,000 | 40.46395 | 119 | 0.641113 | false | 4.120561 | false | false | false |
alejandrobernardis/python-slot-machines | src/backend/backend/api/public/services.py | 1 | 3062 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Copyright (c) 2014 Asumi Kamikaze Inc.
# Licensed under the MIT License.
# Author: Alejandro M. Bernardis
# Email: alejandro (dot) bernardis (at) asumikamikaze (dot) com
# Created: 02/Oct/2014 2:46 PM
from backend.api.base import BaseHandler
from tornado import gen
fr... | mit | -3,224,450,806,062,539,300 | 33.022222 | 73 | 0.59177 | false | 3.176349 | false | false | false |
lasr/orbital_elements | convert/meeEl_meefl.py | 1 | 1858 | import numpy as np
__author__ = "Nathan I. Budd"
__email__ = "nibudd@gmail.com"
__copyright__ = "Copyright 2017, LASR Lab"
__license__ = "MIT"
__version__ = "0.1"
__status__ = "Production"
__date__ = "08 Mar 2017"
def meeEl_meefl(meefl):
"""Convert MEEs with true longitude to eccentric longitude.
Args:
... | mit | 7,915,249,333,846,053,000 | 35.431373 | 77 | 0.55436 | false | 2.963317 | false | false | false |
beni55/djangolint | project/lint/migrations/0002_auto__add_fix.py | 2 | 2293 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Fix'
db.create_table('lint_fix', (
('id', self.gf('django.db.models.fields.Aut... | isc | 781,272,958,794,556,400 | 44.86 | 130 | 0.549935 | false | 3.777595 | false | false | false |
fbradyirl/home-assistant | homeassistant/components/persistent_notification/__init__.py | 1 | 6944 | """Support for displaying persistent notifications."""
from collections import OrderedDict
import logging
from typing import Awaitable
import voluptuous as vol
from homeassistant.components import websocket_api
from homeassistant.core import HomeAssistant, callback
from homeassistant.exceptions import TemplateError
f... | apache-2.0 | 7,887,698,443,924,102,000 | 30 | 86 | 0.639401 | false | 4.037209 | false | false | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/lib/galaxy/util/topsort.py | 1 | 7495 | """
Topological sort.
From Tim Peters, see:
http://mail.python.org/pipermail/python-list/1999-July/006660.html
topsort takes a list of pairs, where each pair (x, y) is taken to
mean that x <= y wrt some abstract partial ordering. The return
value is a list, representing a total ordering that respects all
the inpu... | gpl-3.0 | -1,747,945,830,861,587,700 | 32.311111 | 70 | 0.598799 | false | 3.816191 | false | false | false |
crscardellino/thesis | thesis/scripts/unlabeled_corpora_meta.py | 1 | 1429 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals
import argparse
import os
import sys
from functools import partial
from multiprocessing import Pool
from tabulate import tabulate
from thesis.utils import find
def process_file(ifile, meta):
print('Processing %s' %... | mit | -7,308,446,227,549,357,000 | 28.163265 | 84 | 0.604619 | false | 3.820856 | false | false | false |
maxspad/MGrader | autograder/modules/questions/PythonQuestion.py | 1 | 2436 | '''
Contains the PythonQuestion class, which is an instructor-facing
question type that implements a grade() function.
All instructor-facing Question modules must implement
a grade() function at module level that returns a Result object.
@author: Max Spadafore
'''
from AbstractQuestion import AbstractQ
table_name =... | bsd-3-clause | 555,966,247,296,795,100 | 31.932432 | 149 | 0.688013 | false | 3.85443 | false | false | false |
siggame/webserver | webserver/hermes/templatetags/hermes_tags.py | 1 | 3396 | from django import template
from django.template.defaultfilters import stringfilter
from competition.models.game_model import Game
import slumber
import datetime
import logging
import requests
logger = logging.getLogger(__name__)
register = template.Library()
@register.filter
@stringfilter
def iso_to_datetime(val... | bsd-3-clause | -4,488,372,421,264,011,300 | 29.594595 | 78 | 0.5904 | false | 4.101449 | false | false | false |
ianmcmahon/linuxcnc-mirror | lib/python/gladevcp/hal_gremlin.py | 1 | 9842 | #!/usr/bin/env python
# vim: sts=4 sw=4 et
# GladeVcp Widgets
#
# Copyright (c) 2010 Pavel Shramov <shramov@mexmat.net>
#
# 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... | lgpl-2.1 | 7,631,646,314,919,300,000 | 43.533937 | 121 | 0.536883 | false | 3.69722 | false | false | false |
chappers/Stan | stan/proc/proc_parse.py | 1 | 1781 | """
The :mod:`stan.proc.proc_parse` module is the proc parser for SAS-like language.
"""
import re
import pkgutil
from stan.proc.proc_expr import RESERVED_KEYWORDS, PROC_
import stan.proc_functions as proc_func
from stan.proc.proc_sql import proc_sql
def proc_parse(cstr):
"""proc parse converts procedure stateme... | mit | -3,020,345,216,742,110,000 | 29.706897 | 123 | 0.540707 | false | 3.36673 | false | false | false |
tdyas/pants | tests/python/pants_test/backend/jvm/tasks/jvm_compile/rsc/test_rsc_compile_integration.py | 1 | 2189 | # Copyright 2018 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
import pytest
from pants_test.backend.jvm.tasks.jvm_compile.rsc.rsc_compile_integration_base import (
RscCompileIntegrationBase,
ensure_compile_rsc_execution_strategy,
)
class R... | apache-2.0 | -6,702,051,356,664,883,000 | 43.673469 | 116 | 0.727273 | false | 3.331811 | true | false | false |
Magda-M/general-tools | fq.split.py | 1 | 2084 | """
SOURCE: https://gist.github.com/brentp/6625544
split a single fastq file in to random, non-overlapping subsets
arguments:
+ fastq file
+ number of splits
+ number of reps
e.g.:
python fq.split.py input.fastq 3 4
will create 12 new files in 4 sets of 3. Each
set of 3 will contain all of the original records.
... | gpl-3.0 | 607,869,430,377,086,200 | 27.561644 | 77 | 0.597409 | false | 3.143288 | false | false | false |
goniz/buildscript | build_system/source.py | 1 | 2177 | #!/usr/bin/python2
from build_exceptions import BuildError
import os
import re
class File(object):
def __init__(self, path):
self.path = path
def is_newer(self, other):
if os.path.exists(other) is False:
return True
if os.path.exists(self.path) is False:
raise... | mit | -8,906,877,451,912,974,000 | 24.623529 | 82 | 0.569132 | false | 3.859929 | false | false | false |
dkkline/CanSat14-15 | presenter/__init__.py | 1 | 1230 | """
Contains a Flask-based webserver in charge of presenting a website and
collected data to users connected via a webbrowser.
"""
__version__ = (0, 0, 1)
from .app import app
from .config import DevelopmentConfig, ProductionConfig
from flask_debugtoolbar import DebugToolbarExtension
def run_dev():
"""
Ru... | mit | -3,177,141,107,318,055,400 | 22.653846 | 70 | 0.701626 | false | 4.072848 | true | false | false |
alexef/gobject-introspection | giscanner/girwriter.py | 1 | 23830 | # -*- Mode: Python -*-
# GObject-Introspection - a framework for introspecting GObject libraries
# Copyright (C) 2008 Johan Dahlin
# Copyright (C) 2008, 2009 Red Hat, Inc.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as publish... | gpl-2.0 | 7,605,723,460,842,861,000 | 41.477718 | 99 | 0.565883 | false | 4.137153 | false | false | false |
PlainStupid/PlainCleanUp | CleanUp/FinalSol.py | 1 | 9335 | import re
import os
import shutil
import sys
# Regexes are in from most used to least used regex for
# a given file pattern.
regexShow = [
'''
# Matches with Show.S01E10.mp4
^ #Beginning of a string
(?P<ShowName>.+?) #Show name
[\.\_\-\s]+ #If it has dot, underscore or dash
... | mit | 6,587,270,393,259,099,000 | 30.12 | 105 | 0.582217 | false | 3.830529 | false | false | false |
GillesArcas/numsed | numsed/common.py | 1 | 2941 | from __future__ import print_function
import sys
import os
import subprocess
import time
try:
from StringIO import StringIO # Python2
except ImportError:
from io import StringIO # Python3
PY2 = sys.version_info < (3,)
PY3 = sys.version_info > (3,)
TMP_SED = 'tmp.sed'
TMP_INPUT = 'tmp.input'
TMP_PY = 'tmp.... | mit | 6,023,549,609,253,550,000 | 23.923729 | 76 | 0.524651 | false | 3.76087 | false | false | false |
dstufft/warehouse | tests/unit/test_policy.py | 1 | 2168 | # 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
# distributed under the Li... | apache-2.0 | -2,289,942,341,886,902,800 | 31.358209 | 88 | 0.683118 | false | 3.554098 | true | false | false |
knightmare2600/d4rkc0de | encryption/md5word.py | 1 | 1132 | #!/usr/bin/python
#Uses all wordlists in a dir to crack a hash.
#
#www.darkc0de.com
#d3hydr8[at]gmail[dot]com
import md5, sys, os, time
def getwords(wordlist):
try:
file = open(wordlist, "r")
words = file.readlines()
file.close()
except(IOError),msg:
words = ""
print "Error:",msg
pass
return wo... | gpl-2.0 | 3,432,820,828,723,467,000 | 19.581818 | 62 | 0.605124 | false | 2.584475 | false | false | false |
gioman/QGIS | python/plugins/processing/algs/qgis/SinglePartsToMultiparts.py | 1 | 4039 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SinglePartsToMultiparts.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
***************... | gpl-2.0 | 3,639,953,806,379,038,000 | 35.0625 | 107 | 0.564001 | false | 4.631881 | false | false | false |
arrabito/DIRAC | DataManagementSystem/Agent/RequestOperations/ReplicateAndRegister.py | 1 | 28823 | ########################################################################
# File: ReplicateAndRegister.py
# Author: Krzysztof.Ciba@NOSPAMgmail.com
# Date: 2013/03/13 18:49:12
########################################################################
""" :mod: ReplicateAndRegister
==========================
.. mo... | gpl-3.0 | 803,170,856,147,399,300 | 37.025066 | 120 | 0.628526 | false | 3.908203 | false | false | false |
fener06/pyload | module/plugins/hoster/EuroshareEu.py | 1 | 2302 | # -*- coding: utf-8 -*-
"""
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License,
or (at your option) any later version.
This program is distributed in ... | gpl-3.0 | 7,234,009,282,891,823,000 | 40.071429 | 117 | 0.629839 | false | 3.33672 | false | false | false |
labsquare/CuteVariant | cutevariant/core/writer/pedwriter.py | 1 | 2889 | import csv
from .abstractwriter import AbstractWriter
from cutevariant.core.sql import get_samples
class PedWriter(AbstractWriter):
"""Writer allowing to export samples of a project into a PED/PLINK file.
Attributes:
device: a file object typically returned by open("w")
Example:
>>> wi... | gpl-3.0 | -2,977,546,047,046,953,000 | 32.988235 | 88 | 0.563171 | false | 4.472136 | false | false | false |
Callek/build-relengapi | relengapi/blueprints/tokenauth/util.py | 1 | 2357 | # 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 json
from itsdangerous import BadData
from relengapi.blueprints.tokenauth.tables import Token
from relengapi.lib... | mpl-2.0 | -2,998,231,699,835,763,000 | 23.05102 | 76 | 0.570216 | false | 3.445906 | true | false | false |
Ixxy-Open-Source/django-linkcheck-old | linkcheck/migrations/0001_initial.py | 1 | 1560 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('contenttypes', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Link',
fields=[
... | bsd-3-clause | -7,173,154,571,665,117,000 | 37.04878 | 114 | 0.549359 | false | 4.60177 | false | false | false |
FrederikDiehl/NNForSKLearn | NeuralNetwork.py | 1 | 14455 | __author__ = 'Frederik Diehl'
import numpy as np
from sklearn.base import BaseEstimator, RegressorMixin
from sklearn.utils import check_random_state
from sklearn.preprocessing import MinMaxScaler
class NeuralNetwork(BaseEstimator, RegressorMixin, object):
_maxSteps = None
_maxNonChangingSteps = None
_l... | mit | 6,231,215,392,406,471,000 | 44.602524 | 214 | 0.590384 | false | 4.010821 | false | false | false |
NulledGravity/striptxt | striptxt.py | 1 | 5271 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os, time, sys
from sys import argv, stdout
# Global variables
INPUT = None
OUTPUT = None
LENGTH = None
VERBOSE = False
AUTOOUT = False
AUTOLEN = False
# Console colors
W = '\033[0m' # white (normal)
R = '\033[31m' # red
G = '\033[92m' # green
B = '\033[34m' ... | mit | 3,570,116,909,102,634,000 | 32.157233 | 117 | 0.47012 | false | 3.204255 | false | false | false |
fredyw/git-migrator | gitmigrator.py | 1 | 3703 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2014 Fredy Wijaya
#
# 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 t... | mit | -2,902,482,159,053,309,400 | 37.175258 | 88 | 0.662436 | false | 3.861314 | false | false | false |
zlpmichelle/crackingtensorflow | template/xgboost/xgboost_stock_pre.py | 1 | 1349 | import sys
import xgboost as xgb
import pandas as pd
import numpy as np
print("----reading data\n")
train = pd.read_csv("train.csv")
train_feature = train.columns[0:-1]
train_label = train.columns[-1]
print("----training a XGBoost\n")
dtrain = xgb.DMatrix(train[train_feature].values, label=train[train_label].values)
... | apache-2.0 | 927,858,347,399,894,100 | 23.089286 | 82 | 0.581913 | false | 3.011161 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.