repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
noelcjr/EntropyMaxima | em/scripts/add_residues.py | 1 | 12727 | #!/usr/bin/python
"""
Created on Tue Oct 25 15:19:00 2016
@author: noel
"""
import os
import sys
import em.tools.CHARMM_Parser as CP
import em.describe.utilities as ut
import em.tools.Super_Structures as SS
import Bio.PDB.PDBParser as PDBParser
import pandas as pd
import em.tools.input_output as IO
import optparse, pkg... | gpl-3.0 | 2,646,204,782,213,206,000 | 53.857759 | 121 | 0.498782 | false | 4.00598 | false | false | false |
kgjamieson/NEXT-psych | next/apps/PoolBasedBinaryClassification/dashboard/Dashboard.py | 2 | 3689 | import json
import numpy
from datetime import datetime
from datetime import timedelta
from next.utils import utils
from next.dashboard.AppDashboard import AppDashboard
class PoolBasedBinaryClassificationDashboard(AppDashboard):
def __init__(self,db,ell):
AppDashboard.__init__(self,db,ell)
def get_app... | apache-2.0 | -8,598,757,479,435,417,000 | 34.825243 | 131 | 0.577934 | false | 3.803093 | false | false | false |
OpenReliability/OpenReliability | veusz/utils/action.py | 5 | 5375 | # Copyright (C) 2005 Jeremy S. Sanders
# Email: Jeremy Sanders <jeremy@jeremysanders.net>
#
# 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
# ... | gpl-2.0 | 6,143,498,901,184,079,000 | 31.77439 | 79 | 0.614326 | false | 4.01419 | false | false | false |
fresskarma/tinyos-1.x | tools/python/pytos/tools/Drip.py | 1 | 5254 | # "Copyright (c) 2000-2003 The Regents of the University of California.
# All rights reserved.
#
# Permission to use, copy, modify, and distribute this software and its
# documentation for any purpose, without fee, and without written agreement
# is hereby granted, provided that the above copyright notice, the follow... | bsd-3-clause | 1,687,768,265,527,362,600 | 38.80303 | 106 | 0.664446 | false | 3.59863 | false | false | false |
jaufrec/mixtape | mix.py | 1 | 18087 | #!/usr/bin/python3
# TODO: type check inputs
# TODO: generate an easily reviewable section of transitions
import csv
import datetime
import os
import shutil
import subprocess
import sys
import decimal
from optparse import OptionParser
class Song:
def __init__(self, num=None, file=None, start_time=None, fadein_le... | gpl-3.0 | 4,436,340,871,423,215,600 | 38.149351 | 220 | 0.509703 | false | 4.168472 | false | false | false |
AusDTO/dto-digitalmarketplace-buyer-frontend | tests/unit/test_search_presenters.py | 1 | 7685 | import os
import json
import unittest
from mock import Mock
from dmcontent.content_loader import ContentLoader
from werkzeug.datastructures import MultiDict
from app.presenters.search_presenters import filters_for_lot, set_filter_states
content_loader = ContentLoader('tests/fixtures/content')
content_loader.load_man... | mit | 8,642,487,669,402,487,000 | 33.004425 | 79 | 0.49434 | false | 4.283724 | true | false | false |
jolyonb/edx-platform | lms/djangoapps/certificates/api.py | 1 | 22320 | """Certificates API
This is a Python API for generating certificates asynchronously.
Other Django apps should use the API functions defined in this module
rather than importing Django models directly.
"""
import logging
from django.conf import settings
from django.urls import reverse
from django.db.models import Q
fr... | agpl-3.0 | -4,637,370,171,658,106,000 | 33.12844 | 121 | 0.665681 | false | 4.284892 | true | false | false |
ayoubenx/pyfoot-v2.0 | resultats.py | 2 | 7271 | import DB_manager3, sys
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except AttributeError:
def _fromUtf8(s):
return s
try:
_encoding = QtGui.QApplication.UnicodeUTF8
def _translate(context, text, disambig):
return QtGui.QApplication.translate(context, text... | mit | -6,442,178,527,033,832,000 | 44.45 | 181 | 0.656856 | false | 3.845056 | false | false | false |
peterwilletts24/Monsoon-Python-Scripts | msl_pressure/msl_plot_ensemble.py | 1 | 4521 | import os, sys
import cPickle as pickle
import glob
# import itertools
import matplotlib.pyplot as plt
import matplotlib.cm as mpl_cm
import numpy as np
#from mpl_toolkits.basemap import Basemap
#import matplotlib.animation as animation
import iris
import iris.coords as coords
import iris.quickplot as qplt
import i... | mit | -4,242,318,659,673,928,700 | 34.880952 | 156 | 0.594116 | false | 3.297593 | false | false | false |
actofgoods/actofgoods | administration/urls.py | 1 | 2485 | """actofgoods URL Configuration
The `urlpatterns` list routes URLs to views. For more information please see:
https://docs.djangoproject.com/en/1.9/topics/http/urls/
Examples:
Function views
1. Add an import: from my_app import views
2. Add a URL to urlpatterns: url(r'^$', views.home, name='home')
Class-... | mit | -8,970,017,133,031,198,000 | 59.609756 | 153 | 0.701811 | false | 3.555079 | false | false | false |
ttadano/ALM | tools/interface/VASP.py | 1 | 14333 | #
# VASP.py
#
# Interface to VASP (https://www.vasp.at)
#
# Copyright (c) 2014 Terumasa Tadano
#
# This file is distributed under the terms of the MIT license.
# Please see the file 'LICENCE.txt' in the root directory
# or http://opensource.org/licenses/mit-license.php for information.
#
from __future__ import print_fu... | mit | 8,267,490,672,836,880,000 | 29.691649 | 107 | 0.484965 | false | 3.674186 | false | false | false |
pixelated/puppet-pixelated | files/functional-tests/steps/__init__.py | 1 | 2678 | #
# Copyright (c) 2015 ThoughtWorks, Inc.
#
# Pixelated is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Pixelated is distrib... | agpl-3.0 | 1,248,136,364,840,974,300 | 29.089888 | 102 | 0.677371 | false | 3.3475 | false | false | false |
HPPTECH/hpp_IOSTressTest | Refer/check_ID_done.py | 1 | 1906 |
def findProcess( processId ):
ps= subprocess.Popen("ps -ef | grep "+processId, shell=True, stdout=subprocess.PIPE)
output = ps.stdout.read()
ps.stdout.close()
ps.wait()
return output
def isProcessRunning( processId):
output = findProcess( processId )
if re.search(processId, output) is None... | mit | -1,037,469,669,189,381,100 | 25.486111 | 156 | 0.612802 | false | 4.021097 | false | false | false |
beefoo/still-i-rise | detect_flow.py | 1 | 1815 | # -*- coding: utf-8 -*-
# Based on:
# http://docs.opencv.org/trunk/d7/d8b/tutorial_py_lucas_kanade.html
# https://github.com/opencv/opencv/blob/master/samples/python/opt_flow.py
#
# Outputs image where direction responds to hue, length by brightness
# 0° Blue, 60° Magenta, 120° Red, 180° Yellow, 240° Green, 300°... | mit | -1,169,636,866,794,271,500 | 26.830769 | 103 | 0.669983 | false | 2.687964 | false | false | false |
personalrobotics/libcozmo | src/examples/rviz_example.py | 1 | 1927 | #!/usr/bin/env python
import rospy
from roscpp_initializer import roscpp_initializer
from aikidopy import SkeletonMarker, InteractiveMarkerViewer
from cozmopy import Cozmo
import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument('--mesh_dir', dest='mesh_dir', required ... | bsd-3-clause | 631,787,375,368,796,800 | 34.685185 | 93 | 0.615983 | false | 3.854 | false | false | false |
timcera/hspfbintoolbox | setup.py | 1 | 2360 | # -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
# temporarily redirect config directory to prevent matplotlib importing
# testing that for writeable directory which results in sandbox error in
# certain easy_install versions
os.environ["MPLCONFIGDIR"] = "."
pkg_name = "hspfbintoolbox"
ver... | bsd-3-clause | 7,215,059,931,769,591,000 | 28.135802 | 87 | 0.622458 | false | 3.81877 | false | false | false |
NullHypothesis/tor-dns-tools | analyse-query-quality.py | 1 | 5546 | #!/usr/bin/env python2
#
# Copyright 2016 Philipp Winter <phw@nymity.ch>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later versio... | gpl-3.0 | -5,350,662,846,594,334,000 | 28.5 | 79 | 0.626578 | false | 3.417129 | false | false | false |
sly-ninja/python_for_ml | Module5/assignment2.py | 1 | 5895 | import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
matplotlib.style.use('ggplot') # Look Pretty
def showandtell(title=None):
if title != None: plt.savefig(title + ".png", bbox_inches='tight', dpi=300)
plt.show()
# exit()
#
# INFO: This dataset has call records for 10 users tracked over t... | mit | 560,721,554,075,269,200 | 38.563758 | 105 | 0.718236 | false | 3.324873 | false | false | false |
PopCap/GameIdea | Engine/Source/ThirdParty/HTML5/emsdk/emscripten/1.30.0/tools/emterpretify.py | 1 | 54897 | #!/usr/bin/env python2
'''
Processes asm.js code to make it run in an emterpreter.
Currently this requires the asm.js code to have been built with -s FINALIZE_ASM_JS=0
'''
import os, sys, re, json
import asm_module, shared, shutil
# params
INNERTERPRETER_LAST_OPCODE = 0 # 'CONDD'
EMT_STACK_MAX = 1024*1024
LOG_CO... | bsd-2-clause | -4,270,246,014,771,602,400 | 49.783534 | 578 | 0.554129 | false | 2.741286 | false | false | false |
davisagli/beatbox | src/beatbox/tests/test_pythonClient.py | 1 | 32342 | from beatbox import SoapFaultError
from beatbox.python_client import _prepareSObjects
from types import DictType, StringTypes, IntType, ListType, TupleType
import beatbox
import datetime
import sfconfig
import unittest
class TestUtils(unittest.TestCase):
def setUp(self):
self.svc = svc = beat... | gpl-2.0 | 9,205,919,762,729,724,000 | 34.298541 | 99 | 0.531538 | false | 3.971755 | true | false | false |
yatish27/mase | src/stockflow.py | 9 | 2560 | from __future__ import print_function, division
import sys
sys.dont_write_bytecode = True
from ok import *
import random
r = random.random
isa = isinstance
"""
# Compartmental Modeling
## Diapers
q +-----+ r +-----+
---->| C |---->| D |--> s
^ +-----+ +-+---+
| |
+-------------... | unlicense | -4,875,680,603,400,262,000 | 22.934579 | 50 | 0.496094 | false | 2.694737 | false | false | false |
jmhobbs/detours-clone | lib/detours.py | 1 | 1397 | # -*- coding: utf-8 -*-
import os
class HostFile:
delimiter = "##### DO NOT EDIT BETWEEN THESE LINES - DETOURD #####\n"
def __init__ ( self, path ):
self.path = path
def canWrite ( self ):
try:
f = open( self.path, 'r+' )
f.close()
return True
except IOError:
return False
def getDetours ( sel... | mit | -1,530,638,960,746,162,700 | 20.166667 | 73 | 0.591267 | false | 2.985043 | false | false | false |
palisadoes/switchmap-ng | switchmap/snmp/cisco/mib_ciscocdp.py | 2 | 5045 | #!/usr/bin/env python3
"""Module for CISCO-CDP-MIB."""
from collections import defaultdict
from switchmap.snmp.base_query import Query
def get_query():
"""Return this module's Query class."""
return CiscoCdpQuery
def init_query(snmp_object):
"""Return initialize and return this module's Query class.""... | apache-2.0 | -8,081,237,075,447,690,000 | 25.276042 | 75 | 0.589891 | false | 3.938329 | false | false | false |
Ichaelus/Github-Classifier | Application/start.py | 1 | 8359 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###################################
# Initialization and startup file #
###################################
def packageMissing(name):
raise ImportError('Dependency \''+name+'\' has not been found. Please refer to the installation manual.')
import time, os, webbrowser... | mit | -8,548,725,733,669,870,000 | 50.919255 | 288 | 0.81158 | false | 4.506199 | false | false | false |
sajuptpm/manila | manila/tests/share/drivers/zfssa/test_zfssarest.py | 5 | 16891 | # Copyright (c) 2014, Oracle and/or its affiliates. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# ... | apache-2.0 | -968,602,415,451,639,700 | 41.65404 | 78 | 0.503108 | false | 4.314432 | true | false | false |
oneminot/audacity | lib-src/lv2/sord/waflib/Tools/dbus.py | 318 | 1142 | #! /usr/bin/env python
# encoding: utf-8
# WARNING! Do not edit! http://waf.googlecode.com/git/docs/wafbook/single.html#_obtaining_the_waf_file
from waflib import Task,Errors
from waflib.TaskGen import taskgen_method,before_method
@taskgen_method
def add_dbus_file(self,filename,prefix,mode):
if not hasattr(self,'dbus... | gpl-2.0 | -6,612,690,221,675,248 | 38.37931 | 124 | 0.7338 | false | 2.819753 | false | false | false |
joshfriend/sqlalchemy-utils | tests/test_expressions.py | 1 | 4399 | from pytest import raises
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from sqlalchemy_utils.types import TSVectorType
from sqlalchemy_utils.expressions import (
explain,
explain_analyze,
tsvector_match,
tsvector_concat,
to_tsquery,
plainto_tsquery
)
from tests import TestC... | bsd-3-clause | -1,616,012,066,129,236,500 | 29.337931 | 74 | 0.605138 | false | 4.032081 | true | false | false |
ideascube/pibox-installer | kiwix-hotspot/wipe.py | 1 | 1121 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# vim: ai ts=4 sts=4 et sw=4 nu
""" Flash a clean, single FAT partition MBR onto the specifief SD-card """
import os
import sys
import argparse
import multiprocessing
import data
from backend.util import flash_image_with_etcher
from util import CLILogger
def wipe_card(... | gpl-3.0 | -3,246,676,374,475,777,000 | 28.5 | 86 | 0.67083 | false | 3.122563 | false | false | false |
csiu/promi2 | code/gff_unify_features.py | 1 | 4149 | #!/usr/bin/env python
# Author: csiu
# Created: 2015-02-17
import argparse
import sys
import os
from utils import random_string, get_value_from_keycolonvalue_list
usage = """Essentially running:
bedtools intersect -a <features.gff> -b <mirna_prox.gff> -s -f 1 -r -wao
"""
def bedtools_intersect(gff_a, gff_b, gff_out):
... | mit | -5,052,340,892,532,687,000 | 34.461538 | 88 | 0.476018 | false | 3.570568 | false | false | false |
whitehorse-io/encarnia | Encarnia/typeclasses/npcs.py | 1 | 9579 | """
Weapon
The default weapon object, file is called Arms so that it doesn't conflict with a tutorial weapon object.
"""
from evennia import DefaultObject
from evennia import default_cmds, CmdSet, utils
from commands.default_cmdsets import ChargenCmdset, ShopCmdset, BankCmdset, MerchantCmdset
from world impo... | mit | 1,308,225,917,950,228,500 | 38.770213 | 164 | 0.590145 | false | 3.795166 | false | false | false |
djeshkov/guap | js.py | 1 | 10421 | from __future__ import absolute_import, print_function, division
from pony.py23compat import int_types, basestring, imap, iteritems
import json
from operator import attrgetter
from collections import defaultdict
from datetime import date, datetime
from decimal import Decimal
from pony.orm.core import Attribute, Set, ... | gpl-2.0 | 3,923,570,456,196,481,500 | 42.061983 | 107 | 0.52922 | false | 4.003458 | false | false | false |
gibiansky/tensorflow | tensorflow/python/client/session_test.py | 3 | 64506 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -1,216,164,355,176,531,000 | 39.366708 | 80 | 0.61709 | false | 3.319405 | true | false | false |
appi147/Jarvis | installer/steps/d_optional.py | 1 | 1996 | from helper import *
import optional
section("Check optional requirements")
requirements_failed = []
def check_optional_requirement(requirement):
if 'pip' in requirement.keys():
if shell("pip install -U {}".format(" ".join(requirement['pip'])), True).success():
return True
else:
... | mit | -4,382,335,933,048,287,700 | 27.112676 | 91 | 0.617735 | false | 4.696471 | false | false | false |
jackellice2/Population-Simulator | popgen.py | 1 | 21723 | from random import random
from random import choice
from math import floor
import names
'''
Names is required to run this script.
download from https://pypi.python.org/pypi/names/.
'''
elder_population = 0
married_population = 0
single_population = 0
runtime = 0
born_this_year = 0
living = []
the_dead = []
'''
A bun... | mit | 6,692,986,190,573,323,000 | 31.617117 | 235 | 0.458086 | false | 4.244431 | false | false | false |
pellaeon/bsd-cloudinit | cloudbaseinit/tests/plugins/windows/test_extendvolumes.py | 5 | 9719 | # Copyright (c) 2013 Cloudbase Solutions Srl
#
# 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 applicab... | apache-2.0 | 3,875,034,955,939,940,000 | 43.99537 | 79 | 0.638646 | false | 3.692629 | true | false | false |
0x90sled/catapult | third_party/gsutil/third_party/boto/tests/unit/manage/test_ssh.py | 114 | 2004 | #!/usr/bin/env python
# Copyright (c) 2013 Amazon.com, Inc. or its affiliates. All Rights Reserved
#
# 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 ... | bsd-3-clause | 292,889,131,147,557,600 | 36.111111 | 80 | 0.717565 | false | 4.175 | true | false | false |
kanairen/RegularIcosahedronDict | src/view/qt_main.py | 1 | 12865 | #!/usr/bin/env python
# coding: utf-8
import sys
import time
import threading
import StringIO
from PyQt4 import QtGui, QtCore
from src.util.app_util import save_cache, load_cache
class MainWindow(QtGui.QMainWindow):
"""
プロジェクトをグラフィカルに操作するUIウィンドウ
"""
LABEL_TEXT_MODEL_PATH = "Model File (.off or .ob... | mit | -7,816,039,373,286,060,000 | 30.700265 | 82 | 0.558614 | false | 3.23 | false | false | false |
debugger06/MiroX | tv/lib/frontends/widgets/gtk/customcontrols.py | 2 | 20354 | # Miro - an RSS based video player application
# Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010, 2011
# Participatory Culture Foundation
#
# 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; eithe... | gpl-2.0 | -1,318,889,697,418,349,800 | 35.088652 | 79 | 0.61639 | false | 3.876952 | false | false | false |
netoaraujjo/hal | clustering/kmeans.py | 1 | 1671 | #-*- coding: utf-8 -*-
from sklearn.cluster import KMeans as sk_KMeans
from .clustering import Clustering
class KMeans(Clustering):
"""docstring for KMeans."""
def __init__(self, data, n_clusters = 8, init = 'k-means++', n_init = 10,
max_iter = 300, tol = 0.0001, precompute_distances = 'auto',
verbose = 0,... | mit | 7,356,097,911,148,121,000 | 27.810345 | 74 | 0.636744 | false | 3.111732 | false | false | false |
ClearCorp/account-financial-reporting | mis_builder/report/mis_builder_xls.py | 5 | 4678 | # -*- coding: utf-8 -*-
# © 2014-2015 ACSONE SA/NV (<http://acsone.eu>)
# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl.html).
import xlwt
from openerp.report import report_sxw
from openerp.addons.report_xls.report_xls import report_xls
import logging
_logger = logging.getLogger(__name__)
class MisBui... | agpl-3.0 | -3,678,627,083,664,979,500 | 37.975 | 78 | 0.504169 | false | 3.527149 | false | false | false |
inclement/python-for-android-revamp | pythonforandroid/toolchain.py | 1 | 83695 | #!/usr/bin/env python
"""
Tool for compiling Android toolchain
====================================
This tool intend to replace all the previous tools/ in shell script.
"""
from __future__ import print_function
import sys
from sys import stdout
from os.path import join, dirname, realpath, exists, isdir, basename
fro... | mit | -8,061,471,493,450,780,000 | 35.310195 | 182 | 0.563463 | false | 4.062075 | false | false | false |
classner/barrista | barrista/solver.py | 1 | 43153 | # -*- coding: utf-8 -*-
"""Exposes the caffe solvers."""
# pylint: disable=E1101, F0401, C0103, R0913, R0914, W0212, E1121, E0611, W0406
# pylint: disable=duplicate-code, too-many-lines
from __future__ import print_function
from . import monitoring as _monitoring
from . import parallel as _parallel
# CAREFUL! This mus... | mit | 3,881,279,440,033,057,000 | 38.993513 | 86 | 0.567006 | false | 4.413726 | true | false | false |
shubham1810/aquabrim_project | machine/migrations/0002_auto__add_field_device_user.py | 2 | 4307 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Device.user'
db.add_column(u'machine_device', 'user',
... | mit | 679,957,161,165,323,500 | 62.352941 | 195 | 0.557465 | false | 3.674915 | false | false | false |
litvinchuck/python-workout | ftp/ftptracker.py | 2 | 2541 | import sys
from datetime import datetime
from utils.readable import readable_size, readable_time
class FTPTracker:
"""Tracks ftp upload and download progress. Displays progress bar
Args:
file_size (int): size of tracked file
bar_length (int, optional): length of output bar. Defaults to 50
... | mit | 8,415,032,502,189,293,000 | 31.576923 | 94 | 0.575364 | false | 4.052632 | false | false | false |
neuront/redis-ctl | daemonutils/node_polling.py | 1 | 4016 | import time
import logging
import random
import threading
from socket import error as SocketError
import file_ipc
import stats
from config import NODES_EACH_THREAD
from stats_models import RedisNodeStatus, ProxyStatus
from models.base import db
from models.polling_stat import PollingStat
class Poller(threading.Threa... | mit | -7,240,690,717,303,977,000 | 29.892308 | 79 | 0.573456 | false | 3.763824 | false | false | false |
hamelg/Diamond | src/collectors/mysqlstat/mysql55.py | 28 | 8243 | # coding=utf-8
"""
Diamond collector that monitors relevant MySQL performance_schema values
For now only monitors replication load
[Blog](http://bit.ly/PbSkbN) announcement.
[Snippet](http://bit.ly/SHwYhT) to build example graph.
#### Dependencies
* MySQLdb
* MySQL 5.5.3+
"""
from __future__ import division
... | mit | -3,602,694,593,909,790,700 | 32.104418 | 79 | 0.491569 | false | 3.961076 | true | false | false |
pengyuan/markov2tensor | poirank/self_correlation.py | 1 | 2204 | #!/usr/bin/env python
# coding: UTF-8
from __future__ import division
from poirank.transition import init_data, trans
import pylab
poi_axis, axis_poi, data = init_data(tuple(range(2,30)))
#tensor = trans(data, len(axis_poi))
# print "data: ", data
data_length = len(data)
print "data_length: ", data_length
def poi_co... | mit | 5,267,185,298,583,716,000 | 23.916667 | 73 | 0.633365 | false | 2.377273 | false | false | false |
byuphamerator/phamerator-dev | phamerator/config.py | 1 | 3155 | #!/usr/bin/python
import gconf, os
class PhameratorConfiguration:
def __init__(self):
# add keys if needed
self.client = gconf.client_get_default()
self.gconf_dir = '/apps/phamerator'
if not self.client.dir_exists(self.gconf_dir):
self.client.add_dir(self.gconf_dir, gconf.CLIENT_PRELOAD_NONE)
... | gpl-2.0 | -2,609,633,916,455,646,700 | 33.293478 | 96 | 0.598732 | false | 3.388829 | false | false | false |
julienmalard/Tikon | pruebas/test_central/rcrs/vars_interés.py | 1 | 1179 | from datetime import date
import pandas as pd
import xarray as xr
from tikon.central import Módulo, SimulMódulo, Modelo, Exper, Parcela
from tikon.central.res import Resultado
from tikon.datos import Obs
from tikon.utils import EJE_TIEMPO
class Res1_1(Resultado):
nombre = 'res 1_1'
unids = None
class Res1_... | agpl-3.0 | 1,028,831,009,600,824,700 | 17.725806 | 102 | 0.66236 | false | 2.350202 | false | false | false |
midlgxdev/cdecimal-2.3 | python/test_cdecimal3.py | 2 | 172013 | # Copyright (c) 2004 Python Software Foundation.
# All rights reserved.
# Written by Eric Price <eprice at tjhsst.edu>
# and Facundo Batista <facundo at taniquetil.com.ar>
# and Raymond Hettinger <python at rcn.com>
# and Aahz (aahz at pobox.com)
# and Tim Peters
"""
These are the test cases for the Decim... | bsd-2-clause | -1,927,077,917,711,028,000 | 35.249737 | 113 | 0.54981 | false | 3.751063 | true | false | false |
jotajunior/scrapers | riot/src/riot.py | 1 | 3422 | import requests
class Riot:
api_key = None
region = None
valid_regions = None
summoner_version = 'v1.4'
base_api_url = 'https://{0}.api.pvp.net'
base_summoner_suffix = '/api/lol/{0}/{1}/summoner'
base_summoner_url = None
MAX_ID_LIST = 40
def check_region(self):
if no... | mit | 6,683,860,858,705,820,000 | 28.756522 | 87 | 0.532437 | false | 3.735808 | false | false | false |
fetox74/wormboard-backend | scripts/python/StatsUpdater.py | 1 | 23828 | #!/usr/bin/env python
import gzip
import json
import re
import urllib2
import psycopg2
import time
from StringIO import StringIO
from multiprocessing.pool import ThreadPool
from itertools import islice
from functools import wraps
# See LICENSE.md in /scripts/python folder
def retry(ExceptionToCheck, tries=4, delay=3... | agpl-3.0 | -6,303,379,556,367,057,000 | 49.058824 | 380 | 0.619859 | false | 3.251194 | false | false | false |
JulienLeonard/PVG | lib/geoquad.py | 1 | 6499 | from utils import *
from geoutils import *
from curvebuilder import *
from circle import *
class GeoQuadNode:
def __init__(self,geoquad,bbox):
self.mgeoquad = geoquad
self.mbbox = bbox
self.msubnodes = []
def contain(self,point):
return self.... | gpl-2.0 | 3,057,372,195,883,663,000 | 34.717514 | 147 | 0.595476 | false | 3.074267 | false | false | false |
jasedit/scriptorium | setup.py | 2 | 1389 | """Setuptools file for a MultiMarkdown Python wrapper."""
import os
import re
from distutils.core import setup
from setuptools import find_packages
import pypandoc
with open(os.path.join('scriptorium', '_version.py'), 'r') as vfp:
vtext = vfp.read()
v_re = r"__version__ = \"(?P<ver>.*)\""
mo = re.search(v_... | mit | -2,037,072,477,922,044,000 | 29.866667 | 73 | 0.614831 | false | 3.723861 | false | false | false |
amlyj/pythonStudy | 2.7/data_analysis/study_numpy/numpy_ndarray.py | 1 | 5118 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# @Time : 17-7-22 上午12:41
# @Author : tom.lee
# @docs : http://old.sebug.net/paper/books/scipydoc/numpy_intro.html
# @File : study_numpy.py
# @Software: PyCharm
"""
numpy
Numpy是Python的一个科学计算的库,提供了矩阵运算的功能,其一般与Scipy,matplotlib一起使用.
NumPy提供了两种基本的对象:
ndarray(N-d... | mit | 8,926,785,202,037,982,000 | 20.380952 | 71 | 0.594933 | false | 1.678505 | false | false | false |
odahoda/noisicaa | noisicaa/builtin_nodes/metronome/node_description.py | 1 | 1593 | #!/usr/bin/python3
# @begin:license
#
# Copyright (c) 2015-2019, Benjamin Niemann <pink@odahoda.de>
#
# 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 y... | gpl-2.0 | -3,700,266,251,660,509,000 | 31.510204 | 73 | 0.68801 | false | 3.811005 | false | false | false |
ain7/www.ain7.org | ain7/adhesions/migrations/0001_initial.py | 1 | 3525 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-30 23:26
from __future__ import unicode_literals
from django.db import migrations, models
import uuid
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
n... | lgpl-2.1 | 2,508,260,957,025,356,300 | 54.952381 | 386 | 0.57844 | false | 3.691099 | false | false | false |
DavidSouther/nucleosynth | src/canvas/assets/stars.py | 1 | 1870 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
import csv
import sys
import json
import graph
from math import sin, cos, sqrt
reader = csv.reader(sys.stdin)
class Star:
"""Hold data about a star."""
def __init__(self):
self.name = "[unknown star]"
self.spherical = {
'ascension': 0,
'declination': 0,
'd... | mit | -6,329,218,047,016,869,000 | 20.261364 | 67 | 0.591979 | false | 2.419146 | false | false | false |
kylebarlow/marchmadness | predict.py | 1 | 29819 | #!/usr/bin/env python3
# Requires Python 3
"""
March Madness prediction script
Copyright (C) 2013-2019 Kyle Barlow
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... | gpl-3.0 | 5,411,448,162,556,504,000 | 35.542892 | 271 | 0.579765 | false | 3.631592 | false | false | false |
stephenfin/patchwork | patchwork/tests/utils.py | 1 | 9894 | # Patchwork - automated patch tracking system
# Copyright (C) 2008 Jeremy Kerr <jk@ozlabs.org>
#
# SPDX-License-Identifier: GPL-2.0-or-later
import codecs
from datetime import datetime as dt
from datetime import timedelta
from email.utils import make_msgid
import os
from django.contrib.auth.models import User
from p... | gpl-2.0 | 5,798,578,965,626,591,000 | 27.34957 | 79 | 0.616636 | false | 3.873923 | true | false | false |
khoanguyen0791/cs170 | CS170_homework/Asg 61.py | 1 | 1653 | from PIL import Image
from colorPixelListPIL import *
def negative_color(pic,n):
span = 256/n
width, height = pic.size
ni = Image.new("RGB", (width,height),(255,255,255))
for w in range(width):
for h in range(height):
pix = pic.getpixel((w,h))
(r,g,b) = pix
n... | apache-2.0 | 3,924,509,857,845,825,500 | 25.238095 | 55 | 0.477919 | false | 2.941281 | false | false | false |
turbulenz/turbulenz_local | turbulenz_local/decorators.py | 1 | 3134 | # Copyright (c) 2011,2013 Turbulenz Limited
from warnings import warn
from decorator import decorator
from simplejson import JSONEncoder, JSONDecoder
from pylons import request, response
from urlparse import urlparse
from turbulenz_local.lib.exceptions import PostOnlyException, GetOnlyException
# pylint: disable=C... | mit | 1,956,189,377,863,622,400 | 28.847619 | 78 | 0.63178 | false | 3.682726 | false | false | false |
atakan/Complex_Coeff_RKN | testing/timing_runs/400body_CPUtime_plot.py | 1 | 3030 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import division, print_function
import numpy as np
import matplotlib as mpl
import matplotlib.pyplot as plt
from matplotlib.patches import Circle, Polygon
from matplotlib import rc
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
from matplo... | gpl-3.0 | -1,209,233,719,801,235,500 | 30.894737 | 96 | 0.674587 | false | 2.127809 | false | false | false |
robacklin/sigrok | sigrok-meter/mainwindow.py | 1 | 5394 | ##
## This file is part of the sigrok-meter project.
##
## Copyright (C) 2013 Uwe Hermann <uwe@hermann-uwe.de>
## Copyright (C) 2014 Jens Steinhauser <jens.steinhauser@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 publish... | gpl-3.0 | 6,154,553,371,368,940,000 | 36.458333 | 83 | 0.649611 | false | 3.872218 | false | false | false |
Shadeslayer345/PyPong | Main/Game/Ball.py | 1 | 1418 | import pygame
from pygame.locals import *
from Colors import *
class Ball:
def __init__(self, surface, color, position):
self.layer = surface
self.color = color
self.init_X = position[0]
self.init_Y = position[1]
self.var_X = self.init_X
self.var_Y = self.init_Y
self.radius = position[2]
self.width ... | mit | -3,764,336,414,180,322,000 | 25.754717 | 78 | 0.646685 | false | 2.444828 | false | false | false |
ZeroCater/linty | interface/migrations/0002_auto_20160525_2315.py | 1 | 1906 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-05-26 06:15
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | mit | 2,182,037,319,607,319,000 | 38.708333 | 179 | 0.566107 | false | 4.292793 | false | false | false |
nth2say/simple_django_blog | simple_django_blog/settings.py | 1 | 2961 | # _*_ coding=utf-8 _*_
"""
Django settings for simple_django_blog project.
Generated by 'django-admin startproject' using Django 1.8.2.
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... | mit | 5,607,113,428,644,445,000 | 25.4375 | 71 | 0.677812 | false | 3.41129 | false | false | false |
zcbenz/cefode-chromium | tools/telemetry/telemetry/core/browser_options_unittest.py | 11 | 2393 | # Copyright (c) 2012 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
from telemetry.core import browser_options
class BrowserOptionsTest(unittest.TestCase):
def testDefaults(self):
options = browser_... | bsd-3-clause | 4,838,091,917,329,945,000 | 38.883333 | 72 | 0.697033 | false | 3.786392 | true | false | false |
etal/biofrills | biofrills/sequtils.py | 1 | 2940 | """Utilities for manipulating sequence sets.
"""
import logging
import os.path
from collections import Counter
from Bio import SeqIO
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
def clean_accession(rec_id):
"""Extract an accession key from one SeqRecord.
The id of the given record is process... | bsd-2-clause | -1,387,220,131,905,263,000 | 33.186047 | 78 | 0.609524 | false | 4.07767 | false | false | false |
tks0123456789/kaggle-Otto | exp_NN4_RI_max_epochs.py | 2 | 5778 | """
Experiment for NN4(RI)
Aim: To find the best max_epochs for NN4(*, 1024, 1024, 1024) + RI(k = 3, m = 200)
max_epochs: [22, 24, ... ,98, 140]
Averaging 20 models
Summary
epochs 88 , loss 0.421860471364
Time:3:40:30 on i7-4790k 32G MEM GTX660
I got a different result, epochs 112 loss 0.422868, before I reinstalle... | mit | -1,470,072,911,108,371,000 | 32.789474 | 94 | 0.619418 | false | 3.039453 | false | false | false |
openstack/python-openstackclient | openstackclient/compute/v2/service.py | 2 | 10505 | # Copyright 2012-2013 OpenStack Foundation
#
# 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 la... | apache-2.0 | -4,229,876,431,149,876,000 | 36.78777 | 79 | 0.523179 | false | 4.587336 | false | false | false |
mathebox/django_hana_pyhdb | django_hana/models.py | 2 | 2900 | from django.contrib.gis.db import models
from django.contrib.gis.db.backends.base.models import SpatialRefSysMixin
from django.utils.encoding import python_2_unicode_compatible
@python_2_unicode_compatible
class HanaGeometryColumns(models.Model):
"""
Maps to the HANA ST_GEOMETRY_COLUMNS view.
"""
sche... | bsd-3-clause | 3,511,851,707,603,256,000 | 33.117647 | 84 | 0.672414 | false | 3.629537 | false | false | false |
neogi/machine-learning | regression/simple_linear_regression/simple_linear_regression.py | 1 | 1816 | """
Simple Linear Regression: y = w0 + w1*x
Objective: Estimate w0 and w1, given x and y
where x = input feature
y = output
w0 = intercept
w1 = slope
"""
# Imports
import numpy as np
# Functions
def simple_linear_regression(input_feature, output):
"""
Purpose: Compute intercept and slope
... | gpl-3.0 | -4,981,055,031,569,154,000 | 33.923077 | 147 | 0.66685 | false | 3.639279 | false | false | false |
NeurodataWithoutBorders/api-python | examples/create_scripts/link_test-e.py | 1 | 1405 | #!/usr/bin/python
import sys
from nwb import nwb_file
from nwb import nwb_utils as ut
"""
Test extension defining a link
"""
OUTPUT_DIR = "../created_nwb_files/"
file_name = __file__[0:-3] + ".nwb"
########################################################################
# create a new NWB file
settings = {}
setting... | bsd-3-clause | -8,733,948,675,525,176,000 | 27.1 | 72 | 0.614947 | false | 3.337292 | false | false | false |
DMCTruong/Discord-Bot | Bot.py | 1 | 2291 | ##########################################################################################
# Program Name : Discord Bot
# Author : DMCTruong
# Last Updated : August 31, 2017
# License : MIT
# Description : A general purpose bot written for Discord
#########################... | mit | 1,855,225,235,320,659,700 | 31.742857 | 94 | 0.613706 | false | 3.755738 | true | false | false |
cwoebker/relo | relo/local/index.py | 1 | 9731 | #!/usr/bin/env python
# encoding: utf-8
import os, time, re
from metaphone import dm as double_metaphone
from relo.core.config import conf
from relo.core.log import logger
from relo.local import util
from relo.core.interfaces import Backend
from relo.yapsy.PluginManager import PluginManager
import hashlib
from prog... | bsd-3-clause | -936,636,815,801,567,000 | 38.225806 | 118 | 0.598684 | false | 3.683453 | false | false | false |
ansobolev/shs | shs/gui/PlotFrame.py | 1 | 13356 | # -*- coding: utf-8 -*-
import math
import os
import wx
from wx.lib.mixins.listctrl import getListCtrlSelection
try:
from wx.lib.pubsub.pub import Publisher
except ImportError:
from wx.lib.pubsub import pub
import matplotlib.cm as cm
from matplotlib.figure import Figure
from matplotlib.backends.backend_wxagg ... | mit | 882,997,367,532,550,500 | 34.616 | 117 | 0.539757 | false | 3.436069 | false | false | false |
exhuma/wickedjukebox | wickedjukebox/database.py | 1 | 11563 | from wickedjukebox import Base
from sqlalchemy.types import (
Integer,
Unicode,
Date,
String,
Boolean,
Float,
DateTime,
)
from sqlalchemy.orm import (
relationship,
)
from sqlalchemy import (
UniqueConstraint,
Column,
... | bsd-3-clause | 2,195,029,730,774,627,300 | 39.57193 | 126 | 0.659258 | false | 3.690712 | false | false | false |
Tche333/Hello_World | plugin.video.belgium/addon.py | 1 | 2399 | # -*- coding: iso-8859-1 -*-
import urllib, os, sys
import channel
#if channel.in_xbmc:
#icon = xbmc.translatePath(os.path.join(__home__, 'resources/rtl-tvi.png'))
channels = {'rtltvi': {'name': 'RTL-TVI', 'icon': 'rtl-tvi.png', 'module': 'rtl'},
'clubrtl': {'name': 'Club RTL', 'icon': 'club-rt... | gpl-2.0 | -933,369,316,216,869,900 | 33.271429 | 93 | 0.540642 | false | 3.417379 | false | false | false |
simon-weber/gmusicapi | setup.py | 2 | 2676 | #!/usr/bin/env python
import re
from setuptools import setup, find_packages
import sys
import warnings
if sys.version_info[:3] < (3, 5, 0):
warnings.warn("gmusicapi does not officially support versions below "
"Python 3.5.0", RuntimeWarning)
# This hack is from http://stackoverflow.com/a/707135... | bsd-3-clause | 2,195,354,397,772,003,800 | 38.940299 | 95 | 0.556054 | false | 3.544371 | false | false | false |
NUDelta/gaze | util.py | 2 | 3259 | # Copyright (C) 2013 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | bsd-3-clause | -4,627,289,110,335,351,000 | 31.59 | 77 | 0.727217 | false | 3.959903 | false | false | false |
huleiak47/python-hlutils | hlutils/tools/plot.py | 1 | 2114 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
r'''
Plot a function.
'''
# Changes:
# ** version 1.0 2014-05-07 Hulei **
# 1. first version
import os
import sys
import argparse
import matplotlib.pyplot as plt
from math import *
def parse_cmd():
parser = argparse.ArgumentParser()
parser.add_argument("--s... | apache-2.0 | -5,390,034,267,684,475,000 | 28.361111 | 108 | 0.566225 | false | 3.262346 | false | false | false |
rafaelvieiras/PseudoTV_Live | plugin.video.pseudotv.live/plugin.py | 1 | 13265 | # Copyright (C) 2020 Lunatixz
#
#
# This file is part of PseudoTV Live.
#
# PseudoTV Live 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 vers... | gpl-3.0 | -4,419,914,003,886,265,300 | 47.24 | 140 | 0.568262 | false | 3.846042 | false | false | false |
zzxuanyuan/osgparse | osgparse/slidingwindow.py | 1 | 6204 | # This file does regression test using Random Forest Regression.
# The input file should be insert_total_jobs.csv that contains total jobs info.
import matplotlib.pyplot as plt
import math
import sys
import pandas as pd
import numpy as np
class SlidingWindow:
def __init__(self, job_instances_file, attribute = "Desk... | bsd-3-clause | -3,957,543,696,479,553,000 | 49.032258 | 180 | 0.721954 | false | 2.782063 | true | false | false |
UltrosBot/Ultros3K | tests/storage/data/test_toml.py | 1 | 3529 | # coding=utf-8
import os
import secrets
import shutil
import tempfile
from nose.tools import assert_equal, assert_true
from unittest import TestCase
from ultros.core.storage.data.toml import TOMLData
from ultros.core.storage.manager import StorageManager
__author__ = "Gareth Coles"
class TestTOML(TestCase):
d... | artistic-2.0 | -5,916,081,568,290,232,000 | 21.194969 | 105 | 0.474072 | false | 3.943017 | true | false | false |
DonJayamanne/pythonVSCode | pythonFiles/vscode_datascience_helpers/dataframes/vscodeGetDataFrameInfo.py | 1 | 1893 | # Query Jupyter server for the info about a dataframe
import json as _VSCODE_json
import pandas as _VSCODE_pd
import pandas.io.json as _VSCODE_pd_json
import builtins as _VSCODE_builtins
import vscodeDataFrameHelpers as _VSCODE_dataFrameHelpers
# Function to do our work. It will return the object
def _VSCODE_getDataFr... | mit | 2,155,433,398,067,761,400 | 34.716981 | 80 | 0.664554 | false | 3.647399 | false | false | false |
BigPeet/pr0tagger | src/collect_data_from_pr0gramm.py | 1 | 5373 | import sys
import time
import datetime
import argparse
import pr0gramm
import data_collection
import logging_setup
import logging
LOG = logging.getLogger(__name__)
def main():
parser = argparse.ArgumentParser(
description="Collect data from pr0gramm.com")
parser.add_argument(
"--no_sfw", hel... | mit | 6,436,225,341,543,186,000 | 39.398496 | 141 | 0.628513 | false | 4.101527 | false | false | false |
apple/swift-lldb | packages/Python/lldbsuite/test/functionalities/data-formatter/data-formatter-objc/ObjCDataFormatterTestCase.py | 5 | 1335 | # encoding: utf-8
"""
Test lldb data formatter subsystem.
"""
from __future__ import print_function
import lldb
from lldbsuite.test.decorators import *
from lldbsuite.test.lldbtest import *
from lldbsuite.test import lldbutil
class ObjCDataFormatterTestCase(TestBase):
mydir = TestBase.compute_mydir(__file__)
... | apache-2.0 | 8,963,193,377,505,250,000 | 30.046512 | 77 | 0.669663 | false | 3.836207 | true | false | false |
aj-may/django-bootstrap-typeahead | django_bootstrap_typeahead/fields.py | 1 | 1247 | from django.forms import ModelChoiceField, ModelMultipleChoiceField
from .widgets import TypeaheadInput, MultipleTypeaheadInput
class TypeaheadField(ModelChoiceField):
"""A Typeahead Text field"""
def __init__(self, queryset, builder=False, required=True, label=None,
initial=None, help_text=... | mit | 4,217,662,503,702,507,000 | 39.225806 | 78 | 0.648757 | false | 4.314879 | false | false | false |
kenb123/Basic-Expression-Lexicon-Variation-Algorithms-BELVA | src/gui/belva_qt4_interface.py | 1 | 19809 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#--------------------------------------------------------------------------------------------------
# pyOwaspBELVA - Contextual custom dictionary builder with character and word variations for pen-testers
# Copyright (C) 2016 OWASP Foundation / Kenneth F. Belva
#
... | gpl-3.0 | -2,192,608,054,345,816,600 | 42.345733 | 184 | 0.558635 | false | 4.43452 | false | false | false |
minimalparts/PeARS | app/utilities/mkPositionalIndex.py | 2 | 3855 | #Make/update positional index for a given file
#The index has the form
#word,word_freq:doc1,freq_in_doc1(pos1,pos2,...posn);doc2,freq_in_doc2(pos1,pos2,...posn), etc
#to,993427:23,2(3,6);35,1(34)
import sys
import os
import re
path_to_PeARS = os.path.dirname(__file__)
index={} #This is the positional index, of the f... | mit | -4,771,580,195,341,388,000 | 25.22449 | 110 | 0.642542 | false | 2.722458 | false | false | false |
pydanny/cached-property | setup.py | 1 | 1838 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
import codecs
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
__version__ = "1.5.2"
def read(fname):
return codecs.open(
os.path.join(os.path.dirname(__file__), fname), "r", "utf-8"
).r... | bsd-3-clause | -2,087,425,194,871,310,800 | 27.71875 | 75 | 0.610446 | false | 3.75102 | false | false | false |
tensorflow/examples | lite/examples/model_personalization/converter/tfltransfer/tflite_transfer_converter_test.py | 1 | 7290 | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,388,310,416,511,532,000 | 39.054945 | 80 | 0.627846 | false | 4.086323 | true | false | false |
ndparker/tdi | tdi/markup/soup/parser.py | 1 | 27632 | # -*- coding: ascii -*-
r"""
:Copyright:
Copyright 2006 - 2015
Andr\xe9 Malo or his licensors, as applicable
:License:
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.... | apache-2.0 | 503,483,889,974,661,100 | 28.648069 | 78 | 0.501846 | false | 4.194293 | false | false | false |
olabini/ioke | share/pygments/lexer.py | 2 | 6882 | #add IokeLexer to __all__ at the top of agile.py like so:
__all__ = ['PythonLexer', 'PythonConsoleLexer', 'PythonTracebackLexer',
'RubyLexer', 'RubyConsoleLexer', 'PerlLexer', 'LuaLexer',
'MiniDLexer', 'IoLexer', 'IokeLexer', 'TclLexer', 'ClojureLexer',
'Python3Lexer', 'Python3Tracebac... | mit | -44,385,216,918,597,900 | 42.283019 | 562 | 0.487504 | false | 3.010499 | false | false | false |
FreeCX/programming-challenges | build.py | 1 | 1246 | #!/bin/env/python3
from pathlib import Path
CARGO_CONF = (
('name', '"programming-challenges"'),
('version', '"0.1.0"'),
('authors', '["Alexey Golubev <dr.freecx@gmail.com>"]')
)
CARGO_DEPS = (('lazy_static', '"*"'), ('time', '"*"'))
CARGO_EXTRA = (
('sdl2', {
'version': '"*"',
'defaul... | unlicense | -8,131,688,700,271,944,000 | 30.15 | 99 | 0.507223 | false | 2.897674 | false | false | false |
chrislit/abydos | abydos/distance/_lorentzian.py | 1 | 4266 | # Copyright 2019-2020 by Christopher C. Little.
# This file is part of Abydos.
#
# Abydos 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 versio... | gpl-3.0 | -7,457,465,277,585,206,000 | 25.012195 | 78 | 0.570323 | false | 3.975769 | false | false | false |
blahu/pynet-mat | LearnPythonCourse/class4/ex1.py | 1 | 1130 | #!/usr/bin/env python
#
# Class 4
# Exercise 1
# Author Mateusz Blaszczyk
""" I. Prompt a user to input an IP address. Re-using some of the
code from class3, exercise4--determine if the IP address is valid.
Continue prompting the user to re-input an IP address until a valid IP
address is input. """
# initia... | apache-2.0 | 452,814,335,054,505,200 | 24.111111 | 70 | 0.555752 | false | 3.403614 | false | false | false |
franciscod/python-telegram-bot | telegram/utils/promise.py | 2 | 1487 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | gpl-2.0 | -7,974,667,931,289,572,000 | 31.326087 | 74 | 0.683927 | false | 3.997312 | false | false | false |
EndyKaufman/django-postgres-angularjs-blog | app/project/validator.py | 1 | 2470 | # -*- coding: utf-8 -*-
from project import helpers
import resource
from django.utils.translation import get_language
def create(request):
data = request.DATA
if data is False:
return {'code': 'no_data'}, 404, False
data = helpers.set_null_values_if_not_exist(data, resource.get_fields())
if... | mit | 733,088,023,179,624,400 | 28.404762 | 79 | 0.606478 | false | 3.57971 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.