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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
chrysante87/pyterpol | pyterpol_test/test_interpolation_pollux/test_spectra_interpolation.py | 1 | 1322 | import matplotlib.pyplot as plt
import numpy as np
import sys
sys.path.append('../../')
import pyterpol
import time
# create the grid - custom does nothing
sygri = pyterpol.SyntheticGrid('POLLUX', debug=True)
# interpolate at
keys_0 = ['Z', 'LOGG', 'TEFF']
values = [[1.0, 4.0, 12000],[1.0, 4.0, 12200],[1.0, 3.8, 1220... | gpl-2.0 | -7,589,531,889,224,292 | 27.12766 | 86 | 0.615734 | false | 3.096019 | false | false | false |
lsaffre/lino-welfare | old/userman/conf.py | 1 | 7931 | # -*- coding: utf-8 -*-
#
# Multilingual websites with Sphinx documentation build configuration file, created by
# sphinx-quickstart on Thu Nov 13 11:09:54 2008.
#
# This file is execfile()d with the current directory set to its containing dir.
#
# The contents of this file are pickled, so don't put values in the names... | agpl-3.0 | 3,183,005,372,753,296,000 | 29.503846 | 86 | 0.710881 | false | 3.42888 | true | false | false |
mikalstill/nova | nova/api/openstack/compute/baremetal_nodes.py | 1 | 5862 | # Copyright (c) 2013 NTT DOCOMO, INC.
# Copyright 2014 IBM Corporation.
# 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/licen... | apache-2.0 | 3,847,050,993,347,530,000 | 37.313725 | 78 | 0.613101 | false | 3.629721 | false | false | false |
ceholden/glmnet-python | glmnet/utils.py | 1 | 2509 | """ Utility functions for helping compute GLMNET models
"""
import numpy as np
def mse_path(X, y, coefs, intercepts):
""" Return mean squared error for sets of estimated coefficients
Args:
X (np.ndarray): 2D (n_obs x n_features) design matrix
y (np.ndarray): 1D dependent variable
coef... | gpl-2.0 | 7,725,468,921,753,172,000 | 32.013158 | 74 | 0.614986 | false | 3.385965 | false | false | false |
infinitewarp/trekipsum | trekipsum/dialog/sqlite.py | 1 | 3977 | import logging
import random
import sqlite3
from os import path
from ..exceptions import NoDialogFoundException
logger = logging.getLogger(__name__)
DEFAULT_SQLITE_PATH = path.join(path.dirname(path.dirname(path.abspath(__file__))),
'assets', 'dialog.sqlite')
class DialogChooser(obj... | mit | -1,442,615,503,549,719,800 | 38.376238 | 97 | 0.58436 | false | 4.083162 | false | false | false |
googleinterns/nlu-seq2graph | src/fscore.py | 1 | 2355 | """
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, software
distr... | apache-2.0 | -889,365,399,966,447,000 | 27.719512 | 78 | 0.637792 | false | 3.714511 | false | false | false |
jonocodes/gedit-code-assistance | backends/python/gcpbackendpython/backend.py | 1 | 1686 | # gcp python backend
# Copyright (C) 2012 Jesse van den Kieboom <jessevdk@gnome.org>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any... | gpl-3.0 | -4,535,501,780,231,729,700 | 31.423077 | 76 | 0.693357 | false | 3.780269 | false | false | false |
suever/MATL-Online | tests/test_utils.py | 1 | 1949 | """Unit tests for utils module."""
import os
import shutil
from matl_online.utils import unzip
from .mocks import MockZipFile
class TestUnzip:
"""Test unzip functionality."""
def test_unzip_and_flatten(self, mocker, tmpdir):
"""Check that flattening of parent directories works as expected."""
... | mit | -5,944,450,522,117,513,000 | 27.661765 | 76 | 0.628014 | false | 3.821569 | true | false | false |
Yepoleb/gogdb | gogdb/legacy/model/product.py | 1 | 7873 | import sqlalchemy as sql
from sqlalchemy import orm
from sqlalchemy import Column
from gogdb.legacy.database import Base
from gogdb.legacy.model.common import get_systems_list, set_systems_list
class Product(Base):
__tablename__ = "products"
id = Column(sql.Integer, primary_key=True, autoincrement=False)
... | agpl-3.0 | -121,311,483,122,139,360 | 32.7897 | 79 | 0.642195 | false | 3.682413 | false | false | false |
holmqvisttobias/awsCrud | awsInstanceClasses.py | 1 | 3578 | #!/usr/bin/python
# @Author: Tobias Holmqvist <tohol>
# @Date: 2017-09-11
# @Email: tobias.m.holmqvist@gmail.com
# @Project: awsCrud
# @Last modified by: tohol
# @Last modified time: 2017-09-11
# @License: GPLv3
class Instances:
def __init__(self, response):
# New instance object
self.__insta... | gpl-3.0 | 669,386,238,064,529,700 | 31.234234 | 79 | 0.583287 | false | 4.204465 | false | false | false |
leiserfg/flask-restplus | flask_restplus/api.py | 1 | 30265 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import difflib
import inspect
import operator
import re
import sys
from functools import wraps, partial
from types import MethodType
from flask import url_for, request, current_app
from flask import make_response as original_flask_make_response
from fla... | mit | 5,843,273,044,682,983,000 | 38.717848 | 117 | 0.62042 | false | 4.431186 | false | false | false |
comp-imaging/ProxImaL | proximal/tests/test_problem.py | 1 | 4366 | import numpy as np
import pytest
from proximal.tests.base_test import BaseTest
from proximal.lin_ops import Variable, mul_elemwise, subsample
from proximal.prox_fns import norm1, sum_squares
from proximal.algorithms import Problem
from proximal.utils.utils import Impl
import cvxpy as cvx
class TestProblem(BaseTest):... | mit | -2,827,798,927,692,872,700 | 36 | 75 | 0.564819 | false | 3.147801 | true | false | false |
shelari/prereform_to_contemporary | transliterator.py | 1 | 17684 | # -*- coding: utf-8 -*-
__author__ = 'ElenaSidorova'
import re
from copy import deepcopy
from dict_settings import DictLoader
signs = [u'!', u'?', u',', u'.', u':', u')', u'(', u'«', u'»', u'“', u'”', u'-', u'–',u'`', u';', u'\\', u'/', u'@',
u'"', u' ', u'<', u'>', u'$']
prefix = {
re.compile(ur'^воз([пт... | mit | -6,262,544,985,312,217,000 | 36.912946 | 209 | 0.500059 | false | 3.249283 | true | false | false |
bruecksen/isimip | isi_mip/climatemodels/migrations/0052_auto_20170119_1313.py | 1 | 2659 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-01-19 12:13
from __future__ import unicode_literals
from django.db import migrations, models
from django.utils.text import slugify
def create_sectors(apps, schema_editor):
SectorModel = apps.get_model('climatemodels', 'Sector')
SectorModel.objects.... | mit | -443,416,539,107,838,340 | 44.844828 | 148 | 0.659646 | false | 3.540613 | false | false | false |
Smashman/mods.tf | app/scripts/scripts.py | 1 | 13186 | import steam
import urllib2
import datetime
import os
from steam.api import HTTPError, HTTPTimeoutError
from steam.user import ProfileNotFoundError
from .. import db, sentry
from ..models import get_or_create
from ..tf2.models import TF2Item, TF2Class, TF2BodyGroup, TF2ClassModel, TF2EquipRegion, all_classes
from ..tf2... | gpl-3.0 | 3,436,019,187,317,279,000 | 51.325397 | 132 | 0.516078 | false | 4.314791 | false | false | false |
plotly/plotly.py | packages/python/plotly/plotly/graph_objs/scatter/_error_x.py | 1 | 19360 | from plotly.basedatatypes import BaseTraceHierarchyType as _BaseTraceHierarchyType
import copy as _copy
class ErrorX(_BaseTraceHierarchyType):
# class properties
# --------------------
_parent_path_str = "scatter"
_path_str = "scatter.error_x"
_valid_props = {
"array",
"arrayminus... | mit | -8,118,280,332,756,490,000 | 29.730159 | 82 | 0.542355 | false | 4.359379 | false | false | false |
jacquesqiao/Paddle | python/paddle/reader/decorator.py | 1 | 11828 | # Copyright (c) 2016 PaddlePaddle 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 applic... | apache-2.0 | 9,090,622,917,781,333,000 | 28.204938 | 79 | 0.573301 | false | 4.161858 | false | false | false |
jness/plugin.video.futurama | default.py | 1 | 3027 | import urllib,urllib2,re,xbmcplugin,xbmcgui
def getURL(url):
useragent = 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.0.3) Gecko/2008092417 Firefox/3.0.3'
req = urllib2.Request(url)
req.add_header('User-Agent', useragent)
response = urllib2.urlopen(req)
link=response.read()
response.close()
return li... | gpl-2.0 | 4,732,513,819,222,563,000 | 27.28972 | 155 | 0.680542 | false | 2.739367 | false | false | false |
atulac/KNIT-Training-And-Placement-Cell-Automation | DataManipulatorAndBroadcasting/Mail.py | 1 | 8414 | import os
import sys
import wx
import mymail
try:
from agw import gradientbutton as GB
bitmapDir = "bitmaps/"
except ImportError: # if it's not there locally, try the wxPython lib.
import wx.lib.agw.gradientbutton as GB
bitmapDir = "agw/bitmaps/"
wildcard = "Text File (*.txt)|*.txt|" \
... | mit | 6,523,552,358,717,956,000 | 38.066667 | 133 | 0.536725 | false | 3.60961 | false | false | false |
fbraem/mqweb | samples/python/event.py | 1 | 1448 | '''
This sample will read all event messages from a queue.
MQWeb runs on localhost and is listening on port 8081.
'''
import json
import httplib
import socket
import argparse
parser = argparse.ArgumentParser(
description='MQWeb - Python sample - Browse Event Queue',
epilog="For more information: http://www.mqweb.... | mit | -74,620,894,797,271,310 | 29.808511 | 91 | 0.678867 | false | 3.423168 | false | false | false |
arizvisa/syringe | lib/mpdebug/dbgeng/task.py | 1 | 5280 | import logging
import _PyDbgEng
from . import internalstate
import ndk
class registers_INT32(object):
pc = property(fget=lambda self: self['eip'])
sp = property(fget=lambda self: self['esp'])
def __init__(self, task):
self.task = task
self.interface = task.host.interface.Registers
def... | bsd-2-clause | 3,416,762,676,093,701,600 | 39.930233 | 201 | 0.648106 | false | 3.837209 | false | false | false |
DataONEorg/d1_python | client_cli/src/d1_cli/impl/util.py | 1 | 4705 | #!/usr/bin/env python
# This work was created by participants in the DataONE project, and is
# jointly copyrighted by participating institutions in DataONE. For
# more information on DataONE, see our web site at http://dataone.org.
#
# Copyright 2009-2019 DataONE
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 | -4,451,373,233,732,804,000 | 30.577181 | 88 | 0.60085 | false | 3.751994 | false | false | false |
auag92/n2dm | Asap-3.8.4/Examples/Melting.py | 1 | 1345 | "Melting a copper cluster."
from numpy import *
from asap3 import Atoms, EMT, units
from ase.visualize.primiplotter import *
from ase.lattice.cubic import FaceCenteredCubic
from asap3.md.langevin import Langevin
# Create the atoms
atoms = FaceCenteredCubic(size=(5,5,5), symbol="Cu", pbc=False)
# Associate the EMT p... | mit | 6,208,361,236,516,244,000 | 25.9 | 79 | 0.695167 | false | 2.807933 | false | false | false |
aldian/tensorflow | tensorflow/python/framework/test_util_test.py | 1 | 16448 | # Copyright 2015 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 | 2,666,331,531,892,416,000 | 33.921444 | 81 | 0.64938 | false | 3.527343 | true | false | false |
AlexGidiotis/Multimodal-Gesture-Recognition-with-LSTMs-and-CTC | skeletal_network/velocity.py | 1 | 1142 | import pandas as pd
from scipy.spatial.distance import pdist
# calculates the velocity of both hands as the distance in pixels each hand has moved between consecutive frames
# args: df: dataframe with the joint positions
# returns: df: with two more columns appended for left and right hand velocities
def calcula... | mit | 675,155,068,787,662,100 | 40.37037 | 112 | 0.672504 | false | 2.79902 | false | false | false |
studybuffalo/studybuffalo | study_buffalo/hc_dpd/migrations/0003_subahfs_subahfspend.py | 1 | 1031 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-11-20 17:56
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('hc_dpd', '0002_auto_20171120_1055'),
]
operations = [
migrations.CreateMode... | gpl-3.0 | 4,291,106,319,242,335,700 | 32.258065 | 114 | 0.562561 | false | 4.10757 | false | false | false |
ngpitt/wrpi-web | public/views.py | 1 | 2659 | from django.shortcuts import render
from django.db.models import F
from members.models import Show
class TimeSlot():
def __init__(self, time, shows):
self.time = time
self.shows = shows
class TimeSlotItem():
def __init__(self, name='', host='', genre='Empty', description='', row_span=1):
... | apache-2.0 | 2,199,357,928,306,302,700 | 49.169811 | 174 | 0.57578 | false | 3.836941 | false | false | false |
alanamarzoev/ray | examples/resnet/resnet_main.py | 1 | 10342 | """ResNet training script, with some code from
https://github.com/tensorflow/models/tree/master/resnet.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import numpy as np
import ray
import tensorflow as tf
import cifar_input
i... | apache-2.0 | -5,645,280,256,001,279,000 | 40.870445 | 79 | 0.582092 | false | 3.924858 | true | false | false |
bhallen/pyparadigms | hypothesize.py | 1 | 15896 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## Based on learner.js (by Blake Allen and Michael Becker)
import itertools
import collections
from collections import defaultdict
import pdb
import phoment
class Change(object):
def __init__(self, change_type, position, input_material, output_material):
... | bsd-3-clause | 7,371,574,551,307,887,000 | 40.288312 | 168 | 0.631605 | false | 3.923001 | false | false | false |
soycode/moodrec | moodrun1k/moods.py | 1 | 3691 | import csv
import shelve
import sys
csv.field_size_limit(sys.maxsize)
artistmoods = shelve.open('../artistmoods')
moods = set()
for artist in artistmoods.iterkeys():
artistmood = artistmoods[artist]
for mood in artistmood:
moods.add(mood['name'])
moods = list(moods)
moods.sort()
# Extended from the User cl... | gpl-2.0 | -5,225,232,916,888,518,000 | 28.062992 | 96 | 0.642915 | false | 2.906299 | false | false | false |
amsjavan/nazarkav | nazarkav/webkit2png.py | 1 | 16613 | #
# webkit2png.py
#
# Creates screenshots of webpages using by QtWebkit.
#
# Copyright (c) 2014 Roland Tapken <roland@dau-sicher.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either vers... | mit | -625,004,899,157,084,000 | 38.649165 | 117 | 0.625293 | false | 4.217568 | false | false | false |
tsl143/addons-server | src/olympia/devhub/urls.py | 1 | 9375 | from django.conf.urls import include, url
from django.shortcuts import redirect
from olympia.addons.urls import ADDON_ID
from olympia.amo.decorators import write
from olympia.amo.utils import partial
from olympia.lib.misc.urlconf_decorator import decorate
from . import views
# These will all start with /theme/<slug... | bsd-3-clause | 478,325,609,368,912,600 | 41.22973 | 79 | 0.63936 | false | 3.623889 | false | false | false |
micahflee/onionshare | desktop/src/onionshare/gui_common.py | 1 | 16248 | # -*- coding: utf-8 -*-
"""
OnionShare | https://onionshare.org/
Copyright (C) 2014-2021 Micah Lee, et al. <micah@micahflee.com>
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 t... | gpl-3.0 | 2,617,138,760,176,123,000 | 34.017241 | 87 | 0.44824 | false | 4.403252 | false | false | false |
adapt-sjtu/novelner | tagger/model.py | 1 | 17080 | import os
import re
import numpy as np
import scipy.io
import theano
import theano.tensor as T
import codecs
import cPickle
from utils import shared, set_values, get_name
from nn import HiddenLayer, EmbeddingLayer, DropoutLayer, LSTM, forward
from optimization import Optimization
class Model(object):
"""
Net... | apache-2.0 | 300,547,003,319,218,800 | 35.810345 | 136 | 0.508255 | false | 3.831314 | false | false | false |
TheAlgorithms/Python | graphs/even_tree.py | 1 | 1298 | """
You are given a tree(a simple connected graph with no cycles). The tree has N
nodes numbered from 1 to N and is rooted at node 1.
Find the maximum number of edges you can remove from the tree to get a forest
such that each connected component of the forest contains an even number of
nodes.
Constraints
2 <= 2 <= 1... | mit | 1,298,205,461,650,645,500 | 21 | 85 | 0.581664 | false | 3.253133 | false | false | false |
dudenzz/word_embedding | SimilarityClassification/answerQuestions.py | 1 | 3433 | __author__ = 'Asus'
import sys
import getopt
from QuestionsHandling.QuestionBase import QuestionBase
from Classifiers.GloveCenteredESLExtendedClassifier import GloveClassifier
from Utils.utilities import load_stf
from Utils.retrofitNew_gloveInstance import retrofit_new
from Utils.retrofitNew_gloveInstance im... | mit | 7,637,306,048,456,511,000 | 36.573034 | 158 | 0.615497 | false | 3.723427 | false | false | false |
mgymrek/pybeeswarm | beeswarm/beeswarm.py | 1 | 10563 | """
The MIT License (MIT)
Copyright (c) 2014 Melissa Gymrek <mgymrek@mit.edu>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, ... | mit | 3,856,150,292,374,446,600 | 39.163498 | 126 | 0.584304 | false | 3.456479 | false | false | false |
cwharland/data-science-from-scratch | wwd.py | 1 | 7248 | from __future__ import division
from collections import defaultdict
import math
from sgd import *
from collections import Counter
import random
import matplotlib.pyplot as plt
from probability import *
from stats import *
from functools import partial
def bucketize(point, bucket_size):
return bucket_... | mit | 5,590,543,377,666,559,000 | 30.954545 | 102 | 0.604719 | false | 3.711214 | false | false | false |
smsolivier/VEF | tex/paper/hlimit.py | 1 | 2458 | #!/usr/bin/env python3
import numpy as np
import matplotlib.pyplot as plt
import sys
sys.path.append('../../code')
import ld as LD
from hidespines import *
''' compares difference between Sn and moment equations as cell width --> 0 '''
if (len(sys.argv) > 1):
outfile = sys.argv[1]
else:
outfile = None
de... | mit | 5,748,935,003,737,435,000 | 24.340206 | 83 | 0.615541 | false | 2.206463 | false | false | false |
mfalesni/cfme_tests | cfme/tests/cloud_infra_common/test_power_control_rest.py | 1 | 6593 | # -*- coding: utf-8 -*-
import pytest
from cfme import test_requirements
from cfme.common.provider import BaseProvider
from cfme.common.vm import VM
from cfme.utils.generators import random_vm_name
from cfme.utils.wait import wait_for
from cfme.utils.log import logger
from cfme.cloud.provider.azure import AzureProvide... | gpl-2.0 | -5,090,317,543,301,633,000 | 29.523148 | 98 | 0.652359 | false | 3.374104 | true | false | false |
teddavis4/colette | search.py | 1 | 1090 | #!/usr/bin/env python
"""Colette search."""
from telegram.ext.dispatcher import run_async
from yahoo_finance import Share
from google import google
class Search:
"""Do searches for things (google, stocks, images, etc)."""
def __init__(self, testing=False):
"""Assign variables."""
self.testin... | gpl-3.0 | 2,334,442,321,090,832,400 | 32.030303 | 75 | 0.597248 | false | 3.449367 | false | false | false |
blancltd/blanc-basic-events | blanc_basic_events/migrations/0001_initial.py | 1 | 2350 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import blanc_basic_assets.fields
class Migration(migrations.Migration):
dependencies = [
('assets', '__first__'),
]
operations = [
migrations.CreateModel(
name='Recurring... | bsd-3-clause | -8,498,544,057,141,926,000 | 46.959184 | 223 | 0.555319 | false | 4.101222 | false | false | false |
openregister/schools | application/views.py | 1 | 2272 | import requests
from flask import (
Blueprint,
render_template,
abort,
current_app
)
from application.utils import log_traceback
application = Blueprint('application', __name__)
headers = {'Content-Type': 'application/json'}
def get_address(school):
address = school['entry']['address']
url... | mit | 4,491,672,232,783,377,000 | 28.128205 | 71 | 0.605194 | false | 3.90378 | false | false | false |
ViennaRNA/forgi | examples/graph_to_rosetta_adjacent_stems.py | 1 | 4339 | #!/usr/bin/python
from __future__ import print_function
from builtins import zip
from builtins import range
import sys
import math
import os
import forgi.graph.bulge_graph as cgb
import forgi.utilities.debug as cud
import forgi.utilities.stuff as cus
from optparse import OptionParser
def print_rosetta_constraints(b... | gpl-3.0 | 405,576,846,313,812,400 | 31.140741 | 109 | 0.563494 | false | 3.446386 | false | false | false |
code-iai/semrec | scripts/bstools/Beliefstate Tools/ExperienceProcessor/expproc/Visualization_ui.py | 1 | 4617 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'Processor.ui'
#
# Created: Wed Jul 29 08:15:05 2015
# by: PyQt4 UI code generator 4.10.4
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attr... | bsd-2-clause | -2,965,202,111,415,315,000 | 49.736264 | 103 | 0.727096 | false | 4.148248 | false | false | false |
heniancheng/FRODO | experiments/party_experiment.py | 1 | 4431 | """
FRODO: a FRamework for Open/Distributed Optimization
Copyright (C) 2008-2013 Thomas Leaute, Brammert Ottens & Radoslaw Szymanek
FRODO is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 o... | agpl-3.0 | 6,178,170,138,184,121,000 | 46.645161 | 130 | 0.738885 | false | 2.983838 | false | false | false |
jjdmol/LOFAR | RTCP/Cobalt/GPUProc/test/t_generate_globalfs_locations.py | 1 | 1706 | #!/usr/bin/env python
import unittest
# Be able to find service python file
import sys, os
sys.path.insert(0, "{srcdir}/../src/scripts".format(**os.environ))
import generate_globalfs_locations as ggl
from lofar.parameterset import PyParameterSet
class ReplaceHost(unittest.TestCase):
def test_replace(self):
#... | gpl-3.0 | 7,301,227,709,670,433,000 | 31.188679 | 106 | 0.684642 | false | 3.182836 | true | false | false |
PU-Crypto/RSA | verschlüsseln.py | 1 | 2550 | #Verschlüsselung
import sys
#implemention begin
# source : https://gist.github.com/avalonalex/2122098
def int2baseTwo(x): #ermöglicht rechnung mit sehr großen zahlen bei geringen ressourcen
# x is a positive integer. Convert it to base two as a list of integers in reverse order."""
# repeating x >>= 1 and x ... | lgpl-3.0 | 3,790,945,514,735,416,300 | 38.625 | 181 | 0.689941 | false | 2.565789 | false | false | false |
sergpolly/Thermal_adapt_scripts | BOOTSTRAPS/Equal_Cherry_composition_analysis_Thermo_Rnd.py | 1 | 9800 | import pandas as pd
import os
import subprocess as sub
import re
import sys
from Bio import SeqUtils
import matplotlib.pyplot as plt
import numpy as np
from scipy import stats
path = os.path.join(os.path.expanduser('~'),'GENOMES_BACTER_RELEASE69/genbank')
# ['DbxRefs','Description','FeaturesNum','GenomicID','Genomi... | mit | -8,209,443,349,677,610,000 | 32.333333 | 214 | 0.657653 | false | 2.530992 | false | false | false |
cosven/pat_play | leetcode/011.py | 1 | 2588 | class Solution(object):
def maxArea(self, height):
if len(height) == 2:
return min(height)
lenght = len(height)
f_index = 0
b_index = lenght - 1
max_v = 0
h_list = height
while (f_index < b_index):
value = self.cal_value(f_index, b... | gpl-3.0 | 3,642,773,241,438,115,000 | 25.408163 | 64 | 0.447836 | false | 3.214907 | false | false | false |
marisn/timlab | src/images/management/commands/export_images.py | 1 | 3175 | # -*- coding: utf-8 -*-
import os
from shutil import copy
from random import shuffle
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from projects.models import Project
from images.models import ImageLabel
class Command(BaseCommand):
"""
Usage ex... | gpl-3.0 | -8,213,918,409,897,843,000 | 37.719512 | 101 | 0.56063 | false | 4.034307 | true | false | false |
rahuldave/pycco | pycco/main.py | 1 | 18307 | #!/usr/bin/env python
"""
"**Pycco**" is a Python port of [Docco](http://jashkenas.github.com/docco/):
the original quick-and-dirty, hundred-line-long, literate-programming-style
documentation generator. It produces HTML that displays your comments
alongside your code. Comments are passed through
[Markdown](http://dar... | mit | -2,487,624,696,677,133,000 | 34.896078 | 117 | 0.592943 | false | 4.091864 | false | false | false |
nelsonw2014/watershed | pump_client/__main__.py | 1 | 4777 | #!/usr/bin/env python3
# Copyright (C) 2015 Commerce Technologies, 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 b... | apache-2.0 | -24,517,977,811,975,270 | 41.283186 | 135 | 0.667364 | false | 3.594432 | false | false | false |
saaros/pghoard | pghoard/rohmu/object_storage/base.py | 1 | 2149 | """
rohmu - object_storage.base
Copyright (c) 2016 Ohmu Ltd
See LICENSE for details
"""
from ..errors import StorageError
import logging
class BaseTransfer:
def __init__(self, prefix):
self.log = logging.getLogger(self.__class__.__name__)
if not prefix:
prefix = ""
elif prefix... | apache-2.0 | 8,044,815,886,431,289,000 | 31.560606 | 108 | 0.614239 | false | 4.359026 | false | false | false |
paultag/monomoy | monomoy/utils.py | 1 | 2506 | # Copyright (c) 2012 Paul Tagliamonte <paultag@debian.org>
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modif... | mit | 1,394,074,766,416,802,300 | 34.8 | 78 | 0.678372 | false | 4.169717 | false | false | false |
zachdj/ultimate-tic-tac-toe | scenes/PlayGame.py | 1 | 11800 | import pygame, numpy, threading, timeit
from .SceneBase import SceneBase
from .DrawingUtils import *
from models.game import Game, Board, Move, TimeLimitedBot
from services import ImageService, FontService, SceneManager, SettingsService as Settings
class PlayGame(SceneBase):
"""
This scene shows a graphical re... | mit | -7,724,562,142,268,434,000 | 51.444444 | 148 | 0.591102 | false | 3.581184 | false | false | false |
bczmufrn/frequencia | frequencia/accounts/views.py | 1 | 4409 | from rules.contrib.views import PermissionRequiredMixin, permission_required
from django.urls import reverse
from django.contrib import messages
from django.views.generic import ListView
from django.contrib.auth.models import Group
from django.http import HttpResponseRedirect
from django.views.generic.base import Redi... | mit | -7,101,107,630,930,833,000 | 35.716667 | 125 | 0.765494 | false | 3.14194 | false | false | false |
jeroyang/mcgocr | ncgocr/learning.py | 1 | 5219 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division,
print_function, unicode_literals)
from builtins import *
from collections import OrderedDict, defaultdict, ChainMap
from intervaltree import Interval, IntervalTree
import numpy as np
from txttk.re... | mit | 6,637,057,444,244,941,000 | 32.88961 | 91 | 0.623874 | false | 3.874536 | false | false | false |
i5o/sugar | src/jarabe/controlpanel/gui.py | 1 | 20172 | # Copyright (C) 2008 One Laptop Per Child
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribu... | gpl-2.0 | -3,829,276,548,603,032,600 | 36.217712 | 79 | 0.556712 | false | 4.054673 | false | false | false |
nsauder/treeano | treeano/nodes/theanode.py | 1 | 4947 | """
nodes which behave similar to theano functions
"""
import theano
import theano.tensor as T
from .. import core
from .. import theano_extensions
fX = theano.config.floatX
@core.register_node("sqr")
class SqrNode(core.NodeImpl):
"""
like theano.tensor.sqr
"""
def compute_output(self, network, i... | apache-2.0 | -4,294,153,389,137,453,000 | 23.490099 | 79 | 0.542349 | false | 3.78211 | false | false | false |
DamnWidget/txorm | txorm/test/test_expressions.py | 1 | 99429 |
# Copyright (c) 2014 Oscar Campos <oscar.campos@member.fsf.org>
# See LICENSE for details
"""TxORM Expressions Unit Tests
"""
from __future__ import unicode_literals
from datetime import datetime, date, time, timedelta
from twisted.trial import unittest
from txorm import Undef
from txorm.variable import Variable
... | lgpl-3.0 | -5,808,670,647,757,657,000 | 38.534394 | 79 | 0.630068 | false | 3.96242 | true | false | false |
Sharadh/prog-square | src/so_crawl/crawl.py | 1 | 4884 | from datetime import datetime, timedelta
from io import StringIO
from lxml import etree
import requests
from order.source_handler import check_source
from utils import (
log,
success,
warn
)
from api_utils import (
build_url,
MAX_PAGE_SIZE,
ANSWER_BATCH_SIZE
)
from custom_filters import load_... | mit | -7,150,260,538,557,537,000 | 29.148148 | 91 | 0.582924 | false | 3.986939 | false | false | false |
summychou/GGFilm | WeRoBot/myrobot/views.py | 1 | 12582 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import json
import os
import re
import requests
import urllib
import urllib2
import redis
redis_pool = redis.ConnectionPool(host='localhost', port=6379, db=0)
redis_context = redis.Redis(connection_pool=redis_pool)
from django.conf import settings
from ... | apache-2.0 | 1,657,857,180,738,459,000 | 42.806452 | 152 | 0.570692 | false | 3.467234 | false | false | false |
jcmgray/xyzpy | xyzpy/gen/farming.py | 1 | 30481 | """Objects for labelling and succesively running functions.
"""
import os
import shutil
import functools
import numpy as np
import pandas as pd
import xarray as xr
from .prepare import (
_parse_fn_args,
_parse_var_names,
_parse_var_dims,
_parse_var_coords,
_parse_constants,
_parse_resources,
... | mit | -5,098,163,279,879,569,000 | 33.915235 | 79 | 0.546832 | false | 4.236414 | false | false | false |
mmasaki/trove | trove/tests/unittests/guestagent/test_manager.py | 1 | 21350 | # Copyright 2015 Tesora 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 a... | apache-2.0 | 5,228,886,502,972,602,000 | 43.75891 | 79 | 0.52103 | false | 4.516607 | true | false | false |
hsr-ba-fs15-dat/python-social-auth | setup.py | 1 | 2666 | # -*- coding: utf-8 -*-
"""Setup file for easy installation"""
import sys
import os
from os.path import join, dirname, split
from setuptools import setup
PY3 = sys.version_info[0] == 3
version = __import__('social').__version__
LONG_DESCRIPTION = """
Python Social Auth is an easy to setup social authentication/regi... | bsd-3-clause | 7,865,004,732,053,510,000 | 31.91358 | 79 | 0.612903 | false | 3.824964 | false | false | false |
efiop/dvc | dvc/command/get_url.py | 1 | 1418 | import argparse
import logging
from dvc.exceptions import DvcException
from . import completion
from .base import CmdBaseNoRepo, append_doc_link
logger = logging.getLogger(__name__)
class CmdGetUrl(CmdBaseNoRepo):
def run(self):
from dvc.repo import Repo
try:
Repo.get_url(self.args... | apache-2.0 | -515,336,444,671,809,100 | 27.36 | 79 | 0.606488 | false | 3.761273 | false | false | false |
MollicaF/LogicalWordLearning | Model/Grammar.py | 1 | 9416 | from LOTlib.Grammar import Grammar
from LOTlib.Miscellaneous import q
def makeGrammar(objects, nterms=['Tree', 'Set', 'Gender', 'Generation', 'Ancestry', 'Paternity', 'English'],
terms=['X', 'objects', 'all'], recursive=False, words=None, compositional=True, abstractP=10.0):
"""
Define a unif... | gpl-2.0 | -6,572,479,382,486,136,000 | 40.117904 | 120 | 0.546941 | false | 3.249137 | false | false | false |
61352151511/61352151511.github.io | adcapcalc/parseGameState.py | 1 | 6118 | from decimal import *
import re, sys
parseObj = {}
parsing = 0
planets = ['earth', 'moon', 'mars']
regexObj = {}
def checkLine(line):
checkArr = ['angelAccumulation', 'managers', 'unlocks', 'upgrades', 'venture']
for idx, check in enumerate(checkArr):
if regexObj[check].match(line):
return idx + 1
return 0
de... | gpl-3.0 | -2,889,542,826,086,740,500 | 41.493056 | 209 | 0.634194 | false | 2.916111 | false | false | false |
xia2/xia2 | src/xia2/Modules/Indexer/IndexerSelectImages.py | 1 | 1964 | # Code for the selection of images for autoindexing - selecting lone images
# from a list or wedges from a list, for XDS.
import logging
logger = logging.getLogger("xia2.Modules.Indexer.IndexerSelectImages")
def index_select_images_lone(phi_width, images):
"""Select images close to 0, 45 and 90 degrees from th... | bsd-3-clause | -3,302,935,672,094,419,500 | 27.882353 | 86 | 0.598269 | false | 3.43958 | false | false | false |
mmcdermo/RedLeader | redleader/resources/sqs.py | 1 | 2259 | from redleader.resources import Resource
import redleader.exceptions as exceptions
class SQSQueueResource(Resource):
"""
Resource modeling an S3 Bucket
"""
def __init__(self,
context,
queue_name,
dead_letter_queue=None,
dead_letter_que... | apache-2.0 | -2,137,182,136,920,169,200 | 33.227273 | 91 | 0.547587 | false | 4.286528 | false | false | false |
trmznt/msaf | msaf/lib/fatools/dpalign.py | 1 | 7975 |
import numpy as np
import math
import pprint
# dynamic programming for peak alignment
#
# dp: y -> sizes
# x -> retention_time
#
#
#
def estimate_z( peak_pairs, degree = 3 ):
""" estimate z and rss based on [y, x]
x: rtime
y: ladder sizes
return (z, rss)
z is polynomial coeff... | lgpl-3.0 | 7,945,830,382,347,585,000 | 28.868914 | 90 | 0.501693 | false | 3.47646 | false | false | false |
hasanalom/ggrc-core | src/ggrc/converters/handlers.py | 1 | 26731 | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: miha@reciprocitylabs.com
# Maintained By: miha@reciprocitylabs.com
from dateutil.parser import parse
from flask import current_app
from sqlalchemy ... | apache-2.0 | 3,213,505,808,976,734,000 | 31.244873 | 79 | 0.667353 | false | 3.668817 | false | false | false |
unreal666/outwiker | plugins/markdown/markdown/markdownparser/parser.py | 3 | 1462 | # -*- coding: UTF-8 -*-
from markdown_plugin_libs.markdown import markdown
from markdown_plugin_libs.markdown.extensions.fenced_code import FencedCodeExtension
from markdown_plugin_libs.markdown.extensions.codehilite import CodeHiliteExtension
from markdown_plugin_libs.markdown.extensions.tables import TableExtension
... | gpl-3.0 | 2,803,704,157,343,723,500 | 29.458333 | 90 | 0.624487 | false | 3.565854 | false | false | false |
ai-se/XTREE | src/Planners/XTREE/Planner/CROSSTREES.py | 1 | 8040 | #! /Users/rkrsn/anaconda/bin/python
from __future__ import print_function
from __future__ import division
from pdb import set_trace
from os import environ, getcwd
from os import walk
from os import remove as rm
from os.path import expanduser
from pdb import set_trace
import sys
# Update PYTHONPATH
HOME = expanduser('... | mit | -8,677,514,913,918,994,000 | 26.070707 | 80 | 0.569403 | false | 3.164109 | true | false | false |
jmakov/ggrc-core | test/selenium/src/lib/constants/element.py | 1 | 1929 | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: jernej@reciprocitylabs.com
# Maintained By: jernej@reciprocitylabs.com
class LandingPage(object):
BUTTON_LOGIN = "Login"
PROGRAM_INFO_TAB = "P... | apache-2.0 | -8,647,108,671,316,192,000 | 24.72 | 78 | 0.697771 | false | 3.014063 | false | false | false |
annayqho/TheCannon | code/apokasc_lamost/kepler_apogee_lamost_overlap.py | 1 | 2584 | import numpy as np
import os
# APOGEE-APOKASC overlap
inputf = "/home/annaho/TheCannon/examples/example_apokasc/apokasc_DR12_overlap.npz"
apogee_apokasc = np.load(inputf)['arr_0']
# APOGEE-LAMOST overlap
inputf = "/home/annaho/TheCannon/examples/example_DR12/Data"
apogee_lamost = np.array(os.listdir(inputf))
# APO... | mit | -5,554,236,728,631,260,000 | 30.901235 | 104 | 0.683824 | false | 2.27866 | false | false | false |
lynnlyc/for-honeynet-reviewers | dsfsSensorOpt/SensorOpt/androguard/core/bytecode.py | 1 | 11955 | # This file is part of Androguard.
#
# Copyright (C) 2012, Anthony Desnos <desnos at t0t0.fr>
# All rights reserved.
#
# Androguard 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 th... | gpl-3.0 | 4,943,805,858,265,732,000 | 27.198113 | 149 | 0.538101 | false | 3.390528 | false | false | false |
miurahr/symposion | symposion/speakers/views.py | 1 | 4354 | from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.http import Http404
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models im... | bsd-3-clause | -4,971,493,190,427,245,000 | 30.550725 | 81 | 0.625632 | false | 4.146667 | false | false | false |
retspen/virtmgr | vnc/views.py | 1 | 2640 | import libvirt
from django.shortcuts import render_to_response
from django.http import Http404, HttpResponse, HttpResponseRedirect
import virtinst.util as util
from virtmgr.model.models import *
def vm_conn(host_ip, creds):
try:
flags = [libvirt.VIR_CRED_AUTHNAME, libvirt.VIR_CRED_PASSPHRASE]
auth = [fl... | apache-2.0 | 2,855,562,974,099,879,400 | 29.344828 | 71 | 0.601515 | false | 3.798561 | false | false | false |
google/deepvariant | third_party/nucleus/io/genomics_writer.py | 1 | 6832 | # Copyright 2018 Google LLC.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright notice,
# this list of conditions and the following disclaimer.
#
#... | bsd-3-clause | -5,658,295,128,517,875,000 | 33.505051 | 80 | 0.717652 | false | 4.081243 | false | false | false |
mpsonic/MarchMadnessRandomForest | model.py | 1 | 5595 | from loadTeamData import loadTeamData, loadReverseTeamLookup
from loadTourneyData import loadTourneyData
from loadRatingData import loadRatingData
from sklearn.ensemble import RandomForestClassifier
from sklearn.externals import joblib
from sklearn.model_selection import train_test_split
import random
import ast
import... | mit | 3,861,227,702,344,453,000 | 37.586207 | 84 | 0.62109 | false | 3.73 | false | false | false |
blade2005/dosage | dosagelib/plugins/arcamax.py | 1 | 6490 | # -*- coding: utf-8 -*-
# Copyright (C) 2004-2005 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2016 Tobias Gruetzmacher
from __future__ import absolute_import, division, print_function
from ..scraper import _ParserScraper
class Arcamax(_ParserScraper):
... | mit | -3,171,981,798,737,173,500 | 52.196721 | 93 | 0.638367 | false | 3.421191 | false | false | false |
sigdotcom/acm.mst.edu | ACM_General/sigs/migrations/0001_initial.py | 1 | 1690 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.7 on 2017-11-03 03:24
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import sigs.managers
class Migration(migrations.Migration):
initial = True
dependencies... | gpl-3.0 | 4,508,287,121,375,954,400 | 48.705882 | 218 | 0.650888 | false | 4.033413 | false | false | false |
dyermd/legos | scripts/QC/Backup/QC_sample_backup.py | 1 | 11795 | #! /usr/bin/env python
from optparse import OptionParser
import os
import os.path
import sys
import re
import json
from alignment_stats import Align_Stats
class QC_Sample:
def __init__(self, options):
self.options = options
self.sample_json = json.load(open(options.json))
self.__softwareDirectory = "/rawdata/l... | gpl-2.0 | -492,979,214,955,907,140 | 45.074219 | 278 | 0.661721 | false | 2.886686 | false | false | false |
GammaC0de/pyload | src/pyload/plugins/downloaders/RapidgatorNet.py | 1 | 7100 | # -*- coding: utf-8 -*-
import json
import re
from datetime import timedelta
import pycurl
from pyload.core.network.http.exceptions import BadHeader
from pyload.core.utils import seconds
from ..anticaptchas.ReCaptcha import ReCaptcha
from ..anticaptchas.SolveMedia import SolveMedia
from ..base.simple_downloader impor... | agpl-3.0 | 4,630,701,275,883,222,000 | 33.299517 | 102 | 0.567465 | false | 3.534097 | false | false | false |
sernst/Trackway-Gait-Analysis | tracksim/coupling/__init__.py | 1 | 2390 | import math
import numpy as np
import measurement_stats as mstats
import functools
import pandas as pd
def compute_fitness_rankings(df):
"""
:param df:
:return:
"""
fitness_values = []
for index, row in df.iterrows():
fitness_values.append(
compute_fitness(row['swing'], r... | mit | -1,998,226,616,701,985,500 | 21.980769 | 74 | 0.587448 | false | 3.483965 | false | false | false |
etkirsch/gmusic | gmusic/core/StateManager.py | 1 | 4637 | from gmusic.model.MenuElement import MenuElement
from gmusic.model.State import State
from gmusic.model.commands import *
class StateManager(object):
'''Handles a bulk majority of state-based logic in the UI.'''
def __init__(self):
self.state = ""
self.title = ""
self.subtitle = ""
... | gpl-2.0 | 4,856,244,833,451,204,000 | 35.511811 | 132 | 0.599741 | false | 3.890101 | false | false | false |
lamby/pkg-reinteract | lib/reinteract/shell_view.py | 1 | 29573 | # Copyright 2007-2009 Owen Taylor
#
# This file is part of Reinteract and distributed under the terms
# of the BSD license. See the file COPYING in the Reinteract
# distribution for full details.
#
########################################################################
import gobject
import gtk
import re
from shell_b... | bsd-2-clause | -5,751,253,502,139,091,000 | 38.378162 | 123 | 0.569269 | false | 3.796765 | false | false | false |
borkit/scriptdump | AWS/lambda_python/delete-rds.py | 1 | 1210 | # coding: utf-8
# RDS delete
import boto3
# nodelete,trueを変数化
ND = 'nodelete'
TR = 'true'
#def lambda_handler(event, context):
if __name__ == '__main__':
client = boto3.client('rds', "ap-northeast-1")
resp = client.describe_db_instances()
all_list = []
del_list = []
for rds in resp... | mit | -1,630,935,105,991,957,500 | 25.534884 | 98 | 0.558277 | false | 3.451895 | false | false | false |
karrtikr/ete | ete3/phylomedb/phylomeDB3.py | 1 | 61032 | # #START_LICENSE###########################################################
#
#
# This file is part of the Environment for Tree Exploration program
# (ETE). http://etetoolkit.org
#
# ETE is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the... | gpl-3.0 | -690,950,755,839,951,200 | 39.499005 | 117 | 0.63316 | false | 3.413423 | false | false | false |
paepcke/json_to_relation | json_to_relation/ipToCountry.py | 1 | 9520 | # Copyright (c) 2014, Stanford University
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the ... | bsd-3-clause | -6,915,075,060,546,008,000 | 48.588542 | 757 | 0.627206 | false | 4.135534 | false | false | false |
xianjunzhengbackup/code | http/REST/Building-RESTful-Python-Web-Services-master/Chapter 4/restful_python_chapter_04_01/gamesapi/gamesapi/settings.py | 1 | 4028 | """
Book: Building RESTful Python Web Services
Chapter 4: Throttling, Filtering, Testing and Deploying an API with Django
Author: Gaston C. Hillar - Twitter.com/gastonhillar
Publisher: Packt Publishing Ltd. - http://www.packtpub.com
"""
"""
Django settings for gamesapi project.
Generated by 'django-admin startproject'... | mit | -3,196,714,163,656,158,700 | 26.033557 | 91 | 0.683466 | false | 3.505657 | false | false | false |
elbaschid/will-iam | setup.py | 1 | 1613 | # -*- coding: utf-8 -*-
import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
requires = ['click', 'boto3', 'six']
tests_require = ['pytest', 'pytest-cache', 'pytest-cov']
dev_require = ['tox', 'bumpversion', 'twine']
class PyTest(TestCommand):
def finalize_options(self... | mit | 59,345,356,588,156,136 | 31.26 | 71 | 0.608803 | false | 3.915049 | true | false | false |
sjdines/mezzanine-fluent-pages | mezzanine_fluent_pages/mezzanine_layout_page/forms.py | 1 | 2116 | import os
from django import forms
from . import appsettings
class TemplateFilePathFieldForm(forms.FilePathField):
"""
The associated formfield to select a template path.
This was adapted from `fluent_pages/forms/fields.py` in the
`django-fluent-pages` app.
"""
def __init__(self, *args, **kw... | bsd-2-clause | -5,282,804,800,749,601,000 | 36.122807 | 95 | 0.60775 | false | 4.371901 | false | false | false |
nzinov/maze | reader.py | 1 | 2456 | from collections import defaultdict
from squares import *
from effects import *
from objects import *
from custom import *
from game import Subfield, Field
from position import Position
import io
LEFT = (0, -1)
RIGHT = (0, 1)
UP = (-1, 0)
DOWN = (1, 0)
def read_field(fname):
# solution from http://stackoverflow.c... | gpl-3.0 | 379,095,149,324,863,500 | 34.085714 | 103 | 0.539902 | false | 3.715582 | false | false | false |
JustusSchwan/MasterThesis | trash/generate_raw_features.py | 1 | 5184 | import cPickle
import csv
import math
import cv2
import numpy as np
import expressivity
import face_extractor
import filter
from trash import utility_positional
def draw_face(image, pts, color, thickness=1):
open_ranges = [[0, 17], [17, 22], [22, 27], [27, 31], [31, 36]]
closed_ranges = [[36, 42], [42, 48],... | mit | -1,363,165,421,150,685,400 | 35 | 120 | 0.546489 | false | 2.998265 | false | false | false |
datastore/datastore.objects | setup.py | 1 | 1141 | #!/usr/bin/env python
import re
from setuptools import setup, find_packages
pkgname = 'datastore.objects'
# gather the package information
main_py = open('datastore/objects/__init__.py').read()
metadata = dict(re.findall("__([a-z]+)__ = '([^']+)'", main_py))
packages = filter(lambda p: p.startswith('datastore'), fin... | mit | 5,340,465,337,564,310,000 | 23.804348 | 71 | 0.676599 | false | 3.576803 | false | false | false |
KDE/ginkgo | src/ginkgo/views/suggestionview.py | 1 | 6713 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
## This file may be used under the terms of the GNU General Public
## License version 2.0 as published by the Free Software Foundation
## and appearing in the file LICENSE included in the packaging of
## this file.
##
## This file is provided AS IS with NO WARRANTY OF ANY... | gpl-2.0 | 5,829,266,013,391,520,000 | 36.502793 | 135 | 0.661999 | false | 4.058646 | false | false | false |
raymondberg/btray | btray/models/user.py | 1 | 1158 | from btray import db
from btray.models.webhook_config import WebhookConfig
class User(db.Model):
user_id = db.Column(db.Integer, primary_key=True)
username = db.Column(db.String(80), unique=True)
email = db.Column(db.String(120), unique=True)
password = db.Column(db.PasswordType(schemes=['pbkdf2_sha512... | mit | 2,336,528,430,703,117,300 | 25.930233 | 84 | 0.630397 | false | 3.747573 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.