repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AlexStarov/Shop | applications/sms_ussd/migrations/0001_initial.py | 1 | 2850 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.Create... | apache-2.0 | -8,317,468,991,251,916,000 | 78.166667 | 917 | 0.638947 | false | 2.484743 | false | false | false |
DeeDee22/nelliepi | src/ch/fluxkompensator/nelliepi/ui/screen/ListScreen.py | 1 | 8571 | '''
Created on Oct 4, 2013
@author: geraldine
'''
from ch.fluxkompensator.nelliepi.ui.screen.ScreenWithFooter import ScreenWithFooter
from ch.fluxkompensator.nelliepi.ui.widgets.TextButton import TextButton
from ch.fluxkompensator.nelliepi.Constants import RED
from ch.fluxkompensator.nelliepi.Constants import BLUE
fro... | gpl-2.0 | 2,301,281,593,638,598,700 | 43.180412 | 291 | 0.608447 | false | 4.154629 | false | false | false |
bgribble/mfp | mfp/gui/xyplot/scatterplot.py | 1 | 7839 | #! /usr/bin/env python
'''
scatterplot.py
Specialization of XYPlot for showing sets of discrete datapoints
Copyright (c) 2012 Bill Gribble <grib@billgribble.com>
'''
import math
from .mark_style import MarkStyle
from .xyplot import XYPlot
from mfp import log
class ScatterPlot (XYPlot):
def __init__(self, eleme... | gpl-2.0 | 96,053,023,676,297,900 | 31.6625 | 71 | 0.494834 | false | 3.595872 | false | false | false |
rriggio/empower-runtime | empower/apps/wifimobilitymanager/wifimobilitymanager.py | 1 | 1790 | #!/usr/bin/env python3
#
# Copyright (c) 2019 Roberto Riggio
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 189,241,044,302,953,950 | 30.403509 | 75 | 0.660894 | false | 3.752621 | false | false | false |
HardTacos/techmodnotify-reddit-bot | techmodnotify.py | 1 | 6960 | #!/usr/bin/env python2.7
# =============================================================================
# IMPORTS
# =============================================================================
import praw
import MySQLdb
import ConfigParser
import time
import parsedatetime.parsedatetime as pdt
import pprint
import lo... | mit | 9,204,832,635,670,012,000 | 37.666667 | 130 | 0.500144 | false | 4.438776 | true | false | false |
ShaguptaS/moviepy | moviepy/video/compositing/CompositeVideoClip.py | 1 | 4062 | import numpy as np
from moviepy.video.VideoClip import VideoClip, ColorClip
from moviepy.audio.AudioClip import CompositeAudioClip
# CompositeVideoClip
class CompositeVideoClip(VideoClip):
"""
A VideoClip made of other videoclips displayed together. This is the
base class for most compositions.
... | mit | 4,766,768,109,639,454,000 | 34.321739 | 74 | 0.575332 | false | 3.85755 | false | false | false |
rphlypo/parietalretreat | setup_data_path_salma.py | 1 | 6001 | import glob
import os.path
from pandas import DataFrame
import pandas
def get_all_paths(data_set=None, root_dir="/"):
# TODO
# if data_set ... collections.Sequence
# iterate over list
if data_set is None:
data_set = {"hcp", "henson2010faces", "ds105", "ds107"}
list_ = list()
head, tail... | bsd-2-clause | -7,010,199,412,020,630,000 | 40.386207 | 78 | 0.472421 | false | 3.725016 | false | false | false |
CSysTeam/SecurityPackage | RC4/RC4Test.py | 1 | 1105 | import unittest
from RC4 import RC4
class RC4Test(unittest.TestCase):
def test_RC4TestEnc1(self):
algorithm = RC4()
cipher = algorithm.Encrypt("abcd", "test")
self.assertEqual(cipher, "ÏíDu")
def test_RC4TestDec1(self):
algorithm = RC4()
cipher = algo... | gpl-3.0 | -1,260,778,394,339,443,200 | 20.096154 | 62 | 0.568824 | false | 3.406832 | true | false | false |
ttm/percolation | percolation/rdf/ontology.py | 1 | 7460 | import percolation as P
from .rdflib import NS
a=NS.rdf.type
def percolationSystem():
triples=[
(NS.per.CurrentStatus, a, NS.per.SystemStatus)
]
def minimumTestOntology(context="minimum_ontology"):
triples=[
(NS.po.FacebookSnapshot,NS.rdfs.subClassOf,NS.po.Snapshot),
... | gpl-3.0 | -2,680,139,253,561,081,000 | 40.21547 | 111 | 0.659651 | false | 3.159678 | false | false | false |
debsankha/bedtime-programming | ls222/visual-lotka.py | 1 | 5120 | #!/usr/bin/env python
from math import *
import thread
import random
import time
import pygtk
pygtk.require("2.0")
import gtk
import gtk.glade
import commands
import matplotlib.pyplot
class rodent:
def __init__(self):
self.time_from_last_childbirth=0
class felix:
def __init__(self):
self.size=0
self.is_virgin... | gpl-3.0 | 245,585,090,863,972,380 | 24.858586 | 96 | 0.614844 | false | 2.672234 | false | false | false |
cs243iitg/vehicle-webapp | webapp/vms/forms.py | 1 | 15620 | from vms import models
from django.contrib.auth.models import User
from django import forms
from django.forms.extras.widgets import SelectDateWidget
from django.contrib.admin.widgets import AdminSplitDateTime
from django.utils.translation import ugettext_lazy as _
from datetimewidget.widgets import DateTimeWidget, Date... | mit | -1,965,283,994,541,151,200 | 42.268698 | 271 | 0.516005 | false | 4.350975 | false | false | false |
dragon788/wordfreq | tests/test.py | 1 | 5277 | from wordfreq import (
word_frequency, available_languages, cB_to_freq,
top_n_list, random_words, random_ascii_words, tokenize
)
from nose.tools import (
eq_, assert_almost_equal, assert_greater, raises
)
def test_freq_examples():
# Stopwords are most common in the correct language
assert_greater(... | mit | -1,019,574,581,594,584,000 | 28.701149 | 80 | 0.590557 | false | 3.096465 | true | false | false |
SuperKogito/Cryptos | CryptosCode/ExitPage.py | 1 | 2699 | # -*- coding: utf-8 -*-
"""
Created on Sat Sep 23 19:05:35 2017
@author: SuperKogito
"""
# Define imports
import tkinter as tk
class ExitPage(tk.Frame):
""" Exit page class """
def __init__(self, parent, controller):
tk.Frame.__init__(self, parent)
self.controller = controller
self.con... | mit | 7,732,974,716,320,206,000 | 42.532258 | 83 | 0.527603 | false | 4.339228 | false | false | false |
nicholaschris/landsatpy | utils.py | 1 | 2693 | import operator
import pandas as pd
import numpy as np
from numpy import ma
from scipy.misc import imresize
import scipy.ndimage as ndimage
from skimage.morphology import disk, dilation
def get_truth(input_one, input_two, comparison): # too much abstraction
ops = {'>': operator.gt,
'<': operator.lt,
... | mit | 181,416,954,024,829,280 | 33.101266 | 132 | 0.602674 | false | 3.328801 | false | false | false |
taigaio/taiga-back | taiga/projects/settings/migrations/0001_initial.py | 1 | 1897 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.2 on 2018-09-24 11:49
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import taiga.projects.settings.choices
class Migration(migrations.Mi... | agpl-3.0 | 5,703,856,807,743,608,000 | 46.425 | 457 | 0.651555 | false | 4.03617 | false | false | false |
chooyan-eng/ChooyanHttp | http_client.py | 1 | 2148 | import socket
class ChooyanHttpClient:
def request(host, port=80):
response = ChooyanResponse()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((host, port))
request_str = 'GET / HTTP/1.1\nHost: %s\r\n\r\n' % (host)
s.send(request_str.encode('utf-8'))
... | apache-2.0 | 7,177,049,130,168,306,000 | 26.189873 | 93 | 0.53352 | false | 3.665529 | false | false | false |
normanyahq/Parameterized-Remote-Shell-Execution-Service | server.py | 1 | 1415 | from flask import Flask, request
from subprocess import Popen, PIPE
import json
app = Flask(__name__)
HelpMessage = """
Usage:
POST command to this URL with following payload:
{"file": "...", args:[...]}
We are using this format to keep it the same with NodeJs spawnSync
Example:
{"file": "ls", arg... | mit | -8,591,826,401,162,474,000 | 36.236842 | 113 | 0.54629 | false | 4.249249 | false | false | false |
google/orchestra | orchestra/google/marketing_platform/operators/display_video_360.py | 1 | 18902 | #
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing... | apache-2.0 | -7,000,088,430,640,466,000 | 37.185859 | 115 | 0.585811 | false | 4.115393 | false | false | false |
z-jason/anki | aqt/forms/dconf.py | 1 | 20860 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'designer/dconf.ui'
#
# Created: Sun Mar 30 10:19:28 2014
# by: PyQt4 UI code generator 4.10.3
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_fromUtf8 = QtCore.QString.fromUtf8
except... | agpl-3.0 | -2,270,101,088,143,623,200 | 52.901809 | 135 | 0.671381 | false | 3.453071 | false | false | false |
invisiblearts/DRCN | drcn_main.py | 1 | 3349 | # The MIT License (MIT)
#
# Copyright (c) 2016 invisiblearts
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, mod... | mit | 8,442,491,745,930,020,000 | 39.841463 | 112 | 0.727381 | false | 3.283333 | false | false | false |
sudheesh001/pontoon | pontoon/sync/tasks.py | 1 | 7172 | import logging
from django.conf import settings
from django.db import connection, transaction
from django.utils import timezone
from pontoon.administration.vcs import CommitToRepositoryException
from pontoon.base.models import ChangedEntityLocale, Project, Repository
from pontoon.base.tasks import PontoonTask
from po... | bsd-3-clause | -5,564,550,856,805,116,000 | 39.292135 | 93 | 0.587144 | false | 4.140878 | false | false | false |
izapolsk/integration_tests | cfme/tests/infrastructure/test_host_drift_analysis.py | 1 | 4959 | import pytest
from cfme import test_requirements
from cfme.common.host_views import HostDriftAnalysis
from cfme.infrastructure.host import Host
from cfme.infrastructure.provider import InfraProvider
from cfme.utils import testgen
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.blockers ... | gpl-2.0 | -5,240,017,921,410,725,000 | 34.170213 | 93 | 0.667272 | false | 3.689732 | true | false | false |
Semanticle/Semanticle | sm-mt-devel/src/metabulate/tests/test26case-004d.py | 1 | 18359 | '''
Copyright 2009, 2010 Anthony John Machin. All rights reserved.
Supplied subject to The GNU General Public License v3.0
Created on 28 Jan 2009
Last Updated on 10 July 2010
As test20 with tests of:
rules instantiation and query inference
Related:
single dict TS recursion rule plus generic rule + minimal da... | gpl-2.0 | 3,084,103,411,011,080,700 | 66.00365 | 216 | 0.503513 | false | 3.626111 | true | false | false |
gadybadger/mixpanel-celery | mixpanel/conf/settings.py | 1 | 2592 | """Default configuration values and documentation"""
from django.conf import settings
"""
.. data:: MIXPANEL_API_TOKEN
API token for your Mixpanel account. This configures the Mixpanel account
where all of the action will be.
You can find this on the ``API Information`` tab on your
`mixpanel account... | bsd-3-clause | -5,596,797,928,066,212,000 | 26.574468 | 90 | 0.682099 | false | 3.630252 | false | false | false |
Maksimall89/houmpack | lcdmy.py | 1 | 4270 | #!/usr/bin/python
# --------------------------------------
# ___ ___ _ ____
# / _ \/ _ \(_) __/__ __ __
# / , _/ ___/ /\ \/ _ \/ // /
# /_/|_/_/ /_/___/ .__/\_, /
# /_/ /___/
#
# lcd_16x2.py
# 20x4 LCD Test Script with
# backlight control and text justification
#
# Author : Matt Hawkins
# ... | gpl-3.0 | 820,359,828,313,660,300 | 23.682081 | 73 | 0.572131 | false | 2.760181 | false | false | false |
ONEcampaign/humanitarian-data-service | displacement_tracker_data.py | 1 | 27157 | import requests
import pandas as pd
import os.path
import resources.constants
import json
from pandas.io.json import json_normalize
from utils.data_utils import get_ordinal_number
"""
This script aggregates data from multiple endpoints and returns a single .json file containing all data
used in the displacement tracke... | mit | -2,764,529,129,630,111,000 | 38.07482 | 154 | 0.647347 | false | 3.675826 | false | false | false |
anthonyalmarza/trex | tests/test_pipelining.py | 1 | 4322 | # import sys
from twisted.trial import unittest
from twisted.internet import defer
# from twisted.python import log
import trex
from trex import redis
from .mixins import REDIS_HOST, REDIS_PORT
# log.startLogging(sys.stdout)
class InspectableTransport(object):
def __init__(self, transport):
self.orig... | mit | 806,835,028,002,761,900 | 32.246154 | 83 | 0.64484 | false | 4.100569 | true | false | false |
sam17/room-of-requirement | alexa_skill/alexa_dumbledore_skill.py | 1 | 3214 | import logging
import json
from flask_ask import Ask,request,session, question, statement
from flask import Flask
import requests
import datetime
SERVER_IP = "http://ec2-52-221-204-189.ap-southeast-1.compute.amazonaws.com:3000/"
THIS = "Saturn"
app = Flask(__name__)
ask = Ask(app, "/")
logging.getLogger('flask_ask').... | mit | -247,352,226,600,152,580 | 45.57971 | 214 | 0.679838 | false | 3.361925 | false | false | false |
Ritiek/Spotify-Downloader | spotdl/encode/encoders/ffmpeg.py | 1 | 5171 | import subprocess
import os
from spotdl.encode import EncoderBase
from spotdl.encode.exceptions import EncoderNotFoundError
from spotdl.encode.exceptions import FFmpegNotFoundError
import logging
logger = logging.getLogger(__name__)
# Key: from format
# Subkey: to format
RULES = {
"m4a": {
"mp3": "-code... | mit | 6,673,886,669,052,045,000 | 31.522013 | 94 | 0.553278 | false | 4.024125 | false | false | false |
hfeeki/transifex | transifex/projects/search_indexes.py | 1 | 1115 | import datetime
from haystack.indexes import *
from haystack import site
from transifex.projects.models import Project
class ProjectIndex(RealTimeSearchIndex):
text = CharField(document=True, use_template=True)
slug = CharField(model_attr='slug', null=False)
name = CharField(model_attr='name', null... | gpl-2.0 | -4,778,798,853,786,573,000 | 31.823529 | 79 | 0.69417 | false | 4.12963 | false | false | false |
wireservice/agate | agate/csv_py3.py | 1 | 4555 | #!/usr/bin/env python
"""
This module contains the Python 3 replacement for :mod:`csv`.
"""
import csv
import six
from agate.exceptions import FieldSizeLimitError
POSSIBLE_DELIMITERS = [',', '\t', ';', ' ', ':', '|']
class Reader(six.Iterator):
"""
A wrapper around Python 3's builtin :func:`csv.reader`.
... | mit | 8,741,911,248,189,680,000 | 25.32948 | 119 | 0.568606 | false | 3.792673 | false | false | false |
atpy/atpy | atpy/fitstable.py | 1 | 11686 | from __future__ import print_function, division
import os
import numpy as np
from astropy.io import fits
from .exceptions import TableException
from .helpers import smart_dtype, smart_mask
from .decorators import auto_download_to_file, auto_fileobj_to_file
standard_keys = ['XTENSION', 'NAXIS', 'NAXIS1', 'NAXIS2', ... | mit | 6,538,405,604,914,906,000 | 27.364078 | 78 | 0.552114 | false | 3.708664 | false | false | false |
rschnapka/bank-payment | account_direct_debit/model/account_invoice.py | 1 | 5845 | # -*- coding: utf-8 -*-
##############################################################################
#
# Copyright (C) 2011 - 2013 Therp BV (<http://therp.nl>).
#
# All other contributions are (C) by their respective contributors
#
# All Rights Reserved
#
# This program is free software: you can redistrib... | agpl-3.0 | 8,191,803,226,444,862,000 | 34.424242 | 79 | 0.623268 | false | 4.133663 | false | false | false |
cybertk/mffr | chromium_tools/mffr.py | 1 | 6105 | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Usage: mffr.py [-d] [-g *.h] [-g *.cc] REGEXP REPLACEMENT
This tool performs a fast find-and-replace operation on files in
the ... | bsd-3-clause | 2,502,402,201,311,980,000 | 34.494186 | 80 | 0.618509 | false | 3.794282 | false | false | false |
DESatAPSU/DAWDs | python/origBandpass_FITSToCSV.py | 1 | 1930 | # Converts STD_BANDPASSES_Y3A1_FGCM_20170630_extend3000.fits to
# y3a2_std_passband_extend3000_ugrizYatm.csv
#
# To run (bash):
# python origBandpass_FITSToCSV.py > origBandpass_FITSToCSV.log 2>&1 &
#
# To run (tcsh):
# python origBandpass_FITSToCSV.py >& origBandpass_FITSToCSV.log &
#
# DLT, 2017-06-30
# bas... | mit | 466,522,794,910,993,100 | 29.15625 | 89 | 0.702073 | false | 2.761087 | false | false | false |
rubgombar1/sharing-cars | sharingcars/common/migrations/0001_initial.py | 1 | 4372 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-05-02 14:13
from __future__ import unicode_literals
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import sharingcars.helpers.User
class Migration(migrations.Migration... | gpl-3.0 | -6,813,793,928,361,808,000 | 43.161616 | 188 | 0.583715 | false | 4.328713 | false | false | false |
SophieIPP/openfisca-france | openfisca_france/model/prelevements_obligatoires/prelevements_sociaux/cotisations_sociales/travail_fonction_publique.py | 1 | 13483 | # -*- coding: utf-8 -*-
from __future__ import division
import math
from numpy import minimum as min_
from ....base import * # noqa analysis:ignore
from .base import apply_bareme_for_relevant_type_sal
class allocations_temporaires_invalidite(Variable):
column = FloatCol
entity_class = Individus
label... | agpl-3.0 | 1,825,974,932,120,057,000 | 44.043478 | 116 | 0.662236 | false | 3.120482 | false | false | false |
great-expectations/great_expectations | tests/datasource/test_batch_generators.py | 1 | 6706 | import os
from great_expectations.datasource.batch_kwargs_generator import (
DatabricksTableBatchKwargsGenerator,
GlobReaderBatchKwargsGenerator,
SubdirReaderBatchKwargsGenerator,
)
try:
from unittest import mock
except ImportError:
from unittest import mock
def test_file_kwargs_generator(
d... | apache-2.0 | -4,090,798,318,681,937,400 | 36.463687 | 88 | 0.621384 | false | 3.234925 | true | false | false |
er432/TASSELpy | TASSELpy/net/maizegenetics/trait/CombinePhenotype.py | 1 | 4297 | from TASSELpy.utils.helper import make_sig
from TASSELpy.utils.Overloading import javaOverload, javaConstructorOverload, javaStaticOverload
from TASSELpy.net.maizegenetics.trait.AbstractPhenotype import AbstractPhenotype
from TASSELpy.net.maizegenetics.trait.Phenotype import Phenotype
from TASSELpy.net.maizegenetics.tr... | bsd-3-clause | -5,652,573,568,547,928,000 | 42.846939 | 98 | 0.628811 | false | 4.030957 | false | false | false |
muhleder/timestrap | timestrap/settings/base.py | 1 | 3215 | import os
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
BASE_DIR = os.path.dirname(
os.path.dirname(
os.path.dirname(
os.path.abspath(__file__)
)
)
)
# SECURITY WARNING: set this to your domain name in production!
ALLOWED_HOSTS = ['*']
# Application ... | bsd-2-clause | -8,415,473,442,261,682,000 | 21.326389 | 79 | 0.677138 | false | 3.498368 | false | true | false |
maljac/odoo-addons | partner_views_fields/res_config.py | 1 | 1422 | # -*- coding: utf-8 -*-
##############################################################################
# For copyright and license notices, see __openerp__.py file in module root
# directory
##############################################################################
from openerp import fields, models
class partner... | agpl-3.0 | -1,070,431,712,767,902,500 | 37.432432 | 78 | 0.587904 | false | 4.348624 | false | false | false |
ksachs/invenio | modules/bibindex/lib/bibindex_engine.py | 1 | 101146 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009,
## 2010, 2011, 2012, 2013 CERN.
##
## Invenio 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 Softwar... | gpl-2.0 | -8,379,763,187,648,380,000 | 43.014795 | 207 | 0.561683 | false | 3.969779 | false | false | false |
egabancho/invenio | invenio/modules/oauth2server/provider.py | 1 | 3287 | # -*- coding: utf-8 -*-
##
## This file is part of Invenio.
## Copyright (C) 2014 CERN.
##
## Invenio 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) a... | gpl-2.0 | 8,069,406,589,776,774,000 | 30.009434 | 77 | 0.662915 | false | 3.960241 | false | false | false |
msebire/intellij-community | python/helpers/pydev/pydevconsole.py | 1 | 12520 | '''
Entry point module to start the interactive console.
'''
from _pydev_bundle._pydev_getopt import gnu_getopt
from _pydev_comm.rpc import make_rpc_client, start_rpc_server, start_rpc_server_and_make_client
from _pydev_imps._pydev_saved_modules import thread
start_new_thread = thread.start_new_thread
try:
from c... | apache-2.0 | 3,085,186,923,838,286,300 | 31.268041 | 138 | 0.626038 | false | 4.314266 | false | false | false |
MarauderXtreme/sipa | sipa/model/finance.py | 1 | 2369 | from abc import ABCMeta, abstractmethod
from flask_babel import gettext
from sipa.model.fancy_property import ActiveProperty, Capabilities
from sipa.units import format_money
from sipa.utils import compare_all_attributes
class BaseFinanceInformation(metaclass=ABCMeta):
"""A Class providing finance information a... | mit | -564,479,798,384,781,100 | 31.013514 | 80 | 0.604474 | false | 4.428037 | false | false | false |
99designs/colorific | setup.py | 1 | 1724 | # -*- coding: utf-8 -*-
#
# setup.py
# colorific
#
"""
Package information for colorific.
"""
import os.path
import platform
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
PROJECT_DIR = os.path.realpath(os.path.join(os.path.dirname(__file__)))
README_PATH = os.path.... | isc | 7,411,314,964,488,441,000 | 28.220339 | 77 | 0.62819 | false | 3.591667 | false | false | false |
hutchison/bp_mgmt | bp_cupid/views/Student.py | 1 | 2805 | from django.shortcuts import render, get_object_or_404
from django.utils.decorators import method_decorator
from django.contrib.auth.decorators import login_required, user_passes_test
from django.views.generic import View
from ..models import (
Student,
Gewicht,
Platz,
Zeitraum,
)
class StudentDetail... | agpl-3.0 | -2,386,100,749,923,359,000 | 29.150538 | 75 | 0.578103 | false | 3.200913 | false | false | false |
dmargala/qusp | examples/compare_delta.py | 1 | 7364 | #!/usr/bin/env python
import argparse
import numpy as np
import numpy.ma as ma
import h5py
import qusp
import matplotlib.pyplot as plt
import scipy.interpolate
import fitsio
class DeltaLOS(object):
def __init__(self, thing_id):
path = '/data/lya/deltas/delta-%d.fits' % thing_id
hdulist = fitsio.... | mit | -6,005,995,334,850,592,000 | 36.380711 | 134 | 0.623303 | false | 2.895792 | false | false | false |
botchat/botclassifier | pythonbotchat/cleverbot/cleverbot_chat.py | 1 | 1770 | """
It is very simple selnium based code which cat with clevarbot and genrate log from chat
"""
import time
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_con... | mit | 8,204,009,665,455,109,000 | 42.170732 | 118 | 0.655932 | false | 3.377863 | false | false | false |
jeremyblalock/translucent | translucent.py | 1 | 1658 | #!/usr/bin/python
import sys, re
class Color(object):
def __init__(self, inp, alpha=1):
self.alpha = alpha
if type(inp) is str:
if re.match(r'^#\d{3}$', inp):
inp = '#' + inp[1] * 2 + inp[2] * 2 + inp[3] * 2
if re.match(r'^#\d{6}$', inp):
se... | mit | 1,282,436,452,587,701,200 | 31.509804 | 86 | 0.473462 | false | 3.270217 | false | false | false |
rsj217/tongdao | app/libs/router.py | 1 | 1736 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
# # The route helpers were originally written by
# # Jeremy Kelley (http://github.com/nod).
import tornado.web
class Route(object):
"""
decorates RequestHandlers and builds up a list of routables handlers
Tech Notes (or 'What the *@# is really happening here... | mit | 7,487,647,330,691,189,000 | 28.931034 | 101 | 0.634793 | false | 4.084706 | false | false | false |
vivek8943/GeoTweetSearch | api/web/twitter_instance.py | 1 | 17775 | import json
import logging
from threading import RLock
import time
from api.caching.instance_codes import consumeCode, unconsumeCode
from api.caching.instance_lifetime import removeInstance, addInstance, setInstanceTemporalSourceLastTime
from api.caching.temporal_analytics import getTemporalInfluenceCollection, addTemp... | apache-2.0 | 1,512,580,514,915,106,800 | 40.7277 | 168 | 0.659241 | false | 4.564715 | false | false | false |
suutari-ai/shoop | shuup/core/models/_currencies.py | 3 | 2858 | # -*- coding: utf-8 -*-
# This file is part of Shuup.
#
# Copyright (c) 2012-2017, Shoop Commerce Ltd. All rights reserved.
#
# This source code is licensed under the OSL-3.0 license found in the
# LICENSE file in the root directory of this source tree.
from __future__ import unicode_literals
import decimal
import ba... | agpl-3.0 | -5,743,874,669,232,669,000 | 33.853659 | 118 | 0.620014 | false | 4.465625 | false | false | false |
PUM-9/mickwald_client | scripts/mickClient.py | 1 | 1457 | #!/usr/bin/env python
import rospy
from chat_server.msg import Message
import sys
def select_mode():
mode = sys.argv[sys.argv.__len__()-1]
if mode == 'read':
read_client()
if mode == 'send':
run_client()
if mode != 'read':
if mode != 'send':
print("Usage: use \"rea... | gpl-3.0 | -6,251,699,994,255,307,000 | 25.490909 | 86 | 0.571723 | false | 3.624378 | false | false | false |
Bachmann1234/diff-cover | diff_cover/report_generator.py | 1 | 11385 | """
Classes for generating diff coverage reports.
"""
from __future__ import unicode_literals
from abc import ABCMeta, abstractmethod
from jinja2 import Environment, PackageLoader
from jinja2_pluralize import pluralize_dj
from diff_cover.snippets import Snippet
import six
class DiffViolations(object):
"""
Cla... | apache-2.0 | 8,383,550,399,648,663,000 | 30.191781 | 95 | 0.587 | false | 4.3125 | false | false | false |
dcherian/pyroms | examples/Beaufort/make_weight_files.py | 1 | 1429 | import pyroms
# Part of Arctic2 grid containing the Beaufort
irange=(420,580)
jrange=(470,570)
#irange=None
#jrange=None
srcgrd = pyroms.grid.get_ROMS_grid('ARCTIC2')
dstgrd = pyroms.grid.get_ROMS_grid('BEAUFORT')
pyroms.remapping.make_remap_grid_file(srcgrd,irange=irange,jrange=jrange)
pyroms.remapping.make_remap_g... | bsd-3-clause | -3,818,889,346,827,392,000 | 37.621622 | 99 | 0.662701 | false | 2.56553 | false | false | false |
google-research/federated | utils/models/resnet_models.py | 1 | 11325 | # Copyright 2019 Google LLC. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 7,382,932,942,000,230,000 | 29.119681 | 80 | 0.6083 | false | 3.70219 | false | false | false |
astrorafael/ema | ema/dev/todtimer.py | 1 | 7813 | # ----------------------------------------------------------------------
# Copyright (c) 2014 Rafael Gonzalez.
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including... | mit | 850,098,103,163,987,100 | 31.827731 | 112 | 0.622936 | false | 3.483281 | false | false | false |
SlicerRt/SlicerDebuggingTools | PyDevRemoteDebug/ptvsd-4.1.3/ptvsd/_vendored/pydevd/_pydevd_bundle/pydevd_console.py | 1 | 9547 | '''An helper file for the pydev debugger (REPL) console
'''
import sys
import traceback
from code import InteractiveConsole
from _pydev_bundle import _pydev_completer
from _pydev_bundle.pydev_console_utils import BaseInterpreterInterface, BaseStdIn
from _pydev_bundle.pydev_imports import Exec
from _pydev_bund... | bsd-3-clause | 6,231,292,679,407,175,000 | 35.735178 | 120 | 0.567299 | false | 4.696016 | false | false | false |
mcedit/mcedit | drawable.py | 1 | 1360 | """
${NAME}
"""
from __future__ import absolute_import, division, print_function, unicode_literals
import logging
log = logging.getLogger(__name__)
from OpenGL import GL
class Drawable(object):
def __init__(self):
super(Drawable, self).__init__()
self._displayList = None
self.invalidL... | isc | -3,960,994,668,484,728,000 | 20.935484 | 82 | 0.552941 | false | 4.197531 | false | false | false |
bdastur/notes | python/asyncio/future_1.py | 1 | 2115 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
https://pymotw.com/3/asyncio/futures.html
'''
import asyncio
import time
import functools
#import gc
#gc.set_debug(gc.DEBUG_STATS)
def mark_done(future, result):
print("Setting future result to ", result)
future.set_result(result)
async def work_one(future... | apache-2.0 | -2,974,231,611,736,339,000 | 26.467532 | 76 | 0.621277 | false | 3.790323 | false | false | false |
jumpstarter-io/horizon | openstack_dashboard/test/api_tests/cinder_tests.py | 1 | 7570 | # Copyright 2012 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agre... | apache-2.0 | -8,110,810,110,104,336,000 | 40.593407 | 78 | 0.671334 | false | 4.007411 | true | false | false |
MarkusH/django-osm-field | example/example/views.py | 1 | 1290 | from django.urls import reverse
from django.views.generic import (
CreateView,
DeleteView,
DetailView,
ListView,
UpdateView,
)
from .models import ExampleModel
class ExampleCreateView(CreateView):
fields = [
"location",
"location_lat",
"location_lon",
"another"... | mit | -6,783,156,971,044,450,000 | 17.428571 | 63 | 0.63876 | false | 3.827893 | false | false | false |
ldieselUT/Kruus-robtech | install/_setup_util.py | 1 | 12413 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Software License Agreement (BSD License)
#
# Copyright (c) 2012, Willow Garage, Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# * Redistrib... | mit | -4,014,986,708,254,159,400 | 41.656357 | 213 | 0.655764 | false | 3.81821 | false | false | false |
dipanjanS/text-analytics-with-python | Old-First-Edition/Ch06_Text_Similarity_and_Clustering/utils.py | 1 | 1097 | # -*- coding: utf-8 -*-
"""
Created on Sun Sep 11 23:06:06 2016
@author: DIP
"""
from sklearn.feature_extraction.text import CountVectorizer, TfidfVectorizer
def build_feature_matrix(documents, feature_type='frequency',
ngram_range=(1, 1), min_df=0.0, max_df=1.0):
feature_type = featur... | apache-2.0 | 3,488,268,610,334,958,600 | 36.862069 | 102 | 0.601641 | false | 3.681208 | false | false | false |
jmesmon/trifles | 2011s_lab2/gen_spice2.py | 1 | 4333 | #! /usr/bin/env python
act2_spice = """\
* Lab 1, Act 2, BJT {bjt}, Part {part}, Plot Num {qn}
Vs Vi1 0 {wave}
Vcc Vi2 0 DC 5
RC1 Vi2 Vo1 {rc}
RB1 Vi1 Vb {rb}
Q1 Vo1 Vb 0 {bjt}
{extra}
* Model for 2N3904 NPN BJT (from Eval library in Pspice)
.model 2N3904 NPN(Is=6.734f Xti=3 Eg=1.11 Vaf=74.03 Bf=416.4 Ne... | gpl-3.0 | 8,072,626,812,433,768,000 | 26.251572 | 76 | 0.426956 | false | 2.658282 | false | false | false |
bardes/sonitus | tools/tone_gen.py | 1 | 1271 | #!/usr/bin/env python
from sys import argv, stderr
usage = \
"""
Usage: {program} <sample rate> <A4 freq.> [octaves=8]
e.g.: {program} 64000 442.0 5
""".format(program=argv[0])
if len(argv) < 3 or len(argv) > 4 :
print(usage, file = stderr)
exit(1)
A4 = 0
sample_rate = 0
octaves = 8
try:
A4 = float(argv... | mit | 7,935,027,801,271,016,000 | 22.981132 | 76 | 0.585366 | false | 2.955814 | false | false | false |
cihai/cihai | cihai/exc.py | 1 | 2127 | """Exceptions raised from the Cihai library."""
class CihaiException(Exception):
"""Base Cihai Exception class."""
class ImportStringError(ImportError, CihaiException):
"""
Provides information about a failed :func:`import_string` attempt.
Notes
-----
This is from werkzeug.utils c769200 on ... | mit | 5,505,620,915,528,148,000 | 29.826087 | 75 | 0.520451 | false | 4.358607 | false | false | false |
centrofermi/e3pipe | tracking/E3FittingTool2dUnweighted.py | 1 | 2330 | #!/usr/bin/env python
# *********************************************************************
# * Copyright (C) 2015 Luca Baldini (luca.baldini@pi.infn.it) *
# * *
# * For the license terms see the file LICENSE, distributed *
# * along ... | gpl-3.0 | -3,082,154,406,652,267,000 | 36.580645 | 76 | 0.530472 | false | 3.896321 | false | false | false |
lmregus/Portfolio | python/design_patterns/env/lib/python3.7/site-packages/sphinx/util/i18n.py | 1 | 10576 | """
sphinx.util.i18n
~~~~~~~~~~~~~~~~
Builder superclass for all builders.
:copyright: Copyright 2007-2019 by the Sphinx team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
import gettext
import os
import re
import warnings
from collections import namedtuple
from datetime import datetim... | mit | -8,594,470,671,615,113,000 | 36.052632 | 91 | 0.59697 | false | 3.819168 | false | false | false |
ojengwa/sympy | sympy/logic/boolalg.py | 2 | 41626 | """
Boolean algebra module for SymPy
"""
from __future__ import print_function, division
from collections import defaultdict
from itertools import product, islice
from sympy.core.basic import Basic
from sympy.core.cache import cacheit
from sympy.core.numbers import Number
from sympy.core.decorators import deprecated
... | bsd-3-clause | 4,697,731,169,025,037,000 | 27.012113 | 79 | 0.568707 | false | 3.686653 | false | false | false |
dvhbru/dvhb-hybrid | dvhb_hybrid/mailer/django.py | 1 | 2561 | import base64
from concurrent.futures import ThreadPoolExecutor
from django.core import mail
from . import base
class DjangoConnection(base.BaseConnection):
def __init__(self, loop, conf, **kwargs):
super().__init__(**kwargs)
self.loop = loop
self.executor = ThreadPoolExecutor(max_worker... | mit | -2,037,320,954,963,782,400 | 34.569444 | 71 | 0.522843 | false | 4.822976 | false | false | false |
vthorsteinsson/tensor2tensor | tensor2tensor/models/research/transformer_aux.py | 1 | 5657 | # coding=utf-8
# Copyright 2018 The Tensor2Tensor Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable... | apache-2.0 | 1,745,558,954,910,225,200 | 31.511494 | 79 | 0.671027 | false | 3.822297 | false | false | false |
Iconik/eve-suite | src/model/static/map/constellation.py | 1 | 1590 | from model.flyweight import Flyweight
from model.static.database import database
class Constellation(Flyweight):
def __init__(self, constellation_id):
#prevents reinitializing
if "_inited" in self.__dict__:
return
self._inited = None
#prevents reinitializing
sel... | gpl-3.0 | 1,197,304,585,575,209,200 | 30.8 | 79 | 0.577358 | false | 3.785714 | false | false | false |
ElectroweakGroup/Database_Extraction_Tool | Main.py | 1 | 1572 | import IsotopeDataExporting as ided
import os
import glob
import time
import sys
import renormalize as renorm
def function(option):
#Exports data requested by the user into text files (necessary to generate plots)
userInput = ided.datExp(option,True,True)
#Prints the user input allowing user to make su... | mit | 5,746,059,216,080,461,000 | 30.081633 | 123 | 0.666667 | false | 3.417391 | false | false | false |
anurag03/integration_tests | cfme/storage/object_store_object.py | 1 | 6474 | # -*- coding: utf-8 -*-
import attr
from navmazing import NavigateToSibling, NavigateToAttribute
from widgetastic.widget import View, Text, NoSuchElementException
from widgetastic_patternfly import BreadCrumb, Button, Dropdown
from cfme.base.ui import BaseLoggedInPage
from cfme.common import TagPageView, Taggable
from... | gpl-2.0 | 781,696,630,555,552,000 | 34.966667 | 96 | 0.666358 | false | 4.273267 | false | false | false |
eroicaleo/LearningPython | interview/leet/394_Decode_String.py | 1 | 2187 | #!/usr/bin/env python3
import re
# s = "3[a]2[bc]", return "aaabcbc".
# s = "3[a2[c]]", return "accaccacc".
# s = "2[abc]3[cd]ef", return "abcabccdcdcdef".
class Solution:
def decodeString(self, s):
stack, n, t = [], 0, ''
for c in s:
if c.isdigit():
n = 10*n + int(c)
... | mit | -4,032,999,080,055,340,000 | 26.3375 | 87 | 0.38866 | false | 3.333841 | false | false | false |
aviaryan/pythons | TheHyliaSoundtrack/hylia_s.py | 1 | 1588 | from bs4 import BeautifulSoup
from urllib.request import urlopen
from platform import subprocess
# if genlist = 0, then this script downloads the files, the cmd_downloader variable comes into play
# if genlist = 1, then this script generates a list.txt file containing direct links to music files in the working direct... | apache-2.0 | -7,543,069,623,663,879,000 | 23.828125 | 124 | 0.677582 | false | 3.071567 | false | false | false |
RasaHQ/rasa_nlu | rasa/core/policies/form_policy.py | 1 | 5093 | import logging
from typing import List, Optional, Dict, Text
from rasa.core.actions.action import ACTION_LISTEN_NAME
from rasa.core.domain import PREV_PREFIX, ACTIVE_FORM_PREFIX, Domain
from rasa.core.events import FormValidation
from rasa.core.featurizers import TrackerFeaturizer
from rasa.core.policies.memoization i... | apache-2.0 | 9,093,935,141,866,872,000 | 35.120567 | 82 | 0.596112 | false | 4.247706 | false | false | false |
koonsolo/MysticMine | monorail/pickupsview.py | 1 | 11068 |
import random
import pygame
from koon.geo import Vec2D
import koon.geo as geo
from koon.gfx import SpriteFilm, Font, LoopAnimationTimer, PingPongTimer, Timer
from koon.res import resman
import pickups
import event
import tiles
class PickupView:
def __init__( self ):
self.pos = None
self.jump_pos... | mit | -8,202,370,288,542,892,000 | 34.703226 | 111 | 0.58502 | false | 3.34684 | false | false | false |
mitsuhiko/click | src/click/types.py | 1 | 30864 | import os
import stat
from datetime import datetime
from ._compat import _get_argv_encoding
from ._compat import filename_to_ui
from ._compat import get_filesystem_encoding
from ._compat import get_strerror
from ._compat import open_stream
from .exceptions import BadParameter
from .utils import LazyFile
from .utils im... | bsd-3-clause | -5,114,859,521,448,229,000 | 32.402597 | 88 | 0.596099 | false | 4.176455 | false | false | false |
mwilliammyers/sportsstats | tests/test_nba.py | 1 | 1960 | #!/usr/bin/env python
"""test_nba
Tests for `nba` module.
"""
from sportsstats import nba
import unittest
class TestNba(unittest.TestCase):
def setUp(self):
from datetime import datetime
april_9 = datetime(2016, 4, 9)
self.nba_stats = nba.Stats(april_9, april_9)
self.expected_qu... | gpl-3.0 | 1,037,946,190,995,494,400 | 32.220339 | 77 | 0.590306 | false | 3.37931 | true | false | false |
axmachado/simplepos | simplepos/objfile/module.py | 1 | 5296 | # -*- coding: utf-8 -*-
"""
Copyright © 2017 - Alexandre Machado <axmachado@gmail.com>
This file is part of Simple POS Compiler.
Simnple POS Compiler 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 Found... | gpl-3.0 | -5,143,156,768,576,183,000 | 34.066225 | 79 | 0.622663 | false | 4.740376 | false | false | false |
praekelt/molo | molo/core/migrations/0020_add-social-media-fields-to-article-page.py | 1 | 1042 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('wagtailimages', '0010_change_on_delete_behaviour'),
('core', '0019_add_tags_to_article'),
]
... | bsd-2-clause | -5,566,844,998,955,386,000 | 32.612903 | 172 | 0.613244 | false | 3.902622 | false | false | false |
befelix/GPy | GPy/util/normalizer.py | 1 | 2996 | '''
Created on Aug 27, 2014
@author: Max Zwiessele
'''
import numpy as np
class _Norm(object):
def __init__(self):
pass
def scale_by(self, Y):
"""
Use data matrix Y as normalization space to work in.
"""
raise NotImplementedError
def normalize(self, Y):
"... | bsd-3-clause | 3,887,301,455,200,167,000 | 25.513274 | 102 | 0.578104 | false | 4.005348 | false | false | false |
greenape/gem-module | gaussianemulation/uncertainty.py | 1 | 2386 | from sympy import *
from mpmath import *
from util import *
def E(r_h, b_hat, r_t, e):
return r_h.T*b_hat + r_t.T*e
def V(sigma, u, r_t, A_inv, r_h, g, w):
res = Matrix([u])
res -= r_t.T*A_inv*r_t
res += (r_h - g.T*r_t).T*w*(r_h-g.T*r_t)
res *= sigma
return sigma*(u - r_t.T*A_inv*r_t + (r_h - ... | mpl-2.0 | 5,845,735,544,084,785,000 | 30.407895 | 114 | 0.475272 | false | 1.829755 | false | false | false |
kyleabeauchamp/EnsemblePaper | code/model_building/fit_model.py | 1 | 1807 | import numpy as np
from fitensemble import belt, ensemble_fitter
import experiment_loader
import sys
import ALA3
belt.ne.set_num_threads(1)
def run(ff, prior, regularization_strength, bootstrap_index_list):
pymc_filename = ALA3.data_directory + "/models/model_%s_%s_reg-%.1f-BB%d.h5" % (ff, prior, regularization_st... | gpl-3.0 | -55,501,563,004,168,850 | 45.333333 | 161 | 0.723852 | false | 3.238351 | false | false | false |
mordred-descriptor/mordred | mordred/_util.py | 1 | 2230 | from __future__ import print_function
import os
import sys
import numpy as np
def parse_enum(enum, v):
if isinstance(v, enum):
return v
else:
return enum[v]
def atoms_to_numpy(f, mol, dtype="float"):
return np.fromiter((f(a) for a in mol.GetAtoms()), dtype, mol.GetNumAtoms())
def con... | bsd-3-clause | 3,277,547,088,414,851,600 | 18.561404 | 87 | 0.561435 | false | 3.394216 | false | false | false |
mrhubbs/merge_csv | work.py | 1 | 2511 | """
10-20-15
"""
import tempfile
import csv
def load_csv_as_dict(csv_path):
"""
Loads a CSV into a dictionary.
"""
with open(csv_path, 'rb') as csvfile:
reader = csv.reader(csvfile, delimiter=',')
header_row = reader.next()
dat = [[] for _ in header_row]
row_len = len... | gpl-2.0 | -531,748,911,764,550,500 | 22.036697 | 78 | 0.557149 | false | 3.541608 | false | false | false |
romeubertho/USP-IntroPython | django/learning_log/learning_log/learning_log/settings.py | 1 | 3158 | """
Django settings for learning_log project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/ref/settings/
"""
impo... | mit | 6,835,176,702,205,230,000 | 24.885246 | 91 | 0.686827 | false | 3.504994 | false | false | false |
elthariel/dff | api/gui/dialog/applymodule.py | 1 | 12581 | # DFF -- An Open Source Digital Forensics Framework
# Copyright (C) 2009-2010 ArxSys
# This program is free software, distributed under the terms of
# the GNU General Public License Version 2. See the LICENSE file
# at the top of the source tree.
#
# See http://www.digital-forensic.org for more information about this... | gpl-2.0 | 6,638,311,531,804,442,000 | 40.114379 | 232 | 0.581591 | false | 4.141211 | false | false | false |
jmarsik/mopidy | mopidy/http/handlers.py | 1 | 7595 | from __future__ import absolute_import, unicode_literals
import functools
import logging
import os
import socket
import tornado.escape
import tornado.ioloop
import tornado.web
import tornado.websocket
import mopidy
from mopidy import core, models
from mopidy.internal import encoding, jsonrpc
logger = logging.getLo... | apache-2.0 | -545,906,839,529,140,350 | 31.182203 | 78 | 0.59684 | false | 3.993165 | false | false | false |
anantb/confer | server/settings.py | 1 | 5344 | # Django settings for confer project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'.
'NAME': 'confer', # Or path to database fil... | mit | -6,319,879,744,797,158,000 | 31.987654 | 109 | 0.682635 | false | 3.729239 | false | false | false |
SergeyPirogov/selene | selene/conditions.py | 1 | 9603 | from abc import ABCMeta, abstractmethod
import operator
from future.utils import with_metaclass, lmap
from selene.abctypes.conditions import IEntityCondition
from selene.abctypes.webdriver import IWebDriver
from selene.abctypes.webelement import IWebElement
from selene.exceptions import ConditionMismatchException
c... | mit | -2,331,676,207,702,236,000 | 24.956757 | 113 | 0.640633 | false | 4.228534 | false | false | false |
reingart/pyafipws | wslpg.py | 1 | 216526 | #!/usr/bin/python
# -*- coding: utf8 -*-
# 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, or (at your option) any later
# version.
#
# This program is distributed in the hope th... | gpl-3.0 | -3,899,072,255,980,930,600 | 46.503294 | 135 | 0.514621 | false | 3.29034 | false | false | false |
jonls/lpd-monitor | btcon.py | 1 | 16600 |
import socket
import struct
import random
import hashlib
import errno
from gi.repository import GLib
from gi.repository import GObject
from bencode import bencode, bdecode, bdecode_all
class Bitfield(object):
def __init__(self, size, data=None):
if size < 0:
raise ValueError('Bitfield size ... | mit | -7,883,889,488,519,300,000 | 33.016393 | 129 | 0.527169 | false | 3.755656 | false | false | false |
mic4ael/indico | indico/core/db/sqlalchemy/searchable_titles.py | 1 | 1794 | # This file is part of Indico.
# Copyright (C) 2002 - 2020 CERN
#
# Indico is free software; you can redistribute it and/or
# modify it under the terms of the MIT License; see the
# LICENSE file for more details.
from __future__ import unicode_literals
from sqlalchemy.ext.declarative import declared_attr
from indico... | mit | -4,994,673,740,867,772,000 | 32.222222 | 107 | 0.628205 | false | 4.08656 | false | false | false |
Mibou/django-memcache-status | memcache_status/templatetags/memcache_status_tags.py | 1 | 3249 | from django import template
from django.conf import settings
try:
from django.core.cache import caches
except:
from django.core.cache import get_cache as caches
if caches.__module__.startswith('debug_toolbar'):
from debug_toolbar.panels.cache import original_get_cache as caches
get_cache = lambda cache_na... | bsd-3-clause | 115,984,585,617,540,590 | 32.84375 | 104 | 0.602647 | false | 3.826855 | false | false | false |
hiteshagrawal/python | battleship3.py | 1 | 1558 | #!/usr/bin/python
import random
board = []
size = 0
def board_print():
global board
for row in board:
print " ".join(row)
def new_game():
global board,size
board = []
size = input("Enter board size:") ## Input will automatically convert it to integer
for row in range(size):
board.append(["0"] * size )
b... | gpl-2.0 | 6,092,222,742,744,449,000 | 23.34375 | 84 | 0.639281 | false | 2.863971 | false | false | false |
Barrog/C4-Datapack | data/jscript/quests/343_UnderTheShadowOfTheIvoryTower/__init__.py | 1 | 7613 | # Made by mtrix - v0.2 by DrLecter
import sys
from net.sf.l2j.gameserver.model.quest import State
from net.sf.l2j.gameserver.model.quest import QuestState
from net.sf.l2j.gameserver.model.quest.jython import QuestJython as JQuest
ORB = 4364
ECTOPLASM = 4365
ADENA = 57
CHANCE = 65
RANDOM_REWARDS=[[951,1], #Enchant We... | gpl-2.0 | 7,425,132,417,915,398,000 | 35.600962 | 170 | 0.543019 | false | 3.006714 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.