repo_name stringlengths 5 92 | path stringlengths 4 232 | copies stringclasses 19
values | size stringlengths 4 7 | content stringlengths 721 1.04M | 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 15 997 | alpha_frac float64 0.25 0.97 | autogenerated bool 1
class |
|---|---|---|---|---|---|---|---|---|---|---|
owlabs/incubator-airflow | airflow/utils/tests.py | 1 | 4852 | # -*- coding: utf-8 -*-
#
# 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
#... | apache-2.0 | 8,383,117,429,937,916,000 | 28.585366 | 84 | 0.670033 | false |
wehriam/awspider | awspider/aws/sdb.py | 1 | 29905 | import base64
import hmac
import hashlib
import urllib
import xml.etree.cElementTree as ET
from datetime import datetime
import time
import dateutil.parser
import logging
from twisted.internet.defer import DeferredList
from ..requestqueuer import RequestQueuer
from .lib import etree_to_dict, safe_quote_tuple
LOGGER =... | mit | 3,535,296,104,513,814,500 | 36.664987 | 110 | 0.562281 | false |
marcino239/reactor_arm | reactor_controller/scripts/joystick_control.py | 1 | 4438 | import gflags
import dynamixel
import time
import sys
import pygame
SERVO_STEP = 10
FLAGS = gflags.FLAGS
gflags.DEFINE_string( 'port', '/dev/ttyUSB0', 'dynamixel port' )
gflags.DEFINE_integer( 'baud', 1000000, 'baud rate' )
gflags.DEFINE_integer( 'min_id', 1, 'lowest dynamixel ID' )
gflags.DEFINE_integer( 'max_id', ... | gpl-2.0 | 807,746,683,606,955,400 | 28.785235 | 115 | 0.614241 | false |
XianwuLin/block_games | snake-ai/snake.py | 1 | 10849 | # coding: utf-8
import curses
from curses import KEY_RIGHT, KEY_LEFT, KEY_UP, KEY_DOWN
from random import randint
# 蛇运动的场地长宽
HEIGHT = 10
WIDTH = 20
FIELD_SIZE = HEIGHT * WIDTH
# 蛇头总是位于snake数组的第一个元素
HEAD = 0
# 用来代表不同东西的数字,由于矩阵上每个格子会处理成到达食物的路径长度,
# 因此这三个变量间需要有足够大的间隔(>HEIGHT*WIDTH)
FOOD = 0
UNDEFINED = (HEIGHT + 1) * ... | mit | -5,874,944,903,512,969,000 | 28.52069 | 128 | 0.625044 | false |
rk700/rbook | rbook/r_pdf.py | 1 | 6074 | #!/usr/bin/env python
#-*- coding: utf8 -*-
#
# Copyright (C) 2012 Ruikai Liu <lrk700@gmail.com>
#
# This file is part of rbook.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version ... | gpl-3.0 | 3,068,230,262,222,277,600 | 36.9625 | 101 | 0.596806 | false |
fy0/my-leetcode | 1028. Recover a Tree From Preorder Traversal/main.py | 1 | 1267 |
# Definition for a binary tree node.
# class TreeNode:
# def __init__(self, x):
# self.val = x
# self.left = None
# self.right = None
import re
class Solution:
def recoverFromPreorder(self, S: str) -> TreeNode:
items = list(map(lambda x: [len(x[0]), x[1]], re.findall(r'(-*)(\... | apache-2.0 | 4,045,531,576,449,108,000 | 22.66 | 83 | 0.426881 | false |
jwhitlock/kuma | kuma/scrape/tests/test_source.py | 1 | 9151 | # -*- coding: utf-8 -*-
"""Tests for the Source class."""
from __future__ import unicode_literals
import mock
import pytest
from kuma.scrape.sources import Source
from . import mock_requester, mock_storage
class FakeSource(Source):
"""A Fake source for testing shared Source functionality."""
PARAM_NAME = ... | mpl-2.0 | 7,577,405,861,420,672,000 | 33.896947 | 79 | 0.643224 | false |
TeamPurple/Cyber | yowsup_dev/src/whatspy_flask.py | 1 | 2908 | import sys, os, time, shutil
from Yowsup.connectionmanager import YowsupConnectionManager
from Yowsup.Common.debugger import Debugger
USERNAME = '972583340860'
PASSWORD = 'jag6FSF6MicZmp9M8lrsSqoXYo8='.decode('base64')
phase = None
cm = None
signals_interface = None
methods_interface = None
# Utils
def phone_number... | gpl-3.0 | 2,017,714,758,593,760,500 | 26.17757 | 102 | 0.686039 | false |
RedhawkSDR/integration-gnuhawk | components/regenerate_bb/tests/test_regenerate_bb.py | 1 | 4069 | #!/usr/bin/env python
#
# This file is protected by Copyright. Please refer to the COPYRIGHT file
# distributed with this source distribution.
#
# This file is part of GNUHAWK.
#
# GNUHAWK is free software: you can redistribute it and/or modify is under the
# terms of the GNU General Public License as published by ... | gpl-3.0 | 4,217,778,358,626,160,600 | 46.870588 | 133 | 0.592529 | false |
USGSDenverPychron/pychron | pychron/headless_config_loadable.py | 1 | 1222 | #!/usr/bin/python
# ===============================================================================
# Copyright 2011 Jake Ross
#
# 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-2.0 | 4,949,899,419,939,401,000 | 38.419355 | 81 | 0.555646 | false |
blaze/dask | dask/array/slicing.py | 1 | 40834 | from itertools import product
import math
from numbers import Integral, Number
from operator import add, getitem, itemgetter
import warnings
import functools
import bisect
import numpy as np
from tlz import memoize, merge, pluck, concat, accumulate
from .. import core
from .. import config
from .. import utils
from .... | bsd-3-clause | -1,367,151,266,620,555,500 | 30.147216 | 97 | 0.568938 | false |
eReuse/DeviceHub | ereuse_devicehub/resources/event/device/allocate/settings.py | 1 | 1485 | from ereuse_devicehub.resources.account.settings import unregistered_user, unregistered_user_doc
from ereuse_devicehub.resources.event.device.settings import EventWithDevices, \
EventSubSettingsMultipleDevices, materialized_components
class Allocate(EventWithDevices):
to = {
'type': ['objectid', 'dict... | agpl-3.0 | -407,023,383,197,654,600 | 39.135135 | 109 | 0.66532 | false |
kubernetes-client/python | kubernetes/client/models/v1_priority_class.py | 1 | 11062 | # coding: utf-8
"""
Kubernetes
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator) # noqa: E501
The version of the OpenAPI document: release-1.18
Generated by: https://openapi-generator.tech
"""
import pprint
import re # noqa: F401
import si... | apache-2.0 | 1,955,843,117,827,839,500 | 37.276817 | 411 | 0.644549 | false |
yittg/Snipping | snipping/prompt_toolkit/layout.py | 1 | 5507 | """snipping.prompt_toolkit.layout
wrappers for layout
"""
from prompt_toolkit.key_binding import vi_state
from prompt_toolkit.layout import containers
from prompt_toolkit.layout import controls
from prompt_toolkit.layout import dimension
from prompt_toolkit.layout import highlighters
from prompt_toolkit.layout import... | mit | -1,226,969,072,952,198,400 | 33.85443 | 79 | 0.632831 | false |
thecarebot/carebot | tests/test_spreadsheet.py | 1 | 3336 | #!/usr/bin/env python
import datetime
from mock import patch
try:
import unittest2 as unittest
except ImportError:
import unittest
import app_config
app_config.DATABASE_NAME = 'carebot_test.db'
app_config.date_cutoff = datetime.date(1997, 1, 1)
from scrapers.npr_spreadsheet import SpreadsheetScraper
from ut... | mit | 1,149,627,926,656,244,500 | 37.344828 | 171 | 0.667866 | false |
infrae/moai | moai/metadata.py | 1 | 9916 |
from lxml.builder import ElementMaker
XSI_NS = 'http://www.w3.org/2001/XMLSchema-instance'
class OAIDC(object):
"""The standard OAI Dublin Core metadata format.
Every OAI feed should at least provide this format.
It is registered under the name 'oai_dc'
"""
def __init__(self, prefix,... | bsd-3-clause | 2,232,625,122,930,430,000 | 36.992337 | 83 | 0.469242 | false |
deepmind/acme | acme/wrappers/action_repeat.py | 1 | 1582 | # python3
# Copyright 2018 DeepMind Technologies Limited. 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 re... | apache-2.0 | 64,054,636,518,076,696 | 31.958333 | 76 | 0.719343 | false |
treycucco/pxp | pxp/stdlib/operator.py | 1 | 10810 | from decimal import Decimal
from pxp.exception import OperatorError
from pxp.function import FunctionArg, FunctionList, InjectedFunction
from pxp.stdlib.types import number_t, string_t, boolean_t
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Number Operators
def op_number_add(reso... | bsd-3-clause | -3,144,274,327,464,263,700 | 36.797203 | 146 | 0.684736 | false |
gerard256/script.trakt | rating.py | 1 | 7947 | # -*- coding: utf-8 -*-
"""Module used to launch rating dialogues and send ratings to Trakt"""
import xbmc
import xbmcaddon
import xbmcgui
import utilities as utils
import globals
import logging
logger = logging.getLogger(__name__)
__addon__ = xbmcaddon.Addon("script.trakt")
def ratingCheck(media_type, summary_info... | gpl-2.0 | -5,166,443,607,900,316,000 | 34.959276 | 179 | 0.556436 | false |
oblique-labs/pyVM | rpython/memory/gctypelayout.py | 1 | 22275 | from rpython.rtyper.lltypesystem import lltype, llmemory, llarena, llgroup
from rpython.rtyper import rclass
from rpython.rtyper.lltypesystem.lloperation import llop
from rpython.rlib.debug import ll_assert
from rpython.rlib.rarithmetic import intmask
from rpython.tool.identity_dict import identity_dict
class GCData(... | mit | 4,813,011,452,356,338,000 | 38.919355 | 79 | 0.590797 | false |
inveniosoftware-contrib/invenio-workflows-ui | invenio_workflows_ui/serializers/__init__.py | 1 | 1527 | # -*- coding: utf-8 -*-
#
# This file is part of Invenio.
# Copyright (C) 2016 CERN.
#
# Invenio 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... | gpl-2.0 | -2,496,835,084,541,541,400 | 34.511628 | 76 | 0.75704 | false |
DesertBus/txircd | txircd/modules/cmd_list.py | 1 | 1917 | from twisted.words.protocols import irc
from txircd.modbase import Command
from txircd.utils import irc_lower
from fnmatch import fnmatch
class ListCommand(Command):
def onUse(self, user, data):
chancache = []
for channame, channel in self.ircd.channels.iteritems():
if data["chanfilter"... | bsd-3-clause | -929,418,014,203,899,100 | 33.872727 | 148 | 0.523213 | false |
heiths/allura | ForgeSVN/forgesvn/tests/test_tasks.py | 1 | 2840 | # -*- coding: utf-8 -*-
# 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 Apach... | apache-2.0 | -6,506,497,155,874,890,000 | 33.634146 | 76 | 0.637676 | false |
akiokio/centralfitestoque | src/.pycharm_helpers/test_generator.py | 1 | 15858 | # encoding: utf-8
"""
Tests basic things that generator3 consists of.
NOTE: does not work in Jython 2.2 or IronPython 1.x, because pyparsing does not.
"""
import unittest
from generator3 import *
M = ModuleRedeclarator
import sys
IS_CLI = sys.platform == 'cli'
VERSION = sys.version_info[:2] # only (major, minor)
c... | bsd-2-clause | 9,880,757,391,117,172 | 37.397094 | 120 | 0.570942 | false |
razco/music_similarity | midi/midi_editting.py | 1 | 5807 | '''
Created on Aug 26, 2017
@author: Raz
'''
import mido
import numpy as np
def midifile_to_dict(mid):
tracks = []
for track in mid.tracks:
tracks.append([vars(msg).copy() for msg in track])
return {
'ticks_per_beat': mid.ticks_per_beat,
'tracks': tracks,
}
def test():
... | mit | -5,851,520,322,637,116,000 | 32.959064 | 116 | 0.61667 | false |
futuresimple/triggear | app/main.py | 1 | 2415 | import os
import motor.motor_asyncio
from aiohttp import web
from app.clients.github_client import GithubClient
from app.clients.jenkinses_clients import JenkinsesClients
from app.clients.mongo_client import MongoClient
from app.config.triggear_config import TriggearConfig
from app.controllers.github_controller impor... | mit | 1,916,583,991,106,913,000 | 48.285714 | 115 | 0.797516 | false |
EpicScriptTime/update-wrapper | updatewrapper/utils/display.py | 1 | 2279 | import termcolor
def ask_yes_no(question, default=True, spacing=True):
"""
Ask a yes/no question via raw_input() and return their answer.
"question" is a string that is presented to the user.
"default" is the presumed answer if the user just hits <Enter>.
It must be "yes" (the default), "no" ... | mit | 3,996,592,966,298,821,000 | 30.652778 | 113 | 0.425186 | false |
frosty308/webapps | forms.py | 1 | 8021 | #!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Copyright (c) 2017-2018 Alan Frost, All rights reserved.
Implementation of user forms
"""
from flask_wtf import FlaskForm
from wtforms import (BooleanField, HiddenField, PasswordField, StringField, SubmitField,
FileField, ValidationError)
from wtform... | gpl-3.0 | -5,773,261,079,788,126,000 | 33.424893 | 97 | 0.63234 | false |
apache/incubator-singa | examples/autograd/resnet.py | 1 | 8531 | #
# 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 | 8,992,445,720,500,284,000 | 28.519031 | 117 | 0.593717 | false |
bxlab/HiFive_Paper | Scripts/Figures/fivec_hicpipe_algorithm_comparison.py | 1 | 14324 | #!/usr/bin/env python
import sys
import os
import numpy
from pyx import canvas, text, path, graph, color, trafo, unit, attr, deco, style, bitmap
import h5py
import hifive
unit.set(defaultunit="cm")
text.set(mode="latex")
text.preamble(r"\usepackage{times}")
text.preamble(r"\usepackage{sansmath}")
text.preamble(r"\... | bsd-3-clause | 1,219,841,942,067,948,000 | 55.616601 | 113 | 0.578749 | false |
delete/estofadora | estofadora/statement/views.py | 1 | 4766 | from datetime import datetime
from django.shortcuts import render, redirect, get_object_or_404
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.contrib import messages
from estofadora.core.utils import MONTHS, last_day_of, month_before_of
from .forms ... | mit | 1,433,432,891,108,522,200 | 28.239264 | 73 | 0.634914 | false |
stormi/tsunami | src/primaires/salle/commandes/ouvrir/__init__.py | 1 | 3297 | # -*-coding:Utf-8 -*
# Copyright (c) 2010 LE GOFF Vincent
# 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
# lis... | bsd-3-clause | -1,509,933,335,406,380,800 | 42.866667 | 79 | 0.696657 | false |
thomasmf/nomenine | src/core/runtime/clause/plus.py | 1 | 1148 |
ROOT_SCOPE_METHOD( MD( 'Plus', 'PLUS_FACTORY_single()' ) )
TEST( """ Or @ ( . [ ( Plus @ y ) ( Plus @ x ) ] flatten () ) consume [ x x y y y x y y ] value value == x """ )
OBJECT( 'PLUS_FACTORY',
methods = [
MS( ARG( CW( '@' ), CG( 'CLAUSE', 'clause' ) ), """
JUMP__return_ANY( CONTEXT, CONTEXT, $CA(PL... | mit | -4,228,764,090,806,747,000 | 22.428571 | 112 | 0.486934 | false |
Jimdo/ansible-fastly | tests/test_fastly_response_object.py | 1 | 2949 | #!/usr/bin/env python
import os
import unittest
import sys
from test_common import TestCommon
sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'library'))
from fastly_service import FastlyConfiguration
class TestFastlyResponseObject(TestCommon):
@TestCommon.vcr.use_cassette()
def test_fastly_re... | mit | 3,654,560,946,872,806,000 | 45.078125 | 111 | 0.699559 | false |
ericblau/ipf-xsede | ipf/glue2/application.py | 1 | 10306 |
###############################################################################
# Copyright 2011-2014 The University of Texas at Austin #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #... | apache-2.0 | -30,491,066,512,194,984 | 39.574803 | 119 | 0.522511 | false |
edouardpoitras/Eva | clients/cli.py | 1 | 4617 | """
This file holds the abstract CLI class used to create command line utilities
that interact with Eva.
Please use the local_cli.py or remote_cli.py to interact with Eva via the
command line.
"""
import time
from multiprocessing import Process
class CLI(object):
"""
Interface object used to create CLI-based... | epl-1.0 | -474,309,522,082,213,950 | 35.354331 | 91 | 0.601473 | false |
darth-vader-lg/glcncrpi | tools/arm-bcm2708/gcc-linaro-arm-none-eabi-4.8-2014.04/arm-none-eabi/lib/v7ve/fpv4/softfp/libstdc++.a-gdb.py | 1 | 2451 | # -*- python -*-
# Copyright (C) 2009-2013 Free Software Foundation, 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 3 of the License, or
# (at your option) any later versio... | gpl-3.0 | -413,694,461,915,479,100 | 39.85 | 114 | 0.720522 | false |
MKLab-ITI/reveal-user-annotation | reveal_user_annotation/rabbitmq/rabbitmq_util.py | 1 | 3042 | __author__ = 'Georgios Rizos (georgerizos@iti.gr)'
import sys
import subprocess
import urllib
from amqp import Connection, Message
from amqp.exceptions import PreconditionFailed
if sys.version_info > (3,):
import urllib.parse as urlparse
else:
import urlparse
def translate_rabbitmq_url(url):
if url[0:... | apache-2.0 | -7,088,256,928,776,268,000 | 27.971429 | 112 | 0.635766 | false |
bentzinir/Buffe | layers/conv_pool.py | 1 | 3468 | import theano as t
import numpy as np
import theano.tensor as tt
from theano.tensor.nnet import conv
from theano.tensor.signal import downsample
import common
rng = np.random.RandomState(23455)
class CONV_POOL(object):
"""Conv Pool Layer of a convolutional network """
def __init__(self, filter_shape, image_s... | mit | 1,760,589,534,825,072,000 | 33.68 | 88 | 0.5891 | false |
y4ns0l0/collectd-ceph | plugins/ceph_latency_plugin.py | 1 | 3887 | #!/usr/bin/env python
#
# vim: tabstop=4 shiftwidth=4
# 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; only version 2 of the License is applicable.
#
# This program is distributed in the hope th... | gpl-2.0 | 4,239,711,054,730,847,700 | 34.336364 | 129 | 0.624132 | false |
eepalms/gem5-newcache | src/sim/Process.py | 1 | 3132 | # Copyright (c) 2005-2008 The Regents of The University of Michigan
# 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 ... | bsd-3-clause | -4,790,954,474,984,413,000 | 47.9375 | 79 | 0.735951 | false |
simbits/Lumiere | cabinet_orig.py | 1 | 2565 | #!/usr/bin/env python
import random
import socket
import struct
import sys
import time
from Adafruit_MCP230xx import Adafruit_MCP230XX
CABINET_VERSION='1.0b'
START_MSG='## Cabinet version %s ##' % (CABINET_VERSION)
MCAST_GRP = ('224.19.79.1', 9999)
DRAWERS = 9
USE_PULLUPS = 1
RETRIGGER_DELAY = 10 #seconds
WAIT_... | mit | -227,441,266,886,782,400 | 29.176471 | 68 | 0.527875 | false |
theetcher/fxpt | fxpt/fx_refsystem/options_dialog_ui.py | 1 | 4062 | # -*- coding: utf-8 -*-
# Form implementation generated from reading ui file 'options_dialog_ui.ui'
#
# Created: Fri Nov 18 22:58:31 2016
# by: pyside-uic 0.2.15 running on PySide 1.2.4
#
# WARNING! All changes made in this file will be lost!
from PySide import QtCore, QtGui
class Ui_Dialog(object):
def set... | mit | 1,141,909,398,221,489,200 | 57.869565 | 137 | 0.727228 | false |
KrisHammerberg/DEMtools | demtools.py | 1 | 4546 | # -*- coding: utf-8 -*-
"""
/***************************************************************************
DemTools
A QGIS plugin
A suite of tools for doing neat things with DEMs
-------------------
begin : 2014-05-15
copyrigh... | gpl-2.0 | -3,094,973,200,494,068,700 | 37.525424 | 183 | 0.543995 | false |
thinkopensolutions/tkobr-addons | tko_partner_relatives/__manifest__.py | 1 | 1805 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# Thinkopen Brasil
# Copyright (C) Thinkopen Solutions Brasil (<http://www.tkobr.com>).
#
# This ... | agpl-3.0 | 7,609,688,550,439,498,000 | 33.711538 | 90 | 0.579501 | false |
WeAreWizards/proppy | proppy/proposal.py | 1 | 6603 | from collections import defaultdict
from proppy.validators import (
is_currency,
is_date,
is_percentage,
is_present,
are_valid_deliverables,
are_valid_rates
)
from proppy.utils import (
get_work_days_interval,
to_date
)
class Proposal(object):
validation_rules = {
'custome... | mit | 5,684,873,120,759,950,000 | 34.12234 | 79 | 0.562169 | false |
dann4520/vigenere_encoder_decoder | vigenere_encoder_decoder.py | 1 | 9778 | #written using Python 2.7.8
cipher_library = [{"A": "A", "B": "B", "C": "C", "D": "D", "E": "E", "F": "F", "G": "G", "H": "H", "I": "I", "J": "J", "K": "K", "L": "L", "M": "M", "N": "N", "O": "O", "P": "P", "Q": "Q", "R": "R", "S": "S", "T": "T", "U": "U", "V": "V", "W": "W", "X": "X", "Y": "Y", "Z": "Z"},
... | mit | -7,248,983,136,332,615,000 | 99.804124 | 279 | 0.275312 | false |
jeroanan/GameCollection | UI/Handlers/HandlerFactory.py | 1 | 2201 | # copyright (c) David Wilson 2015
# This file is part of Icarus.
# Icarus is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# Icarus is... | gpl-3.0 | 6,035,370,178,296,243,000 | 34.5 | 93 | 0.665607 | false |
alex-pardo/ANLP-PROJECT | findDemonyms.py | 1 | 1884 |
import re
from string import *
import sys
from nltk import *
import locale
from wikitools import wiki
from wikitools import api
from wikitools import page
from wikitools import category
wikiAPI = {
'en': "http://en.wikipedia.org/w/api.php"}
site = wiki.Wiki(wikiAPI['en'])
def generateDemonym(place, add, repl... | apache-2.0 | 5,177,841,268,757,151,000 | 20.409091 | 73 | 0.654989 | false |
wzong/TinyCloud | virtualbox/apis.py | 1 | 3618 | import json
import os
from django.http import JsonResponse, StreamingHttpResponse
from django.views.decorators.http import require_http_methods
from authentication import authenticator
from machine import machine_controller
from virtualbox import virtualbox_controller
GUEST_ADDITIONS_DIR = '/var/tinymakecloud/additi... | apache-2.0 | 4,134,940,897,749,442,000 | 30.189655 | 76 | 0.698729 | false |
qilicun/python | python2/PyMOTW-1.132/PyMOTW/sqlite3/sqlite3_transaction_commit.py | 1 | 1131 | #!/usr/bin/env python
# encoding: utf-8
#
# Copyright (c) 2010 Doug Hellmann. All rights reserved.
#
"""Creating the schema in an sqlite3 database.
"""
#end_pymotw_header
import sqlite3
db_filename = 'todo.db'
def show_projects(conn):
cursor = conn.cursor()
cursor.execute('select name, description from proj... | gpl-3.0 | 4,388,495,015,724,249,600 | 23.586957 | 71 | 0.671972 | false |
HewlettPackard/oneview-ansible | library/oneview_san_manager_facts.py | 1 | 3801 | #!/usr/bin/python
# -*- coding: utf-8 -*-
###
# Copyright (2016-2017) Hewlett Packard Enterprise Development LP
#
# 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/licen... | apache-2.0 | 427,369,213,773,898,300 | 29.902439 | 110 | 0.676401 | false |
madmath/sous-chef | src/order/management/commands/generateorders.py | 1 | 1511 | from django.core.management.base import BaseCommand
from order.models import Order
from member.models import Client
from datetime import datetime
from django.contrib.admin.models import LogEntry, ADDITION, CHANGE
class Command(BaseCommand):
help = 'Generate orders for all clients using his preferences'
def a... | agpl-3.0 | 185,264,954,829,694,800 | 34.97619 | 69 | 0.581072 | false |
saihttam/kaggle-axa | RobustRegressionDriver.py | 1 | 5500 | import numpy as np
from sklearn.ensemble import GradientBoostingRegressor
from random import sample, seed
from sklearn.decomposition import TruncatedSVD
from math import floor
from sklearn import cross_validation
import numpy as np
from numpy.linalg import norm, svd
def inexact_augmented_lagrange_multiplier(X, lmbda=... | bsd-2-clause | 4,683,779,648,376,033,000 | 42.65873 | 141 | 0.586909 | false |
raymondanthony/youtube-dl | youtube_dl/extractor/xnxx.py | 1 | 1491 | # encoding: utf-8
from __future__ import unicode_literals
import re
from .common import InfoExtractor
from ..utils import (
compat_urllib_parse,
)
class XNXXIE(InfoExtractor):
_VALID_URL = r'^https?://(?:video|www)\.xnxx\.com/video(?P<id>[0-9]+)/(.*)'
_TEST = {
'url': 'http://video.xnxx.com/vide... | unlicense | 5,536,822,106,596,122,000 | 29.408163 | 80 | 0.495973 | false |
Fuchida/Archive | albme-py/albme.py | 1 | 3547 | """Perform automated searches against http://www.albme.org/.
The script will get license information such as the licensee name,
license number and expiration date information of a medical professional.
This information is then saved to a json file
"""
import json
import requests
import grequests
from BeautifulSoup im... | mit | -9,057,134,204,100,410,000 | 26.076336 | 75 | 0.728503 | false |
smartinov/fennec | fennec/libs/importer/importer.py | 1 | 3594 | from rest_framework.renderers import JSONRenderer
from fennec.apps.metamodel.serializers import ColumnSerializer, BasicSchemaSerializer, BasicTableSerializer, BasicIndexSerializer, \
ForeignKeyBasicSerializer
from fennec.apps.repository.models import BranchRevisionChange
from fennec.apps.metamodel.models import Ch... | gpl-3.0 | 3,583,280,857,935,306,000 | 32.287037 | 132 | 0.618809 | false |
co-ment/comt | src/cm/utils/comment_positioning.py | 1 | 7762 | # -*- coding: utf-8 -*-
from difflib import SequenceMatcher
#from cm.utils.spannifier import Spannifier
import sys, operator
from cm.utils.spannifier import spannify
from cm.converters.pandoc_converters import pandoc_convert
import logging
from cm.utils.spannifier import get_the_soup
import re
import html5lib
from htm... | agpl-3.0 | 467,451,743,071,097,000 | 39.831579 | 188 | 0.577597 | false |
esquire-/weather | weather.py | 1 | 1797 | #!/usr/bin/python
'''
Weather.py
John Heenan
14 February 2014
A simple utlity to send notifications to your phone when it starts raining outside of your windowless CS lab.
Run as a login item/launchd process/drop it in .bashrc and it will only call you when you're in the lab.
'''
import urllib2
import json
import time... | mpl-2.0 | 5,054,473,239,764,113,000 | 28 | 182 | 0.722315 | false |
sharoonthomas/trytond-report-html-stock | tests/test_views_depends.py | 1 | 1195 | # -*- coding: utf-8 -*-
import sys
import os
DIR = os.path.abspath(os.path.normpath(os.path.join(
__file__, '..', '..', '..', '..', '..', 'trytond'
)))
if os.path.isdir(DIR):
sys.path.insert(0, os.path.dirname(DIR))
import unittest
import trytond.tests.test_tryton
from trytond.tests.test_tryton import test_vie... | bsd-3-clause | 2,409,269,749,330,876,400 | 21.980769 | 69 | 0.59749 | false |
Ayrx/cryptography | src/_cffi_src/openssl/x509v3.py | 1 | 9359 | # This file is dual licensed under the terms of the Apache License, Version
# 2.0, and the BSD License. See the LICENSE file in the root of this repository
# for complete details.
from __future__ import absolute_import, division, print_function
INCLUDES = """
#include <openssl/x509v3.h>
/*
* This is part of a work-... | bsd-3-clause | -559,673,534,380,414,200 | 30.725424 | 79 | 0.711508 | false |
NLeSC/PattyAnalytics | scripts/registration.py | 1 | 3140 | #!/usr/bin/env python2.7
"""Registration script.
Usage:
registration.py [-h] [-d <sample>] [-U] [-u <upfile>] [-c <camfile>] <source> <drivemap> <footprint> <output>
Positional arguments:
source Source LAS file
drivemap Target LAS file to map source to
footprint Footprint for the source LAS file
... | apache-2.0 | -5,553,458,156,020,115,000 | 27.288288 | 111 | 0.634076 | false |
ghetzel/webfriend | webfriend/utils/__init__.py | 1 | 1517 | import os.path
import random
import inspect
import importlib
import string
PACKAGE_ROOT = os.path.abspath(
os.path.dirname(
os.path.dirname(__file__)
)
)
PACKAGE_NAME = os.path.basename(PACKAGE_ROOT)
def random_string(count, charset=string.lowercase + string.digits):
return ''.join(random.sample... | bsd-2-clause | 6,987,214,187,512,982,000 | 20.671429 | 87 | 0.552406 | false |
asvetlov/bloggertool | lib/bloggertool/commands/info.py | 1 | 3641 | # commands/info.py
# Copyright (C) 2011-2014 Andrew Svetlov
# andrew.svetlov@gmail.com
#
# This module is part of BloggerTool and is released under
# the MIT License: http://www.opensource.org/licenses/mit-license.php
import os
from textwrap import dedent
from bloggertool.exceptions import ConfigError
from bloggertoo... | mit | 163,598,516,552,405,660 | 35.41 | 78 | 0.515243 | false |
nylas/sync-engine | inbox/mailsync/backends/imap/generic.py | 1 | 38201 | # deal with unicode literals: http://www.python.org/dev/peps/pep-0263/
# vim: set fileencoding=utf-8 :
"""
----------------
IMAP SYNC ENGINE
----------------
Okay, here's the deal.
The IMAP sync engine runs per-folder on each account.
Only one initial sync can be running per-account at a time, to avoid
hammering the... | agpl-3.0 | -1,116,494,582,475,538,600 | 43.207176 | 91 | 0.586333 | false |
ros2/rosidl | rosidl_cli/rosidl_cli/command/generate/api.py | 1 | 3504 | # Copyright 2021 Open Source Robotics Foundation, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | 1,224,383,898,062,600,000 | 34.393939 | 80 | 0.710616 | false |
jtaghiyar/kronos | kronos/pipelineui.py | 1 | 3217 | '''
Created on May 9, 2014
@author: jtaghiyar
'''
import argparse
import os
parser = argparse.ArgumentParser(description='Pipeline user interface')
parser.add_argument('-b', '--job_scheduler',
default='drmaa',
choices=['sge','drmaa'],
help="job schedule... | mit | -5,165,773,639,326,006,000 | 32.863158 | 79 | 0.484613 | false |
APSL/django-kaio | kaio/mixins/email.py | 1 | 2693 | # -*- coding: utf-8 -*-
import logging
import os
from kaio import Options
from functools import partial
logger = logging.getLogger(__name__)
opts = Options()
get = partial(opts.get, section='Email')
class EmailMixin(object):
"""Settings para enviar emails"""
# Django settings: https://docs.djangoproject.c... | bsd-3-clause | -6,720,387,585,946,271,000 | 26.20202 | 93 | 0.629781 | false |
ozgurgunes/django-cmskit | cmskit/slideshow/migrations/0001_initial.py | 1 | 5691 | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Adding model 'Slideshow'
db.create_table('cmsplugin_slideshow', (
('cmsplugin_ptr', self.gf('d... | mit | 5,875,987,426,555,961,000 | 64.425287 | 155 | 0.583377 | false |
les69/calvin-base | calvin/runtime/south/plugins/storage/twistedimpl/securedht/tests/test_dht_server_nice4.py | 1 | 7957 | # -*- coding: utf-8 -*-
# Copyright (c) 2015 Ericsson AB
#
# 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 ... | apache-2.0 | -2,925,898,608,843,406,300 | 43.452514 | 147 | 0.590926 | false |
mazaclub/electrum-nmc | gui/qt/lite_window.py | 1 | 31019 | import sys
# Let's do some dep checking and handle missing ones gracefully
try:
from PyQt4.QtCore import *
from PyQt4.QtGui import *
from PyQt4.Qt import Qt
import PyQt4.QtCore as QtCore
except ImportError:
print "You need to have PyQT installed to run Electrum-NMC in graphical mode."
print "I... | gpl-3.0 | -6,350,053,012,183,332,000 | 34.490847 | 169 | 0.617299 | false |
OCM-Lab-PUC/switch-chile | python_utility_scripts/create_transmission_csv.py | 1 | 5810 | # -*- coding: utf-8 -*-
# Copyright 2016 The Switch-Chile Authors. All rights reserved.
# Licensed under the Apache License, Version 2, which is in the LICENSE file.
# Operations, Control and Markets laboratory at Pontificia Universidad
# Católica de Chile.
import pandas, os, re, datetime, sys
from unidecode import un... | apache-2.0 | 7,827,939,213,781,622,000 | 38.496599 | 297 | 0.643472 | false |
napalm-automation/napalm-yang | napalm_yang/models/openconfig/network_instances/network_instance/protocols/protocol/ospfv2/areas/area/lsdb/lsa_types/lsa_type/lsas/lsa/opaque_lsa/traffic_engineering/tlvs/tlv/node_attribute/sub_tlvs/__init__.py | 1 | 14848 | # -*- coding: utf-8 -*-
from operator import attrgetter
from pyangbind.lib.yangtypes import RestrictedPrecisionDecimalType
from pyangbind.lib.yangtypes import RestrictedClassType
from pyangbind.lib.yangtypes import TypedListType
from pyangbind.lib.yangtypes import YANGBool
from pyangbind.lib.yangtypes import YANGListTy... | apache-2.0 | 8,897,465,015,285,164,000 | 36.589873 | 533 | 0.543373 | false |
Jackojc/Asciify | example/matrix.py | 1 | 1374 | from asciify import asciify
import random
import time
import pygame
width, height = (60, 30)
add_per_frame = 5
render = asciify(width, height, "font", fontsize=16)
random.seed(time.time())
Particles = [
[
random.randint(0, width),
random.randint(-1, height),
... | mit | -4,344,498,825,365,630,500 | 31.714286 | 134 | 0.534207 | false |
SvichkarevAnatoly/Course-Python-Bioinformatics | semester2/task8/exercise2.py | 1 | 3387 | import numpy
import random
import matplotlib.pyplot as plot
from sklearn.tree import DecisionTreeRegressor
from sklearn import tree
a = 1
b = 2
# Build a simple data set with y = x + random
nPoints = 1000
# x values for plotting
xPlot = [(float(i) / float(nPoints) - 0.5) for i in range(nPoints + 1)]
# x needs to b... | gpl-2.0 | -6,363,771,044,119,632,000 | 27.225 | 73 | 0.691172 | false |
chrisjdavie/shares | machine_learning/sklearn_dataset_format.py | 1 | 1160 | '''
Created on 2 Sep 2014
@author: chris
'''
'''File format - data, length of data, containing unicode
- target, length of data, contains int reference to target
- target_names, type names relative to target
- filenames, names of files storing data (probably target too)
... | mit | 4,733,438,516,823,196,000 | 30.378378 | 86 | 0.552586 | false |
SUSE/kiwi | kiwi/filesystem/fat16.py | 1 | 1400 | # Copyright (c) 2015 SUSE Linux GmbH. All rights reserved.
#
# This file is part of kiwi.
#
# kiwi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any la... | gpl-3.0 | -5,064,288,651,772,245,000 | 33.146341 | 70 | 0.666429 | false |
jiarong/SSUsearch | scripts/count-taxon.py | 1 | 3226 | #! /usr/bin/env python
# count the taxon number from mothur taxonomy file
# by gjr; 080614
"""
Count the taxon number for each taxon in mothur taxonomy file
% python <thisFile> <sample.gg.taxonomy> <outfile.table>
"""
import sys
import os
import collections
#EXCLUDE = ['Archaea', 'Eukaryota', 'unknown']
EXCLUDE = [... | bsd-3-clause | -8,817,099,791,117,188,000 | 23.815385 | 77 | 0.490081 | false |
marekjm/pyversion | tests.py | 1 | 12014 | #!/usr/bin/env python3
import unittest
from pyversion.version import Version, Comparison, valid
# if set to True tests will be verbose
DEBUG = True
# tuple structure: (version, version, desired_result, strict)
versions_to_compare_lt = [ ('2.0.0', '3.0.0', True, True),
('3.0.1', '3.1... | gpl-3.0 | 7,190,466,796,804,549,000 | 42.528986 | 97 | 0.43724 | false |
giubil/trackit | api/files/api/app/s3_billing_transfer.py | 1 | 8777 | from object_storage import S3BucketObjectStore
from config import BILLING_FILE_REGEX, CLIENT_BILLING_BUCKET, IMPORT_BILLING_AWS_KEY, IMPORT_BILLING_AWS_SECRET, LOCAL_BILLS_DIR
from es import client
from es.awsdetailedlineitem import AWSDetailedLineitem
from contextlib import contextmanager
from zipfile import ZipFile
f... | apache-2.0 | 2,701,550,056,858,239,000 | 31.872659 | 150 | 0.583115 | false |
ninly/pphrase | pphrase.py | 1 | 5060 | """ pphrase.py : Generate a random passphrase
Generate a random passphrase from a subset of the most common
words (max 10000) in Google's trillion-word corpus. See
http://xkcd.com/936 for the motivation and inspiration.
Licensed under terms of MIT license (see LICENSE-MIT)
Copyright (c) 2014 Jason... | mit | 5,217,362,287,712,699,000 | 29.481928 | 87 | 0.556917 | false |
dreamhost/akanda-appliance | test/unit/drivers/test_hostname.py | 1 | 2016 | # Copyright 2014 DreamHost, LLC
#
# Author: DreamHost, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicabl... | apache-2.0 | 8,984,808,868,207,687,000 | 31.516129 | 77 | 0.638889 | false |
kratorius/ads | python/dictionary/BST.py | 1 | 14443 | import unittest
import random
random.seed()
class BSTDict(object):
""""
Implementation of a dictionary based on binary search trees.
"""
class BSTNode(object):
def __init__(self, key, value):
self.key = key
self.value = value
self.parent = None
... | mit | -827,030,094,329,402,400 | 29.089583 | 92 | 0.495396 | false |
Jorge-C/bipy | skbio/maths/stats/distribution.py | 1 | 6102 | #!/usr/bin/env python
# ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# ---------------------... | bsd-3-clause | -6,199,607,592,344,027,000 | 24.214876 | 79 | 0.493445 | false |
gustavoatt/consultas | consultas_proyecto/consultas_proyecto/settings/base.py | 1 | 7398 | """Common settings and globals."""
from os.path import abspath, basename, dirname, join, normpath
from sys import path
########## PATH CONFIGURATION
# Absolute filesystem path to the Django project directory:
DJANGO_ROOT = dirname(dirname(abspath(__file__)))
# Absolute filesystem path to the top-level project fold... | mit | -4,859,612,239,694,173,000 | 27.785992 | 98 | 0.694107 | false |
crccheck/gallery-cms | gallery/routes.py | 1 | 2047 | import os
from io import BytesIO
from itertools import islice
from pathlib import Path
from PIL import Image
from starlette.responses import Response, PlainTextResponse
# TODO centralize this
BASE_DIR = os.getenv("BASE_DIR", os.path.dirname(os.path.abspath(__file__)))
THUMBNAIL_SIZE = (300, 300)
DEFAULT_SIZE = 200
... | gpl-3.0 | -4,949,062,279,888,032,000 | 30.492308 | 82 | 0.625305 | false |
FloatingGhost/skype4py | Skype4Py/call.py | 1 | 18207 | """Calls, conferences.
"""
__docformat__ = 'restructuredtext en'
from .utils import *
from .enums import *
class DeviceMixin(object):
def _Device(self, Name, DeviceType=None, Set=type(None)):
args = args2dict(self._Property(Name, Cache=False))
if Set is type(None):
for dev, value in ... | bsd-3-clause | -244,468,576,796,218,620 | 24.752475 | 112 | 0.598396 | false |
google/loaner | loaner/web_app/backend/models/bootstrap_status_model.py | 1 | 1339 | # Copyright 2018 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 | -378,537,550,209,617,500 | 36.194444 | 77 | 0.757282 | false |
Bob131/obraz | obraz.py | 1 | 20221 | # -*- coding: utf-8 -*-
# Copyright (c) 2012-2014 Andrey Vlasovskikh
#
# 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 limitation the rights
# to use, ... | mit | 4,325,641,461,589,983,700 | 27.084722 | 79 | 0.583997 | false |
zenn1989/scoria-interlude | L2Jscoria-Game/data/scripts/quests/380_BringOutTheFlavorOfIngredients/__init__.py | 1 | 3959 | # Made by disKret & DrLecter
import sys
from com.l2scoria import Config
from com.l2scoria.gameserver.model.quest import State
from com.l2scoria.gameserver.model.quest import QuestState
from com.l2scoria.gameserver.model.quest.jython import QuestJython as JQuest
qn = "380_BringOutTheFlavorOfIngredients"
#NPC
ROLLANT =... | gpl-3.0 | -8,783,527,725,578,094,000 | 28.333333 | 188 | 0.635767 | false |
pepetreshere/odoo | addons/account_fleet/models/account_move.py | 2 | 1946 | # -*- coding: utf-8 -*-
# Part of Odoo. See LICENSE file for full copyright and licensing details.
from odoo import models, fields, api, _
class AccountMove(models.Model):
_inherit = 'account.move'
def _post(self, soft=True):
vendor_bill_service = self.env.ref('account_fleet.data_fleet_service_type_... | agpl-3.0 | 7,216,238,615,381,273,000 | 40.404255 | 139 | 0.607914 | false |
3dfxsoftware/cbss-addons | smile_cross_selling/__openerp__.py | 1 | 2151 | # -*- encoding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2013 Smile (<http://www.smile.fr>). All Rights Reserved
#
# This program is free software: you can redistribute it and/or modify
# it under th... | gpl-2.0 | -5,505,021,721,958,807,000 | 36.736842 | 122 | 0.621106 | false |
LaboratoireMecaniqueLille/crappy | crappy/blocks/grapher.py | 1 | 5641 | # coding: utf-8
import numpy as np
from .block import Block
from .._global import OptionalModule
try:
import matplotlib.pyplot as plt
from matplotlib.widgets import Button
except (ModuleNotFoundError, ImportError):
plt = OptionalModule("matplotlib")
Button = OptionalModule("matplotlib")
class Grapher(Block... | gpl-2.0 | -8,069,995,091,647,567,000 | 35.160256 | 79 | 0.601489 | false |
sam-m888/gprime | gprime/filters/rules/media/_hasattribute.py | 1 | 1778 | #
# gPrime - A web-based genealogy program
#
# Copyright (C) 2008 Gary Burton
#
# 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 ... | gpl-2.0 | -8,233,013,204,067,550,000 | 36.829787 | 79 | 0.538245 | false |
xi-studio/anime | newnet/show.py | 1 | 1080 | import numpy as np
import matplotlib.pyplot as plt
from scipy.sparse import csc_matrix
head = np.random.randint(low=0,high=10,size=20)
tail = np.random.randint(low=0,high=10,size=20)
row = np.arange(20)
data = np.ones(20)
a = csc_matrix((data, (row,head)),shape=(20,10)).toarray()
b = csc_matrix((data, (row,tail)),sha... | mit | 6,583,698,324,841,650,000 | 23.545455 | 65 | 0.642593 | false |
wahur666/kodok | python/Base64/ip-ban.py | 1 | 1179 | #!/usr/bin/python3
__author__ = 'Imre'
import sys
import os
import re
def main():
if len(sys.argv) == 2:
inputfile = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0])), sys.argv[1])
if os.path.isfile(inputfile):
output = os.path.join(os.path.dirname(os.path.abspath(sys.argv[0]... | gpl-3.0 | -950,800,508,332,692,500 | 30.891892 | 92 | 0.433418 | false |
storecast/holon | holon/services/httplib.py | 1 | 1461 | from __future__ import absolute_import
from . import HttpService
from httplib import HTTPConnection, HTTPException, HTTPSConnection
from socket import timeout, error
import time
class HttpLibHttpService(HttpService):
"""
HttpService using python batteries' httplib.
"""
def __init__(self, *args, **kwa... | bsd-2-clause | 40,881,219,972,397,120 | 34.634146 | 191 | 0.614648 | false |
rockneurotiko/wirecloud | src/wirecloud/platform/workspace/mashupTemplateGenerator.py | 1 | 12686 | # -*- coding: utf-8 -*-
# Copyright (c) 2012-2015 CoNWeT Lab., Universidad Politécnica de Madrid
# This file is part of Wirecloud.
# Wirecloud is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either v... | agpl-3.0 | 8,939,400,542,287,359,000 | 37.093093 | 128 | 0.607647 | false |
johnbywater/eventsourcing | dev/prepare-distribution.py | 1 | 3352 | import os
import subprocess
import sys
from subprocess import CalledProcessError
from time import sleep
def main():
# Validate current working dir (should be project root).
proj_path = os.path.abspath(".")
readme_path = os.path.join(proj_path, "README.md")
if os.path.exists(readme_path):
asse... | bsd-3-clause | 3,576,165,509,256,950,000 | 28.928571 | 88 | 0.563842 | false |
reedessick/pointy-Poisson | multiPopVectors2OmegaScan.py | 1 | 6042 | #!/usr/bin/python
usage = "multiPopVectors2OmegaScan.py [--options] vectors.txt"
description = "writes OmegaScan config files based on the multi-population vectors supplied. Assumes KW channel naming conventions. Also writes corresponding comand lines to run OmegaScans for each vector supplied."
author = "reed.essick@l... | mit | -8,005,188,117,140,197,000 | 31.483871 | 215 | 0.624297 | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.