repo_name stringlengths 5 92 | path stringlengths 4 221 | copies stringclasses 19
values | size stringlengths 4 6 | content stringlengths 766 896k | license stringclasses 15
values | hash int64 -9,223,277,421,539,062,000 9,223,102,107B | line_mean float64 6.51 99.9 | line_max int64 32 997 | alpha_frac float64 0.25 0.96 | autogenerated bool 1
class | ratio float64 1.5 13.6 | config_test bool 2
classes | has_no_keywords bool 2
classes | few_assignments bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
lvapeab/nmt-keras | tests/NMT_architectures/attention_ConditionalLSTM.py | 1 | 8620 | import argparse
import os
import pytest
from tests.test_config import load_tests_params, clean_dirs
from data_engine.prepare_data import build_dataset
from nmt_keras.training import train_model
from nmt_keras.apply_model import sample_ensemble, score_corpus
def test_ConditionalLSTM_add():
params = load_tests_para... | mit | 6,003,570,170,736,867,000 | 42.756345 | 107 | 0.609281 | false | 3.206845 | true | false | false |
mathandy/svgpathtools | svgpathtools/paths2svg.py | 1 | 19028 | """This submodule: basic tools for creating svg files from path data.
See also the document.py submodule.
"""
# External dependencies:
from __future__ import division, absolute_import, print_function
from math import ceil
from os import path as os_path, makedirs
from tempfile import gettempdir
from xml.dom.minidom im... | mit | -2,271,244,267,651,352,000 | 38.559252 | 79 | 0.567952 | false | 4.000841 | false | false | false |
regebro/doctrine.urwid | docs/conf.py | 1 | 7899 | # -*- coding: utf-8 -*-
#
# doctrine.urwid documentation build configuration file, created by
# sphinx-quickstart on Thu Jun 11 19:35:12 2015.
#
# 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.
... | mit | 7,486,623,617,247,903,000 | 31.506173 | 80 | 0.704773 | false | 3.725943 | true | false | false |
nburn42/tensorflow | tensorflow/contrib/eager/python/datasets.py | 1 | 6160 | # 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 | -1,686,156,188,781,747,200 | 38.235669 | 116 | 0.68539 | false | 4.128686 | false | false | false |
matandobr/Mobile-Security-Framework-MobSF | StaticAnalyzer/views/android/generate_downloads.py | 1 | 1944 | # -*- coding: utf_8 -*-
"""Generate Zipped downloads."""
import logging
import os
import re
import shutil
from django.conf import settings
from django.shortcuts import redirect
from MobSF.utils import print_n_send_error_response
logger = logging.getLogger(__name__)
def run(request):
"""Generate downloads for ... | gpl-3.0 | -6,746,440,024,267,676,000 | 35.679245 | 67 | 0.55607 | false | 3.717017 | false | false | false |
isislovecruft/arm | arm/controller.py | 1 | 18726 | """
Main interface loop for arm, periodically redrawing the screen and issuing
user input to the proper panels.
"""
import os
import time
import curses
import threading
import arm.arguments
import arm.menu.menu
import arm.popups
import arm.headerPanel
import arm.logPanel
import arm.configPanel
import arm.torrcPanel
i... | gpl-3.0 | -8,813,717,470,918,531,000 | 26.297376 | 313 | 0.659885 | false | 3.714002 | true | false | false |
ty707/airflow | airflow/jobs.py | 1 | 43857 | # -*- coding: utf-8 -*-
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
... | apache-2.0 | 6,076,973,327,566,079,000 | 37.037294 | 110 | 0.519393 | false | 4.414394 | false | false | false |
frankdilo/cropper-python | cropper/cli.py | 1 | 4116 | #!/usr/bin/env python
import os
from glob import glob
import click
import shutil
from PIL import Image
from devices import DEVICES, ALL_DEVICE_NAMES
IPAD_MASTER_DIRNAME = 'iPadMaster'
IPHONE_MASTER_DIRNAME = 'iPhoneMaster'
def safe_mkdir(path):
try:
os.mkdir(path)
except OSError:
pass
de... | bsd-3-clause | -8,730,890,915,175,512,000 | 30.906977 | 117 | 0.646987 | false | 3.458824 | false | false | false |
botherder/volatility | volatility/plugins/mac/netstat.py | 1 | 2242 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# This file is part of Volatility.
#
# Volatility 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 ... | gpl-2.0 | 9,063,788,820,111,397,000 | 35.754098 | 120 | 0.544157 | false | 4.113761 | false | false | false |
snakazawa/qibluemix | sample/sttproxy/sttproxy.py | 1 | 2371 | # -*- coding: utf-8 -*-
u"""
see readme.md
"""
import os
import sys
import time
from naoqi import ALBroker
sys.path.append(os.path.dirname(os.path.abspath(__file__)) + '/../../')
from qibluemix import STTProxy, get_logger
from qibluemix.pepper import SpeechRecognitionMemory, StreamingAudioRecorder
from qibluemix.wats... | mit | -6,306,866,242,211,763,000 | 24.561798 | 118 | 0.687912 | false | 2.890724 | false | false | false |
RudolfCardinal/crate | crate_anon/preprocess/rio_pk.py | 1 | 5802 | #!/usr/bin/env python
"""
crate_anon/preprocess/rio_pk.py
===============================================================================
Copyright (C) 2015-2021 Rudolf Cardinal (rudolf@pobox.com).
This file is part of CRATE.
CRATE is free software: you can redistribute it and/or modify
it under th... | gpl-3.0 | -156,543,975,734,238,370 | 35.2625 | 102 | 0.638401 | false | 3.555147 | false | false | false |
camillescott/boink | goetia/cli/cdbg_stream.py | 1 | 11576 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# (c) Camille Scott, 2019
# File : cdbg_stream.py
# License: MIT
# Author : Camille Scott <camille.scott.w@gmail.com>
# Date : 11.03.2020
from goetia import libgoetia
from goetia.cdbg import (compute_connected_component_callback,
compute_unit... | mit | 4,909,020,035,630,128,000 | 41.248175 | 106 | 0.503283 | false | 4.423386 | false | false | false |
CloCkWeRX/rabbitvcs | rabbitvcs/vcs/git/gittyup/client.py | 1 | 62939 | #
# client.py
#
import os
import os.path
import re
import shutil
import fnmatch
import time
from string import ascii_letters, digits
from datetime import datetime
from mimetypes import guess_type
import subprocess
import dulwich.errors
import dulwich.repo
import dulwich.objects
from dulwich.pack import Pack
from dul... | gpl-2.0 | 601,569,765,097,626,400 | 32.073568 | 151 | 0.524556 | false | 4.193138 | true | false | false |
utlco/tcnc | tcnc/cam/offset.py | 1 | 7587 | #-----------------------------------------------------------------------------
# Copyright 2012-2016 Claude Zervas
# email: claude@utlco.com
#-----------------------------------------------------------------------------
"""
Offset Line/Arc segments in a tool path to compensate for tool trail offset.
"""
# Python 3 comp... | lgpl-3.0 | 6,676,673,369,152,770,000 | 39.790323 | 143 | 0.57704 | false | 3.900771 | false | false | false |
edugrasa/demonstrator | gen_templates.py | 1 | 11003 | #
# Copyright (C) 2014-2017 Nextworks
# Author: Vincenzo Maffione <v.maffione@nextworks.it>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at y... | gpl-2.0 | -1,483,902,271,451,091,000 | 30.527221 | 115 | 0.468418 | false | 3.82447 | true | false | false |
anomalizer/ngx_aws_auth | reference-impl-py/reference_v2.py | 1 | 2701 | #!/usr/bin/env python
from datetime import datetime
from hashlib import sha1
import hmac
import sys
try:
from urllib.request import Request, urlopen, HTTPError # Python 3
except:
from urllib2 import Request, urlopen, HTTPError # Python 2
'''
Authorization = "AWS" + " " + AWSAccessKeyId + ":" + Signature;
S... | bsd-2-clause | -5,930,532,583,128,790,000 | 29.011111 | 95 | 0.601999 | false | 2.964874 | false | false | false |
CARocha/simasinnovacion | servicios/views.py | 1 | 1928 | # -*- coding: utf-8 -*-
from django.shortcuts import render, get_object_or_404
from .models import Servicios
from .forms import ServiciosForm
import json
from django.http import HttpResponse
def _queryset_filtrado(request):
params = {}
if 'tipos_servicios' in request.session:
params['tipos_servicios'] ... | mit | -5,750,363,850,856,495,000 | 36.096154 | 97 | 0.633817 | false | 3.312715 | false | false | false |
lunixbochs/actualvim | lib/asyncio/locks.py | 1 | 14849 | """Synchronization primitives."""
__all__ = ['Lock', 'Event', 'Condition', 'Semaphore', 'BoundedSemaphore']
import collections
from ActualVim.lib.asyncio_inc import compat
from . import events
from . import futures
from .coroutines import coroutine
class _ContextManager:
"""Context manager.
This enables t... | mit | -7,098,526,981,324,719,000 | 30.064854 | 79 | 0.576739 | false | 4.491531 | false | false | false |
podhmo/cssdiff | cssdiff/__init__.py | 1 | 4506 | # -*- coding:utf-8 -*-
import sys
import cssutils
from collections import defaultdict
VERBOSE = False
class DiffObject(object):
def __init__(self, src, dst):
self.src = src
self.dst = dst
self.merged = full_difference(src, dst)
def to_string(self):
buf = []
for style, ... | mit | 8,262,920,245,644,976,000 | 29.04 | 109 | 0.580781 | false | 3.619277 | false | false | false |
cristian99garcia/showntell-activity | slideshow.py | 1 | 25638 | # -*- mode:python; tab-width:4; indent-tabs-mode:t; -*-
# slideshow.py
#
# Classes to represent a deck of slides, and handle things like file I/O and
# formats
# B. Mayton <bmayton@cs.washington.edu>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publi... | gpl-2.0 | -5,962,084,091,396,877,000 | 37.728097 | 117 | 0.562056 | false | 3.984768 | false | false | false |
lornemcintosh/OptAnim | optanim/animation.py | 1 | 21918 | # -------------------------------------------------------------------------
# Copyright (c) 2010-2012 Lorne McIntosh
#
# This file is part of OptAnim.
#
# OptAnim 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... | gpl-3.0 | -2,979,587,800,556,766,000 | 33.627172 | 147 | 0.67424 | false | 3.077938 | false | false | false |
toogad/PooPyLab_Project | PooPyLab/ASMModel/asm_2d.py | 1 | 26614 | # This file is part of PooPyLab.
#
# PooPyLab is a simulation software for biological wastewater treatment processes using International Water Association
# Activated Sludge Models.
#
# Copyright (C) Kai Zhang
#
# PooPyLab is free software: you can redistribute it and/or modify it under the terms of the GNU Gener... | gpl-3.0 | -344,751,125,513,634,200 | 30.683333 | 119 | 0.512399 | false | 3.105847 | false | false | false |
MISP/MISP-TAXII--broken- | taxii_client.py | 1 | 3442 | #!flask/bin/python
__version__ = '0.2'
import os
import argparse
import datetime
from dateutil.tz import tzutc
import libtaxii as t
import libtaxii.messages as tm
import libtaxii.clients as tc
try:
import simplejson as json
except ImportError:
import json
PID_FILE = '/tmp/taxii_client.pid'
PROXY_ENABLED = Fal... | agpl-3.0 | 7,958,191,412,627,987,000 | 23.06993 | 76 | 0.600813 | false | 3.552116 | false | false | false |
turdusmerula/kipartman | kipartman/dialogs/dialog_edit_category.py | 1 | 2893 | # -*- coding: utf-8 -*-
###########################################################################
## Python code generated with wxFormBuilder (version Jul 12 2017)
## http://www.wxformbuilder.org/
##
## PLEASE DO "NOT" EDIT THIS FILE!
###########################################################################
impo... | gpl-3.0 | -646,511,858,100,546,600 | 32.639535 | 163 | 0.617007 | false | 3.07766 | false | false | false |
the-virtual-brain/tvb-hpc | phase_plane_interactive/hackathon_cuda.py | 1 | 4443 | # Copyright 2017 TVB-HPC 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
#
# Unless required by applicab... | apache-2.0 | -1,578,581,880,672,073,700 | 38.318584 | 209 | 0.622327 | false | 2.857235 | false | false | false |
ovnicraft/openerp-server | openerp/tools/amount_to_text_en.py | 1 | 5115 | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2009 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | agpl-3.0 | 2,974,910,350,022,178,300 | 37.171642 | 148 | 0.539198 | false | 3.530021 | false | false | false |
indautgrp/erpnext | erpnext/accounts/report/balance_sheet/balance_sheet.py | 1 | 4666 | # Copyright (c) 2015, Frappe Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt
from __future__ import unicode_literals
import frappe
from frappe import _
from frappe.utils import flt, cint
from erpnext.accounts.report.financial_statements import (get_period_list, get_col... | gpl-3.0 | 1,444,389,777,122,514,700 | 33.308824 | 106 | 0.692885 | false | 2.998715 | false | false | false |
gmrandazzo/PyLSS | pylss/lsscoltransfer.py | 1 | 5550 | '''
@package ssengine
lsscoltransfer was writen by Giuseppe Marco Randazzo <gmrandazzo@gmail.com>
Geneve Dec 2015
'''
#from scipy.optimize import fmin
from optimizer import simplex as fmin
from math import sqrt, pi, log10, log, exp, fabs, isnan, isinf, erf
from optseparation import drange
from time import sleep
def ... | lgpl-3.0 | 8,786,438,165,989,413,000 | 30.005587 | 190 | 0.546126 | false | 3.251318 | false | false | false |
LACMTA/loader | ott/loader/otp/graph/run.py | 1 | 2773 | """ Run
"""
import sys
import time
import logging
log = logging.getLogger(__file__)
from ott.utils import otp_utils
from ott.utils import web_utils
from ott.utils.cache_base import CacheBase
class Run(CacheBase):
""" run OTP graph
"""
graphs = None
def __init__(self):
super(Run, self).__init... | mpl-2.0 | 7,585,301,656,605,814,000 | 31.244186 | 136 | 0.567616 | false | 3.610677 | false | false | false |
Juan-Mateos/coll_int_ai_case | notebooks/sankey.py | 1 | 7090 | # -*- coding: utf-8 -*-
"""
Produces simple Sankey Diagrams with matplotlib.
@author: Anneya Golob & marcomanz & pierre-sassoulas
.-.
.--.( ).--.
<-. .-.-.(.-> )_ .--.
`-`( )-' `) )
(o o ) `)`-'
( ... | mit | 4,818,465,458,635,935,000 | 35.546392 | 128 | 0.517772 | false | 3.568193 | false | false | false |
wooga/airflow | airflow/example_dags/example_external_task_marker_dag.py | 1 | 3327 | #
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not... | apache-2.0 | -6,449,447,133,075,926,000 | 42.776316 | 97 | 0.704839 | false | 4.287371 | false | false | false |
gonicus/gosa | client/src/gosa/client/mqtt_service.py | 1 | 10323 | # This file is part of the GOsa project.
#
# http://gosa-project.org
#
# Copyright:
# (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.
"""
The *MQTTClientService* is responsible for connecting the *client* to the MQTT
bus, registers the ... | lgpl-2.1 | -6,830,260,586,721,705,000 | 33.182119 | 153 | 0.576577 | false | 4.130852 | false | false | false |
YacineKhamis/Polymerge | polymerge.py | 1 | 2413 | import sys
import os
import binascii
import zipfile
import argparse
def createZipFile(fileToArchive):
path = fileToArchive + '.zip'
with zipfile.ZipFile(path, mode='w') as myZip:
myZip.write(fileToArchive, arcname=fileToArchive.split('/')[-1])
def stats(fileToAnalyze):
return os.stat(fileToA... | gpl-3.0 | 6,495,256,162,737,528,000 | 29.935897 | 116 | 0.593038 | false | 3.776213 | false | false | false |
koakumaping/simple-blog | mysite.py | 1 | 3305 | #coding=utf-8
import web
import markdown
import model
from settings import *
from admin import check_login
########################################################################
class redirect:
""""""
#----------------------------------------------------------------------
def __init__(self):
""... | gpl-2.0 | 1,463,311,195,832,444,700 | 27.747826 | 138 | 0.378215 | false | 5.156006 | false | false | false |
simonkrogmann/planets | gui/scrollbar.py | 1 | 3472 | # -*- coding: cp1252 -*-
import Tkinter
class Scrollbar:
"""stellt eine Scrollbar für ein Canvas-Objekt bereit,
Parent muss dieses Canvas-Objekt als Attribut besitzen."""
def __init__(self, Parent, X):
self.Parent = Parent
self.X = X
self.Bar = self.Parent.Canvas.create_rectangle(0, 0,... | mit | -3,531,107,996,626,620,400 | 40.831325 | 99 | 0.613767 | false | 3.37415 | true | false | false |
globocom/database-as-a-service | dbaas/dashboard/views.py | 1 | 2317 | import logging
from django.template import RequestContext
from django.shortcuts import render_to_response
from django.contrib.auth.decorators import login_required
from django.core.paginator import Paginator, EmptyPage, InvalidPage
from physical.models import DatabaseInfra
from logical.models import Database
from util ... | bsd-3-clause | -7,126,134,115,814,491,000 | 34.646154 | 147 | 0.702201 | false | 3.677778 | false | false | false |
mpfeppat/mpfeppat | tools/simplegraph.py | 1 | 1860 | # -*- coding: utf-8 -*-
import random
import numpy
def createCGraph(n):
Edges = []
Vertices = []
counter = n
while counter > 0:
if Vertices == []:
v0 = vertex('0')
v1 = vertex('1')
e0 = edge(v0,v1)
Vertices.append(v0)
Vertices.append... | apache-2.0 | 7,364,874,894,004,989,000 | 25.571429 | 102 | 0.52043 | false | 3.803681 | false | false | false |
anselmobd/fo2 | src/manutencao/migrations/0005_maquina.py | 1 | 1069 | # -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2019-07-12 18:49
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('manutencao', '0004_fo2_man_unidade_tempo_loaddata'),
]
... | mit | 3,103,723,040,811,429,400 | 34.5 | 158 | 0.578404 | false | 3.659794 | false | false | false |
RedHatQE/cfme_tests | cfme/tests/containers/test_reports.py | 1 | 15145 | # -*- coding: utf-8 -*-
import re
from traceback import format_exc
import pytest
from wrapanapi.utils import eval_strings
from cfme.containers.provider import ContainersProvider
from cfme.utils.appliance.implementations.ui import navigate_to
from cfme.utils.wait import TimedOutError
pytestmark = [
pytest.mark.u... | gpl-2.0 | -4,475,754,717,884,814,300 | 38.440104 | 98 | 0.624497 | false | 3.766476 | true | false | false |
glehmann/uptodate | uptodate/plugins/copy.py | 1 | 1817 | #!/usr/bin/env python
#coding: iso-8859-15
#
# Copyright (C) 2005 Gaëtan Lehmann <gaetan.lehmann@jouy.inra.fr>
#
# this file is part of uptodate
#
# 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... | gpl-2.0 | 1,046,055,466,410,766,600 | 29.283333 | 84 | 0.72262 | false | 3.346225 | false | false | false |
leihaha/Django-By-Example_demo | bookmarks/images/forms.py | 1 | 1308 | from django import forms
from .models import Image
from urllib import request
from django.core.files.base import ContentFile
from django.utils.text import slugify
class ImageCreateForm(forms.ModelForm):
class Meta:
model = Image
fields = ('title', 'url', 'description')
widgets = {
... | gpl-2.0 | 4,444,864,217,305,913,000 | 31.948718 | 95 | 0.570872 | false | 4.168831 | false | false | false |
rbarrois/xelpaste | libpaste/conf.py | 1 | 1199 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
"""Default settings for libpaste."""
from django.conf import settings
from django.utils.translation import ugettext_lazy as _
import appconf
from . import enums
class LibPasteConf(appconf.AppConf):
class Meta:
prefix = 'libpaste'
BA... | mit | -8,430,553,452,395,966,000 | 23.469388 | 81 | 0.619683 | false | 3.163588 | false | false | false |
tarunbod/dotfiles | scripts/todo.py | 1 | 1774 | #!/usr/bin/env python3
import os.path, sys, json
from collections import OrderedDict
todo_list = OrderedDict()
file_path = os.path.expanduser('~/.todo_list.json')
if os.path.isfile(file_path):
with open(file_path, 'r') as todo_list_file:
todo_list.update(json.load(todo_list_file))
args = sys.argv[1:]
d... | mit | 8,956,292,231,730,313,000 | 22.918919 | 88 | 0.537853 | false | 3.015332 | false | false | false |
att-comdev/armada | armada/exceptions/tiller_exceptions.py | 1 | 5060 | # Copyright 2017 The Armada 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 or agreed to in w... | apache-2.0 | -5,653,126,201,895,981,000 | 25.492147 | 78 | 0.669763 | false | 4.248531 | false | false | false |
caogecym/muer | muer/settings_stage.py | 1 | 6764 | # Django settings for forum project.
import os.path
import forum
DEBUG = False
TEMPLATE_DEBUG = False
# for OpenID auth
ugettext = lambda s: s
LOGIN_URL = '/%s' % (ugettext('login/'))
ADMINS = (
('Yuming Cao', 'caogecym@gmail.com'),
)
SEND_BROKEN_LINK_EMAILS = True
MANAGERS = ADMINS
DATABASES = {
'default'... | gpl-2.0 | -5,950,150,926,862,549,000 | 29.062222 | 95 | 0.672235 | false | 3.530271 | true | false | false |
jcu-eresearch/TDH-rich-data-capture | jcudc24provisioning/controllers/method_schema_scripts.py | 1 | 7697 | """
Converts MethodSchema's (data configurations) into Deform schemas. There is also a helper function
(get_method_schema_preview) for turning the created schema into HTML for preview purposes on the methods page.
"""
from collections import namedtuple
from datetime import date
from beaker.cache import cache_r... | bsd-3-clause | -6,555,447,298,200,760,000 | 41.732955 | 169 | 0.621021 | false | 3.825547 | false | false | false |
cretaceous-creature/jsk_mbzirc_task3 | jsk_network_tools/scripts/silverhammer_lowspeed_receiver.py | 1 | 4109 | #!/usr/bin/env python
from jsk_network_tools.msg import FC2OCS, OCS2FC
from jsk_network_tools.silverhammer_util import *
from threading import Lock, Thread
from socket import *
from struct import Struct
import os
import rospy
import signal
import sys
import roslib
from roslib.message import get_message_class
from std_... | apache-2.0 | -3,182,837,485,987,124,000 | 41.802083 | 84 | 0.619615 | false | 3.762821 | false | false | false |
openqt/algorithms | leetcode/python/ac/lc872-leaf-similar-trees.py | 1 | 1464 | # coding=utf-8
import unittest
"""872. Leaf-Similar Trees
https://leetcode.com/problems/leaf-similar-trees/description/
Consider all the leaves of a binary tree. From left to right order, the
values of those leaves form a _leaf value sequence._

... | gpl-3.0 | -7,882,174,381,876,940,000 | 22.612903 | 78 | 0.603825 | false | 3.396752 | false | false | false |
uname/bleproxy | PC/BleProxyDesk/view/BleListItem.py | 1 | 1110 | #-*- coding: utf-8 -*-
from PyQt4 import QtGui
from ui.AppIcons import *
class BleListItem(QtGui.QListWidgetItem):
def __init__(self, name, address, rssi):
QtGui.QListWidgetItem.__init__(self)
self.name, self.address, self.rssi = name, address, rssi
self.setBleInfo(rssi)
self.c... | apache-2.0 | 3,593,046,291,192,624,600 | 29.861111 | 76 | 0.579279 | false | 3.353474 | false | false | false |
Tintri/tintri-python-sdk | examples/set_qos_tgc_service_groups.py | 1 | 5668 | #!/usr/bin/python
# -*- coding: utf-8 -*-
#
# The MIT License (MIT)
#
# Copyright (c) 2016 Tintri, Inc.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including withou... | bsd-3-clause | -6,672,245,908,238,499,000 | 32.341176 | 116 | 0.678899 | false | 3.509598 | false | false | false |
exobrain-wisekb/wisekb-management-platform | wisekb-uima-ducc/bin/properties.py | 2 | 8155 | #!/usr/bin/python
import os
import re
import platform
import string
# -----------------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional informat... | apache-2.0 | 5,952,035,096,709,450,000 | 29.657895 | 91 | 0.526548 | false | 3.947241 | false | false | false |
mxgnene01/itester | itester/common/termlogcolor.py | 1 | 5853 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Meng xiangguo <mxgnene01@gmail.com>
#
# H A P P Y H A C K I N G !
# _____ ______
# ____==== ]OO|_n_n__][. | |]
# [________]_|__|________)< |MENG|
# oo oo 'oo OOOO-| oo\_ ~o~~~o~'
# +--+--+--+--+--+--+... | gpl-3.0 | 925,905,783,110,960,900 | 25.686636 | 106 | 0.516491 | false | 3.312929 | false | false | false |
mckinseyacademy/xblock-diagnosticfeedback | diagnostic_feedback/helpers/helper.py | 1 | 1063 | from __future__ import absolute_import
from . import Category, Question, Range
class MainHelper(object):
@classmethod
def save_filtered_data(cls, quiz, data):
"""
filter out & save the posted data to match our required schema for each quiz step
"""
step = data['step']
... | agpl-3.0 | 775,066,402,183,640,600 | 29.371429 | 93 | 0.571966 | false | 3.951673 | false | false | false |
ZeitOnline/zeit.objectlog | src/zeit/objectlog/source.py | 1 | 1802 | from zeit.objectlog.i18n import MessageFactory as _
import zc.sourcefactory.contextual
import zeit.objectlog.interfaces
import zope.app.form.browser.interfaces
import zope.i18n
import zope.interface.common.idatetime
class LogEntrySource(
zc.sourcefactory.contextual.BasicContextualSourceFactory):
def getV... | bsd-3-clause | -7,002,345,452,534,313,000 | 36.541667 | 78 | 0.624861 | false | 4.260047 | false | false | false |
dungvtdev/upsbayescpm | bayespy/inference/vmp/nodes/wishart.py | 1 | 9440 | ################################################################################
# Copyright (C) 2011-2012,2014 Jaakko Luttinen
#
# This file is licensed under the MIT License.
################################################################################
import numpy as np
import scipy.special as special
from bay... | mit | 6,343,873,845,033,821,000 | 25.591549 | 91 | 0.504661 | false | 3.608563 | false | false | false |
LePtitLilou/vcsmp | Lib/utils.py | 1 | 16904 | # Adapted for numpy/ma/cdms2 by convertcdms.py
import numpy
import cdtime
class VCSUtilsError (Exception):
def __init__ (self, args=None):
"""Create an exception"""
self.args = args
def __str__(self):
"""Calculate the string representation"""
return str(self.args)
__repr__ =... | lgpl-3.0 | 8,316,699,669,609,183,000 | 31.383142 | 284 | 0.585424 | false | 2.879727 | false | false | false |
sonymoon/algorithm | src/main/python/leetcode-python/easy/206.Reverse Linked List.py | 1 | 1534 | class ListNode:
def __init__(self, x):
self.val = x
self.next = None
def __str__(self):
return self.x
class Solution:
def reverseList(self, head):
"""
:type head: ListNode
:rtype: ListNode
"""
if not head:
return head
pre... | apache-2.0 | -5,421,362,284,684,240,000 | 18.417722 | 46 | 0.52412 | false | 4.134771 | false | false | false |
bregmanstudio/BregmanToolkit | bregman/examples/6_dissonance.py | 1 | 2827 | # MUSIC014/102 - Music, Information, Neuroscience,
# Week 1 Lab
# Using the Plompt and Levelt dissonance function
#
# Professor Michael Casey, 1/7/2015
from pylab import *
from bregman.suite import *
import scipy.signal as signal
import pdb
def ideal_chromatic_dissonance(num_harmonics=7, f0=440):
"""
One o... | mit | 2,914,253,153,146,188,300 | 31.494253 | 96 | 0.615493 | false | 2.715658 | false | false | false |
cherbib/fofix | src/Guitar.py | 1 | 95964 | #####################################################################
# -*- coding: iso-8859-1 -*- #
# #
# Frets on Fire #
# Copyright (C) 2006 Sami Kyostila ... | gpl-2.0 | -2,108,389,822,770,771,500 | 37.978067 | 223 | 0.549018 | false | 3.462779 | false | false | false |
gustavofoa/pympm | apps/mpm/models/Musica.py | 1 | 2085 | from django.db import models
class Musica(models.Model):
slug = models.SlugField(primary_key=True, max_length=100)
nome = models.CharField(max_length=255)
letra = models.TextField()
cifra = models.TextField()
info = models.TextField()
link_video = models.URLField(blank=True, null=True)
categorias = models.ManyT... | apache-2.0 | -3,247,626,394,395,597,000 | 41.55102 | 168 | 0.668106 | false | 2.970085 | false | false | false |
frerepoulet/ZeroNet | src/Config.py | 1 | 20105 | import argparse
import sys
import os
import locale
import re
import ConfigParser
class Config(object):
def __init__(self, argv):
self.version = "0.5.4"
self.rev = 2054
self.argv = argv
self.action = None
self.config_file = "zeronet.conf"
self.createParser()
... | gpl-2.0 | 7,540,716,014,782,910,000 | 49.515075 | 177 | 0.608953 | false | 4.141092 | true | false | false |
waqasbhatti/wcs2kml | python/fitsimage.py | 1 | 16860 | #!/usr/bin/env python
# Library for treating FITS files as Python Imaging Library objects
# Copyright (c) 2005, 2006, 2007, Jeremy Brewer
#
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#... | bsd-3-clause | -7,967,885,862,647,529,000 | 37.581236 | 80 | 0.629419 | false | 3.837051 | false | false | false |
jj0hns0n/geonode | geonode/layers/models.py | 1 | 18480 | # -*- coding: utf-8 -*-
#########################################################################
#
# Copyright (C) 2016 OSGeo
#
# 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 ... | gpl-3.0 | -5,706,157,803,603,171,000 | 30.752577 | 110 | 0.613528 | false | 3.978471 | false | false | false |
chryswoods/SireTests | unittests/SireMove/rigidbodymd.py | 1 | 1966 |
from Sire.Mol import *
from Sire.IO import *
from Sire.Vol import *
from Sire.FF import *
from Sire.MM import *
from Sire.CAS import *
from Sire.Maths import *
from Sire.Qt import *
from Sire.Units import *
from Sire.System import *
from Sire.Move import *
from Sire.Stream import *
import sys
mols = PDB().read("test... | gpl-2.0 | 7,023,810,924,964,318,000 | 25.931507 | 86 | 0.581384 | false | 3.17609 | false | false | false |
houssemFat/bloodOn | bloodon/accounts/social/providers/google/views.py | 1 | 1089 | import requests
from bloodon.accounts.social.providers.oauth2.views import (OAuth2Adapter,
OAuth2LoginView,
OAuth2CallbackView)
from .provider import GoogleProvider
class GoogleOAuth2Adapter(OAuth... | mit | -3,685,332,758,195,466,000 | 39.333333 | 79 | 0.613407 | false | 4.172414 | false | false | false |
dtimes6/JustForFun | hihi.sleekxmpp.aiml.py | 1 | 2851 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os.path
import sys
import logging
import getpass
import aiml
from optparse import OptionParser
import sleekxmpp
if sys.version_info < (3, 0):
from sleekxmpp.util.misc_ops import setdefaultencoding
setdefaultencoding('utf8')
else:
raw_input = input
cl... | mit | -3,853,410,436,045,851,000 | 31.724138 | 85 | 0.596066 | false | 3.631378 | false | false | false |
SeanEstey/Bravo | app/tests/main/test_leaderboard.py | 1 | 1190 | '''app.tests.main.test_leaderboard'''
import logging, unittest, json
from flask import g
from app.tests.__init__ import *
from app import get_keys
from app.main import leaderboard
from logging import getLogger
log = getLogger(__name__)
class LeaderboardTests(unittest.TestCase):
def setUp(self):
init(self)
... | gpl-2.0 | 6,378,706,726,770,708,000 | 27.333333 | 61 | 0.621849 | false | 3.459302 | true | false | false |
gary-pickens/HouseMonitor | housemonitor/outputs/xmlrpc/outputthread.py | 1 | 3101 | '''
Created on 2012-10-20
@author: Gary
'''
from housemonitor.lib.base import Base
from housemonitor.lib.constants import Constants
from pprint import pprint
from SimpleXMLRPCServer import SimpleXMLRPCServer
import pprint
import threading
import time
import os
from housemonitor.inputs.dataenvelope import DataEnvelope... | mit | -2,624,293,600,049,674,000 | 34.238636 | 86 | 0.5911 | false | 4.253772 | false | false | false |
florensacc/snn4hrl | regressors/latent_regressor.py | 1 | 11889 | import numpy as np
from rllab.core.serializable import Serializable
from rllab.core.parameterized import Parameterized
from rllab.misc import logger
# the regressor will be choosen to be from the same distribution as the latents
from rllab.regressors.gaussian_mlp_regressor import GaussianMLPRegressor
from rllab.regre... | mit | 5,297,087,816,919,702,000 | 52.075893 | 120 | 0.568761 | false | 3.961679 | false | false | false |
tomosoft-jp/SainSmartLcd | Graphic.py | 1 | 5968 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from ST7735 import ST7735
class Graphic:
def __init__(self, pst7735):
self._st7735 = pst7735
def drawline(self, x0p, y0p, x1p, y1p, color):
if (x0p >= self._st7735.width) or (y0p >= self._st7735.height):
print " drawline x0, y0 Range ... | mit | 2,563,048,761,483,400,700 | 30.083333 | 91 | 0.453586 | false | 2.84597 | false | false | false |
ArnaudBelcour/Workflow_GeneList_Analysis | pathway_extraction/uniprot_retrieval_data.py | 1 | 4827 | #!/usr/bin/env python3
import math
import pandas as pa
import six
from SPARQLWrapper import SPARQLWrapper, JSON
from tqdm import tqdm
from . import *
def extract_information_from_uniprot(results_dataframe):
'''
Requests the SPARQL endpoint of Uniprot to retrieve (from Ensembl transcrit ID) GO terms, int... | agpl-3.0 | 201,268,150,668,236,600 | 37.309524 | 141 | 0.542987 | false | 3.794811 | false | false | false |
killer923/alarm | Alarm.py | 1 | 5182 | import os
import time
from Tkinter import Tk
from tkFileDialog import askopenfilename
def change_settings(first_time):
if first_time==0:
customizations=read_settings()
tone=customizations[0]
snooze=customizations[1]
settings=open("settings.txt","w")
settings.write("Please change only if you know what you are ... | apache-2.0 | 738,152,008,914,051,300 | 24.653465 | 120 | 0.648784 | false | 2.594892 | false | false | false |
pliz/gunfolds | tools/pathtreetools.py | 1 | 14198 | import sys
sys.path.append('./tools/')
from pathtree import PathTree
from ortools.constraint_solver import pywrapcp
from matplotlib.cbook import flatten
from functools import wraps
import numpy as np
import bisect
from sortedcontainers import SortedDict
import ipdb
class SolutionNotFoundInTime(Exception):
pass
... | gpl-3.0 | 8,853,819,413,874,525,000 | 25.538318 | 147 | 0.557191 | false | 3.453661 | false | false | false |
fabawi/QuestionAnswering | qa/answering_engines/babi_ann/challenges.py | 1 | 5299 | # Challenges:
# Returns the name of a challenge given a number. The number of epochs is predefined
class Challenges:
def __init__(self):
self.challenge_en10k_filename = {
# all challenges
1: '{}tasks_1-20_v1-2/en-10k/qa1_single-supporting-fact_{}.txt',
2: '{}tasks_1-20_... | mit | 7,969,111,048,269,106,000 | 38.544776 | 125 | 0.483487 | false | 2.901972 | false | false | false |
ArneBab/PyHurd | examples/showtrans.py | 1 | 2983 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
'''
showtrans.py - show files` passive translator.
Copyright (C) 2008 Anatoly A. Kazantsev
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 versio... | gpl-2.0 | -56,086,262,759,934,080 | 28.245098 | 77 | 0.65471 | false | 3.775949 | false | false | false |
alaeddine10/ggrc-core | src/ggrc/builder/json.py | 1 | 12563 | #i Copyright (C) 2013 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: david@reciprocitylabs.com
# Maintained By: david@reciprocitylabs.com
import ggrc.builder
import ggrc.services
import iso8601
from datetime import ... | apache-2.0 | 2,375,897,023,168,792,600 | 37.774691 | 79 | 0.675316 | false | 3.843071 | false | false | false |
hpcugent/vsc-mympirun | bin/mytaskprolog.py | 1 | 2185 | #!/usr/bin/env python
#
# Copyright 2009-2021 Ghent University
#
# This file is part of vsc-mympirun,
# originally created by the HPC team of Ghent University (http://ugent.be/hpc/en),
# with support of Ghent University (http://ugent.be/hpc),
# the Flemish Supercomputer Centre (VSC) (https://www.vscentrum.be),
# the Fl... | gpl-2.0 | -7,128,351,076,482,336,000 | 33.68254 | 111 | 0.701144 | false | 3.171263 | false | false | false |
NPWR/Year-2042 | data.py | 1 | 17122 | from genericFunctions import *
import pygame as pg
from pygame.locals import *
from pygame import gfxdraw
from math import *
from random import randrange
from rigidBody import *
from levels import *
import sys
PI = pi
class Spaceship(rigidBody):
def __init__(self,pos,d = [0.,0.]):
rigidBody.__init__(self,p... | gpl-2.0 | -6,190,535,035,971,781,000 | 29.250883 | 137 | 0.493634 | false | 3.30796 | false | false | false |
fugufisch/wholecell | state/metabolite.py | 1 | 4402 | import math
from data.knowledgebase import Knowledgebase
from state import State
__author__ = 'max'
__author__ = 'Sebastian'
class SingleMetabolite(State, object):
""""""
def __init__(self, metabolite_by_row):
"""Constructor for SingleMetabolite"""
super(SingleMetabolite, self).__init__(metab... | mit | 6,591,553,823,020,934,000 | 35.090164 | 136 | 0.664471 | false | 3.641026 | false | false | false |
smart-techs/you-get | src/you_get/extractors/iqiyi.py | 1 | 8162 | #!/usr/bin/env python
from ..common import *
from ..extractor import VideoExtractor
from uuid import uuid4
from random import random,randint
import json
from math import floor
from zlib import decompress
import hashlib
'''
Changelog:
-> http://www.iqiyi.com/common/flashplayer/20150916/MainPlayer_5_2_28_c3_3_7_4.swf
... | mit | 7,460,090,059,082,132,000 | 36.804651 | 400 | 0.55438 | false | 3.222839 | false | false | false |
juju/juju-gui-charm | hooks/shelltoolbox.py | 1 | 20055 | # Copyright 2012 Canonical Ltd.
# This file is taken from the python-shelltoolbox package.
#
# IMPORTANT: Do not modify this file to add or change functionality. If you
# really feel the need to do so, first convert our code to the shelltoolbox
# library, and modify it instead (or modify the helpers or utils module h... | agpl-3.0 | -4,344,521,105,030,531,600 | 28.932836 | 78 | 0.588581 | false | 3.869381 | false | false | false |
ebozag/CLOUDCAL | simulator-ondemand-vms.py | 1 | 4527 | """
"""
import random
import simpy
from math import trunc
import numpy
from configuration import *
ARRIVAL_RATE = 1/ARRIVAL_RATE
ARRIVAL_RATE *= 8
MAX_RATE = max(ARRIVAL_RATE)
SERVICE_TIME_SUM = 0.0
TIME_IN_THE_SYSTEM_SUM = 0.0
SERVICE_TIME_COUNT = 0
latency = []
latency_peak = []
REQUIRED_VMS = []
def source(e... | bsd-3-clause | -5,801,104,839,550,042,000 | 31.811594 | 101 | 0.610559 | false | 3.261527 | false | false | false |
gghandsfield/musclePLSR | ju_scripts/src/matlab_strain_2_cm.py | 1 | 2888 | """
Script to convert Matlab-generate strain files to cmiss files
To be used by data in strain_pred_20170712
In each row, each group of 15 data entries correspond to the following for a node
Principal_1
Principal_2
Principal_3
VonMises
Hydrostatic
Octahedral
PrincipalVector1 x
Princip... | apache-2.0 | -7,811,895,322,634,500,000 | 29.4 | 112 | 0.563019 | false | 3.212458 | false | false | false |
hodger/cyclus | tests/tools.py | 2 | 4942 | from __future__ import print_function
import os
import re
import sys
import imp
import shutil
import unittest
import subprocess
import tempfile
from contextlib import contextmanager
from functools import wraps
from nose.tools import assert_true, assert_equal
from nose.plugins.attrib import attr
from nose.plugins.ski... | bsd-3-clause | -36,318,217,697,277,230 | 26.303867 | 81 | 0.619385 | false | 3.53 | true | false | false |
spookylukey/django-autocomplete-light | autocomplete_light/autocomplete/generic.py | 1 | 3905 | from django.contrib.contenttypes.models import ContentType
from django.db.models import Q
from autocomplete_light.generic import GenericModelChoiceField
from .model import AutocompleteModel
__all__ = ['AutocompleteGeneric']
class AutocompleteGeneric(AutocompleteModel):
"""
Autocomplete which considers choi... | mit | 6,551,789,736,588,345,000 | 29.992063 | 79 | 0.591549 | false | 4.826947 | false | false | false |
noironetworks/group-based-policy | gbpservice/_i18n.py | 1 | 1052 | # 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 | 7,634,804,986,224,047,000 | 31.875 | 78 | 0.739544 | false | 3.784173 | false | false | false |
fregaham/DISP | sqlobject/tests/test_indexes.py | 1 | 1088 | from sqlobject import *
from sqlobject.tests.dbtest import *
########################################
## Indexes
########################################
class SOIndex1(SQLObject):
name = StringCol(length=100)
number = IntCol()
nameIndex = DatabaseIndex('name', unique=True)
nameIndex2 = DatabaseIndex... | gpl-2.0 | 103,308,581,540,977,470 | 24.904762 | 95 | 0.581801 | false | 3.942029 | false | false | false |
fuziontech/svb | svb/test/test_http_client.py | 1 | 13560 | import sys
import unittest2
from mock import MagicMock, Mock, patch
import svb
from svb.test.helper import SvbUnitTestCase
VALID_API_METHODS = ('get', 'post', 'delete')
class HttpClientTests(SvbUnitTestCase):
def setUp(self):
super(HttpClientTests, self).setUp()
self.original_filters = svb.h... | mit | -1,805,596,033,668,120,800 | 33.416244 | 77 | 0.591667 | false | 3.911162 | true | false | false |
beeftornado/sentry | tests/sentry/integrations/slack/test_integration.py | 1 | 6673 | from __future__ import absolute_import
import responses
import six
from six.moves.urllib.parse import parse_qs, urlencode, urlparse
from sentry.integrations.slack import SlackIntegrationProvider, SlackIntegration
from sentry.models import (
AuditLogEntry,
AuditLogEntryEvent,
Identity,
IdentityProvide... | bsd-3-clause | -5,141,144,303,626,453,000 | 36.27933 | 98 | 0.624157 | false | 3.927604 | true | false | false |
radez/python-heatclient | setup.py | 1 | 1880 | # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the Li... | apache-2.0 | 5,432,592,217,602,906,000 | 35.862745 | 74 | 0.697872 | false | 4.095861 | false | false | false |
mchrzanowski/ProjectEuler | src/python/Problem105.py | 1 | 3645 | '''
Created on Aug 18, 2012
@author: mchrzanowski
'''
import itertools
import os.path
import time
def do_two_subsets_equal_each_other(numbers, value_to_equal):
'''
exact subset problem.
return true if we have a subset that equals value_to_equal.
http://www.cs.dartmouth.edu/~ac/Teach/CS10... | mit | 7,038,937,051,428,532,000 | 26.201493 | 101 | 0.601646 | false | 3.881789 | false | false | false |
erix5son/Tennis-Modelling | ranking_systems/tests/test_glicko2_ranking.py | 1 | 1307 | # -*- coding: utf-8 -*-
__author__ = 'Heungsub Lee'
from glicko2 import Glicko2, WIN, DRAW, LOSS
class almost(object):
def __init__(self, val, precision=3):
self.val = val
self.precision = precision
def almost_equals(self, val1, val2):
if round(val1, self.precision) == round(val2, ... | mit | -5,102,957,927,354,244,000 | 30.119048 | 77 | 0.58684 | false | 3.068075 | false | false | false |
NUKnightLab/TimelineJS3 | website/app.py | 1 | 2893 | '''
Main entrypoint file. To run:
$ python serve.py
'''
from flask import Flask
from flask import request
from flask import render_template
from flask import json
from flask import send_from_directory
import importlib
import traceback
import sys
import os
# Add current directory to sys.path
site_dir = os.path.dir... | mpl-2.0 | 8,731,970,829,104,129,000 | 27.643564 | 91 | 0.645351 | false | 3.411557 | false | false | false |
siemens/django-dingos-authoring | dingos_authoring/read_settings.py | 1 | 2558 | # Copyright (c) Siemens AG, 2014
#
# This file is part of MANTIS. MANTIS 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 progr... | gpl-2.0 | -708,127,362,642,221,300 | 53.446809 | 173 | 0.731431 | false | 3.707246 | false | false | false |
rob-earwaker/rail | rail.py | 1 | 7049 | import functools
import inspect
def identity(value):
return value
def not_(value):
return not value
def raise_(exception=None):
if exception is None:
raise
else:
raise exception
def try_(func, handle):
def try_func(arg):
try:
return func(arg)
excep... | mit | -5,303,923,054,830,463,000 | 24.085409 | 79 | 0.555256 | false | 3.937989 | false | false | false |
mamchecker/mamchecker | mamchecker/r/i/__init__.py | 1 | 1562 | # -*- coding: utf-8 -*-
import random
from sympy.abc import x
from sympy import log, latex
from mamchecker.hlp import Struct, norm_int as norm
jsFuncs = {'exp': 'return Math.pow(({0}),x-({1}))+({2})',
'log': 'if (x-({0})>0) return Math.log(x-({0}))+({1})',
'pow': 'return ({0})*Math.pow(x-({1}),(... | gpl-3.0 | 5,483,953,586,565,812,000 | 27.4 | 66 | 0.425096 | false | 2.56486 | false | false | false |
zambreno/RCL | sccCyGraph/graphs/check.py | 1 | 1207 | #!/usr/bin/env python
# encoding: utf-8
"""
untitled.py
Created by iOsama on 2013-09-24.
Copyright (c) 2013 __MyCompanyName__. All rights reserved.
"""
import sys
import os
inputfile = "reversed.mtx"
outputfile = inputfile + ".out"
x_value = 99999
def main():
# open files
fin = open(inputfile, '... | apache-2.0 | -5,442,214,776,072,603,000 | 17.467742 | 72 | 0.544325 | false | 2.557203 | false | false | false |
shawncaojob/LC | PY/361_bomb_enemy.py | 1 | 3162 | # 361. Bomb Enemy Add to List
# DescriptionHintsSubmissionsSolutions
# Total Accepted: 14111
# Total Submissions: 36526
# Difficulty: Medium
# Contributor: LeetCode
# Given a 2D grid, each cell is either a wall 'W', an enemy 'E' or empty '0' (the number zero), return the maximum enemies you can kill using one bomb.
# T... | gpl-3.0 | -5,668,677,027,563,694,000 | 30.306931 | 151 | 0.463631 | false | 3.392704 | false | false | false |
knnniggett/weewx | bin/weewx/__init__.py | 1 | 4230 | #
# Copyright (c) 2009-2015 Tom Keffer <tkeffer@gmail.com>
#
# See the file LICENSE.txt for your full rights.
#
"""Package weewx, containing modules specific to the weewx runtime engine."""
import time
__version__="3.2.0a1"
# Holds the program launch time in unix epoch seconds:
# Useful for calculating 'uptime.... | gpl-3.0 | -6,725,898,098,226,328,000 | 37.108108 | 98 | 0.613475 | false | 4.617904 | false | false | false |
tln/tatl | tatlrt.py | 1 | 14490 | # TATL runtime lib
import json, re
from warnings import warn
try: unicode
except:
# Python 3
unicode = basestring = str
apply = lambda f, args=(), kw={}: f(*args, **kw)
# Define some of the TATL built-ins. Compiler uses __all__ to determine whether name refers to a
# built-in.
null = None
false = False
tr... | bsd-2-clause | -4,284,716,867,018,305,000 | 26.705545 | 114 | 0.536508 | false | 3.561947 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.