repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jcfr/mystic | mystic/solvers.py | 1 | 4042 | #!/usr/bin/env python
#
# Author: Mike McKerns (mmckerns @caltech and @uqfoundation)
# Copyright (c) 1997-2015 California Institute of Technology.
# License: 3-clause BSD. The full license text is available at:
# - http://trac.mystic.cacr.caltech.edu/project/mystic/browser/mystic/LICENSE
"""
solvers: minimal and expa... | bsd-3-clause | 3,585,898,092,584,982,500 | 35.745455 | 79 | 0.706086 | false | 3.912875 | false | false | false |
alexander-bzikadze/graph_diff | graph_diff/unordered_ant_algorithm/unordered_ant_algorithm.py | 1 | 2782 | from graph_diff.graph import GraphWithRepetitiveNodesWithRoot
from graph_diff.graph_diff_algorithm import GraphDiffAlgorithm, GraphMap
from graph_diff.unordered_ant_algorithm import parameters
from graph_diff.unordered_ant_algorithm.pathfinder import Pathfinder
from graph_diff.unordered_ant_algorithm.pheromon_table imp... | apache-2.0 | 6,263,675,655,214,304,000 | 35.12987 | 109 | 0.609274 | false | 3.603627 | false | false | false |
antoyo/qutebrowser | tests/unit/mainwindow/statusbar/test_prompt.py | 8 | 1734 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 Softwa... | gpl-3.0 | -8,467,729,520,890,357,000 | 29.421053 | 77 | 0.731257 | false | 3.59751 | true | false | false |
pajlada/pajbot | pajbot/modules/pleblist.py | 2 | 5798 | import logging
import urllib
from sqlalchemy import func
from pajbot.managers.db import DBManager
from pajbot.managers.schedule import ScheduleManager
from pajbot.models.command import Command
from pajbot.models.pleblist import PleblistManager
from pajbot.models.pleblist import PleblistSong
from pajbot.modules import... | mit | 4,006,778,647,002,429,000 | 33.511905 | 115 | 0.573991 | false | 4.009682 | false | false | false |
Cisco-Talos/pyrebox | pyrebox_test/test_11_insn_end.py | 1 | 2397 | # -------------------------------------------------------------------------------
#
# Copyright (C) 2017 Cisco Talos Security Intelligence and Research Group
#
# PyREBox: Python scriptable Reverse Engineering Sandbox
# Author: Xabier Ugarte-Pedrero
#
# This program is free software; you can redistribute it and/... | gpl-2.0 | -7,798,520,603,817,052,000 | 30.96 | 81 | 0.639549 | false | 3.948929 | false | false | false |
AstroUGent/shadowfax | rundir/coolingtables/filecopy.py | 1 | 1652 | # -*- coding: utf-8 -*-
################################################################################
# This file is part of Shadowfax
# Copyright (C) 2016 Yorick Van Den Bossche (yorick.vandenbossche@ugent.be)
# Bert Vandenbroucke (bert.vandenbroucke@gmail.com)
#
# Shadowfax is free software: yo... | agpl-3.0 | -6,093,865,151,923,576,000 | 34.913043 | 80 | 0.590799 | false | 3.788991 | false | false | false |
MikeCurrington/LedPinky | gpio.py | 1 | 2438 | import wiringpi
import math
RANGE = 100
fRANGE = float(RANGE)
USE_HARD_PWM = True
HARD_PWM_PIN = 1
HARD_PWM_DIV = 192 # divisor of 19.2Mhz base freq
HARD_PWM_RANGE = 1024
class ArcadeGpio:
def __init__(self, outputPins):
self.brightnesses = {}
self.brightnessesChanged = {}
for pin in outputPins:
... | mit | -4,528,089,690,861,314,600 | 31.078947 | 96 | 0.650533 | false | 3.141753 | false | false | false |
blancltd/django-glitter | glitter/pages/search_indexes.py | 2 | 2237 | from html.parser import HTMLParser
import re
from django.conf import settings
from django.contrib.auth.models import AnonymousUser
from django.http import HttpRequest
from django.template import RequestContext
from django.template.loader import render_to_string
from haystack import indexes
from glitter.page import G... | bsd-3-clause | -1,670,816,629,887,473,700 | 30.069444 | 76 | 0.634332 | false | 4.082117 | false | false | false |
TinghuiWang/ActivityLearning | actlearn/feature/sensorElapseTime.py | 1 | 1670 | from .AlFeatureTemplate import AlFeatureTemplate
from .sensorElapseTimeRoutine import AlFeatureUpdateSensorElapseTime
import numpy as np
class AlFeatureSensorElapseTime(AlFeatureTemplate):
def __init__(self, normalize=False):
"""
Initialization of Template Class
:return:
"""
... | bsd-3-clause | -6,563,629,525,600,558,000 | 39.731707 | 96 | 0.581437 | false | 4.691011 | false | false | false |
dhague/vpower | AbstractPowerCalculator.py | 1 | 2113 | import time
class AbstractPowerCalculator(object):
def __init__(self):
self.power = 0.0
self.energy = 0.0
self.init_time = time.time()
self.last_time = self.init_time
self.observer = None # callback method
self.correction_factor = 1.0 # default value - can be over... | mit | 2,099,173,062,460,852,700 | 32.015625 | 97 | 0.614766 | false | 3.964353 | false | false | false |
okfn/pdftables | test/test_all_sample_data.py | 3 | 2616 | #!/usr/bin/env python
# coding: utf-8
from __future__ import unicode_literals
from nose.tools import assert_equal
from os.path import join, dirname
import os
from pdftables.pdftables import page_to_tables
from pdftables.display import to_string
from pdftables.diagnostics import render_page, make_annotations
from fix... | bsd-2-clause | 6,163,406,883,221,919,000 | 34.351351 | 79 | 0.618119 | false | 3.818978 | false | false | false |
naparuba/kunai | opsbro/misc/internalyaml/ruamel/setup.py | 2 | 26751 | # # header
# coding: utf-8
from __future__ import print_function, absolute_import, division, unicode_literals
# # __init__.py parser
import sys
import os
import datetime
sys.path = [path for path in sys.path if path not in [os.getcwd(), '']]
import platform # NOQA
from _ast import * # NOQA
from ast im... | mit | -1,700,251,319,163,830,800 | 36.406993 | 93 | 0.52004 | false | 4.183638 | false | false | false |
devxoul/schoool | schoool/views/school.py | 1 | 4136 | # -*- coding: utf-8 -*-
from datetime import date
import json
from werkzeug.exceptions import BadRequest
from flask import Blueprint, request
import requests
from schoool import cache
from schoool.renderers import render_json
URLS = [
'stu.sen.go.kr', # 서울
'stu.pen.go.kr', # 부산
'stu.dge.go.kr', # 대구... | mit | -5,031,523,846,596,199,000 | 28.507463 | 79 | 0.516692 | false | 2.689796 | false | false | false |
LLNL/spack | var/spack/repos/builtin/packages/memsurfer/package.py | 3 | 1853 | # Copyright 2013-2020 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack import *
class Memsurfer(PythonPackage):
"""MemSurfer is a tool to compute and analyze membrane surfaces... | lgpl-2.1 | -2,013,393,660,601,022,500 | 36.06 | 79 | 0.654614 | false | 3.256591 | false | false | false |
guilherme-gm/Hercules | tools/utils/common.py | 2 | 2071 | #!/usr/bin/python
# -*- coding: utf8 -*-
#
# This file is part of Hercules.
# http://herc.ws - http://github.com/HerculesWS/Hercules
#
# Copyright (C) 2018 Hercules Dev Team
# Copyright (C) 2018 Asheraf
#
# Hercules is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public... | gpl-3.0 | 5,267,232,359,254,170,000 | 31.359375 | 71 | 0.690971 | false | 3.050074 | false | false | false |
advnturecaptlst/kaggle_archive | airbnb/airbnb_kscript.py | 1 | 2652 | # import libraries
import numpy as np
import pandas as pd
from sklearn.preprocessing import LabelEncoder
from xgboost import XGBClassifier
# set random seed
np.random.seed(13)
# load data
df_train = pd.read_csv('../input/train_users.csv')
df_test = pd.read_csv('../input/test_users.csv')
labels = df_train['country_des... | apache-2.0 | -5,215,948,345,435,476,000 | 34.36 | 188 | 0.669683 | false | 2.684211 | true | false | false |
danielharada/mastermind | mastermindGameState.py | 1 | 8222 | """For a given mastermind game, keeps track of current guess number,
current guess, history of previous guesses and results, and also
provides methods to evaluate the current guess against the solution.
"""
class MastermindGameState:
def __init__(self, solution_pegs):
self.peg_is_used_default = (False, F... | mit | 519,184,197,140,026,800 | 27.950704 | 132 | 0.609584 | false | 3.542439 | false | false | false |
mezz64/home-assistant | homeassistant/components/tado/water_heater.py | 6 | 9683 | """Support for Tado hot water zones."""
import logging
import voluptuous as vol
from homeassistant.components.water_heater import (
SUPPORT_OPERATION_MODE,
SUPPORT_TARGET_TEMPERATURE,
WaterHeaterEntity,
)
from homeassistant.config_entries import ConfigEntry
from homeassistant.const import ATTR_TEMPERATURE... | apache-2.0 | 1,127,541,043,133,001,900 | 28.885802 | 92 | 0.616131 | false | 3.756012 | false | false | false |
dasmarci/check_mk | lawo/checks/lawo_psu.py | 1 | 2464 | #!/usr/bin/python
# -*- encoding: utf-8; py-indent-offset: 4 -*-
# +------------------------------------------------------------------+
# | ____ _ _ __ __ _ __ |
# | / ___| |__ ___ ___| | __ | \/ | |/ / |
# | | | | '_ \ / _ \/ __| |/ /... | gpl-2.0 | -5,100,878,447,395,015,000 | 40.066667 | 143 | 0.467532 | false | 2.950898 | false | false | false |
AntidoteLabs/Antidote-DM | Antidotes DM/youtube_dl/downloader/fragment.py | 4 | 4027 | from __future__ import division, unicode_literals
import os
import time
from .common import FileDownloader
from .http import HttpFD
from ..utils import (
encodeFilename,
sanitize_open,
)
class HttpQuietDownloader(HttpFD):
def to_screen(self, *args, **kargs):
pass
class FragmentFD(FileDownloade... | gpl-2.0 | -1,843,075,731,782,477,800 | 33.418803 | 102 | 0.542091 | false | 4.096643 | false | false | false |
thenetcircle/dino | dino/rest/resources/remove_admin.py | 1 | 2237 | #!/usr/bin/env python
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | apache-2.0 | 3,797,789,888,696,921,600 | 33.953125 | 109 | 0.653107 | false | 3.959292 | false | false | false |
KredekPth/Kurs_django | shelf/models.py | 1 | 1682 | from django.db import models
from django.conf import settings
# Create your models here.
class BookCategory(models.Model):
name = models.CharField(max_length = 50)
def __str__(self):
return self.name
class Author(models.Model):
first_name = models.CharField(max_length = 20)
last_name = models.... | mit | 3,059,564,906,087,726,000 | 31.980392 | 102 | 0.662307 | false | 3.632829 | false | false | false |
lsaffre/lino-cosi | lino_cosi/lib/cosi/layouts.py | 1 | 1066 | # -*- coding: UTF-8 -*-
# Copyright 2017-2021 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""The default :attr:`custom_layouts_module
<lino.core.site.Site.custom_layouts_module>` for Lino Cosi.
"""
from lino.api import rt
rt.models.products.Products.column_names = "... | agpl-3.0 | -4,402,623,843,019,307,000 | 27.052632 | 78 | 0.76454 | false | 3.259939 | false | false | false |
QuLogic/meson | mesonbuild/dependencies/coarrays.py | 2 | 3553 | # Copyright 2013-2019 The Meson development team
# 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 agree... | apache-2.0 | 8,370,617,301,631,338,000 | 40.8 | 127 | 0.669294 | false | 4.348837 | false | false | false |
pelme/vasa | vasa/main.py | 1 | 1677 | import asyncio
import pathlib
import logging
logger = logging.getLogger(__name__)
from . import __version__
from .http.server import make_http_protocol_factory
from .logging import setup_logging
from vasa.minions import Minion
class Settings:
http_host = '127.0.0.1'
http_port = 3000
webapp_root = str(... | mit | -5,063,978,148,675,978,000 | 25.203125 | 100 | 0.57901 | false | 4.011962 | false | false | false |
jamaps/arcpy_scripts | OD_matrix.py | 1 | 1987 | # generates OD matrix for travel times
# check out arcpy doc for more info
import arcpy
from arcpy import env
import time
script_start = time.time()
env.workspace = r"E:\jeff\food\transit_may.gdb"
env.overwriteOutput = True
arcpy.CheckOutExtension("Network")
network = r"E:\jeff\food\transit_may.gdb\transit_may\tr... | mit | 3,788,470,437,760,886,000 | 43.155556 | 428 | 0.731253 | false | 2.656417 | false | false | false |
chugunovyar/factoryForBuild | env/lib/python2.7/site-packages/pybrain/tools/gridsearch.py | 3 | 13426 | __author__ = 'Michael Isik'
from pybrain.tools.validation import CrossValidator
from numpy import linspace, append, ones, zeros, array, where, apply_along_axis
import copy
class GridSearch2D:
""" Abstract class providing a method for searching optimal metaparmeters
of a training algorithm.
It is... | gpl-3.0 | 4,904,250,442,691,474,000 | 36.502793 | 115 | 0.55899 | false | 4.172157 | false | false | false |
eubr-bigsea/tahiti | migrations/versions/529bd5bd009e_update_sgd_regressor_scikit_learn.py | 1 | 11774 | # -*- coding: utf-8 -*-
"""Update SGD Regressor (scikit_learn).
Revision ID: 529bd5bd009e
Revises: eff0acabf4fe
Create Date: 2019-11-18 14:28:54.961838
"""
from alembic import op
import sqlalchemy as sa
from alembic import context
from alembic import op
from sqlalchemy import String, Integer, Text
from sqlalchemy.or... | apache-2.0 | -828,008,588,079,015,400 | 42.88764 | 120 | 0.580183 | false | 3.472733 | false | false | false |
simontakite/sysadmin | pythonscripts/programmingpython/Dstruct/Basic/stack3.py | 2 | 1401 | "optimize with tuple pair trees"
class Stack:
def __init__(self, start=[]): # init from any sequence
self.stack = None # even other (fast)stacks
for i in range(-len(start), 0):
self.push(start[-i - 1]) # push in reverse order
def ... | gpl-2.0 | -5,211,675,863,139,848,000 | 38.028571 | 77 | 0.45182 | false | 4.324074 | false | false | false |
bgris/ODL_bgris | lib/python3.5/site-packages/PyQt5/uic/uiparser.py | 1 | 36852 | #############################################################################
##
## Copyright (C) 2015 Riverbank Computing Limited.
## Copyright (C) 2006 Thorsten Marek.
## All right reserved.
##
## This file is part of PyQt.
##
## You may use this file under the terms of the GPL v2 or the revised BSD
## license as fol... | gpl-3.0 | -7,139,964,591,322,708,000 | 35.307389 | 102 | 0.56811 | false | 4.400239 | false | false | false |
DHLabs/keep | keep_backend/settings/production.py | 2 | 1350 | from settings import *
from credentials import AWS, MAILGUN, RDS
ALLOWED_HOSTS = [ '*' ]
DEBUG = False
# # Setup Amazon RDS access
# DATABASES = {
# 'default': {
# 'ENGINE': 'django.db.backends.mysql',
# 'NAME': 'keep',
# 'PORT': 3306,
# 'HOST': RDS[ 'HOST' ],
# 'USER': RD... | mit | -3,927,085,320,928,816,000 | 29 | 83 | 0.635556 | false | 2.772074 | false | false | false |
sloria/device-inventory | inventory/settings/local-dist.py | 1 | 3174 | """
This is an example settings/local.py file.
These settings overrides what's in settings/base.py
"""
import logging
# To extend any settings from settings/base.py here's an example:
#from . import base
#INSTALLED_APPS = base.INSTALLED_APPS + ['debug_toolbar']
DATABASES = {
'default': {
'ENGINE': 'djang... | bsd-3-clause | 6,491,461,290,298,390,000 | 26.842105 | 77 | 0.672338 | false | 3.238776 | false | false | false |
liavkoren/djangoDev | django/core/management/sql.py | 1 | 10955 | from __future__ import unicode_literals
import codecs
import os
import re
import warnings
from django.apps import apps
from django.conf import settings
from django.core.management.base import CommandError
from django.db import models, router
from django.utils import six
from django.utils.deprecation import RemovedInD... | bsd-3-clause | 7,098,901,778,963,500,000 | 40.653992 | 141 | 0.654678 | false | 4.123071 | true | false | false |
lbk0116/NTDP | openerp/addons/base/__openerp__.py | 1 | 2582 | # -*- coding: utf-8 -*-
{
'name': 'Base',
'version': '1.3',
'category': 'Hidden',
'description': """
This is a core module, needed for all installation.
===================================================
""",
'depends': [],
'data': [
'base_data.xml',
'res/res_currency_data.xml... | apache-2.0 | -233,350,366,610,707,680 | 32.102564 | 79 | 0.555771 | false | 3.168098 | true | false | false |
sserkez/ocelot | gui/optics.py | 2 | 7275 | '''
user interface for viewing/editing photon optics layouts
'''
from numpy import sin, cos, pi, sqrt, log, array, random, sign
from numpy.linalg import norm
import numpy as np
import matplotlib.pyplot as plt
import scipy.integrate as integrate
#import matplotlib.animation as animation
from ocelot.optics.e... | gpl-3.0 | -7,375,562,706,719,498,000 | 36.914439 | 167 | 0.446873 | false | 2.622567 | false | false | false |
tectronics/evennia | docs/sphinx/wiki2rest/wiki2rest.py | 4 | 7748 | #! /usr/bin/python
#
# Converts Evennia's google-style wiki pages to reST documents
#
# Setting up to run:
#
# 1) Install pandoc (converts from html to reST):
#
# apt-get install pandoc (debian)
# or download from
# http://johnmacfarlane.net/pandoc/
#
# 2) Retrieve wiki files (*.wiki) fro... | bsd-3-clause | -7,267,192,348,317,431,000 | 36.25 | 107 | 0.601833 | false | 3.313944 | false | false | false |
drepetto/chiplotle | chiplotle/hpgl/pen.py | 1 | 1299 | from chiplotle.hpgl.commands import AS, FS, PT, SP, VS
class Pen(object):
'''The Pen class houses the following HPGL pen settable properties:
AS, FS, SP and VS.
- `number` : ``int`` [1 to 8] pen number.
- `velocity` : ``int`` [1 to 60] pen velocity.
- `force` : ``int`` pen force.
- `accele... | gpl-3.0 | -1,680,997,175,966,248,700 | 27.23913 | 76 | 0.578137 | false | 3.732759 | false | false | false |
jjohnson42/confluent | confluent_server/dbgtools/processhangtraces.py | 2 | 1227 | #!/usr/bin/python2
# Copyright 2017 Lenovo
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed ... | apache-2.0 | -8,054,568,402,363,866,000 | 34.057143 | 74 | 0.673187 | false | 4.036184 | false | false | false |
harayz/discover | misc/python/multitabs.py | 6 | 2829 | # multitabs.py
#
# By Lee Baird
# Feel free to contact me via chat or email with any feedback or suggestions that you may have:
# leebaird@gmail.com
#
##############################################################################################################
os.system('clear')
banner()
runlocally()
print colorblu... | bsd-3-clause | -4,447,019,075,224,868,000 | 27.867347 | 110 | 0.452103 | false | 4.260542 | false | false | false |
UCNA/main | Scripts/plotters/LarmorClipping.py | 1 | 8636 | #!/sw/bin/python2.7
import sys
sys.path.append("..")
from ucnacore.PyxUtils import *
from math import *
from ucnacore.LinFitter import *
#from UCNAUtils import *
from bisect import bisect
from calib.FieldMapGen import *
def clip_function(y,rho,h,R):
sqd = sqrt(rho**2-y**2)
if sqd==0:
sqd = 1e-10
return h*rho**2... | gpl-3.0 | 5,932,426,630,058,469,000 | 25.093656 | 126 | 0.636637 | false | 2.07846 | false | false | false |
anantshri/github_cloner | src/github_clone_user.py | 1 | 2148 | #!/usr/local/bin/python
import json
import requests
import argparse
import os
import sys
from git import Repo
def main():
global outp
desc="""This program is used to clone github repositories of a user / organization"""
epilog="""Credit (C) Anant Shrivastava http://anantshri.info and Contributors: Akash Sh... | gpl-3.0 | 8,494,045,690,433,781,000 | 37.357143 | 118 | 0.570764 | false | 3.703448 | false | false | false |
status-im/status-react | test/appium/views/dapps_view.py | 1 | 3398 | from views.base_element import Button, EditBox, BaseElement
from views.base_view import BaseView
from views.home_view import ChatElement
class DiscoverDappsButton(Button):
def __init__(self, driver):
super().__init__(driver, translation_id="open-dapp-store")
def navigate(self):
from views.web_... | mpl-2.0 | -4,677,510,460,669,107,000 | 40.439024 | 118 | 0.655386 | false | 3.506708 | false | false | false |
digistam/recon-ng | modules/recon/domains-creds/pwnedlist/domain_ispwned.py | 1 | 2205 | import module
# unique to module
class Module(module.Module):
def __init__(self, params):
module.Module.__init__(self, params, query='SELECT DISTINCT domain FROM domains WHERE domain IS NOT NULL ORDER BY domain')
self.info = {
'Name': 'PwnedList - Pwned Domain Statistics Fetch... | gpl-3.0 | 5,897,794,969,996,932,000 | 50.27907 | 236 | 0.565986 | false | 4.26499 | false | false | false |
rveeblefetzer/IOT-home-inspector | IOThomeinspector/userprofile/models.py | 1 | 1636 | """Creating Models for user profile."""
from django.db import models
from django.contrib.auth.models import User
from django.utils.encoding import python_2_unicode_compatible
from django.db.models.signals import post_save
from django.dispatch import receiver
from multiselectfield import MultiSelectField
import uuid
DE... | mit | -8,409,030,486,613,384,000 | 29.296296 | 87 | 0.685208 | false | 4.029557 | false | false | false |
samanehsan/osf.io | scripts/clear_sessions.py | 51 | 1039 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
import logging
import datetime
from dateutil import relativedelta
from website.models import Session
logger = logging.getLogger(__name__)
logger.setLevel(logging.WARN)
def clear_sessions(max_date, dry_run=False):
"""Remove all sessions last modifi... | apache-2.0 | -3,257,999,967,025,403,400 | 27.081081 | 73 | 0.672762 | false | 3.833948 | false | false | false |
ella/mypage | mypage/widgets/templatetags/widgets.py | 1 | 6343 | import anyjson as json
from django import template
from django.template.loader import render_to_string
from django.core.exceptions import ObjectDoesNotExist
from django.forms import ChoiceField, MultipleChoiceField
import anyjson as json
from mypage.widgets.models import get_object, WidgetFetchDataFailedException
fr... | bsd-3-clause | 8,338,146,817,083,869,000 | 32.384211 | 133 | 0.621788 | false | 3.816486 | true | false | false |
jrutila/django-settings | django_settings/models.py | 1 | 3044 | # -*- coding: utf-8 -*-
# framework
from django.db import models
from django.contrib.contenttypes.models import ContentType
import django
if django.VERSION >= (1, 8):
from django.contrib.contenttypes import fields as generic_fields
else:
from django.contrib.contenttypes import generic as generic_fields
from dja... | bsd-3-clause | -4,623,547,423,626,070,000 | 24.157025 | 85 | 0.652102 | false | 4.281294 | false | false | false |
zorksylar/expert_finding | zmodel.py | 1 | 4109 | import svmlight
from aclient import AClient
from aclient import ZC
from publication import APub
from conference import AConf
from feature import Feature
from filter import filter_data
import pprint
TRAINING_DATA = 'training_data.dat'
RERANK_RESULT = 'rerank_result.dat'
FMODEL_NAME = 'ef_model.dat'
EXT_TRAIN_A_SIZE = 1... | mit | 2,641,538,635,931,905,500 | 25.856209 | 122 | 0.624239 | false | 3.052749 | true | false | false |
chrisseto/osf.io | addons/bitbucket/api.py | 3 | 5394 | import urllib
from framework.exceptions import HTTPError
from website.util.client import BaseClient
from addons.bitbucket import settings
class BitbucketClient(BaseClient):
def __init__(self, access_token=None):
self.access_token = access_token
@property
def _default_headers(self):
if ... | apache-2.0 | -811,365,878,026,414,700 | 30 | 142 | 0.567853 | false | 4.092564 | false | false | false |
sassoftware/catalog-service | catalogService_test/mockedModules/mint/db/schema.py | 1 | 8225 | #
# Copyright (c) SAS Institute Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | -8,995,300,217,899,518,000 | 35.23348 | 91 | 0.538967 | false | 4.347252 | false | false | false |
jesswhyte/magabot | magabot-pi.py | 1 | 2602 | #!/usr/bin/env python
#Magabot will look for tweets with the Make America Great Again hashtag (#maga) + [bitch,cunt,slut,whore]
#Magabot will then read them aloud to you.
#Run it in the background while you work for a great day!
#And remember, the stream API represents just a small fraction
#of the actual tweets that... | mit | 7,839,649,172,781,997,000 | 39.65625 | 112 | 0.689085 | false | 3.669958 | false | false | false |
udp3f/gemini | gemini/gemini_utils.py | 3 | 5550 | #!/usr/bin/env python
from __future__ import absolute_import
import numpy as np
import collections
from collections import defaultdict
try:
from itertools import tee, ifilterfalse
PY3 = False
except ImportError:
from itertools import tee, filterfalse as ifilterfalse
basestring = str
PY3 = True
imp... | mit | 8,077,462,407,869,457,000 | 28.057592 | 78 | 0.571892 | false | 3.625082 | false | false | false |
instinct-vfx/rez | src/rezgui/windows/ContextSubWindow.py | 6 | 5662 | from rezgui.qt import QtCore, QtGui
from rezgui.objects.App import app
from rezgui.widgets.ContextManagerWidget import ContextManagerWidget
from rezgui.mixins.ContextViewMixin import ContextViewMixin
from rezgui.mixins.StoreSizeMixin import StoreSizeMixin
from rezgui.models.ContextModel import ContextModel
import os.pa... | lgpl-3.0 | -8,171,428,037,164,952,000 | 33.950617 | 79 | 0.605087 | false | 4.234854 | false | false | false |
bmd/twittrscrapr | twittrscrapr/scrapers/base_scraper.py | 1 | 7282 | import logging
import re
from datetime import datetime as dt
from time import sleep
import unicodecsv as csv
import yaml
from twython import Twython
from twython.exceptions import TwythonRateLimitError, TwythonError, TwythonAuthError
logger = logging.getLogger('TwittrScrapr.BaseScrapr')
class TwittrScrapr(object)... | mit | -1,241,025,925,491,837,700 | 35.049505 | 134 | 0.589399 | false | 4.33969 | false | false | false |
rhndg/openedx | setup.py | 14 | 2340 | """
Setup script for the Open edX package.
"""
from setuptools import setup
setup(
name="Open edX",
version="0.4",
install_requires=["distribute"],
requires=[],
# NOTE: These are not the names we should be installing. This tree should
# be reorganized to be a more conventional Python tree.
... | agpl-3.0 | -5,923,509,086,404,152,000 | 45.8 | 103 | 0.659829 | false | 4.020619 | false | false | false |
chenjiancan/wechatpy | wechatpy/pay/utils.py | 7 | 1364 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
import hashlib
import socket
import six
from wechatpy.utils import to_binary, to_text
def format_url(params, api_key=None):
data = [to_binary('{0}={1}'.format(k, params[k])) for k in sorted(params)]
if api_key:
data.app... | mit | -6,257,703,847,322,131,000 | 28.021277 | 78 | 0.579912 | false | 3.065169 | false | false | false |
deeuu/loudness | swig/setup.py | 1 | 3697 | #!/usr/bin/python
from distutils.core import setup, Extension
# Third-party modules - we depend on numpy for everything
import numpy
# Obtain the numpy include directory. This logic works across numpy versions.
try:
numpy_include = numpy.get_include()
except AttributeError:
numpy_include = numpy.get_numpy_i... | gpl-3.0 | 3,145,386,878,734,333,000 | 44.085366 | 78 | 0.49148 | false | 4.139978 | false | false | false |
Azure/azure-sdk-for-python | sdk/keyvault/azure-keyvault-certificates/tests/test_examples_certificates.py | 1 | 13712 | # ------------------------------------
# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.
# ------------------------------------
from __future__ import print_function
import time
from azure.keyvault.certificates import (
ApiVersion,
CertificatePolicy,
CertificateContentType,
WellK... | mit | 7,353,950,061,153,039,000 | 36.059459 | 117 | 0.649869 | false | 4.399102 | true | false | false |
khanson679/pyjeopardy | pyjeopardy.py | 1 | 2121 | #!/usr/bin/env python
"""
pyjeopardy.py
Main script for PyJeopardy
By Kenneth Hanson
"""
from __future__ import print_function
import sys
import cmd
from lib import *
import logic
import tkgui as gui
__version__ = "0.1.0"
#
# In-program CLI
#
class CLI(cmd.Cmd):
"""Play game without GUI for testing purposes.... | gpl-2.0 | 3,041,638,828,687,902,000 | 21.56383 | 66 | 0.545026 | false | 3.682292 | false | false | false |
cevaris/pants | src/python/pants/backend/python/tasks2/resolve_requirements.py | 2 | 6241 | # coding=utf-8
# Copyright 2016 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).
from __future__ import (absolute_import, division, generators, nested_scopes, print_function,
unicode_literals, with_statement)
import os
import shu... | apache-2.0 | 2,758,626,227,505,046,500 | 39.00641 | 100 | 0.705816 | false | 4.171791 | false | false | false |
tokland/xhotkeys | test/test_misc.py | 1 | 1199 | #!/usr/bin/python2
import unittest
from xhotkeys import misc
class XhotkeysMiscTest(unittest.TestCase):
def test_struct(self):
struct = misc.Struct("mystruct", var1=1, var2=2)
self.assertEqual(1, struct.var1)
self.assertEqual(2, struct.var2)
self.assertRaises(AttributeError, lambda... | gpl-3.0 | -8,181,736,692,388,294,000 | 31.405405 | 72 | 0.577982 | false | 3.611446 | true | false | false |
iAddz/allianceauth | services/modules/discord/migrations/0002_service_permissions.py | 3 | 2124 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-02-02 05:59
from __future__ import unicode_literals
from django.db import migrations
from django.conf import settings
from django.core.exceptions import ObjectDoesNotExist
from django.contrib.auth.management import create_permissions
import logging
logger ... | gpl-2.0 | 321,438,061,561,898,240 | 33.819672 | 93 | 0.665725 | false | 3.955307 | false | false | false |
arunchaganty/kbp-online | src/kbpo/fleiss.py | 1 | 2108 | """ Computes the Fleiss' Kappa value as described in (Fleiss, 1971) """
""" Taken from https://en.wikibooks.org/wiki/Algorithm_Implementation/Statistics/Fleiss%27_kappa#Python"""
DEBUG = False
def computeKappa(mat):
""" Computes the Kappa value
@param n Number of rating per subjects (number of human rater... | mit | -5,477,290,563,829,649,000 | 25.35 | 106 | 0.500949 | false | 3.015737 | false | false | false |
janvc/utility-scripts | scripts/g2ir.py | 1 | 1982 | #!/usr/bin/env python
# G2IR -- This program will create an IR stick spectrum from a Gaussian09 output file
# with a normal mode calculation
# Copyright 2015 by Jan von Cosel
import sys # operating system stuff
import re # regular expressions
FreqFileName = sys.argv[1]
specOutFileName = sys.argv[2]
# find t... | gpl-3.0 | 130,408,350,354,476,560 | 33.77193 | 89 | 0.667003 | false | 3.532977 | false | false | false |
sonicrules1234/sonicbot | sonicbitly.py | 1 | 2946 | import urllib, json, urllib2
API_VERSION = "3.0"
class Api(object) :
def __init__(self, login, apikey) :
self.login = login
self.apikey = apikey
self.baseurl = "http://api.bit.ly/v3/"
def shorten(self, url, justurl=True) :
word = "shorten"
if not url.startswith("http") :... | bsd-3-clause | 8,087,527,622,165,206,000 | 34.493976 | 117 | 0.537339 | false | 3.748092 | false | false | false |
Exterminus/harpia | harpia/bpGUI/smooth.py | 2 | 8551 | # -*- coding: utf-8 -*-
# [HARPIA PROJECT]
#
#
# S2i - Intelligent Industrial Systems
# DAS - Automation and Systems Department
# UFSC - Federal University of Santa Catarina
# Copyright: 2006 - 2007 Luis Carlos Dill Junges (lcdjunges@yahoo.com.br), Clovis Peruchi Scotti (scotti@ieee.org),
# Guilh... | gpl-2.0 | 7,405,803,720,298,615,000 | 37.318386 | 153 | 0.498069 | false | 3.92693 | false | false | false |
maikodaraine/EnlightenmentUbuntu | bindings/python/python-efl/tests/evas/test_02_canvas.py | 1 | 3629 | #!/usr/bin/env python
from efl import evas
import unittest
def _new_canvas():
c = evas.Canvas(method="buffer", size=(400, 500), viewport=(0, 0, 400, 500))
c.engine_info_set(c.engine_info_get())
return c
class TestCanvasConstructor(unittest.TestCase):
def testNoConstructorArgs(self):
c = eva... | unlicense | 2,433,900,386,228,733,000 | 25.489051 | 80 | 0.598788 | false | 3.459485 | true | false | false |
stackforge/compute-hyperv | compute_hyperv/tests/test.py | 1 | 5873 | # 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 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | apache-2.0 | 3,652,061,520,124,108,000 | 34.167665 | 79 | 0.648391 | false | 4.118513 | true | false | false |
pashazz/change-theme | draft/yandex.py | 1 | 5884 | #-------------------------------------------------------------------------------
# Copyright (c) 2012 Pavel Borisov
# All rights reserved. ChangeTheme and the accompanying materials
# are made available under the terms of the GNU Public License v3.0
# which accompanies this distribution, and is available at
# http://ww... | gpl-3.0 | 1,988,833,356,339,482,600 | 36.33758 | 115 | 0.544695 | false | 4.006835 | false | false | false |
eblot/miscripts | Python/email/validate_emails.py | 1 | 6120 | #!/usr/bin/env python2.7
# Online SMTP address validator (expect a lot of false positive and negative)
import dns.resolver
import os
import smtplib
import socket
import sys
from Queue import Queue
from optparse import OptionParser
from threading import Thread
from time import sleep
def check_emails(mx, out, q):
... | mit | 7,074,613,184,819,921,000 | 33 | 83 | 0.476634 | false | 4.244105 | false | false | false |
noironetworks/aci-integration-module | aim/db/model_base.py | 1 | 6979 | # Copyright (c) 2016 Cisco Systems
# 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 require... | apache-2.0 | -6,672,670,160,484,983,000 | 33.37931 | 78 | 0.598367 | false | 4.081287 | false | false | false |
mitodl/open-discussions | course_catalog/etl/see.py | 1 | 6676 | """Sloan course catalog ETL"""
import logging
import re
from datetime import datetime
from decimal import Decimal
from urllib.parse import urljoin
import requests
from bs4 import BeautifulSoup as bs
from django.conf import settings
from course_catalog.constants import OfferedBy, PlatformType, see_edx_mapping
from cou... | bsd-3-clause | -4,243,469,900,455,823,400 | 29.484018 | 88 | 0.566657 | false | 4.209332 | false | false | false |
stephenjust/stk-stats | userreport/views/usercount.py | 1 | 1645 | from userreport.models import UserReport
from django.http import HttpResponse
from django.views.decorators.cache import cache_page
from matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas
from matplotlib.figure import Figure
from matplotlib.dates import DateFormatter
import matplotlib.artist
@cac... | mit | 159,869,546,437,100,300 | 30.037736 | 76 | 0.668693 | false | 3.5 | false | false | false |
PositroniumSpectroscopy/positronium | setup.py | 1 | 1163 | from setuptools import setup
def readme():
with open('README.rst') as f:
return f.read()
CLASSIFIERS = [
"Development Status :: 5 - Production/Stable",
"Intended Audience :: Education",
"Intended Audience :: Science/Research",
"Natural Language :: English",
"License :: OSI Approved :: ... | bsd-3-clause | 1,568,726,006,952,402,000 | 31.305556 | 67 | 0.628547 | false | 3.692063 | false | false | false |
cbigler/jackrabbit-googlev3-geocoder | src/impl/geocoder.py | 1 | 1786 | from Geohash import geohash
import geopy
from rate_limiter import RateLimiter
class Geocoder(object):
def __init__(self, api_key=None, client_id=None, secret_key=None, reverse_cache_geohash=9):
if api_key:
self._geolocator = geopy.GoogleV3(api_key=api_key)
elif client_id and secret_ke... | mit | 6,731,034,687,526,127,000 | 35.44898 | 108 | 0.632139 | false | 3.832618 | false | false | false |
Gowiem/TuneDawgiBeaconServer | ibeacon_server.py | 1 | 7670 | #!/usr/bin/env python
import subprocess
import os
import signal
import sys
import datetime
import time
import argparse
import traceback
from firebase import firebase
import logging
import json
import urllib2
logger = logging.getLogger('iBeaconServer')
logger.setLevel(logging.INFO)
LOG_FILE_NAME = 'ibeacon_server.log... | gpl-3.0 | -4,808,458,900,237,252,000 | 32.938053 | 97 | 0.584746 | false | 3.654121 | false | false | false |
dadiletta/JarvusPi | comms.py | 1 | 4465 | import threading
import logging
import pygame
import subprocess
import requests
import pickle
import private
import os
from Adafruit_IO import Client, Feed
class Comms(threading.Thread):
def __init__(self):
threading.Thread.__init__(self)
# trouble with logging's basicConfig using Kivy, so I use ... | mit | -5,329,435,352,887,030,000 | 32.074074 | 114 | 0.560358 | false | 3.916667 | false | false | false |
OctoPrint/OctoPrint-Growl | setup.py | 1 | 4305 | # coding=utf-8
########################################################################################################################
### Do not forget to adjust the following variables to your own plugin.
# The plugin's identifier, has to be unique
plugin_identifier = "growl"
# The plugin's python package, should... | agpl-3.0 | 2,618,618,362,564,974,600 | 42.464646 | 140 | 0.687427 | false | 4.17767 | false | false | false |
chris48s/mapit | mapit/shortcuts.py | 2 | 4104 | import itertools
import json
import django
from django import http
from django.db import connection
from django.conf import settings
from django.shortcuts import get_object_or_404 as orig_get_object_or_404
from django.template import loader
from django.utils.six.moves import map
from django.utils.encoding import smart... | agpl-3.0 | -5,602,813,783,828,374,000 | 34.37931 | 107 | 0.679094 | false | 3.8 | false | false | false |
jreback/pandas | pandas/tests/frame/methods/test_count.py | 1 | 4562 | import numpy as np
import pytest
from pandas import DataFrame, Index, Series
import pandas._testing as tm
class TestDataFrameCount:
def test_count_multiindex(self, multiindex_dataframe_random_data):
frame = multiindex_dataframe_random_data
frame = frame.copy()
frame.index.names = ["a", "... | bsd-3-clause | -5,714,146,437,988,828,000 | 31.820144 | 82 | 0.563569 | false | 3.667203 | true | false | false |
google/gazoo-device | gazoo_device/detect_criteria.py | 1 | 14828 | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 1,339,897,862,761,077,000 | 32.024499 | 80 | 0.709941 | false | 3.701448 | false | false | false |
linux-ha-japan/pm_ctl | pm_ctl_stop.py | 1 | 4045 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# pm_ctl_stop.py : Script of stop pacemaker in target node
#
# Copyright (C) 2011 NIPPON TELEGRAPH AND TELEPHONE CORPORATION
#
# 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 Fr... | gpl-2.0 | 5,882,602,512,618,860,000 | 29.413534 | 111 | 0.585414 | false | 3.950195 | false | false | false |
xiangke/pycopia | QA/pycopia/remote/PosixClient.py | 1 | 1431 | #!/usr/bin/python2.4
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
#
# $Id$
#
# Copyright (C) 1999-2006 Keith Dart <keith@kdart.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software... | lgpl-2.1 | -8,235,386,439,103,076,000 | 30.108696 | 82 | 0.751922 | false | 3.846774 | false | false | false |
ooici/marine-integrations | mi/dataset/parser/test/test_optaa_dj_cspp.py | 1 | 22537 | #!/usr/bin/env python
"""
@package mi.dataset.parser.test.test_optaa_dj_cspp
@file marine-integrations/mi/dataset/parser/test/test_optaa_dj_cspp.py
@author Joe Padula
@brief Test code for a optaa_dj_cspp data parser
"""
import os
import yaml
import numpy
# noinspection PyUnresolvedReferences
from nose.plugins.attrib... | bsd-2-clause | 3,778,251,839,633,453,600 | 38.95922 | 110 | 0.608466 | false | 4.08205 | true | false | false |
emory-libraries/readux | readux/books/forms.py | 1 | 7951 | import re
from django import forms
from django.utils.html import mark_safe
from eulcommon.searchutil import search_terms
# add is_checkbox method to all form fields, to enable template logic.
# thanks to:
# http://stackoverflow.com/questions/3927018/django-how-to-check-if-field-widget-is-checkbox-in-the-template
seta... | apache-2.0 | 6,730,899,422,883,395,000 | 44.695402 | 190 | 0.64168 | false | 4.42706 | false | false | false |
casmlab/quac | lib/testable.py | 1 | 3560 | '''This module lets you do two things:
1. Write doctest tests for your module and put them out of the way at the
end, with no weird syntax to remember.
2. Automatically run the tests when the module is executed.
The way this is done is by calling register(), which invokes some very
sneaky mag... | apache-2.0 | -8,618,595,964,260,040,000 | 34.6 | 78 | 0.696629 | false | 3.955556 | true | false | false |
mhernan88/fo_detect | parse_image_data.py | 1 | 3631 | from scripts.preprocessing.preprocessing import *
from configparser import ConfigParser
from skimage.io import imread,imshow
import os, glob, argparse, pickle, subprocess, matplotlib.pyplot as plt
class DataParser(preprocessing):
def __init__(self,root,cfg,o,ce,gb,s):
self.root = root
self.cfg = c... | mit | -681,554,253,691,717,500 | 38.053763 | 120 | 0.598458 | false | 3.652918 | false | false | false |
17zuoye/jieba | jieba/analyse/__init__.py | 2 | 2087 | #encoding=utf-8
import jieba
import os
try:
from analyzer import ChineseAnalyzer
except ImportError:
pass
_curpath = os.path.normpath( os.path.join( os.getcwd(), os.path.dirname(__file__) ) )
abs_path = os.path.join(_curpath, "idf.txt")
IDF_DICTIONARY = abs_path
STOP_WORDS = set([
"the","of","is","and","... | mit | 5,658,756,748,541,014,000 | 30.621212 | 190 | 0.613321 | false | 2.93118 | false | false | false |
zhengwsh/InplusTrader_Linux | rqalpha/mod/rqalpha_mod_sys_analyser/plot.py | 1 | 7638 | # -*- coding: utf-8 -*-
#
# Copyright 2017 Ricequant, 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 ... | mit | -7,841,064,477,291,970,000 | 39.349206 | 136 | 0.621033 | false | 3.116469 | false | false | false |
mago1chi/cTPR | preprocess.py | 1 | 1778 | # データセットの2段階目の前処理を実行する.
# 10tweet以上に現れる名詞を70%以下のtweetに現れる名詞のみを抽出する.
import psycopg2
import cTPR
import os, sys
import parse_proc
DBPATH = "dbname=image_tagging host=localhost user=postgres"
con = psycopg2.connect(DBPATH)
concur = con.cursor()
concur.execute("delete from preprocess")
concur.execute("""select disti... | gpl-2.0 | -1,524,033,068,794,139,100 | 25.433333 | 88 | 0.671501 | false | 2.478125 | false | false | false |
PyBossa/pybossa | pybossa/importers/dropbox.py | 1 | 3686 | # -*- coding: utf8 -*-
# This file is part of PYBOSSA.
#
# Copyright (C) 2015 Scifabric LTD.
#
# PYBOSSA 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 your op... | agpl-3.0 | 3,606,224,304,660,477,000 | 37.395833 | 77 | 0.584916 | false | 3.88 | false | false | false |
missionpinball/mpf | mpf/tests/test_DeviceDriver.py | 1 | 3884 | """Test coils."""
from mpf.platforms.interfaces.driver_platform_interface import PulseSettings, HoldSettings
from mpf.tests.MpfTestCase import MpfTestCase
from unittest.mock import MagicMock
class TestDeviceDriver(MpfTestCase):
def get_config_file(self):
return 'coils.yaml'
def get_machine_path(sel... | mit | -1,132,632,849,563,594,800 | 44.694118 | 112 | 0.631308 | false | 3.416007 | true | false | false |
nwilming/ocupy | ocupy/parallel.py | 1 | 11498 | #!/usr/bin/env python
"""A set of classes that allow to run embarassingly
parallel tasks over a grid"""
import math
import pickle
import xmlrpc.client
import numpy as np
from twisted.internet import reactor
from twisted.web import xmlrpc
class TaskManager(xmlrpc.XMLRPC):
"""
A server that distributes ta... | gpl-2.0 | -1,314,210,791,537,684,700 | 33.842424 | 80 | 0.612889 | false | 4.39358 | false | false | false |
skoslowski/gnuradio | gr-network/python/network/tcp_source.py | 9 | 2789 | #
# Copyright 2009,2019,2020 Free Software Foundation, Inc.
#
# This file is part of GNU Radio
#
# GNU Radio is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 3, or (at your option)
# any later ve... | gpl-3.0 | 3,412,824,551,210,516,000 | 31.430233 | 79 | 0.607028 | false | 3.928169 | false | false | false |
zachdj/ultimate-tic-tac-toe | widgets/Picker.py | 1 | 6565 | import pygame
from .WidgetBase import WidgetBase
from scenes.DrawingUtils import aa_border_rounded_rect
from services import SettingsService as Settings
from services import ImageService
from services import FontService
class Picker(WidgetBase):
def __init__(self, x, y, width, height, values, callback=None, wrap_... | mit | -2,114,780,233,043,689,000 | 49.114504 | 151 | 0.604874 | false | 4.173554 | false | false | false |
openhatch/oh-mainline | vendor/packages/python-social-auth/social/backends/linkedin.py | 37 | 3779 | """
LinkedIn OAuth1 and OAuth2 backend, docs at:
http://psa.matiasaguirre.net/docs/backends/linkedin.html
"""
from social.backends.oauth import BaseOAuth1, BaseOAuth2
class BaseLinkedinAuth(object):
EXTRA_DATA = [('id', 'id'),
('first-name', 'first_name', True),
('last-name... | agpl-3.0 | 3,827,095,241,723,375,000 | 38.364583 | 78 | 0.585605 | false | 3.805639 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/coghq/DistributedCountryClubRoom.py | 1 | 8151 | from panda3d.core import *
from panda3d.direct import *
from toontown.toonbase.ToontownGlobals import *
from direct.distributed.ClockDelta import *
from direct.interval.IntervalGlobal import *
import random
from otp.level import DistributedLevel
from direct.directnotify import DirectNotifyGlobal
import CountryClubRoomB... | apache-2.0 | -8,785,108,927,247,043,000 | 34.593886 | 236 | 0.680039 | false | 3.605042 | false | false | false |
ivaano/zato | code/zato-web-admin/src/zato/admin/web/views/security/wss.py | 6 | 4371 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2010 Dariusz Suchojad <dsuch at zato.io>
Licensed under LGPLv3, see LICENSE.txt for terms and conditions.
"""
from __future__ import absolute_import, division, print_function, unicode_literals
# stdlib
import logging
from json import dumps
from traceback import format_exc
... | gpl-3.0 | 7,807,883,756,950,410,000 | 38.736364 | 119 | 0.673988 | false | 3.485646 | false | false | false |
sfcta/CountDracula | geodjango/geodjango/settings.py | 1 | 5824 | # Django settings for geodjango project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
# set this!
ADMINS = (
('Lisa Zorn', 'lisa.zorn@sfcta.org'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.contrib.gis.db.backends.postgis',
'NAME': 'countdracula_geodjango', # set this!
... | gpl-3.0 | -4,591,393,236,333,381,000 | 32.67052 | 88 | 0.686641 | false | 3.621891 | false | false | false |
IntegerMan/Pi-MFD | PiMFD/Applications/Navigation/Tags/BarrierTagHandling.py | 1 | 3157 | # coding=utf-8
"""
Handles the "barrier" tag
"""
from PiMFD.Applications.Navigation.Tags.TagHandling import TagHandler
__author__ = 'Matt Eland'
class BarrierTagHandler(TagHandler):
def get_color(self, entity, value, cs):
if value in ('city_wall', 'guard_rail', 'cable_barrier', 'block', 'border_control... | gpl-2.0 | 651,775,863,171,766,400 | 32.956989 | 108 | 0.539436 | false | 3.794471 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.