repo_name stringlengths 5 100 | path stringlengths 4 299 | copies stringclasses 990
values | size stringlengths 4 7 | content stringlengths 666 1.03M | license stringclasses 15
values | hash int64 -9,223,351,895,964,839,000 9,223,297,778B | line_mean float64 3.17 100 | line_max int64 7 1k | alpha_frac float64 0.25 0.98 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
Endle/mtg_buyer | resolve.py | 1 | 1942 | from main import Item
import logging
from bs4 import BeautifulSoup
import copy
def _deeper(i, sons=1, pos=None):
'''只是向下挖一层'''
c = [k for k in i.contents if str(k).strip()]
assert(len(c) == sons)
if(sons == 1):
return c[0]
else:
return c[pos]
def _dewrap(li):
li = _deeper(li) ... | gpl-3.0 | -1,751,196,985,169,293,600 | 24.72973 | 70 | 0.5625 | false |
jenniew/BigDL | pyspark/bigdl/nn/layer.py | 1 | 166808 | #
# Copyright 2016 The BigDL Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | -3,741,591,936,649,356,000 | 34.911302 | 329 | 0.56794 | false |
sudasana/armcom2 | xp_loader.py | 2 | 9469 | # Changed slightly to be compatible with Python 3
from sys import platform
if platform == 'darwin':
import tcod as libtcod
elif platform == 'linux':
import libtcodpy_local as libtcod
else:
import libtcodpy as libtcod
import binascii
##################################
# In-memory XP format is as follows:
# Returned... | gpl-3.0 | -3,345,553,247,127,047,700 | 37.971193 | 177 | 0.672405 | false |
jaruba/chromium.src | tools/telemetry/telemetry/core/platform/mac_platform_backend_unittest.py | 12 | 1532 | # 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.
import os
import unittest
from telemetry import decorators
from telemetry.core import platform as platform_module
from telemetry.core.platform import platfo... | bsd-3-clause | 3,043,040,282,875,732,000 | 39.315789 | 72 | 0.722585 | false |
FluffyMortain/heekscnc | nc/hpgl2d_read.py | 28 | 3259 | import num_reader
import sys
import math
class Parser(num_reader.NumReader):
def __init__(self, writer):
num_reader.NumReader.__init__(self, writer)
self.i = 0
self.j = 0
self.x = 0
self.y = 0
self.down_z = 0
self.up_z = 20
self.up = Tr... | bsd-3-clause | 7,434,199,755,518,409,000 | 34.211111 | 165 | 0.419454 | false |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/asm_module.py | 1 | 12650 |
import sys, re, itertools
import shared, js_optimizer
class AsmModule():
def __init__(self, filename):
self.filename = filename
self.js = open(filename).read()
self.start_asm = self.js.find(js_optimizer.start_asm_marker)
self.start_funcs = self.js.find(js_optimizer.start_funcs_marker)
self.en... | bsd-2-clause | 3,567,093,845,589,277,700 | 36.315634 | 140 | 0.599368 | false |
rep/certificate-transparency | python/ct/crypto/verify.py | 1 | 9218 | """Verify CT log statements."""
import hashlib
import io
import struct
from ct.crypto import error
from ct.crypto import merkle
from ct.crypto import pem
from ct.proto import client_pb2
from ct.proto import ct_pb2
from ct.serialization import tls_message
import ecdsa
def decode_signature(signature):
"""Decode th... | apache-2.0 | 4,790,613,992,014,680,000 | 39.429825 | 80 | 0.580495 | false |
thunsaker/cloudpebble | ide/migrations/0001_initial.py | 3 | 12056 | # -*- 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 'Project'
db.create_table(u'ide_project', (
(u'id', self.gf('django.db.models.fie... | mit | -1,705,941,945,434,616,000 | 62.125654 | 187 | 0.584439 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/bx_python-0.7.2-py2.7-linux-x86_64-ucs4.egg/bx/align/tools/fuse.py | 7 | 2888 | """
Tools for fusing contiguous alignment blocks together.
"""
from itertools import *
from copy import deepcopy
def fuse_list( mafs ):
"""
Try to fuse a list of blocks by progressively fusing each adjacent pair.
"""
last = None
for m in mafs:
if last is None:
last = m
... | gpl-3.0 | 2,240,081,035,608,953,300 | 31.818182 | 166 | 0.614612 | false |
derekchiang/keystone | keystone/openstack/common/gettextutils.py | 2 | 16240 | # Copyright 2012 Red Hat, Inc.
# Copyright 2013 IBM Corp.
# 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.... | apache-2.0 | 5,540,851,499,754,961,000 | 38.513382 | 81 | 0.636515 | false |
maxkoryukov/headphones | lib/beetsplug/embedart.py | 14 | 9563 | # This file is part of beets.
# Copyright 2014, Adrian Sampson.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, ... | gpl-3.0 | -7,197,453,454,722,766,000 | 33.153571 | 79 | 0.586741 | false |
osoken/sqlite-tensor | doc/conf.py | 1 | 1305 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from sqlite_tensor import __author__, __version__, __package_name__
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.todo',
'sphinx.ext.viewcode',
'sphinx.ext.napoleon',
'sphinxcontrib.asyncio',
]
templates_path = ['_templates']
source_suffix = ['.r... | mit | -5,994,074,250,059,304,000 | 18.772727 | 71 | 0.622989 | false |
arne-cl/alt-mulig | crf-python/crfutils.py | 1 | 6193 | """
A miscellaneous utility for sequential labeling.
Copyright 2010,2011 Naoaki Okazaki.
"""
import optparse
import sys
def apply_templates(X, templates):
"""
Generate features for an item sequence by applying feature templates.
A feature template consists of a tuple of (name, offset) pairs,
where nam... | gpl-3.0 | -9,142,735,506,375,005,000 | 33.405556 | 83 | 0.570806 | false |
benfinke/ns_python | nssrc/com/citrix/netscaler/nitro/resource/config/cs/csvserver_spilloverpolicy_binding.py | 3 | 11328 | #
# Copyright (c) 2008-2015 Citrix Systems, 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 l... | apache-2.0 | 1,937,573,977,754,214,700 | 29.95082 | 211 | 0.716984 | false |
slyphon/pants | tests/python/pants_test/engine/exp/test_addressable.py | 1 | 10250 | # coding=utf-8
# Copyright 2015 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import unittest
fro... | apache-2.0 | 1,215,145,672,911,064,300 | 30.155015 | 94 | 0.678634 | false |
simphony/simphony-common | simphony/io/tests/abc_data_container_table_check.py | 1 | 10963 | import tempfile
import shutil
import os
import random
import uuid
import abc
from contextlib import closing, contextmanager
from collections import OrderedDict
import tables
from numpy.testing import assert_equal
from simphony.core import CUBA
from simphony.core.data_container import DataContainer
from simphony.io.da... | bsd-2-clause | 884,006,210,559,833,100 | 38.721014 | 76 | 0.580407 | false |
electrumalt/electrum-ixc | lib/tests/test_util.py | 18 | 3460 | import unittest
from lib.util import format_satoshis, parse_URI
class TestUtil(unittest.TestCase):
def test_format_satoshis(self):
result = format_satoshis(1234)
expected = "0.00001234"
self.assertEqual(expected, result)
def test_format_satoshis_diff_positive(self):
result = f... | gpl-3.0 | 1,588,218,002,876,656,400 | 52.230769 | 275 | 0.716474 | false |
Vavius/moai-framework | external/compile_layout.py | 1 | 10775 | #!/usr/bin/env python
import re, sys, os
import argparse
import json
import shutil, subprocess
# Lua code templates
bodyLua = """--------------------------------------------------------------------------------
-- %s
--
-- WARNING: Do not edit!
-- This file is auto generated, all changes will be lost.
--------------... | mit | -7,365,049,202,083,208,000 | 34.215686 | 150 | 0.547842 | false |
sserrot/champion_relationships | venv/Lib/site-packages/win32/test/test_win32api.py | 1 | 8797 | # General test module for win32api - please add some :)
import unittest
from pywin32_testutil import str2bytes
import win32api, win32con, win32event, winerror
import sys, os
import tempfile
import datetime
class CurrentUserTestCase(unittest.TestCase):
def testGetCurrentUser(self):
name = "%s\\%s" % (win3... | mit | 4,030,860,234,814,456,300 | 42.334975 | 115 | 0.605093 | false |
larsjsol/shellpic | setup.py | 1 | 1319 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
#
# Lars Jørgen Solberg <supersolberg@gmail.com> 2014
#
from distutils.core import setup
setup(
name='Shellpic',
version='1.6.2',
author='Lars Jørgen Solberg',
author_email='supersolberg@gmail.com',
packages=['shellpic'],
scripts=['bin/shellpic']... | gpl-3.0 | 2,271,304,520,621,388,500 | 30.357143 | 75 | 0.589218 | false |
djkskqyr3/CSipSimple | jni/pjsip/sources/tests/pjsua/scripts-sipp/transfer-attended.py | 14 | 1239 | # $Id: transfer-attended.py 4188 2012-06-29 09:01:17Z nanang $
#
import inc_const as const
PJSUA = ["--null-audio", # UA0
"--null-audio", # UA1
"--null-audio" # UA2
]
PJSUA_EXPECTS = [
# A calls B
[0, "", "m"],
[0, "", "$PJSUA_URI[1]"],
[0, const.STATE_CALLING, ""],
[1, const.EVENT_INCOM... | lgpl-3.0 | 1,098,058,397,780,436,900 | 22.826923 | 62 | 0.481033 | false |
brake/python-utl | setup.py | 1 | 2357 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# ------------------------------------------------------------------------------
# Name: setup.py
# Package:
# Project: utl
#
# Created: 18.12.16 21:04
# Copyright 2016 © Constantin Roganov
# License: The MIT License
# ---------------------------------------... | mit | 4,021,895,776,785,961,000 | 38.932203 | 80 | 0.631579 | false |
kchodorow/tensorflow | tensorflow/python/lib/io/tf_record.py | 21 | 3821 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 4,660,489,711,548,110,000 | 28.392308 | 80 | 0.681497 | false |
TightSquad/HABIP | pi/spi/spi.py | 1 | 2191 | """
author: Connor Goldberg
project: High Altitude Balloon Instrumentation Platform
description: SPI Interface
"""
import spidev
import common
import logger
class spi(object):
"""
Abstract the Pi's SPI interface
"""
def __init__(self, busIndex=0, deviceIndex=0, maxSpeed=150000, logDebug=False):
self.logger =... | gpl-3.0 | -2,193,306,540,012,061,200 | 20.480392 | 80 | 0.666819 | false |
hellhound/dentexchange | dentexchange/apps/membership/tests/test_coupon_validation_view.py | 2 | 2822 | # -*- coding:utf-8 -*-
import unittest
import mock
from ..views import CouponValidationView
class CouponValidationViewTestCase(unittest.TestCase):
@mock.patch('membership.views.Coupon')
@mock.patch('membership.views.JSONResponseMixin.render_json_response')
def test_get_should_call_render_json_response_wi... | bsd-3-clause | -5,178,683,904,700,829,000 | 37.135135 | 104 | 0.652374 | false |
THEMVFFINMAN/Python-Games | PyneSweeper.py | 2 | 5628 | import curses
from random import randint
# Setting up the curses screen
screen = curses.initscr()
curses.noecho()
curses.curs_set(2)
screen.keypad(1)
def createBoard():
#Clearly the most efficient way to initiate this
board = [ ['+', '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', '+'],
['A', '_', '_', '... | mit | 3,310,621,568,635,824,000 | 25.299065 | 100 | 0.512971 | false |
mythmon/kitsune | kitsune/users/views.py | 3 | 28373 | import os
from ast import literal_eval
from datetime import datetime
from django.conf import settings
from django.contrib import auth, messages
from django.contrib.auth.models import User
from django.contrib.auth.tokens import default_token_generator
from django.contrib.sites.models import Site
from django.core.except... | bsd-3-clause | 794,880,186,914,389,800 | 35.236271 | 133 | 0.626018 | false |
rackerlabs/quark | quark/tests/plugin_modules/test_ports.py | 1 | 91255 | # Copyright 2013 Rackspace Hosting Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applic... | apache-2.0 | 3,451,333,421,162,092,000 | 44.696044 | 79 | 0.54969 | false |
quantumlib/Cirq | cirq-google/cirq_google/line/placement/chip.py | 1 | 2533 | # Copyright 2018 The Cirq Developers
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | -7,775,776,244,764,378,000 | 25.385417 | 78 | 0.66364 | false |
c0deh4xor/CapTipper | CTPlugin.py | 7 | 2361 | #
# CapTipper is a malicious HTTP traffic explorer tool
# By Omri Herscovici <omriher AT gmail.com>
# http://omriher.com
# @omriher
#
#
# This file is part of CapTipper, and part of the Whatype library
# Whatype is an independent file type identification python libr... | gpl-3.0 | -1,616,008,007,180,516,600 | 29.662338 | 103 | 0.593816 | false |
Mause/dcputoolchain-module-site | tests/test_dtmm_utils.py | 1 | 6884 | # The MIT License (MIT)
# Copyright (c) 2013 Dominic May
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify,... | mit | 8,914,181,437,229,234,000 | 34.484536 | 140 | 0.593841 | false |
chuckharmston/ghosttown | app/search/classification/wikipedia.py | 1 | 2027 | from urllib.parse import urlencode, urlparse, urlunparse
import requests
from memorize import memorize
from memcached import memcached
from .base import BaseClassifier
class WikipediaClassifier(BaseClassifier):
"""
Classifier that is applied if the returned result is a Wikipedia article.
Adds:
abs... | mpl-2.0 | 8,694,191,756,906,397,000 | 28.808824 | 79 | 0.571288 | false |
anlambert/tulip | library/talipot-python/plugins/layout/H3Layout.py | 1 | 3415 | # Copyright (C) 2019 The Talipot developers
#
# Talipot is a fork of Tulip, created by David Auber
# and the Tulip development Team from LaBRI, University of Bordeaux
#
# See the AUTHORS file at the top-level directory of this distribution
# License: GNU General Public License version 3, or any later version
# See top... | lgpl-3.0 | -1,614,473,418,251,960,800 | 33.846939 | 79 | 0.667643 | false |
ahmed-aalhaj/django-cpanel | django-cpanel.py | 1 | 1361 | #!/usr/bin/python3
"""
Welcome to Django helper - a small script to help you test your Django project easily
By: Ahmed Alhaj.
github.com/ahmedXalhaj
"""
import os, sys
#Important: Change proj_directory to where your project is located
proj_directory = os.getcwd()
sys.path.extend([proj_directory])
working=True
while... | gpl-3.0 | 2,271,277,100,131,071,200 | 24.679245 | 101 | 0.579721 | false |
udoprog/ontv | ontv/action/list.py | 1 | 1266 | import datetime
from ..utils import has_aired_filter
from ..format import format_episodes_count
from ..format import format_episodes_count_legend
def series_name_key(s):
return s['series_name']
def action(ns):
ns.out(ns.t.bold_magenta(u"Series you are currently watching"))
ns.out(u"")
now = dateti... | gpl-3.0 | -5,983,885,762,306,351,000 | 24.32 | 67 | 0.590837 | false |
cutoffthetop/zeit.content.image | src/zeit/content/image/browser/tests/test_image.py | 1 | 3254 | import ZODB.utils
import os.path
import unittest
import zeit.cms.testing
import zeit.content.image.testing
class TestDelete(zeit.cms.testing.BrowserTestCase):
"""Test correct registration of delete views for images.
This test must be done on an image (rather testcontent), since the adapter
lookup was non... | bsd-3-clause | -5,436,951,450,482,950,000 | 34.758242 | 79 | 0.636447 | false |
XingHeStudio/xDisplayAtHome | Other.libs/Rtmplite/siprtmp.py | 1 | 90472 | # Copyright (c) 2007-2009, Mamta Singh. All rights reserved. See LICENSING for details.
# Copyright (c) 2010-2011, Kundan Singh.
'''
Introduction
------------
The goal of this project is to allow multimedia calls from Flash Player to SIP network and vice-versa. This allows either a
web browser or a standalone AIR-base... | gpl-2.0 | -4,745,211,580,218,919,000 | 66.215453 | 393 | 0.647637 | false |
lenoch/tagsetbench | 3rdparty/python/shlex.py | 1 | 11671 | """A lexical analyzer class for simple shell-like syntaxes."""
# Module and documentation by Eric S. Raymond, 21 Dec 1998
# Input stacking and error message cleanup added by ESR, March 2000
# push_source() and pop_source() made explicit by ESR, January 2001.
# Posix compliance, split(), string arguments, and
# iterato... | mit | 29,509,348,548,850,196 | 34.953704 | 77 | 0.493862 | false |
andyxhadji/incubator-airflow | airflow/operators/s3_file_transform_operator.py | 4 | 6750 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 4,949,567,757,155,156,000 | 41.993631 | 88 | 0.638519 | false |
anthropo-lab/XP | sens_et_travail_project/redirect/views.py | 1 | 8538 | from otree.api import Currency as c, currency_range
from . import models
from ._builtin import Page, WaitPage
from .models import Constants, RedirectionManager
from django.http import HttpResponse, HttpResponseRedirect
from django.views.generic import TemplateView
from django.shortcuts import render
from django.http i... | gpl-3.0 | 3,616,413,761,281,950,700 | 36.27193 | 106 | 0.598729 | false |
robingall2910/RobTheBoat | commands/information.py | 1 | 19328 | import os
import socket
import datetime
import time
import traceback
from discord.ext import commands
from utils.tools import *
from utils.logger import log
from utils.unicode import *
from utils.config import Config
from usps import USPSApi
from fedex.services.track_service import FedexTrackRequest
fro... | mit | 9,213,162,191,118,445,000 | 47.060914 | 676 | 0.575486 | false |
cprov/snapcraft | tests/unit/test_options.py | 3 | 10604 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016-2018 Canonical Ltd
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 3 as
# published by the Free Software Foundation.
#
# This program is distributed in ... | gpl-3.0 | 6,656,563,746,960,375,000 | 35.947735 | 88 | 0.566862 | false |
GenericStudent/home-assistant | homeassistant/components/harman_kardon_avr/media_player.py | 14 | 3346 | """Support for interface with an Harman/Kardon or JBL AVR."""
import hkavr
import voluptuous as vol
from homeassistant.components.media_player import PLATFORM_SCHEMA, MediaPlayerEntity
from homeassistant.components.media_player.const import (
SUPPORT_SELECT_SOURCE,
SUPPORT_TURN_OFF,
SUPPORT_TURN_ON,
SU... | apache-2.0 | 3,908,575,964,110,652,000 | 24.937984 | 84 | 0.61327 | false |
simonwydooghe/ansible | test/units/modules/network/fortios/test_fortios_user_device_category.py | 21 | 8037 | # Copyright 2019 Fortinet, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the... | gpl-3.0 | 6,451,249,012,014,730,000 | 35.69863 | 142 | 0.653975 | false |
marios-zindilis/musicbrainz-django-models | musicbrainz_django_models/models/l_release_group_release_group.py | 1 | 2249 | """
.. module:: l_release_group_release_group
The **L Release Group Release Group** Model.
PostgreSQL Definition
---------------------
The :code:`l_release_group_release_group` table is defined in the MusicBrainz Server as:
.. code-block:: sql
CREATE TABLE l_release_group_release_group ( -- replicate
i... | gpl-2.0 | 3,216,969,509,217,047,600 | 37.118644 | 88 | 0.663851 | false |
alonho/logbook | logbook/more.py | 3 | 14393 | # -*- coding: utf-8 -*-
"""
logbook.more
~~~~~~~~~~~~
Fancy stuff for logbook.
:copyright: (c) 2010 by Armin Ronacher, Georg Brandl.
:license: BSD, see LICENSE for more details.
"""
import re
import os
from collections import defaultdict
from cgi import parse_qsl
from logbook.base import RecordDi... | bsd-3-clause | 8,318,399,578,049,945,000 | 34.272059 | 125 | 0.621152 | false |
Lysxia/dissemin | dissemin/settings/common.py | 1 | 9232 | # -*- encoding: utf-8 -*-
# Dissemin: open access policy enforcement tool
# Copyright (C) 2014 Antonin Delpeuch
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the Licen... | agpl-3.0 | 6,541,271,561,845,858,000 | 31.027778 | 189 | 0.671509 | false |
ressu/SickGear | lib/shove/store/zodb.py | 3 | 1202 | # -*- coding: utf-8 -*-
'''
Zope Object Database store frontend.
shove's psuedo-URL for ZODB stores follows the form:
zodb:<path>
Where the path is a URL path to a ZODB FileStorage database. Alternatively, a
native pathname to a ZODB database can be passed as the 'engine' argument.
'''
try:
import transaction
... | gpl-3.0 | -6,133,945,084,229,217,000 | 24.041667 | 77 | 0.638103 | false |
elitest/mitmproxy | test/test_cmdline.py | 16 | 3441 | import argparse
from libmproxy import cmdline
import tutils
def test_parse_replace_hook():
x = cmdline.parse_replace_hook("/foo/bar/voing")
assert x == ("foo", "bar", "voing")
x = cmdline.parse_replace_hook("/foo/bar/vo/ing/")
assert x == ("foo", "bar", "vo/ing/")
x = cmdline.parse_replace_hook(... | mit | 4,864,075,088,720,568,000 | 24.488889 | 80 | 0.584133 | false |
jneves/awsfabrictasks | awsfabrictasks/hostslist.py | 2 | 1454 | from awsfabrictasks.utils import sudo_upload_string_to_file
hostsfile_template = """
127.0.0.1 localhost
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
{custom_host... | bsd-3-clause | -861,856,165,845,763,600 | 31.311111 | 90 | 0.707015 | false |
omarocegueda/dipy | dipy/align/imwarp.py | 3 | 62384 | """ Classes and functions for Symmetric Diffeomorphic Registration """
from __future__ import print_function
import abc
from dipy.utils.six import with_metaclass
import numpy as np
import numpy.linalg as npl
import scipy as sp
import nibabel as nib
from dipy.align import vector_fields as vfu
from dipy.align import fl... | bsd-3-clause | -5,623,101,186,973,737,000 | 41.582935 | 79 | 0.602895 | false |
Nikea/VisTrails | vistrails/core/system/__init__.py | 2 | 14245 | ###############################################################################
##
## Copyright (C) 2011-2014, NYU-Poly.
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary for... | bsd-3-clause | -543,454,255,651,092,200 | 32.051044 | 83 | 0.635872 | false |
mulkieran/anaconda | pyanaconda/ui/gui/spokes/datetime_spoke.py | 6 | 39276 | # Datetime configuration spoke class
#
# Copyright (C) 2012-2013 Red Hat, Inc.
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program i... | gpl-2.0 | 6,774,794,064,002,626,000 | 34.193548 | 109 | 0.602556 | false |
kickstandproject/asterisk-testsuite-temporary | tests/bridge/atxfer_nominal/transfer.py | 3 | 4667 | #!/usr/bin/env python
'''
Copyright (C) 2013, Digium, Inc.
Matt Jordan <mjordan@digium.com>
This program is free software, distributed under the terms of
the GNU General Public License Version 2.
'''
import sys
import logging
sys.path.append("lib/python")
from version import AsteriskVersion
LOGGER = logging.getLogg... | gpl-2.0 | -8,971,531,841,085,130,000 | 34.356061 | 86 | 0.634883 | false |
mjenrungrot/competitive_programming | UVa Online Judge/10500.py | 1 | 1742 | # =============================================================================
# Author: Teerapat Jenrungrot - https://github.com/mjenrungrot/
# FileName: 10500.py
# Description: UVa Online Judge - 10500
# =============================================================================
def f(board... | mit | -240,404,931,939,146,530 | 31.277778 | 79 | 0.41504 | false |
inares/edx-platform | lms/lib/xblock/test/test_mixin.py | 11 | 14498 | """
Tests of the LMS XBlock Mixin
"""
import ddt
from xblock.validation import ValidationMessage
from xmodule.modulestore import ModuleStoreEnum
from xmodule.modulestore.tests.factories import CourseFactory, ToyCourseFactory, ItemFactory
from xmodule.modulestore.tests.django_utils import ModuleStoreTestCase, TEST_DATA... | agpl-3.0 | -3,216,552,329,690,785,000 | 40.541547 | 120 | 0.64264 | false |
mith1979/ansible_automation | applied_python/applied_python/lib/python2.7/site-packages/pylint/reporters/ureports/__init__.py | 3 | 3558 | # copyright 2003-2015 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
#
# This file is part of pylint.
#
# pylint is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Fre... | apache-2.0 | 6,371,420,976,397,837,000 | 32.566038 | 81 | 0.624227 | false |
kyleabeauchamp/pymbar | setup.py | 3 | 5145 | """
The pymbar package contains the pymbar suite of tools for the analysis of
simulated and experimental data with the multistate Bennett acceptance
ratio (MBAR) estimator.
"""
#from distutils.sysconfig import get_config_var
from distutils.core import setup, Extension
from setuptools import setup, Extension
import num... | lgpl-2.1 | 2,325,693,704,332,234,000 | 34.482759 | 122 | 0.569096 | false |
CGATOxford/Optic | Optic/WrapperBl2Seq.py | 1 | 5775 | ##########################################################################
#
# MRC FGU Computational Genomics Group
#
# $Id$
#
# Copyright (C) 2009 Andreas Heger
#
# 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 ... | mit | 2,278,739,067,990,019,800 | 28.166667 | 110 | 0.561732 | false |
ntuecon/server | pyenv/Lib/site-packages/pythonwin/pywin/framework/sgrepmdi.py | 2 | 19175 | #SGrepMDI is by Gordon McMillan (gmcm@hypernet.com)
#It does basically what Find In Files does in MSVC with a couple enhancements.
# - It saves any directories in the app's ini file (if you want to get rid
# of them you'll have to edit the file)
# - "Directories" can be directories,
# - semicolon separated lists... | bsd-3-clause | -6,305,385,083,322,870,000 | 34.179245 | 195 | 0.651786 | false |
crossbario/autobahn-testsuite | autobahntestsuite/autobahntestsuite/case/case9_5_3.py | 2 | 1128 | ###############################################################################
##
## Copyright (c) Crossbar.io Technologies GmbH
##
## 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... | apache-2.0 | 7,409,975,711,324,653,000 | 38.285714 | 125 | 0.591312 | false |
mansenfranzen/tssim | tssim/core/series.py | 1 | 3770 | """This module contains the TimeSeries"""
import itertools
import pandas as pd
from bokeh.palettes import Category10
from bokeh.plotting import figure, show, save
from . import track
class TimeSeriesResult:
"""Contains the result of generated TimeTrack instance. Provides convenient
plotting functions to vi... | mit | 3,622,098,269,315,808,000 | 28.224806 | 80 | 0.603714 | false |
evanphx/yoke | src/VBox/Additions/common/crOpenGL/tsfuncs.py | 22 | 1065 | # Copyright (c) 2001, Stanford University
# All rights reserved.
#
# See the file LICENSE.txt for information on redistributing this software.
import sys
import apiutil
apiutil.CopyrightC()
print """
/* DO NOT EDIT - THIS FILE GENERATED BY THE tsfuncs.py SCRIPT */
#include "stub.h"
"""
keys = apiutil.GetDispatch... | gpl-2.0 | -8,223,986,496,108,026,000 | 22.152174 | 114 | 0.68169 | false |
stamen/maptcha-v2 | edit_ui/relative_time.py | 1 | 2415 | #http://jehiah.cz/download/relativeDates.py.txt
import datetime
def ungettext(a,b,count):
if count:
return b
return a
def ugettext(a):
return a
def timesince(d, now=None):
"""
Takes two datetime objects and returns the time between d and now
as a nicely formatted string, e.g. "10... | isc | -6,009,420,817,337,678,000 | 37.349206 | 94 | 0.596273 | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/openmdao.main-0.13.0-py2.7.egg/openmdao/main/test/test_caseiter.py | 1 | 1422 | import unittest
from openmdao.lib.casehandlers.listcase import ListCaseIterator
from openmdao.main.api import Case
from openmdao.main.uncertain_distributions import NormalDistribution
from openmdao.main.caseiter import caseiter_to_dict
from openmdao.main.container import _get_entry_group
class CaseIterTestCase(unitte... | gpl-2.0 | -1,051,742,229,240,915,800 | 32.069767 | 75 | 0.609001 | false |
sendgrid/sendgrid-python | examples/user/user.py | 1 | 7790 | import sendgrid
import os
sg = sendgrid.SendGridAPIClient(os.environ.get('SENDGRID_API_KEY'))
##################################################
# Get a user's account information. #
# GET /user/account #
response = sg.client.user.account.get()
print(response.status_code)
print(response.body)
print(response.headers... | mit | 6,187,842,547,047,629,000 | 25.228956 | 78 | 0.605648 | false |
lawzou/shoop | shoop/core/taxing/_price.py | 6 | 1025 | # This file is part of Shoop.
#
# Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.
#
# This source code is licensed under the AGPLv3 license found in the
# LICENSE file in the root directory of this source tree.
from shoop.core.pricing import TaxfulPrice, TaxlessPrice
class TaxedPrice(object):
def __init_... | agpl-3.0 | -7,750,720,185,673,848,000 | 31.03125 | 76 | 0.639024 | false |
aam-at/tensorflow | tensorflow/python/framework/function.py | 5 | 48384 | # 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 | -2,418,835,701,187,961,000 | 34.760532 | 107 | 0.657387 | false |
ccnmtl/lettuce | lettuce/plugins/jsonreport_output.py | 5 | 7304 | from datetime import datetime
import json
from lettuce import world
from lettuce.terrain import after, before
def enable(filename=None):
filename = filename or "lettucetests.json"
@before.all
def before_all():
"""
Set `world._started` to `datetime.now()` to track total duration.
... | gpl-3.0 | -5,063,138,215,552,236,000 | 31.035088 | 98 | 0.551068 | false |
tumi8/INSALATA | src/insalata/planning/MetricFFParser.py | 1 | 1064 | from insalata.planning.PlanParserBase import PlanParserBase
class MetricFFParser(PlanParserBase):
"""
Get an ordered execution plan of functions based on the plan file of Metric-FF.
Keyword arguments:
objects -- A dictionary with all objects associated with the name used for them in the plan.
... | apache-2.0 | -6,602,416,881,586,127,000 | 43.375 | 118 | 0.660714 | false |
La0/mozilla-relengapi | src/pulselistener/pulselistener/monitoring.py | 1 | 7418 | # -*- coding: utf-8 -*-
import asyncio
from datetime import datetime
from datetime import timedelta
import structlog
from taskcluster.utils import slugId
from taskcluster.utils import stringDate
from pulselistener import taskcluster
logger = structlog.get_logger(__name__)
GROUP_MD = '''
## {}
{:.2f}% of all tasks... | mpl-2.0 | 6,226,449,121,037,669,000 | 31.535088 | 121 | 0.565921 | false |
PietroPasotti/MACH | utils/preprocess.py | 1 | 7335 |
import bs4 as _bs
import nltk as _nltk
from os.path import isfile as _isfile
_default_entity_threshold = 0.5
def html_filter(path):
"""
If path is a path, opens it, cleans html and returns str.
If path is a str, cleans html and returns str.
"""
rawtext = ''
if _isfile(path):
with open(path,'rb') as f:
... | agpl-3.0 | 8,110,119,708,750,118,000 | 24.206186 | 93 | 0.63122 | false |
osspeak/osspeak | osspeak/settings.py | 1 | 2271 | import os
import logging
import json
import clargs
import sys
OSSPEAK_DIRECTORY = os.path.join(os.path.expanduser('~'), '.osspeak')
EXECUTABLE_DIRECTORY = os.path.split(os.path.abspath(sys.argv[0]))[0]
OSSPEAK_CONFIG_PATH = 'settings.json' if os.path.exists('settings.json') else os.path.join(OSSPEAK_DIRECTORY, 'settin... | mit | -6,921,688,107,281,642,000 | 32.397059 | 126 | 0.673712 | false |
boada/HETDEXCluster | legacy/analysis/plot_fullKnowledge.py | 2 | 2805 | import pylab as pyl
import h5py as hdf
from addHaloInfo import find_indices_single
from scipy import stats
def scatterDensity(ax, xdat, ydat, extent, bins=[50,50], thresh=3):
hh, locx, locy = pyl.histogram2d(xdat, ydat, range=extent, bins=bins)
posx = pyl.digitize(xdat, locx)
posy = pyl.digitize(ydat, loc... | mit | -6,135,495,927,693,497,000 | 28.526316 | 78 | 0.636007 | false |
dhalleine/tensorflow | tensorflow/contrib/learn/python/learn/estimators/autoencoder.py | 7 | 5322 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -4,095,204,240,839,011,000 | 41.238095 | 91 | 0.66103 | false |
jordotech/satchmofork | satchmo/apps/satchmo_store/contact/admin.py | 13 | 1899 | from satchmo_store.contact.models import Organization, Contact, Interaction, PhoneNumber, AddressBook, ContactOrganization, ContactOrganizationRole, ContactRole, ContactInteractionType
from satchmo_utils.admin import AutocompleteAdmin
from django.contrib import admin
class Contact_Inline(admin.TabularInline):
mode... | bsd-3-clause | 8,549,085,110,135,235,000 | 35.519231 | 184 | 0.761453 | false |
reenberg/trytravis | tests/pantable/test_parse_table_list.py | 1 | 2148 | """
"""
from .context import parse_table_list
from panflute import *
def test_parse_table_list():
markdown = False
raw_table_list = [['1', '2'], ['3', '4']]
table_list_converted = parse_table_list(markdown, raw_table_list)
table_list_referenced = [TableRow(TableCell(Plain(Str('1'))), TableCell(Plain(... | gpl-3.0 | 3,231,691,761,925,771,000 | 60.371429 | 197 | 0.626164 | false |
tensorflow/models | research/lstm_object_detection/inputs/tf_sequence_example_decoder_test.py | 2 | 4820 | # 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 | 622,302,410,532,441,600 | 41.654867 | 80 | 0.625311 | false |
stdweird/aquilon | tests/broker/test_add_campus.py | 2 | 3088 | #!/usr/bin/env python2.6
# -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
# ex: set expandtab softtabstop=4 shiftwidth=4:
#
# Copyright (C) 2008,2009,2010,2011,2012,2013 Contributor
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License... | apache-2.0 | -3,567,419,043,071,977,000 | 36.204819 | 77 | 0.630505 | false |
NovaSquirrel/NovaTheSquirrel | tools/title/pb53.py | 3 | 9314 | #!/usr/bin/env python
from __future__ import division
"""
The compression format deals with 16-byte chunks considered as 8x8
pixel tiles with two bit planes. Possible formats are as follows:
* Ordinary tile: two blocks of 8 bytes
* 2-bit tile (colors 0 and 1 or 2 and 3):
a block of 8 bytes, then 8 bytes of $00 or ... | gpl-3.0 | 8,970,250,331,609,650,000 | 30.360269 | 86 | 0.547778 | false |
ajyoon/brown | doc/module_doc.py | 1 | 5430 | import re
import doc.doc_config as doc_config
from doc.utils import (first_or_none,
line_num_at,
previous_line_ending_index_from,
everything_in_indentation_block,
parse_general_text)
from doc.attribute_doc import AttributeDoc
f... | gpl-3.0 | -4,305,341,140,923,211,000 | 36.448276 | 81 | 0.496317 | false |
craftoid/sconcho | sconcho/gui/pattern_repeat_dialog.py | 1 | 3216 | # -*- coding: utf-8 -*-
########################################################################
#
# (c) 2009-2012 Markus Dittrich
#
# This program is free software; you can redistribute it
# and/or modify it under the terms of the GNU General Public
# License Version 3 as published by the Free Software Foundation.
#
#... | gpl-3.0 | 5,044,797,588,355,203,000 | 29.339623 | 75 | 0.574316 | false |
domob1812/huntercore | test/functional/rpc_rawtransaction.py | 1 | 21696 | #!/usr/bin/env python3
# Copyright (c) 2014-2017 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the rawtransaction RPCs.
Test the following RPCs:
- createrawtransaction
- signrawtransacti... | mit | -4,876,497,170,849,068,000 | 55.795812 | 233 | 0.654775 | false |
datalogics/scons | test/Repository/SConscript.py | 2 | 3620 | #!/usr/bin/env python
#
# __COPYRIGHT__
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
... | mit | 6,580,266,810,103,364,000 | 27.503937 | 73 | 0.636188 | false |
deniseschannon/rancher-compose | tests/integration/cattletest/core/test_service.py | 1 | 5774 | from common_fixtures import * # NOQA
from os import path
import os
import pytest
import cattle
import ConfigParser
@pytest.fixture(scope='session')
def client(admin_user_client, request):
try:
return cattle.from_env(url=os.environ['RANCHER_URL'],
access_key=os.environ['RA... | apache-2.0 | -1,413,051,527,604,582,100 | 24.213974 | 78 | 0.587461 | false |
HackerExperience/asynqp | src/asynqp/channel.py | 1 | 16321 | import asyncio
import re
from . import bases
from . import frames
from . import spec
from . import queue
from . import exchange
from . import message
from . import routing
from .exceptions import UndeliverableMessage
VALID_QUEUE_NAME_RE = re.compile(r'^(?!amq\.)(\w|[-.:])*$', flags=re.A)
VALID_EXCHANGE_NAME_RE = re.c... | mit | 59,513,056,076,001,260 | 38.807317 | 139 | 0.66779 | false |
mozilla/bedrock | lib/l10n_utils/management/commands/_fluent_templater.py | 6 | 1809 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from ._fluent import (
get_migration_context,
strip_whitespace,
trans_to_lang,
GETTEXT_RE,
TRANS_BLO... | mpl-2.0 | -6,121,289,217,726,026,000 | 33.132075 | 79 | 0.583195 | false |
pkilambi/ceilometer | ceilometer/alarm/rpc.py | 2 | 2461 | #
# Copyright 2013 eNovance <licensing@enovance.com>
#
# Authors: Mehdi Abaakouk <mehdi.abaakouk@enovance.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/l... | apache-2.0 | 1,028,771,583,186,684,700 | 36.861538 | 77 | 0.589191 | false |
ChengyuSong/xen-arm | tools/xm-test/tests/network/05_network_dom0_ping_pos.py | 42 | 1442 | #!/usr/bin/python
# Copyright (C) International Business Machines Corp., 2005
# Author: <dykman@us.ibm.com>
# Ping tests to dom0 interface
# - determines dom0 network
# - creates a single guest domain
# - sets up a single NIC on same subnet as dom0
# - conducts ping tests to the dom0 IP address.
# ping -c 1 -s ... | gpl-2.0 | -9,186,185,786,361,203,000 | 25.703704 | 75 | 0.628294 | false |
landism/pants | src/python/pants/backend/jvm/tasks/scaladoc_gen.py | 11 | 2435 | # coding=utf-8
# Copyright 2014 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
from pants.backend.j... | apache-2.0 | 4,697,154,759,604,350,000 | 35.343284 | 110 | 0.694867 | false |
sgraham/nope | tools/json_schema_compiler/cpp_type_generator.py | 3 | 11369 | # Copyright (c) 2012 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.
from code import Code
from model import PropertyType
import cpp_util
from json_parse import OrderedDict
import schema_util
class _TypeDependency(object)... | bsd-3-clause | -4,473,572,651,163,809,300 | 40.644689 | 80 | 0.632597 | false |
DeercoderCourse/cs231n | assignment2/cs231n/classifiers/convnet.py | 5 | 4193 | import numpy as np
from cs231n.layers import *
from cs231n.fast_layers import *
from cs231n.layer_utils import *
def two_layer_convnet(X, model, y=None, reg=0.0):
"""
Compute the loss and gradient for a simple two-layer ConvNet. The architecture
is conv-relu-pool-affine-softmax, where the conv layer uses strid... | apache-2.0 | 8,090,188,160,403,811,000 | 37.46789 | 88 | 0.686859 | false |
charlescearl/VirtualMesos | third_party/boto-2.0b2/boto/fps/connection.py | 4 | 7853 | # Copyright (c) 2008 Chris Moyer http://coredumped.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, ... | apache-2.0 | 2,692,012,762,430,975,000 | 42.38674 | 251 | 0.631224 | false |
crdoconnor/olympia | apps/users/views.py | 12 | 26509 | import functools
from datetime import datetime
from functools import partial
from django import http
from django.conf import settings
from django.contrib import auth
from django.contrib.auth.forms import PasswordResetForm
from django.contrib.auth.tokens import default_token_generator
from django.db import IntegrityErr... | bsd-3-clause | 8,681,261,902,699,199,000 | 35.313699 | 79 | 0.595911 | false |
Alecto3-D/testable-greeter | bb-master/sandbox/lib/python3.5/site-packages/buildbot/db/migrate/versions/049_add_schedulers_enabled.py | 11 | 1161 | # This file is part of Buildbot. Buildbot 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.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even... | mit | -821,195,806,334,519,400 | 37.7 | 79 | 0.74677 | false |
peterbe/django-semanticui-form | semanticuiform/templatetags/semanticui.py | 1 | 3411 | from django import forms
from django.template import Context
from django.template.loader import get_template
from django import template
from semanticuiform import config
register = template.Library()
@register.filter
def semanticui(element):
markup_classes = {'label': '', 'value': '', 'single_value': ''}
re... | bsd-3-clause | 5,753,463,180,729,247,000 | 31.485714 | 85 | 0.59484 | false |
Artanis/pygcui | pygcui/widgets.py | 1 | 13022 | """PygCUI widgets
Copyright (c) 2012, Erik Youngren
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions... | bsd-2-clause | -3,674,857,383,054,125,600 | 24.992016 | 121 | 0.593764 | false |
croeder/ccp_nlp | doc/src/main/python/doi.py | 1 | 1550 | #!/Library/Frameworks/Python.framework/Versions/3.3/bin/python
import urllib.request
import psycopg2
import sys
import time
### CRAPS OUT after a few minutes
# hits pubmed for converting pmids to dois
PMID="http://www.pubmedcentral.nih.gov/utils/idconv/v1.0/"
OPTIONS="&versions=no&format=csv"
# hits postgres for pmi... | bsd-3-clause | -8,782,411,980,336,529,000 | 25.724138 | 82 | 0.708387 | false |
codrut3/tensorflow | tensorflow/contrib/layers/python/layers/__init__.py | 57 | 1864 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,452,668,939,315,521,000 | 50.777778 | 80 | 0.769313 | false |
spodkowinski/cassandra-dtest | offline_tools_test.py | 3 | 21854 | import json
import os
import random
import re
import subprocess
from ccmlib import common
from ccmlib.node import ToolError
from dtest import Tester, debug, create_ks
from tools.decorators import since
class TestOfflineTools(Tester):
# In 2.0, we will get this error log message due to jamm not being
# in t... | apache-2.0 | 5,086,686,880,546,679,000 | 45.896996 | 157 | 0.62158 | false |
Subsets and Splits
Gradio Code Samples
Limits the results to entries containing the word 'gradio' in the repo_name, content, or path, providing a filtered subset of the dataset.