repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Der-Eddy/pyepvp | pyepvp/session.py | 1 | 4903 | import requests
import cfscrape
import xmlrpc.client
import hashlib
import time
import platform
import json
import os
import sys
import logging
from .regexp import *
from .exceptions import *
from .parser import *
from .tapatalk import *
from .user import *
from . import __version__, __title__, __author__
class sessio... | mit | -5,756,216,365,573,822,000 | 33.286713 | 130 | 0.570671 | false | 3.89127 | false | false | false |
rschnapka/odoo | addons/purchase/purchase.py | 1 | 70094 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU... | agpl-3.0 | 903,126,199,072,234,500 | 51.622372 | 545 | 0.596122 | false | 3.923262 | false | false | false |
Thermondo/viewflow-extensions | docs/conf.py | 1 | 2916 | # -*- coding: utf-8 -*-
import datetime
import importlib
import inspect
import sys
import os
import django
year = datetime.datetime.now().strftime("%Y")
sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), os.pardir))
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.testapp.settings")
dja... | apache-2.0 | -8,658,033,130,985,556,000 | 26.252336 | 84 | 0.653292 | false | 3.496403 | false | false | false |
chfw/pyexcel-ods3 | tests/test_multiple_sheets.py | 2 | 7687 | import os
from collections import OrderedDict
import pyexcel
from base import PyexcelMultipleSheetBase
from nose.tools import raises
class TestOdsNxlsMultipleSheets(PyexcelMultipleSheetBase):
def setUp(self):
self.testfile = "multiple1.ods"
self.testfile2 = "multiple1.xls"
self.content =... | bsd-3-clause | 368,446,140,860,946,300 | 30.896266 | 76 | 0.55015 | false | 3.534253 | true | false | false |
ckrooss/shortpath | shortpath/astar.py | 1 | 1996 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
from random import randint
if __name__ == "__main__":
from node import Node
from nodelist import Nodelist
else:
from .node import Node
from .nodelist import Nodelist
Node.xmax = 30
Node.ymax = 15
def gen_obstacles(xmax: int, ymax: int) -> Nodelist:
o... | mit | 4,708,236,576,825,571,000 | 24.589744 | 97 | 0.602204 | false | 3.447323 | false | false | false |
SyllogismRXS/misc | gui/widget-test/graveyard/mycustomwidgetplugin.py | 1 | 3624 | #!/usr/bin/env python
"""
helloglwidgetplugin.py
A simple OpenGL custom widget plugin for Qt Designer.
Copyright (C) 2006 David Boddie <david@boddie.org.uk>
Copyright (C) 2005-2006 Trolltech ASA. All rights reserved.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Gen... | mit | 8,384,229,615,302,424,000 | 35.606061 | 78 | 0.721578 | false | 4.441176 | false | false | false |
Cqfuj/disco-cake | disco_cake/link/mp3_track_number_album_linker.py | 1 | 1939 | # Disco-cake
# Copyright (C) 2017 Maugere Lucas
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# This program is dist... | gpl-3.0 | 2,301,692,807,720,406,000 | 35.584906 | 71 | 0.645694 | false | 3.728846 | false | false | false |
bpsmith/tia | tia/analysis/model/interface.py | 1 | 3276 | __all__ = ['CostCalculator', 'EodMarketData', 'MarketDataColumns', 'TxnColumns', 'PositionColumns', 'PlColumns',
'TxnPlColumns']
class CostCalculator(object):
"""Define the methods necessary to be able to calculator the premium for a trade."""
def get_premium(self, qty, px, ts=None):
raise... | bsd-3-clause | -7,107,958,425,368,233,000 | 23.825758 | 112 | 0.548535 | false | 2.816853 | false | false | false |
vgripon/PyRat | imports/display.py | 1 | 22177 | # Copyright © 2017 Vincent Gripon (vincent.gripon@imt-atlatique.fr) and IMT Atlantique
#
# This file is part of PyRat.
#
# PyRat 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 ... | gpl-3.0 | -2,253,685,481,212,059,100 | 55.861538 | 353 | 0.584055 | false | 3.359491 | false | false | false |
Acehaidrey/incubator-airflow | airflow/www/views.py | 1 | 135065 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | 6,772,566,299,823,838,000 | 35.249329 | 110 | 0.57077 | false | 3.892812 | false | false | false |
neuronalmotion/plasmoid-amixer | src/contents/code/main.py | 1 | 3785 | # -*- coding: utf-8 -*-
# -----------------------#
# License: GPL #
# Author: NeuronalMotion #
# -----------------------#
from PyQt4.QtCore import Qt
from PyQt4.QtGui import QGraphicsLinearLayout
from PyKDE4.plasma import Plasma
from PyKDE4 import plasmascript
from PyKDE4 import kdecore
import subprocess
im... | gpl-2.0 | -2,672,511,067,184,466,000 | 30.541667 | 125 | 0.643329 | false | 3.736426 | false | false | false |
bl4de/irc-client | irc_client.py | 1 | 3291 | #!/usr/bin/env python
# by bl4de | github.com/bl4de | twitter.com/_bl4de | hackerone.com/bl4de
import socket
import sys
import threading
def usage():
print "IRC simple Python client | by bl4de | github.com/bl4de | twitter.com/_bl4de | hackerone.com/bl4de\n"
print "$ ./irc_client.py USERNAME CHANNEL\n"
prin... | mit | 8,789,912,966,740,696,000 | 28.657658 | 115 | 0.553327 | false | 3.735528 | false | false | false |
CroceRossaItaliana/jorvik | api/v1/views.py | 1 | 4044 | from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import permissions
from oauth2_provider.ext.rest_framework import TokenHasScope
from api.settings import SCOPE_ANAGRAFICA_LETTURA_BASE, SCOPE_ANAGRAFICA_LETTURA_COMPLETA, SCOPE_APPARTENENZE_LETTURA
from api.v1 im... | gpl-3.0 | 1,223,268,520,127,786,500 | 29.171642 | 117 | 0.606728 | false | 3.153666 | false | false | false |
vertelab/odoo-smart | smart_salary_simulator_se/models/hr_payroll.py | 1 | 1318 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution, third party addon
# Copyright (C) 2004-2015 Vertel AB (<http://vertel.se>).
#
# This program is free software: you can redistribute it and/or modify
# it under... | agpl-3.0 | 6,327,244,166,136,757,000 | 42.933333 | 83 | 0.637329 | false | 4.364238 | false | false | false |
susca/funge | minibefu93.py | 1 | 1657 | #!/usr/bin/python3
# minibefu93.py -- a minimal Befunge93 interpreter written in Python
# usage: minibefu93.py <prog.fu>
import sys,random
o=sys.stdout
q=0,0
d=1,0
m=80,25
def k(x,y):return x+m[0]*y+y
def g(s,p=None):
x,y=q if p is None else p
return s[k(x,y)]
def p(s,p,v):
o=k(*p)
return s[:o]+chr(v)+s[o+1:]
d... | mit | 7,724,251,767,620,839,000 | 28.070175 | 68 | 0.493663 | false | 1.954009 | false | false | false |
DanielJDufour/person-extractor | person_extractor/__init__.py | 1 | 2950 | from nltk.chunk import _MULTICLASS_NE_CHUNKER
from nltk.data import load
from nltk.tag.perceptron import PerceptronTagger
from nltk import ne_chunk, word_tokenize
from os import listdir
from os.path import dirname, realpath
from re import findall, finditer, MULTILINE, UNICODE
from re import compile as re_compile
flags ... | apache-2.0 | 3,573,599,924,659,248,000 | 27.095238 | 92 | 0.654237 | false | 3.53717 | false | false | false |
gschizas/praw | praw/models/reddit/redditor.py | 1 | 13544 | """Provide the Redditor class."""
from json import dumps
from typing import Any, Dict, Generator, List, Optional, TypeVar, Union
from ...const import API_PATH
from ...util.cache import cachedproperty
from ..listing.mixins import RedditorListingMixin
from ..util import stream_generator
from .base import RedditBase
from... | bsd-2-clause | -3,467,038,217,675,936,000 | 32.691542 | 79 | 0.551831 | false | 4.455263 | false | false | false |
glennhickey/hal | assemblyHub/wigTrack.py | 1 | 7699 | #!/usr/bin/env python3
#Copyright (C) 2013 by Ngan Nguyen
# Copyright (C) 2012-2019 by UCSC Computational Genomics Lab
#
#Released under the MIT license, see LICENSE.txt
"""Creating wiggle (annotation) tracks and lifted-over wiggle tracks for the hubs
"""
import os, re, time
from sonLib.bioio import system
from toi... | mit | -1,007,999,811,680,412,400 | 47.727848 | 477 | 0.636446 | false | 3.420258 | false | false | false |
drabastomek/practicalDataAnalysisCookbook | Codes/Chapter07/ts_timeSeriesFunctions.py | 1 | 1760 | import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
# change the font size
matplotlib.rc('xtick', labelsize=9)
matplotlib.rc('ytick', labelsize=9)
matplotlib.rc('font', size=14)
# time series tools
import statsmodels.api as sm
# folder with data
data_folder = '../../Data/Chapter07/'
# colors
colo... | gpl-2.0 | 3,228,647,342,116,916,700 | 24.142857 | 60 | 0.688636 | false | 2.6546 | false | false | false |
Ictp/indico | indico/MaKaC/plugins/Collaboration/Vidyo/api/api.py | 1 | 4270 | # -*- coding: utf-8 -*-
##
## This file is part of Indico.
## Copyright (C) 2002 - 2014 European Organization for Nuclear Research (CERN).
##
## Indico is free software; you can redistribute it and/or
## modify it under the terms of the GNU General Public License as
## published by the Free Software Foundation; either ... | gpl-3.0 | 1,933,884,575,633,309,700 | 32.359375 | 86 | 0.679625 | false | 4.133591 | false | false | false |
jon-jacky/PyModel | samples/Marquee/fsmpy/PeriodFiveFSM1.py | 1 | 1330 |
# pma.py --maxTransitions 100 --output PeriodFiveFSM1 LoadFirst Marquee DisplayFive
# 6 states, 6 transitions, 6 accepting states, 0 unsafe states, 0 finished and 0 deadend states
# actions here are just labels, but must be symbols with __name__ attribute
def Load(): pass
def Shift(): pass
# states, key of each sta... | bsd-3-clause | 97,296,459,689,789,100 | 32.25 | 95 | 0.581955 | false | 2.714286 | false | false | false |
isb-cgc/ISB-CGC-Webapp | bq_data_access/v2/seqpeek/seqpeek_view.py | 1 | 7709 | #
# Copyright 2015-2019, Institute for Systems Biology
#
# 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 ... | apache-2.0 | -1,271,494,110,282,073,900 | 27.764925 | 138 | 0.634064 | false | 3.478791 | false | false | false |
marcosbontempo/inatelos | poky-daisy/bitbake/lib/bb/server/process.py | 1 | 7728 | #
# BitBake Process based server.
#
# Copyright (C) 2010 Bob Foerster <robert@erafx.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope t... | mit | 239,827,762,069,532,380 | 31.745763 | 108 | 0.618659 | false | 4.290949 | false | false | false |
demelin/learning_reinforcement_learning | recurrent_deep_q_network/training_session.py | 1 | 8324 | import os
import tensorflow as tf
import numpy as np
from tensorflow.contrib.rnn import LSTMCell
from q_learning.q_network import MentorAgent, ExperienceBuffer, update_target_graph, perform_update, process_capture
import gym
import universe
tf.reset_default_graph()
env = gym.make('Pong-v0')
# Network constants
FILT... | mit | -2,580,441,314,753,550,300 | 43.042328 | 118 | 0.575925 | false | 3.737764 | false | false | false |
qsantos/crpyt | digests/md2.py | 1 | 3065 | # crpyt: toy cryptographic python library
# Copyright (C) 2014 Quentin SANTOS
#
# 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 v... | gpl-3.0 | 9,166,256,507,868,525,000 | 42.169014 | 98 | 0.651876 | false | 1.895485 | false | false | false |
matslindh/codingchallenges | knowit2019/16.py | 1 | 1520 |
def fjordify(f):
lines = [line.strip() for line in open(f).readlines()]
width = len(lines[0])
fjord = {
'map': [],
'boat': None,
}
for y, line in enumerate(lines):
row = [' '] * width
for x in range(0, len(line)):
if line[x] == '#':
row[... | mit | -2,061,431,919,864,742,100 | 19 | 59 | 0.404605 | false | 3.12115 | false | false | false |
capitalone/cloud-custodian | tests/test_cwa.py | 1 | 1155 | # Copyright 2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from .common import BaseTest
class AlarmTest(BaseTest):
def test_delete(self):
alarm_name = "c7n-test-alarm-delete"
factory = self.replay_flight_data("test_alarm_delete")
... | apache-2.0 | -5,600,428,226,361,943,000 | 29.394737 | 79 | 0.550649 | false | 4.184783 | true | false | false |
streed/PyEndicia | endicia/builders/ChangePassPhraseXmlBuilder.py | 1 | 1454 | from EndiciaXmlBuilder import EndiciaXmlBuilder
from EndiciaXmlBuilder import ValueToLongError
from lxml.builder import E
class ChangePassPhraseXmlBuilder( EndiciaXmlBuilder ):
xml = {}
def __init__( self ):
EndiciaXmlBuilder.__init__( self )
def setPartnerID( self, __id ):
if len( __id ) <= 50:
self.xml[... | gpl-3.0 | -5,050,795,239,346,306,000 | 25.436364 | 66 | 0.658184 | false | 2.817829 | false | false | false |
rafaelolg/visiondataset | visiondataset/datasets/util.py | 1 | 1040 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import re
def base_name(filename):
"""
return the string filename without extensions nor directory path
>>> base_name('asdf.tar.gz')
'asdf'
>>> base_name('/root/ver_strange.dir/asdf.tar.gz')
'asdf'
>>> base_name(r'c:\Windows With Space\sdf.tar... | gpl-3.0 | 8,852,463,943,848,875,000 | 20.666667 | 68 | 0.528846 | false | 2.979943 | false | false | false |
stvoutsin/pyrothorn | pyrothorn/pyroquery/atpy/votable.py | 1 | 9010 | import os
from distutils import version
import numpy as np
import warnings
from exceptions import TableException
import atpy
from helpers import smart_dtype
from decorators import auto_download_to_file, auto_decompress_to_fileobj, auto_fileobj_to_file
vo_minimum_version = version.LooseVersion('0.3')
try:
from ... | gpl-3.0 | -2,821,985,157,562,026,000 | 26.723077 | 108 | 0.595117 | false | 3.762004 | false | false | false |
hecate-xw/Miscellaneous | TsinghuaCSLT/audioEmbedded/Mission/develop/MCLT.py | 1 | 4754 | #!usr/bin/env python
#coding=utf-8
import numpy as np
import math
import disposeWav
pi = math.pi
def MCLT(x):
'''
Written by the MCLT definition, and it is slow.
'''
M = len(x)/2
#M = 8192
h = (2*M)*[0]
for n in range(M):
h[n] = -math.sin((2.0*n+1.0)*math.pi/(4.0*M))
... | mit | 5,250,337,636,828,632,000 | 26.174419 | 113 | 0.482028 | false | 2.508857 | false | false | false |
socolofs/tamoc | bin/dbm/gas_bubbles.py | 1 | 3178 | """
Gas fluid particles
===================
Use the ``TAMOC`` ``DBM`` to specify a natural gas bubble that can dissolve
and calculate all of its properties in deepwater conditions.
In particular, this script demonstrates the methods:
* `dbm.FluidParticle.mass_frac`
* `dbm.FluidParticle.density`
* `dbm.FluidParticle... | mit | 8,101,110,010,766,100,000 | 33.923077 | 76 | 0.568911 | false | 2.886467 | false | false | false |
CNR-Engineering/TelTools | cli/slf_3d_to_2d.py | 1 | 4035 | #!/usr/bin/env python
"""
Perform a vertical operation on a 3D results file to get 2D
"""
import numpy as np
import sys
from tqdm import tqdm
from pyteltools.geom.transformation import Transformation
import pyteltools.slf.misc as operations
from pyteltools.slf import Serafin
from pyteltools.utils.cli_base import logg... | gpl-3.0 | 2,957,268,180,725,916,700 | 41.925532 | 116 | 0.615366 | false | 3.695055 | false | false | false |
storpool/python-storpool | storpool/sputils.py | 1 | 1408 | #
# Copyright (c) 2014 - 2019 StorPool.
# 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 appli... | apache-2.0 | 3,257,509,325,098,804,700 | 24.6 | 74 | 0.674006 | false | 3.638243 | false | false | false |
loggrio/loggr-unit-raspberry | raspi_loggr/util.py | 1 | 3137 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import subprocess
import logging
from enum import Enum
class LedStatusTypes(Enum):
"""Enum of led status types resp. colors"""
ok = 1 # green
sensor_broken = 2 # red
request_error = 3 # orange
pairing_succeeded = 4 # blue
class SensorTypes(Enum):... | gpl-3.0 | -4,851,364,773,348,961,000 | 24.92562 | 111 | 0.629582 | false | 3.8633 | false | false | false |
wwrechard/pydlm | doc/source/conf.py | 1 | 10025 | # -*- coding: utf-8 -*-
#
# PyDLM documentation build configuration file, created by
# sphinx-quickstart on Fri Sep 9 23:34:57 2016.
#
# This file is execfile()d with the current directory set to its
# containing dir.
#
# Note that not all possible configuration values are present in this
# autogenerated file.
#
# All... | bsd-3-clause | -657,461,185,511,227,300 | 27.724928 | 80 | 0.691671 | false | 3.553704 | true | false | false |
libyal/libyal | yaldevtools/source_generators/common.py | 1 | 1219 | # -*- coding: utf-8 -*-
"""The source file generator for common source files."""
from __future__ import unicode_literals
import os
from yaldevtools.source_generators import interface
class CommonSourceFileGenerator(interface.SourceFileGenerator):
"""Common source files generator."""
_AUTHORS = 'Joachim Metz <... | apache-2.0 | 6,604,040,997,463,279,000 | 31.945946 | 79 | 0.696473 | false | 4.292254 | false | false | false |
fniephaus/power-system-simulation | systems/producers.py | 1 | 4740 | import random
class GasPoweredGenerator(object):
def __init__(self, env):
self.env = env
self.gas_price_per_kwh = 0.0655 # Euro
self.running = False
self.workload = 0
self.current_gas_consumption = 0 # kWh
self.current_thermal_production = 0 # kWh
self.... | mit | 1,032,790,854,854,087,200 | 33.59854 | 116 | 0.597679 | false | 3.776892 | false | false | false |
rusty1s/graph-based-image-classification | patchy/patchy.py | 1 | 9132 | import os
import sys
import json
import tensorflow as tf
from data import DataSet, Record, datasets
from data import iterator, read_tfrecord, write_tfrecord
from grapher import graphers
from .helper.labeling import labelings, scanline
from .helper.neighborhood_assembly import neighborhood_assemblies as neighb,\
... | mit | 1,591,233,635,957,854,200 | 36.892116 | 79 | 0.591984 | false | 3.734969 | true | false | false |
internap/almanach | tests/builder.py | 1 | 4540 | # Copyright 2016 Internap.
#
# 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, so... | apache-2.0 | 7,253,645,098,605,232,000 | 27.553459 | 105 | 0.609471 | false | 3.57762 | false | false | false |
crichardson17/starburst_atlas | SFH_comparison/data/Padova_inst/padova_inst_6/fullgrid/peaks_reader.py | 1 | 5057 | import csv
import matplotlib.pyplot as plt
from numpy import *
import scipy.interpolate
import math
from pylab import *
from matplotlib.ticker import MultipleLocator, FormatStrFormatter
import matplotlib.patches as patches
from matplotlib.path import Path
import os
# ---------------------------------------------------... | gpl-2.0 | -5,176,362,807,463,443,000 | 32.490066 | 109 | 0.636741 | false | 3.170533 | false | false | false |
luoshao23/ML_algorithm | luolearn/metrics/classification.py | 1 | 1875 | import numpy as np
from scipy.sparse import csr_matrix
from ..utils import column_or_1d
from ..utils import check_consistent_length
from ..utils.multiclass import type_of_target
from ..utils.sparsefuncs import count_nonzero
def _check_targets(y_true, y_pred):
check_consistent_length(y_true, y_pred)
type_tru... | mit | -3,364,809,980,190,395,400 | 30.25 | 72 | 0.629333 | false | 3.301056 | false | false | false |
amboycharlie/Child-Friendly-LCMS | leonardo/module/web/widgets/mixins.py | 1 | 6783 |
from __future__ import unicode_literals
import json
from django.db import models
from django.utils import timezone
from django.utils.functional import cached_property
from django.utils.translation import ugettext_lazy as _
from .const import PAGINATION_CHOICES
try:
from urllib.parse import urlparse
except Imp... | apache-2.0 | 7,673,815,014,192,175,000 | 27.620253 | 75 | 0.600914 | false | 4.290323 | false | false | false |
AQuadroTeam/CellsCycle | doc/tests/list-communication/KeyTest.py | 1 | 6180 | from CellCycle.ChainModule.ListThread import *
from start import loadSettings
from start import loadLogger
from CellCycle.MemoryModule.calculateSon import calculateSonId
def add_check():
currentProfile = {"profile_name": "alessandro_fazio", "key_pair": "AWSCellCycle", "branch": "ListUtilities"}
settings_to_l... | mit | -7,520,850,627,014,340,000 | 49.243902 | 116 | 0.652427 | false | 2.71529 | true | false | false |
sweon/edx-dl | edx_dl/common.py | 1 | 5361 | # -*- coding: utf-8 -*-
"""
Common type definitions and constants for edx-dl
The classes in this module represent the structure of courses in edX. The
structure is:
* A Course contains Sections
* Each Section contains Subsections
* Each Subsection contains Units
Notice that we don't represent the full tree structu... | lgpl-3.0 | -4,726,805,692,538,409,000 | 27.365079 | 79 | 0.598769 | false | 3.979955 | false | false | false |
jbasko/pytest-random-order | random_order/bucket_types.py | 1 | 1572 | import functools
import os.path
from collections import OrderedDict
bucket_type_keys = OrderedDict()
def bucket_type_key(bucket_type):
"""
Registers a function that calculates test item key for the specified bucket type.
"""
def decorator(f):
@functools.wraps(f)
def wrapped(item, se... | mit | 7,146,111,292,078,620,000 | 20.534247 | 106 | 0.646947 | false | 3.62212 | false | false | false |
okfse/froide | froide/foirequest/urls.py | 1 | 3247 | from django.utils.six import text_type as str
from django.core.urlresolvers import reverse
from django.conf.urls import patterns
from django.utils.translation import pgettext
from django.shortcuts import redirect
from .models import FoiRequest
urlpatterns = patterns("froide.foirequest.views",
(r'^%s/$' % pgette... | mit | -6,307,762,861,912,977,000 | 42.293333 | 94 | 0.581152 | false | 3.028918 | false | false | false |
bluesquall/okeanidanalysis | examples/sensors/rowe-adcp-bottom-track-summary.py | 1 | 3719 | #!/bin/env python
"""
e.g.: $ python rowe-adcp-bottom-track-summary.py /mbari/LRAUV/makai/missionlogs/devel/20150617-ADCP-in-tank/20150617T172914/ADCP-2015061717.ENS.mat
"""
import numpy as np
import scipy as sp
import scipy.io
import matplotlib.pyplot as plt
def plot_adcp_bottom_track_summary(infile, save=True, sho... | mit | -4,899,205,760,434,004,000 | 37.340206 | 149 | 0.600161 | false | 2.958632 | false | false | false |
ofilipowicz/owndb | store/views.py | 1 | 34136 | from django.contrib.auth.models import User
from django.views.generic import ListView, DetailView, View, CreateView, DeleteView
from django.views.generic.base import TemplateView
from django.db.models import Q
from django.core.urlresolvers import reverse, reverse_lazy
from django.contrib.auth.decorators import login_r... | mit | 6,421,516,021,437,837,000 | 44.031662 | 191 | 0.555516 | false | 4.244467 | false | false | false |
rapkis/prekiu-automatas | aparatas1.py | 1 | 4408 | #!/usr/bin/python
import MySQLdb
import datetime
prekes = [None] * 16
automatoId=1
data = str(datetime.date.today())
prekesId = None
prekesPav = "Niekas"
def prisijungimas():
db = MySQLdb.connect(host="pardavimuaparatas2.mysql.database.azure.com",
user="pi@pardavimuapar... | mit | 849,941,584,960,501,600 | 35.675214 | 155 | 0.533348 | false | 3.289552 | false | false | false |
fulfilio/trytond-picking-list-report | picking_list_report.py | 1 | 2960 | # -*- coding: utf-8 -*-
"""
picking_list_report.py
"""
from trytond.pool import PoolMeta, Pool
from trytond.transaction import Transaction
from openlabs_report_webkit import ReportWebkit
__metaclass__ = PoolMeta
__all__ = ['PickingListReport']
class ReportMixin(ReportWebkit):
"""
Mixin Class to inher... | bsd-3-clause | -1,181,353,906,449,676,300 | 28.89899 | 78 | 0.571284 | false | 3.889619 | false | false | false |
Cecca/lydoc | setup.py | 1 | 1336 | from setuptools import setup, find_packages
import io
version = dict()
with io.open("lydoc/_version.py", "r", encoding='utf-8') as fp:
exec(fp.read(), version)
with io.open("README.rst", "r", encoding='utf-8') as fp:
long_desc = fp.read()
setup(
name='lydoc',
version=version['__version__'],
auth... | gpl-3.0 | 2,782,565,075,269,225,000 | 28.043478 | 75 | 0.583832 | false | 3.680441 | false | false | false |
susundberg/Networkdroid | src/main_client_speak.py | 1 | 4093 |
import json
import argparse
import sys
import zmq
import datetime
from Sundberg.Logger import *
from subprocess import call
def get_command_line_arguments( ):
parser = argparse.ArgumentParser(description='Speak-aloud espeak client')
parser.add_argument("configfile", help = "Set configuration file to be used")... | gpl-2.0 | -7,579,788,459,842,370,000 | 33.686441 | 113 | 0.597361 | false | 3.832397 | true | false | false |
open-synergy/opnsynid-stock-logistics-warehouse | stock_picking_type_accounting_configuration/models/stock_move_account_source.py | 1 | 1177 | # 2020 OpenSynergy Indonesia
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).
from openerp import models, api, fields
from openerp.tools.safe_eval import safe_eval as eval
class StockMoveAccountSource(models.Model):
_name = "stock.move_account_source"
_description = "Stock Move Account So... | agpl-3.0 | -1,646,716,042,506,528,800 | 24.586957 | 68 | 0.571793 | false | 3.859016 | false | false | false |
Juniper/tempest | tempest/api/compute/test_extensions.py | 1 | 2103 | # Copyright 2012 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 | -5,326,168,622,325,801,000 | 37.236364 | 79 | 0.69805 | false | 3.930841 | false | false | false |
XianliangJ/collections | CNUpdates/updates/examples/experiment_base_waxman.py | 1 | 1647 | from waxman_topo import Topology
global networkSize
networkSize = None
def set_size(size):
global networkSize
networkSize = size
def links_to_remove(version, graph):
if version == 0:
return []
if len(graph.coreSwitches) < 2:
return []
return [ (graph.coreSwitches[idx], graph.edgeS... | gpl-3.0 | -3,425,362,455,485,318,700 | 30.075472 | 114 | 0.645416 | false | 3.557235 | false | false | false |
egtaonline/quiesce | egta/script/innerloop.py | 1 | 5342 | """Script utility for running inner loop"""
import asyncio
import json
import logging
from concurrent import futures
from gameanalysis import regret
from egta import innerloop
from egta import schedgame
from egta.script import schedspec
from egta.script import utils
def add_parser(subparsers):
"""Create innerlo... | apache-2.0 | 7,585,665,042,589,189,000 | 33.915033 | 82 | 0.60745 | false | 4.001498 | false | false | false |
MarkusHackspacher/PythonFarmGame | farmlib/gamemanager.py | 1 | 8848 | '''
Created on 17-07-2012
@author: orneo1212
'''
import os
import time
from farmlib import DictMapper
from farmlib.farm import FarmField, FarmObject, FarmTile, Seed, objects
from farmlib.player import Player
try:
xrange
except NameError:
xrange = range
class GameManager(object):
"""Game Manager class
... | gpl-3.0 | -7,167,441,936,136,486,000 | 27.541935 | 78 | 0.493897 | false | 4.219361 | false | false | false |
oesteban/preprocessing-workflow | fmriprep/workflows/bold/util.py | 1 | 18323 | # -*- coding: utf-8 -*-
# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""
Utility workflows
^^^^^^^^^^^^^^^^^
.. autofunction:: init_bold_reference_wf
.. autofunction:: init_enhance_and_skullstrip_bold_wf
.. autofunction:: init_skullstrip_bold_wf
"""... | bsd-3-clause | 8,292,137,848,406,605,000 | 40.08296 | 97 | 0.601867 | false | 3.655097 | false | false | false |
googleapis/python-error-reporting | google/cloud/errorreporting_v1beta1/services/error_group_service/transports/grpc_asyncio.py | 1 | 12859 | # -*- 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 | -2,248,714,581,095,441,200 | 43.649306 | 93 | 0.621199 | false | 4.662437 | false | false | false |
dnsforever/dnsforever-web | dnsforever/web/__init__.py | 1 | 1055 | from flask import Flask, g
from dnsforever.config import secret_key
from dnsforever.models import Session
from dnsforever.web.tools.session import get_user
blueprints = ['apis', 'index', 'account', 'domain',
'domain_a', 'domain_ddns', 'domain_aaaa',
'domain_cname', 'domain_mx',
... | gpl-3.0 | 4,566,098,043,050,509,000 | 24.731707 | 70 | 0.589573 | false | 3.822464 | false | false | false |
FishyFing/FishBot | cogs/google.py | 1 | 2253 | import discord
from discord.ext import commands
from .utils import checks
import urllib
class SimplyGoogle:
"""A non sarcastic google command"""
def __init__(self, bot):
self.bot = bot
@commands.command(pass_context=True, no_pm=True)
async def google(self, ctx, text):
"""Its google, y... | gpl-3.0 | -4,040,341,036,851,990,500 | 41.509434 | 97 | 0.590324 | false | 3.742525 | false | false | false |
nomadicfm/pyramid-views | tests/_test_dates.py | 1 | 31005 | from __future__ import unicode_literals
import datetime
from django.core.exceptions import ImproperlyConfigured
from django.test import TestCase, override_settings, skipUnlessDBFeature
from django.test.utils import requires_tz_support
from django.utils import timezone
from .models import Book, BookSigning
def _mak... | mit | 4,528,030,635,448,044,000 | 48.608 | 140 | 0.652959 | false | 3.480189 | true | false | false |
evansd/django-envsettings | envsettings/cache.py | 1 | 4531 | from .base import URLSettingsBase, is_importable
class CacheSettings(URLSettingsBase):
REDIS_CONFIG = {'BACKEND': 'django_redis.cache.RedisCache', 'OPTIONS': {}}
CONFIG = {
'locmem': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'},
'file': {'BACKEND': 'django.core.cache.backends... | mit | 6,058,745,335,508,903,000 | 38.745614 | 84 | 0.601854 | false | 4.134124 | true | false | false |
akimtke/arke | textserver/main.py | 1 | 2812 | # -*- coding: utf-8 -*-
import pyjsonrpc
from gsmmodem.modem import GsmModem, SentSms, Sms
from gsmmodem.exceptions import TimeoutException, PinRequiredError, IncorrectPinError
def text(number, message, key):
if key.strip() == '9703BB8D5A':
print "Creating modem instance"
modem = GsmModem('/dev/tt... | gpl-3.0 | 7,310,618,908,439,127,000 | 26.841584 | 85 | 0.562945 | false | 3.988652 | false | false | false |
elifesciences/elife-metrics | src/article_metrics/ga_metrics/elife_v5.py | 1 | 1848 | "elife_v5, the addition of /executable paths"
from . import elife_v1
from article_metrics.utils import lfilter
import re
import logging
LOG = logging.getLogger(__name__)
event_counts_query = elife_v1.event_counts_query
event_counts = elife_v1.event_counts
# views counting
def path_counts_query(table_id, from_date,... | gpl-3.0 | -3,663,562,856,745,356,300 | 36.714286 | 87 | 0.671537 | false | 3.175258 | false | false | false |
credativ/gofer | src/gofer/messaging/consumer.py | 1 | 4309 | # Copyright (c) 2013 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the impl... | lgpl-2.1 | 3,765,145,563,174,778,400 | 28.114865 | 95 | 0.576468 | false | 4.40593 | false | false | false |
pyslackers/sirbot-slack | sirbot/slack/store/channel.py | 1 | 3727 | import json
import logging
import time
from sirbot.core import registry
from .store import SlackStore, SlackChannelItem
from .. import database
logger = logging.getLogger(__name__)
class Channel(SlackChannelItem):
"""
Class representing a slack channel.
"""
def __init__(self, id_, raw=None, last_u... | mit | -1,458,524,759,698,175,000 | 26.007246 | 79 | 0.523209 | false | 4.298731 | false | false | false |
pjh/vm-analyze | app_scripts/app_python.py | 1 | 5200 | # Virtual memory analysis scripts.
# Developed 2012-2014 by Peter Hornyack, pjh@cs.washington.edu
# Copyright (c) 2012-2014 Peter Hornyack and University of Washington
# Python script to run another Python script as a test application.
#
# Build + setup instructions: do these once / occasionally by hand, not
# done a... | bsd-3-clause | 8,262,389,718,545,666,000 | 33.666667 | 78 | 0.688077 | false | 3.128761 | false | false | false |
BBN-Q/Quince | quince/node.py | 1 | 24377 | # coding: utf-8
# Raytheon BBN Technologies 2016
# Contributiors: Graham Rowlands
#
# This file contains the node descriptions
from qtpy.QtGui import *
from qtpy.QtCore import *
from qtpy.QtWidgets import *
from .wire import *
class Node(QGraphicsRectItem):
"""docstring for Node"""
def __init__(self, name, s... | apache-2.0 | 7,390,747,057,331,082,000 | 38.254428 | 115 | 0.57345 | false | 3.696846 | false | false | false |
orcasgit/py-wsse | wsse/encryption.py | 1 | 11246 | """Functions for WS-Security (WSSE) encryption and decryption.
Heavily based on test examples in https://github.com/mehcode/python-xmlsec as
well as the xmlsec documentation at https://www.aleksey.com/xmlsec/. Some
functions from https://github.com/mvantellingen/py-soap-wsse.
Reading the xmldsig, xmlenc, and ws-secur... | bsd-3-clause | 482,553,226,064,850,500 | 36.738255 | 79 | 0.669749 | false | 3.492547 | false | false | false |
alanfbaird/PyTASA | tests/anisotropy_index_tests.py | 1 | 1660 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
Test the IO routines - based on the MSAT test cases
"""
import unittest
import numpy as np
import pytasa.anisotropy_index
class TestAnisotropyIndex(unittest.TestCase):
def setUp(self):
"""Some useful matricies for testing"""
self.olivine = np.ar... | mit | 8,203,978,501,412,045,000 | 35.086957 | 79 | 0.487349 | false | 2.743802 | true | false | false |
kingsdigitallab/tvof-kiln | preprocess/prepare/xml_parser.py | 1 | 11492 | # -*- coding: utf-8 -*-
import sys
import os
import re
import glob
import datetime
import xml.etree.ElementTree as ET
class XMLParser(object):
suppressed_output = False
default_output = u'parsed.xml'
# TODO: implement this, but not possible with ElementTree...
is_output_beautified = False
def __... | apache-2.0 | -6,888,239,231,041,055,000 | 31.463277 | 108 | 0.488688 | false | 4.072289 | false | false | false |
novapost/django-email-change | src/email_change/urls.py | 1 | 1900 | # -*- coding: utf-8 -*-
#
# This file is part of django-email-change.
#
# django-email-change adds support for email address change and confirmation.
#
# Development Web Site:
# - http://www.codetrax.org/projects/django-email-change
# Public Source Code Repository:
# - https://source.codetrax.org/hgroot/djang... | apache-2.0 | -2,762,859,119,669,229,000 | 41.222222 | 115 | 0.715263 | false | 3.619048 | false | false | false |
shacknetisp/vepybot | plugins/protocols/irc/core/users.py | 1 | 8208 | # -*- coding: utf-8 -*-
import bot
import time
class Whois:
def __init__(self):
self.time = time.time()
self.channels = {}
ident = ""
host = ""
name = ""
auth = ""
idle = 0
signon = 0
server = ""
class M_Whois(bot.Module):
index = "whois"
hidden = False
... | mit | -1,344,099,156,478,500,600 | 35 | 80 | 0.500731 | false | 3.756522 | false | false | false |
pascalgutjahr/Praktikum-1 | V704_Absorp_Beta_Gamma/gammaPB.py | 1 | 1439 | import matplotlib as mpl
from scipy.optimize import curve_fit
mpl.use('pgf')
import matplotlib.pyplot as plt
plt.rcParams['lines.linewidth'] = 1
import numpy as np
mpl.rcParams.update({
'font.family': 'serif',
'text.usetex': True,
'pgf.rcfonts': False,
'pgf.texsystem': 'lualatex',
'pgf.preamble': r'\use... | mit | -4,312,687,204,794,683,000 | 27.62 | 115 | 0.638015 | false | 2.246468 | false | false | false |
marcuskelly/recover | app/manage_commands.py | 1 | 1623 | # This file defines command line commands for manage.py
import datetime
from app.init_app import app, db, manager
from app.models import User, Role
@manager.command
def init_db():
""" Initialize the database."""
# Create all tables
db.create_all()
# Add all Users
add_users()
def add_users():
... | bsd-2-clause | -1,381,855,864,617,946,000 | 27.982143 | 102 | 0.612446 | false | 3.614699 | false | false | false |
lifemapper/LmQGIS | scripts/createQgisPackage.py | 1 | 4111 | """
@summary: This module creates a zip file for a plugin that can be uploaded to
the QGIS repository.
@author: CJ Grady
@status: alpha
@version: 1.0
@license: gpl2
@copyright: Copyright (C) 2014, University of Kansas Center for Research
Lifemapper Project, lifemapper [at] ku [dot] edu,
... | gpl-2.0 | 5,150,867,926,875,265,000 | 37.064815 | 97 | 0.640477 | false | 3.987391 | true | false | false |
klenwell/mushpup-demo | main.py | 1 | 1071 | """`main` is the top level module for your Flask application."""
# Imports
from os.path import dirname, join
from datetime import date
from flask import Flask
import jinja2
# Constants
JINJA_ENVIRONMENT = jinja2.Environment(
loader=jinja2.FileSystemLoader(join(dirname(__file__), 'templates')),
extensions=['ji... | apache-2.0 | -4,553,135,595,806,245,000 | 24.5 | 76 | 0.69281 | false | 3.731707 | false | false | false |
Royal-Society-of-New-Zealand/NZ-ORCID-Hub | orcid_api_v3/models/researcher_url_v30_rc1.py | 1 | 9643 | # coding: utf-8
"""
ORCID Member
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
OpenAPI spec version: Latest
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
import pprint
import re # noqa: F401
import si... | mit | -3,776,811,176,968,661,000 | 28.31003 | 182 | 0.583843 | false | 3.717425 | false | false | false |
pudo-attic/docstash | docstash/collection.py | 1 | 2373 | from os import path, walk, close, unlink
from tempfile import mkstemp
import shutil
from docstash import util
from docstash.document import Document
class Collection(object):
def __init__(self, stash, name):
self.stash = stash
self.name = name
@property
def path(self):
return pa... | mit | 2,439,511,797,433,378,000 | 31.067568 | 71 | 0.564686 | false | 3.766667 | false | false | false |
Smart-Green/needle | setup.py | 1 | 1056 | #!/usr/bin/env python
"""
Setup file for pyhaystack
"""
#from pyhaystack.client.HaystackConnection import HaystackConnection
#from pyhaystack.client.NiagaraAXConnection import NiagaraAXConnection
#from pyhaystack import pyhaystack as ph
import pyhaystack.info as info
#from setuptools import setup
from distutils.core i... | apache-2.0 | 794,013,742,930,574,100 | 31.030303 | 136 | 0.721591 | false | 3.26935 | false | false | false |
marble/Toolchain_RenderDocumentation | 18-Make-and-build/42-Latex/run_45-Copy-latex-typo3-stuff.py | 1 | 5072 | #!/usr/bin/env python
# coding: utf-8
from __future__ import print_function
from __future__ import absolute_import
import os
import re
import shutil
import stat
import sys
import tct
from os.path import exists as ospe, join as ospj
from tct import deepget
params = tct.readjson(sys.argv[1])
binabspath = sys.argv[2]
... | mit | 4,781,026,684,952,183,000 | 29.554217 | 115 | 0.51321 | false | 3.723935 | false | false | false |
WarmMe/alpha1 | WarmMe/thermostat/Activator.py | 1 | 3097 | #!/usr/bin/python
# set gpio18 to high when content of file state is 'ON'
import RPi.GPIO as GPIO
import time
import MySQLdb as mdb
import sys
import time
# set GPIO (pin 12) that command the releais
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)
GPIO.setup(12, GPIO.OUT)
def run():
# Vary
curTime = time.strftime(... | gpl-3.0 | -5,307,279,268,875,629,000 | 29.362745 | 286 | 0.659671 | false | 2.963636 | false | false | false |
Couby/rocket-bike-challenge | hardware/rpm.py | 1 | 1834 | #!/usr/bin/python3
from gpiozero import Button
from http.server import BaseHTTPRequestHandler, HTTPServer
import time
import threading
hostName = "192.168.1.27"
hostPort = 9000
turns = 0
# HTTP server class.
class MyServer(BaseHTTPRequestHandler):
def do_GET(self):
global turns
s... | mit | -7,046,286,909,193,763,000 | 30.75 | 99 | 0.585605 | false | 3.978308 | false | false | false |
NeCTAR-RC/heat | heat/tests/test_fault_middleware.py | 1 | 6446 |
# 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
# ... | apache-2.0 | 1,952,317,835,905,729,500 | 44.394366 | 79 | 0.547626 | false | 4.767751 | true | false | false |
brokenseal/local | server/local/local/messages.py | 1 | 1789 | from __future__ import unicode_literals
import logging
import pymongo
from django.core import signing
from django.conf import settings
from . import models, exceptions
SECRET_KEY = "test"
routing = {}
logger = logging.getLogger(__name__)
def resolve(name):
return routing[name]
def event(message_or_func):
... | mit | 3,372,694,716,418,899,000 | 22.539474 | 81 | 0.644494 | false | 4.002237 | false | false | false |
ganga-devs/ganga | ganga/GangaCore/Core/GangaRepository/GangaRepositoryXML.py | 1 | 53576 | # Note: Following stuff must be considered in a GangaRepository:
#
# * lazy loading
# * locking
from GangaCore.Core.GangaRepository import GangaRepository, RepositoryError, InaccessibleObjectError
from GangaCore.Utility.Plugin import PluginManagerError
import os
import os.path
import time
import errno
import copy
impo... | gpl-2.0 | -6,180,378,785,507,544,000 | 43.646667 | 177 | 0.559075 | false | 4.13427 | false | false | false |
google/starthinker | dags/bigquery_function_dag.py | 1 | 4467 | ###########################################################################
#
# 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
#
# https://www.apache.org/l... | apache-2.0 | -8,183,038,106,305,137,000 | 32.088889 | 145 | 0.570405 | false | 4.324298 | false | false | false |
eggsandbeer/scheduler | synergy/db/model/daemon_process_entry.py | 1 | 2920 | __author__ = 'Bohdan Mushkevych'
from odm.document import BaseDocument
from odm.fields import StringField, DictField, ListField
from synergy.scheduler.scheduler_constants import TYPE_MANAGED, TYPE_FREERUN, TYPE_GARBAGE_COLLECTOR, EXCHANGE_UTILS, \
TYPE_DAEMON
PROCESS_NAME = 'process_name'
CLASSNAME = 'classname... | bsd-3-clause | 1,068,565,629,341,200,000 | 31.444444 | 119 | 0.621575 | false | 3.80704 | false | false | false |
updownlife/multipleK | bin/reads2kmer/reads2kmer.py | 1 | 1433 | #!/usr/bin/env python
import sys
from Bio import SeqIO
from optparse import OptionParser
parser = OptionParser()
parser.add_option('-o','--output', dest = "outputFile", help = "Name of the output file")
parser.add_option('-k','--klength', dest = "kmerLength", help = "Length of kmer")
parser.add_option('-r','--readsfil... | gpl-2.0 | -4,149,227,004,103,901,000 | 32.325581 | 111 | 0.665736 | false | 2.866 | false | false | false |
f3at/feat | src/feat/agencies/messaging/emu.py | 1 | 6790 | # F3AT - Flumotion Asynchronous Autonomous Agent Toolkit
# Copyright (C) 2010,2011 Flumotion Services, S.A.
# All rights reserved.
# 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... | gpl-2.0 | -3,548,642,203,115,684,400 | 29.863636 | 79 | 0.614286 | false | 4.056153 | false | false | false |
michaeltchapman/flaskmon | app.py | 1 | 6975 | from flask import Flask, render_template, request, jsonify
from sqlalchemy import create_engine, Table, MetaData
from sqlalchemy.orm import sessionmaker
from rrdtool import fetch
import time
from os import listdir
graph_height = 50.0
app = Flask(__name__)
### SqlAlchemy stuff for accessing Openstack State ###
db = c... | bsd-3-clause | 2,899,113,168,013,195,000 | 35.139896 | 435 | 0.531613 | false | 3.553235 | false | false | false |
easel/gamestats | src/django/gamestats/loot/submission.py | 1 | 1871 | from xml.etree import ElementTree
from django.contrib.auth.models import User
from gamestats.loot.models import Character, Item, Loot, Attendance, Kill, LootType
def parse_xml(xml):
"""
Parse an XML submission
"""
root = ElementTree.fromstring(xml)
submitter = User.objects.get(username__iexact=roo... | mit | -6,596,245,406,597,632,000 | 35.686275 | 83 | 0.590593 | false | 3.577438 | false | false | false |
sharonlev/pyLoggingExtras | test/OutputSetter.py | 1 | 2060 | __author__ = 'Sharon Lev'
__email__ = 'sharon_lev@yahoo.com'
__date__ = '10/25/16'
import sys
from StringIO import StringIO
from unittest import TestCase
from logging import root
from json import dumps
class OutputSetter(TestCase):
"""
"""
temp_stdout = None
@classmethod
def setUpClass(cls):
... | gpl-3.0 | -1,023,077,614,002,122,000 | 27.625 | 97 | 0.562136 | false | 3.931298 | false | false | false |
vaishaksuresh/udacity_data_analyst | P2/ProblemSets_2_to_4/P2_02.py | 1 | 1339 | import pandas
import pandasql
def max_temp_aggregate_by_fog(filename):
'''
This function should run a SQL query on a dataframe of
weather data. The SQL query should return two columns and
two rows - whether it was foggy or not (0 or 1) and the max
maxtempi for that fog value (i.e., the maximum ma... | gpl-2.0 | -4,712,227,669,270,800,000 | 38.382353 | 93 | 0.704257 | false | 3.847701 | false | false | false |
maas/maas | src/maasserver/api/tests/test_domains.py | 1 | 9830 | # Copyright 2016 Canonical Ltd. This software is licensed under the
# GNU Affero General Public License version 3 (see the file LICENSE).
"""Tests for Domain API."""
import http.client
import json
import random
from django.conf import settings
from django.urls import reverse
from testtools.matchers import Contains... | agpl-3.0 | -6,530,128,466,336,639,000 | 34.232975 | 78 | 0.605595 | false | 3.943041 | true | false | false |
TUBvision/hrl | misc/old/simpledisplay.py | 1 | 1532 | import hrl
import pygame as pg
from pygame.locals import *
from OpenGL.GL import *
from patterns import *
from random import shuffle,randint
ntls = 4
wdth = 1024
hght = 766
def circle(y,ptch):
y = np.mod(y,2) - 1
x = np.sin(-np.pi * y)/2 + 0.5
y = np.abs(y)
return np.round((wdth-ptch.wd... | lgpl-2.1 | -4,229,200,050,737,147,000 | 22.709677 | 93 | 0.54765 | false | 2.980545 | false | false | false |
Mellthas/quodlibet | quodlibet/quodlibet/player/xinebe/cdefs.py | 1 | 9844 | # Copyright 2006 Lukas Lalinsky
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
import ctypes
from quodlibet.util im... | gpl-2.0 | 7,453,561,007,139,033,000 | 33.907801 | 78 | 0.701849 | false | 2.598733 | false | false | false |
ctalbert/mozharness | configs/signing/android_mozilla-esr10.py | 1 | 4482 | #!/usr/bin/env python
LOCALES = ["en-US", "multi"]
# override tag for all repos
TAG = None
#AUS_SERVER = "dev-stage01.build.mozilla.org"
AUS_SERVER = "aus3-staging.mozilla.org"
#FTP_SERVER = "dev-stage01.build.mozilla.org"
FTP_SERVER = "stage.mozilla.org"
AUS_UPLOAD_BASE_DIR = "/opt/aus2/snippets/staging"
AUS_DIR_BASE... | mpl-2.0 | 8,020,089,138,990,125,000 | 33.21374 | 136 | 0.598394 | false | 2.939016 | true | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.