repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
jimrybarski/fylm | fylm/model/location.py | 1 | 8092 | from fylm.model.base import BaseTextFile, BaseSet
from fylm.model.coordinates import Coordinates
from fylm.model.constants import Constants
from fylm.service.errors import terminal_error
from fylm.model.image_slice import ImageSlice
import logging
import re
log = logging.getLogger(__name__)
class LocationSet(BaseSet... | mit | 448,754,128,301,324,740 | 38.671569 | 112 | 0.571305 | false | 3.93963 | false | false | false |
progdupeupl/pdp_website | pdp/tutorial/feeds.py | 1 | 1869 | # coding: utf-8
#
# This file is part of Progdupeupl.
#
# Progdupeupl is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Progdu... | agpl-3.0 | 9,137,194,444,436,201,000 | 29.639344 | 77 | 0.70519 | false | 3.753012 | false | false | false |
bndl/bndl | bndl/compute/storage.py | 1 | 17623 | # 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 th... | apache-2.0 | -7,507,905,107,434,293,000 | 27.062102 | 109 | 0.576519 | false | 4.067159 | false | false | false |
uniomni/system_administration | revision_control/utilities.py | 1 | 6997 | """Utilities used with administration of revision control and TRAC
"""
import os
from config import filenames_updated, auth_filename, trac_header, trac_home, svn_header, svn_home
def run(s, verbose=True):
if verbose:
print s
err = os.system(s)
return err
def header(s):
dashes ... | gpl-3.0 | -3,151,587,897,537,363,500 | 26.439216 | 97 | 0.542232 | false | 3.975568 | false | false | false |
sergey-inform/sis3316 | sis3316/i2c.py | 1 | 2468 | # i2c interface functions
#
# This file is part of sis3316 python package.
#
# Copyright 2014 Sergey Ryzhikov <sergey-inform@ya.ru>
# IHEP @ Protvino, Russia
#
# 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 Softwar... | gpl-2.0 | 9,218,716,041,731,587,000 | 23.435644 | 104 | 0.652755 | false | 2.959233 | false | false | false |
google/intellij-protocol-buffer-editor | build_support/build_defs/stamp_plugin_xml.py | 1 | 8537 | #!/usr/bin/python
#
# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ag... | apache-2.0 | 2,236,200,105,753,735,200 | 32.347656 | 80 | 0.694038 | false | 3.829969 | false | false | false |
DTailor/trolly | trolly/faver/management/commands/import_data.py | 1 | 2985 | # -*- coding: utf8 -*-
import os
from django.core.management.base import BaseCommand
from faver.models import Station, Route, StationStop, StopTime
from datetime import datetime
import xlrd
DATA_DIR = "rtec_data/"
MON_FRI = range(1, 9)
SAT = range(9, 16)
SUN = range(16, 22)
class Command(BaseCommand):
help = '... | mit | -8,818,590,488,373,098,000 | 30.755319 | 127 | 0.608375 | false | 3.431034 | false | false | false |
RNAcentral/rnacentral-import-pipeline | tests/databases/ena/dr_test.py | 1 | 1610 | # -*- coding: utf-8 -*-
"""
Copyright [2009-2017] EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by... | apache-2.0 | -4,021,371,694,315,866,600 | 35.590909 | 75 | 0.679503 | false | 2.948718 | false | false | false |
arokem/AFQ-notebooks | tools.py | 1 | 6112 | import numpy as np
from dipy.align.metrics import CCMetric, EMMetric, SSDMetric
from dipy.align.imwarp import SymmetricDiffeomorphicRegistration
from dipy.align.imaffine import (transform_centers_of_mass,
AffineMap,
MutualInformationMetric,
... | mit | -432,233,465,145,384,640 | 39.746667 | 86 | 0.570681 | false | 4.52071 | false | false | false |
samdroid-apps/sugar-toolkit-gtk3 | src/sugar3/presence/buddy.py | 1 | 8292 | # Copyright (C) 2007, Red Hat, Inc.
# Copyright (C) 2010 Collabora Ltd. <http://www.collabora.co.uk/>
#
# This library 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; either
# version 2 of the License, ... | lgpl-2.1 | -9,027,443,757,242,744,000 | 32.435484 | 76 | 0.620839 | false | 3.956107 | false | false | false |
lhaze/anires_www | anires/core/models/links.py | 1 | 2241 |
# A couple of abstract classes that contain commonly used fields
from django.db import models
from wagtail.wagtailcore.models import Page, Orderable
from wagtail.wagtailcore.fields import RichTextField
from wagtail.wagtailadmin.edit_handlers import FieldPanel, MultiFieldPanel, \
InlinePanel, PageChooserPanel
fro... | mit | 6,474,760,433,005,253,000 | 25.05814 | 77 | 0.666667 | false | 4.089416 | false | false | false |
brian-team/brian2cuda | examples/brunelhakim.py | 1 | 5657 | """
Dynamics of a network of sparsely connected inhibitory current-based
integrate-and-fire neurons. Individual neurons fire irregularly at
low rate but the network is in an oscillatory global activity regime
where neurons are weakly synchronized.
Reference:
"Fast Global Oscillations in Networks of Integrate-and-F... | gpl-2.0 | 6,269,968,367,128,260,000 | 29.578378 | 101 | 0.659537 | false | 3.591746 | false | false | false |
rutsky/letsencrypt | letsencrypt/tests/reporter_test.py | 29 | 2928 | """Tests for letsencrypt.reporter."""
import StringIO
import sys
import unittest
class ReporterTest(unittest.TestCase):
"""Tests for letsencrypt.reporter.Reporter."""
def setUp(self):
from letsencrypt import reporter
self.reporter = reporter.Reporter()
self.old_stdout = sys.stdout
... | apache-2.0 | 4,855,062,774,748,629,000 | 31.175824 | 79 | 0.63388 | false | 3.978261 | true | false | false |
hdeling/sofa | applications/plugins/Compliant/examples/pid-simple.py | 11 | 3786 | import Sofa
import math
from Compliant import Rigid, Frame
# global structure for passing data to controller
class ControlData:
pass
global control
control = ControlData
def createScene(node):
node.createObject('RequiredPlugin', pluginName = 'Compliant')
node.animate = 'true'
node.createObje... | lgpl-2.1 | 5,227,245,378,145,446,000 | 27.044444 | 121 | 0.561543 | false | 3.312336 | false | false | false |
arocchi/Klampt | Python/klampt/glprogram.py | 1 | 15567 | """This module defines convenient classes for building 3D GUI programs
over OpenGL (GLUT).
- GLProgram takes care of basic user input.
- GLNavigationProgram allows 3D navigation with the mouse.
- GLRealtimeProgram calls a subclass-defined idle() function roughly on a
constant time step.
"""
from OpenGL.GL import *
... | bsd-3-clause | 6,352,862,939,314,133,000 | 33.825503 | 126 | 0.599987 | false | 3.666274 | false | false | false |
abulimov/lyricstagger | lyricstagger/engine.py | 1 | 3077 | from threading import Thread
import typing
import click
import lyricstagger.log as log
import lyricstagger.misc as misc
from queue import Queue
ActionType = typing.Callable[[log.CliLogger, str], None]
class ActionThread(Thread):
"""Thread to perform action"""
def __init__(self, logger: log.CliLogger, action... | mit | -5,258,366,561,281,229,000 | 33.965909 | 88 | 0.586935 | false | 4.038058 | false | false | false |
eduNEXT/edx-platform | openedx/core/djangoapps/waffle_utils/__init__.py | 3 | 3831 | """
Extra utilities for waffle: most classes are defined in edx_toggles.toggles (https://edx-toggles.readthedocs.io/), but
we keep here some extra classes for usage within edx-platform. These classes cover course override use cases.
"""
import logging
import warnings
from contextlib import contextmanager
from edx_djan... | agpl-3.0 | 2,828,250,362,036,142,000 | 39.326316 | 118 | 0.67006 | false | 4.20989 | false | false | false |
Petr-By/qtpyvis | qtgui/widgets/activationview.py | 1 | 32132 | """Widgets for displaying network activations.
"""
# standard imports
from typing import Tuple
import math
import logging
# third party imports
import numpy as np
# Qt imports
from PyQt5.QtCore import Qt, QPoint, QRect, QSize, QMargins, pyqtSignal
from PyQt5.QtGui import (QPainter, QImage, QPen, QColor, QBrush,
... | mit | 139,223,163,429,275,150 | 36.189815 | 79 | 0.582161 | false | 4.590286 | false | false | false |
googlei18n/glyphsLib | Lib/glyphsLib/builder/custom_params.py | 1 | 29839 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 2,372,795,787,779,184,600 | 35.883807 | 88 | 0.661785 | false | 3.646462 | false | false | false |
iorichina/py-mysql-test | scp.py | 7 | 16240 | # scp.py
# Copyright (C) 2008 James Bardin <j.bardin@gmail.com>
"""
Utilities for sending files over ssh using the scp1 protocol.
"""
__version__ = '0.10.2'
import locale
import os
import re
from socket import timeout as SocketTimeout
# this is quote from the shlex module, added in py3.3
_find_unsafe = re.compile(... | apache-2.0 | -1,460,704,460,777,438,500 | 33.553191 | 79 | 0.533313 | false | 4.055944 | false | false | false |
mbollmann/perceptron | mmb_perceptron/feature_extractor/pos_honnibal.py | 1 | 2854 | # -*- coding: utf-8 -*-
from .feature_extractor import FeatureExtractor
class Honnibal(FeatureExtractor):
"""Feature extractor based on the POS tagger by Matthew Honnibal.
<https://honnibal.wordpress.com/2013/09/11/a-good-part-of-speechpos-tagger-in-about-200-lines-of-python/>
"""
_minimum_left_conte... | mit | 5,842,612,514,033,417,000 | 42.907692 | 109 | 0.481079 | false | 3.303241 | false | false | false |
xmnlab/pyxmn | utils/buffer.py | 1 | 1377 | # -*- coding: utf-8 -*-
"""
"""
class RingBuffer(object):
""" class that implements a not-yet-full buffer """
def __init__(self, size_max):
self.max = size_max
self.data = []
class __Full(object):
""" class that implements a full buffer """
def append(self, x):
... | gpl-3.0 | 8,564,794,347,449,008,000 | 23.589286 | 72 | 0.532317 | false | 3.503817 | false | false | false |
mmbash/mopsicli | mopsicli.py | 1 | 6689 | import click
import json
import sys
import requests
from termcolor import colored
from marathon.models import MarathonApp
from marathon.models.container import MarathonContainer
from marathon.models.container import MarathonDockerContainer
from marathon.models.container import MarathonContainerPortMapping
from marathon... | gpl-2.0 | -290,033,171,686,337,600 | 25.543651 | 156 | 0.693826 | false | 3.082488 | false | false | false |
raiden-network/raiden | raiden/tests/integration/test_recovery.py | 1 | 11250 | import gevent
import pytest
from raiden import waiting
from raiden.api.python import RaidenAPI
from raiden.constants import RoutingMode
from raiden.message_handler import MessageHandler
from raiden.network.transport import MatrixTransport
from raiden.raiden_event_handler import RaidenEventHandler
from raiden.raiden_se... | mit | 5,911,521,667,643,326,000 | 31.991202 | 99 | 0.691467 | false | 3.654971 | true | false | false |
miguel95/reposmma | miguelma/app/personaMain.py | 1 | 1872 | #coding: utf-8
'''
Created on 19/1/2015
@author: PC30
'''
from app import app
from ec.edu.itsae.dao import PersonaDao
from flask import render_template, request, redirect, url_for
@app.route("/mainpersona")
def personamain():
objR=PersonaDao.PersonaDao().reportarPersona()#llamar al reporte
return render_temp... | gpl-2.0 | 3,041,467,251,347,844,600 | 36.44 | 126 | 0.731838 | false | 2.823529 | false | false | false |
ktsstudio/aiokts | aiokts/store/models/__init__.py | 1 | 6721 | import collections
import logging
import datetime
from aiokts.util.json_utils import JsonSerializable
class Field:
def __init__(self, default, private):
self.name = None
self.model = None
self.default = default
self.private = private
def transform_in(self, value):
r... | mit | -1,961,549,291,291,503,400 | 28.60793 | 79 | 0.524327 | false | 4.28362 | false | false | false |
JackKelly/neuralnilm_prototype | scripts/e447.py | 2 | 7517 | from __future__ import print_function, division
import matplotlib
import logging
from sys import stdout
# matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
import matplotlib.pyplot as plt
from neuralnilm import (Net, RealApplianceSource,
BLSTMLayer, DimshuffleLayer,
... | mit | -1,960,191,072,684,245,000 | 31.123932 | 133 | 0.611946 | false | 3.20828 | false | false | false |
agry/NGECore2 | scripts/conversation/quests/tatooine/brokerbarak.py | 2 | 2042 | from resources.common import ConversationOption
from resources.common import OutOfBand
from resources.common import ProsePackage
from java.util import Vector
import sys
def startConversation(core, actor, npc):
player = actor.getPlayerObject()
if player is None:
return
quest = player.getQuest('smuggle_generic_1')
... | lgpl-3.0 | 3,685,479,501,715,960,300 | 47.619048 | 125 | 0.786484 | false | 3.195618 | false | false | false |
rosarior/rua | rua/apps/api/views.py | 2 | 2001 | from __future__ import absolute_import
import logging
from django.contrib.auth.models import User, Group
from rest_framework import generics
from rest_framework import renderers
from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.reverse import reverse
fro... | gpl-3.0 | 187,951,173,773,428,380 | 25.328947 | 70 | 0.777611 | false | 4.177453 | false | false | false |
foxbunny/seagull | seagull/cmdline/static_site.py | 1 | 2047 | #
# Seagull photo gallery app
# Copyright (C) 2016 Hajime Yamasaki Vukelic
#
# 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
# ver... | gpl-3.0 | -5,772,624,032,944,615,000 | 28.242857 | 79 | 0.67318 | false | 3.535406 | false | false | false |
Geoion/pomegranate | examples/bayesnet_monty_hall_classic.py | 1 | 3590 | # Monty Hall Bayes Net Test
# Contact: Jacob Schreiber
# jmschr@cs.washington.edu
'''
Lets test out the Bayesian Network framework to produce the Monty Hall problem,
but modified a little. The Monty Hall problem is basically a game show where a
guest chooses one of three doors to open, with an unknown one hav... | mit | -7,078,183,396,014,212,000 | 32.877358 | 108 | 0.570474 | false | 2.551528 | false | false | false |
dceoy/dotfiles | lib/utilize.py | 2 | 1802 | #!/usr/bin/env python
from __future__ import with_statement
import re
from fabric.api import sudo, run, env, put, task
from fabric.contrib.files import exists
@task
def zsh(zshrc='dotfile/zshrc'):
put(zshrc, '~/.zshrc')
if not re.match(r'.*\/zsh$', run("echo $SHELL")):
sudo("chsh -s $(grep -e '\/zsh$... | mit | 8,602,408,786,766,794,000 | 30.614035 | 96 | 0.600444 | false | 2.746951 | true | false | false |
ermo/privateer_wcu | modules/GUI.py | 1 | 54066 | from XGUIDebug import *
import Base
import VS
import collections
GUIRootSingleton = None
_doWhiteHack = 1
_GUITraceLevel = TRACE_DEBUG
"""----------------------------------------------------------------"""
""" """
""" GUIRoot - root management interface ... | gpl-2.0 | 7,956,048,225,542,640,000 | 39.897126 | 251 | 0.51439 | false | 3.983936 | false | false | false |
phil-el/phetools | ocr/queue_build_djvu_from_ocr_rate.py | 1 | 1251 | # -*- coding: utf-8 -*-
#
# @file queue_ocr.py
#
# @remark Copyright 2014 Philippe Elie
# @remark Read the file COPYING
#
# @author Philippe Elie
import sys
import os
from jobs import sge_jobs
def add_request(lang, filenames):
job_req = {
'jobname' : 'build_djvu',
'run_cmd' : 'python',
'fo... | gpl-3.0 | 5,176,000,304,479,311,000 | 20.947368 | 62 | 0.532374 | false | 3.309524 | false | false | false |
fabawi/QuestionAnswering | qa/answering_engines/simple_search/simple_search_engine.py | 1 | 2388 |
from nltk.corpus import stopwords
import qa.pre_processing.sentence_tokenization as sentence_tokenization
import qa.pre_processing.word_tokenization as word_tokenization
import qa.score_board as score_board
import qa.pre_processing.word_exclusion as word_exclusion
class AnswerEngine:
def __init__(self, categoriz... | mit | -5,366,582,735,122,748,000 | 38.163934 | 108 | 0.626884 | false | 4.082051 | false | false | false |
Rdbaker/WordFor | wordfor/api/v1/search/views.py | 1 | 1350 | # -*- coding: utf-8 -*-
"""Search views."""
from flask import Blueprint, request, jsonify
from wordfor.api.v1.search.models import Search
from wordfor.api.v1.search.schema import SearchSchema
from wordfor.extensions import db
from wordfor.lookup.seeker import Seeker
blueprint = Blueprint('search', __name__, url_prefi... | bsd-3-clause | 6,025,361,549,147,155,000 | 32.75 | 79 | 0.674074 | false | 3.6 | false | false | false |
Gainzzz/backend | gainzzz/muscles/models.py | 1 | 1036 | from django.db import models
class Muscle(models.Model):
name = models.CharField(max_length=200)
description = models.CharField(max_length=500)
image = models.CharField(max_length=500, default="")
def __str__(self):
return self.name
class Exercises(models.Model):
name = models.CharField... | apache-2.0 | -668,523,550,224,344,200 | 24.9 | 56 | 0.671815 | false | 3.622378 | false | false | false |
vojtechtrefny/recsys | scripts.py | 1 | 4174 | # -*- coding: utf-8 -*-
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions of
# the GNU General Public License v.2, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but W... | gpl-3.0 | 4,880,104,607,923,756,000 | 34.07563 | 80 | 0.60254 | false | 3.76036 | false | false | false |
duncanwp/cis_plugins | modis_lst.py | 1 | 3670 | from cis.data_io.products.MODIS import MODIS_L2, _get_MODIS_SDS_data
import logging
from cis.data_io import hdf as hdf
from cis.data_io.Coord import Coord, CoordList
class MODIS_LST(MODIS_L2):
def get_file_signature(self):
product_names = ['MYD11_L2']
regex_list = [r'.*' + product + '.*\.hdf' for... | lgpl-3.0 | 9,103,454,524,258,124,000 | 37.229167 | 88 | 0.598093 | false | 3.542471 | false | false | false |
modesttree/Zenject | Build/python/mtm/util/tests/TestVarManager.py | 3 | 1403 |
import unittest
import mtm.ioc.Container as Container
from mtm.ioc.Inject import Inject
import mtm.ioc.IocAssertions as Assertions
from mtm.config.ConfigLoaderHardCoded import ConfigLoaderHardCoded
from mtm.config.Config import Config
from mtm.util.Assert import *
from mtm.util.VarManager import VarManager
class T... | mit | 8,546,732,973,506,951,000 | 27.632653 | 86 | 0.620813 | false | 3.615979 | true | false | false |
e02d96ec16/CumulusCI | cumulusci/tasks/release_notes/parser.py | 1 | 9320 | import re
import os
from cumulusci.core.exceptions import GithubApiNotFoundError
from exceptions import GithubIssuesError
class BaseChangeNotesParser(object):
def __init__(self, title):
self.title = title
self.content = []
def parse(self):
raise NotImplementedError()
def render... | bsd-3-clause | -7,051,167,788,100,532,000 | 31.816901 | 84 | 0.551931 | false | 4.041631 | false | false | false |
fre-sch/flubber | model.py | 1 | 3526 | # -*- coding: utf-8 -*-
from PyQt5.QtCore import *
from PyQt5.QtGui import *
from PyQt5.QtNetwork import *
import elasticsearch
from functools import partial
import json
class QueryResultListModel(QAbstractItemModel):
sort_dir = {
Qt.AscendingOrder: "asc",
Qt.DescendingOrder: "desc",
}
qu... | mit | -3,319,573,010,332,744,700 | 27.901639 | 73 | 0.58253 | false | 4.04822 | false | false | false |
h4ck3rm1k3/swimming | getmasters.py | 1 | 1773 | import requests
import os
import json
import pprint
import time
def get(city,state):
if city is None :
return None
f = "data2/%s_%s" % (city,state)
if not os.path.exists(f):
url = "http://www.usms.org/placswim/mapsearch.php?action=f2&dist=25&address=&city={city}&state={state}&units=mi".... | gpl-2.0 | 5,946,594,261,851,286,000 | 24.695652 | 157 | 0.548223 | false | 3.469667 | false | false | false |
klahnakoski/SpotManager | vendor/jx_elasticsearch/meta_columns.py | 1 | 18002 | # 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/.
#
# Contact: Kyle Lahnakoski (kyle@lahnakoski.com)
#
from __future__ import absolute_import, divisi... | mpl-2.0 | 8,982,357,444,188,351,000 | 35.004 | 121 | 0.460004 | false | 4.34621 | false | false | false |
eapsouz/wifi-mqtt-startup | test/python/board-mock.py | 1 | 1529 | #!/usr/bin/env python3
# See http://www.eclipse.org/paho/ for more info
import paho.mqtt.client as mqtt
import time # is money!!!
MQTT_HOST = "localhost" # Change for your setup
MQTT_PORT = 1883 # Change for your setup
MQTT_TOPIC_FUTURE = "led/future" # Change for your setup
MQTT_TOPIC_CURRENT... | mit | -5,254,486,440,010,002,000 | 34.581395 | 76 | 0.697188 | false | 3.316703 | false | false | false |
pvvx/RTL00_WEB | USDK/flasher/add_sample_bat/jlinkarm.py | 1 | 3010 | import ctypes
_jl = None
def loadJLinkARMdll(lib_str):
global _jl
_jl = ctypes.cdll.LoadLibrary(lib_str)
if _jl:
return _jl
else:
raise RuntimeError('JLink ARM dynamic library is not loaded')
def _jlink():
if _jl:
return _jl
else:
raise RuntimeError('JLink ARM ... | unlicense | 5,561,368,150,669,479,000 | 25.637168 | 87 | 0.622259 | false | 2.847682 | false | false | false |
phiros/nepi | examples/dce/wrapped_local_p2p_ccncat.py | 1 | 4718 | #!/usr/bin/env python
#
# NEPI, a framework to manage network experiments
# Copyright (C) 2013 INRIA
#
# 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 Lice... | gpl-3.0 | -353,167,719,988,661,200 | 30.453333 | 74 | 0.686308 | false | 2.680682 | false | false | false |
ANR-kamoulox/Telemeta | telemeta/views/profile.py | 1 | 3516 | # -*- coding: utf-8 -*-
# Copyright (C) 2007-2010 Samalyse SARL
# Copyright (C) 2010-2012 Parisson SARL
# This file is part of Telemeta.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, ... | agpl-3.0 | -2,088,368,930,095,824,400 | 44.076923 | 111 | 0.636519 | false | 4.093132 | false | false | false |
york-2015/yowsup | yowsup/layers/interface/interface.py | 27 | 3897 | from yowsup.layers import YowLayer, YowLayerEvent
from yowsup.layers.protocol_iq.protocolentities import IqProtocolEntity
from yowsup.layers.network import YowNetworkLayer
from yowsup.layers.auth import YowAuthenticationProtocolLayer
from yowsup.layers.protocol_receipts.protocolentities import OutgoingReceiptProtocolEn... | gpl-3.0 | -915,326,802,494,942,700 | 36.471154 | 120 | 0.645625 | false | 3.912651 | false | false | false |
saurabh6790/frappe | frappe/hooks.py | 1 | 14526 | from __future__ import unicode_literals
from . import __version__ as app_version
app_name = "frappe"
app_title = "Frappe Framework"
app_publisher = "Frappe Technologies"
app_description = "Full stack web framework with Python, Javascript, MariaDB, Redis, Node"
app_icon = "octicon octicon-circuit-board"
app_color = "o... | mit | 5,950,054,097,519,014,000 | 36.534884 | 124 | 0.720157 | false | 2.954841 | false | true | false |
edx/bok-choy | tests/test_delay.py | 1 | 1138 | """
Test waiting for elements to appear after a delay.
"""
from bok_choy.web_app_test import WebAppTest
from bok_choy.promise import BrokenPromise
from .pages import DelayPage, SlowPage
class DelayTest(WebAppTest):
"""
Test waiting for elements to appear after a delay.
"""
def setUp(self):
su... | apache-2.0 | 4,698,312,296,115,874,000 | 23.73913 | 69 | 0.622144 | false | 3.83165 | true | false | false |
Acidity/PyPermissions | pypermissions/factory.py | 1 | 2758 | from pypermissions.permission import Permission
class PermissionFactory(object):
"""General factory for creating permissions. Will select the correct permission type for the provided string and
return that."""
def __init__(self, delimiter=".", wildcard="*", prefix="", templates=None):
"""Allo... | mit | 5,641,672,599,840,932,000 | 40.787879 | 120 | 0.65591 | false | 5.023679 | false | false | false |
lautr3k/RepRap-iTopie | odmt/ezdxf/templates.py | 3 | 1065 | # Purpose: template file management
# Created: 11.03.2011
# Copyright (C) 2011, Manfred Moitzi
# License: MIT License
from __future__ import unicode_literals
__author__ = "mozman <mozman@gmx.at>"
import os
import io
class TemplateFinder:
def __init__(self, template_dir=None):
self._template_dir = self._ge... | gpl-3.0 | 2,339,678,971,518,285,000 | 28.583333 | 74 | 0.662911 | false | 3.538206 | false | false | false |
eclee25/flu-SDI-exploratory-age | scripts/create_fluseverity_figs/F6_incid_time_CA_mildmodsev.py | 1 | 4598 | #!/usr/bin/python
##############################################
###Python template
###Author: Elizabeth Lee
###Date: 7/4/14
###Function: child and adult incidence per 100,000 over time in an example mild, moderate, and severe season.
#### Compare the relative contributions of adult and child incidence during that se... | mit | 1,250,850,888,727,829,500 | 32.079137 | 193 | 0.658765 | false | 2.544549 | false | false | false |
RTHMaK/RPGOne | deep_qa-master/tests/layers/backend/batch_dot_test.py | 1 | 12506 | # pylint: disable=no-self-use,invalid-name
import numpy
from numpy.testing import assert_almost_equal
import keras.backend as K
from keras.layers import Input, Masking
from keras.models import Model
from deep_qa.layers.backend.batch_dot import BatchDot
from deep_qa.layers.wrappers.output_mask import OutputMask
from ..... | apache-2.0 | 397,917,617,008,972,540 | 50.677686 | 105 | 0.48009 | false | 3.415074 | true | false | false |
openstack/manila-ui | manila_ui/dashboards/admin/share_servers/views.py | 1 | 3528 | # Copyright 2012 Nebula, 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 agree... | apache-2.0 | 2,653,379,081,210,427,400 | 37.769231 | 78 | 0.662132 | false | 3.977452 | false | false | false |
minoTour/minoTour | mT_server/nefario/mT_coverage.py | 1 | 21736 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# --------------------------------------------------
# File Name: mT_coverage.py
# Purpose:
# Creation Date: 10-06-2016
# Last Modified: Sun, Jan 15, 2017 10:55:48 PM
# Author(s): The DeepSEQ Team, University of Nottingham UK
# Copyright 2016 The Author(s) All Rights ... | gpl-3.0 | -320,917,075,302,382,460 | 30.153846 | 145 | 0.464851 | false | 4.013294 | false | false | false |
praekelt/jmbo-foundry | foundry/migrations/0061_auto__add_field_page_description.py | 1 | 33528 | # -*- 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):
# Adding field 'Page.description'
db.add_column('foundry_page', 'description',
self.gf... | bsd-3-clause | 182,568,551,732,139,520 | 87.46438 | 215 | 0.548049 | false | 3.646726 | false | false | false |
MDSLab/s4t-iotronic | iotronic/api/controllers/v1/board.py | 1 | 19462 | # 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 u... | apache-2.0 | -7,606,695,653,753,400,000 | 36.863813 | 79 | 0.570085 | false | 4.229031 | false | false | false |
redhat-openstack/trove | trove/taskmanager/manager.py | 1 | 20742 | # Copyright 2011 OpenStack Foundation
# 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 requ... | apache-2.0 | 8,366,903,942,638,397,000 | 46.356164 | 78 | 0.554913 | false | 4.761708 | true | false | false |
jessepinnell/xrsrv | python/setup.py | 1 | 1678 | #!/usr/bin/env python3
# -*- coding: UTF-8 -*-
# Copyright (c) 2017 Jesse Pinnell
# 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... | mit | -7,575,474,698,680,338,000 | 40.95 | 105 | 0.74553 | false | 3.976303 | false | false | false |
aphelionz/dingdongdash | core/migrations/0006_auto_20170329_0318.py | 2 | 1351 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.6 on 2017-03-29 03:18
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0005_auto_20170329_0313'),
]
operations = [
migrations.RemoveField(... | gpl-2.0 | 9,118,674,317,611,666,000 | 31.166667 | 124 | 0.579571 | false | 4.208723 | false | false | false |
simonolander/euler | euler-329-prime-frog.py | 1 | 1162 | from sympy import isprime, Rational
from Primer import average
"""
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
P P P P N N P P P N P P N P N
"""
length = 500
correct_croaks = ['P', 'P', 'P', 'P', 'N', 'N', 'P', 'P', 'P', 'N', 'P', 'P', 'N', 'P', 'N']
def neighbor_positions(position):
if p... | mit | -6,825,410,458,175,203,000 | 22.714286 | 133 | 0.542169 | false | 2.862069 | false | false | false |
stscieisenhamer/glue | glue/viewers/matplotlib/qt/data_viewer.py | 1 | 4960 | from __future__ import absolute_import, division, print_function
from glue.viewers.common.qt.data_viewer_with_state import DataViewerWithState
from glue.viewers.matplotlib.qt.widget import MplWidget
from glue.viewers.common.viz_client import init_mpl, update_appearance_from_settings
from glue.external.echo import dela... | bsd-3-clause | -6,686,820,566,251,339,000 | 37.75 | 84 | 0.649194 | false | 3.485594 | false | false | false |
RedhawkSDR/throughput | benchmark/utils.py | 1 | 1835 | #
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of REDHAWK throughput.
#
# REDHAWK throughput is free software: you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published ... | lgpl-3.0 | -43,414,529,885,141,670 | 29.081967 | 85 | 0.653406 | false | 3.468809 | false | false | false |
Hopkins1/TradSimpChinese | resources/utilities.py | 1 | 2306 | from __future__ import (unicode_literals, division, absolute_import,
print_function)
"""
----------------------------
NOTE:
The "tokenize" function given below was taken from the file
"smartypants.py" which was part of the Calibre plugin
"diaps_toolbag"
----------------------------
--... | gpl-3.0 | 100,762,152,684,429,420 | 31.42029 | 74 | 0.509107 | false | 3.725363 | false | false | false |
tumbl3w33d/ansible | lib/ansible/modules/cloud/google/gcp_dns_managed_zone_info.py | 13 | 9885 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2017 Google
# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
# ----------------------------------------------------------------------------
#
# *** AUTO GENERATED CODE *** AUTO GENERATED CODE ***
#
... | gpl-3.0 | 8,825,620,062,355,934,000 | 32.622449 | 133 | 0.59737 | false | 4.640845 | false | false | false |
neurospin/pylearn-epac | epac/configuration.py | 1 | 2219 | # -*- coding: utf-8 -*-
"""
Created on Thu May 23 10:04:34 2013
@author: edouard.duchesnay@cea.fr
"""
## ================================= ##
## == Configuration class == ##
## ================================= ##
import numpy as np
class conf:
TRACE_TOPDOWN = False
REDUCE_TAB_FILENAME = "reduce_tab... | bsd-3-clause | 7,358,494,519,946,099,000 | 31.15942 | 77 | 0.5516 | false | 3.282544 | false | false | false |
Signbank/NGT-signbank | signbank/pages/migrations/0001_initial.py | 1 | 3466 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2017-03-17 09:59
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0007_alter_validators_add_error_me... | bsd-3-clause | -2,792,210,975,739,873,300 | 53.15625 | 279 | 0.610502 | false | 4.087264 | false | false | false |
agincel/AdamTestBot | src/atbLikes.py | 1 | 5846 | import requests
import time
import sys
import datetime
import csv
import random
import re
import json
import traceback
import os
import telegram
def handleLikes(isLiking, currentMessage):
try:
#get disliked comment ID
likedID = currentMessage.reply_to_message.message_id
li... | mit | 2,966,710,624,347,513,300 | 42.287879 | 196 | 0.482381 | false | 4.282784 | false | false | false |
pauljohnleonard/pod-world | 04_tester.py | 1 | 1714 | #
# This program can be used to verify your code before submission
#
# your code should live in a subdirectory of punters matching your user name
# This code attempts to load plugin.py
#
# For the module loading to work you need a file called __init__.py in your plugin folder and the punters folder.
#
# BY default t... | gpl-2.0 | 5,183,101,570,438,713,000 | 18.701149 | 115 | 0.648191 | false | 3.093863 | false | false | false |
adfinis-sygroup/timed-backend | timed/employment/views.py | 1 | 12903 | """Viewsets for the employment app."""
import datetime
from django.contrib.auth import get_user_model
from django.db.models import CharField, DateField, IntegerField, Q, Value
from django.db.models.functions import Concat
from django.shortcuts import get_object_or_404
from django.utils.translation import gettext_lazy ... | agpl-3.0 | 7,172,983,757,324,320,000 | 32.084615 | 86 | 0.619856 | false | 4.375381 | false | false | false |
simpeg/simpegmt | simpegMT/Utils/srcUtils.py | 1 | 1961 | import SimPEG as simpeg, numpy as np
def homo1DModelSource(mesh,freq,m_back):
'''
Function that calculates and return background fields for a 3D mesh and model.
The calculuations use 1D field solution for a vertical slice throught model (south-western most column),
which is assigned at the ... | mit | -4,396,456,367,771,337,000 | 41.652174 | 112 | 0.644059 | false | 2.953313 | false | false | false |
RedHots2015/glowing-bugfixes | algorithm.py | 1 | 3121 | #!/usr/bin/env python
from app import Mole, db
import sys
print('hello')
id = sys.argv[1]
# coding: utf-8
# In[35]:
import numpy as np
from skimage import io
# In[36]:
mole = Mole.query.filter(Mole.id == id).first()
image = io.imread('uploads/' + mole.filename)
mole.status = 10
db.session.merge(mole)
db.ses... | mit | 3,535,405,623,971,717,600 | 15.426316 | 67 | 0.692086 | false | 2.594347 | false | false | false |
opennode/nodeconductor-saltstack | src/nodeconductor_saltstack/sharepoint/serializers.py | 1 | 11361 | from rest_framework import serializers
from nodeconductor.core.serializers import AugmentedSerializerMixin
from nodeconductor.quotas.serializers import BasicQuotaSerializer
from nodeconductor.structure import serializers as structure_serializers
from ..saltstack.models import SaltStackServiceProjectLink
from ..saltst... | mit | 740,298,132,394,591,500 | 44.083333 | 120 | 0.669923 | false | 4.306672 | false | false | false |
iut-ibk/DynaMind-UrbanSim | 3rdparty/opus/src/opus_matsim/sustain_city/models/archive/run_travel_model_bkp.py | 2 | 10541 | # Opus/UrbanSim urban simulation software.
# Copyright (C) 2005-2009 University of Washington
# See opus_core/LICENSE
from opus_core.logger import logger
from opus_core.resources import Resources
from travel_model.models.abstract_travel_model import AbstractTravelModel
import os
from opus_matsim.sustain_city.... | gpl-2.0 | -6,090,381,659,598,044,000 | 45.269058 | 275 | 0.617209 | false | 3.918587 | true | false | false |
nav/presence | presence/apps/whiteboard/consumers.py | 1 | 1436 | import json
import random
import hashlib
from django.core.cache import cache
from django.http.request import QueryDict
from django.contrib.auth import get_user_model
from django_comments.models import Comment
from channels import Group
from channels.auth import http_session_user, channel_session_user, channel_session_u... | mit | 8,048,853,509,944,020,000 | 34.9 | 97 | 0.596797 | false | 4.27381 | false | false | false |
glenn124f/treeherder | treeherder/model/fields.py | 2 | 1239 | import django
from django.db import models
# Django doesn't support big auto fields out of the box, see
# https://code.djangoproject.com/ticket/14286.
# This is a stripped down version of the BoundedBigAutoField from Sentry.
# TODO: Remove once using Django 1.10, since it has native support.
class BigAutoField(models... | mpl-2.0 | -5,703,414,577,234,939,000 | 33.416667 | 73 | 0.677159 | false | 4.13 | false | false | false |
HybridF5/tempest | tempest/tests/cmd/test_verify_tempest_config.py | 2 | 18764 | # Copyright 2014 IBM Corp.
#
# 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 t... | apache-2.0 | 4,731,429,723,175,846,000 | 47.611399 | 79 | 0.575357 | false | 4.018848 | true | false | false |
jedrennen/pyklondike | tests/suitPile_tests.py | 1 | 1247 | from nose.tools import *
from PyKlondike.playingCard import PlayingCard
from PyKlondike.cardPile import CardPile
from PyKlondike.suitPile import SuitPile
def test_can_take_returns_true_if_pile_is_empty_and_card_is_an_ace():
pile = SuitPile()
card = PlayingCard('A', 's')
result = pile.can_take(card)
assert_true(r... | mit | 6,421,759,386,207,336,000 | 15.407895 | 69 | 0.698476 | false | 2.407336 | false | false | false |
arctelix/django-notification-automated | notification/backends/__init__.py | 1 | 2030 | import sys
from django.conf import settings
from django.core import exceptions
from base import BaseBackend
from django.template.loader import render_to_string
from django.template import Context
def format_notification(template, label, context):
'''
Formats a notification to a specific template format.
... | mit | -2,895,952,730,206,594,600 | 38.803922 | 117 | 0.648768 | false | 4.53125 | false | false | false |
kbeckmann/Annalog | google.py | 1 | 1410 | import re
import time
import json
import urllib
import urllib2
import HTMLParser
import collections
import sys
class Google():
def __init__(self, mucbot):
self.mucbot = mucbot
def google(self, q):
data = json.load(urllib2.urlopen("http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=%s"... | mit | -7,886,894,229,036,473,000 | 26.647059 | 130 | 0.570213 | false | 3.333333 | false | false | false |
mrcyberfighter/SnakeByte | SnakeByte/Source/SnakeByte.py | 1 | 90336 | # -*- coding: utf-8 -*-
############################################################################
# This programm is under copyright from the GPL GNU GENERAL PUBLIC LICENSE #
############################################################################
import pygame
from pygame.locals import *
from sys import exit
... | gpl-3.0 | 8,027,118,503,469,546,000 | 35.677223 | 610 | 0.659338 | false | 2.964752 | false | false | false |
proxysh/Safejumper-for-Desktop | buildlinux/env32/lib/python2.7/site-packages/twisted/test/test_twisted.py | 13 | 18859 | # Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.
"""
Tests for miscellaneous behaviors of the top-level L{twisted} package (ie, for
the code in C{twisted/__init__.py}.
"""
from __future__ import division, absolute_import
import sys
import twisted
from types import ModuleType, FunctionType
fr... | gpl-2.0 | -4,835,783,477,376,642,000 | 32.437943 | 86 | 0.60788 | false | 4.402194 | true | false | false |
alex/changes | changes/models/build.py | 1 | 3114 | from __future__ import absolute_import
import uuid
from datetime import datetime
from sqlalchemy import Column, DateTime, ForeignKey, String, Text, Integer
from sqlalchemy.orm import relationship
from sqlalchemy.schema import Index, UniqueConstraint
from sqlalchemy.sql import func, select
from changes.config import ... | apache-2.0 | 7,390,307,074,422,414,000 | 39.441558 | 91 | 0.666988 | false | 4.007722 | false | false | false |
klocey/DiversityTools | PredRadDATA/PredRadDATA_MACRO.py | 1 | 2979 | from __future__ import division
import sys
import os
import random
import numpy as np
from scipy import stats
mydir = os.path.expanduser("~/Desktop/Repos/rare-bio")
sys.path.append(mydir + "/tools/feasible_functions")
import feasible_functions as ff
OUT = open(mydir + '/output/Macro-RADdata.txt','w+')
mydir2 = os.pat... | mit | -2,123,183,330,034,706,700 | 24.681034 | 97 | 0.438738 | false | 3.664207 | false | false | false |
globaleaks/Tor2web | tor2web/utils/misc.py | 1 | 1689 | """
:mod:`Tor2Web`
=====================================================
.. automodule:: Tor2Web
:synopsis: [GLOBALEAKS_MODULE_DESCRIPTION]
.. moduleauthor:: Arturo Filasto' <art@globaleaks.org>
.. moduleauthor:: Giovanni Pellerano <evilaliv3@globaleaks.org>
"""
# -*- coding: utf-8 -*-
import re
import socket
... | agpl-3.0 | -7,284,261,455,701,400,000 | 25.390625 | 75 | 0.622262 | false | 3.632258 | false | false | false |
googleapis/python-vision | google/cloud/vision_v1p1beta1/types/web_detection.py | 1 | 5749 | # -*- coding: utf-8 -*-
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or... | apache-2.0 | -5,018,539,813,644,972,000 | 39.77305 | 106 | 0.631414 | false | 4.306367 | false | false | false |
kdmurray91/radhax | radsim/radsim/test/test_radsim_digest.py | 1 | 2263 | import radsim
import six
def test_list_enzymes():
'''Check radsim.list_enzymes doesn't raise, and prints something'''
sio = six.StringIO()
radsim.list_enzymes(stream=sio)
assert len(sio.getvalue()) > 0, sio.getvalue()
def test_digest_re_sites():
'''Test the behaviour of Digest.re_sites()'''
... | gpl-3.0 | 2,534,519,833,175,015,000 | 34.920635 | 71 | 0.63323 | false | 2.985488 | true | false | false |
buret/pylmflib | pylmflib/utils/eol/eol.py | 1 | 1307 | #/usr/bin/python
"""! @package utils.eol
"""
# Get command line arguments
from optparse import OptionParser
parser = OptionParser()
parser.add_option("-i", "--input", dest="input", action="store", help="input MDF file")
parser.add_option("-o", "--output", dest="output", action="store", help="output MDF file")
parser.... | gpl-2.0 | 8,076,801,828,894,048,000 | 26.229167 | 90 | 0.647284 | false | 3.219212 | false | false | false |
skbly7/serc | website/lab/migrations/0004_auto_20160310_1326.py | 1 | 1553 | # -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-03-10 13:26
from __future__ import unicode_literals
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependen... | mit | -8,506,173,002,401,479,000 | 33.511111 | 114 | 0.569865 | false | 4.301939 | false | false | false |
zsmountain/leetcode | python/3sum_closest.py | 1 | 1185 | '''
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would have exactly one solution.
For example, given array S = {-1 2 1 -4}, and target = 1.
The sum that is closest to the ta... | apache-2.0 | 5,934,976,769,037,596,000 | 34.909091 | 214 | 0.520675 | false | 3.714734 | false | false | false |
srfraser/services | src/shipit_taskcluster/shipit_taskcluster/models.py | 2 | 1218 | # -*- coding: 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/.
from __future__ import absolute_import
import datetime
import enum
import sqlalchemy as sa
# ... | mpl-2.0 | -1,339,746,534,483,820,800 | 30.230769 | 84 | 0.71757 | false | 3.679758 | false | false | false |
themutt/plastex | plasTeX/Packages/graphics.py | 9 | 2261 | #!/usr/bin/env python
import os
from plasTeX import Command
class includegraphics(Command):
args = '* [ ll ] [ ur ] file:str'
packageName = 'graphics'
captionable = True
def invoke(self, tex):
res = Command.invoke(self, tex)
f = self.attributes['file']
ext = self.ownerDo... | mit | 4,233,803,587,998,692,000 | 28.75 | 74 | 0.546218 | false | 4.008865 | false | false | false |
Syncano/syncano-cli | syncano_cli/parse_to_syncano/processors/klass.py | 1 | 7049 | # -*- coding: utf-8 -*-
import json
import requests
import six
from syncano_cli.base.formatters import Formatter
from syncano_cli.parse_to_syncano.migrations.aggregation import ClassAggregate
from syncano_cli.parse_to_syncano.parse.constants import ParseFieldTypeE
class SyncanoSchema(object):
def __init__(self... | mit | -1,686,309,550,870,439,400 | 34.964286 | 114 | 0.533976 | false | 4.452937 | false | false | false |
k5ninjacom/K5lib | examples/import_keypair.py | 1 | 1292 | from os import environ as env
import sys
import argparse
import json
sys.path.append('k5lib')
import k5lib
username = env['OS_USERNAME']
password = env['OS_PASSWORD']
domain = env['OS_USER_DOMAIN_NAME']
region = env['OS_REGION_NAME']
projectname = env['OS_PROJECT_NAME']
# Create a log file
k5lib.create_logfile('imp... | gpl-3.0 | 3,383,931,970,513,604,600 | 27.733333 | 104 | 0.739938 | false | 3.254408 | false | false | false |
CSC-IT-Center-for-Science/grumpy-inspect | scripts/grumpy.py | 1 | 2180 | import itertools
import logging
from grumpy_inspect.connectors import get_openstack_nova_client
logging.captureWarnings(True)
def main():
cli = get_openstack_nova_client()
if not cli:
return
servers = cli.servers.list()
cold_instances = [s for s in servers if s.status != 'ACTIVE']
if col... | mit | 2,990,313,561,838,866,400 | 39.37037 | 157 | 0.649541 | false | 4.037037 | false | false | false |
gramps-project/addons-source | SurnameMappingGramplet/SurnameMappingGramplet.py | 2 | 6664 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2013 Artem Glebov <artem.glebov@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 Foundation; either version 2 of the License,... | gpl-2.0 | -6,124,946,213,766,789,000 | 37.298851 | 135 | 0.594538 | false | 3.698113 | false | false | false |
zedoul/AnomalyDetection | test_discretization/test_affinity.py | 1 | 1535 | # -*- coding: utf-8 -*-
"""
http://www.astroml.org/sklearn_tutorial/dimensionality_reduction.html
"""
print (__doc__)
import numpy as np
import copy
from sklearn.cluster import k_means
from sklearn.manifold import spectral_embedding
from sklearn.utils import check_random_state
import nslkdd.preprocessing as preproce... | mit | -5,664,304,827,619,229,000 | 30.979167 | 105 | 0.682085 | false | 3.021654 | false | false | false |
Outernet-Project/librarian-dbmanage | librarian_dbmanage/dbmanage.py | 1 | 2863 | import datetime
import logging
import os
import time
from bottle import request
from bottle_utils.i18n import i18n_url
from librarian_content.library.archive import Archive
from librarian_lock.lock import global_lock
from librarian_core.contrib.databases.helpers import (get_database_configs,
... | gpl-3.0 | -8,370,057,354,719,057,000 | 29.136842 | 75 | 0.611247 | false | 3.832664 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.