repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
mtearle/npyscreenreactor | npyscreenreactor/__init__.py | 1 | 2663 | #!/usr/bin/env python
# npyscreenreactory.py
# Inspired by pausingreactor.py and xmmsreactor.py
# npyscreen modifications
# Copyright (c) 2015 Mark Tearle <mark@tearle.com>
# See LICENSE for details.
# vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4
"""
This module provides npyscreen event loop support for Tw... | mit | 1,564,531,213,550,637,600 | 25.63 | 86 | 0.685693 | false | 3.962798 | false | false | false |
google-research-datasets/tydiqa | baseline/debug.py | 1 | 6315 | # coding=utf-8
# Copyright 2020 The Google Research Team 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 app... | apache-2.0 | 6,415,408,893,063,222,000 | 34.477528 | 82 | 0.633888 | false | 3.523996 | false | false | false |
dpiekacz/cumulus-linux-ansible-modules | library/cl_quagga_ospf.py | 2 | 15655 | #!/usr/bin/env python
#
# Copyright (C) 2014, Cumulus Networks www.cumulusnetworks.com
#
#
DOCUMENTATION = '''
---
module: cl_quagga_ospf
author: Cumulus Networks
short_description: Configure basic OSPFv2 parameters and interfaces using Quagga
description:
- Configures basic OSPFv2 global parameters such as \
route... | gpl-3.0 | 101,102,559,503,141,020 | 34.3386 | 93 | 0.595976 | false | 3.716762 | true | false | false |
paulbodean88/automation-design-patterns | src/state/state.py | 1 | 1939 | """
This pattern provides different behaviours based on the internal object state
An implementation examples based on the test execution life cycle will be provided
"""
import abc
from src.utils import get_selenium_driver
class Manager:
"""
State machine manager.
Acting as an interface to the client and ... | mit | -7,762,629,137,601,126,000 | 20.786517 | 90 | 0.601341 | false | 4.280353 | true | false | false |
Rassilion/ProjectC | web/app/views.py | 1 | 6083 | #!/usr/bin/python
# -*- coding: utf-8 -*-
import time
from sqlalchemy import desc
from forms import *
from flask.ext.security import roles_accepted, roles_required, login_required, Security, utils, current_user
from . import app, db, r
from .utils.table import Table
from flask import request, g, render_template, redire... | gpl-3.0 | -1,107,422,444,037,347,500 | 33.460227 | 118 | 0.679472 | false | 3.299782 | false | false | false |
jonasfoe/COPASI | copasi/bindings/python/unittests/Test_CFunctionParameter.py | 1 | 2533 | # -*- coding: utf-8 -*-
# Copyright (C) 2017 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., University of Heidelberg, and University of
# of Connecticut School of Medicine.
# All rights reserved.
# Copyright (C) 2010 - 2016 by Pedro Mendes, Virginia Tech Intellectual
# Properties, Inc., Universit... | artistic-2.0 | -7,394,096,215,339,876,000 | 30.6625 | 86 | 0.699566 | false | 3.306789 | true | false | false |
Harry-R/skylines | skylines/model/search.py | 3 | 6729 | import sys
import shlex
from sqlalchemy import literal_column, cast, desc, Unicode
from sqlalchemy.dialects.postgresql import array
from skylines.database import db
from skylines.lib.types import is_unicode
PATTERNS = [
(u'{}', 5), # Matches token exactly
(u'{}%', 3), # Begins with token
(u'% {}%... | agpl-3.0 | -5,880,510,911,118,901,000 | 27.0375 | 90 | 0.625799 | false | 4.058504 | false | false | false |
slackhq/python-slackclient | slack_sdk/scim/v1/response.py | 1 | 7575 | import json
from typing import Dict, Any, List, Optional
from slack_sdk.scim.v1.group import Group
from slack_sdk.scim.v1.internal_utils import _to_snake_cased
from slack_sdk.scim.v1.user import User
class Errors:
code: int
description: str
def __init__(self, code: int, description: str) -> None:
... | mit | 5,657,046,205,296,565,000 | 27.370787 | 85 | 0.614521 | false | 3.993147 | false | false | false |
eti-p-doray/gis-upir | spat/trajectory/load.py | 1 | 2871 | import datetime, logging
import csv
import pyproj
def load_csv(data):
rows = iter(data)
header = next(rows)
latitude_idx = next(i for i,v in enumerate(header) if v == "latitude")
longitude_idx = next(i for i,v in enumerate(header) if v == "longitude")
speed_idx = next(i for i,v in enumerate(header... | mit | 5,230,722,202,053,931,000 | 35.35443 | 85 | 0.536747 | false | 3.864065 | false | false | false |
pthcode/libpth | libpth/utils.py | 1 | 2180 | import os
import time
import tempfile
import functools
from . import metafile
def rate_limit(interval):
"""
Rate limiting decorator which allows the wrapped function to be
called at most once per `interval`.
"""
def decorator(fn):
last_called = [0.0] # This is a list because primitives ar... | gpl-3.0 | 3,381,352,357,227,602,400 | 28.863014 | 101 | 0.633028 | false | 4.082397 | false | false | false |
sergeLabo/pygame_server_gui | server_gui.py | 1 | 6213 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
# server_gui.py
#############################################################################
# Copyright (C) Labomedia February 2015
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as ... | gpl-2.0 | -2,229,084,934,627,521,800 | 33.670391 | 85 | 0.573477 | false | 3.440133 | false | false | false |
MEhlinger/rpi_pushbutton_games | fallingSkies/fallingSkies.py | 1 | 4396 | # Main class
# Coded in Python 2.7.10 with PyGame
# by Brett Burley-Inners
# Update :: 11/19/2015
import pygame, time, random, sys
import player, skyChunk
def main():
# Initial setup
pygame.init()
font = pygame.font.SysFont("monospace", 15)
pygame.key.set_repeat(1, 5)
clock = pygame.time.Clock... | mit | 944,511,531,504,203,900 | 32.815385 | 199 | 0.594404 | false | 3.866315 | false | false | false |
lifemapper/core | LmBackend/common/layer_tools.py | 1 | 8515 | """Module containing compute environment layer management code
Todo:
* Add convert tool to config
* Use verify module
* Skip if exists
* Alphabetize
"""
import os
import subprocess
from time import sleep
import numpy
from osgeo import gdal
from LmCommon.common.lmconstants import (LMFormat, DEFAULT_N... | gpl-3.0 | 6,454,074,297,704,611,000 | 34.041152 | 79 | 0.577569 | false | 3.695747 | false | false | false |
kursawe/MCSTracker | src/tracking/core.py | 1 | 78191 | # Copyright 2016 Jochen Kursawe. See the LICENSE file at the top-level directory
# of this distribution and at https://github.com/kursawe/MCSTracker/blob/master/LICENSE.
"""In this the main tracking functions are defined
"""
import sys
import os
from .maximum_common_subgraph_finder import *
import mesh
from mesh.in_o... | bsd-3-clause | 994,204,286,584,167,700 | 46.735653 | 170 | 0.60223 | false | 4.291493 | false | false | false |
procool/myvdl | myvdlclass/plugins/mailru.py | 1 | 3857 | import re
import logging
import subprocess
import sys
import json
from urllib import quote_plus
from myvdlclass.plugins.base import Extention
from myvdlclass.lib.curl import CUrl, HTTPErrorEx
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
class MailRU(Extention):
enabled=True
... | bsd-2-clause | 7,366,180,022,331,641,000 | 28.669231 | 105 | 0.552502 | false | 3.171875 | false | false | false |
CiscoSystems/fabric_enabler | dfa/server/services/firewall/native/fw_constants.py | 1 | 6193 | # Copyright 2014 Cisco Systems, Inc.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless requi... | apache-2.0 | 6,778,517,398,603,200,000 | 43.553957 | 79 | 0.743743 | false | 2.480176 | false | false | false |
angea/corkami | src/angecryption/rmll/angecryption/angecrypt.py | 1 | 1936 | #mini-AngeCryption
#Ange Albertini 2014, BSD Licence - with the help of Jean-Philippe Aumasson
import struct
import sys
import binascii
source_file, target_file, result_file, key = "logo11w.png", "duckduckgo.png", "angecrypted.png", "AngeCryptionKey!"
from Crypto.Cipher import AES
BS = 16
pad = lambda... | bsd-2-clause | 7,468,474,675,663,712,000 | 24.547945 | 115 | 0.607438 | false | 2.674033 | false | false | false |
PaulSonOfLars/telegram-FinanceBot | modules/notes.py | 2 | 2056 | #!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
""" This is the note module, taking care of all note related functions.
Note data is found in data/notes.json.
"""
from telegram.ext import CommandHandler
from modules import helper, strings
def save_note(bot, update, args):
notes = helper.loadjson(loc_notesjson... | apache-2.0 | -145,706,918,541,019,170 | 24.073171 | 88 | 0.612354 | false | 3.337662 | false | false | false |
Azure/azure-sdk-for-python | sdk/resources/azure-mgmt-resource/azure/mgmt/resource/resources/v2019_07_01/aio/_configuration.py | 1 | 3218 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 1,807,116,016,493,808,600 | 47.029851 | 134 | 0.682101 | false | 4.558074 | true | false | false |
beatorizu/tekton | backend/appengine/routes/temas/rest.py | 1 | 1610 | # -*- coding: utf-8 -*-
from __future__ import absolute_import, unicode_literals
from google.appengine.ext import ndb
from distutils import log
from gaecookie.decorator import no_csrf
from gaepermission.decorator import login_not_required
from tekton.gae.middleware.json_middleware import JsonUnsecureResponse, JsonRespo... | mit | 6,514,255,939,189,863,000 | 26.305085 | 84 | 0.681988 | false | 2.959559 | false | false | false |
briot/geneapro | backend/geneaprove/migrations/0003_initial_data.py | 1 | 10022 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
def forward(apps, schema_editor):
Surety_Scheme = apps.get_model('geneaprove', 'Surety_Scheme')
SSPart = apps.get_model('geneaprove', 'Surety_... | gpl-2.0 | -5,780,604,873,144,046,000 | 50.659794 | 92 | 0.550489 | false | 3.260247 | false | false | false |
southpawtech/TACTIC-DEV | src/pyasm/biz/file.py | 1 | 34859 | ###########################################################
#
# Copyright (c) 2005, Southpaw Technology
# All Rights Reserved
#
# PROPRIETARY INFORMATION. This software is proprietary to
# Southpaw Technology, and is not to be reproduced, transmitted,
# or disclosed in any way without written permi... | epl-1.0 | 5,453,433,257,592,640,000 | 29.903369 | 158 | 0.526464 | false | 3.817236 | false | false | false |
alirizakeles/zato | code/zato-web-admin/src/zato/admin/web/views/definition/cassandra.py | 1 | 2702 | # -*- coding: utf-8 -*-
"""
Copyright (C) 2013 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
# Zato
from zato.admin.web.forms import ChangePasswordFo... | gpl-3.0 | 2,134,947,678,236,529,000 | 34.552632 | 132 | 0.676906 | false | 3.527415 | false | false | false |
pmarks-net/grpc | tools/distrib/python/grpcio_tools/setup.py | 9 | 7849 | # Copyright 2016, Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | -6,471,850,476,679,639,000 | 38.84264 | 95 | 0.705822 | false | 3.456187 | false | false | false |
gotling/PyTach | pytach/web/web.py | 1 | 1769 | # -*- coding: utf-8 -*-
import os
import re
import bottle
import string
import inspect
from bottle import static_file, template, url, request
import dispatch
static_path = os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))) + '/static'
bottle.TEMPLATE_PATH.insert(0, os.path.dirname(os.path.abs... | mit | -5,929,668,997,344,574,000 | 33.705882 | 146 | 0.715093 | false | 3.771855 | false | false | false |
TamiaLab/carnetdumaker | apps/announcements/tests/test_views.py | 1 | 8883 | """
Tests suite for the views of the announcements app.
"""
from datetime import timedelta
from django.test import TestCase, Client
from django.core.urlresolvers import reverse
from django.contrib.auth import get_user_model
from django.utils import timezone
from ..models import (Announcement,
A... | agpl-3.0 | -3,132,277,509,876,051,500 | 49.76 | 117 | 0.589778 | false | 4.770677 | true | false | false |
StuJ/collator | config/settings/local.py | 1 | 2265 | # -*- coding: utf-8 -*-
"""
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
"""
import socket
import os
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bo... | mit | -5,780,646,828,236,686,000 | 29.608108 | 99 | 0.485651 | false | 4.148352 | false | false | false |
deepak02/rasa_core | rasa_core/policies/policy.py | 1 | 2298 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import numpy as np
from builtins import object
from numpy.core.records import ndarray
from typing import Any
from typing import List
from typing import Op... | apache-2.0 | -5,139,038,974,284,616,000 | 29.64 | 78 | 0.667102 | false | 4.263451 | false | false | false |
pagea/unstyle | unstyle/gui/unstyle_frontend.py | 1 | 9496 | from PyQt5.QtCore import pyqtSlot, pyqtSignal
from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog
from PyQt5.QtWidgets import QTableWidgetItem, QHeaderView
from PyQt5 import QtGui
from unstyle.gui.unstyle_auto import Ui_Unstyle
import unstyle.controller
class Unstyle(QMainWindow):
def __init__(sel... | mit | 2,554,661,328,254,949,000 | 43.792453 | 84 | 0.607098 | false | 4.369995 | false | false | false |
songjun54cm/MachineLearningPy | NeuralNetwork/Layers/layer_activation.py | 1 | 1191 | import numpy as np
from layer_example import Layer
class Activation(Layer):
def __init__(self, type):
if type=='sigmod':
self.fun = self.sigmoid
self.fun_d = self.sigmoid_d
elif type == 'relu':
self.fun = self.relu
self.fun_d = self.relu_d
eli... | gpl-2.0 | -2,508,791,994,177,604,000 | 24.361702 | 61 | 0.533165 | false | 3.308333 | false | false | false |
goirijo/thermoplotting | thermoplotting/xtals/lattice.py | 1 | 12145 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from builtins import zip
from builtins import range
from builtins import object
from ..ternary import normal
from ..misc import *
import itertools
from mpl_toolkits.mplot3d.art3d import Poly3DCollection
from m... | mit | -3,046,888,105,209,656,000 | 26.048998 | 118 | 0.646521 | false | 3.47397 | false | false | false |
TribeMedia/synapse | synapse/metrics/metric.py | 2 | 6074 | # -*- coding: utf-8 -*-
# Copyright 2015, 2016 OpenMarket Ltd
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,878,155,030,509,417,000 | 30.148718 | 86 | 0.607837 | false | 3.765654 | false | false | false |
pulkitag/mujoco140-py | mujoco_py/mjtypes.py | 1 | 238632 |
# AUTO GENERATED. DO NOT CHANGE!
from ctypes import *
import numpy as np
class MJCONTACT(Structure):
_fields_ = [
("dist", c_double),
("pos", c_double * 3),
("frame", c_double * 9),
("includemargin", c_double),
("friction", c_double * 5),
("solref", c_double * ... | mit | 4,527,838,158,645,334,000 | 35.583167 | 187 | 0.619699 | false | 3.239554 | false | false | false |
ismaelpuerto/i3pystatus | i3pystatus/core/color.py | 22 | 1863 | from colour import Color
class ColorRangeModule(object):
"""
Class to dynamically generate and select colors.
Requires the PyPI package `colour`
"""
start_color = "#00FF00"
end_color = 'red'
@staticmethod
def get_hex_color_range(start_color, end_color, quantity):
"""
... | mit | 5,067,627,435,876,962,000 | 29.540984 | 99 | 0.559313 | false | 4.425178 | false | false | false |
nightmarebadger/tutorials-python-basic | basic/classes/class_inheritance.py | 1 | 2060 | # -*- coding: utf-8 -*-
"""
An example of class inheritance.
"""
class Enemy(object):
"""A stupid enemy that doesn't know how to attack, but knows how to die.
>>> stupid = Enemy(10)
Let's hit him and see if he dies
>>> stupid.take_damage(5)
>>> stupid.alive
True
Nope, not dead yet ..... | mit | 5,199,249,915,120,525,000 | 17.230088 | 76 | 0.542233 | false | 3.280255 | false | false | false |
alexandrem/ansible-openstack-config-gen | config_parser.py | 2 | 5526 | from os.path import basename, splitext
from datetime import datetime
from collections import OrderedDict
import re
import yaml
from oslo_config import iniparser
VERSION = "0.6.0"
class OSConfigParser(iniparser.BaseParser):
comment_called = False
values = None
section = ''
comments = []
comment... | mit | -3,406,857,260,455,001,600 | 27.484536 | 83 | 0.503257 | false | 4.23773 | false | false | false |
Xicnet/burnstation | daemon/burnstation_daemon.py | 1 | 6793 | #!/usr/bin/python
#
# mediabase daemon - creates users' homes, imports files and generates thumbnails
# by rama@r23.cc
MODULE = 'daemon'
import SocketServer
import sys, os, os.path
sys.path.append(os.getcwd())
sys.path.append("..")
from LoadConfig import config
from ErrorsHandler import *
from gst_player import Ogg... | gpl-3.0 | -3,496,441,776,671,483,000 | 36.530387 | 107 | 0.430001 | false | 4.451507 | false | false | false |
qxf2/qxf2-page-object-model | utils/BrowserStack_Library.py | 1 | 3679 | """
First version of a library to interact with BrowserStack's artifacts.
For now, this is useful for:
a) Obtaining the session URL
b) Obtaining URLs of screenshots
To do:
a) Handle expired sessions better
"""
import os,requests
from conf import remote_credentials as remote_credentials
class BrowserStack_Library()... | mit | 150,663,159,781,676,300 | 36.927835 | 312 | 0.661049 | false | 3.523946 | false | false | false |
phenoxim/nova | placement-api-ref/source/conf.py | 1 | 3025 | # 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
# distributed under the... | apache-2.0 | -3,952,762,799,330,654,000 | 32.611111 | 79 | 0.705124 | false | 4.006623 | false | false | false |
dereulenspiegel/spotimc | resources/libs/spotimcgui/views/playlists/detail.py | 1 | 8685 | '''
Copyright 2011 Mikel Azkolain
This file is part of Spotimc.
Spotimc is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Spotimc ... | gpl-3.0 | 8,551,286,709,862,739,000 | 35.435345 | 99 | 0.572021 | false | 4.375315 | false | false | false |
tovrstra/horton | horton/periodic.py | 4 | 9840 | # -*- coding: utf-8 -*-
# HORTON: Helpful Open-source Research TOol for N-fermion systems.
# Copyright (C) 2011-2017 The HORTON Development Team
#
# This file is part of HORTON.
#
# HORTON is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by th... | gpl-3.0 | -8,768,901,301,395,788,000 | 33.640845 | 84 | 0.575219 | false | 3.405331 | false | false | false |
BenoitDamota/mempamal | mempamal/arguments.py | 1 | 2611 | # Author: Benoit Da Mota <damota.benoit@gmail.com>
#
# License: BSD 3 clause
"""
Build arguments parser for the scripts (mapper, reducers and command builder).
"""
import argparse
def get_map_argparser():
"""Build command line arguments parser for a mapper.
Arguments parser compatible with the commands build... | bsd-3-clause | 886,761,547,384,171,100 | 32.474359 | 78 | 0.592876 | false | 4.712996 | false | false | false |
riga/law | examples/workflows/tasks.py | 1 | 4679 | # coding: utf-8
"""
Example showing (local) law workflows.
The actual payload of the tasks is rather trivial.
"""
import os
import time
import random
import six
import luigi
import law
def maybe_wait(func):
"""
Wrapper around run() methods that reads the *slow* flag to decide whether to wait some seconds... | bsd-3-clause | -1,782,150,594,808,893,400 | 35.554688 | 100 | 0.666168 | false | 4.261384 | false | false | false |
thenenadx/forseti-security | google/cloud/security/inventory/pipelines/load_instance_groups_pipeline.py | 1 | 3907 | # Copyright 2017 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | 3,827,020,058,999,647,700 | 39.697917 | 77 | 0.626056 | false | 4.460046 | false | false | false |
wadobo/Ftask | ftask/app/board/task_views.py | 2 | 4705 | # Ftask, simple TODO list application
# Copyright (C) 2012 Daniel Garcia <danigm@wadobo.com>
# This program 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 you... | agpl-3.0 | 2,797,238,628,809,181,000 | 25.885714 | 108 | 0.630606 | false | 3.229238 | false | false | false |
transceptor-technology/trender | trender/block_text.py | 1 | 1588 | '''BlockText, used to parse text with variable etc.
:copyright: 2015, Jeroen van der Heijden (Transceptor Technology)
'''
import re
from .constants import VAR_DOTS
class BlockText:
RE_VAR = re.compile('@([{VAR_DOTS}]+)(!?)'.format(VAR_DOTS=VAR_DOTS),
re.UNICODE)
def __init__(self, ... | mit | -3,713,339,057,923,147,000 | 31.408163 | 76 | 0.578086 | false | 4.020253 | false | false | false |
Velaya/gbol_solr | server/solr/collection1/conf/getCommonNames_multithread.py | 1 | 11230 | # -*- coding: UTF-8 -*-
###############################################
# getCommonNames_multithreading.py
# Ver. 0.2 (multithreading support)
# Script to retrieve common names from Rest-API
# http://openup.nhm-wien.ac.at/commonNames/
# of Uni Wien (Heimo Reiner)
# Christian Koehler, ZFMK: c.koehler@zfmk.de
#... | apache-2.0 | 1,703,331,227,198,309,400 | 41.02682 | 120 | 0.603829 | false | 3.515967 | false | false | false |
ageron/tensorflow | tensorflow/contrib/opt/python/training/reg_adagrad_optimizer.py | 39 | 3782 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | -2,308,720,905,346,034,000 | 34.345794 | 80 | 0.665256 | false | 3.875 | false | false | false |
semolex/astropylis | telescopes.py | 1 | 12316 | # -*- coding: utf-8 -*-
# TODO: convert some methods to numeric attributes.
from decimal import Decimal, getcontext
getcontext().prec = 3
class Telescope(object):
"""
Simple class that represents user's abstract telescope.
"""
__count = 0
def __init__(self, aperture, focal_length, name=None,... | mit | 3,952,873,404,401,258,000 | 41.615917 | 120 | 0.592238 | false | 3.862026 | false | false | false |
Ion-Petcu/StockTrainer | prices/service/stream.py | 1 | 1498 | import json
import time
import tornado.web
from pymongo import CursorType
from sse import Sse
from tornado.iostream import StreamClosedError
class StreamHandler(tornado.web.RequestHandler):
def initialize(self):
self.set_header('Content-Type', 'text/event-stream')
self.set_header('Cache-Control'... | apache-2.0 | 6,930,875,075,670,951,000 | 30.208333 | 100 | 0.581442 | false | 4.070652 | false | false | false |
gridpp/dirac-getting-started | cernatschool/test_pixel.py | 3 | 1163 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#...the usual suspects.
import os, inspect
#...for the unit testing.
import unittest
#...for the logging.
import logging as lg
#...for the pixel wrapper class.
from pixel import Pixel
class PixelTest(unittest.TestCase):
def setUp(self):
pass
def tearD... | mit | -7,315,147,021,007,849,000 | 22.26 | 82 | 0.527945 | false | 3.430678 | true | false | false |
ErickMurillo/ciat_plataforma | monitoreo/indicador06/migrations/0001_initial.py | 3 | 19870 | # -*- coding: utf-8 -*-
from south.utils import datetime_utils as datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Maderable'
db.create_table(u'indicador06_maderable', (
... | mit | -65,981,591,300,281,150 | 66.588435 | 195 | 0.574836 | false | 3.360961 | true | false | false |
CanonicalLtd/ubuntu-image | ubuntu_image/tests/test_hooks.py | 1 | 5000 | """Test the hook mechanism."""
import os
from contextlib import ExitStack
from tempfile import TemporaryDirectory
from textwrap import dedent
from ubuntu_image.hooks import HookError, HookManager
from unittest import TestCase
class TestHooks(TestCase):
def test_hook_compatibility(self):
# This test shou... | gpl-3.0 | 5,770,392,537,122,771,000 | 42.103448 | 78 | 0.5396 | false | 4.248088 | true | false | false |
evensonbryan/yocto-autobuilder | lib/python2.7/site-packages/sqlalchemy_migrate-0.7.2-py2.7.egg/migrate/changeset/databases/postgres.py | 140 | 1129 | """
`PostgreSQL`_ database specific implementations of changeset classes.
.. _`PostgreSQL`: http://www.postgresql.org/
"""
from migrate.changeset import ansisql
from sqlalchemy.databases import postgresql as sa_base
PGSchemaGenerator = sa_base.PGDDLCompiler
class PGColumnGenerator(PGSchemaGenerator, ansisql.A... | gpl-2.0 | 2,808,827,514,245,865,500 | 25.880952 | 72 | 0.777679 | false | 4.30916 | false | false | false |
Yadnss/yadnss | scripts/extract_files.py | 1 | 1658 | #!/usr/bin/env python3
from dnestpy import PAKArchive
from pathlib import Path
##########
# Config
##########
# Required game files
required_files = {
# Required game archive
'Resource00.pak': [
# Files needed from that archive
'resource/uistring/uistring.xml',
'resource/ui/mainbar/ski... | mit | -824,540,858,606,843,400 | 27.586207 | 74 | 0.658625 | false | 3.397541 | false | false | false |
DayGitH/Python-Challenges | DailyProgrammer/DP20170424A.py | 1 | 1796 | """
[2017-04-24] Challenge #312 [Easy] L33tspeak Translator
https://www.reddit.com/r/dailyprogrammer/comments/67dxts/20170424_challenge_312_easy_l33tspeak_translator/
# Description
L33tspeak - the act of speaking like a computer hacker (or hax0r) - was popularized in the late 1990s as a mechanism of
abusing ASCII art... | mit | -1,675,895,513,782,828,000 | 29.440678 | 119 | 0.644766 | false | 2.8736 | false | false | false |
khazhyk/geoq | geoq/core/forms.py | 4 | 6590 | # -*- coding: utf-8 -*-
# This technical data was produced for the U. S. Government under Contract No. W15P7T-13-C-F600, and
# is subject to the Rights in Technical Data-Noncommercial Items clause at DFARS 252.227-7013 (FEB 2012)
from django import forms
from django.forms.widgets import (RadioInput, RadioSelect, Check... | mit | -5,319,748,840,823,283,000 | 43.829932 | 127 | 0.600303 | false | 4.023199 | false | false | false |
sunlightlabs/sarahs_inbox | mail_dedupe/views.py | 1 | 2307 | from settings import *
from django.shortcuts import render_to_response, get_object_or_404
from django.template import RequestContext
from django.core.paginator import Paginator
from django.http import HttpResponse, HttpResponseRedirect
from urllib import unquote
from mail.models import *
from django.core.urlresolvers i... | bsd-3-clause | 5,683,710,004,020,094,000 | 31.055556 | 108 | 0.654096 | false | 3.794408 | false | false | false |
karstenw/nodebox-pyobjc | examples/Extended Application/matplotlib/examples/units/ellipse_with_units.py | 1 | 2861 | """
==================
Ellipse With Units
==================
Compare the ellipse generated with arcs versus a polygonal approximation
.. only:: builder_html
This example requires :download:`basic_units.py <basic_units.py>`
"""
from basic_units import cm
import numpy as np
from matplotlib import patches
import mat... | mit | 2,664,902,525,860,449,300 | 24.318584 | 82 | 0.580916 | false | 3.046858 | false | false | false |
nwjs/chromium.src | third_party/blink/tools/blinkpy/web_tests/port/browser_test_unittest.py | 2 | 4100 | # Copyright (C) 2014 Google 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:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the f... | bsd-3-clause | 4,028,099,067,378,074,000 | 42.617021 | 116 | 0.723171 | false | 3.984451 | true | false | false |
MarsBighead/mustang | Python/rPolsh.py | 1 | 1094 | #!/usr/bin/python
import re
def calculate(num1,num2,op):
if op == "+":
return str(num1+num2)
elif op == "-":
return str(num1-num2)
elif op == "*":
return str(num1*num2)
elif op == "/" and num2>0:
return str(num1/num2)
def evalRPN(List):
if len(List) == 3 and List[0... | mit | 3,895,570,864,865,920,000 | 26.35 | 102 | 0.5 | false | 2.89418 | false | false | false |
jeromecc/doctoctocbot | src/community/migrations/0001_initial.py | 1 | 1560 | # Generated by Django 2.2.6 on 2019-10-10 08:35
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('bot', '0001_initial'),
('crowdfunding', '0001_initial'),
('moderation', '0001_initial'),... | mpl-2.0 | -2,918,086,637,465,020,000 | 41.162162 | 161 | 0.594872 | false | 4.148936 | false | false | false |
NicovincX2/Python-3.5 | Algorithmique/Mathématiques discrètes/Théorie de l'information/Théorie des codes/Distance de Levenshtein/min_edit_distance.py | 1 | 1090 | # -*- coding: utf-8 -*-
import os
# min string edit distance dynamic programming example
def minEditDistance(s1, s2):
"""Compute minimum edit distance converting s1 -> s2"""
m = {}
len1 = len(s1)
len2 = len(s2)
maxlen = max(len1, len2)
m = [None] * (len2 + 1)
for i in range(len2 + 1):
... | gpl-3.0 | 629,654,641,110,707,300 | 23.222222 | 59 | 0.500917 | false | 3.15942 | false | false | false |
anushbmx/kitsune | kitsune/questions/management/commands/update_weekly_votes.py | 1 | 1135 | from datetime import datetime, timedelta
from django.core.management.base import BaseCommand
from kitsune.questions.models import Question, QuestionVote
from kitsune.questions.tasks import update_question_vote_chunk
from kitsune.sumo.utils import chunked
class Command(BaseCommand):
help = "Keep the num_votes_pa... | bsd-3-clause | -2,490,800,972,994,052,000 | 35.612903 | 76 | 0.664317 | false | 3.557994 | false | false | false |
slobodz/TeamServices | project/server/lexicon/views.py | 1 | 8622 | # project/server/admin/views.py
#################
#### imports ####
#################
import datetime
from flask import render_template, Blueprint, url_for, \
redirect, flash, request, make_response, abort, jsonify
from flask_login import login_required
from werkzeug.debug import get_current_traceback
from sqlal... | mit | -8,554,701,266,725,774,000 | 40.652174 | 180 | 0.623057 | false | 4.032741 | false | false | false |
clouserw/olympia | apps/amo/utils.py | 1 | 35130 | import chardet
import codecs
import collections
import contextlib
import datetime
import errno
import functools
import itertools
import operator
import os
import random
import re
import shutil
import time
import unicodedata
import urllib
import urlparse
import django.core.mail
from django import http
from django.conf ... | bsd-3-clause | 5,517,376,139,347,201,000 | 32.681687 | 79 | 0.605835 | false | 4.049568 | false | false | false |
vladan-m/ggrc-core | src/ggrc/models/product.py | 1 | 1733 | # Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
from ggrc import db
from sqlalchemy.orm import validates
from .mixins import d... | apache-2.0 | -5,752,924,752,019,698,000 | 31.716981 | 80 | 0.718984 | false | 3.702991 | false | false | false |
clclcocoro/MLwithGA | test/create_testdata.py | 1 | 3831 | #!/usr/bin/env python
import sys
import random
"""
Usage: create_testdata.py <interval> <sequence_length> [--randomscore]
<interval> integer that is bigger than 8
<sequence_length> integer that is bigger than 9
--randomscore score is sampled from discrete random distribution
... | mit | 3,714,160,811,061,304,300 | 43.034483 | 102 | 0.601149 | false | 3.334204 | false | false | false |
squisher/stella | stella/codegen.py | 1 | 6389 | #!/usr/bin/env python
# Copyright 2013-2015 David Mohr
#
# 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... | apache-2.0 | -4,684,738,077,236,187,000 | 30.628713 | 93 | 0.571451 | false | 3.858092 | false | false | false |
jeffmahoney/crash-python | contrib/xfs-analyze.py | 1 | 5408 | #!/usr/bin/python3
# vim:set shiftwidth=4 softtabstop=4 expandtab textwidth=79:
# bsc#1025860
# This script cross references items in the AIL with buffers and inodes
# locked in every task's stack
from crash.types.list import list_for_each_entry
from crash.util import container_of
import gdb
dentry_type = gdb.lookup... | gpl-2.0 | 4,874,240,074,689,909,000 | 31.190476 | 132 | 0.575074 | false | 3.511688 | false | false | false |
joshuahoman/vivisect | vstruct/defs/windows/win_6_2_i386/ntoskrnl.py | 7 | 455587 | # Version: 6.2
# Architecture: i386
import vstruct
from vstruct.primitives import *
KPROCESS_STATE = v_enum()
KPROCESS_STATE.ProcessInMemory = 0
KPROCESS_STATE.ProcessOutOfMemory = 1
KPROCESS_STATE.ProcessInTransition = 2
KPROCESS_STATE.ProcessOutTransition = 3
KPROCESS_STATE.ProcessInSwap = 4
KPROCESS_STATE.ProcessOu... | apache-2.0 | -5,268,081,703,299,880,000 | 32.494119 | 110 | 0.635192 | false | 3.210507 | false | false | false |
paulscottrobson/fred | uForth/ufc.py | 1 | 7340 | import re,sys
# ********************************************************************************************************************
# Exception Handler
# ********************************************************************************************************************
class ForthException(Exception):
d... | mit | 3,355,735,194,558,943,700 | 40.235955 | 118 | 0.524523 | false | 3.396576 | false | false | false |
sug4rok/Servus | Servus/base/settings.py | 1 | 8586 | # coding=utf-8
import os
from sys import platform
from locale import setlocale, LC_ALL
BASE_DIR = os.path.dirname(os.path.dirname(__file__))
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = 'ky-kr37p8k^qdos0dk(ijv9m%*8(zre2+s@yct%+w(2(z1$2h2'
DEBUG = False
ALLOWED_HOSTS = [... | mit | -8,634,184,277,882,173,000 | 31.507874 | 109 | 0.588415 | false | 3.357396 | false | false | false |
isard-vdi/isard | webapp/webapp/webapp/admin/views/AdminHypersViews.py | 1 | 2254 | # Copyright 2017 the Isard-vdi project authors:
# Josep Maria Viñolas Auquer
# Alberto Larraz Dalmases
# License: AGPLv3
#!flask/bin/python
# coding=utf-8
import json
import time
from flask import render_template, Response, request, redirect, url_for, flash
from flask_login import login_required
from webap... | agpl-3.0 | -2,627,908,517,283,964,400 | 33.136364 | 128 | 0.695073 | false | 3.45023 | false | false | false |
bgris/ODL_bgris | lib/python3.5/site-packages/zmq/devices/proxydevice.py | 43 | 2499 | """Proxy classes and functions."""
# Copyright (C) PyZMQ Developers
# Distributed under the terms of the Modified BSD License.
import zmq
from zmq.devices.basedevice import Device, ThreadDevice, ProcessDevice
class ProxyBase(object):
"""Base class for overriding methods."""
def __init__(self, in_type, ... | gpl-3.0 | -4,560,696,593,615,876,000 | 26.766667 | 87 | 0.616647 | false | 3.826953 | false | false | false |
00has00/modbus-manager | modbus-manager.py | 1 | 11775 | #! /usr/bin/python
##
##
##
import threading
import time
import json
import paho.mqtt.client as mqtt
from collections import deque
from pymodbus.client.sync import ModbusSerialClient as ModbusClient
##
##Node Configureation
MQTT_SERVER = "mqtt-server"
STATE = "active"
LOCATION = "garage"
STATUS_INTERVAL=300
BASE =... | gpl-3.0 | -7,693,289,409,988,868,000 | 27.789731 | 140 | 0.579788 | false | 3.530735 | false | false | false |
suselrd/django-content-interactions | content_interactions/models.py | 1 | 7983 | # coding=utf-8
from django.conf import settings
from django.dispatch import receiver
try:
from django.contrib.contenttypes.fields import GenericForeignKey
except ImportError:
from django.contrib.contenttypes.generic import GenericForeignKey
from django.contrib.contenttypes.models import ContentType
from djang... | bsd-3-clause | -2,322,210,936,722,491,000 | 37.946341 | 115 | 0.617312 | false | 4.142709 | false | false | false |
sjug/origin | vendor/github.com/heketi/heketi/extras/tools/comparison.py | 8 | 10218 | #!/usr/bin/env python
#
# Copyright (c) 2018 The heketi Authors
#
# This file is licensed to you under your choice of the GNU Lesser
# General Public License, version 3 or any later version (LGPLv3 or
# later), or the GNU General Public License, version 2 (GPLv2), in all
# cases as published by the Free Software Founda... | apache-2.0 | -2,578,136,947,513,737,000 | 27.946176 | 79 | 0.563613 | false | 3.455529 | false | false | false |
pixelated/pixelated-dispatcher | pixelated/provider/docker/pixelated_adapter.py | 2 | 1901 | #
# Copyright (c) 2014 ThoughtWorks Deutschland GmbH
#
# Pixelated 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 option) any later version.
#
# Pixelated... | agpl-3.0 | -3,948,492,075,615,778,000 | 34.203704 | 148 | 0.685429 | false | 3.705653 | false | false | false |
BaReinhard/Hacktoberfest-Data-Structure-and-Algorithms | algorithms/dfs/python/Dfs.py | 1 | 1315 | __author__ = 'mittr'
# Python program to print DFS traversal from a
# given given graph
from collections import defaultdict
# This class represents a directed graph using
# adjacency list representation
class Graph:
# Constructor
def __init__(self):
# default dictionary to store graph
self... | gpl-3.0 | -330,548,148,491,065,340 | 22.482143 | 60 | 0.631179 | false | 3.534946 | false | false | false |
sathia-dev/simwf | src/wf/processor.py | 1 | 5391 | '''
Created on Sep 4, 2017
@author: tskthilak
'''
import logging
from wf.model import WfSpecification, WfJob, WfTask
from wf.worker import cb_run_job
from wf.util import encode, decode
from wf.error import WfJobError, TaskNotFoundError
from cPickle import dumps
from rq import Queue
from wf.store import... | gpl-3.0 | -4,083,018,877,632,404,500 | 31.07362 | 101 | 0.527731 | false | 3.864516 | false | false | false |
sfromm/ansible-commander | lib/main/management/commands/acom_inventory.py | 1 | 4681 | #!/usr/bin/env python
# (c) 2013, AnsibleWorks
#
# This file is part of Ansible Commander
#
# Ansible Commander is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | gpl-3.0 | 1,836,607,627,473,570,800 | 42.342593 | 108 | 0.621876 | false | 4.198206 | false | false | false |
indictools/scan2text | vedavaapi/scripts/run.py | 3 | 1496 | import logging
import os, sys, getopt
CODE_ROOT = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
# Add parent directory to PYTHONPATH, so that vedavaapi_py_api module can be found.
sys.path.append(CODE_ROOT)
print(sys.path)
from vedavaapi_py_api import run
from sanskrit_data.db.implementations import mon... | gpl-3.0 | -7,592,547,539,747,782,000 | 24.810345 | 83 | 0.674465 | false | 2.944882 | false | false | false |
nikdoof/test-auth | app/groups/migrations/0001_initial.py | 1 | 7556 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'GroupInformation'
db.create_table('groups_groupinformation', (
('id', self.gf(... | bsd-3-clause | 8,985,021,805,985,671,000 | 64.137931 | 163 | 0.577687 | false | 3.81809 | false | false | false |
ProjexSoftware/projexui | projexui/widgets/xganttwidget/xganttwidgetitem.py | 2 | 25083 | #!/usr/bin/python
""" Defines a gantt widget item class for adding items to the widget. """
# define authorship information
__authors__ = ['Eric Hulser']
__author__ = ','.join(__authors__)
__credits__ = []
__copyright__ = 'Copyright (c) 2012, Projex Software'
__license__ = 'LGPL... | lgpl-3.0 | -9,046,884,588,321,437,000 | 30.219512 | 80 | 0.485428 | false | 4.637271 | true | false | false |
studyxiao/blog-site | user/views.py | 1 | 1801 | from django.shortcuts import render
from django.contrib.auth import authenticate, login
from django.http import HttpResponseRedirect, HttpResponse
from django.contrib.auth import logout
from .forms import UserForm, UserProfileForm
def register(request):
registered = False
if request.method == 'POST':
... | apache-2.0 | 3,434,745,878,098,250,000 | 29.118644 | 94 | 0.613393 | false | 4.355392 | false | false | false |
jgliss/geonum | geonum/topoaccessbase.py | 1 | 22012 | # -*- coding: utf-8 -*-
#
# Geonum is a Python library for geographical calculations in 3D
# Copyright (C) 2017 Jonas Gliss (jonasgliss@gmail.com)
#
# This program is free software: you can redistribute it and/or
# modify it under the terms of the GNU General Public License a
# published by the Free Software Foundation... | gpl-3.0 | -8,204,550,211,532,832,000 | 36.953448 | 81 | 0.574596 | false | 4.008742 | false | false | false |
algorhythms/LeetCode | 974 Subarray Sums Divisible by K.py | 1 | 1564 | #!/usr/bin/python3
"""
Given an array A of integers, return the number of (contiguous, non-empty)
subarrays that have a sum divisible by K.
Example 1:
Input: A = [4,5,0,-2,-3,1], K = 5
Output: 7
Explanation: There are 7 subarrays with a sum divisible by K = 5:
[4, 5, 0, -2, -3, 1], [5], [5, 0], [5, 0, -2, -3], [0], [... | mit | 3,167,612,944,419,410,400 | 24.225806 | 81 | 0.523657 | false | 3.37797 | false | false | false |
OpenTrons/opentrons-api | robot-server/robot_server/robot/calibration/session.py | 2 | 10400 | import contextlib
import typing
from uuid import UUID, uuid4
from robot_server.robot.calibration.constants import (
TIP_RACK_LOOKUP_BY_MAX_VOL,
SHORT_TRASH_DECK,
STANDARD_DECK
)
from robot_server.robot.calibration.errors import CalibrationError
from robot_server.robot.calibration.helper_classes import Pipe... | apache-2.0 | -5,948,873,792,394,349,000 | 40.935484 | 79 | 0.591442 | false | 3.80395 | false | false | false |
slipstream/SlipStreamConnectors | opennebula/python/tar/slipstream_opennebula/OpenNebulaClientCloud.py | 1 | 19621 | """
SlipStream Client
=====
Copyright (C) 2015 SixSq Sarl (sixsq.com)
=====
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required ... | apache-2.0 | -4,327,889,888,004,436,000 | 39.623188 | 120 | 0.567249 | false | 3.804731 | true | false | false |
underscorephil/softlayer-python | SoftLayer/CLI/core.py | 2 | 6133 | """
SoftLayer.CLI.core
~~~~~~~~~~~~~~~~~~
Core for the SoftLayer CLI
:license: MIT, see LICENSE for more details.
"""
from __future__ import print_function
import logging
import os
import sys
import time
import types
import click
import SoftLayer
from SoftLayer.CLI import environment
from SoftLayer.C... | mit | -5,412,039,975,985,436,000 | 30.777202 | 79 | 0.598728 | false | 3.977302 | true | false | false |
linktlh/Toontown-journey | toontown/nametag/Nametag.py | 2 | 8810 | from direct.task.Task import Task
from pandac.PandaModules import TextNode, VBase4
from toontown.chat.ChatBalloon import ChatBalloon
from toontown.nametag import NametagGlobals
class Nametag:
TEXT_WORD_WRAP = 8
TEXT_Y_OFFSET = -0.05
CHAT_TEXT_WORD_WRAP = 12
PANEL_X_PADDING = 0.2
PANEL_Z_PADDING... | apache-2.0 | -2,065,280,034,159,601,700 | 28.563758 | 91 | 0.636209 | false | 3.973839 | false | false | false |
dhowland/EasyAVR | keymapper/setup.py | 1 | 2356 | #!/usr/bin/env python3
#
# Easy AVR USB Keyboard Firmware
# Copyright (C) 2013-2020 David Howland
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your... | gpl-2.0 | 8,700,526,508,964,115,000 | 37 | 85 | 0.637946 | false | 4.076125 | false | false | false |
abalakh/robottelo | tests/foreman/ui/test_discoveredhosts.py | 1 | 13088 | # -*- encoding: utf-8 -*-
"""Test class for Foreman Discovery"""
from fauxfactory import gen_string, gen_mac
from nailgun import entities
from robottelo.config import conf
from robottelo.decorators import stubbed
from robottelo import ssh
from robottelo.test import UITestCase
from robottelo.ui.session import Session
fr... | gpl-3.0 | -384,245,035,384,904,500 | 26.728814 | 79 | 0.624083 | false | 4.390473 | true | false | false |
Arzie/deluge | deluge/ui/console/commander.py | 3 | 4659 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2009 Ido Abramovich <ido.deluge@gmail.com>
# Copyright (C) 2009 Andrew Resch <andrewresch@gmail.com>
# Copyright (C) 2011 Nick Lanham <nick@afternight.org>
#
# This file is part of Deluge and is licensed under GNU General Public License 3.0, or later, with
# the additional... | gpl-3.0 | 1,722,984,902,554,104,600 | 32.76087 | 99 | 0.555055 | false | 4.274312 | false | false | false |
eri-trabiccolo/exaile | xl/event.py | 1 | 12090 | # Copyright (C) 2008-2010 Adam Olsen
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that... | gpl-2.0 | -9,100,791,220,514,810,000 | 33.056338 | 82 | 0.579487 | false | 4.456321 | false | false | false |
sndrtj/varda | varda/models.py | 1 | 29737 | # -*- coding: utf-8 -*-
"""
Models backed by SQL using SQLAlchemy.
.. note:: All genomic positions in this module are one-based and inclusive.
.. moduleauthor:: Martijn Vermaat <martijn@vermaat.name>
.. Licensed under the MIT license, see the LICENSE file.
"""
from datetime import datetime
from functools import wr... | mit | 7,266,825,592,961,211,000 | 34.913043 | 94 | 0.588949 | false | 4.066184 | true | false | false |
raulperula/uco_student | iaic/practices/pyclassify/ayuda_ui.py | 1 | 1234 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
__author__ = "Raul Perula-Martinez"
__email__ = "raul.perula@uc3m.es"
__date__ = "2014-11"
__license__ = "GPL v3"
__version__ = "1.0.0"
# File: ayuda_ui.py
"""
Arquitectura de referencia en commonKads.
Modelo de la Aplicacion.
Este modulo contiene la interfaz de la venta... | gpl-3.0 | 394,239,549,965,202,700 | 23.176471 | 72 | 0.67721 | false | 2.511202 | false | false | false |
lu18887/perhapsgeekblog | perhapsgeek/zinnia/tests/test_admin_widgets.py | 4 | 2080 | # coding=utf-8
"""Test cases for Zinnia's admin widgets"""
from django.test import TestCase
from django.utils.encoding import smart_text
from zinnia.admin.widgets import MPTTFilteredSelectMultiple
class MPTTFilteredSelectMultipleTestCase(TestCase):
def test_render_option(self):
widget = MPTTFilteredSele... | mit | 7,590,448,066,463,518,000 | 33.533333 | 75 | 0.553571 | false | 3.667257 | true | false | false |
mozilla/kitsune | kitsune/products/views.py | 1 | 3266 | import json
from django.http import HttpResponse
from django.shortcuts import get_object_or_404, render
from product_details import product_details
from kitsune.products.models import Product, Topic
from kitsune.wiki.decorators import check_simple_wiki_locale
from kitsune.wiki.facets import documents_for, topics_for
... | bsd-3-clause | -1,201,585,128,838,793,500 | 33.744681 | 96 | 0.631966 | false | 3.978076 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.