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 |
|---|---|---|---|---|---|---|---|---|---|---|
gymnasium/edx-platform | lms/djangoapps/badges/models.py | 1 | 12332 | """
Database models for the badges app
"""
from importlib import import_module
from config_models.models import ConfigurationModel
from django.conf import settings
from django.contrib.auth.models import User
from django.core.exceptions import ValidationError
from django.db import models
from django.utils.translation i... | agpl-3.0 | -6,750,894,004,181,752,000 | 37.179567 | 127 | 0.631771 | false |
lcrees/twoq | twoq/tests/auto/queuing.py | 1 | 2927 | # -*- coding: utf-8 -*-
'''auto queuing call chain test mixins'''
class AQMixin(object):
###########################################################################
## queue manipulation #####################################################
################################################################... | bsd-3-clause | 2,572,901,103,623,996,000 | 33.845238 | 79 | 0.413393 | false |
shekkizh/TensorflowProjects | ImageArt/ImageColoring.py | 1 | 7092 | __author__ = 'Charlie'
"""Image coloring by fully convolutional networks - incomplete """
import numpy as np
import tensorflow as tf
import os, sys, inspect
from datetime import datetime
import scipy.misc as misc
lib_path = os.path.realpath(
os.path.abspath(os.path.join(os.path.split(inspect.getfile(inspect.curren... | mit | -4,695,333,736,710,493,000 | 36.925134 | 112 | 0.628173 | false |
tbabej/freeipa | ipalib/pkcs10.py | 1 | 9170 | # Authors:
# Rob Crittenden <rcritten@redhat.com>
#
# Copyright (C) 2010 Red Hat
# see file 'COPYING' for use and warranty information
#
# 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... | gpl-3.0 | -1,926,462,383,126,963,000 | 33.603774 | 89 | 0.648637 | false |
tshirtman/ultimate-smash-friends | usf/screens/configure.py | 1 | 2357 | ################################################################################
# copyright 2009 Gabriel Pettier <gabriel.pettier@gmail.com> #
# #
# This file is part of Ultimate Smash Friends. ... | gpl-3.0 | -8,758,575,220,416,393,000 | 42.648148 | 80 | 0.474332 | false |
nickmilon/mongoUtils | mongoUtils/importsExports.py | 1 | 8999 | """Classes used to import/export data to mongoDB
"""
from Hellas.Thebes import format_header
xlrd = None # reserved to import xlrd on demand
def _xlrd_on_demand():
global xlrd
if xlrd is None:
try:
import xlrd
except ImportError:
print ("this module requires xlrd lib... | apache-2.0 | -6,477,179,523,395,941,000 | 40.662037 | 119 | 0.595066 | false |
Leberwurscht/OfflineDict | buildindex.py | 1 | 1491 | #!/usr/bin/python
# -*- coding: utf8 -*-
import sys, re
filename = sys.argv[1]
tokensize = int(sys.argv[2])
numbersize = int(sys.argv[3])
numbersize2 = int(sys.argv[4])
def normalize(s):
r = s.lower()
r = r.replace(u'ä',u'a');
r = r.replace(u'ö',u'o');
r = r.replace(u'ü',u'u');
r = r.replace(u'Ä',u'A');
r... | mpl-2.0 | 982,324,380,487,193,000 | 28.46 | 117 | 0.570944 | false |
isohybrid/dotfile | vim/bundle/git:--github.com-klen-python-mode/pylibs/logilab/astng/scoped_nodes.py | 1 | 34414 | # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
# contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
# copyright 2003-2010 Sylvain Thenault, all rights reserved.
# contact mailto:thenault@gmail.com
#
# This file is part of logilab-astng.
#
# logilab-astng is free software: you can redi... | bsd-2-clause | -297,131,739,150,811,800 | 34.40535 | 93 | 0.586012 | false |
botswana-harvard/tshilo-dikotla | td_infant/models/infant_birth_data.py | 1 | 2659 | from django.core.validators import MinValueValidator, MaxValueValidator
from django.db import models
from edc_constants.choices import YES_NO, GENDER
from .infant_crf_model import InfantCrfModel
class InfantBirthData(InfantCrfModel):
""" A model completed by the user on the infant's birth exam. """
infant_... | gpl-2.0 | -4,537,329,226,076,851,700 | 31.036145 | 76 | 0.620158 | false |
EnriqueSoria/Series-my | series.py | 1 | 8682 | # -*- coding: utf-8 -*-
directorios = \
r'''
D:/Series
'''.split('\n')
'''
Traducción para algunos géneros
'''
gen = {
'Crime': u'Crimen',
'Action': u'Acción',
'Drama': u'Drama',
'Comedy': u'Comedia',
'Adventure': u'Aventuras',
'Thriller': u'Thriller'
}
... | mit | 3,314,433,357,700,545,500 | 35.70339 | 276 | 0.448857 | false |
advisory/djangosaml2_tenant | setup.py | 1 | 1850 | # Copyright (C) 2015 Education Advisory Board
# Copyright (C) 2011-2012 Yaco Sistemas
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | apache-2.0 | 5,805,203,127,526,979,000 | 33.90566 | 79 | 0.668649 | false |
Adamssss/projectEuler | Problem 001-150 Python/pb050.py | 1 | 1068 | import math
import time
t1 = time.time()
prime = [2,3,5]
primen = 2
while primen < 547:
b = prime[primen]
t = 1
while (t == 1):
b = b+2
i = 0
t = 0
while (prime[i]*prime[i] < b)and (t == 0):
i=i+1
if (b%prime[i] == 0):
t = 1
... | mit | 1,853,741,059,998,883,600 | 17.736842 | 69 | 0.47191 | false |
angadpc/Alexa-Project- | twilio/rest/api/v2010/account/available_phone_number/local.py | 1 | 16142 | # coding=utf-8
"""
This code was generated by
\ / _ _ _| _ _
| (_)\/(_)(_|\/| |(/_ v1.0.0
/ /
"""
from twilio.base import deserialize
from twilio.base import values
from twilio.base.instance_resource import InstanceResource
from twilio.base.list_resource import ListResource
from twilio.base.page i... | mit | -3,366,049,378,486,977,000 | 37.070755 | 118 | 0.610767 | false |
r8/scrapy-kinopoisk | kinopoisk/pipelines.py | 1 | 2920 | # -*- coding: utf-8 -*-
# Define your item pipelines here
#
# Don't forget to add your pipeline to the ITEM_PIPELINES setting
# See: http://doc.scrapy.org/en/latest/topics/item-pipeline.html
import os
import sys
import codecs
from slugify import slugify
from time import strptime, strftime
from html2text import html2... | gpl-3.0 | -5,104,314,660,100,140,000 | 36.012987 | 132 | 0.579298 | false |
asphalt-framework/asphalt-wamp | tests/test_client.py | 1 | 15009 | import asyncio
import logging
import os
import re
from typing import Dict, Any
import pytest
from autobahn.wamp import ApplicationError
from autobahn.wamp.types import Challenge, PublishOptions, CallOptions
from asphalt.core import executor, Context, qualified_name
from asphalt.exceptions import ExtrasProvider
from a... | apache-2.0 | -2,718,282,172,219,678,700 | 40.233516 | 98 | 0.62156 | false |
datagutten/comics | comics/accounts/urls.py | 1 | 4857 | from django.conf import settings
from django.conf.urls import patterns, url
from django.contrib.auth import views as auth_views
from django.views.generic.base import TemplateView
from invitation import views as invitation_views
from registration import views as reg_views
from comics.accounts.forms import (
Authen... | agpl-3.0 | -4,966,277,444,263,677,000 | 31.597315 | 78 | 0.579576 | false |
imoverclocked/ServoBot | apwm_home/controller/controller/wsgi.py | 1 | 1142 | """
WSGI config for controller project.
This module contains the WSGI application used by Django's development server
and any production WSGI deployments. It should expose a module-level variable
named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover
this application via the ``WSGI_APPLICATION... | mit | 6,876,020,816,911,958,000 | 39.785714 | 79 | 0.801226 | false |
bsquidwrd/Squid-Bot | gaming/migrations/0007_auto_20161029_2354.py | 1 | 1089 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-10-30 06:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.utils.timezone
class Migration(migrations.Migration):
dependencies = [
('gaming', '0006_auto_20161029_2347'),
]
operations = [
... | mit | -768,404,492,787,284,200 | 29.25 | 97 | 0.599633 | false |
hashbang/provisor | provisor/utils.py | 1 | 1845 | def drop_privileges(uid_name='nobody', gid_name='nogroup'):
import grp, pwd, os, resource
if os.getuid() != 0: # not root. #yolo
return
running_uid = pwd.getpwnam(uid_name).pw_uid
running_gid = grp.getgrnam(gid_name).gr_gid
os.setgroups([])
os.setgid(running_gid)
os.setuid(running... | mit | 5,792,575,811,254,287,000 | 28.758065 | 83 | 0.617344 | false |
dirn/Simon | tests/test_meta.py | 1 | 11888 | """Tests of the Meta class"""
try:
import unittest2 as unittest
except ImportError:
import unittest
from bson import ObjectId
import mock
import pymongo
from simon.meta import Meta
def skip_with_mongoclient(f):
if pymongo.version_tuple[:2] >= (2, 4):
return unittest.skip('`MongoClient` is suppo... | bsd-3-clause | -4,480,163,938,053,110,000 | 28.72 | 79 | 0.587904 | false |
abhijeet-talaulikar/Automatic-Helmet-Detection | K-Fold/Logistic_Regression.py | 1 | 2663 | import numpy as np
import matplotlib.pyplot as plt
from sklearn.metrics import roc_curve, auc
from sklearn.model_selection import KFold
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import *
from timeit import default_timer as timer
from random import randint
from sklearn.feature_selection im... | gpl-3.0 | -5,013,241,237,569,052,000 | 32.2875 | 142 | 0.662035 | false |
cristobaltapia/sajou | sajou/sections.py | 1 | 3525 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Define the classes and methods to work with sections.
"""
import numpy as np
class BeamSection(object):
"""Defines a beam section
Parameters
----------
name: str
name of the section
material: Material instance
material of the sect... | mit | 9,096,255,454,926,391,000 | 28.621849 | 73 | 0.41844 | false |
n3wb13/OpenNfrGui-5.0-1 | lib/python/Plugins/Extensions/MediaPortal/additions/fun/geo_de.py | 1 | 4389 | # -*- coding: utf-8 -*-
from Plugins.Extensions.MediaPortal.plugin import _
from Plugins.Extensions.MediaPortal.resources.imports import *
from Plugins.Extensions.MediaPortal.resources.simpleplayer import SimplePlayer, SimplePlaylist
from Plugins.Extensions.MediaPortal.resources.twagenthelper import twAgentGetPage
ST... | gpl-2.0 | 2,190,676,951,641,538,800 | 34.088 | 173 | 0.696693 | false |
osuripple/lets | helpers/aeshelper.py | 1 | 10866 | """
A pure python (slow) implementation of rijndael with a decent interface
To include -
from rijndael import rijndael
To do a key setup -
r = rijndael(key, block_size = 16)
key must be a string of length 16, 24, or 32
blocksize must be 16, 24, or 32. Default is 16
To use -
ciphertext = r.encrypt(plaintext)
plai... | agpl-3.0 | 8,741,889,376,303,064,000 | 23.200445 | 108 | 0.534511 | false |
googleapis/googleapis-gen | google/cloud/bigquery/datatransfer/v1/bigquery-datatransfer-v1-py/google/cloud/bigquery_datatransfer_v1/services/data_transfer_service/transports/__init__.py | 1 | 1239 | # -*- 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 | -2,402,536,470,973,751,000 | 36.545455 | 90 | 0.785311 | false |
martinjrobins/hobo | pints/tests/test_nested_ellipsoid_sampler.py | 1 | 7162 | #!/usr/bin/env python
#
# Tests ellipsoidal nested sampler.
#
# This file is part of PINTS.
# Copyright (c) 2017-2019, University of Oxford.
# For licensing information, see the LICENSE file distributed with the PINTS
# software package.
#
import unittest
import numpy as np
import pints
import pints.toy
# Unit tes... | bsd-3-clause | -975,578,752,272,847,100 | 36.108808 | 78 | 0.638928 | false |
lpramuk/robottelo | tests/foreman/cli/test_role.py | 1 | 45035 | # -*- encoding: utf-8 -*-
"""Test for Roles CLI
:Requirement: Role
:CaseAutomation: Automated
:CaseLevel: Acceptance
:CaseComponent: UsersRoles
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from math import ceil
from random import choice
from fauxfactory import gen_string
from robottelo.cli.bas... | gpl-3.0 | -738,638,804,037,887,600 | 32.508185 | 99 | 0.620784 | false |
thinkWhere/Roadnet | street_browser/add.py | 1 | 15108 | # -*- coding: utf-8 -*-
import datetime
from PyQt4.QtSql import QSqlQuery, QSqlQueryModel
from PyQt4.QtGui import QMessageBox, QLineEdit, QComboBox
from PyQt4.QtCore import Qt, QDate
from qgis.core import QgsMapLayerRegistry
from ..generic_functions import SwitchStreetBrowserMode, ZoomSelectCanvas, ipdb_breakpoint
f... | gpl-2.0 | -7,157,423,312,518,393,000 | 39.943089 | 121 | 0.601403 | false |
josephyli/py-db-cluster | runDDL.py | 1 | 9526 | import argparse
import os
import pymysql.cursors
import re
import sys
from ConfigParser import SafeConfigParser
from StringIO import StringIO
from pymysql import OperationalError
# returns a list of sql commands as strings
def read_DDL(ddlfilename):
f = open(ddlfilename, 'r')
ddlfile = f.read()
f.close()
temp = f... | gpl-3.0 | 3,556,770,068,061,387,300 | 32.780142 | 229 | 0.655364 | false |
alibozorgkhan/django-boilerplate | django_boilerplate/settings/base.py | 1 | 4882 | """
Django settings for django_boilerplate project.
Generated by 'django-admin startproject' using Django 1.10.5.
For more information on this file, see
https://docs.djangoproject.com/en/1.10/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.10/ref/settings/
"""... | mit | 2,478,633,743,751,343,000 | 28.409639 | 101 | 0.681073 | false |
djangraw/PsychoPyParadigms | Reading/DistractionTask_eyelink_d6.py | 1 | 30141 | #!/usr/bin/env python2
"""Display multi-page text with simultaneous auditory distractions, recording eye position data using the EyeLink eye tracker."""
# DistractionTask_eyelink_d6.py
# Created 3/16/15 by DJ based on VidLecTask.py
# Updated 3/31/15 by DJ - renamed from ReadingTask_dict_d2.py.
# Updated 4/1-16/15 by D... | mit | 7,485,308,004,066,379,000 | 41.572034 | 266 | 0.673103 | false |
stanford-gfx/Horus | Code/HorusApp/app/views.py | 1 | 19731 | from app import server, db, trajectoryAPI
from pylab import *
import flask
from flask import jsonify, request, url_for, redirect, render_template, abort
from flask.ext import restful
import requests
import math, time
import urllib2
import json
import os
from os import path
starting_lat = 0
starting_lng = 0
vehicle_mi... | bsd-3-clause | 2,205,061,663,268,043,300 | 33.07772 | 431 | 0.67959 | false |
DOV-Vlaanderen/pydov | tests/test_types_grondwatervergunning.py | 1 | 1531 | """Module grouping tests for the pydov.types.boring module."""
from pydov.types.grondwatervergunning import GrondwaterVergunning
from tests.abstract import AbstractTestTypes
location_wfs_getfeature = \
'tests/data/types/grondwatervergunning/wfsgetfeature.xml'
location_wfs_feature = 'tests/data/types/grondwaterver... | mit | -3,558,128,204,813,029,400 | 38.25641 | 74 | 0.692358 | false |
fake-name/ReadableWebProxy | amqpstorm/channel0.py | 1 | 6351 | """AMQPStorm Connection.Channel0."""
import logging
import platform
from pamqp import specification
from pamqp.heartbeat import Heartbeat
from amqpstorm import __version__
from amqpstorm.base import AUTH_MECHANISM
from amqpstorm.base import FRAME_MAX
from amqpstorm.base import LOCALE
from amqpstorm.base import MAX_C... | bsd-3-clause | -8,175,721,914,685,432,000 | 29.830097 | 78 | 0.571406 | false |
benjolitz/trollius-redis | trollius_redis/encoders.py | 1 | 2145 | """
The redis protocol only knows about bytes, but we like to have strings inside
Python. This file contains some helper classes for decoding the bytes to
strings and encoding the other way around. We also have a `BytesEncoder`, which
provides raw access to the redis server.
"""
__all__ = (
'BaseEncoder',
'Byt... | bsd-2-clause | -7,322,729,814,872,177,000 | 26.5 | 79 | 0.653613 | false |
kHarshit/DAT210x_Microsoft | Module2/assignment3.py | 1 | 1178 | import pandas as pd
# TODO: Load up the dataset Ensuring you set the appropriate header column names
df = pd.read_csv('Datasets/servo.data')
df.columns = ['motor', 'screw', 'pgain', 'vgain', 'class']
print(df.describe())
# TODO: Create a slice that contains all entries having a vgain equal to 5. Then print the lengt... | mit | 6,821,107,749,193,167,000 | 34.69697 | 129 | 0.684211 | false |
upptalk/uppsell | uppsell/migrations/0002_auto__add_unique_store_code__add_field_listing_price__chg_field_listin.py | 1 | 19453 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding unique constraint on 'Store', fields ['code']
db.create_unique('... | mit | 2,520,933,076,126,869,500 | 74.403101 | 189 | 0.55575 | false |
alexanderfefelov/nav | python/nav/web/status/sections.py | 1 | 29405 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2009, 2012 UNINETT AS
#
# This file is part of Network Administration Visualized (NAV).
#
# NAV is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by
# the Free Software Foundation.
#
# This prog... | gpl-2.0 | -2,737,846,190,334,382,000 | 32.294185 | 85 | 0.508648 | false |
projectarkc/arkc-server-gae | fetchfrom/goagent.py | 1 | 9320 | #!/usr/bin/env python
# coding:utf-8
__version__ = '3.2.0'
__password__ = ''
__hostsdeny__ = () # __hostsdeny__ = ('.youtube.com', '.youku.com')
import os
import re
import time
import struct
import zlib
import base64
import logging
import urlparse
import httplib
import io
import string
import json
from BaseHTTPServ... | gpl-2.0 | 4,217,351,065,966,016,500 | 33.64684 | 205 | 0.591094 | false |
kratorius/ads | python/interviewquestions/longest_sequence.py | 1 | 1730 | """
Given a list of distinct numbers, find the longest monotonically increasing
subsequence within that list.
For example:
S = [2, 4, 3, 5, 1, 7, 6, 9, 8] -> [2, 3, 5, 6, 8]
or [2, 4, 5, 7, 8]
or [2, 4, 5, 7, 9]
If there's more than one solut... | mit | 2,014,271,797,512,256,300 | 29.892857 | 88 | 0.546821 | false |
Yannig/ansible | lib/ansible/plugins/action/net_base.py | 1 | 7262 | # (c) 2015, Ansible Inc,
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Ansible is di... | gpl-3.0 | -8,083,114,629,988,565,000 | 43.280488 | 118 | 0.630956 | false |
F5Networks/f5-common-python | f5/bigiq/cm/device/licensing/pool/initial_activation.py | 1 | 1773 | # coding=utf-8
#
# 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 or a... | apache-2.0 | 1,947,570,729,455,576,800 | 36.702128 | 118 | 0.713883 | false |
CSD-Public/stonix | src/MacBuild/ramdisk/lib/environment.py | 1 | 30726 | #!/usr/bin/env python3
###############################################################################
# #
# Copyright 2019. Triad National Security, LLC. All rights reserved. #
# This program was produced under U.S. Government contrac... | gpl-2.0 | 8,765,713,703,017,385,000 | 32.145631 | 104 | 0.499837 | false |
ajbouh/tfi | src/tfi/main.py | 1 | 13541 | #!/usr/bin/env python
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import os
import os.path
import sys
import tempfile
import tfi
import tfi.driver
import tfi.driverconfig
from tfi.resolve.model import _detect_model_file_kind, _model_mo... | mit | 230,525,589,146,237,150 | 41.990476 | 972 | 0.600251 | false |
kzvyahin/cfme_tests | sprout/appliances/api.py | 1 | 17913 | # -*- coding: utf-8 -*-
import inspect
import json
import re
from celery import chain
from celery.result import AsyncResult
from datetime import datetime
from django.core.exceptions import ObjectDoesNotExist
from django.db import transaction
from django.http import HttpResponse
from django.shortcuts import render
from... | gpl-2.0 | -574,617,057,527,283,840 | 31.333935 | 100 | 0.639089 | false |
abramconnelly/genevieve | file_process/tasks.py | 1 | 5314 | """Tasks for analyzing genome/genetic data files"""
# absolute_import prevents conflicts between project celery.py file
# and the celery package.
from __future__ import absolute_import
import bz2
import csv
import gzip
import os
from random import randint
from celery import shared_task
from django.conf import settin... | mit | 4,513,550,672,840,500,000 | 37.230216 | 79 | 0.621754 | false |
centricular/meson | tools/cmake2meson.py | 1 | 10941 | #!/usr/bin/env python3
# Copyright 2014 Jussi Pakkanen
# 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 o... | apache-2.0 | 8,318,193,074,904,967,000 | 35.348837 | 115 | 0.452792 | false |
adyliu/mysql-connector-python | python2/tests/test_examples.py | 1 | 6610 | # -*- coding: utf-8 -*-
# MySQL Connector/Python - MySQL driver written in Python.
# Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
# MySQL Connector/Python is licensed under the terms of the GPLv2
# <http://www.gnu.org/licenses/old-licenses/gpl-2.0.html>, like most
# MySQL Connectors. Th... | gpl-2.0 | -8,095,006,123,662,199,000 | 34.72973 | 78 | 0.579879 | false |
clearcare/cc_dynamodb | tests/conftest.py | 1 | 1033 | from decimal import Decimal
import os.path
import pytest
AWS_DYNAMODB_CONFIG_PATH = os.path.join(os.path.dirname(__file__), 'dynamodb.yml')
@pytest.fixture
def fake_config():
import cc_dynamodb
cc_dynamodb.set_config(
table_config=AWS_DYNAMODB_CONFIG_PATH,
aws_access_key_id='<KEY>',
... | mit | 1,849,978,970,764,546,300 | 25.487179 | 82 | 0.53243 | false |
felixbb/forseti-security | google/cloud/security/scanner/audit/buckets_rules_engine.py | 1 | 8802 |
# 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 agreed to in writing, ... | apache-2.0 | -2,150,819,857,089,099,300 | 33.249027 | 84 | 0.586571 | false |
cyncyncyn/evette | languagefiles/language_irish_1.3.2.py | 1 | 68626 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
#Copyright (C) 2007 Adam Spencer - Free Veterinary Management Suite
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or ... | gpl-2.0 | -7,974,533,037,425,782,000 | 23.938619 | 163 | 0.665987 | false |
vernhart/flickr-moderate | common.py | 1 | 25143 | #!/usr/bin/env python3
from flickrapi import FlickrAPI, exceptions # Flickr API library
import os # get directory of script for config loading
import yaml # config file format
from pprint import pprint # for debugging
import re # for topic reply searchi... | mpl-2.0 | -4,186,878,343,005,086,000 | 39.61874 | 154 | 0.534861 | false |
JhonyVilla/blog | pelican-plugins/assets/assets.py | 1 | 2672 | # -*- coding: utf-8 -*-
"""
Asset management plugin for Pelican
===================================
This plugin allows you to use the `webassets`_ module to manage assets such as
CSS and JS files.
The ASSET_URL is set to a relative url to honor Pelican's RELATIVE_URLS
setting. This requires the use of SITEUR... | gpl-3.0 | -8,804,839,349,497,951,000 | 33.626667 | 83 | 0.666542 | false |
samuelmaudo/yepes | yepes/contrib/datamigrations/importation_plans/base.py | 1 | 5591 | # -*- coding:utf-8 -*-
from __future__ import unicode_literals
import collections
import operator
from django.db import transaction
from django.db.models import F, Q
from django.utils.six.moves import reduce
from django.utils.text import camel_case_to_spaces, capfirst
from yepes.contrib.datamigrations.exceptions im... | bsd-3-clause | 1,023,181,490,690,836,600 | 29.551913 | 102 | 0.519943 | false |
j-towns/fastar | fastar/test_util.py | 1 | 3377 | from itertools import chain
from random import shuffle
import numpy as np
from jax import numpy as jnp, test_util as jtu
from jax.util import safe_map, safe_zip
from jax.tree_util import tree_multimap, tree_flatten, tree_map
from fastar import lazy_eval, lazy_eval_fixed_point, LazyArray
map = safe_map
zip = safe_zip
... | mit | 8,212,361,584,758,945,000 | 34.177083 | 77 | 0.674267 | false |
walafc0/soclib | soclib/iss/iss_profiler/bin/iss_profiler2profile.py | 1 | 2939 | #!/usr/bin/env python
from dsx.util.objdumper import *
import sys
__id__ = "$Id: iss_profiler2profile.py 917 2009-03-12 10:10:06Z nipo $"
__version__ = "$Revision: 917 $"
class SymLooker:
def __init__(self, arch, obj):
self.__syms = {}
dumper = ObjDumper(arch, obj)
for section in dumper:
for sym in section... | lgpl-2.1 | -5,641,330,111,067,963,000 | 21.960938 | 100 | 0.638653 | false |
ayepezv/GAD_ERP | openerp/addons/test_impex/models.py | 2 | 4918 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import api, fields, models
def selection_fn(model):
return list(enumerate(["Corge", "Grault", "Wheee", "Moog"]))
def compute_fn(records):
for record in records:
record.value = 3
def inverse_f... | gpl-3.0 | 4,212,233,521,099,419,000 | 30.729032 | 89 | 0.618544 | false |
xuru/pyvisdk | pyvisdk/do/virtual_machine_file_layout.py | 1 | 1433 |
import logging
from pyvisdk.exceptions import InvalidArgumentError
########################################
# Automatically generated, do not edit.
########################################
log = logging.getLogger(__name__)
def VirtualMachineFileLayout(vim, *args, **kwargs):
'''Describes the set of files that ma... | mit | -7,937,865,886,592,713,000 | 35.769231 | 124 | 0.635729 | false |
steven-martins/Marking | back/marks/migrations/0001_initial.py | 1 | 3773 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
from django.conf import settings
import datetime
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
m... | mit | 3,561,885,093,581,885,000 | 34.59434 | 139 | 0.51789 | false |
linebp/pandas | pandas/tests/series/test_indexing.py | 1 | 88099 | # coding=utf-8
# pylint: disable-msg=E1101,W0612
import pytest
from datetime import datetime, timedelta
from numpy import nan
import numpy as np
import pandas as pd
import pandas._libs.index as _index
from pandas.core.dtypes.common import is_integer, is_scalar
from pandas import (Index, Series, DataFrame, isnull,
... | bsd-3-clause | -3,876,241,848,561,414,700 | 31.762737 | 79 | 0.525852 | false |
googlefonts/noto-emoji | materialize_emoji_images.py | 1 | 4076 | #!/usr/bin/env python3
#
# Copyright 2016 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requir... | apache-2.0 | 7,824,723,636,050,095,000 | 31.349206 | 83 | 0.652601 | false |
esacosta/u-mooc | common/schema_fields.py | 1 | 5958 | # Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -4,220,608,419,550,851,600 | 36.2375 | 80 | 0.596173 | false |
fedora-infra/the-new-hotness | hotness/exceptions/http_exception.py | 1 | 1465 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2021 Red Hat, Inc.
#
# 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 ... | lgpl-2.1 | -8,487,426,483,306,750,000 | 35.625 | 97 | 0.679863 | false |
LCBRU/reporter | reporter/uhl_reports/fast/data_quality/screening_clinic_redcap_dq.py | 1 | 3307 | #!/usr/bin/env python3
from reporter.core import Schedule
from reporter.connections import RedcapInstance
from reporter.emailing import (
RECIPIENT_FAST_MANAGER,
RECIPIENT_FAST_ADMIN,
)
from reporter.application_abstract_reports.redcap.data_quality import (
RedcapMissingDataWhen,
RedcapMissin... | mit | 8,472,242,262,794,943,000 | 29.198113 | 71 | 0.589054 | false |
dholbach/snapcraft | snapcraft/_options.py | 1 | 4962 | # -*- Mode:Python; indent-tabs-mode:nil; tab-width:4 -*-
#
# Copyright (C) 2016 Canonical Ltd
#
# This program 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 Software Foundation.
#
# This program is distributed in the h... | gpl-3.0 | 740,297,699,160,747,900 | 28.188235 | 79 | 0.592301 | false |
ekaakurniawan/Bioinformatics-Tools | DnC_LocalAlignment/DnC_LocalAlignment.py | 1 | 6963 | # Copyright (C) 2012 by Eka A. Kurniawan
# eka.a.kurniawan(ta)gmail(tod)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; version 2 of the License.
#
# This program is distributed in the hop... | gpl-2.0 | -8,100,298,384,511,656,000 | 28.629787 | 577 | 0.60922 | false |
charman2/rsas | examples/unsteady.py | 1 | 5254 | # -*- coding: utf-8 -*-
"""Storage selection (SAS) functions: example with multiple fluxes out at steady state
Runs the rSAS model for a synthetic dataset with one flux in and
multiple fluxes out and steady state flow
Theory is presented in:
Harman, C. J. (2014), Time-variable transit time distributions and transport... | mit | 1,715,018,500,754,261,800 | 35.234483 | 113 | 0.60906 | false |
Galarzaa90/NabBot | cogs/tracking.py | 1 | 83628 | # Copyright 2019 Allan Galarza
#
# 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 writi... | apache-2.0 | 2,001,326,355,620,940,500 | 47.838201 | 120 | 0.590449 | false |
Fiona/AreWeAlone | __main__.py | 1 | 4157 | ##########
# LD 22
# The theme is alone
# it's a dumb theme
# fiona wrote this
##########
# System and Python lib imports
import sys
sys.path += ['.']
# Game engine imports
from myrmidon.myrmidon import MyrmidonGame, MyrmidonProcess
from myrmidon.consts import *
from pygame.locals import *
# Game imp... | mit | 1,547,291,332,813,934,600 | 27.06993 | 117 | 0.570604 | false |
BatedUrGonnaDie/salty_bot | modules/helpers/yt_video_link.py | 1 | 1246 | #! /usr/bin/env python3.7
import re
import isodate
import modules.extensions.regexes as regexes
import modules.commands.helpers.time_formatter as time_formatter
ON_ACTION = "PRIVMSG"
def call(salty_inst, c_msg, balancer, **kwargs):
video_ids = re.findall(regexes.YOUTUBE_URL, c_msg["message"])
if not video... | mit | -6,777,776,183,059,641,000 | 32.675676 | 104 | 0.623596 | false |
google/tf_mesh_renderer | mesh_renderer/rasterize_triangles_test.py | 1 | 7681 | # Copyright 2017 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 | -5,375,903,968,414,628,000 | 38.188776 | 80 | 0.622836 | false |
crask/redisproxy | test/memcache/memcache.py | 1 | 15420 | # Copyright 2012 Mixpanel, 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... | apache-2.0 | -2,465,647,685,932,409,000 | 37.074074 | 114 | 0.569455 | false |
sterlingbaldwin/acme_workbench | workbench-backend/index/tests.py | 1 | 3781 | import json
from django.test import TestCase
from django.test import Client
class IndexViewTests(TestCase):
fixtures = ['seed.json']
"""
Tests for the Index app views
"""
def test_get_index(self):
"""
Test that the index page returns success
"""
client = Client()
... | bsd-2-clause | 3,293,972,023,252,596,000 | 28.310078 | 72 | 0.530283 | false |
lixiangning888/whole_project | lib/cuckoo/common/demux.py | 1 | 7192 | # Copyright (C) 2015 Accuvant, Inc. (bspengler@accuvant.com)
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import os
import tempfile
from zipfile import ZipFile
try:
from rarfile import RarFile
HAS_RARFILE = True
except ImportError:
... | lgpl-3.0 | -6,092,322,796,231,694,000 | 33.411483 | 123 | 0.535595 | false |
jeromecc/doctoctocbot | src/customer/forms.py | 1 | 3367 | from django import forms
from django.utils.translation import ugettext_lazy as _
from django_countries.fields import CountryField
from crispy_forms.helper import FormHelper
from crispy_forms.layout import Submit
from customer.models import Customer
from bootstrap_modal_forms.forms import BSModalForm, BSModalModelForm... | mpl-2.0 | 2,314,816,419,920,023,000 | 28.535088 | 82 | 0.591922 | false |
rain87/pc-health | create_graph.py | 1 | 6855 | #!/usr/bin/python
# coding=utf8
import rrd_config as C
import os
import subprocess
from collections import namedtuple
import gzip
import sys
import itertools
from smart_attributes import names as smart_names
DataSource = namedtuple('DataSource', 'db_fname field legend is_area color stack')
DataSource.__new__.__defau... | mit | -2,728,556,869,338,496,500 | 54.723577 | 162 | 0.626204 | false |
dendory/chartjs | sample3.py | 1 | 5887 | # This script parses the CSV files gathered from the Canadian Weather Service and makes charts
import chartjs
import csv
# We will cover these years
startyear = 1981
endyear = 2012
# We will make charts for 3 major Canadian cities
cities = [
{'name': "Montreal", 'fillColor': "rgba(100,50,200,0.25)", 'strok... | mit | 831,402,048,602,100,100 | 39.167832 | 216 | 0.660608 | false |
MSHallOpenSoft/plotter | GUI_final.py | 1 | 59129 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'GUI_final.ui'
#
# Created: Thu Mar 19 22:03:17 2015
# by: PyQt4 UI code generator 4.11.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except Attr... | gpl-2.0 | -4,134,462,761,231,112,000 | 56.969608 | 268 | 0.698557 | false |
ifp-uiuc/do-neural-networks-learn-faus-iccvw-2015 | ck_plus/cnn_ad/train.py | 1 | 3697 | import argparse
import os
import sys
sys.path.append('..')
import numpy
from anna import util
from anna.datasets import supervised_dataset
#from anna.datasets.supervised_data_loader import SupervisedDataLoaderCrossVal
import data_fold_loader
import data_paths
from model import SupervisedModel
parser = argparse.Arg... | bsd-3-clause | -8,914,378,663,641,386,000 | 33.551402 | 89 | 0.675683 | false |
all-of-us/raw-data-repository | tests/service_tests/consent_tests/test_consent_validation.py | 1 | 12558 | from datetime import datetime, timedelta
import json
import mock
from typing import List, Type
from rdr_service.model.consent_file import ConsentFile, ConsentSyncStatus, ConsentType
from rdr_service.model.hpo import HPO
from rdr_service.model.participant_summary import ParticipantSummary
from rdr_service.services.cons... | bsd-3-clause | -6,291,842,177,331,229,000 | 39.121406 | 117 | 0.558847 | false |
radjkarl/imgProcessor | imgProcessor/imgSignal.py | 1 | 10847 | from __future__ import division
from __future__ import print_function
import numpy as np
import cv2
from imgProcessor.imgIO import imread
from imgProcessor.measure.FitHistogramPeaks import FitHistogramPeaks
from fancytools.math.findXAt import findXAt
# from scipy.optimize.minpack import curve_fit
MAX_SIZE =... | gpl-3.0 | 7,949,265,973,686,205,000 | 26.028424 | 78 | 0.553425 | false |
fumitoh/modelx | modelx/tests/core/reference/relative/test_refmode.py | 1 | 2034 | import modelx as mx
import pytest
@pytest.fixture
def refmode_model():
"""
A---B---C---foo <-+
| | |
| +---bar --+
D
"""
import modelx as mx
m = mx.new_model()
A = mx.new_space('A')
B = A.new_space('B')
C = B.new_space('C')
@mx.d... | gpl-3.0 | -1,664,453,725,808,355,300 | 17 | 54 | 0.457227 | false |
Osmose/normandy | recipe-server/normandy/recipes/migrations/0021_migrate_to_single_actions.py | 1 | 1111 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-03-16 19:55
# flake8: noqa
from __future__ import unicode_literals
from django.db import migrations
def multiple_to_single(apps, schema_editor):
"""
Take the first action in a recipe and set it as the single action.
"""
Recipe = apps.get_model... | mpl-2.0 | -8,590,091,028,667,492,000 | 30.742857 | 100 | 0.647165 | false |
HoussemCharf/FunUtils | pythonMergeSort.py | 1 | 2025 | """
This is a pure python implementation of the merge sort algorithm
For doctests run following command:
python -m doctest -v merge_sort.py
or
python3 -m doctest -v merge_sort.py
For manual testing run:
python merge_sort.py
"""
from __future__ import print_function
def merge_sort(collection):
"""Pure... | mit | -4,175,166,591,996,086,300 | 26.957143 | 73 | 0.545185 | false |
walterbender/locosugar | toolbar_utils.py | 1 | 5547 | # -*- coding: utf-8 -*-
# Copyright (c) 2011, Walter Bender
# Copyright (c) 2012, Ignacio Rodriguez
# 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... | gpl-3.0 | -9,041,999,313,022,829,000 | 33.240741 | 75 | 0.658194 | false |
ionux/bitforge | tests/unit.py | 1 | 1117 | from bitforge.unit import Unit
class TestUnit:
def test_btc_accessors(self):
u = Unit(btc = 1.2)
assert u.btc == 1.2
assert u.mbtc == 1200
assert u.bits == 1200000
assert u.satoshis == 120000000
def test_btc_conversion(self):
u = Unit(btc = 1.3)
assert... | mit | 5,227,069,257,949,842,000 | 24.386364 | 54 | 0.522829 | false |
markbenvenuto/buildbaron | bfg_analyzer.py | 1 | 24487 | #!/usr/bin/env python3
"""
Script to analyze the Jira Build Baron Queue
"""
import argparse
import binascii
import datetime
import dateutil
import dateutil.relativedelta
import hashlib
import json
import os
import pprint
import re
import requests
import stat
import sys
if __name__ == "__main__" and __package__ is None... | apache-2.0 | -1,692,208,233,766,159,000 | 34.283862 | 100 | 0.556663 | false |
jjscarafia/CUPS-Cloud-Print | reportissues.py | 2 | 2412 | #! /bin/sh
"true" '''\'
if command -v python2 > /dev/null; then
exec python2 "$0" "$@"
else
exec python "$0" "$@"
fi
exit $?
'''
# CUPS Cloudprint - Print via Google Cloud Print
# Copyright (C) 2013 Simon Cadman
#
# This program is free software: you can redistribute it and/or modify
# it under the ter... | gpl-3.0 | -9,007,118,623,980,421,000 | 32.5 | 97 | 0.648425 | false |
gzamboni/sdnResilience | loxi/of14/queue_stats_prop.py | 1 | 3603 | # Copyright (c) 2008 The Board of Trustees of The Leland Stanford Junior University
# Copyright (c) 2011, 2012 Open Networking Foundation
# Copyright (c) 2012, 2013 Big Switch Networks, Inc.
# See the file LICENSE.pyloxi which should have been included in the source distribution
# Automatically generated by LOXI from ... | gpl-2.0 | 4,146,537,638,850,166,000 | 27.824 | 88 | 0.566472 | false |
googleapis/python-bigquery | samples/snippets/view_test.py | 1 | 3789 | # 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 agreed to in writing, s... | apache-2.0 | -6,257,050,349,015,454,000 | 31.384615 | 84 | 0.676432 | false |
virtualopensystems/nova | nova/virt/hyperv/driver.py | 1 | 9838 | # Copyright (c) 2010 Cloud.com, Inc
# Copyright (c) 2012 Cloudbase Solutions Srl
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.... | apache-2.0 | 4,809,147,517,281,367,000 | 43.116592 | 79 | 0.582639 | false |
MediaMath/qasino | lib/zmq_requestor.py | 1 | 2310 | # Copyright (C) 2014 MediaMath, Inc. <http://www.mediamath.com>
#
# 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 appli... | apache-2.0 | 5,312,493,586,066,515,000 | 38.827586 | 102 | 0.679654 | false |
scionrep/scioncc | src/pyon/util/containers.py | 1 | 14330 | """ General purpose util classes and functions """
__author__ = 'Adam R. Smith, Michael Meisinger'
import collections
import datetime
import importlib
import string
import time
import simplejson
import base64
import uuid
import os
import re
from types import NoneType
from copy import deepcopy
DICT_LOCKING_ATTR = "__... | bsd-2-clause | 2,506,083,733,855,044,600 | 33.200477 | 108 | 0.625611 | false |
uweschmitt/emzed | libms/WebserviceClients/Metlin.py | 1 | 3159 | import pdb
#encoding:latin-1
import requests
import urllib2
import userConfig
from collections import OrderedDict
from ..DataStructures.Table import Table
class MetlinMatcher(object):
ws_col_names = [ "formula", "mass", "name", "molid"]
ws_col_types = [ str, float, str, int]
ws_col_formats = [ "%s", "%.... | gpl-3.0 | -3,001,720,266,134,262,300 | 32.967742 | 79 | 0.566318 | false |
KatiRG/flyingpigeon | flyingpigeon/processes/wps_subset_continents.py | 1 | 5476 | import os
import tarfile
from flyingpigeon.subset import clipping
from flyingpigeon.subset import _CONTINENTS_
from pywps.Process import WPSProcess
from flyingpigeon.log import init_process_logger
import logging
logger = logging.getLogger(__name__)
class subset_continentsProcess(WPSProcess):
def __init__(self)... | apache-2.0 | -3,787,420,159,431,396,400 | 33.658228 | 112 | 0.546567 | false |
dthain/cctools | chirp/src/bindings/python3/chirp.binding.py | 1 | 22700 | ## @package ChirpPython
#
# Python Chirp bindings.
#
# The objects and methods provided by this package correspond to the native
# C API in @ref chirp_reli.h and chirp_swig_wrap.h
#
# The SWIG-based Python bindings provide a higher-level interface that
# revolves around:
#
# - @ref Chirp.Client
# - @ref Chirp.Stat
impo... | gpl-2.0 | -854,934,521,074,259,500 | 33.869432 | 118 | 0.574758 | false |
windskyer/nova | nova/tests/unit/virt/xenapi/test_xenapi.py | 1 | 177617 | # Copyright (c) 2010 Citrix Systems, 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 applicab... | gpl-2.0 | 8,827,661,696,526,691,000 | 41.512446 | 79 | 0.562598 | false |
RudolfCardinal/crate | crate_anon/nlp_manager/cloud_request_sender.py | 1 | 12012 | #!/usr/bin/env python
"""
crate_anon/nlp_manager/cloud_request_sender.py
===============================================================================
Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify
... | gpl-3.0 | -5,249,729,148,744,573,000 | 34.75 | 93 | 0.565851 | false |
tchellomello/home-assistant | homeassistant/components/vesync/switch.py | 1 | 3309 | """Support for VeSync switches."""
import logging
from homeassistant.components.switch import SwitchEntity
from homeassistant.core import callback
from homeassistant.helpers.dispatcher import async_dispatcher_connect
from .common import VeSyncDevice
from .const import DOMAIN, VS_DISCOVERY, VS_DISPATCHERS, VS_SWITCHES... | apache-2.0 | -3,332,572,542,167,740,000 | 29.925234 | 81 | 0.642188 | false |
openqt/algorithms | projecteuler/pe368-a-kempner-like-series.py | 1 | 1219 | #!/usr/bin/env python
# coding=utf-8
"""368. A Kempner-like series
https://projecteuler.net/problem=368
The **harmonic series** $1 + \dfrac{1}{2} + \dfrac{1}{3} + \dfrac{1}{4} + ...$
is well known to be divergent.
If we however omit from this series every term where the denominator has a 9
in it, the series remarkab... | gpl-3.0 | 5,967,106,988,400,226,000 | 39.633333 | 79 | 0.701395 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.