repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
tulip-control/tulip-control | tulip/spec/gr1_fragment.py | 1 | 12733 | # Copyright (c) 2014, 2015 by California Institute of Technology
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice... | bsd-3-clause | 5,294,373,099,274,297,000 | 25.75 | 74 | 0.515432 | false |
prheenan/appm_project_2 | util.py | 1 | 2469 | from collections import Counter
import numpy as np
def getKmers(string,kV):
return [ string[i:i+kV] for i in range(0,len(string)-kV+1)]
def getCounters(seqs,kmer,goodIdx):
working = seqs[goodIdx]
# transform the dna into their kmers. Use a counter structure,
# which is much faster. it stored the uniq... | gpl-2.0 | -73,361,183,659,191,330 | 49.387755 | 80 | 0.701499 | false |
Ale-/civics | apps/models/migrations/0034_auto_20180110_1120.py | 1 | 1405 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2018-01-10 11:20
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('models', '0033_auto_20170927_1158'),
]
operations = [
migrations.AlterField... | gpl-3.0 | 3,779,511,904,885,897,700 | 55.2 | 451 | 0.641281 | false |
pseudo-cluster/pseudo-cluster | scripts/pseudo_cluster/statistics_analyzer.py | 1 | 3861 | # -*- coding: utf-8 -*-
import imp
import sys
import gettext
import tasks_list
import metrics
import statistics_plotter
def metric_module_import(metric_name):
"""
импортирует модуль, который
обеспечивает работу с метрикой.
"""
try:
#module=importlib("metrics.metric_"+metric_name)
... | lgpl-2.1 | -5,190,198,796,681,979,000 | 24.875969 | 90 | 0.561714 | false |
poldracklab/mriqc | mriqc/bin/labeler.py | 1 | 2466 | #!/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: dbirman
# @Date: 2017-06-14 16:51:24
import sys
import csv
import random
import webbrowser
import os
import numpy as np
# other functions
def n... | bsd-3-clause | -8,241,332,631,539,309,000 | 28.357143 | 73 | 0.505677 | false |
AnhellO/DAS_Sistemas | Ago-Dic-2018/Max/Proyecto Final/Proyect/SqlCrudApi.py | 1 | 1826 | import sqlite3
from ApiClientes import *
from AbstractClassBuilders import *
import sys
#Autor y programador - "Maximiliano García De Santiago"
class SqlCRUDCliente(AbstractProyectClient):
def __init__(self):
self.conexion = sqlite3.connect('ProyectTaco.db')
self.cursor = self.conexion.cursor()
... | mit | -7,079,638,936,153,485,000 | 35.5 | 113 | 0.640548 | false |
sivaprakashniet/push_pull | p2p/lib/python2.7/site-packages/compressor/js.py | 1 | 2297 | from compressor.conf import settings
from compressor.base import Compressor, SOURCE_HUNK, SOURCE_FILE
class JsCompressor(Compressor):
def __init__(self, content=None, output_prefix="js", context=None):
filters = list(settings.COMPRESS_JS_FILTERS)
super(JsCompressor, self).__init__(content, output... | bsd-3-clause | 1,391,676,831,852,386,600 | 43.173077 | 84 | 0.554201 | false |
SanketDG/networkx | networkx/generators/classic.py | 1 | 20233 | # Copyright (C) 2004-2016 by
# Aric Hagberg <hagberg@lanl.gov>
# Dan Schult <dschult@colgate.edu>
# Pieter Swart <swart@lanl.gov>
# All rights reserved.
# BSD license.
"""
Generators for some classic graphs.
The typical graph generator is called as follows:
>>> G=nx.complete_graph(100)
returning th... | bsd-3-clause | -8,570,287,125,214,788,000 | 30.762951 | 103 | 0.605348 | false |
geminy/aidear | oss/qt/qt-everywhere-opensource-src-5.9.0/qtwebengine/src/3rdparty/chromium/build/android/pylib/junit/test_runner.py | 1 | 2459 | # 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 json
import os
import tempfile
from devil.utils import cmd_helper
from pylib import constants
from pylib.results import json_results
class JavaTestR... | gpl-3.0 | 6,777,020,698,719,416,000 | 34.128571 | 77 | 0.631151 | false |
mwindau/praktikum | v351/dreieck.py | 1 | 1188 | import numpy as np
import matplotlib.pyplot as plt
from scipy.stats import linregress
from scipy.optimize import curve_fit
oberwelle3, amplitude3 = np.genfromtxt('Rohdaten/dreieckspannung.txt',unpack=True)
plt.plot(oberwelle3, amplitude3,'k.',label="Messdaten")
#plt.legend(loc='best')
plt.grid()
#plt.xlim(0,1.5)
plt.x... | mit | -2,929,432,997,929,991,700 | 28.7 | 84 | 0.644781 | false |
lmazuel/azure-sdk-for-python | azure-mgmt-network/azure/mgmt/network/v2017_08_01/operations/bgp_service_communities_operations.py | 1 | 4225 | # 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 ... | mit | 2,590,072,005,434,197,000 | 40.019417 | 144 | 0.621302 | false |
gajim/python-nbxmpp | nbxmpp/dispatcher.py | 1 | 19414 | # Copyright (C) 2019 Philipp Hörist <philipp AT hoerist.com>
#
# This file is part of nbxmpp.
#
# 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 opt... | gpl-3.0 | -1,560,585,998,823,393,800 | 35.836812 | 80 | 0.617164 | false |
jrief/django-angular | examples/server/tests/settings.py | 1 | 3584 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Django settings for unit test project."""
import os
DEBUG = True
BASE_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': ... | mit | 7,245,757,469,556,678,000 | 26.358779 | 95 | 0.618583 | false |
Lsquared13/nbproject | apps/base/jobs.py | 1 | 19665 | """
jobs.py - base notification routines
Author
Sacha Zyto <sacha@csail.mit.edu>
License
Copyright (c) 2010-2012 Massachusetts Institute of Technology.
MIT License (cf. MIT-LICENSE.txt or http://www.opensource.org/licenses/mit-license.php)
"""
import sys,os
import datetime
if "." not in sys.path:
sy... | mit | 6,079,882,337,130,975,000 | 44.520833 | 332 | 0.602288 | false |
clearcode/Apache2Piwik | src/daemons.py | 1 | 2900 | #-*- coding: utf-8 -*-
#!/usr/bin/env python
import sys, os, time, atexit
from signal import SIGTERM
from datetime import datetime
class Daemon:
"""
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
"""
def __init__(self, pidfile, stdin='/dev/null', stdout='/dev/null', std... | gpl-3.0 | 9,008,050,430,314,006,000 | 21.65625 | 104 | 0.627586 | false |
kevenli/scrapydd | docs/conf.py | 1 | 10111 | # -*- coding: utf-8 -*-
#
# scrapydd documentation build configuration file, created by
# sphinx-quickstart on Fri Oct 07 20:40:31 2016.
#
# 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 f... | apache-2.0 | 6,568,147,004,596,195,000 | 27.914201 | 80 | 0.668579 | false |
imatge-upc/saliency-2016-cvpr | shallow/train.py | 2 | 3064 | # add to kfkd.py
from lasagne import layers
from lasagne.updates import nesterov_momentum
from nolearn.lasagne import NeuralNet,BatchIterator
import os
import numpy as np
from sklearn.utils import shuffle
import cPickle as pickle
import matplotlib.pyplot as plt
import Image
import ImageOps
from scipy import misc
import... | mit | 8,471,191,426,663,251,000 | 29.65 | 75 | 0.618146 | false |
shakhat/act | act/engine/core.py | 1 | 7144 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the ... | apache-2.0 | 2,786,492,634,673,216,500 | 31.035874 | 79 | 0.601204 | false |
LTD-Beget/sprutio-rpc | lib/FileManager/workers/sftp/newFile.py | 1 | 1671 | import traceback
from lib.FileManager.workers.baseWorkerCustomer import BaseWorkerCustomer
class NewFile(BaseWorkerCustomer):
def __init__(self, path, session, *args, **kwargs):
super(NewFile, self).__init__(*args, **kwargs)
self.path = path
self.session = session
def run(self):
... | gpl-3.0 | -242,218,982,691,148,300 | 27.810345 | 82 | 0.453022 | false |
puruckertom/poptox | poptox/yulefurry/yulefurry_qaqc.py | 1 | 1396 | import os
os.environ['DJANGO_SETTINGS_MODULE']='settings'
import webapp2 as webapp
from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext.webapp import template
import numpy as np
import cgi
import cgitb
cgitb.enable()
class yulefurryQaqcPage(webapp.RequestHandler):
de... | unlicense | -3,085,296,245,817,376,000 | 41.30303 | 130 | 0.644699 | false |
bruno314/invenio-logging-old | tests/test_invenio_logging.py | 1 | 3090 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 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 of the
# License, or (at your option) any later... | gpl-2.0 | 7,354,676,479,513,615,000 | 31.87234 | 76 | 0.695793 | false |
vintasoftware/django-role-permissions | rolepermissions/tests/test_permissions.py | 1 | 2083 |
from django.test import TestCase
from rolepermissions.permissions import PermissionsManager, register_object_checker
from rolepermissions.exceptions import CheckerNotRegistered
class PermissionsManagerTests(TestCase):
def setUp(self):
PermissionsManager._checkers = {}
def test_register_checker(sel... | mit | -6,690,189,356,474,356,000 | 28.338028 | 83 | 0.665386 | false |
chankeypathak/pandas-matplotlib-examples | Lesson 9/export.py | 1 | 1179 | import pandas as pd
from sqlalchemy import create_engine, MetaData, Table, select
# Parameters
TableName = "data"
DB = {
'drivername': 'mssql+pyodbc',
'servername': 'DAVID-THINK',
#'port': '5432',
#'username': 'lynn',
#'password': '',
'database': 'BizIntel',
'driver': 'SQL Server Native Cl... | mit | -935,512,419,466,732,800 | 24.630435 | 233 | 0.667515 | false |
yasoob/PythonRSSReader | venv/lib/python2.7/dist-packages/reportlab/platypus/tableofcontents.py | 1 | 20681 | #Copyright ReportLab Europe Ltd. 2000-2012
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/platypus/tableofcontents.py
__version__=''' $Id$ '''
__doc__="""Experimental class to generate Tables of Contents easily
This module defines a single... | mit | 9,047,814,194,291,099,000 | 36.263063 | 123 | 0.612301 | false |
gpersistence/tstop | python/persistence/PartitionData.py | 1 | 8153 | #TSTOP
#
#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 it will be useful,
... | gpl-3.0 | -7,683,746,952,758,535,000 | 45.062147 | 149 | 0.591316 | false |
clems71/pogle | pogle/pogle_scene.py | 1 | 3346 | from pogle_math import Vector, Matrix4x4, Transform
__author__ = 'Clement JACOB'
__copyright__ = "Copyright 2013, The Python OpenGL Engine"
__license__ = "Closed Source"
__version__ = "0.0.1"
__email__ = "clems71@gmail.com"
__status__ = "Prototype"
class Light(object):
def __init__(self, pos=Vector(0.0, 0.... | mit | -1,040,859,930,358,757,000 | 23.348485 | 70 | 0.646742 | false |
simvisage/oricreate | docs/howtos/ex04_cp_operators/cp_F_L_bases.py | 1 | 1043 | r'''
This example demonstrates the crease pattern factory usage
for Yoshimura crease pattern.
'''
def create_cp():
# begin
from oricreate.api import CreasePatternState
import numpy as np
x = np.array([[0, 0, 0],
[1, 0, 0],
[1, 1, 0],
[2, 1, 0]
... | gpl-3.0 | 4,943,180,609,816,301,000 | 20.285714 | 83 | 0.442953 | false |
noelevans/sandpit | kaggle/washington_bike_share/knn_normalising.py | 1 | 3166 | import datetime
import logging
import math
import random
import pandas as pd
logging.basicConfig(level=logging.INFO)
INPUT_FIELDS = ('holiday', 'workingday', 'temp', 'atemp', 'humidity',
'windspeed', 'hour', 'day_of_year', 'day_of_week')
PERIODICS = ('hour', 'day_of_year', 'day_of_week')
RESULT_FIE... | mit | -3,425,526,139,016,828,400 | 29.442308 | 75 | 0.588756 | false |
jtmorgan/hostbot | top_1000_report.py | 1 | 10578 | #! /usr/bin/env python
from datetime import datetime, timedelta
import hb_config
import json
import pandas as pd
import requests
from requests_oauthlib import OAuth1
from urllib import parse
rt_header = """== Popular articles {date7} to {date1} ==
Last updated on ~~~~~
{{| class="wikitable sortable"
!Rank
!Article
!... | mit | 5,012,765,643,669,133,000 | 34.142857 | 175 | 0.615995 | false |
jiumutazhao/Flask-web-Development | app/models.py | 1 | 1264 | from werkzeug.security import generate_password_hash, check_password_hash
from flask_login import UserMixin
from . import db, login_manager
class Role(db.Model):
__tablename__ = 'roles'
id = db.Column(db.Integer, primary_key=True)
name = db.Column(db.String(64), unique=True)
users = db.relationship('U... | mit | -3,055,430,380,938,680,300 | 29.829268 | 73 | 0.670886 | false |
capitalone/cloud-custodian | tests/test_simpledb.py | 1 | 1242 | # Copyright 2016-2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .common import BaseTest
class SimpleDB(BaseTest):
def test_delete(self):
session_factory = self.replay_flight_data("test_simpledb_delete")
p = self.load_policy(
... | apache-2.0 | -63,497,599,464,242,650 | 35.529412 | 88 | 0.597424 | false |
messagebird/python-rest-api | examples/voice_recording_view.py | 1 | 1148 | #!/usr/bin/env python
import messagebird
import argparse
parser = argparse.ArgumentParser()
parser.add_argument('--accessKey', help='access key for MessageBird API', type=str, required=True)
parser.add_argument('--callID', help='identifier for the call', type=str, required=True)
parser.add_argument('--legID', help='id... | bsd-2-clause | -3,881,190,602,902,138,400 | 41.518519 | 129 | 0.711672 | false |
mooniak/animager | src/genImages.py | 1 | 1174 | ### generate temporary images using GIT commits
### dependencies : imagemagick
import os
def genTempImage( gitImage, options,
outputName, outputExt, outputDir ):
os.system( 'convert ' + gitImage
+ ' ' + options
+ ' ' + outputDir
+ outputName
... | gpl-3.0 | 5,966,616,931,851,195,000 | 23.458333 | 58 | 0.540034 | false |
hlerebours/lambda-calculus | lambdax/builtins_as_lambdas.py | 1 | 2296 | """ Expose most of the built-in functions and classes but suffixed with '_λ'
and to be only used in λ-abstractions.
See module `lambdax.builtins_overridden` to keep built-in names and have a mixed behavior,
working as expected both inside and outside λ-abstractions.
"""
import builtins
from lambdax.lambda_calculus im... | mit | -7,297,818,430,264,190,000 | 23.885057 | 90 | 0.68545 | false |
nico202/pyNeMo | WorkerInit.py | 1 | 3502 | #!/usr/bin/env python2
# A worker. Waits for incoming connection on port 10666
# When data are received, process them, and sends back to host (using requests), port 10665
import web #Listen for requests
from libs.web import ip_port, get_self_ip
web.config.debug = False
import requests #Answer to requests when data ... | gpl-2.0 | 8,055,584,451,425,202,000 | 27.942149 | 91 | 0.603941 | false |
lowrie/pyRouterJig | doc.py | 1 | 6098 | ###########################################################################
#
# Copyright 2015-2018 Robert B. Lowrie (http://github.com/lowrie)
#
# This file is part of pyRouterJig.
#
# pyRouterJig is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as publishe... | gpl-3.0 | -1,898,152,790,131,745,800 | 38.597403 | 99 | 0.599213 | false |
tadashi-aikawa/gemini | jumeaux/addons/judgement/same.py | 1 | 1698 | # -*- coding:utf-8 -*-
from owlmixin import OwlMixin, TList, TOption
from jumeaux.addons.judgement import JudgementExecutor
from jumeaux.addons.utils import when_filter
from jumeaux.logger import Logger
from jumeaux.models import JudgementAddOnPayload, JudgementAddOnReference
logger: Logger = Logger(__name__)
LOG_PR... | mit | -295,817,957,404,683,650 | 31.037736 | 112 | 0.616019 | false |
lisael/pg-django | django/test/simple.py | 1 | 16207 | import unittest as real_unittest
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured
from django.db.models import get_app, get_apps
from django.db.models.loading import unregister_app
from django.test import _doctest as doctest
from django.test.utils import setup_test_environment, ... | bsd-3-clause | 1,539,561,326,131,842,300 | 37.405213 | 85 | 0.58302 | false |
thunderhoser/GewitterGefahr | gewittergefahr/scripts/run_bwo_for_swirlnet.py | 1 | 11719 | """Runs backwards optimization on Swirlnet model."""
import os
os.environ['CUDA_VISIBLE_DEVICES'] = '-1'
import argparse
import numpy
from keras import backend as K
from keras.models import load_model as load_keras_model
from gewittergefahr.deep_learning import model_interpretation
from gewittergefahr.deep_learning im... | mit | 1,711,039,602,653,496,800 | 35.736677 | 80 | 0.689564 | false |
caterzy/JackPlayer | TFTest/TFSaver_Meta.py | 1 | 1116 | # This Python file uses the following encoding: utf-8
__author__ = 'JackRao'
import tensorflow as tf
import os
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("MNIST_data", one_hot=True)
x = tf.placeholder(tf.float32, [None, 784])
W = tf.Variable(tf.zeros([784, 10]))
b =... | gpl-2.0 | -7,533,435,100,495,418,000 | 19.290909 | 85 | 0.689068 | false |
smurfix/HomEvenT | irrigation/rainman/models/__init__.py | 1 | 2120 | # -*- coding: utf-8 -*-
## Copyright © 2012, Matthias Urlichs <matthias@urlichs.de>
##
## 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 op... | gpl-3.0 | -4,067,155,495,434,519,000 | 32.046875 | 76 | 0.738534 | false |
khosrow/metpx | sarracenia/sarra/plugins/msg_sundew_pxroute.py | 1 | 2902 | #!/usr/bin/env python3
"""
Implement message filtering based on a routing table from MetPX-Sundew.
Make it easier to feed clients exactly the same products with sarracenia,
that they are used to with sundew.
the pxrouting option must be set in the configuration before the on_message
plugin is configured, ... | gpl-2.0 | 3,273,675,148,913,927,000 | 30.204301 | 140 | 0.55858 | false |
jonlooney/jxmlease | jxmlease/_parsehandler.py | 1 | 8605 | #!/usr/bin/env python
# Copyright (c) 2015-2016, Juniper Networks, Inc.
# All rights reserved.
#
# Copyright (C) 2012 Martin Blech and individual contributors.
#
# See the LICENSE file for further information.
"""Internal module that provides a common parsing handler."""
from __future__ import absolute_import
from . i... | mit | 2,954,703,883,913,370,600 | 36.907489 | 103 | 0.554794 | false |
klahnakoski/TestFailures | pyLibrary/queries/containers/list_usingSQLite.py | 1 | 85283 | # encoding: utf-8
#
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
# You can obtain one at http:# mozilla.org/MPL/2.0/.
#
# Author: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import
from _... | mpl-2.0 | 4,033,195,535,351,466,000 | 40.784909 | 176 | 0.464723 | false |
ThomasZh/legend-club-wxpub | foo/wx/xml_parser.py | 1 | 5757 | #!/usr/bin/env python
# _*_ coding: utf-8_*_
#
# Copyright 2016 planc2c.com
# thomas@time2box.com
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENS... | apache-2.0 | 1,821,320,544,877,225,200 | 30.201087 | 77 | 0.62463 | false |
edx/django-oauth2-provider | provider/oauth2/views.py | 1 | 6130 | from datetime import timedelta
import json
from django.core.exceptions import ObjectDoesNotExist
from django.http import HttpResponseBadRequest, HttpResponse
from django.urls import reverse
from django.views.generic import View
from provider import constants
from provider.oauth2.backends import BasicClientBackend, Re... | mit | -625,130,853,008,770,000 | 32.135135 | 119 | 0.648613 | false |
evertonaleixo/tarp | DeepLearning/deep-belief-network-example.py | 1 | 1185 | # coding=utf-8
from sklearn.datasets import load_digits
from sklearn.cross_validation import train_test_split
from sklearn.metrics.classification import accuracy_score
import numpy as np
from dbn import SupervisedDBNClassification
# Loading dataset
digits = load_digits()
X, Y = digits.data, digits.target
# Data sc... | apache-2.0 | 2,470,950,482,094,414,000 | 31.054054 | 88 | 0.546835 | false |
myarjunar/QGIS | python/plugins/processing/gui/ExtentSelectionPanel.py | 1 | 5956 | # -*- coding: utf-8 -*-
"""
***************************************************************************
ExtentSelectionPanel.py
---------------------
Date : August 2012
Copyright : (C) 2012 by Victor Olaya
Email : volayaf at gmail dot com
******************... | gpl-2.0 | -4,447,152,058,114,931,000 | 36.696203 | 183 | 0.55591 | false |
sileht/deb-openstack-keystone | keystone/service.py | 1 | 21260 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2012 OpenStack 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 requ... | apache-2.0 | 5,537,444,960,676,364,000 | 35.973913 | 79 | 0.522531 | false |
iagcl/data_pipeline | tests/stream/test_json_oracle.py | 1 | 3105 | # 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
# "License"); you may not u... | apache-2.0 | 586,250,750,368,489,200 | 31.34375 | 62 | 0.625765 | false |
tpbarron/rlflow | rlflow/memories/experience_replay.py | 1 | 1772 | import collections
import random
import numpy as np
class ExperienceReplay(object):
SARS = collections.namedtuple('SARS', ['S1', 'A', 'R', 'S2', 'T'])
def __init__(self, state_shape=(1,), max_size=1000000):
self.max_size = max_size
self.cur_size = 0
self.next_ind = 0
self.S1 ... | mit | 386,739,578,009,887,200 | 26.6875 | 88 | 0.538375 | false |
it-projects-llc/misc-addons | odoo_backup_sh/models/res_config_settings.py | 1 | 2915 | # Copyright 2019 Dinar Gabbasov <https://it-projects.info/team/GabbasovDinar>
# Copyright 2019 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# License MIT (https://opensource.org/licenses/MIT).
from odoo import api, fields, models
class ResConfigSettings(models.TransientModel):
_inherit = "res.confi... | mit | -2,913,228,378,701,176,300 | 38.931507 | 109 | 0.625729 | false |
hoogamaphone/chromathicity | chromathicity/rgbspec.py | 1 | 3461 | import numpy as np
import chromathicity.defaults
from chromathicity.illuminant import D
from chromathicity.interfaces import RgbSpecification, Compander
from chromathicity.observer import Standard
from chromathicity.util import SetGet
class Custom(RgbSpecification, SetGet):
def __init__(self, **kwargs):
... | bsd-3-clause | -7,693,280,348,599,285,000 | 24.448529 | 80 | 0.568044 | false |
simbuerg/benchbuild | benchbuild/projects/gentoo/crafty.py | 1 | 3254 | """
crafty experiment within gentoo chroot.
"""
from benchbuild.utils.wrapping import wrap_in_uchroot as wrap
from benchbuild.projects.gentoo.gentoo import GentooGroup
from benchbuild.utils.downloader import Wget
from benchbuild.utils.run import run, uchroot
from benchbuild.utils.cmd import cat # pylint: disable=E040... | mit | 1,196,145,929,835,746,300 | 26.576271 | 71 | 0.741856 | false |
monkut/deso | deso/deso/layers/vector/management/commands/load_geojson_layers.py | 1 | 1694 | """
Load GEOJSON text files from a given directory to individua vector.GeoJsonLayer models
"""
import os
from django.core.management.base import BaseCommand, CommandError
from ...models import GeoJsonLayer
WGS84_SRID = 4326
def load_geojson_layer(geojson_filepath):
with open(geojson_filepath, "rt", encoding="u... | mit | -3,164,741,114,438,295,000 | 35.042553 | 125 | 0.625148 | false |
hgarrereyn/Th3g3ntl3man-CTF-Writeups | 2017/picoCTF_2017/problems/cryptography/weirderRSA/solution.py | 1 | 1411 | import binascii
import string
e = 65537
N = 2117672903243982543718682316871526252711806457547609454030889520203949724574698058235821747613875519920176501328068871432817438393885435762043247829203062605160245553645158838861106558077244590404583160688904474995478819140425202290013963177624041695727533599660346969550... | gpl-3.0 | -4,545,911,141,888,952,300 | 37.194444 | 313 | 0.742027 | false |
hanak/artshow-keeper | artshowkeeper/model/currency.py | 1 | 4797 | # Artshow Keeper: A support tool for keeping an Artshow running.
# Copyright (C) 2014 Ivo Hanak
#
# 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... | gpl-3.0 | 8,395,901,954,743,408,000 | 40 | 144 | 0.65124 | false |
SRabbelier/Melange | app/soc/logic/helper/notifications.py | 1 | 13100 | #!/usr/bin/env python2.5
#
# Copyright 2008 the Melange 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 applic... | apache-2.0 | -5,322,021,036,280,647,000 | 29.536131 | 81 | 0.694351 | false |
walty8/trac | trac/wiki/web_ui.py | 1 | 35037 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2003-2009 Edgewall Software
# Copyright (C) 2003-2005 Jonas Borgström <jonas@edgewall.com>
# Copyright (C) 2004-2005 Christopher Lenz <cmlenz@gmx.de>
# All rights reserved.
#
# This software is licensed as described in the file COPYING, which
# you should have received as part ... | bsd-3-clause | -1,836,611,348,143,104,500 | 40.857826 | 79 | 0.524104 | false |
spiiph/owls-hep | owls_hep/counting.py | 1 | 2022 | """Provides method for efficiently counting events in a region.
"""
# System imports
from uuid import uuid4
# owls-cache imports
from owls_cache.persistent import cached as persistently_cached
# owls-parallel imports
from owls_parallel import parallelized
# owls-hep imports
from owls_hep.calculation import Calculat... | mit | -8,299,642,645,994,815,000 | 29.636364 | 77 | 0.692878 | false |
bioh4x/NeatFreq | lib/genometools-1.4.1/gtpython/gt/extended/feature_node.py | 1 | 8909 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (c) 2008-2009 Sascha Steinbiss <steinbiss@zbh.uni-hamburg.de>
# Copyright (c) 2008-2009 Center for Bioinformatics, University of Hamburg
#
# Permission to use, copy, modify, and distribute this software for any
# purpose with or without fee is hereby granted, prov... | gpl-2.0 | -4,252,604,974,979,989,000 | 33.937255 | 115 | 0.635649 | false |
ESOedX/edx-platform | lms/djangoapps/discussion/rest_api/tests/test_api.py | 1 | 128499 | """
Tests for Discussion API internal interface
"""
from __future__ import absolute_import
import itertools
from datetime import datetime, timedelta
import ddt
import httpretty
import mock
import six
from django.core.exceptions import ValidationError
from django.test.client import RequestFactory
from opaque_keys.edx.... | agpl-3.0 | -8,671,348,002,240,206,000 | 39.357726 | 120 | 0.569366 | false |
hansonrobotics/chatbot | src/chatbot/stats.py | 1 | 3618 | import os
import logging
import pandas as pd
import glob
import re
import datetime as dt
from collections import Counter
logger = logging.getLogger('hr.chatbot.stats')
trace_pattern = re.compile(
r'../(?P<fname>.*), (?P<tloc>\(.*\)), (?P<pname>.*), (?P<ploc>\(.*\))')
def collect_history_data(history_dir, days):
... | mit | -1,255,561,237,755,532,300 | 34.470588 | 83 | 0.588723 | false |
TravisDart/tictactoe | tictactoe.py | 1 | 1378 | import os
from pymongo import MongoClient
from TicTacToeBoard import TicTacToeBoard
from ProgressCounter import ProgressCounter
client = MongoClient(os.environ["MONGOLABURL"])
collection = client['test1']['one']
_ = TicTacToeBoard._
blankBoard = TicTacToeBoard([
_, _, _,
_, _, _,
_, _, _
])
collection.r... | mit | -5,079,004,841,275,323,000 | 28.956522 | 77 | 0.629898 | false |
onlinepcwizard/dms | dms/zone_data_util.py | 1 | 29679 | #!/usr/bin/env python3.2
#
# Copyright (c) Net24 Limited, Christchurch, New Zealand 2011-2012
# and Voyager Internet Ltd, New Zealand, 2012-2013
#
# This file is part of py-magcode-core.
#
# Py-magcode-core is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gener... | gpl-3.0 | -692,131,004,546,629,900 | 40.801408 | 81 | 0.552714 | false |
vericoin/vericoin-core | qa/rpc-tests/listtransactions.py | 1 | 4674 | #!/usr/bin/env python2
# Copyright (c) 2014 The VeriCoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
# Exercise the listtransactions API
from test_framework.test_framework import VeriCoinTestFramework
from tes... | mit | 7,286,924,921,281,016,000 | 46.693878 | 105 | 0.524176 | false |
OpusVL/odoo-bank-sort-code | bank_sort_code/__init__.py | 1 | 1266 | # -*- coding: utf-8 -*-
##############################################################################
#
# Add Bank Sort Code to banks in Odoo.
# Copyright (C) 2014 OpusVL
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# publishe... | agpl-3.0 | 6,126,309,342,511,737,000 | 37.363636 | 78 | 0.658768 | false |
tboyce021/home-assistant | homeassistant/components/meteo_france/const.py | 1 | 6603 | """Meteo-France component constants."""
from homeassistant.components.weather import (
ATTR_CONDITION_CLEAR_NIGHT,
ATTR_CONDITION_CLOUDY,
ATTR_CONDITION_EXCEPTIONAL,
ATTR_CONDITION_FOG,
ATTR_CONDITION_HAIL,
ATTR_CONDITION_LIGHTNING,
ATTR_CONDITION_LIGHTNING_RAINY,
ATTR_CONDITION_PARTLYC... | apache-2.0 | -6,364,485,210,408,952,000 | 29.086758 | 72 | 0.609045 | false |
barometz/shirk | plugs/Auth/auth.py | 1 | 3986 | # Copyright (c) 2012 Dominic van Berkel
# See LICENSE for details.
from plugs import plugbase
from util import Event
class AuthPlug(plugbase.Plug):
"""Auth plug. Handles auth stuffs."""
name = 'Auth'
# manual_auths is a dict of source:target that are created after !auth requests so they can be
# re... | mit | 3,471,746,846,731,021,300 | 41.414894 | 120 | 0.611139 | false |
pbsds/hatena-server | database/__init__.py | 1 | 5487 | from twisted.internet import reactor
import atexit, os
from Hatenatools import TMB
#The database handling flipnote files and info
#this one stores them in plaintext, only works with one server worker
class Database:
def __init__(self):
#read database stuff into memory:
if os.path.exists("database/new_flipnotes.da... | agpl-3.0 | 696,415,683,384,713,700 | 33.509434 | 185 | 0.677237 | false |
dave-shawley/ietfparse | tests/test_datastructure.py | 1 | 3585 | import unittest
from ietfparse.datastructures import ContentType
class ContentTypeCreationTests(unittest.TestCase):
def test_that_primary_type_is_normalized(self):
self.assertEqual('contenttype',
ContentType('COntentType', 'b').content_type)
def test_that_subtype_is_normaliz... | bsd-3-clause | -7,056,949,313,736,955,000 | 41.176471 | 79 | 0.580474 | false |
travisgoldie/Signal_iQ | python/test/scripts/hw_minigun.py | 1 | 2516 | #!/usr/bin/env python
###############################################################################
# vim: tabstop=4:shiftwidth=4:expandtab:
# Copyright (c) 2017 SIOS Technology Corp. All rights reserved.
##############################################################################
"""
This script will spray events ... | mit | 4,482,989,901,775,739,400 | 27.269663 | 103 | 0.507154 | false |
vlegoff/tsunami | src/secondaires/auberge/editeurs/aubedit/edt_chambres.py | 1 | 5517 | # -*-coding:Utf-8 -*
# Copyright (c) 2010-2017 LE GOFF Vincent
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# ... | bsd-3-clause | -1,597,203,890,525,881,600 | 38.496403 | 79 | 0.615483 | false |
NLHEALTHCARE/PYELT | tests/unit_tests_basic/test05_db_functions.py | 1 | 3894 | from pyelt.mappings.sor_to_dv_mappings import SorToEntityMapping
from tests.unit_tests_basic import _domainmodel, _db_functions, _db_functions2
from tests.unit_tests_basic._db_functions import CreateAgb
from tests.unit_tests_basic._domainmodel import Patient
from tests.unit_tests_basic._mappings import init_source_to_s... | gpl-3.0 | 3,349,879,639,583,261,000 | 37.176471 | 102 | 0.661787 | false |
EricssonResearch/calvin-base | calvin/actorstore/systemactors/web/LocationWeather.py | 1 | 2182 | # -*- coding: utf-8 -*-
# Copyright (c) 2016 Ericsson AB
#
# 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 ... | apache-2.0 | -7,400,427,946,568,921,000 | 28.093333 | 105 | 0.644821 | false |
chiamingyen/PythonCAD_py3 | Interface/cadwindow.py | 1 | 39067 | ############################################################################
#
# Copyright (C) 2004-2005 Trolltech AS. All rights reserved.
#
# This file is part of the example classes of the Qt Toolkit.
#
# This file may be used under the terms of the GNU General Public
# License version 2.0 as published by the Fr... | gpl-2.0 | -5,641,877,045,083,981,000 | 42.75 | 165 | 0.588392 | false |
BackupTheBerlios/pixies-svn | pixies/reportlab/lib/logger.py | 1 | 1712 | #!/bin/env python
#Copyright ReportLab Europe Ltd. 2000-2004
#see license.txt for license details
#history http://www.reportlab.co.uk/cgi-bin/viewcvs.cgi/public/reportlab/trunk/reportlab/lib/logger.py
__version__=''' $Id$ '''
from sys import stderr
class Logger:
'''
An extended file type thing initially equiva... | gpl-2.0 | 5,800,793,264,633,907,000 | 27.081967 | 102 | 0.57535 | false |
sobodash/libpirate | lib/pirromvboy.py | 1 | 9822 | '''
Virtual Boy ROM Object
A part of the libPirate (Python) library
Version: 0.2
Author: Derrick Sobodash <derrick@sobodash.com>
Copyright: (c) 2008, 2012 Derrick Sobodash
Web site: https://github.com/sobodash/libpirate/
License: BSD License <http://opensource.org/licenses/bsd-license.php>
'''
try:
import r... | bsd-2-clause | -4,857,034,011,556,433,000 | 39.586777 | 92 | 0.478518 | false |
HyperloopTeam/FullOpenMDAO | lib/python2.7/site-packages/traits-4.3.0-py2.7-macosx-10.10-x86_64.egg/traits/tests/test_event_order.py | 1 | 3111 | #-------------------------------------------------------------------------------
#
# Copyright (c) 2007, Enthought, Inc.
# All rights reserved.
#
# This Software is provided without warranty under the terms of the
# BSD
# license included in /LICENSE.txt and may be redistributed only
# under the conditions descri... | gpl-2.0 | -783,135,160,985,413,000 | 28.913462 | 80 | 0.560913 | false |
EdDev/vdsm | lib/vdsm/network/netlink/addr.py | 1 | 2889 | # Copyright 2014-2017 Red Hat, Inc.
#
# 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) any later version.
#
# This program is distributed in... | gpl-2.0 | -5,943,161,942,741,774,000 | 32.988235 | 79 | 0.676705 | false |
walterdejong/synctool | src/synctool/overlay.py | 1 | 12401 | #
# synctool.overlay.py WJ111
#
# synctool Copyright 2015 Walter de Jong <walter@heiho.net>
#
# synctool COMES WITH NO WARRANTY. synctool IS FREE SOFTWARE.
# synctool is distributed under terms described in the GNU General Public
# License.
#
'''synctool.overlay maps the repository onto the root directory... | gpl-2.0 | 5,453,835,366,179,226,000 | 30.797436 | 128 | 0.586162 | false |
opencivicdata/scrapers-ca | ca_ab_wood_buffalo/people.py | 1 | 2201 | from utils import CanadianScraper, CanadianPerson as Person
from collections import defaultdict
COUNCIL_PAGE = 'http://www.woodbuffalo.ab.ca/Municipal-Government/Mayor-and-Council/Councillor-Profiles.htm'
class WoodBuffaloPersonScraper(CanadianScraper):
def scrape(self):
seat_numbers = defaultdict(int)
... | mit | -7,673,551,670,735,821,000 | 36.948276 | 108 | 0.562472 | false |
pydanny/django-admin2 | example/blog/actions.py | 1 | 2110 | # -*- coding: utf-8 -*-
from __future__ import division, absolute_import, unicode_literals
from django.contrib import messages
from django.utils.translation import ugettext_lazy, pgettext_lazy
from djadmin2 import permissions
from djadmin2.actions import BaseListAction
class CustomPublishAction(BaseListAction):
... | bsd-3-clause | 7,824,903,097,759,814,000 | 27.513514 | 71 | 0.69763 | false |
honnibal/spaCy | examples/information_extraction/parse_subtrees.py | 1 | 2585 | #!/usr/bin/env python
# coding: utf8
"""This example shows how to navigate the parse tree including subtrees
attached to a word.
Based on issue #252:
"In the documents and tutorials the main thing I haven't found is
examples on how to break sentences down into small sub thoughts/chunks. The
noun_chunks is handy, but h... | mit | 2,849,168,478,364,642,000 | 37.58209 | 80 | 0.690135 | false |
bsmedberg/socorro | socorro/processor/processed_transform_rules.py | 1 | 9719 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
""""
these are the rules that transform a raw crash into a processed crash
"""
from socorro.lib.ver_tools import normal... | mpl-2.0 | -8,909,996,283,343,238,000 | 43.788018 | 80 | 0.529478 | false |
horazont/aioxmpp | aioxmpp/roster/xso.py | 1 | 4970 | ########################################################################
# File name: xso.py
# This file is part of: aioxmpp
#
# LICENSE
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
# published by the Free Software Foundation, ... | lgpl-3.0 | -7,759,817,304,836,727,000 | 24.228426 | 79 | 0.590543 | false |
rlworkgroup/metaworld | metaworld/envs/mujoco/sawyer_xyz/v2/sawyer_sweep_into_goal_v2.py | 1 | 7416 | import numpy as np
from gym.spaces import Box
from scipy.spatial.transform import Rotation
from metaworld.envs import reward_utils
from metaworld.envs.asset_path_utils import full_v2_path_for
from metaworld.envs.mujoco.sawyer_xyz.sawyer_xyz_env import SawyerXYZEnv, _assert_task_is_set
class SawyerSweepIntoGoalEnvV2(... | mit | 6,507,953,561,700,752,000 | 36.836735 | 101 | 0.557713 | false |
aguirreeng/libeng | math/rotations.py | 1 | 2992 | import numpy
def obtain_matrix_from_quaternion(q: numpy.ndarray) -> numpy.ndarray:
if q.size != 4:
raise ValueError('Wrong number of elements on the array (q.size != 4)!')
m = numpy.zeros((3, 3), dtype=numpy.float64)
m[0, 0] = 1.0 - 2.0 * q[2] * q[2] - 2.0 * q[3] * q[3]
m[0, 1] = 2.0... | mit | 1,305,943,808,670,423,800 | 28.222222 | 86 | 0.501337 | false |
tensorflow/models | official/nlp/data/tagging_data_lib.py | 1 | 15488 | # Copyright 2021 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 4,088,658,017,019,703,300 | 35.356808 | 80 | 0.61538 | false |
brodeau/aerobulk | python/plot_tests/plot_station_asf.py | 1 | 9926 | #!/usr/bin/env python
# -*- Mode: Python; coding: utf-8; indent-tabs-mode: nil; tab-width: 4 -*-
# Post-diagnostic of STATION_ASF / L. Brodeau, 2019
import sys
from os import path as path
#from string import replace
import math
import numpy as nmp
from netCDF4 import Dataset,num2date
import matplotlib as mpl
mpl.use... | gpl-3.0 | 1,078,130,155,410,216,300 | 38.388889 | 179 | 0.529619 | false |
florianfesti/boxes | boxes/generators/openbox.py | 1 | 1741 | #!/usr/bin/env python3
# Copyright (C) 2013-2014 Florian Festi
#
# 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.... | gpl-3.0 | 3,273,110,670,569,019,000 | 32.480769 | 82 | 0.629523 | false |
alexbruy/QGIS | python/plugins/processing/algs/qgis/Gridify.py | 1 | 7375 | # -*- coding: utf-8 -*-
"""
***************************************************************************
Gridify.py
---------------------
Date : May 2010
Copyright : (C) 2010 by Michael Minn
Email : pyqgis at michaelminn dot com
*****************************... | gpl-2.0 | 1,905,059,925,790,437,000 | 40.666667 | 101 | 0.511864 | false |
yencarnacion/jaikuengine | .google_appengine/lib/endpoints-1.0/endpoints/users_id_token.py | 2 | 17916 | #!/usr/bin/env python
#
# Copyright 2007 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 o... | apache-2.0 | -6,423,077,392,534,796,000 | 27.483307 | 79 | 0.676881 | false |
whatsbcn/shellforge4 | shellforge/shellforge/cpu_i386.py | 1 | 12307 | #############################################################################
## ##
## cpu_i386.py --- Classes for i386 CPUs ##
## see http://www.secdev.org/projects/shellforge/ ##
## ... | gpl-2.0 | -5,131,167,534,963,059,000 | 33.473389 | 295 | 0.387097 | false |
mortbauer/openfoam-extend-Breeder-other-scripting-PyFoam | PyFoam/Infrastructure/CTestRun.py | 1 | 41961 | # ICE Revision: $Id$
"""A wrapper to run a solver as a CTest"""
import sys
import os
from os import path
import subprocess
import shutil
import traceback
import inspect
from PyFoam.ThirdParty.six.moves import cPickle as pickle
import time
from PyFoam.Applications.CloneCase import CloneCase
from PyFoam.Applications... | gpl-2.0 | 4,049,442,938,798,094,300 | 36.666966 | 172 | 0.535307 | false |
yunli2004/OpenClos | jnpr/openclos/tests/unit/test_l3Clos.py | 1 | 20266 | '''
Created on Jul 22, 2014
@author: moloyc
'''
import os
import sys
sys.path.insert(0,os.path.abspath(os.path.dirname(__file__) + '/' + '../..')) #trick to make it run from CLI
import unittest
import shutil
from flexmock import flexmock
from jnpr.openclos.l3Clos import L3ClosMediation
from jnpr.openclos.model import... | apache-2.0 | 2,320,511,484,765,418,500 | 51.778646 | 192 | 0.6316 | false |
jhjguxin/PyCDC | Karrigell-2.3.5/Karrigell_GUI.py | 1 | 2316 | """Karrigell HTTP Server
Written by Pierre Quentel quentel.pierre@wanadoo.fr
Published under the BSD licence. See the file LICENCE.txt
This script launches Karrigell with webservers.SimpleAsyncHTTPServer.Server as web server.
It is built on the asyncore/asynchat framework (non-blocking sockets, use of
the select() f... | gpl-3.0 | 233,889,179,726,184,540 | 27.9625 | 92 | 0.733592 | false |
NicolasLM/sauna | sauna/scheduler.py | 1 | 3161 | import time
import fractions
from functools import reduce
from logging import getLogger
logger = getLogger(__name__)
class Scheduler:
def __init__(self, jobs):
"""
Create a new Scheduler.
>>> s = Scheduler([Job(1, max, 100, 200)])
>>> for jobs in s:
... time.sleep(s.t... | bsd-2-clause | 5,694,586,911,880,972,000 | 30.929293 | 74 | 0.540335 | false |
vitorio/pygrow | grow/deployments/stats/stats.py | 1 | 1214 | import collections
import os
from protorpc import protojson
from . import messages
class Stats(object):
def __init__(self, pod, paths_to_contents=None):
self.pod = pod
if paths_to_contents is None:
paths_to_contents = pod.export()
self.paths_to_contents = paths_to_contents
def get_num_files_pe... | mit | -1,421,544,671,774,906,400 | 28.609756 | 73 | 0.681219 | false |
m4ll0k/Infoga | recon/google.py | 1 | 1041 | #!/usr/bin/env python
# -*- coding:utf-8 -*-
#
# @name : Infoga - Email Information Gathering
# @url : http://github.com/m4ll0k
# @author : Momo Outaadi (m4ll0k)
from lib.output import *
from lib.request import *
from lib.parser import *
class Google(Request):
def __init__(self,target):
Request.... | gpl-3.0 | 628,666,349,473,185,200 | 24.025 | 86 | 0.614793 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.