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 |
|---|---|---|---|---|---|---|---|---|---|---|
drongo-framework/drongo-wing-auth | wing_auth/views.py | 1 | 1681 | from drongo_utils.helpers import URLHelper
from wing_jinja2 import Jinja2
url = URLHelper.url
template = Jinja2.template
class AuthViews(object):
def __init__(self, app, module, base_url):
self.app = app
self.module = module
self.base_url = base_url
URLHelper.mount(app, self, b... | mit | -2,225,894,349,991,006,000 | 24.469697 | 55 | 0.545509 | false |
malaonline/Server | server/app/migrations/0064_auto_20160201_1843.py | 1 | 1150 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-01 10:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('app', '0063_auto_20160201_1830'),
]
operations = [
... | mit | -8,703,896,778,187,276,000 | 31.857143 | 136 | 0.610435 | false |
ankitrgadiya/cs50 | project/miki/miki/edit.py | 1 | 2137 | import os
from flask import (
Blueprint, flash, g, redirect, render_template, request, url_for,
current_app, Markup
)
from markdown import markdown
from werkzeug.exceptions import abort
from miki.auth import login_required
from miki.db import connect
bp = Blueprint('edit', __name__)
@bp.app_template_filt... | gpl-3.0 | -4,613,021,155,570,770,000 | 23.848837 | 69 | 0.542349 | false |
erh3cq/hyperspy | hyperspy/tests/io/test_io.py | 1 | 6593 | # -*- coding: utf-8 -*-
# Copyright 2007-2020 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 | -7,554,021,842,762,585,000 | 31.638614 | 88 | 0.635219 | false |
william-richard/moto | moto/dynamodb2/exceptions.py | 1 | 5931 | class InvalidIndexNameError(ValueError):
pass
class MockValidationException(ValueError):
def __init__(self, message):
self.exception_msg = message
class InvalidUpdateExpressionInvalidDocumentPath(MockValidationException):
invalid_update_expression_msg = (
"The document path provided in t... | apache-2.0 | -7,290,487,194,947,429,000 | 33.283237 | 134 | 0.685888 | false |
tisnik/fabric8-analytics-common | vscode-visual-tests/features/src/gui.py | 1 | 4392 | # vim: set fileencoding=utf-8
"""Common functions for GUI-related tests."""
from PIL import Image
from os import path
from src.litava import locate_on_screen_using_litava
TYPING_INTERVAL = 0.25
DIRECTORY_WITH_REGIONS = "regions"
OUTPUT_DIRECTORY = "."
def perform_move_mouse_cursor(context, x=0, y=0):
"""Move... | apache-2.0 | -6,515,741,662,497,905,000 | 32.784615 | 95 | 0.698315 | false |
Nexedi/neoppod | neo/tests/testNodes.py | 1 | 9767 | #
# Copyright (C) 2009-2019 Nexedi SA
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed... | gpl-2.0 | 4,305,936,565,825,689,000 | 36.856589 | 93 | 0.62404 | false |
jeremiedecock/snippets | python/pyqt/pyqt5/widget_QTableView_delegate_on_edit_using_spinbox_widget.py | 1 | 4158 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Ref:
# - http://doc.qt.io/qt-5/modelview.html#3-4-delegates
# - http://doc.qt.io/qt-5/model-view-programming.html#delegate-classes
# - http://doc.qt.io/qt-5/qabstractitemdelegate.html#details
# - http://doc.qt.io/qt-5/qitemdelegate.html#details
# - http://doc.qt.io/qt-5... | mit | -5,714,131,013,226,474,000 | 33.081967 | 133 | 0.616402 | false |
belbio/bel_api | sphinx/source/conf.py | 1 | 6092 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# BEL.bio API documentation build configuration file, created by
# sphinx-quickstart on Mon Dec 11 15:42:18 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
... | apache-2.0 | 4,684,339,828,290,354,000 | 29.009852 | 107 | 0.669402 | false |
AutorestCI/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/models/patch_route_filter.py | 1 | 2686 | # 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 ... | mit | -656,485,033,284,707,300 | 36.830986 | 91 | 0.599777 | false |
googleads/google-ads-python | google/ads/googleads/v6/services/services/carrier_constant_service/client.py | 1 | 17815 | # -*- 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 o... | apache-2.0 | 2,523,804,490,509,615,000 | 39.488636 | 136 | 0.623463 | false |
chocopoche/mangopay2-python-sdk | tests/test_disputes.py | 1 | 12287 | import base64
import os
import time
import unittest
from mangopay.resources import Dispute, PayIn, DisputeDocument, SettlementTransfer, DisputeDocumentPage
from mangopay.utils import Money
from tests.test_base import BaseTestLive
# Comment following line to run DisputeTest
@unittest.skip('Skip dispute tests because ... | mit | -9,202,181,937,121,827,000 | 34.718023 | 159 | 0.61561 | false |
Aalto-LeTech/a-plus | shibboleth_login/auth_backend.py | 1 | 6416 | import logging
import urllib.parse
from django.contrib.auth import get_user_model
from django.contrib.auth.backends import ModelBackend
from django.shortcuts import redirect
from .apps import app_settings, env_settings
from .parser import Parser
logger = logging.getLogger('aplus.shibboleth')
class ShibbolethAuthB... | gpl-3.0 | 8,581,214,611,712,775,000 | 37.884848 | 94 | 0.580268 | false |
Komodo/macros | Reflow_tower.py | 1 | 1901 | # This macro is to reorder selected lines, so that the shortest will be
# pushed to top, the longest will go to bottom (look like a tower).
#
# The macro is useful to reorder Python's "import" lines.
#
# Author: Nguyễn Hồng Quân (ng.hong.quan@gmail.com)
import eollib
from xpcom import components
viewSvc = components.... | mpl-2.0 | 1,604,087,599,337,519,600 | 33.472727 | 79 | 0.712025 | false |
alisheykhi/SocialPDA | graph_util.py | 1 | 8934 | import re,collections,operator
import networkx as nx
from privacy_level import privacy_level_generator
from numpy.random import zipf
from math import ceil
class ReadGraph():
extension = []
G = nx.Graph()
properties = {}
nodes = []
edges = []
privacy_level = []
sorted_degree_sequence = []
... | apache-2.0 | -4,987,266,179,027,643,000 | 39.243243 | 143 | 0.504589 | false |
aringh/odl | odl/solvers/nonsmooth/forward_backward.py | 1 | 6886 | # Copyright 2014-2017 The ODL contributors
#
# This file is part of ODL.
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at https://mozilla.org/MPL/2.0/.
"""Optimization methods based on a forward-b... | mpl-2.0 | -3,281,394,788,236,555,000 | 35.242105 | 79 | 0.609352 | false |
happy5214/pywikibot-core | pywikibot/comms/threadedhttp.py | 1 | 5773 | # -*- coding: utf-8 -*-
"""Http backend layer, formerly providing a httplib2 wrapper."""
from __future__ import absolute_import, unicode_literals
# (C) Pywikibot team, 2007-2015
__version__ = '$Id$'
__docformat__ = 'epytext'
# standard python libraries
import codecs
import sys
if sys.version_info[0] > 2:
from ur... | mit | -4,610,961,845,625,407,500 | 29.544974 | 79 | 0.556556 | false |
shaunokeefe/hoponit | hoponit/harvest/management/commands/api.py | 1 | 1352 | from django.core.management.base import BaseCommand, CommandError
from django.conf import settings
from harvest import untappd
class Command(BaseCommand):
args = '<poll_id poll_id ...>'
help = 'Closes the specified poll for voting'
def handle(self, *args, **options):
cmd = args[0]
u = un... | mit | -7,560,068,598,439,669,000 | 29.044444 | 73 | 0.542899 | false |
andela-ooshodi/codango-debug | codango/resources/tests/test_routes.py | 1 | 3625 | from django.test import Client, TestCase
from django.contrib.auth.models import User
from django.core.urlresolvers import reverse
from resources.models import Resource
from django.test.utils import setup_test_environment
setup_test_environment()
class CommunityViewTest(TestCase):
def setUp(self):
self.c... | mit | 8,126,015,275,894,616,000 | 37.157895 | 78 | 0.622897 | false |
MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_xdr.py | 1 | 29773 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | gpl-2.0 | 1,926,006,717,862,227,500 | 34.444048 | 85 | 0.604004 | false |
tonybaloney/st2 | st2actions/tests/integration/test_resultstracker.py | 1 | 13359 | import eventlet
import mock
import st2actions.resultstracker.resultstracker as results_tracker
from st2common.constants import action as action_constants
from st2common.exceptions.db import StackStormDBObjectNotFoundError
from st2common.persistence.action import Action
from st2common.persistence.executionstate import ... | apache-2.0 | 9,160,031,561,587,060,000 | 40.616822 | 96 | 0.659555 | false |
freedomtan/tensorflow | tensorflow/python/tpu/tpu_outside_compilation_test.py | 2 | 22688 | # Copyright 2020 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,471,741,532,479,555,000 | 30.511111 | 94 | 0.650432 | false |
atomictom/WiseGuy | old_sequential_nn.py | 1 | 3808 | # Neural Network
# -- nn.py
#
# @package NeuralNetwork
import Queue
import random
import math
import time
import threading
NUM_THREADS = 1
NUM_TESTS = 100
NUM_INPUTS = 50
NUM_HIDDEN = 30
NUM_OUTPUTS = 50
USE_BACKPROPOGATE = True
OUTPUTS = []
# test_input = [ .0, .3, .6, .2, .8 ]
class Node:
def __init__(self):... | gpl-3.0 | 5,303,224,215,373,582,000 | 23.254777 | 86 | 0.591649 | false |
openstack/monasca-persister | monasca_persister/repositories/influxdb/abstract_repository.py | 1 | 3517 | # (C) Copyright 2016-2017 Hewlett Packard Enterprise Development LP
#
# 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 | 7,030,092,911,305,735,000 | 45.276316 | 96 | 0.589423 | false |
hsmade/expenses | expenses/migrations/0001_initial.py | 1 | 3009 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
]
operations = [
migrations.CreateModel(
name='Deposit',
fields=[
('id', models.AutoField(verb... | gpl-2.0 | 1,071,978,329,737,851,000 | 41.380282 | 129 | 0.549684 | false |
Microvellum/Fluid-Designer | win64-vc/2.78/Python/bin/2.78/scripts/addons/oscurart_tools/oscurart_render.py | 1 | 16832 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distrib... | gpl-3.0 | -1,883,779,148,697,409,800 | 33.483607 | 288 | 0.573508 | false |
fajran/tempel | src/tempel/settings.py | 1 | 3006 | DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
)
MANAGERS = ADMINS
DATABASE_ENGINE = 'sqlite3'
DATABASE_NAME = 'tempel.db'
DATABASE_USER = ''
DATABASE_PASSWORD = ''
DATABASE_HOST = ''
DATABASE_PORT = ''
TIME_ZONE = 'Asia/Jakarta'
LANGUAGE_CODE = 'en'
SITE_ID = 1
USE_I18N = False
import os
MEDIA_ROOT = os.path.j... | agpl-3.0 | 2,420,023,313,409,658,000 | 31.673913 | 80 | 0.531936 | false |
fabsx00/chucky-old | tools/functionAnomaly/Ranker.py | 1 | 1907 | import pickle
from scipy.spatial.distance import squareform
import os
from mlutils.anomalyDetection.anomalyCalculator import AnomalyCalculator
from RankingEntry import RankingEntry
class Ranker:
def __init__(self, projectRoot):
self.projectRoot = projectRoot
def loadTermDocMatrix(self):
... | gpl-3.0 | -3,632,520,410,175,390,700 | 30.278689 | 81 | 0.643419 | false |
CzechHackathon2014/juice-my-device | jmd/web/views.py | 1 | 2699 | from django.shortcuts import render
from places.forms import LocationForm
# Create your views here.
def home(request, tmpl='web/home.html'):
data = {}
loc_form = LocationForm(request.POST or None)
data['locaction_form'] = loc_form
return render(request, tmpl, data)
# from django.conf import setting... | mit | 2,596,081,016,116,069,000 | 32.75 | 165 | 0.587996 | false |
tschaume/pymatgen | pymatgen/core/periodic_table.py | 1 | 49560 | # coding: utf-8
# Copyright (c) Pymatgen Development Team.
# Distributed under the terms of the MIT License.
"""Module contains classes presenting Element and Specie (Element + oxidation state) and PeriodicTable."""
import re
import json
import warnings
from io import open
from pathlib import Path
from enum import En... | mit | 5,697,098,511,376,204,000 | 30.466032 | 106 | 0.528804 | false |
bgris/ODL_bgris | examples/ufunc_ops/ufunc_composition.py | 1 | 1121 | """Examples of using the ufunc (Universal Function) functionals in ODL.
Here we demonstrate how the functionals can be composed with other operators
and functionals in order to achieve more complicated functions.
We create the L2-norm squared in two ways, first using the built in
L2NormSquared functional, and also by... | gpl-3.0 | -8,595,268,509,273,610,000 | 36.366667 | 78 | 0.722569 | false |
NewEvolution/python-webapp | pythonapp/settings.py | 1 | 3002 | """
Django settings for pythonapp project.
Generated by 'django-admin startproject' using Django 1.8.4.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pa... | mit | 2,576,626,741,817,498,600 | 26.290909 | 71 | 0.659227 | false |
yugangw-msft/azure-cli | src/azure-cli/azure/cli/command_modules/acs/tests/latest/test_service_principals.py | 3 | 3950 | # --------------------------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# --------------------------------------------------------------------... | mit | 1,282,119,817,892,920,800 | 36.619048 | 94 | 0.613418 | false |
indrajitr/ansible | test/lib/ansible_test/_data/sanity/validate-modules/validate_modules/main.py | 1 | 106596 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Matt Martz <matt@sivel.net>
# Copyright (C) 2015 Rackspace US, 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 3 of ... | gpl-3.0 | 4,129,365,761,759,745,000 | 42.561913 | 157 | 0.487542 | false |
updownlife/multipleK | dependencies/biopython-1.65/Tests/test_GACrossover.py | 1 | 18105 | #!/usr/bin/env python
"""Tests different Genetic Algorithm crossover classes.
"""
# standard library
import unittest
# biopython
from Bio.Seq import MutableSeq
from Bio.Alphabet import SingleLetterAlphabet
# local stuff
from Bio.GA.Organism import Organism
from Bio.GA.Crossover.General import SafeFitnessCrossover
fro... | gpl-2.0 | 2,750,946,505,808,609,300 | 41.006961 | 87 | 0.572328 | false |
Titan-C/scikit-learn | examples/cluster/plot_ward_structured_vs_unstructured.py | 1 | 3369 | """
===========================================================
Hierarchical clustering: structured vs unstructured ward
===========================================================
Example builds a swiss roll dataset and runs
hierarchical clustering on their position.
For more information, see :ref:`hierarchical_clus... | bsd-3-clause | 3,837,792,158,449,737,700 | 36.021978 | 79 | 0.591273 | false |
petebachant/PXL | pxl/tests/test_fdiff.py | 1 | 1436 | from __future__ import division, print_function
from .. import fdiff
from ..fdiff import *
import matplotlib.pyplot as plt
import pandas as pd
import os
import numpy as np
from uncertainties import unumpy
plot = False
def test_second_order_diff():
"""Test `second_order_diff`."""
# Create a non-equally space... | gpl-3.0 | 5,033,398,059,606,500,000 | 31.636364 | 80 | 0.598189 | false |
csitarichie/boost_msm_bare_metal | boost/tools/build/v2/test/BoostBuild.py | 2 | 32715 | # Copyright 2002-2005 Vladimir Prus.
# Copyright 2002-2003 Dave Abrahams.
# Copyright 2006 Rene Rivera.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
import TestCmd
import copy
import fnmatch
import gl... | gpl-2.0 | 5,337,653,907,346,510,000 | 34.832421 | 117 | 0.535473 | false |
bgaunt/openEcslent | engine/squadAI.py | 2 | 3788 | #---------------------------------------------------------------------------
# Copyright 2010, 2011 Sushil J. Louis and Christopher E. Miles,
# Evolutionary Computing Systems Laboratory, Department of Computer Science
# and Engineering, University of Nevada, Reno.
#
# This file is part of OpenECSLENT
#
# OpenECS... | gpl-3.0 | -829,340,554,603,509,400 | 32.821429 | 106 | 0.63226 | false |
qwefi/nova | nova/db/api.py | 1 | 59796 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright (c) 2011 X.commerce, a business unit of eBay Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 | 1,774,374,017,101,377,300 | 31.604144 | 79 | 0.665897 | false |
chhsiao1981/f6a_tw_crawler | f6a_tw_crawler/main.py | 1 | 2575 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from f6a_tw_crawler.constants import *
import gevent.monkey; gevent.monkey.patch_all()
from bottle import Bottle, request, response, route, run, post, get, static_file, redirect, HTTPError, view, template
import random
import math
import base64
import time
import ujson ... | mit | -8,639,354,462,411,019,000 | 25.822917 | 117 | 0.667573 | false |
Erotemic/local | git_tools/git_xadd.py | 1 | 4330 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Adds and commits a change to a local branch (but not the current one)
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import git
# import sys
class CheckoutContext(object):
def __init__(self, repo):
self.repo = repo
... | gpl-3.0 | -8,634,392,987,533,247,000 | 32.307692 | 105 | 0.569746 | false |
gregoil/rotest | tests/api/resource_control/test_lock_resources.py | 1 | 8138 | """Basic unittests for the server resource control operations."""
from __future__ import absolute_import
from functools import partial
from six.moves import http_client
from django.contrib.auth.models import User
from django.test import Client, TransactionTestCase
from rotest.management.models import DemoComplexReso... | mit | 8,388,351,127,183,234,000 | 35.493274 | 75 | 0.53072 | false |
liosha2007/temporary-groupdocs-python-sdk | groupdocs/models/SignatureContactResponse.py | 1 | 1166 | #!/usr/bin/env python
"""
Copyright 2012 GroupDocs.
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... | apache-2.0 | -5,966,642,128,788,468,000 | 29.684211 | 77 | 0.650086 | false |
wbsavage/shinken | shinken/log.py | 1 | 8631 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (C) 2009-2012:
# Gabes Jean, naparuba@gmail.com
# Gerhard Lausser, Gerhard.Lausser@consol.de
# Gregory Starck, g.starck@gmail.com
# Hartmut Goebel, h.goebel@goebel-consult.de
#
# This file is part of Shinken.
#
# Shinken is free software: you c... | agpl-3.0 | -2,778,704,645,423,375,400 | 31.942748 | 104 | 0.594717 | false |
whaleygeek/punchcard_reader | cardreader/arduino.py | 1 | 3715 | # arduino.py 20/06/2015 D.J.Whale
#
# (c) 2015 D.J.Whale
#
# Read card records from an arduino card reader.
#----- CONFIGURATION -----------------------------------------------------------
DEBUG = False
USE_EMBEDDED_PYSERIAL = True
BAUD = 115200
ENABLE_ERROR_CORRECT = False
if US... | mit | 5,137,636,407,564,047,000 | 18.051282 | 80 | 0.563392 | false |
bitmazk/django-dynamic-content | dynamic_content/south_migrations/0001_initial.py | 1 | 2962 | # flake8: noqa
# -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'DynamicContentTranslation'
db.create_table... | mit | 8,530,690,097,504,096,000 | 50.068966 | 178 | 0.642471 | false |
eldarion/pycon | pycon/sponsorship/managers.py | 1 | 1557 | from django.db import models
class SponsorManager(models.Manager):
def active(self):
return self.get_query_set().filter(active=True).order_by("level")
def with_weblogo(self):
queryset = self.raw("""
SELECT DISTINCT
"sponsorship_sponsor"."id",
"sponsorship_... | bsd-3-clause | -1,580,691,195,747,468,800 | 39.973684 | 120 | 0.583815 | false |
campadrenalin/python-libdeje | deje/tests/test_dexter_commands_deje.py | 1 | 17629 | '''
This file is part of python-libdeje.
python-libdeje is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
python-libdeje is distribute... | gpl-3.0 | 9,197,240,550,673,916,000 | 33.839921 | 75 | 0.516649 | false |
Fokko/incubator-airflow | tests/contrib/hooks/test_segment_hook.py | 1 | 2012 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | -762,890,311,649,424,400 | 31.451613 | 80 | 0.694334 | false |
ondrokrc/gramps | gramps/gui/utilscairo.py | 1 | 2664 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2007 Donald N. Allingham, Martin Hawlisch
# Copyright (C) 2009 Douglas S. Blank
# Copyright (C) 2012 Benny Malengier
# Copyright (C) 2013 Vassilii Khachaturov
#
# This program is free software; you can redistribute it and/or modify
# it under the... | gpl-2.0 | 5,053,228,286,535,073,000 | 32.721519 | 79 | 0.588213 | false |
sk1418/passwdmanager | passwdmanager/upgrade.py | 1 | 8922 | # PasswdManager -- Password management tool
# Copyright (C) 2009 -- 2013 Kai Yuan <kent.yuan@gmail.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (... | gpl-3.0 | -305,031,895,678,248,640 | 33.715953 | 206 | 0.6039 | false |
jeremiahyan/odoo | addons/mrp/models/mrp_production.py | 1 | 92112 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
import json
import datetime
import math
import re
from collections import defaultdict
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models, _
from odoo.exceptions import AccessError, Us... | gpl-3.0 | -4,215,170,603,825,880,000 | 51.695652 | 204 | 0.603059 | false |
Zolomon/pos-hidden-markov | noise_channel.py | 1 | 4279 | from corpus import Corpus
import processing
__author__ = 'bengt'
import argparse
def main():
parser = argparse.ArgumentParser()
parser.add_argument('train', help='Path to training corpus.')
parser.add_argument('corpus', help='Path to corpus.')
parser.add_argument('n', help='Tag sentences shorter than... | mit | 6,255,098,241,318,718,000 | 41.376238 | 116 | 0.550362 | false |
icea-dev/atn-sim-ng | configs/core/home/myservices/cyber_attack.py | 1 | 2197 | #
# CORE
# Copyright (c)2010-2012 the Boeing Company.
# See the LICENSE file included in this distribution.
#
''' Sample user-defined service.
'''
import os
from core.service import CoreService, addservice
from core.misc.ipaddr import IPv4Prefix, IPv6Prefix
class CyberAttack(CoreService):
''' This is a sample u... | gpl-3.0 | 3,616,359,763,887,543,000 | 32.8 | 130 | 0.631771 | false |
jlev/ballistic-missile-range | plot.py | 1 | 68191 | #-----------------------------------------------------------------------------
# Name: wx.lib.plot.py
# Purpose: Line, Bar and Scatter Graphs
#
# Author: Gordon Williams
#
# Created: 2003/11/03
# RCS-ID: $Id: plot.py,v 1.13 2005/05/09 19:59:34 RD Exp $
# Copyright: (c) 2002
# Licence: Use... | mit | 579,583,106,644,383,400 | 38.30317 | 141 | 0.574416 | false |
khchine5/lino-welfare | lino_welfare/modlib/pcsw/fixtures/std.py | 1 | 4085 | # -*- coding: UTF-8 -*-
# Copyright 2011,2013 Luc Saffre
# This file is part of Lino Welfare.
#
# Lino Welfare is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at y... | agpl-3.0 | -564,761,152,002,856,900 | 35.097345 | 109 | 0.685217 | false |
roessland/PRST | prst/utils/__init__.py | 1 | 22249 | # -*- coding: utf-8 -*-
from __future__ import print_function, division
import copy
__all__ = ["rldecode", "rlencode", "units", "mcolon", "recursive_diff", "gridtools"]
import prst.utils.gridtools
import numpy as np
import scipy.sparse
from scipy.sparse import csr_matrix
import scipy.sparse as sps
class Struct(dict... | gpl-3.0 | 1,775,324,393,358,209,500 | 29.311989 | 101 | 0.499573 | false |
datacommonsorg/data | scripts/us_bea/states_gdp/validate_import.py | 1 | 3576 | # 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, ... | apache-2.0 | 189,797,013,284,917,760 | 33.718447 | 80 | 0.652125 | false |
scrapinghub/dateparser | tests/test_data.py | 1 | 18146 | from itertools import chain
import regex as re
from parameterized import parameterized
from dateparser.languages import default_loader
from dateparser.data import language_locale_dict
from tests import BaseTestCase
DEFAULT_MONTH_PATTERN = re.compile(r'^M?\d+$', re.U)
INVALID_AM_PM_PATTERN = re.compile(r'^[AaPp]\.?\s+... | bsd-3-clause | -6,736,051,824,565,743,000 | 40.714943 | 108 | 0.621018 | false |
dondamage/SPyTS | tmp/TsPacket.py | 1 | 2806 | import TsPacketError
class TsPacket(object):
"""
A wrapper class to represent an MPEG2-TS packet.
"""
TS_PKT_LEN_188 = 188
TS_PKT_LEN_204 = 204
def __init__(self, pkt):
if isinstance(pkt, bytes):
if len(pkt) in (TsPacket.TS_PKT_LEN_188, TsPacket.TS_PKT_LEN_204):
self._content = pkt
... | gpl-2.0 | 1,291,673,668,577,762,300 | 26.792079 | 80 | 0.572701 | false |
WilliamDASILVA/TheMysteryOfSchweitzer | interfaces/DialogInterface.py | 1 | 1998 | from engine import Global;
from engine.Interface import Interface;
from engine.render.image import Image;
from engine.render.text import Text;
from engine.render.sprite import Sprite;
# --------------------------------------------------- *\
# [class] DialogInterface()
#
# * The dialog interface *
#
# --------------... | mit | 1,338,667,157,344,302,000 | 32.864407 | 76 | 0.560561 | false |
madscatt/sasmol | src/python/test_sasmol/test_sassubset/test_intg_sassubset_Mask_get_dihedral_subset_mask.py | 1 | 15098 | '''
SASMOL: Copyright (C) 2011 Joseph E. Curtis, Ph.D.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
... | gpl-3.0 | -5,796,164,659,144,685,000 | 33.158371 | 178 | 0.647437 | false |
barjacks/pythonrecherche | 07 Selenium, more beautifulsoup/zh_wie_neu.py | 1 | 1387 |
# coding: utf-8
from bs4 import BeautifulSoup
import pandas as pd
import requests
import time
import progressbar
bar = progressbar.ProgressBar()
lst = []
lst_pass = []
for elem,i in zip(range(1697,13000), bar((range(1697,13000)))):
url = "https://www.zueriwieneu.ch/report/" + str(elem)
response = requests.... | mit | -5,546,033,929,979,838,000 | 37.194444 | 114 | 0.599273 | false |
ActiveState/code | recipes/Python/223610_Yet_another_way_use_fields/recipe-223610.py | 1 | 2458 | import types
class FieldNameError(Exception):
def __init__(self, value):
self.value = value
def __str__(self):
return `"""Field name '%s' does not exist""" % self.value`
class fRow(tuple):
# class for each row
def __getattr__(self,i):
return tuple.__getitem__(self,self.__Field2Index__(i))
d... | mit | 9,081,782,035,038,960,000 | 26.931818 | 91 | 0.635883 | false |
geduldig/TweetBase | TweetBase/TweetCouch.py | 1 | 5890 | import couchdb
from couchdb.design import ViewDefinition
class TweetCouch(object):
def __init__(self, dbname, url=None):
try:
self.server = couchdb.Server(url=url)
self.db = self.server.create(dbname)
self._create_views()
except couchdb.http.PreconditionFailed:
self.db = self.server[dbname]
def _cr... | mit | -2,338,989,167,631,813,600 | 40.478873 | 171 | 0.589643 | false |
itucsdb1612/itucsdb1612 | Authors.py | 1 | 3560 | import psycopg2 as dbapi2
class Author:
def __init__(self,id, name, lastname, birthdate, nationality, penname,description,picture):
self.id= id
self.name= name
self.lastname=lastname
self.birthdate=birthdate
self.nationality=nationality
self.penname = penname
... | gpl-3.0 | 7,379,727,859,289,970,000 | 44.628205 | 187 | 0.676785 | false |
yokiwhh/bookLab7 | bookapp/models.py | 1 | 1024 | from django.db import models
from django.contrib import admin
# Create your models here.
# -*- coding: utf-8 -*-
def decode(info):
return info.decode('utf-8')
class Book(models.Model):
class Meta:
verbose_name = 'book'
verbose_name_plural = verbose_name
ISBN = models.CharField('ISBN',max_l... | mit | -702,074,715,538,148,600 | 33.133333 | 71 | 0.669922 | false |
glgerard/cloud-mdbn | src/batch_run.py | 1 | 2210 | from __future__ import print_function
import logging
import sys
import traceback
from datetime import datetime
from time import sleep
import requests
from utils import run_completed
from csv_to_config import csvToConfig
from utils import get_dyndb_table
host = 'taurus'
port = 5000
# Local DynamoDB instance
dynamod... | apache-2.0 | 6,949,887,639,289,204,000 | 28.466667 | 85 | 0.572851 | false |
kyoshino/bedrock | bedrock/firefox/tests/test_helpers.py | 1 | 17144 | from urlparse import parse_qs, urlparse
from django.conf import settings
from django.test.client import RequestFactory
from django_jinja.backend import Jinja2
from pyquery import PyQuery as pq
from product_details import product_details
from bedrock.mozorg.tests import TestCase
jinja_env = Jinja2.get_default()
de... | mpl-2.0 | -4,850,294,219,590,077,000 | 37.78733 | 99 | 0.564396 | false |
vladimirdolzhenko/gflogger | scripts/calc-report.py | 1 | 5526 | #!/usr/bin/python
import sys;
def sortedKeys(dict):
keys = dict.keys()
keys.sort()
return keys
if __name__ == '__main__':
i = 0
width = 1200
height = 600
reader = open(sys.argv[1], "r")
jsname = '%s.js' % sys.argv[1]
jswriter = open(jsname, "w")
htmlwriter = open(sys.argv[1] + '.html', "w")
charts = ... | apache-2.0 | -6,747,957,376,518,885,000 | 24.702326 | 108 | 0.549946 | false |
airbnb/caravel | superset/common/query_context.py | 1 | 1786 | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | -5,950,803,981,775,833,000 | 40.534884 | 86 | 0.683651 | false |
jtraver/dev | python/hex/hex2.py | 1 | 1148 | #!/usr/bin/python
def main():
# hex1()
hex2()
def hex1():
# ba1 = bytearray.fromhex("0x69")
ba1 = bytearray.fromhex("69")
print "ba1 = %s" % str(ba1)
def hex2():
strings = []
strings.append("asclient.connection.recv 1037 BYTE = 0x21 33 '!'")
strings.append("asclient.connection.recv 10... | mit | 4,119,470,077,678,726,000 | 36.032258 | 71 | 0.627178 | false |
latticelabs/Mitty | mitty/benchmarking/misalignment_plot.py | 1 | 9184 | """Prepare a binned matrix of misalignments and plot it in different ways"""
import click
import pysam
import matplotlib
matplotlib.use('Agg')
import matplotlib.pyplot as plt
from matplotlib.path import Path
import matplotlib.patches as patches
from matplotlib.colors import LogNorm
import numpy as np
def we_have_too... | gpl-2.0 | 1,032,870,527,477,394,600 | 44.470297 | 145 | 0.643728 | false |
idf/scipy_util | scipy_util/image/color_kmeans.py | 1 | 2314 | # USAGE
# python color_kmeans.py --image images/jp.png --clusters 3
# Author: Adrian Rosebrock
# Website: www.pyimagesearch.com
# import the necessary packages
from sklearn.cluster import KMeans
import matplotlib.pyplot as plt
import numpy as np
import argparse
import cv2
def centroid_histogram(clt):
# grab the... | bsd-3-clause | -5,846,669,147,645,297,000 | 27.9375 | 73 | 0.687554 | false |
amigocloud/amigocloud_samples | python/recordhistory.py | 1 | 3281 | # Script to query record_history across all AmigoCloud projects and export results to a CSV
# Must have AmigoCloud Account
# All projects must have a record_history dataset (no projects older than 2017)
from amigocloud import AmigoCloud
import csv
# AmigoCloud variables - change based on user
# token found at ap... | mit | 5,019,500,417,981,999,000 | 46.550725 | 230 | 0.673575 | false |
bugsduggan/locust | locust/stats.py | 1 | 26840 | import hashlib
import time
from collections import namedtuple, OrderedDict
from copy import copy
from itertools import chain
import gevent
import six
from six.moves import xrange
from . import events
from .exception import StopLocust
from .log import console_logger
STATS_NAME_WIDTH = 60
"""Default interval for how ... | mit | 5,510,569,928,374,752,000 | 35.517007 | 187 | 0.609277 | false |
kzvyahin/cfme_tests | cfme/tests/services/test_orchestration_template.py | 1 | 4984 | # -*- coding: utf-8 -*-
import fauxfactory
import pytest
from cfme.services.catalogs.orchestration_template import OrchestrationTemplate
from utils import testgen, error
from utils.update import update
from cfme.web_ui import mixins
from cfme.fixtures import pytest_selenium as sel
from cfme import test_requirements
p... | gpl-2.0 | -4,193,081,699,959,787,500 | 37.9375 | 97 | 0.667335 | false |
robogen/CMS-Mining | RunScripts/es_mainreduce.py | 1 | 20005 | from elasticsearch import Elasticsearch
import matplotlib.pyplot as plt
from matplotlib.backends.backend_pdf import PdfPages
from matplotlib.dates import AutoDateLocator, AutoDateFormatter
import numpy as np
import datetime as dt
import math
import json
with open('sites.json', 'r+') as txt:
sitesArray = json.load(... | mit | 398,106,286,063,834,500 | 43.85426 | 102 | 0.389803 | false |
atumanov/ray | python/ray/rllib/optimizers/multi_gpu_optimizer.py | 1 | 9886 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging
import math
import numpy as np
from collections import defaultdict
import ray
from ray.rllib.evaluation.metrics import LEARNER_STATS_KEY
from ray.rllib.policy.tf_policy import TFPolicy
from ray.... | apache-2.0 | -4,175,666,945,924,557,000 | 42.743363 | 79 | 0.556039 | false |
jgosmann/psyrun | psyrun/pspace.py | 1 | 9919 | """Construction of parameter spaces."""
import collections
import itertools
from six import string_types
from psyrun.utils.doc import inherit_docs
def dict_concat(args):
"""Concatenates elements with the same key in the passed dictionaries.
Parameters
----------
args : sequenece of dict
Di... | mit | 5,030,411,892,395,405,000 | 26.940845 | 79 | 0.556104 | false |
lablup/backend.ai-manager | src/ai/backend/manager/models/alembic/versions/e35332f8d23d_add_modified_at_to_users_and_kernels.py | 1 | 3049 | """add_modified_at_to_users_and_kernels
Revision ID: e35332f8d23d
Revises: da24ff520049
Create Date: 2020-07-01 14:02:11.022032
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import postgresql
from sqlalchemy.sql.expression import bindparam
from ai.backend.manager.models.base import conv... | lgpl-3.0 | 236,808,993,664,304,350 | 38.089744 | 93 | 0.625451 | false |
psci2195/espresso-ffans | samples/lb_profile.py | 1 | 2856 | # Copyright (C) 2010-2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 v... | gpl-3.0 | -3,930,206,780,037,609,000 | 30.384615 | 93 | 0.719188 | false |
openaps/openaps | openaps/vendors/units.py | 1 | 2534 |
"""
Units - units tool for openaps
"""
from openaps.uses.use import Use
from openaps.uses.registry import Registry
from openaps.glucose.convert import Convert as GlucoseConvert
import json
import argparse
def set_config (args, device):
return device
def display_device (device):
return ''
use = Registry( )
... | mit | 3,989,318,095,668,751,400 | 27.47191 | 82 | 0.66614 | false |
henriquegemignani/randovania | randovania/game_connection/nintendont_backend.py | 1 | 10056 | import asyncio
import dataclasses
import struct
from asyncio import StreamReader, StreamWriter
from typing import List, Optional, Dict
from randovania.game_connection.backend_choice import GameBackendChoice
from randovania.game_connection.connection_backend import ConnectionBackend, MemoryOperation, MemoryOperationExc... | gpl-3.0 | -8,874,167,788,248,815,000 | 34.408451 | 119 | 0.584029 | false |
iceman1989/Check_mk | web/htdocs/htmllib.py | 1 | 58082 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | -4,768,458,956,842,692,000 | 37.618351 | 124 | 0.534847 | false |
Jajcus/pyxmpp | pyxmpp/objects.py | 1 | 6158 | #
# (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be u... | lgpl-2.1 | 1,634,089,275,262,912,500 | 35.874251 | 91 | 0.592563 | false |
tere-valdivia/icy_tower_tarea | ControladorPlataforma.py | 1 | 1051 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Sat Oct 14 15:26:23 2017
@author: terevaldivia
"""
import os
from CC3501Utils_personal import *
import numpy as np
from Plataforma import *
class ControladorPlataforma:
def __init__(self):
self.lista = []
self.generar()
def gen... | mit | -6,942,142,383,207,466,000 | 27.432432 | 84 | 0.58706 | false |
coin-or/Dip | Dip/src/dippy/examples/bpp/mdbin_pack_func.py | 1 | 2645 | from builtins import range
from builtins import object
import sys
from pulp import LpVariable, lpSum, LpBinary, LpStatusOptimal
try:
import path
except ImportError:
pass
try:
import dippy
except ImportError:
try:
import src.dippy as dippy
except ImportError:
import coinor.... | epl-1.0 | -8,794,339,438,024,126,000 | 28.719101 | 82 | 0.517958 | false |
fperez/sympy | sympy/series/order.py | 1 | 8346 | from sympy.core.basic import Basic, S, C, sympify
from sympy.core import oo, Rational, Pow
from sympy.core.cache import cacheit
class Order(Basic):
"""
Represents O(f(x)) at the point x = 0.
Definition
==========
g(x) = O(f(x)) as x->0 if and only if
|g(x)|<=M|f(x)| near x=0 ... | bsd-3-clause | 4,637,688,196,921,517,000 | 28.701068 | 107 | 0.472682 | false |
lkorigin/laniakea | src/mirk/mirk/matrix_pub.py | 1 | 8838 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2019-2020 Matthias Klumpp <matthias@tenstral.net>
#
# Licensed under the GNU Lesser General Public License Version 3
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free... | gpl-3.0 | 3,732,543,248,006,460,000 | 34.493976 | 120 | 0.572867 | false |
sporto/rails_go_to_spec | rails_go_to_spec.py | 1 | 1760 | import sublime, sublime_plugin, os
import RailsGoToSpec.resolver
import re
class RailsGoToSpecCommand(sublime_plugin.WindowCommand):
def run(self):
sublime.status_message('Running Rails Go To Spec')
win = self.window
view = win.active_view()
current_file = view.file_name()
# remove the root dir
root_pat... | mit | -6,015,399,855,885,229,000 | 23.109589 | 80 | 0.680682 | false |
zozo123/buildbot | master/buildbot/test/fake/fakemaster.py | 1 | 5314 | # This file is part of Buildbot. Buildbot 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.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without eve... | gpl-3.0 | -5,274,690,665,599,939,000 | 27.265957 | 79 | 0.666353 | false |
Pegase745/sqlalchemy-datatables | examples/pyramid_tut/pyramid_tut/__init__.py | 1 | 1355 | from datetime import date
from pyramid.config import Configurator
from pyramid.renderers import JSON
from sqlalchemy import engine_from_config
from .models import Base, DBSession
def date_adapter(obj, request):
return str(obj)
def main(global_config, **settings):
"""Return a Pyramid WSGI application."""
... | mit | -1,620,803,607,939,758,000 | 22.362069 | 83 | 0.685609 | false |
Yarichi/Proyecto-DASI | Malmo/Python_Examples/MazeRunner.py | 1 | 9848 | # ------------------------------------------------------------------------------------------------
# Copyright (c) 2016 Microsoft Corporation
#
# 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 Softw... | gpl-2.0 | 2,658,488,039,185,188,400 | 41.768889 | 201 | 0.625 | false |
igemsoftware2017/USTC-Software-2017 | biohub/abacus/views.py | 1 | 1421 | from rest_framework import views, permissions, parsers
from rest_framework.exceptions import ValidationError
from rest_framework.response import Response
from .handlers import get_handler, query
from .result import AbacusAsyncResult
from .security import validate_signature
class StartView(views.APIView):
permiss... | gpl-3.0 | 5,578,610,467,308,912,000 | 29.234043 | 74 | 0.679099 | false |
wangwuli/autosvn | server/serversvn_develop.py | 1 | 13384 | #!/usr/bin/python
# coding:utf-8
#211
#svn 目录为/var/svn 模式http:// 钩子网站目录为/var/usr/local/apache2/htdocs/
import socket, threading, os, re, MySQLdb, random
import sys, os, time, atexit, string
from signal import SIGTERM
import ConfigParser
class Daemon:
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev... | mit | -4,069,954,725,179,221,500 | 34.005495 | 286 | 0.599356 | false |
edison7500/django-leancloud-sms | leancloud/sms.py | 1 | 2259 | # coding=utf-8
import re
import requests
import json
import logging
from django.conf import settings
from .exceptions import LeanCloudException, PhoneNumberException
logger = logging.getLogger(__name__)
headers = getattr(settings, 'LEANCLOUD_HEADERS')
class LeanCloudSMS(object):
cell_phone_match = re.compile('... | gpl-3.0 | -8,270,872,587,978,459,000 | 32.179104 | 113 | 0.605488 | false |
spanezz/egt | egtlib/commands.py | 1 | 14169 | import typing
from typing import Type
import egtlib
from configparser import RawConfigParser
from contextlib import contextmanager
import os
import datetime
import sys
import logging
log = logging.getLogger(__name__)
class CommandError(Exception):
pass
class Command:
COMMANDS: typing.List[Type["Command"]] ... | gpl-3.0 | -6,081,653,134,881,491,000 | 30.278146 | 117 | 0.566095 | false |
i386x/doit | tests/test_text/test_fmt/test_format.py | 1 | 26923 | # -*- coding: utf-8 -*-
#! \file ./tests/test_text/test_fmt/test_format.py
#! \author Jiří Kučera, <sanczes@gmail.com>
#! \stamp 2016-08-11 15:55:31 (UTC+01:00, DST+01:00)
#! \project DoIt!: Tools and Libraries for Building DSLs
#! \license MIT
#! \version 0... | mit | -9,046,460,640,067,583,000 | 27.067779 | 79 | 0.472267 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.