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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
ambimorph/recluse | recluse/nltk_based_segmenter_tokeniser.py | 1 | 8330 | # nltk_based_segmenter_tokeniser.py
import nltk
import regex, sys, codecs, unicodedata, string
from recluse import utils
def subtokenise(token, abbreviation_list=[]):
"""
Returns a tuple of disjoint, non-overlapping substrings that cover
the token string.
Subtokens are determined as follows:
All... | agpl-3.0 | -7,891,212,064,563,186,000 | 36.522523 | 130 | 0.623409 | false | 3.786364 | false | false | false |
bit-jmm/ttarm | nmf/nmf.py | 1 | 3289 | # -*- coding: utf-8 -*-
# gaussian-nmf
import math
import numpy as np
# import scipy.sparse as sp
from sys import float_info
import logging
class NMF(object):
# ランダム疎行列
# def convert_sparse_matrix(self, data):
# s1, s2 = data.shape
# if s1 == 3:
# data = data.T
# vals = data[:,... | gpl-2.0 | -8,254,493,147,447,400,000 | 25.398305 | 107 | 0.463884 | false | 2.685345 | false | false | false |
blowmage/gcloud-ruby | google-cloud-monitoring/synth.py | 1 | 3174 | # Copyright 2018 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -7,843,847,575,345,364,000 | 32.0625 | 119 | 0.647763 | false | 3.031519 | false | false | false |
MeganCFord/ClosetSkels | capstone/halloween/models.py | 1 | 2284 | from django.db import models
from django.utils import timezone
class Costume(models.Model):
owner=models.ForeignKey('auth.User', on_delete=models.CASCADE, related_name ="costumes")
name=models.CharField(max_length=55)
description=models.CharField(max_length=1000, blank=True)
public=models.BooleanField... | mit | -3,543,358,805,283,569,700 | 35.253968 | 114 | 0.668126 | false | 3.497703 | false | false | false |
lefthandedroo/Cosmo-models | Models/da_distrib-histogram.py | 1 | 6439 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Feb 13 11:45:04 2019
@author: BallBlueMeercat
This script runs through models, noise on data and dataset size options
to collect the distribution of angular diameter distance assosiated with each,
then plots these distributions as scatter and as a norm... | mit | -8,585,168,642,844,225,000 | 37.106509 | 142 | 0.544184 | false | 3.242195 | false | false | false |
smlacombe/sageo | app/model/columns/column_painter_last_event.py | 1 | 1616 | #
# Copyright (C) 2013 Savoir-Faire Linux Inc.
#
# This file is part of Sageo
#
# Sageo 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 optio... | gpl-3.0 | 4,463,876,406,926,093,300 | 36.581395 | 83 | 0.69802 | false | 3.75814 | false | false | false |
bing-ads-sdk/BingAds-Python-SDK | bingads/v12/internal/bulk/stream_reader.py | 1 | 3214 | from .bulk_object import _BulkObject
from .format_version import _FormatVersion
from .object_reader import _BulkObjectReader
from bingads.internal.error_messages import _ErrorMessages
class _BulkStreamReader():
""" Reads a bulk object and also its related data (for example corresponding errors) from the stream.""... | mit | -6,590,556,094,682,769,000 | 32.134021 | 109 | 0.610765 | false | 4.07868 | false | false | false |
Elbertbiggs360/buckelist-api | app/api/v1/item.py | 1 | 6607 | from flask import Blueprint, request, jsonify, g
from flask_restplus import abort, Resource, fields, Namespace, marshal_with
from app.models.item import Item
from app.models.bucketlist import Bucketlist
from app.utils.utilities import auth
item_api = Namespace(
'bucketlists', description='A bucketlist item manipul... | mit | -1,902,331,470,830,739,000 | 43.342282 | 103 | 0.608143 | false | 3.859229 | false | false | false |
emilsvennesson/script.module.inputstreamhelper | tests/xbmcvfs.py | 1 | 2936 | # -*- coding: utf-8 -*-
# Copyright: (c) 2019, Dag Wieers (@dagwieers) <dag@wieers.com>
# GNU General Public License v3.0 (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""This file implements the Kodi xbmcvfs module, either using stubs or alternative functionality"""
# flake8: noqa: FI14; pylint: disable=i... | mit | 2,583,302,668,208,595,500 | 29.268041 | 100 | 0.645095 | false | 3.693082 | false | false | false |
cernanalysispreservation/analysis-preservation.cern.ch | cap/modules/repos/errors.py | 3 | 3242 | # -*- coding: utf-8 -*-
#
# This file is part of CERN Analysis Preservation Framework.
# Copyright (C) 2018 CERN.
#
# CERN Analysis Preservation Framework 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... | gpl-2.0 | -5,198,789,454,273,908,000 | 35.022222 | 78 | 0.656693 | false | 4.447188 | false | false | false |
edx/ease | ease/create.py | 1 | 5704 | """
Functions that create a machine learning model from training data
"""
import os
import sys
import logging
import numpy
#Define base path and add to sys path
base_path = os.path.dirname(__file__)
sys.path.append(base_path)
one_up_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..//'))
sys.path.appe... | agpl-3.0 | -6,518,942,980,891,145,000 | 37.802721 | 131 | 0.660589 | false | 4 | false | false | false |
karoraw1/xMetaPipeline | bin/measure_euclidean_dists.py | 1 | 4990 | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
"""
Created on Thu Aug 17 13:51:26 2017
@author: login
"""
import pandas as pd
from otu_ts_support import parseBiosample
import numpy as np
from scipy.spatial.distance import pdist
from scipy.spatial.distance import squareform
original_bins = ["Bin_52", "Bin_46", "Bin_23... | bsd-2-clause | -4,140,844,667,451,682,000 | 34.397163 | 89 | 0.601202 | false | 2.735746 | false | false | false |
ArchiveTeam/googlecode-grab | pipeline.py | 1 | 11533 | # encoding=utf8
import datetime
from distutils.version import StrictVersion
import hashlib
import os.path
import random
from seesaw.config import realize, NumberConfigValue
from seesaw.item import ItemInterpolation, ItemValue
from seesaw.task import SimpleTask, LimitConcurrent
from seesaw.tracker import GetItemFromTrac... | unlicense | -2,357,863,513,384,041,000 | 38.632302 | 200 | 0.593861 | false | 3.49909 | false | false | false |
realizeapp/realize-core | core/web/user_views.py | 1 | 3317 | from flask import Blueprint, request, jsonify, current_app
from flask.ext.security import login_required
from flask.ext.login import current_user
from flask_wtf import Form
from flask.views import MethodView
from wtforms import TextField
from wtforms_json import MultiDict
from core.plugins.lib.views.forms import JSONMi... | agpl-3.0 | -7,919,639,812,747,500,000 | 33.552083 | 122 | 0.514622 | false | 4.519074 | false | false | false |
abarisain/mopidy | mopidy/mpd/protocol/audio_output.py | 1 | 1177 | from __future__ import unicode_literals
from mopidy.mpd.exceptions import MpdNoExistError
from mopidy.mpd.protocol import handle_request
@handle_request(r'disableoutput\ "(?P<outputid>\d+)"$')
def disableoutput(context, outputid):
"""
*musicpd.org, audio output section:*
``disableoutput``
T... | apache-2.0 | -5,834,711,902,576,035,000 | 22.078431 | 62 | 0.615973 | false | 3.296919 | false | false | false |
HackerEarth/cassandra-python-driver | cassandra/io/twistedreactor.py | 1 | 8375 | # Copyright 2013-2015 DataStax, 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 writi... | apache-2.0 | 152,441,721,305,304,320 | 31.335907 | 79 | 0.622806 | false | 4.601648 | false | false | false |
dsimandl/teamsurmandl | deploy_tools/fabfile.py | 1 | 3792 | from fabric.contrib.files import append, exists, sed
from fabric.api import local, env, cd, run
from fabric.colors import green, red
REPO_URL = "https://github.com/dsimandl/teamsurmandl.git"
def backup():
local('git pull')
print("Enter files you want to add, or just press return for all files")
files = ra... | mit | -6,718,033,075,787,943,000 | 43.611765 | 114 | 0.671941 | false | 3.37667 | false | false | false |
andresailer/lcgeo | DDSim/DDSim/Helper/ConfigHelper.py | 1 | 3620 | """Helper object to identify configuration parameters so we can easily overwrite
them via command line magic or via the steering file
To add additional arguments create either a member variable or a property to a
subclass of the ConfigHelper. To add additional arguments to the add_argument
call for the parser object c... | gpl-3.0 | -3,972,353,452,196,389,000 | 31.612613 | 111 | 0.614365 | false | 4.118316 | true | false | false |
stephanie-wang/ray | rllib/evaluation/interface.py | 1 | 3461 | import os
from ray.rllib.utils.annotations import DeveloperAPI
@DeveloperAPI
class EvaluatorInterface:
"""This is the interface between policy optimizers and policy evaluation.
See also: RolloutWorker
"""
@DeveloperAPI
def sample(self):
"""Returns a batch of experience sampled from this... | apache-2.0 | 9,010,526,220,752,648,000 | 26.91129 | 78 | 0.608495 | false | 4.820334 | false | false | false |
ericholscher/django | django/utils/termcolors.py | 1 | 7510 | """
termcolors.py
"""
from django.utils import six
color_names = ('black', 'red', 'green', 'yellow', 'blue', 'magenta', 'cyan', 'white')
foreground = dict((color_names[x], '3%s' % x) for x in range(8))
background = dict((color_names[x], '4%s' % x) for x in range(8))
RESET = '0'
opt_dict = {'bold': '1', 'underscore':... | bsd-3-clause | -3,519,319,297,047,664,000 | 34.424528 | 89 | 0.520772 | false | 3.654501 | false | false | false |
in4lio/yupp | eg/switch.py | 1 | 1846 | #! /usr/bin/env python
# coding: yupp
($__TITLE__ 0)
from __future__ import unicode_literals
from __future__ import print_function
from builtins import bytes
from zlib import crc32
($! switch construction for strings based on CRC-32 )
($set crc32-switch \cond.\crc32-case..\crc32-default..\body.]
_crc32 = crc32( ... | mit | -1,182,587,895,379,364,400 | 23.613333 | 65 | 0.437703 | false | 3.368613 | false | false | false |
jazzband/jazzband-site | jazzband/admin.py | 1 | 2678 | from flask import redirect, request, session, url_for
from flask_admin import Admin, AdminIndexView, expose
from flask_admin.contrib import sqla
from flask_login import current_user
from .account.models import OAuth
from .auth import current_user_is_roadie
from .db import postgres
from .members.models import EmailAddr... | mit | 858,234,447,832,963,000 | 27.189474 | 75 | 0.659447 | false | 3.688705 | false | false | false |
mvaled/sentry | tests/sentry/api/bases/test_sentryapps.py | 2 | 4733 | from __future__ import absolute_import
from django.http import Http404
from mock import patch
from sentry.testutils import TestCase
from sentry.api.bases.sentryapps import (
SentryAppPermission,
SentryAppBaseEndpoint,
SentryAppInstallationPermission,
SentryAppInstallationBaseEndpoint,
add_integrat... | bsd-3-clause | 7,408,418,504,860,931,000 | 35.129771 | 95 | 0.695753 | false | 3.783373 | true | false | false |
Muon/redux | redux/visitor.py | 1 | 2625 | from redux.ast import ASTNode
import logging
class Visitor(object):
"Implements the extrinsic Visitor pattern."
def __init__(self):
super(Visitor, self).__init__()
self.depth = 0
def log(self, fmt, *args, **kwargs):
logging.getLogger(type(self).__name__).debug("%s%d: " + fmt, " ... | mit | -2,904,752,769,884,024,300 | 31.012195 | 118 | 0.50781 | false | 4.411765 | false | false | false |
kepstin/picard | picard/ui/options/general.py | 1 | 2903 | # -*- coding: utf-8 -*-
#
# Picard, the next-generation MusicBrainz tagger
# Copyright (C) 2006 Lukáš Lalinský
#
# 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... | gpl-2.0 | 4,511,537,156,451,807,700 | 40.428571 | 90 | 0.69069 | false | 3.741935 | true | false | false |
facelessuser/ColorHelper | lib/multiconf.py | 1 | 5932 | r"""
Multiconf allows the reading of platform and or host specific values from Sublime settings.
Multiconf is a module that allows you to read platform and/or host
specific configuration values to be used by Sublime Text 2 plugins.
Using this module's `get` function, allows the user to replace any settings
value in a... | mit | 7,679,711,671,005,120,000 | 30.892473 | 120 | 0.642953 | false | 4.258435 | false | false | false |
zibawa/IoT_pki | zibawa_PKI/settings-sample.py | 1 | 5737 | """
Django settings for zibawa_PKI project.
Generated by 'django-admin startproject' using Django 1.11.3.
For more information on this file, see
https://docs.djangoproject.com/en/1.11/topics/settings/
https://docs.zibawa.com
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.11/r... | gpl-3.0 | 4,311,233,592,381,588,000 | 25.934272 | 118 | 0.640579 | false | 3.583385 | false | false | false |
srgblnch/LinacDS | LinacAttrs/groupAttr.py | 1 | 3731 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# 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 distrib... | gpl-3.0 | 4,771,849,156,789,504,000 | 34.533333 | 79 | 0.608684 | false | 3.890511 | false | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2020_03_01/aio/operations/_ip_groups_operations.py | 1 | 27195 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 33,650,392,783,851,896 | 48.266304 | 186 | 0.639272 | false | 4.259201 | true | false | false |
ttimon7/AutobahnPython | autobahn/util.py | 1 | 13828 | ###############################################################################
#
# The MIT License (MIT)
#
# Copyright (c) Tavendo GmbH
#
# 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 with... | mit | -3,312,809,518,649,519,600 | 29.06087 | 90 | 0.603269 | false | 4.138881 | false | false | false |
nynguyen/sprint_zero_demo | main/main/settings.py | 1 | 2173 | """
Django settings for main project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
impor... | mit | -3,471,171,386,326,497,000 | 23.41573 | 71 | 0.717441 | false | 3.219259 | false | false | false |
danieltahara/indivisible | indivisible/datasources/eventregistry2.py | 1 | 1369 | from eventregistry import EventRegistry
from eventregistry import QueryEvents
from eventregistry import RequestEventsInfo
class EventRegistry2(EventRegistry):
"""
Wrapper around EventRegistry API
"""
@classmethod
def initialize(cls, key):
cls.key = key
def __init__(self):
sup... | mit | 516,621,765,764,199,600 | 30.113636 | 72 | 0.558072 | false | 4.430421 | false | false | false |
google/dotty | efilter_tests/benchmarks/hygdata_v3.py | 1 | 2962 | # EFILTER Forensic Query Language
#
# Copyright 2015 Google 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
#
# Un... | apache-2.0 | 533,686,915,138,752,500 | 32.659091 | 78 | 0.634369 | false | 3.679503 | true | false | false |
kinow-io/kinow-python-sdk | kinow_client/apis/attributes_api.py | 1 | 17983 | # coding: utf-8
"""
Server API
Reference for Server API (REST/Json)
OpenAPI spec version: 1.4.41
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from __future__ import absolute_import
import sys
import os
import re
# python 2 and python 3 compatibility library
from six i... | apache-2.0 | -5,356,901,050,274,648,000 | 39.963554 | 113 | 0.545793 | false | 5.010588 | true | false | false |
getsentry/raven-python | tests/breadcrumbs/tests.py | 1 | 8015 | import sys
import logging
from raven.utils.testutils import TestCase
from raven.base import Client
from raven import breadcrumbs
from io import StringIO
class DummyClass(object):
def dummy_method(self):
pass
class BreadcrumbTestCase(TestCase):
def test_crumb_buffer(self):
for enable in 1... | bsd-3-clause | -4,469,905,193,321,869,000 | 37.349282 | 93 | 0.54947 | false | 3.95998 | true | false | false |
jsillitoe/ember-django-bloggr | bloggr/settings.py | 1 | 2603 | """
Django settings for bloggr project.
For more information on this file, see
https://docs.djangoproject.com/en/1.6/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.6/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
imp... | mit | 4,391,524,739,407,423,000 | 23.8 | 102 | 0.719554 | false | 3.193865 | false | false | false |
pacoqueen/bbinn | SQLObject/SQLObject-0.6.1/sqlobject/dbconnection.py | 1 | 24846 | from __future__ import generators
True, False = 1==1, 0==1
import threading
import re
import warnings
import atexit
import os
import new
import sqlbuilder
from cache import CacheSet
import col
from joins import sorter
from converters import sqlrepr
import urllib
import weakref
warnings.filterwarnings("ignore", "DB-A... | gpl-2.0 | 3,282,310,136,762,850,000 | 34.595989 | 126 | 0.536626 | false | 4.212614 | false | false | false |
meetshah1995/pytorch-semseg | ptsemseg/models/frrn.py | 1 | 5925 | import torch
import torch.nn as nn
import torch.nn.functional as F
from ptsemseg.models.utils import FRRU, RU, conv2DBatchNormRelu, conv2DGroupNormRelu
frrn_specs_dic = {
"A": {
"encoder": [[3, 96, 2], [4, 192, 4], [2, 384, 8], [2, 384, 16]],
"decoder": [[2, 192, 8], [2, 192, 4], [2, 48, 2]],
... | mit | 1,372,395,955,121,058,800 | 34.059172 | 96 | 0.50481 | false | 3.66646 | false | false | false |
caganze/wisps | wisps/simulations/effective_numbers.py | 1 | 16319 |
##adds survey parameters such as magnitude etc. to things
from .initialize import *
from tqdm import tqdm
from scipy.interpolate import interp1d
import wisps
from .initialize import SELECTION_FUNCTION, SPGRID
from wisps import drop_nan
from astropy.coordinates import SkyCoord
#import pymc3 as pm
from .core import ... | mit | 146,500,805,738,429,980 | 34.631004 | 121 | 0.662541 | false | 2.649618 | false | false | false |
nouiz/pydy | examples/Kane1985/Chapter6/Ex11.7_11.8.py | 1 | 7491 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""Exercises 11.7, 11.8 from Kane 1985."""
from __future__ import division
from sympy import expand, solve, symbols, trigsimp, sin, cos, Matrix
from sympy.physics.mechanics import ReferenceFrame, RigidBody, Point
from sympy.physics.mechanics import dot, dynamicsymbols, ine... | bsd-3-clause | 4,809,107,665,599,585,000 | 31.012821 | 76 | 0.591243 | false | 2.000267 | false | false | false |
jianhuashao/WebDownloadJobsManage | server/db_insert_row.py | 1 | 2070 | ###### configuration start ########
job_target = 'appid_to_asin'
client_id = 'server_test'
###### configuration finish ########
###### custom function start, need to modify according to real case
def job_upsert_bulk():
conn = sqlite3.connect('./amazon_ec2.db')
c = conn.cursor()
c.execute('SELECT app_id FROM appid_... | apache-2.0 | 9,039,640,467,172,764,000 | 28.571429 | 109 | 0.657488 | false | 2.835616 | false | false | false |
prasannav7/ggrc-core | test/selenium/src/lib/page/widget/info_widget.py | 2 | 7787 | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: jernej@reciprocitylabs.com
# Maintained By: jernej@reciprocitylabs.com
"""Page object models for the info widget of the object"""
from lib import... | apache-2.0 | 1,664,238,434,229,085,400 | 28.384906 | 78 | 0.711827 | false | 3.769119 | false | false | false |
talis/disturbometer-hack | in-house/scan.py | 1 | 3536 | import nmap
from time import time, sleep, gmtime, strftime
import os, os.path
import requests
import ConfigParser
import urllib2
import subprocess
import datetime
import fileinput
from firebase import firebase
config = ConfigParser.ConfigParser()
config.read([os.path.expanduser("~/netscan/.netscan"), '/etc/netscan'])
... | gpl-2.0 | 8,241,085,545,684,713,000 | 27.983607 | 133 | 0.6694 | false | 3.019641 | true | false | false |
phelmig/outside_ | mvp/outside/frontend/migrations/0001_initial.py | 1 | 2511 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import django.db.models.deletion
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operati... | mit | 6,772,364,062,739,232,000 | 43.839286 | 141 | 0.574671 | false | 4.198997 | false | false | false |
mk23/snmpy | lib/snmpy/httpd.py | 1 | 4578 | #!/usr/bin/env python2.7
import BaseHTTPServer
import collections
import logging
import os
import re
import socket
import sys
import signal
import time
import traceback
import urllib
import urlparse
from snmpy import log_error, __version__
LOG = logging.getLogger()
class HTTPError(Exception):
code = 500
d... | mit | -6,797,718,559,616,790,000 | 28.535484 | 107 | 0.585408 | false | 3.98087 | false | false | false |
dleecefft/pcapstats | abin/attackduration.py | 1 | 4074 | #!/usr/bin/env python
# take a large CSV and filter out service attacks so the duration can be calculated
#
# Take protocol and array of ports as arguments
#
# Assuming 10 minute buckets for duration, if new traffic seen more than 10 mins
# after last consider it a new gnore all traffic sourced from the self IP, pass ... | apache-2.0 | -7,831,274,221,280,399,000 | 28.309353 | 144 | 0.613893 | false | 3.261809 | false | false | false |
davido/buck | src/com/facebook/buck/json/buck_parser/buck.py | 1 | 56883 | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import with_statement
import __builtin__
import __future__
import contextlib
from pathlib import _Accessor, Path, PureWindowsPath, PurePath, PosixPath
from pywatchman import bser, WatchmanError... | apache-2.0 | 2,255,676,063,977,430,500 | 36.670861 | 100 | 0.608161 | false | 4.233626 | true | false | false |
edawson/rkmh | scripts/make_random_mix.py | 1 | 2794 | import random
import argparse
def parse_args():
parser = argparse.ArgumentParser()
parser.add_argument("-i", "--input", dest="infile", required=True, help="A two column file in format LABEL\tPATH_TO_FILE with the strain label and the path to a file containing reads")
parser.add_argument("-n", "--num-infs",... | mit | 1,601,783,119,895,584,500 | 33.073171 | 188 | 0.599499 | false | 3.218894 | false | false | false |
yostashiro/rfhk-addons | account_payment_term/account_payment_term.py | 1 | 5693 | # -*- coding: utf-8 -*-
# Odoo, Open Source Management Solution
# Copyright (C) 2014 - hiro TAKADA. All Rights Reserved
# @author hiro TAKADA <hiro@thdo.biz>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publ... | agpl-3.0 | 4,166,531,314,814,181,000 | 37.993151 | 78 | 0.552784 | false | 4.092739 | false | false | false |
josiah-wolf-oberholtzer/consort | consort/tools/GraceHandler.py | 1 | 4797 | import abjad
import collections
from abjad.tools import abctools
from abjad.tools import mathtools
from abjad.tools import schemetools
from abjad.tools import scoretools
from abjad.tools import selectiontools
class GraceHandler(abctools.AbjadValueObject):
r'''A grace maker.
::
>>> grace_handler = co... | mit | -1,673,588,689,567,768,000 | 29.75 | 77 | 0.56577 | false | 3.807143 | false | false | false |
windskyer/mvpn | mvpn/api/openstack/__init__.py | 1 | 13161 | # Copyright 2010 United States Government as represented by the
# Administrator of the National Aeronautics and Space Administration.
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a ... | gpl-2.0 | -6,611,409,914,591,845,000 | 37.037572 | 79 | 0.600486 | false | 4.385538 | false | false | false |
batxes/4c2vhic | Six_mouse_models/Six_mouse_models_final_output_0.2_-0.1_11000/Six_mouse_models25517.py | 2 | 18205 | import _surface
import chimera
try:
import chimera.runCommand
except:
pass
from VolumePath import markerset as ms
try:
from VolumePath import Marker_Set, Link
new_marker_set=Marker_Set
except:
from VolumePath import volume_path_dialog
d= volume_path_dialog(True)
new_marker_set= d.new_marker_set
marker_set... | gpl-3.0 | 1,271,492,513,630,737,000 | 45.323155 | 71 | 0.699423 | false | 2.67053 | false | false | false |
langmark/langmark | bench.py | 1 | 5837 | from subprocess import *
from tempfile import TemporaryFile
SHELL = '/bin/bash'
class Bench:
workingDir = ''
test = ''
name = ''
script = {}
expected_result = None
def __init__(self, workingDir, test, name, script, expected_result):
self.workingDir = workingDir
self.test = tes... | agpl-3.0 | 4,863,677,003,644,323,000 | 30.722826 | 121 | 0.528525 | false | 4.101897 | true | false | false |
blanu/py-obfsproxy | src/obfsproxy/transports/obfs3.py | 1 | 3953 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
The obfs3 module implements the obfs3 protocol.
"""
from dust.extensions.lite.lite_socket2 import makeSession, \
makeEphemeralSession, createEphemeralKeypair
from dust.core.dust_packet import IV_SIZE, KEY_SIZE
from obfsproxy.crypto.aes import AESCoder
from obfsproxy.... | bsd-3-clause | 1,986,426,773,387,766,000 | 32.786325 | 211 | 0.657222 | false | 4.324945 | false | false | false |
oasiswork/redmine-gitlab-migrator | redmine_gitlab_migrator/tests/fake.py | 1 | 21520 | JOHN = {
"id": 1,
"username": "john_smith",
"name": "John Smith",
"state": "active",
"avatar_url":
"http://localhost:3000/uploads/user/avatar/1/cd8.jpeg",
}
JACK = {
"id": 2,
"username": "jack_smith",
"name": "Jack Smith",
"state": "blocked",
"avatar_url": "http://gravatar.co... | gpl-3.0 | -6,922,241,936,037,922,000 | 32.78179 | 92 | 0.349552 | false | 4.23519 | false | false | false |
Mirantis/pumphouse | pumphouse/tasks/volume.py | 1 | 19332 | # Copyright (c) 2014 Mirantis 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 | 1,995,769,146,947,880,400 | 39.957627 | 79 | 0.53083 | false | 4.522105 | false | false | false |
python-hyper/h11 | h11/_receivebuffer.py | 1 | 5029 | import re
import sys
__all__ = ["ReceiveBuffer"]
# Operations we want to support:
# - find next \r\n or \r\n\r\n (\n or \n\n are also acceptable),
# or wait until there is one
# - read at-most-N bytes
# Goals:
# - on average, do this fast
# - worst case, do this in O(n) where n is the number of bytes processed
# P... | mit | -4,813,296,127,556,579,000 | 32.085526 | 82 | 0.625373 | false | 3.859555 | false | false | false |
bretttegart/treadmill | lib/python/treadmill/cli/allocation.py | 1 | 12254 | """Manage Treadmill allocations.
"""
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import logging
import click
import six
from treadmill import admin
from treadmill import cli
from treadmill import context
from tr... | apache-2.0 | 3,437,529,103,501,396,500 | 35.909639 | 79 | 0.571324 | false | 4.508462 | false | false | false |
FabriceSalvaire/Musica | Musica/Audio/AudioFormat.py | 1 | 5905 | ####################################################################################################
#
# Musica - A Music Theory Package for Python
# Copyright (C) 2017 Fabrice Salvaire
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as pub... | gpl-3.0 | -1,246,414,079,907,805,000 | 30.409574 | 100 | 0.48569 | false | 4.962185 | false | false | false |
InsightSoftwareConsortium/ITKTextureFeatures | setup.py | 1 | 2155 | from __future__ import print_function
from os import sys, path
try:
from skbuild import setup
except ImportError:
print('scikit-build is required to build from source.', file=sys.stderr)
print('Please run:', file=sys.stderr)
print('', file=sys.stderr)
print(' python -m pip install scikit-build')
... | apache-2.0 | -3,684,967,971,074,094,600 | 39.660377 | 89 | 0.630626 | false | 4.275794 | false | false | false |
nikcub/Sketch | sketch/security.py | 1 | 3916 | # -*- coding: utf-8 -*-
"""
werkzeug.security
~~~~~~~~~~~~~~~~~
Security related helpers such as secure password hashing tools.
:copyright: (c) 2010 by the Werkzeug Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import hmac
import string
fr... | bsd-2-clause | 2,387,173,661,759,478,300 | 36.653846 | 82 | 0.600102 | false | 4.17484 | false | false | false |
jackchi/interview-prep | heap/merge_k_sorted_lists.py | 1 | 1093 | # Definition for singly-linked list.
class ListNode:
def __init__(self, x):
self.val = x
self.next = None
# Using heapq.heappush(), heappop().
class MyListNode:
def __init__(self, node):
self.node = node
self.val = node.val
self.next = node.next
def __lt__... | mit | 5,077,036,129,893,837,000 | 25.658537 | 82 | 0.52333 | false | 3.756014 | false | false | false |
gjcarneiro/pybindgen | pybindgen/cppmethod.py | 1 | 50491 | """
Wrap C++ class methods and constructods.
"""
import warnings
import traceback
from copy import copy
from pybindgen.typehandlers.base import ForwardWrapperBase, ReverseWrapperBase, \
join_ctype_and_name, CodeGenerationError
from pybindgen.typehandlers.base import ReturnValue, Parameter
from pybindgen.typehandl... | lgpl-2.1 | 5,605,360,505,516,741,000 | 41.075833 | 132 | 0.590977 | false | 4.109637 | false | false | false |
LotosikRa/Flask-User | flask_user/views.py | 1 | 28699 | """ This file contains view functions for Flask-User forms.
:copyright: (c) 2013 by Ling Thio
:author: Ling Thio (ling.thio@gmail.com)
:license: Simplified BSD License, see LICENSE.txt for more details."""
from datetime import datetime
from flask import current_app, flash, redirect, request, url_for
from ... | bsd-2-clause | 2,104,407,580,183,631,600 | 37.782432 | 204 | 0.638977 | false | 4.057543 | false | false | false |
ioverfl0w/mate | lib/Client.py | 1 | 3545 | from enum import Enum
import ssl
import socket
import traceback
class Client:
# Client
#
# This is the backbone to each client, providing an interface for
# communications. Connection info is kept here.
def __init__(self, engine, profile):
self.engine = engine
self.profile = profi... | gpl-3.0 | -1,066,069,108,500,124,900 | 30.936937 | 106 | 0.576869 | false | 3.89989 | false | false | false |
codocedo/fca | examples/algorithms_canonicalbase/ex15_duquenneguigues_enhanced.py | 1 | 1971 | """
FCA - Python libraries to support FCA tasks
Copyright (C) 2017 Victor Codocedo
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 vers... | gpl-3.0 | -3,051,173,548,028,785,700 | 34.836364 | 129 | 0.70624 | false | 4.030675 | false | false | false |
croscon/fleaker | fleaker/_compat.py | 1 | 1944 | # ~*~ coding: utf-8 ~*~
"""
fleaker._compat
~~~~~~~~~~~~~~~
A small series of compatibility functions and wrappers for internal use, so we
aren't tied to any particular compat library.
:copyright: (c) 2016 by Croscon Consulting, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
import sy... | bsd-3-clause | -536,280,329,635,828,030 | 31.949153 | 112 | 0.653292 | false | 3.767442 | false | false | false |
rwightman/pytorch-image-models | timm/data/dataset_factory.py | 1 | 1161 | import os
from .dataset import IterableImageDataset, ImageDataset
def _search_split(root, split):
# look for sub-folder with name of split in root and use that if it exists
split_name = split.split('[')[0]
try_root = os.path.join(root, split_name)
if os.path.exists(try_root):
return try_root
... | apache-2.0 | -6,119,592,489,921,484,000 | 37.7 | 116 | 0.658915 | false | 3.745161 | false | false | false |
flyingSprite/spinelle | spinelle/items.py | 1 | 2199 | # -*- coding: utf-8 -*-
"""Scrapy Item Classes."""
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
from conf.settings import MISSION_MESSAGE
class SpinelleItem(scrapy.Item):
"""Class SpinelleItem start."""
# define ... | mit | 2,872,879,574,652,138,500 | 22.645161 | 51 | 0.594361 | false | 3.640728 | false | false | false |
mrachinskiy/blender-addon-jewelcraft | var.py | 1 | 5878 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# JewelCraft jewelry design toolkit for Blender.
# Copyright (C) 2015-2019 Mikhail Rachinskiy
#
# 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, eith... | mit | -2,959,003,655,584,730,000 | 31.819209 | 86 | 0.559649 | false | 2.299683 | false | false | false |
100grams/flask-security | flask_security/registerable.py | 1 | 1322 | # -*- coding: utf-8 -*-
"""
flask.ext.security.registerable
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Flask-Security registerable module
:copyright: (c) 2012 by Matt Wright.
:license: MIT, see LICENSE for more details.
"""
from flask import current_app as app
from werkzeug.local import LocalProxy
from .co... | mit | -3,752,129,269,934,212,000 | 29.744186 | 80 | 0.677005 | false | 3.96997 | false | false | false |
molpopgen/fwdpy11 | fwdpy11/tskit_tools/_dump_tables_to_tskit.py | 1 | 8513 | #
# Copyright (C) 2017 Kevin Thornton <krthornt@uci.edu>
#
# This file is part of fwdpy11.
#
# fwdpy11 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 | 4,379,776,156,415,916,500 | 33.326613 | 87 | 0.640667 | false | 3.511964 | false | false | false |
luiscberrocal/django-acp-calendar | acp_calendar/api/views.py | 1 | 2419 | from rest_framework import views
from rest_framework.generics import ListAPIView
from rest_framework.response import Response
from .serializers import ACPHolidaySerializer, StandardResultsSetPagination
from ..models import ACPHoliday, ACPCalendarException
class ACPHolidayListAPIView(ListAPIView):
# queryset = AC... | bsd-3-clause | -4,229,287,150,021,772,300 | 32.136986 | 95 | 0.582885 | false | 4.1 | false | false | false |
morucci/repoxplorer | repoxplorer/controllers/metadata.py | 1 | 1669 | # Copyright 2017, Fabien Boucher
# Copyright 2017, Red Hat
#
# 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 appli... | apache-2.0 | 9,083,070,565,232,355,000 | 34.510638 | 75 | 0.680048 | false | 3.87239 | false | false | false |
google/edward2 | edward2/tensorflow/generated_random_variables.py | 1 | 3046 | # coding=utf-8
# Copyright 2021 The Edward2 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 o... | apache-2.0 | 7,178,639,709,417,940,000 | 32.108696 | 87 | 0.671044 | false | 4.061333 | false | false | false |
twhyntie/tasl-data-management | ann_to_ori.py | 1 | 4195 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
MoEDAL and CERN@school - ANN -> ORI.
See the README.md file and the GitHub wiki for more information.
http://cernatschool.web.cern.ch
"""
# Import the code needed to manage files.
import os, glob
#...for parsing the arguments.
import argparse
#...for the logg... | mit | -1,542,262,857,198,386,200 | 31.022901 | 133 | 0.545411 | false | 3.555085 | false | false | false |
mhcrnl/PmwTkEx | java2s/bestway.py | 1 | 1580 | import Tkinter as tk
from alarm import Alarm
class Demo1:
def __init__(self, master):
self.master= master
self.frame= tk.Frame(self.master)
self.button1=tk.Button(self.frame, text="new WIndow", width=25,
command=self.new_window)
self.button1.pack()
... | apache-2.0 | 6,828,671,468,090,991,000 | 27.214286 | 71 | 0.558861 | false | 3.534676 | false | false | false |
SIDDHARTH-SRIVASTAVA/cookiecutter_demo | config/urls.py | 1 | 1239 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic import TemplateView
urlpatterns = [
url(r'^$', TemplateView.as_view(templ... | bsd-3-clause | 3,073,614,984,067,249,700 | 35.441176 | 91 | 0.682809 | false | 3.676558 | false | true | false |
simpleai-team/simpleai | simpleai/environments.py | 1 | 1821 | # -*- coding: utf-8 -*-
class Environment(object):
def __init__(self, agents, initial_state):
self.agents = agents
self.initial_state = initial_state
self.state = initial_state
def run(self, steps=10000, viewer=None):
self.state = self.initial_state
for step in range(... | mit | -2,535,582,616,593,432,000 | 32.109091 | 105 | 0.607908 | false | 4.176606 | false | false | false |
landryb/psutil | psutil/_pslinux.py | 1 | 40764 | #!/usr/bin/env python
# Copyright (c) 2009, Giampaolo Rodola'. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Linux platform implementation."""
from __future__ import division
import base64
import errno
import functools
import os
import ... | bsd-3-clause | -3,912,702,703,387,849,000 | 36.058182 | 79 | 0.513002 | false | 3.984361 | false | false | false |
andrew-lundgren/gwpy | gwpy/plotter/gps.py | 1 | 12444 | # -*- coding: utf-8 -*-
# Copyright (C) Duncan Macleod (2013)
#
# This file is part of GWpy.
#
# GWpy 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 | -3,410,339,135,117,639,700 | 32.184 | 78 | 0.560029 | false | 3.970645 | false | false | false |
nachocano/asml | src/asml/stream/file.py | 1 | 1246 | import gzip
import itertools
from asml.network.registry import RegistryClient
from asml.network.stream import StreamClient
from asml.autogen.services.ttypes import ComponentType
from asml.parser.factory import ParserFactory
class FileStream:
def __init__(self, module_properties):
self._path = module_properties['... | bsd-2-clause | 595,372,818,678,393,700 | 34.628571 | 84 | 0.707865 | false | 3.741742 | false | false | false |
shengqh/ngsperl | lib/SmallRNA/shortReadSource.py | 1 | 7216 | import argparse
import sys
import logging
import os
import csv
class ReadItem:
def __init__(self, sequence):
self.Sequence = sequence
self.TotalCount = 0
self.SampleMap = {}
class AnnotationItem:
def __init__(self, sequence, category):
self.Sequence = sequence
self.TotalCount = 0
self.Cate... | apache-2.0 | -32,105,371,650,366,696 | 40.953488 | 231 | 0.643847 | false | 3.581141 | false | false | false |
davikrehalt/WGAN-mod | LGNN.py | 1 | 7206 | from __future__ import print_function,division
import numpy as np
import six.moves.cPickle as pickle
import theano
import theano.tensor as T
from theano.tensor.nnet import conv2d
from ops import tmax,tmin,tbox
from optimize import rmsprop,sgd
from theano.tensor.shared_randomstreams import RandomStreams
from lmlp import... | mit | -3,272,632,604,160,528,000 | 33.811594 | 104 | 0.524008 | false | 3.499757 | false | false | false |
fuxprojesi/scom | api/scom/__init__.py | 1 | 8876 | #!/usr/bin/env python3
# -*- coding:utf-8 -*-
#
# Copyright (C) 2006-2009, TUBITAK/UEKAE
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) ... | gpl-3.0 | 5,917,463,265,078,946,000 | 42.087379 | 209 | 0.554304 | false | 4.224655 | false | false | false |
Nexedi/neoppod | neo/tests/stat_zodb.py | 1 | 5924 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import math, random, sys
from cStringIO import StringIO
from ZODB.utils import p64, u64
from ZODB.BaseStorage import TransactionRecord
from ZODB.FileStorage import FileStorage
# Stats of a 43.5 GB production Data.fs
# µ σ
# size of ob... | gpl-2.0 | 4,795,595,070,822,774,000 | 36 | 74 | 0.499493 | false | 3.802184 | false | false | false |
dmccloskey/SBaaS_resequencing | SBaaS_resequencing/stage01_resequencing_coverage_postgresql_models.py | 1 | 22272 | from SBaaS_base.postgresql_orm_base import *
class data_stage01_resequencing_coverage(Base):
__tablename__ = 'data_stage01_resequencing_coverage'
id = Column(Integer, Sequence('data_stage01_resequencing_coverage_id_seq'), primary_key=True)
#analysis_id = Column(String(500))
experiment_id = Column(... | mit | 4,372,799,767,990,308,000 | 38.844365 | 150 | 0.592807 | false | 3.441286 | false | false | false |
Litterman/EZClimate | ezclimate/storage_tree.py | 1 | 14568 | import numpy as np
from abc import ABCMeta, abstractmethod
class BaseStorageTree(object, metaclass=ABCMeta):
"""Abstract storage class for the EZ-Climate model.
Parameters
----------
decision_times : ndarray or list
array of years from start where decisions about mitigation levels are done
... | mit | -5,740,833,807,873,182,000 | 31.017582 | 106 | 0.531439 | false | 4.406534 | false | false | false |
Radmor/med_search | src/auth_ex/models.py | 1 | 3347 | from django.db import models
from django.contrib.auth.models import (AbstractBaseUser, BaseUserManager,
PermissionsMixin)
from django.utils import timezone
from django.utils.translation import ugettext_lazy as _
from django.core.mail import send_mail
class UserManager(B... | mit | 8,102,120,660,992,061,000 | 32.153061 | 78 | 0.591276 | false | 4.269133 | false | false | false |
F5Networks/f5-openstack-agent | f5_openstack_agent/lbaasv2/drivers/bigip/test/test_listener_services.py | 1 | 26417 | #!/usr/bin/env python
# Copyright (c) 2017,2018, F5 Networks, 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 app... | apache-2.0 | 5,955,353,809,390,750,000 | 41.402889 | 79 | 0.596207 | false | 4.096294 | true | false | false |
MatthewShao/mitmproxy | mitmproxy/flow.py | 1 | 4943 | import time
import typing # noqa
import uuid
from mitmproxy import connections
from mitmproxy import controller, exceptions # noqa
from mitmproxy import stateobject
from mitmproxy import version
class Error(stateobject.StateObject):
"""
An Error.
This is distinct from an protocol error respon... | mit | -712,453,570,105,986,000 | 26.159341 | 88 | 0.566053 | false | 4.355066 | false | false | false |
buddyli/android_intership | controller/order_oper.py | 1 | 1980 | #!/usr/bin/env python
#-*- encoding:utf-8 -*-
from bottle import route, mako_template as template, redirect, request, response, get, post
from bottle import static_file, view #为了不经过controller直接返回诸如html,css等静态文件引入
from model.documents import *
from setting import *
DATE_FORMAT = '%Y-%m-%d %H:%M:%S' # 入库格式化时间
@post('/... | apache-2.0 | -9,172,087,376,719,491,000 | 27.313433 | 91 | 0.699895 | false | 2.817236 | false | false | false |
paramsingh/listenbrainz-server | listenbrainz/webserver/views/api_tools.py | 1 | 14036 | import listenbrainz.webserver.rabbitmq_connection as rabbitmq_connection
import listenbrainz.webserver.redis_connection as redis_connection
import pika
import pika.exceptions
import sys
import time
import ujson
import uuid
from flask import current_app
from listenbrainz.listen import Listen
from listenbrainz.webserver... | gpl-2.0 | 3,013,694,120,402,643,000 | 39.449568 | 123 | 0.632801 | false | 3.856044 | false | false | false |
silentsee/blog | www/sae/taskqueue.py | 1 | 5945 | #!/usr/bin/env python
# -*-coding: utf8 -*-
"""Task Queue API
TaskQueue is a distributed task queue service provided by SAE for developers as
a simple way to execute asynchronous user tasks.
Example:
1. Add a GET task.
from sae.taskqueue import Task, TaskQueue
queue = TaskQueue('queue_name')
queue.... | gpl-2.0 | -2,218,251,079,284,938,000 | 28.285714 | 80 | 0.585198 | false | 3.942308 | false | false | false |
veltri/DLV2 | tests/parser/blocksworld-leone.test.py | 1 | 6083 | input = """
% invocation:
% dlv <name of this file> <problem instance> -silent -N=k -pfilter=move
%
% where
% <problem instance> is the file which contains the specification of the
% planning problem (i.e. initial state and goal state)
% -silent suppresses various version informat... | apache-2.0 | 1,593,773,574,213,591,600 | 27.548544 | 75 | 0.620582 | false | 2.996552 | false | false | false |
sergey-dryabzhinsky/dedupsqlfs | dedupsqlfs/db/mysql/table/tmp_id_count.py | 1 | 1793 | # -*- coding: utf8 -*-
__author__ = 'sergey'
from dedupsqlfs.db.mysql.table import Table
class TableTmpIdCount( Table ):
_engine = "MEMORY"
_table_name = "tmp_id_count"
def create( self ):
c = self.getCursor()
# Create table
c.execute(
"CREATE TABLE IF NOT EXISTS `... | mit | -1,683,537,798,874,675,700 | 21.135802 | 65 | 0.427775 | false | 3.906318 | false | false | false |
SilverBlogTeam/SilverBlog | upgrade/upgrade_from_3.py | 1 | 2450 | if __name__ == '__main__':
print("The upgrade script has changed. You need to execute the upgrade command again to update the data structure.")
exit(0)
import hashlib
import hmac
import json
import tarfile
import time
import uuid
import os
from common import file
def add_page_id(list_item):
list_item["u... | bsd-3-clause | 2,824,646,979,222,521,000 | 34.014286 | 120 | 0.630204 | false | 3.315291 | true | false | false |
Azure/azure-sdk-for-python | sdk/network/azure-mgmt-network/azure/mgmt/network/v2018_02_01/aio/operations/_inbound_nat_rules_operations.py | 1 | 22156 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may ... | mit | 2,369,471,168,192,281,000 | 50.050691 | 232 | 0.649982 | false | 4.227438 | true | false | false |
beilunyang/someCrawlers | dmzj_noimages/crawler_scrapy/spiders/new_comic.py | 1 | 2232 | # -*- coding: utf-8 -*-
import scrapy
import json
from scrapy.http.request import Request
from crawler_scrapy.items import ComicItem, ChapterItem
class NewComicSpider(scrapy.Spider):
name = "new_comic"
allowed_domains = ["v2.api.dmzj.com"]
start_urls = ['http://v2.api.dmzj.com/latest/100/%d.json?channel=i... | mit | 8,639,724,893,511,159,000 | 48.488889 | 252 | 0.591195 | false | 3.292899 | false | false | false |
zetaops/ulakbus | ulakbus/views/personel/gorevlendirme.py | 1 | 11363 | # -*- coding: utf-8 -*-
# Copyright (C) 2015 ZetaOps Inc.
#
# This file is licensed under the GNU General Public License v3
# (GPLv3). See LICENSE.txt for details.
#
"""
Görevlendirme
İki tür görevlendirme vardır.
- Kurum içi görevlendirme
- Kurum dışı görevlendirme
Bu iş akışı CrudView nesnesi... | gpl-3.0 | -7,893,549,455,030,729,000 | 37.851724 | 100 | 0.602201 | false | 2.840898 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.