repo_name stringlengths 6 61 | path stringlengths 4 230 | copies stringlengths 1 3 | size stringlengths 4 6 | text stringlengths 1.01k 850k | license stringclasses 15
values | hash int64 -9,220,477,234,079,998,000 9,219,060,020B | line_mean float64 11.6 96.6 | line_max int64 32 939 | alpha_frac float64 0.26 0.9 | autogenerated bool 1
class | ratio float64 1.62 6.1 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
skipmodea1/plugin.video.roosterteeth | resources/lib/roosterteeth_list_episodes.py | 1 | 8176 | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
#
# Imports
#
from future import standard_library
standard_library.install_aliases()
from builtins import object
import os
import requests
import sys
import urllib.request, urllib.parse, urllib.error
import xbmcgui
import xbmcplugin
import json
from roosterteeth_const imp... | gpl-3.0 | -2,838,575,640,047,158,300 | 38.887805 | 122 | 0.576321 | false | 3.926993 | false | false | false |
openstack/smaug | karbor/services/operationengine/engine/triggers/timetrigger/time_trigger.py | 1 | 9734 | # 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
# d... | apache-2.0 | -6,533,845,585,274,748,000 | 36.011407 | 79 | 0.59585 | false | 4.217504 | false | false | false |
amwelch/a10sdk-python | a10sdk/core/slb/slb_dns_stats.py | 2 | 3687 | from a10sdk.common.A10BaseClass import A10BaseClass
class Stats(A10BaseClass):
"""This class does not support CRUD Operations please use parent.
:param nat_resp: {"description": "(NAT) No. of responses", "format": "counter", "type": "number", "oid": "8", "optional": true, "size": "2"}
:param slb_res... | apache-2.0 | -2,718,929,192,280,475,600 | 45.0875 | 175 | 0.584486 | false | 3.309695 | false | false | false |
epol/dhcp | server.py | 1 | 1434 | #!/usr/bin/env python2.7
from pydhcplib.dhcp_packet import *
from pydhcplib.dhcp_network import *
netopt = {'client_listen_port':"68",
'server_listen_port':"67",
'listen_address':"0.0.0.0"}
goodservers_str = [ '192.168.251.2', '192.168.251.3' ]
goodservers = [ [ int(n) for n in s.split('.') ] for... | gpl-3.0 | 4,637,498,704,910,496,000 | 27.117647 | 92 | 0.532775 | false | 3.972299 | false | false | false |
avaly/quicktile | quicktile/__main__.py | 1 | 9638 | """Entry point and related functionality"""
__author__ = "Stephan Sokolow (deitarion/SSokolow)"
__license__ = "GNU GPL 2.0 or later"
import errno, logging, os, subprocess, sys
from ConfigParser import RawConfigParser
try:
import pygtk
pygtk.require('2.0')
except ImportError:
pass # Apparently Travis-CI... | gpl-2.0 | -8,080,371,509,678,494,000 | 33.298932 | 79 | 0.597634 | false | 3.858287 | true | false | false |
ContextLogic/redis-py | tests/test_encoding.py | 37 | 1336 | from __future__ import with_statement
import pytest
from redis._compat import unichr, u, unicode
from .conftest import r as _redis_client
class TestEncoding(object):
@pytest.fixture()
def r(self, request):
return _redis_client(request=request, decode_responses=True)
def test_simple_encoding(self... | mit | -6,302,935,293,464,976,000 | 32.4 | 68 | 0.642216 | false | 3.640327 | true | false | false |
gr3yman/TileControl | altTileCtrl.py | 1 | 1960 | #!/usr/env/python3
from subprocess import *
from collections import *
class windo:
def __init__(self, windata):
self.windata = {}
def getwindata():
with Popen(['wmctrl -lG | tr -s " "'], shell = True, stdout=PIPE, universal_newlines=True) as wmctrlg:
winout = wmctrlg.stdo... | gpl-2.0 | -669,324,268,774,902,500 | 31.131148 | 110 | 0.536735 | false | 3.791103 | false | false | false |
madebymany/isthetoiletfree | server.py | 1 | 10989 | #!/usr/bin/env python
import tornado.ioloop
import tornado.web
import tornado.gen
import tornado.websocket
import tornado.auth
import tornado.escape
import hmac
import hashlib
import functools
import os
import momoko
import urlparse
import time
import datetime
import parsedatetime
import prettytable
import ascii_graph... | mit | 8,759,443,257,336,088,000 | 34.108626 | 78 | 0.576486 | false | 3.786699 | false | false | false |
DougBurke/astropy | astropy/units/format/unicode_format.py | 2 | 1620 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""
Handles the "Unicode" unit format.
"""
from . import console, utils
class Unicode(console.Console):
"""
Output-only format to display pretty formatting at the console
using Unicode characters.
For example::... | bsd-3-clause | 260,359,851,560,530,940 | 21.913043 | 70 | 0.466161 | false | 3.601367 | false | false | false |
google-code/betsynetpdf | sumatrapdf/scripts/metadata/metadata.py | 20 | 7301 | import types
def is_valid_signed(bits, val):
if type(val) not in (types.IntType, types.LongType): return False
e = bits - 1
min_val = -(2 ** e)
if val < min_val: return False
max_val = (2 ** e) - 1
if val > max_val: return False
return True
def is_valid_unsigned(bits, val):
... | gpl-3.0 | -325,171,988,607,077,570 | 26.189189 | 99 | 0.548829 | false | 3.498323 | false | false | false |
ipfs/py-ipfs-api | ipfshttpclient/client/bootstrap.py | 1 | 1604 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from . import base
class Section(base.SectionBase):
@base.returns_single_item
def add(self, peer, *peers, **kwargs):
"""Adds peers to the bootstrap list.
Parameters
----------
peer : str
IPFS MultiAddr of a peer to add to the list
Return... | mit | -5,706,565,431,632,337,000 | 22.455882 | 79 | 0.602258 | false | 2.914077 | false | false | false |
bootcamptropa/django | walladog/settings.py | 1 | 4992 | """
Django settings for walladog project.
Generated by 'django-admin startproject' using Django 1.8.6.
For more information on this file, see
https://docs.djangoproject.com/en/1.8/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.8/ref/settings/
"""
# Build pat... | mit | 7,755,102,613,394,406,000 | 25.700535 | 82 | 0.664063 | false | 3.171537 | false | false | false |
IntelLabs/numba | numba/core/rewrites/registry.py | 7 | 3651 | from collections import defaultdict
from numba.core import config
class Rewrite(object):
'''Defines the abstract base class for Numba rewrites.
'''
def __init__(self, state=None):
'''Constructor for the Rewrite class.
'''
pass
def match(self, func_ir, block, typemap, calltyp... | bsd-2-clause | -8,706,756,071,578,778,000 | 36.255102 | 79 | 0.567516 | false | 4.447016 | false | false | false |
docker/docker-py | tests/unit/client_test.py | 3 | 10129 | import datetime
import os
import unittest
import docker
import pytest
from docker.constants import (
DEFAULT_DOCKER_API_VERSION, DEFAULT_TIMEOUT_SECONDS,
DEFAULT_MAX_POOL_SIZE, IS_WINDOWS_PLATFORM
)
from docker.utils import kwargs_from_env
from . import fake_api
try:
from unittest import mock
except Impo... | apache-2.0 | 2,610,971,818,963,738,600 | 36.794776 | 79 | 0.573502 | false | 4.040287 | true | false | false |
mechtaev/angelix | src/repair/localization.py | 1 | 4985 | import sys
from math import sqrt, ceil
import logging
logger = logging.getLogger(__name__)
class NoNegativeTestException(Exception):
pass
def ochiai(executed_passing, executed_failing, total_passing, total_failing):
if not total_failing > 0:
raise NoNegativeTestException()
if executed_failing + ... | mit | -2,496,186,853,963,597,300 | 30.751592 | 116 | 0.558275 | false | 4.312284 | true | false | false |
dengdan/seglink | test/test_preprocessing.py | 1 | 7939 | # Copyright 2016 Paul Balanca. 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 agr... | gpl-3.0 | 23,782,395,031,242,852 | 49.566879 | 111 | 0.452198 | false | 4.425307 | false | false | false |
vicalloy/django-lb-workflow | lbworkflow/models/config.py | 1 | 13222 | import uuid
from django.db import models
from django.template import Context, Template
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from jsonfield import JSONField
from lbutils import create_instance, get_or_none
from lbworkflow import settings
from lbworkflow.core.helper im... | mit | 5,586,027,824,373,666,000 | 28.447661 | 107 | 0.586674 | false | 3.874011 | false | false | false |
Stanford-Online/edx-analytics-data-api | analyticsdataserver/views.py | 1 | 3719 | from django.conf import settings
from django.db import connections
from django.http import HttpResponse
from rest_framework import permissions, schemas
from rest_framework.permissions import AllowAny
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from rest_framework.views... | agpl-3.0 | -8,530,381,616,471,930,000 | 31.060345 | 116 | 0.677333 | false | 4.502421 | false | false | false |
danforthcenter/plantcv | plantcv/plantcv/closing.py | 2 | 1411 | import os
import numpy as np
from skimage import morphology
from plantcv.plantcv import params
from plantcv.plantcv import print_image
from plantcv.plantcv import plot_image
from plantcv.plantcv import fatal_error
def closing(gray_img, kernel=None):
"""Wrapper for scikit-image closing functions. Opening can remov... | mit | -4,691,123,303,530,248,000 | 33.414634 | 120 | 0.693125 | false | 3.59949 | false | false | false |
cslucano/scrapping-admision | admision/spiders/ingresantes_spider.py | 1 | 1952 | from scrapy.spider import Spider
from scrapy.selector import Selector
from scrapy.http import Request
from admision.items import IngresanteItem
class IngresantesSpider(Spider):
name = "ingresantes"
allowed_domains = ["admision.uni.edu.pe"]
start_urls = [
"http://www.admision.uni.edu.pe/resultado_a... | mit | -7,886,927,225,431,843,000 | 44.395349 | 125 | 0.572746 | false | 3.194763 | false | false | false |
z0rkuM/stockbros | stockbros-ws/Stocks/Stocks.py | 1 | 1638 | #!flask/bin/python
from flask import Blueprint, jsonify, abort, request, make_response
from Authentication.Authentication import *
from util import *
api_stocks = Blueprint('api_stocks', __name__)
@api_stocks.route("/stocks", methods=['GET'])
@auth.login_required
def get_stocks():
documentStocks = db.stocks
stocks ... | mit | 4,684,054,567,005,255,000 | 31.117647 | 150 | 0.691697 | false | 3.067416 | false | false | false |
ssssam/calliope | calliope/diff/__init__.py | 1 | 1093 | # Calliope
# Copyright (C) 2018 Sam Thursfield <sam@afuera.me.uk>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
#... | gpl-2.0 | 551,779,125,708,441,300 | 28.540541 | 71 | 0.721866 | false | 3.619205 | false | false | false |
nodebox/nodebox-opengl | examples/07-filter/07-blend.py | 1 | 1356 | # Add the upper directory (where the nodebox module is) to the search path.
import os, sys; sys.path.insert(0, os.path.join("..",".."))
from nodebox.graphics import *
# Blend modes are used to combine the pixels of two images,
# in different ways than standard transparency.
# NodeBox supports the most common blend mo... | bsd-3-clause | -3,006,431,536,299,593,000 | 33.794872 | 81 | 0.635693 | false | 3.625668 | false | false | false |
0--key/lib | portfolio/Python/scrapy/ldmountaincentre/google.py | 2 | 2822 | import csv
import os
import copy
import json
from decimal import Decimal
from scrapy.spider import BaseSpider
from scrapy.selector import HtmlXPathSelector
from scrapy.http import Request, HtmlResponse, FormRequest
from scrapy.utils.response import get_base_url
from scrapy.utils.url import urljoin_rfc
from scrapy.http... | apache-2.0 | 1,565,566,366,338,615,300 | 34.721519 | 121 | 0.557406 | false | 3.71805 | false | false | false |
cl1ck/tutsplus-downloader | Tutsplus.py | 1 | 4354 | #! /usr/pkg/bin/python
#-*- coding: utf-8 -*-
import requests
from bs4 import BeautifulSoup
import os
import re
class Tutsplus:
login_url= 'https://tutsplus.com/sign_in'
login_post = 'https://tutsplus.com/sessions'
home_url = 'https://tutsplus.com'
def __init__(self, username, password):
sel... | mit | -5,994,445,261,014,313,000 | 32.736434 | 129 | 0.569853 | false | 3.945603 | false | false | false |
evernote/pootle | pootle/apps/pootle_notifications/templatetags/notification_tags.py | 1 | 1687 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Zuza Software Foundation
# Copyright 2013-2014 Evernote Corporation
#
# This file is part of Pootle.
#
# 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... | gpl-2.0 | -5,791,673,693,518,483,000 | 34.893617 | 75 | 0.724363 | false | 3.941589 | false | false | false |
maginetv/exconf | exconf/utils.py | 1 | 8022 | # -*- coding: utf-8 -*-
#
# 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, softw... | apache-2.0 | -1,949,287,264,025,592,000 | 37.2 | 105 | 0.597856 | false | 3.901751 | false | false | false |
bmander/graphserver | pygs/test/unit_test/test_timezoneperiod.py | 2 | 2177 | import unittest
from graphserver.core import *
from graphserver import util
import pickle
class TestTimezonePeriod(unittest.TestCase):
def test_basic(self):
tzp = TimezonePeriod(0, 100, -10)
assert tzp
assert tzp.begin_time == 0
assert tzp.end_time == 100
assert tzp... | bsd-3-clause | -1,947,312,984,700,045,600 | 43.44898 | 139 | 0.559486 | false | 3.30349 | true | false | false |
yorickdewid/Mavicona | ecoli/ecoli/pickledb.py | 1 | 6324 | #!/usr/bin/env python
# Copyright (c) 2015, Harrison Erd
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification,
# are permitted provided that the following conditions are met:
#
# Redistributions of source code must retain the above copyright notice, this
# list of ... | bsd-3-clause | 4,799,547,565,119,227,000 | 30.467662 | 82 | 0.607052 | false | 3.910946 | false | false | false |
mondhs/kaldi-liepa-train | opt/kaldi-liepa-train/tool_data_prep/01_transform_liepa2csv.py | 1 | 2734 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
'''
@author: Mindaugas Greibus
'''
import re
import wave
import os
def transform_transcription_file(transcription_path, output_file_map, total_duration_map, repo_type):
with open(transcription_path, 'r') as input_file:
for line in input_file:
lin... | bsd-2-clause | 1,105,583,628,751,635,500 | 36.972222 | 104 | 0.553402 | false | 3.301932 | true | false | false |
ocelot-collab/ocelot | ocelot/rad/fel.py | 1 | 21453 | from __future__ import print_function
'''
basic fel calculations
'''
#from pylab import *
import numpy as np
import numpy.fft as fft
import scipy.special as sf
from ocelot.common.globals import m_e_eV, epsilon_0, speed_of_light, q_e, h_eV_s, lambda_C_r, I_Alfven, ro_e
import logging
from scipy.optimize import fmin
fro... | gpl-3.0 | 8,590,741,184,945,990,000 | 38.120438 | 235 | 0.520689 | false | 2.949505 | false | false | false |
huangyh09/brie | brie/utils/count.py | 1 | 7351 | import sys
import numpy as np
from .sam_utils import load_samfile, fetch_reads
def _check_SE_event(gene):
"""Check SE event"""
if (len(gene.trans) != 2 or
gene.trans[0].exons.shape[0] != 3 or
gene.trans[1].exons.shape[0] != 2 or
np.mean(gene.trans[0].exons[[0, 2], :] ==
... | apache-2.0 | -3,034,999,761,017,356,300 | 34.341346 | 79 | 0.577881 | false | 3.043892 | false | false | false |
kuc2477/news | tests/models/test_sqlalchemy_models.py | 1 | 1375 | from celery.states import ALL_STATES
def test_abstract_model_implementations(sa_session, sa_schedule, sa_child_news):
assert(isinstance(sa_schedule.id, int))
assert(isinstance(sa_child_news.id, int))
def test_abstract_schedule_implementation(
sa_scheduler, sa_session, sa_owner_model, sa_schedule):
... | mit | -7,052,619,950,830,355,000 | 39.441176 | 80 | 0.711273 | false | 3.266033 | false | false | false |
haypo/fatoptimizer | test_fat_site.py | 1 | 1717 | """
Integration test: Test FAT mode with the fatoptimizer configured by the site
module.
"""
import dis
import fat
import io
import sys
import textwrap
import unittest
#if not any(transformer.name == 'fat' for transformer in sys.get_code_transformers()):
# raise Exception("test must be run with python3 -X fat")
... | mit | 8,208,378,469,773,233,000 | 23.183099 | 86 | 0.627839 | false | 3.858427 | true | false | false |
edeposit/marcxml2mods | tests/test_transformators.py | 1 | 2292 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
#
# Interpreter version: python 2.7
#
# Imports =====================================================================
import os
import os.path
from lxml import etree
from lxml import isoschematron
import pytest
from marcxml2mods import transformators
from test_xslt_tran... | mit | -2,525,569,180,709,696,500 | 22.875 | 79 | 0.59555 | false | 3.63233 | true | false | false |
sounay/flaminggo-test | onadata/libs/authentication.py | 8 | 2833 | from django.utils.translation import ugettext as _
from django_digest import HttpDigestAuthenticator
from rest_framework.authentication import get_authorization_header
from rest_framework.authentication import BaseAuthentication
from rest_framework.authentication import TokenAuthentication
from rest_framework.exception... | bsd-2-clause | -2,830,075,401,119,703,600 | 33.54878 | 79 | 0.696788 | false | 4.659539 | false | false | false |
panosl/helios | helios/shipping/models.py | 1 | 2404 | from django.db import models
from django.utils.translation import ugettext_lazy as _
from helios.location.models import Country
from helios.conf import settings
if settings.IS_MULTILINGUAL:
import multilingual
class Shipper(models.Model):
if settings.IS_MULTILINGUAL:
class Translation(multilingual.Translation):
... | bsd-3-clause | -6,225,284,416,697,045,000 | 29.43038 | 91 | 0.72421 | false | 3.376404 | false | false | false |
scrollback/kuma | vendor/packages/sqlalchemy/test/orm/test_dynamic.py | 6 | 21952 | from sqlalchemy.test.testing import eq_, ne_
import operator
from sqlalchemy.orm import dynamic_loader, backref
from sqlalchemy.test import testing
from sqlalchemy import Integer, String, ForeignKey, desc, select, func
from sqlalchemy.test.schema import Table, Column
from sqlalchemy.orm import mapper, relationship, cre... | mpl-2.0 | -5,822,293,660,411,992,000 | 33.844444 | 154 | 0.577761 | false | 3.840448 | true | false | false |
smmosquera/serge | render.py | 2 | 12006 | """Classes to perform rendering"""
import pygame
import common
import serialize
import camera
import visual
import events
class DuplicateLayer(Exception): """The layer was already present"""
class UnknownLayer(Exception): """The layer was not found"""
class NoLayer(Exception): """A layer was not found when one was e... | lgpl-3.0 | 6,961,334,540,211,068,000 | 31.536585 | 110 | 0.583208 | false | 4.458225 | false | false | false |
caperren/Archives | OSU Coursework/CS 361 - Software Engineering I/Assignment 1/5/kwic.py | 2 | 1142 | def split_by_periods(document):
output_array = []
sentence_array_temp = ""
for current_char in document:
if current_char != "\n":
sentence_array_temp += current_char
if current_char == ".":
output_array.append(sentence_array_temp)
sentence_array_temp = ... | gpl-3.0 | 2,724,953,234,113,535,000 | 24.954545 | 77 | 0.641856 | false | 3.781457 | false | false | false |
Cadair/ginga | ginga/web/bokehw/CanvasRenderBokeh.py | 3 | 5041 | #
# CanvasRenderBokeh.py -- for rendering into a Bokeh widget
#
# Eric Jeschke (eric@naoj.org)
#
# Copyright (c) Eric R. Jeschke. All rights reserved.
# This is open-source software licensed under a BSD license.
# Please see the file LICENSE.txt for details.
import numpy
from . import BokehHelp
from ginga.canvas.mix... | bsd-3-clause | -4,610,996,261,689,369,000 | 29.36747 | 76 | 0.558024 | false | 3.3969 | false | false | false |
erh3cq/hyperspy | hyperspy/learn/ornmf.py | 3 | 13817 | # -*- coding: utf-8 -*-
# Copyright 2007-2020 The HyperSpy developers
#
# This file is part of HyperSpy.
#
# HyperSpy 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... | gpl-3.0 | -2,418,872,542,565,154,000 | 30.260181 | 87 | 0.556127 | false | 3.624607 | false | false | false |
lizardsystem/lizard-waterbalance | lizard_wbcomputation/impact_from_buckets.py | 1 | 4525 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# pylint: disable=C0111
# The lizard_wbcomputation package implements the computational core of the
# lizard waterbalance Django app.
#
# Copyright (C) 2012 Nelen & Schuurmans
#
# This package is free software: you can redistribute it and/or modify it under
# the terms of the... | gpl-3.0 | -9,105,309,254,465,833,000 | 39.765766 | 100 | 0.702099 | false | 4.029386 | false | false | false |
nileshk/url-shortener | shortener/models.py | 2 | 1541 | import datetime
from django.db import models
from django.conf import settings
#from django.contrib.auth.models import User
from django import forms
from urlweb.shortener.baseconv import base62
class Link(models.Model):
"""
Model that represents a shortened URL
# Initialize by deleting all Link objects
... | mit | 1,286,833,389,382,425,300 | 24.683333 | 66 | 0.615185 | false | 3.502273 | false | false | false |
stephane-martin/salt-debian-packaging | salt-2016.3.2/salt/states/github.py | 2 | 4092 | # -*- coding: utf-8 -*-
'''
Github User State Module
.. versionadded:: 2016.3.0.
This state is used to ensure presence of users in the Organization.
.. code-block:: yaml
ensure user test is present in github:
github.present:
- name: 'Example TestUser1'
- email: example@domain.com... | apache-2.0 | 5,962,355,521,565,373,000 | 27.027397 | 91 | 0.544477 | false | 4.0555 | true | false | false |
openaps/oacids | oacids/exported/heartbeat.py | 1 | 1924 |
import os
import time
import dbus.service
from gi.repository import GObject as gobject
from datetime import datetime
from oacids.helpers.dbus_props import GPropSync, Manager, WithProperties
from ifaces import BUS, IFACE, PATH, INTROSPECTABLE_IFACE, TRIGGER_IFACE, OPENAPS_IFACE
# class Heartbeat (GPropSync, Manager):... | mit | 8,406,726,498,926,139,000 | 24.653333 | 87 | 0.647089 | false | 3.351916 | false | false | false |
eadains09/scripts | kobo/kobo_utils.py | 1 | 9703 | #!/usr/bin/env python
'''Utilities for reading and writing a Kobo ebook reader's database.
'''
import os, sys
import sqlite3
def escape_quotes(s):
return s.replace("'", "''")
class KoboDB:
'''Interact with a Kobo e-reader's database:
either one that's mounted live from the device, or a local copy.
... | gpl-2.0 | 3,140,875,779,706,617,000 | 37.05098 | 91 | 0.540658 | false | 4.078604 | false | false | false |
tairabiteru/NDL-DVCL2 | src/cfg.py | 1 | 5694 | """
PLEASE READ:
This is the config file for the program.
The file is written in python to make it easy for the program to read it,
however this means you must follow the formatting in the file.
For example, if the value is enclosed in quotation marks, it needs to stay that
way.
Additionally, do not edit anything pas... | cc0-1.0 | 3,923,560,303,382,618,000 | 36.460526 | 86 | 0.711626 | false | 3.375222 | false | false | false |
legnaleurc/acddl | tests/util.py | 1 | 3543 | import asyncio
import functools
from unittest import mock as utm
import hashlib
import arrow
from pyfakefs import fake_filesystem as ffs
class PathMock(utm.Mock):
def __init__(self, fs=None, *pathsegments, **kwargs):
super(PathMock, self).__init__()
self._fs = fs
self._path = self._fs.J... | mit | 5,657,087,379,905,698,000 | 25.440299 | 76 | 0.607113 | false | 3.314312 | false | false | false |
KathleenLabrie/KLpyastro | klpyastro/redux/spec1d.py | 1 | 5364 | from __future__ import print_function
from math import pi
from astropy.io import fits
import numpy as np
import matplotlib.pyplot as plt
import stsci.convolve._lineshape as ls
from klpysci.fit import fittools as ft
# Utility function to open and plot original spectrum
def openNplot1d (filename, extname=('SCI',1)):
... | isc | -6,051,416,670,696,655,000 | 32.111111 | 90 | 0.582401 | false | 3.089862 | false | false | false |
walkerke/marble | marble/tests/test_clustering.py | 2 | 1612 | """ Tests for the clustering computation """
from nose.tools import *
import itertools
from shapely.geometry import Polygon
import marble as mb
#
# Synthetic data for tests
#
def grid():
""" Areal units arranged in a grid """
au = [i*3+j for i,j in itertools.product(range(3), repeat=2)]
units = {a:Polygo... | bsd-3-clause | 4,109,802,494,623,839,700 | 23.424242 | 66 | 0.42866 | false | 2.990724 | true | false | false |
babycaseny/meld | meld/build_helpers.py | 1 | 15910 | # This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
... | gpl-2.0 | -8,316,151,223,959,306,000 | 34.355556 | 79 | 0.55726 | false | 3.885226 | false | false | false |
dmccloskey/SBaaS_MFA | SBaaS_MFA/stage02_isotopomer_measuredData_execute.py | 1 | 18694 | #SBaaS
from .stage02_isotopomer_measuredData_io import stage02_isotopomer_measuredData_io
from SBaaS_isotopomer.stage01_isotopomer_averages_query import stage01_isotopomer_averages_query
from SBaaS_physiology.stage01_physiology_rates_query import stage01_physiology_rates_query
from SBaaS_LIMS.lims_msMethod_query import... | mit | -4,211,725,522,628,708,000 | 57.059006 | 235 | 0.467423 | false | 4.035838 | false | false | false |
rousseab/pymatgen | pymatgen/util/tests/test_string_utils.py | 1 | 2048 | # coding: utf-8
from __future__ import division, unicode_literals
"""
FIXME: Proper module docstring
"""
__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2012, The Materials Project"
__version__ = "0.1"
__maintainer__ = "Shyue Ping Ong"
__email__ = "shyuep@gmail.com"
__date__ = "Aug 26, 2012"
import unitte... | mit | -5,392,121,690,976,006,000 | 34.929825 | 246 | 0.590332 | false | 3.029586 | true | false | false |
CarlFK/wafer | wafer/management/commands/wafer_speaker_tickets.py | 1 | 1606 | import sys
import csv
from optparse import make_option
from django.core.management.base import BaseCommand
from django.contrib.auth import get_user_model
from wafer.talks.models import ACCEPTED
class Command(BaseCommand):
help = ("List speakers and associated tickets. By default, only lists"
" speak... | isc | 5,173,316,226,204,295,000 | 33.170213 | 74 | 0.566625 | false | 4.160622 | false | false | false |
danceos/dosek | generator/coder/syscall_fsm.py | 1 | 14851 | from .syscall_full import FullSystemCalls, AlarmTemplate
from .elements import Statement, Comment
from .elements import CodeTemplate, Include, VariableDefinition, \
Block, Statement, Comment, Function, Hook, DataObject, DataObjectArray
from generator.tools import unwrap_seq
from generator.analysis.AtomicBasicBlock ... | lgpl-3.0 | 857,813,653,266,763,300 | 39.355978 | 109 | 0.595313 | false | 4.074348 | false | false | false |
Azure/azure-sdk-for-python | sdk/cognitiveservices/azure-cognitiveservices-knowledge-qnamaker/azure/cognitiveservices/knowledge/qnamaker/models/feedback_record_dto.py | 1 | 1420 | # coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes ... | mit | 1,054,254,704,202,606,500 | 33.634146 | 76 | 0.573944 | false | 4.022663 | false | false | false |
lukas/scikit-class | examples/keras-sign/perceptron.py | 2 | 1111 | # A very simple perceptron for classifying american sign language letters
import signdata
import numpy as np
from keras.models import Sequential
from keras.layers import Dense, Flatten, Dropout, Conv2D, MaxPooling2D, Reshape
from keras.utils import np_utils
import wandb
from wandb.keras import WandbCallback
# logging ... | gpl-2.0 | -6,721,303,665,081,432,000 | 28.236842 | 80 | 0.738074 | false | 3.035519 | true | false | false |
fake-name/ReadableWebProxy | WebMirror/management/rss_parser_funcs/feed_parse_extractDreamsOfJianghu.py | 1 | 1217 | def extractDreamsOfJianghu(item):
"""
"""
vol, chp, frag, postfix = extractVolChapterFragmentPostfix(item['title'])
if not (chp or vol) or 'preview' in item['title'].lower():
return None
bad = ['pictures']
if any([(tmp in item['tags']) for tmp in bad]):
return None
tagmap = [
('TBVW', 'To Be A Virtu... | bsd-3-clause | 7,790,751,708,507,386,000 | 39.6 | 104 | 0.525062 | false | 3.316076 | false | false | false |
endlessm/chromium-browser | native_client/pnacl/driver/pnacl-compress.py | 2 | 6470 | #!/usr/bin/python
# Copyright (c) 2014 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
# Uses llvm tool pnacl-bccompress to add abbreviations into the input file.
# It runs pnacl-bccompress multiple times, using a hill... | bsd-3-clause | -6,841,414,445,066,758,000 | 33.784946 | 79 | 0.642504 | false | 3.643018 | true | false | false |
nccgroup/umap2 | umap2/core/usb.py | 1 | 1543 | '''
USB definitions and enumerations from the USB spec.
'''
# USB.py
#
# Contains definition of USB class, which is just a container for a bunch of
# constants/enums associated with the USB protocol.
#
# TODO: would be nice if this module could re-export the other USB* classes so
# one need import only USB to get all ... | agpl-3.0 | 2,192,557,851,825,431,600 | 21.042857 | 78 | 0.66429 | false | 3.522831 | false | false | false |
ProjetSigma/backend | sigma_core/models/group_member.py | 1 | 1578 | from django.db import models
from django.http import Http404
from sigma_core.models.user import User
class GroupMember(models.Model):
"""
Modelize a membership relation between an User and a Group.
"""
class Meta:
# TODO: Make a primary key once Django supports it
unique_together = (("... | agpl-3.0 | -6,175,557,414,385,646,000 | 36.571429 | 90 | 0.687579 | false | 3.8867 | false | false | false |
julianofischer/gitiscool | gitiscool.py | 1 | 1681 | import os, json
'''
This file is part of gitiscool.
gitiscool 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.
gitis... | gpl-3.0 | -8,494,251,118,630,038,000 | 24.469697 | 95 | 0.625818 | false | 3.955294 | false | false | false |
Brounredo/Revolution | main.py | 1 | 5549 | # Инициализация
import Functions # Определения функций
import Names # Случайные имена
import Vars # Переменные
import AllCountries # Список реальных стран
import sys # Системная библиотека
import random # Генератор случайных чисел
# Интерактивная инициализация
Vars.is_lose = random.choice([True, False]) # Выигр... | gpl-2.0 | -5,076,489,527,068,514,000 | 39.495413 | 117 | 0.622111 | false | 2.099905 | false | false | false |
TheSimoms/Kaloot | src/kaloot.py | 1 | 2037 | import os
import logging
import glob
import bot
class Kaloot:
def __init__(self, args):
self.nicknames = self.parse_nicknames(args)
def parse_nicknames(self, args):
nickname_files = None
nickname_path = '%s/nicknames' % os.path.dirname(__file__)
if args.nicknames is None:
... | gpl-2.0 | -5,601,243,374,530,525,000 | 27.690141 | 99 | 0.52381 | false | 4.297468 | false | false | false |
SouthGreenPlatform/arcad-hts | sp5_gbs/demultadapt.py | 1 | 18149 | #!/usr/bin/env python
#-*- coding:utf-8 -*-
"""
AUTHOR
Written by Vincent MAILLOL (modified by Gautier Sarah)
BUGS
sarah@supagro.inra.fr
COPYRIGHT
Copyright © 2011 DAVEM, 2014 AGAP. Licence GPLv3+ : GNU
GPL version 3 ou supérieures <http://gnu.org/licenses/gpl.html>
This program... | gpl-3.0 | -8,934,429,547,450,170,000 | 35.586694 | 248 | 0.527635 | false | 3.802808 | false | false | false |
nsmoooose/csp | csp/data/ui/scripts/utils.py | 1 | 2369 | #!/usr/bin/python
# Combat Simulator Project
# Copyright (C) 2002-2005 The Combat Simulator Project
# http://csp.sourceforge.net
#
# 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 | 9,143,938,031,847,058,000 | 32.842857 | 77 | 0.686788 | false | 4.022071 | false | false | false |
FRVisser/loramotedata | data.py | 1 | 3344 | #!/usr/bin/env python3
import json
import base64
import binascii
import csv
from datetime import datetime
with open ( 'data.json' ) as data_file:
data = json.load ( data_file )
lenData = len ( data["points"] )
hexData = []
for i in range ( 0, lenData ):
hexData.append(i)
hexData[i] = ( binascii.b2a_hex... | gpl-2.0 | -2,641,337,523,662,153,000 | 28.078261 | 209 | 0.586124 | false | 2.807725 | false | false | false |
shanzi/tchelper | tchelper/settings.py | 1 | 2980 | """
Django settings for tchelper project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
i... | bsd-2-clause | 3,063,481,958,019,438,600 | 24.689655 | 78 | 0.716779 | false | 3.23913 | false | false | false |
LTS5/connectomeviewer | cviewer/plugins/cff2/csurface_darray.py | 1 | 2088 | """ The ConnectomeViewer wrapper for a cfflib object """
# Copyright (C) 2009-2010, Ecole Polytechnique Federale de Lausanne (EPFL) and
# University Hospital Center and University of Lausanne (UNIL-CHUV)
#
# Modified BSD License
# Standard library imports
import os
# Enthought library imports
from traits.api import H... | bsd-3-clause | 2,409,175,742,572,920,300 | 33.229508 | 99 | 0.58046 | false | 3.866667 | false | false | false |
stlemme/python-dokuwiki-export | modgrammar/examples/infix_precedence.py | 2 | 1898 | #!/usr/bin/python3
import sys
from modgrammar import *
grammar_whitespace_mode = 'optional'
class Number (Grammar):
grammar = (OPTIONAL('-'), WORD('0-9'), OPTIONAL('.', WORD('0-9')))
def value(self):
return float(self.string)
class ParenExpr (Grammar):
grammar = (L('('), REF('Expr'), L(')'))
... | mit | -539,265,212,046,042,400 | 22.725 | 70 | 0.553741 | false | 3.353357 | false | false | false |
rmyers/trove-dashboard | trove_dashboard/databases/views.py | 1 | 5557 | # vim: tabstop=4 shiftwidth=4 softtabstop=4
# Copyright 2013 Rackspace Hosting
#
# 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... | apache-2.0 | -2,986,611,437,899,686,000 | 38.692857 | 78 | 0.573511 | false | 4.741468 | false | false | false |
ratnania/pyccel | src_old/tests/examples/projectors/projectors_2d.py | 1 | 7068 | # coding: utf-8
#$ header legendre(int)
def legendre(p):
k = p + 1
x = zeros(k, double)
w = zeros(k, double)
if p == 1:
x[0] = -0.577350269189625765
x[1] = 0.577350269189625765
w[0] = 1.0
w[1] = 1.0
elif p == 2:
x[0] = -0.774596669241483377
x[1] = ... | mit | 5,627,866,280,000,007,000 | 25.772727 | 90 | 0.477929 | false | 2.318898 | false | false | false |
shimpe/frescobaldi | frescobaldi_app/widgets/listedit.py | 1 | 6216 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2008 - 2014 by Wilbert Berendsen
#
# 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
... | gpl-2.0 | 7,993,347,465,381,578,000 | 31.715789 | 81 | 0.605051 | false | 4.16622 | false | false | false |
secnot/uva-onlinejudge-solutions | 10033 - Interpreter/main.py | 1 | 2573 | import sys
from itertools import count
def digit(n, num):
return num%(10**(n+1))//10**n
class Interpreter(object):
def __init__(self, program):
self._reg = [0 for r in range(10)]
self._mem = [0]*1000
self._pc = 0
self._instructions = [
self.i000, self.i100... | mit | 7,271,072,620,770,763,000 | 20.441667 | 70 | 0.508745 | false | 3.236478 | false | false | false |
tfiedor/perun | perun/check/linear_regression.py | 1 | 4513 | """The module contains the method for detection with using linear regression.
This module contains method for classification the perfomance change between two profiles
according to computed metrics and models from these profiles, based on the linear regression.
"""
import scipy.stats as stats
import perun.utils as u... | gpl-3.0 | 3,713,429,883,736,428,000 | 47.010638 | 100 | 0.709949 | false | 4.08047 | false | false | false |
graingert/dockhand | shipwright/base.py | 1 | 1971 | from __future__ import absolute_import
from . import build, dependencies, docker, push
class Shipwright(object):
def __init__(self, source_control, docker_client, tags):
self.source_control = source_control
self.docker_client = docker_client
self.tags = tags
def targets(self):
... | apache-2.0 | 4,241,055,058,138,033,700 | 34.196429 | 78 | 0.591071 | false | 4.030675 | false | false | false |
Tatsh/flac-tools | flactools/util.py | 1 | 1549 | import logging
import subprocess as sp
import sys
import tempfile
_log = logging.getLogger('flactools')
def encode_wav_to_mp3(wav_filename, output_filename, lame_options=['-V', '0']):
cmd = ['lame'] + lame_options + ['-S'] # Enforce no progress bar, etc
cmd += [wav_filename, output_filename]
_log.info(... | mit | -3,189,935,023,120,839,700 | 24.816667 | 79 | 0.608134 | false | 3.56092 | false | false | false |
kenshay/ImageScript | ProgramData/SystemFiles/Python/Lib/site-packages/OpenGL/GL/ARB/enhanced_layouts.py | 9 | 4210 | '''OpenGL extension ARB.enhanced_layouts
This module customises the behaviour of the
OpenGL.raw.GL.ARB.enhanced_layouts to provide a more
Python-friendly API
Overview (from the spec)
This extension adds the following functionality to layout qualifiers,
including broadening the API where this functionality is re... | gpl-3.0 | 709,087,629,149,364,600 | 33.235772 | 76 | 0.686223 | false | 3.841241 | false | false | false |
ggm/vm-for-transfer | src/vm/interpreter.py | 1 | 18577 | #Copyright (C) 2011 Gabriel Gregori Manzano
#
#This program is free software; you can redistribute it and/or
#modify it under the terms of the GNU General Public License
#as published by the Free Software Foundation; either version 2
#of the License, or (at your option) any later version.
#
#This program is distribute... | gpl-2.0 | -2,843,016,054,337,406,000 | 32.961609 | 84 | 0.58847 | false | 3.925824 | false | false | false |
pieleric/odemis | src/odemis/acq/align/spot.py | 2 | 23192 | # -*- coding: utf-8 -*-
"""
Created on 14 Apr 2014
@author: Kimon Tsitsikas
Copyright © 2013-2014 Kimon Tsitsikas, Delmic
This file is part of Odemis.
Odemis 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 Fou... | gpl-2.0 | 2,529,318,862,185,431,000 | 40.044248 | 125 | 0.633376 | false | 3.864356 | false | false | false |
jonatanolofsson/req | req/filesystem.py | 1 | 1429 | """
Filesystem related methods
"""
import os
import yaml
from . import command as subprocess
from . import util
GIT = ['git']
REQCONF_FILE = '.reqconfig'
def read_file(path, ref=None):
"""
Read file from filesystem or git tree
"""
def _load_file_from_fs():
"""
Read and parse file fro... | gpl-3.0 | -1,169,414,203,491,116,800 | 20.651515 | 65 | 0.555633 | false | 3.599496 | false | false | false |
googleapis/python-aiplatform | samples/model-builder/init_sample.py | 1 | 1303 | # Copyright 2021 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/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 6,944,361,281,353,380,000 | 31.575 | 74 | 0.726017 | false | 3.877976 | false | false | false |
eieio/pyy | modules/http.py | 1 | 1883 | ''' http.py
Copyright 2008 Corey Tabaka
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 la... | apache-2.0 | -550,603,477,425,224,450 | 28.370968 | 91 | 0.640998 | false | 3.405063 | false | false | false |
ceibal-tatu/sugar | src/jarabe/util/emulator.py | 4 | 6072 | # Copyright (C) 2006-2008, Red Hat, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distribut... | gpl-2.0 | -6,252,993,579,261,596,000 | 30.298969 | 79 | 0.612813 | false | 3.780822 | false | false | false |
google/makani | gs/monitor2/apps/plugins/layouts/crosswind_template.py | 1 | 3851 | # Copyright 2020 Makani Technologies LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to... | apache-2.0 | 6,053,131,682,668,815,000 | 36.38835 | 77 | 0.666061 | false | 3.720773 | false | false | false |
mmottahedi/neuralnilm_prototype | scripts/e259.py | 2 | 5253 | from __future__ import print_function, division
import matplotlib
matplotlib.use('Agg') # Must be before importing matplotlib.pyplot or pylab!
from neuralnilm import Net, RealApplianceSource, BLSTMLayer, DimshuffleLayer
from lasagne.nonlinearities import sigmoid, rectify, tanh
from lasagne.objectives import crossentrop... | mit | 8,540,140,778,415,116,000 | 24.133971 | 93 | 0.63221 | false | 3.358696 | false | false | false |
d2emon/newspaperizer | src/world/migrations/0002_auto_20160919_1719.py | 1 | 1245 | # -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2016-09-19 17:19
from __future__ import unicode_literals
import django.core.files.storage
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('world', '0001_initial'),
]
operations = [
mi... | gpl-3.0 | 1,082,585,476,274,517,900 | 30.125 | 197 | 0.5751 | false | 4.353147 | false | false | false |
Jauntbox/hydro | src/sample_ffts.py | 1 | 1589 | #The purpose of this program is to quickly evaluate and test different DFT routines in Python for comparison to the slightly more *ahem* arcane implementation of FFTW
import scipy
import math
import numpy as np
import matplotlib.pyplot as pyplot
size = 20 #Array size for functions
def main():
f = []
print ... | gpl-2.0 | 983,974,798,390,252,000 | 35.976744 | 166 | 0.629956 | false | 2.69322 | false | false | false |
Aliced3645/DataCenterMarketing | impacket/build/lib.linux-i686-2.7/impacket/smb.py | 3 | 204090 | # Copyright (c) 2003-2012 CORE Security Technologies)
#
# This software is provided under under a slightly modified version
# of the Apache Software License. See the accompanying LICENSE file
# for more information.
#
# $Id: smb.py 602 2012-07-12 16:22:04Z bethus@gmail.com $
#
# Copyright (C) 2001 Michael Teo <michaelt... | apache-2.0 | -8,134,039,149,275,074,000 | 43.43501 | 319 | 0.581626 | false | 3.720197 | false | false | false |
sniperganso/python-manilaclient | manilaclient/base.py | 1 | 7387 | # Copyright 2010 Jacob Kaplan-Moss
# Copyright 2011 OpenStack LLC.
# 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/... | apache-2.0 | 2,738,515,539,624,619,500 | 33.35814 | 79 | 0.590226 | false | 4.119911 | false | false | false |
pingali/dgit | dgitcore/plugins/validator.py | 1 | 1534 | #!/usr/bin/env python
import os, sys
import json
from collections import namedtuple
import requests
Key = namedtuple("Key", ["name","version"])
class ValidatorBase(object):
"""
This is the base class for all backends including
"""
def __init__(self, name, version, description, supported=[]):
... | isc | 8,900,136,766,115,214,000 | 24.566667 | 66 | 0.584094 | false | 5.07947 | false | false | false |
whatsthehubbub/rippleeffect | fabfile/base.py | 1 | 2942 | from fabric.api import *
from fabric.colors import cyan
from fabric.contrib import files
packages = (
'build-essential',
'git',
'mercurial',
'rsync',
'vim',
)
def install_base_packages():
sudo('apt-get update')
for package in packages:
sudo('apt-get install %s --assume-yes' % packa... | mit | 6,000,494,274,286,775,000 | 24.807018 | 108 | 0.64208 | false | 3.557437 | false | false | false |
astrophysicist87/iEBE-Plumberg | EBE-Node/crank/SequentialEventDriver.py | 1 | 56172 | #! /usr/bin/env python
# This package performs a sequential calculations of a given number of events,
# after reading parameters from ParameterDict.py. The most important control
# parameters are set in controlParameterList, for other parameters see
# allParameterLists. This package is intended to be working-at-backgro... | gpl-3.0 | 9,157,743,708,320,808,000 | 39.852364 | 148 | 0.612387 | false | 3.789005 | false | false | false |
adragomir/hiyapyco | examples/hiyapyco_example.py | 2 | 1868 | #! /usr/bin/env python
import sys
import os
import logging
import argparse
basepath = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, os.path.dirname(basepath))
import hiyapyco
class LoggingAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
# print... | lgpl-3.0 | 7,087,518,255,125,991,000 | 28.1875 | 86 | 0.66167 | false | 3.35368 | false | false | false |
tslocum/PyIB | manage.py | 1 | 29062 | import _mysql
import os
import cgi
from database import *
from settings import Settings
from framework import *
from formatting import *
from template import *
from post import *
def manage(self, path_split):
page = ''
validated = False
administrator = False
skiptemplate = False
try:
if self.formdata... | gpl-3.0 | -6,305,240,722,364,262,000 | 49.280277 | 691 | 0.498142 | false | 3.987104 | false | false | false |
SeanBeseler/data-structures | src/graph1.py | 1 | 3741 | class Graph1(object):
def __init__(self, itt=0):
"""init the graph object"""
self.graph = {}
def add_node(self, val):
"""adds a node to the graph"""
if val in self.graph:
raise ValueError('graph all ready has the node')
self.graph[val] = []
def add_edge(... | mit | 3,894,893,344,389,052,000 | 32.401786 | 74 | 0.535953 | false | 4.179888 | false | false | false |
Eksmo/calibre | src/calibre/gui2/convert/fb2_input_ui.py | 1 | 1301 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file '/home/gugu/w/calibre/src/calibre/gui2/convert/fb2_input.ui'
#
# Created: Thu Jul 19 23:32:30 2012
# by: PyQt4 UI code generator 4.9.1
#
# WARNING! All changes made in this file will be lost!
from PyQt4 import QtCore, QtGui
try:
_f... | gpl-3.0 | 478,254,432,766,602,400 | 36.171429 | 113 | 0.683321 | false | 3.293671 | false | false | false |
piksels-and-lines-orchestra/inkscape | share/extensions/jessyInk_uninstall.py | 8 | 5652 | #!/usr/bin/env python
# Copyright 2008, 2009 Hannes Hochreiner
# 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 ... | gpl-2.0 | -4,624,478,952,183,116,000 | 40.255474 | 135 | 0.699575 | false | 3.098684 | false | false | false |
FCP-INDI/C-PAC | CPAC/sca/sca.py | 1 | 26697 | from nipype.interfaces.afni import preprocess
from CPAC.pipeline import nipype_pipeline_engine as pe
import nipype.algorithms.rapidart as ra
import nipype.interfaces.afni as afni
import nipype.interfaces.fsl as fsl
import nipype.interfaces.io as nio
import nipype.interfaces.utility as util
from CPAC.sca.utils import *... | bsd-3-clause | 7,963,554,521,188,729,000 | 38.492604 | 134 | 0.568041 | false | 3.92834 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.