repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
osiell/server-tools | sentry/logutils.py | 6 | 3224 | # -*- coding: utf-8 -*-
# Copyright 2016-2017 Versada <https://versada.eu/>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
import logging
import urlparse
import openerp.http
_logger = logging.getLogger(__name__)
try:
from raven.handlers.logging import SentryHandler
from raven.processors impo... | agpl-3.0 | 327,728,614,838,177,300 | 28.577982 | 79 | 0.619107 | false | 3.922141 | false | false | false |
jesonyang001/qarepo | askbot/management/commands/send_unanswered_question_reminders.py | 4 | 3589 | from django.core.management.base import NoArgsCommand
from django.db.models import Q
from django.template.loader import get_template
from askbot import models
from askbot import const
from askbot.conf import settings as askbot_settings
from django.utils.translation import ungettext
from askbot.mail.messages import Unan... | gpl-3.0 | 4,048,258,349,090,557,000 | 38.43956 | 80 | 0.633881 | false | 4.212441 | false | false | false |
lino-framework/xl | lino_xl/lib/deploy/__init__.py | 1 | 1220 | # Copyright 2008-2017 Rumma & Ko Ltd
# License: GNU Affero General Public License v3 (see file COPYING for details)
"""
Adds functionality for managing "milestones" and "deployments".
See :doc:`/specs/noi/deploy`.
"""
from lino.api import ad, _
class Plugin(ad.Plugin):
"See :class:`lino.core.plugin.Plugin`."
... | bsd-2-clause | 5,407,548,613,514,181,000 | 29.5 | 78 | 0.611475 | false | 3.065327 | false | false | false |
aviarypl/mozilla-l10n-addons-server | src/olympia/reviewers/management/commands/award_post_review_points.py | 5 | 2323 | # -*- coding: utf-8 -*-
from django.core.management.base import BaseCommand
import olympia.core.logger
from olympia import amo
from olympia.activity.models import ActivityLog
from olympia.reviewers.models import ReviewerScore
log = olympia.core.logger.getLogger('z.reviewers.award_post_review_points')
# The note w... | bsd-3-clause | 7,518,510,069,657,340,000 | 40.482143 | 78 | 0.619888 | false | 4.097002 | false | false | false |
pacoqueen/ginn | ginn/formularios/horas_trabajadas.py | 1 | 30531 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
###############################################################################
# Copyright (C) 2005-2008 Francisco José Rodríguez Bogado, #
# Diego Muñoz Escalante. #
# (pacoqueen@users.sourceforge.ne... | gpl-2.0 | 6,146,498,084,562,273,000 | 55.611524 | 261 | 0.513872 | false | 3.422904 | false | false | false |
shoopio/shoop | shuup/campaigns/migrations/0012_basket_campaign_undiscounted.py | 3 | 5491 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.12 on 2018-02-21 06:34
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import shuup.core.fields
import shuup.utils.properties
class Migration(migrations.Migration):
dependencies = [
('camp... | agpl-3.0 | -7,123,382,583,756,743,000 | 53.91 | 345 | 0.648152 | false | 4.417538 | false | false | false |
gcobos/rft | tests/FSA-1.0/FSChartParser.py | 1 | 21466 | # Module FSChartParser -- finite-state chart parser and grammar compilation utilities
"""ChartParser is a chart parser that uses finite-state automata to
recognize grammar rules.
ChartParser is initialized with a grammar, represented as a list of
rules. Each rule is either a categorizing automaton (defined below),
or... | agpl-3.0 | 1,206,166,458,803,162,600 | 38.973929 | 116 | 0.62387 | false | 3.649439 | true | false | false |
natduca/ndbg | ui/editor_selection_dialog.py | 1 | 1806 | # Copyright 2011 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,... | apache-2.0 | 8,182,438,127,243,682,000 | 27.21875 | 90 | 0.672757 | false | 3.466411 | false | false | false |
getsentry/zeus | zeus/factories/artifact.py | 1 | 2062 | import factory
from datetime import timedelta
from faker import Factory
from zeus import models
from zeus.constants import Status
from zeus.db.types.file import FileData
from zeus.utils import timezone
from .base import ModelFactory
from .types import GUIDFactory
faker = Factory.create()
class ArtifactFactory(Mod... | apache-2.0 | 3,242,402,610,822,577,000 | 30.242424 | 83 | 0.628516 | false | 3.973025 | false | false | false |
alirizakeles/tendenci | tendenci/apps/files/views.py | 1 | 24303 | import os
import simplejson as json
import urllib2
import mimetypes
from django.contrib.auth.decorators import login_required
from django.shortcuts import get_object_or_404, redirect
from django.template import RequestContext
from django.template.loader import render_to_string
from django.http import (
HttpRespons... | gpl-3.0 | 2,408,261,259,629,333,500 | 33.868006 | 129 | 0.605399 | false | 3.924903 | false | false | false |
niamoto/niamoto-core | niamoto/data_marts/fact_tables/fact_table_manager.py | 2 | 3453 | # coding: utf-8
import sqlalchemy as sa
import pandas as pd
from niamoto.db import metadata as meta
from niamoto.db.connector import Connector
from niamoto.data_marts.fact_tables.base_fact_table import BaseFactTable
from niamoto.exceptions import FactTableNotRegisteredError
class FactTableManager:
"""
Fact ... | gpl-3.0 | 4,899,290,587,544,425,000 | 33.53 | 79 | 0.613669 | false | 4.300125 | false | false | false |
iandees/pyosm | pyosm/api.py | 1 | 2668 | import urllib2
from pyosm.parsing import iter_osm_file, iter_osm_change_file
class Api(object):
def __init__(self, base_url='https://api.openstreetmap.org/api'):
self._base = base_url
self.USER_AGENT = 'pyosm/1.0 (http://github.com/iandees/pyosm)'
def _get(self, path, params={}):
head... | mit | -3,957,367,737,181,072,400 | 32.35 | 110 | 0.618066 | false | 3.381496 | false | false | false |
CloudServer/cinder | cinder/volume/drivers/solidfire.py | 1 | 52429 | # Copyright 2013 SolidFire 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... | apache-2.0 | 7,837,464,321,735,447,000 | 39.737374 | 79 | 0.55147 | false | 4.316921 | true | false | false |
stBecker/CB-CTT_Solver | Course timetabling solver/feasibility.py | 1 | 11517 | """ Curriculum-based course timetabling solver;
solves timetabling problems formulated in .ectt file format (http://tabu.diegm.uniud.it/ctt/)
Copyright (C) 2013 Stephan E. Becker
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License a... | gpl-3.0 | -8,115,862,841,111,498,000 | 31.721591 | 148 | 0.639142 | false | 3.823705 | false | false | false |
ryanpetrello/cleaver | setup.py | 1 | 1626 | # -*- coding: utf-8 -*-
try:
from setuptools import setup, find_packages
except ImportError:
from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup, find_packages # noqa
from cleaver import __version__
setup(
name='cleaver',
version=__version__,
description="""B... | bsd-3-clause | -7,391,591,615,381,603,000 | 35.133333 | 77 | 0.618696 | false | 4.234375 | false | false | false |
skalkoto/snf-image-creator | image_creator/main.py | 2 | 22709 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2011-2017 GRNET S.A.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any ... | gpl-3.0 | -2,340,353,118,397,594,600 | 39.407473 | 79 | 0.563345 | false | 4.289573 | false | false | false |
parksandwildlife/wastd | occurrence/migrations/0026_auto_20190426_1116.py | 1 | 5804 | # Generated by Django 2.1.7 on 2019-04-26 03:16
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import uuid
class Migration(migrations.Migration):
dependencies = [
('occurrence', '0025_auto_20190426_1016'),
]
operations = [
migrati... | mit | 4,404,890,845,082,541,600 | 55.349515 | 305 | 0.609063 | false | 4.072982 | false | false | false |
csnover/TracAnnouncer | announcer/formatters.py | 1 | 12580 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2008, Stephen Hansen
# Copyright (c) 2009, Robert Corsaro
#
# 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 ... | bsd-3-clause | 552,019,878,813,824,100 | 37.470948 | 83 | 0.556757 | false | 4.44523 | false | false | false |
kelvin13/Knockout | interface/taylor.py | 2 | 26929 | import bisect
from math import pi, sqrt
import os
import cairo
from itertools import chain
from fonts.interfacefonts import ISTYLES
from fonts import SPACENAMES
from edit import wonder
from IO import un
import keyboard
from state import noticeboard, constants
from state.constants import accent, accent_light
from... | gpl-3.0 | 1,404,453,763,107,493,400 | 32.906801 | 173 | 0.465827 | false | 3.682396 | false | false | false |
andrewleech/script.module.pycurl | lib/pycurl/pycurl-7.19.5.1/tests/multi_test.py | 1 | 12255 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et
import pycurl
import unittest
import nose.tools
import select
from . import appmanager
from . import util
setup_module_1, teardown_module_1 = appmanager.setup(('app', 8380))
setup_module_2, teardown_module_2 = appmanager.setup(('app', 8381))
setup_module_3,... | lgpl-2.1 | -4,925,204,106,635,912,000 | 31.335092 | 89 | 0.549572 | false | 3.658209 | true | false | false |
jthomale/pycallnumber | pycallnumber/utils.py | 1 | 9528 | """Miscellaneous utility functions and classes."""
from __future__ import unicode_literals
from __future__ import absolute_import
from builtins import str
from builtins import range
from builtins import object
import functools
import inspect
import re
import struct
import importlib
import types
from .exceptions impor... | bsd-3-clause | 7,155,141,953,253,038,000 | 31.080808 | 79 | 0.600651 | false | 3.71028 | false | false | false |
quantwizard-com/pythonbacktest | pythonbacktest/broker/backtestbroker.py | 1 | 5026 | from . import *
class BackTestBroker(AbstractBroker):
def __init__(self, budget, trade_log=None, commision=0.0):
AbstractBroker.__init__(self)
self.__budget = budget
self.__commision = commision
# number of shares kept, where
# >0 - overall portfolio is long
# <0... | apache-2.0 | -385,420,171,645,568,700 | 34.9 | 157 | 0.625149 | false | 3.951258 | false | false | false |
wangkangcheng/ccc | scripts/qap_report.py | 4 | 1208 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
# @Author: oesteban
# @Date: 2015-10-08 13:07:21
# @Last Modified by: oesteban
# @Last Modified time: 2015-10-08 14:53:20
if __name__ == "__main__":
im... | bsd-3-clause | -7,260,958,655,513,437,000 | 32.555556 | 73 | 0.593543 | false | 3.247312 | false | false | false |
mou4e/zirconium | tools/telemetry/telemetry/value/trace.py | 2 | 4819 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import datetime
import logging
import os
import random
import shutil
import sys
import tempfile
from telemetry.timeline import trace_data as trace_data_modu... | bsd-3-clause | -7,936,720,666,355,272,000 | 30.913907 | 78 | 0.673999 | false | 3.785546 | false | false | false |
zhumengyuan/kallithea | kallithea/lib/middleware/simplehg.py | 2 | 11875 | # -*- coding: utf-8 -*-
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that... | gpl-3.0 | -5,378,402,432,724,095,000 | 39.391156 | 84 | 0.533474 | false | 4.666012 | true | false | false |
cortext/crawtextV2 | scrapper/article.py | 1 | 4192 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
from copy import deepcopy
from parsers import Parser
from cleaners import StandardDocumentCleaner
from formatters import StandardOutputFormatter
from extractors import StandardContentExtractor
import datetime
from BeautifulSoup import BeautifulSoup as bs
import nltk
class... | mit | -8,306,504,350,197,033,000 | 25.871795 | 130 | 0.659351 | false | 3.114413 | false | false | false |
SKA-ScienceDataProcessor/integration-prototype | sip/science_pipeline_workflows/mock_workflow/mock_workflow_stage/task.py | 1 | 1055 | # -*- coding: utf-8 -*-
"""Extremely simple mock workflow stage task."""
import json
import logging
import sys
import time
from _version import __version__
from sip_logging import init_logger
def main():
"""Run the workflow task."""
log = logging.getLogger('sip.mock_workflow_stage')
if len(sys.argv) != ... | bsd-3-clause | 1,737,094,789,317,351,400 | 24.731707 | 71 | 0.588626 | false | 3.701754 | false | false | false |
heopro/trojan-frameworks | git_trojan.py | 1 | 2610 | #!/usr/bin/env python
__author__ = "bt3"
import json
import base64
import sys
import time
import imp
import random
import random
import threading
import Queue
import os
from github3 import login
trojan_id = 'super'
trojan_config = 'trojan_id' + '.json'
trojan_path = 'data/%s/' %trojan_id
trojan_modules = []
confi... | mit | -3,016,058,668,208,844,300 | 24.349515 | 78 | 0.640613 | false | 3.484646 | true | false | false |
njmube/erpnext | erpnext/schools/doctype/student_group/student_group.py | 2 | 1841 | # -*- coding: utf-8 -*-
# Copyright (c) 2015, Frappe Technologies and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe.model.document import Document
from frappe import _
from erpnext.schools.utils import validate_duplicate_student
from er... | agpl-3.0 | -2,398,993,548,747,599,400 | 35.117647 | 134 | 0.716458 | false | 3.235501 | false | false | false |
hclivess/Stallion | nuitka/Cryptodome/Cipher/CAST.py | 4 | 6087 | # -*- coding: utf-8 -*-
#
# Cipher/CAST.py : CAST
#
# ===================================================================
# The contents of this file are dedicated to the public domain. To
# the extent that dedication to the public domain is not available,
# everyone is granted a worldwide, perpetual, royalty-free,
#... | gpl-3.0 | 1,141,003,331,219,835,500 | 37.283019 | 85 | 0.570396 | false | 4.015172 | false | false | false |
SuriyaaKudoIsc/olympia | sites/landfill/settings_base.py | 2 | 5422 | """private_base will be populated from puppet and placed in this directory"""
import logging
import os
import dj_database_url
from lib.settings_base import CACHE_PREFIX, ES_INDEXES, KNOWN_PROXIES, LOGGING
from .. import splitstrip
import private_base as private
ENGAGE_ROBOTS = False
EMAIL_BACKEND = 'django.core.m... | bsd-3-clause | 3,896,054,543,928,361,000 | 27.687831 | 79 | 0.672446 | false | 2.974218 | false | false | false |
cts-admin/cts | cts/home/models.py | 1 | 2289 | from __future__ import absolute_import, unicode_literals
from django.db import models
from django.shortcuts import render
from wagtail.core.models import Page
from wagtail.core.fields import RichTextField, StreamField
from wagtail.core import blocks
from wagtail.admin.edit_handlers import StreamFieldPanel, FieldPanel... | gpl-3.0 | 1,824,731,938,717,990,400 | 31.239437 | 104 | 0.591962 | false | 4.094812 | false | false | false |
OSSESAC/odoopubarquiluz | extra-addons/cost_center_asset/account.py | 4 | 3240 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Cubic ERP - Teradata SAC (<http://cubicerp.com>).
#
# This program is free software: you can redistribute it and/or modify
# it under the ... | agpl-3.0 | 4,455,949,571,350,373,400 | 42.797297 | 156 | 0.62037 | false | 3.737024 | false | false | false |
edwardzhu/checkio-solution | EmpireOfCode/common/Craft Pad/probablyDice.py | 1 | 1422 | def probability(dice_number, sides, target):
total, result, case = sides ** dice_number, [[]], 0
result[0] = sides * [1] + sides * (dice_number - 1) * [0]
for i in range(1, dice_number):
result.append([0])
for j in range(1, sides * dice_number):
result[i].append(0)
fo... | mit | 5,746,915,714,600,662,000 | 48.068966 | 87 | 0.61955 | false | 3.299304 | false | false | false |
switowski/invenio | invenio/modules/formatter/format_elements/bfe_authors.py | 12 | 11779 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2013, 2014, 2015 CERN.
#
# Invenio is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License as
# published by the Free Software Foundation; either version 2... | gpl-2.0 | -160,498,452,306,518,050 | 45.192157 | 156 | 0.521182 | false | 4.112779 | false | false | false |
jamesturk/oyster | oyster/mongolog.py | 1 | 1808 | """
MongoDB handler for Python Logging
inspired by https://github.com/andreisavu/mongodb-log
"""
import logging
import datetime
import socket
import pymongo
class MongoFormatter(logging.Formatter):
def format(self, record):
""" turn a LogRecord into something mongo can store """
data = ... | bsd-3-clause | 2,945,025,960,697,298,400 | 32.481481 | 79 | 0.619469 | false | 4.244131 | false | false | false |
mingtaiha/n.ai | nai/models.py | 1 | 3289 | #!venv/bin/python
from nai import db
class Store(db.Model):
__tablename__ = 'stores'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), nullable=False)
address = db.Column(db.String(128), nullable=False)
class Food(db.Model):
__tablename__ = 'foods'
id = db.Column(d... | mit | -3,627,560,720,579,173,000 | 40.1125 | 83 | 0.681058 | false | 3.056691 | false | false | false |
divio/django-filer | filer/models/abstract.py | 1 | 6367 | import logging
from django.db import models
from django.utils.translation import gettext_lazy as _
from .. import settings as filer_settings
from ..utils.compatibility import PILImage
from ..utils.filer_easy_thumbnails import FilerThumbnailer
from ..utils.pil_exif import get_exif_for_file
from .filemodels import File... | bsd-3-clause | 3,284,215,450,489,975,000 | 34.372222 | 101 | 0.580179 | false | 4.099807 | false | false | false |
mytliulei/DCNRobotInstallPackages | windows/win32/pyte-0.4.8/pyte/charsets.py | 6 | 7502 | # -*- coding: utf-8 -*-
"""
pyte.charsets
~~~~~~~~~~~~~
This module defines ``G0`` and ``G1`` charset mappings the same way
they are defined for linux terminal, see
``linux/drivers/tty/consolemap.c`` @ http://git.kernel.org
.. note:: ``VT100_MAP`` and ``IBMPC_MAP`` were taken unchanged
... | apache-2.0 | -1,516,098,702,384,649,000 | 51.097222 | 71 | 0.691549 | false | 1.773103 | false | false | false |
nagyistoce/koalacloud | boto/ec2/instanceinfo.py | 42 | 1912 | # Copyright (c) 2006-2008 Mitch Garnaat http://garnaat.org/
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modi... | apache-2.0 | -6,542,789,492,319,992,000 | 36.490196 | 74 | 0.680439 | false | 4.355353 | false | false | false |
ajyoon/brown | brown/core/music_text.py | 1 | 5134 | from brown.core.music_char import MusicChar
from brown.core.staff_object import StaffObject
from brown.core.text import Text
from brown.utils.point import Point
from brown.utils.rect import Rect
from brown.utils.units import GraphicUnit
class MusicText(Text):
"""
A glyph with a MusicFont and convenient access... | gpl-3.0 | -5,056,320,345,179,253,000 | 39.109375 | 78 | 0.567004 | false | 4.246485 | false | false | false |
chokribr/inveniotest | modules/websubmit/lib/functions/Move_to_Pending.py | 35 | 1983 | ## This file is part of Invenio.
## Copyright (C) 2004, 2005, 2006, 2007, 2008, 2010, 2011 CERN.
##
## Invenio is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either version 2 of the
## License, or (at your ... | gpl-2.0 | 2,347,337,839,019,565,600 | 37.882353 | 94 | 0.682804 | false | 3.926733 | false | false | false |
richard-shepherd/monopyly | AIs/James Tyas/pimpmyboard.py | 1 | 29077 | from monopyly import *
from random import *
from .jamestyasbasics import *
class PimpMyBoard(JamesTyasBasicsAI):
'''
This AI counts its number of turns in a game
'''
def __init__(self):
self.total_games = 0
self.total_turns = 0
self.panic_selling = 0
self.turn_amount_ow... | mit | 8,810,855,816,267,179,000 | 52.846296 | 144 | 0.592461 | false | 3.804894 | false | false | false |
DisruptiveLabs/comanage_nacha | comanage_nacha/enums.py | 1 | 2286 | import six
class EnumMeta(type):
def __new__(cls, what, bases, dikt):
for k, v in list(dikt.items()):
dikt[v] = k
return type(what, bases, dikt)(dikt)
Enum = six.with_metaclass(EnumMeta, dict)
class ConfirmationMessageCodes(Enum):
NO_MESSAGE = ''
FILE_RECEIVED = '01'
FI... | mit | 5,358,886,896,928,302,000 | 28.688312 | 85 | 0.649606 | false | 3.02381 | false | false | false |
pb-/lgtd-core | lgtd/ui/tasks/parser.py | 1 | 2762 | from functools import partial
class ParseError(Exception):
pass
def _add_argument(parse_func, *args, **kwargs):
def wrapper(f):
if not hasattr(f, 'arguments'):
f.arguments = []
f.arguments.insert(0, dict(
parse_func=parse_func, args=args, kwargs=kwargs)
)
... | gpl-3.0 | 1,319,434,365,501,602,300 | 27.474227 | 78 | 0.602824 | false | 3.928876 | false | false | false |
google/makani | analysis/control/write_controllers.py | 1 | 2939 | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | 3,624,952,037,507,640,300 | 31.655556 | 78 | 0.598503 | false | 3.748724 | false | false | false |
criccomini/airflow | tests/contrib/hooks/test_gcp_dataflow_hook.py | 1 | 12005 | # -*- coding: utf-8 -*-
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
#... | apache-2.0 | -7,032,302,094,572,009,000 | 39.285235 | 89 | 0.620158 | false | 3.631276 | true | false | false |
cxcxcxcx/sae-logs | get_sae_logs.py | 1 | 1287 | #!/usr/bin/env python2
import argparse
import hashlib
import cStringIO
# import io
import json
import sys
import re
import tarfile
from apibus_handler import SaeApibusAuthHandler
import urllib2
parser = argparse.ArgumentParser(description='Download sae logs.')
parser.add_argument('--logs_type', help='storage,http,etc... | apache-2.0 | 5,942,754,061,352,531,000 | 34.75 | 132 | 0.69697 | false | 3.131387 | false | false | false |
saydulk/horizon | openstack_dashboard/dashboards/project/instances/audit_tables.py | 59 | 2391 | # Copyright 2013 Metacloud, 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... | apache-2.0 | 9,056,495,189,816,885,000 | 44.113208 | 77 | 0.641154 | false | 4.202109 | false | false | false |
azurestandard/django | tests/regressiontests/logging_tests/tests.py | 9 | 8268 | from __future__ import unicode_literals
import copy
import warnings
from django.conf import compat_patch_logging_config
from django.core import mail
from django.test import TestCase, RequestFactory
from django.test.utils import override_settings
from django.utils.log import CallbackFilter, RequireDebugFalse, getLogge... | bsd-3-clause | 1,462,920,772,145,865,000 | 31.551181 | 116 | 0.592767 | false | 4.272868 | true | false | false |
manevant/django-oscar | src/oscar/apps/catalogue/app.py | 32 | 1907 | from django.conf.urls import url, include
from oscar.core.application import Application
from oscar.core.loading import get_class
from oscar.apps.catalogue.reviews.app import application as reviews_app
class BaseCatalogueApplication(Application):
name = 'catalogue'
detail_view = get_class('catalogue.views', ... | bsd-3-clause | 5,500,498,830,175,792,000 | 37.14 | 79 | 0.62087 | false | 3.806387 | false | false | false |
viennacl/pyviennacl-dev | examples/direct-solvers.py | 2 | 1397 | #!python
"""
PyViennaCL provides direct solvers for dense triangular linear systems.
The API is documented in ``help(pyviennacl.linalg.solve)``. In particular,
the solver to use is determined by the tag instance supplied to the ``solve``
function.
LU factorisation is planned for a later release.
Here, we demonstrate... | mit | -7,255,470,658,383,206,000 | 28.104167 | 79 | 0.71582 | false | 3.3026 | false | false | false |
tonghuashuai/OnlyRSSWeb | misc/update_service.py | 1 | 3037 | #!/usr/bin/python
#coding=utf-8
import threading
import thread
import MySQLdb
import feedparser
import time
import socket
__author__ = 'tonghuashuai'
socket.setdefaulttimeout(20)
thread_count_dic = {'update_thread_count': 0, 'import_thread_count': 0}
update_thread_count = 0
#线程限制数
thread_count_max = 30
def main()... | mit | 6,591,594,196,472,035,000 | 25.787611 | 130 | 0.572844 | false | 3.34106 | false | false | false |
rijeshaugustine/missioncommander | gui.py | 1 | 4317 | from gi.repository import Gtk
import xmlparser
class DialogExample(Gtk.Dialog):
def __init__(self, parent):
win = MissionCommander()
win.window.show_all()
class MissionGUI:
def gtk_main_quit( self, window ):
self.shutdowncb()
def ivybind(self, ivylink):
self.ivylink = ivy... | gpl-2.0 | 4,547,605,137,314,779,000 | 33.536 | 99 | 0.605513 | false | 3.674043 | false | false | false |
yoseforb/lollypop | src/art_base.py | 1 | 7385 | #!/usr/bin/python
# Copyright (c) 2014-2015 Cedric Bellegarde <cedric.bellegarde@adishatz.org>
# Copyright (c) 2013 Vadim Rutkovsky <vrutkovs@redhat.com>
# Copyright (c) 2013 Arnel A. Borja <kyoushuu@yahoo.com>
# Copyright (c) 2013 Seif Lotfy <seif@lotfy.com>
# Copyright (c) 2013 Guillaume Quintard <guillaume.quintard@... | gpl-3.0 | -7,053,909,046,247,514,000 | 36.678571 | 78 | 0.504672 | false | 4.158221 | false | false | false |
darka/p2pfs | src/upload_request_protocol.py | 1 | 1591 | from twisted.internet import defer
from twisted.protocols.basic import LineReceiver
from helpers import *
import binascii
import json
class UploadRequestProtocol(LineReceiver):
def __init__(self, logger):
self.l = logger
self.outfile_size = 0
def connectionMade(self):
ip = self.transport.getPeer().hos... | gpl-3.0 | -4,858,057,895,844,478,000 | 30.196078 | 104 | 0.672533 | false | 3.640732 | false | false | false |
s-m-i-t-a/flask_siilo | tests/test_storage.py | 1 | 2329 | # -*- coding: utf-8 -*-
import six
import pytest
if six.PY3:
from unittest.mock import patch, call
else:
from mock import patch, call
from flask import Flask
from flask_siilo import Storage, import_string
class TestStorage(object):
def test_return_local_file_storage_as_default_storage(self):
... | bsd-3-clause | -5,351,525,258,067,440,000 | 28.481013 | 93 | 0.63933 | false | 3.901173 | true | false | false |
pychess/pychess | lib/pychess/Utils/TimeModel.py | 1 | 9714 | from time import time
from gi.repository import GLib, GObject
from pychess.Utils.const import WHITE, BLACK
from pychess.System.Log import log
class TimeModel(GObject.GObject):
__gsignals__ = {
"player_changed": (GObject.SignalFlags.RUN_FIRST, None, ()),
"time_changed": (GObject.SignalFlags.RUN_... | gpl-3.0 | -4,652,319,375,418,271,000 | 34.977778 | 103 | 0.498765 | false | 4.375676 | false | false | false |
denisjul/democratos | democratos/CreateYourLaws/forms.py | 1 | 8168 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django import forms
from captcha.fields import CaptchaField
from datetime import date, timedelta
from django.forms import SelectDateWidget
from django.contrib.auth.forms import UserCreationForm
from registration.forms import RegistrationFormU... | gpl-3.0 | 5,987,662,819,938,004,000 | 34.542601 | 80 | 0.521414 | false | 3.95967 | false | false | false |
colincsl/StructuredModels | setup.py | 1 | 1070 |
'''
Configure:
python setup.py build
StructuredModels
Colin Lea
2013
'''
from distutils.core import setup
# from setuptools import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
import numpy as np
# ext_modules = [
# Extension("pyKinectTools_algs_Dijkstras", ["pyKinectToo... | bsd-2-clause | -9,157,108,548,172,884,000 | 22.777778 | 127 | 0.657944 | false | 2.815789 | false | false | false |
ParkJinSang/SIMONFramework | src/SIMON_Py/SIMON/agents/SIMONUtilitybaseAgent.py | 1 | 3650 | __author__ = 'Park'
from SIMON import SIMONFunction
from SIMON.utils import SIMONObjectSerializer, SIMONFileStream
from collections import OrderedDict
class SIMONUtilitybaseAgent:
def __init__(self):
pass
#
# make decision by utility base
# select the action which is evaluated the b... | apache-2.0 | -6,468,196,181,267,932,000 | 37.044444 | 161 | 0.439836 | false | 3.981395 | false | false | false |
Quetzal-RDF/synthesis | embeddingProcessor/CreateWordEmbeddingsWord2Vec.py | 1 | 1158 | # import modules & set up logging
import gensim, logging
import codecs
import re
import os
logging.basicConfig(format='%(asctime)s : %(levelname)s : %(message)s', level=logging.INFO)
class MySentences(object):
def __init__(self, dirname):
self.dirname = dirname
self.regex = re.compile(r"[<][^>]+[>... | epl-1.0 | -4,925,649,094,502,920,000 | 36.354839 | 106 | 0.601036 | false | 3.86 | false | false | false |
shackra/thomas-aquinas | tools/skeleton/ui.py | 1 | 8030 | # ----------------------------------------------------------------------------
# cocos2d
# Copyright (c) 2008-2012 Daniel Moisset, Ricardo Quesada, Rayentray Tappa,
# Lucio Torre
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the... | bsd-3-clause | 1,154,941,002,732,868,900 | 30.367188 | 78 | 0.568244 | false | 3.531223 | false | false | false |
FilipeMaia/afnumpy | afnumpy/multiarray.py | 1 | 26768 | import ctypes
import arrayfire
import sys
import numpy
import numbers
from . import private_utils as pu
import afnumpy
from . import indexing
from .decorators import *
import collections
class ndarray(object):
# Ensures that our functions are called before numpy ones
__array_priority__ = 20
def __init__... | bsd-2-clause | 9,033,620,015,661,934,000 | 34.787433 | 150 | 0.545353 | false | 3.704401 | false | false | false |
jinzishuai/learn2deeplearn | deeplearning.ai/C5.SequenceModel/Week1_RNN/assignment/Building a Recurrent Neural Network - Step by Step/hw1.py | 1 | 61766 |
# coding: utf-8
# # Building your Recurrent Neural Network - Step by Step
#
# Welcome to Course 5's first assignment! In this assignment, you will implement your first Recurrent Neural Network in numpy.
#
# Recurrent Neural Networks (RNN) are very effective for Natural Language Processing and other sequence tasks b... | gpl-3.0 | 2,972,661,832,953,172,000 | 34.497123 | 662 | 0.533342 | false | 2.856204 | false | false | false |
tareqalayan/pytest | _pytest/capture.py | 1 | 23544 | """
per-test stdout/stderr capturing mechanism.
"""
from __future__ import absolute_import, division, print_function
import collections
import contextlib
import sys
import os
import io
from io import UnsupportedOperation
from tempfile import TemporaryFile
import six
import pytest
from _pytest.compat import CaptureIO... | mit | -5,213,152,796,541,275,000 | 32.490754 | 117 | 0.624363 | false | 4.022553 | true | false | false |
QISKit/qiskit-sdk-py | test/python/visualization/test_circuit_drawer.py | 1 | 3338 | # -*- coding: utf-8 -*-
# This code is part of Qiskit.
#
# (C) Copyright IBM 2017, 2019.
#
# This code is licensed under the Apache License, Version 2.0. You may
# obtain a copy of this license in the LICENSE.txt file in the root directory
# of this source tree or at http://www.apache.org/licenses/LICENSE-2.0.
#
# Any... | apache-2.0 | 8,609,253,003,990,908,000 | 40.209877 | 77 | 0.650689 | false | 3.992823 | true | false | false |
Beacon-Unime/Federation-Agent | netfa/fa_bridge.py | 1 | 2259 | ###########################################################################
#Copyright 2016 Anna Levin, Liran Shour - IBM
#
# 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
#
# htt... | apache-2.0 | -8,662,041,768,644,812,000 | 35.435484 | 113 | 0.625498 | false | 3.574367 | false | false | false |
bendikro/deluge-yarss-plugin | yarss2/util/common.py | 1 | 7462 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2012-2015 bendikro bro.devel+yarss2@gmail.com
#
# This file is part of YaRSS2 and is licensed under GNU General Public License 3.0, or later, with
# the additional special exception to link portions of this program with the OpenSSL library.
# See LICENSE for more details.
#
im... | gpl-3.0 | 1,144,229,829,978,233,200 | 25.938628 | 114 | 0.617529 | false | 3.789741 | false | false | false |
oser-cs/oser-website | dynamicforms/models.py | 1 | 5081 | """Dynamic forms models.
Concept
-------
A dynamic form is a form stored in the database which can have an undetermined
number of questions of various types (small text, long text, file upload…).
A user can reply to a form by submitting a form entry, made of
multiple answers (one per question).
"""
from django.db i... | gpl-3.0 | -1,177,785,349,190,001,400 | 23.668293 | 78 | 0.602729 | false | 3.845627 | false | false | false |
Alir3z4/django-base64field | django_base64field/fields.py | 1 | 2732 | import importlib
from django.db.models import signals
from django.db.models.fields import CharField
class Base64Field(CharField):
"""
Base64Field is useful where you need a base64 encoded value from
model's Primary Key a.k.a PK which is available on every django
application model by default. Sine `ba... | bsd-3-clause | -9,093,814,877,546,981,000 | 34.947368 | 77 | 0.647877 | false | 3.831697 | false | false | false |
AZtheAsian/zulip | confirmation/models.py | 13 | 5970 | # -*- coding: utf-8 -*-
# Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com>
__revision__ = '$Id: models.py 28 2009-10-22 15:03:02Z jarek.zgoda $'
import re
from django.db import models
from django.core.urlresolvers import reverse
from django.core.mail import send_mail
from django.conf import settings
from dj... | apache-2.0 | -8,423,321,280,851,332,000 | 38.8 | 122 | 0.643049 | false | 4.006711 | false | false | false |
rxuriguera/bibtexIndexMaker | src/bibim/gui/custom_widgets.py | 1 | 3769 |
# Copyright 2010 Ramon Xuriguera
#
# This file is part of BibtexIndexMaker.
#
# BibtexIndexMaker 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 late... | gpl-3.0 | 3,655,537,869,951,166,500 | 33.263636 | 88 | 0.643407 | false | 3.877572 | false | false | false |
RAMSProject/rams | uber/site_sections/signups.py | 1 | 6523 | from uber.common import *
from uber.custom_tags import safe_string
@all_renderable(c.SIGNUPS)
class Root:
def index(self, session, message=''):
if c.UBER_SHUT_DOWN or c.AT_THE_CON:
return render('signups/printable.html', {'attendee': session.logged_in_volunteer()})
else:
r... | agpl-3.0 | 4,810,764,746,302,498,000 | 38.77439 | 165 | 0.580714 | false | 3.934258 | false | false | false |
ngageoint/six-library | six/modules/python/six.sicd/tests/test_read_complex_data.py | 1 | 2156 | #!/usr/bin/env python
#
# =========================================================================
# This file is part of six.sicd-python
# =========================================================================
#
# (C) Copyright 2004 - 2016, MDA Information Systems LLC
#
# six.sicd-python is free software; you can... | lgpl-3.0 | -1,287,554,069,163,568,400 | 31.666667 | 78 | 0.637755 | false | 3.68547 | false | false | false |
Alidron/alidron-base-python | alidron-base-python:2-alpine/test_libc.py | 1 | 7842 | from ctypes import c_char, c_char_p
from ctypes import c_uint, c_uint8, c_uint16, c_uint32
from ctypes import c_short, c_ushort
from ctypes import c_void_p, pointer
from ctypes import CDLL, Structure, Union
from sys import platform
if platform.startswith("win") and sys.version.startswith("2"):
import win_inet_pton... | mpl-2.0 | 8,998,703,168,961,340,000 | 29.277992 | 76 | 0.461617 | false | 3.574294 | false | false | false |
llou/panopticon | panopticon/core/computers.py | 1 | 5510 | # computers.py is part of Panopticon.
# Panopticon 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.
# Panopticon is distributed in the... | gpl-3.0 | 2,132,163,873,299,946,200 | 31.60355 | 102 | 0.638657 | false | 3.763661 | false | false | false |
unsuthee/VariationalDeepSemanticHashing | VDSH.py | 1 | 3514 | ####################################################################################################################
# Author: Suthee Chaidaroon
# schaidaroon@scu.edu
# Aug 2017
####################################################################################################################
import tensorflow as tf
... | mit | 2,685,228,157,973,096,400 | 42.395062 | 116 | 0.489186 | false | 3.479208 | false | false | false |
mgaitan/beppo | beppo/server/ClientAvatar.py | 1 | 3522 | # This file is part of Beppo.
#
# Beppo is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# Beppo is distributed in the hope that it wi... | gpl-2.0 | 5,761,178,708,380,232,000 | 28.107438 | 76 | 0.639409 | false | 3.979661 | false | false | false |
hasadna/OpenPress | engine/ocr/Test4.py | 1 | 4711 | # Simple "digit recognition" example for neural networks and OpenCV
#
import numpy
import cv2
# Input vectors for neural network. Spaces correspond to zeros,
# non-spaces to ones. There are 10 inputs, each corresponding to a
# digit, and 10 outputs. The hope is to match each input to the
# correct output.
input_stri... | mit | 8,544,080,156,805,074,000 | 23.664921 | 78 | 0.546169 | false | 2.841375 | false | false | false |
team-xue/xue | xue/cms/test/testcases.py | 2 | 18615 | # -*- coding: utf-8 -*-
from cms.admin.forms import save_permissions
from cms.models import Title, Page
from cms.models.moderatormodels import ACCESS_PAGE_AND_DESCENDANTS
from cms.models.permissionmodels import PagePermission, PageUser
from cms.models.pluginmodel import CMSPlugin
from cms.plugins.text.models import Tex... | bsd-3-clause | -1,747,812,725,992,037,600 | 36.379518 | 108 | 0.581467 | false | 4.106552 | true | false | false |
sebrandon1/nova | plugins/xenserver/xenapi/etc/xapi.d/plugins/glance.py | 4 | 25636 | #!/usr/bin/env python
# Copyright (c) 2012 OpenStack Foundation
# Copyright (c) 2010 Citrix Systems, Inc.
# Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (t... | apache-2.0 | -6,264,312,773,581,021,000 | 39.563291 | 79 | 0.570253 | false | 4.106359 | false | false | false |
Achint08/open-event-orga-server | app/helpers/deployment/heroku.py | 9 | 1425 | import os
import requests
class HerokuApi:
token = os.environ.get('API_TOKEN_HEROKU', '')
namespace = 'default'
headers = {}
api_url = "https://api.heroku.com/apps/%s/" % os.environ.get('HEROKU_APP_NAME', 'open-event')
def __init__(self):
self.headers = {
"Accept": "applicati... | gpl-3.0 | -5,946,312,662,183,536,000 | 25.886792 | 105 | 0.534035 | false | 3.69171 | false | false | false |
LikeMyBread/Saylua | v2/saylua/utils/email.py | 3 | 1050 | from saylua import app
from saylua.utils import is_devserver
from flask import render_template
import requests
def send_email(to, subject, text, html=None):
# AppEngine SDK doesn't work with requests...
if is_devserver():
return None
return requests.post(
"https://api.mailgun.net/v3/mg.s... | agpl-3.0 | 2,326,260,918,787,824,000 | 30.818182 | 84 | 0.633333 | false | 3.420195 | false | false | false |
imyouxia/LearnTornado | Asynchronous/tweet_rate_async.py | 1 | 1590 | import tornado.httpserver
import tornado.ioloop
import tornado.options
import tornado.web
import tornado.httpclient
import urllib
import json
import datetime
import time
from tornado.options import define,options
define("port",default=8000,help="run on the given port",type=int)
class IndexHandler(tornado.web.Request... | mit | -6,221,740,111,171,627,000 | 29 | 67 | 0.706918 | false | 3.087379 | false | false | false |
Donkyhotay/MoonPy | zope/rdb/gadfly/gfsocket.py | 1 | 6946 |
"""socket interactions for gadfly client and server"""
from select import select
# responses
SUCCESS = "SUCCESS"
EXCEPTION = "EXCEPTION"
def reply_exception(exception, info, socket):
"""send an exception back to the client"""
# any error is invisible to client
from gfserve import ServerError
impor... | gpl-3.0 | -5,550,578,696,900,121,000 | 30.147982 | 78 | 0.574431 | false | 4.279729 | false | false | false |
johannfaouzi/pyts | examples/transformation/plot_shapelet_transform.py | 1 | 1642 | """
==================
Shapelet Transform
==================
The Shapelet Transform algorithm extracts shapelets from a data set of
time series and returns the distances between the shapelets and the time
series. A shapelet is defined as a subset of a time series, that is a
set of values from consecutive time points. ... | bsd-3-clause | 4,047,357,720,166,344,000 | 37.186047 | 78 | 0.725335 | false | 3.698198 | false | false | false |
zak-k/cis | cis/data_io/ungridded_data.py | 1 | 36075 | """
Module for the UngriddedData class
"""
import logging
from time import gmtime, strftime
import numpy
import six
from cis.data_io.netcdf import get_data as netcdf_get_data
from cis.data_io.hdf_vd import get_data as hdf_vd_get_data
from cis.data_io.hdf_sd import get_data as hdf_sd_get_data
from cis.data_io.commo... | gpl-3.0 | -8,538,623,722,092,314,000 | 37.29724 | 122 | 0.607817 | false | 4.229191 | false | false | false |
ingadhoc/odoo-addons | account_tax_settlement/models/account_voucher.py | 7 | 1091 | # -*- coding: utf-8 -*-
from openerp import fields, api, models, _
class account_voucher(models.Model):
_inherit = 'account.voucher'
tax_move_line_ids = fields.One2many(
'account.move.line',
compute='_get_tax_move_lines',
string=_('Tax Journal Items'),
)
@api.one
@api... | agpl-3.0 | 5,693,372,095,862,389,000 | 31.088235 | 79 | 0.606783 | false | 3.519355 | false | false | false |
Burning-Man-Earth/iBurn-Data | scripts/2014/campdataparser.py | 1 | 7412 | '''
Converts Official Camp data provided in XML by Burning Man Org
to JSON of the PlayaEvents API format.
Input:
Burning Man Org Camp Placement XML
PlayaEvents Camp without location JSON
e.g: http://playaevents.burningman.com/api/0.2/2014/camp/
Output:
iBurn Camp Json (./camps.json)
'''
import xml.etre... | mit | 3,419,459,559,538,541,000 | 29.759336 | 151 | 0.673233 | false | 2.766704 | false | false | false |
khchine5/lino | lino/management/commands/run.py | 1 | 2995 | # -*- coding: UTF-8 -*-
# Copyright 2012-2018 Rumma & Ko Ltd
# License: BSD, see LICENSE for more details.
""".. management_command:: run
Execute a standalone Python script after having set up the Django
environment.
``manage.py run myscript.py`` is almost the same as redirecting stdin
of Django's ``shell`` command (... | bsd-2-clause | 6,178,787,094,994,367,000 | 32.266667 | 110 | 0.647295 | false | 3.646772 | false | false | false |
iver56/trondheim.kodeklubben.no | backend/wsgi/courses/executioner.py | 2 | 1535 | import os
import sys
import resource
import subprocess
def set_resource(time, memory=-1, procs=-1):
def result():
nproc = resource.getrlimit(resource.RLIMIT_NPROC)
tcpu = resource.getrlimit(resource.RLIMIT_CPU)
mem = resource.getrlimit(resource.RLIMIT_DATA)
# Set The maximum number ... | gpl-3.0 | 3,903,567,180,591,288,300 | 38.358974 | 97 | 0.658632 | false | 3.82793 | false | false | false |
DreamWFJ/Everyeye | app/resources/logs/views.py | 1 | 3714 | # -*- coding: utf-8 -*-
# ===================================
# ScriptName : views.py
# Author : WFJ
# Email : wfj_sc@163.com
# CreateTime : 2017-04-05 10:42
# ===================================
from flask_login import login_required, current_user
from flask import render_template, request, url_for, send_fil... | mit | -5,330,256,566,784,555,000 | 44.864198 | 129 | 0.638665 | false | 3.260755 | false | false | false |
richardcs/ansible | lib/ansible/modules/network/cloudengine/ce_dldp_interface.py | 7 | 22686 | #!/usr/bin/python
#
# This file is part of Ansible
#
# Ansible 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.
#
# Ansible is distribut... | gpl-3.0 | -2,418,286,735,730,111,000 | 33.52968 | 124 | 0.569294 | false | 3.827569 | true | false | false |
soravux/slc | slc/discovery/__init__.py | 1 | 1517 | #!/usr/bin/env python
import itertools
import time
from select import select
from socket import (socket, AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_BROADCAST,
gethostbyname, gethostname, SO_REUSEADDR, SHUT_RDWR)
PORT = 60221
MAGIC = b"CL4Ck$"
def discover():
"""Send a discovery probe and listen for result."""
... | lgpl-3.0 | -4,865,068,935,301,791,000 | 26.107143 | 78 | 0.601846 | false | 3.34141 | false | false | false |
Immortal-Z/DHCP | checksum.py | 1 | 3969 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright (c) 2017, Jianping Zhao
# Licensed under the BSD 3-Clause License
# You may obtain a copy of the License at
# https://opensource.org/licenses/BSD-3-Clause
"""
This module calculates the checksum value within the IP/TCP/UDP/ICMP header.
IP Header Checksum
... | bsd-3-clause | 4,129,887,997,783,481,300 | 44.62069 | 120 | 0.647266 | false | 3.906496 | false | false | false |
EeOneDown/spbu4u | tg_bot/handlers/suburbans/personalization.py | 1 | 3147 | from tg_bot import bot
from app.constants import (
emoji, all_stations, personalization_answer, select_home_station,
select_univer_station
)
from app import new_functions as nf, db
from flask import g
import telebot_login
from tg_bot.keyboards import stations_keyboard, personalization_keyboard
# Personalizati... | apache-2.0 | 541,024,363,702,993,800 | 29.059406 | 78 | 0.66469 | false | 3.097959 | false | false | false |
vetu11/piloco | telegram/ext/jobqueue.py | 1 | 20230 | #!/usr/bin/env python
#
# A library that provides a Python interface to the Telegram Bot API
# Copyright (C) 2015-2016
# 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
#... | gpl-3.0 | 5,880,297,492,123,889,000 | 38.744597 | 98 | 0.577756 | false | 4.453985 | false | false | false |
kevincong/scong-docs | conf.py | 1 | 5568 | # -*- coding: utf-8 -*-
#
# scong documentation build configuration file, created by
# sphinx-quickstart on Tue Aug 15 17:16:24 2017.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | mit | -312,351,351,213,090,560 | 29.42623 | 79 | 0.671875 | false | 3.813699 | true | false | false |
omegaup/hook_tools | git_tools.py | 1 | 15515 | #!/usr/bin/python3
'''
Utility functions used to write git hooks.
'''
import argparse
import itertools
import logging
import multiprocessing
import os
import os.path
import re
import shlex
import subprocess
import sys
from typing import (Any, Iterable, Iterator, List, Mapping, Optional, Sequence,
... | bsd-3-clause | 8,620,910,410,486,246,000 | 34.10181 | 79 | 0.579504 | false | 4.034061 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.