repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
sdcharle/brat | app/forms.py | 1 | 1692 | from flask.ext.wtf import Form
from wtforms import TextField, BooleanField, TextAreaField
from wtforms.validators import Required, Length
from models import User
class PostForm(Form):
post = TextField('post', validators = [Required()])
class LoginForm(Form):
openid = TextField('openid', validators = [Required... | bsd-3-clause | -5,981,637,791,839,527,000 | 40.292683 | 136 | 0.654255 | false |
fcurella/django-fakery | django_fakery/field_mappings.py | 1 | 6030 | import sys
from collections import OrderedDict
from typing import Any, Tuple
from django.conf import settings
from django.db import models
from django.utils import timezone
from . import fakes
from .compat import HAS_GEOS, HAS_PSYCOPG2
STRING_FIELDS = (
models.CharField,
models.TextField,
) # type: Tuple[A... | mit | -5,350,264,565,698,461,000 | 32.876404 | 86 | 0.521891 | false |
bjornwallner/proq2-server | apps/modeller9v8/modlib/modeller/saxsdata.py | 1 | 17392 | """Classes to handle SAXS (Small Angle X-ray Scattering) data"""
import _modeller
from modeller.util.modobject import modobject
from modeller.util import modlist, array
__docformat__ = "epytext en"
class SAXSList(modlist.LinkList):
"""A list of L{saxsdata} objects"""
def __init__(self, edat):
self.__... | gpl-3.0 | -8,359,119,961,480,063,000 | 43.824742 | 112 | 0.570607 | false |
APC524/tsap | tsap/cluster.py | 1 | 8181 |
import numpy as np
from scipy.cluster.hierarchy import linkage, fcluster
from scipy.spatial.distance import pdist, squareform
import scipy.linalg as Linalg
from scipy.stats import multivariate_normal as mvn
class Cluster(object):
def __init__(self, X):
"""Return a new object to cluster data based on sele... | gpl-3.0 | 5,548,100,727,968,990,000 | 35.199115 | 133 | 0.569124 | false |
i3visio/osrframework | osrframework/domains/geographic_tld.py | 1 | 2833 | # !/usr/bin/python
# -*- coding: utf-8 -*-
#
##################################################################################
#
# This program is part of OSRFramework. You can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, ... | agpl-3.0 | 2,706,459,710,472,871,400 | 35.701299 | 82 | 0.580679 | false |
tensorflow/ranking | tensorflow_ranking/python/metrics.py | 1 | 27729 | # Copyright 2021 The TensorFlow Ranking Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | -822,287,671,420,614,300 | 40.20208 | 80 | 0.662664 | false |
GiulioDenardi/constrained-kmeans | constrainedKMeans.py | 1 | 7768 | #!/usr/bin/python
# -*- coding: utf-8 -*-
from __future__ import print_function
import random as rand;
import math;
from sets import Set;
import copy;
import numpy as np;
import itertools;
## mlCons / dlCons structure: [(instance, instance), ... (instance, instance)]
## instance / point structure: Set(attr1, attr2...... | apache-2.0 | -6,149,740,040,443,396,000 | 36.331731 | 117 | 0.565688 | false |
all-of-us/raw-data-repository | tests/cron_job_tests/test_enrollment_status_checking.py | 1 | 3062 | from datetime import datetime, timedelta
from rdr_service.participant_enums import EnrollmentStatus, PhysicalMeasurementsStatus, QuestionnaireStatus, \
SampleStatus
from tests.helpers.unittest_base import BaseTestCase
class CheckEnrollmentStatusTest(BaseTestCase):
"""Tests checking enrollment status of parti... | bsd-3-clause | -156,174,767,499,015,650 | 44.029412 | 111 | 0.684847 | false |
pycroscopy/pycroscopy | pycroscopy/processing/histogram.py | 1 | 3539 | """
Utilities for building 2D histograms of spectroscopic data
Created on Mar 1, 2016
@author: Chris Smith -- cmsith55@utk.edu
"""
from __future__ import division, print_function, absolute_import
import numpy as np
import sys
if sys.version_info.major == 3 and sys.version_info.minor >= 6:
disable_histogram = Tr... | mit | 4,812,204,602,772,528,000 | 26.015267 | 118 | 0.598757 | false |
fatty-arbuckle/crypto.challenges | set_1/challenge_5.py | 1 | 1143 | #! /usr/bin/python
import string
import sys
INPUT="Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal"
XOR_STRING="ICE"
EXPECT="0b3637272a2b2e63622c2e69692a23693a2a3c6324202d623d63343c2a26226324272765272a282b2f20430a652e2c652a3124333a653e2b2027630c692b20283165286326302e27282f"
# hex string ge... | mit | 4,259,251,163,925,024,000 | 24.4 | 157 | 0.745407 | false |
Orange-OpenSource/vespa-core | vespa/agent_connections.py | 1 | 3930 | # -*- coding: utf-8 -*-
#
# Module name: agent_connections.py
# Version: 1.0
# Created: 29/04/2014 by Aurélien Wailly <aurelien.wailly@orange.com>
#
# Copyright (C) 2010-2014 Orange
#
# This file is part of VESPA.
#
# VESPA is free software: you can redistribute it and/or modify
# it under the terms of the GNU ... | gpl-3.0 | -2,598,357,917,571,393,500 | 27.889706 | 79 | 0.549758 | false |
dmend/PyKMIP | kmip/demos/pie/destroy.py | 1 | 1695 | # Copyright (c) 2015 The Johns Hopkins University/Applied Physics Laboratory
# 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/LICEN... | apache-2.0 | 7,276,500,772,121,612,000 | 32.235294 | 76 | 0.684366 | false |
jerabaul29/python_huffman | test/test_example_build_tree.py | 1 | 3381 | from __future__ import print_function
from bitarray import bitarray
import pyhuffman.pyhuffman as pyhuffman
"""
A test case that can also be used as example, about how to build trees.
"""
def test_valid_dicts():
# example of data: frequencies in the alphabet for typical english text
# this data is from: http... | mit | 3,625,160,815,430,537,000 | 38.776471 | 127 | 0.371192 | false |
jbradberry/django-turn-generation | turngeneration/tests/test_tasks.py | 1 | 1968 | from django.test import TestCase
from mock import patch
from sample_app.models import TestRealm
from ..models import Generator, GenerationTime, Ready, Pause
class TimedGenerationTestCase(TestCase):
def setUp(self):
from .. import tasks
self.timed_generation = tasks.timed_generation
self.... | mit | 7,976,091,698,914,318,000 | 30.741935 | 82 | 0.664126 | false |
MSFTOSSMgmt/WPSDSCLinux | Providers/Scripts/2.4x-2.5x/Scripts/nxFile.py | 2 | 46910 | #!/usr/bin/env python
# ====================================
# Copyright (c) Microsoft Corporation. All rights reserved.
# See license.txt for license information.
# ====================================
import os
import sys
import pwd
import shutil
import grp
import urllib2
import time
import imp
protocol = imp.load_so... | mit | 2,383,727,069,204,466,700 | 37.015397 | 169 | 0.586826 | false |
hankcs/HanLP | hanlp/components/parsers/alg.py | 1 | 29627 | # MIT License
#
# Copyright (c) 2020 Yu Zhang
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, pub... | apache-2.0 | -5,404,664,505,970,615,000 | 37.931669 | 120 | 0.52972 | false |
fingeronthebutton/RIDE | src/robotide/contrib/testrunner/runprofiles.py | 1 | 11956 | # Copyright 2010 Orbitz WorldWide
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writ... | apache-2.0 | 2,019,078,855,946,588,400 | 36.246106 | 79 | 0.632151 | false |
mafrosis/flask-security | flask_security/forms.py | 1 | 9697 | # -*- coding: utf-8 -*-
"""
flask_security.forms
~~~~~~~~~~~~~~~~~~~~
Flask-Security forms module
:copyright: (c) 2012 by Matt Wright.
:copyright: (c) 2017 by CERN.
:license: MIT, see LICENSE for more details.
"""
import inspect
from flask import Markup, current_app, flash, request
from flas... | mit | -6,662,313,277,829,583,000 | 31.649832 | 79 | 0.64587 | false |
mattsmart/biomodels | oncogenesis_dynamics/stability_diagram.py | 1 | 14631 | import matplotlib.pyplot as plt
import numpy as np
from matplotlib.colors import LinearSegmentedColormap
from os import sep
from constants import PARAMS_ID, PARAMS_ID_INV, STATES_ID_INV, OUTPUT_DIR, Z_TO_COLOUR_BISTABLE_WIDE, Z_TO_COLOUR_ORIG
from data_io import write_matrix_data_and_idx_vals, read_matrix_data_and_idx... | mit | -1,257,420,118,555,779,300 | 46.970492 | 155 | 0.623197 | false |
bennymartinson/Oort | docs/quickstart/3_timing.py | 1 | 3826 | """ Quickstart guide 3: Timing"""
from oort import *
control_rate(15000)
print_off()
# Oort offers an alternative, wait-based approach to timing inspired by,
# but departing from languages like ChucK and Common Music. Oort's schedule
# module uses a system of threads and locks which reorganizes the operation
# of... | gpl-3.0 | -6,791,078,751,666,071,000 | 37.656566 | 77 | 0.7138 | false |
tensorflow/ecosystem | distribution_strategy/tf_std_server.py | 1 | 1269 | # Copyright 2018 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 6,705,573,256,972,178,000 | 35.257143 | 80 | 0.700552 | false |
COL-IU/XLSearch | library/filterByFDR.py | 1 | 3141 |
def filterByFDR(tophits, cutoff):
tophits = sorted(tophits, key = lambda x : x[4], reverse = True)
intraCumCount = []
interCumCount = []
tardecCumCount = []
decdecCumCount = []
intraCount = 0
interCount = 0
tardecCount = 0
decdecCount = 0
xlType = []
for i in range(len(tophits)):
pro1 = tophits[i][2][... | mit | -7,691,671,662,447,833,000 | 25.846154 | 136 | 0.596944 | false |
cloudify-cosmo/cloudify-manager | rest-service/manager_rest/rest/resources_v3_1/filters.py | 1 | 8528 | from flask import request
from cloudify.models_states import VisibilityState
from manager_rest import manager_exceptions
from manager_rest.security import SecuredResource
from manager_rest.constants import RESERVED_PREFIX
from manager_rest.utils import get_formatted_timestamp
from manager_rest.rest import rest_decora... | apache-2.0 | -4,878,345,227,776,293,000 | 38.299539 | 78 | 0.634615 | false |
lamter/slaveo | scout/base.py | 1 | 10394 | # coding: utf-8
import logging
import os
import datetime as dt
from collections import OrderedDict
import pandas as pd
import tushare as ts
import numpy as np
from mymath import *
class BaseScout:
"""
基础策略实例
1. 有监控标的本身,如股票,期货等,直接交易其标的自身
2. 有监控指数,则要交易其对应的证券
初始化
>>> setting = {"path": "scout... | gpl-3.0 | -2,856,707,596,434,818,000 | 27.137072 | 113 | 0.531001 | false |
XVMX/vmbot | vmbot/__main__.py | 1 | 1292 | # coding: utf-8
# Copyright (C) 2010 Arthur Furlan <afurlan@afurlan.org>
# Copyright (c) 2013 Sascha J�ngling <sjuengling@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either ver... | gpl-3.0 | 5,210,573,513,656,405,000 | 32.076923 | 86 | 0.686822 | false |
RickMohr/nyc-trees | src/nyc_trees/apps/survey/urls/blockface.py | 1 | 2285 | # -*- coding: utf-8 -*-
from __future__ import print_function
from __future__ import unicode_literals
from __future__ import division
from django.conf.urls import patterns, url
from apps.survey.routes import (reserve_blockface_page, cancel_reservation,
reserve_blockfaces, reservations,... | apache-2.0 | -299,436,547,300,556,100 | 37.728814 | 78 | 0.621444 | false |
fritzo/distributions | setup.py | 1 | 6121 | # Copyright (c) 2014, Salesforce.com, Inc. 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 list of conditions... | bsd-3-clause | 7,079,599,730,979,026,000 | 27.872642 | 78 | 0.643196 | false |
morta-code/YAX | yax/YAXReader.py | 1 | 10807 | import re
import inspect
from .condition import Condition
import warnings
__author__ = 'Móréh, Tamás'
# Type of compiled regexes
RE = type(re.compile(""))
def element_to_string(element, encoding="unicode", method="xml", **kwargs):
return YAXReader.etree.tostring(element, encoding=encoding, method=method, **kwa... | gpl-3.0 | -1,334,978,849,130,943,200 | 36.741259 | 98 | 0.560311 | false |
DataDog/integrations-core | tokumx/datadog_checks/tokumx/vendor/pymongo/thread_util.py | 1 | 4017 | # Copyright 2012-2015 MongoDB, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writin... | bsd-3-clause | 4,264,808,422,550,712,300 | 29.664122 | 78 | 0.630819 | false |
TeamSWAP/swap | src/overlays/raid_mechanics/tfb.py | 1 | 2196 | #
# Copyright 2013 TeamSWAP
#
# 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, so... | apache-2.0 | 6,516,623,201,248,352,000 | 28.675676 | 140 | 0.623862 | false |
noironetworks/apic-ml2-driver | apic_ml2/neutron/db/migration/alembic_migrations/versions/5d1c1f1d1282_rename_tenant_id.py | 1 | 1198 | # 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
# d... | apache-2.0 | 8,279,858,757,475,654,000 | 30.526316 | 78 | 0.680301 | false |
Urinx/Project_Euler_Answers | 123.py | 1 | 1544 | #!/usr/bin/env python
#coding:utf-8
"""
Prime square remainders
Let pn be the nth prime: 2, 3, 5, 7, 11, ..., and let r be the remainder when (pn−1)n + (pn+1)n is divided by pn2.
For example, when n = 3, p3 = 5, and 43 + 63 = 280 ≡ 5 mod 25.
The least value of n for which the remainder first exceeds 109 is 7037.
Find... | gpl-2.0 | 641,334,964,325,962,500 | 23.460317 | 114 | 0.545455 | false |
costadorione/purestream | servers/idowatch.py | 1 | 2261 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# streamondemand - XBMC Plugin
# Conector para idowatch
# http://www.mimediacenter.info/foro/viewforum.php?f=36
#------------------------------------------------------------
import re
from core import jsunpack
from core import logge... | gpl-3.0 | -2,722,581,283,899,343,000 | 35.451613 | 130 | 0.60531 | false |
scavallero/mydomus | mydomus.py | 1 | 3442 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# MyDomus
# Home Domotic Service
# Copyright (c) 2016 Salvatore Cavallero (salvatoe.cavallero@gmail.com)
# https://github.com/scavallero/mydomus
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General ... | gpl-3.0 | 3,706,829,008,748,207,000 | 28.169492 | 106 | 0.693492 | false |
ak212/python-hockey-rss | retry_decorator.py | 1 | 1529 | from functools import wraps
import time
__author__ = "Aaron Koeppel"
__version__ = 1.0
def retry(ExceptionToCheck, logger, tries=4, delay=3, backoff=2):
"""Retry calling the decorated function using an exponential backoff.
http://www.saltycrane.com/blog/2009/11/trying-out-retry-decorator-python/
origina... | mit | -6,569,519,518,677,940,000 | 30.854167 | 76 | 0.608895 | false |
phac-nml/irida-miseq-uploader | API/directorymonitor.py | 1 | 4383 | import os
import logging
import time
import threading
from wx.lib.pubsub import pub
from API.pubsub import send_message
from API.directoryscanner import find_runs_in_directory
toMonitor = True
TIMEBETWEENMONITOR = 120
class DirectoryMonitorTopics(object):
"""Topics for monitoring directories for new runs."""
... | apache-2.0 | -3,668,619,201,657,861,000 | 34.346774 | 131 | 0.680356 | false |
jamiebull1/transport-carbon | transport_carbon/make_db.py | 1 | 1496 | '''
Created on 16 Jan 2014
@author: Jamie
'''
import sqlite3 as lite
import pandas
import pandas.io.sql as pd_lite
''' Create the stations database '''
with lite.connect("./db/uk_stations.db") as con:
cur = con.cursor()
cur.execute("DROP TABLE IF EXISTS Stations")
stations = pandas.read_csv('./tables... | mit | -5,008,361,842,240,347,000 | 33.790698 | 85 | 0.643048 | false |
repotvsupertuga/tvsupertuga.repository | script.module.streamtvsupertuga/lib/resources/lib/sources/en_de/rapidmoviez.py | 1 | 6433 | # -*- coding: utf-8 -*-
'''
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in... | gpl-2.0 | 8,336,147,231,519,264,000 | 39.20625 | 161 | 0.524794 | false |
openprocurement/openprocurement.auction | openprocurement/auction/tests/test_databridge.py | 1 | 14374 | # -*- coding: utf-8 -*-
# TODO: test do_until_success function
from gevent import monkey
monkey.patch_all()
import logging
from mock import MagicMock, call
import pytest
from openprocurement.auction.databridge import AuctionsDataBridge
from openprocurement.auction.utils import FeedItem
from openprocurement.auction.tes... | apache-2.0 | 7,674,672,193,438,880,000 | 40.543353 | 133 | 0.60039 | false |
thylong/cabu | cabu/utils/cookies.py | 1 | 1593 | # -*- coding: utf-8 -*-
class CookieStorage(object):
"""Interface between Cookies and Database.
Args:
db (Database): The Database class instance to wrap.
"""
def __init__(self, db):
self.db = db
def get(self, key):
"""Get the value of the given cookie key.
Args:... | bsd-3-clause | -702,076,479,647,128,800 | 27.446429 | 92 | 0.557439 | false |
orviz/ooi | ooi/tests/middleware/test_compute_controller.py | 1 | 13660 | # -*- coding: utf-8 -*-
# Copyright 2015 Spanish National Research Council
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -7,797,839,068,062,063,000 | 36.119565 | 79 | 0.502635 | false |
david-wm-sanders/rwrtrack | rwrtrack/sum.py | 1 | 5245 | """Provides functionality for calculating sums from statistics data."""
from sqlalchemy.sql import func, and_
from sqlalchemy.orm.query import Query
from .db import sesh
from .record import Record, RA, RB
from .difference import Diff
from .filter import filter_
from .constants import EARTH_EQUAT_CIRC
class Sum:
... | mit | 1,729,537,021,495,413,200 | 47.564815 | 112 | 0.691134 | false |
googleapis/python-compute | google/cloud/compute_v1/services/global_operations/transports/base.py | 1 | 7885 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,184,622,160,919,310,000 | 35.336406 | 103 | 0.636271 | false |
Onirik79/aaritmud | data/proto_items/flora/_flora_item_mirtillo-rosso-01-frutto.py | 1 | 14309 | # -*- coding: utf-8 -*-
#= DESCRIZIONE =================================================================
# SCRIPT CESTINATO (prototipo delle plants)
# mirtilli rossi
# semplice progetto d'ecosistema su mirtillo rosso
# il DROP in locazioni opportune del seme di mirtillo rosso
# origina una sequenza di callLater che ... | gpl-2.0 | 5,973,117,736,689,592,000 | 33.580097 | 124 | 0.66035 | false |
flavour/iscram | controllers/hrm.py | 1 | 38417 | # -*- coding: utf-8 -*-
"""
Human Resource Management
"""
module = request.controller
resourcename = request.function
if module not in deployment_settings.modules:
raise HTTP(404, body="Module disabled: %s" % module)
s3db.hrm_vars(module)
# ==================================================================... | mit | 7,011,889,472,696,497,000 | 35.657443 | 134 | 0.493089 | false |
jvce92/web-tdd | superlists/settings.py | 1 | 2740 | """
Django settings for superlists project.
Generated by 'django-admin startproject' using Django 1.8.
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 pat... | gpl-3.0 | 1,074,121,401,098,659,500 | 25.346154 | 71 | 0.690146 | false |
085astatine/togetter | togetter/webpage.py | 1 | 2064 | # -*- coding:utf-8 -*-
import logging
import pathlib
from typing import Union
import lxml.html
import requests
class WebPage:
def __init__(
self,
url: str,
session: requests.sessions.Session = None,
params: dict = None,
logger: logg... | mit | -6,903,450,613,005,605,000 | 29.352941 | 78 | 0.580426 | false |
memsql/memsql-mesos | memsql_framework/util/json.py | 1 | 1725 | import simplejson
# declare direct exports here
loads = simplejson.loads
JSONDecodeError = simplejson.JSONDecodeError
def _simplejson_datetime_serializer(obj):
""" Designed to be passed as simplejson.dumps default serializer.
Serializes dates and datetimes to ISO strings.
"""
if hasattr(obj, 'isoform... | apache-2.0 | 6,660,841,081,443,745,000 | 34.204082 | 111 | 0.675942 | false |
arthurdejong/python-stdnum | stdnum/py/ruc.py | 1 | 2920 | # rut.py - functions for handling Paraguay RUC numbers
# coding: utf-8
#
# Copyright (C) 2019 Leandro Regueiro
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of th... | lgpl-2.1 | -7,021,451,548,509,538,000 | 27.891089 | 75 | 0.705278 | false |
persandstrom/home-assistant | homeassistant/components/config/automation.py | 3 | 1986 | """Provide configuration end points for Automations."""
import asyncio
from collections import OrderedDict
import uuid
from homeassistant.const import CONF_ID
from homeassistant.components.config import EditIdBasedConfigView
from homeassistant.components.automation import (
PLATFORM_SCHEMA, DOMAIN, async_reload)
i... | apache-2.0 | 4,748,439,277,051,262,000 | 33.241379 | 78 | 0.639476 | false |
idosekely/python-lessons | lesson_5/server.py | 1 | 1684 | import socket
import sys
__author__ = 'sekely'
class SimpleServer(object):
def __init__(self, addr='localhost', port=50000, buf=1024):
self.buf = buf
self.server_address = (addr, port)
print('setting up server up on %s port %s' % self.server_address)
self._bind()
def _bind(sel... | mit | 4,789,459,424,898,749,000 | 29.071429 | 73 | 0.529097 | false |
RPGOne/Skynet | imbalanced-learn-master/imblearn/under_sampling/tests/test_neighbourhood_cleaning_rule.py | 1 | 3601 | """Test the module neighbourhood cleaning rule."""
from __future__ import print_function
import os
import numpy as np
from numpy.testing import assert_raises
from numpy.testing import assert_equal
from numpy.testing import assert_array_equal
from numpy.testing import assert_warns
from sklearn.datasets import make_cl... | bsd-3-clause | 2,330,156,791,655,878,700 | 30.587719 | 79 | 0.672036 | false |
Mellthas/quodlibet | quodlibet/quodlibet/ext/events/trayicon/__init__.py | 1 | 2461 | # Copyright 2004-2006 Joe Wreschnig, Michael Urman, Iñigo Serna
# 2012 Christoph Reiter
# 2013 Nick Boultbee
#
# 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 ... | gpl-2.0 | 5,917,764,536,973,619,000 | 30.139241 | 74 | 0.657317 | false |
moneymaker365/plugin.video.ustvvod | resources/lib/stations/pbskids.py | 1 | 8311 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import common
import connection
import m3u8
import re
import simplejson
import sys
import urllib
import ustvpaths
import xbmc
import xbmcaddon
import xbmcgui
import xbmcplugin
addon = xbmcaddon.Addon()
pluginHandle = int (sys.argv[1])
SITE = "pbskids"
NAME = "PBS Kids"
DESCRI... | gpl-2.0 | -609,971,110,751,474,700 | 34.669528 | 213 | 0.670316 | false |
samstav/requests-chef | requests_chef/__about__.py | 1 | 1183 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the... | apache-2.0 | 4,353,036,945,659,839,500 | 32.8 | 74 | 0.664413 | false |
m-weigand/ccd_tools | src/dd_single/characterisation/TooMuchTimeReg/plot.py | 1 | 3707 | #!/usr/bin/python
from plot_settings import *
import numpy as np
import sip_formats.convert as SC
def plot_specs(ax, result_dir, specs):
# load data
f = np.loadtxt(result_dir + '/frequencies.dat')
response = np.loadtxt(result_dir + '/f.dat')
data = np.loadtxt(result_dir + '/data.dat')
data_format ... | gpl-3.0 | -5,896,570,371,492,413,000 | 33.324074 | 79 | 0.580793 | false |
JeffRoy/mi-dataset | mi/dataset/driver/wc_wm/cspp/wc_wm_cspp_telemetered_driver.py | 1 | 2039 | #!/usr/bin/env python
"""
@package mi.dataset.driver.wc_wm.cspp
@file mi/dataset/driver/wc_wm/cspp/wc_wm_cspp_telemetered_driver.py
@author Jeff Roy
@brief Driver for the wc_wm_cspp instrument
Release notes:
Initial Release
"""
from mi.dataset.dataset_parser import DataSetDriverConfigKeys
from mi.dataset.dataset_dr... | bsd-2-clause | -9,146,377,210,328,459,000 | 29.893939 | 96 | 0.718489 | false |
LiamBao/Spiders | tmall&taobao/Tmall_Thread_Only(Keyword & Shop.py | 1 | 23082 | # -*- coding: utf-8 -*-
# __author__ =='liam'
import re
import requests
import math
import time
import datetime
from lxml import etree
import xlsxwriter as wx
import random
import os
import json
import ctypes
import win32ui
STD_INPUT_HANDLE = -10
STD_OUTPUT_HANDLE= -11
STD_ERROR_HANDLE = -12
FOREGROUND_BLACK... | gpl-3.0 | -1,888,404,789,537,275,400 | 32.985141 | 625 | 0.559549 | false |
BertrandBordage/django-cachalot | cachalot/api.py | 1 | 5217 | # coding: utf-8
from __future__ import unicode_literals
from django.apps import apps
from django.conf import settings
from django.db import connections
from django.utils.six import string_types
from .cache import cachalot_caches
from .settings import cachalot_settings
from .signals import post_invalidation
from .tra... | bsd-3-clause | -5,263,881,530,152,889,000 | 39.757813 | 79 | 0.672609 | false |
vakaras/nmadb-session-reg | src/nmadb_session_reg/models/section_based.py | 1 | 1388 | from django.db import models
from django.utils.translation import ugettext_lazy as _
class SessionGroup(models.Model):
""" The session group. In most cases it will be section.
"""
title = models.CharField(
max_length=80,
verbose_name=_(u'title'),
unique=True,
... | lgpl-3.0 | -4,476,336,846,390,657,000 | 26.215686 | 66 | 0.575648 | false |
LarsSchy/SMAC-M | chart-installation/cache_monitor/cache_monitor.py | 1 | 1824 | #!/usr/bin/python2
import os
import argparse
import subprocess
import shutil
import time
def parse_arguments():
parser = argparse.ArgumentParser(
prog="cache_monitor.py", description="This program monitors a directory and clears it if the size is above a certain limit")
parser.add_argument("path", n... | mit | 2,335,487,726,664,124,400 | 31.571429 | 185 | 0.612939 | false |
fieldsofview/sim-city-client | tests/test_management.py | 1 | 1149 | # SIM-CITY client
#
# Copyright 2015 Joris Borgdorff <j.borgdorff@esciencecenter.nl>
#
# 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
#
# Unl... | apache-2.0 | -1,536,535,285,818,314,000 | 33.818182 | 74 | 0.718016 | false |
spjmurray/openstack-sentinel | sentinel/api/controllers/image/v2/images.py | 1 | 1414 | # Copyright 2017 DataCentred Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 8,207,387,003,058,586,000 | 31.136364 | 78 | 0.695898 | false |
sentinelsat/sentinelsat | setup.py | 1 | 1824 | import re
from io import open
from setuptools import find_packages, setup
# Get the long description from the relevant file
with open("README.rst", encoding="utf-8") as f:
long_description = f.read()
with open("sentinelsat/__init__.py", encoding="utf-8") as f:
version = re.search(r'__version__\s*=\s*"(\S+)"'... | gpl-3.0 | -192,730,876,689,257,060 | 31 | 86 | 0.583882 | false |
bgribble/mfp | mfp/gui/processor_element.py | 1 | 6854 | #! /usr/bin/env python
'''
processor_element.py
A patch element corresponding to a signal or control processor
'''
from gi.repository import Clutter
import cairo
from .patch_element import PatchElement
from .colordb import ColorDB
from .modes.label_edit import LabelEditMode
from ..gui_main import MFPGUI
from mfp impor... | gpl-2.0 | -4,675,372,229,137,122,000 | 29.061404 | 88 | 0.568573 | false |
nikita-sunwind/vizhu | server/test/test_export_data.py | 1 | 3014 | # pylint: disable=no-self-use,no-member
'''Export event data to different formats
'''
from csv import DictReader
from io import BytesIO
import numpy as np
from pytest import mark
from test.utils import EVENTS_URL, BAD_DATA, COMPOUND_DATA, N_TEST_EVENTS
@mark.usefixtures('fx_load_fixtures')
class TestExportData:
... | mit | 2,937,678,873,745,961,500 | 26.651376 | 77 | 0.567684 | false |
openstack/os-net-config | os_net_config/impl_ifcfg.py | 1 | 86208 | # -*- coding: utf-8 -*-
# Copyright 2014-2015 Red Hat, 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 applica... | apache-2.0 | -6,009,259,872,810,658,000 | 44.492348 | 79 | 0.551933 | false |
fcecin/infinitum | share/qt/extract_strings_qt.py | 1 | 2538 | #!/usr/bin/python
'''
Extract _("...") strings for translation and convert to Qt stringdefs so that
they can be picked up by Qt linguist.
'''
from __future__ import division,print_function,unicode_literals
from subprocess import Popen, PIPE
import glob
import operator
import os
import sys
OUT_CPP="qt/infinitumstrings.... | mit | -8,116,536,709,440,369,000 | 28.172414 | 108 | 0.613869 | false |
OpenBfS/dokpool-plone | Plone/src/elan.sitrep/elan/sitrep/portlets/srmoduleedit.py | 1 | 1625 | # -*- coding: utf-8 -*-
from elan.sitrep import DocpoolMessageFactory as _
from plone.app.portlets.portlets import base
from plone.portlets.interfaces import IPortletDataProvider
from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from zope.interface import implementer
# This interface defines th... | gpl-3.0 | 2,800,916,112,963,199,500 | 25.639344 | 77 | 0.721846 | false |
egbertbouman/tribler-g | Tribler/Test/Core/Subtitles/MetadataDomainObjects/test_MetadataDTO.py | 1 | 7047 | # Written by Andrea Reale
# see LICENSE.txt for license information
import unittest
from Tribler.Core.Subtitles.MetadataDomainObjects.MetadataDTO import MetadataDTO
import Tribler.Core.Subtitles.MetadataDomainObjects.MetadataDTO as MDUtil
from Tribler.Core.Overlay.permid import generate_keypair
from Tribler.Core.Cache... | lgpl-2.1 | 3,202,050,947,913,541,000 | 35.703125 | 151 | 0.645097 | false |
srusskih/SublimeJEDI | dependencies/jedi/inference/gradual/typing.py | 1 | 17752 | """
We need to somehow work with the typing objects. Since the typing objects are
pretty bare we need to add all the Jedi customizations to make them work as
values.
This file deals with all the typing.py cases.
"""
import itertools
from jedi._compatibility import unicode
from jedi import debug
from jedi.inference.co... | mit | 1,786,058,261,746,276,600 | 36.294118 | 99 | 0.603369 | false |
ZeroCater/Eyrie | interface/migrations/0001_initial.py | 1 | 1650 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-04-14 21:17
from __future__ import unicode_literals
import django.contrib.auth.models
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', ... | mit | 629,217,487,608,357,400 | 31.352941 | 129 | 0.533939 | false |
jeremiahyan/odoo | addons/crm/tests/test_crm_pls.py | 1 | 31898 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import timedelta
from odoo import tools
from odoo.addons.mail.tests.common import mail_new_test_user
from odoo.fields import Date
from odoo.tests import Form, tagged, users
from odoo.tests.common import Tr... | gpl-3.0 | 4,851,082,227,272,748,000 | 55.85918 | 179 | 0.618534 | false |
GFZ-Centre-for-Early-Warning/REM_RRVS | webapp/views.py | 1 | 11255 | '''
---------------------------
views.py
---------------------------
Created on 24.04.2015
Last modified on 15.01.2016
Author: Marc Wieland, Michael Haas
Description: The main views file setting up the flask application layout, defining all routes
----
'''
import flask
from webapp import app, db
from models import ... | bsd-3-clause | 3,528,388,904,670,477,000 | 41.794677 | 201 | 0.616526 | false |
mivade/qCamera | viewer/ring_buffer_viewer.py | 1 | 1959 | """Ring buffer viewer"""
from qcamera.ring_buffer import RingBuffer
from PyQt4 import QtGui
from guiqwt.builder import make
from ui_ring_buffer_viewer import Ui_RingBufferViewer
from util import get_image_item, get_rect_item
class RingBufferViewer(QtGui.QDialog, Ui_RingBufferViewer):
def __init__(self, rbuffer, ... | bsd-2-clause | -6,084,053,276,708,281,000 | 32.220339 | 93 | 0.614599 | false |
EduPepperPDTesting/pepper2013-testing | lms/djangoapps/reportlab/lib/abag.py | 1 | 1171 | #Copyright ReportLab Europe Ltd. 2000-2016
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/abag.py
__version__='3.3.0'
__doc__='''Data structure to hold a collection of attributes, used by styles.'''
class ABag:
"""
'Attrib... | agpl-3.0 | 7,076,339,163,037,442,000 | 30.527778 | 100 | 0.557643 | false |
raony/pugpexxix | blackart.py | 1 | 3057 | # Hijacking third party libs
# now things are going to get serious.
# imagine you need to put some code inside a third party lib. Let's say
# it is some logging feature so you can understand some wacky behavior.
# you don't know where this will lead you, and you are exploring
# alternatives to learn more about the c... | gpl-2.0 | -2,859,481,613,356,873,000 | 31.870968 | 87 | 0.636572 | false |
lebauce/artub | projectproperties.py | 1 | 2568 | # Glumol - An adventure game creator
# Copyright (C) 1998-2008 Sylvain Baubeau & Alexis Contour
# This file is part of Glumol.
# Glumol 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 th... | gpl-2.0 | 1,089,999,112,614,734,500 | 39.761905 | 91 | 0.641745 | false |
saifulazad/myApp | app/auth.py | 1 | 7116 | import os
from flask import Flask, url_for, redirect, render_template, request
from flask_sqlalchemy import SQLAlchemy
from wtforms import form, fields, validators
import flask_admin as admin
import flask_login as login
from flask_admin.contrib import sqla
from flask_admin import helpers, expose
from werkzeug.s... | bsd-3-clause | 609,638,215,565,379,500 | 30.651376 | 129 | 0.621979 | false |
davidsoncolin/IMS | GCore/State.py | 1 | 12941 | #!/usr/bin/env python
import IO
def freeze(v): return str(IO.encode(v))
def thaw(s): ret,e = IO.decode(s); assert(e==len(s)); return ret
g_state = {}
g_dirty = set() # keys that have been modified
from re import compile as re_compile
g_reLastNum = re_compile(r'(?:[^\d]*(\d+)[^\d]*)+')
g_undos,g_redos,g_undo = [],[]... | mit | 7,403,516,768,357,741,000 | 30.640587 | 126 | 0.653582 | false |
flask-restful/flask-restful | tests/test_accept.py | 1 | 7700 | import unittest
from flask import Flask
import flask_restful
from werkzeug import exceptions
class AcceptTestCase(unittest.TestCase):
def test_accept_default_application_json(self):
class Foo(flask_restful.Resource):
def get(self):
return "data"
app = Flask(__name__... | bsd-3-clause | 4,420,775,435,837,858,000 | 31.083333 | 119 | 0.574026 | false |
Agnishom/agnishomsudoku | sudoku-solver.py | 1 | 6193 | #!/usr/bin/env python
def initiate():
box.append([0, 1, 2, 9, 10, 11, 18, 19, 20])
box.append([3, 4, 5, 12, 13, 14, 21, 22, 23])
box.append([6, 7, 8, 15, 16, 17, 24, 25, 26])
box.append([27, 28, 29, 36, 37, 38, 45, 46, 47])
box.append([30, 31, 32, 39, 40, 41, 48, 49, 50])
box.append([33, ... | mit | 6,588,004,776,784,848,000 | 36.949686 | 166 | 0.550783 | false |
richbrowne/f5-cccl | f5_cccl/test/test_exceptions.py | 1 | 3099 | #!/usr/bin/env python
# Copyright 2017 F5 Networks Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 1,642,826,834,951,448,000 | 27.431193 | 74 | 0.690223 | false |
rr-/drill | drillsrs/cmd/list_tags.py | 1 | 1333 | import argparse
from typing import Any
import sqlalchemy as sa
from drillsrs import db, util
from drillsrs.cmd.command_base import CommandBase
def _print_single_tag(session: Any, index: int, tag: db.Tag) -> None:
tag_usages = (
session.query(sa.func.count(db.CardTag.tag_id))
.filter(db.CardTag.t... | mit | 5,066,354,452,943,796,000 | 28.622222 | 77 | 0.581395 | false |
xuleiboy1234/autoTitle | tensorflow/tensorflow/python/eager/tensor_node.py | 1 | 8327 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | mit | 6,730,232,823,244,881,000 | 28.528369 | 86 | 0.68416 | false |
utah-scs/RAMCloud | scripts/clusterperf.py | 1 | 43425 | #!/usr/bin/env python
# Copyright (c) 2011-2017 Stanford University
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, provided that the above
# copyright notice and this permission notice appear in all copies.
#
# THE SOFTWARE IS PROVIDED "AS IS"... | isc | -7,458,043,584,022,874,000 | 41.783251 | 86 | 0.59468 | false |
sarielsaz/sarielsaz | test/functional/txn_clone.py | 1 | 7604 | #!/usr/bin/env python3
# Copyright (c) 2014-2016 The Sarielsaz Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test the wallet accounts properly when there are cloned transactions with malleated scriptsigs."""
f... | mit | 991,336,729,252,938,200 | 48.058065 | 111 | 0.595476 | false |
kluge-iitk/Project-Euler | 58_spiral_primes.py | 1 | 1635 | """
Problem 58:
Starting with 1 and spiralling anticlockwise in the following way,
a square spiral with side length 7 is formed.
37 36 35 34 33 32 31
38 17 16 15 14 13 30
39 18 5 4 3 12 29
40 19 6 1 2 11 28
41 20 7 8 9 10 27
42 21 22 23 24 25 26
43 44 45 46 47 48 49
It is interesting to note that the odd sq... | mit | 5,847,286,381,652,083,000 | 26.677966 | 81 | 0.652786 | false |
shakamunyi/tensorflow | tensorflow/contrib/learn/python/learn/tests/saver_test.py | 1 | 4093 | # Copyright 2016 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 724,406,720,324,615,200 | 39.127451 | 80 | 0.664794 | false |
thetreerat/WaterPump | WaterPumps/leds.py | 1 | 4201 | # Author: Harold Clark
# Copyright Harold Clark 2017
#
try:
import lib.uasyncio as asyncio
except ImportError:
import uasyncio as asyncio
from utime import time
import machine
from WaterPumps.events import Event
class led(object):
def __init__(self,ledPin=0, name='Not Defined'):
"""Init a single co... | mit | 5,557,994,721,407,910,000 | 33.442623 | 144 | 0.541776 | false |
Scille/parsec-cloud | tests/core/mountpoint/test_file_operations.py | 1 | 3497 | # Parsec Cloud (https://parsec.cloud) Copyright (c) AGPLv3 2016-2021 Scille SAS
import os
import sys
import pytest
from hypothesis.stateful import RuleBasedStateMachine, initialize, rule, run_state_machine_as_test
from hypothesis import strategies as st
# Just an arbitrary value to limit the size of data hypothesis ... | agpl-3.0 | -9,145,865,238,727,756,000 | 34.323232 | 98 | 0.594796 | false |
google/meterstick | confidence_interval_display_test.py | 1 | 20694 | # 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 | -4,961,730,074,671,474,000 | 38.417143 | 80 | 0.543346 | false |
pythonsingapore/pythonsingapore | website/webapps/django/myproject/myproject/tests/mixins.py | 1 | 3801 | """
Generally useful mixins for tests of any project.
This should be open sourced in the future, so it must be project agnostic.
"""
from django.core.urlresolvers import reverse
from myproject.tests.factories import UserFactory
class ViewTestsMixin(object):
"""Mixin that provides commonly tested assertions."""... | mit | 4,344,034,524,574,619,000 | 33.87156 | 79 | 0.622205 | false |
wbkang/rpi-repo | rpiweather/temppressure.py | 1 | 3102 | #!/usr/bin/env python3
import time
import smbus2 as smbus
import logging
import threading
from collections import deque
from rpiweather.sampler import Sampler
from rpiweather.data import insert_data
from rpiweather import config
import rpiweather.data
import datetime
import pytz
logger = logging.getLogger(__name__)
... | mit | -1,262,101,671,438,950,400 | 27.458716 | 79 | 0.591554 | false |
Flamacue/pretix | src/pretix/base/views/metrics.py | 1 | 1363 | import hmac
from django.conf import settings
from django.http import HttpResponse
from .. import metrics
def unauthed_response():
content = "<html><title>Forbidden</title><body>You are not authorized to view this page.</body></html>"
response = HttpResponse(content, content_type="text/html")
response["W... | apache-2.0 | 8,437,268,350,399,311,000 | 29.288889 | 107 | 0.682318 | false |
Julian/home-assistant | homeassistant/components/binary_sensor/homematic.py | 1 | 3515 | """
Support for Homematic binary sensors.
For more details about this platform, please refer to the documentation at
https://home-assistant.io/components/binary_sensor.homematic/
"""
import logging
from homeassistant.const import STATE_UNKNOWN
from homeassistant.components.binary_sensor import BinarySensorDevice
impor... | mit | -9,173,895,971,348,694,000 | 34.15 | 79 | 0.607397 | false |
pyfarm/pyfarm-master | pyfarm/master/user_interface/jobgroups.py | 1 | 11572 | # No shebang line, this module is meant to be imported
#
# Copyright 2015 Ambient Entertainment GmbH & Co. KG
#
# 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/lice... | apache-2.0 | 526,505,934,287,155,460 | 48.033898 | 80 | 0.538714 | false |
Swaraj1998/MyCode | ML-Workshop/day5/analysis3.py | 1 | 1513 | __author__ = 'Ashish'
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
pd.set_option('max_columns', 50)
# pass in column names for each CSV
u_cols = ['user_id', 'age', 'sex', 'occupation', 'zip_code']
users = pd.read_csv('Data\ml-100k\u.user', sep='|', names=u_cols)
r_cols = ['user_id', 'movie_i... | mit | 109,061,741,188,661,280 | 33.386364 | 84 | 0.658956 | false |
ucarion/git-code-debt | tests/metrics/imports_test.py | 1 | 2077 | from __future__ import absolute_import
from __future__ import unicode_literals
import pytest
from git_code_debt.file_diff_stat import FileDiffStat
from git_code_debt.metric import Metric
from git_code_debt.metrics.imports import CheetahTemplateImportCount
from git_code_debt.metrics.imports import is_python_import
fro... | mit | 2,708,372,159,157,328,400 | 29.544118 | 68 | 0.64131 | false |
radiasoft/radtrack | experimental/LSD_crash/pyqt_undoCommands.py | 1 | 1895 | from PyQt4.QtGui import QUndoCommand, QTreeWidgetItem
# QUndoCommand for creating a new THING and adding it's name to the
# QTreeWidget
class LoadThings(QUndoCommand):
def __init__(self, widget, thing):
super(LoadThings, self).__init__()
self.widget = widget
self.createdThing = thing
... | apache-2.0 | -3,442,286,966,883,006,500 | 35.442308 | 83 | 0.638522 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.