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 |
|---|---|---|---|---|---|---|---|---|---|---|
bacemtayeb/Tierra | src/modules/scanner/net_map.py | 1 | 2921 | import socket
from datetime import datetime
from util import Error
from scapy.all import *
from scanner import Scanner
from zoption import Zoption
class net_map(Scanner):
def __init__(self):
super(net_map, self).__init__('NetMap')
self.available_hosts = {}
self.config.update({"net_mask":Zo... | gpl-3.0 | -5,535,189,645,058,641,000 | 38.472973 | 113 | 0.451558 | false |
Linaro/lava-server | share/javascript.py | 1 | 6326 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# javascript.py
#
# Copyright 2015 Neil Williams <codehelp@debian.org>
#
# 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 ... | agpl-3.0 | -163,854,966,127,510,600 | 35.994152 | 85 | 0.516282 | false |
atfinke/WikiRaces | data/main.py | 1 | 1289 | import os
import csv
import lzma
import pickle
DIRECTORY_PATH = 'WKRRaces'
def files():
directory = DIRECTORY_PATH
f = []
for file in os.listdir(directory):
if file.endswith(".csv"):
f.append(os.path.join(directory, file))
return f
def history_item(item, is_null_time):
s = ite... | mit | -7,833,673,281,117,440,000 | 23.788462 | 76 | 0.52211 | false |
hisuley/sxj | blog/blogpost/views.py | 1 | 2753 | from django.shortcuts import render_to_response, get_object_or_404
from blogpost.models import BlogPost
from blogpost.forms import BlogForm
from django.http import HttpResponseRedirect
def blogList(request):
blogs = BlogPost.objects.all()
return render_to_response('blogpost/blog_list.html', {'blogs': blogs})
... | mit | -4,427,486,751,830,666,000 | 34.307692 | 91 | 0.607701 | false |
cqw1/palliassist_webportal | app/migrations/0019_auto_20170218_0001.py | 1 | 1965 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-02-18 06:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('app', '0018_auto_20170217_2220'),
]
operations = [
migrations.RemoveField(
... | mit | 888,934,080,564,559,900 | 27.478261 | 49 | 0.528753 | false |
juice-ryang/online-judge | OnlineJudgeServer/process_capsule.py | 1 | 5696 | """Process Capsule: The PExpect Wrapper."""
from errno import ESRCH as NoSuchProcess
from os import kill, environ
from os.path import join
from signal import SIGTERM as CTRL_C
from chardet import detect as Chardet
from pexpect import (
spawn,
TIMEOUT,
EOF,
)
__author__ = "Minho Ryang (minhoryang@gmail.co... | gpl-3.0 | -3,458,395,335,906,989,000 | 29.956522 | 83 | 0.578827 | false |
jungla/ICOM-fluidity-toolbox | Detectors/offline_advection/plot_Richardson_2D_const_both.py | 1 | 7931 | #!~/python
import fluidity_tools
import matplotlib as mpl
mpl.use('ps')
import matplotlib.pyplot as plt
import myfun
import numpy as np
import os
import lagrangian_stats
import advect_functions
from scipy import interpolate
import csv
import advect_functions
def RD_t(par2Dzr,tt,px,py):
RD_2Dm = [] #np.zeros((px+py,t... | gpl-2.0 | -3,794,594,153,725,665,300 | 34.248889 | 178 | 0.626907 | false |
pytorch/fairseq | fairseq/modules/lightconv_layer/cuda_function_gen.py | 1 | 9642 | # Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
def gen_forward():
kernels = [3, 5, 7, 15, 31, 63, 127, 255]
seqs = [32 * x for x in [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14,... | mit | -6,413,420,319,502,811,000 | 32.363322 | 141 | 0.478117 | false |
dsavransky/EXOSIMS | EXOSIMS/PlanetPopulation/SAG13.py | 1 | 14420 | from EXOSIMS.PlanetPopulation.KeplerLike2 import KeplerLike2
from EXOSIMS.util.InverseTransformSampler import InverseTransformSampler
import astropy.units as u
import astropy.constants as const
import numpy as np
import scipy.integrate as integrate
import sys
# Python 3 compatibility:
if sys.version_info[0] > 2:
x... | bsd-3-clause | -8,000,334,332,726,684,000 | 41.536873 | 167 | 0.560957 | false |
dvklopfenstein/PrincetonAlgorithms | tests/test_EdgeWeightedDirectedCycle.py | 1 | 1770 | #/usr/bin/env python
# TBD: Finish Python port
#*****************************************************************************
# Compilation: javac EdgeWeightedDirectedCycle.java
# Execution: java EdgeWeightedDirectedCycle V E F
# Dependencies: EdgeWeightedDigraph.java DirectedEdge.java Stack.java
#
# Find... | gpl-2.0 | 8,139,211,552,957,363,000 | 28.016393 | 80 | 0.554237 | false |
Harvard-ATG/HarvardCards | modules/flashcard-loader/initial_data.py | 1 | 6227 | #
# The script creates the json files which can be directly imported into HarvardCards Django App.
# It looks for the json file in the folder specified by the variable "path_files_folder"
# Usage:
# ./initial_data.py [json_file]
# Note: For now, you can execute ./initial_data.py and the script will use the arthistory... | bsd-3-clause | -7,857,226,104,967,788,000 | 31.952381 | 117 | 0.495263 | false |
babyliynfg/cross | tools/project-creator/Python2.6.6/Lib/test/test_grammar.py | 1 | 32152 | # Python test set -- part 1, grammar.
# This just tests whether the parser accepts them all.
# NOTE: When you run this test as a script from the command line, you
# get warnings about certain hex/oct constants. Since those are
# issued by the parser, you can't suppress them by adding a
# filterwarnings() call t... | mit | 1,437,335,187,774,944,500 | 31.249224 | 132 | 0.463019 | false |
JoshMayberry/ME342Final | source/views/frmThermoInput.py | 1 | 5298 | import wx
#from ..logic import LogicThermoInput
class Frm_ThermoInput ( wx.Frame ):
#Note: Most of this frame is built by logic, because it needs to determine what is to be shown.
def __init__( self, parent ):
windowSize = self.setSize()
wx.Frame.__init__ ( self, parent, id = wx.ID_ANY, title = wx.EmptyString,... | mit | -1,833,855,268,306,803,500 | 40.724409 | 386 | 0.694979 | false |
Timtam/cards-against-humanity | editor/current_card.py | 1 | 10710 | from shared.card import CARD_BLACK, CARD_PLACEHOLDER_LENGTH, CARD_WHITE
from shared.exceptions import CardValidityError
from .const import *
class CurrCardWindow(wx.Panel):
def __init__(self, parent):
wx.Panel.__init__(self, parent=parent,
name="current card panel")
frame = self.GetT... | mit | 5,581,464,990,867,145,000 | 33.217252 | 126 | 0.643231 | false |
cevap/ion | test/functional/test_framework/bignum.py | 1 | 1910 | #!/usr/bin/env python3
#
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Big number routines.
This file is copied from python-bitcoinlib.
"""
import struct
# generic big endian MPI format
def bn_bytes(v, have_ext=False):
... | mit | -1,210,553,528,431,300,900 | 18.690722 | 69 | 0.51623 | false |
juliarizza/certificate_generator | app.py | 1 | 6448 | # -*- coding: utf-8 -*-a
import sys
import os.path
from PyQt4 import QtGui, QtCore
from controllers import *
from models import *
from global_functions import images_dir
class Window(QtGui.QMainWindow):
"""
Main window of the app.
"""
def __init__(self):
"""
Setup widgets.
... | gpl-3.0 | -5,823,370,606,249,623,000 | 31.790816 | 328 | 0.643535 | false |
hiuwo/acq4 | acq4/pyqtgraph/opengl/items/GLScatterPlotItem.py | 1 | 7446 | from OpenGL.GL import *
from OpenGL.arrays import vbo
from .. GLGraphicsItem import GLGraphicsItem
from .. import shaders
from ... import QtGui
import numpy as np
__all__ = ['GLScatterPlotItem']
class GLScatterPlotItem(GLGraphicsItem):
"""Draws points at a list of 3D positions."""
def __init__(self, **kw... | mit | 6,061,750,020,788,004,000 | 39.688525 | 116 | 0.506849 | false |
google/nerfies | nerfies/models.py | 1 | 15699 | # Copyright 2021 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -6,959,720,088,576,652,000 | 36.92029 | 79 | 0.671763 | false |
adelomana/30sols | F5.EGRIN/classMembershipAssigner.py | 1 | 1747 | ###
### this script assigns most voted class to corems
###
import sys
# 0. user defined variables
gene2ClassFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.si.ribosomal.protein.index.information.csv'
geneDictionaryFile='/Volumes/omics4tb/alomana/projects/TLR/data/annotation/si.table.1.gene.dic... | gpl-3.0 | -4,864,261,541,465,796,000 | 30.196429 | 125 | 0.670864 | false |
qmachine/qmachine | docs/conf.py | 1 | 4573 | #- Sphinx build configuration file
#- conf.py ~~
#
# This file was originally generated by `sphinx-quickstart`, but it wasn't
# especially readable (because I'm a picky jerkface). It's important to note
# the following:
#
# - This file is execfile()d with the current directory set to its
# containing... | apache-2.0 | 8,069,701,040,473,440,000 | 28.127389 | 79 | 0.656681 | false |
MingjunZhou/nltk_book | ch3_Processing_Raw_Text/normalizing_text.py | 1 | 1438 | import nltk
class IndexedText(object):
def __init__(self, stemmer, text):
self._text = text
self._stemmer = stemmer
self._index = nltk.Index((self._stem(word), i)
for (i, word) in enumerate(text))
def concordance(self, word, width=40):
key = se... | bsd-3-clause | 3,717,364,423,540,974,000 | 34.073171 | 85 | 0.595967 | false |
ssdxiao/kimchi | plugins/sample/model.py | 1 | 3802 | #
# Project Kimchi
#
# Copyright IBM, Corp. 2013
#
# This library 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 2.1 of the License, or (at your option) any later version.
#
# This lib... | lgpl-2.1 | 6,800,119,525,657,207,000 | 28.022901 | 79 | 0.622567 | false |
repotvsupertuga/tvsupertuga.repository | script.module.cryptolib/lib/cryptopy/cipher/cbc.py | 1 | 4602 | """ cryptopy.cipher.cbc
CBC mode of encryption for block ciphers.
This algorithm mode wraps any BlockCipher to make a
Cipher Block Chaining mode.
Note !!!! auto IV uses python default random :-(
should not be 'too bad' (tm) for this cbc applicaiton
Copyright (c) 2002 by Paul A. Lambert
R... | gpl-2.0 | 7,249,871,556,218,602,000 | 41.220183 | 102 | 0.612125 | false |
gacarrillor/CopyLayersAndGroupsToClipboard | copyLayersAndGroupsToClipboard.py | 1 | 4969 | # -*- coding:utf-8 -*-
"""
/***************************************************************************
CopyLayersAndGroupsToClipboard
A QGIS plugin
Copy selected layers and groups from Layers Panel to clipboard, so that they can be pasted in other QGIS instances.
... | gpl-3.0 | -2,783,662,690,106,625,000 | 44.587156 | 152 | 0.588448 | false |
HazardSJ/HazardBot | enwiki/afd_relisted_cat_remover.py | 1 | 2150 | import re
import pywikibot
pywikibot.config.family = "wikipedia"
pywikibot.config.mylang = "en"
site = pywikibot.Site()
site.login()
class AFDRelistedCatRemover(object):
"""Removes closed from relisted AfD categories"""
def __init__(self):
self.categories = [
pywikibot.Category(site, "... | mit | 9,115,213,321,937,454,000 | 29.714286 | 119 | 0.528837 | false |
kaeawc/django-auth-example | test/controllers/user/test_profile.py | 1 | 1382 | # -*- coding: utf-8 -*
from test.account import Account
from test.account import AccountTestCase
class GetUserProfileSpec(AccountTestCase):
def test_success(self):
"""
A user should be able to get a profile with valid credentials
"""
email = Account.create_email()
passwor... | mit | -5,176,994,730,170,144,000 | 29.733333 | 83 | 0.664255 | false |
HiddenData/django-parler | parler/templatetags/parler_tags.py | 1 | 7519 | import inspect
from django.core.urlresolvers import resolve, reverse, Resolver404
from django.template import Node, Library, TemplateSyntaxError
from django.utils.translation import get_language
from django.utils import six
from parler.models import TranslatableModel, TranslationDoesNotExist
from parler.utils.context i... | apache-2.0 | -1,220,666,122,938,297,900 | 43.755952 | 201 | 0.650618 | false |
okfn-brasil/tagarela | settings/local_settings.openshift_example.py | 1 | 1059 | import os
DEBUG = False
SQLALCHEMY_DATABASE_URI = (
'postgresql://{user}:{password}@{host}:{port}/tagarela'
.format(
user=os.environ['OPENSHIFT_POSTGRESQL_DB_USERNAME'],
password=os.environ['OPENSHIFT_POSTGRESQL_DB_PASSWORD'],
host=os.environ['OPENSHIFT_POSTGRESQL_DB_HOST'],
po... | agpl-3.0 | 7,952,376,226,050,236,000 | 30.147059 | 74 | 0.653447 | false |
JMMolenaar/cadnano2.5 | cadnano/gui/controllers/documentcontroller.py | 1 | 30136 | import os
import sys
from cadnano import app, setReopen, setBatch
from cadnano.fileio.nnodecode import decode, decodeFile
from cadnano.fileio.encoder import encode
from cadnano.gui.views.documentwindow import DocumentWindow
from cadnano.gui.ui.dialogs.ui_about import Ui_About
from cadnano.gui.views import styles
imp... | mit | 7,849,018,739,122,012,000 | 37.98577 | 177 | 0.603 | false |
Axelrod-Python/axelrod-evolver | tests/integration/test_population_sizes.py | 1 | 2559 | import tempfile
import unittest
import axelrod as axl
import axelrod_dojo as axl_dojo
class TestPopulationSizes(unittest.TestCase):
def test_basic_pop_size(self):
# Set up Tmp file
temp_file = tempfile.NamedTemporaryFile()
# we will set the objective to be
cycler_objective = axl_... | mit | -7,320,343,215,414,218,000 | 36.086957 | 92 | 0.545526 | false |
zrhans/python | exemplos/Examples.lnk/bokeh/glyphs/sprint.py | 1 | 4385 | from __future__ import print_function
from bokeh.document import Document
from bokeh.embed import file_html
from bokeh.browserlib import view
from bokeh.resources import INLINE
from bokeh.models.glyphs import Circle, Text
from bokeh.models import ColumnDataSource, Range1d, DataRange1d, Plot, LinearAxis, SingleInterval... | gpl-2.0 | -8,231,620,859,429,287,000 | 37.80531 | 132 | 0.679361 | false |
wellfire/hepdata-matchinggifts | setup.py | 1 | 1718 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
os.system('python setup.py bdist_wheel upload')
sys.exit()
with open("... | gpl-2.0 | 6,160,371,015,012,609,000 | 26.709677 | 66 | 0.591967 | false |
TomAugspurger/pandas | pandas/tests/window/moments/test_moments_consistency_rolling.py | 1 | 23910 | from datetime import datetime
import warnings
import numpy as np
from numpy.random import randn
import pytest
import pandas.util._test_decorators as td
import pandas as pd
from pandas import DataFrame, DatetimeIndex, Index, Series
import pandas._testing as tm
from pandas.core.window.common import _flex_binary_moment... | bsd-3-clause | 8,041,810,625,391,499,000 | 33.402878 | 88 | 0.592346 | false |
rdo-management/neutron | neutron/tests/unit/test_l3_schedulers.py | 1 | 61292 | # Copyright (c) 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 ... | apache-2.0 | 657,560,592,521,189,000 | 41.891533 | 79 | 0.561411 | false |
GunnerJnr/_CodeInstitute | Stream-3/Full-Stack-Development/9.Django-Blog-Part-Five/1.Adding-Images-To-A-Post/Blog_prj/Blog_app/models.py | 1 | 1569 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.utils import timezone
from django.template.defaultfilters import slugify
# Create your models here.
class Post(models.Model):
"""
Here we'll define our Post model
"""
# author is linked to a regis... | mit | -2,301,413,656,304,438,000 | 35.488372 | 89 | 0.674952 | false |
AntoinePrv/hyperNN | hyperLearn/optimizer.py | 1 | 5265 | # import sys
# sys.path.append(".")
from keras.layers import Input, Dense
import keras.optimizers
from keras.models import Model
import sklearn.model_selection as mds
import numpy as np
import problem.load_data as load_data
import problem.train_MINST as train_MINST
import matplotlib.pyplot as plt
import hyperLearn.sam... | mit | 859,907,197,356,754,800 | 36.333333 | 121 | 0.552432 | false |
willametteuniversity/webcirc2 | website/tests/collection_tests.py | 1 | 3866 | '''
This file contains tests that test the new user registration system.
'''
from os.path import abspath, dirname
import sys
project_dir = abspath(dirname(dirname(__file__)))
sys.path.insert(0, project_dir)
from django.core.urlresolvers import resolve
from django.test import TestCase
from django.test.client import Cl... | apache-2.0 | 4,676,250,217,466,827,000 | 37.277228 | 122 | 0.65882 | false |
dongjoon-hyun/tools | collector/ted.py | 1 | 4466 | #!/usr/bin/env python2.7
# -*- coding: utf-8 -*-
# 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 | -3,571,654,614,636,652,000 | 33.620155 | 107 | 0.549933 | false |
gzamboni/sdnResilience | loxi/of11/instruction.py | 1 | 10743 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... | gpl-2.0 | -9,002,718,958,986,910,000 | 27.801609 | 88 | 0.536349 | false |
ivanamihalek/data_management | tests_and_hacks/dropbox_test.py | 1 | 4084 | #!/usr/bin/python
import contextlib
import datetime
import os
import sys
from time import time, gmtime
import unicodedata
import dropbox
#from dropbox.files import FileMetadata, FolderMetadata
####################################
def upload(dbx, fullname, folder, subfolder, name, overwrite=False):
"""Upload a f... | gpl-3.0 | -8,857,571,880,684,488,000 | 36.136364 | 106 | 0.600637 | false |
0x07Ltd/django-condition-chain | settings/dev_south.py | 1 | 2886 | """
Django settings for Django Condition Chain project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
""... | unlicense | -2,016,599,049,804,123,600 | 25.477064 | 76 | 0.698198 | false |
jandecaluwe/ca | myhdl/calc_next_age/tb.py | 1 | 1332 | from random import randrange
from myhdl import *
vectors = tuple([randrange(0, 9) for i in range(1000)])
from calc_next_age import calc_next_age
def tb():
age_out = Signal(bool(0))
live_count = Signal(intbv(0, min=0, max=9))
step = Signal(bool(0))
clock = Signal(bool(0))
reset =... | mit | 3,440,448,091,142,341,600 | 23.218182 | 64 | 0.517267 | false |
alancutter/web-animations-perf-bot | common_args.py | 1 | 2682 | # Copyright 2014 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 | 4,329,061,355,499,458,000 | 29.827586 | 160 | 0.712155 | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_08_01/aio/operations/_virtual_network_gateways_operations.py | 1 | 130315 | # 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 | 2,455,727,869,247,576,000 | 52.407787 | 293 | 0.660776 | false |
pasinskim/integration | tests/tests/amazon_s3/test_01_s3.py | 1 | 1507 | #!/usr/bin/python
# Copyright 2017 Northern.tech AS
#
# 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 a... | apache-2.0 | -6,268,675,659,143,722,000 | 35.756098 | 87 | 0.652289 | false |
jlegido/audio_date_formatter | audio_date_formatter.py | 1 | 8777 | #!/usr/bin/python
'''
Copyright 2015 Javier Legido javi@legido.com
rss_py 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-2.0 | 7,396,395,589,297,873,000 | 39.634259 | 79 | 0.556113 | false |
aptgraph/aptgraph-python | pyaptgraph/pyaptgraph.py | 1 | 2068 | import json
from urllib2 import urlopen, HTTPError
class PyAptgraph(object):
def __init__(self, apiKey, debug=False):
'''
Connect to the Aptgraph API
@param string $apikey Your Aptgraph apikey
@param boolean $debug Turn on/off debugging messages
'''
self.apiKey = ... | mit | 315,635,748,071,512,960 | 28.542857 | 69 | 0.573985 | false |
PaddlePaddle/models | dygraph/similarity_net/nets/losses/hinge_loss.py | 1 | 1549 | # 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 app... | apache-2.0 | -3,637,561,529,339,984,000 | 29.98 | 75 | 0.63654 | false |
lukaszpiotr/pylama_with_gjslint | pylama/checkers/pylint/interfaces.py | 1 | 2266 | # 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 program is distributed in the hope that it will be useful, but ... | lgpl-3.0 | 2,228,174,735,601,860,000 | 30.472222 | 79 | 0.687996 | false |
iceone/flask-restless | tests/test_manager.py | 1 | 27264 | """
tests.test_manager
~~~~~~~~~~~~~~~~~~
Provides unit tests for the :mod:`flask_restless.manager` module.
:copyright: 2012 Jeffrey Finkelstein <jeffrey.finkelstein@gmail.com>
:license: GNU AGPLv3+ or BSD
"""
import datetime
import math
from flask import json
try:
from flask.ext.sqlalchemy ... | agpl-3.0 | 7,106,890,281,293,944,000 | 39.153166 | 79 | 0.58403 | false |
maxweisspoker/simplebitcoinfuncs | simplebitcoinfuncs/__init__.py | 1 | 2888 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function, division, absolute_import
try:
from __builtin__ import bytes, str, open, super, range, zip, round, int, pow, object, input
except ImportError: pass
try:
from __builtin__ import raw_input as input
except: pass
from c... | mit | 6,413,897,269,713,879,000 | 47.1 | 207 | 0.76334 | false |
nakamura-akifumi/ndl_search_harvester | ndl_search_xml2kjson.py | 1 | 10066 | import os.path
from lxml import etree
from datetime import *
import time
from elasticsearch import Elasticsearch
import glob
import json
import re
from urllib.parse import urlparse
import platform
import kassis_config
def json2es():
es = Elasticsearch()
es.indices.create(index='my-index', ignore=400)
es.in... | mit | 6,493,383,532,114,012,000 | 36.559701 | 119 | 0.435227 | false |
impakho/PyProxy | server.py | 1 | 7402 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import socket
import threading
def isset(obj):
if obj == 0: return 0
return 1
def getMethod(header):
if 'CONNECT' in header[0:10]: return 1
return 0
def getHost(header):
rn = '\r\n'
kw = 'Host: '
if no... | mit | 6,333,505,266,663,583,000 | 29.460905 | 91 | 0.450014 | false |
SistemasAgiles/pyreplica | test_tpc.py | 1 | 5502 | #!/usr/bin/env python
# simple test cases for two phase commit extensions to psycopg2
#
# Copyright (C) 2008 Mariano Reingart <mariano@nsis.com.ar>
#
# 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 F... | gpl-3.0 | -2,475,973,225,182,975,000 | 33.496774 | 84 | 0.629226 | false |
CassioAmador/profile_tcabr | visualization_tools/plot_prof3.py | 1 | 5976 | ARRUMAR
import Pmw
import Tkinter as tk
import matplotlib as mpl
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.widgets import Slider, Button
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from os import chdir,listdir,path,getcwd
import read_signal as rs
class PlotWindow():
de... | mit | 3,925,428,603,610,781,700 | 33.953216 | 155 | 0.588353 | false |
radicalbit/ambari | ambari-common/src/main/python/resource_management/core/providers/package/zypper.py | 1 | 9954 | #!/usr/bin/env python
"""
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");... | apache-2.0 | 6,781,222,302,554,648,000 | 38.188976 | 147 | 0.659835 | false |
weijia/clip_trans | docs/conf.py | 1 | 8469 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# complexity documentation build configuration file, created by
# sphinx-quickstart on Tue Jul 9 22:26:36 2013.
#
# 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
# ... | bsd-3-clause | 4,289,514,529,717,521,400 | 29.8 | 76 | 0.705632 | false |
Outernet-Project/bottle-fdsend | setup.py | 1 | 2162 | #!/usr/bin/env python
import os
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
SCRIPTDIR = os.path.dirname(__file__) or '.'
PY3 = sys.version_info >= (3, 0, 0)
def read(fname):
""" Return content of specified file """
path = os.path.join(SCRIPT... | gpl-3.0 | 753,336,325,663,061,200 | 26.367089 | 85 | 0.620722 | false |
BubuLK/sfepy | sfepy/terms/terms.py | 1 | 50040 | from __future__ import absolute_import
import re
from copy import copy
import numpy as nm
from sfepy.base.base import (as_float_or_complex, get_default, assert_,
Container, Struct, basestr, goptions)
from sfepy.base.compat import in1d
# Used for imports in term files.
from sfepy.terms.ex... | bsd-3-clause | 3,292,874,449,945,586,000 | 30.235955 | 80 | 0.498062 | false |
vyouzhis/energy | epyalgo/pyAlgoMACD.py | 1 | 3572 | #!/usr/bin/python2
# -*- coding: utf-8 -*-
# home
#
#
# vim:fileencoding=utf-8:sw=4:et -*- coding: utf-8 -*-
#
# 测试 pyalgotrade 回测
#
import _index
from energy.libs.MongoStock import Feed
from energy.libs.eAlgoLib import eAlgoLib as eal
from pyalgotrade import strategy
from pyalgotrade import bar
from pyalgotrade.tec... | apache-2.0 | -5,943,910,787,479,727,000 | 32.28972 | 139 | 0.606962 | false |
Ogreman/django-termsearch | setup.py | 1 | 1525 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import termsearch
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
version = termsearch.__version__
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
print("You probably wa... | bsd-3-clause | 1,652,145,105,580,968,400 | 26.745455 | 66 | 0.606557 | false |
ponty/confduino | confduino/hwpackinstall.py | 1 | 1582 | from confduino.hwpacklist import hwpack_dir
from confduino.util import tmpdir, download, clean_dir
from entrypoint2 import entrypoint
from path import Path as path
from pyunpack import Archive
import logging
log = logging.getLogger(__name__)
def find_hwpack_dir(root):
"""search for hwpack dir under root."""
... | bsd-2-clause | 6,995,062,261,170,890,000 | 24.934426 | 61 | 0.627686 | false |
DecipherOne/Troglodyte | Trog Build Dependencies/Python26/Lib/ctypes/test/test_pep3118.py | 1 | 7979 | import unittest
from ctypes import *
import re, struct, sys
if sys.byteorder == "little":
THIS_ENDIAN = "<"
OTHER_ENDIAN = ">"
else:
THIS_ENDIAN = ">"
OTHER_ENDIAN = "<"
class memoryview(object):
# This class creates a memoryview - like object from data returned
# by the private _ctypes._buffe... | mit | -3,965,634,519,125,117,000 | 36.815166 | 98 | 0.442411 | false |
tomerfiliba/plumbum | plumbum/typed_env.py | 1 | 4944 | # -*- coding: utf-8 -*-
import inspect
import os
try:
from collections.abc import MutableMapping
except ImportError:
from collections import MutableMapping
NO_DEFAULT = object()
# must not inherit from AttributeError, so not to mess with python's attribute-lookup flow
class EnvironmentVariableError(KeyErro... | mit | 804,424,250,104,359,600 | 27.090909 | 90 | 0.555623 | false |
mwv/Term-Discovery-Evaluation | term-discovery-evaluation/corpus.py | 1 | 7265 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# ------------------------------------
# file: corpus.py
# date: Wed February 26 21:29 2014
# author:
# Maarten Versteegh
# github.com/mwv
# maartenversteegh AT gmail DOT com
#
# Licensed under GPLv3
# ------------------------------------
"""corpus: interface functions to the ... | gpl-3.0 | -7,209,121,632,736,023,000 | 33.268868 | 78 | 0.49649 | false |
sofianehaddad/gosa | tests/polynomial_qsa.py | 1 | 2066 | # -*- Python -*-
#
# @file polynomial_qsa.py
# @brief Validation of sensitivity evaluation for quantiles with the Polynomial model
#
# Copyright (C) 2017 Airbus-IMACS
#
# Written by Sofiane Haddad, haddad@imacs.polytechnique.fr
# Nabil Rachdi, nabil.rachdi@... | lgpl-3.0 | -2,314,937,719,259,113,500 | 35.245614 | 130 | 0.726041 | false |
sam81/pysoundanalyser | setup.py | 1 | 2433 | #! /usr/bin/env python
from distutils.core import setup
setup(
version="0.2.41",
author="Samuele Carcagno",
author_email="sam.carcagno@google.com;",
description="Alpha Version of pysoundanalyser, a program for visualizing sounds ",
long_description=\
"""
Alpha Version of pysoundanalyser, a p... | gpl-3.0 | -3,591,694,968,007,235,000 | 47.66 | 95 | 0.497739 | false |
uclouvain/osis | program_management/tests/ddd/factories/domain/program_tree/LDROI200M_DROI2M.py | 1 | 5123 | ##############################################################################
#
# OSIS stands for Open Student Information System. It's an application
# designed to manage the core business of higher education institutions,
# such as universities, faculties, institutes and professional schools.
# The core ... | agpl-3.0 | -2,357,909,044,270,934,500 | 34.804196 | 105 | 0.550586 | false |
konradstrack/reminisc | reminisc/core/storage/mongo/__init__.py | 1 | 4114 | import logging
import mongoengine
from mongoengine import MultipleObjectsReturned, DoesNotExist
import reminisc.core.processing.commands as commands
from reminisc.core.storage import Storage
from reminisc.core.storage.entities import Message as MessageTuple, Account as AccountTuple
from reminisc.core.storage.mongo.d... | bsd-3-clause | -2,639,007,631,793,989,000 | 38.567308 | 120 | 0.609626 | false |
ActiveState/code | recipes/Python/570089_Interpret_Unicode_escape_escape_sequences/recipe-570089.py | 1 | 1255 | # WARNING: This recipe currently breaks display of the representation of strings containing other string escape sequences such as '\n'. I can't find a way to get ASPN to hide the recipe from public view until I can figure out a way to fix it though :(
# NOTE: This recipe is written to work with Python 3.0
# It would l... | mit | 5,725,071,039,319,198,000 | 45.481481 | 251 | 0.748207 | false |
Dhiru/gstudio | gnowsys-ndf/gnowsys_ndf/ndf/views/topics.py | 1 | 37319 | ''' -- imports from python libraries -- '''
# import os -- Keep such imports here
import json
''' -- imports from installed packages -- '''
from django.contrib.auth.decorators import login_required
from django.contrib.auth.models import User
from django.http import HttpResponseRedirect
from django.http import HttpRespo... | agpl-3.0 | 6,580,081,560,925,266,000 | 46.17952 | 168 | 0.478764 | false |
pedrolegold/uforge-cli | src/uforgecli/commands/usergrp/usergrp_user.py | 1 | 7301 |
__author__="UShareSoft"
from ussclicore.argumentParser import ArgumentParser, ArgumentParserError
from ussclicore.cmd import Cmd, CoreGlobal
from texttable import Texttable
from uforgecli.utils.org_utils import org_get
from ussclicore.utils import generics_utils, printer
from uforgecli.utils.uforgecli_utils import *
... | apache-2.0 | -121,964,161,889,345,520 | 51.913043 | 192 | 0.497055 | false |
lizter/EIT_ORK | formulas.py | 1 | 1469 | from math import cos, sin, sqrt, radians, pi
g = 9.81
def air_pressure(wind_speed, window_width, window_height, wind_direction, window_angle, window_opening_angle, left_hinge):
v = wind_speed
b = window_width
h = window_height
theta = radians(270 - wind_direction + window_angle + 180 if left_hinge e... | apache-2.0 | -3,350,965,730,043,490,000 | 31.666667 | 128 | 0.647379 | false |
jzitelli/poolvr | pool_table.py | 1 | 11254 | """
three.js/Cannon.js pool table definition
"""
from copy import deepcopy
import numpy as np
from three import *
INCH2METER = 0.0254
FT2METER = INCH2METER / 12
def pool_table(L_table=2.3368, W_table=None, H_table=0.77,
L_playable=None, W_playable=None,
ball_diameter=2.25*INCH2METER,... | mit | 3,356,710,787,776,119,000 | 48.359649 | 121 | 0.528168 | false |
thgcode/soundrts | soundrts/serverclient.py | 1 | 9004 | import asynchat
import re
import string
import sys
import time
from lib.log import debug, info, warning, exception
from lib.msgs import insert_silences, encode_msg
import res
from serverroom import Anonymous, InTheLobby, OrganizingAGame, WaitingForTheGameToStart, Game
class ConnectionToClient(asynchat.async_chat):
... | bsd-3-clause | 4,041,552,617,449,451,500 | 31.272401 | 93 | 0.560751 | false |
Svolcano/python_exercise | dianhua/worker/crawler/unicom/date.py | 1 | 1724 | # -*- coding: utf-8 -*-
import datetime
DATE_DICT = {'1':('01-01', '01-31'),
'2-1':('02-01', '02-28'),
'2-2':('02-01', '02-29'),
'3':('03-01', '03-31'),
'4':('04-01', '04-30'),
'5':('05-01', '05-31'),
'6':('06-01', '06-30'),
'7... | mit | 5,921,346,665,807,874,000 | 30.345455 | 78 | 0.437355 | false |
numeristical/introspective | docs/conf.py | 1 | 10191 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# ML Insights documentation build configuration file, created by
# sphinx-quickstart on Wed Nov 9 13:32:07 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
... | mit | -4,084,634,108,976,235,000 | 27.951705 | 80 | 0.692376 | false |
ItsCalebJones/SpaceLaunchNow-Server | api/v300/serializers.py | 1 | 10556 | from rest_framework.relations import HyperlinkedRelatedField
from drf_queryfields import QueryFieldsMixin
from api.models import *
from rest_framework import serializers
from api.utils.custom_serializers import TimeStampField
class AgencySerializer(QueryFieldsMixin, serializers.HyperlinkedModelSerializer):
typ... | apache-2.0 | -682,478,685,765,358,500 | 42.80083 | 117 | 0.653278 | false |
kgilmo/penning_artiq | artiq/gui/state.py | 1 | 2502 | import asyncio
from collections import OrderedDict
import logging
from artiq.tools import TaskObject
from artiq.protocols import pyon
logger = logging.getLogger(__name__)
# support Qt CamelCase naming scheme for save/restore state
def _save_state(obj):
method = getattr(obj, "save_state", None)
if method is... | gpl-3.0 | -2,374,052,132,486,960,000 | 31.076923 | 77 | 0.567146 | false |
claudyus/LXC-Web-Panel | lwp/lxclite/__init__.py | 1 | 7484 | from __future__ import absolute_import, print_function
import subprocess
import os
import time
from lwp.exceptions import ContainerDoesntExists, ContainerAlreadyExists, ContainerAlreadyRunning, ContainerNotRunning,\
DirectoryDoesntExists, NFSDirectoryNotMounted
# LXC Python Library
# Original author: Elie Delo... | mit | 5,178,800,077,308,640,000 | 27.348485 | 157 | 0.619588 | false |
googleapis/python-kms | samples/snippets/iam_remove_member.py | 1 | 2168 | # Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -5,256,517,923,785,935,000 | 34.540984 | 88 | 0.672509 | false |
google/llvm-premerge-checks | scripts/pipeline_main.py | 1 | 1892 | #!/usr/bin/env python3
# Copyright 2020 Google LLC
#
# Licensed under the the Apache License v2.0 with LLVM Exceptions (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://llvm.org/LICENSE.txt
#
# Unless required by applicable law ... | apache-2.0 | 8,349,910,997,647,970,000 | 38.416667 | 125 | 0.696089 | false |
JohnGriffiths/ConWhAt | conwhat/utils/image.py | 1 | 2902 |
import nibabel as nib
import numpy as np
from numpy import pi,sin,cos
from nipy.labs.spatial_models.discrete_domain import grid_domain_from_image
from scipy.spatial import cKDTree
from scipy import ndimage
from scipy.ndimage.morphology import binary_dilation
from scipy.ndimage import binary_fill_holes
def ellip... | bsd-3-clause | -2,670,668,860,836,767,000 | 28.02 | 90 | 0.538249 | false |
GoogleCloudPlatform/datacatalog-connectors | google-datacatalog-connectors-commons/src/google/datacatalog_connectors/commons/prepare/__init__.py | 1 | 1121 | #!/usr/bin/python
#
# Copyright 2020 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 3,710,149,978,452,611,000 | 42.115385 | 74 | 0.781445 | false |
saandrews/pulsar | pulsar-functions/instance/src/main/python/python_instance_main.py | 1 | 6349 | #!/usr/bin/env python
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "... | apache-2.0 | 4,254,504,190,843,299,300 | 44.676259 | 125 | 0.716806 | false |
vincent-noel/libSigNetSim | libsignetsim/model/sbml/Event.py | 1 | 10156 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2014-2017 Vincent Noel (vincent.noel@butantan.gov.br)
#
# This file is part of libSigNetSim.
#
# libSigNetSim 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 Fou... | gpl-3.0 | 5,140,891,710,092,126,000 | 28.612245 | 128 | 0.749508 | false |
yoavaviram/python-amazon-simple-product-api | tests.py | 1 | 22175 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import unittest
from nose.tools import assert_equals, assert_true, assert_false, assert_raises
from flaky import flaky
import time
import datetime
from decimal import Decimal
from amazon.api import (AmazonAPI,
CartException,
... | apache-2.0 | 6,164,378,549,931,667,000 | 35.407225 | 120 | 0.61815 | false |
azraq27/padre | padre/matching.py | 1 | 6523 | '''uses methods from the ``gini`` library for flexible matching'''
from gini.semantics import Bottle,Concept
from gini import logic
import padre as p
import neural as nl
import copy
bottle = Bottle()
p.subjects()
bottle.vocab = [
# Direct objects
Concept('atlas_do', ['atlases','templates']),
Concept('subj... | gpl-2.0 | -7,026,389,746,121,759,000 | 41.633987 | 181 | 0.621187 | false |
srusskih/SublimeBicycleRepair | bike/parsing/fastparserast.py | 1 | 9697 | from __future__ import generators
from parserutils import generateLogicalLines, maskStringsAndComments, maskStringsAndRemoveComments
import re
import os
import compiler
from bike.transformer.save import resetOutputQueue
TABWIDTH = 4
classNameRE = re.compile("^\s*class\s+(\w+)")
fnNameRE = re.compile("^\s*def\s+(\w+)"... | mit | -2,268,760,539,575,058,000 | 28.654434 | 98 | 0.615757 | false |
madmax983/h2o-3 | h2o-py/h2o/transforms/preprocessing.py | 1 | 5987 | from .transform_base import H2OTransformer
import warnings
from ..assembly import H2OCol
class H2OScaler(H2OTransformer):
"""
Standardize an H2OFrame by demeaning and scaling each column.
The default scaling will result in an H2OFrame with columns
having zero mean and unit variance. Users may specify the
c... | apache-2.0 | 4,007,664,278,434,533,400 | 36.654088 | 120 | 0.648739 | false |
metabolite-atlas/metatlas | docs/tools/build_modref_templates.py | 2 | 1868 | #!/usr/bin/env python
"""Script to auto-generate our API docs.
"""
# stdlib imports
import os, sys
# local imports
from apigen import ApiDocWriter
# version comparison
from distutils.version import LooseVersion as V
#*****************************************************************************
def abort(error):
... | bsd-3-clause | 8,446,329,203,060,879,000 | 31.206897 | 79 | 0.59743 | false |
scwuaptx/CTF | 2016-writeup/hitb-gsec/hashbash.py | 1 | 1169 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from pwnpwnpwn import *
from pwn import *
#host = "10.211.55.28"
#port = 8888
host = "54.179.187.55"
port = 2301
r = remote(host,port)
def add(data):
r.recvuntil(":")
r.sendline("add")
r.recvuntil(":")
r.sendline(data)
for i in range(9):
add("61"*16... | gpl-2.0 | 6,141,928,770,232,406,000 | 20.254545 | 79 | 0.612489 | false |
tedlaz/pyted | qtprint3/report_table.py | 1 | 14003 | # -*- coding: utf-8 -*-
'''
Created on 3 Mar 2013
@author: tedlaz
version 1.0
'''
import decimal
import PyQt5.QtCore as Qc
import PyQt5.QtGui as Qg
import PyQt5.QtPrintSupport as Qp
PAGE_NUMBER_TEXT = 'Σελίδα'
def isNum(value): # Einai to value arithmos, i den einai ?
""" use: Returns False i... | gpl-3.0 | -5,898,960,593,881,512,000 | 33.205063 | 78 | 0.538257 | false |
eywalker/datajoint-python | tests/test_attach.py | 1 | 2251 | from nose.tools import assert_true, assert_equal, assert_not_equal
from numpy.testing import assert_array_equal
import tempfile
from pathlib import Path
import os
from .schema_external import Attach
def test_attach_attributes():
""" test saving files in attachments """
# create a mock file
table = Attach... | lgpl-2.1 | -4,984,724,155,670,180,000 | 33.106061 | 104 | 0.643714 | false |
kirienko/gourmet | src/gourmet/plugins/nutritional_information/shopping_plugin.py | 1 | 3423 | import os.path
from gi.repository import Gtk
import gourmet.GourmetRecipeManager
import gourmet.recipeManager
from gourmet.i18n import _
from gourmet.plugin import ShoppingListPlugin
from gourmet.prefs import Prefs
from .nutritionLabel import NutritionLabel
class ShoppingNutritionalInfoPlugin (ShoppingListPlugin):... | gpl-2.0 | 421,188,104,683,355,140 | 36.206522 | 105 | 0.589833 | false |
NMTHydro/Recharge | utils/amf_obs_analysis.py | 1 | 2326 | # ===============================================================================
# Copyright 2016 dgketchum
#
# 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/licens... | apache-2.0 | 483,245,684,274,130,100 | 45.52 | 97 | 0.575236 | false |
ksenia007/dlaCluster | fractalDimensionality.py | 1 | 1799 | """
This function finds the fractal dimensionality of the cluster
"""
from DLAcluster import DLAcluster
import numpy
import matplotlib.pyplot as plt
from scipy.optimize import curve_fit
radiusArray=numpy.arange(10,80,5)
mass=[]
for i in radiusArray:
massValue,matrix=DLAcluster(i,False) #import radius and Tru... | mit | 5,911,563,522,774,789,000 | 30.017241 | 92 | 0.600334 | false |
bzshang/yelp-photo-classification | scripts/create_img_lst.py | 1 | 1895 | """
Create a multi-label image list file according to
http://myungjun-youn-demo.readthedocs.org/en/latest/python/io.html
"""
__author__ = 'bshang'
import numpy as np
import pandas as pd
from sklearn import preprocessing
def convert_label_to_array(str_label):
str_label = str_label.split(' ')
return [int(x) fo... | apache-2.0 | 6,522,732,187,429,842,000 | 32.839286 | 106 | 0.594723 | false |
hplustree/trove | trove/instance/tasks.py | 1 | 5160 | # 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 | -3,250,915,738,083,927,000 | 40.95122 | 78 | 0.532752 | false |
darren-wang/op | oslo_policy/sql.py | 1 | 4073 | # Copyright 2012 OpenStack 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | apache-2.0 | -7,294,282,229,451,771,000 | 39.73 | 77 | 0.630739 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.