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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
dseeliger/pmx | scripts/generate_hybrid_topology.py | 1 | 39554 | #!/usr/bin/env python
# pmx Copyright Notice
# ============================
#
# The pmx source code is copyrighted, but you can freely use and
# copy it as long as you don't change or remove any of the copyright
# notices.
#
# ----------------------------------------------------------------------
# pmx is Copyright (C... | lgpl-3.0 | 7,993,040,609,829,306,000 | 39.402451 | 151 | 0.466451 | false | 3.262724 | false | false | false |
reinhrst/hooks | checks/base.py | 1 | 6535 | import difflib
import subprocess
from . import status
from . import filetype
import tempfile
import shutil
import os
class ChangedFile(object):
def __init__(self, filename, filetype, status):
"""filename is the name of the file relative to the base of the repo
newlines is an array of all the lines... | mit | -8,145,962,077,223,575,000 | 31.192118 | 79 | 0.598164 | false | 4.288058 | false | false | false |
brett-patterson/pyface | pyface/ui/qt4/tasks/main_window_layout.py | 1 | 12326 | # Standard library imports.
from itertools import combinations
import logging
# System library imports.
from pyface.qt import QtCore, QtGui
# Enthought library imports.
from traits.api import Any, HasTraits
# Local imports.
from dock_pane import AREA_MAP
from pyface.tasks.task_layout import LayoutContainer, PaneItem... | bsd-3-clause | -3,228,792,522,839,608,000 | 39.679868 | 80 | 0.535778 | false | 4.536621 | false | false | false |
datamade/yournextmp-popit | candidates/management/commands/candidates_create_csv.py | 1 | 4122 | from collections import defaultdict
from os import chmod, rename
from os.path import dirname
from tempfile import NamedTemporaryFile
from django.core.management.base import BaseCommand, CommandError
from django.db.models import F
from candidates.csv_helpers import list_to_csv
from candidates.models import PersonExtra... | agpl-3.0 | -5,428,597,812,272,936,000 | 40.22 | 85 | 0.536633 | false | 4.849412 | false | false | false |
endreman0/Excalibot | excalibot/core/format.py | 1 | 1047 | __all__ = ['list', 'time']
time_components = ('weeks', 'days', 'hours', 'minutes', 'seconds')
def list(args, single_suffix='', multi_suffix=''):
"""
Concatenate several strings with some formatting, and optional suffixes.
single_suffix and multi_suffix are for easy pluralization - the correct singular/plural form ... | gpl-3.0 | -4,544,504,228,394,507,300 | 44.521739 | 160 | 0.664756 | false | 3.421569 | false | false | false |
BeenzSyed/tempest | tempest/services/compute/json/hypervisor_client.py | 1 | 2746 | # Copyright 2013 IBM Corporation.
# 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... | apache-2.0 | 6,839,274,534,676,521,000 | 38.797101 | 79 | 0.638747 | false | 4.185976 | false | false | false |
wakiyamap/electrum-mona | electrum_mona/gui/qt/console.py | 1 | 11481 |
# source: http://stackoverflow.com/questions/2758159/how-to-embed-a-python-interpreter-in-a-pyqt-widget
import sys
import os
import re
import traceback
from PyQt5 import QtCore
from PyQt5 import QtGui
from PyQt5 import QtWidgets
from electrum_mona import util
from electrum_mona.i18n import _
from .util import MONO... | mit | 2,698,603,317,379,837,000 | 31.991379 | 106 | 0.56955 | false | 4.048307 | false | false | false |
Onager/l2tdevtools | l2tdevtools/build_helpers/interface.py | 1 | 1751 | # -*- coding: utf-8 -*-
"""Helper for building projects from source."""
from __future__ import unicode_literals
import os
class BuildHelper(object):
"""Helper to build projects from source."""
LOG_FILENAME = 'build.log'
def __init__(
self, project_definition, l2tdevtools_path, dependency_definitions):... | apache-2.0 | -5,528,947,120,794,853,000 | 28.677966 | 79 | 0.691034 | false | 4.444162 | false | false | false |
albfan/gnome-builder | src/plugins/meson-templates/meson_templates.py | 1 | 10873 | #!/usr/bin/env python3
# __init__.py
#
# Copyright © 2016 Patrick Griffis <tingping@tingping.se>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your ... | gpl-3.0 | 184,219,280,463,523,500 | 34.881188 | 100 | 0.587564 | false | 3.670493 | false | false | false |
ecdavis/pants | pants/test/_pants_util.py | 1 | 1260 | ###############################################################################
#
# Copyright 2012 Pants Developers (see AUTHORS.txt)
#
# 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
#
# h... | apache-2.0 | 134,079,927,432,311,970 | 33.054054 | 79 | 0.614286 | false | 4.581818 | false | false | false |
FrenchSoup/Clever | tools/assembler.py | 1 | 3734 | def process_line(line) -> int:
tokens = line.split(";")[0].strip(",").strip("\n").split(" ")
if tokens[0] == "CLS":
return 0x00E0
if tokens[0] == "RET":
return 0x00EE
if tokens[0] == "JP":
if tokens[1] == "V0":
return 0xB000 + int(tokens[1], base=16)
else:
... | gpl-3.0 | 3,265,773,731,844,777,000 | 31.469565 | 109 | 0.514194 | false | 2.872308 | false | false | false |
rimpybharot/CMPE273 | assignment2/replicator_pb2.py | 1 | 14079 | # Generated by the protocol buffer compiler. DO NOT EDIT!
# source: replicator.proto
import sys
_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1'))
from google.protobuf import descriptor as _descriptor
from google.protobuf import message as _message
from google.protobuf import reflection as _re... | mit | 6,193,023,107,447,847,000 | 36.544 | 563 | 0.696001 | false | 3.819588 | false | false | false |
vanatteveldt/xtas | xtas/tasks/_alpino.py | 1 | 5076 | """
Wrapper around the RUG Alpino Dependency parser
The module expects ALPINO_HOME to point at the alpino installation dir
The module needs the dependencies end_hook, which seems to be missing in the
'sicstus' builds. The download link below works as of 2014-05-07:
http://www.let.rug.nl/vannoord/alp/Alpino/binary/ve... | apache-2.0 | 5,014,977,021,017,539,000 | 29.214286 | 99 | 0.52305 | false | 3.534819 | false | false | false |
hubertokf/lupsEdgeServer | projects/old_files/moduleOfRules/ActionRules.py | 1 | 6256 | from business_rules.actions import BaseActions, rule_action
from business_rules.fields import FIELD_NUMERIC,FIELD_SELECT, FIELD_TEXT
from business_rules import run_all
from business_rules.actions import BaseActions, rule_action
from business_rules.fields import FIELD_NUMERIC, FIELD_TEXT
from moduleOfRules.ConditionsRul... | mit | 6,451,927,613,289,007,000 | 45.87218 | 173 | 0.602984 | false | 3.467186 | false | false | false |
sissaschool/xmlschema | xmlschema/cli.py | 1 | 10975 | # Copyright (c), 2016-2020, SISSA (International School for Advanced Studies).
# All rights reserved.
# This file is distributed under the terms of the MIT License.
# See the file 'LICENSE' in the root directory of the present
# distribution, or http://opensource.org/licenses/MIT.
#
# @author Davide Brunato <brunato@si... | mit | 7,734,894,747,803,943,000 | 41.211538 | 93 | 0.566834 | false | 4.208206 | false | false | false |
gajim/gajim | gajim/gui/__init__.py | 1 | 1513 |
import sys
from importlib.abc import MetaPathFinder
from importlib.util import spec_from_file_location
from pathlib import Path
class GUIFinder(MetaPathFinder):
def __init__(self, name, fallback=None):
self._path = Path(__file__).parent.parent / name
self._fallback_path = None
if fallba... | gpl-3.0 | -1,926,771,457,113,716,000 | 27.018519 | 73 | 0.610046 | false | 4.002646 | false | false | false |
nesterione/problem-solving-and-algorithms | algorithms/Python/sort/heap_sort.py | 1 | 2163 | class HeapSort(object):
"""docstring for HeapSort"""
def __init__(self, A):
self.A = A;
self.heap_size = len(A);
def parent(self,i):
"""Вернуть родителя"""
return (i-1)//2;
def left(self,i):
return 2*i + 1;
def right(self,i):
return 2*i +1 + 1;
def max_heapify(self, i):
"""Размещает i-й элемент ... | apache-2.0 | 968,174,567,987,052,300 | 21.848837 | 83 | 0.624236 | false | 2.022657 | false | false | false |
madformuse/server | server/games/ladder_game.py | 1 | 5101 | import logging
import asyncio
import server.db as db
from server.abc.base_game import InitMode
from server.players import Player
logger = logging.getLogger(__name__)
from .game import Game, ValidityState
import operator
import config
class LadderGame(Game):
"""Class for 1v1 ladder game"""
init_mode = Init... | gpl-3.0 | -1,412,067,098,660,759,600 | 40.471545 | 105 | 0.482847 | false | 4.562612 | false | false | false |
kageurufu/mamedb | mame/views/search.py | 1 | 7043 | from wtforms.fields.core import RadioField
__author__ = 'frank'
from .. import app, db, models, redirect, render_template, request, abort, url_for
from flask.ext.wtf import Form
from wtforms.fields import TextField, SelectMultipleField, SelectMultipleField, BooleanField, SubmitField, HiddenField, SelectField
from wtfo... | gpl-2.0 | -8,094,980,979,018,414,000 | 52.363636 | 588 | 0.654693 | false | 3.498758 | false | false | false |
mbohlool/client-python | kubernetes/client/models/v1_secret_list.py | 1 | 6547 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
OpenAPI spec version: v1.8.2
Generated by: https://github.com/swagger-api/swagger-codegen.git
"""
from pprint import pformat
from six import iteritems
import re
... | apache-2.0 | 5,326,287,968,624,190,000 | 30.028436 | 281 | 0.592332 | false | 4.226598 | false | false | false |
ragerin/lecs | examples/cattle.py | 1 | 1425 | #!/usr/bin/env python3
""" A usage example for lecs. """
from lecs import ECS, Entity, Component, System
__author__ = 'Mads H. Jakobsen (ragerin)'
__email__ = 'ragerin@gmail.com'
__version__ = '2.0.0'
__status__ = 'beta'
__license__ = 'MIT'
# Create a simple component
class MooComponent(Component):
"""Data ... | mit | -4,153,217,245,019,835,400 | 24.446429 | 84 | 0.656842 | false | 3.321678 | false | false | false |
studywolf/blog | tracking_control/tracking_control1.py | 1 | 3464 | """ An implementation of the plant and controller from example 1 of
(Slotine & Sastry, 1983)
"""
import matplotlib.pyplot as plt
import numpy as np
import seaborn
class plant:
def __init__(self, dt=.001, theta1=[0.0, 0.0], theta2=[0.0, 0.0]):
"""
dt float: simulation time step
theta1 ... | gpl-3.0 | -7,065,323,641,212,170,000 | 28.606838 | 79 | 0.576501 | false | 2.86755 | false | false | false |
apllicationCOM/youtube-dl-api-server | youtube_dl_server/app.py | 1 | 4507 | from __future__ import unicode_literals
import functools
import logging
import traceback
import sys
import pafy
from flask import Flask, jsonify, request
import youtube_dl
from youtube_dl.version import __version__ as youtube_dl_version
import youtube_dl
if not hasattr(sys.stderr, 'isatty'):
# In GAE it's not ... | unlicense | 1,764,763,094,782,006,000 | 23.763736 | 78 | 0.611937 | false | 3.560032 | false | false | false |
CompMaterSci/python-geometry | python_geometry/utilities.py | 1 | 16336 | # -*- coding: utf-8 -*-
from __future__ import division
from numpy import (
allclose, asanyarray, cross, dot, errstate, isclose, mean, nan_to_num,
nanmean, newaxis, stack, zeros, zeros_like)
from numpy.linalg import det, norm
from .config import config
from .bound_vector import BoundVector
from .line_segment ... | bsd-3-clause | -6,983,939,885,354,629,000 | 39.137592 | 79 | 0.501775 | false | 4.430702 | true | false | false |
MDAnalysis/mdanalysis | testsuite/MDAnalysisTests/coordinates/test_gro.py | 1 | 17984 | # -*- Mode: python; tab-width: 4; indent-tabs-mode:nil; coding:utf-8 -*-
# vim: tabstop=4 expandtab shiftwidth=4 softtabstop=4 fileencoding=utf-8
#
# MDAnalysis --- https://www.mdanalysis.org
# Copyright (c) 2006-2017 The MDAnalysis Development Team and contributors
# (see the file AUTHORS for the full list of names)
#... | gpl-2.0 | -3,004,316,876,882,543,600 | 35.552846 | 87 | 0.593305 | false | 3.602564 | true | false | false |
Huxellberger/SpinnerOfSyntax | Wheel.py | 1 | 8691 | # Program to spin a wheel and choose a language
# Created By Jake Huxell For Advent Of Code 2015
"""
Some notes about the program.
TODO:
1. Upkeep and bug fix as I go along
"""
# Get pygame libraries
import pygame, sys, random
from pygame.locals import *
# Generate random seed for the program - Use current time
ra... | gpl-2.0 | 3,016,505,494,972,289,500 | 35.062241 | 83 | 0.63514 | false | 3.31591 | false | false | false |
AlejandroMolinaReyes/PracticaJunio2017_201020787 | practica1EDD/usuario.py | 1 | 2619 | from estructuras import Cola
from estructuras import Pila
#from estructuras import Matriz
class Usuario:
def __init__(self,nombre,contraseña):
self.__nombre = nombre
self.__contraseña = contraseña
self.__cola = Cola()
self.__pila = Pila()
#self.__matriz = Matriz()
#self.__matrizTranspuesta =
self.__va... | gpl-3.0 | -6,280,513,137,287,591,000 | 25.673469 | 57 | 0.576129 | false | 2.878855 | false | false | false |
sushant-hiray/teamflowy | notification/utils.py | 1 | 3973 | #
import datetime
from django.http import HttpResponse,HttpResponseRedirect
from django.shortcuts import render, get_object_or_404
from notification.models import *
from django.core.urlresolvers import reverse
# Task Created by the manager => send a notification to the task_manager 1
# SubTask Created by... | mit | -4,257,278,860,614,973,000 | 46.86747 | 128 | 0.674553 | false | 3.922014 | false | false | false |
DMOJ/site | judge/utils/celery.py | 1 | 1833 | from celery.result import AsyncResult
from django.http import HttpResponseRedirect
from django.urls import reverse
from django.utils.http import urlencode
class Progress:
def __init__(self, task, total, stage=None):
self.task = task
self._total = total
self._done = 0
self._stage = ... | agpl-3.0 | -7,778,078,862,072,701,000 | 23.118421 | 75 | 0.587016 | false | 3.9 | false | false | false |
m8ttyB/socorro | socorro/signature/__init__.py | 1 | 3380 | # This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
import logging
try:
import raven
except ImportError:
raven = None
from socorro.signature.signature_utilities i... | mpl-2.0 | -923,283,332,757,324,800 | 28.649123 | 89 | 0.585799 | false | 4.366925 | false | false | false |
sjzabel/snail | snail/vlq.py | 1 | 1467 | """
File: vlq.py
Author: Stephen J. Zabel
Email: sjzabel@gmail.com
Github: https://github.com/sjzabel
Description: Utilities to handle Variable Length Quantity midi data
Heavily borrowed from python-midi's midi.util class and tested for
python >= 3.4
http://en.wikipedia.org/wiki/Variable-length_quantity
"""
def re... | bsd-3-clause | -1,696,313,645,235,272,200 | 21.921875 | 67 | 0.546012 | false | 3.53494 | false | false | false |
michal-ruzicka/archivematica | src/MCPClient/lib/clientScripts/validateFile.py | 1 | 3011 | #!/usr/bin/python2
"""
Runs a validation command on the provided file, and generates an Event from
the results.
If a format has no defined validation commands, no command is run.
"""
from __future__ import print_function
import ast
import sys
# archivematicaCommon
from custom_handlers import get_script_logger
from ex... | agpl-3.0 | 1,050,239,263,731,076,400 | 32.831461 | 112 | 0.642644 | false | 3.982804 | false | false | false |
miyataken999/weblate | weblate/trans/filelock.py | 1 | 5022 | # -*- coding: utf-8 -*-
#
# Copyright © 2012 - 2015 Michal Čihař <michal@cihar.com>
#
# This file is part of Weblate <https://weblate.org/>
#
# 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, eith... | gpl-3.0 | -5,006,074,213,149,041,000 | 25.005181 | 75 | 0.587567 | false | 4.21057 | false | false | false |
dnanexus/rseqc | rseqc/scripts/divide_bam.py | 1 | 2588 | #!/usr/bin/env python
'''-------------------------------------------------------------------------------------------------
Equally divide BAM file (m alignments) into n parts. Each part contains roughly m/n alignments
that are randomly sampled from total alignments.
----------------------------------------------------... | gpl-3.0 | 8,385,290,179,741,902,000 | 34.944444 | 161 | 0.616306 | false | 3.110577 | false | false | false |
TianZhiWang/cmput404-project | server/quickstart/tests/test_post_id.py | 1 | 8270 | # MIT License
# Copyright (c) 2017 Conner Dunn, Tian Zhi Wang, Kyle Carlstrom, Xin Yi Wang, Josh Deng
# 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 without ... | mit | 6,433,251,003,140,917,000 | 51.675159 | 142 | 0.69081 | false | 3.652827 | true | false | false |
ZEROFAIL/goblin | goblin/mapper.py | 2 | 8382 | """Helper functions and class to map between OGM Elements <-> DB Elements"""
import functools
import logging
from goblin import exception
logger = logging.getLogger(__name__)
def map_props_to_db(element, mapping):
"""Convert OGM property names/values to DB property names/values"""
property_tuples = []
... | agpl-3.0 | -8,568,880,268,748,332,000 | 33.925 | 77 | 0.551062 | false | 4.035628 | false | false | false |
ingmarschuster/rkhs_demo | rkhs_operators.py | 1 | 11385 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Created on Fri May 18 17:33:27 2018
@author: Ingmar Schuster
"""
#from __future__ import division, print_function, absolute_import
import autograd.numpy as np
import autograd.scipy as sp
import autograd.scipy.stats as stats
from autograd.numpy import exp, log, sqr... | gpl-3.0 | -4,504,976,631,495,991,300 | 35.142857 | 145 | 0.576372 | false | 3.000791 | false | false | false |
samp20/GuiConfig | main.py | 1 | 5225 | import wx
#import wx.lib.inspection
import os
import imp
import json
from templite import Templite
import vstore
outputs = {}
open_dir = os.path.join(os.path.dirname(__file__),"templates")
load_save_dir = os.path.expanduser("~")
export_dir = os.path.expanduser("~")
def load_module(path):
return imp.load_source... | gpl-2.0 | -2,630,088,493,306,348,000 | 33.602649 | 98 | 0.531483 | false | 3.716216 | false | false | false |
Tendrl/monitoring-integration | tendrl/monitoring_integration/sync/__init__.py | 1 | 3656 | import etcd
import json
import threading
import time
from tendrl.commons import sds_sync
from tendrl.commons.utils import etcd_utils
from tendrl.commons.utils import log_utils as logger
from tendrl.monitoring_integration.graphite import graphite_utils
from tendrl.monitoring_integration.graphite import GraphitePlugin
f... | lgpl-2.1 | 1,449,628,414,120,418,600 | 40.078652 | 79 | 0.500274 | false | 4.861702 | false | false | false |
hongiiv/CloudStack_for_ucloudbiz | example_ucloud1.py | 1 | 2739 | #!/usr/bin/python
import ucloudapi
api='https://api.ucloudbiz.olleh.com/server/v1/client/api'
apikey='APIKEY'
secret='SECRETKEY'
cloudstack = ucloudapi.Client(api, apikey, secret)
vms = cloudstack.listVirtualMachines()
print "VmID\tName\tState\taccount\tdomian\tdomainid\tPassword"
for vm in vms:
print "%s\t%s... | mit | 405,631,428,533,350,660 | 35.039474 | 271 | 0.519533 | false | 3.543338 | false | false | false |
googlei18n/glyphsLib | Lib/glyphsLib/builder/axes.py | 1 | 21802 | # Copyright 2015 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | apache-2.0 | -781,067,861,286,933,800 | 36.524957 | 88 | 0.600633 | false | 3.862863 | false | false | false |
prefetchnta/questlab | bin/x64bin/python/37/Lib/typing.py | 1 | 58092 | """
The typing module: Support for gradual typing as defined by PEP 484.
At large scale, the structure of the module is following:
* Imports and exports, all public names should be explicitly added to __all__.
* Internal helper functions: these should never be used in code outside this module.
* _SpecialForm and... | lgpl-2.1 | 2,500,841,136,531,119,600 | 33.122128 | 96 | 0.569717 | false | 4.216287 | false | false | false |
fingeronthebutton/RIDE | src/robotide/lib/robot/running/arguments/argumentmapper.py | 1 | 2517 | # Copyright 2008-2015 Nokia Solutions and Networks
#
# 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 l... | apache-2.0 | 3,278,885,102,209,739,000 | 34.450704 | 84 | 0.658323 | false | 4.195 | false | false | false |
andrelucas/hsync | hsync/hashlist_sqlite.py | 1 | 5601 | # Hashlist implemetation.
# Copyright (c) 2015, Andre Lucas
# 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, ... | bsd-3-clause | 7,275,203,641,435,514,000 | 36.844595 | 78 | 0.641493 | false | 4.041126 | false | false | false |
ribozz/sphinx-argparse | test/test_parser.py | 1 | 13800 | import argparse
from sphinxarg.parser import parse_parser, parser_navigate
import six
def test_parse_options():
parser = argparse.ArgumentParser()
parser.add_argument('--foo', action='store_true', default=False, help='foo help')
parser.add_argument('--bar', action='store_true', default=False)
data = ... | mit | -1,464,193,136,916,713,000 | 31.470588 | 305 | 0.48 | false | 4.171705 | true | false | false |
Saltbox/mobile-scavenger-hunt | hunt.py | 1 | 1216 | from flask import Flask
from flask.ext.sqlalchemy import SQLAlchemy
from flask.ext.assets import Environment, Bundle
from flask.ext.login import LoginManager
from flask.ext.bcrypt import Bcrypt
import config
import logging
import sys
logging.basicConfig(level=logging.DEBUG)
app = Flask(__name__)
app.config.updat... | apache-2.0 | 4,807,224,761,119,492,000 | 17.424242 | 54 | 0.689145 | false | 3.134021 | false | false | false |
devwebcl/wls_contraption | wlst/jms_module.py | 1 | 3948 | #========================================
# WLST Script purpose: Configuring JMS Module
# Author: Pavan Devarakonda
# Update date: 3rd Aug 2017
#========================================
from java.util import Properties
from java.io import FileInputStream
from java.io import File
from java.io import FileOutputStream
fro... | gpl-3.0 | 1,553,938,281,711,093,500 | 33.330435 | 96 | 0.618034 | false | 3.403448 | true | false | false |
kdmurray91/axe-experiments | scripts/fakebcd.py | 1 | 1494 | from __future__ import print_function, division
from collections import Counter, defaultdict
import itertools
from itertools import izip, cycle
import json
from math import log
import random
from sys import stderr
import screed
mutrate = 1/1000
barcodes = [
"AAAA",
"CCCC",
"GGGG",
"TTTT",
]
def mut... | mit | -6,454,582,003,090,545,000 | 23.096774 | 53 | 0.582999 | false | 3.37246 | false | false | false |
posborne/mlcollection | mlcollection/examples/movieratings.py | 1 | 1319 | from mlcollection.datasets.movielens.movielensparser import MovieLensParser
from mlcollection.lib.collaborativefiltering import pearson
from operator import itemgetter
class MovieRecommender(MovieLensParser):
def __init__(self):
# this will load in our data set
MovieLensParser.__init__(self)
... | mit | 7,253,088,893,390,960,000 | 44.482759 | 119 | 0.658074 | false | 3.425974 | false | false | false |
amiravni/Magic-Platform | ComputerGemAndPythonCode/myVideoWriter.py | 1 | 2459 | # -*- coding: utf-8 -*-
"""
Created on Mon May 16 19:07:30 2016
@author: root
"""
import cv2
import time
from thread import start_new_thread
class myVideoWriter:
height = -1
width = -1
video = None
camera = None
capture_flag = False
def init(self,cam_dev,filename):
if len(fi... | gpl-3.0 | 8,085,494,273,909,419,000 | 29.358025 | 102 | 0.538024 | false | 4.189097 | false | false | false |
MacHu-GWU/constant2-project | constant2/pkg/superjson/pkg/compresslib.py | 1 | 2572 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
compress and decompress data using zlib.
"""
__version__ = "0.0.1"
__author__ = "Sanhe Hu"
__license__ = "MIT"
import sys
import types
import zlib
import base64
import pickle
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3
if PY3:
string_types = ... | mit | -7,414,054,523,067,995,000 | 23.970874 | 77 | 0.616641 | false | 3.438503 | false | false | false |
morphis/home-assistant | homeassistant/components/influxdb.py | 1 | 5474 | """
A component which allows you to send data to an Influx database.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/influxdb/
"""
import logging
import voluptuous as vol
from homeassistant.const import (
EVENT_STATE_CHANGED, STATE_UNAVAILABLE, STA... | apache-2.0 | -4,714,423,927,570,198,000 | 33 | 79 | 0.588783 | false | 4.036873 | false | false | false |
allevin/PyGithub | tests/AuthenticatedUser.py | 1 | 25667 | # -*- coding: utf-8 -*-
############################ Copyrights and license ############################
# #
# Copyright 2012 Vincent Jacques <vincent@vincent-jacques.net> #
# Copyright 2012 Zearin <zearin@gonk.net> ... | lgpl-3.0 | 2,667,837,825,151,152,600 | 34.302613 | 408 | 0.491876 | false | 4.02841 | true | false | false |
olfa-lab/DmdLib | dmdlib/core/ALP.py | 1 | 23255 | from __future__ import print_function
from ctypes import *
import ctypes
from ._alp_defns import *
import numpy as np
import time
def _api_call(function):
"""
decorator to implement error handling for ALP API calls.
"""
def api_handler(dmd_instance, *args, **kwargs):
r = function(dmd_instance,... | mit | 326,036,028,467,869,630 | 34.449695 | 126 | 0.602838 | false | 3.617203 | false | false | false |
miketrumpis/machine_learning_project | recog/dict/block_factorizing.py | 1 | 5948 | import numpy as np
from scipy.sparse.linalg import LinearOperator
from ..opt.cg import basic_CG
# want to form operators dealing with the dictionary frames,
# and the augmented frames for sparse repr and error
#
# The linear operators in this module deal with factorizations of
# the matrix B = [A A_e], where A_e is a... | bsd-2-clause | 8,345,045,537,698,271,000 | 27.873786 | 77 | 0.469906 | false | 2.91998 | false | false | false |
arthurfait/HMM-3 | Gen_Synthetic_Data/work/OverallEval.py | 1 | 1128 | import sys
def main():
if len(sys.argv)<2:
print "usage :",sys.argv[0],"Eval file, Results Output Directory"
sys.exit(-1)
filename = sys.argv[1]
outputdir = sys.argv[2]
evalfile = open(filename,'r')
line = evalfile.readline() #X Residue line
line = evalfile.readline() ... | gpl-3.0 | -7,365,312,249,240,870,000 | 34.28125 | 104 | 0.591312 | false | 3.090411 | false | false | false |
f4nt/djpandora | djpandora/migrations/0001_initial.py | 1 | 5917 | # encoding: utf-8
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Station'
db.create_table('djpandora_station', (
('id', self.gf('django.db.mode... | bsd-3-clause | 6,604,702,621,764,349,000 | 55.352381 | 182 | 0.553152 | false | 3.647965 | false | false | false |
ragupta-git/ImcSdk | imcsdk/mometa/adaptor/AdaptorFcPortFLogiProfile.py | 1 | 3791 | """This module contains the general information for AdaptorFcPortFLogiProfile ManagedObject."""
from ...imcmo import ManagedObject
from ...imccoremeta import MoPropertyMeta, MoMeta
from ...imcmeta import VersionMeta
class AdaptorFcPortFLogiProfileConsts:
RETRIES_INFINITE = "INFINITE"
class AdaptorFcPortFLogiPr... | apache-2.0 | 2,512,804,720,577,976,000 | 48.881579 | 225 | 0.607228 | false | 3.427667 | false | false | false |
philippdre/omniCLIP | omniCLIP/omni_stat/FitBinoDirchEmmisionProbabilities.py | 1 | 5929 | """
omniCLIP is a CLIP-Seq peak caller
Copyright (C) 2017 Philipp Boss
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) an... | gpl-3.0 | 9,089,859,296,256,212,000 | 34.502994 | 120 | 0.655928 | false | 3.12876 | false | false | false |
costadorione/purestream | servers/bigfile.py | 1 | 1392 | # -*- coding: utf-8 -*-
#------------------------------------------------------------
# streamondemand - XBMC Plugin
# Conector para bigfile
# http://www.mimediacenter.info/foro/viewforum.php?f=36
#------------------------------------------------------------
import re
from core import logger
def test_video_exists( ... | gpl-3.0 | -5,491,583,249,482,405,000 | 31.348837 | 93 | 0.57872 | false | 3.392683 | false | false | false |
youfoh/webkit-efl | Tools/Scripts/webkitpy/layout_tests/views/metered_stream.py | 1 | 4921 | #!/usr/bin/env python
# Copyright (C) 2010, 2012 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... | lgpl-2.1 | 2,760,566,890,475,996,700 | 36.853846 | 161 | 0.651697 | false | 3.930511 | false | false | false |
tolstikhin/adagan | cifar_sota.py | 1 | 7946 | # Copyright 2017 Max Planck Society
# Distributed under the BSD-3 Software license,
# (See accompanying file ./LICENSE.txt or copy at
# https://opensource.org/licenses/BSD-3-Clause)
"""Training AdaGAN on various datasets.
Refer to the arXiv paper 'AdaGAN: Boosting Generative Models'
Coded by Ilya Tolstikhin, Carl-Joha... | bsd-3-clause | 7,333,769,273,972,973,000 | 37.95098 | 101 | 0.617543 | false | 3.188604 | false | false | false |
The-Akatsuki/thirdp | src/thirdp/settings/production.py | 1 | 1873 | # In production set the environment variable like this:
# DJANGO_SETTINGS_MODULE=thirdp.settings.production
from .base import * # NOQA
import logging.config
# For security and performance reasons, DEBUG is turned off
DEBUG = False
TEMPLATE_DEBUG = False
# Must mention ALLOWED_HOSTS in producti... | mit | -1,206,949,358,441,064,700 | 26.378788 | 90 | 0.553657 | false | 3.753507 | false | false | false |
edx/notifier | notifier/management/commands/forums_digest.py | 1 | 6185 | """
"""
from __future__ import absolute_import
from __future__ import print_function
from __future__ import unicode_literals
import datetime
from dateutil.parser import parse as date_parse
from django.conf import settings
from django.core.management.base import BaseCommand
from django.core.serializers.json import Dja... | agpl-3.0 | -4,518,605,535,889,777,000 | 36.259036 | 146 | 0.564107 | false | 4.358703 | false | false | false |
davidbgk/udata | udata/core/jobs/models.py | 1 | 1122 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from celerybeatmongo.models import PeriodicTask as BasePeriodicTask, PERIODS
from udata.i18n import lazy_gettext as _
from udata.models import db
__all__ = ('PeriodicTask', 'PERIODS')
CRON = '{minute} {hour} {day_of_month} {month_of_year} {day_of_week... | agpl-3.0 | 2,758,916,001,828,566,500 | 28.526316 | 76 | 0.641711 | false | 3.678689 | false | false | false |
jaesivsm/pyAggr3g470r | src/tests/api/category_test.py | 1 | 2291 | from tests.base import JarrFlaskCommon
from tests.api.common import ApiCommon
class CategoryApiTest(JarrFlaskCommon, ApiCommon):
urn = 'category'
urns = 'categories'
def test_api_list(self):
resp = self._api('get', self.urns, data={'order_by': '-id'},
user='user1')
... | agpl-3.0 | -3,008,877,328,842,549,000 | 39.910714 | 77 | 0.559581 | false | 3.568536 | false | false | false |
chromium/chromium | tools/metrics/histograms/update_histogram_enum.py | 3 | 13658 | # Copyright 2014 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.
"""Updates enums in histograms.xml file with values read from provided C++ enum.
If the file was pretty-printed, the updated version is pretty-printed too.
... | bsd-3-clause | 8,792,709,390,575,130,000 | 36.938889 | 80 | 0.666496 | false | 3.971503 | false | false | false |
Storj/heartbeat | heartbeat/OneHash/OneHash.py | 1 | 7834 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# This file is part of Heartbeat: https://github.com/Storj/heartbeat
#
# The MIT License (MIT)
#
# Copyright (c) 2014 Storj Labs, Paul Durivage, et al.
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated docume... | mit | 6,418,504,735,639,850,000 | 32.622318 | 79 | 0.626245 | false | 4.328177 | false | false | false |
ddurst/zamboni | mkt/websites/management/commands/import_tv_websites_from_csv.py | 1 | 7970 | import csv
from os.path import basename, splitext
from django.core.management.base import BaseCommand, CommandError
from django.core.validators import URLValidator, ValidationError
from django.db.transaction import atomic
from django.utils import translation
from mpconstants.mozilla_languages import LANGUAGES
from m... | bsd-3-clause | 9,084,250,870,212,592,000 | 37.68932 | 79 | 0.545169 | false | 4.408186 | false | false | false |
HelloLily/hellolily | lily/deals/migrations/0006_auto_20150901_1541.py | 1 | 1233 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('deals', '0005_auto_20150709_1442'),
]
operations = [
migrations.AddField(
model_name='deal',
name='c... | agpl-3.0 | -8,109,018,926,620,904,000 | 31.447368 | 128 | 0.560422 | false | 4.296167 | false | false | false |
alfredhq/alfred-listener | alfred_listener/helpers.py | 1 | 2106 | import msgpack
import zmq
from flask import current_app
from alfred_db.models import Push
from .database import db
def get_shell():
try:
from IPython.frontend.terminal.embed import InteractiveShellEmbed
except ImportError:
import code
return lambda **context: code.interact('', local=c... | isc | -2,557,109,813,335,542,000 | 28.661972 | 73 | 0.624406 | false | 3.707746 | false | false | false |
vivsh/django-ginger | ginger/management/commands/uwsgi_conf.py | 1 | 1517 |
import os
from django.core.management import BaseCommand
from django.conf import settings
class Command(BaseCommand):
def add_arguments(self, parser):
parser.add_argument("-n","--name", type=str, dest="name", help="Name of the project. "
"This should... | mit | -4,313,880,951,168,506,400 | 21.641791 | 111 | 0.539222 | false | 3.611905 | false | false | false |
zappyk-github/zappyk-python | src/src_zappyk/findNameSend/FindNameSend/src/load_run.py | 1 | 11977 | # -*- coding: utf-8 -*-
__author__ = 'zappyk'
from lib_zappyk._email import _email
from lib_zappyk._os_file import _nameListDir
from lib_zappyk._string import _removeFirstEmptyLine, _stringToList, _search
from FindNameSend.cfg.load_cfg import parser_args, parser_conf, logger_conf
from FindNameSend.cfg.load_ini i... | gpl-2.0 | -3,464,861,437,267,142,700 | 41.321555 | 132 | 0.530433 | false | 3.477642 | true | false | false |
amolkahat/pandas | pandas/tests/frame/test_arithmetic.py | 1 | 14691 | # -*- coding: utf-8 -*-
import operator
import pytest
import numpy as np
from pandas.compat import range
import pandas as pd
import pandas.util.testing as tm
from pandas.tests.frame.common import _check_mixed_float, _check_mixed_int
# -------------------------------------------------------------------
# Compariso... | bsd-3-clause | -820,416,371,480,377,100 | 37.458115 | 78 | 0.542986 | false | 3.556282 | true | false | false |
capitalone/cloud-custodian | tools/c7n_mailer/c7n_mailer/sns_delivery.py | 1 | 5530 | # Copyright 2017 Capital One Services, LLC
# Copyright The Cloud Custodian Authors.
# SPDX-License-Identifier: Apache-2.0
from boto3 import Session
from .utils import (
get_message_subject, get_resource_tag_targets, get_rendered_jinja)
class SnsDelivery:
def __init__(self, config, session, logger):
... | apache-2.0 | -5,982,948,019,328,902,000 | 42.543307 | 99 | 0.576492 | false | 3.905367 | true | false | false |
andrew031191/pyneb | pyneb_parser_general.py | 1 | 14434 | import sys, os, copy, pickle
import numpy as np
import pandas as pd
import pyneb_parser_castep
from pyneb_parser_castep import deprecate
import pyneb_structureformat
from time import time
def write_supercells2pickle(path,supercells):
# write data from supercell form into a dataframe and write that to disk... | lgpl-3.0 | -4,788,072,556,383,352,000 | 42.006098 | 162 | 0.544755 | false | 4.654628 | false | false | false |
EdDev/vdsm | lib/vdsm/network/api.py | 1 | 10462 | # Copyright 2011-2016 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... | gpl-2.0 | 3,812,012,112,211,649,000 | 35.968198 | 79 | 0.639648 | false | 4.263244 | true | false | false |
VisualComputingInstitute/Beacon8 | beacon8/layers/Module.py | 1 | 3211 | import theano as _th
import theano.tensor as _T
class Module:
def __init__(self):
self.training_mode = True
self.fn_forward = None
self.fn_accum_grads = None
self.fn_accum_stats = None
#def __hash__(self):
# raise NotImplementedError("You *need* to reimplement hash, e... | mit | 3,767,262,002,722,296,000 | 33.902174 | 165 | 0.573964 | false | 3.686567 | false | false | false |
XiaoxiaoLiu/morphology_analysis | IVSCC/merge_meta_info.py | 1 | 5777 | __author__ = 'xiaoxiaoliu'
import platform
import pandas as pd
import numpy as np
import os
def copySnapshots(df_in, snapshots_dir, output_dir):
if not os.path.exists(output_dir):
os.mkdir(output_dir)
swc_files = df_in['swc_file']
if len(swc_files) > 0:
for afile in swc_files:
f... | gpl-3.0 | 1,384,354,028,111,952,000 | 33.392857 | 127 | 0.606197 | false | 3.286121 | false | false | false |
sagiss/sardana | src/sardana/taurus/qt/qtgui/extra_hkl/reflectionseditor.py | 1 | 9509 | #!/usr/bin/env python
##############################################################################
##
## This file is part of Sardana
##
## http://www.sardana-controls.org/
##
## Copyright 2011 CELLS / ALBA Synchrotron, Bellaterra, Spain
##
## Sardana is free software: you can redistribute it and/or modify
## it und... | lgpl-3.0 | -5,323,302,480,923,424,000 | 36.290196 | 78 | 0.526869 | false | 3.911559 | false | false | false |
wrboyce/autolat | autolat/mobileme.py | 1 | 8757 | from datetime import datetime
import re
import time
import urllib
import simplejson as json
from actions import Action
from webservice import WebService
class MobileMe(WebService):
loginform_url = 'https://auth.me.com/authenticate'
loginform_data = {
'service': 'account',
'ssoNamespace': 'pr... | bsd-3-clause | -5,695,710,909,679,324,000 | 36.26383 | 160 | 0.564691 | false | 3.644195 | false | false | false |
DBCDK/opensearch | admin/showall.py | 1 | 3762 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# -*- mode: python -*-
# This file is part of opensearch.
# Copyright © 2009, Dansk Bibliotekscenter a/s,
# Tempovej 7-11, DK-2750 Ballerup, Denmark. CVR: 15149043
#
# opensearch is free software: you can redistribute it and/or modify
# it under the terms of the GNU Gene... | gpl-3.0 | 7,546,802,612,031,799,000 | 29.088 | 168 | 0.606222 | false | 3.905504 | false | false | false |
OWASP/django-DefectDojo | dojo/test/views.py | 1 | 34841 | # # tests
import logging
import operator
from datetime import datetime
from django.contrib import messages
from django.contrib.auth.decorators import user_passes_test
from django.core.exceptions import PermissionDenied, ValidationError
from django.urls import reverse
from django.db.models import Q
from django.http i... | bsd-3-clause | 1,362,236,785,638,824,200 | 50.387906 | 229 | 0.495365 | false | 4.642372 | true | false | false |
lutris/website | common/migrations/0001_initial.py | 1 | 2155 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import datetime
import markupfield.fields
from django.conf import settings
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
... | agpl-3.0 | 6,577,792,228,240,065,000 | 42.1 | 226 | 0.567517 | false | 4.371197 | false | false | false |
wglass/rotterdam | rotterdam/settings/base.py | 1 | 2037 | import textwrap
classes = []
class SettingMeta(type):
def __new__(cls, name, bases, attrs):
base_constructor = super(SettingMeta, cls).__new__
parents = [
base for base in bases
if isinstance(base, SettingMeta)
]
if not parents:
return base_c... | mit | -5,368,343,822,181,322,000 | 20.670213 | 62 | 0.528719 | false | 4.017751 | false | false | false |
Th4nat0s/F2BB | f2bb.py | 1 | 10829 | #!/usr/bin/python
# -*- coding: utf-8 -*-
# F2BB Fail2Ban Broadcast
# (c) Thanat0s 2013
#
# Fail2Ban BroadCast 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 o... | gpl-2.0 | 8,113,832,359,895,750,000 | 33.929032 | 203 | 0.640007 | false | 3.300213 | true | false | false |
deansx/coding-tests | replace-words/python/wordmap_tst.py | 1 | 3415 | #!/usr/bin/env python
"""wordmap_tst.py is the executable module for the testing the
MapList and WordMap classes for replace-words coding test.
This module creates a MapList instance, and populates it with test WordMap
objects. Then, the new MapList/WordMap(s) combination is tested both for
checkin... | mit | 2,366,979,750,694,924,300 | 31.836538 | 78 | 0.616105 | false | 3.587185 | true | false | false |
filyph/scrapy-sqlite | scrapy_sqlite/spiders.py | 1 | 2262 | __author__ = 'Filip Hanes'
import scrapy_sqlite.connection as connection
from scrapy.spider import Spider
from scrapy import signals
from scrapy.exceptions import DontCloseSpider
class SQLiteMixin(object):
""" A SQLite Mixin used to read URLs from a SQLite table.
"""
table = None
def __init__(self... | mit | -2,411,237,224,244,102,700 | 26.925926 | 88 | 0.606101 | false | 3.975395 | false | false | false |
rdmorganiser/rdmo | rdmo/questions/tests/test_validator_locked_questions.py | 1 | 5581 | import pytest
from django.core.exceptions import ValidationError
from rest_framework.exceptions import \
ValidationError as RestFameworkValidationError
from ..models import Question, QuestionSet
from ..serializers.v1 import QuestionSerializer
from ..validators import QuestionLockedValidator
def test_create(db):
... | apache-2.0 | -3,743,756,792,890,677,000 | 24.718894 | 64 | 0.677836 | false | 4.447012 | true | false | false |
anandsimmy/ecommerce | src/oscar/apps/basket/utils.py | 1 | 2874 | from django.contrib import messages
from django.template.loader import render_to_string
from oscar.core.loading import get_class
Applicator = get_class('offer.applicator', 'Applicator')
class BasketMessageGenerator(object):
new_total_template_name = 'basket/messages/new_total.html'
offer_lost_template_name... | bsd-3-clause | -7,345,989,088,798,030,000 | 43.90625 | 90 | 0.665971 | false | 3.92623 | false | false | false |
yixuanzi/blackmoon | plugins/auxiliary/plugin_zoomeye.py | 1 | 8977 | #coding=utf8
import pycurl
import sys
import urllib2
import gzip
import StringIO
from bs4 import *
from bmplugin import *
import re
info={'desc':"get ip list object use www.zoomeye.org for search keys",
'cve':'',
'link':"https://www.zoomeye.org/help/manual"}
zoom=None
lock=lib_TheardPool2.getlock()
def... | apache-2.0 | 6,167,529,479,684,384,000 | 34.203922 | 116 | 0.550629 | false | 3.37101 | false | false | false |
FedoraScientific/salome-med | src/MEDOP/tut/addfields/operations.py | 1 | 3393 | #!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
# Copyright (C) 2012-2014 CEA/DEN, EDF R&D
#
# 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 (... | lgpl-2.1 | 536,492,237,729,161,660 | 33.979381 | 81 | 0.66313 | false | 3.59428 | false | false | false |
erdinc-me/n00verlay | x11-misc/menumaker/files/Awesome.py | 1 | 2458 | import MenuMaker
from MenuMaker import indent, writeFullMenu
menuFile = "~/.config/awesome/menumaker/menu.lua"
def _map(x) :
for d, s in (("&", "&"), ("\'", "\"")) :
x = x.replace(s, d)
return x
class Sep(object) :
def emit(self, level) :
return ['%s' % indent(level)]
def emit_menu(self, lev... | gpl-2.0 | 8,627,682,497,906,219,000 | 18.822581 | 93 | 0.563873 | false | 2.651564 | false | false | false |
queria/haskybanking | haskybanking/config.py | 1 | 1177 | """
Main configuration
"""
import logging
import os
import sys
from wheezy.html.ext.template import WidgetExtension
from wheezy.html.utils import html_escape
from wheezy.template.engine import Engine
from wheezy.template.ext.core import CoreExtension
from wheezy.template.loader import FileLoader
from wheezy.web.templ... | mit | 8,130,112,325,332,415,000 | 22.54 | 72 | 0.716228 | false | 3.251381 | false | false | false |
7digital/troposphere | troposphere/__init__.py | 1 | 23655 | # Copyright (c) 2012-2017, Mark Peek <mark@peek.org>
# All rights reserved.
#
# See LICENSE file for full license.
import cfn_flip
import collections
import json
import re
import sys
import types
from . import validators
__version__ = "1.9.4"
# constants for DeletionPolicy
Delete = 'Delete'
Retain = 'Retain'
Snaps... | bsd-2-clause | -4,330,837,550,103,553,500 | 32.505666 | 78 | 0.553752 | false | 4.23015 | false | false | false |
kwiberg/chubs | chubs.py | 1 | 1059 | import math
import random
import re
import sys
# Regular expression that defines what words are admissible; this one
# is horribly English-centric.
word_re = re.compile(r"[a-z]*$")
# Parse command-line arguments. Crash if the user git it wrong.
(bits, *wordlists) = sys.argv[1:]
bits = int(bits)
# Extract the set of ... | bsd-2-clause | 452,001,951,031,751,600 | 32.09375 | 69 | 0.642115 | false | 3.28882 | false | false | false |
roryk/hisat2 | evaluation/get_programs.py | 1 | 5290 | #!/usr/bin/env python
import sys, os
use_message = '''
'''
def get_aligners():
mac = (sys.platform == "darwin")
if not os.path.exists("aligners"):
os.mkdir("aligners")
os.chdir("aligners")
if not os.path.exists("bin"):
os.mkdir("bin")
programs = ["HISAT", "Bowtie2", "Bowtie", "TopH... | gpl-3.0 | 8,516,135,643,174,536,000 | 45.403509 | 207 | 0.502836 | false | 3.080955 | false | false | false |
lovebull/datapython | sock5/sock5.py | 1 | 4780 | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Script Name : sock5.py
# Author : lovebull
# Created : 2016/05/10
# Last Modified : 2016/05/10
# Version : 1.0.0
# Modifications : Added exceptions
#
# Description :
from urllib import request
import time
from bs4 import BeautifulSoup
import ... | mit | 4,938,307,863,477,838,000 | 24.846154 | 149 | 0.585623 | false | 2.70297 | false | false | false |
jpvantuyl/python_koans | python2/koans/about_methods.py | 1 | 5715 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Partially based on AboutMethods in the Ruby Koans
#
from runner.koan import *
def my_global_function(a, b):
return a + b
class AboutMethods(Koan):
def test_calling_a_global_function(self):
self.assertEqual(5, my_global_function(2, 3))
# NOTE: ... | mit | 6,766,983,343,412,363,000 | 32.617647 | 102 | 0.553456 | false | 4.117435 | true | false | false |
endlessm/chromium-browser | tools/swarming_client/tools/isolateserver_load_test.py | 1 | 8526 | #!/usr/bin/env vpython
# Copyright 2013 The LUCI Authors. All rights reserved.
# Use of this source code is governed under the Apache License, Version 2.0
# that can be found in the LICENSE file.
"""Uploads a ton of stuff to isolateserver to test its handling.
Generates an histogram with the latencies to download a j... | bsd-3-clause | -5,856,102,978,903,143,000 | 31.295455 | 80 | 0.656345 | false | 3.475744 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.