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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
stijnvanhoey/pybreach | pybreach/pybreach.py | 1 | 6958 | # -*- coding: utf-8 -*-
import numpy as np
def left_reach(perf_meas, i, pct_beh):
"""calculate the left reach
For all model realisations, given a data evaluation point index and a degree of tolerance, get the
left reach for all realisations and derive the maximum
Parameters
----------
perf_... | mit | -1,656,142,593,568,342,000 | 37.655556 | 102 | 0.550158 | false | 3.667897 | false | false | false |
bashhack/MIT_CompSci_Degree | MIT_600SC/Unit_1/Lecture_4_Examples.py | 1 | 3191 | # Original (From Lecture 3)
# x = 0.5
# epsilon = 0.01
# numGuesses = 0
# low = 0.0
# high = x
# ans = (high + low)/2.0
# while abs(ans**2 - x) >= epsilon and ans <= x:
# print 'high=', high, 'low=', low, 'ans=', ans
# numGuesses += 1
# if ans**2 < x:
# low = ans
# else:
# high = ans
# ... | mit | 725,222,314,473,126,000 | 21.314685 | 114 | 0.555939 | false | 2.976679 | false | false | false |
prkumar/uplink | uplink/helpers.py | 1 | 3403 | # Standard library imports
import collections
# Local imports
from uplink import interfaces, utils
from uplink.clients import io
def get_api_definitions(service):
"""
Returns all attributes with type
`uplink.interfaces.RequestDefinitionBuilder` defined on the given
class.
Note:
All attri... | mit | -7,565,611,934,969,535,000 | 27.838983 | 78 | 0.665589 | false | 4.201235 | false | false | false |
hendawy/lotteryapp | lotteryapp/models.py | 1 | 4998 | # stdlib imports
import uuid
import random
import datetime
# django imports
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.db import IntegrityError
from django.core.exceptions import ValidationError
from django.utils.timezone import utc
from django.core import urlresol... | gpl-2.0 | -5,663,226,053,732,584,000 | 37.152672 | 79 | 0.633253 | false | 3.929245 | false | false | false |
jmagnusson/flask-admin | examples/sqla-filter-selectable/app.py | 15 | 2298 | from flask import Flask
from flask_sqlalchemy import SQLAlchemy
import flask_admin as admin
from flask_admin.contrib import sqla
# Create application
app = Flask(__name__)
# Create dummy secrey key so we can use sessions
app.config['SECRET_KEY'] = '123456790'
# Create in-memory database
app.config['SQLALCHEMY_DATAB... | bsd-3-clause | -1,054,119,313,552,133,500 | 25.113636 | 79 | 0.64752 | false | 3.359649 | false | false | false |
eunchong/build | scripts/slave/recipe_modules/skia_swarming/api.py | 1 | 9701 | # Copyright 2016 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from recipe_engine import recipe_api
import shlex
DEFAULT_TASK_EXPIRATION = 4*60*60
DEFAULT_TASK_TIMEOUT = 60*60
class SkiaSwarmingApi(recipe_api.Recipe... | bsd-3-clause | 4,230,104,533,486,848,500 | 40.814655 | 80 | 0.626636 | false | 3.771773 | false | false | false |
CCI-MOC/GUI-Backend | api/v1/views/quota.py | 1 | 2289 | """
Atmosphere quota rest api.
"""
from rest_framework.views import APIView
from rest_framework.response import Response
from rest_framework import status
from django.shortcuts import get_object_or_404
from api.v1.serializers import QuotaSerializer
from api.v1.views.base import AuthAPIView
from core.models import Qu... | apache-2.0 | -2,640,474,414,428,032,500 | 26.25 | 78 | 0.634338 | false | 4.072954 | false | false | false |
WeAreTheLink/AppNews | TBNA/items.py | 1 | 1174 | # -*- coding: utf-8 -*-
# Define here the models for your scraped items
#
# See documentation in:
# http://doc.scrapy.org/en/latest/topics/items.html
import scrapy
import ast
from scrapy.loader import ItemLoader
# Um artigo possui alem da sua url: um titulo, uma data de publicaçao,
# um corpo e categorias referente... | agpl-3.0 | -4,553,603,677,218,598,400 | 33.441176 | 93 | 0.674637 | false | 3.559271 | false | false | false |
HackNC2014/pulse-hacknc | data_analysis.py | 1 | 4088 | import pulse
from analyze import clean
import os
import sys
import tweepy
import json
import datetime
import copy
#keywords = [u'tragedy',u'shooting',u'shooter',u'shoot',u'concert',u'game']
def prune(d):
#keywords = [u'tragedy',u'shooting',u'shooter',u'shoot',u'concert',u'game']
badwords = [u'hour',u'are',u'... | mit | -1,640,101,916,683,215,400 | 39.475248 | 712 | 0.552593 | false | 2.79235 | false | false | false |
SciDAP/cwltool | tests/test_fetch.py | 1 | 1252 | import unittest
import schema_salad.main
import schema_salad.ref_resolver
import schema_salad.schema
from cwltool.load_tool import load_tool
from cwltool.main import main
from cwltool.workflow import defaultMakeTool
class FetcherTest(unittest.TestCase):
def test_fetcher(self):
class TestFetcher(schema_sa... | apache-2.0 | 5,933,240,792,377,437,000 | 29.536585 | 102 | 0.576677 | false | 3.900312 | true | false | false |
pik-copan/pyregimeshifts | scripts/auto_correlation_function/auto_correlation_irregular_sampling.py | 1 | 5228 | # -*- coding: utf-8 -*-
#
# Copyright (C) 2008-2014 Jonathan F. Donges
# Author: Jonathan F. Donges <donges@pik-potsdam.de>
# URL: <http://www.pik-potsdam.de/members/donges/software>
"""
Computes auto-correlation function for irregularly sampled time series.
Uses the method proposed in:
Rehfeld, K., Marwan, N., Heit... | mit | 8,030,556,805,946,245,000 | 25.00995 | 192 | 0.647284 | false | 3.028969 | false | false | false |
ormandj/stalker | stalkerweb/setup.py | 1 | 1247 | #!/usr/bin/env python
""" setuptools for stalkerweb """
from setuptools import setup, find_packages
from stalkerweb import __version__ as version
setup(
name='stalkerweb',
version=version,
author="Florian Hines",
author_email="syn@ronin.io",
description="Simple Monitoring System",
url="http://... | apache-2.0 | 5,466,479,338,180,866,000 | 28.690476 | 61 | 0.553328 | false | 3.435262 | false | false | false |
ppizarror/korektor | bin/langeditor/_export.py | 1 | 1153 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
EXPORT
Permite adaptar un archivo a un texto normal para ser traducido correctamente en google
Autor: PABLO PIZARRO @ github.com/ppizarror
Fecha: 2014-2015
Licencia: GPLv2
"""
__author__ = "ppizarror"
# Importación de librerías
import os
import sys
re... | gpl-2.0 | -3,734,875,739,352,997,000 | 23.021739 | 104 | 0.665508 | false | 2.8775 | false | false | false |
blurstudio/cross3d | cross3d/studiomax/mixer/clip.py | 1 | 9259 | ##
# \namespace cross3d.studiomax
#
# \remarks The cross3d.studiomax.Clip module contains an
# abstraction of the MAXScript MXClip class for interacting
# with the Motion Mixer.
#
# \author willc
# \author Blur Studio
# \date 09/28/15
#
import Py3dsMax
from Py3dsMax import mxs
from cross3d impo... | mit | -8,625,273,223,106,353,000 | 30.487719 | 80 | 0.656118 | false | 3.429259 | false | false | false |
PLyczkowski/Sticky-Keymap | 2.74/scripts/addons_contrib/add_mesh_space_tree/simplefork.py | 3 | 6997 | # ##### BEGIN GPL LICENSE BLOCK #####
#
# SCA Tree Generator, a Blender addon
# (c) 2013 Michel J. Anders (varkenvarken)
#
# 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 | -6,087,566,832,142,054,000 | 24.351449 | 207 | 0.480492 | false | 2.266602 | false | false | false |
anhnv-3991/VoltDB | lib/python/voltcli/voltdb.d/collect.py | 2 | 3534 | import sys
# This file is part of VoltDB.
# Copyright (C) 2008-2015 VoltDB Inc.
#
# This file contains original code and/or modifications of original code.
# Any modifications made by VoltDB Inc. are licensed under the following
# terms and conditions:
#
# Permission is hereby granted, free of charge, to any person ob... | agpl-3.0 | -7,497,001,605,177,532,000 | 50.970588 | 195 | 0.626203 | false | 4.330882 | false | false | false |
jplusplus/dystopia-tracker | app/api/views.py | 1 | 2135 | from app.core.models import Source, Prediction, Realisation, Category
from rest_framework import generics, permissions, filters
from app.api.serializers import SourceSerializer, PredictionSerializer, RealisationSerializer, CategorySerializer
from app.api.serializers import PredictionCreationSerializer
import app.api.fi... | lgpl-3.0 | -6,725,103,098,441,850,000 | 29.514286 | 113 | 0.738173 | false | 4.621212 | false | false | false |
gurneyalex/odoo | addons/mrp_subcontracting_account/tests/test_subcontracting_account.py | 3 | 3886 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo.addons.mrp_subcontracting.tests.common import TestMrpSubcontractingCommon
from odoo.addons.stock_account.tests.test_stockvaluation import _create_accounting_data
from odoo.tests.common import Form
class TestAc... | agpl-3.0 | -6,860,017,461,789,438,000 | 49.467532 | 167 | 0.642306 | false | 3.542388 | true | false | false |
BrainPad/FindYourCandy | webapp/candysorter/models/images/classify.py | 1 | 2701 | # Copyright 2017 BrainPad 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... | apache-2.0 | -3,130,514,658,233,544,700 | 36 | 82 | 0.668271 | false | 4.061654 | false | false | false |
eykd/ravel | ravel/loaders.py | 1 | 1313 | import codecs
import attr
from path import Path
from . import exceptions
class BaseLoader:
def load(self, environment, name):
source, is_up_to_date = self.get_source(environment, name)
return environment.compile_rulebook(source, name, is_up_to_date)
def get_source(self, environment, name):
... | mit | -5,678,360,746,962,672,000 | 25.795918 | 72 | 0.600152 | false | 3.931138 | false | false | false |
feltus/BDSS | client/tests/transfer/mechanisms/test_user_options.py | 1 | 2020 | # Big Data Smart Socket
# Copyright (C) 2016 Clemson University
#
# 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.
#
# Th... | gpl-2.0 | 824,064,339,617,019,800 | 40.22449 | 103 | 0.710891 | false | 3.761639 | true | false | false |
andreykurilin/mlm | mlm/shell.py | 1 | 2502 | # 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 agreed to in... | apache-2.0 | -1,780,211,756,740,789,200 | 30.670886 | 78 | 0.621503 | false | 4.149254 | false | false | false |
gioman/QGIS | python/plugins/processing/algs/qgis/SpatialiteExecuteSQL.py | 1 | 2882 | # -*- coding: utf-8 -*-
"""
***************************************************************************
SpatialiteExecuteSQL.py
---------------------
Date : October 2016
Copyright : (C) 2016 by Mathieu Pellerin
Email : nirvn dot asia at gmail dot com
******... | gpl-2.0 | 1,415,196,693,037,728,300 | 36.921053 | 97 | 0.560722 | false | 4.648387 | false | false | false |
ARG-TLQ/Red-DiscordBot | cogs/wordfilter/converter.py | 1 | 1946 | #!/usr/bin/env python3.6
"""Custom v2 to v3 converter for WordFilter
Usage:
------
Copy v2 data into the same directory as this script. This includes filter.json,
settings.json, and whitelist.json.
Outputs:
--------
Saves a converted v3 json file in the same directory with the filename v3data.json.
Original data rem... | gpl-3.0 | 1,165,456,621,346,796,500 | 32.551724 | 83 | 0.641829 | false | 3.320819 | false | false | false |
ldacosta/geometry2D | geometry/point.py | 1 | 5140 | """Point and Rectangle classes.
This code is in the public domain.
Point -- point with (x,y) coordinates
Rect -- two points, forming a rectangle
Taken from https://wiki.python.org/moin/PointsAndRectangles
"""
import math
from typing import Tuple
class Point:
"""A point identified by (x,y) coordinates.
s... | mit | -6,745,160,734,486,974,000 | 28.039548 | 93 | 0.560506 | false | 3.383805 | false | false | false |
moshekaplan/PDF-Tools | pdf_js.py | 1 | 2309 | #!/usr/bin/env python
"""
This script extracts all JavaScript from a supplied PDF file.
The script finds all JavaScript by walking the PDF tree and looking for all text
referenced with a JS entry, as specified in Section 8.5 of PDF v1.7.
"""
import sys
import StringIO
import warnings
import PyPDF2
from PyPDF2.generi... | bsd-2-clause | -4,235,529,645,314,861,600 | 28.227848 | 80 | 0.612386 | false | 3.848333 | false | false | false |
Knio/miru | examples/lights00.py | 1 | 2057 | try:
from psyco import full
except ImportError:
print 'no psyco'
from pyglet import options as pyglet_options
pyglet_options['debug_gl'] = False
import pyglet
from miru.ui import TestWindow
from miru.context import context
from miru import options as miru_options
from miru import camera
from miru import util... | mit | -892,115,385,782,662,700 | 22.918605 | 69 | 0.691298 | false | 2.829436 | false | false | false |
docusign/docusign-python-client | docusign_esign/models/template_update_summary.py | 1 | 11501 | # coding: utf-8
"""
DocuSign REST API
The DocuSign REST API provides you with a powerful, convenient, and simple Web services API for interacting with DocuSign. # noqa: E501
OpenAPI spec version: v2.1
Contact: devcenter@docusign.com
Generated by: https://github.com/swagger-api/swagger-codegen.gi... | mit | 8,655,280,657,151,386,000 | 33.537538 | 277 | 0.632901 | false | 4.138539 | false | false | false |
thiderman/network-kitten | kitten/client.py | 1 | 1447 | import json
import logbook
import zmq.green as zmq
from kitten.request import RequestError
class KittenClient(object):
log = logbook.Logger('KittenClient')
timeout = 2000
def send(self, address, request):
self.log.info('Sending request on {1}: {0}', request, address)
socket = self.connec... | mit | 4,768,687,102,994,836,000 | 24.839286 | 75 | 0.608155 | false | 4.019444 | false | false | false |
orlox/massive_bins_2015 | 2016_ULX/scripts/NSBH/kick_dist.py | 1 | 2053 | #!/usr/bin/env python
import matplotlib.pyplot as plt
import matplotlib as mpl
from pylab import *
import numpy as np
import sys
sys.path.insert(0, '../')
import kicks
from scipy.stats import maxwell
params = {'backend': 'pdf',
'figure.figsize': [4.3, 2.2],
'font.family':'serif',
'font.siz... | gpl-3.0 | 2,113,585,709,847,529,700 | 35.017544 | 174 | 0.594252 | false | 2.748327 | false | false | false |
aniruddha-adhikary/bookit | bookit/bookings/models/booking.py | 1 | 1448 | from django.apps import apps
from django.conf import settings
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django_fsm import FSMField, transition
from model_utils import Choices
class Booking(models.Model):
STATES = Choices(
('REQUESTED', 'requested', _('Reques... | mit | -1,215,097,377,576,194,600 | 23.542373 | 55 | 0.585635 | false | 4.172911 | false | false | false |
lamerman/shellpy | shellpython/preprocessor.py | 1 | 11269 | #!/usr/bin/env python
import os
import stat
import tempfile
import re
import getpass
import json
spy_file_pattern = re.compile(r'(.*)\.spy$')
shellpy_meta_pattern = re.compile(r'#shellpy-meta:(.*)')
shellpy_encoding_pattern = '#shellpy-encoding'
def preprocess_module(module_path):
"""The function compiles a modu... | bsd-3-clause | 8,372,486,215,485,364,000 | 36.563333 | 120 | 0.663235 | false | 3.71057 | false | false | false |
viftodi/snotes | snotes_persistence.py | 1 | 3549 | empty = "empty"
class Entry:
def __init__(self,
creation_timestamp=None,
update_timestamp=None,
tags=None,
value=None):
self.creation_timestamp = creation_timestamp
self.update_timestamp = update_timestamp
if tags is None... | mit | 6,676,937,256,555,736,000 | 26.3 | 71 | 0.524937 | false | 3.992126 | false | false | false |
djlauk/cala | cala/cala.py | 1 | 1042 | """
cala: The court allocation application
Copyright (C) 2017 Daniel J. Lauk <daniel.lauk@gmail.com>
cala is open sourced under the terms of the MIT license.
For details see LICENSE.md.
"""
import os
import sys
import tempfile
from flask import Flask, session, redirect, url_for, escape, request, abort, make_respons... | mit | 3,757,820,997,018,096,000 | 27.944444 | 90 | 0.698656 | false | 3.011561 | false | false | false |
UGentPortaal/django-ldapdb-archived | settings.py | 2 | 3162 | # Django settings for django-ldapdb project.
DEBUG = True
TEMPLATE_DEBUG = DEBUG
ADMINS = (
# ('Your Name', 'your_email@domain.com'),
)
MANAGERS = ADMINS
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': 'ldapdb.db',
'USER': '',
'PASSWORD': '',
... | bsd-3-clause | -931,346,338,319,461,800 | 29.114286 | 88 | 0.693232 | false | 3.529018 | false | false | false |
shridharmishra4/tamtam | Jam/RythmGenerator.py | 2 | 3063 | import random
import common.Util.InstrumentDB as InstrumentDB
import common.Config as Config
from common.Util.CSoundNote import CSoundNote
from common.Generation.GenerationConstants import GenerationConstants
from GenRythm import GenRythm
instrumentDB = InstrumentDB.getRef()
def generator( instrument, nbeats, densit... | gpl-2.0 | 3,517,159,044,149,858,000 | 37.2875 | 123 | 0.63761 | false | 3.906888 | false | false | false |
knossos-project/knossos_aam | knossos_aam_backend/aam_interaction.py | 1 | 13163 | """
Set of functions for interacting (reading / writing) with the AAM. Business
logic goes here.
"""
__author__ = 'Fabian Svara'
import re
import zipfile
from cStringIO import StringIO
from django.db import transaction
from django.utils import timezone
from general_utilities.versions import compare_vers... | gpl-2.0 | 6,620,236,176,597,662,000 | 27.057395 | 114 | 0.588088 | false | 4.048908 | false | false | false |
Jonekee/chromium.src | chrome/common/extensions/docs/server2/document_renderer.py | 85 | 4614 | # Copyright 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import logging
import os
from document_parser import ParseDocument
from platform_util import ExtractPlatformFromURL
from third_party.json_schema_compiler.mod... | bsd-3-clause | -8,379,112,430,894,674,000 | 40.196429 | 80 | 0.647378 | false | 4.083186 | false | false | false |
wuher/diablo | diablo/mappers/xmlrpcmapper.py | 1 | 1127 | # -*- coding: utf-8 -*-
# xmlrpcmapper.py ---
#
# Created: Wed Apr 11 15:40:26 2012 (-0600)
# Author: Patrick Hull
#
import xmlrpclib
from diablo.datamapper import DataMapper
from diablo import http
class XmlRpcMapper(DataMapper):
"""XML-RPC mapper
The mapper must be set using the format arg or explicitly ... | mit | 6,107,612,546,182,512,000 | 26.487805 | 73 | 0.618456 | false | 4.098182 | false | false | false |
huard/scipy-work | scipy/interpolate/fitpack2.py | 1 | 21289 | """
fitpack --- curve and surface fitting with splines
fitpack is based on a collection of Fortran routines DIERCKX
by P. Dierckx (see http://www.netlib.org/dierckx/) transformed
to double routines by Pearu Peterson.
"""
# Created by Pearu Peterson, June,August 2003
__all__ = [
'UnivariateSpline',
'Interpolat... | bsd-3-clause | -7,880,119,224,775,439,000 | 37.016071 | 79 | 0.542722 | false | 3.706948 | false | false | false |
pcubillos/pytips | pytips/tips.py | 1 | 4945 | # Copyright (c) 2015-2019 Patricio Cubillos and contributors.
# pytips is open-source software under the MIT license (see LICENSE).
__all__ = ["tips", "iso", "molID", "molname", "to_file"]
import sys
import os
import numpy as np
from numpy.core.numeric import isscalar
libdir = os.path.join(os.path.dirname(os.path.r... | mit | -1,915,433,626,671,041,500 | 25.72973 | 78 | 0.571082 | false | 3.121843 | false | false | false |
maoterodapena/pysouliss | souliss/Typicals.py | 1 | 9295 | import logging
import struct
_LOGGER = logging.getLogger(__name__)
typical_types = {
0x11: {
"desc": "T11: ON/OFF Digital Output with Timer Option", "size": 1,
"name": "Switch Timer",
"state_desc": { 0x00: "off",
0x01: "on"}
},
... | mit | -5,909,111,028,891,820,000 | 38.553191 | 226 | 0.477569 | false | 3.506224 | false | false | false |
Nic30/hwtLib | hwtLib/amba/axis_comp/frame_join/input_reg.py | 1 | 6892 | from hwt.code import If
from hwt.code_utils import rename_signal
from hwt.hdl.types.bits import Bits
from hwt.hdl.types.defs import BIT
from hwt.hdl.types.struct import HStruct
from hwt.interfaces.std import VectSignal, Signal
from hwt.interfaces.utils import addClkRstn
from hwt.pyUtils.arrayQuery import iter_with_last... | mit | -7,346,553,896,573,574,000 | 37.288889 | 127 | 0.506965 | false | 3.612159 | false | false | false |
rasathus/pigredients | pigredients/core/bitman.py | 1 | 2901 | class BitSequence(object):
def __init__(self, byte_data, word_length=8):
self.value = byte_data
self.bits_per_word = word_length
def _bitLen(self):
# Warning this does not take into account leading zeros, ie. 0000000010000000, you probbaly want to be using len(self)
leng... | mit | 3,311,757,226,960,893,000 | 27.722772 | 126 | 0.525681 | false | 3.42503 | false | false | false |
nOkuda/classtm | classtm/classifier.py | 1 | 3458 | """Classifiers"""
import os
import subprocess
import numpy as np
FILE_DIR = os.path.dirname(os.path.abspath(__file__))
SVM_DIR = os.path.join(FILE_DIR, 'svm_light')
SVM_LEARN = os.path.join(SVM_DIR, 'svm_learn')
SVM_CLASSIFY = os.path.join(SVM_DIR, 'svm_classify')
class TSVM:
"""Transductive support vector mac... | gpl-3.0 | -5,612,169,472,402,530,000 | 35.020833 | 77 | 0.525448 | false | 3.846496 | false | false | false |
maxalbert/sumatra | sumatra/pfi.py | 5 | 1224 | #!/usr/bin/env python
"""
Obtain platform information from every node of a cluster.
This script should be placed somewhere on the user's path.
:copyright: Copyright 2006-2015 by the Sumatra team, see doc/authors.txt
:license: BSD 2-clause, see LICENSE for details.
"""
from __future__ import unicode_literals
from mpi... | bsd-2-clause | -8,951,961,362,114,423,000 | 29.6 | 72 | 0.634804 | false | 4.163265 | false | false | false |
aglitke/vdsm | tests/sslTests.py | 2 | 11912 | #
# Copyright 2012 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 distributed in th... | gpl-2.0 | 846,182,912,940,857,900 | 34.879518 | 79 | 0.670165 | false | 3.011884 | true | false | false |
JanMalte/django-sortable-listview | example_project/simple_blog/settings.py | 1 | 4779 | import os
DEBUG = True
TEMPLATE_DEBUG = DEBUG
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(os.path.dirname(__file__), 'simple_blog.sqlite'),
}
}
# Hosts/domain names that are valid for this site; required if DEBUG is False
# See https://docs.djangopr... | mit | 2,895,065,102,437,082,000 | 32.1875 | 88 | 0.70203 | false | 3.673328 | false | false | false |
GentlemanBrewing/ADCLibraries-MCP3424 | ADCDACPi/demo-dacsinewave.py | 1 | 3735 | #!/usr/bin/python3
from ABE_ADCDACPi import ADCDACPi
import time
import math
"""
================================================
ABElectronics ADCDAC Pi 2-Channel ADC, 2-Channel DAC | DAC sine wave generator demo
Version 1.0 Created 29/02/2015
run with: python3 demo-dacsinewave.py
==================================... | mit | -9,149,330,796,570,357,000 | 40.966292 | 83 | 0.57992 | false | 2.207447 | false | false | false |
rdebroiz/presto | data_model.py | 1 | 5544 | import re
import logging
from pprint import pformat
from scope import Scope
import settings
try:
import path
except ImportError:
logging.critical("Presto requiered path.py to be installed, "
"checkout requirement.txt.")
raise
# char to escape in a regular expression to be taken as li... | gpl-2.0 | 2,314,902,069,117,421,600 | 32 | 79 | 0.546356 | false | 4.314397 | false | false | false |
felixzhao/BookDigger | GetBookList/queryBookListByTag.py | 1 | 1587 | #encoding:UTF-8
import requests
import time
import datetime
import sys
from bs4 import BeautifulSoup
import re
def getInfo(soup):
print('in get info.')
result = ''
a = soup.findAll('dl')
for b in a:
c = b.find('a',{'class':'title'})
d = c.string
print(d)
result += d + '\... | apache-2.0 | 7,360,206,904,995,574,000 | 24.542373 | 80 | 0.521566 | false | 3.001992 | false | false | false |
jigarkb/CTCI | LeetCode/281-M-ZigzagIterator.py | 2 | 1454 | # Given two 1d vectors, implement an iterator to return their elements alternately.
#
# For example, given two 1d vectors:
#
# v1 = [1, 2]
# v2 = [3, 4, 5, 6]
# By calling next repeatedly until hasNext returns false, the order of elements returned by next should be:
# [1, 3, 2, 4, 5, 6].
#
# Follow up: What if you are ... | mit | -3,134,418,321,462,703,600 | 28.08 | 117 | 0.594223 | false | 3.073996 | false | false | false |
morganoh/Python_With_Kirk | week4_programs/rtr2_change_buffer_take2.py | 1 | 1465 | #!/usr/bin/env python
""" use paramiko to send cmd to RTR2 """
import paramiko
import time
from getpass import getpass
MAX_BUFFER = 65535
def prepare_buffer(rtr2):
if rtr2.recv_ready():
# print 'buffer is full'
return rtr2.recv(MAX_BUFFER)
def disable_paging(rtr2):
cmd = 'terminal ... | apache-2.0 | -1,131,112,839,962,067,300 | 20.865672 | 125 | 0.607509 | false | 3.008214 | false | false | false |
ccqpein/what_to_eat | UI.py | 1 | 1530 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
import os
try:
from PySide import QtCore, QtGui
except ImportError:
print("没有Qt模块,将在命令行操作")
os.system("python " + sys.path[0] + "/main.py")
os._exit(0)
from StoreData import store_list, all_store, store_init, add_new_store
from main import main... | mit | -4,852,610,911,294,674,000 | 24.40678 | 70 | 0.608144 | false | 3.140461 | false | false | false |
blubberdiblub/eztemplate | eztemplate/engines/string_formatter_engine.py | 1 | 3124 | #!/usr/bin/env python
"""Provide the standard Python string.Formatter engine."""
from __future__ import absolute_import
from __future__ import print_function
import string
try:
basestring
except NameError:
basestring = str
from . import Engine
class MissingField(object):
"""Represent a missing field ... | mit | -9,180,447,834,391,272,000 | 28.471698 | 77 | 0.607234 | false | 4.501441 | false | false | false |
e-gun/HipparchiaServer | server/_deprecated/_vectors/wordbaggers.py | 1 | 4877 | # -*- coding: utf-8 -*-
"""
HipparchiaServer: an interface to a database of Greek and Latin texts
Copyright: E Gunderson 2016-21
License: GNU GENERAL PUBLIC LICENSE 3
(see LICENSE in the top level directory of the distribution)
"""
from collections import deque
from server.dbsupport.miscdbfunctions import resulti... | gpl-3.0 | 1,389,683,665,494,826,200 | 24.294737 | 108 | 0.731586 | false | 3.063098 | false | false | false |
Sticklyman1936/workload-automation | wlauto/workloads/apklaunch/__init__.py | 3 | 2431 | # Copyright 2015 ARM Limited
#
# 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 writin... | apache-2.0 | 2,307,262,621,845,389,300 | 38.852459 | 98 | 0.691074 | false | 3.972222 | false | false | false |
M4telight/pymlbadge | pyml_badge.py | 1 | 4777 | import ugfx
import badge
import wifi
import network
from time import sleep
import usocket as socket
state_map = {
'up': 0,
'down': 1,
'left': 2,
'right': 3,
'a': 4,
'b': 5,
'start': 8,
'select': 9,
}
states = [0 for _ in range(14)]
def handle_key(id, pressed):
states[id] = presse... | gpl-3.0 | -9,105,801,987,702,029,000 | 26.773256 | 80 | 0.597027 | false | 3.446609 | false | false | false |
quamis/pyBackup | pyBackup/Writer/Backup/Writer.py | 1 | 1486 | import os, shutil
import logging
class Writer(object):
def __init__(self, backupBasePath, sourceBackupBasePath, sourceSourceBasePath, id):
self.backupBasePath = backupBasePath
self.sourceBackupBasePath = sourceBackupBasePath
self.sourceSourceBasePath = sourceSourceBasePath
s... | gpl-2.0 | -4,966,824,692,588,552,000 | 29.659574 | 106 | 0.604307 | false | 4.049046 | false | false | false |
G4brym/Ecomerce | Main/utilities/general.py | 1 | 1889 | from Main.models.categories import Category, Product_category
from Main.models.products import Product
from Main.utilities.logs import logError
from django.utils import timezone
import datetime
def getCategoryFromProduct(product):
category = Product_category.objects.filter(product_id=product["id"])[0].catego... | apache-2.0 | -3,354,790,142,302,766,600 | 29 | 105 | 0.627316 | false | 4.027719 | false | false | false |
hurricup/intellij-community | python/helpers/python-skeletons/pytest/__init__.py | 1 | 8866 | """Skeleton for 'pytest'.
Project: pytest 2.6.4 <http://pytest.org/latest/>
Skeleton by: Bruno Oliveira <nicoddemus@gmail.com>
Exposing everything that can be extracted from `pytest_namespace` hook
in standard pytest modules, using original docstrings.
"""
# _pytest.genscript
def freeze_includes():
"""
Retu... | apache-2.0 | -3,909,746,662,439,518,000 | 30.439716 | 80 | 0.655651 | false | 4.584281 | true | false | false |
muraliselva10/cloudkitty | cloudkitty/storage/sqlalchemy/alembic/versions/3eecce93ff43_create_invoice_details_table.py | 1 | 1278 | """create invoice_details table
Revision ID: 3eecce93ff43
Revises: 792b438b663
Create Date: 2016-03-29 22:16:01.022645
"""
# revision identifiers, used by Alembic.
revision = '3eecce93ff43'
down_revision = '792b438b663'
from alembic import op
import sqlalchemy as sa
def upgrade():
op.create_table('invoice_deta... | apache-2.0 | 1,116,278,782,699,685,900 | 35.514286 | 79 | 0.701095 | false | 3.219144 | false | false | false |
project-rig/nengo_spinnaker | nengo_spinnaker/regions/keyspaces.py | 1 | 6030 | from six import iteritems
import struct
from .region import Region
class KeyspacesRegion(Region):
"""A region of memory which represents data formed from a list of
:py:class:`~rig.bitfield.BitField` instances representing SpiNNaker routing
keys.
Each "row" represents a keyspace, and each "column" is... | mit | -3,928,575,192,786,206,700 | 33.655172 | 79 | 0.615755 | false | 4.285714 | false | false | false |
olduvaihand/ProjectEuler | src/python/problem023.py | 1 | 2055 | # -*- coding: utf-8 -*-
# ProjectEuler/src/python/problem023.py
#
# Non-abundant sums
# =================
# Published on Friday, 2nd August 2002, 06:00 pm
#
# A perfect number is a number for which the sum of its proper divisors is
# exactly equal to the number. For example, the sum of the proper divisors of
# 28 woul... | mit | -502,370,277,492,093,950 | 32.655738 | 79 | 0.665855 | false | 3.539655 | false | false | false |
oasis-open/cti-python-stix2 | stix2/markings/__init__.py | 1 | 8378 | """
Functions for working with STIX 2 Data Markings.
These high level functions will operate on both object-level markings and
granular markings unless otherwise noted in each of the functions.
Note:
These functions are also available as methods on SDOs, SROs, and Marking
Definitions. The corresponding method... | bsd-3-clause | -2,832,197,835,230,233,600 | 31.854902 | 103 | 0.66424 | false | 4.231313 | false | false | false |
pacifica/pacifica-archiveinterface | pacifica/archiveinterface/backends/oracle_hsm_sideband/archive.py | 2 | 6604 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""HSM Sideband Backend Archive Module.
Module that implements the abstract_backend_archive class for a HSM Sideband
backend.
"""
import os
import stat
import shutil
from ...archive_utils import un_abs_path
from ...config import get_config
from ...exception import ArchiveInter... | lgpl-3.0 | -162,728,773,794,844,740 | 36.101124 | 91 | 0.585554 | false | 4.044091 | false | false | false |
scholer/na_strand_model | nascent/graph_sim_nx/connected_multigraph.py | 2 | 2027 | # -*- coding: utf-8 -*-
## Copyright 2015 Rasmus Scholer Sorensen, rasmusscholer@gmail.com
##
## This file is part of Nascent.
##
## Nascent 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 Foundati... | gpl-3.0 | 3,514,739,809,222,993,400 | 32.783333 | 78 | 0.628022 | false | 3.928295 | false | false | false |
jhertfe/vvs-delay | testrun.py | 1 | 1249 | import os
import importlib
tests = []
for root, dirs, files in os.walk("testing"):
for file in files:
if file.endswith(".py") and not os.path.basename(file) == '__init__.py':
# print 'found test', os.path.join(root, file)
tests.append(os.path.join(root, file))
passed_or_failed = [... | mit | 292,270,692,039,532,900 | 31.868421 | 80 | 0.551641 | false | 3.312997 | true | false | false |
Jonestj1/mbuild | mbuild/utils/visualization.py | 1 | 4433 | # this code is taken from: https://gist.github.com/mbostock/4339083
d3_tree_template = """
<!DOCTYPE html>
<meta charset="utf-8">
<style>
.node {
cursor: pointer;
}
.node circle {
fill: #fff;
stroke: steelblue;
stroke-width: 1.5px;
}
.node text {
font: 14px sans-serif;
}
.link {
fill: none;
stroke: #c... | mit | -5,776,204,275,036,614,000 | 23.627778 | 98 | 0.577036 | false | 3.078472 | false | false | false |
Justin-W/clifunland | src/clifunzone/xml_utils.py | 1 | 13355 | from collections import OrderedDict
from clifunzone import reflection_utils
from clifunzone import xml2json
try:
from lxml import etree as ET
except ImportError:
try:
import xml.etree.cElementTree as ET
except ImportError:
import xml.etree.ElementTree as ET
def contains_valid_xml(obj):
... | bsd-2-clause | -4,661,843,461,029,319,000 | 32.138958 | 119 | 0.600973 | false | 3.649904 | true | false | false |
bloomberg/phabricator-tools | py/phl/phlgitu_ref.py | 4 | 7288 | """Utilities for working with git refs."""
# =============================================================================
# CONTENTS
# -----------------------------------------------------------------------------
# phlgitu_ref
#
# Public Classes:
# Error
# Name
# .short
# .fq
# .is_remote
#
# Public Funct... | apache-2.0 | 6,136,878,137,985,886,000 | 23.87372 | 79 | 0.562569 | false | 3.837809 | false | false | false |
seongjaelee/rigvedawiki-parser | rigvedawiki/element.py | 1 | 1070 | class Element(object):
def __init__(self, parent, tag=None, attrib=None, close=True):
self.parent = parent
self.tag = tag
self.children = []
self.attrib = attrib if attrib != None else {}
self.close = close
if parent != None:
parent.append_child(self)
... | mit | 2,558,418,487,808,359,000 | 24.47619 | 66 | 0.502804 | false | 3.876812 | false | false | false |
Jofemago/Computacion-Grafica | Librery/Ejercicios/Images.py | 3 | 1999 | import pygame
NEGRO =(0,0,0 )
class Img:
def __init__ (self, pantalla, img, x, y, Tampantalla ,fondo = None ):
self.img = pygame.image.load(img)
self.fondo = None
if fondo is not None:
self.fondo = pygame.image.load(fondo)
self.p = pantalla
self.x = x
s... | mit | 1,460,225,638,242,428,700 | 21.715909 | 73 | 0.512256 | false | 3.010542 | false | false | false |
UCSD-CCAL/ccal | ccal/single_sample_gsea.py | 1 | 1912 | from warnings import warn
from numpy import absolute, in1d
from ._plot_mountain import _plot_mountain
def single_sample_gsea(
gene_score,
gene_set_genes,
statistic="ks",
plot=True,
title=None,
gene_score_name=None,
annotation_text_font_size=16,
annotation_text_width=88,
annotatio... | mit | -6,813,536,755,405,511,000 | 19.782609 | 84 | 0.572176 | false | 3.580524 | false | false | false |
nzavagli/UnrealPy | UnrealPyEmbed/Development/Python/2015.08.07-Python2710-x64-Source-vs2015/Python27/Source/pywin32-219/Pythonwin/pywin/framework/cmdline.py | 24 | 1165 | # cmdline - command line utilities.
import sys
import win32ui
import string
def ParseArgs( str ):
import string
ret=[]
pos = 0
length=len(str)
while pos<length:
try:
while str[pos] in string.whitespace: pos = pos+1
except IndexError:
break
if pos>=length:
break
if str[pos]=='"':
pos=pos+1
... | mit | -3,405,567,760,928,287,000 | 22.795918 | 82 | 0.694421 | false | 2.949367 | false | false | false |
tectronics/pygranule | pygranule/bidict.py | 2 | 3390 |
def reverse_dictionary(d):
rev_d = {}
for key in d:
val = d[key]
rev_d[val] = key
return rev_d
class BiDict(object):
"""
Bidirectional dictionary.
Allows inverse listings, value -> key
as well as usual key -> value.
Only supports one to one mapping,
i.e. unique key... | gpl-3.0 | -3,382,926,274,161,524,000 | 25.076923 | 68 | 0.526254 | false | 4.069628 | false | false | false |
mcaleavya/bcc-scripts | disk_qos.py | 1 | 6372 | #!/usr/bin/python
# @lint-avoid-python-3-compatibility-imports
#
# qos implement a dynamic qos for using cgroups
# For Linux, uses BCC, eBPF.
#
# USAGE: qos.py [-h] [-qc] [--max] [interval]
# requires a file name qos_setup which can changed with qosfile
# file has format maj:min IOPS
# i.e. 8:0 40000
# Cop... | apache-2.0 | -2,773,605,776,312,134,000 | 26.465517 | 93 | 0.580352 | false | 2.983146 | false | false | false |
NKUCodingCat/NKU-SSS-in-One | prog/src/huping.py | 2 | 3764 | #coding=utf-8
import C
import urllib
import urllib2
import cookielib
import re
import sys
nID = ''
while 1:
nID = raw_input("Input your id and press Enter plz ")
if len(nID) != 7:
print 'wrong length of id,input again'
else:
break
Pass = raw_input("Input your password and... | gpl-2.0 | 646,683,881,656,747,300 | 29.915254 | 252 | 0.641073 | false | 2.675195 | false | false | false |
paragbaxi/qualysapi | qualysapi/config.py | 1 | 10177 | """ Module providing a single class (QualysConnectConfig) that parses a config
file and provides the information required to build QualysGuard sessions.
"""
import getpass
import logging
import os
import stat
from configparser import RawConfigParser
import qualysapi.settings as qcs
# Setup module level logging.
logg... | apache-2.0 | 2,183,132,515,875,634,700 | 41.053719 | 156 | 0.55822 | false | 4.326956 | true | false | false |
mmitkevich/softwatch | run.py | 1 | 2612 | #!/usr/bin/python2
import collections
import argparse
from softwatch import timelog
from softwatch import timenode
import sys
import time
import os
import glob
import traceback
import codecs
import locale
def run1(args):
run(args[0])
def run(args):
try:
#sys.stdout = codecs.getwriter(locale.getpreferredencodin... | mit | -7,720,414,205,021,691,000 | 30.853659 | 122 | 0.574655 | false | 3.592847 | false | false | false |
niwinz/niwi-web | src/niwi/web/forms.py | 1 | 1506 | # -*- coding: utf-8 -*-
from django.utils.translation import ugettext_lazy as _
from django import forms
import datetime
LEXER_CHOICES = (
('', '---------'),
('text', 'Text plain'),
('c', 'C'),
('cpp', 'C++'),
('d', 'D'),
('csharp', 'C#'),
('go', 'Go'),
('java', 'Java'),
('py', ... | bsd-3-clause | -5,487,374,588,739,876,000 | 27.415094 | 78 | 0.527224 | false | 3.281046 | false | false | false |
AnTAVR/aai2 | src/libs/db/__init__.py | 1 | 3102 | from typing import Optional, Generator, Any, List
from .db_lib import DbInterface
from .db_types import FontMapsList, FontUnimapsList, FontsList, KeymapsList, DomainsList, TimezonesList, LocalesList
class DbFontMaps(DbInterface):
db_file_name = 'font_maps.csv'
row_class = FontMapsList
lines: List[FontMa... | gpl-2.0 | 6,703,015,428,604,923,000 | 29.411765 | 116 | 0.660864 | false | 3.442841 | false | false | false |
teamfx/openjfx-9-dev-rt | modules/javafx.web/src/main/native/Tools/Scripts/webkitpy/tool/bot/irc_command.py | 1 | 12984 | # Copyright (c) 2010 Google Inc. 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 conditions and the ... | gpl-2.0 | -4,076,264,880,319,106,000 | 41.29316 | 145 | 0.651494 | false | 3.774419 | true | false | false |
smartczm/python-learn | Old-day01-10/s13-day9/Socket/ftp_socket/c.py | 1 | 1626 | #!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
# Author: ChenLiang
import socket
import os
import json
ip_port = ('127.0.0.1', 8009)
# 买手机
s = socket.socket()
# 拨号
s.connect(ip_port)
# 发送消息
welcome_msg = s.recv(1024)
print("from server:", welcome_msg.decode())
while True:
send_data = input(">>: ").strip()
i... | gpl-2.0 | -4,102,936,458,862,545,000 | 27.5 | 75 | 0.534461 | false | 3.250509 | false | false | false |
sergey-dryabzhinsky/dedupsqlfs | dedupsqlfs/db/mysql/table/tmp_ids.py | 1 | 1719 | # -*- coding: utf8 -*-
__author__ = 'sergey'
from dedupsqlfs.db.mysql.table import Table
class TableTmpIds( Table ):
_engine = "MEMORY"
_table_name = "tmp_ids"
def create( self ):
c = self.getCursor()
# Create table
c.execute(
"CREATE TABLE IF NOT EXISTS `%s` (" % ... | mit | -4,263,189,194,209,451,000 | 22.22973 | 66 | 0.441536 | false | 3.81153 | false | false | false |
tommy-u/chaco | examples/demo/quiver.py | 2 | 1961 | """
Draws a vector or "quiver" plot of a set of random points.
- Left-drag pans the plot.
- Mousewheel up and down zooms the plot in and out.
- Pressing "z" brings up the Zoom Box, and you can click-drag a rectangular
region to zoom. If you use a sequence of zoom boxes, pressing alt-left-arrow
and alt-right-a... | bsd-3-clause | 5,563,889,532,120,993,000 | 29.640625 | 80 | 0.674146 | false | 3.624769 | false | false | false |
wooga/airflow | airflow/providers/google/cloud/hooks/life_sciences.py | 1 | 5714 | #
# 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 | 5,205,677,005,183,493,000 | 37.093333 | 96 | 0.630382 | false | 4.392006 | false | false | false |
frostasm/retext | ReText/editor.py | 1 | 9116 | # vim: noexpandtab:ts=4:sw=4
# This file is part of ReText
# Copyright: Dmitry Shachnev 2012-2015
# License: GNU GPL v2 or higher
from ReText import monofont, globalSettings, tablemode, DOCTYPE_MARKDOWN
from PyQt5.QtCore import QPoint, QSize, Qt
from PyQt5.QtGui import QColor, QPainter, QPalette, QTextCursor, QTextFo... | gpl-3.0 | 7,018,855,425,577,568,000 | 33.270677 | 81 | 0.740237 | false | 3.244128 | false | false | false |
hoh/Billabong | billabong/core.py | 1 | 3462 | # Copyright (c) 2015 "Hugo Herter http://hugoherter.com"
#
# This file is part of Billabong.
#
# Intercom is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your o... | agpl-3.0 | 4,422,107,054,092,524,000 | 32.61165 | 79 | 0.612074 | false | 4.206561 | false | false | false |
maduma/wism | welcome.py | 1 | 3041 | # Copyright 2015 IBM Corp. 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
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed... | apache-2.0 | 1,431,935,181,249,914,000 | 34.776471 | 379 | 0.652417 | false | 3.39019 | false | false | false |
texttochange/vusion-backend | vusion/component/tests/test_flying_message_manager.py | 1 | 1160 | from bson import ObjectId
from redis import Redis
from twisted.trial.unittest import TestCase
from vusion.component import FlyingMessageManager
class FlyingMessageTestCase(TestCase):
def setUp(self):
self.redis = Redis()
self.prefix_key = 'unittest:testprogram'
self.fm = Fl... | bsd-3-clause | -9,167,631,510,292,101,000 | 28.769231 | 72 | 0.631897 | false | 3.754045 | true | false | false |
sergiopasra/megaradrp | megaradrp/processing/cube.py | 2 | 13175 | #
# Copyright 2017-2021 Universidad Complutense de Madrid
#
# This file is part of Megara DRP
#
# SPDX-License-Identifier: GPL-3.0+
# License-Filename: LICENSE.txt
#
"""
Interpolation method based on:
'Hex-Splines: A Novel Spline Family for Hexagonal Lattices'
van de Ville et al. IEEE Transactions on Image Processing ... | gpl-3.0 | 6,621,899,695,352,916,000 | 30.594724 | 98 | 0.577989 | false | 3.029432 | false | false | false |
airbnb/knowledge-repo | knowledge_repo/repositories/gitrepository.py | 1 | 21111 | import os
import shutil
import logging
import re
import socket
from io import open
import git
import yaml
from ..repository import KnowledgeRepository
from ..utils.encoding import encode
logger = logging.getLogger(__name__)
class GitKnowledgeRepository(KnowledgeRepository):
_registry_keys = ['git']
TEMPLA... | apache-2.0 | -6,867,122,787,053,720,000 | 39.365201 | 225 | 0.577566 | false | 4.185369 | true | false | false |
bruckhaus/challenges | python_challenges/hanoi.py | 1 | 1078 | __author__ = 'tilmann.bruckhaus'
class Hanoi:
def __init__(self, disks):
print "Playing \"Towers of Hanoi\" for ", disks, " disks:"
self.disks = disks
self.source_peg = []
self.helper_peg = []
self.target_peg = []
self.set_up_pegs()
self.show()
def sol... | mit | 6,909,502,216,494,593,000 | 28.972222 | 80 | 0.556586 | false | 3.208333 | false | false | false |
lixxu/wxbreads | wxbreads/login.py | 1 | 7576 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
import ldap3
import windbreads.utils as wdu
import wx
from ldap3tool import LDAPTool
import wxbreads.widgets as wxw
from wxbreads.base import BaseDialog
def ldap_login(server, base_dn, login_name, password, close=True, **kwargs):... | bsd-2-clause | 8,304,882,785,256,869,000 | 28.220077 | 76 | 0.546776 | false | 3.65251 | false | false | false |
csaldias/python-usm | Certámenes resueltos/Certamen 2 2013-2/pregunta3.py | 1 | 3355 | #Los datos del problema.
salidas = [ ((2013,11,2), 'LAN123','NewYork','EMBARQUE'),
((2013,4,28), 'MX201', 'Cancun', 'ARRIBADO'),
#...
]
vuelos = { 'LAN123': {'16740623-7', '1111111-1', '555555-5'},
'ALGO00': {'444444-4'},
'MX201': {'777777-7'},
... | mit | -6,426,673,959,087,829,000 | 38.482353 | 88 | 0.554098 | false | 2.961165 | false | false | false |
datacommonsorg/data | scripts/ourworldindata/covid19/preprocess_csv.py | 1 | 4555 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | 278,184,952,502,127,300 | 40.036036 | 106 | 0.640834 | false | 3.553042 | true | false | false |
google/pyctr | examples/jax/jax.py | 1 | 3367 | # Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, s... | apache-2.0 | -1,682,470,575,494,374,000 | 29.333333 | 80 | 0.672706 | false | 3.766219 | false | false | false |
jakecoppinger/departing.io | parse_nxtbus.py | 1 | 2407 | # Departing.io, a web app to answer the question of "When will the next bus come?"
# Copyright (C) 2016 Jake Coppinger
# 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 Li... | gpl-3.0 | -5,955,612,718,406,878,000 | 35.469697 | 109 | 0.7258 | false | 3.438571 | false | false | false |
cathywu/flow | scripts/sync_s3.py | 1 | 1335 | """Script for syncing files form s3 down to your local machine.
Code is heavily based on
https://github.com/rll/rllab/blob/master/scripts/sync_s3.py
"""
import sys
from flow import config
import os
import argparse
sys.path.append('.')
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_a... | mit | 2,369,196,079,049,326,000 | 35.081081 | 78 | 0.608989 | false | 3.312655 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.