repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | 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 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dallingham/regenerate | regenerate/extras/regrst.py | 1 | 20854 | #
# Manage registers in a hardware design
#
# Copyright (C) 2008 Donald N. Allingham
#
# 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... | gpl-2.0 | 8,270,414,968,194,198,000 | 29.577713 | 125 | 0.493143 | false | 3.561742 | false | false | false |
pddring/pygame-examples | 02-different-colours.py | 1 | 1462 | # pygame example: github.com/pddring/pygame-examples
"""
This example shows you how to experiment with different colours in pygame.
It will fill the whole pygame window in different colours
Here are some things to try to adapt the code:
TODO: Make the screen appear black
TODO: Make the screen appear blue
TODO: Make ... | unlicense | -3,988,145,037,399,547,400 | 30.106383 | 79 | 0.75513 | false | 3.600985 | false | false | false |
Faaux/DingoEngine | HelperScripts/parseC.py | 1 | 8282 | from pathlib import Path
from multiprocessing import Pool, freeze_support
import os
import datetime
import clang.cindex
import subprocess
from paths import path_to_components, path_to_gameobjects, path_to_cmake, path_to_src
args = ["-xc++",
"-D__CODE_GENERATOR__",
"-std=c++17",
"-IC:/Projects/D... | mit | -4,985,849,433,667,174,000 | 33.65272 | 113 | 0.545037 | false | 3.786923 | false | false | false |
MiroK/DolfinSurface | demo/undocumented/meshfunction/python/demo_meshfunction.py | 1 | 1231 | """This demo illustrates use of the MeshFunction class.
Original implementation: ../cpp/main.cpp by Ola Skavhaug."""
# Copyright (C) 2007 Kristian B. Oelgaard
#
# This file is part of DOLFIN.
#
# DOLFIN is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public Licen... | gpl-3.0 | -5,013,314,975,686,665,000 | 29.775 | 77 | 0.735987 | false | 3.428969 | false | false | false |
google-research/remixmatch | pseudo_label.py | 1 | 5410 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 1,373,210,983,404,664,600 | 41.598425 | 113 | 0.65268 | false | 3.461292 | false | false | false |
nik-hil/scripts | palindrome.py | 1 | 1731 | '''This program finds to pallindrome in a string by taking each character as a
center of pallindrome. From center it probes in both direction this pallindrome
exists.
A pallindrome might exists in space between two characters e.g, "bb"
'''
def palindrome(string):
'''test cases
>>> palindrome("")
>>> ... | mit | -8,828,558,457,101,507,000 | 26.919355 | 79 | 0.569613 | false | 3.17033 | false | false | false |
milapour/palm | palm/blink_state_enumerator.py | 1 | 8844 | from types import IntType
from palm.util import multichoose
from palm.state_collection import StateCollectionFactory
class SingleDarkState(object):
"""
A macrostate for a BlinkModel with one dark microstate.
The available microstates are `I`, `A`, `D`, and `B`.
Attributes
----------
initial_st... | bsd-2-clause | 1,250,265,342,732,406,800 | 33.956522 | 79 | 0.537766 | false | 4.088766 | false | false | false |
walles/px | px/px_load.py | 1 | 3820 | """
Functions for visualizing system load over time in a Unicode graph.
The one you probably want to call is get_load_string().
"""
import os
from . import px_cpuinfo
from . import px_terminal
import sys
if sys.version_info.major >= 3:
# For mypy PEP-484 static typing validation
from six import text_type #... | mit | 1,131,774,955,498,635,500 | 27.939394 | 87 | 0.624607 | false | 3.234547 | false | false | false |
ajylee/gpaw-rtxs | gpaw/response/bse.py | 1 | 25096 | from time import time, ctime
import numpy as np
import pickle
from math import pi
from ase.units import Hartree
from ase.io import write
from gpaw.io.tar import Writer, Reader
from gpaw.mpi import world, size, rank, serial_comm
from gpaw.utilities.blas import gemmdot, gemm, gemv
from gpaw.utilities import devnull
from ... | gpl-3.0 | -5,935,395,398,127,700,000 | 35.318379 | 114 | 0.456447 | false | 3.115194 | false | false | false |
edx-solutions/xblock-group-project | group_project/group_project.py | 1 | 40500 | # -*- coding: utf-8 -*-
#
# Imports ###########################################################
import json
import logging
import textwrap
from datetime import datetime, timedelta
from io import StringIO
from xml.etree import ElementTree as ET
import pytz
import webob
from django.conf import settings
from django.uti... | agpl-3.0 | -3,804,872,931,286,464 | 37.793103 | 176 | 0.565062 | false | 4.379325 | false | false | false |
themattrix/python-simian | setup.py | 1 | 1046 | from setuptools import setup
setup(
name='simian',
version='2.0.0',
packages=('simian',),
url='https://github.com/themattrix/python-simian',
license='MIT',
author='Matthew Tardiff',
author_email='mattrix@gmail.com',
install_requires=('mock', 'contextlib2'),
tests_require=('nose', 'f... | mit | 159,269,272,641,297,660 | 37.740741 | 70 | 0.605163 | false | 4.322314 | false | false | false |
animalize/tz2txt | tz2txt/datamachine.py | 1 | 18988 | # coding=utf-8
## web 到 内部状态1(Reply)
## tz = web_to_internal(url, pg_count)
##
## 内部状态1 到 编排
## internal_to_bp(tz)
##
## ----------------------------
##
## 编排 到 内部状态2(BPReply)
## lst = bp_to_internal2(infile)
##
## 处理 内部状态2
## lst = process_internal2(lst)
##
## 内部状态2 到 编排
## internal2_to_bp(lst)
##
## ---... | bsd-3-clause | 8,837,727,428,784,550,000 | 26.571429 | 82 | 0.433997 | false | 2.86795 | false | false | false |
partofthething/home-assistant | homeassistant/components/netatmo/data_handler.py | 1 | 6057 | """The Netatmo data handler."""
from collections import deque
from datetime import timedelta
from functools import partial
from itertools import islice
import logging
from time import time
from typing import Deque, Dict, List
import pyatmo
from homeassistant.config_entries import ConfigEntry
from homeassistant.core i... | mit | -5,802,619,240,173,583,000 | 32.65 | 88 | 0.616312 | false | 3.80704 | false | false | false |
hrpt-se/hrpt | urls.py | 1 | 2104 | from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic import RedirectView, TemplateView
from django.views.static import serv... | agpl-3.0 | 1,752,537,007,993,838,300 | 43.765957 | 117 | 0.673954 | false | 3.302983 | false | true | false |
lantianlz/zx | scripts/crontab/worker_delay_monitor.py | 1 | 1433 | # -*- coding: utf-8 -*-
"""
@note: 分析ngxin日志,提取出频繁访问网站的ip
"""
import sys
import os
# 引入父目录来引入其他模块
SITE_ROOT = os.path.dirname(os.path.abspath(__file__))
sys.path.extend([os.path.abspath(os.path.join(SITE_ROOT, '../')),
os.path.abspath(os.path.join(SITE_ROOT, '../../')),
]... | gpl-2.0 | 7,332,729,005,844,852,000 | 22.490909 | 97 | 0.551596 | false | 2.859873 | false | false | false |
decebel/dataAtom_alpha | bin/plug/py/external/pattern/text/de/parser/__init__.py | 1 | 8935 | #### PATTERN | DE | RULE-BASED SHALLOW PARSER ######################################################
# -*- coding: utf-8 -*-
# Copyright (c) 2012 Gerold Schneider, Martin Volk and University of Antwerp, Belgium
# Authors: Gerold Schneider & Martin Volk (German language model), Tom De Smedt <tom@organisms.be>
# License:... | apache-2.0 | 4,828,502,076,624,707,000 | 39.572727 | 112 | 0.531541 | false | 2.922397 | false | false | false |
guoci/python3-xlib-trunk | Xlib/protocol/rq.py | 1 | 46900 | # Xlib.protocol.rq -- structure primitives for request, events and errors
#
# Copyright (C) 2000-2002 Peter Liljenberg <petli@ctrl-c.liu.se>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Fou... | gpl-2.0 | 5,240,419,798,686,419,000 | 28.929802 | 114 | 0.530938 | false | 4.088571 | false | false | false |
Eszti/pymachine | src/pymachine/definition_parser.py | 1 | 20690 | import logging
import sys
import re
import string
from collections import defaultdict
try:
import pyparsing
from pyparsing import Literal, Word, Group, Combine, Optional, Forward, alphanums, SkipTo, LineEnd, nums, delimitedList # nopep8
except ImportError:
logging.critical("PyParsing has to be installed o... | mit | -156,672,265,516,880,830 | 35.298246 | 133 | 0.460222 | false | 3.894955 | false | false | false |
COMBINE-lab/matryoshka_work | coredomains-import/python-src/domain_size_all_chroms.py | 1 | 5607 | # get min, max, avg domain sizes across different resolutions
import sys
import matplotlib.pyplot as plt
import matplotlib
import collections
Domain = collections.namedtuple("Domain", ['start', 'end'])
################################################
#
#
#
################################################
def parseBi... | gpl-3.0 | 1,464,951,984,376,433,000 | 27.035 | 129 | 0.579098 | false | 2.636107 | false | false | false |
kynikos/lib.py.wxclasses | src/wxclasses/timectrls.py | 1 | 15455 | # wxClasses
# Copyright (C) 2013-2014 Dario Giovannetti <dev@dariogiovannetti.net>
#
# This file is part of wxClasses.
#
# wxClasses 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 Lice... | gpl-3.0 | 2,253,997,558,680,086,000 | 30.285425 | 79 | 0.5945 | false | 3.621134 | false | false | false |
schutte/submit | lib/submit/deliverers/sendmail.py | 1 | 2776 | # -*- coding: utf-8 -*-
#
# This file is part of submit, a sendmail replacement or supplement for
# multi-user desktop systems.
#
# Copyright © 2008 Michael Schutte <michi@uiae.at>
#
# submit is available under the terms of the MIT/X license. Please see the
# file COPYING for details.
from submit.deliverers import *
... | mit | 6,753,451,764,058,531,000 | 34.126582 | 89 | 0.615495 | false | 3.998559 | false | false | false |
kba/ocropy | ocrolib/common.py | 1 | 37334 | # -*- coding: utf-8 -*-
################################################################
### common functions for data structures, file name manipulation, etc.
################################################################
from __future__ import print_function
import os
import os.path
import re
import sys
import sy... | apache-2.0 | -5,726,180,883,866,732,000 | 32.970883 | 127 | 0.583329 | false | 3.571948 | false | false | false |
tombusby/Log-Bitbucket-History | logger_html.py | 1 | 2069 | #!/usr/bin/env python
import feedparser, sys, hashlib, os
from lxml import etree
from StringIO import StringIO
from datetime import datetime
def get_log_file_location():
file_dir = os.path.dirname(os.path.realpath(__file__))
return os.path.join(file_dir, "work_log.html")
def make_table_header_row(table):
row = etr... | mit | 1,247,881,574,972,655,900 | 31.84127 | 99 | 0.699372 | false | 3.007267 | false | false | false |
betur/btce-api | btceapi/keyhandler.py | 1 | 2463 | # Copyright (c) 2013 Alan McIntyre
import warnings
class KeyData(object):
def __init__(self, secret, nonce):
self.secret = secret
self.nonce = nonce
class KeyHandler(object):
'''KeyHandler handles the tedious task of managing nonces associated
with a BTC-e API key/secret pair.
The g... | mit | 1,563,550,528,482,904,300 | 27.976471 | 76 | 0.56151 | false | 3.890995 | false | false | false |
GLolol/lightdm-gtk-greeter-settings-deb | lightdm_gtk_greeter_settings/IndicatorPropertiesDialog.py | 1 | 12548 | #!/usr/bin/env python3
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# LightDM GTK Greeter Settings
# Copyright (C) 2014 Andrew P. <pan.pav.7c5@gmail.com>
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU General Public License ... | gpl-3.0 | -3,611,849,266,747,698,000 | 36.681682 | 98 | 0.618664 | false | 3.937245 | false | false | false |
kdheepak89/fono | fono/run.py | 1 | 4290 | #!/usr/bin/env python
"""Run module."""
import click
import data
import ReferenceModel
import solve
import version
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
@click.command(context_settings=CONTEXT_SETTINGS)
@click.option('--folder', type=click.Path(), help='Path to data folder')
@click.option('--q... | bsd-3-clause | -4,993,770,995,784,116,000 | 41.058824 | 119 | 0.557576 | false | 3.968548 | false | false | false |
urschrei/simplification | benchmark_runner.py | 1 | 1269 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Standalone benchmark runner
"""
import cProfile
import pstats
import profile
import numpy as np
print("Running Rust + Cython benchmarks")
# calibrate
pr = profile.Profile()
calibration = np.mean([pr.calibrate(100000) for x in range(5)])
# add the bias
profile.Profile... | mit | -8,462,080,342,845,628,000 | 29.95122 | 84 | 0.746257 | false | 2.890661 | true | false | false |
corbinq27/priceTweeter | product_extractor.py | 1 | 1197 | __author__ = 'corbinq27'
import re
import json
import urllib2
#fairly specialized python script to extract prices from specific pages on wholesalegaming.biz
class ProductExtractor():
def __init__(self):
pass
def product_extractor(self):
the_magic_regex_string = '<tr bgcolor="#FFFFFF">\r\n ... | mit | -4,489,230,412,158,461,400 | 34.205882 | 126 | 0.555556 | false | 3.449568 | false | false | false |
portnov/sverchok | nodes/vector/formula_deform.py | 1 | 2365 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | gpl-3.0 | 7,887,637,199,607,015,000 | 33.779412 | 99 | 0.654123 | false | 3.599696 | false | false | false |
bmerry/entropy | entropy/__init__.py | 1 | 1900 | # Entropy: pauses Rhythmbox when the play queue is finished
# Copyright (C) 2014 Bruce Merry <bmerry@users.sourceforge.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 3 of... | gpl-3.0 | -4,271,626,382,035,553,300 | 37.77551 | 112 | 0.71 | false | 3.784861 | false | false | false |
hale36/SRTV | sickbeard/providers/generic.py | 1 | 26955 | # coding=utf-8
# Author: Nic Wolfe <nic@wolfeden.ca>
# URL: http://code.google.com/p/sickbeard/
#
# This file is part of SickRage.
#
# SickRage 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 ... | gpl-3.0 | -8,025,768,007,482,514,000 | 37.234043 | 189 | 0.555147 | false | 4.321789 | false | false | false |
codingforentrepreneurs/digital-marketplace | src/sellers/mixins.py | 1 | 1520 | import datetime
from django.db.models import Count, Min, Sum, Avg, Max
from billing.models import Transaction
from digitalmarket.mixins import LoginRequiredMixin
from products.models import Product
from .models import SellerAccount
class SellerAccountMixin(LoginRequiredMixin, object):
account = None
products = ... | mit | 8,608,003,941,597,075,000 | 26.142857 | 80 | 0.748684 | false | 3.559719 | false | false | false |
atlasapi/atlas-deer | atlas-api/src/main/python/generate-load-test-urls.py | 1 | 3768 | #!/usr/bin/env python
# ./generate-load-test-urls.py --number-of-urls=100 --atlas-url=stage.atlas.metabroadcast.com --target-host=host-to-test --api-key=api-key --source=pressassociation.com --num-channels-source=100 --num-channels=10 --platform=hkyn --start-date=2015-02-01 --end-date=2015-02-10
import argparse
impor... | apache-2.0 | -617,069,677,216,576,400 | 41.818182 | 275 | 0.650743 | false | 3.466421 | false | false | false |
Rhoana/butterfly | bfly/CoreLayer/AccessLayer/Websocket.py | 1 | 2717 | import yaml
import json
import logging as log
import tornado.websocket
from QueryLayer import InfoQuery
from RequestHandler import RequestHandler
from NDStore import get_config
websockets = []
class Websocket(tornado.websocket.WebSocketHandler):
INPUT = RequestHandler.INPUT
RUNTIME = RequestHandler.RUNTIME
... | mit | 5,140,380,614,656,622,000 | 28.532609 | 61 | 0.596982 | false | 4.061286 | true | false | false |
kronenpj/python-for-android | ci/constants.py | 1 | 2655 | from enum import Enum
class TargetPython(Enum):
python2 = 0
python3crystax = 1
python3 = 2
# recipes that currently break the build
# a recipe could be broken for a target Python and not for the other,
# hence we're maintaining one list per Python target
BROKEN_RECIPES_PYTHON2 = set([
# pythonhelper... | mit | 1,589,547,520,252,471,800 | 27.858696 | 78 | 0.652354 | false | 3.310474 | false | false | false |
NarlikarLab/DIVERSITY | plotFigures.py | 1 | 2017 | ##################### DIVERSITY #####################
# DIVERSITY is a tool to explore multiple ways of protein-DNA
# binding in the genome. More information can be found in the README file.
# Copyright (C) 2015 Sneha Mitra, Anushua Biswas and Leelavati Narlikar
# DIVERSITY is free software: you can redi... | gpl-3.0 | 5,421,648,628,846,587,000 | 41.914894 | 88 | 0.597422 | false | 3.344942 | false | false | false |
adzanette/scf-extractor | scf-extractor/lib/peewee.py | 1 | 67648 | # (\
# ( \ /(o)\ caw!
# ( \/ ()/ /)
# ( `;.))'".)
# `(/////.-'
# =====))=))===()
# ///'
# //
# '
from __future__ import with_statement
import datetime
import decimal
import logging
import operator
import os
import re
import threading
import time
from co... | mit | 656,235,991,233,999,200 | 30.508409 | 114 | 0.543091 | false | 3.930966 | false | false | false |
QuinnSong/JPG-Tools | src/background.py | 1 | 1161 | # Modified based on Phatch
#---PIL modules import
from shadow import fill_background_color, generate_layer, \
remove_alpha, has_transparency, get_alpha, paste
from PIL import Image
#from reflection import HTMLColorToRGBA
FILL_CHOICES = ('Color', 'Image')
def background(image, fill, mark, color,
horizonta... | gpl-3.0 | -3,725,835,973,732,491,000 | 36.483871 | 67 | 0.605512 | false | 4.206522 | false | false | false |
javahust/dotamax | dataIngest/crawler.py | 1 | 4059 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import dota2api
import datetime
import time
import thread
api = dota2api.Initialise()
seed_user_id = 161877399
#seed_user_id = 98887913
hero_list = api.get_heroes()['heroes']
item_list = api.get_game_items()['items']
# heroes
# {
# count - Numbe... | apache-2.0 | 1,302,979,220,849,933,000 | 35.080357 | 124 | 0.579065 | false | 3.520035 | false | false | false |
priyom/priyomdb | PriyomHTTP/Server/Resources/API/InstanciateSchedules.py | 1 | 2595 | """
File name: InstanciateSchedules.py
This file is part of: priyomdb
LICENSE
The contents of this file are subject to the Mozilla Public License
Version 1.1 (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.mozilla.org/MPL/
Software ... | gpl-3.0 | -271,381,137,207,109,060 | 37.161765 | 143 | 0.721773 | false | 3.861607 | false | false | false |
rzarzynski/tempest | tempest/services/image/v2/json/image_client.py | 1 | 7421 | # Copyright 2013 IBM Corp.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by app... | apache-2.0 | 8,774,955,404,667,336,000 | 35.55665 | 79 | 0.599245 | false | 3.788157 | false | false | false |
google/offline-content-packager | third_party/nkata/scripts/utils/ISOconverter.py | 1 | 2430 | # Copyright 2015 The Offline Content Packager 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 requi... | apache-2.0 | 9,064,200,964,084,471,000 | 30.973684 | 77 | 0.665432 | false | 4.255692 | false | false | false |
jaantoots/bridgeview | render/textures.py | 1 | 4059 | """Provide methods for texturing the scene for rendering."""
import json
import numpy as np
import bpy # pylint: disable=import-error
from . import helpers
class Textures():
"""Identify parts by name, organise into texturing groups and texture.
Initialise with list of objects to be textured.
Run: read ... | gpl-3.0 | 7,488,986,955,036,146,000 | 34.605263 | 86 | 0.626016 | false | 4.193182 | false | false | false |
woodymit/millstone | genome_designer/genome_finish/insertion_placement_read_trkg.py | 1 | 22010 | from collections import defaultdict
import os
import pickle
import re
import subprocess
from Bio import SeqIO
from Bio.Alphabet import IUPAC
from Bio.Seq import Seq
from Bio.SeqRecord import SeqRecord
from django.conf import settings
import pysam
from genome_finish.contig_display_utils import Junction
from genome_fin... | mit | -2,248,555,978,764,441,900 | 35.500829 | 80 | 0.636256 | false | 3.63922 | false | false | false |
thinkle/gourmet | gourmet/plugins/key_editor/keyEditorPluggable.py | 1 | 3327 | # This library provides a pluggable that lets plugins that *use* our
# key editor to provide extra information based on the ingredient
# key. This will be used to show info in both the key editor and
# recipe card view and possibly to allow editing etc.
from gourmet.plugin_loader import Pluggable
from gourmet.plugin i... | gpl-2.0 | -7,379,759,485,367,620,000 | 32.606061 | 90 | 0.661858 | false | 4.320779 | false | false | false |
SetBased/py-etlt | etlt/dimension/Type2ReferenceDimension.py | 1 | 5466 | """
ETLT
Copyright 2016 Set Based IT Consultancy
Licence MIT
"""
import abc
import datetime
class Type2ReferenceDimension(metaclass=abc.ABCMeta):
"""
Abstract class for type2 dimensions for which the reference data is supplied with date intervals.
"""
# ---------------------------------------------... | mit | -5,448,622,367,667,991,000 | 34.960526 | 120 | 0.497988 | false | 4.973612 | false | false | false |
ArcherSys/ArcherSys | skulpt/src/lib/pythonds/trees/bst.py | 1 | 8740 | #!/bin/env python3.1
# Bradley N. Miller, David L. Ranum
# Introduction to Data Structures and Algorithms in Python
# Copyright 2005, 2010
#
class BinarySearchTree:
'''
Author: Brad Miller
Date: 1/15/2005
Description: Imlement a binary search tree with the following interface
func... | mit | 2,014,519,436,415,015,200 | 30.781818 | 77 | 0.515904 | false | 4.516796 | false | false | false |
vlegoff/tsunami | src/primaires/scripting/actions/desequiper.py | 1 | 3400 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | 675,812,069,121,602,700 | 40.195122 | 79 | 0.706927 | false | 3.667752 | false | false | false |
chrys87/fenrir | play zone/detectDevices.py | 1 | 1911 | #!/bin/python
import evdev
iDevices = {}
iDeviceNo = 0
def updateInputDevices(force = False, init = False):
global iDeviceNo
if init:
iDevices = {}
iDeviceNo = 0
deviceFileList = evdev.list_devices()
if not force:
if len(deviceFileList) == iDeviceNo:
return
iDevic... | lgpl-3.0 | -7,624,252,007,267,087,000 | 37.22 | 88 | 0.508111 | false | 4.372998 | false | false | false |
rchatterjee/nocrack | newcode/honeyvault_config.py | 1 | 3284 | # The following dictionaries should be provided to buildcfg.py
# 1: base dictionary //only character words will be considered
# 2: tweak set file
# 3: dictionary with count // PCFG will be built over this
# 4: output PCFG file name/path
# 5: output Trie file name/path
# empty lines and line beginning with '#' will be ... | mit | -7,326,233,119,189,157,000 | 32.510204 | 89 | 0.68849 | false | 2.945291 | false | false | false |
andrewyoung1991/abjad | abjad/tools/documentationtools/ReSTDirective.py | 1 | 3357 | # -*- encoding: utf-8 -*-
import abc
from abjad.tools.datastructuretools.TreeContainer import TreeContainer
class ReSTDirective(TreeContainer):
r'''A ReST directive.
'''
### INITIALIZER ###
def __init__(
self,
argument=None,
children=None,
directive=None,
name... | gpl-3.0 | -1,021,700,211,659,350,400 | 26.983333 | 73 | 0.542746 | false | 4.561141 | false | false | false |
google/mirandum | alerts/streamtip/migrations/0002_migrate_updater.py | 1 | 1372 | # -*- coding: utf-8 -*-
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Un... | apache-2.0 | -8,171,553,838,232,492,000 | 33.3 | 75 | 0.682216 | false | 3.864789 | false | false | false |
ninefold/libcloud | libcloud/compute/drivers/voxel.py | 1 | 11150 | # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use ... | apache-2.0 | 557,125,822,919,852,400 | 35.319218 | 82 | 0.553184 | false | 4.28023 | false | false | false |
Entscheider/SeamEater | ImgLib/Poisson.py | 1 | 4047 | # -*- coding: utf-8 -*-
# Functions for Poisson-Reconstruction
import numpy as np
from ImgLib.MyFilter import myfilter as filter
# Some explanations: http://eric-yuan.me/poisson-blending/
def jacobi(A, b, N=25, x=None, progressFunc = None, stopFunc=None):
"""
Solving A*x =b for x by using the Jacobi-method.... | gpl-3.0 | -1,879,845,899,330,050,600 | 32.172131 | 123 | 0.538424 | false | 3.258454 | false | false | false |
alhashash/odoo | addons/hr_timesheet_invoice/hr_timesheet_invoice.py | 2 | 18970 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | -3,447,457,845,333,173,000 | 47.516624 | 287 | 0.59009 | false | 3.943047 | false | false | false |
Diksha-Rathi/find-my-place | find-my-place/settings.py | 1 | 2706 | """
Django settings for find-my-place 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.8/ref/settings/
"""
# Build... | mit | 4,452,227,457,241,505,000 | 23.834862 | 71 | 0.705839 | false | 3.35316 | false | false | false |
smerkousdavid/rem-sphinx | logger.py | 1 | 2066 | # -*- coding: utf-8 -*-
"""RemSphinx speech to text logger
This module is designed to just handle logging. There's nothing more to it
Just printing and logging to files
Developed By: David Smerkous
"""
from logging import getLogger, INFO, Formatter, FileHandler, StreamHandler
from os.path import dirname, realpath, i... | gpl-3.0 | -8,818,605,115,806,239,000 | 30.784615 | 96 | 0.693611 | false | 3.343042 | false | false | false |
cabanm/project-euler | myMath.py | 1 | 3540 | from time import time
from math import sqrt
# Time some code
def timeIt(code):
start = time()
exec code
return time()-start
# Find primes up to a certain number and output a dictionary with them as keys
def primes(top):
sieve = [0]*top
for m in range(2, top+1):
if sieve[m-1] == 0: # if m prime
for n in rang... | gpl-2.0 | 9,074,495,308,821,205,000 | 21.987013 | 87 | 0.641243 | false | 2.537634 | false | false | false |
kiliakis/BLonD | beams/beams.py | 1 | 5676 |
# Copyright 2015 CERN. This software is distributed under the
# terms of the GNU General Public Licence version 3 (GPL Version 3),
# copied verbatim in the file LICENCE.md.
# In applying this licence, CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Or... | gpl-3.0 | -2,657,791,008,127,920,000 | 35.152866 | 90 | 0.586328 | false | 4.011307 | false | false | false |
GhostshipSoftware/avaloria | game/gamesrc/chargen.py | 1 | 12872 | """
Contribution - Griatch 2011
[Note - with the advent of MULTISESSION_MODE=2, this is not really
as necessary anymore - the ooclook and @charcreate commands in that
mode replaces this module with better functionality.]
This is a simple character creation commandset. A suggestion is to
test this together with menu_... | bsd-3-clause | 8,105,016,762,496,736,000 | 47.213483 | 194 | 0.601849 | false | 3.886473 | false | false | false |
lrt512/emol | emol/emol/models/privacy_acceptance.py | 1 | 4199 | # -*- coding: utf-8 -*-
"""Model to record combatants' acceptance of the privacy policy."""
# standard library imports
# pylint complains about the uuid import but it is used for Required(uuid.UUID)
# pylint: disable=unused-import
import uuid
from datetime import datetime
# third-party imports
from flask import url_f... | mit | 8,481,351,691,787,836,000 | 34.584746 | 97 | 0.656109 | false | 4.01434 | false | false | false |
openpaul/DNApy | output.py | 1 | 5753 | #!/usr/bin/python
#This file is part of DNApy. DNApy is a DNA editor written purely in python.
#The program is intended to be an intuitive, fully featured,
#extendable, editor for molecular and synthetic biology.
#Enjoy!
#
#Copyright (C) 2014 Martin Engqvist |
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~... | gpl-3.0 | 1,293,076,373,429,063,700 | 34.732919 | 204 | 0.682079 | false | 3.348661 | false | false | false |
aino/django-aislug | tests/aislug_tests/models.py | 1 | 1161 | from aislug import AISlugField
from django.db import models
class Item(models.Model):
title = models.CharField(max_length=100)
slug = AISlugField()
class ItemUpdateFalse(models.Model):
title = models.CharField(max_length=100)
slug = AISlugField(update=False)
class ItemSlugify(models.Model):
titl... | bsd-3-clause | 2,764,682,284,138,301,000 | 28.025 | 51 | 0.727821 | false | 3.414706 | false | false | false |
Eric89GXL/vispy | examples/demo/gloo/grayscott.py | 2 | 7375 | # -*- coding: utf-8 -*-
# vispy: gallery 2000
# -----------------------------------------------------------------------------
# Copyright (c) Vispy Development Team. All Rights Reserved.
# Distributed under the (new) BSD License. See LICENSE.txt for more info.
# ---------------------------------------------------------... | bsd-3-clause | -7,063,744,697,492,145,000 | 34.119048 | 79 | 0.510644 | false | 3.072917 | false | false | false |
stonemary/lintcode_solutions | search-a-2d-matrix/1.py | 1 | 1214 | # iterative
# time: over time, bug on helper function. ~ 18mins
class Solution:
"""
@param matrix, a list of lists of integers
@param target, an integer
@return a boolean, indicate whether matrix contains target
"""
def searchMatrix(self, matrix, target):
if matrix is None or matrix == ... | apache-2.0 | 3,740,729,000,668,610,000 | 27.904762 | 62 | 0.476936 | false | 4.229965 | false | false | false |
OmkarPathak/pygorithm | pygorithm/data_structures/quadtree.py | 1 | 23006 | """
Author: Timothy Moore
Created On: 31th August 2017
Defines a two-dimensional quadtree of arbitrary
depth and bucket size.
"""
import inspect
import math
from collections import deque
from pygorithm.geometry import (vector2, polygon2, rect2)
class QuadTreeEntity(object):
"""
This is the minimum informatio... | mit | 3,215,054,708,170,512,000 | 39.937722 | 899 | 0.586325 | false | 4.189765 | false | false | false |
maheshgaya/lips-with-maps | machine-learning/python/first_model.py | 1 | 4736 | import tensorflow as tf
import pandas as pd
import numpy as np
from sklearn import preprocessing
# importing data and munging
constant_data = pd.read_csv('full_library_xt875.csv')
#normalizing data
#normalization = lambda df: (df - df.mean()) / (df.max() - df.min())
#constant_data = normalization(constant_data)
t_dat... | apache-2.0 | -4,449,675,825,437,727,000 | 29.753247 | 82 | 0.644848 | false | 3.018483 | false | false | false |
mablae/weblate | weblate/trans/south_migrations/0027_auto__chg_field_subproject_template.py | 1 | 15556 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.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, eithe... | gpl-3.0 | -2,850,618,282,719,229,000 | 74.868293 | 227 | 0.553462 | false | 3.695177 | false | false | false |
NoRedInk/elm-ops-tooling | elm_deps_upgrade.py | 1 | 4701 | #! /usr/bin/env python
from __future__ import print_function
import sys
import json
import requests
import struct
import argparse
def load_all_packages(elm_version, url=None):
if url is None:
url = "http://package.elm-lang.org/all-packages?elm-package-version="
payload = requests.get("{url}{elm_versi... | bsd-3-clause | 6,115,484,445,367,418,000 | 27.840491 | 108 | 0.589236 | false | 3.71327 | false | false | false |
ledtvavs/repository.ledtv | script.module.nanscrapers/lib/nanscrapers/scraperplugins/onlinemovies.py | 7 | 2640 | import re
import requests
from ..scraper import Scraper
class Onlinemovies(Scraper):
domains = ['onlinemovies.tube']
name = "onlinemovies"
sources = []
def __init__(self):
self.base_link = 'http://onlinemovies.tube/'
def scrape_movie(self, title, year, imdb, debrid = False):
try:
... | gpl-3.0 | 1,984,699,316,680,473,300 | 40.25 | 129 | 0.475 | false | 4.042879 | false | false | false |
jmrodri/sm-photo-tool | src/cookietransport.py | 1 | 2041 | #
# code copied from
# http://rocketscience.itteco.org/2010/01/10/sending-cookie-via-xmlrpclib/
# by Nazar Leush
#
# changes added by jesus m. rodriguez
#
import xmlrpclib
from xmlrpclib import ProtocolError, Fault
from Cookie import _quote
class CookieTransport(xmlrpclib.Transport):
def __init__(self, cookies=... | gpl-2.0 | -4,333,939,322,342,350,000 | 27.746479 | 74 | 0.579128 | false | 4.139959 | false | false | false |
Reddone/CarIncidentJupyter | main.py | 1 | 1735 | import os
import pandas as pd
import utils
# Prepare the dataset for the analysis
sem_path = r"0_Sem_2014"
sem1_path = r"1_Sem_2014.csv"
sem2_path = r"2_Sem_2014.csv"
if not os.path.isfile(sem_path):
utils.join_dataframes(sem_path, sem1_path, sem2_path)
dataset = pd.read_pickle(sem_path)
# Assign correct values ... | mit | 8,604,081,585,900,436,000 | 31.12963 | 57 | 0.796542 | false | 3.006932 | false | false | false |
thinmanj/clean-bj | zbj.py | 1 | 5351 | import random
class Card(object):
SUITS = ('C', 'S', 'H', 'D')
VALUES = {'A':1, '2':2, '3':3, '4':4, '5':5, '6':6, '7':7, '8':8, '9':9, 'T':10, 'J':10, 'Q':10, 'K':10}
def __init__(self, suit, rank):
if (suit in self.SUITS) and (rank in self.VALUES.keys()):
self.suit = suit
... | apache-2.0 | -2,957,766,947,423,949,300 | 23.888372 | 108 | 0.470566 | false | 3.76301 | false | false | false |
diegojromerolopez/djanban | src/djanban/apps/members/migrations/0001_initial.py | 1 | 1626 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-07-09 18:03
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):
initial = True
dependencies = [
migration... | mit | 8,655,522,309,848,991,000 | 48.272727 | 201 | 0.643911 | false | 3.880668 | false | false | false |
neviim/forza | getarq.py | 1 | 2158 | #!/usr/bin env python3
# -*- coding: utf-8 -*-
import os
import csv
import json
import pymongo
from pymongo import MongoClient
# mongodb
def get_db():
client = MongoClient('localhost:27017')
db = client.forza6db
return db
def add_dados(db, data):
db.countries.insert(data)
def get_country(db, coleca... | mit | 1,924,125,129,973,735,400 | 24.666667 | 98 | 0.610853 | false | 3.416799 | false | false | false |
SambaDemon/python_vantiv | vantiv/request/model/identification.py | 1 | 1178 | from ..schemas import Schema, fields
from ..utils import FrozenMixin
from ..enums import (EnumField, CustomerTypeEnum, CurrencyEnum,
ResidenceStatusEnum)
class IdentificationSchema(Schema):
Ssn = fields.String()
BirthDate = fields.Date()
CustomerRegistrationDate = fields.Date()
In... | mit | 5,504,557,734,375,287,000 | 31.722222 | 67 | 0.729202 | false | 3.887789 | false | false | false |
Fantomas42/veliberator | veliberator/xml_wrappers.py | 1 | 1279 | """Xml functions for helping in convertion of data"""
def xml_station_status_wrapper(xmlnode):
"""Convert Station status xml
to a usable dict"""
def node_value(name):
return xmlnode.getElementsByTagName(name)[0].childNodes[0].data
return {'total': int(node_value('total')),
'availa... | bsd-3-clause | 3,755,493,492,201,253,000 | 33.567568 | 71 | 0.577795 | false | 3.911315 | false | false | false |
tlemoult/spectroDb | tools/clean-travail-ISIS.py | 1 | 1036 | import sys,os
import urllib.request, urllib.parse, urllib.error,glob
import astropy.io.fits as fits
import zipfile
import shutil
def listdirectory(path):
fichier=[]
l = glob.glob(path+'\\*')
for i in l:
if os.path.isdir(i): fichier.extend(listdirectory(i))
else: fichier.append(i) ... | mit | 5,727,460,823,284,896,000 | 26.263158 | 234 | 0.671815 | false | 3.129909 | false | false | false |
nickgu/pydev | py3dev.py | 1 | 5350 | #! /bin/env python3
# encoding=utf-8
# author: nickgu
#
# Compitible for python3
#
import sys
import argparse
class ColorString:
TC_NONE ="\033[m"
TC_RED ="\033[0;32;31m"
TC_LIGHT_RED ="\033[1;31m"
TC_GREEN ="\033[0;32;32m"
TC_LIGHT_GREEN ="\033[1;32m"
TC_BLUE ... | mit | 2,808,130,532,025,652,700 | 28.558011 | 93 | 0.509907 | false | 3.360553 | false | false | false |
AloneRoad/Inforlearn | common/component.py | 1 | 1678 | import logging
import os.path
from django.conf import settings
# public variable with the intent of referencing it in templates
# and allowing tests to easily adjust the values
loaded = {}
def install_components():
global loaded
root_dir = os.path.dirname(os.path.dirname(__file__))
component_dir = os.path.join... | apache-2.0 | -5,935,113,229,335,788,000 | 24.424242 | 79 | 0.652563 | false | 3.712389 | false | false | false |
Noahs-ARK/ARKcat | src/tokenizer.py | 1 | 3104 | import re
import nltk.data
from nltk.stem import WordNetLemmatizer
def split_sentences(text, decorate=False):
sent_tokenizer = nltk.data.load('tokenizers/punkt/english.pickle')
sentences = sent_tokenizer.sentences_from_text(text, realign_boundaries=True)
if decorate:
sentences = [sent + ' <SE>' f... | apache-2.0 | -1,482,344,033,208,116,700 | 28.846154 | 108 | 0.607281 | false | 3.277719 | false | false | false |
evrenesat/genesis | genesis/lab/admin.py | 1 | 26626 | from datetime import datetime
# import dbsettings
from functools import partial
from uuid import uuid4
from django.contrib import admin
from django.contrib.admin.widgets import FilteredSelectMultiple
from django.core.exceptions import PermissionDenied
from django.db.models import Q
from django.dispatch import receive... | gpl-3.0 | 6,820,900,275,454,348,000 | 33.624187 | 114 | 0.606512 | false | 3.92656 | false | false | false |
stevecshanks/trello-next-actions | nextactions/card.py | 1 | 1191 | from urllib.parse import urlparse
class Card:
AUTO_GENERATED_TEXT = 'Auto-created by TrelloNextActions'
def __init__(self, trello, json):
self._trello = trello
self.id = json['id']
self.name = json['name']
self.board_id = json['idBoard']
self.description = json['desc'... | mit | 3,288,807,941,837,223,400 | 28.04878 | 78 | 0.596977 | false | 3.733542 | false | false | false |
petrjasek/superdesk-core | superdesk/sequences.py | 1 | 2026 | import superdesk
import traceback
from superdesk import get_resource_service
from .resource import Resource
from .services import BaseService
import logging
logger = logging.getLogger(__name__)
def init_app(app):
endpoint_name = "sequences"
service = SequencesService(endpoint_name, backend=superdesk.get_bac... | agpl-3.0 | -385,703,106,562,796,540 | 32.766667 | 104 | 0.616486 | false | 4.043912 | false | false | false |
jiaxiaolei/pycate | pycate/model/refresh_model.py | 1 | 1488 | # -*- coding:utf-8 -*-
# 预约更新
# import tornpg
import libs
import peewee
from core.base_model import BaseModel
class phpmps_refresh(BaseModel):
uid = peewee.CharField(max_length=36, null=False, unique=True, help_text='类别的ID', primary_key=True)
refresh_time = peewee.IntegerField(null=False)
i... | mit | 27,952,428,316,652,670 | 24.472727 | 103 | 0.531593 | false | 3.491607 | false | false | false |
bd-j/sedpy | sedpy/photometer.py | 1 | 10083 | # Simple Aperture photometry. kind of a stupid class dependence.
# Ideally a photometer object should take an image and a region object
# as arguments, where the region object is an instance of a particualr aperture class and
# can return an in_region boolean (or perhaps a 'fraction') for
# any position(s). As it is ... | gpl-2.0 | 1,693,906,440,199,580,000 | 33.064189 | 113 | 0.60726 | false | 3.213193 | false | false | false |
MCME/WebStatus | mcmeAPI/db/models.py | 1 | 1641 | from sqlalchemy import Column, String, Integer, DateTime, PickleType, Boolean
from mcmeAPI.db import Base
class User(Base):
__tablename__ = 'users'
name = Column(String(20), primary_key=True)
group = Column(String(15)) #rank
updated = Column(DateTime())
ob = Column(Boolean)
staff = Column(Bool... | gpl-3.0 | -4,360,253,035,946,446,300 | 29.407407 | 77 | 0.575868 | false | 4.07196 | false | false | false |
ubuntunux/JumpJump | PyInterpreter/Tutorial.py | 1 | 6321 | import Utility as Util
from Utility import *
from Constants import *
from collections import OrderedDict
import browser
#---------------------#
# CLASS : Tutorial layout class
#---------------------#
class TutorialLayout:
def __init__(self, ui):
self.ui = ui
self.tutorialMap = OrderedDict({})
layou... | gpl-3.0 | -1,433,163,130,658,457,600 | 40.592105 | 156 | 0.626325 | false | 3.333861 | false | false | false |
kerwinxu/barcodeManager | zxing/cpp/scons/scons-local-2.0.0.final.0/SCons/Node/Alias.py | 1 | 4400 |
"""scons.Node.Alias
Alias nodes.
This creates a hash of global Aliases (dummy targets).
"""
#
# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 The SCons Foundation
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associat... | bsd-2-clause | 1,780,583,719,408,763,100 | 26.947368 | 95 | 0.623409 | false | 3.99274 | false | false | false |
zubinshah/algorithms | data-structures/python/sorting.py | 1 | 11069 | #!/usr/local/bin/python
"""
SORTING ALGORITHMS
+ Bubble Sort
+ Selection Sort
This program will test *num* entries as an unsorted array, and sort them as well
as log the time taken to understand the performances of varous sorting algorithms.
"""
#******************************************************************... | apache-2.0 | 6,825,287,574,014,931,000 | 32.340361 | 109 | 0.437348 | false | 3.690897 | false | false | false |
hackfestca/cnb | cnb/modAvailable/CNBMMEncode.py | 1 | 5840 | #!/usr/bin/python
# -*- coding: utf-8 -*-
'''
CNB Matrix Module - encode
'''
import string
import urllib
import base64
from cnb.cnbMatrixModule import CNBMatrixModule
class CNBMMEncode(CNBMatrixModule):
"""
"""
name = 'encode'
usage = ''
desc = 'Encode a string using different algorithm'
al... | gpl-3.0 | -2,542,247,868,136,886,000 | 31.087912 | 98 | 0.474315 | false | 3.893333 | false | false | false |
tseaver/gcloud-python | pubsub/google/cloud/pubsub_v1/gapic/publisher_client.py | 1 | 40338 | # -*- coding: utf-8 -*-
#
# Copyright 2018 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 2,759,004,533,117,325,300 | 44.838636 | 175 | 0.574768 | false | 4.751796 | true | false | false |
rdeits/cryptics | pycryptics/grammar/cfg.py | 1 | 3899 | import nltk.grammar as gram
import pycryptics.grammar.nodes as nd
from pycryptics.utils.indicators import INDICATORS
"""
A Context Free Grammar (CFG) to describe allowed substructures of cryptic crossword clues and how to solve each substructure.
"""
# The basic wordplay transforms
top = gram.Nonterminal(nd.TopNode)
... | mit | 3,835,686,781,258,495,000 | 37.22549 | 132 | 0.598872 | false | 2.929376 | false | false | false |
Yanivs24/AutoPA | experiments/python_scripts/avg_results_files.py | 1 | 1420 | #!/usr/bin/python
# This file is part of AutoPA - automatic extraction of pre-aspiration
# from speech segments in audio files.
#
# Copyright (c) 2016 Yaniv Sheena
import os
import re
import sys
import numpy as np
if __name__ == "__main__":
if len(sys.argv) != 2:
raise ValueError("expected 1 value - r... | lgpl-3.0 | 410,955,419,383,036,100 | 24.818182 | 73 | 0.620423 | false | 3.372922 | false | false | false |
xuweiliang/Codelibrary | nova/policies/licence.py | 1 | 1502 | # Copyright 2016 Cloudbase Solutions Srl
# 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 r... | apache-2.0 | -5,257,845,597,965,646,000 | 29.04 | 78 | 0.675766 | false | 3.39819 | false | false | false |
srinath29/pyView | helper.py | 1 | 2537 | from PyQt4 import QtGui, uic, QtCore, Qt
import PyQt4
import pandas
import sys
import os
viewBase, viewForm = uic.loadUiType(os.path.join(os.path.dirname(os.path.realpath(__file__)),"view.ui"))
class Helper(viewBase, viewForm):
def __init__(self, parent = None):
super(viewBase,self).__init__... | gpl-3.0 | -1,201,301,448,810,805,500 | 29.7125 | 105 | 0.592826 | false | 3.470588 | false | false | false |
PietroPasotti/AutomatedTagger | analyzers.py | 1 | 1493 | #analyzers.py
from main import _export,test,x2,RESULTS,evaluation
def overlap(dic1,dic2):
summ = len(set(dic1).union(set(dic2))) # if it's a dic, here we take the mere keys()
# if it's a list, we take all
overlapOfPlaindics = len(set(dic1)) + len(set(dic2)) - summ
return overlapOfPlaindics
def unpack... | agpl-3.0 | 4,131,902,085,462,726,700 | 23.883333 | 87 | 0.698593 | false | 2.680431 | false | false | false |
KeyWeeUsr/plyer | plyer/compat.py | 1 | 1120 | '''
Compatibility module for Python 2.7 and > 3.3
=============================================
'''
# pylint: disable=invalid-name
__all__ = ('PY2', 'string_types', 'queue', 'iterkeys',
'itervalues', 'iteritems', 'xrange')
import sys
try:
import queue
except ImportError:
import Queue as queue
#: T... | mit | -9,110,793,413,409,874,000 | 24.454545 | 69 | 0.633929 | false | 3.636364 | false | false | false |
noironetworks/heat | heat/tests/openstack/keystone/test_service.py | 1 | 10694 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -5,912,710,049,060,024,000 | 36.391608 | 78 | 0.601085 | false | 4.35956 | true | false | false |
iulian787/spack | var/spack/repos/builtin/packages/ppopen-appl-fdm-at/package.py | 2 | 1685 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class PpopenApplFdmAt(MakefilePackage):
"""ppOpen-APPL/FDM with Auto-Tuning"""
homepage = "... | lgpl-2.1 | 2,089,136,601,130,362,000 | 33.387755 | 73 | 0.587537 | false | 3.431772 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.