repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
jashandeep-sohi/pyds | docs/conf.py | 1 | 8535 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# pyds documentation build configuration file, created by
# sphinx-quickstart on Thu May 29 20:47:19 2014.
#
# 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
# autog... | gpl-3.0 | -6,161,528,037,825,426,000 | 30.036364 | 79 | 0.704979 | false |
modesttree/Projeny | Source/prj/main/PrjRunner.py | 1 | 7435 |
import sys
import os
import webbrowser
from mtm.util.Assert import *
import mtm.util.MiscUtil as MiscUtil
import mtm.util.PlatformUtil as PlatformUtil
from mtm.util.Platforms import Platforms
from mtm.util.CommonSettings import ConfigFileName
import mtm.ioc.Container as Container
from mtm.ioc.Inject import Inject
... | mit | 8,323,264,510,919,745,000 | 38.338624 | 331 | 0.681103 | false |
berkerpeksag/astor | astor/code_gen.py | 1 | 31784 | # -*- coding: utf-8 -*-
"""
Part of the astor library for Python AST manipulation.
License: 3-clause BSD
Copyright (c) 2008 Armin Ronacher
Copyright (c) 2012-2017 Patrick Maupin
Copyright (c) 2013-2017 Berker Peksag
This module converts an AST into Python source code.
Before being version-controlled as part of... | bsd-3-clause | 844,184,922,287,169,700 | 34.433668 | 89 | 0.56541 | false |
att-comdev/armada | armada/tests/unit/utils/test_source.py | 1 | 9206 | # Copyright 2017 The Armada 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 w... | apache-2.0 | -4,985,357,664,185,153,000 | 38.681034 | 79 | 0.644471 | false |
LiamBao/Spiders | LivePlatformIndex/douyuOnlineCount.py | 1 | 5918 | # -*- coding: utf-8 -*-
##__author__ =='liam'
# python3.52
import re,time,random
import requests
import tkinter as tk
from tkinter import filedialog
import xlsxwriter as wx
from lxml import etree
USER_AGENTS = [
"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; AcooBrowser; .NET CLR 1.1.4322; .NET CLR 2.0.5... | gpl-3.0 | 1,555,726,848,255,108,600 | 45.674603 | 248 | 0.584184 | false |
mrpau/kolibri | kolibri/core/content/serializers.py | 1 | 12418 | from django.db.models import Manager
from django.db.models import Sum
from django.db.models.query import RawQuerySet
from le_utils.constants import content_kinds
from rest_framework import serializers
from kolibri.core.content.models import ChannelMetadata
from kolibri.core.content.models import ContentNode
from kolib... | mit | -1,062,654,053,079,444,100 | 31.338542 | 119 | 0.614109 | false |
wbvalid/python2 | getVduNormal.py | 1 | 1309 | #!/usr/bin/python
import re
import time
import sys
import os
work_path = '/home/vpu_data'
def to_unix(date):
if len(date) < 14:
date = date + '0' * (14 - len(date))
return int(time.mktime(time.strptime(date, "%Y%m%d%H%M%S")))
def convert(file_name):
hex_num = re.findall(r'/(\w{16})_', file_name... | unlicense | 7,932,546,129,014,261,000 | 24.173077 | 110 | 0.556914 | false |
fifengine/fifengine | engine/python/fife/extensions/pychan/widgets/radiobutton.py | 1 | 4543 | # -*- coding: utf-8 -*-
# ####################################################################
# Copyright (C) 2005-2019 by the FIFE team
# http://www.fifengine.net
# This file is part of FIFE.
#
# FIFE is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
#... | lgpl-2.1 | 7,668,242,136,275,732,000 | 27.39375 | 79 | 0.625358 | false |
RobCranfill/miditrans | changer.py | 1 | 2952 | #!/usr/bin/python3
#
# Command-line app to write data for MPK mapper app
# Note that we want Python 3, not 2!
# robcranfill@gmail.com
import sys
SR18voiceNames_ = [
"kick",
"snare_1",
"snare_2",
"highhat_1",
"highhat_2",
"highhat_3",
"tom_1",
"tom_2",
... | gpl-2.0 | 4,290,177,914,641,355,300 | 27.114286 | 77 | 0.50542 | false |
amadeusproject/amadeuslms | dashboards/utils.py | 1 | 62643 | import calendar
import os
from datetime import date, datetime, timedelta
from django.utils import formats, timezone
from django.conf import settings
from django.utils.dateparse import parse_datetime
from django.core.urlresolvers import reverse
from django.utils.formats import get_format
from django.utils.translation im... | gpl-2.0 | -3,478,303,365,244,445,000 | 31.754055 | 272 | 0.532272 | false |
titusfortner/selenium | py/test/selenium/webdriver/common/form_handling_tests.py | 1 | 8158 | # Licensed to the Software Freedom Conservancy (SFC) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The SFC licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 7,101,352,740,135,982,000 | 33.714894 | 94 | 0.734984 | false |
mrozekma/Sprint | Retrospective.py | 1 | 1171 | from collections import OrderedDict
from Project import Project
from Sprint import Sprint
from utils import *
from stasis.ActiveRecord import ActiveRecord, link
DEFAULT_CATEGORIES = ['Product Management', 'Infrastructure', 'Teamwork', 'Release Planning', 'Scrum Process', 'Engineering Practices']
class Category(Acti... | mit | -6,562,437,916,365,981,000 | 22.897959 | 135 | 0.721605 | false |
asi-uniovi/malloovia | malloovia/lpsolver.py | 1 | 33503 | # coding: utf-8
# import pandas as pd
"""Malloovia interface to LP solver"""
from typing import Sequence, List, Any
from itertools import product as cartesian_product
from inspect import ismethod
from collections import namedtuple
from uuid import uuid4
import os
import pulp # type: ignore
from pulp import (
L... | mit | 121,577,441,597,928,210 | 38.83591 | 114 | 0.580622 | false |
lauregonnord/cap-labs | TP04/Mu-evalntype/MyMuTypingVisitor.py | 1 | 1555 | from MuVisitor import MuVisitor
from MuParser import MuParser
from enum import Enum
class MuTypeError(Exception):
pass
class BaseType(Enum):
Float, Integer, Boolean, String, Nil = range(5)
def printBaseType(self):
print(self)
# Basic Type Checking for Mu programs.
class MyMuTypingVisitor(MuV... | gpl-3.0 | 452,382,548,198,036,800 | 24.916667 | 61 | 0.597428 | false |
Erotemic/plottool | plottool_ibeis/viz_keypoints.py | 1 | 4272 | from __future__ import absolute_import, division, print_function
import utool
import plottool_ibeis.draw_func2 as df2
import numpy as np
from plottool_ibeis import plot_helpers as ph
#(print, print_, printDBG, rrr, profile) = utool.inject(__name__, '[viz_keypoints]', DEBUG=False)
utool.noinject(__name__, '[viz_keypoint... | apache-2.0 | -2,003,975,904,293,060,000 | 34.305785 | 112 | 0.571161 | false |
timkahlke/BASTA | basta/test_tax_creator.py | 1 | 4320 | import unittest
import os
import sys
from basta import NCBITaxonomyCreator
class TestDB(unittest.TestCase):
def setUp(self):
dir_path = os.path.dirname(os.path.realpath(__file__))
self.pwd = dir_path
with open(os.path.join(self.pwd,"names.tab"), "w") as f:
f.write("2|\tBacteri... | gpl-3.0 | 6,601,308,234,924,260,000 | 54.384615 | 137 | 0.509954 | false |
nagaozen/my-os-customizations | home/nagaozen/gedit-plugins-2.30.1/usr/local/lib/gedit-2/plugins/codecomment.py | 1 | 9563 | # -*- coding: utf-8 -*-
# Code comment plugin
# This file is part of gedit
#
# Copyright (C) 2005-2006 Igalia
# Copyright (C) 2006 Matthew Dugan
# Copyrignt (C) 2007 Steve Frécinaux
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as ... | gpl-3.0 | -438,864,936,761,803,460 | 33.395683 | 99 | 0.566722 | false |
openstack/tempest | tempest/api/network/admin/test_external_networks_negative.py | 1 | 2655 | # Copyright 2014 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 | -2,378,470,526,624,206,300 | 44 | 78 | 0.679473 | false |
eliben/deep-learning-samples | cs231n/linear_classifier.py | 1 | 2603 | # This is a generic linear classifier that implements SGD - Stochastic Gradient
# Descent (actually its mini-batch generalization).
#
# It has to be derived from by classes that provide a 'loss' member function,
# to implement different classifiers.
# See http://cs231n.github.io/classification/ for background.
import n... | unlicense | 9,185,285,309,427,893,000 | 34.657534 | 80 | 0.58932 | false |
bergholz/trello2misc | trello2misc.py | 1 | 5884 | #!/usr/bin/python3
"""trello2misc.py
Pulls your cards from Trello to your console or your local todo.txt-file.
Broadly speaking, one card corresponds to one entry. Boards correspond to
contexts, lists to priorities, and labels to projects. See the README.md and
trello2misc.ini files for more information.
Author: Andr... | mit | 8,744,924,611,400,410,000 | 36.705128 | 105 | 0.614927 | false |
MauHernandez/cyclope | cyclope/apps/staticpages/admin.py | 1 | 4324 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2010-2013 Código Sur Sociedad Civil.
# All rights reserved.
#
# This file is part of Cyclope.
#
# Cyclope 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 Foundat... | gpl-3.0 | -698,385,631,172,390,800 | 39.027778 | 84 | 0.662966 | false |
HybridF5/jacket | jacket/tests/compute/functional/api_sample_tests/test_migrations.py | 1 | 7205 | # Copyright 2012 Nebula, Inc.
# Copyright 2013 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required... | apache-2.0 | -2,044,399,456,691,807,200 | 35.948718 | 78 | 0.538376 | false |
ivanovev/tmb | gui/RSW.py | 1 | 1830 |
from collections import OrderedDict as OD
from util import Data, control_cb, monitor_cb, alarm_trace_cb, dev_io_cb
def status_fmt_cb(val, read=True, n=0):
val = int(val, 16)
return '1' if val & (1 << n) else '0'
def get_ctrl(dev):
ctrl = Data(name='Settings', send=True, io_cb=dev_io_cb)
ctrl.add('chu... | gpl-3.0 | 537,557,001,978,085,200 | 51.285714 | 168 | 0.605464 | false |
DeanSherwin/django-dynamic-scraper | dynamic_scraper/models.py | 1 | 17900 | #Stage 2 Update (Python 3)
from __future__ import unicode_literals
from django.utils.encoding import python_2_unicode_compatible
from builtins import range
from builtins import str
from builtins import object
import datetime
from django.db import models
from django.db.models import Q
@python_2_unicode_compatible
clas... | bsd-3-clause | -4,625,286,893,330,727,000 | 45.25323 | 257 | 0.646425 | false |
ericmjl/chameleon | game/player.py | 1 | 3954 | from random import choice
class Player(object):
"""
A base Python class to represent game players.
"""
def __init__(self, chameleon):
super(Player, self).__init__()
self.hand = [] # the five cards that the player has.
self.penalty = [] # the penalty pile that belongs to the pl... | mit | 8,055,643,525,817,262,000 | 34.3125 | 111 | 0.557916 | false |
openstack/zaqar | zaqar/conf/opts.py | 1 | 3623 | # 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, software
# distributed under t... | apache-2.0 | -3,520,810,358,339,854,300 | 32.238532 | 77 | 0.665195 | false |
megalithic/wee-slack | wee_slack.py | 1 | 88248 | # -*- coding: utf-8 -*-
#
from functools import wraps
import time
import json
import os
import pickle
import sha
import re
import urllib
import HTMLParser
import sys
import traceback
import collections
import ssl
from websocket import create_connection,WebSocketConnectionClosedException
# hack to make tests possible... | mit | -5,682,274,658,309,609,000 | 36.536368 | 212 | 0.586076 | false |
mikekap/batchy | batchy/clients/memcached.py | 1 | 4404 | from collections import defaultdict
from itertools import chain
from ..compat import iteritems, itervalues
from ..runloop import coro_return, runloop_coroutine
from ..batch_coroutine import class_batch_coroutine
class BatchMemcachedClient(object):
def __init__(self, real_client):
self.client = real_client... | apache-2.0 | 8,673,413,436,122,850,000 | 34.232 | 96 | 0.599909 | false |
LandRegistry/address-search-api | service/es_access.py | 1 | 2191 | from elasticsearch import Elasticsearch # type: ignore
from elasticsearch_dsl import Search # type: ignore
from typing import Any, Dict, List, Tuple, Union
from service import app
ELASTICSEARCH_ENDPOINT = app.config['ELASTIC_SEARCH_ENDPOINT']
MAX_NUMBER_SEARCH_RESULTS = app.config['MAX_NUMBER_SEARCH_RESULTS']
SE... | mit | -3,485,829,653,908,113,000 | 40.339623 | 86 | 0.667732 | false |
compas-dev/compas | src/compas_rhino/forms/image.py | 1 | 3344 | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
try:
basestring
except NameError:
basestring = str
from compas_rhino.forms.base import BaseForm
from System.Windows.Forms import PictureBox
from System.Windows.Forms import PictureBoxSizeMode
from Sys... | mit | -3,657,716,452,254,985,000 | 23.588235 | 124 | 0.608553 | false |
DroneMapp/powerlibs-django-restless-contrib | setup.py | 1 | 1772 | import re
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = '0.30.0'
def pip_git_to_setuptools_git(url):
match = re.match(r'git\+https://github.com/(?P<organization>[^/]+)/(?P<repository>[^/]+).git@(?P<tag>.+)', url.strip())
if match:
url = 'htt... | mit | 8,690,435,853,167,838,000 | 29.016949 | 123 | 0.645963 | false |
Seek/RayTracing | blender_export/blender_scene_export.py | 1 | 2760 | import bpy
import bmesh
import gzip
# Date 12/28/15
# Wrriten for Blender ver. 2.76.2b
# This file will serve as a record of how we will transmit data from blender to our raytracer.
# These parameters are more or less mirrored information about BlendData types from:
# http://www.blender.org/api/blender_python_api_2_76... | mit | -2,840,073,239,132,708,000 | 31.093023 | 99 | 0.552174 | false |
Azure/azure-sdk-for-python | sdk/containerservice/azure-mgmt-containerservice/azure/mgmt/containerservice/v2019_02_01/models/__init__.py | 1 | 5249 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | -7,090,794,212,403,905,000 | 43.863248 | 94 | 0.739188 | false |
SpaceGroupUCL/qgisSpaceSyntaxToolkit | esstoolkit/external/networkx/algorithms/community/lukes.py | 1 | 8124 | """Lukes Algorithm for exact optimal weighted tree partitioning."""
from copy import deepcopy
from functools import lru_cache
from random import choice
import networkx as nx
from networkx.utils import not_implemented_for
__all__ = ["lukes_partitioning"]
D_EDGE_W = "weight"
D_EDGE_VALUE = 1.0
D_NODE_W = "weight"
D_N... | gpl-3.0 | 6,792,404,174,136,051,000 | 34.779736 | 88 | 0.574735 | false |
ErasRasmuson/LA | LogTestGen/LogTestGen.py | 1 | 34979 | # -*- coding: cp1252 -*-
"""
###############################################################################
HEADER: LogTestGen.py
AUTHOR: Esa Heikkinen
DATE: 13.10.2016
DOCUMENT: -
VERSION: "$Id$"
REFERENCES: -
PURPOSE:
CHANGES: "$Log$"
##############################################################... | gpl-3.0 | -8,858,869,716,066,714,000 | 36.054025 | 137 | 0.638783 | false |
ponty/arduino-sketchbook | libacoll/xtests/test_examples.py | 1 | 2094 | from nose.tools import eq_, ok_
from path import path
from pyavrutils import support, arduino
from pyavrutils.arduino import Arduino, ArduinoCompileError
import logging
root = path(__file__).parent.parent
examples = support.find_examples(root)
fails = [
('PWM.pde', 'atmega8'),
]
# def check_build(ex, hwpack, bo... | bsd-2-clause | 7,967,207,849,194,937,000 | 33.327869 | 114 | 0.509551 | false |
szopu/datadiffs | datadiffs/freezing.py | 1 | 1812 | from collections import Mapping
class frozendict(Mapping):
def __init__(self, input):
if not isinstance(input, dict):
raise TypeError('{0} is not type of dict'.format(type(input)))
self.__dict = input.copy()
def __getitem__(self, key):
return self.__dict[key]
def __l... | mit | 6,462,465,035,445,186,000 | 23.821918 | 74 | 0.557395 | false |
odb9402/OPPA | oppa/Helper/tools.py | 1 | 5111 | import os
import time
import glob
import re
from ..calculateError import run as calculateError
from ..loadParser.parseLabel import run as parseLabel
from ..loadParser.loadPeak import run as loadPeak
"""
These methods are common parts of learning processes which are in
learn****param.py.
"""
def parallel_learning(MAX... | mit | 4,639,354,527,759,813,000 | 34.006849 | 113 | 0.532968 | false |
DCGM/EmotionService | src/clusterFaces.py | 1 | 5407 | #!/usr/bin/env python
from __future__ import print_function
import time
import argparse
import cv2
import os
from operator import itemgetter
from collections import defaultdict
from scipy.cluster.hierarchy import linkage, fcluster
from scipy.spatial.distance import pdist
import numpy as np
import caffe
from classif... | bsd-2-clause | -1,064,040,003,081,222,500 | 30.805882 | 103 | 0.587387 | false |
ozzmeister00/mazeGeneration | mazeGame_hard.py | 1 | 6271 | '''
Hard version of the maze game, which only shows the grid immediately around the player
First iteration, moved the logic around after this was first done to support a multiple-difficulties
mazeGame
'''
import maze
import random
import time
verbDict = {'up':['up','u','north','n'],
'down':['down', 'd', '... | gpl-3.0 | 4,961,732,224,700,495,000 | 25.133333 | 107 | 0.477914 | false |
giovtorres/docker-centos7-slurm | tests/test_dockerfile.py | 1 | 2157 | import subprocess
import time
import pytest
import testinfra
@pytest.fixture(scope="session")
def host(request):
test_image = "docker-centos7-slurm:spec-test"
subprocess.check_call(["docker", "build", "-t", test_image, "."])
docker_id = subprocess.check_output(
["docker", "run", "-d", "-it", "-h"... | mit | 8,518,798,192,829,668,000 | 25.304878 | 69 | 0.609179 | false |
cosurgi/trunk | examples/mpi/fibres/exampleFibresMPI.py | 1 | 6543 | #Example showing how to run 'fiber' (gridNode+girdConnection) in Yade-MPI
from yade import utils
from yade.gridpfacet import *
from yade import mpy as mp
# create a Fiber class with attributes of the nodes it consists, the node which corresponds to the centre of mass, and a tuple 'segs' which consists the node pair ... | gpl-2.0 | -5,530,442,072,045,555,000 | 40.942308 | 185 | 0.612563 | false |
HenriqueLR/simple-route | app/seek/views.py | 1 | 3996 | #encoding> utf-8
from core.models import Maps, Routes
from core.serializers import MapsSerializer, RoutesSerializer
from django.http import Http404
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.http import HttpResponse
import json
fr... | mit | -7,706,990,268,082,385,000 | 29.052632 | 86 | 0.714464 | false |
hanw/p4c | tools/driver/p4c_src/config.py | 1 | 1610 | # Copyright 2013-present Barefoot Networks, 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 agr... | apache-2.0 | -8,957,840,182,282,729,000 | 28.814815 | 77 | 0.627329 | false |
fw1121/Roary | contrib/roary_plots/roary_plots.py | 1 | 5754 | #!/usr/bin/env python
# Copyright (C) <2015> EMBL-European Bioinformatics Institute
# 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 la... | gpl-3.0 | -5,649,037,397,445,452,000 | 36.122581 | 118 | 0.59993 | false |
Laurawly/tvm-1 | tutorials/dev/low_level_custom_pass.py | 1 | 6886 | # 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 | -2,715,676,810,671,700,500 | 39.269006 | 108 | 0.660035 | false |
Nefry/taurus | tests/modules/test_SeleniumExecutor.py | 1 | 18757 | from tests import setup_test_logging, BZTestCase, __dir__
from bzt.modules.selenium import SeleniumExecutor
from tests.mocks import EngineEmul
from bzt.utils import BetterDict
import os
import shutil
import yaml
import time
setup_test_logging()
class TestSeleniumJUnitRunner(BZTestCase):
"""
java:one/folder/... | apache-2.0 | -8,108,019,679,032,530,000 | 38.739407 | 120 | 0.601535 | false |
marlengit/BitcoinUnlimited | qa/rpc-tests/smartfees.py | 1 | 12639 | #!/usr/bin/env python3
# Copyright (c) 2014-2015 The Bitcoin Core developers
# Copyright (c) 2015-2016 The Bitcoin Unlimited developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
#
# Test fee estimation code
#
from collectio... | mit | 4,712,347,195,218,621,000 | 47.057034 | 110 | 0.629797 | false |
ilique/webpushkin | pushkin/pushkin.py | 1 | 13033 | import re
import paramiko
import telnetlib
import time
from django.core.exceptions import ObjectDoesNotExist
from netmiko import ConnectHandler
from .models import Service, CommandGroup
class Switch(object):
def __init__(self, value):
self.value = value
self.fall = False
def __iter__(self):... | mit | 4,651,819,988,733,412,000 | 32.294118 | 119 | 0.518129 | false |
seecr/meresco-oai | meresco/oai/oaiprovenance.py | 1 | 3062 | ## begin license ##
#
# "Meresco Oai" are components to build Oai repositories, based on
# "Meresco Core" and "Meresco Components".
#
# Copyright (C) 2007-2008 SURF Foundation. http://www.surf.nl
# Copyright (C) 2007-2010 Seek You Too (CQ2) http://www.cq2.nl
# Copyright (C) 2007-2009 Stichting Kennisnet Ict op school. ... | gpl-2.0 | -7,920,448,473,982,446,000 | 42.742857 | 98 | 0.723383 | false |
cheral/orange3 | Orange/widgets/data/tests/test_oweditdomain.py | 2 | 7136 | # Test methods with long descriptive names can omit docstrings
# pylint: disable=missing-docstring
from unittest import TestCase
import numpy as np
from AnyQt.QtCore import QModelIndex, Qt
from Orange.data import ContinuousVariable, DiscreteVariable, \
StringVariable, Table, Domain
from Orange.widgets.data.owedi... | bsd-2-clause | -4,884,547,451,804,154,000 | 35.783505 | 80 | 0.637472 | false |
robintw/Py6S | Py6S/outputs.py | 1 | 17043 | # This file is part of Py6S.
#
# Copyright 2012 Robin Wilson and contributors listed in the CONTRIBUTORS file.
#
# Py6S is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, o... | lgpl-3.0 | -3,590,337,999,511,935,500 | 41.714286 | 218 | 0.535939 | false |
foospidy/DbDat | plugins/mssql/check_privileges_clr_assembly_permissions.py | 1 | 1261 | class check_privileges_clr_assembly_permissions():
"""
check_privileges_clr_assembly_permissions:
Setting CLR Assembly Permission Sets to SAFE_ACCESS will prevent assemblies
from accessing external system resources such as files, the network,
environment variables, or the registry.
"""
# Ref... | gpl-2.0 | 3,333,233,473,428,498,000 | 32.184211 | 96 | 0.590801 | false |
redshodan/lazarus-ssh | tests/utils.py | 1 | 5573 | #
# Copyright (C) 2009 Chris Newton <redshodan@gmail.com>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This pro... | lgpl-2.1 | -1,652,885,596,850,367,200 | 30.134078 | 81 | 0.552665 | false |
kirillmakhonin/med | MED.Server/apps/human_resources/migrations/0004_auto_20160826_2140.py | 1 | 1111 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-08-26 21:40
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('human_resources', '0003_auto_20160826_2113'),
]
operations = [
migrations.Cre... | mit | 7,525,030,300,426,919,000 | 29.861111 | 114 | 0.558056 | false |
helloworldC2/VirtualRobot | GuiHUD.py | 1 | 22037 | import scoring
import pygame
import gui
import Game
import selectBar
from selectBar import *
import Level
from Level import *
import Tile
import EntityTreasure
import Keyboard
from pygame.locals import *
from Image import *
class GuiHUD(object):
def __init__(self,screen):
self.ebg = image(screen,(5,5),... | mit | -6,966,806,704,096,815,000 | 47.646799 | 200 | 0.378318 | false |
luminousflux/lflux | lfluxproject/lstory/migrations/0010_auto.py | 1 | 6790 | # -*- 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):
# Removing M2M table for field tumbleposts on 'Story'
db.delete_table('lstory_story_tumbleposts')
def b... | mit | 4,325,919,837,941,949,400 | 67.59596 | 182 | 0.552725 | false |
arunchandramouli/fanofpython | code/features/classes/serialize.py | 1 | 2846 | '''
Use Case: Exploring the Concept of Serializing and De-Serializing in Python
Shortly called as pickling, the needs is to store the object and later resurrect it
----> Use dump for serializing the records into a file
----> Use dumps for serializing the records into a string
---->... | gpl-3.0 | -5,709,167,118,428,060,000 | 20.398496 | 122 | 0.615952 | false |
ibmjstart/bluemix-python-sample-twitter-influence-app | app/klout-master/klout/api.py | 1 | 7997 | # -*- coding: utf-8 -*-
"""
A minimalist klout API interface. Use of this API
requires klout *developer key*. You can get registered and
get a key at
<http://klout.com/s/developers/v2>
Supports Python >= 2.5 and Python 3
====================
Quickstart
====================
Install the PyPi package::
... | apache-2.0 | -2,995,289,857,531,983,400 | 26.296928 | 109 | 0.553458 | false |
wchan/tensorflow | tensorflow/python/framework/test_util.py | 1 | 20357 | # Copyright 2015 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 | -6,489,088,782,344,696,000 | 35.030088 | 80 | 0.651078 | false |
jandom/rdkit | rdkit/sping/PDF/pdfmetrics.py | 1 | 20669 | #fontmetrics.py - part of PDFgen - copyright Andy Robinson 1999
"""This contains pre-canned text metrics for the PDFgen package, and may also
be used for any other PIDDLE back ends or packages which use the standard
Type 1 postscript fonts.
Its main function is to let you work out the width of strings; it exposes a
s... | bsd-3-clause | 7,079,990,396,523,041,000 | 62.79321 | 100 | 0.540762 | false |
adybbroe/mesan_compositer | tests/test_compositer.py | 1 | 11472 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2014 - 2019 Adam.Dybbroe
# Author(s):
# Adam.Dybbroe <a000680@c14526.ad.smhi.se>
# 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 Foundatio... | gpl-3.0 | 6,169,555,959,144,510,000 | 44.165354 | 99 | 0.521879 | false |
ichuang/sympy | sympy/physics/quantum/dagger.py | 1 | 4556 | """Hermitian conjugation."""
from sympy import Expr, sympify, Add, Mul, Matrix, Pow
from sympy.physics.quantum.qexpr import QExpr
from sympy.physics.quantum.matrixutils import (
numpy_ndarray, scipy_sparse_matrix, matrix_dagger
)
__all__ = [
'Dagger'
]
class Dagger(Expr):
"""General Hermitian conjugate... | bsd-3-clause | -2,904,213,865,865,206,000 | 29.783784 | 80 | 0.521071 | false |
sovnarkom/instwitter-py | instwitter/rest/partial/status.py | 1 | 3165 | '''
Created on Jul 31, 2009
@author: aleksandrcicenin
'''
from .. import RESTAPI, authneeded
class StatusAPI(RESTAPI):
def status_show(self, id):
path = self._get_method_path('statuses/show/' + id)
return self._get_request_data(path)
@authneeded
def status_update(self, status, ... | mit | -5,823,370,449,636,178,000 | 40.103896 | 129 | 0.649289 | false |
jamespcole/home-assistant | homeassistant/components/nmap_tracker/device_tracker.py | 1 | 4634 | """Support for scanning a network with nmap."""
import logging
import re
import subprocess
from collections import namedtuple
from datetime import timedelta
import voluptuous as vol
import homeassistant.helpers.config_validation as cv
import homeassistant.util.dt as dt_util
from homeassistant.components.device_tracke... | apache-2.0 | 88,692,433,497,622,320 | 30.958621 | 78 | 0.602719 | false |
mmcardle/django_app_cookie | hooks/pre_gen_project.py | 1 | 1367 | #!/usr/bin/python
__author__ = 'mm'
import json
import os
print "Start Generate Templates Hook"
cookie_dir = '{{cookiecutter.app_name}}'
project_base = os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))
json_file = os.path.join(project_base, 'cookiecutter.json')
base_templates = os.path.join(project_base... | mit | 5,755,319,420,505,244,000 | 28.73913 | 77 | 0.625457 | false |
mapcentia/vidi | docs/da/conf.py | 1 | 8332 | # -*- coding: utf-8 -*-
#
# Read the Docs Template documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 26 14:19:49 2014.
#
# 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
# autogenera... | agpl-3.0 | 737,716,829,673,543,200 | 30.680608 | 79 | 0.708473 | false |
afrolov1/nova | nova/tests/virt/xenapi/test_vmops.py | 1 | 43955 | # Copyright 2013 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 | -5,603,777,799,904,583,000 | 42.1778 | 79 | 0.589853 | false |
hantek/BinaryConnect | mnist.py | 1 | 6258 | # Copyright 2015 Matthieu Courbariaux, Zhouhan Lin
"""
This file is adapted from BinaryConnect:
https://github.com/MatthieuCourbariaux/BinaryConnect
Running this script should reproduce the results of a feed forward net trained
on MNIST.
To train a vanilla feed forward net with ordinary backprop:
... | gpl-2.0 | -687,940,570,857,817,200 | 31.111111 | 94 | 0.598434 | false |
sgallagher/anaconda | tests/nosetests/pyanaconda_tests/module_network_test.py | 1 | 68731 | #
# Copyright (C) 2018 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 is distributed in the hope that it will be... | gpl-2.0 | 9,146,075,531,034,508,000 | 38.364834 | 187 | 0.569816 | false |
remyoudompheng/forum-gtk | lib/main_window.py | 1 | 40023 | #! /usr/bin/env python2.4
# -*- coding: utf-8 -*-
# Flrn-gtk: fenêtre principale
# Rémy Oudompheng, Noël 2005
import os
import sys
import time, re
import socket
# Modules GTK
import pygtk
pygtk.require('2.0')
import gtk
import gtk.gdk
import gobject
import pango
from tempfile import mkstemp
# Modules
from grp_buffe... | gpl-3.0 | -6,290,413,386,575,644,000 | 44.699885 | 198 | 0.54033 | false |
TheNaterz/koadic | core/commands/jobs.py | 1 | 1058 | DESCRIPTION = "shows info about jobs"
def autocomplete(shell, line, text, state):
pass
def help(shell):
pass
def print_job(shell, id):
for stager in shell.stagers:
for session in stager.sessions:
for job in session.jobs:
if job.id == int(id):
job.di... | apache-2.0 | -6,811,713,726,290,306,000 | 23.604651 | 96 | 0.563327 | false |
mcclurmc/juju | juju/unit/tests/test_lifecycle.py | 1 | 37560 | import logging
import os
import sys
import StringIO
import stat
import yaml
import zookeeper
from twisted.internet.defer import inlineCallbacks, Deferred, fail, returnValue
from juju.unit.lifecycle import (
UnitLifecycle, UnitRelationLifecycle, RelationInvoker)
from juju.unit.workflow import RelationWorkflowSta... | agpl-3.0 | -4,143,050,929,278,393,300 | 37.054711 | 79 | 0.597045 | false |
krono/pycket | pycket/prims/continuation_marks.py | 1 | 2868 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
from pycket import impersonators as imp
from pycket import values
from pycket.cont import call_cont
from pycket.error import SchemeException
from pycket.prims.expose import default, expose, make_callable_label, procedure
# Can use this to promote a get_cmk operation to a ... | mit | 7,641,448,481,125,027,000 | 41.80597 | 130 | 0.710251 | false |
idmillington/sparkle | sparkle/decorators.py | 1 | 1539 | from tokens import *
import functools
def rule(rule_definition, state=None, add_to_docstring=True):
"""A general purpose decorator-generator for methods that
represent rules. This decorator adds two attributes to the
method: the 'rule' attribute with the given rule strng in it
and the 'state' attribute... | mit | -6,347,593,118,546,538,000 | 33.2 | 68 | 0.640676 | false |
doy/python-termcast-server | termcast_server/termcast.py | 1 | 9519 | import json
import re
import ssl
import time
import traceback
import vt100
auth_re = re.compile(b'^hello ([^ ]+) ([^ ]+)$')
extra_data_re = re.compile(b'\033\]499;([^\007]*)\007')
clear_patterns = [
b"\033[H\033[J",
b"\033[H\033[2J",
b"\033[2J\033[H",
# this one is from tmux - can't possibly imagine ... | mit | 5,012,020,664,790,571,000 | 30.107843 | 122 | 0.470533 | false |
PaddlePaddle/Paddle | python/paddle/fluid/tests/unittests/test_assign_op_npu.py | 1 | 1547 | # Copyright (c) 2021 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 | 9,074,280,440,638,911,000 | 26.625 | 74 | 0.674208 | false |
marscher/mdtraj | MDTraj/core/trajectory.py | 1 | 51903 | ##############################################################################
# MDTraj: A Python Library for Loading, Saving, and Manipulating
# Molecular Dynamics Trajectories.
# Copyright 2012-2014 Stanford University and the Authors
#
# Authors: Robert McGibbon
# Contributors: Kyle A. Beauchamp, TJ Lane, Jo... | lgpl-2.1 | -7,012,444,258,323,120,000 | 37.560921 | 127 | 0.594802 | false |
thusser/rtml-parse | rtmlparse/examples/telescope.py | 1 | 1224 | from rtmlparse import RTML
from rtmlparse.elements import *
from rtmlparse.misc import units, unitvalues
def main():
# create rtml
rtml = RTML('rtml://monet.uni-goettingen.de/resource', RTML.Mode.resource)
# telescope
telescope = Telescope(rtml, name='MONET/S')
telescope.Aperture = unitvalues.Ape... | mit | -1,235,825,905,234,738,200 | 24 | 78 | 0.670752 | false |
google/floq-client | floq/client/client/cirq.py | 1 | 1444 | # Copyright 2021 The Floq 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | apache-2.0 | -7,485,892,882,139,834,000 | 39.111111 | 84 | 0.690443 | false |
SergioGonzalezSanz/conformal_predictors | tests/nc_measures/SVMTest.py | 1 | 1492 | import unittest
from conformal_predictors.nc_measures.SVM import SVCDistanceNCMeasure
from sklearn.svm import SVC
from numpy import array
class SVMTest(unittest.TestCase):
def setUp(self):
pass
def tearDown(self):
pass
def test_1(self):
x = array([[1, 1], [2, 2]])
y = ar... | mit | -3,612,386,006,468,725,000 | 34.52381 | 69 | 0.622654 | false |
borjam/exabgp | src/exabgp/configuration/process/parser.py | 3 | 2367 | # encoding: utf-8
"""
parse_process.py
Created by Thomas Mangin on 2015-06-18.
Copyright (c) 2009-2017 Exa Networks. All rights reserved.
License: 3-clause BSD. (See the COPYRIGHT file)
"""
import os
import stat
def encoder(tokeniser):
value = tokeniser()
if value not in ('text', 'json'):
raise Val... | bsd-3-clause | -5,532,249,543,314,461,000 | 29.346154 | 108 | 0.572877 | false |
mogproject/javactl | src/javactl/setting/setting.py | 1 | 3543 | from __future__ import division, print_function, absolute_import, unicode_literals
import subprocess
from itertools import chain
import yaml
import six
from mog_commons.case_class import CaseClass
from mog_commons.functional import oget
from javactl.setting import arg_parser
from javactl.setting.app_setting import App... | apache-2.0 | 1,006,830,342,674,333,800 | 34.787879 | 118 | 0.57917 | false |
mtils/ems | examples/qt4/gui/persondata_form.py | 1 | 1430 |
from PyQt4.QtCore import pyqtSignal, Qt
from PyQt4.QtGui import QTableView, QApplication, QWidget, QVBoxLayout
from PyQt4.QtGui import QLineEdit, QSpinBox, QDoubleSpinBox, QCheckBox
class PersonDataForm(QWidget):
def __init__(self, parent=None):
super(PersonDataForm, self).__init__(parent)
self... | mit | 1,340,399,645,659,060,200 | 31.522727 | 70 | 0.688811 | false |
iocoop/beancount | src/python/beancount/projects/returns.py | 1 | 39336 | #!/usr/bin/env python3
"""Compute the returns of a portfolio.
A document exists to describe the problem in more detail.
http://furius.ca/beancount/doc/portfolio-returns
Calculating the returns is carried out by identifying the entries whose accounts
match a regular expression that defines accounts to consider for val... | gpl-2.0 | -4,277,765,693,550,496,000 | 44.265823 | 92 | 0.651312 | false |
qedsoftware/commcare-hq | corehq/ex-submodules/pillowtop/utils.py | 1 | 8673 | from __future__ import division
from collections import namedtuple
from datetime import datetime
import sys
import simplejson
from django.conf import settings
from dimagi.utils.chunked import chunked
from dimagi.utils.modules import to_function
from pillowtop.exceptions import PillowNotFoundError
from pillowtop.log... | bsd-3-clause | 5,279,701,245,204,028,000 | 31.977186 | 104 | 0.630462 | false |
UKTradeInvestment/export-wins-data | mi/views/sector_views.py | 1 | 13377 | import operator
from collections import defaultdict
from itertools import groupby
from operator import itemgetter
from functools import reduce
from django.db.models import Q
from mi.models import (
HVCGroup,
SectorTeam,
Target,
)
from mi.utils import sort_campaigns_by
from mi.views.base_view import BaseWi... | gpl-3.0 | 1,905,772,124,081,800,700 | 35.85124 | 113 | 0.59707 | false |
siggame/webserver | webserver/codemanagement/migrations/0001_initial.py | 1 | 11020 | # -*- 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 'BaseClient'
db.create_table('codemanagement_baseclient', (
('id', self.gf('djang... | bsd-3-clause | 39,099,764,303,162,850 | 72.473333 | 205 | 0.564791 | false |
eunchong/build | scripts/tools/get_master_config.py | 2 | 3333 | #!/usr/bin/env python
# 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.
"""Prints information from master_site_config.py
The sole purpose of this program it to keep the crap inside build/ while
we're moving... | bsd-3-clause | 5,719,705,232,915,005,000 | 28.495575 | 79 | 0.672967 | false |
Yukarumya/Yukarum-Redfoxes | testing/mozharness/configs/marionette/windows_config.py | 1 | 1876 | # This is a template config file for marionette production on Windows.
import os
import sys
config = {
# marionette options
"marionette_address": "localhost:2828",
"test_manifest": "unit-tests.ini",
"virtualenv_python_dll": 'c:/mozilla-build/python27/python27.dll',
"virtualenv_path": 'venv',
"... | mpl-2.0 | -4,901,755,299,401,112,000 | 31.344828 | 104 | 0.541045 | false |
sujoykroy/motion-picture | editor/MotionPicture/shapes/polygon_shape.py | 1 | 17847 | from ..commons import *
from .shape import Shape
from xml.etree.ElementTree import Element as XmlElement
from .mirror import *
class PolygonFormRenderer(object):
def __init__(self, polygon_shape, form_name):
self.polygon_shape = polygon_shape
self.form_name = form_name
def get_name(self):
... | gpl-3.0 | -8,440,537,538,768,513,000 | 38.052516 | 155 | 0.579313 | false |
xylsxyls/xueyelingshuang | src/StockCharge/scripts/rebuild_StockCharge.py | 1 | 14091 | #!python3
# -*- coding:utf-8 -*-
import os
import sys
import time
import ctypes
import shutil
import subprocess
IsPy3 = sys.version_info[0] >= 3
if IsPy3:
import winreg
else:
import codecs
import _winreg as winreg
BuildType = 'Release'
IsRebuild = True
Build = 'Rebuild'
Update = False
Copy = False
CleanAl... | mit | -750,922,354,675,817,100 | 37.267606 | 195 | 0.592565 | false |
jrwdunham/old | onlinelinguisticdatabase/controllers/morphologybackups.py | 1 | 3615 | # Copyright 2016 Joel Dunham
#
# 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 writi... | apache-2.0 | 6,412,872,504,120,479,000 | 31.276786 | 80 | 0.673306 | false |
ddolzhenko/jacis | jacis/plugins/sync.py | 1 | 2555 | # Copyright (c) 2016 Dmitry Dolzhenko
# 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, dis... | mit | -6,273,259,057,196,582,000 | 28.034091 | 80 | 0.609785 | false |
spron-in/py-bind-adm | dns/dns_health_check.py | 1 | 2742 | #
#
# dns health check
#
#
import os
import subprocess
import simplejson as json
import re
from dns.config import config
class CheckHealthActions:
def __init__(self, check):
self.check = check
self.param_dict = json.loads(check['parameter'])
return
def run(self):
func_nam... | mit | 4,578,904,865,613,461,000 | 26.69697 | 104 | 0.528446 | false |
HybridF5/jacket | jacket/compute/scheduler/weights/io_ops.py | 1 | 1442 | # Copyright (c) 2014 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 ... | apache-2.0 | 3,928,312,711,337,602,000 | 34.170732 | 79 | 0.724688 | false |
SamR1/FitTrackee | fittrackee/tests/workouts/test_stats_api.py | 1 | 28228 | import json
from flask import Flask
from fittrackee.users.models import User
from fittrackee.workouts.models import Sport, Workout
from ..api_test_case import ApiTestCaseMixin
class TestGetStatsByTime(ApiTestCaseMixin):
def test_it_gets_no_stats_when_user_has_no_workouts(
self, app: Flask, user_1: User... | gpl-3.0 | 8,299,335,675,569,371,000 | 30.752531 | 106 | 0.459933 | false |
Pulgama/supriya | supriya/realtime/BufferProxy.py | 1 | 8402 | from supriya.system.SupriyaValueObject import SupriyaValueObject
class BufferProxy(SupriyaValueObject):
"""
A buffer proxy.
Acts as a singleton reference to a buffer on the server, tracking the state
of a single buffer id and responding to `/b_info` messages. Multiple Buffer
instances reference a... | mit | 5,936,076,998,342,375,000 | 25.421384 | 88 | 0.46239 | false |
bmcfee/librosa | librosa/util/utils.py | 1 | 64787 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Utility functions"""
import warnings
import scipy.ndimage
import scipy.sparse
import numpy as np
import numba
from numpy.lib.stride_tricks import as_strided
from .._cache import cache
from .exceptions import ParameterError
# Constrain STFT block sizes to 256 KB
MAX_M... | isc | 7,209,555,656,217,250,000 | 28.85576 | 97 | 0.55437 | false |
samueljackson92/tsp-solver | tspsolver/ga/test/crossover_test.py | 1 | 3989 | import unittest
import nose.tools
import numpy as np
from scipy.spatial import distance_matrix
from tspsolver.tsp_generator import TSPGenerator
from ..population_generation import SimplePopulationGenerator
from ..crossover import OnePointPMX, TwoPointPMX, OrderCrossover
class OnePointCrossoverTest(unittest.TestCase)... | mit | -463,161,684,916,459,800 | 31.169355 | 74 | 0.630735 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.