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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
abevac/mitlocate-web | serverus/models.py | 1 | 3768 | from django.db import models
from fields import MACAddressField
class Building(models.Model):
number = models.CharField(max_length=6)
name = models.CharField(max_length=50,blank=True)
def __unicode__(self):
return self.name if self.name else "Building " + self.number
class AP(models.Model):
... | mit | 7,694,156,392,134,551,000 | 39.095745 | 116 | 0.695594 | false | 3.683284 | false | false | false |
paulu/deepfeatinterp | render_movie.py | 1 | 4264 | #!/usr/bin/env python2
from __future__ import division
from __future__ import with_statement
from __future__ import print_function
import time
import numpy
import deepmodels
import json
import os.path
import argparse
import subprocess
import pipes
import alignface
import imageutils
import utils
if __name__=='__main_... | gpl-3.0 | 4,066,442,525,585,466,000 | 41.217822 | 259 | 0.723499 | false | 3.392204 | true | false | false |
pfmk/folsom | morello/migrations/0006_auto__add_field_client_immigration_status.py | 1 | 6796 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding field 'Client.immigration_status'
db.add_column('morello_client', 'immigration_status',
... | gpl-2.0 | -6,190,065,619,375,468,000 | 64.355769 | 182 | 0.546057 | false | 3.67948 | false | false | false |
sebdelsol/pyload | module/plugins/hoster/FlyFilesNet.py | 1 | 1279 | # -*- coding: utf-8 -*-
import re
from urllib import unquote
from module.network.RequestFactory import getURL
from module.plugins.internal.SimpleHoster import SimpleHoster
class FlyFilesNet(SimpleHoster):
__name__ = "FlyFilesNet"
__type__ = "hoster"
__version__ = "0.1"
__pattern__ = r'http:/... | gpl-3.0 | 5,604,990,868,534,844,000 | 27.422222 | 88 | 0.591869 | false | 3.438172 | false | false | false |
jjdmol/LOFAR | SAS/ResourceAssignment/RAtoOTDBTaskSpecificationPropagator/lib/propagator.py | 1 | 7767 | #!/usr/bin/env python
# Copyright (C) 2015
# ASTRON (Netherlands Institute for Radio Astronomy)
# P.O.Box 2, 7990 AA Dwingeloo, The Netherlands
#
# This file is part of the LOFAR software suite.
# The LOFAR software suite is free software: you can redistribute it
# and/or modify it under the terms of the GNU General P... | gpl-3.0 | 375,552,148,114,528,500 | 44.95858 | 164 | 0.655208 | false | 3.455071 | false | false | false |
adazey/Muzez | libs/nltk/metrics/distance.py | 1 | 6143 | # Natural Language Toolkit: Distance Metrics
#
# Copyright (C) 2001-2016 NLTK Project
# Author: Edward Loper <edloper@gmail.com>
# Steven Bird <stevenbird1@gmail.com>
# Tom Lippincott <tom@cs.columbia.edu>
# URL: <http://nltk.org/>
# For license information, see LICENSE.TXT
#
"""
Distance Me... | gpl-3.0 | 5,627,413,548,343,705,000 | 28.410891 | 128 | 0.584079 | false | 3.207833 | false | false | false |
team-xue/xue | xue/bandexams/migrations/0001_initial.py | 1 | 4513 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'BandExamResult'
db.create_table('bandexams_bandexamresult', (
('id... | bsd-3-clause | -6,872,514,231,132,817,000 | 59.821918 | 182 | 0.551296 | false | 3.786074 | false | false | false |
oas89/iktomi | iktomi/utils/paginator.py | 1 | 8823 | # -*- coding: utf-8 -*-
from . import cached_property
import math, itertools
from ..web.reverse import URL
def full_page_range(pages_count, page):
return range(1, pages_count+1)
class FancyPageRange(object):
'''Insures there are edge pages are shown at each edge and surround pages
around current page.'... | mit | -4,587,178,928,317,800,400 | 29.635417 | 80 | 0.586195 | false | 3.972535 | false | false | false |
Cadasta/cadasta-platform | setup.py | 1 | 3676 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
from setuptools import setup
def get_pkg_from_git_url(link):
"""
Given a pip-compatible git-requirement, output a setup.py-compatible
install requirement.
'git+https://github.com/user/pkg.git@branch' ->
'pkg'
"""
try:
... | agpl-3.0 | 992,383,321,183,007,500 | 27.496124 | 74 | 0.60555 | false | 3.611002 | false | false | false |
TOTVS/mdmpublic | python/elasticsearch_tool/check_es_gc_count.py | 1 | 2973 | #!/usr/bin/env python3
##-------------------------------------------------------------------
## File: check_es_gc_count.py
## Author : Denny
## Description : List full gc count for all es nodes
## python check_es_gc_count.py --es_host 192.168.0.2 --max_full_gc 300
## --
## Created : <2018-03-20>
## Updated: Time-stam... | bsd-2-clause | -1,835,579,645,765,439,200 | 43.373134 | 181 | 0.578877 | false | 3.189914 | false | false | false |
chuckSMASH/batterystaple | batterystaple/__init__.py | 1 | 4296 | from __future__ import division
import logging
import os
import random
import time
# Set up logger
log = logging.getLogger(__name__)
ch = logging.StreamHandler()
log.addHandler(ch)
# Word list file path info
BASE_DIR = os.path.dirname(os.path.abspath(__file__))
WORD_LIST_FILENAME = 'word_list_en.txt'
WORD_LIST_PATH ... | mit | 5,636,973,382,251,409,000 | 38.777778 | 124 | 0.673417 | false | 3.748691 | false | false | false |
redhat-openstack/manila | manila/api/views/shares.py | 1 | 4947 | # Copyright 2013 OpenStack LLC.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required b... | apache-2.0 | 7,685,852,231,259,274,000 | 36.763359 | 78 | 0.583586 | false | 3.976688 | false | false | false |
NealJMD/Grinbox-server | model.py | 1 | 1934 | import web
import time
db = web.database(dbn='mysql', db='grinbox', user='root')
def get_tokens(address):
values = {'address': address}
matches = db.select('tokens', vars=values, where='address=$address')
if len(matches) > 0: return matches[0]
return None
def new_tokens(address, auth='', refresh=''):
values = {... | gpl-3.0 | 518,990,015,098,228,160 | 41.065217 | 229 | 0.701655 | false | 3.311644 | false | false | false |
avidas/festive.ly | festively/views.py | 1 | 1213 | from flask import Blueprint, render_template, jsonify, request, send_from_directory, redirect, url_for
import os
festivals = Blueprint('festivals', __name__, template_folder='templates')
@festivals.route('/')
def index():
return render_template('index.html')
@festivals.route('/search-results')
def featured():
... | mit | 6,787,556,305,931,041,000 | 34.676471 | 102 | 0.67601 | false | 3.388268 | false | false | false |
lpirl/ansible | lib/ansible/executor/task_queue_manager.py | 1 | 14192 | # (c) 2012-2014, Michael DeHaan <michael.dehaan@gmail.com>
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) an... | gpl-3.0 | -2,837,152,892,646,285,000 | 39.899135 | 182 | 0.62042 | false | 4.460088 | false | false | false |
Cadene/pretrained-models.pytorch | pretrainedmodels/models/wideresnet.py | 1 | 2830 | from __future__ import print_function, division, absolute_import
import os
from os.path import expanduser
import hickle as hkl
import torch
import torch.nn.functional as F
from torch.autograd import Variable
__all__ = ['wideresnet50']
model_urls = {
'wideresnet152': 'https://s3.amazonaws.com/pytorch/h5models/wide... | bsd-3-clause | 2,037,187,808,385,669,400 | 31.906977 | 92 | 0.553004 | false | 3.10989 | false | false | false |
ployground/ploy_fabric | setup.py | 1 | 1176 | from setuptools import setup
import os
here = os.path.abspath(os.path.dirname(__file__))
README = open(os.path.join(here, 'README.rst')).read()
HISTORY = open(os.path.join(here, 'HISTORY.rst')).read()
version = "1.1.2.dev0"
install_requires = [
'setuptools',
'ploy >= 1.0.0, < 2dev',
'Fabric>=1.4.0,!=1... | bsd-3-clause | 4,504,938,345,993,120,000 | 27 | 56 | 0.623299 | false | 3.408696 | false | true | false |
ThreatConnect-Inc/tcex | tcex/bin/validate.py | 1 | 23337 | #!/usr/bin/env python
"""TcEx Framework Validate Module."""
# standard library
import ast
import importlib
import json
import os
import sys
import traceback
from collections import deque
# third-party
import colorama as c
from jsonschema import SchemaError, ValidationError, validate
from stdlib_list import stdlib_list... | apache-2.0 | 4,698,509,395,829,708,000 | 38.15604 | 100 | 0.519304 | false | 4.57678 | false | false | false |
SublimeLinter/SublimeLinter3 | highlight_view.py | 1 | 32846 | from collections import defaultdict
import html
from itertools import chain
from functools import partial
import re
import textwrap
import threading
import uuid
import sublime
import sublime_plugin
from .lint import persist, events, style, util, queue, quick_fix
from .lint.const import PROTECTED_REGIONS_KEY, ERROR, W... | mit | 7,384,537,639,878,714,000 | 30.757018 | 98 | 0.58863 | false | 3.65923 | false | false | false |
python/performance | pyperformance/benchmarks/bm_tornado_http.py | 1 | 2910 |
"""Test the performance of simple HTTP serving and client using the Tornado
framework.
A trivial "application" is generated which generates a number of chunks of
data as a HTTP response's body.
"""
import sys
import socket
import pyperf
from tornado.httpclient import AsyncHTTPClient
from tornado.httpserver import ... | mit | -7,253,718,335,569,278,000 | 26.45283 | 79 | 0.646048 | false | 3.849206 | false | false | false |
leogulus/pisco_pipeline | pisco_photometry_all_2019.py | 1 | 76497 | import sys, os, re, yaml, subprocess, shlex, FITS_tools
import pandas as pd
import numpy as np
import pickle
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import image
import matplotlib.cm as cm
import matplotlib.image as mpimg
from scipy.optimize import curve_fit
import scipy.integrate as integr... | mit | 1,685,512,406,826,835,500 | 47.911125 | 319 | 0.590742 | false | 2.438618 | false | false | false |
smurfix/pybble | pybble/manager/populate.py | 1 | 12264 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, division, unicode_literals
##
## This is part of Pybble, a WMS (Whatever Management System) based on
## Jinja2/Haml, Werkzeug, Flask, and Optimism.
##
## Pybble is Copyright © 2009-2014 by Matthias Urlichs <matthias@urlichs.de>,
## it is li... | gpl-3.0 | 3,344,574,914,797,640,000 | 32.897222 | 160 | 0.676227 | false | 3.036327 | true | false | false |
hughsie/fwupd | data/device-tests/hardware.py | 2 | 5214 | #!/usr/bin/python3
# pylint: disable=wrong-import-position,too-many-locals,unused-argument,wrong-import-order
#
# Copyright (C) 2017 Richard Hughes <richard@hughsie.com>
#
# SPDX-License-Identifier: LGPL-2.1+
import gi
import os
import requests
import time
import sys
import glob
import json
from termcolor import color... | lgpl-2.1 | 6,511,718,987,207,250,000 | 32 | 90 | 0.521672 | false | 3.95 | false | false | false |
birsoyo/conan | conans/client/rest/auth_manager.py | 1 | 8686 | """
Collaborate with RestApiClient to make remote anonymous and authenticated calls.
Uses user_io to request user's login and password and obtain a token for calling authenticated
methods if receives AuthenticationException from RestApiClient.
Flow:
Directly invoke a REST method in RestApiClient, example: get_co... | mit | -3,967,779,604,396,425,000 | 42.21393 | 96 | 0.632397 | false | 4.161955 | false | false | false |
megakevin/single-authored-code-evolution-analysis | fix_bug_commits.py | 1 | 6318 | __author__ = 'kevin'
from datetime import datetime
from subprocess import call, check_output
import sys
import os
import csv
import copy
import tag_lists
class GitTag():
"""Represents a Tag in a git repository"""
def __init__(self, line):
raw_tag, raw_hash, raw_date, raw_timestamp = line.split("|")
... | mit | 3,895,848,780,048,690,700 | 30.437811 | 146 | 0.572966 | false | 3.662609 | false | false | false |
juanjosegzl/learningpygame | ezmenu.py | 1 | 2298 | #! /usr/bin/env python
# I found this file inside Super Mario Bros python
# written by HJ https://sourceforge.net/projects/supermariobrosp/
# the complete work is licensed under GPL3 although I can not determine# license of this file
# maybe this is the original author, we can contact him/her http://www.pygame.org/pro... | gpl-3.0 | 8,211,902,187,949,101,000 | 30.479452 | 113 | 0.511314 | false | 3.551777 | false | false | false |
kobotoolbox/kobocat | onadata/apps/logger/xform_instance_parser.py | 1 | 12334 | # coding: utf-8
import logging
import re
import sys
import dateutil.parser
import six
from django.utils.encoding import smart_str
from django.utils.translation import ugettext as _
from django.utils.six import text_type
from xml.dom import minidom, Node
from onadata.libs.utils.common_tags import XFORM_ID_STRING
cla... | bsd-2-clause | -2,918,455,112,718,348,000 | 33.261111 | 107 | 0.580104 | false | 4.034675 | false | false | false |
SUMPaul/dblog | dblog/settings.py | 1 | 3991 | """
Django settings for dblog project.
Generated by 'django-admin startproject' using Django 1.10.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""
import os
... | mit | -982,665,622,674,144,000 | 25.966216 | 91 | 0.660987 | false | 3.385072 | false | false | false |
sim0629/irc | setup.py | 1 | 1516 | import sys
import setuptools
def read_long_description():
with open('README.rst') as f:
data = f.read()
with open('CHANGES.rst') as f:
data += '\n\n' + f.read()
return data
importlib_req = ['importlib'] if sys.version_info < (2,7) else []
argparse_req = ['argparse'] if sys.ver... | lgpl-2.1 | -8,512,088,516,057,422,000 | 26.603774 | 79 | 0.575198 | false | 3.558685 | false | false | false |
landgraf/zeromq-Ada | fixHeader.py | 1 | 4068 | #!/usr/bin/env python
import GPS
from os.path import *
HEADER="""##############################################################################
## ##
## 0MQ Ada-binding ##
## ... | gpl-2.0 | -4,971,576,670,078,520,000 | 43.703297 | 103 | 0.420108 | false | 4.003937 | false | false | false |
sbsdev/daisyproducer | daisyproducer/documents/models.py | 1 | 14120 | import uuid, datetime
from os.path import join
from shutil import rmtree
from daisyproducer.documents.storage import OverwriteStorage
from django.conf import settings
from django.contrib.auth.models import User, Group
from django.db import models
from django.db.models import Max
from django.forms import ModelForm
from... | agpl-3.0 | 154,982,223,232,252,600 | 36.653333 | 167 | 0.605949 | false | 4.01707 | false | false | false |
openmotics/gateway | testing/unittests/gateway_tests/output_controller_test.py | 1 | 15041 | # Copyright (C) 2020 OpenMotics BV
#
# This program 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.
#
# This program is distribu... | agpl-3.0 | -7,424,221,646,043,785,000 | 49.136667 | 154 | 0.613324 | false | 3.867575 | true | false | false |
flavour/ssf | modules/eden/project.py | 1 | 132310 | # -*- coding: utf-8 -*-
""" Sahana Eden Project Model
@copyright: 2011-2012 (c) Sahana Software Foundation
@license: MIT
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software witho... | mit | -4,045,506,614,330,831,000 | 40.321049 | 219 | 0.414814 | false | 5.201274 | false | false | false |
Remillard/VHDL-Mode | vhdl_lang.py | 1 | 62003 | # pylint: disable=C0103, C0111
"""
--------------------------------------------------------------------------------
VHDL Language Module.
Defines class structures and methods for identifying and
manipulating text structures, and extracting and replicating
lexical elements.
---------------------------------... | mit | -4,631,636,265,926,570,000 | 41.117524 | 195 | 0.511072 | false | 4.455199 | false | false | false |
gr3yman/TileControl | TileCtrl.py | 1 | 2772 | #!/usr/env/python3
import subprocess
import tinydb
from tinydb.storages import MemoryStorage
import tkinter as tk
## who knows if this is working or not?
def keypress(event):
if event.keysym == 'Escape':
root.destroy()
x = event.char
if x == "Ctrl-Z":
print('c z')
elif x == "Ctrl-X":
... | gpl-2.0 | -4,507,359,509,074,542,000 | 29.461538 | 128 | 0.621212 | false | 3.268868 | false | false | false |
kdheepak89/RTDT | RTDT/transit.py | 1 | 13035 | from __future__ import print_function
from google.transit import gtfs_realtime_pb2
import requests
import pandas as pd
from io import BytesIO
import zipfile
import os
import os.path
import datetime
import math
UTC_OFFSET = int(os.getenv('OFFSET', 7))
DEFAULT_LOCATION = {u'lat': 39.7433814, u'lng': -104.98910989999999}... | bsd-3-clause | 3,521,527,067,512,627,000 | 35.008287 | 149 | 0.627234 | false | 3.131908 | false | false | false |
pmaigutyak/mp-shop | wishlist/models.py | 1 | 2022 |
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from wishlist import exceptions
class WishListItem(models.Model):
user = models.ForeignKey(
settings.AUTH_USER_MODEL, related_name='wishlist_items',
verbose_name=_('Owner'), on_... | isc | 1,740,848,277,993,363,200 | 23.361446 | 73 | 0.60633 | false | 4.076613 | false | false | false |
jsfan/flask-dance | setup.py | 1 | 2079 | # coding=utf-8
from __future__ import unicode_literals
import re
from setuptools import setup, Command, find_packages
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
import sys,subprocess
err... | mit | -285,380,746,085,817,500 | 26 | 87 | 0.60558 | false | 3.885981 | false | false | false |
MobleyLab/SAMPL6 | host_guest/Analysis/Scripts/analyze_sampling.py | 1 | 116143 | #!/usr/bin/env python
# =============================================================================
# GLOBAL IMPORTS
# =============================================================================
import collections
import copy
import itertools
import json
import math
import os
import numpy as np
import pandas as ... | mit | -5,714,837,175,276,872,000 | 45.180119 | 292 | 0.598951 | false | 3.415569 | false | false | false |
alexanderjfink/miner | library/maps/uscensus_old.py | 1 | 3983 | """
miner map for U.S. Census 2010 Minnesota database
"""
from miner import *
class USCensus2010:
description = 'Data from the 2010 Dicennial US Census.'
homepage = 'http://www.census.gov'
# Place all download functionality in here, should download files to a standard download directory
# Should check whether ... | gpl-2.0 | -8,341,483,920,533,410,000 | 34.5625 | 129 | 0.621893 | false | 3.624204 | false | false | false |
ssorgatem/pulsar | galaxy/tools/deps/resolvers/modules.py | 1 | 6098 | """
This file contains the outline of an implementation to load environment modules
(http://modules.sourceforge.net/).
This is a community contributed feature and the core Galaxy team does utilize
it, hence support for it will be minimal. The Galaxy team eagerly welcomes
community contribution and maintenance however.... | apache-2.0 | 17,806,055,026,369,246 | 38.089744 | 133 | 0.639062 | false | 4.25838 | false | false | false |
dit/dit | dit/divergences/copy_mutual_information.py | 1 | 2403 | """
The copy mutual information, as defined by Kolchinsky & Corominas-Murtra.
"""
from .pmf import relative_entropy
from ..utils import unitful
__all__ = (
'copy_mutual_information',
)
def binary_kullback_leibler_divergence(p, q):
"""
Compute the binary Killback-Leibler divergence.
Parameters
... | bsd-3-clause | -1,958,601,788,302,301,700 | 26 | 116 | 0.610071 | false | 3.586567 | false | false | false |
xgt001/uav_msr_ip14 | opencv_rnd/test_shape_detect.py | 1 | 1569 | __author__ = 'ganesh'
__author__ = 'ganesh'
import cv2
import numpy as np
# TODO: loop through folder files
filename = "alpha_N.JPG"
image = cv2.imread(filename)
newx,newy = image.shape[1]/6,image.shape[0]/6 #new size (w,h)
img = cv2.resize(image,(newx,newy))
img_sav = img
# CODE: Resize Image Toggle
# cv2.ims... | mit | -1,318,141,930,111,463,400 | 24.306452 | 105 | 0.680051 | false | 2.459248 | false | false | false |
vmx/spring | spring/docgen.py | 1 | 6786 | import math
import time
from hashlib import md5
from itertools import cycle
import random
import numpy as np
from spring.states import STATES, NUM_STATES
from fastdocgen import build_achievements
class Iterator(object):
def __init__(self):
self.prefix = None
def __iter__(self):
return sel... | apache-2.0 | 6,549,115,801,659,941,000 | 28.633188 | 80 | 0.575007 | false | 3.65625 | false | false | false |
thomaslima/PySpice | ngspice-shared/test-module.py | 1 | 2074 | ####################################################################################################
import PySpice.Logging.Logging as Logging
logger = Logging.setup_logging()
####################################################################################################
from PySpice.Spice.NgSpice.Shared import... | gpl-3.0 | 3,604,429,557,876,537,300 | 27.805556 | 100 | 0.440694 | false | 3.638596 | false | false | false |
MickSandoz/compassion-switzerland | sponsorship_switzerland/models/child.py | 1 | 2660 | # -*- encoding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2016 Compassion CH (http://www.compassion.ch)
# Releasing children from poverty in Jesus' name
# @author: Emanuel Cino <ecino@compassion.ch>
#
# The licence is in the file __openerp__.p... | agpl-3.0 | -981,044,447,322,504,400 | 37.550725 | 79 | 0.594361 | false | 3.952452 | false | false | false |
maxisi/gwsumm | gwsumm/plot/range.py | 1 | 8183 | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013)
#
# This file is part of GWSumm.
#
# GWSumm 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) ... | gpl-3.0 | -7,261,202,758,330,606,000 | 31.995968 | 79 | 0.578883 | false | 3.930355 | false | false | false |
florian-f/sklearn | sklearn/datasets/svmlight_format.py | 1 | 13269 | """This module implements a loader and dumper for the svmlight format
This format is a text-based format, with one sample per line. It does
not store zero valued features hence is suitable for sparse dataset.
The first element of each line can be used to store a target variable to
predict.
This format is used as the... | bsd-3-clause | -6,897,996,081,832,028,000 | 37.239193 | 82 | 0.643455 | false | 3.846087 | false | false | false |
hivam/doctor_dental_care | models/doctor_list_report_odontologia.py | 1 | 6674 |
# -*- encoding: 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... | agpl-3.0 | 1,476,002,846,682,354,700 | 37.350575 | 228 | 0.698591 | false | 2.919912 | false | false | false |
marios-zindilis/musicbrainz-django-models | musicbrainz_django_models/models/release_status.py | 1 | 2847 | """
.. module:: release_status
The **Release Status** is one of:
1. Official
2. Promotion
3. Bootleg
4. Pseudo-Release
The Release Status is referenced by the Release model. Read more at the
`Release documentation on MusicBrainz`_.
.. _Release documentation on MusicBrainz: https://musicbrainz.org/doc/Release
Postr... | gpl-2.0 | -8,436,907,559,168,400,000 | 30.633333 | 79 | 0.651563 | false | 3.889344 | false | false | false |
cechrist/cardoon | cardoon/devices/cppaddev.py | 1 | 5902 | """CppAD device interface. Provides functions to implement evaluation of
nonlinear equations and derivatives using the pycppad library:
http://www.seanet.com/~bradbell/pycppad/index.xml
Usage:
=====
import cppaddev as ad
...
def process_params(self):
...
# Add the following at the end to make su... | gpl-3.0 | 2,864,869,276,039,015,400 | 27.650485 | 72 | 0.624873 | false | 3.498518 | false | false | false |
MayankGo/ec2-api | ec2api/db/api.py | 1 | 3832 | # Copyright 2013 Cloudscaling Group, 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 applicabl... | apache-2.0 | -8,293,767,394,349,254,000 | 28.030303 | 78 | 0.664405 | false | 3.452252 | false | false | false |
callowayproject/django-resources | contentrelations/related.py | 1 | 7787 | from django.db.models import Q
from django.db import models
from django.contrib.contenttypes.models import ContentType
try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError:
from django.contrib.contenttypes.generic import GenericForeignKey
from .generic import GFKOptimizedQue... | apache-2.0 | -3,735,973,520,963,777,500 | 33.919283 | 96 | 0.582381 | false | 4.175335 | false | false | false |
google/struct2tensor | struct2tensor/expression_impl/promote_and_broadcast.py | 1 | 4361 | # 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
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | -7,373,022,071,630,664,000 | 23.92 | 80 | 0.63357 | false | 3.586349 | false | false | false |
goodes/fit4school | fit4school/core/migrations/0007_trackeractivity.py | 1 | 1072 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.4 on 2017-12-10 07:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20171207_0148'),
]
operations = ... | apache-2.0 | -7,871,774,560,359,299,000 | 35.965517 | 160 | 0.594216 | false | 4.429752 | false | false | false |
devttys0/idascript | src/idascript.py | 1 | 1858 | ##################################################################################################
# Python module for IDAPython scripts executed via idascript.
#
# Copied from the original idascript utility, with minor changes: http://www.hexblog.com/?p=128
#
# Craig Heffner
# 14-November-2012
# http://www.tacn... | mit | -197,185,512,939,456,770 | 24.927536 | 98 | 0.558127 | false | 3.607767 | false | false | false |
childsish/lhc-python | setup.py | 1 | 1367 | import os
from subprocess import Popen, PIPE
from setuptools import setup, find_packages, Extension
bitap_extension = Extension(
'lhc.misc.bitap',
['lib/bitap/bitapmodule.cpp', 'lib/bitap/bitap.cpp'],
include_dirs=['lib/bitap'])
with open('README.rst', encoding='utf-8') if os.path.exists('README.rst') e... | gpl-2.0 | -6,920,184,595,894,356,000 | 34.051282 | 89 | 0.649598 | false | 3.443325 | false | true | false |
chaubold/hytra | empryonic/learning/quantification.py | 1 | 34287 | import unittest as _ut
import numpy as np
from empryonic import io as _io
import math
###
### Events as members of sets for the calculation of performance measures
###
class Event( object ):
@property
def setid( self ):
return self._setid
@property
def timestep( self ):
return self._ti... | mit | 3,066,249,526,016,363,000 | 34.53057 | 538 | 0.572491 | false | 3.240431 | true | false | false |
chaubold/hytra | scripts/train_transition_classifier.py | 1 | 17108 | # pythonpath modification to make hytra and empryonic available
# for import without requiring it to be installed
from __future__ import print_function, absolute_import, nested_scopes, generators, division, with_statement, unicode_literals
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
# standard impor... | mit | -8,698,759,479,755,835,000 | 47.602273 | 144 | 0.623276 | false | 4.023518 | true | false | false |
nemesiscodex/JukyOS-sugar | extensions/deviceicon/speech.py | 1 | 5531 | # Copyright (C) 2011 One Laptop Per Child
#
# 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 distribu... | gpl-2.0 | -2,867,048,349,204,522,500 | 36.371622 | 77 | 0.637859 | false | 3.658069 | false | false | false |
openstack/heat | heat/engine/resources/openstack/heat/remote_stack.py | 1 | 18516 | #
# 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,183,448,817,349,931,000 | 37.81761 | 78 | 0.582523 | false | 4.254596 | false | false | false |
ownport/ansible-lookups | src/lookups/lookup/first_found.py | 1 | 5368 | from __future__ import (absolute_import, division, print_function)
__metaclass__ = type
# take a list of files and (optionally) a list of paths
# return the first existing file found in the paths
# [file1, file2, file3], [path1, path2, path3]
# search order is:
# path1/file1
# path1/file2
# path1/file3
# path2/file1
#... | gpl-3.0 | 3,413,578,414,428,634,000 | 30.952381 | 109 | 0.577124 | false | 3.91539 | false | false | false |
geimer/easybuild-framework | easybuild/tools/build_log.py | 1 | 5969 | # #
# Copyright 2009-2014 Ghent University
#
# This file is part of EasyBuild,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://vscentrum.be/nl/en),
# the Hercules foundation (ht... | gpl-2.0 | -4,285,533,224,115,982,300 | 32.161111 | 133 | 0.672642 | false | 3.712065 | false | false | false |
Brett777/Predict-Risk | ApprovalModel.py | 1 | 1979 |
# coding: utf-8
# In[ ]:
import h2o
import pandas as pd
# initialize the model scoring server
h2o.init(nthreads=1,max_mem_size=1, start_h2o=True, strict_version_check = False)
def approve_loan(Loan_Amount,Term,Interest_Rate,Employment_Years,Home_Ownership,Annual_Income,Verification_Status,Loan_Purpose,State,
... | apache-2.0 | 5,041,993,009,624,065,000 | 45.023256 | 153 | 0.590197 | false | 3.572202 | false | false | false |
IKholopov/HackUPC2017 | hackupc/env/lib/python3.5/site-packages/social_core/backends/line.py | 1 | 3104 | # vim:fileencoding=utf-8
import requests
import json
from .oauth import BaseOAuth2
from ..exceptions import AuthFailed
from ..utils import handle_http_errors
class LineOAuth2(BaseOAuth2):
name = 'line'
AUTHORIZATION_URL = 'https://access.line.me/dialog/oauth/weblogin'
ACCESS_TOKEN_URL = 'https://api.line... | apache-2.0 | -1,810,778,091,220,246,800 | 33.10989 | 87 | 0.559601 | false | 4.062827 | false | false | false |
C-Pro/pgdocgen | pgdocgen/ddlobject/schema.py | 1 | 1808 | '''Schema description module'''
import copy
from pgdocgen.ddlobject.ddlobject import DDLObject
from pgdocgen.utils import get_logger
class Schema(DDLObject):
'''SQL schema class'''
contents = []
def read_contents(self, name, conn):
'''Read schema tables'''
sql = '''select c.relname,
... | gpl-2.0 | -8,471,032,404,717,346,000 | 36.666667 | 77 | 0.50719 | false | 4.194896 | false | false | false |
txomon/SpockBot | spock/mcp/mcpacket.py | 1 | 4216 | try:
basestring
except NameError:
basestring = str
import copy
import logging
import zlib
from time import gmtime, strftime
from spock import utils
from spock.mcp import datautils, mcdata
from spock.mcp.mcdata import MC_VARINT
from spock.mcp.mcpacket_extensions import hashed_extensions
logger = logging.getL... | mit | -7,823,912,013,446,053,000 | 35.66087 | 79 | 0.57685 | false | 3.714537 | false | false | false |
TopherGopher/aws-infra.jenkins-scripts | s3trim.py | 1 | 7063 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Example usage:
# python s3trim.py --count 14 --key=AWS_KEY --secret=AWS_SECRET_KEY nmdarchive christest/production
import argparse
import logging
import operator
import re
import time
from collections import OrderedDict as Dict
from boto.s3.connection import S3Connection... | mit | 2,256,686,291,314,508,300 | 38.238889 | 160 | 0.624947 | false | 3.607252 | false | false | false |
bolkedebruin/airflow | airflow/providers/apache/spark/hooks/spark_jdbc.py | 1 | 11610 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | 5,919,729,661,588,908,000 | 46.004049 | 89 | 0.589233 | false | 4.358108 | false | false | false |
datacommonsorg/data | scripts/india_census/common/generic_base.py | 1 | 5322 | # Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 826,548,079,719,393,200 | 35.958333 | 93 | 0.643743 | false | 3.742616 | false | false | false |
bundgus/python-playground | matplotlib-playground/examples/event_handling/looking_glass.py | 1 | 1280 | import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
x, y = np.random.rand(2, 200)
fig, ax = plt.subplots()
circ = patches.Circle((0.5, 0.5), 0.25, alpha=0.8, fc='yellow')
ax.add_patch(circ)
ax.plot(x, y, alpha=0.2)
line, = ax.plot(x, y, alpha=1.0, clip_path=circ)
class EventHand... | mit | 5,355,964,802,835,473,000 | 26.234043 | 77 | 0.622656 | false | 3.168317 | false | false | false |
touqir14/Cmput_692_project | Extract_Context_From_Snippets_Surrounding_6_Words.py | 1 | 1310 | from sys import getsizeof
import collections
import pickle
# import timeit
from sys import getsizeof
import time
import csv
import io
output = io.StringIO()
with open('../dictionary_Nikon_Snippet_Surroundings.pickle', 'rb') as f:
d = (pickle.load(f))
with open('/Users/sasa/Dropbox/1-Uni/CMPUT 692/Project/Code... | apache-2.0 | 1,286,028,864,553,510,700 | 32.589744 | 111 | 0.566412 | false | 3.358974 | false | false | false |
sayedmohamed/pomodora-todo | pomotodo/mytodo/migrations/0001_initial.py | 1 | 6658 | # -*- 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 model 'Project'
db.create_table(u'mytodo_project', (
... | gpl-2.0 | 2,260,904,148,231,961,900 | 64.930693 | 195 | 0.569841 | false | 3.628338 | false | false | false |
jokkebk/euler | p59.py | 1 | 5359 | cipher = [79, 59, 12, 2, 79, 35, 8, 28, 20, 2, 3, 68, 8, 9, 68, 45, 0, 12, 9,
67, 68, 4, 7, 5, 23, 27, 1, 21, 79, 85, 78, 79, 85, 71, 38, 10, 71, 27,
12, 2, 79, 6, 2, 8, 13, 9, 1, 13, 9, 8, 68, 19, 7, 1, 71, 56, 11, 21,
11, 68, 6, 3, 22, 2, 14, 0, 30, 79, 1, 31, 6, 23, 19, 10, 0, 73, 79,
... | mit | -1,389,164,588,070,052,000 | 65.9875 | 79 | 0.407352 | false | 2.057988 | false | false | false |
splotz90/urh | src/urh/models/PluginListModel.py | 1 | 1635 | from PyQt5.QtCore import QAbstractListModel, Qt, QModelIndex
from PyQt5.QtGui import QFont
from urh import constants
from urh.plugins import Plugin
class PluginListModel(QAbstractListModel):
def __init__(self, plugins, highlighted_plugins = None, parent=None):
"""
:type plugins: list of Plugin
... | gpl-3.0 | 8,113,814,833,017,521,000 | 37.952381 | 97 | 0.659327 | false | 3.997555 | false | false | false |
commagere/commagere.com | main.py | 1 | 1348 | import os
import jinja2
import webapp2
"""
For Unit testing:
https://cloud.google.com/appengine/docs/python/tools/handlertesting
"""
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(os.path.dirname(__file__)),
extensions=['jinja2.ext.autoescape'],
autoescape=True)
def prep_template... | mit | -3,297,175,611,623,295,000 | 26.510204 | 77 | 0.683234 | false | 3.907246 | false | false | false |
Alexanau/table | table.py | 1 | 1041 | #!/usr/bin/python
import getopt as g
import sys
optlist, args = g.getopt(sys.argv[1:],'d:')
delim = ','
for o,a in optlist:
if o == '-d':
delim = a
max_width = [0]
with open(args[0],'r') as fh:
for line in fh:
line = line.rstrip()
fields = line.split(delim)
for idx,field in enumerate(fields):
... | mit | 8,851,027,751,409,064,000 | 21.148936 | 63 | 0.549472 | false | 3.061765 | false | false | false |
mlperf/training_results_v0.7 | Fujitsu/benchmarks/resnet/implementations/implementation_open/mxnet/3rdparty/tvm/python/tvm/autotvm/database.py | 1 | 6064 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -972,615,965,296,279,300 | 29.781726 | 88 | 0.606365 | false | 4.300709 | false | false | false |
b3j0f/schema | b3j0f/schema/utils.py | 1 | 13398 | # -*- coding: utf-8 -*-
# --------------------------------------------------------------------
# The MIT License (MIT)
#
# Copyright (c) 2016 Jonathan Labéjof <jonathan.labejof@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation fi... | mit | -6,103,575,148,108,877,000 | 29.517084 | 80 | 0.614839 | false | 4.411261 | true | false | false |
pombredanne/ghost-tree | ghosttree/silva/tests/test_filter.py | 1 | 3455 | # ----------------------------------------------------------------------------
# Copyright (c) 2015--, ghost-tree development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the LICENSE file, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | 4,728,956,969,194,246,000 | 31.28972 | 78 | 0.590159 | false | 3.500507 | true | false | false |
tomevans/pyphotom | photom_class.py | 1 | 14267 | import numpy as np
import matplotlib.pyplot as plt
import pdb
import os
import cPickle
import numpy as np
import shutil
from photom import photom_inspect, photom_reduce, photom_absolute, photom_relative, photom_checks, photom_optimise
homestr = os.path.expanduser( '~' )
class photom():
"""
"""
def __init_... | gpl-2.0 | -3,544,271,532,625,273,300 | 48.366782 | 134 | 0.593888 | false | 3.899153 | false | false | false |
KECB/learn | computer_vision/12_rmv_salt_pepper_median_blur.py | 1 | 1464 | import numpy as np
import cv2
import matplotlib.pyplot as plt
# load in image and add Salt and pepper noise
moon = cv2.imread('images/moon.png', 0)
######################################################## ADD SALT & PEPPER NOISE
# salt and peppering manually (randomly assign coords as either white or black)
rows, col... | mit | 8,626,971,570,454,000,000 | 36.538462 | 80 | 0.660519 | false | 2.864971 | false | false | false |
latrop/sdss_downloader | sdss_downloader.py | 1 | 22627 | #! /usr/bin/env python
#
# Author: Sergey Savchenko (savchenko.s.s@gmail.com)
#
from threading import Thread
import subprocess
from math import hypot, log10, sqrt
from time import time, sleep
import urllib.request
import urllib
import sys
import os
import glob
import shutil
import argparse
import bz2
import numpy a... | gpl-3.0 | 8,123,656,252,170,740,000 | 37.221284 | 115 | 0.515093 | false | 3.534364 | false | false | false |
sevein/archivematica | src/dashboard/src/components/rights/views.py | 1 | 27795 | # This file is part of Archivematica.
#
# Copyright 2010-2013 Artefactual Systems Inc. <http://artefactual.com>
#
# Archivematica 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 ... | agpl-3.0 | 9,058,737,359,596,567,000 | 47.848858 | 293 | 0.666019 | false | 4.298639 | false | false | false |
hydroffice/hyo_ssp | hydroffice/ssp/drivers/saiv.py | 1 | 6625 | from __future__ import absolute_import, division, print_function, unicode_literals
import datetime as dt
import numpy as np
import logging
log = logging.getLogger(__name__)
from .base_format import BaseFormat, FormatError
from .. import __version__
from ..ssp_dicts import Dicts
class Saiv(BaseFormat):
def __i... | lgpl-3.0 | -6,011,151,507,989,463,000 | 37.517442 | 94 | 0.508075 | false | 4.161432 | false | false | false |
blitzmann/Pyfa | gui/builtinMarketBrowser/itemView.py | 1 | 10783 | import wx
from logbook import Logger
from eos.saveddata.module import Module
import gui.builtinMarketBrowser.pfSearchBox as SBox
from gui.builtinMarketBrowser.events import ItemSelected, MAX_RECENTLY_USED_MODULES, RECENTLY_USED_MODULES
from gui.contextMenu import ContextMenu
from gui.display import Display
from gui.ut... | gpl-3.0 | 2,533,936,064,626,691,000 | 37.927798 | 156 | 0.630344 | false | 4.035554 | false | false | false |
maelnor/cinder | cinder/tests/fake_flags.py | 1 | 1947 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compli... | apache-2.0 | 2,221,961,948,262,156,300 | 42.266667 | 78 | 0.721109 | false | 3.533575 | false | false | false |
ultrabug/py3status | py3status/modules/clock.py | 1 | 11062 | """
Display date and time.
This module allows one or more datetimes to be displayed.
All datetimes share the same format_time but can set their own timezones.
Timezones are defined in the `format` using the TZ name in squiggly brackets eg
`{GMT}`, `{Portugal}`, `{Europe/Paris}`, `{America/Argentina/Buenos_Aires}`.
IS... | bsd-3-clause | 510,640,373,761,391,170 | 33.481013 | 85 | 0.562408 | false | 3.678596 | false | false | false |
Superjom/cHasky | python/chasky/node_def_builder.py | 1 | 2057 | import sys
#from graph_def_builder import GraphDefBuilder
from core.framework.attr_value_pb2 import AttrValue
from core.framework.graph_pb2 import NodeDef
from attr_value_builder import AttrValueBuilder
class NodeDefBuilder(object):
def __init__(self, node=None):
self.node_def_ = node if node else NodeDef(... | apache-2.0 | 1,262,839,180,241,818,400 | 26.065789 | 68 | 0.539135 | false | 3.918095 | false | false | false |
Ruide/angr-dev | angr/angr/state_plugins/unicorn_engine.py | 1 | 53139 | import os
import sys
import copy
import struct
import ctypes
import threading
import itertools
import pkg_resources
import logging
from ..sim_options import UNICORN_HANDLE_TRANSMIT_SYSCALL
l = logging.getLogger("angr.state_plugins.unicorn_engine")
try:
import unicorn
except ImportError:
l.warning("Unicorn i... | bsd-2-clause | -4,790,305,247,972,902,000 | 40.129257 | 144 | 0.584411 | false | 3.57213 | false | false | false |
Datera/python-sdk | utils/show_os_volumes.py | 1 | 4523 | #!/usr/bin/env python
from __future__ import (print_function, unicode_literals, division,
absolute_import)
"""
This script will output the Datera AppInstances that are being managed
by an OpenStack Cinder (or Glance) instance.
It does this by retrieving all the AppInstances on the Datera back... | apache-2.0 | 8,028,386,326,577,366,000 | 31.775362 | 79 | 0.605793 | false | 3.668289 | false | false | false |
SheffieldML/GPy | GPy/models/gp_coregionalized_regression.py | 1 | 1940 | # Copyright (c) 2012 - 2014 the GPy Austhors (see AUTHORS.txt)
# Licensed under the BSD 3-clause license (see LICENSE.txt)
import numpy as np
from ..core import GP
from .. import likelihoods
from .. import kern
from .. import util
class GPCoregionalizedRegression(GP):
"""
Gaussian Process model for heterosced... | bsd-3-clause | -3,529,963,618,376,943,600 | 41.173913 | 128 | 0.696392 | false | 3.566176 | false | false | false |
mediafactory/tryton_core_daemon | trytond/backend/fields.py | 1 | 4187 | #This file is part of Tryton. The COPYRIGHT file at the top level of
#this repository contains the full copyright notices and license terms.
import datetime
from decimal import Decimal
try:
import hashlib
except ImportError:
hashlib = None
import sha
class Field(object):
@staticmethod
def sql_fo... | gpl-3.0 | 9,029,150,380,682,607,000 | 21.390374 | 79 | 0.598042 | false | 4.361458 | false | false | false |
HailStorm32/Q.bo_stacks | qbo_webi/src/recorder/recorder.py | 1 | 4591 | #!/usr/bin/env python2.6
# coding: utf-8
#
# Software License Agreement (GPLv2 License)
#
# Copyright (c) 2012 TheCorpora SL
#
# 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 ... | lgpl-2.1 | 7,839,901,651,375,165,000 | 39.628319 | 521 | 0.637552 | false | 3.509939 | false | false | false |
Ptival/PeaCoq | ucsd/analysis/plot.py | 1 | 9691 | #!/usr/bin/env python2
from __future__ import print_function
import csv, sys, os.path
from datetime import datetime
from boomslang import *
def usage():
print('Usage: plot.py data.csv')
class Entry:
def __init__(self, usr, ver, stm, ctm, cmd, pay):
self.username = usr
self.version = ver
... | mit | -7,678,334,237,761,278,000 | 21.69555 | 152 | 0.534517 | false | 3.141329 | false | false | false |
Julian/home-assistant | homeassistant/components/recorder.py | 1 | 15356 | """
homeassistant.components.recorder
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Component that records all events and state changes. Allows other components
to query this database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/recorder/
"""
from contextlib imp... | mit | -2,365,633,100,181,165,000 | 31.260504 | 79 | 0.547148 | false | 4.374929 | false | false | false |
sivaprakashniet/push_pull | p2p/lib/python2.7/site-packages/compressor/parser/default_htmlparser.py | 1 | 3213 | import sys
from django.utils import six
from django.utils.encoding import smart_text
from compressor.exceptions import ParserError
from compressor.parser import ParserBase
# Starting in Python 3.2, the HTMLParser constructor takes a 'strict'
# argument which default to True (which we don't want).
# In Python 3.3, i... | bsd-3-clause | -1,011,857,011,579,656,000 | 31.785714 | 105 | 0.558668 | false | 3.740396 | false | false | false |
mchrzanowski/ProjectEuler | src/python/Problem031.py | 1 | 1985 | '''
Created on Jan 13, 2012
@author: mchrzanowski
'''
from time import time
import numpy as np
LIMIT = 300
COINS = (1, 2, 5, 10, 20, 50, 100, 200)
# O(LIMIT * |COINS|)
def dp():
M = np.zeros((LIMIT + 1, len(COINS) + 1), dtype=np.int)
# base cases.
for i in xrange(1, LIMIT + 1):
M[i, 1] = 1 # t... | mit | 3,372,529,188,409,175,000 | 30.015625 | 101 | 0.457431 | false | 3.025915 | false | false | false |
ktan2020/legacy-automation | win/Lib/site-packages/wx-3.0-msw/wx/lib/agw/customtreectrl.py | 1 | 311049 | # --------------------------------------------------------------------------------- #
# CUSTOMTREECTRL wxPython IMPLEMENTATION
# Inspired By And Heavily Based On wxGenericTreeCtrl.
#
# Andrea Gavana, @ 17 May 2006
# Latest Revision: 27 Aug 2012, 21.00 GMT
#
#
# TODO List
#
# Almost All The Features Of wx.Tree... | mit | 8,084,265,007,689,295,000 | 34.572487 | 226 | 0.545631 | false | 4.413107 | false | false | false |
copyliu/acfun_live_speech | utils.py | 1 | 1318 | # -*- coding: UTF-8 -*-
__author__ = 'Administrator'
import struct
acfun_magic_num=689
def acfunencode(d):
"""
类似urllib.urlencode()的功能 不过是给ACFUN用的
:param d: @type dict
:return: str
"""
#print d
result=""
if isinstance(d,dict):
for k,v in d.items():
result += "%s@... | gpl-2.0 | -1,133,777,531,886,321,800 | 21.137931 | 116 | 0.508567 | false | 3.21 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.