repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
googleapis/python-monitoring | google/cloud/monitoring_v3/services/metric_service/transports/base.py | 1 | 13183 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -7,055,130,770,907,677,000 | 36.665714 | 103 | 0.588106 | false | 4.527129 | false | false | false |
ogilvielab/stability | winspec.py | 1 | 9749 | ''' winspec.py - read SPE files created by WinSpec with Princeton Instruments' cameras. '''
from __future__ import print_function
import ctypes, os
import numpy as np
__all__ = ['SpeFile']
__author__ = "Anton Loukianov"
__email__ = "anton.loukianov@gmail.com"
__license__ = "BSD"
__version__ = "0.1"
# Definitions of... | mit | 3,724,983,778,753,036,300 | 31.605351 | 111 | 0.610216 | false | 3.217492 | false | false | false |
hip-odoo/odoo | addons/account_asset/models/account_invoice.py | 6 | 5063 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from datetime import datetime
from dateutil.relativedelta import relativedelta
from odoo import api, fields, models
from odoo.tools import DEFAULT_SERVER_DATE_FORMAT as DF
import odoo.addons.decimal_precision as dp
cl... | agpl-3.0 | 2,881,025,891,766,735,400 | 45.027273 | 154 | 0.630061 | false | 3.75315 | false | false | false |
photo/openphoto-python | trovebox/objects/album.py | 1 | 3435 | """
Representation of an Album object
"""
from .trovebox_object import TroveboxObject
from .photo import Photo
class Album(TroveboxObject):
""" Representation of an Album object """
_type = "album"
def __init__(self, client, json_dict):
self.photos = None
self.cover = None
Trovebox... | apache-2.0 | 5,812,339,203,985,741,000 | 33.009901 | 75 | 0.593595 | false | 4.148551 | false | false | false |
e-mission/e-mission-server | emission/analysis/modelling/tour_model/featurization.py | 1 | 6296 | from __future__ import absolute_import
from __future__ import division
from __future__ import unicode_literals
from __future__ import print_function
# Standard imports
from future import standard_library
standard_library.install_aliases()
from builtins import str
from builtins import range
from builtins import *
from b... | bsd-3-clause | 8,283,762,624,732,259,000 | 39.101911 | 144 | 0.573539 | false | 4.109661 | false | false | false |
coffeemakr/torweb | torweb/api/websocket/updater.py | 1 | 5133 | # coding=utf-8
from __future__ import absolute_import, print_function, with_statement
import json
from autobahn.twisted.websocket import (WebSocketServerFactory,
WebSocketServerProtocol)
from zope.interface import implements
import txtorcon
from torweb.api.json.circuit import ... | gpl-2.0 | -7,020,478,319,161,875,000 | 27.04918 | 76 | 0.615624 | false | 4.09004 | false | false | false |
open-projects/PeptoVar | lib/output.py | 1 | 6145 | #!/usr/bin/env python3
# Copyright (C) 2017 Dmitry Malko
# This file is part of PeptoVar (Peptides of Variations): the program for annotation of genomic variations and generation of variant peptides.
#
# PeptoVar is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public Lic... | gpl-3.0 | -5,061,237,884,722,516,000 | 40.248322 | 269 | 0.587632 | false | 3.473714 | false | false | false |
steko/nervia | magazzino/admin.py | 1 | 2734 | # -*- coding: utf-8 -*-
from django.contrib import admin
from magazzino.models import *
for m in Scavo, Vano:
admin.site.register(m)
class ClasseAdmin(admin.ModelAdmin):
filter_horizontal = ['forme']
list_display = ('sigla', 'classe', 'famiglia')
list_filter = ['famiglia']
search_fields = ['class... | apache-2.0 | 1,865,120,958,777,746,700 | 36.972222 | 80 | 0.528895 | false | 3.266428 | false | false | false |
JosmanPS/tsebaoth-christian-academy | TCA/tasks/migrations/0002_auto_20170819_1244.py | 1 | 1382 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-08-19 18:44
from __future__ import unicode_literals
import TCA.tasks.models
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('tasks', '0001_initial'),
]
operations = [
migrations.A... | mit | 3,465,495,124,016,927,000 | 33.55 | 132 | 0.58466 | false | 3.828255 | false | false | false |
optimizely/tcollector | collectors/30/backend_zookeeper_status_collector.py | 1 | 1266 | #!/usr/bin/env python
import os
import time
from kazoo.client import KazooClient
from collectors.lib.optimizely_utils import format_tsd_key
STATUS_ROOT = '/optimizely/status/'
ELAPSED_SECONDS_METRICS = [
'metaSync.lastStart',
'metaSync.lastSuccess',
'batchCompute.lastStart',
'batchCo... | lgpl-3.0 | 2,175,016,556,396,025,900 | 25.375 | 82 | 0.582938 | false | 3.367021 | false | false | false |
meisamhe/GPLshared | Programming/MPI — AMath 483 583, Spring 2013 1.0 documentation_files/sudoku_solve.py | 1 | 2719 | import itertools
import math
# @include
def solve_sudoku(partial_assignment):
def solve_partial_sudoku(i, j):
if i == len(partial_assignment):
i = 0 # Starts a row.
j += 1
if j == len(partial_assignment[i]):
return True # Entire matrix has been filled ... | gpl-3.0 | -6,548,800,202,068,176,000 | 37.295775 | 84 | 0.473336 | false | 3.146991 | false | false | false |
e-gun/HipparchiaServer | server/searching/precomposesql.py | 1 | 19924 | # -*- coding: utf-8 -*-
"""
HipparchiaServer: an interface to a database of Greek and Latin texts
Copyright: E Gunderson 2016-21
License: GNU GENERAL PUBLIC LICENSE 3
(see LICENSE in the top level directory of the distribution)
"""
import re
from typing import List
from server import hipparchia
fr... | gpl-3.0 | 7,470,951,615,380,965,000 | 46.839506 | 606 | 0.637987 | false | 3.133085 | false | false | false |
piotr1212/gofed | modules/ProjectInfo.py | 1 | 2595 | from modules.GoSymbolsExtractor import GoSymbolsExtractor
from modules.ImportPathsDecomposer import ImportPathsDecomposer
from glob import glob
from os import path
import sys
class ProjectInfo:
def __init__(self, noGodeps = []):
self.err = ""
self.warn = ""
self.imported_packages = []
self.package_imports_oc... | gpl-2.0 | -5,157,126,933,373,813,000 | 24.194175 | 158 | 0.709827 | false | 3.195813 | true | false | false |
LMSlay/wiper | viper/core/ui/commands.py | 1 | 32481 | # This file is part of Viper - https://github.com/botherder/viper
# See the file 'LICENSE' for copying permission.
import os
import time
import getopt
import fnmatch
import tempfile
import shutil
from zipfile import ZipFile
from viper.common.out import *
from viper.common.objects import File
from viper.common.network... | bsd-3-clause | -2,977,962,703,241,074,000 | 34.890608 | 142 | 0.501955 | false | 4.470273 | false | false | false |
yeti-platform/yeti | plugins/feeds/public/otx_alienvault.py | 1 | 3268 | import logging
import time
from datetime import datetime, timedelta
from core import Feed
from core.config.config import yeti_config
from core.entities import Exploit, Entity
from core.errors import ObservableValidationError
from core.indicators import Yara, Indicator
from core.observables import Hash, Hostname, Url, ... | apache-2.0 | -1,659,331,210,536,711,000 | 32.346939 | 88 | 0.523562 | false | 4.173691 | false | false | false |
uei/deel | deel/network/rnin.py | 1 | 2859 | import chainer.functions as F
import chainer.links as L
from chainer import Variable
from chainer.links import caffe
from chainer import computational_graph as c
from deel.tensor import *
from deel.network import *
import chainer.serializers as cs
import copy
from deel.deel import *
import chainer
import json
import o... | mit | -8,689,430,376,603,915,000 | 22.243902 | 108 | 0.712487 | false | 2.905488 | false | false | false |
castlecms/castle.cms | castle/cms/indexers.py | 1 | 6190 | from AccessControl import Unauthorized
from Acquisition import aq_base, aq_parent
from castle.cms.behaviors.location import ILocation
from castle.cms.interfaces import (IHasDefaultImage, IReferenceNamedImage,
ITrashed)
from collective.elasticsearch.interfaces import IReindexActive
fro... | gpl-2.0 | 2,285,102,307,514,287,600 | 27.657407 | 100 | 0.628756 | false | 4.12942 | false | false | false |
deepmind/dm_control | dm_control/locomotion/tasks/reach.py | 1 | 11447 | # Copyright 2020 The dm_control Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to i... | apache-2.0 | -7,066,775,918,945,943,000 | 38.885017 | 98 | 0.652485 | false | 3.497403 | false | false | false |
cloudrave/jrnl-todos | jrnl/util.py | 1 | 5643 | #!/usr/bin/env python
# encoding: utf-8
import sys
import os
import getpass as gp
import datetime
import keyring
import json
if "win32" in sys.platform:
import colorama
colorama.init()
import re
import tempfile
import subprocess
import codecs
import unicodedata
import logging
PY3 = sys.version_info[0] == 3
PY2... | mit | 4,334,511,316,817,671,000 | 30.176796 | 120 | 0.621124 | false | 3.571519 | true | false | false |
charanpald/rest-extensions | rest_extensions/viewsets.py | 1 | 2393 | from rest_framework.viewsets import ViewSet
from rest_framework.response import Response
from rest_framework import status
from rest_extensions.utils import get_model_object
class ReadOnlyModelViewSet(ViewSet):
"""
The viewset for a read-only model. Must specify model_class and serializer_class, and can suppl... | gpl-3.0 | 5,232,887,910,542,146,000 | 37.596774 | 110 | 0.672378 | false | 4.118761 | false | false | false |
GuardianGI/POEspellDmgCalculator | parseMonsterStats.py | 1 | 3724 | import re
from xml.dom.minidom import parseString
dir = 'E:\\programming\\Node\\POESkillTree\\'
f = open(dir + "MonsterStats.html", "rb")#html file from http://pathofexile.gamepedia.com/Monster_Experience
def fixUnclosedTags(content):
return re.sub('(\<img [^>]*?)/?\>', '\g<1> />', content).replace('<br>', '<br... | mit | -960,385,537,867,557,200 | 32.165138 | 157 | 0.622986 | false | 3.003226 | false | false | false |
n2o/dpb | maps/models.py | 1 | 2960 | # -*- coding: utf-8 -*-
import requests
from autoslug import AutoSlugField
from django.db import models
def query_latlong(location):
data = requests.get("https://nominatim.openstreetmap.org/search?q=" + str(location) + " Deutschland" +
"&format=json&polygon=1&addressdetails=1").json()[0]
... | mit | -8,266,614,544,418,317,000 | 45.809524 | 119 | 0.68803 | false | 3.302352 | false | false | false |
red-hood/calendarserver | calendarserver/accesslog.py | 1 | 23364 | ##
# Copyright (c) 2006-2015 Apple Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | -3,367,607,783,710,414,300 | 32.093484 | 139 | 0.524439 | false | 4.1901 | false | false | false |
Autodesk/molecular-design-toolkit | moldesign/mathutils/spherical_harmonics.py | 1 | 6809 | from __future__ import print_function, absolute_import, division
from future import standard_library
standard_library.install_aliases()
from future.builtins import *
# Copyright 2017 Autodesk Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with ... | apache-2.0 | 8,687,091,139,491,880,000 | 33.221106 | 98 | 0.448671 | false | 3.314995 | false | false | false |
edwards-lab/libGWAS | libgwas/transposed_pedigree_parser.py | 1 | 9471 | from data_parser import DataParser
from parsed_locus import ParsedLocus
from exceptions import TooManyAlleles
from exceptions import TooFewAlleles
import gzip
import numpy
__copyright__ = "Eric Torstenson"
__license__ = "GPL3.0"
# This file is part of libGWAS.
#
# libGWAS is free software: you can redistribute... | gpl-3.0 | -597,499,894,002,468,200 | 37.5 | 134 | 0.59339 | false | 3.774811 | false | false | false |
sgenoud/scikit-learn | examples/linear_model/plot_lasso_model_selection.py | 1 | 5373 | """
===================================================
Lasso model selection: Cross-Validation / AIC / BIC
===================================================
Use the Akaike information criterion (AIC), the Bayes Information
criterion (BIC) and cross-validation to select an optimal value
of the regularization paramet... | bsd-3-clause | 2,903,755,507,903,173,600 | 33.664516 | 78 | 0.680625 | false | 3.511765 | false | false | false |
htcondor/htcondor | src/condor_tests/test_htcondor_dags/writer/test_layer_and_subdag_edges.py | 1 | 1551 | # Copyright 2020 HTCondor Team, Computer Sciences Department,
# University of Wisconsin-Madison, WI.
#
# 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/LICE... | apache-2.0 | 6,104,573,971,552,725,000 | 34.25 | 78 | 0.716312 | false | 3.349892 | false | false | false |
xcgd/account_voucher_sepa | res_partner_bank.py | 1 | 1274 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2015 XCG Consulting
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Publ... | agpl-3.0 | -6,149,244,645,472,805,000 | 35.4 | 78 | 0.595761 | false | 4.393103 | false | false | false |
hasgeek/funnel | tests/integration/views/test_oauth.py | 1 | 4886 | from base64 import b64encode
from urllib.parse import parse_qs, urlsplit
import uuid
from funnel.models import AuthToken
def test_authcode_requires_login(client):
"""The authcode endpoint requires a login."""
rv = client.get('/api/1/auth')
assert rv.status_code == 302
assert urlsplit(rv.location).pat... | agpl-3.0 | -6,708,936,561,481,277,000 | 33.652482 | 88 | 0.626279 | false | 3.755573 | false | false | false |
msincenselee/vnpy | vnpy/app/option_master/engine.py | 1 | 22426 | """"""
from typing import Dict, List, Set
from copy import copy
from collections import defaultdict
from vnpy.trader.object import (
LogData, ContractData, TickData,
OrderData, TradeData,
SubscribeRequest, OrderRequest
)
from vnpy.event import Event, EventEngine
from vnpy.trader.engine import BaseEngine, ... | mit | -3,541,202,529,548,988,400 | 31.294372 | 92 | 0.594102 | false | 3.787443 | false | false | false |
pmghalvorsen/gramps_branch | gramps/plugins/view/htmlrenderer.gpr.py | 1 | 3040 | # encoding:utf-8
#
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2009 Benny Malengier
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# ... | gpl-2.0 | -1,068,526,598,393,514,200 | 33.157303 | 79 | 0.589803 | false | 4.287729 | false | false | false |
brendanwhitfield/python-OBD | obd/commands.py | 1 | 36545 | # -*- coding: utf-8 -*-
########################################################################
# #
# python-OBD: A python OBD-II serial module derived from pyobd #
# #
# C... | gpl-2.0 | -609,176,335,319,761,000 | 87.060241 | 190 | 0.478862 | false | 3.399535 | false | false | false |
dany74q/python-microsoft-project-prague-sdk | examples/rock_paper_scissors.py | 1 | 4062 | from __future__ import print_function
from microsoft.gestures.endpoint.gestures_service_endpoint_factory import GesturesServiceEndpointFactory
from microsoft.gestures.fingertip_placement_relation import FingertipPlacementRelation
from microsoft.gestures.pass_through_gesture_segment import PassThroughGestureSegment
from... | mit | 1,821,715,005,745,456,600 | 48.536585 | 158 | 0.791482 | false | 3.12943 | false | false | false |
SimFre/EasyMoney | ImportTransactionsDiners.py | 1 | 1375 |
import re, datetime
class ImportTransactionsDiners:
def __init__(self, inputFilename):
self.accounts = []
self.records = {}
# Start Diners Club parsing
cardId = "Diners Club"
self.accounts.append(cardId)
with open(inputFilename, encoding="cp1252") as fp:
... | gpl-2.0 | 2,512,133,161,384,532,000 | 33.375 | 71 | 0.456 | false | 4.568106 | false | false | false |
DayGitH/Python-Challenges | DailyProgrammer/20120209B.py | 1 | 2856 | '''
create a program that will allow you to enter events organizable by hour. There must be menu options of some form, and
you must be able to easily edit, add, and delete events without directly changing the source code.
(note that by menu i dont necessarily mean gui. as long as you can easily access the different opt... | mit | -5,931,066,659,611,780,000 | 30.054348 | 118 | 0.564076 | false | 3.828418 | false | false | false |
joshbohde/scikit-learn | sklearn/cluster/mean_shift_.py | 1 | 9502 | """Meanshift clustering.
Authors: Conrad Lee conradlee@gmail.com
Alexandre Gramfort alexandre.gramfort@inria.fr
Gael Varoquaux gael.varoquaux@normalesup.org
"""
from collections import defaultdict
import numpy as np
from ..utils import extmath, check_random_state
from ..base import BaseEstimator
fr... | bsd-3-clause | -2,225,100,966,309,963,500 | 33.303249 | 79 | 0.631446 | false | 4.152972 | false | false | false |
mcallaghan/tmv | BasicBrowser/scoping/tables.py | 1 | 3262 | import django_tables2 as tables
from django_tables2.utils import A
from .models import *
from django_filters.views import FilterView
from django_tables2.views import SingleTableMixin
from tmv_app.models import *
from .filters import *
import django_filters
#from .urls import urlpatterns
class DocTable(tables.Table):
... | gpl-3.0 | -8,388,700,430,361,813,000 | 26.644068 | 68 | 0.58645 | false | 3.644693 | false | false | false |
xMamo/Minecraft-BareBones | data/b7s/functions/entity/back/set_loc/_if_save_as_tags_if_z_set.mcfunction.py | 1 | 1206 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
print('# This Source Code Form is subject to the terms of the Mozilla Public')
print('# License, v. 2.0. If a copy of th... | mpl-2.0 | 3,078,155,087,962,877,000 | 40.586207 | 78 | 0.679934 | false | 2.599138 | false | false | false |
rabc/Gitmark | flask/blueprints.py | 1 | 12805 | # -*- coding: utf-8 -*-
"""
flask.blueprints
~~~~~~~~~~~~~~~~
Blueprints are the recommended way to implement larger or more
pluggable applications in Flask 0.7 and later.
:copyright: (c) 2011 by Armin Ronacher.
:license: BSD, see LICENSE for more details.
"""
from functools import update_wrap... | mit | 6,468,241,154,640,615,000 | 40.173633 | 81 | 0.628739 | false | 4.389784 | false | false | false |
iulian787/spack | var/spack/repos/builtin/packages/rdc/package.py | 1 | 2161 | # 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 Rdc(CMakePackage):
"""ROCm Data Center Tool"""
homepage = "https://github.com/Radeon... | lgpl-2.1 | -7,025,651,371,087,948,000 | 39.018519 | 96 | 0.623785 | false | 2.821149 | false | false | false |
pitthsls/pycounter | pycounter/sushiclient.py | 1 | 3606 | """command line client to fetch statistics via SUSHI."""
import datetime
import logging
import sys
import click
from pycounter import sushi
from pycounter.helpers import convert_date_run, last_day, prev_month
@click.command()
@click.argument("url")
@click.option("--report", "-r", default="JR1", help="report name (... | mit | -5,033,117,463,804,810,000 | 29.05 | 88 | 0.641431 | false | 3.43756 | false | false | false |
igorline/Puerta-del-Mar-Ecosystem | CellSystem.py | 1 | 1881 | from dna import DNA
from cell import Cell, Herbivore
from stuff import Food
from vector import Vector
import random
class CellSystem(object):
cells = []
width = displayHeight
height = displayHeight
depth = displayHeight
def __init__(self):
pass
###################################
... | gpl-3.0 | -2,305,316,854,711,407,900 | 25.492958 | 122 | 0.538543 | false | 4.364269 | false | false | false |
Jacobious52/Assistant | Assistant.py | 1 | 2975 | '''
Author:
Jacob "Speedy" Gonzalez (Thanks sam)
Contributers:
Sam Lewis
Ben Morris
Jake Lane
'''
import sublime, sublime_plugin
'''
header files will be to the right/bottom
source files will be to the left/top
'''
class AssistantListener(sublime_plugin.EventListener):
'''EventListener class for events'''
d... | gpl-2.0 | -7,384,247,014,068,923,000 | 40.319444 | 114 | 0.54521 | false | 3.828829 | false | false | false |
mrooney/wxbanker | wxbanker/csvexporter.py | 1 | 1130 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import csv, cStringIO
class CsvExporter:
"""Iterate through the list of transactions for an account and
exort to a CSV file."""
@staticmethod
def Generate(model, delimiter=",", quotechar="'"):
"""Generate the CSV string."""
result = cS... | gpl-3.0 | -5,205,093,369,438,691,000 | 35.451613 | 144 | 0.621239 | false | 4.466403 | false | false | false |
googleapis/python-videointelligence | google/cloud/videointelligence_v1p2beta1/types/video_intelligence.py | 1 | 24702 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 2,361,941,987,408,208,000 | 38.27186 | 122 | 0.670027 | false | 4.277403 | true | false | false |
t3dev/odoo | addons/website_slides/tests/test_karma.py | 1 | 4011 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.website_slides.tests import common
from odoo.tests import tagged
from odoo.tests.common import users
from odoo.tools import mute_logger
@tagged('functional')
class TestKarmaGain(common.SlidesCase):
... | gpl-3.0 | -719,754,588,055,535,000 | 39.928571 | 109 | 0.630267 | false | 3.727695 | true | false | false |
madarou/angular-django | app/blog_lab/cbv/views.py | 1 | 1249 | from django.views.generic import DetailView, CreateView
from django.utils import timezone
from django.http import HttpResponse
import simplejson
from app.utils import model_serializer
from app.myblog.models import Article
class ArticleDetailView(DetailView):
model = Article
queryset = Article.objects
slu... | bsd-2-clause | -4,933,661,012,084,817,000 | 28.046512 | 110 | 0.660528 | false | 3.739521 | false | false | false |
Dangetsu/vnr | Frameworks/Sakura/py/libs/mecabjlp/mecabcsv.py | 1 | 1494 | # coding: utf8
# mecabcsv.py
# 11/9/2013 jichi
#
# See:
# http://tseiya.hatenablog.com/entry/2012/09/19/191114
# http://yukihir0.hatenablog.jp/entry/20110201/1296565687
# http://mecab.googlecode.com/svn/trunk/mecab/doc/dic.html
# http://mecab.googlecode.com/svn/trunk/mecab/doc/dic-detail.html
#
# Example csv:
# ユーザ設定,,... | gpl-3.0 | -851,569,030,197,110,300 | 24.636364 | 73 | 0.653191 | false | 2.326733 | false | false | false |
Datafable/gbif-dataset-metrics | aggregation_module/src/_occurrence_completeness.py | 1 | 1277 | import fileinput
RECORD_ID_INDEX = 0
ISSUE_FIELD_INDEX = 3
DECIMAL_LAT_FIELD_INDEX = 1
DECIMAL_LON_FIELD_INDEX = 2
MAJOR_ISSUES = ['COORDINATE_INVALID', 'COORDINATE_OUT_OF_RANGE', 'ZERO_COORDINATE', 'COUNTRY_COORDINATE_MISMATCH']
MINOR_ISSUES = ['GEODETIC_DATUM_INVALID', 'COORDINATE_REPROJECTION_FAILED', 'COORDINATE_R... | mit | 77,358,468,444,568,050 | 43.034483 | 114 | 0.70556 | false | 3.351706 | false | false | false |
IjonTichy/TichyBot | src/objects/botcontroller.py | 1 | 1310 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import copy
class BotController(object):
THREADBASE = "TichyThread-{}"
def __init__(self):
self.__childBots = {}
def __del__(self):
for i in self.__childBots:
self.stopBot(i)
del self.__childBots
#######
###... | bsd-3-clause | 6,324,726,927,114,558,000 | 18.264706 | 62 | 0.551908 | false | 3.569482 | false | false | false |
Quote58/Gtk-Hexer | add_tweaks.py | 1 | 3157 | import os
#this checks whether the file exists and if not creates it
if os.path.isfile("hex_tweaks.txt"):
file = open("hex_tweaks.txt", "r+")
size = len(file.read())
file.seek(0)
else:
file = open("hex_tweaks.txt", "w")
size = 0
#because duplicate offsets would be annoying
def get_offsets(file):
offset_list = [... | gpl-3.0 | 7,848,504,821,811,647,000 | 25.308333 | 347 | 0.601837 | false | 2.64849 | false | false | false |
eicesoft/pycached | clients/pycache_client.py | 1 | 6435 | #coding=utf-8
import struct
import socket
from json import dumps, loads
__author__ = 'kelezyb'
class PyCacheClient:
def __init__(self, host, port):
try:
self.sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
self.sock.connect((host, port))
except socket.error as ex... | gpl-3.0 | -7,483,517,681,938,818,000 | 22.575092 | 73 | 0.526962 | false | 3.658329 | false | false | false |
VoigtLab/dnaplotlib | gallery/rotated_design/rotated_design.py | 1 | 7986 | #!/usr/bin/env python
"""
Rotated genetic design to generate a homology matrix for CRISPRi circuit
"""
import numpy as np
import string
import dnaplotlib as dpl
import matplotlib.pyplot as plt
import matplotlib
import pylab
import csv
import matplotlib.gridspec as gridspec
from matplotlib.transforms import Affine2D
i... | mit | 8,284,737,784,866,998,000 | 38.534653 | 250 | 0.656649 | false | 2.562079 | false | false | false |
quinox/weblate | weblate/trans/models/unit.py | 1 | 34692 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <http://weblate.org/>
#
# 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, eithe... | gpl-3.0 | 5,728,403,331,641,467,000 | 31.880569 | 79 | 0.567096 | false | 4.576385 | false | false | false |
Tinkerforge/brickv | src/brickv/tab_window.py | 1 | 6364 | # -*- coding: utf-8 -*-
"""
brickv (Brick Viewer)
Copyright (C) 2009-2012 Olaf Lüke <olaf@tinkerforge.com>
Copyright (C) 2012-2014 Matthias Bolte <matthias@tinkerforge.com>
Copyright (C) 2014 Philipp Kroos <philipp.kroos@fh-bielefeld.de>
tab_window.py: Detachable container to be used in a TabBar (e.g. TabWidget)
This... | gpl-2.0 | 3,546,025,987,418,938,000 | 32.666667 | 130 | 0.661009 | false | 3.544847 | false | false | false |
byaka/flaskJSONRPCServer | flaskJSONRPCServer/tools/flaskEmulate.py | 1 | 3435 | # -*- coding: utf-8 -*-
import sys, urlparse, inspect, json
from .. import flaskJSONRPCServer
from ..utils import MagicDictCold, bind, formatPath
class FlaskEmulate(object):
"""
This simple class emulates Flask-like `route` decorator, thread-local read-only `request` variable for accessing `args`, `form` and `m... | apache-2.0 | -2,045,916,955,553,415,400 | 42.481013 | 246 | 0.627074 | false | 3.876975 | false | false | false |
eaperz/obliterator | obliterator.py | 1 | 6729 | #!/usr/bin/python
#
# Copyright 2016 Eder Perez https://github.com/eaperz
#
# 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
#
# Un... | apache-2.0 | -7,510,373,075,344,067,000 | 26.577869 | 90 | 0.570218 | false | 3.427916 | false | false | false |
GoogleCloudPlatform/magic-modules | mmv1/products/compute/helpers/python/instance_start.py | 1 | 1468 | <%
# Instance On/Off logic
# This code handles the turning a machine on/off depending on user input.
# It should be run after all normal create/update/delete logic.
-%>
class InstancePower(object):
def __init__(self, module, current_status):
self.module = module
self.current_status = current_status
... | apache-2.0 | -1,993,456,313,319,955,200 | 40.942857 | 138 | 0.651907 | false | 3.873351 | false | false | false |
integree/django-congo | congo/maintenance/tests/__init__.py | 1 | 1975 | # -*- coding: utf-8 -*-
from django.utils import timezone
from django.utils.datastructures import SortedDict
from django.utils.encoding import python_2_unicode_compatible
from django.utils.translation import ugettext_lazy as _
from unidecode import unidecode
import logging
import os
import sys
@python_2_unic... | mit | 5,832,471,944,550,314,000 | 31.474576 | 151 | 0.571139 | false | 4.089027 | false | false | false |
freeitaly/Trading-System | vn.trader/ctaAlgo/ctaDemo.py | 1 | 11338 | # encoding: UTF-8
"""
这里的Demo是一个最简单的策略实现,并未考虑太多实盘中的交易细节,如:
1. 委托价格超出涨跌停价导致的委托失败
2. 委托未成交,需要撤单后重新委托
3. 断网后恢复交易状态
4. 等等
这些点是作者选择特意忽略不去实现,因此想实盘的朋友请自己多多研究CTA交易的一些细节,
做到了然于胸后再去交易,对自己的money和时间负责。
也希望社区能做出一个解决了以上潜在风险的Demo出来。
"""
from ctaBase import *
from ctaTemplate import CtaTemplate
###################################... | mit | 1,511,756,316,273,667,600 | 30.394558 | 108 | 0.440953 | false | 2.608081 | false | false | false |
bit-bots/imagetagger | imagetagger/imagetagger/annotations/serializers.py | 1 | 1648 | from rest_framework.serializers import ModelSerializer, SerializerMethodField, CharField
from .models import Annotation, AnnotationType, Verification, ExportFormat
from imagetagger.images.serializers import ImageSerializer
class AnnotationTypeSerializer(ModelSerializer):
class Meta:
model = AnnotationTyp... | mit | 4,945,628,742,417,639,000 | 23.969697 | 88 | 0.586772 | false | 4.552486 | false | false | false |
gulopine/steel | steel/bits/base.py | 1 | 1478 | import sys
from steel import base, fields
__all__ = ['Structure']
class Structure(base.Structure):
def __init__(self, *args, **kwargs):
super(Structure, self).__init__(*args, **kwargs)
self._bits_left = 0
self._bit_buffer = 0
def read(self, size=None):
bit_buff... | bsd-3-clause | -4,583,877,906,716,875,300 | 30.844444 | 66 | 0.500677 | false | 3.951872 | false | false | false |
someoneigna/python-projects | objdump_instruction_extractor.py | 1 | 2303 | ''' Extracts from objdump -d output the hexcode for each op+operands '''
import sys
import re
exe_info_line = 2 # objdump -d second line has ej: "program.exe: file format pei-i386"
section_start_line = 5 # contains: \'Dissasembly of section .text: '''
function_dissasembly_line = 7 # First line containing the header... | mit | -2,363,068,474,902,876,000 | 30.547945 | 88 | 0.501954 | false | 3.643987 | false | false | false |
magenta/magenta | magenta/models/coconet/lib_mask.py | 1 | 3830 | # Copyright 2021 The Magenta Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | 4,730,582,431,483,559,000 | 27.37037 | 80 | 0.665796 | false | 3.60301 | false | false | false |
puentesarrin/pymongolab | pymongolab/mongo_client.py | 1 | 2921 | # -*- coding: utf-8 *-*
from pymongolab import database
from mongolabclient import MongoLabClient
class MongoClient(object):
"""Instance class with the API key located at
https://mongolab.com/user?username=[username].
Example usage:
.. code-block:: python
>>> from pymongolab import MongoClie... | apache-2.0 | 3,172,718,342,302,398,000 | 29.427083 | 79 | 0.598425 | false | 4.102528 | false | false | false |
shadowoneau/skylines | skylines/commands/tracking/stats.py | 1 | 4007 | from flask_script import Command, Option
from datetime import timedelta
from itertools import chain
from skylines.database import db
from skylines.model import TrackingFix, User
class Stats(Command):
""" Analyse live tracks and output statistics """
option_list = (
Option('user', type=int, help='a ... | agpl-3.0 | -902,290,207,803,515,300 | 34.149123 | 136 | 0.55428 | false | 3.856593 | false | false | false |
brunocalado/googlecode-upload-plus | googlecodepush.py | 1 | 6921 | #!/usr/bin/python3
# -*- coding: UTF-8 -*-
# --------------------------------------------------------------------------------
# Libraries
# --------------------------------------------------------------------------------
import os
import sys
# -------------------------------------------------------------------------... | gpl-3.0 | 4,543,752,853,802,485,000 | 33.093596 | 199 | 0.435342 | false | 4.601729 | false | false | false |
sissaschool/xmlschema | tests/validators/test_global_maps.py | 1 | 4067 | #!/usr/bin/env python
#
# Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Da... | mit | -2,709,217,229,151,037,000 | 39.267327 | 92 | 0.661913 | false | 3.641003 | true | false | false |
cptx032/lightk | themes.py | 1 | 3448 | #!/usr/bin/env python
# Author: Willie Lawrence
"""
'themes' has the default themes of lightk.
If you want create a new theme just follow these models
"""
LIGHT_BTN=[
{
"normal":{"fill":"#000","font":("TkDefaultFont",10)},
"over":{"fill":"#000","font":("TkDefaultFont",10)},
"clicked":{"fill":"#000","font":("TkDe... | gpl-3.0 | -5,532,804,589,372,597,000 | 27.504132 | 80 | 0.551914 | false | 2.612121 | false | true | false |
stilobique/Icon-Header | controllers/smooth.py | 1 | 1097 | import bpy
import math
from bpy.props import FloatProperty
class SmoothShading(bpy.types.Operator):
"""Activate the Auto Smooth with an 45° angle"""
bl_idname = "object.smooth_shading"
bl_label = "Advanced Smooth Shading"
bl_options = {'REGISTER', 'UNDO'}
angle = FloatProperty(name="Angle Value"... | gpl-3.0 | 9,076,089,979,303,717,000 | 25.095238 | 78 | 0.623175 | false | 3.690236 | false | false | false |
nukui-s/sscomdetection | dcsscd.py | 1 | 3645 | import os
import sys
import time
from itertools import chain
import numpy as np
import pandas as pd
import tensorflow as tf
import numpy as np
from sklearn.cluster import KMeans
from sklearn.metrics import normalized_mutual_info_score
from sscd import SSCD
import pdb
class DegreeCorrectedSSCD(SSCD):
def prepare_... | apache-2.0 | 2,948,009,508,396,778,000 | 33.386792 | 83 | 0.514129 | false | 3.481375 | false | false | false |
azlanismail/prismgames | examples/games/car/networkx/algorithms/bipartite/tests/test_spectral_bipartivity.py | 1 | 2608 | # -*- coding: utf-8 -*-
from nose import SkipTest
from nose.tools import *
import networkx as nx
from networkx.algorithms.bipartite import spectral_bipartivity as sb
# Examples from Figure 1
# E. Estrada and J. A. Rodríguez-Velázquez, "Spectral measures of
# bipartivity in complex networks", PhysRev E 72, 0461... | gpl-2.0 | 471,859,629,272,387,100 | 26.021505 | 68 | 0.559094 | false | 2.829533 | false | false | false |
kdart/pycopia | core/pycopia/OS/Linux/proc/net/netstat.py | 1 | 3993 | #!/usr/bin/python2.7
# -*- coding: utf-8 -*-
# vim:ts=4:sw=4:softtabstop=4:smarttab:expandtab
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
# http://www.apache.org/licenses/LICENSE-2.0
... | apache-2.0 | 4,676,985,966,771,825,000 | 33.128205 | 128 | 0.629101 | false | 3.202085 | false | false | false |
texttochange/vusion-backend | transports/orange_sdp/orange_http.py | 1 | 12435 | import sys
import traceback
import json
import pytz
import re
from hashlib import md5
from datetime import datetime
from twisted.internet.defer import inlineCallbacks
from twisted.web import http
from twisted.web.resource import Resource
from twisted.web.server import NOT_DONE_YET
from vumi.transports.base import Tra... | bsd-3-clause | -6,620,945,279,004,491,000 | 39.770492 | 98 | 0.566305 | false | 3.974113 | true | false | false |
smithfarm/ceph-auto-aws | handson/wipeout.py | 1 | 5727 | #
# Copyright (c) 2016, SUSE LLC 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 follow... | bsd-3-clause | 4,132,469,283,418,161,000 | 28.828125 | 79 | 0.614458 | false | 4.235947 | false | false | false |
imdaveho/impromptu | impromptu/utils/registrar.py | 1 | 9310 | """A helper class to manage the logical flow of Questions.
"""
import time
import random
class Registrar(object):
def __init__(self):
self.registry = {}
self.orphaned = {}
self.branched = {}
self.entry = None
self.cursor = None
self.running = None
def _make_u... | mit | -90,629,185,774,489,860 | 38.617021 | 73 | 0.536198 | false | 4.733096 | false | false | false |
lindsayad/sympy | sympy/tensor/array/arrayop.py | 1 | 4483 | import itertools
import collections
from sympy import S, Tuple, Matrix, prod
from sympy.tensor.array import ImmutableDenseNDimArray
from sympy.tensor.array.ndim_array import NDimArray
def _arrayfy(a):
if isinstance(a, NDimArray):
return a
if isinstance(a, (Matrix, list, tuple, Tuple)):
retu... | bsd-3-clause | -4,683,742,273,230,592,000 | 30.794326 | 172 | 0.542271 | false | 2.994656 | false | false | false |
fabric/patchwork | tests/files.py | 1 | 1143 | from mock import call
from patchwork.files import directory
class files:
class directory_:
def base_case_creates_dir_with_dash_p(self, cxn):
directory(cxn, "/some/dir")
cxn.run.assert_called_once_with("mkdir -p /some/dir")
def user_sets_owner_and_group(self, cxn):
... | bsd-2-clause | 1,976,037,888,272,628,200 | 32.617647 | 74 | 0.547682 | false | 3.41194 | false | false | false |
lpramuk/robottelo | tests/foreman/ui/test_contentcredential.py | 1 | 32427 | # -*- encoding: utf-8 -*-
"""Test class for Content Credentials UI
:Requirement: ContentCredentials
:CaseAutomation: Automated
:CaseLevel: Component
:CaseComponent: GPGKeys
:TestType: Functional
:CaseImportance: High
:Upstream: No
"""
from nailgun import entities
from robottelo.constants import CONTENT_CREDENTI... | gpl-3.0 | 7,055,234,523,322,764,000 | 40.098859 | 98 | 0.667962 | false | 3.912524 | true | false | false |
jonnydyer/pypropep | pypropep/propellant.py | 1 | 3463 | from .cpropep._cpropep import ffi, lib
__all__ = ['Propellant']
EL_SYMBOLS = [
"H", "HE", "LI", "BE", "B", "C", "N", "O",
"F", "NE", "NA", "MG", "AL", "SI", "P", "S", "CL", "AR", "K", "CA",
"SC", "TI", "V", "CR", "MN", "FE", "CO", "NI", "CU", "ZN", "GA", "GE",
"AS", "SE", "BR", "KR", "RB", "SR", "Y", "ZR", "N... | gpl-3.0 | -9,211,914,262,221,524,000 | 35.452632 | 79 | 0.447011 | false | 2.588191 | false | false | false |
osisoft/OMF-Samples | Tutorials/Python_PI/Python_PI.py | 1 | 16873 | #*************************************************************************************
# Copyright 2018 OSIsoft, 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... | apache-2.0 | -2,386,544,401,201,957,000 | 33.018145 | 134 | 0.491258 | false | 4.72898 | false | false | false |
ganeti/ganeti | lib/cmdlib/instance.py | 1 | 31763 | #
#
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 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:
#
# 1. Redistributions of source code must retain the above ... | bsd-2-clause | -5,482,486,118,492,968,000 | 36.723278 | 80 | 0.632182 | false | 3.940819 | false | false | false |
jconning/lambda-cpu-cost | eratosthenes_lambda.py | 1 | 1186 | from __future__ import print_function
from timeit import default_timer as timer
import json
import datetime
print('Loading function')
def eratosthenes(n):
sieve = [ True for i in range(n+1) ]
def markOff(pv):
for i in range(pv+pv, n+1, pv):
sieve[i] = False
markOff(2)
for i in ... | mit | -8,949,318,633,572,384,000 | 30.210526 | 109 | 0.581788 | false | 3.129288 | false | false | false |
zeromq/pyre | pyre/zre_msg.py | 1 | 14840 | """ These are the zre_msg messages
HELLO - Greet a peer so it can connect back to us
sequence number 2 Cyclic sequence number
endpoint string
groups strings
status number 1
name string
headers dictionary
WHISPER - Send a mes... | lgpl-3.0 | -4,596,182,616,146,746,000 | 28.919355 | 88 | 0.540229 | false | 3.81393 | false | false | false |
reefeed/wanish | wanish/__init__.py | 1 | 7391 | from lxml import etree
from lxml.etree import strip_elements
import requests
from requests.exceptions import ConnectionError, Timeout
from lxml.html import fromstring
from wanish.cleaner import html_cleaner, ArticleExtractor, clean_entities, describe
from wanish.encoding import get_encodings
from wanish.images import ... | mit | -9,157,944,241,346,703,000 | 38.951351 | 120 | 0.599784 | false | 4.135982 | false | false | false |
rven/odoo | addons/l10n_be_invoice_bba/__manifest__.py | 1 | 1195 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
# Copyright (c) 2011 Noviat nv/sa (www.noviat.be). All rights reserved.
# This module is empty. It is merged whith l10n_be version 14.1. This behaviour was backported in 14.0
# but the module can not removed in a stabl... | agpl-3.0 | -5,755,056,702,694,094,000 | 34.147059 | 118 | 0.651883 | false | 3.746082 | false | false | false |
RaulButuc/MachineLearning | ArtificialNeuralNetworks/MultiLayerBasic/source.py | 1 | 1459 | import numpy as np
def activation(z, deriv=False):
if deriv == True:
return z * (1-z)
return 1 / (1 + np.exp(-z))
def forwardpropagation(X, theta0, theta1):
layer0 = X
layer1 = activation(np.dot(layer0, theta0))
layer2 = activation(np.dot(layer1, theta1))
return layer0, layer1, layer... | mit | -2,854,040,914,097,721,300 | 26.018519 | 88 | 0.609321 | false | 2.947475 | false | false | false |
ENPH-479/dolphin-env-api | src/agents/mk_dataset.py | 1 | 1468 | import json
import logging
import os
import cv2
import torch
from torch.utils.data import Dataset
from src import helper
logger = logging.getLogger(__name__)
class MarioKartDataset(Dataset):
"""Mario Kart dataset."""
def __init__(self, log_file=os.path.join(helper.get_dataset_folder(), 'mario_kart', "mario... | mit | 8,253,749,601,339,443,000 | 31.622222 | 107 | 0.587193 | false | 3.754476 | false | false | false |
klmcwhirter/huntwords | faas/model/puzzle.py | 1 | 1334 | ''' models for the puzzle concept '''
import json
from typing import List
from .redis import redis_client
def puzzle_urn(name) -> str:
''' redis universal resource name '''
return f'puzzle:{name}'
class Puzzle:
def __init__(self, name, description, words):
self.name = name
self.descript... | mit | -8,916,330,510,398,104,000 | 22.403509 | 86 | 0.611694 | false | 3.351759 | false | false | false |
eson-schulz/nomnom-blog | blog/admin.py | 1 | 1323 | from django.contrib import admin
from django import forms
from tinymce.widgets import TinyMCE
from .models import Post, Image, Author
from django.forms.extras.widgets import SelectDateWidget
import datetime
class PostForm(forms.ModelForm):
title = forms.CharField(max_length=80)
author = forms.ModelChoiceField(querys... | gpl-2.0 | 1,816,531,216,060,363,000 | 34.783784 | 100 | 0.718065 | false | 3.392308 | false | false | false |
nishant-jain-94/Autofill | src/LSTM-2-512-Window-5-Batch-1-Epoch-15-Stateful.py | 1 | 4298 | from __future__ import print_function
import json
import os
import numpy as np
import sys
import h5py
from gensim.models import Word2Vec
from gensim.utils import simple_preprocess
from keras.engine import Input
from keras.layers import Embedding, merge
from keras.models import Model
from keras.models import Sequential
... | gpl-3.0 | -2,873,293,520,844,580,000 | 32.84252 | 157 | 0.680084 | false | 3.176644 | false | false | false |
tchellomello/home-assistant | homeassistant/components/alarmdecoder/alarm_control_panel.py | 1 | 6943 | """Support for AlarmDecoder-based alarm control panels (Honeywell/DSC)."""
import logging
import voluptuous as vol
from homeassistant.components.alarm_control_panel import (
FORMAT_NUMBER,
AlarmControlPanelEntity,
)
from homeassistant.components.alarm_control_panel.const import (
SUPPORT_ALARM_ARM_AWAY,
... | apache-2.0 | -5,546,579,297,689,770,000 | 29.995536 | 88 | 0.615872 | false | 3.761105 | false | false | false |
silly-wacky-3-town-toon/SOURCE-COD | toontown/classicchars/DistributedCCharBaseAI.py | 1 | 7445 | from otp.ai.AIBaseGlobal import *
from direct.distributed.ClockDelta import *
from otp.avatar import DistributedAvatarAI
from direct.directnotify import DirectNotifyGlobal
from toontown.toonbase import ToontownGlobals
class DistributedCCharBaseAI(DistributedAvatarAI.DistributedAvatarAI):
notify = DirectNotifyGloba... | apache-2.0 | 1,548,025,337,073,389,300 | 42.794118 | 125 | 0.681666 | false | 3.475724 | false | false | false |
nodev-io/nodev.specs | setup.py | 1 | 1581 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import codecs
from setuptools import setup
def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding='utf-8').read()
version = '0.3.2.dev0'
setup(
name='nodev.specs',
version=version,
... | mit | -1,684,840,587,133,632,300 | 31.265306 | 87 | 0.619861 | false | 3.903704 | false | false | false |
saschpe/rapport | rapport/timeframe.py | 1 | 5294 | # Copyright 2013 Sascha Peilicke
#
# 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 | -154,444,430,216,283,260 | 31.679012 | 106 | 0.623536 | false | 3.75461 | false | false | false |
netjunki/trac-Pygit2 | trac/mimeview/api.py | 1 | 43087 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2004-2010 Edgewall Software
# Copyright (C) 2004 Daniel Lundin <daniel@edgewall.com>
# Copyright (C) 2005-2006 Christopher Lenz <cmlenz@gmx.de>
# Copyright (C) 2006-2007 Christian Boos <cboos@edgewall.org>
# All rights reserved.
#
# This software is licensed as described in the... | bsd-3-clause | -809,785,704,346,761,000 | 37.33363 | 79 | 0.583424 | false | 4.277899 | false | false | false |
popazerty/enigma2 | lib/python/Plugins/Extensions/LDteam/ExtraMessageBox.py | 1 | 4038 | from enigma import *
from Screens.Screen import Screen
from Components.ActionMap import ActionMap
from Components.Sources.List import List
from Tools.Directories import resolveFilename, SCOPE_CURRENT_SKIN, SCOPE_PLUGINS
from Tools.LoadPixmap import LoadPixmap
from Components.Label import Label
def MessageBoxEntry(name... | gpl-2.0 | 2,016,269,134,156,382,200 | 29.824427 | 123 | 0.69366 | false | 2.962583 | false | false | false |
Jajcus/pyxmpp | pyxmpp/jabber/all.py | 1 | 1503 | #
# (C) Copyright 2003-2010 Jacek Konieczny <jajcus@jajcus.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License Version
# 2.1 as published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be u... | lgpl-2.1 | -6,043,160,016,510,438,000 | 33.953488 | 76 | 0.777112 | false | 3.570071 | false | false | false |
eabeda/pyTES | src/pyTES_Upgrade.py | 1 | 8726 | #!/usr/bin/python
#
# pyTES_Upgrade.py
# Copyright (C) 2017 eabeda <elyes.abeda@gmail.com>
#
# pyTES 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 ... | gpl-3.0 | -7,198,817,637,644,495,000 | 34.331984 | 156 | 0.569218 | false | 3.691201 | false | false | false |
leandrotoledo/python-telegram-bot | tests/test_chatlocation.py | 2 | 2775 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2021
# Leandro Toledo de Souza <devs@python-telegram-bot.org>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser Public License as published by
#... | lgpl-3.0 | 8,593,778,200,419,585,000 | 34.576923 | 86 | 0.656577 | false | 3.729839 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.