repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
thomasowenmclean/aced | aced/widgets/editorwidget.py | 1 | 3575 | from qtpy import QtWidgets, QtCore, QtGui
from ..backend import franktonjunction, themeing, themeing_constants
from ..connections import signals
import uuid
from ..globals import pointers
from ..gui import ui_editorwidget
class EditorViewWidget(ui_editorwidget.ui_EditorViewWidget):
def __init__(self, parent=No... | gpl-2.0 | -835,179,962,398,171,500 | 26.929688 | 68 | 0.637762 | false | 3.873239 | false | false | false |
xju2/xaodtools | scripts/analysis_template.py | 1 | 4725 | #!/usr/bin/evn python
head_file="""
/*
* description of the analysis
*
*/
#ifndef __MYXAODTOOLS_ANALYSISNAME_H__
#define __MYXAODTOOLS_ANALYSISNAME_H__
#include <vector>
#include <string>
#include "MyXAODTools/AnalysisBase.h"
#include "AsgTools/ToolHandle.h"
using namespace std;
class ANALYSISNAME : public Ana... | mit | 5,394,879,387,766,987,000 | 22.743719 | 81 | 0.589841 | false | 2.966102 | false | false | false |
mgedmin/mgp2pdf | samples/doctests2/source/makeslide.py | 1 | 6195 | #!/usr/bin/env python
r"""
Produce a MagicPoint file from a text file with simple markup.
Markup:
directives (lines starting with .)
MagicPoint text (everything else)
You can use MagicPoint markup (lines starting with %), but that is discouraged.
You should know that \ is MagicPoint's escape character. If yo... | gpl-2.0 | 5,074,787,198,690,758,000 | 26.290749 | 126 | 0.619209 | false | 3.468645 | false | false | false |
systempuntoout/buckethandle | app/controllers/ajax.py | 1 | 1741 | from google.appengine.api import memcache
import logging, web
import app.db.models as models
from google.appengine.ext import ereporter
import app.utility.utils as utils
from app.utility.utils import cachepage
ereporter.register_logger()
render = web.render
class Tags:
"""
Return tags for auto co... | bsd-3-clause | 8,339,046,259,761,821,000 | 31.849057 | 113 | 0.561172 | false | 3.956818 | false | false | false |
Sprytile/Sprytile | rx/concurrency/newthreadscheduler.py | 2 | 2094 | import time
import logging
import threading
from rx.core import Scheduler, Disposable
from .schedulerbase import SchedulerBase
from .eventloopscheduler import EventLoopScheduler
log = logging.getLogger('Rx')
class NewThreadScheduler(SchedulerBase):
"""Creates an object that schedules each unit of work on a sepa... | mit | 2,661,126,048,347,628,500 | 29.347826 | 94 | 0.634193 | false | 4.256098 | false | false | false |
shakedel/tensorboard | tensorboard/loader.py | 1 | 23028 | # Copyright 2017 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 | -8,526,100,744,995,340,000 | 31.991404 | 80 | 0.64617 | false | 3.905699 | false | false | false |
raspibo/ibt2 | tests/ibt2_tests.py | 1 | 11802 | #!/usr/bin/env python3
"""I'll Be There, 2 (ibt2) - tests
Copyright 2016-2017 Davide Alberani <da@erlug.linux.it>
RaspiBO <info@raspibo.org>
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... | apache-2.0 | -564,341,801,183,677,900 | 40.556338 | 120 | 0.565836 | false | 3.229885 | true | false | false |
Gagaro/PimpMyBot | pimpmybot/core_modules/shop/shop.py | 1 | 1181 | """ Import the Base Module, A module is part of the bot who manage some stuff """
from __future__ import absolute_import, unicode_literals
from datetime import datetime, timedelta
import schedule
from utils import db
from utils.modules import BaseModule
from utils.translations import _
from .api import buy_item, Sho... | mit | -6,916,275,225,974,315,000 | 24.673913 | 81 | 0.602032 | false | 3.923588 | false | false | false |
eandersson/amqpstorm | amqpstorm/tests/functional/legacy_tests.py | 1 | 4436 | import time
from amqpstorm import Channel
from amqpstorm.tests.functional.utility import TestFunctionalFramework
from amqpstorm.tests.functional.utility import setup
class LegacyFunctionalTests(TestFunctionalFramework):
def configure(self):
self.disable_logging_validation()
@setup(queue=True)
de... | mit | 1,982,864,760,062,838,500 | 36.277311 | 75 | 0.599639 | false | 4.236867 | true | false | false |
greencoder/hopefullysunny-django | vendor/noaa/stations.py | 1 | 2310 | import os
import shutil
import noaa.models
import noaa.utils
def nearest_stations_with_distance(lat, lon, stations, radius=10.0,
units="miles"):
"""Find all stations within radius of target.
:param lat:
:param lon:
:param stations: list of stations objects to scan
... | mit | 4,585,618,660,175,534,000 | 24.666667 | 69 | 0.630303 | false | 3.598131 | false | false | false |
fferri/pygolog | golog_program.py | 1 | 7227 | #!/usr/bin/env python3
from strips import *
#def astar(p, s, a):
# start = (p, s, a)
# closed = []
# open = []
# gh = []
#
# def heuristic_cost_estimate(x): return 0
#
# def add_to_open(x, g, h):
# if x not in open:
# open.append(x)
# gh = (g, h)
#
# def find_next_bes... | bsd-3-clause | 6,223,094,759,193,637,000 | 25.569853 | 84 | 0.52968 | false | 2.904743 | false | false | false |
openbaton/openbaton-cli | org/openbaton/v2/services.py | 1 | 1738 | import logging
from org.openbaton.v2.cmd import BaseObCmd
from org.openbaton.v2.utils import get_result_to_list, get_result_to_show, parse_path_or_json, result_to_str
class Services(BaseObCmd):
"""Command to manage Services. It allows to:
* show details of a specific Service passing an id
* list ... | apache-2.0 | -8,828,528,111,368,179,000 | 36.782609 | 116 | 0.595512 | false | 3.761905 | false | false | false |
bhavanaananda/DataStage | src/AdminUIHandler/MiscLib/tests/TestCombinators.py | 8 | 1261 | # $Id: TestCombinators.py 1047 2009-01-15 14:48:58Z graham $
#
# Unit testing for WebBrick library combinators
# See http://pyunit.sourceforge.net/pyunit.html
#
import sys
import unittest
sys.path.append("../..")
from MiscLib.Combinators import *
class TestCombinators(unittest.TestCase):
def setUp(self):
... | mit | 4,510,261,431,196,569,600 | 23.72549 | 68 | 0.620143 | false | 3.208651 | true | false | false |
MattDevo/coreboot | util/riscv/sifive-gpt.py | 2 | 6519 | #!/usr/bin/env python3
# This file is part of the coreboot project.
#
# Copyright (C) 2018 Jonathan Neuschäfer
#
# 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; version 2 of the License.
#
# Thi... | gpl-2.0 | -5,781,629,859,728,216,000 | 32.772021 | 83 | 0.637005 | false | 3.112703 | false | false | false |
xen0n/gingerprawn | gingerprawn/shrimp/librarian/librarian_icon.py | 1 | 3467 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# JNMaster / librarian / icon for the shrimp
#
# Copyright (C) 2011 Wang Xuerui <idontknw.wang@gmail.com>
#
# 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 Foun... | gpl-3.0 | -3,908,397,957,452,425,700 | 58.775862 | 78 | 0.892126 | false | 1.619337 | false | false | false |
ccstr/sorting-analysis | sorting_analysis.py | 1 | 5463 | # Analyzes the performance of insertion sort and merge sort.
# Copyright (C) 2015
# 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 late... | gpl-3.0 | -5,408,541,337,670,909,000 | 28.52973 | 80 | 0.585576 | false | 3.277145 | false | false | false |
geertj/ravstack | lib/ravstack/main.py | 1 | 4819 | #
# This file is part of ravstack. Ravstack is free software available under
# the terms of the MIT license. See the file "LICENSE" that was provided
# together with this source file for the licensing terms.
#
# Copyright (c) 2015 the ravstack authors. See the file "AUTHORS" for a
# complete list.
"""Ravello Ironic co... | mit | 1,762,956,767,902,170,600 | 35.233083 | 74 | 0.595767 | false | 3.827641 | false | false | false |
henkhaus/wow | oldcode/adg_bulk.py | 1 | 1591 | import pymongo
from pymongo import MongoClient, UpdateOne
from wowlib import wowapi, binary_search
import time
client = MongoClient()
print ('Initiating db connection and getting wow data')
db = client.wowdoc
data = wowapi.auctionurl('Shadow-Council')
posts = db.auctiondata
#create counters
count = 0
t... | apache-2.0 | 1,605,230,015,981,572,400 | 22.890625 | 74 | 0.637964 | false | 3.385106 | false | false | false |
edx/course-discovery | course_discovery/apps/course_metadata/migrations/0074_auto_20171212_2016.py | 1 | 1216 | # Generated by Django 1.11.3 on 2017-12-12 20:16
import django.db.models.deletion
import stdimage.models
from django.db import migrations, models
import course_discovery.apps.course_metadata.utils
class Migration(migrations.Migration):
dependencies = [
('course_metadata', '0073_program_instructors'),
... | agpl-3.0 | -9,120,434,024,624,371,000 | 35.848485 | 234 | 0.666941 | false | 4.039867 | false | false | false |
culturagovbr/sistema-nacional-cultura | planotrabalho/views.py | 1 | 13891 | import json
from django.shortcuts import redirect
from django.http import Http404, HttpResponseRedirect, request
from django.http import HttpResponse
from django.views.generic.edit import CreateView
from django.views.generic.edit import UpdateView
from django.views.generic import ListView
from django.views.generic imp... | agpl-3.0 | 2,528,503,939,964,666,400 | 35.459318 | 104 | 0.673458 | false | 3.168568 | false | false | false |
att-comdev/deckhand | deckhand/control/views/revision.py | 1 | 3030 | # Copyright 2017 AT&T Intellectual Property. All other 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... | apache-2.0 | 8,199,247,008,162,782,000 | 32.666667 | 78 | 0.588779 | false | 4.449339 | false | false | false |
siavooshpayandehazad/NoC_Router | Scripts/include/fault_injector_do.py | 3 | 51818 | import random
import sys
import numpy
from Scripts.include.package import *
#----------------------------------------------------------------------------------------------
#
# Fault Class
#
#----------------------------------------------------------------------------------------------
class fault:
location... | gpl-3.0 | -1,147,701,157,328,502,400 | 67.002625 | 263 | 0.636343 | false | 2.551982 | false | false | false |
sauloal/cnidaria | scripts/venv/lib/python2.7/site-packages/cogent/phylo/distance.py | 1 | 13243 | #!/usr/bin/env python
"""Estimating pairwise distances between sequences.
"""
from cogent.util import parallel, table, warning, progress_display as UI
from cogent.maths.stats.util import Numbers
from cogent import LoadSeqs, LoadTree
from warnings import warn
__author__ = "Gavin Huttley"
__copyright__ = "Copyright 200... | mit | 1,284,532,346,036,393,500 | 40.255452 | 80 | 0.56679 | false | 4.271935 | false | false | false |
bharadwajyarlagadda/korona | setup.py | 1 | 1670 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
from setuptools import setup, find_packages
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
def parse_requirements(filename):
return [line.strip()
for line in read(filename).strip().split('\n')
... | mit | 1,441,907,457,221,212,400 | 30.509434 | 77 | 0.607784 | false | 4.093137 | false | false | false |
chokribr/inveniocnudst | modules/bibdocfile/lib/bibdocfile_web_tests.py | 8 | 5273 | # -*- coding: utf-8 -*-
## This file is part of Invenio.
## Copyright (C) 2012 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... | gpl-2.0 | 3,547,754,400,962,725,400 | 50.194175 | 135 | 0.680068 | false | 3.579769 | true | false | false |
NikolayKutsoloshchenko/Selenium-1- | test_selenium11.py | 1 | 2644 | #encoding=UTF-8
from selenium import webdriver
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import pytest
@pytest.fixture
def driver(req... | apache-2.0 | -8,080,912,313,460,937,000 | 47.557692 | 122 | 0.659029 | false | 3.433333 | false | false | false |
wscullin/spack | var/spack/repos/builtin/packages/libfontenc/package.py | 3 | 1702 | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | 9,090,554,424,462,816,000 | 41.55 | 81 | 0.670388 | false | 3.757174 | false | false | false |
MalloyDelacroix/DownloaderForReddit | DownloaderForReddit/extractors/reddit_video_extractor.py | 1 | 5936 | """
Downloader for Reddit takes a list of reddit users and subreddits and downloads content posted to reddit either by the
users or on the subreddits.
Copyright (C) 2017, Kyle Hickey
This file is part of the Downloader for Reddit.
Downloader for Reddit is free software: you can redistribute it and/or modify
it und... | gpl-3.0 | 487,824,003,986,175,740 | 41.705036 | 120 | 0.611691 | false | 4.40683 | false | false | false |
tomwright01/iowa_oct_analysis | App/readIowaData.py | 1 | 6078 | import numpy as np
import re
import xml.etree.ElementTree
import logging
logger = logging.getLogger(__name__)
def readIowaSurfaces(fname):
"""Read the surfaces .xml file generated from OCTExplorer
Params:
fname - full path to the .xml file
Returns:
{'scan_size' - {'x','y','z'} - scan_size in v... | mit | 3,205,874,098,201,724,000 | 39.52 | 138 | 0.609905 | false | 3.659241 | false | false | false |
jonfoster/pyxb1 | tests/drivers/test-wildcard.py | 1 | 9405 | import pyxb.binding.generate
import pyxb.utils.domutils
from xml.dom import Node
import os.path
schema_path = os.path.abspath(os.path.join(os.path.dirname(__file__),
'../schemas/test-wildcard.xsd'))
code = pyxb.binding.generate.GeneratePython(schema_location=schema_path)
rv = compile(code, 't... | apache-2.0 | 3,425,045,343,297,419,000 | 44.216346 | 103 | 0.632749 | false | 3.373386 | true | false | false |
qtile/qtile | libqtile/scripts/run_cmd.py | 2 | 3183 | # Copyright (c) 2014, Roger Duran
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the \"Software\"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, dist... | mit | 170,839,424,257,160,400 | 30.83 | 85 | 0.647817 | false | 3.958955 | false | false | false |
kotnik/reddrip | reddrip/util/log.py | 1 | 1054 | """ Logging utilities.
"""
import logging
import logging.handlers
from colorama import Fore, Style
COLORS = {
'DEBUG': Style.DIM,
'INFO': Style.NORMAL,
'WARNING': Style.BRIGHT,
'ERROR': Fore.RED,
'CRITICAL': Style.BRIGHT + Fore.RED,
}
class ColoredFormatter(logging.Formatter):
def format(s... | gpl-3.0 | -8,945,876,508,965,732,000 | 25.35 | 98 | 0.658444 | false | 3.875 | false | false | false |
toladata/TolaTables | tola/models.py | 1 | 1390 | from django.db import models
from django.contrib.auth.signals import user_logged_in, user_logged_out
from urllib2 import urlopen
import json
class LoggedUser(models.Model):
username = models.CharField(max_length=30, primary_key=True)
country = models.CharField(max_length=100, blank=False)
email = models.... | gpl-2.0 | 3,115,477,970,496,844,000 | 29.888889 | 72 | 0.627338 | false | 3.982808 | false | false | false |
gpospelov/BornAgain | Examples/scatter2d/CylindersInBA.py | 1 | 1340 | """
Cylinder form factor in Born approximation
"""
import bornagain as ba
from bornagain import deg, nm
def get_sample():
"""
Returns a sample with cylinders in a homogeneous environment ("Vacuum"),
implying a simulation in plain Born approximation.
"""
# Define materials
material_Particle = ... | gpl-3.0 | -4,805,916,511,805,866,000 | 24.769231 | 76 | 0.678358 | false | 3.418367 | false | false | false |
maferelo/saleor | saleor/graphql/core/fields.py | 1 | 6097 | from functools import partial
import graphene
from django.db.models.query import QuerySet
from django_measurement.models import MeasurementField
from django_prices.models import MoneyField, TaxedMoneyField
from graphene.relay import PageInfo
from graphene_django.converter import convert_django_field
from graphene_djan... | bsd-3-clause | 4,927,105,402,108,838,000 | 30.266667 | 87 | 0.609152 | false | 4.275596 | false | false | false |
CCLab/Raw-Salad | scripts/autoupload/hierarchy_inserter.py | 1 | 24456 | # -*- coding: utf-8 -*-
'''
Created on 25-08-2011
'''
class HierarchyInserter:
"""Inserts hierarchy from the given collection. Uses hierarchy described in
object of the following form:
{
"columns": [list of columns creating hierarchy],
"field_type_label": name of column(that will be i... | bsd-3-clause | -3,468,115,035,328,612,000 | 35.656672 | 104 | 0.511146 | false | 4.142494 | false | false | false |
andreagrandi/workshopvenues | workshopvenues/venues/migrations/0002_auto__del_venues__add_facility__add_venue.py | 1 | 3771 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Deleting model 'Venues'
db.delete_table(u'venues_venues')
# Adding model 'Facility'
db.cr... | bsd-3-clause | -7,566,447,154,236,077,000 | 45 | 141 | 0.5834 | false | 3.440693 | false | false | false |
andreffs18/flask-template-project | project/commands/delete_user.py | 1 | 1056 | # !/usr/bin/python
# -*- coding: utf-8 -*-
from flask import current_app as app
from flask_script import Command, Option
from project.user.models.user import User
from project.user.services.delete_user_service import DeleteUserService
class DeleteUserCommand(Command):
"""Deletes user by giving username"""
de... | mit | 4,887,916,959,062,820,000 | 34.2 | 95 | 0.626894 | false | 4.125 | false | false | false |
tyarkoni/featureX | pliers/utils/updater.py | 2 | 3221 | """ Utility to check if results have changed in foreign APIs. """
import glob
import datetime
from os.path import realpath, join, dirname, exists, expanduser
import hashlib
import pickle
import pandas as pd
import numpy as np
from pliers.stimuli import load_stims
from pliers.transformers import get_transformer
def... | bsd-3-clause | -5,437,736,890,417,419,000 | 31.867347 | 78 | 0.605092 | false | 4.1242 | false | false | false |
ruymanengithub/vison | vison/support/files.py | 1 | 1544 | """
IO related functions.
:requires: PyFITS
:requires: NumPy
:author: Sami-Matias Niemi
"""
import datetime
import pickle
import os
import numpy as np
from pdb import set_trace as stop
def cPickleDumpDictionary(dictionary, output, protocol=2):
"""
Dumps a dictionary of data to a cPickled file.
:param ... | gpl-3.0 | 4,842,947,694,927,793,000 | 19.051948 | 79 | 0.628886 | false | 3.525114 | false | false | false |
Reddcraft/reddblockd | lib/config.py | 1 | 1210 | # -*- coding: utf-8 -*-
VERSION = "1.5.0" #should keep up with the counterwallet version it works with (for now at least)
DB_VERSION = 22 #a db version increment will cause counterblockd to rebuild its database off of counterpartyd
CAUGHT_UP = False #atomic state variable, set to True when counterpartyd AND counterb... | mit | -7,548,761,881,956,013,000 | 36.84375 | 110 | 0.746281 | false | 2.99505 | false | false | false |
SergeySatskiy/codimension | codimension/editor/linenomargin.py | 1 | 5174 | # -*- coding: utf-8 -*-
#
# codimension - graphics python two-way code editor and analyzer
# Copyright (C) 2017 Sergey Satskiy <sergey.satskiy@gmail.com>
#
# 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 F... | gpl-3.0 | -2,211,287,564,557,201,400 | 34.682759 | 78 | 0.626208 | false | 4.132588 | false | false | false |
ssut/py-googletrans | googletrans/utils.py | 1 | 1945 | """A conversion module for googletrans"""
import json
import re
def build_params(query, src, dest, token, override):
params = {
'client': 'webapp',
'sl': src,
'tl': dest,
'hl': dest,
'dt': ['at', 'bd', 'ex', 'ld', 'md', 'qca', 'rw', 'rm', 'ss', 't'],
'ie': 'UTF-8',
... | mit | -610,993,380,705,895,800 | 23.620253 | 82 | 0.517224 | false | 3.529946 | false | false | false |
Azure/azure-storage-python | azure-storage-common/azure/storage/common/_common_conversion.py | 1 | 3229 | # -------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
# --------------------------------------------------------------------------
import ba... | mit | 2,243,570,909,125,569,300 | 24.626984 | 83 | 0.598947 | false | 3.505972 | false | false | false |
bjowac/impara-benchexec | benchexec/runexecutor.py | 2 | 39980 | """
BenchExec is a framework for reliable benchmarking.
This file is part of BenchExec.
Copyright (C) 2007-2015 Dirk Beyer
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
... | apache-2.0 | -6,594,898,723,726,744,000 | 44.073281 | 238 | 0.605178 | false | 4.320761 | false | false | false |
bjornwallner/proq2-server | apps/modeller9v8/modlib/modeller/automodel/refine.py | 1 | 2738 | """Functions to refine a selection to varying degrees. These functions are
usually used by setting the md_level member of an automodel or loop model
object."""
def very_fast(atmsel, actions):
"""Very fast MD annealing"""
# at T=1000, max_atom_shift for 4fs is cca 0.15 A.
refine(atmsel, actions, cap=... | gpl-3.0 | -6,443,310,088,690,744,000 | 39.264706 | 76 | 0.587655 | false | 2.771255 | false | false | false |
agamdua/github3.py | github3/gists/history.py | 10 | 1768 | # -*- coding: utf-8 -*-
"""
github3.gists.history
---------------------
Module containing the logic for the GistHistory object.
"""
from __future__ import unicode_literals
from ..models import GitHubCore
from ..users import User
class GistHistory(GitHubCore):
"""Thisobject represents one version (or revision)... | bsd-3-clause | -3,721,514,964,649,648,000 | 25.38806 | 77 | 0.605769 | false | 3.911504 | false | false | false |
chenjiandongx/pyecharts | test/test_radar.py | 1 | 3381 | from unittest.mock import patch
from nose.tools import assert_equal, assert_in
from pyecharts import options as opts
from pyecharts.charts import Radar
v1 = [(4300, 10000, 28000, 35000, 50000, 19000)]
v2 = [(5000, 14000, 28000, 31000, 42000, 21000)]
@patch("pyecharts.render.engine.write_utf8_html_file")
def test_r... | mit | -5,761,579,638,173,765,000 | 33.115789 | 71 | 0.572663 | false | 3.012082 | false | false | false |
luwei0917/awsemmd_script | script/GetCACoordinatesFromPDB.py | 1 | 1517 | #!/usr/bin/env python2
import sys
def three2one(prot):
""" translate a protein sequence from 3 to 1 letter code"""
code = {"GLY" : "G", "ALA" : "A", "LEU" : "L", "ILE" : "I",
"ARG" : "R", "LYS" : "K", "MET" : "M", "CYS" : "C",
"TYR" : "Y", "THR" : "T", "PRO" : "P", "SER" : "S",
... | mit | -5,382,920,857,065,637,000 | 25.155172 | 101 | 0.526038 | false | 2.35559 | false | false | false |
grengojbo/satchmo | satchmo/apps/satchmo_ext/newsletter/views.py | 13 | 2078 | from django.shortcuts import render_to_response
from django.template import RequestContext
from django.utils.translation import ugettext_lazy as _, ugettext
from satchmo_ext.newsletter.forms import NewsletterForm
def add_subscription(request, template="newsletter/subscribe_form.html",
result_template="newsletter/... | bsd-3-clause | -5,097,847,611,739,750,000 | 38.207547 | 81 | 0.684312 | false | 4.365546 | false | false | false |
gkc1000/pyscf | examples/scf/40-customizing_hamiltonian.py | 2 | 1494 | #!/usr/bin/env python
#
# Author: Qiming Sun <osirpt.sun@gmail.com>
#
import numpy
from pyscf import gto, scf, ao2mo
'''
Customizing Hamiltonian for SCF module.
Three steps to define Hamiltonian for SCF:
1. Specify the number of electrons. (Note mole object must be "built" before doing this step)
2. Overwrite three ... | apache-2.0 | 6,658,539,606,866,120,000 | 27.730769 | 93 | 0.706158 | false | 2.682226 | false | false | false |
t-hey/QGIS-Original | python/plugins/processing/tools/vector.py | 9 | 3478 | # -*- coding: utf-8 -*-
"""
***************************************************************************
vector.py
---------------------
Date : February 2013
Copyright : (C) 2013 by Victor Olaya
Email : volayaf at gmail dot com
******************************... | gpl-2.0 | 6,635,530,790,690,708,000 | 30.908257 | 103 | 0.542841 | false | 4.712737 | false | false | false |
garnaat/skew | skew/resources/aws/elasticbeanstalk.py | 2 | 1293 | # Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distributed on an "AS IS" BASIS, WITHOUT WAR... | apache-2.0 | -3,479,674,481,035,610,600 | 30.560976 | 72 | 0.658159 | false | 4.324415 | false | false | false |
llthelinkll/opencv_project_1 | VS2015/PowYingChubGame/PowYingChubGame/PowYingChubGame.py | 2 | 3398 | import sys
#from gameDemo import video
#Change the following line
sys.path.append('C:\opencv\sources\samples\python2')
import numpy as np
import cv2
#import video
import socket
import time
import math
UDP_IP = "127.0.0.1"
UDP_PORT = 5005
print "UDP target IP:", UDP_IP
print "UDP target port:", UDP_PORT
#print "me... | mit | -5,918,979,132,122,378,000 | 33.663265 | 78 | 0.572733 | false | 2.612308 | false | false | false |
Kinnay/NintendoClients | nintendo/nex/aauser.py | 1 | 5836 |
# This file was generated automatically by generate_protocols.py
from nintendo.nex import notification, rmc, common, streams
import logging
logger = logging.getLogger(__name__)
class ApplicationInfo(common.Structure):
def __init__(self):
super().__init__()
self.title_id = None
self.title_version = None
d... | mit | 2,790,017,988,029,408,000 | 35.248447 | 125 | 0.726182 | false | 3.443068 | false | false | false |
wanji/hdidx | hdidx/util.py | 1 | 5092 | #!/usr/bin/env python
# coding: utf-8
#########################################################################
#########################################################################
"""
File Name: util.py
Author: Wan Ji
E-mail: wanji@live.com
Created on: Tue Nov 4 09:38:24 2014 CST
"""
DESCRIPTI... | mit | -4,566,812,271,994,191,400 | 22.357798 | 77 | 0.533386 | false | 3.673882 | false | false | false |
s390guy/SATK | tools/ipl/PyIPLELF.py | 1 | 8682 | #!/usr/bin/python3.3
# Copyright (C) 2012 Harold Grovesteen
#
# This file is part of SATK.
#
# SATK 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 you... | gpl-3.0 | -5,996,643,650,752,151,000 | 35.792373 | 85 | 0.604008 | false | 3.730984 | false | false | false |
crossgovernmentservices/csd-notes | app/assets.py | 1 | 1576 | # -*- coding: utf-8 -*-
"""
Flask assets bundles and filters
"""
import os
from flask_assets import Bundle, Environment
from lib.jinja_to_js_filter import JinjaToJs
from lib.sass_filter import LibSass
def static(*path):
return os.path.join(os.path.dirname(__file__), 'static', *path)
jinja_to_js = JinjaToJs()... | mit | -6,841,808,532,404,907,000 | 25.266667 | 67 | 0.654188 | false | 3.190283 | false | false | false |
KE-works/pykechain | pykechain/models/user.py | 1 | 2958 | import datetime
from typing import Text
import pytz
from .base import Base
from ..enums import LanguageCodes
class User(Base):
"""A virtual object representing a KE-chain user.
:ivar username: username of the user
:type username: str
:ivar name: username of the user (compatibility)
:type name: ... | apache-2.0 | 4,657,301,922,102,669,000 | 27.442308 | 93 | 0.602096 | false | 4.172073 | false | false | false |
kgadek/evogil | problems/ZDT6/problem.py | 1 | 1372 | import functools
import math
dims = [(-5, 5), (-5, 5), (-5, 5)]
pareto_set = []
p_no = 150
emoa_points = [i/(p_no-1) for i in range(p_no)]
p_no2 = 300
emoa_points2 = [i/(p_no2-1) for i in range(p_no2)]
def emoa_fitness_2(f1, g, h, x):
y = g(x[1:])
return y * h(f1(x[0]), y)
def subfit1(x, f1):
return ... | gpl-3.0 | -4,791,608,235,092,484,000 | 22.254237 | 93 | 0.551749 | false | 2.282862 | false | false | false |
shsingh/ansible | lib/ansible/module_utils/network/eos/config/lacp_interfaces/lacp_interfaces.py | 12 | 6884 | # -*- coding: utf-8 -*-
# Copyright 2019 Red Hat
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
"""
The eos_lacp_interfaces class
It is in this file where the current configuration (as dict)
is compared to the provided configuration (as dict) and the command set
necessary... | gpl-3.0 | -7,651,579,622,116,228,000 | 31.168224 | 107 | 0.60183 | false | 4.47013 | true | false | false |
stefanseibert/DataMining | experiment04/scripts/feedparser.py | 105 | 122933 | #!/usr/bin/env python
"""Universal feed parser
Handles RSS 0.9x, RSS 1.0, RSS 2.0, CDF, Atom 0.3, and Atom 1.0 feeds
Visit http://feedparser.org/ for the latest version
Visit http://feedparser.org/docs/ for the latest documentation
Required: Python 2.1 or later
Recommended: Python 2.3 or later
Recommended: CJKCodecs... | mit | 4,730,405,504,525,414,000 | 42.013646 | 214 | 0.587474 | false | 3.610685 | false | false | false |
tacocats/2DEngine | tools/tile_editor/tileEditor.py | 1 | 4852 | from tkinter import *
from menuOptions import *
from PIL import Image, ImageFilter, ImageTk
from tileset_module import tilesetManipulation
from scene_module import levelManipulation, tile, level
# Globals############################################
# Wether or not the user is drawing on the screen
isDrawing = False
... | mit | -6,763,474,092,875,302,000 | 31.13245 | 206 | 0.674567 | false | 3.381185 | false | false | false |
ZebraHat/AgoraD-LoadingDock | AgoraD/loading_dock/JsonSerializer.py | 1 | 3401 | #
## JsonSerializer.py
## functions for serializing and deserializing schemas
#
from django.db import connections
from models import Database, Table, Column
import json
import ModelGenerator
from django.core.serializers.json import DjangoJSONEncoder
def serialize(objects):
json_objs = []
for o in objects:
... | lgpl-2.1 | 7,897,342,371,836,772,000 | 29.366071 | 109 | 0.603058 | false | 4.2301 | false | false | false |
ZhuangER/robot_path_planning | scripts/coursera.py | 1 | 37429 | # Testing solutions for Coursera
# (c) PySimiam Team 2014
#
# Contact person: Tim Fuchs <typograph@elec.ru>
#
# This class was implemented for the weekly programming excercises
# of the 'Control of Mobile Robots' course by Magnus Egerstedt.
#
try:
from urllib import urlencode
from urllib2 import urlopen
except Exc... | mit | -277,692,897,075,128,770 | 37.193878 | 266 | 0.561516 | false | 3.67167 | true | false | false |
nathangeffen/tbonline-2 | tbonlineproject/credit/utils.py | 2 | 1267 | '''Utility functions for credit app.
'''
from django.utils.translation import ugettext as _
def credit_length(obj):
return len(obj)
def credit_list(obj, number_to_print=0):
"""Returns formatted list of people for bylines.
Implements "et al." and "and". E.g. "Samuel Johnson, Ingrid Bergman and
... | mit | 5,624,823,801,594,170,000 | 29.166667 | 76 | 0.539858 | false | 3.770833 | false | false | false |
ge0rgi/cinder | cinder/volume/drivers/datera/datera_api21.py | 1 | 34806 | # Copyright 2016 Datera
# 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 applic... | apache-2.0 | -6,069,262,351,423,010,000 | 38.687571 | 79 | 0.489312 | false | 4.243599 | false | false | false |
bxlab/bx-python | scripts/interval_count_intersections.py | 1 | 1083 | #!/usr/bin/env python
"""
Read two lists of intervals (with chromosomes) and count the number of entries
in the second set that intersect any entry in the first set.
TODO: This could use bitsets rather than the intervals package, would it be
faster?
usage: %prog bed1 bed2 > out
"""
import sys
from bx import ... | mit | -1,869,477,446,070,604,800 | 21.102041 | 78 | 0.650046 | false | 3.760417 | false | false | false |
mdeff/ntds_2017 | projects/reports/movie_network/python/costs_function.py | 1 | 2476 | import numpy as np
import pandas as pd
from tqdm import tqdm
usefull_columns = ['genres','keywords','vote_average']
Movies = pd.read_csv("../Datasets/Transformed.csv",usecols=usefull_columns)
#Constant definition
#Cost added if the first genre is similar between two films
first_genre = 5
#Cost added if the seconda... | mit | 1,095,156,459,287,710,000 | 32.013333 | 123 | 0.611874 | false | 3.350474 | false | false | false |
kindly/reformed | database/util.py | 1 | 22813 | import datetime
import decimal
import os
import time
import errno
import formencode as fe
import data_loader
JOINS_DEEP = 6
# root_dir holds the root directory of the application
root_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "..")
root_dir = os.path.normpath(root_dir)
class Holder(object):
... | gpl-2.0 | -1,778,376,202,833,671,700 | 27.950508 | 124 | 0.577828 | false | 3.762038 | false | false | false |
google-research/recsim_ng | recsim_ng/applications/recsys_partially_observable_rl/interest_evolution_simulation_demo.py | 1 | 1402 | # coding=utf-8
# Copyright 2021 The RecSim Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | 5,941,458,815,071,267,000 | 33.195122 | 95 | 0.742511 | false | 3.809783 | false | false | false |
specify/specify7 | specifyweb/specify/api.py | 1 | 30535 | from urllib.parse import urlencode
import json
import re
import logging
logger = logging.getLogger(__name__)
from django import forms
from django.db import transaction
from django.http import (HttpResponse, HttpResponseBadRequest,
Http404, HttpResponseNotAllowed, QueryDict)
from django.core.ex... | gpl-2.0 | -844,554,643,283,933,000 | 37.073566 | 116 | 0.628132 | false | 3.973842 | false | false | false |
danielkitta/libsigrokdecode | decoders/adns5020/pd.py | 4 | 3372 | ##
## This file is part of the libsigrokdecode project.
##
## Copyright (C) 2015 Karl Palsson <karlp@tweak.net.au>
##
## 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 L... | gpl-3.0 | 6,443,116,752,135,753,000 | 28.840708 | 78 | 0.571471 | false | 3.205323 | false | false | false |
EyuelAbebe/pygame_pluralsight | Game/Breakout.py | 1 | 1711 | __author__ = 'eyuelabebe'
import pygame
from Game import *
from Game.Scenes import *
from Game.Shared import GameConstants
class Breakout(object):
def __init__(self):
self.__lives = 5
self.__score = 0
self.__level = Level(self)
self.__level.load(0)
self.__pad = Pad((0, ... | mit | 1,009,826,851,908,065,300 | 18.235955 | 94 | 0.542957 | false | 3.933333 | false | false | false |
pycassa/pycassa | tests/test_pool_logger.py | 1 | 4992 | from unittest import TestCase
from nose.tools import assert_equal, assert_raises
from pycassa.logging.pool_stats_logger import StatsLogger
from pycassa.pool import ConnectionPool, NoConnectionAvailable, InvalidRequestError
__author__ = 'gilles'
_credentials = {'username': 'jsmith', 'password': 'havebadpass'}
class ... | mit | -3,283,971,811,469,260,000 | 36.533835 | 87 | 0.611979 | false | 3.842956 | true | false | false |
leouieda/funghi | setup.py | 1 | 1575 | import os
from setuptools import setup, find_packages
NAME = "cryptococcus"
# Get version and release info
with open(os.path.join(NAME, '_version.py')) as f:
exec(f.read())
# Use the README for the long description
with open('README.rst') as f:
long_description = f.read()
VERSION = __version__
AUTHOR = "Leon... | bsd-3-clause | 4,163,296,218,932,432,400 | 30.5 | 71 | 0.622857 | false | 3.767943 | false | false | false |
proversity-org/edx-platform | cms/djangoapps/contentstore/tests/test_transcripts_utils.py | 1 | 27421 | # -*- coding: utf-8 -*-
""" Tests for transcripts_utils. """
import copy
import ddt
import json
import textwrap
import unittest
from uuid import uuid4
from django.conf import settings
from django.test.utils import override_settings
from django.utils import translation
from mock import Mock, patch
from nose.plugins.ski... | agpl-3.0 | 4,344,171,855,453,367,300 | 36.883817 | 119 | 0.589741 | false | 3.69237 | true | false | false |
mkuron/espresso | testsuite/scripts/tutorials/test_07-electrokinetics__scripts.py | 1 | 2205 | # Copyright (C) 2019 The ESPResSo project
#
# This file is part of ESPResSo.
#
# ESPResSo 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 versio... | gpl-3.0 | -4,796,694,920,548,650,000 | 37.017241 | 80 | 0.69932 | false | 3.585366 | false | false | false |
demianbrecht/django-sanction | example/core/models.py | 1 | 4373 | from datetime import datetime, timedelta
from time import mktime
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.contrib.auth.models import AbstractBaseUser, UserManager
from lazy import lazy
from sanction.client import Client as Sanctio... | mit | 3,216,017,726,208,436,700 | 34.844262 | 78 | 0.603933 | false | 4.216972 | false | false | false |
CivicKnowledge/metaeditor | editor/migrations/0009_auto_20150316_1454.py | 1 | 1774 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
from django.utils.timezone import utc
import editor.models
class Migration(migrations.Migration):
dependencies = [
('editor', '0008_auto_20150315_1847'),
]
operations = [
... | mit | -751,359,076,486,165,200 | 32.471698 | 167 | 0.580045 | false | 4.274699 | false | false | false |
pwong-mapr/private-hue | desktop/core/ext-py/ctypes-1.0.2/ctypes/test/test_memfunctions.py | 14 | 2317 | import sys
import unittest
from ctypes import *
class MemFunctionsTest(unittest.TestCase):
def test_memmove(self):
# large buffers apparently increase the chance that the memory
# is allocated in high address space.
a = create_string_buffer(1000000)
p = "Hello, World"
result... | apache-2.0 | 1,945,446,036,713,943,300 | 36.983607 | 75 | 0.604661 | false | 3.701278 | true | false | false |
proxeIO/fast-lattice | addon/properties.py | 1 | 1359 | import bpy
from bpy.types import PropertyGroup
from bpy.props import FloatProperty, BoolProperty, EnumProperty
from .config import defaults as default
class fast_lattice(PropertyGroup):
method = EnumProperty(
name = 'Conforming Method',
description = 'Method to use when conforming the lattice to... | gpl-3.0 | 864,349,192,912,093,400 | 33.846154 | 145 | 0.6078 | false | 4.398058 | false | false | false |
chenyujie/hybrid-murano | murano/tests/functional/common/utils.py | 1 | 6917 | # Copyright (c) 2015 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in ... | apache-2.0 | -3,509,607,711,950,462,000 | 32.906863 | 78 | 0.590574 | false | 4.161853 | false | false | false |
tomer8007/kik-bot-api-unofficial | kik_unofficial/datatypes/xmpp/auth_stanza.py | 1 | 6407 | import base64
import bs4
import hashlib
import hmac
import logging
import pyDes
import rsa
import time
from kik_unofficial.device_configuration import device_id
from kik_unofficial.utilities.cryptographic_utilities import CryptographicUtils
log = logging.getLogger(__name__)
identifierHex = "30820122300d06092a864886f... | mit | 1,200,259,331,266,545,000 | 33.079787 | 100 | 0.59435 | false | 3.852676 | false | false | false |
Tjorriemorrie/trading | 01_fibo/analyze_one.py | 1 | 5284 | import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
from random import choice
from features import FeatureFactory
from types import *
def addMaxMins(df, n=2):
'''
get highs and lows for n periods backwards
1 min = 1m
2 min = 2m
4 min = 4m
8 min = 8m
16 min = 16m
32 m... | mit | -1,934,741,996,207,708,000 | 25.557789 | 81 | 0.448524 | false | 3.931548 | false | false | false |
adamchainz/lifelogger | lifelogger/commands/local.py | 1 | 6070 | # coding=utf-8
"""
All commands that create & use the local copies of the Google Calendar data.
"""
from __future__ import absolute_import, print_function
import requests
from icalendar import Calendar
from ..config import config, ICAL_PATH
from ..utils import nice_format
from .parser import subparsers
import six
f... | mit | -724,857,612,454,011,900 | 23.087302 | 78 | 0.620264 | false | 3.800877 | false | false | false |
dhanunjaya/neutron | neutron/plugins/ml2/drivers/openvswitch/agent/common/config.py | 4 | 6991 | # Copyright 2012 Red Hat, 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 agre... | apache-2.0 | -4,177,901,443,156,568,600 | 50.785185 | 79 | 0.587184 | false | 4.29159 | false | false | false |
tensorflow/tpu | models/official/detection/dataloader/factory.py | 1 | 7775 | # Copyright 2019 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 | -7,713,678,602,931,322,000 | 47.59375 | 80 | 0.705209 | false | 3.553473 | false | false | false |
pingwin/lexsocial | main.py | 1 | 3949 | #!./.virtenv/bin/python
from flask import (
Flask,
request,
jsonify,
render_template,
url_for,
send_from_directory
)
import datetime
import logging
from dateutil import tz
from flask.ext.pymongo import PyMongo
from flask.ext.script import Manager
from flask_admin ... | bsd-2-clause | -8,028,019,517,174,003,000 | 35.906542 | 108 | 0.425424 | false | 4.565318 | false | false | false |
titilambert/harbour-squilla | squilla/lib/server.py | 1 | 5879 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# server.py
#
# This file is part of Squilla
#
# Copyright (C) 2014 Thibault Cohen
#
# 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 Foundat... | gpl-3.0 | 7,752,167,135,796,823,000 | 34.847561 | 100 | 0.519136 | false | 4.603759 | false | false | false |
coll-gate/collgate | server/geonames/management/commands/city.py | 1 | 9190 | # -*- coding: utf-8; -*-
#
# @file city.py
# @brief
# @author Medhi BOULNEMOUR (INRA UMR1095)
# @date 2017-01-03
# @copyright Copyright (c) 2016 INRA/CIRAD
# @license MIT (see LICENSE file)
# @details
"""
Install City
"""
from django.db import transaction
from django.core.management import BaseCommand
from geonames... | mit | 9,152,917,883,174,326,000 | 31.416961 | 102 | 0.523981 | false | 4.123146 | false | false | false |
yxd-hde/lambda-poll-update-delete | py-asyncio-boto3/poll-test.py | 1 | 1045 | import trollius as asyncio
import boto3
from concurrent.futures import ThreadPoolExecutor
from poll import Poll
import logging
logging.getLogger(
'botocore.vendored.requests.packages.urllib3.connectionpool'
).setLevel(logging.CRITICAL)
logging.getLogger('boto3.resources.action').setLevel(logging.CRITICAL)
logge... | mit | 8,745,223,813,832,195,000 | 25.125 | 70 | 0.734928 | false | 3.554422 | false | false | false |
igor-toga/local-snat | neutron/agent/l2/extensions/qos.py | 4 | 11496 | # Copyright (c) 2015 Mellanox Technologies, Ltd
# 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
#
# U... | apache-2.0 | -7,872,976,652,774,280,000 | 38.369863 | 79 | 0.61952 | false | 3.946447 | false | false | false |
Luxoft/Twister | server/CentralEngine.py | 1 | 5887 | #!/usr/bin/env python2.7
# version: 3.011
# File: CentralEngine.py ; This file is part of Twister.
# Copyright (C) 2012-2014 , Luxoft
# Authors:
# Andrei Costachi <acostachi@luxoft.com>
# Cristi Constantin <crconstantin@luxoft.com>
# Daniel Cioata <dcioata@luxoft.com>
# Mihai Tudoran <mtudoran@luxoft.co... | apache-2.0 | -5,693,460,127,002,823,000 | 29.661458 | 104 | 0.606421 | false | 3.531494 | true | false | false |
OpenNetworkingFoundation/libfluid | examples/python/of13switch.py | 1 | 3264 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from fluid.base import OFServer, OFServerSettings, OFConnection
from fluid.msg import of13
table = {}
class LearningSwitch(OFServer):
def __init__(self):
OFServer.__init__(self, "0.0.0.0", 6653, 1)
config = OFServerSettings()
config.supported_ve... | apache-2.0 | -6,113,062,158,835,330,000 | 39.296296 | 79 | 0.472426 | false | 3.786543 | false | false | false |
matt-gardner/deep_qa | tests/data/datasets/snli_dataset_test.py | 1 | 1987 | # pylint: disable=no-self-use,invalid-name
from deep_qa.data.datasets import SnliDataset
from deep_qa.data.instances.entailment.snli_instance import SnliInstance
from tests.common.test_case import DeepQaTestCase
class TestSnliDataset(DeepQaTestCase):
def setUp(self):
super(TestSnliDataset, self).setUp()... | apache-2.0 | -6,493,186,564,760,148,000 | 46.309524 | 90 | 0.640161 | false | 4.310195 | true | false | false |
sparkslabs/kamaelia_ | Sketches/MPS/HTTP/michael.py | 3 | 4406 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# Copyright 2010 British Broadcasting Corporation and Kamaelia Contributors(1)
#
# (1) Kamaelia Contributors are listed in the AUTHORS file and at
# http://www.kamaelia.org/AUTHORS - please extend this file,
# not this notice.
#
# Licensed under the Apache License, Ver... | apache-2.0 | -2,036,248,962,736,340,500 | 32.12782 | 109 | 0.595778 | false | 4.016408 | false | false | false |
simsong/grr-insider | lib/fuse_mount_test.py | 1 | 11559 | #!/usr/bin/env python
# -*- mode: python; encoding: utf-8 -*-
"""Tests for grr.tools.fuse_mount.py."""
import datetime
import os
import threading
import time
# pylint: disable=unused-import, g-bad-import-order
from grr.lib import server_plugins
# pylint: enable=unused-import, g-bad-import-order
from grr.lib import ... | apache-2.0 | 966,797,122,362,237,000 | 32.985294 | 80 | 0.643185 | false | 3.705901 | true | false | false |
jschaub30/workload_monitor | workload_monitor.py | 1 | 6005 | #!/usr/bin/python
'''
Usage:
workload_monitor.py CONFIG_FILENAME [-h | --help]
'''
import sys
import os
import re
import socket
from docopt import docopt
import shutil
from datetime import datetime
def main(config_fn):
''''''
# TODO: Do I need to pass around config?
config = read_config(config_fn)
... | apache-2.0 | 1,273,994,088,550,940,000 | 30.772487 | 87 | 0.584846 | false | 3.727498 | true | false | false |
liulion/mayavi | mayavi/modules/generic_module.py | 3 | 9695 | """
Defines a GenericModule which is a collection of mayavi
filters/components put together. This is very convenient and useful to
create new modules.
"""
# Author: Prabhu Ramachandran <prabhu [at] aero . iitb . ac . in>
# Copyright (c) 2008, Enthought, Inc.
# License: BSD Style.
# Enthought library imports.
from t... | bsd-3-clause | 6,321,323,747,296,528,000 | 36.145594 | 80 | 0.533058 | false | 4.768815 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.