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 |
|---|---|---|---|---|---|---|---|---|---|---|
peterm-itr/edx-platform | cms/djangoapps/contentstore/views/tests/test_group_configurations.py | 8 | 23216 | """
Group Configuration Tests.
"""
import json
from mock import patch
from contentstore.utils import reverse_course_url, reverse_usage_url
from contentstore.views.component import SPLIT_TEST_COMPONENT_TYPE
from contentstore.views.course import GroupConfiguration
from contentstore.tests.utils import CourseTestCase
from ... | agpl-3.0 | 8,852,526,276,621,919,000 | 36.749593 | 129 | 0.590412 | false |
eagleamon/home-assistant | homeassistant/components/device_tracker/aruba.py | 13 | 4464 | """
Support for Aruba Access Points.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/device_tracker.aruba/
"""
import logging
import re
import threading
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validati... | apache-2.0 | 3,901,769,087,074,137,600 | 31.347826 | 77 | 0.584677 | false |
niekas/Hack4LT | src/hack4lt/views/task.py | 1 | 8643 | from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse_lazy
from django.http import HttpResponseRedirect, Http404
from django.shortcuts import render
from django.views.generic import CreateView, UpdateView, DeleteView, ListView, DetailView
from hack4lt.forms import (
... | bsd-3-clause | -7,714,819,966,082,569,000 | 34.134146 | 104 | 0.662154 | false |
hashems/Mobile-Cloud-Development-Projects | appengine/flexible/endpoints/main_test.py | 11 | 2188 | # Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -2,409,759,580,056,539,000 | 25.682927 | 74 | 0.607861 | false |
urrego093/proyecto_mv | applications/admin/languages/pl.py | 17 | 15944 | # -*- coding: utf-8 -*-
{
'!langcode!': 'pl',
'!langname!': 'Polska',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"Uaktualnij" jest dodatkowym wyrażeniem postaci "pole1=\'nowawartość\'". Nie możesz uaktualnić lub usunąć wyników z JOIN:',
'%Y-%m-%d... | gpl-3.0 | 868,159,826,881,448,100 | 55.505415 | 707 | 0.729491 | false |
takahashiminoru/ryu | ryu/lib/packet/packet_utils.py | 23 | 4603 | # Copyright (C) 2012 Nippon Telegraph and Telephone Corporation.
#
# 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 appli... | apache-2.0 | 8,283,459,835,302,272,000 | 32.59854 | 72 | 0.383446 | false |
alfredgamulo/cloud-custodian | tools/c7n_azure/tests_azure/test_utils_ip_range_helper.py | 2 | 3534 | # Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
import pytest
from .azure_common import BaseTest, cassette_name
from c7n_azure.utils import IpRangeHelper
from netaddr import IPRange, IPSet
class IpRangeHelperTest(BaseTest):
def test_empty(self):
data = {'whatever': []}
... | apache-2.0 | -4,204,049,722,132,447,000 | 42.62963 | 95 | 0.616582 | false |
erinspace/osf.io | osf/models/quickfiles.py | 5 | 2494 | from __future__ import unicode_literals
import logging
from osf.models.node import AbstractNode, AbstractNodeManager
from website.exceptions import NodeStateError
logger = logging.getLogger(__name__)
class QuickFilesNodeManager(AbstractNodeManager):
def create_for_user(self, user):
possessive_title =... | apache-2.0 | 4,468,670,767,913,228,000 | 29.790123 | 102 | 0.661588 | false |
diofant/diofant | diofant/domains/field.py | 1 | 1562 | """Implementation of :class:`Field` class."""
from .ring import CommutativeRing
class Field(CommutativeRing):
"""Represents a field domain."""
is_Field = True
@property
def ring(self):
raise AttributeError(f'there is no ring associated with {self}')
@property
def field(self):
... | bsd-3-clause | -3,026,501,311,636,222,500 | 24.606557 | 73 | 0.516645 | false |
westphahl/verleihsystem | verleihsystem/contact/views.py | 1 | 1790 | from django.shortcuts import render_to_response, redirect
from django.template import RequestContext
from django.core.mail import EmailMessage
from django.core.urlresolvers import reverse
from django.conf import settings
from contact.forms import ContactForm
def contact_form(request):
"""
Displays and proces... | isc | 6,255,350,618,332,268,000 | 36.291667 | 80 | 0.606704 | false |
gregdek/ansible | test/units/modules/net_tools/nios/test_nios_ptr_record.py | 49 | 6659 | # This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed in the hope that ... | gpl-3.0 | -2,033,535,488,815,220,200 | 37.051429 | 153 | 0.577114 | false |
Belxjander/Kirito | Python-3.5.0-Amiga/Lib/test/test_ipaddress.py | 6 | 83267 | # Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
"""Unittest for ipaddress module."""
import unittest
import re
import contextlib
import functools
import operator
import pickle
import ipaddress
import weakref
class BaseTestCase(unittest.TestCase):
# One big change in ipaddress ove... | gpl-3.0 | -7,343,013,277,948,015,000 | 43.173475 | 80 | 0.585574 | false |
mollstam/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/reportlab-3.2.0/docs/userguide/ch7_custom.py | 16 | 2670 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/docs/userguide/ch7_custom.py
from tools.docco.rl_doc_utils import *
heading1("Writing your own $Flowable$ Objects")
disc("""
Flowables are intended to... | mit | 826,627,433,552,622,300 | 31.962963 | 117 | 0.741948 | false |
Northrend/mxnet | example/sparse/matrix_factorization/data.py | 9 | 2524 | # 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 | -3,642,792,981,543,736,300 | 39.709677 | 99 | 0.635499 | false |
google-coral/pycoral | pycoral/learn/backprop/softmax_regression.py | 1 | 6303 | # Lint as: python3
# pylint:disable=g-doc-args,g-short-docstring-punctuation,g-no-space-after-docstring-summary
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#... | apache-2.0 | 7,578,411,613,842,141,000 | 43.076923 | 92 | 0.676503 | false |
pixelrebel/st2 | st2common/st2common/util/system_info.py | 10 | 1118 | # Licensed to the StackStorm, Inc ('StackStorm') 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 th... | apache-2.0 | 4,820,010,311,632,731,000 | 29.216216 | 74 | 0.709302 | false |
j5shi/Thruster | pylibs/ctypes/test/test_arrays.py | 1 | 4390 | import unittest
from ctypes import *
formats = "bBhHiIlLqQfd"
formats = c_byte, c_ubyte, c_short, c_ushort, c_int, c_uint, \
c_long, c_ulonglong, c_float, c_double, c_longdouble
class ArrayTestCase(unittest.TestCase):
def test_simple(self):
# create classes holding simple numeric type... | gpl-2.0 | 2,558,275,818,208,471,000 | 30.761194 | 74 | 0.530752 | false |
ScottBuchanan/eden | modules/tests/volunteer/create_volunteer_programme.py | 27 | 2099 | """ Sahana Eden Automated Test - HRM001 Create a Volunteer Programme
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
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 ... | mit | -2,989,896,398,113,434,000 | 40.176471 | 110 | 0.661744 | false |
pyKun/rally | rally/plugins/common/runners/rps.py | 3 | 8341 | # Copyright 2014: Mirantis 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 b... | apache-2.0 | 7,961,433,140,420,070,000 | 38.530806 | 79 | 0.591536 | false |
hryamzik/ansible | lib/ansible/modules/network/cnos/cnos_factory.py | 10 | 5299 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
#
# Copyright (C) 2017 Lenovo, Inc.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Licens... | gpl-3.0 | 2,922,102,385,127,597,000 | 33.633987 | 139 | 0.701264 | false |
LarsMichelsen/pmatic | doc/conf.py | 2 | 8509 | # -*- coding: utf-8 -*-
#
# pmatic documentation build configuration file, created by
# sphinx-quickstart on Wed Jan 6 14:59:43 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# Al... | gpl-2.0 | -8,543,716,869,542,141,000 | 30.054745 | 79 | 0.704548 | false |
j00bar/ansible | lib/ansible/modules/cloud/ovirt/ovirt_vmpools_facts.py | 26 | 3381 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2016 Red Hat, Inc.
#
# This file is part of Ansible
#
# Ansible 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
#... | gpl-3.0 | 453,567,739,846,116,900 | 30.598131 | 136 | 0.649216 | false |
doismellburning/django | tests/utils_tests/test_dateparse.py | 10 | 4611 | from __future__ import unicode_literals
from datetime import date, time, datetime, timedelta
import unittest
from django.utils.dateparse import parse_date, parse_time, parse_datetime, parse_duration
from django.utils.timezone import get_fixed_timezone
class DateParseTests(unittest.TestCase):
def test_parse_dat... | bsd-3-clause | 8,716,992,072,791,329,000 | 51.397727 | 107 | 0.664932 | false |
LaoZhongGu/kbengine | kbe/res/scripts/common/Lib/sre_parse.py | 4 | 28518 | #
# Secret Labs' Regular Expression Engine
#
# convert re-style regular expression to sre pattern
#
# Copyright (c) 1998-2001 by Secret Labs AB. All rights reserved.
#
# See the sre.py file for information on usage and redistribution.
#
"""Internal support module for sre"""
# XXX: show string offset and offending ch... | lgpl-3.0 | 6,969,117,105,192,253,000 | 33.483676 | 81 | 0.460481 | false |
brahmaroutu/test-infra | gubernator/github/admin.py | 22 | 4483 | # Copyright 2016 The Kubernetes 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 ... | apache-2.0 | -2,501,444,223,143,768,000 | 31.722628 | 98 | 0.656257 | false |
caseyrollins/osf.io | api/base/metrics.py | 1 | 5367 | import re
from datetime import timedelta
import waffle
from django.utils import timezone
from api.base.exceptions import InvalidQueryStringError
from osf import features
class MetricsViewMixin(object):
"""Mixin for views that expose metrics via django-elasticsearch-metrics.
Enables metrics to be requested w... | apache-2.0 | -7,549,455,710,052,056,000 | 39.659091 | 125 | 0.641327 | false |
rakuten-nlp/category2vec | word2vec.py | 2 | 42117 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2013 Radim Rehurek <me@radimrehurek.com>
# Licensed under the GNU LGPL v2.1 - http://www.gnu.org/licenses/lgpl.html
"""
Deep learning via word2vec's "skip-gram and CBOW models", using either
hierarchical softmax or negative sampling [1]_ [2]_.
The train... | lgpl-3.0 | 5,257,621,125,906,808,000 | 46.482525 | 167 | 0.586485 | false |
yutiansut/QUANTAXIS | QUANTAXIS_Test/QAFactor_Test/(日线)KDJ测试.py | 2 | 3982 | import jqdatasdk
import pandas as pd
import QUANTAXIS as QA
from QUANTAXIS.QAFactor.analyze import FactorAnalyzer
from QUANTAXIS.QAFactor.data import DataApi
import QUANTAXIS.QAFactor.preprocess as preprocess
import QUANTAXIS.QAFactor.tears as tears
import QUANTAXIS.QAFactor.utils as utils
jqdatasdk.auth("聚宽用户名", "聚宽... | mit | -6,047,993,971,646,748,000 | 31.215054 | 76 | 0.642523 | false |
halvertoluke/edx-platform | lms/djangoapps/instructor_task/subtasks.py | 52 | 27541 | """
This module contains celery task functions for handling the management of subtasks.
"""
from time import time
import json
from uuid import uuid4
import psutil
from contextlib import contextmanager
import logging
from celery.states import SUCCESS, READY_STATES, RETRY
import dogstats_wrapper as dog_stats_api
from d... | agpl-3.0 | -5,704,662,597,960,257,000 | 45.758913 | 134 | 0.683563 | false |
kumarsaurabh20/NGShelper | NGS/get_split_position.py | 1 | 2754 | ##
# pysam.cigar: the tuple [ (0,3), (1,5), (0,2) ] refers to an alignment with 3 matches, 5 insertions and another 2 matches.
# @ args min_gap is a parameter that specifies the length of the softclip/split
# in order for the function get_split_positions to return it as a valid split.
# e.g. min_gap =3 returns all bre... | gpl-3.0 | -7,358,448,829,402,011,000 | 36.739726 | 123 | 0.619826 | false |
tommo/gii | support/waf/waflib/Tools/tex.py | 2 | 12261 | #!/usr/bin/env python
# encoding: utf-8
# Thomas Nagy, 2006-2010 (ita)
"""
TeX/LaTeX/PDFLaTeX/XeLaTeX support
Example::
def configure(conf):
conf.load('tex')
if not conf.env.LATEX:
conf.fatal('The program LaTex is required')
def build(bld):
bld(
features = 'tex',
type = 'latex', # pdflatex or x... | mit | 3,294,641,004,977,396,000 | 27.447796 | 158 | 0.646277 | false |
reviewboard/rbintegrations | rbintegrations/basechat/integration.py | 1 | 23215 | """Integration for chat integrations"""
from __future__ import unicode_literals
import logging
from djblets.db.query import get_object_or_none
from djblets.util.templatetags.djblets_utils import user_displayname
from reviewboard.accounts.models import Trophy
from reviewboard.admin.server import build_server_url
from ... | mit | -313,616,565,035,736,900 | 36.809446 | 79 | 0.525393 | false |
biocommons/hgvs-eval | hgvseval/tests/test_hgvs.py | 1 | 1235 | import requests
import json
from urlparse import urljoin
def test_info(endpoint):
"""Tests the info endpoint for the given service."""
url = urljoin(endpoint, 'info')
print "Testing HGVS service info endpoint on: {}".format(url)
res = requests.get(url)
print res.json()
assert 1 == 1
def test... | apache-2.0 | 387,591,595,150,731,500 | 29.875 | 78 | 0.558704 | false |
randynobx/ansible | lib/ansible/modules/net_tools/dnsmadeeasy.py | 13 | 24115 | #!/usr/bin/python
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distributed... | gpl-3.0 | 5,070,027,334,570,364,000 | 31.809524 | 149 | 0.613809 | false |
mohamedhagag/community-addons | openeducat_erp/op_assignment/op_assignment.py | 1 | 2507 | # -*- coding: utf-8 -*-
###############################################################################
#
# Tech-Receptives Solutions Pvt. Ltd.
# Copyright (C) 2009-TODAY Tech-Receptives(<http://www.techreceptives.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the... | agpl-3.0 | 6,984,240,560,048,603,000 | 40.098361 | 79 | 0.633426 | false |
olivierdalang/QGIS | tests/src/python/test_qgscoordinateoperationwidget.py | 15 | 13325 | # -*- coding: utf-8 -*-
"""QGIS Unit tests for TestQgsCoordinateOperationWidget
.. note:: This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any late... | gpl-2.0 | -7,518,137,030,179,104,000 | 76.47093 | 495 | 0.683902 | false |
onceuponatimeforever/oh-mainline | vendor/packages/sphinx/sphinx/environment.py | 15 | 70053 | # -*- coding: utf-8 -*-
"""
sphinx.environment
~~~~~~~~~~~~~~~~~~
Global creation environment.
:copyright: Copyright 2007-2013 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import re
import os
import sys
import time
import types
import codecs
import imghdr
import st... | agpl-3.0 | 3,677,243,080,164,542,000 | 41.456364 | 80 | 0.527401 | false |
eammx/proyectosWeb | proyectoPython/env/lib/python3.6/site-packages/pip/_vendor/ipaddress.py | 30 | 79875 | # Copyright 2007 Google Inc.
# Licensed to PSF under a Contributor Agreement.
"""A fast, lightweight IPv4/IPv6 manipulation library in Python.
This library is used to create/poke/manipulate IPv4 and IPv6 addresses
and networks.
"""
from __future__ import unicode_literals
import itertools
import struct
__version... | mit | -6,162,644,266,291,629,000 | 32.006198 | 86 | 0.56815 | false |
LeSam/avoplot | Plugins/FTIR/src/avoplot_ftir_plugin/ftir_spectrum.py | 3 | 14519 | import wx
import csv
import os
import os.path
import math
from scipy.special import erf
import scipy
import scipy.optimize
import numpy
from avoplot import plugins, series, controls, subplots
from avoplot.persist import PersistentStorage
from avoplot.plugins import AvoPlotPluginSimple
from avoplot.subplots import AvoPl... | gpl-3.0 | -7,008,206,764,611,855,000 | 35.206983 | 120 | 0.611199 | false |
GStreamer/cerbero | test/test_cerbero_packages_packagesstore.py | 4 | 5233 | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 | -1,453,116,195,399,778,300 | 36.378571 | 77 | 0.674374 | false |
manipopopo/tensorflow | tensorflow/contrib/distribute/python/warm_starting_util_test.py | 5 | 3758 | # 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 | 3,203,496,606,041,416,700 | 37.742268 | 80 | 0.686003 | false |
denys-duchier/django | tests/model_fields/test_filefield.py | 45 | 3039 | import os
import sys
import unittest
from django.core.files import temp
from django.core.files.uploadedfile import TemporaryUploadedFile
from django.db.utils import IntegrityError
from django.test import TestCase, override_settings
from .models import Document
class FileFieldTests(TestCase):
def test_clearable... | bsd-3-clause | -6,198,713,363,209,987,000 | 34.752941 | 98 | 0.638697 | false |
isabelvillaruiz/ptavi-pfinal | uaserver.py | 1 | 6607 | #!/usr/bin/python3
# -*- coding: utf-8 -*-
"""USER AGENT SERVER."""
import socket
import socketserver
import sys
import os
from xml.sax import make_parser
from xml.sax.handler import ContentHandler
import time
"""READING AND EXTRACTION OF XML DATA."""
if len(sys.argv) != 2:
sys.exit("Usage: python uaserver.py c... | gpl-2.0 | -3,415,550,420,387,668,000 | 36.931034 | 79 | 0.485606 | false |
qnib/QNIBCollect | src/diamond/collectors/gearman_stats/gearman_stats.py | 6 | 3463 | # coding=utf-8
"""
Port of the ganglia gearman collector
Collects stats from gearman job server
#### Dependencies
* gearman
"""
from diamond.collector import str_to_bool
import diamond.collector
import os
import subprocess
import time
try:
import gearman
except ImportError:
gearman = None
class Gearma... | apache-2.0 | 1,728,892,256,037,856,300 | 31.669811 | 108 | 0.549524 | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_memory_reuse_exclude_feed_var.py | 4 | 2329 | # Copyright (c) 2019 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | 8,878,942,396,434,879,000 | 34.287879 | 77 | 0.648347 | false |
myusuf3/vincent | examples/line_chart_examples.py | 2 | 1979 | # -*- coding: utf-8 -*-
"""
Vincent Line Examples
"""
#Build a Line Chart from scratch
from vincent import *
import pandas.io.data as web
all_data = {}
for ticker in ['AAPL', 'GOOG', 'IBM', 'YHOO', 'MSFT']:
all_data[ticker] = web.get_data_yahoo(ticker, '1/1/2010', '1/1/2013')
price = pd.DataFrame({tic: data['Ad... | mit | 2,007,897,327,809,592,800 | 33.12069 | 75 | 0.593734 | false |
shanot/imp | modules/container/test/test_close_pairs_score_state.py | 2 | 5501 | from __future__ import print_function
import IMP
import IMP.test
import IMP.core
import IMP.algebra
import IMP.container
import random
class Tests(IMP.test.TestCase):
def _are_close(self, m, a, b, d):
da = IMP.core.XYZR(m, a)
db = IMP.core.XYZR(m, b)
cd = IMP.core.get_distance(da, db)
... | gpl-3.0 | -5,174,504,393,116,856,000 | 38.292857 | 140 | 0.497364 | false |
0be1/ansible | v2/ansible/plugins/cache/memcached.py | 26 | 5898 | # (c) 2014, Brian Coca, Josh Drake, et al
#
# This file is part of Ansible
#
# Ansible 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.
... | gpl-3.0 | -2,421,996,697,769,090,000 | 29.879581 | 96 | 0.620888 | false |
ashang/calibre | src/calibre/ebooks/oeb/polish/main.py | 11 | 10814 | #!/usr/bin/env python2
# vim:fileencoding=UTF-8:ts=4:sw=4:sta:et:sts=4:fdm=marker:ai
from __future__ import (unicode_literals, division, absolute_import,
print_function)
__license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
__docformat__ = 'restructuredtext en'
... | gpl-3.0 | 5,445,007,646,269,031,000 | 33.43949 | 106 | 0.638524 | false |
peuyeum/peuyeum | apps/models/prov.py | 2 | 1470 | import sys
import pymongo
import time
sys.path.append('../../')
from lib import config
conn = pymongo.MongoClient(config.mongohost, config.mongoport)
db = conn.klinik
def getProfile(UID):
db.profile
return db.profile.find_one({"uid":UID})
def isProfileExist(UID):
if getProfile(UID)== None:
return False
else:... | agpl-3.0 | -3,901,274,143,539,796,500 | 23.516667 | 192 | 0.707483 | false |
solvery/lang-features | python/network/dhcp_1/dhcp_base.py | 1 | 1558 | #
# DHCP Base Structure
#
# @Author : iver Liu
#
import socket
import struct
from uuid import getnode as get_mac
from random import randint
def getMacInBytes():
mac = str(hex(get_mac()))
mac = mac[2:]
while len(mac) < 12:
mac = '0' + mac
macb = b''
for i in range(0,12,2):
... | gpl-2.0 | -413,482,002,627,418,400 | 19.5 | 79 | 0.552632 | false |
HyukjinKwon/spark | examples/src/main/python/ml/rformula_example.py | 27 | 1481 | #
# 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 us... | apache-2.0 | -7,980,254,608,035,620,000 | 31.911111 | 74 | 0.671843 | false |
khosrow/metpx | pxStats/lib/BackwardReader.py | 1 | 7727 | #! /usr/bin/env python
"""
##############################################################################
##
##
## @name : backwardReader.py
##
## @license : MetPX Copyright (C) 2004-2006 Environment Canada
## MetPX comes with ABSOLUTELY NO WARRANTY; For details type see the file
## named C... | gpl-2.0 | 3,711,916,463,053,660,700 | 39.036269 | 111 | 0.376213 | false |
ucsd-lo-group/social-network-analysis | dataprocessing/notecard2st_weights.py | 1 | 2944 | # notecard2st.py
# turns notecard format csv to source,target format csv
import sys
import re
from itertools import groupby
# distribute lines into source,target format
# takes lines from stdin (format n1,n2,n3,...nm)
# returns formatted lines to stdout
# (format n1,n2 <line break> n1,n3 <line break> ... n1,nm <line... | mit | 137,775,241,673,863,230 | 25.061947 | 90 | 0.644022 | false |
ellisonbg/nbgrader | nbgrader/preprocessors/execute.py | 1 | 1094 | from nbconvert.preprocessors import ExecutePreprocessor
from traitlets import Bool, List
from textwrap import dedent
from . import NbGraderPreprocessor
class UnresponsiveKernelError(Exception):
pass
class Execute(NbGraderPreprocessor, ExecutePreprocessor):
interrupt_on_timeout = Bool(True)
allow_errors... | bsd-3-clause | -1,926,327,517,012,041,000 | 32.151515 | 77 | 0.666362 | false |
JingheZ/shogun | examples/undocumented/python_modular/kernel_simple_locality_improved_string_modular.py | 26 | 1027 | #!/usr/bin/env python
from tools.load import LoadMatrix
lm=LoadMatrix()
traindat = lm.load_dna('../data/fm_train_dna.dat')
testdat = lm.load_dna('../data/fm_test_dna.dat')
parameter_list = [[traindat,testdat,5,5,1],[traindat,testdat,5,3,2]]
def kernel_simple_locality_improved_string_modular (fm_train_dna=traindat,fm_... | gpl-3.0 | -7,032,150,948,050,990,000 | 33.233333 | 94 | 0.76631 | false |
pozetroninc/micropython | tests/basics/string_count.py | 18 | 1288 | try:
str.count
except AttributeError:
print("SKIP")
raise SystemExit
print("".count(""))
print("".count("a"))
print("a".count(""))
print("a".count("a"))
print("a".count("b"))
print("b".count("a"))
print("aaa".count(""))
print("aaa".count("a"))
print("aaa".count("aa"))
print("aaa".count("aaa"))
print("aaa"... | mit | 2,608,261,781,602,174,500 | 20.830508 | 40 | 0.592391 | false |
ycool/apollo | modules/tools/replay/replay_file.py | 3 | 3847 | #!/usr/bin/env python
###############################################################################
# Copyright 2017 The Apollo 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 ... | apache-2.0 | -2,618,580,213,110,320,000 | 33.348214 | 79 | 0.580452 | false |
ynfin/Skynet | scripts/getCurrentNames.py | 1 | 2100 | import os
import sys
from lxml import etree
import time
skynetFiles_lower = []
skynetFiles = []
for path, subdirs, files in os.walk('/home/pi/var/www/disk/skynet'):
for name in files:
if name.endswith('.mp4'):
skynetFiles_lower.append(name.lower())
skynetFiles.append(os.path.join(path... | apache-2.0 | -2,144,172,082,374,635,800 | 31.8125 | 83 | 0.688095 | false |
bitpay/bitpay-python | examples/test_merchant_facade.py | 1 | 3843 | from bitpay.exceptions import *
import bitpay.key_utils as bku
from bitpay.client import *
import pprint
import requests
import json
import os.path
import sys
#API_HOST = "https://bitpay.com" #for production, live bitcoin
API_HOST = "https://test.bitpay.com" #for testing, testnet bitcoin
KEY_FILE = "tmp/key.priv"
TOKE... | mit | 1,352,606,894,807,645,400 | 33.3125 | 164 | 0.644288 | false |
yb-kim/osSim | script/micro.nSet.py | 1 | 4967 | import sys
import datetime
import os
from subprocess import call
import re
nCores = [i for i in range(10, 110, 10)] + [i for i in range(150, 1050, 50)]
nSets = [1, 2, 4, 8, 16, 32, 64, 128]
ipcCosts = [(3, 17, 17)]
nServices = 4 #except NS
configFilePath = '/home/ybkim/workspace/osSim/config/aim7_shared'
outFilePat... | mit | -5,662,840,301,564,728,000 | 37.207692 | 148 | 0.521643 | false |
ScreamingUdder/mantid | scripts/SANS/sans/state/state_functions.py | 3 | 4652 | """Set of general purpose functions which are related to the SANSState approach."""
from __future__ import (absolute_import, division, print_function)
from sans.common.enums import (DetectorType)
from sans.common.xml_parsing import (get_monitor_names_from_idf_file, get_named_elements_from_ipf_file)
# --------------... | gpl-3.0 | -6,352,856,074,351,242,000 | 41.678899 | 120 | 0.650688 | false |
zeratul2099/plist-qt | dialogs.py | 1 | 30532 | # -*- coding: utf-8 -*-
# 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 ho... | gpl-3.0 | -4,817,067,510,547,112,000 | 42.730659 | 213 | 0.617645 | false |
danielbair/aeneas | aeneas/tools/__init__.py | 5 | 1174 | #!/usr/bin/env python
# coding=utf-8
# aeneas is a Python/C library and a set of tools
# to automagically synchronize audio and text (aka forced alignment)
#
# Copyright (C) 2012-2013, Alberto Pettarin (www.albertopettarin.it)
# Copyright (C) 2013-2015, ReadBeyond Srl (www.readbeyond.it)
# Copyright (C) 2015-2017, A... | agpl-3.0 | 8,642,295,671,707,423,000 | 40.928571 | 77 | 0.75724 | false |
sderrick57/adaTRHsensor | examples/encoder/callback_encoder.py | 3 | 1638 | #!/usr/bin/env python
__author__ = 'Copyright (c) 2015 Alan Yorinks All rights reserved.'
"""
Copyright (c) 2015 Alan Yorinks All rights reserved.
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; e... | gpl-3.0 | 3,604,275,254,451,445,000 | 23.818182 | 101 | 0.742979 | false |
ojengwa/oh-mainline | vendor/packages/docutils/test/test_transforms/test_peps.py | 19 | 1698 | #! /usr/bin/env python
# $Id: test_peps.py 4564 2006-05-21 20:44:42Z wiemann $
# Author: David Goodger <goodger@python.org>
# Copyright: This module has been placed in the public domain.
"""
Tests for docutils.transforms.peps.
"""
from __init__ import DocutilsTestSupport
from docutils.transforms.peps import TargetNo... | agpl-3.0 | 2,306,113,506,760,102,000 | 24.727273 | 78 | 0.635453 | false |
mikel-egana-aranguren/SADI-Galaxy-Docker | galaxy-dist/eggs/numpy-1.6.0-py2.7-linux-x86_64-ucs4.egg/numpy/testing/noseclasses.py | 27 | 14194 | # These classes implement a doctest runner plugin for nose, a "known failure"
# error class, and a customized TestProgram for NumPy.
# Because this module imports nose directly, it should not
# be used except by nosetester.py to avoid a general NumPy
# dependency on nose.
import os
import doctest
import nose
from no... | gpl-3.0 | 7,707,504,016,922,917,000 | 39.438746 | 87 | 0.590249 | false |
lichia/luigi | test/recursion_test.py | 22 | 1624 | # -*- coding: utf-8 -*-
#
# Copyright 2012-2015 Spotify AB
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | -5,870,679,033,862,082,000 | 28.527273 | 92 | 0.678571 | false |
viewfinderco/viewfinder | backend/www/test/auth_facebook_test.py | 13 | 11384 | #!/usr/bin/env python
#
# Copyright 2012 Viewfinder Inc. All Rights Reserved.
"""Account authorization tests for Facebook and Facebook accounts.
"""
__authors__ = ['spencer@emailscrubbed.com (Spencer Kimball)',
'andy@emailscrubbed.com (Andrew Kimball)']
import json
import mock
import os
import time
im... | apache-2.0 | -4,707,444,648,159,269,000 | 46.433333 | 115 | 0.651353 | false |
dmsurti/mayavi | mayavi/modules/api.py | 2 | 1134 | """ Defines the publicly accessible Mayavi2 modules.
"""
# Author: Frederic Petit and Prabhu Ramachandran
# Copyright (c) 2007-2015, Enthought, Inc.
# License: BSD Style.
from .axes import Axes
from .contour_grid_plane import ContourGridPlane
from .custom_grid_plane import CustomGridPlane
from .generic_module impor... | bsd-3-clause | 2,150,115,056,638,627,300 | 32.352941 | 58 | 0.826279 | false |
nathaliaspatricio/febracev | blog/tests.py | 4 | 1962 | """
>>> from django.test import Client
>>> from basic.blog.models import Post, Category
>>> import datetime
>>> from django.core.urlresolvers import reverse
>>> client = Client()
>>> category = Category(title='Django', slug='django')
>>> category.save()
>>> category2 = Category(title='Rails', slug='rails')
>>> categor... | gpl-2.0 | -1,170,170,518,746,329,300 | 28.727273 | 141 | 0.66055 | false |
powertomato/heuOpt_2017_G1 | ThreadRunner.py | 1 | 4499 | from multiprocessing import Process, Lock
import sys
import os
import copy
from argparse import ArgumentParser
from argparse import RawDescriptionHelpFormatter
from model.graph import Graph
from BEP_Visualizer.BEP_visualizer import View
from solvers.construction.DepthFirstVertexOrder import *
from solvers.construction... | mit | -5,412,681,166,571,444,000 | 35.290323 | 166 | 0.647477 | false |
MziRintu/kitsune | kitsune/products/admin.py | 12 | 1523 | from django.contrib import admin
from kitsune.products.models import Platform, Product, Topic, Version
class ProductAdmin(admin.ModelAdmin):
list_display = ('title', 'slug', 'display_order', 'visible')
list_display_links = ('title', 'slug')
list_editable = ('display_order', 'visible')
readonly_fields... | bsd-3-clause | -4,337,025,609,275,909,000 | 32.108696 | 76 | 0.634274 | false |
mikmakmuk/syncevolution_n9 | test/runtests.py | 1 | 93413 | #!/usr/bin/python
"""
The general idea is that tests to run are defined as a list of
actions. Each action has a unique name and can depend on other
actions to have run successfully before.
Most work is executed in directories defined and owned by these
actions. The framework only manages one directory which represen... | gpl-2.0 | 8,382,379,755,905,109,000 | 52.501145 | 311 | 0.515613 | false |
hoxm/plnpl | python/projects/flask-RESTful/flask-restful.py | 1 | 1709 | from flask import Flask, make_response, jsonify
from flask.ext.restful import Api, Resource, reqparse
from flask.ext.httpauth import HTTPBasicAuth
auth = HTTPBasicAuth()
@auth.verify_password
def get_password(username, password):
if username == 'root' and password == 'root':
return True
return False
... | gpl-2.0 | -2,806,749,462,204,202,000 | 30.648148 | 75 | 0.61849 | false |
yuezh/WALinuxAgent | tests/upload_status_blob.py | 8 | 1516 | #!/usr/bin/env python
#
# Copyright 2014 Microsoft Corporation
#
# 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 | 1,808,277,896,528,227,300 | 34.255814 | 75 | 0.73153 | false |
erwan-lemonnier/klue-client-server | pymacaron_core/swagger/server.py | 1 | 7857 | import jsonschema
import logging
import uuid
from functools import wraps
from werkzeug.exceptions import BadRequest
from flask import request, jsonify
from flask_cors import cross_origin
from pymacaron_core.exceptions import PyMacaronCoreException, ValidationError, add_error_handlers
from pymacaron_core.utils import ge... | bsd-3-clause | -5,619,763,255,751,647,000 | 37.89604 | 130 | 0.625302 | false |
UManPychron/pychron | pychron/image/tasks/video_pane.py | 2 | 3953 | # ===============================================================================
# Copyright 2013 Jake Ross
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses... | apache-2.0 | -1,488,579,738,736,277,500 | 27.854015 | 81 | 0.570959 | false |
tricky-duck/pyth | test_add_channel.py | 1 | 2100 | # -*- coding: utf-8 -*-
from selenium.webdriver.firefox.webdriver import WebDriver
from selenium.webdriver.common.action_chains import ActionChains
import time, unittest
def is_alert_present(wd):
try:
wd.switch_to_alert().text
return True
except:
return False
class test_add_channel(uni... | apache-2.0 | -1,398,138,600,721,384,000 | 39.647059 | 82 | 0.61698 | false |
zhengwsh/InplusTrader_Linux | InplusTrader/backtestEngine/utils/scheduler.py | 1 | 9086 | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | mit | 8,981,379,791,192,020,000 | 35.256 | 115 | 0.623566 | false |
grembo/buildbot | master/buildbot/test/unit/test_db_migrate_versions_048_change_properties_to_text.py | 10 | 2864 | # 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 eve... | gpl-2.0 | -4,133,184,959,068,521,000 | 34.8 | 95 | 0.648394 | false |
mahmoudShaheen/PyMedox | packages/pythonSQL.py | 1 | 7381 | #!/usr/bin/env python
#################################
# @author: Mahmoud Shaheen #
# MedicalBox IOT Project #
# python-MYSQL interface #
#################################
import sqlite3
import data #to use data using data.x 'change occurs here is limited to here'
from time import strftime
import ... | mit | 2,889,561,314,581,735,400 | 28.177866 | 123 | 0.669286 | false |
Juraci/tempest | tempest/api/compute/floating_ips/test_floating_ips_actions_negative.py | 9 | 4249 | # Copyright 2012 OpenStack Foundation
# 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 requ... | apache-2.0 | -1,418,141,405,024,298,800 | 39.466667 | 79 | 0.655448 | false |
kenrobbins/tardyrush | tardyrush/helpers/filters.py | 1 | 3154 | import re
import pytz
import urllib
import datetime
import teams
from babel import dates
from jinja2 import evalcontextfilter, Markup, escape
from flaskext.babel import format_datetime, to_user_timezone
from tardyrush import app
from flask.ext.wtf import HiddenField
_paragraph_re = re.compile(r'(?:\r\n|\r|\n){2,}')
@... | mit | 6,351,483,888,426,617,000 | 29.326923 | 77 | 0.625555 | false |
Morphux/installer | pkgs/shadow_p2/shadow_p2.py | 1 | 3361 | ################################### LICENSE ####################################
# Copyright 2016 Morphux #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); ... | apache-2.0 | 2,872,644,432,494,339,000 | 45.041096 | 137 | 0.469206 | false |
RichHelle/data-science-from-scratch | first-edition/code-python3/mapreduce.py | 12 | 5556 | import math, random, re, datetime
from collections import defaultdict, Counter
from functools import partial
from naive_bayes import tokenize
def word_count_old(documents):
"""word count not using MapReduce"""
return Counter(word
for document in documents
for word in tokenize(document))
def wc... | unlicense | 456,885,410,025,940,860 | 28.870968 | 76 | 0.613751 | false |
shahbazn/neutron | neutron/tests/unit/extensions/test_dns.py | 11 | 22297 | # Copyright 2015 Rackspace
#
# 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 t... | apache-2.0 | -6,871,615,773,267,328,000 | 46.541578 | 79 | 0.525586 | false |
sahana/Turkey | modules/s3/sync_adapter/ccrm.py | 8 | 13047 | # -*- coding: utf-8 -*-
""" S3 Synchronization: Peer Repository Adapter
@copyright: 2012-14 (c) Sahana Software Foundation
@license: MIT
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 th... | mit | -8,122,125,277,936,852,000 | 35.141274 | 96 | 0.478961 | false |
jaredly/pyjamas | library/pyjamas/ui/PasswordTextBox.py | 4 | 1219 | # Copyright 2006 James Tauber and contributors
# Copyright (C) 2009 Luke Kenneth Casson Leighton <lkcl@lkcl.net>
#
# 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/... | apache-2.0 | 3,784,743,705,021,941,000 | 37.09375 | 74 | 0.719442 | false |
skoenen/pyprol | tests/test_configuration.py | 1 | 2476 | from unittest import TestCase
from pyprol import configuration
try:
from urllib.parse import urlparse
except ImportError:
from urlparse import urlparse
class ConfigurationTestCase(TestCase):
def assertHasAttribute(self, obj, attr):
self.assertTrue(hasattr(obj, attr))
def setUp(self):
... | bsd-3-clause | -5,591,257,489,140,779,000 | 34.884058 | 104 | 0.641761 | false |
realsobek/freeipa | ipaclient/plugins/ca.py | 2 | 1405 | #
# Copyright (C) 2016 FreeIPA Contributors see COPYING for license
#
import base64
from ipaclient.frontend import MethodOverride
from ipalib import util, x509, Str
from ipalib.plugable import Registry
from ipalib.text import _
register = Registry()
class WithCertOutArgs(MethodOverride):
takes_options = (
... | gpl-3.0 | -7,137,457,535,440,251,000 | 25.509434 | 79 | 0.592883 | false |
kernsuite-debian/lofar | CEP/Pipeline/recipes/sip/nodes/deprecated/demix/median_filter.py | 2 | 5224 | import os
import numpy as numpy
import math
from scipy import *
import scipy.signal as signal
def median_filter(ampl_tot, half_window, threshold):
q = 1.# 1.4826
ampl_tot_copy = numpy.copy(ampl_tot)
median_array = signal.medfilt(ampl_tot,half_window*2.-1)
# find the higher peaks
for i in r... | gpl-3.0 | 6,011,674,521,633,235,000 | 30.853659 | 73 | 0.602603 | false |
PennartLoettring/Poettrix | rootfs/usr/lib/python3.4/turtledemo/__main__.py | 10 | 9375 | #!/usr/bin/env python3
import sys
import os
from tkinter import *
from idlelib.Percolator import Percolator
from idlelib.ColorDelegator import ColorDelegator
from idlelib.textView import view_file # TextViewer
from importlib import reload
import turtle
import time
demo_dir = os.path.dirname(os.path.abspath(__file__)... | gpl-2.0 | -7,332,869,846,169,399,000 | 34.244361 | 88 | 0.55584 | false |
janusnic/shoop | shoop_tests/notify/test_template.py | 7 | 1867 | # -*- coding: utf-8 -*-
# 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 __future__ import unicode_literals
import pytest
from shoop.notify impo... | agpl-3.0 | 8,751,488,560,616,650,000 | 38.723404 | 95 | 0.724156 | false |
davidcoallier/blaze | blaze/datashape/tests/test_parser.py | 2 | 3726 | from blaze.datashape import *
from blaze.datashape.parse import parse, load
from blaze.datashape.record import RecordDecl, derived
from textwrap import dedent
from unittest import skip
def test_simple_parse():
x = parse('800, 600, RGBA')
y = parse('Enum (1,2)')
z = parse('300 , 400, Record(x=int64, y=int... | bsd-2-clause | 7,589,067,548,018,870,000 | 21.581818 | 60 | 0.566023 | false |
keisuke-umezawa/chainer | chainer/training/extensions/evaluator.py | 2 | 9532 | import copy
import warnings
import six
from chainer import backend
from chainer import configuration
from chainer.dataset import convert
from chainer.dataset import iterator as iterator_module
from chainer import function
from chainer import iterators
from chainer import link
from chainer import reporter as reporter_... | mit | 7,844,293,341,900,906,000 | 39.05042 | 79 | 0.635229 | false |
ambv/django-crystal-big | setup.py | 1 | 2332 | # -*- encoding: utf-8 -*-
# Copyright (C) 2010 LangaCore
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, version 3 of the License.
#
# This program is distributed in the hope that it will be u... | lgpl-3.0 | 6,208,730,846,566,288,000 | 37.229508 | 89 | 0.649657 | false |
grace-/opencv-3.0.0-cvpr | opencv/samples/python2/distrans.py | 7 | 1401 | #!/usr/bin/env python
'''
Distance transform sample.
Usage:
distrans.py [<image>]
Keys:
ESC - exit
v - toggle voronoi mode
'''
import numpy as np
import cv2
import cv2.cv as cv
from common import make_cmap
if __name__ == '__main__':
import sys
try: fn = sys.argv[1]
except: fn = '../cpp/fru... | bsd-3-clause | -3,762,765,117,320,447,000 | 21.238095 | 79 | 0.556031 | false |
destijl/forensicartifacts | frontend/thirdparty/networkx-1.9/examples/advanced/eigenvalues.py | 16 | 1086 | #!/usr/bin/env python
"""
Create an G{n,m} random graph and compute the eigenvalues.
Requires numpy or LinearAlgebra package from Numeric Python.
Uses optional pylab plotting to produce histogram of eigenvalues.
"""
__author__ = """Aric Hagberg (hagberg@lanl.gov)"""
__credits__ = """"""
# Copyright (C) 2004-2006 ... | apache-2.0 | -2,577,404,059,253,888,500 | 21.625 | 65 | 0.696133 | false |
justingrayston/jaikuengine | common/messages.py | 34 | 3331 | # Copyright 2009 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 199,580,153,979,323,700 | 24.234848 | 74 | 0.603723 | 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.