repo_name stringlengths 6 90 | path stringlengths 4 230 | copies stringlengths 1 4 | size stringlengths 4 7 | content stringlengths 734 985k | license stringclasses 15
values | hash int64 -9,223,303,126,770,100,000 9,223,233,360B | line_mean float64 3.79 99.6 | line_max int64 19 999 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 8.06 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
NuPass/NuPassWeb | nupassweb/views.py | 1 | 1504 | """
views.py
~~~~~~~~
The URL processing portion of the application.
:copyright: (c) 2019 by Sean Callaway.
:license: GNU GPL v2, see LICENSE for more details.
"""
from flask import render_template, request, jsonify
import nupass
from nupassweb import app
@app.route('/')
def index():
"""Main... | gpl-2.0 | -143,233,151,472,304,910 | 25.385965 | 83 | 0.589096 | false | 3.73201 | false | false | false |
Yvictor/TradingGym | trading_env/envs/backtest_v0.py | 1 | 26632 | import os
import logging
import pandas as pd
import numpy as np
import matplotlib
import matplotlib.pyplot as plt
import matplotlib.patches as patches
class trading_env:
def __init__(self, env_id, obs_data_len, step_len,
df, fee, max_position=5, deal_col_name='price',
feature_n... | mit | 1,040,567,946,215,086,200 | 58.984234 | 176 | 0.524444 | false | 3.775982 | false | false | false |
ZangeTsune/ReusQuest | game/model/Consumible.py | 1 | 1611 | class Consumible:
# Constants
BEGUDA_PLIM = 0
MENJAR_BLANC = 1
MASCLET = 2
ROSA_REUS = 3
FRUITS_SECS = 4
CARAMEL_VIRGINIES = 5
def __init__(self, idConsumible):
self.idConsumible = idConsumible
self._cantidad = 0
def _... | gpl-2.0 | -6,078,460,172,911,881,000 | 26.305085 | 52 | 0.509001 | false | 4.037594 | false | false | false |
adit-chandra/tensorflow | tensorflow/python/keras/engine/node.py | 8 | 7398 | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 8,592,707,457,558,640,000 | 38.142857 | 80 | 0.6691 | false | 4.254169 | false | false | false |
ocadotechnology/aimmo | aimmo-game/simulation/map_generator.py | 1 | 5726 | import abc
import logging
import random
from itertools import tee
from queue import PriorityQueue
from typing import Any
from simulation.direction import ALL_DIRECTIONS
from simulation.game_state import GameState
from simulation.location import Location
from simulation.obstacle import Obstacle
from simulation.world_ma... | agpl-3.0 | 8,421,629,088,938,893,000 | 30.119565 | 94 | 0.63884 | false | 3.50643 | false | false | false |
Knio/miru | examples/mesh03.py | 1 | 1339 | from pyglet import options
options['debug_gl'] = False
options['debug_gl_trace'] = True
options['debug_gl_trace_args'] = True
options['vsync'] = False
from pyglet.gl import *
import miru.ui
from miru.context import context
import miru.graphics
import miru.input
from miru import core
import pyglet.graphics
import pyg... | mit | 4,575,243,050,343,200,300 | 21.694915 | 60 | 0.70127 | false | 3.064073 | false | false | false |
ARM-software/lisa | lisa/notebook.py | 2 | 10449 | # SPDX-License-Identifier: Apache-2.0
#
# Copyright (C) 2019, Arm Limited and contributors.
#
# 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 | 4,776,850,905,274,951,000 | 29.732353 | 140 | 0.628194 | false | 3.909091 | false | false | false |
hvanwyk/quadmesh | src/gmrf.py | 1 | 40859 | '''
Created on Feb 8, 2017
@author: hans-werner
'''
from fem import System, QuadFE, DofHandler, GaussRule, Function
from mesh import Mesh
from numbers import Number, Real
import scipy.sparse as sp
from sksparse.cholmod import cholesky, cholesky_AAt, Factor # @UnresolvedImport
from scipy import linalg
from scipy.speci... | mit | 622,849,414,220,641,500 | 32.138686 | 86 | 0.437774 | false | 4.289208 | false | false | false |
tobyp/dichotomy | map_merge.py | 1 | 6216 | #!/usr/bin/env python3
"""
Usage:
./map_merge.py <target_file> <target_width> <target_height> {<source_file> <source_x> <source_y> <source_w> <source_h> <dest_x> <dest_y>}...
later maps overwrite former; layers with same names are merged; tileset of the first input is used
actions set-tile, laser-dev-toggle and laser... | gpl-3.0 | -6,336,226,593,600,407,000 | 36.221557 | 184 | 0.619852 | false | 2.641734 | false | false | false |
tombstone/models | research/object_detection/metrics/tf_example_parser.py | 2 | 6259 | # Copyright 2017 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | 2,809,402,220,512,183,300 | 38.36478 | 80 | 0.700591 | false | 4.066927 | false | false | false |
njj6666/forkmelon | django-rest-framework/tutorial/setup.py | 1 | 1212 | import os
from setuptools import find_packages, setup
with open(os.path.join(os.path.dirname(__file__), 'README.rst')) as readme:
README = readme.read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-rest-framework-t... | apache-2.0 | 6,978,868,575,581,863,000 | 33.657143 | 78 | 0.621287 | false | 3.909677 | false | true | false |
3lnc/elasticsearch-dsl-py | test_elasticsearch_dsl/conftest.py | 1 | 9037 | # -*- coding: utf-8 -*-
import os
from datetime import datetime
from elasticsearch.helpers import bulk
from elasticsearch.helpers.test import SkipTest, get_test_client
from mock import Mock
from pytest import fixture, skip
from elasticsearch_dsl.connections import connections, add_connection
from .test_integration.t... | apache-2.0 | -3,887,607,490,928,946,700 | 35.435484 | 114 | 0.376051 | false | 4.405656 | true | false | false |
CariZa/django-spectacles | spectacles/functionaltest.py | 1 | 5167 | #from django.test import TestCase, LiveServerTestCase
import django.dispatch
from django.conf import settings
testcase_to_extend = getattr(settings, "SPEC_TESTCASE", "LiveServerTestCase")
from django import test
import random
step_done = django.dispatch.Signal(providing_args=["testcase", "test_name" "passed"])
scenar... | mit | 8,378,348,667,767,062,000 | 31.702532 | 115 | 0.598994 | false | 3.785348 | true | false | false |
sharbison3/python-docs-samples | speech/cloud-client/transcribe_streaming.py | 5 | 1901 | #!/usr/bin/env python
# Copyright 2017 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | 1,886,256,471,259,649,800 | 34.203704 | 74 | 0.699632 | false | 4.159737 | false | false | false |
praekelt/jmbo-competition | competition/views.py | 1 | 2000 | from django.utils.translation import ugettext as _
from django.contrib import messages
from django.shortcuts import get_object_or_404, render_to_response
from django.template import RequestContext
from competition.models import Competition, CompetitionPreferences
from competition.forms import CompetitionBaseEntryForm,... | bsd-3-clause | 7,152,703,567,147,468,000 | 40.666667 | 75 | 0.713 | false | 3.976143 | false | false | false |
RedFantom/GSF-Parser | toplevels/colors.py | 1 | 5898 | """
Author: RedFantom
Contributors: Daethyra (Naiii) and Sprigellania (Zarainia)
License: GNU GPLv3 as in LICENSE.md
Copyright (C) 2016-2018 RedFantom
"""
# UI Libraries
import tkinter as tk
from tkinter import ttk
from tkinter import filedialog
from ttkwidgets.color import askcolor
# Project Modules
from utils.colors ... | gpl-3.0 | 6,218,052,823,452,038,000 | 43.014925 | 101 | 0.610037 | false | 3.795367 | false | false | false |
nicholasserra/sentry | src/sentry/web/frontend/debug/mail.py | 2 | 10649 | from __future__ import absolute_import, print_function
import itertools
import logging
import time
import traceback
import uuid
from datetime import (
datetime,
timedelta,
)
from random import Random
import pytz
from django.contrib.webdesign.lorem_ipsum import (
WORDS,
words,
)
from django.core.urlre... | bsd-3-clause | -2,111,704,598,076,593,200 | 23.997653 | 121 | 0.54653 | false | 4.066056 | false | false | false |
martijnvermaat/montana | montana/dashboard.py | 1 | 2259 | """
Dashboard views for browsers.
.. moduleauthor:: Martijn Vermaat <martijn@vermaat.name>
.. Licensed under the MIT license, see the LICENSE file.
"""
from datetime import datetime
from flask import Blueprint, render_template
from sqlalchemy.orm.exc import NoResultFound
from . import db
from .models import Event... | mit | 108,618,030,311,989,280 | 28.337662 | 112 | 0.588313 | false | 3.78392 | false | false | false |
proetman/checkit | virtualbox/template.py | 1 | 2938 | """
This is a template for all new programs
"""
from __future__ import division
from __future__ import print_function
# Import OS Functions
import argparse
# import datetime
# import math
# Import racq library for RedShift
# import pandas as pd
import lib_proj as lp
import lib_file as lfile
# ----------------------... | gpl-2.0 | 749,858,851,448,193,400 | 27.25 | 102 | 0.418312 | false | 5.522556 | false | false | false |
habnabit/Combinator | combinator/sysenv.py | 1 | 6850 | # -*- test-case-name: combinator.test.test_sysenv -*-
import sys
import os
PATHVARS = 'PYTHONPATH', 'PATH', 'LD_LIBRARY_PATH', 'PATHEXT'
def uniq(l):
tmpd = {}
nl = []
for x in l:
if not tmpd.has_key(x):
nl.append(x)
tmpd[x] = 1
return nl
class Env:
"""
This o... | mit | 7,194,914,025,056,097,000 | 33.94898 | 79 | 0.597664 | false | 3.856982 | false | false | false |
paulsheridan/paul-dot-games | posts/update.py | 1 | 1178 | import json
import time
import logging
import os
from posts import decimalencoder
import boto3
dynamodb = boto3.resource('dynamodb')
def update(event, context):
data = json.loads(event['body'])
if 'text' not in data or 'checked' not in data:
logging.error("Validation Failed")
raise Exception(... | mit | -6,855,462,124,456,693,000 | 24.608696 | 61 | 0.555178 | false | 4.29927 | false | false | false |
kevinlondon/sentry | tests/sentry/web/frontend/test_admin.py | 23 | 3485 | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from django.core.urlresolvers import reverse
from exam import fixture
from sentry.testutils import TestCase
class EnvStatusTest(TestCase):
@fixture
def path(self):
return reverse('sentry-admin-status')
def test_requires_auth(self):... | bsd-3-clause | -9,186,658,814,695,043,000 | 27.801653 | 74 | 0.657389 | false | 3.735263 | true | false | false |
Stratoscale/osmosis | py/osmosis/objectstore.py | 3 | 1175 | import os
import time
from osmosis import sh
class ObjectStore:
def __init__(self, root):
self._root = root
def root(self):
return self._root
def accessAgeByLabel(self):
return self._ageByLabel(statAttribute="st_atime")
def creationAgeByLabel(self):
return self._ageB... | apache-2.0 | -6,701,608,358,684,960,000 | 26.325581 | 85 | 0.597447 | false | 3.706625 | false | false | false |
hgpestana/chronos | apps/client/views.py | 1 | 5148 | from datetime import datetime
from math import floor
from django.contrib.auth.mixins import LoginRequiredMixin
from django.http import JsonResponse
from django.urls import reverse_lazy
from django.utils.translation import ugettext_lazy as _
from django.views.generic.detail import DetailView
from django.views.generic.e... | mit | -7,828,069,697,688,049,000 | 28.930233 | 93 | 0.720474 | false | 3.39354 | false | false | false |
lrq3000/pyFileFixity | pyFileFixity/tests/test_hasher.py | 1 | 1610 | from __future__ import print_function
from nose.tools import assert_raises
import sys
import os
import shutil
from .aux_tests import path_sample_files, create_dir_if_not_exist
from ..lib.hasher import Hasher
def setup_module():
""" Initialize the tests by emptying the out directory """
outfolder = path_sam... | mit | 4,501,837,578,709,207,000 | 35.590909 | 119 | 0.617391 | false | 3.530702 | false | false | false |
thetomcraig/redwood | src/redwood/forms.py | 1 | 1996 | import wx
class FormField(wx.BoxSizer):
def __init__(self, parent, id,
label=None, value=None,
label_size=wx.Size(40,18), field_size=wx.Size(180,30),
# no style for static text apparently ... only flag
field_style=None,
label_flag=wx.LEFT | wx.TOP, field_flag=wx.LEF... | isc | 7,178,150,516,992,800,000 | 32.830508 | 87 | 0.695391 | false | 2.884393 | false | false | false |
andresgz/zshoes | config/settings/local.py | 1 | 1950 | # -*- coding: utf-8 -*-
'''
Local settings
- Run in Debug mode
- Use console backend for emails
- Add Django Debug Toolbar
- Add django-extensions as app
'''
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
DEBUG = env.bool('DJANGO_DEBUG', default... | bsd-3-clause | -680,082,308,993,853,600 | 30.451613 | 99 | 0.485128 | false | 4.166667 | false | false | false |
lufornpy/aliyun-cli | aliyuncli/aliyunCliHelp.py | 11 | 3109 | '''
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 use... | apache-2.0 | -1,279,854,129,822,528,000 | 38.871795 | 92 | 0.666774 | false | 4.218453 | false | false | false |
chovencorp/chumak | python-test/stone_house_server.py | 1 | 2695 | #!/usr/bin/env python
'''
Stonehouse uses the "CURVE" security mechanism.
This gives us strong encryption on data, and (as far as we know) unbreakable
authentication. Stonehouse is the minimum you would use over public networks,
and assures clients that they are speaking to an authentic server, while
allowing a... | mpl-2.0 | -6,275,974,354,072,607,000 | 29.337209 | 125 | 0.678293 | false | 3.286585 | false | false | false |
Valuehorizon/valuehorizon-countries | countries/migrations/0004_auto_20150528_1248.py | 1 | 1040 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('countries', '0003_auto_20150527_1928'),
]
operations = [
migrations.AddField(
model_name='country',
... | mit | -9,004,596,047,150,236,000 | 34.862069 | 264 | 0.593269 | false | 4.015444 | false | false | false |
alatiera/Ellinofreneia-crawler | src/launcher.py | 1 | 1817 | #!/usr/bin/env python3
import crawler
import renamer
import file_organizer
import argparse
def opts():
parser = argparse.ArgumentParser()
subparsers = parser.add_subparsers()
download = subparsers.add_parser('download', help='Downloads the shows',
aliases=['dl', 'cra... | mit | 8,120,109,580,336,348,000 | 27.84127 | 79 | 0.567419 | false | 4.028825 | false | false | false |
mapkyca/lovenote | lovenote/server.py | 1 | 3832 | ###
# Lovenote : A simple abstract message queue system
#
# @author Marcus Povey <marcus@marcus-povey.co.uk>
# @copyright Marcus Povey 2012
# @link http://www.marcus-povey.co.uk
# @link https://github.com/mapkyca/lovenote
#
# Copyright (c) 2011-12 Marcus Povey
#
# Permission is hereby granted, free of charge, to any ... | mit | 6,023,246,188,122,637,000 | 34.155963 | 148 | 0.722338 | false | 3.639126 | false | false | false |
jason-neal/companion_simulations | bin/coadd_chi2_db.py | 1 | 6259 | #!/usr/bin/env python
"""Co-add_chi2_values.py.
Create Table of minimum Chi_2 values and save to a table.
"""
import argparse
import warnings
import glob
import os
import sys
import numpy as np
import pandas as pd
import sqlalchemy as sa
import simulators
def parse_args(args):
"""Take care of all the argparse ... | mit | 7,950,245,562,883,087,000 | 37.164634 | 118 | 0.54865 | false | 3.548186 | false | false | false |
FroeMic/CDTM-Backend-Workshop-WT2016 | solutions/server/server-14-login-logout-user/server/utils.py | 3 | 2355 | from flask import abort, jsonify, make_response, request, session
from functools import wraps
import re
from server import *
from server.database import *
def json_abort(code, text):
json = {
'result': False,
'error': {
'status': code,
'text': text
}
}
abor... | mit | -6,030,661,595,953,307,000 | 27.719512 | 87 | 0.575372 | false | 3.606432 | false | false | false |
CenterForOpenScience/OSF-Offline | osfsync/settings/__init__.py | 2 | 1837 | import logging
# Must import in order to be included by PyInstaller
import raven
from raven.handlers.logging import SentryHandler
from osfsync.settings.defaults import * # noqa
logger = logging.getLogger(__name__)
try:
from osfsync.settings.local import * # noqa
except ImportError:
logger.debug('No local.... | lgpl-3.0 | 663,990,525,573,277,300 | 31.22807 | 100 | 0.642352 | false | 3.908511 | false | false | false |
ajbouh/tfi | src/tfi/doc/example_code_generators/tensorflow_grpc.py | 1 | 4848 | from tfi.doc.example_code_generators.util import (
FetchContext as _FetchContext,
except_log as _except_log,
)
from tfi.doc.example_code import ExampleCode, ExampleCodeSet
from yapf.yapflib.yapf_api import FormatCode
from yapf.yapflib.style import CreateChromiumStyle
from tfi.format.html.python import html_rep... | mit | 2,431,290,918,203,937,300 | 31.756757 | 148 | 0.547855 | false | 3.626028 | false | false | false |
cedadev/jasmin_cis | cis/collocation/col_implementations.py | 1 | 50673 | import logging
import iris
import iris.coords
from iris.exceptions import CoordinateMultiDimError
import numpy as np
from numpy import mean as np_mean, std as np_std, min as np_min, max as np_max, sum as np_sum
from cis.collocation.col_framework import (Collocator, Constraint, PointConstraint, CellConstraint,
... | gpl-3.0 | -7,696,359,390,189,235,000 | 44.324687 | 124 | 0.631658 | false | 4.203135 | false | false | false |
GoliathLeviathan/SoulCreator | src/Widgets/SpecialsWidget.py | 1 | 5252 | # -*- coding: utf-8 -*-
"""
# Copyright
Copyright (C) 2012 by Victor
victor@caern.de
# License
This file is part of SoulCreator.
SoulCreator 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... | gpl-3.0 | 5,311,116,533,361,184,000 | 28.47191 | 104 | 0.739039 | false | 3.067836 | false | false | false |
AKSharma01/adminFilterPanel | test/styles/styles.py | 1 | 3909 | from stylesTransfomer import *
from ChangeParamNameWithColumnName import styleTable, styleForeignTable, styleFilterByKey
def paramRequest(param_request):
try:
page = param_request['page']
del param_request['page']
except :
page = 0
styles_filters = StylesFilters(page)
# print param_request
list_style_id = [... | apache-2.0 | -7,673,078,288,143,116,000 | 26.342657 | 139 | 0.66155 | false | 2.60253 | false | false | false |
rezoo/chainer | examples/image_captioning/download.py | 6 | 1322 | #!/usr/bin/env python
import argparse
import os
from six.moves.urllib import request
import zipfile
"""Download the MSCOCO dataset (images and captions)."""
urls = [
'http://images.cocodataset.org/zips/train2014.zip',
'http://images.cocodataset.org/zips/val2014.zip',
'http://images.cocodataset.org/annot... | mit | 5,296,020,104,639,481,000 | 27.73913 | 76 | 0.614221 | false | 3.745042 | false | false | false |
Lirean/Elibrary | app/main/forms.py | 1 | 2119 | from flask.ext.wtf import Form
from wtforms import StringField, TextAreaField, BooleanField, SelectField,\
SubmitField, IntegerField
from wtforms.validators import Required, Length, Email, Regexp
from wtforms import ValidationError
from wtforms.widgets import TextArea
from ..models import Role, User
class AddBookF... | gpl-3.0 | 8,515,446,127,788,815,000 | 39 | 78 | 0.628598 | false | 4.342213 | false | false | false |
xu62011/shadowsocksr-libev | src/ssrlink.py | 6 | 1792 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import traceback
import random
import getopt
import sys
import json
import base64
def to_bytes(s):
if bytes != str:
if type(s) == str:
return s.encode('utf-8')
return s
def to_str(s):
if bytes != str:
if type(s) == bytes:
return s.decode('utf-8')
return s
def ... | gpl-3.0 | -5,465,181,973,434,715,000 | 20.590361 | 80 | 0.583147 | false | 2.666667 | false | false | false |
TimothyHelton/k2datascience | k2datascience/plotting.py | 1 | 9485 | #! /usr/bin/env python
# -*- coding: utf-8 -*-
""" Plotting Module
.. moduleauthor:: Timothy Helton <timothy.j.helton@gmail.com>
"""
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd
import scipy.cluster.hierarchy as spch
import seaborn as sns
from k2datascience.utils import ax_formatter, size,... | bsd-3-clause | 7,607,762,145,683,675,000 | 32.996416 | 79 | 0.603057 | false | 3.439086 | false | false | false |
alphagov/stagecraft | stagecraft/apps/datasets/models/oauth_user.py | 1 | 2250 | from __future__ import unicode_literals
from collections import OrderedDict
import logging
from django.contrib.postgres.fields import ArrayField
from django.db import models, IntegrityError, InternalError
from django.utils.encoding import python_2_unicode_compatible
from django.utils import timezone
from datetime imp... | mit | 5,074,968,195,344,876,000 | 29.405405 | 73 | 0.627556 | false | 4.237288 | false | false | false |
minio/minio-py | minio/__init__.py | 1 | 1546 | # -*- coding: utf-8 -*-
# MinIO Python Library for Amazon S3 Compatible Cloud Storage,
# (C) 2015, 2016, 2017 MinIO, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.ap... | apache-2.0 | -8,133,740,863,613,418,000 | 31.893617 | 74 | 0.693402 | false | 3.331897 | false | false | false |
joshwatson/binaryninja-api | python/examples/kaitai/fallout2_dat.py | 1 | 6431 | # This is a generated file! Please edit source .ksy file and use kaitai-struct-compiler to rebuild
from pkg_resources import parse_version
from .kaitaistruct import __version__ as ks_version, KaitaiStruct, KaitaiStream, BytesIO
from enum import Enum
import collections
import zlib
if parse_version(ks_version) < parse... | mit | 4,511,779,278,014,606,300 | 39.19375 | 118 | 0.529 | false | 3.572778 | false | false | false |
HKuz/PythonChallenge | Challenges/chall_16.py | 1 | 1552 | #!/Applications/anaconda/envs/imgPIL/bin
# Python Challenge - 16
# www.pythonchallenge.com/pc/return/mozart.html
# Username: huge; Password: file
# Keyword: romance
'''
Uses Anaconda environment with Pillow for image processing
- Python 3.7, numpy, and Pillow (PIL)
- Run `source activate imgPIL`, `python chall... | mit | 2,186,771,597,907,513,900 | 28.846154 | 68 | 0.612758 | false | 3.260504 | false | false | false |
steve-bate/openhab2-jython | Script Examples/Python/rule_registry_example.py | 1 | 1335 | """
This example shows how to retrieve the RuleRegistry service and use it to query rule instances based on tags, enable and disable rule instances dynamically, and manually fire rules with specified inputs.
Requires a rule with a "Test tag" tag.
Tags can be set in the rule decorator or rule constructors (self.tags = [... | epl-1.0 | 404,923,131,949,007,040 | 37.142857 | 203 | 0.715356 | false | 3.56 | false | false | false |
alda519/GreenTea | apps/waiver/migrations/0001_initial.py | 5 | 1120 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('core', '0001_initial'),
]
operations = [
migrations.CreateModel(
name='Comment',
fields=[
... | gpl-2.0 | -4,457,462,407,746,757,000 | 37.62069 | 108 | 0.533036 | false | 4.226415 | false | false | false |
asalminen/todoman | todoman/model.py | 1 | 26758 | import logging
import os
import socket
import sqlite3
from datetime import date, datetime, time, timedelta
from os.path import normpath, split
from uuid import uuid4
import dateutil.parser
import icalendar
from atomicwrites import AtomicWriter
from dateutil.tz import tzlocal
logger = logging.getLogger(name=__name__)
... | isc | -3,617,938,587,832,243,700 | 29.166855 | 81 | 0.536475 | false | 4.219174 | false | false | false |
kinsights/django-registration | registration/tests/forms_custom_user.py | 4 | 1857 | from __future__ import unicode_literals
from distutils.version import StrictVersion
try:
from importlib import reload # Python 3.4+
except ImportError:
try:
from imp import reload # Python 3.3
except:
pass # Python 2 reload()
from django i... | bsd-3-clause | 1,487,750,782,351,692,000 | 27.569231 | 73 | 0.619278 | false | 4.348946 | true | false | false |
HqWisen/HashCode2016 | turfu.py | 1 | 2490 | from carte import *
from productType import *
from warehouse import *
from delivery import *
from drone import *
from droneManager import *
class Parser:
def __init__(self, fileName):
self.f = open(fileName)
self.lines = self.f.readlines()
self.parseFirstSection();
self.parseSecondSection();
self... | mit | -8,311,597,592,786,204,000 | 32.213333 | 104 | 0.686345 | false | 3.526912 | false | false | false |
monkeesuit/school | Network Security/ARP/arp suite/py/arp_sslstrip.py | 1 | 1075 | from arp_mitm import *
from subprocess import *
import time
def config():
# Sets Up IP Forwarding
# echo 1 > /proc/sys/net/ipv4/ip_forward
print 'Setting Up IP Forwarding...'
forwarding = ['echo', '1']
forwarding_fd = os.open('/proc/sys/net/ipv4/ip_forward',os.O_WRONLY)
forwardingprocess = Popen(forwarding,stdout=... | mit | 5,670,987,790,102,279,000 | 34.833333 | 76 | 0.716279 | false | 3.125 | false | false | false |
RatulGhosh/pybrain | pybrain/tools/plotting/colormaps.py | 29 | 1079 | __author__ = 'Tom Schaul, tom@idsia.ch'
from pylab import figure, savefig, imshow, axes, axis, cm, show
from scipy import array, amin, amax
class ColorMap:
def __init__(self, mat, cmap=None, pixelspervalue=20, minvalue=None, maxvalue=None):
""" Make a colormap image of a matrix
:key mat: the mat... | bsd-3-clause | 1,017,123,190,544,796,000 | 30.735294 | 88 | 0.586654 | false | 3.549342 | false | false | false |
skunkwerks/netinf | python/nilib/nidtnproc.py | 1 | 36438 | #!/usr/bin/python
"""
@package nilib
@file nidtnproc.py
@brief NetInf DTN Convergence layer terminal and gateway to HTTP convergence layer.
@version $Revision: 0.05 $ $Author: stephen $
@version Copyright (C) 2012 Trinity College Dublin and Folly Consulting Ltd
This is an adjunct to the NI URI library developed as
... | apache-2.0 | -7,685,943,483,783,920,000 | 41.617544 | 105 | 0.535265 | false | 4.270745 | false | false | false |
JudTown17/solutions-geoprocessing-toolbox | data_management/toolboxes/scripts/ImportPatrolRptXML.py | 1 | 6823 | # Patrol Report (from XML) to Table
#-------------------------------------------------------------------------------
# Copyright 2010-2013 Esri
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#... | apache-2.0 | -6,716,503,984,121,460,000 | 36.081522 | 87 | 0.694709 | false | 3.174965 | false | false | false |
kevinconway/rpmvenv | rpmvenv/extensions/loader.py | 1 | 1903 | """Tools for loading and validating extensions."""
from __future__ import division
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import pkg_resources
import semver
class MissingDependency(Exception):
"""No dependency found."""
class Inval... | mit | -819,655,931,256,122,000 | 27.402985 | 78 | 0.569101 | false | 5.06117 | false | false | false |
all-of-us/raw-data-repository | tests/service_tests/consent_tests/test_consent_factories.py | 1 | 5164 | import mock
from rdr_service.services.consent import files
from tests.helpers.unittest_base import BaseTestCase
class ConsentFactoryTest(BaseTestCase):
def __init__(self, *args, **kwargs):
super(ConsentFactoryTest, self).__init__(*args, **kwargs)
self.uses_database = False
def setUp(self, *a... | bsd-3-clause | -8,917,386,176,774,443,000 | 39.645669 | 105 | 0.635219 | false | 3.732466 | true | false | false |
zsiki/ulyxes | camera/imgs_correlation.py | 1 | 3120 | #! /usr/bin/env python3
# -*- coding: utf-8 -*-
"""
go through image files to find template and correlation
image file name can contain date and time like: pi1_YYYYmmdd_HHMMSS.h264
output sent to standard output in the form:
line,date/time,column,row,statistic
use imgs_correlation.py --help for com... | gpl-2.0 | 7,138,085,182,512,898,000 | 40.6 | 183 | 0.578846 | false | 3.934426 | false | false | false |
zepto/musio-python2 | musio/id3tag/id3tag.py | 3 | 22153 | from ctypes import *
STRING = c_char_p
_libraries = {}
_libraries['/usr/lib/libid3tag.so'] = CDLL('/usr/lib/libid3tag.so')
ID3_TAG_RESTRICTION_TAGSIZE_64_FRAMES_128_KB = 64
ID3_FIELD_TYPE_LATIN1FULL = 2
ID3_FRAME_FLAG_GROUPINGIDENTITY = 64
ID3_FRAME_FLAG_ENCRYPTION = 4
def ID3_VERSION_STRINGIZE(str): return #str # m... | gpl-3.0 | -105,208,246,234,174,050 | 44.865424 | 105 | 0.701485 | false | 2.578929 | false | false | false |
ahmadshahwan/ipopo | tests/framework/test_utils.py | 1 | 3767 | #!/usr/bin/env python
# -- Content-Encoding: UTF-8 --
"""
Tests the framework utility methods.
:author: Thomas Calmant
"""
# Pelix
from pelix.framework import FrameworkFactory
import pelix.framework as pelix
# Standard library
try:
import unittest2 as unittest
except ImportError:
import unittest
# ---------... | apache-2.0 | 6,839,590,424,016,977,000 | 33.245455 | 80 | 0.563048 | false | 4.714643 | true | false | false |
readevalprint/zipline | docs/conf.py | 9 | 8040 | # -*- coding: utf-8 -*-
#
# QSim documentation build configuration file, created by
# sphinx-quickstart on Wed Feb 8 15:29:56 2012.
#
# 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 co... | apache-2.0 | -569,686,807,265,014,200 | 30.904762 | 82 | 0.702736 | false | 3.706777 | true | false | false |
callowayproject/django-admintheme | example/simpleapp/admin.py | 1 | 2125 | from django.contrib import admin
from .models import SimpleModel, LookupModel, TabularModel, StackedModel, NoInlineModel
class LookupAdmin(admin.ModelAdmin):
search_fields = ('name',)
list_per_page = 5
admin.site.register(LookupModel, LookupAdmin)
class TabularModelInline(admin.TabularInline):
model =... | apache-2.0 | 1,686,737,624,446,421,000 | 32.730159 | 177 | 0.612706 | false | 3.821942 | false | false | false |
mariodebian/tcosmonitor | tcosmonitor/counter.py | 1 | 1359 | # -*- coding: UTF-8 -*-
# -*- Mode: Python; tab-width: 4 -*-
#
# Source taken from python-M2Crypto demos
#
# It is tempting to add an __int__ method to this class, but it's not
# a good idea. This class tries to gracefully handle integer
# overflow, and to hide this detail from both the programmer and the
# user. Not... | gpl-2.0 | 6,686,260,590,152,904,000 | 25.647059 | 71 | 0.674025 | false | 3.153132 | false | false | false |
gsnbng/erpnext | erpnext/hr/doctype/employee_transfer/employee_transfer.py | 15 | 2627 | # -*- coding: utf-8 -*-
# Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
# For license information, please see license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.model.document import Document
from frappe.utils import getdate
from erpnext.hr.utils imp... | agpl-3.0 | -7,886,768,245,634,538,000 | 37.632353 | 95 | 0.723258 | false | 3.376607 | false | false | false |
ambitioninc/django-issue | issue/tests/model_tests.py | 1 | 25200 | from datetime import datetime, timedelta
import json
from django.contrib.contenttypes.models import ContentType
from django.test import TestCase
from django_dynamic_fixture import G, N
from freezegun import freeze_time
from mock import patch
from issue.models import (
Assertion, ExtendedEnum, Issue, IssueAction, ... | mit | 7,405,553,914,002,032,000 | 36.724551 | 118 | 0.6275 | false | 3.636888 | true | false | false |
paweltin/saleor | saleor/dashboard/category/views.py | 15 | 3350 | from django.contrib import messages
from django.core.urlresolvers import reverse
from django.http import JsonResponse
from django.shortcuts import get_object_or_404, redirect
from django.template.response import TemplateResponse
from django.utils.translation import ugettext_lazy as _
from ...product.models import Cate... | bsd-3-clause | -7,552,158,677,168,961,000 | 37.953488 | 78 | 0.641493 | false | 4.151177 | false | false | false |
anthonyfok/frescobaldi | frescobaldi_app/miditool/widget.py | 1 | 13562 | # This file is part of the Frescobaldi project, http://www.frescobaldi.org/
#
# Copyright (c) 2011 - 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 | -4,994,376,490,955,424,000 | 35.359249 | 99 | 0.605589 | false | 3.844104 | false | false | false |
afeena/tanner | tanner/emulators/lfi.py | 1 | 1096 | import shlex
from tanner.utils import aiodocker_helper
from tanner.utils import patterns
class LfiEmulator:
def __init__(self):
self.helper = aiodocker_helper.AIODockerHelper()
async def get_lfi_result(self, file_path):
# Terminate the string with NULL byte
if '\x00' in file_path:
... | gpl-3.0 | -3,149,519,358,686,993,400 | 31.235294 | 76 | 0.627737 | false | 3.690236 | false | false | false |
skeledrew/clide | utils.py | 1 | 7099 | # This file is part of ClIDE
# ClIDE - A live-modifiable command-line IDE that can accept commands as pseudocode
# @author Andrew Phillips
# @copyright 2017 Andrew Phillips <skeledrew@gmail.com>
# ClIDE is free software; you can redistribute it and/or
# modify it under the terms of the GNU AFFERO GENERAL PUBLIC L... | agpl-3.0 | -3,802,644,469,706,789,400 | 25.488806 | 93 | 0.601493 | false | 3.695471 | false | false | false |
PseudoSky/el-matterdoor | client/python/motor_control.py | 1 | 4730 | import sys
import subprocess
import time
import os
import signal
# from behavior import Behavior
from collections import deque
gestures = { "Wave_Left":["G0 X100 Y100 Z20","G0 Z-20"],
"Wave_Right":["G0 Z-10","G0 Z10"],
"Spin_Left":["G0 X30 Y30 Z30"],
"Spin_Right":["G0 X-30 Y-30 Z-30"],
... | mit | 4,002,657,393,164,885,000 | 29.915033 | 90 | 0.553066 | false | 2.987997 | false | false | false |
google-research/google-research | seq2act/data_generation/crawl_instructions.py | 1 | 9044 | # coding=utf-8
# Copyright 2021 The Google Research Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | -5,149,692,403,431,220,000 | 30.186207 | 82 | 0.638655 | false | 3.524552 | false | false | false |
jay-krishna/SiqNAL | Modules/bandpass.py | 2 | 8418 | """
**Author :** *Jay Krishna*
This module implements linear phase finite impulse response (FIR) butterworth bandpass filter
using Frequency shift theorem and symmetricity of the filter. The computed signal after
applying bandpass filter is then stoared as (.txt) file.
Approach
--------------... | mit | -7,999,042,892,365,797,000 | 32.943548 | 150 | 0.585293 | false | 4.370717 | false | false | false |
davismathew/netbot-django | bootcamp/traceroute/views.py | 1 | 10645 | from django.shortcuts import render, redirect, get_object_or_404
from django.http import HttpResponseBadRequest, HttpResponse
from bootcamp.tasks.models import Task
from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger
from bootcamp.tasks.forms import TaskForm
from django.contrib.auth.decorators impo... | mit | 8,124,859,245,447,939,000 | 35.207483 | 184 | 0.649507 | false | 3.447215 | false | false | false |
zathras777/pywind | sample_scripts/annual_output.py | 1 | 2372 | #!/usr/bin/env python
# coding=utf-8
"""
This sample script was written on behalf of Graham and an enquiry he
had for a years worth of output data for Hydro & Biogas stations.
As usual REGO output will be used a proxy for output.
The library appears unable to cope with setting the technology field
directly and so we... | unlicense | -7,737,247,400,551,911,000 | 31.944444 | 120 | 0.608769 | false | 3.789137 | false | false | false |
obsidianforensics/unfurl | unfurl/tests/unit/test_uuid.py | 1 | 1851 | from unfurl.core import Unfurl
import unittest
class TestUuid(unittest.TestCase):
def test_uuid_v1_null_ts_random_node_id(self):
""" Test parsing of a UUIDv1, with a null timestamp and randomly-generated Node ID """
test = Unfurl()
test.add_to_queue(
data_type='url', key=None... | apache-2.0 | 8,039,404,402,695,480,000 | 32.053571 | 94 | 0.623447 | false | 3.446927 | true | false | false |
jaycrossler/geo-events | geoevents/heartbeat/migrations/0007_auto__chg_field_testrunresult_latency.py | 2 | 3921 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Changing field 'TestRunResult.latency'
db.alter_column('heartbeat_testrunresult', 'latency', self.gf('dja... | mit | -98,931,854,226,048,130 | 64.366667 | 161 | 0.564907 | false | 3.667914 | true | false | false |
drivnal/drivnal | drivnal/client.py | 1 | 1862 | from constants import *
from config import Config
from local_volume import LocalVolume
from event import Event
from drivnal import server
import os
import copy
import logging
logger = logging.getLogger(APP_NAME)
class Client:
def get_volume(self, id):
for volume in self.get_volumes():
if volum... | agpl-3.0 | 4,824,871,898,437,667,000 | 26.791045 | 73 | 0.534909 | false | 4.320186 | false | false | false |
openstack/dragonflow | dragonflow/cmd/df_skydive_service.py | 1 | 10736 | # 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 | -7,725,715,911,153,530,000 | 34.906355 | 79 | 0.599385 | false | 4.002983 | false | false | false |
mhvk/astropy | astropy/coordinates/builtin_frames/altaz.py | 3 | 5451 | # -*- coding: utf-8 -*-
# Licensed under a 3-clause BSD style license - see LICENSE.rst
import numpy as np
from astropy import units as u
from astropy.utils.decorators import format_doc
from astropy.coordinates import representation as r
from astropy.coordinates.baseframe import BaseCoordinateFrame, RepresentationMap... | bsd-3-clause | -619,457,488,633,602,400 | 41.92126 | 94 | 0.683177 | false | 4.177011 | false | false | false |
Pymatteo/QtNMR | spectrum_freq_sweep_fft-sum_fit.py | 1 | 5565 |
# This variable controll the streght of the exponential apodization #
## change it as needed, experiemnt before... (1000 is often good)####
LB=9000
#####################################################################
# number of points to be cutted at the tail of the spectra (try...)
cutted=950
####################... | gpl-3.0 | 1,784,993,030,051,652,000 | 28.919355 | 106 | 0.596226 | false | 3.108939 | false | false | false |
EnriqM/meka_pmb2_ros | nav_to_people/scripts/meka_arm_simple.py | 1 | 1820 | #!/usr/bin/env python
"""
Package: nav_to_people
Este nodo escucha a 2 tf, una fija que es /robot_link del Meka. La movil es la de
la extremidad, donde tambien se parametrizara el offset de seguridad
Envia directamente al topico de la transformada inversa del robot
Creator: Enrique Ortega, from Universidad de Jaen... | lgpl-3.0 | 6,883,882,325,333,381,000 | 34 | 128 | 0.651099 | false | 3.25 | false | false | false |
haf/support-tools | googlecode-issues-exporter/issues.py | 4 | 22719 | # Copyright 2014 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | 3,992,344,661,054,526,000 | 29.53629 | 99 | 0.639993 | false | 4.08028 | false | false | false |
jesseward/musicdiscovery-assist | discovery_assist/cache.py | 1 | 3105 | import json
import logging
from redis import Redis
from config import cfg
from liblastfm import LastFM
_redis = Redis(host=cfg['REDIS_HOST'], port=cfg['REDIS_PORT'])
logger = logging.getLogger('music-discovery')
class RedisCache(object):
"""Wrapper around Redis to be used to cache results
from the last.f... | mit | 7,153,308,248,705,424,000 | 31.010309 | 104 | 0.627697 | false | 4.064136 | false | false | false |
rockfruit/bika.lims | bika/lims/browser/widgets/referencewidget.py | 1 | 9695 | # This file is part of Bika LIMS
#
# Copyright 2011-2016 by it's authors.
# Some rights reserved. See LICENSE.txt, AUTHORS.txt.
from AccessControl import ClassSecurityInfo
from bika.lims import bikaMessageFactory as _
from bika.lims.utils import t
from bika.lims.browser import BrowserView
from bika.lims.interfaces imp... | agpl-3.0 | 2,308,287,098,502,629,000 | 37.935743 | 110 | 0.552553 | false | 4.139624 | false | false | false |
qiime2/qiime2 | qiime2/core/format.py | 2 | 1124 | # ----------------------------------------------------------------------------
# Copyright (c) 2016-2021, QIIME 2 development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file LICENSE, distributed with this software.
# ------------------------------------------------... | bsd-3-clause | 1,647,561,260,945,976,000 | 33.060606 | 78 | 0.491993 | false | 4.683333 | false | false | false |
WebArchivCZ/Seeder | Seeder/publishers/migrations/0001_initial.py | 1 | 2346 | # -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2017-06-25 16:48
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operation... | mit | 9,150,510,859,614,754,000 | 41.654545 | 114 | 0.577153 | false | 4.376866 | false | false | false |
eHealthAfrica/nutsurv | nutsurv/importer/models.py | 2 | 8100 | import uuid
import random
import logging
from datetime import datetime
from jsonfield import JSONField
from django.db import models
from dashboard import models as dashboard_models
from pytz import timezone
import dateutil.parser
def reset_data():
FakeTeams.objects.all().delete()
dashboard_models.Househol... | agpl-3.0 | -6,831,839,233,851,477,000 | 34.682819 | 120 | 0.560247 | false | 3.585657 | false | false | false |
jtk1rk/xsubedit | gcustom/waveformGenerationDialog.py | 1 | 3742 | import gi
gi.require_version('Gtk', '3.0')
from gi.repository import Gtk
from .progressBar import cProgressBar
from os.path import exists
from numpy import savez_compressed as savez, array as numarray
from cffmpeg import cffmpeg
from cffmpeginfo import cffmpeginfo
from utils import iround, mediaDur
import os
from math ... | gpl-3.0 | -7,081,576,538,280,458,000 | 33.018182 | 122 | 0.595671 | false | 3.697628 | false | false | false |
google/dopamine | dopamine/discrete_domains/logger.py | 1 | 3505 | # coding=utf-8
# Copyright 2018 The Dopamine Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 4,307,284,590,151,002,600 | 31.453704 | 74 | 0.679886 | false | 4.128386 | false | false | false |
pviotti/moses | zookeeper/tst_local.py | 1 | 1497 | #!/usr/bin/env python
# Simple tool to perform concurrency tests on
# Zookpeer.
# @author: Paolo
# @date: 15/4/2015
import random, string, time
from kazoo.client import KazooClient, KazooState
from multiprocessing.pool import ThreadPool
DEBUG = True
servers = "localhost:2181,localhost:2182,localhost:2183"
num_writ... | apache-2.0 | -4,469,969,912,323,112,000 | 19.791667 | 84 | 0.607214 | false | 2.988024 | true | false | false |
apache/airflow | tests/ti_deps/deps/test_dag_ti_slots_available_dep.py | 2 | 1718 | #
# 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 | -2,885,726,657,662,052,000 | 36.347826 | 83 | 0.722352 | false | 3.976852 | true | false | false |
dergraaf/xpcc | tools/device_file_generator/dfg/peripheral.py | 5 | 2394 | # -*- coding: utf-8 -*-
# Copyright (c) 2013, Roboterclub Aachen e.V.
# All rights reserved.
#
# The file is part of the xpcc library and is released under the 3-clause BSD
# license. See the file `LICENSE` for the full license governing this code.
# ---------------------------------------------------------------------... | bsd-3-clause | -6,089,268,819,753,497,000 | 25.898876 | 79 | 0.655806 | false | 3.222073 | false | false | false |
IL2HorusTeam/minic | minic/settings.py | 1 | 7469 | # -*- coding: utf-8 -*-
import ConfigParser
import json
import os
import shutil
import minic
from minic.util import ugettext_lazy as _
def get_group_dir(group_name):
return os.path.join(os.path.expanduser("~"), group_name)
def get_settings_root(group_name):
return os.path.join(get_group_dir(group_name), 'm... | gpl-2.0 | -8,146,900,800,726,928,000 | 30.251046 | 80 | 0.558442 | false | 3.855963 | true | false | false |
jlevy44/Joshua-Levy-Synteny-Analysis | OtherFiles/AdditionalAnalysisScripts/workWithWheat.py | 1 | 6185 | from pyfaidx import Fasta
"""
wheat = Fasta('Taestivum_296_v2.softmasked.fa')
a=1
for key in wheat.keys():
if '7al' in key:
print key, wheat[key][0:150]
"""
# lets try to convert wheat to 7 chromosomes
chromosomesStartEndCoords = {1:[],2:[],3:[],4:[],5:[],6:[],7:[]}
open('karyotype.Taestivum_296.txt','w')... | mit | 5,578,760,172,872,814,000 | 47.708661 | 116 | 0.737429 | false | 1.938871 | false | false | false |
KenKundert/shlib | tests/test_cmd.py | 1 | 1959 | from inform import Error, Inform
from shlib import Run, set_prefs
def test_run_downturn():
cmd = "./test_prog 0"
p = Run(cmd, "sOEW")
assert p.stdout == "this is stdout.\n"
assert p.stderr == "this is stderr.\n"
assert p.status == 0
def test_run_entree():
cmd = "./test_prog 1"
p = Run(cm... | gpl-3.0 | 2,879,715,364,223,941,600 | 24.115385 | 55 | 0.570699 | false | 3.159677 | true | false | false |
jeanslack/Videomass | videomass3/vdms_frames/while_playing.py | 1 | 5748 | # -*- coding: UTF-8 -*-
# Name: while_playing.py
# Porpose: Show box with shortcuts keyboard when playback with FFplay
# Compatibility: Python3, wxPython4
# Author: Gianluca Pernigotto <jeanlucperni@gmail.com>
# Copyright: (c) 2018/2021 Gianluca Pernigotto <jeanlucperni@gmail.com>
# license: GPL3
# Rev: April.06.2020 *... | gpl-3.0 | 7,415,372,042,814,083,000 | 41.577778 | 76 | 0.579332 | false | 3.612822 | false | false | false |
nansencenter/sentinel1ice | config.py | 1 | 1838 | import os
inputDirectory = '/Volumes/MacOS8TB/Archives/Sentinel-1/FramStrait/'
if not os.path.exists(inputDirectory):
raise IOError('cannot find input directory %s' % inputDirectory)
outputDirectory = '/Volumes/MacOS8TB/Process/sentinel1ice/FramStrait/'
if not os.path.exists(outputDirectory):
os.mkdir(output... | gpl-3.0 | 2,755,078,768,888,498,700 | 26.029412 | 81 | 0.730141 | false | 3.099494 | false | false | false |
buhl/python-di | di/di.py | 1 | 2144 | # -*- coding: utf-8 -*-
from functools import wraps
import inspect
class DependencyInjector(object):
def __init__(self, dependencies=None, globals_lookup=False):
self.globals_lookup = globals_lookup
self.dependencies = {}
if isinstance(dependencies, dict):
self.dependencies = d... | bsd-2-clause | -7,379,154,225,779,918,000 | 28.369863 | 75 | 0.558769 | false | 4.228797 | false | false | false |
jucacrispim/toxicbuild | toxicbuild/integrations/github.py | 1 | 8738 | # -*- coding: utf-8 -*-
# Copyright 2018-2019 Juca Crispim <juca@poraodojuca.net>
# This file is part of toxicbuild.
# toxicbuild is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of t... | agpl-3.0 | -1,689,051,510,847,527,000 | 33.812749 | 78 | 0.63447 | false | 4.064186 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.