repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
emjemj/pyfiberdriver | pyfiberdriver.py | 1 | 10302 | from pysnmp.hlapi import *
import argparse
class SNMP:
hostname = None
community = None
def __init__(self, hostname, community):
self.hostname = hostname
self.community = community
def walk(self, root):
result = []
for errorIndication, errorStatus, errorIndex, varBinds in self.next_cmd(root):
... | bsd-2-clause | 3,303,528,582,462,716,400 | 28.774566 | 154 | 0.57882 | false | 2.628061 | false | false | false |
azul-cloud/serendipity | products/migrations/0001_initial.py | 1 | 1857 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ingredient',
fields=[
('id', models.AutoField(v... | mit | -9,119,335,546,226,879,000 | 36.14 | 130 | 0.517501 | false | 4.400474 | false | false | false |
edwardsmith999/pyDataView | postproclib/cplpostproc.py | 1 | 4562 | import os
from .cplfields import *
from .postproc import PostProc
from .pplexceptions import NoResultsInDir, DataNotAvailable
from .mdpostproc import MD_PostProc
from .cfdpostproc import CFD_PostProc
from .serial_cfdpostproc import Serial_CFD_PostProc
from .openfoampostproc import OpenFOAM_PostProc
# Results directory... | gpl-3.0 | -720,757,905,833,127,600 | 34.092308 | 97 | 0.488601 | false | 4.521308 | false | false | false |
cloudbase/cinder | cinder/consistencygroup/api.py | 4 | 34498 | # Copyright (C) 2012 - 2014 EMC 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/licenses/LICENSE-2.0
#
# Unle... | apache-2.0 | -1,308,947,372,528,759,300 | 43.058748 | 79 | 0.530524 | false | 4.627498 | false | false | false |
eugeneav/escout | service/back-end/escout/applications/dashboard/views.py | 1 | 1136 | from django.http import JsonResponse
from rest_framework import viewsets
from rest_framework.authtoken.models import Token
from rest_framework.permissions import IsAuthenticated
from escout.applications.dashboard.models import Application
from escout.applications.dashboard.serializers import ApplicationSerializer
# C... | gpl-3.0 | -1,437,667,483,683,200,800 | 23.170213 | 75 | 0.679577 | false | 4.369231 | false | false | false |
phihag/adhocracy | src/adhocracy/lib/cache/invalidate.py | 4 | 2235 | import logging
from adhocracy import model
from adhocracy.lib.cache.util import clear_tag
log = logging.getLogger(__name__)
def invalidate_badge(badge):
log.debug('invalidate_badge %s' % badge)
clear_tag(badge)
def invalidate_userbadges(userbadges):
clear_tag(userbadges)
invalidate_user(userbadges.... | agpl-3.0 | -1,121,266,491,764,022,100 | 22.28125 | 60 | 0.720358 | false | 3.737458 | false | false | false |
sdgdsffdsfff/jumpserver | apps/orgs/api.py | 1 | 2390 | # -*- coding: utf-8 -*-
#
from rest_framework import status
from rest_framework.views import Response
from rest_framework_bulk import BulkModelViewSet
from common.permissions import IsSuperUserOrAppUser
from .models import Organization
from .serializers import OrgSerializer, OrgReadSerializer, \
OrgMembershipUser... | gpl-2.0 | -5,938,913,917,464,487,000 | 33.637681 | 83 | 0.697908 | false | 4.192982 | false | false | false |
MalloyPower/parsing-python | front-end/testsuite-python-lib/Python-3.6.0/Lib/test/test_fstring.py | 1 | 27910 | import ast
import types
import decimal
import unittest
a_global = 'global variable'
# You could argue that I'm too strict in looking for specific error
# values with assertRaisesRegex, but without it it's way too easy to
# make a syntax error in the test strings. Especially with all of the
# triple quotes, raw str... | mit | 7,434,914,116,047,775,000 | 36.312834 | 150 | 0.436833 | false | 3.795213 | true | false | false |
hheimbuerger/suds-gzip | suds/client.py | 2 | 28840 | # This program is free software; you can redistribute it and/or modify
# it under the terms of the (LGPL) GNU Lesser General Public License as
# published by the Free Software Foundation; either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will ... | lgpl-3.0 | 89,138,078,589,958,480 | 32.692757 | 142 | 0.571637 | false | 4.202244 | false | false | false |
ephillipe/nltk-trainer | nltk_trainer/classification/args.py | 6 | 8308 | from nltk.classify import DecisionTreeClassifier, MaxentClassifier, NaiveBayesClassifier, megam
from nltk_trainer import basestring
from nltk_trainer.classification.multi import AvgProbClassifier
classifier_choices = ['NaiveBayes', 'DecisionTree', 'Maxent'] + MaxentClassifier.ALGORITHMS
dense_classifiers = set(['Extr... | apache-2.0 | -619,178,258,999,579,300 | 36.423423 | 121 | 0.718344 | false | 3.435897 | false | false | false |
huangtao-sh/orange | orange/utils/log.py | 1 | 1284 | # 项目: 工具库
# 模块: 日志模块
# 作者: 黄涛
# License: GPL
# Email: huangtao.sh@icloud.com
# 创建:2019-07-20 22:26
import logging
import sys
import os
from orange import Path
from .datetime_ import datetime
today = datetime.now() % '%F'
name = sys.argv[0] or 'test'
logger = logging.getLogger(name)
if os.n... | gpl-2.0 | 3,417,165,787,511,814,000 | 21.884615 | 70 | 0.636876 | false | 2.978417 | false | false | false |
aldnav/eventure | extra/views.py | 1 | 2204 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.http import JsonResponse
from django.views.generic import TemplateView, View
from .mixins import JSONView
from .models import Profile, Note, Game
from .serializer import activity_serializer
from activity.models import Activity, Verb
class H... | mit | 396,356,481,751,064,600 | 32.907692 | 78 | 0.610254 | false | 3.900885 | false | false | false |
fengsp/flask-snippets | templatetricks/timesince_filter.py | 2 | 1041 | # -*- coding: utf-8 -*-
"""
templatetricks.timesince_filter
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
timesince filter
http://flask.pocoo.org/snippets/33/
"""
import os
import sys
sys.path.insert(0, os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
from datetime import datetime
from app import app
... | bsd-3-clause | 5,286,875,435,464,828,000 | 23.209302 | 79 | 0.553314 | false | 3.614583 | false | false | false |
athyuttamre/accessible-facebook-ui | public/conversejs/bosh_manager/punjab-master/build/lib/punjab/xmpp/server.py | 3 | 7061 | # XMPP server class
from twisted.application import service
from twisted.python import components
from twisted.internet import reactor
from twisted.words.xish import domish, xpath, xmlstream
from twisted.words.protocols.jabber import jid
from punjab.xmpp import ns
SASL_XMLNS = 'urn:ietf:params:xml:ns:xmpp-sasl'
C... | mit | -7,401,368,338,839,916,000 | 29.834061 | 280 | 0.620875 | false | 3.753854 | false | false | false |
madmax983/h2o-3 | h2o-py/tests/testdir_algos/gbm/pyunit_DEPRECATED_loss_behaviorGBM.py | 3 | 2563 | import sys
sys.path.insert(1,"../../../")
import h2o
from tests import pyunit_utils
def distribution_behaviorGBM():
#Log.info("==============================")
#Log.info("Default Behavior - Gaussian")
#Log.info("==============================")
eco = h2o.import_file(path=pyunit_utils.locate("smalldata/gbm_... | apache-2.0 | 3,524,654,603,472,656,400 | 36.691176 | 95 | 0.622708 | false | 3.195761 | false | false | false |
bitcraze/crazyflie-firmware | tools/verify/elf_sanity.py | 1 | 5586 | import argparse
import struct
import sys
try:
from elftools.elf.elffile import ELFFile
except ImportError:
print('pytelftools missing, install to run this script', file=sys.stderr)
print('https://github.com/eliben/pyelftools#installing', file=sys.stderr)
sys.exit(1)
class Colors:
RED = '\033[91m'... | gpl-3.0 | -600,877,974,639,809,700 | 28.555556 | 83 | 0.535267 | false | 3.15415 | false | false | false |
JuliaWinchester/morphotester | topomesh.py | 1 | 5807 | '''
Created on Jan 10, 2016
@author: Julia M. Winchester
'''
import plython
import DNE
import OPC
import RFI
import implicitfair
from collections import defaultdict
class TopoMesh(plython.PlythonMesh):
"""A class for creating and interacting with triangulated polygon meshes and topographic variables.
Cl... | gpl-2.0 | -8,210,878,785,973,345,000 | 39.615385 | 128 | 0.64009 | false | 4.058001 | false | false | false |
tyndare/osmose-backend | analysers/analyser_merge_bicycle_rental_FR_bm.py | 1 | 3368 | #!/usr/bin/env python
#-*- coding: utf-8 -*-
###########################################################################
## ##
## Copyrights Frédéric Rodrigo 2014 ##
## ... | gpl-3.0 | -5,211,930,841,178,215,000 | 62.490566 | 176 | 0.455572 | false | 4.28117 | false | false | false |
realitygaps/cloudbrain | cloudbrain/settings.py | 2 | 3884 | DATE_FORMAT = "%Y-%m-%d %H:%M:%S"
SENSOR_DATA_KEYSPACE = "sensor_data"
CASSANDRA_ADDRESS = 'cassandra.cloudbrain.rocks'
RABBITMQ_ADDRESS = 'rabbitmq.cloudbrain.rocks'
WEBSERVER_ADDRESS = 'webserver.cloudbrain.rocks'
WEBSERVER_PORT = 8080
MOCK_DEVICE_ID = "mock"
REGISTERED_DEVICES_TABLE_NAME = "registered_device_ids... | agpl-3.0 | 1,109,216,164,785,016,300 | 23.738854 | 99 | 0.47863 | false | 3.77821 | false | false | false |
navcoindev/navcoin-core | qa/rpc-tests/dao-light-voting-range-consultations.py | 1 | 9778 | #!/usr/bin/env python3
# Copyright (c) 2019 The Navcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.test_framework import NavCoinTestFramework
from test_framework.cfund_util import *
import... | mit | 2,637,631,453,742,712,000 | 42.07489 | 128 | 0.638372 | false | 3.240968 | true | false | false |
BitFunnel/sigir2017-bitfunnel | scripts/mike.py | 1 | 14438 | from build_filtered_chunks import process_chunk_list
from experiment import Experiment
from innovations import measure_innovations, analyze_innovations
from latex import latex_corpora, latex_performance
###########################################################################
#
# Experiments
#
#####################... | mit | 7,337,326,349,382,600,000 | 26.190207 | 94 | 0.635753 | false | 3.22709 | false | false | false |
kbytesys/pynagmailplugins | setup.py | 1 | 1136 | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='pynagmailplugins',
packages=find_packages(exclude=['docs', 'samples', 'tests']),
namespace_packages=['snowpenguin'],
version='0.0.8',
scripts=['bin/check_mailq.py', 'bin/pydnswl_check.py'],
install_requires=[
... | gpl-2.0 | -2,357,526,657,243,053,600 | 38.172414 | 79 | 0.629401 | false | 3.72459 | false | true | false |
Jumpscale/jumpscale_core8 | lib/JumpScale/clients/racktivity/energyswitch/modelfactory/models/common/Power_0_0_5_29.py | 1 | 5333 | from JumpScale.clients.racktivity.energyswitch.common.GUIDTable import Value
from JumpScale.clients.racktivity.energyswitch.modelfactory.models.common.Power_0_0_5_20 import Model as Power
import struct
import time
class Model(Power):
def __init__(self, parent):
super(Model, self).__init__(parent)
... | apache-2.0 | -3,109,403,066,861,927,000 | 35.77931 | 112 | 0.510032 | false | 3.75828 | false | false | false |
ycdivfx/YCDIVFX_MaxPlus | packages/maxfb/fbauth.py | 2 | 1074 | import urlparse
import BaseHTTPServer
import webbrowser
ACCESS_TOKEN = None
auth_url = 'http://www.youcandoitvfx.com/fb/'
server_host = '127.0.0.1'
server_port = 80
class MyHandler(BaseHTTPServer.BaseHTTPRequestHandler):
def do_GET(self):
global ACCESS_TOKEN
self.send_response(301)
self.... | gpl-2.0 | 7,701,950,246,700,173,000 | 24.595238 | 76 | 0.632216 | false | 3.628378 | false | false | false |
cdvv7788/pinax-blog | pinax/blog/templatetags/pinax_blog_tags.py | 2 | 2206 | from django import template
from ..models import Post
from ..conf import settings
register = template.Library()
class LatestBlogPostsNode(template.Node):
def __init__(self, context_var):
self.context_var = context_var
def render(self, context):
latest_posts = Post.objects.current()[:5]
... | mit | 3,295,916,318,030,949,000 | 23.241758 | 77 | 0.635539 | false | 3.810017 | true | false | false |
orlandov/parpg-game | tests/test_objects_base.py | 1 | 2351 | #!/usr/bin/python
# This file is part of PARPG.
# PARPG 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.
# PARPG is distr... | gpl-3.0 | -4,334,747,343,514,364,400 | 38.183333 | 76 | 0.547852 | false | 4.088696 | true | false | false |
cliftonmcintosh/openstates | openstates/ia/__init__.py | 1 | 3453 | import re
import datetime
import lxml.html
import requests
from billy.utils.fulltext import text_after_line_numbers
from .bills import IABillScraper
from .legislators import IALegislatorScraper
from .events import IAEventScraper
from .votes import IAVoteScraper
try:
# Silencing unverified HTTPS request warnings.
... | gpl-3.0 | -6,124,341,632,348,928,000 | 28.016807 | 72 | 0.536056 | false | 3.627101 | false | false | false |
teddygdev/CarTrackingComputer | backupdec3/python_games/fourinarow.py | 7 | 13080 | # Four-In-A-Row (a Connect Four clone)
# By Al Sweigart al@inventwithpython.com
# http://inventwithpython.com/pygame
# Released under a "Simplified BSD" license
import random, copy, sys, pygame
from pygame.locals import *
BOARDWIDTH = 7 # how many spaces wide the board is
BOARDHEIGHT = 6 # how many spaces tall the b... | mit | -5,542,342,291,221,955,000 | 35.033058 | 130 | 0.607034 | false | 3.640412 | false | false | false |
lgarren/spack | var/spack/repos/builtin/packages/r-yarn/package.py | 1 | 2615 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | -7,563,019,363,430,410,000 | 48.339623 | 121 | 0.665392 | false | 3.714489 | false | false | false |
cryptoquick/nanoblok | nbServer/main.py | 1 | 2599 | # !/usr/bin/env python
# Bulk of this document is based on code from here: http://code.google.com/appengine/articles/rpc.html
import os
import logging
from django.utils import simplejson
from google.appengine.ext import webapp
from google.appengine.ext.webapp import template
from google.appengine.ext.webapp import u... | mit | 2,575,670,552,081,736,000 | 25.804124 | 102 | 0.672182 | false | 3.004624 | false | false | false |
taigaio/taiga-back | taiga/front/sitemaps/milestones.py | 1 | 2259 | # -*- coding: utf-8 -*-
# Copyright (C) 2014-present Taiga Agile LLC
#
# This program 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 of the
# License, or (at your option) any later ver... | agpl-3.0 | -6,595,990,861,714,533,000 | 36.65 | 107 | 0.618858 | false | 4.591463 | false | false | false |
GeoffEvans/aol_model | aol_model/ray.py | 1 | 2654 | from error_utils import check_is_unit_vector
from numpy import pi, array, dot, dtype, concatenate
from numpy.linalg import norm
class Ray(object):
"""A ray, free from paraxial assumptions. """
def __init__(self, position, wavevector_unit, wavelength, energy=1):
self.position = array(position, dtype=dt... | gpl-3.0 | 3,437,786,645,152,071,700 | 46.392857 | 132 | 0.677845 | false | 3.3723 | false | false | false |
purcell/dbdoc | lib/dbdoc/props.py | 1 | 4784 | #!/usr/bin/env python
# -*- encoding: iso-8859-15 -*-
# Use of this software is subject to the terms specified in the LICENCE
# file included in the distribution package, and also available via
# https://github.com/purcell/dbdoc
#
#
# Provides support for reading and writing Java-style properties files
#
__author__ =... | bsd-3-clause | 3,080,726,106,656,835,000 | 32.929078 | 81 | 0.49143 | false | 3.808917 | false | false | false |
python-control/python-control | control/tests/rlocus_test.py | 1 | 5533 | """rlocus_test.py - unit test for root locus diagrams
RMM, 1 Jul 2011
"""
import matplotlib.pyplot as plt
import numpy as np
from numpy.testing import assert_array_almost_equal
import pytest
import control as ct
from control.rlocus import root_locus, _RLClickDispatcher
from control.xferfcn import TransferFunction
fr... | bsd-3-clause | -4,547,476,951,982,118,400 | 40.291045 | 78 | 0.542021 | false | 3.708445 | true | false | false |
phasedchirp/Assorted-Data-Analysis | experiments/Poisson-bootstrap/online-bootstrap-stream.py | 2 | 1138 | from __future__ import division
import numpy as np
from numpy.random import rand, poisson
from sys import argv
# based on:
# Hanley & MacGibbon (2006) (http://www.ncbi.nlm.nih.gov/pubmed/16730851)
# and
# http://www.unofficialgoogledatascience.com/2015/08/an-introduction-to-poisson-bootstrap_26.html
# see also: https... | gpl-2.0 | -7,009,139,274,443,061,000 | 24.863636 | 108 | 0.635325 | false | 2.802956 | false | false | false |
perepa2/SQLToPython | json_scraping_sample.py | 5 | 1361 | import urllib2
import json
import MySQLdb
# Function to fetch json of reddit front page
def fetch():
link = "https://www.reddit.com/.json"
# Get the text version
text = urllib2.urlopen(link).read()
# Turn it into a dictionary
data = json.loads(text)
return data
# Returns a list of tuples of ... | mit | -7,401,714,130,701,518,000 | 24.203704 | 105 | 0.618663 | false | 3.678378 | false | false | false |
edesiocs/openduckbill | src/helper.py | 4 | 3110 | #!/usr/bin/python2.4
# Copyright 2008 Google Inc.
# Author : Anoop Chandran <anoopj@google.com>
#
# openduckbill is a simple backup application. It offers support for
# transferring data to a local backup directory, NFS. It also provides
# file system monitoring of directories marked for backup. Please read
# the READ... | gpl-2.0 | -9,139,896,424,809,712,000 | 28.065421 | 81 | 0.665273 | false | 3.956743 | false | false | false |
adamdoupe/enemy-of-the-state | crawler2_test.py | 1 | 5278 | #!/usr/bin/env python
import crawler2 as crawler
import BaseHTTPServer
import logging
import os
import SimpleHTTPServer
import threading
import unittest
TEST_BASE_PATH = 'test/sites/'
LISTEN_ADDRESS = '127.0.0.1'
LISTEN_PORT = 4566
BASE_URL = 'http://%s:%d/test/sites/' % (LISTEN_ADDRESS, LISTEN_PORT)
EXT_LISTEN_AD... | gpl-2.0 | 3,364,519,199,101,717,000 | 33.953642 | 114 | 0.546987 | false | 3.425049 | true | false | false |
willu47/pyrate | pyrate/repositories/file.py | 2 | 3184 | import os
import logging
import zipfile
import io
EXPORT_COMMANDS = [('status', 'report status of this repository.')]
def load(options, readonly=False):
assert 'path' in options
if 'extensions' in options:
allowed_extensions = options['extensions'].split(',')
else:
allowed_extensions = No... | mit | -466,640,203,837,295,000 | 37.829268 | 104 | 0.549937 | false | 4.724036 | false | false | false |
MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/reference.py | 1 | 7511 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | gpl-2.0 | 8,833,107,045,643,184,000 | 31.799127 | 82 | 0.605379 | false | 3.116598 | false | false | false |
d4g33z/ruffus | ruffus/test/test_mkdir.py | 5 | 5084 | #!/usr/bin/env python
from __future__ import print_function
"""
test_mkdir.py
test product, combine, permute, combine_with_replacement
"""
import os
tempdir = os.path.relpath(os.path.abspath(os.path.splitext(__file__)[0]))
import os
import sys
# add grandparent to search path for testing
grandparent_d... | mit | -3,070,487,904,357,909,000 | 32.893333 | 112 | 0.534618 | false | 3.968774 | true | false | false |
clearlinux/clearstack | clearstack/tests/utils.py | 1 | 1242 | #
# Copyright (c) 2015 Intel Corporation
#
# Author: Julio Montes <julio.montes@intel.com>
#
# 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
... | apache-2.0 | 7,482,850,741,262,786,000 | 28.571429 | 74 | 0.688406 | false | 3.752266 | false | false | false |
jrichte43/ProjectEuler | Problem-0110/solutions.py | 1 | 1200 |
__problem_title__ = "Diophantine reciprocals II"
__problem_url___ = "https://projecteuler.net/problem=110"
__problem_description__ = "In the following equation , , and are positive integers. It can be " \
"verified that when = 1260 there are 113 distinct solutions and this " \
... | gpl-3.0 | 3,951,135,130,805,127,000 | 36.5 | 99 | 0.579167 | false | 4.494382 | false | false | false |
13steinj/praw | tests/unit/models/reddit/test_subreddit.py | 1 | 6055 | import pickle
import pytest
from praw.models import Subreddit, WikiPage
from ... import UnitTest
class TestSubreddit(UnitTest):
def test_equality(self):
subreddit1 = Subreddit(self.reddit,
_data={'display_name': 'dummy1', 'n': 1})
subreddit2 = Subreddit(self.reddit... | bsd-2-clause | -1,786,816,192,770,171,000 | 43.19708 | 77 | 0.539884 | false | 4.43265 | true | false | false |
chrta/canfestival-3-ct | objdictgen/doc_index/DS301_index.py | 14 | 2772 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os,wx
DS301_PDF_INDEX = {0x1000: 86, 0x1001: 87, 0x1002: 87, 0x1003: 88, 0x1005: 89, 0x1006: 90, 0x1007: 90, 0x1008: 91, 0x1009: 91, 0x100A: 91, 0x100C: 92, 0x100D: 92, 0x1010: 92, 0x1011: 94, 0x1012: 97, 0x1013: 98, 0x1014: 98, 0x1015: 99, 0x1016: 100, 0x1017: 101... | lgpl-2.1 | -7,061,637,513,131,406,000 | 52.326923 | 377 | 0.589105 | false | 3 | false | false | false |
bjsmith/reversallearning | negative-affect/pain_regression.py | 1 | 1787 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Sat Aug 19 17:53:46 2017
@author: benjaminsmith
"""
#do the regression in the
#we need a design matrix
#with linear, square, cubic time point regressors
#plus intercept
#plus whatever Design_Matrix files we want to put in.
onsets_convolved.head()
onsets... | apache-2.0 | -1,746,152,898,568,344,800 | 25.671642 | 84 | 0.691662 | false | 2.845541 | false | false | false |
marcus0x62/cloudha | common.py | 1 | 1658 | #!/usr/bin/env python
#
# common.py -- Methods used by the cloud-ha scripts.
# Created: Marcus Butler, 05-April-2017.
#
# 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.ap... | apache-2.0 | 919,106,449,813,804,400 | 29.145455 | 75 | 0.656815 | false | 3.717489 | false | false | false |
sauloaldocker/sqlitevcf | restless.py | 1 | 3409 | #!/usr/bin/python
import os
import sys
from collections import defaultdict
import flask
import flask.ext.sqlalchemy
import flask.ext.restless
from flask.ext.cors import CORS
from flask import jsonify
sys.path.insert(0, '.')
import database
def add_cors_headers(response):
response.headers['Access-Contr... | mit | -964,582,937,152,875,000 | 28.387931 | 99 | 0.630683 | false | 3.277885 | false | false | false |
capaulson/dronecontrol | GDP_Code/ArduParam.py | 1 | 2261 | # Import necessary modules
from droneapi.lib import VehicleMode
# Assume we are already connected to a vehicle (at the highest
# level) and this has been assigned to __main__.v
from __main__ import v
def FetchParam(par):
global v
"""
Take a list of parameters (par) and returns a corresponding
list of values from... | gpl-2.0 | 8,838,233,716,377,489,000 | 24.693182 | 62 | 0.676692 | false | 3.038978 | false | false | false |
prasanthj/jmeter-hiveserver2 | scripts/counter-diff.py | 1 | 6090 | import imp, json, os, shutil, sys, tempfile, zipfile
import imp
try:
imp.find_module('texttable')
from texttable import Texttable
except ImportError:
sys.stderr.write("Could not import Texttable\nRetry after 'pip install texttable'\n")
exit()
tmpdir = tempfile.mkdtemp()
def extract_zip(filename):
file_dir ... | apache-2.0 | -6,137,608,370,762,285,000 | 31.924324 | 96 | 0.69491 | false | 2.950581 | false | false | false |
airbnb/superset | superset/charts/dao.py | 1 | 2302 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | 8,217,947,686,256,482,000 | 32.852941 | 80 | 0.665943 | false | 4.247232 | false | false | false |
keras-team/keras-io | examples/rl/ddpg_pendulum.py | 1 | 13950 | """
Title: Deep Deterministic Policy Gradient (DDPG)
Author: [amifunny](https://github.com/amifunny)
Date created: 2020/06/04
Last modified: 2020/09/21
Description: Implementing DDPG algorithm on the Inverted Pendulum Problem.
"""
"""
## Introduction
**Deep Deterministic Policy Gradient (DDPG)** is a model-free off-po... | apache-2.0 | -7,767,612,422,060,140,000 | 32.373206 | 119 | 0.692258 | false | 3.508551 | false | false | false |
PrivacyScore/PrivacyScore | privacyscore/backend/management/commands/rescanscanlist.py | 1 | 2152 | # Copyright (C) 2018 PrivacyScore Contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is dis... | gpl-3.0 | 2,197,571,733,522,232,800 | 38.127273 | 87 | 0.64684 | false | 4.178641 | false | false | false |
kennethreitz/pipenv | pipenv/vendor/tomlkit/toml_char.py | 1 | 1732 | import string
from ._compat import PY2
from ._compat import unicode
if PY2:
from pipenv.vendor.backports.functools_lru_cache import lru_cache
else:
from functools import lru_cache
class TOMLChar(unicode):
def __init__(self, c):
super(TOMLChar, self).__init__()
if len(self) > 1:
... | mit | 5,225,340,019,896,950,000 | 24.850746 | 81 | 0.562933 | false | 3.677282 | false | false | false |
HalcyonChimera/osf.io | api_tests/applications/views/test_application_list.py | 2 | 4654 | import pytest
import copy
import mock
from osf.models import ApiOAuth2Application
from website.util import api_v2_url
from osf.utils import sanitize
from osf_tests.factories import ApiOAuth2ApplicationFactory, AuthUserFactory
def _get_application_detail_route(app):
path = 'applications/{}/'.format(app.client_id)... | apache-2.0 | 4,197,137,531,587,055,000 | 34.257576 | 116 | 0.598195 | false | 3.708367 | true | false | false |
AssistiveRoboticsUNH/threespace_ros | scripts/canal_surface_test/3joint2mat.py | 1 | 6960 | #!/usr/env/python
from __future__ import print_function
import rosbag
import sys
import scipy.io as sio
from os import listdir
from os.path import isfile, join
LABELS = {"circle": 0,
"square": 1,
"triangle": 2,
"complex": 3,
"swiperight": 4,
"swipeleft": 5,
"... | gpl-3.0 | 6,508,986,143,650,768,000 | 38.101124 | 98 | 0.393822 | false | 4.481648 | false | false | false |
lutris/lutris | lutris/services/steamwindows.py | 1 | 2239 | from gettext import gettext as _
from gi.repository import Gio
from lutris.database.games import get_game_by_field, get_games
from lutris.game import Game
from lutris.services.steam import SteamGame, SteamService
from lutris.util.log import logger
from lutris.util.strings import slugify
STEAM_INSTALLER = "steam-wine... | gpl-3.0 | 5,146,800,632,597,032,000 | 33.446154 | 97 | 0.58017 | false | 3.622977 | false | false | false |
jaredlunde/cargo-orm | unit_bench/models.py | 1 | 5637 | from cargo import Model, db, Query
from cargo.fields import *
from cargo.relationships import ForeignKey
from cargo.builder import Plan, drop_schema
from vital.debug import Compare, line, banner
class Users(Model):
ordinal = ('uid', 'username', 'password', 'join_date', 'key')
uid = UID()
username = Usern... | mit | -4,515,917,904,017,222,000 | 27.614213 | 79 | 0.552776 | false | 3.821695 | false | false | false |
fcooper8472/useful_scripts | makematch.py | 1 | 1311 | import os
import re
import subprocess
import sys
"""
When called from the Chaste directory, this will make all targets matching a regex pattern passed as a command line
argument.
"""
# Only expect a single extra argument, e.g. python makematch pattern
if len(sys.argv) > 2:
sys.exit("This script expects at most on... | bsd-3-clause | -2,252,282,689,923,687,700 | 30.97561 | 115 | 0.71167 | false | 3.477454 | false | false | false |
alfa-addon/addon | plugin.video.alfa/servers/archiveorg.py | 1 | 1336 | # -*- coding: utf-8 -*-
# --------------------------------------------------------
# Conector ArchiveOrg By Alfa development Group
# --------------------------------------------------------
from core import httptools
from core import jsontools
from core import scrapertools
from platformcode import logger
... | gpl-3.0 | -3,825,317,422,124,038,700 | 37.294118 | 120 | 0.568862 | false | 3.711111 | false | false | false |
steder/maroonmpi | test/mpe/mpe-log.py | 1 | 1752 | #mpe-log.py
import mpi
from mpi import mpe
import time
import Numeric
rank,size = mpi.init()
mpe.init_log()
assert (size == 2), "This example requires 2 processors to run properly!"
runEventStart = mpe.log_get_event_number()
runEventEnd = mpe.log_get_event_number()
sendEventStart = mpe.log_get_event_number()
sendEv... | gpl-2.0 | 8,800,083,652,024,560,000 | 34.755102 | 74 | 0.680936 | false | 2.929766 | false | false | false |
spl0k/supysonic | supysonic/api/jukebox.py | 1 | 2644 | # This file is part of Supysonic.
# Supysonic is a Python implementation of the Subsonic server API.
#
# Copyright (C) 2019 Alban 'spl0k' Féron
#
# Distributed under terms of the GNU AGPLv3 license.
import uuid
from flask import current_app, request
from pony.orm import ObjectNotFound
from ..daemon import DaemonClie... | agpl-3.0 | 3,803,369,992,285,203,500 | 25.43 | 86 | 0.573969 | false | 4.004545 | false | false | false |
tyb0807/angr | angr/analyses/cfg/cfg_node.py | 1 | 10945 | import traceback
import pyvex
import archinfo
from ...codenode import BlockNode, HookNode
from ...engines.successors import SimSuccessors
class CFGNodeCreationFailure(object):
"""
This class contains additional information for whenever creating a CFGNode failed. It includes a full traceback
and the exce... | bsd-2-clause | -1,370,739,727,582,931,200 | 34.420712 | 162 | 0.542074 | false | 4.166349 | false | false | false |
rwightman/tensorflow-litterbox | litterbox/sdc_export_graph.py | 1 | 8142 | # Copyright (C) 2016 Ross Wightman. 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
# =================================... | apache-2.0 | -4,987,899,619,452,618,000 | 36.869767 | 116 | 0.605994 | false | 3.871612 | false | false | false |
ulno/micropython-extra-ulno | lib/netrepl/terminal.py | 1 | 4079 | #!/usr/bin/env python3
#
# Terminal program to connect to encrypted netrepl
#
# author: ulno
# create date: 2017-09-16
#
# based on telnet example at http://www.binarytides.com/code-telnet-client-sockets-python/
_debug = "terminal:"
import select, threading
from netrepl import Netrepl_Parser
input_buffer = ""
input_... | mit | -93,694,822,450,537,700 | 29.440299 | 95 | 0.558715 | false | 3.742202 | false | false | false |
miamitops/SWIMS | sites/all/modules/olfp/lib/OL-FeaturePopups/doc/_scripts/split-classes.py | 7 | 1780 | #!/usr/bin/env python
import re
import os
import sys
import shutil
def splitClasses (inputFilename, outputDirectory):
print "Splitting classes, input: %s output: %s " % (inputFilename, outputDirectory)
if not os.path.isfile(inputFilename):
print "\nProcess aborted due to errors."
sys.exit('ER... | lgpl-3.0 | 1,821,927,025,806,907,000 | 33.901961 | 110 | 0.602247 | false | 3.755274 | false | false | false |
fxia22/ASM_xf | PythonD/lib/python2.4/idlelib/RemoteDebugger.py | 15 | 11645 | """Support for remote Python debugging.
Some ASCII art to describe the structure:
IN PYTHON SUBPROCESS # IN IDLE PROCESS
#
# oid='gui_adapter'
+----------+ # +------------+ ... | gpl-2.0 | -859,692,191,938,554,100 | 29.564304 | 79 | 0.5617 | false | 3.780844 | false | false | false |
devalbo/roboplexx | roboplexx/rpx_prop.py | 1 | 1658 | __author__ = 'ajb'
import rpx_proto.descriptions_pb2
def boolean_property_description(prop_name, persist=False):
prop_desc = rpx_proto.descriptions_pb2.PropertyDescription()
prop_desc.propertyId = prop_name
prop_desc.propertyLabel = prop_name
prop_desc.propertyType = rpx_proto.descriptions_pb2.Boolean... | agpl-3.0 | 5,645,255,756,157,430,000 | 36.681818 | 83 | 0.743667 | false | 3.483193 | false | false | false |
juslop/3G-tunnel | pi_sms.py | 1 | 4338 | #!/usr/bin/python
# Huawei 3131 3G dongle python API
# Based on the work of http://chaddyhv.wordpress.com/2012/08/13/programming-and-installing-huawei-hilink-e3131-under-linux/
# Usage: Import in your python project and use: send_sms and read_sms
# Test your Dongle by running this file from console and send smss to yo... | mit | -5,518,781,127,888,677,000 | 32.369231 | 213 | 0.634855 | false | 3.336923 | false | false | false |
samsath/cpcc_backend | src/website/calendar/migrations/0001_initial.py | 2 | 7234 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2017-03-21 21:05
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django_extensions.db.fields
class Migration(migrations.Migration):
initial = True
... | gpl-3.0 | 2,356,455,679,640,295,400 | 55.515625 | 184 | 0.585983 | false | 4.326555 | false | false | false |
lindong28/kafka | tests/kafkatest/services/streams.py | 1 | 32695 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 | 2,284,239,895,744,913,400 | 42.362069 | 167 | 0.568894 | false | 3.803956 | true | false | false |
radiasoft/radtrack | radtrack/rt_jinja.py | 1 | 2150 | # -*- coding: utf-8 -*-
"""Simplify jinja templating.
:copyright: Copyright (c) 2015 Bivio Software, Inc. All Rights Reserved.
:license: http://www.apache.org/licenses/LICENSE-2.0.html
"""
from __future__ import absolute_import, division, print_function
from pykern.pkdebug import pkdc, pkdp
import re
import jinja2
... | apache-2.0 | 8,222,702,969,434,492,000 | 25.875 | 76 | 0.57907 | false | 3.694158 | false | false | false |
sumpfgottheit/rhc-sint-app | wsgi/flaskapp.py | 1 | 12436 | # -*- encoding: utf-8 -*-
from flask import Flask, render_template, flash, url_for, redirect, request
from database import db
from sqlalchemy.exc import OperationalError, IntegrityError
import os
from forms import *
import requests
from filters import register_filters
from googleapi import get_distance, DistanceService... | mit | -1,421,221,711,509,973,500 | 38.92926 | 153 | 0.606136 | false | 3.063148 | false | false | false |
avida/BOMBuilds | converter.py | 1 | 6969 | #!/usr/bin/python
#coding=utf8
import sys
import uuid
import re
time_exp = re.compile('^\d{1,2}:\d{1,2}$')
supply_exp = re.compile('^\d{1,3}$')
ColloquialToCodeDictionary = {
#terran
'SupplyDepot' : ['supply', 'Supply'],
'Barracks' : ['Barracks', 'barrack'],
'Bunker' : ['Bunker','bunke... | mit | -1,400,849,885,622,735,400 | 35.67027 | 114 | 0.548572 | false | 3.035279 | false | false | false |
Benocs/core | src/daemon/core/services/quagga.py | 1 | 33565 | #
# CORE
# Copyright (c)2010-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
#
# author: Jeff Ahrenholz <jeffrey.m.ahrenholz@boeing.com>
#
#
# Copyright (c) 2014 Benocs GmbH
#
# author: Robert Wuttke <robert@benocs.com>
#
# See the LICENSE file included in this distribution.
#
'''
quagga... | bsd-3-clause | 5,469,669,532,570,034,000 | 32.298611 | 90 | 0.545836 | false | 3.837316 | true | false | false |
wdzhou/mantid | Framework/PythonInterface/plugins/algorithms/WorkflowAlgorithms/IndirectResolution.py | 3 | 6199 | #pylint: disable=no-init
from __future__ import (absolute_import, division, print_function)
from mantid.simpleapi import *
from mantid.api import *
from mantid.kernel import *
#pylint: disable=too-many-instance-attributes
class IndirectResolution(DataProcessorAlgorithm):
_input_files = None
_out_ws = None
... | gpl-3.0 | 4,928,819,682,498,818,000 | 40.885135 | 97 | 0.593967 | false | 4.399574 | false | false | false |
testvidya11/ejrf | questionnaire/migrations/0010_auto__add_comment__add_questionoption__add_answer__add_answergroup__ad.py | 1 | 22456 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Comment'
db.create_table(u'questionnaire_comment', (
(u'id', self.gf('django.db.... | bsd-3-clause | -3,063,533,105,820,729,300 | 68.311728 | 188 | 0.594808 | false | 3.758326 | false | false | false |
bukun/TorCMS | torcms/handlers/comment_hander.py | 1 | 1405 | import config
from config import CMS_CFG, router_post
from torcms.core.base_handler import BaseHandler
from torcms.model.comment_model import MComment
class CommentHandler(BaseHandler):
def initialize(self):
super().initialize()
def get(self, *args, **kwargs):
url_str = args[0]
url_ar... | mit | -776,017,749,374,172,400 | 30.222222 | 79 | 0.520285 | false | 3.59335 | false | false | false |
dednal/chromium.src | mojo/public/tools/bindings/pylib/mojom/parse/parser.py | 9 | 12696 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Generates a syntax tree from a Mojo IDL file."""
import imp
import os.path
import sys
def _GetDirAbove(dirname):
"""Returns the directory "above" this... | bsd-3-clause | 1,105,459,608,062,332,300 | 29.815534 | 80 | 0.575142 | false | 3.260401 | false | false | false |
jas02/easybuild-easyblocks | easybuild/easyblocks/m/mothur.py | 12 | 3988 | ##
# Copyright 2013 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (http://w... | gpl-2.0 | -3,498,293,905,837,848,000 | 40.541667 | 121 | 0.661484 | false | 3.638686 | false | false | false |
libnano/libnano | libnano/_virtualhelix/virtualhelix.py | 1 | 11546 | import sys
from typing import (
List,
Tuple,
Union,
NamedTuple
)
import __init__
from libnano.seqrecord.seqrecordbase import (
AlphaEnum,
ALPHABETS
)
from libnano.seqstr import (
reverseComplement,
complement,
reverse
)
from enum import IntEnum
from strand import Strand
from oligo... | gpl-2.0 | 3,997,879,121,160,744,000 | 31.988571 | 104 | 0.576044 | false | 3.262504 | false | false | false |
utcoupe/coupe18 | ros_ws/src/memory_map/src/map_node.py | 1 | 1237 | #!/usr/bin/python
import rospy
import map_manager
import map_communication
from markers import MarkersPublisher
from occupancy import OccupancyGenerator
from ai_game_manager import StatusServices
class MapNode():
def __init__(self):
rospy.init_node("map", log_level=rospy.INFO)
rospy.logdebug("Star... | gpl-3.0 | -6,607,812,416,757,065,000 | 28.452381 | 75 | 0.646726 | false | 3.952077 | false | false | false |
esiivola/GPYgradients | GPy/models/sparse_gp_classification.py | 1 | 6586 | # Copyright (c) 2013, Ricardo Andrade
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import SparseGP
from .. import likelihoods
from .. import kern
from ..inference.latent_function_inference import EPDTC
from copy import deepcopy
class SparseGPClassification(SparseGP):
... | bsd-3-clause | -1,283,444,939,233,665,500 | 43.201342 | 220 | 0.67188 | false | 3.833527 | false | false | false |
tpokorra/pykolab | pykolab/plugins/dynamicquota/__init__.py | 1 | 2664 | # -*- coding: utf-8 -*-
# Copyright 2010-2013 Kolab Systems AG (http://www.kolabsys.com)
#
# Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen a kolabsys.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 ... | gpl-3.0 | -509,678,689,789,942,600 | 31.901235 | 80 | 0.567943 | false | 4.149533 | false | false | false |
metaperl/clickmob | src/dhash.py | 2 | 2158 | __author__ = 'anicca'
# core
import math
import sys
from itertools import izip
# 3rd party
from PIL import Image, ImageChops
import argh
def dhash(image, hash_size=8):
# Grayscale and shrink the image in one step.
image = image.convert('L').resize(
(hash_size + 1, hash_size),
Image.ANTIALIAS... | mit | 5,644,511,999,859,032,000 | 25.975 | 86 | 0.60519 | false | 3.132075 | false | false | false |
jirsis/zurawina | zurawina.py | 1 | 4043 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import paramiko
import os
import transmissionrpc
import getpass
import sys
import traceback
from termcolor import colored
from stat import *
user = "xbian"
host = "zurawina.local"
ssh_username = user
ssh_server = host
ssh_port = 22
transmission_user = user
transmission_... | mit | -5,705,614,639,488,228,000 | 30.834646 | 143 | 0.648034 | false | 3.330313 | false | false | false |
alviproject/alvi | alvi/tests/test_client/test_tree.py | 1 | 3175 | import logging
from alvi.tests.test_client.base import TestContainer
import alvi.tests.pages as pages
logger = logging.getLogger(__name__)
class TestTree(TestContainer):
options = dict(n=7, parents="0, 0, 1, 1, 4, 4")
def test_create_node(self):
page = pages.Tree(self._browser.driver, "TreeCreateNod... | mit | 2,378,627,623,283,486,000 | 42.506849 | 110 | 0.594961 | false | 3.388474 | true | false | false |
ucodev/elastictools | testing/incoming/elastictools-shard-reassign.py | 1 | 4905 | #!/usr/bin/python
# @file elastictools-shard-reassign.py
# @brief uCodev Elastic Tools
# Elasticsearch shard reassigning tool.
#
# Date: 02/08/2015
#
# Copyright 2015 Pedro A. Hortas (pah@ucodev.org)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in... | apache-2.0 | 2,218,248,546,542,065,700 | 29.849057 | 275 | 0.647706 | false | 3.098547 | false | false | false |
epyatopal/geocoder-1 | geocoder/google_timezone.py | 4 | 1813 | #!/usr/bin/python
# coding: utf8
from __future__ import absolute_import
import time
from geocoder.base import Base
from geocoder.location import Location
class Timezone(Base):
"""
Google Time Zone API
====================
The Time Zone API provides time offset data for locations on the surface of the... | mit | 7,053,612,911,848,936,000 | 26.892308 | 97 | 0.62107 | false | 3.915767 | false | false | false |
tino1b2be/LARMAS | prompts/models.py | 1 | 1085 | from django.contrib.auth.models import User
from django.db import models
from django.utils.timezone import now
from user.models import Language
class Prompt(models.Model):
"""
Model for the prompts
"""
text = models.TextField(blank=False)
language = models.ForeignKey(Language, blank=False)
nu... | agpl-3.0 | -4,607,705,863,196,241,400 | 28.324324 | 60 | 0.630415 | false | 3.931159 | false | false | false |
datastreaming/mflow_nodes | tests/helpers.py | 1 | 1389 | import json
from mflow_nodes.processors.base import BaseProcessor
from mflow_nodes.stream_node import get_processor_function, get_receiver_function
from mflow_nodes.node_manager import NodeManager
def setup_file_writing_receiver(connect_address, output_filename):
"""
Setup a node that writis the message head... | gpl-3.0 | -3,615,498,578,825,868,300 | 38.685714 | 105 | 0.663787 | false | 4.423567 | false | false | false |
spitfire-sidra/DateRanger | DateRanger/__init__.py | 1 | 8849 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import calendar
from datetime import date
from datetime import timedelta
from DateRanger.utils import get_quarter
from DateRanger.utils import get_monthrange
from DateRanger.objects import DateFrame
from DateRanger.exceptions import InvalidDateRange
from DateRanger.excepti... | mit | 5,173,313,311,686,591,000 | 27.092063 | 76 | 0.546954 | false | 3.773561 | false | false | false |
RIPE-Atlas-Community/RIPE-Atlas-data-analysis | ripeatlas/analysis/pingstats.py | 1 | 13265 | #!/usr/bin/env python
# Class defitions for Atlas Ping statistics
# statistics are collected at three levels:
#
# first the raw per probe, per target IP data
# second the aggregate over all probes for each target IP
# finally overall statistics for the measurement
from collections import defaultdict
import json
impo... | lgpl-3.0 | 249,741,515,502,609 | 31.834158 | 156 | 0.642819 | false | 3.140388 | false | false | false |
hdknr/django-mediafiles | src/mediafiles/views.py | 1 | 6555 | # -*- coding: utf-8 -*-
from django import template
from django.http import HttpResponse,HttpResponseRedirect,Http404
from django.shortcuts import render_to_response
#
from models import MediaFile,Gallery
from forms import GalleryMediaFileForm
import uuid
#
def preview(request,id):
m = MediaFile.objects.get(id=id )... | mit | -7,385,137,013,392,610,000 | 39.76875 | 92 | 0.650621 | false | 3.72105 | false | false | false |
gburd/dbsql | src/py/misc/lru.py | 1 | 5206 | #-*- coding: ISO-8859-1 -*-
#
# DBSQL - A SQL database engine.
#
# Copyright (C) 2007-2008 The DBSQL Group, Inc. - All rights reserved.
#
# This library 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;... | gpl-3.0 | -7,226,144,713,881,507,000 | 33.657534 | 134 | 0.516135 | false | 3.769732 | false | false | false |
vlinhart/django-smsbrana | smsbrana/views.py | 1 | 1174 | # -*- coding: utf-8 -*-
from datetime import datetime
from django.http import HttpResponse
from smsbrana import SmsConnect
from smsbrana import signals
from smsbrana.const import DELIVERY_STATUS_DELIVERED, DATETIME_FORMAT
from smsbrana.models import SentSms
def smsconnect_notification(request):
sc = SmsConnect()
... | bsd-3-clause | -2,464,962,330,264,614,400 | 33.529412 | 93 | 0.655026 | false | 3.726984 | false | false | false |
divio/django-shop | shop/cascade/catalog.py | 1 | 6242 | from django.contrib.admin import StackedInline
from django.forms import fields, widgets
from django.template.loader import select_template
from django.utils.translation import ugettext_lazy as _, ugettext
from entangled.forms import EntangledModelFormMixin, EntangledModelForm
from cms.plugin_pool import plugin_pool
f... | bsd-3-clause | -2,517,049,768,745,971,000 | 34.668571 | 115 | 0.676226 | false | 4.186452 | false | false | false |
mlperf/training_results_v0.5 | v0.5.0/google/cloud_v2.512/resnet-tpuv2-512/code/resnet/model/models/official/recommendation/constants.py | 4 | 3207 | # Copyright 2018 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 | 1,484,619,227,631,777,800 | 38.109756 | 80 | 0.568756 | false | 4.143411 | false | false | false |
Featuretools/featuretools | featuretools/tests/utils_tests/test_list_primitives.py | 1 | 1228 | from featuretools import list_primitives
from featuretools.primitives import (
Day,
GreaterThan,
Last,
NumCharacters,
get_aggregation_primitives,
get_transform_primitives
)
from featuretools.primitives.utils import _get_descriptions
def test_list_primitives_order():
df = list_primitives()
... | bsd-3-clause | -1,712,432,361,529,430,500 | 34.085714 | 97 | 0.666938 | false | 4.093333 | false | false | false |
m4rx9/rna-pdb-tools | rna_tools/tools/PyMOL4RNA/PyMOL4Spliceosome.py | 2 | 11183 | """
See the PyMOL Sessions processed with this code here <https://github.com/mmagnus/PyMOL4Spliceosome>
"""
from pymol import cmd
from rna_tools.tools.PyMOL4RNA import code_for_color_spl
from rna_tools.tools.PyMOL4RNA import code_for_spl
try:
from pymol import cmd
except ImportError:
print("PyMOL Python lib is... | mit | -8,813,542,898,538,824,000 | 33.622291 | 100 | 0.582223 | false | 2.773562 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.