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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mitodl/ccxcon | courses/models_test.py | 1 | 2788 | """
Tests for Models
"""
import json
from django.test import TestCase
from django.contrib.auth.models import User
from .factories import CourseFactory, ModuleFactory
from courses.models import Course, Module, UserInfo
# pylint: disable=no-self-use
class CourseTests(TestCase):
"""
Tests for Course
"""
... | agpl-3.0 | 3,154,952,932,236,635,600 | 29.977778 | 97 | 0.602582 | false | 3.965861 | true | false | false |
brianmckenna/sci-wms | wmsrest/views.py | 1 | 4583 | # -*- coding: utf-8 -*-
from rest_framework.views import APIView
from rest_framework.permissions import IsAuthenticatedOrReadOnly
from wms.models import Dataset, Layer, VirtualLayer, Variable
from wmsrest.serializers import DatasetSerializer, SGridDatasetSerializer, UGridDatasetSerializer, RGridDatasetSerializer, Layer... | gpl-3.0 | -4,777,197,042,386,780,000 | 36.876033 | 182 | 0.690814 | false | 4.279178 | false | false | false |
uclapi/uclapi | backend/uclapi/timetable/migrations/0010_auto_20190220_1835.py | 1 | 3406 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.18 on 2019-02-20 18:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('timetable', '0009_coursea_courseb'),
]
operations = [
migrations.AlterFiel... | mit | 4,278,143,463,914,907,600 | 31.438095 | 61 | 0.551674 | false | 4.553476 | false | false | false |
AlexanderSavelyev/rdkit | rdkit/Chem/test_list.py | 1 | 2106 |
tests=[
("python","UnitTestChem.py",{}),
("python","UnitTestChemv2.py",{}),
("python","UnitTestChemAtom.py",{}),
("python","UnitTestChemBond.py",{}),
("python","UnitTestChemSmarts.py",{}),
("python","UnitTestFragmentDescriptors.py",{}),
("python","UnitTestGraphDescriptors.2.py",{}),
("python","UnitTest... | bsd-3-clause | -6,715,822,941,456,160,000 | 32.967742 | 57 | 0.583571 | false | 2.929068 | true | true | false |
bjamesv/pyweatherviz | daily_json_to_dict.py | 1 | 4201 | import api_info
from dateutil.parser import parse
import requests
import json
import pandas as pd
import logging
map_ghcn_by_date_tuple = {}
#dictionary, caching fully downloaded/parsed GHCN in memory
def get_ncei_daily_climate_dicts( date_start, date_xend):
"""
obtain daily Global Historical Climatology Net... | gpl-3.0 | 8,346,215,010,290,300,000 | 40.594059 | 101 | 0.620567 | false | 3.158647 | false | false | false |
ContinuumIO/dask | dask/dataframe/optimize.py | 2 | 4215 | """ Dataframe optimizations """
import operator
from dask.base import tokenize
from ..optimization import cull, fuse
from .. import config, core
from ..highlevelgraph import HighLevelGraph
from ..utils import ensure_dict
from ..blockwise import optimize_blockwise, fuse_roots, Blockwise
def optimize(dsk, keys, **kwar... | bsd-3-clause | 241,666,005,083,893,500 | 33.268293 | 88 | 0.551601 | false | 3.913649 | false | false | false |
HonzaKral/warehouse | warehouse/packaging/models.py | 1 | 12439 | # 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 | 3,921,414,559,749,365,000 | 29.045894 | 81 | 0.614438 | false | 3.941381 | false | false | false |
Wintermute0110/plugin.program.advanced.MAME.launcher | dev-graphics/test_generate_fanart.py | 1 | 5637 | #!/usr/bin/python
#
#
from PIL import Image
from PIL import ImageFont
from PIL import ImageDraw
#
# Scales and centers img into a box of size (box_x_size, box_y_size).
# Scaling keeps original img aspect ratio.
# Returns an image of size (box_x_size, box_y_size)
#
def PIL_resize_proportional(img, layout, dic_key, CAN... | gpl-2.0 | -9,040,719,822,525,605,000 | 43.738095 | 95 | 0.604932 | false | 2.658962 | false | false | false |
abreen/socrates.py | logisim/subcircuit.py | 1 | 8875 | from logisim.util import num_rotations
from logisim.errors import NoValueGivenError
from logisim.debug import narrate, suppress_narration
from logisim.location import Location
from logisim.component import Component
from logisim.pins import InputPin, OutputPin
class Subcircuit(Component):
def __init__(self, circu... | gpl-2.0 | 3,178,043,507,803,182,600 | 30.810036 | 79 | 0.586479 | false | 3.727425 | false | false | false |
muchu1983/104_cameo | cameo/utility.py | 1 | 31383 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2015, MuChu Hsu
Contributed by Muchu Hsu (muchu1983@gmail.com)
This file is part of BSD license
<https://opensource.org/licenses/BSD-3-Clause>
"""
import os
import re
import json
import time
import datetime
import dateparser
import pkg_resources
import shutil
import smtplib
im... | bsd-3-clause | -676,311,704,294,043,800 | 57.577947 | 170 | 0.555873 | false | 3.259389 | false | false | false |
tcyb/nextgen4b | nextgen4b/process/sites.py | 1 | 2110 | from Bio import SeqIO
import yaml
import sys
import os
def replace_deletions(word, seq, idxs, del_letter='d'):
"""
Replace any '-' in word with del_letter if the nucleotides next to it in
seq are not '-'.
"""
new_word = [c for c in word]
for i, letter in enumerate(word):
# assume we're... | mit | 9,148,165,284,312,616,000 | 29.157143 | 79 | 0.569668 | false | 3.564189 | false | false | false |
eikonomega/file-comparison-panda | file_comparison_panda/file_comparison_panda.py | 1 | 5939 | """
The file_comparison module exists to easily compare the contents of two
files. The functionality of this module is currently limited to CSV files.
"""
import csv
from file_comparison_exceptions import (
UnsupportedFileType, FileDoesNotExist, PermissionDeniedOnFile)
from os import unsetenv
SUPPORTED_FILE_T... | mit | -991,835,789,728,919,200 | 30.595745 | 80 | 0.597407 | false | 4.425484 | false | false | false |
lych0317/CNBlogs_server | CNBlogs/Protocol/SearchBlogProtocol.py | 1 | 2678 | #!/usr/local/bin/python
# -*- coding:utf8 -*-
__author__ = 'liyc'
import urllib2
import re
from bs4 import BeautifulSoup
def search_blog_keyword_page(keyword, page="0"):
url = "http://zzk.cnblogs.com/s?t=b&dateMin=2013-01-01"
if keyword:
url = url + "&w=" + keyword
if page:
url = url + "&... | apache-2.0 | -4,214,701,241,209,484,300 | 28.428571 | 81 | 0.509709 | false | 4.00299 | false | false | false |
herereadthis/django_project | polls/admin.py | 1 | 1075 | from django.contrib import admin
from polls.models import Choice, Poll
# Register your models here.
# customize the admin form by creating a model admin object, then pass it
# as the second argument to admin.site.register()
# inline: you can do TabularInline (saves space) or StackedInline
class ChoiceInline(admin.Ta... | mit | 1,060,910,523,673,767,200 | 28.054054 | 73 | 0.612093 | false | 4.215686 | false | false | false |
dantkz/spatial-transformer-tensorflow | example_affine.py | 1 | 2113 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -6,119,487,510,610,097,000 | 34.216667 | 83 | 0.684808 | false | 3.458265 | false | false | false |
google/turbinia | turbinia/workers/fsstat.py | 1 | 1589 | # -*- coding: utf-8 -*-
# Copyright 2021 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 ... | apache-2.0 | -2,246,638,979,258,569,000 | 32.125 | 79 | 0.723096 | false | 3.611364 | false | false | false |
bitmovin/bitmovin-python | bitmovin/resources/models/outputs/generic_s3_output.py | 1 | 2304 | from bitmovin.utils import Serializable
from bitmovin.resources.enums import S3SignatureVersion
from . import AbstractOutput
class GenericS3Output(AbstractOutput, Serializable):
def __init__(self, access_key, secret_key, bucket_name, host, port=None, signature_version=None, ssl=None, id_=None, custom_data=None,
... | unlicense | -5,036,721,332,386,152,000 | 38.724138 | 141 | 0.648003 | false | 4.136445 | false | false | false |
XiangyuQin/WeChat-Controller | code/testdecode.py | 1 | 18959 | # -*- coding:utf-8 -*-
#!/usr/bin/env python
__all__ = ['weChatController']
import cookielib
import urllib2
import urllib
import urlparse
import json
import poster
import hashlib
import time
import random
import sys
import os
import traceback
from cStringIO import StringIO
import tornado
import tornado.escape
from b... | apache-2.0 | -3,363,681,692,529,769,500 | 36.066225 | 140 | 0.510631 | false | 2.821543 | false | false | false |
jaeilepp/eggie | mne/io/kit/kit.py | 2 | 28437 | """Conversion tool from SQD to FIF
RawKIT class is adapted from Denis Engemann et al.'s mne_bti2fiff.py
"""
# Author: Teon Brooks <teon@nyu.edu>
#
# License: BSD (3-clause)
import os
from os import SEEK_CUR
from struct import unpack
import time
import numpy as np
from scipy import linalg
from ..pick import pick_t... | bsd-2-clause | 406,977,401,301,382,140 | 40.574561 | 79 | 0.540001 | false | 3.63041 | false | false | false |
JackWalpole/finite_strain | ellipsoid_visualisation.py | 1 | 1324 | #!/usr/bin/env python
"""Visualise finite strian ellipsoids"""
import numpy as np
from mayavi.api import Engine
from mayavi.sources.api import ParametricSurface
from mayavi.modules.api import Surface
from mayavi import mlab
def gen_ellipsoid(position,shape,orientation):
"""given the existence of a scene genera... | mit | -7,504,901,609,433,819,000 | 23.090909 | 95 | 0.699396 | false | 3.31 | false | false | false |
fabiocorneti/django-easytree | easytree/forms.py | 1 | 4661 | from django import forms
from django.utils.translation import ugettext_lazy as _
from easytree import utils
from easytree.exceptions import EasyTreeException
pos_map = {
'first-sibling': _('First sibling'),
'left': _('Previous sibling'),
'right': _('Next sibling'),
'last-sibling': _('Last sibling'),
... | bsd-3-clause | -2,380,818,350,016,450,000 | 39.181034 | 125 | 0.566831 | false | 4.380639 | false | false | false |
meithan/NFL_website | cgi-bin/QueryPage.py | 1 | 4651 | #!/usr/bin/env python
# Convenience script to issue MySQL queries to the DB
import cgi, cgitb
import sys
cgitb.enable()
from common import *
# =====================================
def showBadLogin():
print '<br><strong>You must have the proper credentials to access this page!</strong>'
print '</body></html... | gpl-3.0 | -4,550,998,764,767,151,000 | 31.760563 | 118 | 0.57622 | false | 4.044348 | false | false | false |
traxex33/Twitter-Analysis | junk/mineTweets.py | 1 | 2336 | import tweepy
import json
from tweepy import OAuthHandler
from tweepy import Stream
from liveListener import Listener
class TweetMiner:
def __init__(self, config_fname='config'):
self._readdetails(config_fname)
self._authenticate()
def mine(self):
self.state = None
while self.... | mit | -6,225,401,496,223,295,000 | 39.275862 | 101 | 0.606592 | false | 3.80456 | false | false | false |
henriquegemignani/randovania | randovania/games/prime/patcher_file_lib/hint_formatters.py | 1 | 3971 | import typing
from randovania.game_description import node_search
from randovania.game_description.area import Area
from randovania.game_description.game_patches import GamePatches
from randovania.game_description.hint import Hint, HintLocationPrecision, RelativeDataArea, HintRelativeAreaName
from randovania.game_desc... | gpl-3.0 | -1,242,443,017,889,526,800 | 44.125 | 122 | 0.674893 | false | 3.774715 | false | false | false |
vlimant/IntelROCCS | Monitor/plotFromPickle.py | 1 | 21846 | #!/usr/bin/python
'''==============================================================================
This script reads information from the pickle caches and directly
makes plots
=============================================================================='''
import os, sys
import re, glob, subprocess, tim... | mit | 1,943,402,565,564,367,600 | 36.927083 | 151 | 0.564039 | false | 3.627698 | false | false | false |
relekang/accio | accio/webhooks/tests.py | 1 | 1727 | import pytest
@pytest.fixture
def push_based_project(accio_project):
accio_project.deploy_on = 'push'
accio_project.save()
return accio_project
@pytest.fixture
def status_based_project(accio_project):
accio_project.deploy_on = 'status'
accio_project.save()
return accio_project
@pytest.mark... | mit | -6,829,933,572,956,118,000 | 33.54 | 98 | 0.7348 | false | 3.495951 | true | false | false |
opensource-expert/customers-formula | customers/customers_passwords.py | 1 | 4681 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# vim: set ft=python:
#
# python password generator for customers
#
# Depend: pwqgen
#
# Usage:
# ./customers_passwords.py customers_top pillarpath/to/customers.sls pillarpath/user_passwords.yaml
#
# Output: Int, the number of created passwords in pillarpath/user_passwords.sls... | gpl-3.0 | -1,138,239,243,298,611,100 | 26.511765 | 100 | 0.598888 | false | 3.386676 | false | false | false |
rickypc/dotfiles | .rflint.d/table.py | 1 | 3998 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Robot Lint Rules - Lint rules for Robot Framework data files.
# Copyright (c) 2014, 2015, 2016 Richard Huang <rickypc@users.noreply.github.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero Gen... | mit | -4,098,794,181,597,314,600 | 32.316667 | 84 | 0.612806 | false | 4.034309 | false | false | false |
IntelLabs/hpat | docs/source/buildscripts/user_guide_gen.py | 1 | 12520 | # -*- coding: utf-8 -*-
# *****************************************************************************
# Copyright (c) 2020, Intel Corporation All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# ... | bsd-2-clause | 2,918,795,782,654,178,000 | 43.714286 | 120 | 0.610304 | false | 3.822901 | false | false | false |
jpruf/building-permits-geo | pipeline/tasks/convert_to_dict.py | 1 | 1327 | import os
import csv
import json
TSV_FOLDER = "../data/tsv/"
FIELDNAMES = ("tract", "apn", "issue_date", "final_date", "lot", "permit_number", "owner",
"contractor", "applicant", "location", "approval_status", "sub_code",
"sub_code_description", "work_code", "work_code_description", "census... | mit | 3,859,655,520,245,001,700 | 39.242424 | 92 | 0.600603 | false | 3.437824 | false | false | false |
hughsons/saltwaterfish | admin/views.py | 1 | 28274 | from django.http import *
from forms import UploadForm
from django import template
from django.template.loader import get_template
from django.template import Context, RequestContext
from django.utils.decorators import method_decorator
from django.shortcuts import render_to_response
from django.contrib.auth import auth... | bsd-3-clause | -3,690,833,010,790,051,300 | 41.326347 | 266 | 0.592594 | false | 3.99802 | false | false | false |
wingtk/icbuild | icbuild/modtypes/msvc.py | 1 | 3122 | # icbuild - a tool to ease building collections of source packages
# Copyright (C) 2015 Ignacio Casal Quinteiro
#
# msvc.py: msvc module type definitions.
#
# 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 Softwar... | gpl-2.0 | 1,607,374,235,951,469,600 | 34.078652 | 87 | 0.68802 | false | 3.798054 | false | false | false |
MarinusVL/scRNApipe | setup.py | 1 | 1056 | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='scRNApipe',
version='0.1.0',
description='Package for analysing scRNA-seq in Transcript Tag Counting data.',
long_description=read('README.md'),
author='Stavr... | mit | 4,567,553,069,334,808,000 | 35.413793 | 122 | 0.631629 | false | 3.133531 | false | false | false |
catalpainternational/OIPA | OIPA/api/v2/resources/advanced_resources.py | 1 | 7277 | from builtins import object
from tastypie.resources import ModelResource
from geodata.models import Country, Region, City
from indicator.models import Indicator
from tastypie import fields
from tastypie.serializers import Serializer
class IndicatorFiltersResource(ModelResource):
name = fields.CharField(attribut... | agpl-3.0 | 8,310,001,698,274,749,000 | 36.127551 | 126 | 0.600797 | false | 3.544569 | false | false | false |
zaitcev/swift-lfs | test/probe/common.py | 1 | 7421 | # Copyright (c) 2010-2012 OpenStack, LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to ... | apache-2.0 | 5,316,278,556,826,849,000 | 35.377451 | 79 | 0.538741 | false | 4.06185 | false | false | false |
dhylands/bioloid3 | bioloid/bus.py | 1 | 9709 | """This module provides the Bus class which knows how to talk to Bioloid
devices, and the BusError exception which is raised when an error is
enountered.
"""
import pyb
from bioloid import packet
from bioloid.dump_mem import dump_mem
from bioloid.log import log
class BusError(Exception):
"""Exception whic... | mit | 4,271,133,406,594,132,500 | 36.77821 | 108 | 0.576475 | false | 3.767559 | false | false | false |
ocefpaf/ulmo | ulmo/cuahsi/wof/core.py | 1 | 11413 | """
ulmo.wof.core
~~~~~~~~~~~~~
This module provides direct access to `CUAHSI WaterOneFlow`_ web services.
.. _CUAHSI WaterOneFlow: http://his.cuahsi.org/wofws.html
"""
from future import standard_library
standard_library.install_aliases()
from builtins import str
import io
import suds.client
import... | bsd-3-clause | 6,928,622,012,715,005,000 | 37.819728 | 98 | 0.651625 | false | 3.932805 | false | false | false |
frank2/paranoia | lib/base/event.py | 1 | 2058 | #!/usr/bin/env python
import inspect
from paranoia.base.paranoia_agent import ParanoiaAgent, ParanoiaError
__all__ = ['get_event_base', 'EventError', 'Event', 'InstantiateEvent'
,'SetPropertyEvent', 'NewAddressEvent', 'NewShiftEvent', 'NewSizeEvent'
,'SetValueEvent', 'DeclareSubregionEvent', 'M... | gpl-3.0 | -8,133,959,076,121,812,000 | 27.191781 | 82 | 0.674441 | false | 4.051181 | false | false | false |
peterbrittain/asciimatics | samples/treeview.py | 1 | 2992 | #!/usr/bin/env python3
from asciimatics.event import KeyboardEvent
from asciimatics.widgets import Frame, Layout, FileBrowser, Widget, Label, PopUpDialog, Text, \
Divider
from asciimatics.scene import Scene
from asciimatics.screen import Screen
from asciimatics.exceptions import ResizeScreenError, StopApplication
... | apache-2.0 | 4,689,903,952,881,384,000 | 35.048193 | 98 | 0.602273 | false | 4.081855 | false | false | false |
simbtrix/screenmix | screenmix/ackModel/ack.py | 1 | 1349 | '''
Created on 01.08.2016
@author: mkennert
'''
from kivy.properties import ObjectProperty
from kivy.uix.gridlayout import GridLayout
from ackModel.ackRect import AckRect
class Ack(GridLayout):
'''
ack contains all acks from the different shapes. it manage which ack-should
show in th... | gpl-3.0 | -1,378,046,519,291,623,700 | 27.326087 | 79 | 0.535211 | false | 4.452145 | false | false | false |
sfu-natlang/HMM-Aligner | src/models/Old/IBM1WithAlignmentType.py | 1 | 5456 | # -*- coding: utf-8 -*-
#
# IBM model 1 with alignment type implementation of HMM Aligner
# Simon Fraser University
# NLP Lab
#
# This is the implementation of IBM model 1 word aligner with alignment type.
#
from collections import defaultdict
from loggers import logging
from models.IBM1Base import AlignmentModelBase ... | mit | -7,192,015,633,586,471,000 | 37.422535 | 79 | 0.559751 | false | 3.353411 | false | false | false |
SMMAR11/smmarbsence | app/forms/admin.py | 1 | 4838 | # coding: utf-8
# Imports
from app.models import *
from django import forms
from django.contrib.admin.widgets import FilteredSelectMultiple
class FGroupeUtilisateur(forms.ModelForm) :
# Champ
util = forms.ModelMultipleChoiceField(
label = 'Utilisateurs composant le groupe',
queryset = TUtilis... | gpl-3.0 | 1,337,630,901,324,975,600 | 33.248227 | 116 | 0.612676 | false | 3.428977 | false | false | false |
Gram21/ctfcode | pwnit.py | 1 | 4547 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# Python exploit template.
#
# Author: Jan Keim aka Gram21, Gramarye
from pwn import *
####################################
# Target System #
####################################
# Server Connection
target = "localhost"
port = 1337
# Process Connec... | mit | -3,380,402,577,287,018,500 | 23.058201 | 72 | 0.553992 | false | 3.489639 | false | false | false |
informatik-mannheim/Moduro-CC3D | Simulation/Steppable/ModuroSteppable.py | 1 | 1244 | # Copyright 2016 the original author or 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 | -3,116,914,015,083,291,600 | 34.542857 | 76 | 0.694534 | false | 3.585014 | false | false | false |
jkoelker/investing | picloud/magicformula/predict.py | 1 | 3948 | #!/usr/bin/env python
import argparse
import sys
import MySQLdb
import pandas as pd
import twitter
def publish_to_twitter(df, prefix='MF', api=None, **kwargs):
if api is None:
api = twitter.Api(**kwargs)
msg = ' '.join(['$%s' % s for s in df.T.index])
msg = '%s: %s' % (prefix, msg)
if len(... | mit | 5,124,949,464,170,065,000 | 32.457627 | 79 | 0.526342 | false | 3.851707 | false | false | false |
mucximilian/gimpmaps | gimprenderer/sketching/geometry.py | 1 | 17067 | '''
Created on Jun 11, 2015
@author: mucx
# TO DO:
- Adding classes:
- Point?
- Polygon
- Multipolygon support
'''
from __future__ import division
from abc import ABCMeta, abstractmethod
import math
import sys
class Geometry(object):
"""
An abstract class defining the base geometry object... | gpl-2.0 | 3,766,000,800,359,044,000 | 30.089253 | 84 | 0.457315 | false | 4.103631 | false | false | false |
chrsrds/scikit-learn | examples/model_selection/plot_grid_search_digits.py | 7 | 2706 | """
============================================================
Parameter estimation using grid search with cross-validation
============================================================
This examples shows how a classifier is optimized by cross-validation,
which is done using the :class:`sklearn.model_selection.GridS... | bsd-3-clause | 537,184,166,535,805,440 | 33.692308 | 78 | 0.656689 | false | 3.816643 | true | false | false |
TresysTechnology/setools | setoolsgui/rolemodel.py | 1 | 2087 | # Copyright 2016, Tresys Technology, LLC
#
# This file is part of SETools.
#
# SETools 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 2.1 of
# the License, or (at your option) any later ... | lgpl-2.1 | -2,426,512,159,329,464,300 | 28.814286 | 74 | 0.638237 | false | 4.060311 | false | false | false |
Weihonghao/ECM | Vpy34/lib/python3.5/site-packages/theano/gof/tests/test_toolbox.py | 2 | 2301 | from __future__ import absolute_import, print_function, division
from theano.gof.graph import Variable, Apply
from theano.gof.type import Type
from theano.gof.op import Op
from theano.gof.fg import FunctionGraph
from theano.gof.toolbox import NodeFinder
def as_variable(x):
assert isinstance(x, Variable)
ret... | agpl-3.0 | -5,614,573,700,113,669,000 | 25.147727 | 73 | 0.571491 | false | 3.277778 | false | false | false |
davidfischer/rpc4django | docs/conf.py | 2 | 6764 | # -*- coding: utf-8 -*-
#
# RPC4Django documentation build configuration file, created by
# sphinx-quickstart on Sat Apr 17 14:31:28 2010.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# ... | bsd-3-clause | -7,409,543,119,766,741,000 | 31.363636 | 80 | 0.713779 | false | 3.708333 | true | false | false |
c-square/homework | Licență/Anul III/CN/gauss/scripts/deploy.py | 1 | 1156 | #! /usr/bin/env python
""" Deploys a .pth file in site-packages for easy importing """
import distutils.sysconfig
import os
def deploy():
"""Deploy gauss"""
site = distutils.sysconfig.get_python_lib()
pth = os.path.join(site, 'gauss.pth')
if os.path.exists(pth):
print("[i] Module already exis... | mit | 3,215,219,101,553,088,000 | 30.243243 | 77 | 0.553633 | false | 4.173285 | false | false | false |
jolyonb/edx-platform | lms/djangoapps/discussion/rest_api/tests/test_api.py | 1 | 128040 | """
Tests for Discussion API internal interface
"""
import itertools
from datetime import datetime, timedelta
from urllib import urlencode
from urlparse import parse_qs, urlparse, urlunparse
import ddt
import httpretty
import mock
from django.core.exceptions import ValidationError
from django.test.client import Reques... | agpl-3.0 | 4,310,273,995,939,487,000 | 39.28949 | 120 | 0.568971 | false | 3.948196 | true | false | false |
ehabkost/virt-test | qemu/tests/usb_hotplug.py | 1 | 1705 | import logging, re, uuid
from autotest.client.shared import error
from autotest.client import utils
@error.context_aware
def run_usb_hotplug(test, params, env):
"""
Test usb hotplug
@param test: kvm test object
@param params: Dictionary with the test parameters
@param env: Dictionary with test env... | gpl-2.0 | 3,051,980,685,977,966,000 | 32.431373 | 71 | 0.659824 | false | 3.552083 | true | false | false |
shaneoc/atom | atom/router/directory.py | 1 | 1333 |
class Directory(object):
def __init__(self, router):
self.router = router
def start(self):
db = self.router.database
db.execute(
'CREATE TABLE IF NOT EXISTS users (' +
'id INTEGER PRIMARY KEY, name TEXT, password TEXT)')
db.execute(
'INSE... | mit | 6,492,416,664,778,558,000 | 24.653846 | 79 | 0.543136 | false | 4.34202 | false | false | false |
bokeh/bokeh | examples/app/fourier_animated.py | 1 | 6647 | ''' Show a streaming, updating representation of Fourier Series.
The example was inspired by `this video`_.
Use the ``bokeh serve`` command to run the example by executing:
bokeh serve fourier_animated.py
at your command prompt. Then navigate to the URL
http://localhost:5006/fourier_animated
in your brows... | bsd-3-clause | 8,983,696,342,426,303,000 | 32.235 | 114 | 0.574846 | false | 2.845462 | false | false | false |
mposner/pychess | board.py | 1 | 5063 | # pychess
# mposner 11/23/14
from piece import Piece
from piece_attributes import PieceType, Color
from utils import isValidPosition
class Board:
"""Represents a chess board"""
def __init__(self):
"""Initialize a new chess board"""
self.makeNewPieces()
def __str__(self):
result = " " + 33*"="... | gpl-2.0 | -1,243,340,808,460,693,000 | 26.818681 | 69 | 0.633419 | false | 2.701708 | false | false | false |
it-events-ro/scripts | update-from-eventbrite.py | 1 | 6855 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import json
import sys
import utils
included_organizers = {
2491303902, # http://www.eventbrite.com/o/itcamp-2491303902
6873285549, # http://www.eventbrite.com/o/sponge-media-lab-6873285549
3001324227, # http://www.eventbrite.com/o/labview-student-ambassador-upb-30... | agpl-3.0 | -8,798,751,040,999,646,000 | 52.554688 | 122 | 0.756966 | false | 2.474729 | false | false | false |
HengeSense/website | website/migrations/0003_auto__chg_field_userprofile_gender__chg_field_userprofile_date_of_birt.py | 1 | 4876 | # -*- 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):
# Changing field 'UserProfile.gender'
db.alter_column('website_userprofile', 'gender', self.gf('django.db.m... | agpl-3.0 | 3,340,166,466,635,874,000 | 64.905405 | 182 | 0.576292 | false | 3.815336 | false | false | false |
Atrasoftware/PyTMCL | PyTMCL/tests/test_codec.py | 1 | 7568 | #!/usr/bin/env python
import unittest
from TMCL import *
import random as rnd
MAXITER = 200
REQUEST_KEYS = codec.REQUEST_KEYS + ['value']
REPLY_KEYS = codec.REPLY_KEYS + ['value']
class CodecTestCase(unittest.TestCase):
def _gen_byte(self, min_i=0, max_i=256):
return rnd.randint(min_i, max_i-1)... | lgpl-3.0 | -1,073,172,985,004,600,400 | 29.516129 | 112 | 0.612711 | false | 3.664891 | true | false | false |
liesbethvanherpe/NeuroM | neurom/fst/__init__.py | 1 | 6830 | # Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project
# All rights reserved.
#
# This file is part of NeuroM <https://github.com/BlueBrain/NeuroM>
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are ... | bsd-3-clause | 317,015,164,251,236,800 | 39.898204 | 96 | 0.701611 | false | 3.381188 | false | false | false |
denys-duchier/kivy | kivy/uix/filechooser.py | 1 | 32541 | '''
FileChooser
===========
.. versionadded:: 1.0.5
.. versionchanged:: 1.2.0
In the chooser template, the `controller` is not a direct reference anymore
but a weak-reference.
You must update all the notation `root.controller.xxx` to
`root.controller().xxx`.
Simple example
--------------
main.py
.... | mit | -4,341,889,288,043,636,700 | 31.476048 | 80 | 0.598414 | false | 4.19505 | false | false | false |
patjouk/djangogirls | jobs/migrations/0004_auto_20150712_1803.py | 1 | 3951 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jobs', '0003_auto_20150510_1707'),
]
operations = [
migrations.RemoveField(
model_name='job',
name='... | bsd-3-clause | 2,459,570,391,821,128,700 | 41.945652 | 188 | 0.576563 | false | 4.203191 | false | false | false |
cleberzavadniak/canivett | canivett/tree.py | 1 | 6306 | import os
import errno
import logging
import imp
from fuse import Operations, FuseOSError
class Tree(Operations):
"""
Most of this class is based on the work of Stavros Korokithakis:
https://www.stavros.io/posts/python-fuse-filesystem/
;-)
"""
def __init__(self, base):
self.logger = l... | gpl-2.0 | -1,390,266,037,243,918,800 | 28.605634 | 84 | 0.553283 | false | 3.518973 | false | false | false |
MariusWirtz/TM1py | TM1py/Services/TM1Service.py | 1 | 1569 | import pickle
from TM1py.Services import *
class TM1Service:
""" All features of TM1py are exposed through this service
Can be saved and restored from File, to avoid multiple authentication with TM1.
"""
def __init__(self, **kwargs):
self._tm1_rest = RESTService(**kwargs)
# inst... | mit | -6,446,374,943,573,261,000 | 27.527273 | 83 | 0.631612 | false | 3.76259 | false | false | false |
sridevikoushik31/nova | nova/virt/baremetal/ipmi.py | 1 | 10006 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# coding=utf-8
# Copyright 2012 Hewlett-Packard Development Company, L.P.
# Copyright (c) 2012 NTT DOCOMO, 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.... | apache-2.0 | 7,198,640,514,716,515,000 | 33.38488 | 79 | 0.573056 | false | 3.978529 | false | false | false |
Arthraim/douban2mongo | book2mongo.py | 1 | 2157 | # coding= utf-8
from bs4 import BeautifulSoup
import codecs
from mongoengine import *
from book import Book
connect('mydouban')
import os
os.chdir("book")
for filename in os.listdir("."):
with codecs.open(filename, "r", "utf-8") as html_file:
soup = BeautifulSoup(html_file.read())
for item in sou... | mit | 4,743,349,884,267,529,000 | 35.982143 | 136 | 0.494447 | false | 3.251177 | false | false | false |
dahlia/wikidata | wikidata/quantity.py | 1 | 1837 | """:mod:`wikidata.quantity` --- Quantity
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. versionadded:: 0.7.0
"""
from typing import Optional
from .entity import Entity
__all__ = 'Quantity',
class Quantity:
"""A Quantity value represents a decimal number, together with information
about the uncertainty interv... | gpl-3.0 | 4,169,294,263,064,760,000 | 30.135593 | 78 | 0.494284 | false | 4.262181 | false | false | false |
rouge8/hitsearch | threadtest/maker.py | 1 | 1288 | from time import sleep
import time
import threading
class BoxFiller(threading.Thread):
def __init__(self,parent):
threading.Thread.__init__(self)
self.parent = parent
def run(self):
count = 0
for i in range(30):
sleep(.5)
count += 1
self.parent... | mit | 5,738,367,370,088,499,000 | 24.76 | 66 | 0.505435 | false | 4.012461 | false | false | false |
eigoshimizu/Genomon | scripts/genomon_pipeline/dna_pipeline.py | 1 | 57868 | import os
import shutil
import glob
from ruffus import *
from genomon_pipeline.config.run_conf import *
from genomon_pipeline.config.genomon_conf import *
from genomon_pipeline.config.sample_conf import *
from genomon_pipeline.dna_resource.bamtofastq import *
from genomon_pipeline.dna_resource.fastq_splitter import *
f... | gpl-2.0 | 2,453,567,865,520,221,000 | 54.965184 | 288 | 0.628586 | false | 3.115202 | true | false | false |
twicki/dawn | docs/_extension/cmake.py | 1 | 4098 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
##===-----------------------------------------------------------------------------*- Python -*-===##
## _
## | |
## __| | __ ___ ___ ___
## / _` |/ _` \ \ /\ / / '_ |
## ... | mit | 2,626,606,504,850,924,000 | 36.263636 | 100 | 0.464129 | false | 4.364217 | false | false | false |
masoodking/LinkPrediction | tsne_python/tsne.py | 1 | 5760 | #
# tsne.py
#
# Implementation of t-SNE in Python. The implementation was tested on Python 2.5.1, and it requires a working
# installation of NumPy. The implementation comes with an example on the MNIST dataset. In order to plot the
# results of this example, a working installation of matplotlib is required.
# The ... | bsd-3-clause | 3,899,504,067,676,658,000 | 29.967742 | 117 | 0.602257 | false | 2.648276 | false | false | false |
convexopt/gpkit | gpkit/tests/t_vars.py | 1 | 7635 | """Test VarKey, Variable, VectorVariable, and ArrayVariable classes"""
import unittest
import numpy as np
from gpkit import (Monomial, NomialArray, Variable, VarKey,
VectorVariable, ArrayVariable)
import gpkit
from gpkit.nomials import Variable as PlainVariable
class TestVarKey(unittest.TestCase):
... | mit | 2,720,635,913,569,846,000 | 33.863014 | 80 | 0.568173 | false | 3.486301 | true | false | false |
plang85/rough_surfaces | rough_surfaces/plot.py | 1 | 2368 | import numpy as np
from matplotlib import rcParams
import scipy.stats as scst
# TODO get rid of these and we won't need matplotlib in the setup, only for examples
rcParams['font.size'] = 14
rcParams['legend.fontsize'] = 10
rcParams['savefig.dpi'] = 300
rcParams['legend.loc'] = 'upper right'
rcParams['image.cmap'] = 'ho... | mit | 3,680,067,757,627,451,400 | 32.352113 | 90 | 0.602618 | false | 2.912669 | false | false | false |
vergecurrency/VERGE | test/functional/interface_http.py | 1 | 4779 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the RPC HTTP basics."""
from test_framework.test_framework import VergeTestFramework
from test_fr... | mit | 6,686,118,359,302,574,000 | 43.25 | 106 | 0.626282 | false | 3.910802 | true | false | false |
GovReady/govready-q | guidedmodules/module_logic.py | 1 | 95357 | import uuid
from itertools import groupby
from urllib.parse import urlunparse
from django.conf import settings
from jinja2.sandbox import SandboxedEnvironment
from controls.enums.statements import StatementTypeEnum
from controls.oscal import Catalogs, Catalog
from siteapp.settings import GOVREADY_URL
def get_jinja2... | gpl-3.0 | 5,768,756,161,847,980,000 | 44.321768 | 204 | 0.57162 | false | 4.561445 | false | false | false |
ellmo/rogue-python-engine | rpe/player.py | 1 | 1367 | import rpe_map
import camera
class Player(object):
def __init__(self, rpe_map, direction_vector):
self._rpe_map = rpe_map
self._x = rpe_map.start_position[0]
self._y = rpe_map.start_position[1]
self._camera = camera.Camera(rpe_map.start_position, direction_vector)
@property
... | gpl-3.0 | -1,962,575,099,425,045,200 | 23.854545 | 83 | 0.548647 | false | 3.408978 | false | false | false |
qedsoftware/commcare-hq | custom/ilsgateway/tanzania/handlers/generic_stock_report_handler.py | 1 | 2041 | from django.conf import settings
from corehq.apps.commtrack.exceptions import NotAUserClassError
from corehq.apps.commtrack.sms import process
from corehq.apps.sms.api import send_sms_to_verified_number
from custom.ilsgateway.tanzania.handlers.ils_stock_report_parser import ILSStockReportParser
from custom.ilsgateway.t... | bsd-3-clause | 5,092,202,569,598,729,000 | 29.924242 | 108 | 0.593827 | false | 4.427332 | false | false | false |
qedsoftware/commcare-hq | corehq/apps/case_search/views.py | 1 | 1603 | import json
from corehq.apps.domain.decorators import cls_require_superuser_or_developer
from corehq.apps.domain.views import DomainViewMixin
from django.http import Http404
from dimagi.utils.web import json_response
from django.views.generic import TemplateView
from corehq.apps.case_search.models import case_search_e... | bsd-3-clause | -1,550,747,963,873,273,300 | 39.075 | 76 | 0.696818 | false | 3.825776 | false | false | false |
googleapis/python-aiplatform | tests/unit/enhanced_library/test_enhanced_types.py | 1 | 2007 | # 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 1,963,648,343,854,830,300 | 31.901639 | 82 | 0.765321 | false | 3.333887 | true | false | false |
praekelt/wsgi-ua-mapper | ua_mapper/updatewurfl.py | 1 | 1900 | import os
import sys
from optparse import OptionParser
from urllib import urlopen
from ua_mapper.wurfl2python import WurflPythonWriter, DeviceSerializer
OUTPUT_PATH = os.path.abspath(os.path.dirname(__file__))
WURFL_ARCHIVE_PATH = os.path.join(OUTPUT_PATH, "wurfl.zip")
WURFL_XML_PATH = os.path.join(OUTPUT_PATH, "wurf... | bsd-3-clause | 2,836,465,306,440,326,000 | 31.758621 | 99 | 0.623684 | false | 3.392857 | false | false | false |
Clarity-89/clarityv2 | src/clarityv2/work_entries/admin.py | 1 | 1978 | import datetime
from datetime import timedelta
from django.contrib import admin
from django.contrib.admin.filters import DateFieldListFilter
from django.db.models import Sum
from django.utils import timezone
from django.utils.translation import gettext_lazy as _
from import_export.admin import ImportExportActionModel... | mit | 394,790,853,219,527,550 | 37.038462 | 96 | 0.650152 | false | 4.078351 | false | false | false |
amilan/dev-maxiv-pynutaq | src/pynutaq/perseus/perseusutils.py | 1 | 7717 | #!/usr/bin/env python
###############################################################################
# NutaqDiags device server.
#
# Copyright (C) 2013 Max IV Laboratory, Lund Sweden
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | gpl-3.0 | -5,668,996,451,132,105,000 | 28.795367 | 110 | 0.618116 | false | 3.361063 | false | false | false |
nick41496/Beatnik | slackbot/migrations/0001_initial.py | 1 | 1031 | # Generated by Django 2.2.9 on 2020-04-26 23:18
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Install',
fields=[
('id', models.AutoField(... | gpl-3.0 | 4,604,570,838,081,418,000 | 37.185185 | 114 | 0.588749 | false | 4.368644 | false | false | false |
sachabest/cis599 | web/dashboard/uploader.py | 1 | 2445 | import csv, logging
from .models import Student, Project
from django.contrib.auth.models import User
logger = logging.getLogger(__name__)
def parse_input_csv(csv_file_wrapper, project_file_wrapper):
'''
Takes in raw text and outputs json for group information.
Expected format of project_file:
Name / ... | mit | -322,003,598,205,245,440 | 34.970588 | 88 | 0.608589 | false | 3.918269 | false | false | false |
ZTH1970/alcide | scripts/import_users.py | 1 | 5758 | # -*- coding: utf-8 -*-
#!/usr/bin/env python
import os
import csv
import codecs
import string
import random
from datetime import datetime, time
import django.core.management
import alcide.settings
django.core.management.setup_environ(alcide.settings)
from django.contrib.auth.models import User
from alcide.actes.mod... | agpl-3.0 | -7,221,619,280,167,472,000 | 30.464481 | 99 | 0.588051 | false | 3.307295 | false | false | false |
sheqi/TVpgGLM | test/practice6_pystan_hmc_Qi_loop_test.py | 1 | 1347 | import pickle
import numpy as np
import numpy.random as npr
import matplotlib.pyplot as plt
from pyglm.utils.utils import expand_scalar, compute_optimal_rotation
dim = 2
N = 20
r = 1 + np.arange(N) // (N/2.)
th = np.linspace(0, 4 * np.pi, N, endpoint=False)
x = r * np.cos(th)
y = r * np.sin(th)
L = np.hstack((x[:, Non... | mit | 6,740,229,076,920,193,000 | 24.923077 | 96 | 0.582777 | false | 2.440217 | false | false | false |
googleads/googleads-python-lib | examples/ad_manager/v202105/activity_group_service/get_all_activity_groups.py | 1 | 1854 | #!/usr/bin/env python
#
# Copyright 2016 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 requir... | apache-2.0 | 4,992,633,580,900,890,000 | 35.352941 | 74 | 0.721143 | false | 4.19457 | false | false | false |
vxsx/djangocms-text-ckeditor | djangocms_text_ckeditor/utils.py | 1 | 6174 | # -*- coding: utf-8 -*-
import os
import re
from collections import OrderedDict
from functools import wraps
from classytags.utils import flatten_context
from cms.models import CMSPlugin
from django.core.files.storage import get_storage_class
from django.template.defaultfilters import force_escape
from django.template.... | bsd-3-clause | -6,806,602,773,429,382,000 | 33.49162 | 106 | 0.660026 | false | 3.646781 | false | false | false |
carpyncho/feets | feets/extractors/ext_q31.py | 1 | 3876 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# The MIT License (MIT)
# Copyright (c) 2017 Juan Cabral
# 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 withou... | mit | -5,410,018,966,500,149,000 | 33.300885 | 79 | 0.566563 | false | 3.774099 | false | false | false |
xinghalo/DMInAction | src/tensorflow/recommend/ops.py | 1 | 2022 | from src import tensorflow as tf
def inference_svd(user_batch, item_batch, user_num, item_num, dim=5, device="/cpu:0"):
with tf.device("/cpu:0"):
bias_global = tf.get_variable("bias_global", shape=[])
w_bias_user = tf.get_variable("embd_bias_user", shape=[user_num])
w_bias_item = tf.get_va... | apache-2.0 | -2,948,722,271,632,747,000 | 56.142857 | 104 | 0.643 | false | 3.154574 | false | false | false |
robin900/gspread-dataframe | tests/mock_worksheet.py | 1 | 1986 | import os.path
import json
import re
from gspread.models import Cell
from gspread_dataframe import _cellrepr
def contents_of_file(filename, et_parse=True):
with open(os.path.join(os.path.dirname(__file__), filename), "r") as f:
return json.load(f)
SHEET_CONTENTS_FORMULAS = contents_of_file("sheet_conten... | mit | -4,786,977,959,139,163,000 | 24.792208 | 76 | 0.598691 | false | 3.315526 | false | false | false |
theonaun/theo_site | app_surgeo/services/rest_api.py | 1 | 2418 | import json
from django.http import HttpResponse
from .calculations import surgeo_model
from .calculations import surname_model
from .calculations import geocode_model
from .calculations import forename_model
from .hmac_utility import verify_message
class RestAPI(object):
'''Takes queries and gets results.'''
... | mit | -262,319,776,951,719,100 | 33.056338 | 72 | 0.593879 | false | 4.317857 | false | false | false |
kodi-czsk/plugin.video.online-files | resources/lib/fastshare.py | 1 | 5924 | # -*- coding: UTF-8 -*-
#/*
# * Copyright (C) 2012 Libor Zoubek
# *
# *
# * 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, or (at your option)
# * any later version... | gpl-2.0 | 3,914,445,946,651,833,000 | 43.878788 | 121 | 0.549629 | false | 3.866841 | false | false | false |
ngageoint/scale | scale/recipe/seed/recipe_definition.py | 1 | 21647 | """Defines the class for managing a recipe definition"""
from __future__ import unicode_literals
import json
import os
from django.db.models import Q
from job.configuration.data.exceptions import InvalidConnection
from job.configuration.interface.scale_file import ScaleFileDescription
from job.deprecation import JobC... | apache-2.0 | -336,845,178,525,268,600 | 43.541152 | 120 | 0.612464 | false | 4.280601 | true | false | false |
dnlcrl/TensorFlow-Playground | 1.tutorials/2.Deep MNIST for Experts/mnist.py | 1 | 3226 |
import tensorflow as tf
# download and install the data automatically
import input_data
# download dataset or open
mnist = input_data.read_data_sets("MNIST_data/", one_hot=True)
# launch interactive session
sess = tf.InteractiveSession()
# placeholders
x = tf.placeholder("float", shape=[None, 784])
y_ = tf.placeho... | mit | 4,093,565,697,744,812,000 | 28.87037 | 113 | 0.676689 | false | 2.607922 | false | false | false |
p473lr/i-urge-mafia-gear | HP Code Wars Documents/2014/Solutions/prob02_CheckDigit.py | 1 | 2339 | #!/usr/bin/env python
#CodeWars 2014
#
#Check Digits
#
# There are many situations where we exchange a number with someone. In some cases we need
# to be sure that the number we gave them was received correctly. This is especially
# important for credit cards, serial numbers, and product bar code numbers.
# A check... | apache-2.0 | -2,976,268,853,443,760,600 | 34.984615 | 91 | 0.666524 | false | 3.289733 | false | false | false |
shpakoo/YAP | StepsLibrary.py | 1 | 60173 | ########################################################################################
## This file is a part of YAP package of scripts. https://github.com/shpakoo/YAP
## Distributed under the MIT license: http://www.opensource.org/licenses/mit-license.php
## Copyright (c) 2011-2013 Sebastian Szpakowski
#############... | mit | 3,567,784,365,733,237,000 | 26.780702 | 226 | 0.617004 | false | 2.781152 | false | false | false |
CuBoulder/atlas | atlas/backup_operations.py | 1 | 1820 | """
atlas.backup_operations
~~~~
Commands that run on servers to create, restore, and remove backups.
Instance methods:
Delete - Local - Remove backup files.
"""
import logging
import os
from datetime import datetime
from time import time
from atlas import utilities
from atlas.config import (ENVI... | mit | -1,822,666,200,972,725,500 | 36.916667 | 98 | 0.639011 | false | 3.611111 | false | false | false |
michaelrice/gotland | gotland/rabbit/api.py | 1 | 18344 | # Copyright 2014 Michael Rice <michael@michaelrice.org>
#
# 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 app... | apache-2.0 | -7,473,669,924,650,975,000 | 37.216667 | 80 | 0.590656 | false | 3.911301 | false | false | false |
clchiou/garage | py/g1/http/http2_servers/g1/http/http2_servers/parts.py | 1 | 1361 | import g1.networks.servers.parts
from g1.apps import parameters
from g1.apps import utils
from g1.bases import labels
from .. import http2_servers # pylint: disable=relative-beyond-top-level
from . import nghttp2
SERVER_LABEL_NAMES = (
# Input.
'application',
# Private.
('server', g1.networks.servers... | mit | 8,790,086,334,072,161,000 | 30.651163 | 79 | 0.686995 | false | 3.591029 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.