repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
hideshis/scripts_for_research | FOSE2016/pom_edit/old/pom_editor.py | 1 | 7097 | # -*- coding: utf-8 -*-
import subprocess
import sys
import os
def hoge(pom):
try:
result = subprocess.check_output('grep -n "<build>" ' + pom, shell=True)
build_begin_lineNo = int(result.split(':')[0]) # <build> exists in pom.xml
result = subprocess.check_output('grep -n "</build>" ' + pom... | mit | 2,678,834,349,042,678,000 | 47.880282 | 122 | 0.603083 | false | 3.626437 | false | false | false |
henaras/sahara | sahara/plugins/mapr/abstract/cluster_context.py | 12 | 3283 | # Copyright (c) 2015, MapR Technologies
#
# 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 | 607,902,848,491,502,600 | 19.910828 | 75 | 0.657326 | false | 4.12956 | false | false | false |
SoftwareKing/zstack-woodpecker | dailytest/zstest.py | 2 | 31288 | #!/usr/bin/python
'''
ZStack integration automation test tool. It includes building, deployment and
test.
The complexity test combination is recommmended to manually edit test case
config file, like zstack-woodpecker/integrationtest/vm/basic/integration.xml
and run it by `zstack-woodpecker -f integration.xml`.
Au... | apache-2.0 | 9,190,242,515,148,692,000 | 41.281081 | 424 | 0.577442 | false | 3.690928 | true | false | false |
orther/Bunk | models/user.py | 1 | 2418 | # This file is part of Bunk.
# Copyright (c) 2011 Brandon Orther. All rights reserved.
#
# The full license is available in the LICENSE file that was distributed with this source code.
from hashlib import md5
from elements.model.database import DatabaseModel
from elements.model.model import Boolean
from elements.m... | bsd-3-clause | 660,725,204,819,804,700 | 31.24 | 183 | 0.538048 | false | 4.52809 | false | false | false |
bradyemerson/plugin.video.encoreplay | resources/lib/xbmclibrary.py | 2 | 10840 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
import sys
import string
import xbmc
import xbmcgui
import resources.lib.common as common
import database_tv as tv_db
import database_common as db_common
from bs4 import BeautifulSoup
pluginhandle = common.pluginHandle
if common.get_setting('libraryfolder... | apache-2.0 | -7,618,566,705,437,702,000 | 36.508651 | 148 | 0.554889 | false | 3.519481 | false | false | false |
onepercentclub/onepercentclub-site | apps/tasks/migrations/0001_initial.py | 1 | 17297 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Task'
db.create_table(u'tasks_task', (
(u'id'... | bsd-3-clause | 1,792,101,280,735,727,400 | 79.451163 | 187 | 0.555703 | false | 3.62165 | false | false | false |
diefenbach/lfc-blog | lfc_blog/views.py | 1 | 2192 | # python imports
import datetime
# django imports
from django.conf import settings
from django.http import Http404
from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils import translation
from django.utils.translation import ugettext_lazy as _
# tagging imports
f... | bsd-3-clause | 6,960,989,763,451,120,000 | 30.782609 | 127 | 0.667883 | false | 3.805556 | false | false | false |
turdusmerula/kipartman | kipartman/swagger_client/models/part_attachement.py | 1 | 5018 | # coding: utf-8
"""
Kipartman
Kipartman api specifications
OpenAPI spec version: 1.0.0
Contact: --
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
class PartAttachement(object):
"""
NOTE: This class is... | gpl-3.0 | -4,720,342,873,720,506,000 | 23.841584 | 87 | 0.536867 | false | 4.245347 | false | false | false |
CivilizationAlpha/CyberFarming | featurematching.py | 1 | 1672 | # multivariate lineair regression on the plantlet features
import numpy as np
import pandas as pd
import csv
if __name__ == '__main__':
path = './output/saliency3/extfeat2/features_plant0.csv'
features = pd.DataFrame(pd.read_csv(path, sep=','))
correlations = features.corr()
print corre... | gpl-2.0 | 3,065,550,958,592,509,400 | 20.714286 | 88 | 0.610048 | false | 3.557447 | false | false | false |
murat1985/bagpipe-bgp | bagpipe/bgp/common/run_command.py | 2 | 2671 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# encoding: utf-8
# Copyright 2014 Orange
#
# 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
#
# Un... | apache-2.0 | 2,027,988,980,328,372,200 | 36.619718 | 78 | 0.620741 | false | 4.542517 | false | false | false |
EclipseXuLu/DataHouse | DataHouse/crawler/news/msina_news_crawler.py | 1 | 4542 | """
a spider for sina news of mobile H5 version
"""
import json
import os
import time
import urllib.parse
import chardet
import requests
from bs4 import BeautifulSoup
class MSina:
def __init__(self, date, source, title, article):
self.date = date
self.source = source
self.title = title
... | mit | -6,902,625,128,405,923,000 | 35.370968 | 158 | 0.532151 | false | 3.445378 | false | false | false |
heyglen/netobj | nettool/layer/transport_layer.py | 1 | 2136 | # -*- coding: utf-8 -*-
from nettool.address.transport_group import TransportGroup
from nettool.utilities import raise_type_exception
class TransportLayer(object):
def __init__(self, name=None, source=None, destination=None):
self.name = name
self.source = source
self.destination = desti... | mit | 6,683,299,987,061,751,000 | 31.861538 | 80 | 0.582865 | false | 4.359184 | false | false | false |
dalejung/trtools | trtools/core/tests/test_dataset.py | 1 | 1419 | from unittest import TestCase
import collections
import pandas as pd
import numpy as np
import trtools.tools.composition as composition
import trtools.core.dataset as dataset
import imp
imp.reload(dataset)
ind = pd.date_range(start="1/1/2000", freq="D", periods=100)
df = pd.DataFrame({'test':np.arange(len(ind))}, ... | mit | -8,922,793,887,780,722,000 | 26.288462 | 116 | 0.515856 | false | 3.744063 | true | false | false |
therewillbecode/ichnaea | ichnaea/api/submit/tests/base.py | 1 | 7282 | import mock
from redis import RedisError
from simplejson import dumps
from ichnaea.api.exceptions import (
ParseError,
ServiceUnavailable,
)
from ichnaea.models import Radio
from ichnaea import util
class BaseSubmitTest(object):
url = None
metric_path = None
metric_type = 'submit'
status = N... | apache-2.0 | 1,496,656,933,461,937,700 | 37.529101 | 79 | 0.596402 | false | 3.524685 | true | false | false |
Braedon/prometheus-es-exporter | tests/test_parser.py | 1 | 28668 | import unittest
from prometheus_es_exporter.parser import parse_response
from tests.utils import convert_result
# Sample responses generated by running the provided queries on a Elasticsearch
# server populated with the following data (http command = Httpie utility):
# > http -v POST localhost:9200/foo/bar/1 val:=1 ... | mit | -1,207,058,714,908,765,700 | 31.32018 | 90 | 0.316625 | false | 4.2629 | true | false | false |
muraliselva10/cloudkitty | cloudkitty/collector/gnocchi.py | 1 | 10098 | # -*- coding: utf-8 -*-
# Copyright 2015 Objectif Libre
#
# 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 ... | apache-2.0 | 576,834,610,461,637,800 | 35.854015 | 79 | 0.536938 | false | 4.330189 | false | false | false |
alissonpintor/stoky | app/tributacao/views.py | 1 | 15982 | from app import app, db, compras_permission
from flask import render_template, abort, make_response, session
from flask import request, redirect, url_for, flash
from flask_login import login_required, current_user
from wtforms import SelectMultipleField
from dateutil.parser import parse
from flask_weasyprint import HTM... | gpl-3.0 | 5,364,152,837,996,140,000 | 32.105809 | 152 | 0.600551 | false | 3.147337 | false | false | false |
GeomaticsResearch/lightningtrace | lightningtrace/utils.py | 1 | 3397 | import numpy as np
from lightningtrace.transformations import world_to_pixel_coords
def seq(start, stop, step=1):
"""Generate a list of values between start and stop every step
:param start: The starting value
:param stop: The ending values
:param step: The step size
:return: List of steps
"""... | mit | 2,635,602,105,180,606,000 | 35.138298 | 120 | 0.589638 | false | 3.427851 | false | false | false |
deprofundis/deprofundis | data/gameoflife/generator.py | 1 | 4170 | import numpy as np
import Tkinter
class Generator(object):
def __init__(self, rows=20, cols=20):
self.cols = cols
self.rows = rows
self.board = None
def seed(self, offset=0):
"""
Initializes a board
@param row_num: Number of rows
@param col_num: Number... | mit | -5,009,641,991,880,065,000 | 34.05042 | 117 | 0.575779 | false | 4.052478 | false | false | false |
IntelLabs/numba | numba/cpython/unicode_support.py | 5 | 27321 | """
This module contains support functions for more advanced unicode operations.
This is not a public API and is for Numba internal use only. Most of the
functions are relatively straightforward translations of the functions with the
same name in CPython.
"""
from collections import namedtuple
from enum import IntEnum
... | bsd-2-clause | 7,281,927,964,911,418,000 | 34.760471 | 136 | 0.630431 | false | 2.369558 | false | false | false |
The-Art-of-Big-Social-Data/OCDF | see.py | 1 | 1423 | import gzip
import json
import operator
def parse(filename):
f = gzip.open(filename, 'r')
entry = {}
for l in f:
l = l.strip()
colonPos = l.find(':')
if colonPos == -1:
yield entry
entry = {}
continue
eName = l[:colonPos]
rest = l[colonPos+2:]
entry[eName] = rest
yield... | mit | -4,157,189,552,571,146,000 | 16.144578 | 59 | 0.54111 | false | 2.934021 | false | false | false |
pynamodb/PynamoDB | tests/integration/test_transaction_integration.py | 2 | 12421 | import uuid
from datetime import datetime
import pytest
from pynamodb.connection import Connection
from pynamodb.exceptions import DoesNotExist, TransactWriteError, TransactGetError, InvalidStateError
from pynamodb.attributes import (
NumberAttribute, UnicodeAttribute, UTCDateTimeAttribute, BooleanAttribute, Ve... | mit | -4,159,655,576,692,380,700 | 32.21123 | 112 | 0.687545 | false | 3.785736 | true | false | false |
smaccm/camkes-tool | camkes/stubgen/Simplify.py | 2 | 1889 | #
# Copyright 2014, NICTA
#
# This software may be distributed and modified according to the terms of
# the BSD 2-Clause license. Note that NO WARRANTY is provided.
# See "LICENSE_BSD2.txt" for details.
#
# @TAG(NICTA_BSD)
#
'''Functions relating to collapsing a CAmkES AST procedure into a simpler type.
The purpose of... | bsd-2-clause | 8,312,658,061,233,267,000 | 31.016949 | 79 | 0.68343 | false | 3.862986 | false | false | false |
brendanator/atari-rl | util/summary.py | 1 | 1381 | import tensorflow as tf
class Summary(object):
def __init__(self, config):
self.summary_writer = tf.summary.FileWriter(config.run_dir)
self.summary_step_period = config.summary_step_period
def run_summary(self, step):
return step % self.summary_step_period == 0
def epsilon(self, step, epsilon):
... | mit | -3,610,861,048,282,040,300 | 32.682927 | 68 | 0.685735 | false | 3.44389 | false | false | false |
wathen/PhD | MHD/FEniCS/MHD/CG/PicardIter_Direct/DecoupleTest/KappaChange/tests/CD.py | 1 | 12405 | #!/usr/bin/python
# interpolate scalar gradient onto nedelec space
from dolfin import *
import petsc4py
import sys
petsc4py.init(sys.argv)
from petsc4py import PETSc
Print = PETSc.Sys.Print
# from MatrixOperations import *
import numpy as np
#import matplotlib.pylab as plt
import PETScIO as IO
import common
import ... | mit | 429,748,662,305,955,840 | 30.0125 | 187 | 0.572108 | false | 2.656886 | false | false | false |
OpenSoccerManager/opensoccermanager | structures/teamtraining.py | 1 | 3900 | #!/usr/bin/env python3
# This file is part of OpenSoccerManager.
#
# OpenSoccerManager is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by the
# Free Software Foundation, either version 3 of the License, or (at your
# option) any later ver... | gpl-3.0 | 9,048,986,866,792,807,000 | 27.676471 | 79 | 0.575897 | false | 4.144527 | false | false | false |
phe-bioinformatics/snapperdb | snapperdb/snpdb/snpdb.py | 1 | 74651 | __author__ = 'gidis'
from datetime import datetime
import errno
import glob
import os
import math
import subprocess
import json
import sys
import re
from Bio import SeqIO
import psycopg2
import psycopg2.extras
import logging
from variant import Variant
import snapperdb
from copy import deepcopy
class Igpos:
def _... | gpl-3.0 | 8,827,059,509,693,924,000 | 47.22416 | 328 | 0.468045 | false | 4.018031 | false | false | false |
eladnoor/equilibrator-api | equilibrator_api/thermo_models.py | 1 | 15080 | import logging
import numpy as np
import pulp
from equilibrator_api import settings
from equilibrator_api.bounds import Bounds
class MDFResult(object):
def __init__(self, model, mdf,
concentrations, dG0_r_cov_eigen,
reaction_prices, compound_prices,
min_total_dG... | mit | -3,917,633,500,300,190,700 | 38.067358 | 97 | 0.553316 | false | 3.342199 | false | false | false |
HeinleinSupport/check_mk | apachecount/web/plugins/wato/check_parameters_apachecount.py | 1 | 1621 | #!/usr/bin/env python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
def apachecount_parameters(title, unit = "requests per second"):
return Levels(
title = title,
unit = unit,
default_difference = (2.0, 4.0),
default_levels = (5.0, 10.0),
)
register_check_parameters(
s... | gpl-2.0 | -2,195,967,846,408,203,300 | 35.75 | 233 | 0.478046 | false | 4.72807 | false | false | false |
salguarnieri/intellij-community | python/lib/Lib/random.py | 86 | 30486 | """Random variable generators.
integers
--------
uniform within range
sequences
---------
pick random element
pick random sample
generate random permutation
distributions on the real line:
------------------------------
uniform
... | apache-2.0 | -5,212,954,140,772,699,000 | 34.366589 | 96 | 0.555271 | false | 3.937234 | true | false | false |
SgnJp/SMAC3 | smac/utils/io/traj_logging.py | 1 | 4730 | __author__ = "Marius Lindauer"
__copyright__ = "Copyright 2016, ML4AAD"
__license__ = "3-clause BSD"
__maintainer__ = "Marius Lindauer"
__email__ = "lindauer@cs.uni-freiburg.de"
__version__ = "0.0.1"
import os
import logging
import json
class TrajLogger(object):
"""
writes trajectory logs files
... | bsd-3-clause | 6,164,007,489,255,642,000 | 30.959459 | 160 | 0.505497 | false | 4.145486 | true | false | false |
michaellaier/pymor | src/pymor/discretizations/basic.py | 1 | 16347 | # -*- coding: utf-8 -*-
# This file is part of the pyMOR project (http://www.pymor.org).
# Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler
# License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause)
from __future__ import absolute_import, division, print_function
from itertools import ch... | bsd-2-clause | 6,974,111,575,986,127,000 | 43.879121 | 117 | 0.632713 | false | 4.219008 | false | false | false |
QasimK/mal-scraper | src/mal_scraper/consts.py | 1 | 3731 | """All constants/enumerations are available directly from `mal_scraper.x`"""
from collections import namedtuple
from enum import Enum, unique
Retrieved = namedtuple('Retrieved', ['meta', 'data'])
"""When successfully retrieving from a web-page
.. py:attribute:: meta
A dict of metadata::
{
'... | mit | -4,276,475,426,759,896,600 | 27.052632 | 81 | 0.571965 | false | 3.235906 | false | false | false |
jcajka/package-overview | statusweb.py | 1 | 21454 | #!/usr/bin/python
# statusweb: package overview web app
# Copyright (C) 2015 Red Hat, Inc.
# SPDX-License-Identifier: GPL-2.0
#
# Authors:
# Jakub Cajka <jcajka@redhat.com>
from packagestatus import get_packageoverview, get_tagsoverview, get_tagoverview
from packagestatus import validtagname, get_distance, ... | gpl-2.0 | -7,466,896,051,083,316,000 | 32.469579 | 123 | 0.506106 | false | 4.099752 | true | false | false |
raqqun/tweetcommander | oauth.py | 1 | 2900 | # -*- coding: utf-8 -*-
import dbm
from urlparse import parse_qs
from user_credentials_dbm import dbm_create, dbm_fetch
from packages.clint import resources
from packages import requests
from packages.requests_oauthlib import OAuth1
# these are the client key and secret needed
# for oauth authentication with the tw... | gpl-3.0 | 179,775,387,913,359,840 | 27.94 | 77 | 0.663787 | false | 3.640252 | false | false | false |
TeamSpen210/srctools | srctools/fgd.py | 1 | 84827 | """Parse FGD files, used to describe Hammer entities."""
import itertools
from copy import deepcopy
from collections import defaultdict
from enum import Enum
from pathlib import PurePosixPath
from struct import Struct
import io
import math
from typing import (
Optional, Union, overload, cast,
TypeVar, Callabl... | unlicense | 3,309,817,016,478,152,700 | 35.516143 | 120 | 0.516946 | false | 4.214797 | false | false | false |
MLTSHP/mltshp | handlers/api.py | 1 | 23164 | from datetime import datetime
import time
from urllib import urlencode
from urlparse import urlparse, urlunparse, urljoin
from hashlib import sha1
import hmac
import base64
import functools
import tornado.web
from tornado.options import define, options
from base import BaseHandler
from lib.utilities import normalize_... | mpl-2.0 | 241,836,939,710,974,240 | 36.421648 | 142 | 0.574296 | false | 3.927433 | false | false | false |
DREAM-ODA-OS/tools | metadata/eop_add_footprint.py | 1 | 4626 | #!/usr/bin/env python
#------------------------------------------------------------------------------
#
# add/rewrite EOP footprint
#
# Project: XML Metadata Handling
# Authors: Martin Paces <martin.paces@eox.at>
#
#-------------------------------------------------------------------------------
# Copyright (C) 2014 E... | mit | 5,265,093,938,652,069,000 | 33.522388 | 90 | 0.611327 | false | 3.694888 | false | false | false |
randomknowledge/django-webvideo | django_webvideo/constants.py | 1 | 1548 | # coding: utf-8
from django.utils.translation import ugettext_lazy as _
VIDEO_STATE_PENDING = 0
VIDEO_STATE_INPROGRESS = 1
VIDEO_STATE_ERROR = 2
VIDEO_STATE_SUCCESS = 3
VIDEO_QUALITY_HIGH = 'high'
VIDEO_QUALITY_SEMIHIGH = 'semi-high'
VIDEO_QUALITY_MEDIUM = 'medium'
VIDEO_QUALITY_LOW = 'low'
VIDEO_STATES = {
VIDE... | mit | -2,878,682,296,314,469,000 | 23.983871 | 105 | 0.653101 | false | 2.529412 | false | false | false |
r9y9/stav | pystav/gmmmap.py | 1 | 10875 | #!/usr/bin/python
# coding: utf-8
import numpy as np
from numpy import linalg
from sklearn.mixture import GMM
import scipy.linalg
import scipy.sparse
import scipy.sparse.linalg
class GMMMap:
"""GMM-based frame-by-frame speech parameter mapping.
GMMMap represents a class to transform spectral features of a ... | mit | 3,187,730,471,217,874,400 | 31.954545 | 84 | 0.564506 | false | 3.577303 | false | false | false |
liangjz92/deeplearning4chatbot | seqs2seq/tf-tests/ecd_rnn_test.py | 1 | 1606 | #coding=utf-8
import tensorflow as tf
import numpy as np
if __name__ == '__main__':
memory_size = 100 #LSTM Cell维度
vocab_size = 10000 #字典中包含多少单词
embedding_size = 300 #词向量长度
dialog_data = []
for i in range(50):
dialog_data.append(tf.placeholder(tf.float32,[None,None,1]))
dialog_mark=tf.placeholder(tf.float32,[... | gpl-3.0 | 4,193,600,918,930,920,000 | 34.545455 | 118 | 0.69821 | false | 2.572368 | false | false | false |
biophil/pocket | util/confirmation.py | 1 | 6926 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 11 19:33:01 2017
@author: pnbrown
"""
import steem as st
import util.validators as val # NOTE: shouldn't import val. Make a helpers module
import util.constants as const
from steembase.exceptions import PostDoesNotExist, RPCError, InsufficientAuthor... | mit | -1,911,291,733,564,563,000 | 39.988166 | 102 | 0.534075 | false | 4.422733 | false | false | false |
neiljdo/readysaster-icannhas-web | readysaster-icannhas-web/hazard/utils.py | 1 | 2477 | import json
import urllib
import urllib2
from django.core.files import File
from django.conf import settings
from django.contrib.gis.geos import Point
from .models import FloodMap, ReturnPeriod
def get_geoserver_baseurl():
'''
Just input the layer name, height, width and boundarybox
'''
url = settin... | bsd-3-clause | 911,509,932,831,364,100 | 30.35443 | 101 | 0.5761 | false | 3.793262 | false | false | false |
dedeler/imdb-data-parser | idp/parser/parsinghelper.py | 1 | 2467 | """
This file is part of imdb-data-parser.
imdb-data-parser is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
imdb-data-parser is distributed... | gpl-3.0 | -8,641,873,809,963,604,000 | 32.337838 | 106 | 0.608026 | false | 4.160202 | false | false | false |
cmsdaq/hltd | lib/python-prctl/prctl.py | 3 | 6843 | # python-pctrl -- python interface to the prctl function
# (c)2010 Dennis Kaarsemaker <dennis@kaarsemaker.net
# See COPYING for licensing details
import _prctl # The C interface
import sys
# Python 3.x compatibility
if sys.version_info[0] >= 3:
basestring = str
# Code generation functions
def prctl_wrapper(optio... | lgpl-3.0 | 2,963,319,798,985,987,600 | 35.989189 | 98 | 0.592576 | false | 3.271033 | false | false | false |
YuepengGuo/backtrader | backtrader/indicators/deviation.py | 4 | 3186 | #!/usr/bin/env python
# -*- coding: utf-8; py-indent-offset:4 -*-
###############################################################################
#
# Copyright (C) 2015 Daniel Rodriguez
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | -2,064,817,195,565,510,700 | 31.510204 | 79 | 0.605775 | false | 3.788347 | false | false | false |
OneDrive/onedrive-sdk-python | src/python3/request/item_delta_collection.py | 2 | 2730 | # -*- coding: utf-8 -*-
'''
# Copyright (c) 2015 Microsoft Corporation
#
# 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 us... | mit | 2,306,232,592,487,825,400 | 46.086207 | 112 | 0.671795 | false | 4.542429 | false | false | false |
brwnj/repertoire | repertoire/filter_pairs.py | 1 | 1800 | #!/usr/bin/env python
# encoding: utf-8
"""
Remove reads from R1 and R2 that are missing a mate. Writes output in same order
for each file.
"""
import sys
import gzip
import os.path as op
from parsers import read_fastx
from toolshed import nopen
def fq_to_set(fq):
fq_l = []
fq_d = {}
with nopen(fq) as fh:
... | mit | 5,844,778,167,342,539,000 | 31.745455 | 82 | 0.586667 | false | 3.061224 | false | false | false |
dhh1128/intent | intent/space.py | 1 | 1859 | import os
OUTDIR_NAME = '.out'
ENVDIR_NAME = '.env'
def _normpath(path):
path = os.path.expanduser(path)
p = os.path.normpath(os.path.abspath(path)).replace('\\', '/')
# Clean up concatenation errors
while '//' in p:
p = p.replace('//', '/')
if p[-1] == '/':
p = p[:-1]
return... | mit | 5,581,375,001,602,135,000 | 23.8 | 112 | 0.561054 | false | 3.343525 | false | false | false |
SoftwareExperiment4/SungkyunWiki | wiki/models/__init__.py | 10 | 4429 | from __future__ import absolute_import
from __future__ import unicode_literals
# -*- coding: utf-8 -*-
from django import VERSION
from django.conf import settings as django_settings
from django.core.exceptions import ImproperlyConfigured
import warnings
from six import string_types
# TODO: Don't use wildcards
from .a... | gpl-3.0 | -6,276,494,192,038,563,000 | 38.900901 | 145 | 0.700835 | false | 4.070772 | true | false | false |
khchine5/xl | lino_xl/lib/notes/__init__.py | 1 | 1309 | # Copyright 2013-2018 Rumma & Ko Ltd
# License: BSD (see file COPYING for details)
"""
Adds a multipurpose concept of "Note". See :doc:`/specs/notes`.
.. autosummary::
:toctree:
fixtures.demo
fixtures.std
"""
from lino import ad
from django.utils.translation import ugettext_lazy as _
class Plugin(ad.Pl... | bsd-2-clause | 8,663,087,226,367,652,000 | 25.18 | 63 | 0.630252 | false | 3.232099 | false | false | false |
YogeshMahera-SerpentCS/business-requirement | business_requirement_deliverable_project/models/business.py | 1 | 5194 | # -*- coding: utf-8 -*-
# © 2016 Elico Corp (https://www.elico-corp.com).
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import api, fields, models, _
class BusinessRequirement(models.Model):
_inherit = "business.requirement"
@api.multi
def generate_projects_wizard(self... | agpl-3.0 | -3,762,873,575,987,095,600 | 32.076433 | 75 | 0.548816 | false | 4.164395 | false | false | false |
SlivTime/iktomi | tests/cli/lazy.py | 3 | 1712 | # coding: utf-8
import sys
import unittest
from iktomi.cli.lazy import LazyCli
from iktomi.cli.base import Cli, manage
from io import StringIO
try:
from unittest.mock import patch
except ImportError:
from mock import patch
def get_io():
return StringIO()
class MyCli(Cli):
'Example Cli class'
c... | mit | -2,275,705,814,292,021,200 | 24.939394 | 77 | 0.55257 | false | 4.248139 | true | false | false |
ppanczyk/ansible | lib/ansible/modules/utilities/logic/async_status.py | 33 | 2944 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>, and others
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
from __future__ import absolute_import, division, print_function
__metaclass__ = type
ANSIBLE_METADATA = {'metadata... | gpl-3.0 | -4,661,069,897,575,837,000 | 28.44 | 96 | 0.632133 | false | 3.703145 | false | false | false |
facebookexperimental/eden | eden/scm/setup.py | 1 | 64399 | # Portions Copyright (c) Facebook, Inc. and its affiliates.
#
# This software may be used and distributed according to the terms of the
# GNU General Public License version 2.
# Copyright Matt Mackall <mpm@selenic.com> and others
#
# This software may be used and distributed according to the terms of the
# GNU General... | gpl-2.0 | -6,764,690,014,806,978,000 | 34.287123 | 165 | 0.612246 | false | 3.654259 | false | false | false |
jerith/landinggear | setup.py | 1 | 1088 | import os
from setuptools import setup, find_packages
def readfile(filename):
with open(os.path.join(os.path.dirname(__file__), filename)) as f:
return f.read()
setup(
name="landinggear",
version="0.0.3a0",
author="Jeremy Thurgood",
author_email="firxen@gmail.com",
description=("Whe... | mit | 4,114,893,879,248,223,700 | 28.405405 | 70 | 0.61489 | false | 3.871886 | false | false | false |
perryl/morph | distbuild/subprocess_eventsrc.py | 2 | 3215 | # distbuild/subprocess_eventsrc.py -- for managing subprocesses
#
# Copyright (C) 2014-2015 Codethink Limited
#
# 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; version 2 of the License.
#
# Thi... | gpl-2.0 | 6,721,860,849,351,126,000 | 29.619048 | 76 | 0.633904 | false | 3.944785 | false | false | false |
ging/keystone | keystone/trust/controllers.py | 1 | 12306 | # Copyright 2013 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law ... | apache-2.0 | -4,380,520,424,913,015,300 | 40.574324 | 82 | 0.583293 | false | 3.955641 | false | false | false |
seecr/meresco-html | meresco/html/_html/_table.py | 1 | 3556 | ## begin license ##
#
# "Meresco Html" is a template engine based on generators, and a sequel to Slowfoot.
# It is also known as "DynamicHtml" or "Seecr Html".
#
# Copyright (C) 2017 SURFmarket https://surf.nl
# Copyright (C) 2017-2018 Seecr (Seek You Too B.V.) http://seecr.nl
# Copyright (C) 2018 SURF https://surf.nl
... | gpl-2.0 | -1,515,530,460,310,008,800 | 29.135593 | 97 | 0.631046 | false | 3.681159 | false | false | false |
botswana-harvard/bcpp-interview | bcpp_interview/actions.py | 1 | 5412 | from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http.response import HttpResponseRedirect
from .models import Interview, FocusGroupItem, FocusGroup
def verify_available_for_focus_group(request, potential_subject, category):
warning = None
if not potential_subject.... | gpl-3.0 | -1,472,217,304,370,482,400 | 43 | 114 | 0.615115 | false | 4.641509 | false | false | false |
Omrigan/diseases | diploma/settings.py | 1 | 2789 | """
Django settings for diploma project.
Generated by 'django-admin startproject' using Django 1.8.1.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build path... | mit | 126,890,369,503,821,660 | 24.833333 | 71 | 0.687702 | false | 3.384709 | false | false | false |
michigraber/neuralyzer | neuralyzer/cia/nbplot.py | 1 | 10777 |
from __future__ import print_function
import os
import numpy as np
import seaborn as sns
sns.set(style='whitegrid')
from matplotlib import pyplot as plt
def plot_spatial_components(A, ncols=5):
'''
[A] = d x k
'''
d, k = A.shape
ims = int(np.sqrt(d))
nrows = int(np.ceil(k/float(ncols)))... | mit | -2,550,319,562,965,090,300 | 23.002227 | 101 | 0.441681 | false | 2.75134 | false | false | false |
TLemur/freq-bot | src/plugins/muc/wtf.py | 1 | 4655 | #!/usr/bin/env python
# -*- coding: utf8 -*-
# __NEED_DB__
import sys
class Wtf:
def __init__(self, bot):
self.db = db.database('wtf')
self.bot = bot
q = self.db.query('select count(*) from SQLITE_MASTER where type="table" and tbl_name="wtf"')
if q.fetchone()[0] == 0:
se... | gpl-3.0 | 4,683,906,390,428,746,000 | 27.888199 | 101 | 0.506128 | false | 2.870988 | false | false | false |
jddixon/hamt_py | src/hamt/__init__.py | 1 | 20650 | # hamt/__init__.pyMT
""" NodeID library for python XLattice packages. """
import sys
# from binascii import b2a_hex
from xlutil import popcount64
__version__ = '0.1.17'
__version_date__ = '2018-03-23'
__all__ = ['__version__', '__version_date__',
'MAX_W',
'countem', # EXPERIMENT
... | mit | -8,280,089,254,132,802,000 | 31.468553 | 79 | 0.48092 | false | 4.011267 | false | false | false |
MKTCloud/MKTCloud | openstack_dashboard/dashboards/project/routers/views.py | 8 | 5415 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012, Nachi Ueno, NTT MCL, 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... | apache-2.0 | -1,634,372,358,624,060,000 | 35.836735 | 79 | 0.584303 | false | 4.124143 | false | false | false |
samv/normalize | tests/test_types.py | 1 | 7914 | #
# This file is a part of the normalize python library
#
# normalize is free software: you can redistribute it and/or modify
# it under the terms of the MIT License.
#
# normalize is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FI... | mit | 2,962,566,394,688,063,000 | 30.91129 | 78 | 0.603993 | false | 4.011151 | true | false | false |
shivam5992/PyScrapper | zomato_top_restaurants/script.py | 2 | 1689 | '''
Python class to scrap top 25 trending restaurants and their details for various
cities and creating seperate json response for each city
'''
import json
import re
import urllib
from pprint import pprint
from BeautifulSoup import BeautifulSoup
class zomato_top_restaurants:
def __init__(self,city):
self.city... | mit | -6,047,296,621,029,119,000 | 29.727273 | 122 | 0.651273 | false | 2.922145 | false | false | false |
antb/TPT----My-old-mod | src/python/stdlib/test/test_site.py | 3 | 12641 | """Tests for 'site'.
Tests assume the initial paths in sys.path once the interpreter has begun
executing have not been removed.
"""
import unittest
from test.test_support import run_unittest, TESTFN, EnvironmentVarGuard
import __builtin__
import os
import sys
import encodings
import subprocess
import sysconfig
from c... | gpl-2.0 | 7,950,274,796,009,535,000 | 36.847305 | 78 | 0.588324 | false | 3.985183 | true | false | false |
silent1mezzo/jeeves-framework | jeeves/conf/project_template/settings.py | 2 | 1286 | # Jeeves settings
HOST = 'irc.freenode.net'
PORT = 6667 # 6697 for SSL
SSL = False
SERVER_PASSWORD = None
PASSWORD = None
NICKNAME = 'Jeeves'
REALNAME = 'Jeeves Bot: A Framework for creating IRC Bots'
CHANNEL = '#jeeves'
PLUGINS = (
#It is strongly recommended that you don't remove these (jeeves.core.plugins.*... | isc | -1,199,398,431,127,225,600 | 27.577778 | 103 | 0.664852 | false | 3.348958 | false | false | false |
ThiefMaster/indico | indico/modules/events/editing/service.py | 4 | 10599 | # This file is part of Indico.
# Copyright (C) 2002 - 2021 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
import requests
from marshmallow import ValidationError
from werkzeug.urls import url_parse
import indico... | mit | -1,694,969,210,159,401,200 | 37.966912 | 120 | 0.634399 | false | 4.03464 | false | false | false |
grovesdixon/metaTranscriptomes | scripts/calculate_relative_adaptiveness.py | 1 | 5905 | #!/usr/bin/env python
##calculate_relative_adaptiveness.py
##written 9/15/15 by Groves Dixon
ProgramName = 'calculate_relative_adaptiveness.py'
LastUpdated = '9/15/15'
By = 'Groves Dixon'
VersionNumber = '1.0'
print "\nRunning Program {}...".format(ProgramName)
VersionString = '{} version {} Last Updated {} by {}'.for... | mit | -1,945,202,172,947,302,100 | 36.611465 | 200 | 0.597629 | false | 3.152696 | false | false | false |
twm/yarrharr | yarrharr/migrations/0008_feed_counts_by_trigger.py | 1 | 2678 | # Copyright © 2018, 2020 Tom Most <twm@freecog.net>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program i... | gpl-3.0 | -7,477,749,005,679,124,000 | 38.367647 | 89 | 0.69294 | false | 4.013493 | false | false | false |
PolyPasswordHasher/PolyPasswordHasher-Django | django_pph/management/commands/migrate_user.py | 1 | 1930 | from django.core.management.base import BaseCommand
from django.contrib.auth.hashers import get_hasher
from django.contrib.auth.models import User
from django_pph.shamirsecret import ShamirSecret
from django_pph.settings import SETTINGS
# This will be more elaborate once we have multi-hasher support.
SUPPORTED_HASHE... | mit | 565,799,547,929,653,700 | 29.15625 | 79 | 0.641451 | false | 4.07173 | false | false | false |
ElofssonLab/TOPCONS2 | topcons2_webserver/workflow/pfam_workflow_octopus.py | 1 | 13020 | #!/usr/bin/env python
# Description:
# This script is a variant of pfam_workflow.py which use the same pipeline as
# TOPCONS2 but runs only one of the sub-predictors, OCTOPUS
# Created 2016-04-05, updated 2016-04-05, Nanjiang Shu
import sys
import os
import time
from Bio import SeqIO
import tempfile
import subpro... | gpl-2.0 | -3,412,032,430,078,721,000 | 41.688525 | 195 | 0.515284 | false | 3.764094 | false | false | false |
ithinksw/philo | philo/contrib/shipherd/models.py | 1 | 8010 | #encoding: utf-8
from UserDict import DictMixin
from hashlib import sha1
from django.contrib.sites.models import Site
from django.core.cache import cache
from django.core.exceptions import ValidationError
from django.core.urlresolvers import NoReverseMatch
from django.core.validators import RegexValidator, MinValueVal... | isc | 7,470,376,939,126,198,000 | 40.283505 | 324 | 0.705045 | false | 3.346427 | false | false | false |
pkerpedjiev/ernwin | fess/builder/models.py | 1 | 43111 | #!/usr/bin/python
from __future__ import print_function
import itertools as it
import random
import os.path as op
import numpy as np
import math
import sys
from collections import defaultdict
import warnings
import glob
import copy
import logging
import textwrap
import Bio.PDB as bpdb
import Bio.PDB.Chain as bpdbc
... | agpl-3.0 | 1,686,391,222,086,724,000 | 40.373321 | 154 | 0.560089 | false | 3.745851 | false | false | false |
joshwatson/binaryninja-api | python/examples/kaitai/ogg.py | 1 | 5788 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
from .kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO
import collections
if parse_version(ks_version) < parse_version('0.7'):
raise Excepti... | mit | -695,260,530,707,465,700 | 50.221239 | 227 | 0.555632 | false | 3.520681 | false | false | false |
bfrick22/vegaspirates | mysite/polls/models.py | 1 | 1219 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
import datetime
from django.utils import timezone
from django.utils.encoding import python_2_unicode_compatible
from django.db import models
@python_2_unicode_compatible
class Question(models.Model):
question_text = models.CharField(max_length=200)
... | apache-2.0 | 7,446,006,332,881,366,000 | 29.475 | 76 | 0.684167 | false | 3.833333 | false | false | false |
flowdy/sompyler | Sompyler/orchestra/__init__.py | 1 | 4702 | from .instrument import Instrument
from ..score import Score
from ..score.note import Note
from tempfile import mkdtemp
import sys, os, numpy, traceback, pickle, base64
cached_files_dir = None
def filename_for_instrument_cache(i):
return base64.urlsafe_b64encode(
bytes(i, encoding="utf-8")
).d... | gpl-3.0 | 1,515,722,851,138,791,400 | 26.022989 | 80 | 0.601446 | false | 3.589313 | false | false | false |
toladata/TolaActivity | workflow/migrations/0030_auto_20180907_0704.py | 1 | 1312 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2018-09-07 14:04
from __future__ import unicode_literals
import django.contrib.postgres.fields.hstore
from django.db import migrations
from django.db.utils import ProgrammingError
def create_fields(apps, schema_editor):
# If fields are not there, add them. ... | apache-2.0 | -1,167,136,997,284,155,100 | 35.444444 | 234 | 0.668445 | false | 3.93994 | false | false | false |
bwall/bamfdetect | BAMF_Detect/modules/njrat.py | 1 | 2659 | from common import Modules, data_strings_wide, load_yara_rules, PEParseModule, ModuleMetadata, is_ip_or_domain
class njRat(PEParseModule):
def __init__(self):
md = ModuleMetadata(
module_name="njrat",
bot_name="njRat",
description="RAT",
authors=["Brian Wall... | mit | -1,849,789,600,733,485,600 | 33.102564 | 110 | 0.564122 | false | 3.787749 | false | false | false |
faassen/imagestore | src/imagestore/metadata.py | 2 | 4326 | from datetime import datetime
from lxml import etree
import grok
from imagestore.interfaces import IXml, IRest
from imagestore.xml import XmlContainerBase
from imagestore.xml import (xml_el, xml_href, xml_replace, XmlBase,
NS, NS_MAP, XmlFactoryBase)
from imagestore.util import parse_iso_t... | lgpl-2.1 | -8,447,422,006,584,230,000 | 28.033557 | 81 | 0.628063 | false | 3.72931 | false | false | false |
jdgwartney/pulse-api-cli | boundary/event_list.py | 4 | 1233 | #
# Copyright 2015 BMC Software, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | 3,179,353,043,765,154,000 | 32.324324 | 113 | 0.689376 | false | 3.817337 | false | false | false |
alpaca-lab/rvp-local-server | udpserver.py | 1 | 2271 | import socket
from datetime import datetime
import threading
class UDPServer(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
self.server = None
self.tryCount = 1000
self.speedMap = {}
self.speedRes = {}
def init_server(self):
self.server ... | apache-2.0 | 932,815,892,169,936,600 | 29.293333 | 80 | 0.527521 | false | 3.92228 | false | false | false |
arielvb/collector | collector/ui/views/advanced_search.py | 1 | 5125 | # -*- coding: utf-8 -*-
# pylint: disable-msg=E1101,E0611,C0103
# E0611: No name 'QtCore' in module 'PyQt4'
# E1101: Module ___ has no ___ member
"""
Advanced search - Widget and View
=================================
Adavances search is a widget, and a view, that allows build a filter query
to fetch the elements of a... | gpl-2.0 | 1,485,401,993,301,069,300 | 35.091549 | 74 | 0.568976 | false | 4.239041 | false | false | false |
CartoDB/cartodb-python | carto/synchronizations.py | 2 | 1307 | """
Entity classes for defining synchronizations
.. module:: carto.synchronizations
:platform: Unix, Windows
:synopsis: Entity classes for defining synchronizations
.. moduleauthor:: Daniel Carrion <daniel@carto.com>
.. moduleauthor:: Alberto Romeu <alrocar@carto.com>
"""
from pyrestcli.resources import Reso... | bsd-3-clause | -6,242,412,736,896,425,000 | 27.413043 | 81 | 0.696251 | false | 4.202572 | false | false | false |
urschrei/simplification | simplification/util.py | 1 | 5204 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
ffi.py
Created by Stephan Hügel on 2016-08-3
This file is part of rdp.
The MIT License (MIT)
Copyright (c) 2016 Stephan Hügel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Soft... | mit | 197,599,426,286,725,570 | 31.710692 | 120 | 0.659104 | false | 3.232443 | false | false | false |
srdjanfurman/Python_code_snippets | PythonPackagesValidatorCentOS/colors.py | 1 | 1752 | """
Created on Sep 15, 2014
@author: sfurman
"""
# Terminal color palette.
class Color(object):
def __init__(self):
pass
TEXT_RESET_ALL = '\033[0m'
TEXT_RESET = '\033[39m' # '\033[49m'
TEXT_BLACK = '\033[30m'
TEXT_RED = '\033[31m'
TEXT_GREEN = '\033[32m'
TEXT_YELLOW = '\033[33m'... | mit | 5,923,601,999,451,742,000 | 24.391304 | 71 | 0.543379 | false | 2.712074 | false | false | false |
breunigs/livestreamer-debian | src/livestreamer/plugins/zdf_mediathek.py | 34 | 2775 | import re
from livestreamer.plugin import Plugin
from livestreamer.plugin.api import http, validate
from livestreamer.stream import HDSStream, HLSStream, RTMPStream
API_URL = "http://www.zdf.de/ZDFmediathek/xmlservice/web/beitragsDetails"
QUALITY_WEIGHTS = {
"hd": 720,
"veryhigh": 480,
"high": 240,
"m... | bsd-2-clause | 6,642,834,347,677,442,000 | 28.210526 | 81 | 0.541622 | false | 3.486181 | false | false | false |
jptomo/rpython-lang-scheme | rpython/annotator/binaryop.py | 1 | 28527 | """
Binary operations between SomeValues.
"""
from rpython.tool.pairtype import pair, pairtype
from rpython.annotator.model import (
SomeObject, SomeInteger, SomeBool, s_Bool, SomeString, SomeChar, SomeList,
SomeDict, SomeUnicodeCodePoint, SomeUnicodeString,
SomeTuple, SomeImpossibleValue, s_ImpossibleValu... | mit | 3,099,534,768,952,636,000 | 34.349442 | 102 | 0.602131 | false | 3.400119 | false | false | false |
magfest/ubersystem | uber/site_sections/guests.py | 1 | 22270 | import os
import shutil
import cherrypy
from cherrypy.lib.static import serve_file
from uber.config import c
from uber.decorators import ajax, all_renderable
from uber.errors import HTTPRedirect
from uber.models import GuestMerch
from uber.utils import check
@all_renderable(public=True)
class Root:
def index(se... | agpl-3.0 | -360,385,547,758,312,500 | 44.635246 | 120 | 0.559273 | false | 4.236256 | false | false | false |
BryanMums/MovieQuizz | tests/test_moviequizz.py | 1 | 1154 | import pytest
import random
import codecs
import json
import os
@pytest.fixture()
def questions_file_exists():
"""Test whether the question file exists or not"""
assert os.path.exists("../moviequizz/ressources/questions.json")
def test_questions_are_valid(questions_file_exists):
"""Test if questions are ... | mit | -7,714,827,103,555,948,000 | 29.368421 | 87 | 0.681109 | false | 3.796053 | true | false | false |
dvhbru/dvhb-hybrid | examples/tutorial/tutorial/app.py | 1 | 1099 | import os
import aiopg.sa
import django
from aiohttp_apiset import SwaggerRouter
from aiohttp_apiset.middlewares import jsonify
import aioworkers.http
from dvhb_hybrid.amodels import AppModels
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tutorial.settings")
django.setup()
import tutorial
AppModels.import_all_mo... | mit | -8,912,984,094,108,405,000 | 26.475 | 68 | 0.685168 | false | 3.687919 | false | false | false |
crypt3lx2k/dqn | dqn.py | 1 | 3874 | #! /usr/bin/env python2.7
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from six.moves import xrange
import os
import time
import sys
import gym
import numpy as np
from config import config
from config import get_FLAGS
from preprocessing import Stack... | mit | -7,714,081,119,140,862,000 | 25.534247 | 91 | 0.651523 | false | 4.152197 | false | false | false |
tylerbrockett/Alert-Bot-Reddit | src/utils/inbox.py | 1 | 11607 | """
==========================================
Author: Tyler Brockett
Username: /u/tylerbrockett
Description: Alert Bot
==========================================
"""
from utils.env import env, BOT_USERNAME, DEV_USERNAME, SUBREDDIT
GITHUB_HOME = 'https://github.com/tylerbrockett/Alert-Bot... | mit | 7,293,434,470,101,465,000 | 41.672794 | 126 | 0.592832 | false | 3.637418 | false | false | false |
danielhers/ucca | uccaapp/api.py | 1 | 7254 | import json
import logging
import os
from time import sleep
import requests
"""
API code for accessing v1.0 of the UCCAApp server
"""
DEFAULT_SERVER = "http://ucca-demo.cs.huji.ac.il"
API_PREFIX = "/api/v1/"
SERVER_ADDRESS_ENV_VAR = "UCCA_APP_SERVER_ADDRESS"
AUTH_TOKEN_ENV_VAR = "UCCA_APP_AUTH_TOKEN"
EMAIL_ENV_VAR =... | gpl-3.0 | -1,301,337,976,604,469,000 | 42.178571 | 120 | 0.626275 | false | 3.52821 | false | false | false |
MichalMaM/django-admin-extras | tests/test_admin.py | 1 | 8972 | from django.test import TestCase, Client
from django.test.client import RequestFactory
from django.core.urlresolvers import reverse
from django.contrib import admin
from django.contrib.flatpages.models import FlatPage
from admin_extras.admin import ReadOnlyMixin
from .utils import (
create_staff_user,
create_... | bsd-2-clause | -8,481,837,305,480,550,000 | 44.77551 | 101 | 0.650914 | false | 3.671031 | true | false | false |
anentropic/django-oscar | src/oscar/apps/order/utils.py | 4 | 10088 | from decimal import Decimal as D
from django.conf import settings
from django.contrib.sites.models import Site
from django.utils.translation import ugettext_lazy as _
from oscar.core.loading import get_class, get_model
from . import exceptions
Order = get_model('order', 'Order')
Line = get_model('order', 'Line')
Or... | bsd-3-clause | 7,235,499,896,629,662,000 | 38.40625 | 79 | 0.589512 | false | 4.416813 | false | false | false |
Leila20/django | tests/admin_docs/test_utils.py | 19 | 5241 | from __future__ import unicode_literals
import unittest
from django.contrib.admindocs.utils import (
docutils_is_available, parse_docstring, parse_rst, trim_docstring,
)
from .tests import AdminDocsTestCase
@unittest.skipUnless(docutils_is_available, "no docutils installed.")
class TestUtils(AdminDocsTestCase)... | bsd-3-clause | -6,917,149,335,031,949,000 | 41.959016 | 96 | 0.614387 | false | 3.845194 | true | false | false |
ashleyjsands/fuel_finder | fuel_finder/urls.py | 1 | 1481 | from django.conf.urls import patterns, include, url
from django.contrib.auth.decorators import login_required
from django.views.generic import TemplateView, CreateView, UpdateView
from main import views
from main import models
from main import forms
from django.contrib import admin
admin.autodiscover()
# Create the ... | mit | 6,816,731,258,783,323,000 | 34.261905 | 84 | 0.697502 | false | 3.004057 | false | true | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.