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 |
|---|---|---|---|---|---|---|---|---|---|---|
BetterWorks/pysaml2 | tests/restrictive_idp_conf.py | 1 | 1480 | from saml2 import BINDING_SOAP, BINDING_HTTP_REDIRECT
from saml2.saml import NAME_FORMAT_URI
BASE = "http://localhost:8089/"
try:
from xmlsec_location import xmlsec_path
except ImportError:
xmlsec_path = '/opt/local/bin/xmlsec1'
CONFIG = {
"entityid" : "urn:mace:example.com:saml:roland:idpr",
"name" ... | bsd-2-clause | -6,517,696,067,501,994,000 | 30.489362 | 77 | 0.452027 | false |
beiko-lab/gengis | bin/Lib/site-packages/numpy/f2py/tests/util.py | 1 | 9708 | """
Utility functions for
- building and importing modules on test time, using a temporary location
- detecting if compilers are present
"""
import os
import sys
import subprocess
import tempfile
import shutil
import atexit
import textwrap
import re
import random
import nose
from numpy.compat i... | gpl-3.0 | 6,460,595,852,936,579,000 | 25.579545 | 79 | 0.547281 | false |
oysstu/pyopencl-in-action | ch11/bsort.py | 1 | 12349 | """
Listing 11.3: A general bitonic sort
"""
from io import open
import numpy as np
import pyopencl as cl
import utility
SORT_ASCENDING = True
NUM_FLOATS = 2**20
kernel_src = '''
/* Sort elements within a vector */
#define VECTOR_SORT(input, dir) \
comp = input < shuffle(input, m... | mit | -3,874,290,139,137,970,700 | 34.282857 | 103 | 0.61673 | false |
CalthorpeAnalytics/urbanfootprint | footprint/main/resources/caching.py | 1 | 1764 |
# UrbanFootprint v1.5
# Copyright (C) 2017 Calthorpe Analytics
#
# This file is part of UrbanFootprint version 1.5
#
# UrbanFootprint is distributed under the terms of the GNU General
# Public License version 3, as published by the Free Software Foundation. This
# code is distributed WITHOUT ANY WARRANTY, without impl... | gpl-3.0 | 2,080,016,919,657,887,000 | 43.1 | 102 | 0.696712 | false |
Crach1015/plugin.video.crachtvlistpro | _ytplist.py | 1 | 4160 | import urllib
import urllib2,json
import xbmcvfs
import requests,time
import os,xbmc,xbmcaddon,xbmcgui,re
addon = xbmcaddon.Addon('plugin.video.crachtvlistpro')
profile = xbmc.translatePath(addon.getAddonInfo('profile').decode('utf-8'))
cacheDir = os.path.join(profile, 'cachedir')
clean_cache=os.path.join(cacheDir,'cle... | gpl-2.0 | 9,016,366,593,899,264,000 | 39.794118 | 116 | 0.602885 | false |
bennihepp/FastForestLib | python/training_context.py | 1 | 2082 | from __future__ import division
from abc import ABCMeta, abstractmethod
class TrainingContext:
__metaclass__ = ABCMeta
# TODO: abstract away the computation of statistics
@abstractmethod
def compute_statistics(self, sample_indices): pass
@abstractmethod
def sample_split_points(self, sample_... | mit | -5,126,495,431,040,047,000 | 26.038961 | 111 | 0.704611 | false |
simone-campagna/py-structparser | examples/versioning/model/model_r3.py | 1 | 3830 | #
# Copyright 2013 Simone Campagna
#
# 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 wri... | apache-2.0 | -7,360,717,938,758,021,000 | 32.596491 | 106 | 0.597389 | false |
HyperWind/kouhaibot | bot/ch.py | 1 | 61897 | ################################################################
# File: ch.py
# Title: Chatango Library
# Original Author: Lumirayz/Lumz <lumirayz@gmail.com>
# Current Maintainers and Contributors:
# Nullspeaker <import codecs;codecs.encode('aunzzbaq129@tznvy.pbz','rot_13')>
# asl97 <asl97@outlook.com>
# pystub
# ... | gpl-2.0 | -2,147,355,108,584,225,000 | 24.736798 | 877 | 0.573857 | false |
axonchisel/ax_metrics | tests/test_metricdef.py | 1 | 5494 | """
Ax_Metrics - Test foundation metricdef package (not including MDefL parsing)
------------------------------------------------------------------------------
Author: Dan Kamins <dos at axonchisel dot net>
Copyright (c) 2014 Dan Kamins, AxonChisel.net
"""
# ----------------------------------------------------------... | mit | 9,194,318,851,884,847,000 | 28.068783 | 78 | 0.556607 | false |
michaeltcoelho/shortener | core/forms.py | 1 | 3523 | #-*- coding: utf-8 -*-
from django import forms
from models import Link
from django.contrib.auth import get_user_model, authenticate
from django.utils.translation import ugettext as _
class UserCreationForm(forms.Form):
"""
UserForm - Form to create a new user
"""
error_messages = {
'password_m... | mit | 8,901,538,247,505,740,000 | 31.564815 | 103 | 0.60694 | false |
ReactiveX/RxPY | rx/subject/subject.py | 1 | 3108 | import threading
from typing import Any, List, Optional
from rx.disposable import Disposable
from rx.core import Observable, Observer, typing
from rx.internal import DisposedException
from .innersubscription import InnerSubscription
class Subject(Observable, Observer, typing.Subject):
"""Represents an object th... | mit | -1,769,932,384,335,428,600 | 28.320755 | 75 | 0.583655 | false |
biancini/met | met/settings.py | 1 | 9640 | #################################################################
# MET v2 Metadate Explorer Tool
#
# This Software is Open Source. See License: https://github.com/TERENA/met/blob/master/LICENSE.md
# Copyright (c) 2012, TERENA All rights reserved.
#
# This Software is based on MET v1 developed for TERENA by Yaco Sistem... | bsd-2-clause | -6,634,654,720,941,580,000 | 33.184397 | 142 | 0.642116 | false |
status-im/status-react | test/appium/tests/atomic/test_translations.py | 1 | 1576 | from itertools import chain
import json
import os
import pytest
from tests import marks
from tests.base_test_case import NoDeviceTestCase
class TestTranslations(NoDeviceTestCase):
@marks.testrail_id(6223)
@marks.skip
# skipped: no need to launch it on daily basis
def test_find_unused_translations(se... | mpl-2.0 | -1,622,359,827,410,377,500 | 37.439024 | 111 | 0.546954 | false |
kevenli/scrapydd | scrapydd/executor.py | 1 | 11318 | """
This module is used by agent to execute spider task.
"""
# pylint: disable=missing-module-docstring
# pylint: disable=missing-class-docstring
# pylint: disable=missing-function-docstring
import asyncio
import os
import logging
import tempfile
import shutil
from urllib.parse import urlparse
from configpa... | apache-2.0 | 2,837,276,064,442,330,000 | 33.70347 | 79 | 0.559463 | false |
jrosdahl/maildirproc | mailprocessing/cmd/imap.py | 1 | 11993 | # -*- coding: utf-8; mode: python -*-
# Copyright (C) 2017 Johannes Grassler <johannes@btw23.de>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your... | gpl-2.0 | 8,406,665,683,349,692,000 | 32.406685 | 97 | 0.587343 | false |
chandler14362/panda3d | direct/src/showbase/Messenger.py | 4 | 25487 | """This defines the Messenger class, which is responsible for most of the
event handling that happens on the Python side."""
__all__ = ['Messenger']
from .PythonUtil import *
from direct.directnotify import DirectNotifyGlobal
import types
from direct.stdpy.threading import Lock
class Messenger:
notify = Direc... | bsd-3-clause | -8,014,669,034,595,796,000 | 37.616667 | 113 | 0.527131 | false |
maxive/erp | addons/pos_mercury/models/pos_mercury.py | 3 | 4651 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import logging
from odoo import models, fields, api, _
from odoo.tools.float_utils import float_compare
_logger = logging.getLogger(__name__)
class BarcodeRule(models.Model):
_inherit = 'barcode.rule'
type =... | agpl-3.0 | 152,337,837,567,398,880 | 43.721154 | 162 | 0.635777 | false |
wasade/american-gut-web | amgut/handlers/retrieve_kitid.py | 1 | 1273 | from amgut.lib.mail import send_email
from amgut.handlers.base_handlers import BaseHandler
from amgut.util import AG_DATA_ACCESS
from amgut import text_locale
class KitIDHandler(BaseHandler):
def get(self):
self.render('retrieve_kitid.html', message='', output='form',
loginerror='')
... | bsd-3-clause | 5,057,061,046,810,976,000 | 36.441176 | 78 | 0.523959 | false |
lexman/tuttle | tests/test_workflow_builder.py | 1 | 2572 | # -*- coding: utf-8 -*-
from nose.tools import *
from tuttle.workflow_builder import *
class TestProjectBuilder():
def test_extract_scheme(self):
"""A file ressource should return a file protocol"""
wb = WorkflowBuilder()
url = "file://test.csv"
assert wb.extract_scheme(url) == "... | mit | -104,769,107,110,449,230 | 36.275362 | 87 | 0.636081 | false |
morta-code/IntelliStock | intellistock/ui/ui_mainwindow.py | 1 | 22141 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'ui_mainwindow.ui'
#
# Created: Tue Jan 13 13:18:41 2015
# by: PyQt4 UI code generator 4.11.2
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except ... | gpl-2.0 | 1,322,740,813,483,164,700 | 63.54386 | 137 | 0.716771 | false |
selective-inference/selective-inference | selectinf/algorithms/softmax.py | 3 | 3761 | r"""
This module implements the softmax approximation for
a multivariate Gaussian truncated by affine constraints. The approximation
is an approximation of the normalizing constant in the
likelihood.
"""
from copy import copy
import numpy as np
from regreg.api import smooth_atom
class softmax_objective(smooth_at... | bsd-3-clause | -1,101,396,097,543,086,500 | 26.057554 | 99 | 0.51263 | false |
steven-murray/halomod | tests/test_beutler.py | 1 | 2446 | """
Direct tests of the halo model code against known values from Beutler+2013, with
intermediate data provided by David Palomara using his own halo model code.
"""
from halomod.integrate_corr import ProjectedCF
import numpy as np
import pytest
from pathlib import Path
pytestmark = pytest.mark.skip(
"These tests ... | mit | -8,105,219,970,487,382,000 | 26.795455 | 80 | 0.589943 | false |
Juniper/contrail-ceilometer-plugin | ceilometer_plugin_contrail/network/statistics/floatingip.py | 1 | 1370 | #
# Copyright (c) 2015 Juniper Networks, Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by a... | apache-2.0 | 7,923,312,974,521,002,000 | 28.782609 | 75 | 0.748905 | false |
brain-research/hyperbolictext | word_context/tools.py | 1 | 7048 | #!/usr/bin/python
#
# Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -3,918,148,317,013,106,000 | 34.417085 | 80 | 0.723751 | false |
koalalorenzo/jointbtc | payments/migrations/0001_initial.py | 1 | 2772 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Address',
fields=[
('id', models.AutoField(verb... | mit | 9,220,694,968,455,333,000 | 48.5 | 114 | 0.573232 | false |
ftoulemon/Dilebhome | backend/lib/DbConnector.py | 1 | 4460 | # coding: utf-8
import logging
import MySQLdb
from warnings import filterwarnings
class DbConnector(object):
"""
Connect with mysql DB
"""
RECORDS_M_TABLE = 'records_minute'
RECORDS_H_TABLE = 'records_hour'
RECORDS_D_TABLE = 'records_day'
RECORDS_O_TABLE = 'records_month'
RECORDS_Y_TAB... | mit | 4,629,801,154,520,819,000 | 30.188811 | 88 | 0.461659 | false |
torgeirl/eliza | bot/messenger.py | 1 | 8426 | # -*- coding: utf-8 -*-
import logging
import random
import re
logger = logging.getLogger(__name__)
reflections = {
"am": "are",
"was": "were",
"i": "you",
"i'd": "you would",
"i've": "you have",
"i'll": "you will",
"my": "your",
"are": "am",
"you've": "I have",
"you'll": "I w... | mit | -7,330,581,222,430,813,000 | 29.751825 | 96 | 0.533705 | false |
mancoast/CPythonPyc_test | fail/312_test_bytes.py | 1 | 42923 | """Unit tests for the bytes and bytearray types.
XXX This is a mess. Common tests should be moved to buffer_tests.py,
which itself ought to be unified with string_tests.py (and the latter
should be modernized).
"""
import os
import re
import sys
import copy
import operator
import pickle
import tempfile
import unitte... | gpl-3.0 | 8,371,342,375,431,990,000 | 38.378899 | 765 | 0.578618 | false |
Jordan-Zhu/RoboVision | unsorted/LabelLineCurveFeature_py.py | 1 | 4289 | import cv2
import numpy as np
from legacyCode.utility import get_ordering, normalize_depth, get_direction_py
def swap_indices(arr):
res = []
for i, e in enumerate(arr):
res.append([arr[i][1] - 1, arr[i][0] - 1])
return np.array(res)
def roipoly(src, poly):
mask = np.zeros_like... | gpl-3.0 | 7,095,326,162,191,051,000 | 33.155738 | 105 | 0.529028 | false |
Azure/azure-sdk-for-python | sdk/appservice/azure-mgmt-web/azure/mgmt/web/v2020_09_01/aio/operations/_deleted_web_apps_operations.py | 1 | 11568 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 8,175,283,916,153,705,000 | 46.216327 | 179 | 0.635979 | false |
protwis/protwis | tools/management/commands/assign_structure_states.py | 1 | 19467 | from django.core.management.base import BaseCommand
from django.contrib.postgres.aggregates import ArrayAgg
from django.db.models import Max, Min
from contactnetwork.distances import Distance, Distances
from contactnetwork.models import distance_scaling_factor
from protein.models import ProteinFamily, ProteinState
fro... | apache-2.0 | 5,794,347,739,398,808,000 | 54.292614 | 194 | 0.53409 | false |
Chudsaviet/transmission-telegram | persistence.py | 1 | 1264 | import os.path
import logging
class Persistence:
def __init__(self, persistence_file):
self.authorized_chats = list()
self.persistence_file = persistence_file
if persistence_file and os.path.isfile(persistence_file):
logging.info('Loading authorized chats from %s' % persisten... | mit | 2,966,427,301,941,186,600 | 32.263158 | 79 | 0.539557 | false |
GreenCoinX/greencoin | qa/rpc-tests/getchaintips.py | 1 | 2128 | #!/usr/bin/env python2
# Copyright (c) 2014 The GreenCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the getchaintips API. We introduce a network split, work
# on chains of different lengths, and j... | mit | 3,997,968,351,571,926,500 | 35.067797 | 70 | 0.625 | false |
our-city-app/oca-backend | src/solutions/common/bizz/coupons.py | 1 | 6971 | # -*- coding: utf-8 -*-
# Copyright 2020 Green Valley Belgium NV
#
# 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 appl... | apache-2.0 | -7,986,205,065,681,956,000 | 44.562092 | 115 | 0.732033 | false |
zamattiac/SHARE | providers/ca/lwbin/normalizer.py | 1 | 2994 | from share.normalize import *
class AgentIdentifier(Parser):
uri = IRI(ctx)
class WorkIdentifier(Parser):
uri = IRI(ctx)
class Tag(Parser):
name = ctx.name
class ThroughTags(Parser):
tag = Delegate(Tag, ctx)
class Maintainer(Parser):
schema = tools.GuessAgentType(ctx.maintainer)
name =... | apache-2.0 | -6,124,292,343,919,785,000 | 26.722222 | 156 | 0.651303 | false |
diegotoral/season-hunter | SeasonHunter/config.py | 1 | 1188 | """
Copyright (C) 2012 Caio Oliveira <caio.freitaso@gmail.com>
Copyright (C) 2012 Diego Toral <diegotoral@gmail.com>
Copyright (C) 2012 Thiago Abreu <thiagoa7@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 So... | gpl-3.0 | 4,582,873,267,735,139,000 | 29.461538 | 78 | 0.726431 | false |
openstack/python-tripleoclient | tripleoclient/tests/v2/container_image/test_tripleo_container_image.py | 1 | 10921 | # Copyright 2016 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 applicable law or agreed ... | apache-2.0 | 3,443,496,895,198,204,000 | 35.282392 | 78 | 0.5646 | false |
caglar10ur/func | func/minion/modules/nm/vservermanager.py | 1 | 3354 | # This software may be freely redistributed under the terms of the GNU
# general public license.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
import os
import sys
import v... | gpl-2.0 | -6,439,553,845,432,355,000 | 31.25 | 122 | 0.591831 | false |
GunnerJnr/_CodeInstitute | Stream-2/Back-End-Development/4.Version-Control/5.Connecting-To-The-Issue-Tracker/adventure-challenge-solution/adventure.py | 1 | 2102 | # import our data file
from data import locations
# define a dictionary with our directions in. Each direction is a set of coordinates which,
# when added to a position, will move it in that direction. So for instance, if we're currently at (1, 1),
# moving east will result in (1+1, 1) = (2, 1). Moving west will resul... | mit | 6,930,727,267,035,443,000 | 44.695652 | 118 | 0.674596 | false |
jacobbieker/Insights | insights/google/Hangouts2SQLite.py | 1 | 15035 | '''
Copyright (C) 2015 Jacob Bieker, jacob@bieker.us, www.jacobbieker.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 version 2 of the License, or
(at your option) any later version.
Thi... | gpl-2.0 | -5,522,218,993,984,060,000 | 29.251509 | 369 | 0.572664 | false |
MTG/essentia | test/src/unittests/filters/test_allpass.py | 1 | 2091 | #!/usr/bin/env python
# Copyright (C) 2006-2021 Music Technology Group - Universitat Pompeu Fabra
#
# This file is part of Essentia
#
# Essentia 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 (FSF), e... | agpl-3.0 | 6,501,017,266,468,319,000 | 30.208955 | 85 | 0.599235 | false |
jmb/geopy | test/geocoders/geonames.py | 1 | 7330 | # -*- coding: UTF-8 -*-
import unittest
import uuid
import pytz
from geopy import Point
from geopy.compat import u
from geopy.exc import GeocoderAuthenticationFailure, GeocoderQueryError
from geopy.geocoders import GeoNames
from test.geocoders.util import GeocoderTestBase, env
class GeoNamesTestCaseUnitTest(Geocode... | mit | -4,108,410,651,053,617,000 | 30.534483 | 80 | 0.525834 | false |
ducmanh86/server-persys | languages/es.py | 1 | 15613 | # coding: utf8
{
'!langcode!': 'es',
'!langname!': 'Español',
'"update" is an optional expression like "field1=\'newvalue\'". You cannot update or delete the results of a JOIN': '"actualice" es una expresión opcional como "campo1=\'nuevo_valor\'". No se puede actualizar o eliminar resultados de un JOIN',
'%s %%{row} de... | apache-2.0 | -7,033,665,117,372,825,000 | 45.909091 | 281 | 0.708656 | false |
ngageoint/scale | scale/scheduler/recon/manager.py | 1 | 3421 | """Defines the class that manages reconciling tasks"""
from __future__ import unicode_literals
import datetime
import logging
import threading
from django.utils.timezone import now
COUNT_WARNING_THRESHOLD = 1000 # If the total list count hits this threshold, log a warning
FULL_RECON_THRESHOLD = datetime.timedelta(m... | apache-2.0 | -3,470,654,502,291,101,700 | 30.675926 | 92 | 0.587548 | false |
2013Commons/HUE-SHARK | apps/impala/src/impala/tests.py | 1 | 3457 | #!/usr/bin/env python
# Licensed to Cloudera, Inc. under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. Cloudera, Inc. licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you ma... | apache-2.0 | 4,033,016,555,627,360,000 | 34.27551 | 123 | 0.707839 | false |
hothHowler/pyzillow | pyzillow/pyzillowerrors.py | 1 | 3494 | class ZillowError(Exception):
"""
Error messages copied from Zillow\'s API documentation
http://www.zillow.com/howto/api/GetDeepSearchResults.htm
"""
code = dict([
(0, 'Request successfully processed'),
(1, 'Service error-there was a server-side error ' +
'while processin... | mit | 8,142,956,227,056,032,000 | 41.096386 | 79 | 0.577275 | false |
thauser/pnc-cli | pnc_cli/swagger_client/models/license.py | 1 | 5572 | # coding: utf-8
"""
Copyright 2015 SmartBear Software
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 | 4,485,018,228,793,821,700 | 23.331878 | 77 | 0.540201 | false |
google/feedloader | appengine/initiator/tasks_client_test.py | 1 | 1341 | # coding=utf-8
# Copyright 2021 Google LLC.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -2,322,957,672,096,237,000 | 30.928571 | 79 | 0.714392 | false |
shravya-ks/ECN-ns3 | src/wimax/bindings/modulegen__gcc_LP64.py | 1 | 787952 | from pybindgen import Module, FileCodeSink, param, retval, cppclass, typehandlers
import pybindgen.settings
import warnings
class ErrorHandler(pybindgen.settings.ErrorHandler):
def handle_error(self, wrapper, exception, traceback_):
warnings.warn("exception %r in wrapper %s" % (exception, wrapper))
... | gpl-2.0 | 349,915,262,579,946,400 | 62.642032 | 748 | 0.604763 | false |
mvpossum/deep-learning | tp4/red_con_dict.py | 1 | 3554 | from __future__ import print_function
from keras.models import Sequential
from keras.layers import Dense, Activation, Dropout
from keras.layers import LSTM
from keras.optimizers import RMSprop
from keras.utils.data_utils import get_file
import numpy as np
import random
import sys
import h5py
from utils import *
import ... | mit | 146,808,267,485,039,330 | 30.451327 | 67 | 0.649409 | false |
sightmachine/LightGBM | python-package/lightgbm/plotting.py | 1 | 11700 | # coding: utf-8
# pylint: disable = C0103
"""Plotting Library."""
from __future__ import absolute_import
import warnings
from copy import deepcopy
from io import BytesIO
import numpy as np
from .basic import Booster
from .sklearn import LGBMModel
def check_not_tuple_of_2_elements(obj, obj_name='obj'):
"""check... | mit | 124,729,947,960,476,670 | 31.865169 | 93 | 0.60735 | false |
olivierverdier/sfepy | sfepy/fem/quadratures.py | 1 | 8809 | """
`quadrature_tables` are organized as follows::
quadrature_tables = {
'<geometry1>' : {
order1 : QuadraturePoints(args1),
order2 : QuadraturePoints(args2),
...
},
'<geometry2>' : {
order1 : QuadraturePoints(args1),
order2 : Quad... | bsd-3-clause | 6,951,535,837,725,817,000 | 41.350962 | 115 | 0.457373 | false |
hacosta/python-sh | setup.py | 1 | 1177 | from __future__ import print_function
import os
import sys
import sh
try: from distutils.core import setup
except ImportError: from setuptools import setup
setup(
name="sh",
version=sh.__version__,
description="Python subprocess interface",
author="Andrew Moffat",
author_email="andrew.robert.moff... | mit | -8,688,057,313,761,751,000 | 31.694444 | 71 | 0.615973 | false |
CMUSV-VisTrails/WorkflowRecommendation | vistrails/gui/bundles/utils.py | 1 | 4860 | ###############################################################################
##
## Copyright (C) 2006-2011, University of Utah.
## All rights reserved.
## Contact: contact@vistrails.org
##
## This file is part of VisTrails.
##
## "Redistribution and use in source and binary forms, with or without
## modification, ... | bsd-3-clause | -5,726,435,655,417,989,000 | 40.538462 | 112 | 0.617901 | false |
jebreimo/Yson | external/Yconvert/tools/codepages/codegen.py | 1 | 13620 | # -*- coding: utf-8 -*-
# ****************************************************************************
# Copyright © 2013 Jan Erik Breimo. All rights reserved.
# Created by Jan Erik Breimo on 2013-10-22.
#
# This file is distributed under the Simplified BSD License.
# License text is included with the source distributi... | bsd-2-clause | -5,322,707,830,966,782,000 | 31.196217 | 94 | 0.508848 | false |
mdxe/pySX127x | receive_message.py | 1 | 3331 | #!/usr/bin/env python2.7
""" A simple continuous receiver class. """
# Copyright 2015 Mayer Analytics Ltd.
#
# This file is part of pySX127x.
#
# pySX127x 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,... | agpl-3.0 | -7,020,014,993,076,642,000 | 29.281818 | 118 | 0.68508 | false |
timothyb0912/pylogit | src/pylogit/asym_logit.py | 1 | 50536 | # -*- coding: utf-8 -*-
"""
Created on Sun Feb 28 20:16:35 2016
@name: MultiNomial Asymmetric Logit--version 3
@author: Timothy Brathwaite
@summary: Contains functions necessary for estimating multinomial asymmetric
logit models (with the help of the "base_multinomial_cm.py" file)
@notes: Dif... | bsd-3-clause | -4,480,891,505,624,783,400 | 44.983621 | 79 | 0.627968 | false |
arraystream/simpleplotly | weplot/figure.py | 1 | 4619 | import itertools
import plotly
import plotly.graph_objs as go
from plotly import tools
from .layout import ElementBuilder
from .plot import AtomBuilder
from .subplot import SubPlotSpec, PlotCanvas
class FigureHolder(object):
def __init__(self, figure):
self.figure = figure
def plot(self, mode='offl... | mit | 7,442,328,481,942,678,000 | 33.214815 | 123 | 0.616151 | false |
vlegoff/tsunami | src/secondaires/crafting/actions/rejoindre_guilde.py | 1 | 2856 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | 6,924,567,367,555,344,000 | 40.275362 | 79 | 0.727177 | false |
yuanzh/transfer_pos | proj_vec/paste.py | 1 | 1598 | import re
import time
import io
import sys
import argparse
from collections import defaultdict
# parse/validate arguments
argParser = argparse.ArgumentParser()
argParser.add_argument("-d", "--delimiter", type=str, default='\t', help="delimiter defaults to \t")
argParser.add_argument("-1", "--firstFilename", type=str)
... | mit | 2,046,168,865,012,859,600 | 36.162791 | 108 | 0.696496 | false |
xp7551/robot | archive/motor_test.py | 1 | 2215 | import RPi.GPIO as GPIO
import time
import curses
#added motor enable to pi
#pin 16 ->enable
#pin 18 ->enable
class NiksRobot:
def __init__(self):
#setup
GPIO.setmode(GPIO.BOARD)
GPIO.setup(7,GPIO.OUT)
GPIO.setup(11,GPIO.OUT)
GPIO.setup(13,GPIO.OUT)
GPIO.setup(15,GPIO.OUT)
#GPIO.setup(16,GPIO.OUT)
#... | apache-2.0 | -8,500,020,246,738,107,000 | 23.88764 | 55 | 0.540858 | false |
zstackorg/zstack-utility | zstacklib/zstacklib/utils/daemon.py | 1 | 6017 | #!/usr/bin/env python
import sys, os, time, atexit
import traceback
import locale
from signal import SIGTERM,SIGKILL
from zstacklib.utils import linux
from zstacklib.utils import log
logger = log.get_logger(__name__)
class Daemon(object):
"""
A generic daemon class.
Usage: subclass the Daemon class... | apache-2.0 | 5,803,624,991,366,035,000 | 28.935323 | 110 | 0.51288 | false |
googleapis/googleapis-gen | google/cloud/scheduler/v1beta1/scheduler-v1beta1-py/noxfile.py | 1 | 3587 | # -*- 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 | -8,710,536,702,921,232,000 | 26.174242 | 96 | 0.618344 | false |
trnewman/VT-USRP-daughterboard-drivers_python | gnuradio-core/src/python/gnuradio/gr/qa_add_and_friends.py | 1 | 4324 | #!/usr/bin/env python
#
# Copyright 2004 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio 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, or (at your option)
... | gpl-3.0 | -6,943,813,279,968,118,000 | 32.51938 | 70 | 0.531684 | false |
andreav/swgit | core/ObjTag.py | 1 | 16349 | #!/usr/bin/env python
# Copyright (C) 2012 Andrea Valle
#
# This file is part of swgit.
#
# swgit 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 lat... | gpl-3.0 | 1,061,881,172,037,698,200 | 28.090747 | 112 | 0.562909 | false |
AKST/wiki-timelapse | test/util_tests/router_tests.py | 1 | 1051 | import unittest
from werkzeug.routing import Map, Rule
from app.http import router
sample = {
'/a': '1',
'/b': {
'a': '21',
'b': '22'
}
}
class TestHelpers(unittest.TestCase):
def test_dict_to_url_map(self):
list_sample = router._rdict_to_rlist(sample)
flatten = r... | mit | -6,123,006,309,853,789,000 | 21.847826 | 68 | 0.539486 | false |
shoopio/shoop | shuup_tests/front/test_product_detail_theme_settings.py | 2 | 1852 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2019, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
import pytest
from bs4 import BeautifulSoup
from django.core.urlr... | agpl-3.0 | -130,816,210,023,205,390 | 39.26087 | 102 | 0.717603 | false |
walty8/trac | trac/ticket/tests/default_workflow.py | 1 | 14997 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2014 Edgewall Software
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution. The terms
# are also available at http://trac.edgewall.org/wiki/TracLicense.
#
# This software consists o... | bsd-3-clause | -3,159,984,423,600,501,000 | 36.2134 | 79 | 0.603787 | false |
leapalazzolo/XSS | xss.py | 1 | 15177 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import threading
import urllib
import argparse
import urlparse
import logging
import urllib2
import httplib
import Queue
import re
import hashlib
import mechanize
from links import links
from bdd import bdd
logging.config.fileConfig('log.ini')
LOGGER = logging.getL... | mit | -3,690,244,999,868,630,000 | 42.265714 | 275 | 0.577797 | false |
AndreaOrru/Gilgamesh | tests/test_log.py | 1 | 8286 | from abc import ABC
from unittest import TestCase
from gilgamesh.log import EntryPoint, Log
from gilgamesh.snes.rom import ROM
from gilgamesh.snes.state import StateChange
from tests.test_rom import assemble
class LogTest(ABC):
@classmethod
def setUpClass(cls):
cls.rom = ROM(assemble(cls.asm))
d... | bsd-2-clause | 4,970,390,575,470,309,000 | 32.41129 | 87 | 0.678856 | false |
gjbex/parameter-weaver | src/vsc/parameter_weaver/r/formatter.py | 1 | 4627 | #
# ParameterWeaver: a code generator to handle command line parameters
# and configuration files for C/C++/Fortran/R/Octave
# Copyright (C) 2013 Geert Jan Bex <geertjan.bex@uhasselt.be>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as p... | gpl-3.0 | -7,407,597,421,357,546,000 | 43.066667 | 137 | 0.593689 | false |
zlsa/io_object_mu | shader.py | 1 | 16608 | # vim:ts=4:et
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This prog... | gpl-2.0 | -3,028,747,332,299,951,600 | 42.137662 | 181 | 0.629034 | false |
gsdlab/claferMooStandalone | 2012-models-clafermultiobjective-data-generator/spl_datagenerator/AppendPartialInstanceAndGoals.py | 1 | 6436 | '''
Created on Jul 29, 2012
@author: rafaelolaechea
'''
import argparse
from xml.etree import ElementTree
from xml_parser_helper import load_xml_model
import spl_claferanalyzer
import math
_namespaces = {'c1': 'http://gsd.uwaterloo.ca/clafer', 'xsi': 'http://www.w3.org/2001/XMLSchema-instance'}
def generate_and_ap... | mit | 7,967,141,363,815,726,000 | 60.884615 | 198 | 0.644344 | false |
jszopi/repESP | tests/test_respin_generation.py | 1 | 6194 | from repESP.equivalence import Equivalence
from repESP.types import *
from repESP.respin_format import Respin
from repESP.respin_generation import prepare_respin
from repESP.respin_generation import RespStage1RespinGenerator, RespStage2RespinGenerator
from repESP.respin_generation import FitHydrogensOnlyRespinGenerator... | gpl-3.0 | 8,565,827,334,588,775,000 | 30.764103 | 107 | 0.59267 | false |
shmilee/gdpy3 | src/loaders/hdf5pck.py | 1 | 2125 | # -*- coding: utf-8 -*-
# Copyright (c) 2020 shmilee
'''
Contains Hdf5 pickled file loader class.
'''
import numpy
try:
import h5py
except ImportError as exc:
raise ImportError(
'Hdf5PckLoader requires h5py(bindings for HDF5). But %s' % exc) from None
from ..glogger import getGLogger
from ..utils i... | mit | -7,078,559,083,106,932,000 | 24.297619 | 81 | 0.584 | false |
matejsuchanek/pywikibot-scripts | import_displaytitle.py | 1 | 2212 | #!/usr/bin/python
import pywikibot
from pywikibot.pagegenerators import (
page_with_property_generator,
GeneratorFactory,
NamespaceFilterPageGenerator,
)
from pywikibot.tools import first_lower
from .wikidata import WikidataEntityBot
class LabelSettingBot(WikidataEntityBot):
def __init__(self, **kw... | gpl-2.0 | 8,543,132,277,754,839,000 | 29.722222 | 79 | 0.599458 | false |
c1728p9/mbed-os | tools/run_icetea.py | 1 | 12987 | #! /usr/bin/env python2
"""
Copyright 2018 ARM Limited
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 ... | apache-2.0 | -8,287,828,954,235,716,000 | 36.643478 | 123 | 0.544314 | false |
reflectometry/osrefl | osrefl/loaders/reduction/registry.py | 1 | 5834 | # This program is public domain
"""
File extension registry.
This provides routines for opening files based on extension,
and registers the built-in file extensions.
"""
import os.path
class ExtensionRegistry(object):
"""
Associate a file loader with an extension.
Note that there may be multiple loaders... | bsd-3-clause | -3,973,083,359,821,198,300 | 31.960452 | 84 | 0.594275 | false |
dims/neutron | neutron/agent/linux/ip_lib.py | 1 | 37003 | # Copyright 2012 OpenStack Foundation
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requ... | apache-2.0 | -8,870,841,089,214,430,000 | 34.85562 | 79 | 0.550334 | false |
polyrabbit/WeCron | WeCron/remind/utils.py | 1 | 1829 | # coding: utf-8
from __future__ import unicode_literals, absolute_import
from datetime import timedelta
from django.utils import timezone
from lru import lru_cache_function
from common import wechat_client
def delta2dict( delta ):
"""Accepts a delta, returns a dictionary of units"""
delta = abs( delta )
... | gpl-3.0 | 2,957,145,779,826,193,400 | 27.758065 | 76 | 0.581043 | false |
thunder-project/thunder-regression | test/test_regression.py | 1 | 3056 | import pytest
from sklearn.linear_model import LinearRegression as LR
from sklearn.linear_model import Ridge
from numpy import allclose, r_, asarray, newaxis, hstack
from numpy.random import randn
from thunder.series import fromarray
from regression import LinearRegression, FastLinearRegression, CustomRegression
pyt... | mit | 7,946,336,646,080,937,000 | 27.036697 | 79 | 0.694372 | false |
mattboyer/sqbrite | src/sqlite_recover.py | 1 | 9263 | # MIT License
#
# Copyright (c) 2017 Matt Boyer
#
# 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, p... | mit | -5,541,782,990,340,641,000 | 30.722603 | 79 | 0.589766 | false |
freevo/freevo1 | src/util/fxdparser.py | 1 | 11394 | # -*- coding: iso-8859-1 -*-
# -----------------------------------------------------------------------
# Parser for fxd files
# -----------------------------------------------------------------------
# $Id$
#
# Notes:
# Todo:
#
# -----------------------------------------------------------------------
# Freevo - A Home ... | gpl-2.0 | 4,557,053,931,857,020,000 | 29.063325 | 85 | 0.50316 | false |
fotinakis/sentry | tests/sentry/tasks/test_reports.py | 1 | 7050 | from __future__ import absolute_import
import functools
from datetime import datetime, timedelta
import mock
import pytest
import pytz
from django.core import mail
from sentry.app import tsdb
from sentry.models import Project, UserOption
from sentry.tasks.reports import (
DISABLED_ORGANIZATIONS_USER_OPTION_KEY, ... | bsd-3-clause | 4,375,424,478,622,912,000 | 25.603774 | 83 | 0.563972 | false |
chronicle/api-samples-python | detect/v2/get_error.py | 1 | 2378 | #!/usr/bin/env python3
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 3,125,052,403,888,399,000 | 28.358025 | 74 | 0.676619 | false |
abelhj/svtools | svtools/bedpetovcf.py | 1 | 2644 | import argparse, sys
from svtools.bedpe import Bedpe
from svtools.vcf.file import Vcf
from svtools.bedpetovcfconverter import BedpeToVcfConverter
import svtools.utils as su
# primary function
def bedpeToVcf(bedpe_file, vcf_out):
myvcf = Vcf()
converter = BedpeToVcfConverter(myvcf)
in_header = True
# p... | mit | -7,623,955,371,000,402,000 | 33.337662 | 153 | 0.521936 | false |
grigno/djangocms-link | setup.py | 3 | 1448 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import find_packages, setup
from djangocms_link import __version__
REQUIREMENTS = [
'django-cms>=3.2.0',
'djangocms-attributes-field>=0.1.1',
]
CLASSIFIERS = [
'Development Status :: 5 - Production/Stable',
'Environment :: Web Environmen... | bsd-3-clause | 6,398,822,837,265,778,000 | 28.55102 | 75 | 0.645718 | false |
piantado/LOTlib | LOTlib/Hypotheses/Proposers/InsertDeleteProposer.py | 1 | 1346 | """Mixing Insert and Delete Proposers for backward compatibility"""
from LOTlib.Hypotheses.Proposers.DeleteProposer import *
from LOTlib.Hypotheses.Proposers.InsertProposer import *
from LOTlib.Hypotheses.Proposers.MixtureProposer import *
from LOTlib.Miscellaneous import lambdaOne, nicelog
class InsertDeleteProposer... | gpl-3.0 | -1,844,579,424,687,758,000 | 43.866667 | 111 | 0.725111 | false |
leonard-wei/hashcalclib | hashcalclib/hashcalclib.py | 1 | 86985 | #!/usr/bin/env python
# vim: tabstop=4 shiftwidth=4 softtabstop=4
# python version: 2.7.5 final, serial: 0
# Author: Leonard Wei <gooxxgle.mail@gmail.com>
"""Hash calculation library
This module is an hash calculation library that:
- calculate the input strings or files
- output the result for later verificat... | gpl-2.0 | -3,266,934,450,197,240,300 | 37.420936 | 80 | 0.542335 | false |
isvalkyrie/LCWMachine | sentiment very simple.py | 1 | 6231 | #coding:utf-8
import sys
import nltk.classify.util
from nltk.classify import NaiveBayesClassifier
from nltk.corpus import names
def word_feats(words):
return dict([(word, True) for word in words])
positive_vocab = ['iyi','güzel','Tebrikler','tebrik ederim','tebrik','teşekkür', 'ederiz',':)','m at @LCWaikiki','ino... | gpl-3.0 | 8,283,427,697,944,422,000 | 81.763889 | 411 | 0.706662 | false |
npp/npp-api | data/management/commands/import_shelter_population.py | 1 | 1839 | from django import db
from django.conf import settings
from django.core.management.base import NoArgsCommand
from data.models import ShelterPopulation
import csv
# National Priorities Project Data Repository
# import_new_aids_cases.py
# Updated 6/25/2010, Joshua Ruihley, Sunlight Foundation
# Imports Census Shelter P... | mit | 6,527,005,569,106,580,000 | 40.818182 | 124 | 0.667754 | false |
joshmoore/zeroc-ice | cs/test/IceGrid/simple/run.py | 1 | 1155 | #!/usr/bin/env python
# **********************************************************************
#
# Copyright (c) 2003-2011 ZeroC, Inc. All rights reserved.
#
# This copy of Ice is licensed to you under the terms described in the
# ICE_LICENSE file included in this distribution.
#
# *************************************... | gpl-2.0 | 25,049,191,815,379,530 | 32 | 111 | 0.591342 | false |
willingc/portal | systers_portal/users/tests/test_models.py | 1 | 9787 | from django.contrib.auth.models import User, Group
from django.test import TestCase
from community.models import Community
from community.utils import create_groups
from membership.models import JoinRequest
from users.models import SystersUser
class SystersUserTestCase(TestCase):
def setUp(self):
User.ob... | gpl-2.0 | 8,108,976,200,239,845,000 | 47.935 | 79 | 0.616532 | false |
idiap/acoustic-simulator | degrade-audio-safe-random.py | 1 | 42549 | #!/usr/bin/python
#Copyright (c) 2015 Idiap Research Institute, http://www.idiap.ch/
#Written by Marc Ferras <marc.ferras@idiap.ch>,
#
#This file is part of AcSim.
#
#AcSim is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License version 3 as
#published by the Free ... | gpl-3.0 | 1,202,465,438,931,763,700 | 31.881762 | 258 | 0.59301 | false |
cheerss/Fast-Style-Combination | neural_style.py | 1 | 9173 | # Copyright (c) 2015-2017 Anish Athalye. Released under GPLv3.
import os
import numpy as np
import scipy.misc
from stylize import stylize
import math
from argparse import ArgumentParser
from PIL import Image
from sys import stderr
import time
# default arguments
CONTENT_WEIGHT = 5e0
CONTENT_WEIGHT_BLEND = 1
STYLE... | agpl-3.0 | -4,931,044,437,905,474,000 | 40.885845 | 177 | 0.637196 | false |
stackforge/tricircle | tricircle/common/client.py | 1 | 24460 | # Copyright 2015 Huawei Technologies Co., Ltd.
# 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
#
# Unl... | apache-2.0 | -7,714,193,320,954,999,000 | 43.553734 | 79 | 0.587735 | false |
DemocracyClub/yournextrepresentative | ynr/apps/wombles/views.py | 1 | 1342 | from django.contrib.auth.mixins import LoginRequiredMixin
from django.contrib.auth.models import User
from django.db.models import Count
from django.views.generic import DetailView, ListView
from candidates.models import LoggedAction
from wombles.models import WombleTags
class SingleWombleView(LoginRequiredMixin, De... | agpl-3.0 | 5,623,654,047,260,902,000 | 29.5 | 64 | 0.646796 | false |
davidbroadwater/nyc-subway-datascience-project | project_3/linear_regression/predictions.py | 1 | 3956 | import pandas as pd
import numpy as np
def normalize_features(array):
"""
Normalize the features in our data set.
"""
array_normalized = (array-array.mean())/array.std()
mu = array.mean()
sigma = array.std()
return array_normalized, mu, sigma
def compute_cost(features, values, theta):
"""
... | mit | 3,973,742,337,469,923,300 | 36.330189 | 116 | 0.681244 | false |
alexei-matveev/ccp1gui | idle/Percolator.py | 1 | 2612 | from WidgetRedirector import WidgetRedirector
from Delegator import Delegator
class Percolator:
def __init__(self, text):
# XXX would be nice to inherit from Delegator
self.text = text
self.redir = WidgetRedirector(text)
self.top = self.bottom = Delegator(text)
self.bottom.... | gpl-2.0 | -4,278,931,989,671,904,000 | 29.729412 | 71 | 0.594181 | false |
leigh123linux/cinnamon-screensaver | src/dbusdepot/accountsServiceClient.py | 2 | 1463 | #!/usr/bin/python3
import gi
gi.require_version('AccountsService', '1.0')
from gi.repository import GObject, AccountsService
import os
from util import utils, trackers
class AccountsServiceClient(GObject.Object):
"""
Singleton for working with the AccountsService, which we use
to retrieve the user's face... | gpl-2.0 | 2,336,327,375,661,552,600 | 29.479167 | 96 | 0.583732 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.