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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
viiru-/pytrainer | imports/file_garmintools.py | 1 | 4704 | # -*- coding: iso-8859-1 -*-
#Copyright (C) Fiz Vazquez vud1@sindominio.net
# Modified by dgranda
#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 opt... | gpl-2.0 | 7,918,699,843,901,383,000 | 29.348387 | 100 | 0.691964 | false | 3.241902 | false | false | false |
PytLab/catplot | catplot/descriptors.py | 1 | 3864 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
""" Descriptors for energy profile line classes.
"""
import numpy as np
from catplot.chem_parser import RxnEquation
class DescriptorBase(object):
""" Abstract base class for other descriptor class.
"""
def __init__(self, name):
self.name = name
... | mit | -1,394,440,910,215,525,000 | 28.052632 | 85 | 0.596273 | false | 3.954964 | false | false | false |
kakaba2009/MachineLearning | python/src/tensor/rnnsin.py | 1 | 2594 | import tensorflow as tf
import numpy as np
import matplotlib.pyplot as plt
# Hyper Parameters
TIME_STEP = 10 # rnn time step
INPUT_SIZE = 1 # rnn input size
CELL_SIZE = 32 # rnn cell size
LR = 0.02 # learning rate
# show data
steps = np.linspace(0, np.pi*2, 100, dtype=np.float32)
x_np = np.s... | apache-2.0 | -271,989,203,358,314,020 | 37.716418 | 119 | 0.609869 | false | 3.026838 | false | false | false |
jonathanslenders/python-prompt-toolkit | prompt_toolkit/layout/processors.py | 1 | 34173 | """
Processors are little transformation blocks that transform the fragments list
from a buffer before the BufferControl will render it to the screen.
They can insert fragments before or after, or highlight fragments by replacing the
fragment types.
"""
import re
from abc import ABCMeta, abstractmethod
from typing imp... | bsd-3-clause | -308,874,531,053,288,300 | 32.209913 | 88 | 0.590642 | false | 4.540056 | false | false | false |
selective-inference/selective-inference | selectinf/randomized/sandbox/greedy_step.py | 3 | 7796 | import functools
import numpy as np
import regreg.api as rr
from .query import query, optimization_sampler
from .base import restricted_estimator
class greedy_score_step(query):
def __init__(self,
loss,
penalty,
active_groups,
candidate_grou... | bsd-3-clause | -5,065,224,275,244,124,000 | 40.468085 | 138 | 0.558363 | false | 4.193653 | false | false | false |
Orav/kbengine | kbe/src/lib/python/Tools/demo/hanoi.py | 1 | 4755 | #!/usr/bin/env python3
"""
Animated Towers of Hanoi using Tk with optional bitmap file in background.
Usage: hanoi.py [n [bitmapfile]]
n is the number of pieces to animate; default is 4, maximum 15.
The bitmap file can be any X11 bitmap file (look in /usr/include/X11/bitmaps for
samples); it is displayed ... | lgpl-3.0 | 5,756,272,051,173,879,000 | 28.876623 | 80 | 0.511041 | false | 3.178476 | false | false | false |
Gordon-Yiu/Raspberry_Robot_Car | mini_car/car_drive.py | 1 | 6454 | #!/usr/bin/python
from Adafruit_PWM_Servo_Driver import PWM
import time
'''
LEARN ABSTRACTION WITH THIS.
move portion of car, how to move car.
car_driver.py
This provide some useful class to be used while driving wheels.
gordon.yiu@gmail.com
'''
#++wheel_drive++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++... | gpl-2.0 | 7,539,598,015,199,499,000 | 30.637255 | 97 | 0.651379 | false | 2.671358 | false | false | false |
aaronorosen/horizon-congress | openstack_dashboard/dashboards/project/instances/tables.py | 1 | 30596 | # Copyright 2012 Nebula, 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 or agree... | apache-2.0 | -2,702,519,847,698,563,600 | 34.995294 | 79 | 0.59364 | false | 4.061057 | false | false | false |
aadeg/TelegramAPy | telegramapy/api.py | 1 | 21062 | '''
TelegramAPy
Copyright (C) 2015 Giove Andrea
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 i... | gpl-2.0 | -8,872,041,445,678,480,000 | 43.908316 | 84 | 0.609106 | false | 4.117693 | false | false | false |
sam-m888/addons-source | RestoreHist/restorehist.gpr.py | 1 | 1563 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2018 Paul Culley
#
# 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)... | gpl-2.0 | -8,244,279,996,886,517,000 | 36.214286 | 79 | 0.635317 | false | 4.028351 | false | false | false |
joshua-cogliati-inl/raven | framework/utils/cached_ndarray.py | 1 | 14661 | # Copyright 2017 Battelle Energy Alliance, LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | -8,632,705,698,040,168,000 | 36.786082 | 158 | 0.630107 | false | 3.794255 | false | false | false |
mr555ru/orbotor | orbotor/helldebris_collection.py | 1 | 2041 | # Orbotor - arcade with orbit mechanics
# Copyright (C) 2014 mr555ru
#
# 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 | -7,405,260,871,787,861,000 | 35.446429 | 119 | 0.626654 | false | 3.543403 | false | false | false |
dcramer/sentry-old | sentry/db/backends/redis.py | 1 | 5234 | """
sentry.db.backends.redis
~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2010 by the Sentry Team, see AUTHORS for more details.
:license: BSD, see LICENSE for more details.
"""
from __future__ import absolute_import
from sentry.db.backends.base import SentryBackend
import datetime
import redis
class RedisBackend(Sent... | bsd-3-clause | -4,495,547,490,396,216,300 | 36.927536 | 129 | 0.625716 | false | 3.363753 | false | false | false |
RuiNascimento/krepo | script.module.lambdascrapers/lib/lambdascrapers/sources_ lambdascrapers/en/gowatchseries.py | 1 | 5534 | # -*- coding: UTF-8 -*-
'''
gowatchseries scraper for Exodus forks.
Nov 9 2018 - Checked
Updated and refactored by someone.
Originally created by others.
'''
import re,urllib,urlparse,time,json
from resources.lib.modules import control
from resources.lib.modules import cleantitle
from resources.lib.mo... | gpl-2.0 | -6,281,324,116,896,142,000 | 41.244275 | 153 | 0.501446 | false | 3.933191 | false | false | false |
cloudspaces/eyeos-u1db | eyeos/extern/u1db/oauth_client.py | 1 | 24882 | """
The MIT License
Copyright (c) 2007 Leah Culver
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, copy, modify, merge, publis... | agpl-3.0 | 1,903,311,140,597,050,600 | 34.04507 | 99 | 0.617153 | false | 4.330317 | false | false | false |
seanxwzhang/LeetCode | Airbnb/boggle_game.py | 1 | 1221 | # Boggle game, use trie to speed up search
def getTrie(words):
root = {}
for w in words:
node = root
for char in w:
node = node.setdefault(char, {})
node[None] = None
return root
def boggleGame(board, words):
trie, res, visited = getTrie(words), set(), set()
for... | mit | 1,910,557,488,821,459,000 | 31.131579 | 112 | 0.531532 | false | 2.707317 | false | false | false |
splice/report_server | src/report_server/dev/urls.py | 1 | 4774 | # Copyright 2012 Red Hat, Inc.
#
# This software is licensed to you under the GNU General Public
# License as published by the Free Software Foundation; either version
# 2 of the License (GPLv2) or (at your option) any later version.
# There is NO WARRANTY for this software, express or implied,
# including the implied... | gpl-2.0 | 8,071,183,468,007,700,000 | 45.803922 | 106 | 0.753456 | false | 3.422222 | false | false | false |
rbaron/pyRemoteControl | Xlib/X.py | 1 | 10210 | # Xlib.X -- basic X constants
#
# Copyright (C) 2000 Peter Liljenberg <petli@ctrl-c.liu.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 2 of the License, or
# ... | gpl-2.0 | 61,699,535,139,525,190 | 23.309524 | 78 | 0.629089 | false | 3.171792 | false | false | false |
pyfa-org/eos | eos/eve_obj/custom/subsystem_slot_bonus/__init__.py | 1 | 1901 | # ==============================================================================
# Copyright (C) 2011 Diego Duclos
# Copyright (C) 2011-2018 Anton Vorobyov
#
# This file is part of Eos.
#
# Eos is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as publi... | lgpl-3.0 | -1,085,220,742,864,739,200 | 33.563636 | 80 | 0.689637 | false | 4.079399 | false | false | false |
kaiw/meld | meld/vc/_vc.py | 1 | 10670 | # Copyright (C) 2002-2005 Stephen Kennedy <stevek@gnome.org>
# Copyright (C) 2010, 2012-2013 Kai Willadsen <kai.willadsen@gmail.com>
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions
# are met:
#
# 1. Redistributions of source code... | gpl-2.0 | -5,581,524,572,760,240,000 | 32.034056 | 115 | 0.636082 | false | 3.99177 | false | false | false |
franblas/facialrecoChallenge | utils.py | 1 | 2555 | # -*- coding: utf-8 -*-
"""
Created on Tue Jun 16 17:42:56 2015
@author: Paco
"""
import numpy as np
from scipy import io
class Utils(object):
_feat_idx = None
def __init__(self): pass
def generate_pairs(self,label, n_pairs, positive_ratio, random_state=42):
rng = np.random.RandomS... | mit | -8,107,179,929,874,870,000 | 29.428571 | 84 | 0.493542 | false | 3.318182 | false | false | false |
multipath-tcp/mptcp-analysis-scripts | scripts_graph/time_retrans_reinj.py | 1 | 12176 | #! /usr/bin/python
# -*- coding: utf-8 -*-
#
# Copyright 2015 Quentin De Coninck
#
# 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... | gpl-3.0 | 6,935,468,327,297,236,000 | 48.295547 | 142 | 0.561104 | false | 3.611985 | false | false | false |
sidorov-si/ngser | select_longest_mrna.py | 1 | 4346 | #!/usr/bin/env python
"""
Select only the longest transcript for each gene in a GFF file.
Usage:
select_longest_mrna.py -i <input_GFF_file> -o <output_GFF_file>
Options:
-h --help Show this screen.
--version Show version.
-i <input_GFF_file> Input GFF file.
-o <output_GFF_file> O... | gpl-2.0 | 4,735,242,044,733,048,000 | 35.521008 | 94 | 0.566728 | false | 3.499195 | false | false | false |
SafeStack/ava | ava_core/gather/gather_abstract/views.py | 2 | 1675 | # flake8: noqa
import logging
from django.conf import settings
from rest_framework import status
from rest_framework.response import Response
from rest_framework.views import APIView
from ava_core.integration.integration_abstract.utils import retrieve_credential_from_database
log = logging.getLogger(__name__)
clas... | gpl-3.0 | 4,990,957,629,608,024,000 | 30.603774 | 93 | 0.657313 | false | 3.824201 | false | false | false |
ralphbean/moksha | moksha/api/widgets/global_resources/widget.py | 1 | 8452 | # This file is part of Moksha.
# Copyright (C) 2008-2010 Red Hat, 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 ... | apache-2.0 | -2,856,049,980,479,995,000 | 39.440191 | 116 | 0.610388 | false | 3.966213 | true | false | false |
chalet16/csv2asana | csv2asana.py | 1 | 3103 | #!/usr/bin/env python
"""csv2asana
Script to import csv file to Asana <http://asana.com>
Copyright (c) 2013 Witchakorn Kamolpornwijit <me@chalet16.com>
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 So... | mit | -3,322,892,965,359,383,600 | 39.298701 | 110 | 0.678698 | false | 3.62924 | false | false | false |
sekimura/httpclient | tests/test_client.py | 1 | 2818 | from unittest2 import TestCase
from httpclient import HTTPClient, __version__
from http import Request, Response
tests = {
'GET': {
'url': 'http://lumberjaph.net/',
'headers': {'Accept-Type': 'text/html'}
},
'POST': {
'url': 'http://lumberjaph.net/',
'headers': {'Content-Ty... | mit | -1,527,339,944,773,845,500 | 29.301075 | 113 | 0.614975 | false | 3.963432 | true | false | false |
sdispater/pendulum | tests/date/test_comparison.py | 1 | 5626 | from datetime import date
import pendulum
from ..conftest import assert_date
def test_equal_to_true():
d1 = pendulum.Date(2000, 1, 1)
d2 = pendulum.Date(2000, 1, 1)
d3 = date(2000, 1, 1)
assert d2 == d1
assert d3 == d1
def test_equal_to_false():
d1 = pendulum.Date(2000, 1, 1)
d2 = pen... | mit | -4,200,232,925,989,114,400 | 21.963265 | 55 | 0.612513 | false | 2.509367 | true | false | false |
aglitke/vdsm-rest | vdsmUtils.py | 1 | 1872 | # VDSM REST API
# Copyright (C) 2011 Adam Litke, IBM Corporation
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
# published by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, ... | gpl-2.0 | 2,100,828,488,821,522,200 | 31.275862 | 82 | 0.667735 | false | 3.62089 | false | false | false |
roberzguerra/scout | events/admin.py | 1 | 3071 | # -*- coding:utf-8 -*-
from django.contrib.admin import helpers
from django.core.checks import messages
from django.http import HttpResponse, HttpResponseRedirect
from django.utils.html import strip_tags
from django.utils.safestring import mark_safe
from django.utils.translation import ugettext_lazy as _
from django.c... | gpl-2.0 | 7,892,982,999,912,524,000 | 33.033333 | 110 | 0.659484 | false | 3.735366 | false | false | false |
lysol/lvlss | src/commands/make.py | 1 | 2218 | from command import Command, is_command, CommandException
from lobject import LObject
import copy
class Make(Command):
@is_command('m')
def m(self, player, *args):
return self.make(player, *args)
@is_command
def make(self, player, *args):
if len(args) < 2:
rai... | mit | 2,232,237,895,625,368,300 | 33.774194 | 76 | 0.609107 | false | 3.891228 | false | false | false |
Tehnix/PyIRCb | src/irc/serverObject.py | 1 | 2928 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
IRC servers...
"""
import src.irc.channelObject
import src.utilities as util
# NOTE: The logged in users dict loggedInUsers are in this format:
# {
# 'username': {
# 'lastLogin': 'unixtimestamp', # The last time you were logged in
# 'failedLoginA... | bsd-3-clause | 5,214,859,801,947,892,000 | 28.575758 | 83 | 0.556011 | false | 4.456621 | false | false | false |
mrroach/CentralServer | csrv/model/cards/runner/card01047.py | 1 | 1712 | from csrv.model import actions
from csrv.model import timing_phases
from csrv.model.cards import card_info
from csrv.model.cards import resource
class TrashCard(actions.Trash):
DESCRIPTION = 'Trash a card to gain 3[Credits]'
def __init__(self, game, player, card=None, card01047=None):
actions.Trash.__init__(... | apache-2.0 | -8,077,925,548,591,289,000 | 25.75 | 80 | 0.671145 | false | 3.212008 | false | false | false |
carlospatinos/security | assignment_hash/saltHashCracker.py | 1 | 4913 | #!/usr/bin/env python
import sqlite3 as lite
import sys
import hashlib
from itertools import product
from string import *
# The purpose of the script is to use multiple convinations of values to generate hashes and find one in the db
# It is believed that cyrpto function was something like: CommonHash($salt,$pass)
# ... | mit | -7,330,464,290,514,932,000 | 35.93985 | 172 | 0.651537 | false | 3.78214 | false | false | false |
tedlaz/pyted | tedqt/w_weekdays.py | 1 | 3924 | # -*- coding: utf-8 -*-
import PyQt5.QtWidgets as Qw
import PyQt5.QtCore as Qc
import PyQt5.QtGui as Qg
from tedqt import parameters as par
MSG_SELECT_DAYS = u'Επιλέξτε τις Εργάσιμες ημέρες\nΜε δεξί κλικ μηδενίστε'
BLANK, GREEN = range(2)
class Weekdays(Qw.QWidget):
'''
Weekdays selection ( [1,1,1,1,1,0,0... | gpl-3.0 | 7,413,681,050,623,874,000 | 28.838462 | 75 | 0.484145 | false | 3.346851 | false | false | false |
kave/cfgov-refresh | cfgov/cfgov/settings/base.py | 1 | 17712 | import os
from unipath import Path
from ..util import admin_emails
from django.conf import global_settings
# Repository root is 4 levels above this file
REPOSITORY_ROOT = Path(__file__).ancestor(4)
# This is the root of the Django project, 'cfgov'
PROJECT_ROOT = REPOSITORY_ROOT.child('cfgov')
V1_TEMPLATE_ROOT = PROJ... | cc0-1.0 | 376,246,915,815,030,600 | 33.127168 | 112 | 0.613595 | false | 3.439891 | false | false | false |
Vipul999ujawane/acad-search | acads/models.py | 1 | 1365 | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models
from django.conf import settings
import os
# Create your models here.
def get_file_path(instance,filename):
return (settings.MEDIA_ROOT+'/'+instance.subject.department_code+'/'+instance.subject.subject_code+'/'+filename)
... | mit | -6,668,321,317,811,468,000 | 36.916667 | 116 | 0.717216 | false | 3.491049 | false | false | false |
lpryszcz/bin | sam2hist.py | 1 | 2337 | #!/usr/bin/env python
desc="""Report histogram for given insert size data
"""
epilog="""Author:
l.p.pryszcz+git@gmail.com
Barcelona, 18/10/2012
"""
import argparse, os, sys
from datetime import datetime
def plot( isizes,outfn ):
"""
"""
import matplotlib.pyplot as plt
# the histogram of the data
... | gpl-3.0 | -4,127,235,398,792,027,000 | 28.225 | 123 | 0.570817 | false | 3.232365 | false | false | false |
antoyo/qutebrowser | tests/end2end/fixtures/webserver.py | 1 | 6167 | # vim: ft=python fileencoding=utf-8 sts=4 sw=4 et:
# Copyright 2015-2016 Florian Bruhin (The Compiler) <mail@qutebrowser.org>
#
# This file is part of qutebrowser.
#
# qutebrowser 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 S... | gpl-3.0 | 8,654,839,231,986,039,000 | 29.98995 | 79 | 0.622831 | false | 3.960822 | true | false | false |
fperez/sympy | sympy/functions/elementary/exponential.py | 1 | 17593 | from sympy.core.basic import Basic, S, C, sympify, Wild
from sympy.core.function import Lambda, Function, Function, expand_log
from sympy.core.cache import cacheit
from sympy.utilities.decorator import deprecated
from sympy.ntheory import multiplicity
from sympy.core.basic import Mul
class exp(Function):
nargs ... | bsd-3-clause | 7,480,009,559,343,754,000 | 31.700743 | 84 | 0.48218 | false | 3.531313 | false | false | false |
Harmon758/Harmonbot | Twitch/Harmonbot.py | 1 | 8336 |
from twitchio.ext import commands
import asyncio
import datetime
import os
import sys
import aiohttp
import asyncpg
import dotenv
import pyowm
from utilities import context
from utilities import logging
sys.path.insert(0, "..")
from units.games import eightball
sys.path.pop(0)
class Bot(commands.Bot):
def __in... | mit | -940,917,193,460,998,400 | 27.944444 | 105 | 0.658709 | false | 3.222265 | false | false | false |
oshtaier/robottelo | robottelo/cli/gpgkey.py | 1 | 1614 | # -*- encoding: utf-8 -*-
# vim: ts=4 sw=4 expandtab ai
"""
Usage::
hammer gpg [OPTIONS] SUBCOMMAND [ARG] ...
Parameters::
SUBCOMMAND subcommand
[ARG] ... subcommand arguments
Subcommands::
create Create a GPG Key
delete ... | gpl-3.0 | 91,599,838,922,302,180 | 23.830769 | 65 | 0.516729 | false | 4.624642 | false | false | false |
JacobMiki/Emotionnaise-python | webservice.py | 1 | 1554 | import tornado.web
import tornado.ioloop
from emotionnaise_modules import face, misc
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write('<html><body><form action="/" method="POST" enctype="multipart/form-data">'
'<input type="file" name="image" accept="image/... | mit | 9,073,968,678,771,002,000 | 29.714286 | 138 | 0.550193 | false | 3.673759 | false | false | false |
pyblish/pyblish-endpoint | pyblish_endpoint/server.py | 1 | 3326 | """Pyblish Endpoint Server"""
# Standard library
import os
import logging
import threading
# Dependencies
import flask
import flask.ext.restful
# Local library
import mocking
import resource
import service as service_mod
log = logging.getLogger("endpoint")
prefix = "/pyblish/v1"
resource_map = {
"/state": reso... | lgpl-3.0 | 6,864,502,370,278,140,000 | 22.928058 | 93 | 0.665364 | false | 3.81422 | false | false | false |
cuckoobox/cuckoo | cuckoo/common/dns.py | 1 | 3703 | # Copyright (C) 2010-2013 Claudio Guarnieri.
# Copyright (C) 2014-2016 Cuckoo Foundation.
# This file is part of Cuckoo Sandbox - http://www.cuckoosandbox.org
# See the file 'docs/LICENSE' for copying permission.
import select
import socket
import threading
try:
import pycares
HAVE_CARES = True
except:
HA... | mit | -4,788,897,716,315,685,000 | 25.077465 | 78 | 0.649743 | false | 3.759391 | false | false | false |
CaptFrank/WebWasher | Wink/WebWasherServer/config.py | 1 | 1815 | """
:name:
==========
:description:
:copyright: (c) 8/19/2015 by fpapinea.
:license: BSD, see LICENSE for more details.
Author: fpapinea
Version: :version: #TODO
Date: 8/19/2015
"""
"""
=============================================
Imports
... | gpl-2.0 | -3,046,525,395,513,055,700 | 22.527027 | 61 | 0.363636 | false | 3.666667 | false | false | false |
tradej/pykickstart-old | tests/commands/clearpart.py | 1 | 2195 | from tests.baseclass import *
class FC3_TestCase(CommandTest):
command = "clearpart"
def runTest(self):
# pass
self.assert_parse("clearpart")
self.assert_parse("clearpart --all", "clearpart --all\n")
self.assert_parse("clearpart --none", "clearpart --none\n")
# Passing ... | gpl-2.0 | -5,333,696,168,013,929,000 | 45.702128 | 133 | 0.625968 | false | 3.500797 | true | false | false |
nuagenetworks/vspk-python | vspk/v5_0/nunsgpatchprofile.py | 1 | 9222 | # -*- coding: utf-8 -*-
#
# Copyright (c) 2015, Alcatel-Lucent Inc, 2017 Nokia
# 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 copyrigh... | bsd-3-clause | 9,142,733,154,558,570,000 | 29.641196 | 307 | 0.586532 | false | 4.729231 | false | false | false |
SanPen/GridCal | src/GridCal/Engine/Simulations/sparse_solve.py | 1 | 5703 | # -*- coding: utf-8 -*-
# This file is part of GridCal.
#
# GridCal 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.
#
# GridCal is dist... | gpl-3.0 | -894,145,515,446,266,400 | 25.525581 | 115 | 0.651412 | false | 3.466869 | false | false | false |
leonro/magpy-git | magpy/transfer.py | 1 | 14030 | #!/usr/bin/env python
"""
MagPy-transfer: Procedures for data transfer
Written by Roman Leonhardt and Rachel Bailey 2011/2012/2013/2014
Version 1.0 (from the 23.02.2012)
"""
from __future__ import print_function
from __future__ import absolute_import
from magpy.stream import *
import ftplib
import subprocess
try:
... | gpl-3.0 | 3,569,034,919,724,598,000 | 29.835165 | 152 | 0.551033 | false | 4.018906 | false | false | false |
dougmolineux/nw.js | tools/package_binaries.py | 1 | 14034 | #!/usr/bin/env python
import argparse
import getnwisrelease
import getnwversion
import gzip
import os
import platform
import shutil
import sys
import tarfile
import zipfile
from subprocess import call
steps = ['nw', 'chromedriver', 'symbol', 'headers', 'others']
################################
# Parse command line a... | mit | -8,557,527,434,996,255,000 | 33.397059 | 105 | 0.525367 | false | 3.84915 | false | false | false |
dhcrzf/zulip | zerver/data_import/gitter.py | 1 | 12050 | import os
import dateutil.parser
import random
import requests
import logging
import shutil
import subprocess
import ujson
from django.conf import settings
from django.forms.models import model_to_dict
from django.utils.timezone import now as timezone_now
from typing import Any, Dict, List, Set, Tuple
from zerver.mod... | apache-2.0 | 4,626,655,674,506,402,000 | 40.986063 | 108 | 0.609212 | false | 3.937908 | false | false | false |
trmznt/rhombus | rhombus/lib/utils.py | 1 | 2604 | import sys
import base64
import os
import math
import shutil
def cout(s, nl=True, flush=False):
sys.stdout.write(s)
if nl:
sys.stdout.write('\n')
if flush:
sys.stdout.flush()
def cerr(s, nl=True, flush=False):
sys.stderr.write(s)
if nl:
sys.stderr.write('\n')
if flush... | lgpl-3.0 | -8,872,107,073,613,742,000 | 19.030769 | 92 | 0.633257 | false | 3.43083 | false | false | false |
boltjs/bolt | projects/ide/sublime/src/Bolt/core/analyse/analyse.py | 1 | 1264 | from core.query import plasma
from lookup import files as lookup_files
from structs.highlight_list import *
from structs.plasma import *
def all(base, nests, plasmas, spots, external):
unused_list = unused(plasmas, spots)
missing_list = missing(plasmas, spots)
incorrect_list = incorrect(base, nests, plasm... | bsd-3-clause | -4,738,371,356,808,125,000 | 30.6 | 115 | 0.682753 | false | 3.105651 | false | false | false |
twjefchiu/lyric_genator | gen_lyrics.py | 1 | 8297 | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import os
import sys
import time
import codecs
import numpy as np
import tensorflow as tf
from tensorflow.contrib.tensorboard.plugins import projector
from tensorflow.python.ops import rnn, rnn_cell
from tensorflow.contrib import legacy_seq2seq as seq2seq
import sys
reloa... | apache-2.0 | -5,084,809,007,499,220,000 | 32.84898 | 113 | 0.542265 | false | 3.621397 | false | false | false |
pschmitt/zhue | zhue/cli.py | 1 | 5997 | #!/usr/bin/env python
from __future__ import print_function
from __future__ import absolute_import
import argparse
import logging
import time
from zhue.model.bridge import Bridge
from yaml import load as yaml_load
import requests
_LOGGER = logging.getLogger(__name__)
def parse_args():
ON_OFF_CHOICE = ['on', '... | gpl-3.0 | -4,010,292,559,391,757,300 | 38.715232 | 78 | 0.545439 | false | 4.311287 | false | false | false |
DEIB-GECO/PyGMQL | gmql/ml/multi_ref_model.py | 1 | 4860 | from .genometric_space import GenometricSpace
from .dataset.parser.parser import Parser
import pandas as pd
import warnings
import numpy as np
class MultiRefModel:
"""
GenometricSpace class to represent data that are mapped with multiple references
"""
def __init__(self):
"""
Con... | apache-2.0 | -6,762,213,501,621,155,000 | 42.00885 | 143 | 0.616461 | false | 4.10473 | false | false | false |
arunkgupta/gramps | gramps/gui/plug/report/_stylecombobox.py | 1 | 2840 | #
# Gramps - a GTK+/GNOME based genealogy program
#
# Copyright (C) 2001-2006 Donald N. Allingham
# Copyright (C) 2010 Jakim Friant
#
# 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; eithe... | gpl-2.0 | 8,526,735,188,198,685,000 | 31.272727 | 75 | 0.589789 | false | 4.270677 | false | false | false |
Guest007/vgid | apps/feedback/models.py | 1 | 1092 | # -*- coding: utf-8 -*-
from django.db import models
from django.utils.translation import ugettext, ugettext_lazy as _
from datetime import date
FEEDBACK_TYPE = [
('callback', _("Заказ звонка")),
('tour', _("Approved")),
('feedback', _("Declined")),
('reservation', _("De... | mit | -9,187,161,797,867,258,000 | 19.745098 | 70 | 0.598865 | false | 3.242331 | false | false | false |
showa-yojyo/dqutils | dqutils/snescpu/instructions.py | 1 | 21108 | """
Instructions of the 65816 Processor.
"""
from .addressing import get_addressing_mode
@staticmethod
def _execute_c2(state, context):
"""REP: Reset status bits.
When used, it will set the bits specified by the 1 byte immediate
value. This is the only means of setting the M and X status
register bit... | mit | -8,931,666,750,267,907,000 | 49.018957 | 69 | 0.411882 | false | 3.632421 | false | false | false |
munichmakerlab/ewindow | client/video_control.py | 1 | 1054 | import os
import time
uv4l_address = 'http://localhost:1337/janus'
janus_port = ":8088"
def connect_local():
os.system('svc -du /etc/service/janus')
time.sleep(1)
connect_remote("localhost")
def connect_remote(janus_address):
os.system('svc -du /etc/service/uv4l')
time.sleep(1)
_launch_uv4l("http://" ... | mit | -5,521,560,504,193,030,000 | 19.666667 | 61 | 0.609108 | false | 2.818182 | false | false | false |
weaver-viii/h2o-3 | h2o-py/tests/testdir_algos/gbm/pyunit_cv_carsGBM.py | 1 | 7236 | import sys
sys.path.insert(1, "../../../")
import h2o
import random
def cv_carsGBM(ip,port):
# read in the dataset and construct training set (and validation set)
cars = h2o.import_file(path=h2o.locate("smalldata/junit/cars_20mpg.csv"))
# choose the type model-building exercise (multinomial classificati... | apache-2.0 | 7,957,538,047,000,919,000 | 49.601399 | 131 | 0.633637 | false | 3.534929 | false | false | false |
alexandregz/simian | src/tests/simian/mac/models/munki_test.py | 1 | 32375 | #!/usr/bin/env python
#
# Copyright 2012 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless require... | apache-2.0 | -1,849,117,214,630,755,600 | 37.404508 | 80 | 0.688 | false | 3.52861 | true | false | false |
596acres/django-livinglots-owners | livinglots_owners/admin.py | 1 | 2155 | from django.conf.urls import url
from django.contrib import admin
from django.core.urlresolvers import reverse
from django.forms import ModelForm
from django.http import HttpResponseRedirect
from livinglots import get_owner_contact_model
from .admin_views import MakeAliasesView
from .models import Alias
class Owner... | agpl-3.0 | 1,035,763,049,452,518,100 | 30.231884 | 80 | 0.640835 | false | 3.734835 | false | false | false |
tompreston/generationzero | magazine/migrations/0001_initial.py | 1 | 2809 | # -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2016-01-18 22:05
from __future__ import unicode_literals
import datetime
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
from django.utils.timezone import utc
import django_markdown.models
class Migration(... | gpl-3.0 | -3,970,414,503,679,025,700 | 43.587302 | 124 | 0.58989 | false | 4.20509 | false | false | false |
joshuagryphon/minihmm | docs/source/conf.py | 1 | 10964 | # -*- coding: utf-8 -*-
#
# minihmm documentation build configuration file, created by
# sphinx-quickstart on Fri Jun 5 00:24:09 2015.
#
import sys
import os
import minihmm
import mock
# Manual mocking
class SetMock():
def __contains__(self, val):
return True
class DocMock(mock.MagicMock):
"""Pro... | bsd-3-clause | 3,155,767,359,888,464,000 | 28.315508 | 80 | 0.691171 | false | 3.535634 | true | false | false |
jmchilton/pulsar | pulsar/web/framework.py | 1 | 5968 | """
Tiny framework used to power Pulsar application, nothing in here is specific to running
or staging jobs. Mostly deals with routing web traffic and parsing parameters.
"""
from webob import Request
from webob import Response
from webob import exc
import inspect
from os.path import exists
import re
from json import... | apache-2.0 | 2,623,283,325,633,191,400 | 30.57672 | 109 | 0.579424 | false | 4.057104 | false | false | false |
wroersma/volatility | volatility/plugins/taskmods.py | 1 | 16486 | # Volatility
# Copyright (C) 2007-2013 Volatility Foundation
#
# Additional Authors:
# Michael Cohen <scudette@users.sourceforge.net>
# Mike Auty <mike.auty@gmail.com>
#
# This file is part of Volatility.
#
# Volatility is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | gpl-2.0 | -7,597,039,038,837,842,000 | 42.044386 | 152 | 0.517955 | false | 4.227179 | true | false | false |
k9982874/stack | bin/examples/avatar/server.py | 1 | 3354 | import io
import json
import requests
from os import curdir, sep
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
from cgi import parse_header, parse_multipart, FieldStorage
from PIL import Image
STACK_URL = 'http://127.0.0.1:8000'
class RequestHandler(BaseHTTPRequestHandler):
def crop(self, x, ... | mit | 4,132,123,488,159,166,000 | 26.491803 | 124 | 0.508646 | false | 3.955189 | false | false | false |
111pontes/ydk-py | cisco-ios-xr/ydk/models/cisco_ios_xr/Cisco_IOS_XR_man_xml_ttyagent_oper.py | 1 | 43352 | """ Cisco_IOS_XR_man_xml_ttyagent_oper
This module contains a collection of YANG definitions
for Cisco IOS\-XR man\-xml\-ttyagent package operational data.
This module contains definitions
for the following management objects\:
netconf\: NETCONF operational information
xr\-xml\: xr xml
Copyright (c) 2013\-2016 ... | apache-2.0 | -2,617,667,211,004,866,600 | 33.737179 | 324 | 0.43818 | false | 4.973271 | true | false | false |
Hybrid-Cloud/conveyor | conveyor/conveyorheat/engine/resources/openstack/neutron/address_scope.py | 1 | 3610 | #
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# ... | apache-2.0 | -5,093,087,773,911,587,000 | 33.711538 | 78 | 0.62687 | false | 4.354644 | false | false | false |
tuzcsaba/orbiter-kep | python_legacy/problems/transx_problem.py | 1 | 7165 | from PyGMO.problem import base as base_problem
from PyKEP.core import epoch, DAY2SEC, MU_SUN, lambert_problem, propagate_lagrangian, fb_prop, fb_vel, AU
from PyKEP.planet import jpl_lp,spice
from math import sqrt, pi, cos, sin, acos, atan2, log
from scipy.linalg import norm
from numpy import *
excludes = []
class tra... | mit | 7,768,611,205,934,463,000 | 38.368132 | 146 | 0.536357 | false | 3.100389 | false | false | false |
brianspeir/Vanilla | vendor/bootstrap-vz/common/tasks/host.py | 1 | 1486 | from base import Task
from common import phases
from common.exceptions import TaskError
class HostDependencies(Task):
description = 'Determining required host dependencies'
phase = phases.preparation
@classmethod
def run(cls, info):
info.host_dependencies.add('debootstrap')
from common.fs.loopbackvolume imp... | bsd-3-clause | -3,571,696,373,882,429,000 | 30.617021 | 78 | 0.743607 | false | 3.496471 | false | false | false |
digistam/recon-ng | modules/recon/locations-pushpins/youtube.py | 1 | 3214 | import module
# unique to module
from datetime import datetime
class Module(module.Module):
def __init__(self, params):
module.Module.__init__(self, params, query='SELECT DISTINCT latitude || \',\' || longitude FROM locations WHERE latitude IS NOT NULL AND longitude IS NOT NULL')
self.register_opt... | gpl-3.0 | -4,552,611,326,695,444,000 | 52.566667 | 168 | 0.506223 | false | 4.396717 | false | false | false |
kumar-physics/PyBMRB | pybmrb/histogram.py | 1 | 19373 | #!/usr/bin/env python3
import logging
import plotly.express as px
from pybmrb.get_database_cs_data import ChemicalShiftStatistics
class Histogram(object):
'''
Fetches chemical shift records from BMRB, plots histograms and calculates statistical properties.
'''
@classmethod
def hist(self, residue... | mit | 8,752,845,894,392,188,000 | 60.306962 | 159 | 0.512569 | false | 4.375113 | false | false | false |
lukius/mts | common/attacks/rsa.py | 1 | 1159 | from common.math.modexp import ModularExp
from common.tools.converters import BytesToInt, IntToBytes
class RSAOracleAttack(object):
def __init__(self, oracle):
self.oracle = oracle
self.e, self.n = oracle.get_public_key()
def _encrypt(self, m):
return ModularExp(self.n).v... | mit | -10,229,949,416,811,060 | 27.292683 | 58 | 0.597066 | false | 3.679365 | false | false | false |
fengalin/gstation-edit | gstation_edit/midi/cc_event.py | 1 | 2890 | """
gstation-edit CCMidiEvent definition
"""
# this file is part of gstation-edit
# Copyright (C) F LAIGNEL 2009-2017 <fengalin@free.fr>
#
# gstation-edit 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, eithe... | lgpl-3.0 | 220,577,833,066,183,000 | 31.840909 | 76 | 0.607266 | false | 3.705128 | false | false | false |
free-free/pyblog | pyblog/localization.py | 1 | 3876 | #-*- coding:utf-8 -*-
import os
import json
import re
import time
from pyblog.config import Config
class LocaleProxyer(dict):
_locale_file_dir = None
_locale_files_content = {}
def __init__(self, locale_file_dir):
assert isinstance(locale_file_dir, str)
if type(self)._locale_file_dir != o... | mit | -763,355,328,197,271,900 | 34.236364 | 132 | 0.596233 | false | 3.891566 | false | false | false |
arnaudsj/titanium_mobile | support/tiapp.py | 1 | 15832 | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# tiapp parser
#
import os, types, uuid
import codecs, time, sys
from xml.dom.minidom import parseString
from StringIO import StringIO
def getText(nodelist):
rc = ""
for node in nodelist:
if node.nodeType == node.TEXT_NODE:
rc = rc + node.data
return rc
class T... | apache-2.0 | 5,286,699,170,504,859,000 | 32.82906 | 107 | 0.655066 | false | 3.332351 | false | false | false |
D-Pointer/imperium-server | python-server/imperium_server.py | 1 | 1804 | #! /usr/bin/python
from twisted.internet import reactor
from twisted.internet.endpoints import TCP4ServerEndpoint
import logging
import getopt
import sys
import os
import os.path
from client_factory import ClientFactory
from auth_manager import AuthManager
import game_id_sequence
def usage ():
print 'usage: %s... | gpl-2.0 | 6,744,651,964,870,019,000 | 24.069444 | 103 | 0.588692 | false | 3.95614 | false | false | false |
openstack/blazar | blazar/tests/test_exceptions.py | 1 | 2314 | # Copyright (c) 2013 Bull.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, sof... | apache-2.0 | -9,157,797,276,746,855,000 | 35.15625 | 69 | 0.679775 | false | 3.837479 | true | false | false |
msracver/FCIS | lib/bbox/setup_windows.py | 1 | 1296 | # --------------------------------------------------------
# Fully Convolutional Instance-aware Semantic Segmentation
# Copyright (c) 2016 by Contributors
# Copyright (c) 2017 Microsoft
# Licensed under The MIT License [see LICENSE for details]
# Modified from py-faster-rcnn (https://github.com/rbgirshick/py-faster-rcn... | mit | 4,330,088,838,546,024,400 | 27.173913 | 78 | 0.653549 | false | 3.745665 | false | false | false |
ETCartman/Class_Npels | Class_Npels.py | 1 | 4020 | import time
import random
from selenium import webdriver
from selenium.webdriver.common.action_chains import ActionChains
from clickList import csslist,clicks,csslist2,clicks2
#倒入模块结束
#建立类
class Npels():
def __init__(self,username,pwd,timecut = 60,TIME = 10):
npelsurl = 'http://192.168.100.117/NP... | mit | -3,512,740,998,504,889,000 | 39.086957 | 142 | 0.553968 | false | 2.923434 | false | false | false |
pyfa-org/Pyfa | gui/builtinViewColumns/abilities.py | 1 | 1577 | # =============================================================================
# Copyright (C) 2010 Diego Duclos
#
# This file is part of pyfa.
#
# pyfa 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 ... | gpl-3.0 | -8,237,878,327,354,383,000 | 31.854167 | 79 | 0.628408 | false | 4.139108 | false | false | false |
gnmerritt/casino | casino/protocol.py | 1 | 1781 | from twisted.protocols import basic
from twisted.python import log
import handlers
class CommandHandler(object):
CMD = "!"
def __init__(self, parent, api_url):
self.parent = parent
self.fx_login = handlers.LoginHandler(api_url)
def handle(self, line):
"""Dispatches to functions ... | mit | -2,791,523,196,283,728,400 | 29.186441 | 74 | 0.592364 | false | 3.940265 | false | false | false |
jacobian-archive/python-storymarket | storymarket/__init__.py | 1 | 1492 | from __future__ import absolute_import
__version__ = '1.0b4'
from . import exceptions
from .client import StorymarketClient
from .categories import Category, CategoryManager, SubcategoryManager
from .subtypes import Subtype, SubtypeManager
from .content import (Audio, Data, Photo, Text, Video, AudioManager,
... | bsd-3-clause | 4,851,549,568,895,144,000 | 32.909091 | 75 | 0.656836 | false | 4.226629 | false | false | false |
bdfoster/blumate | blumate/components/switch/mystrom.py | 1 | 3122 | """
Support for myStrom switches.
For more details about this component, please refer to the documentation at
https://home-assistant.io/components/switch.mystrom/
"""
import logging
import requests
from blumate.components.switch import SwitchDevice
DEFAULT_NAME = 'myStrom Switch'
_LOGGER = logging.getLogger(__name... | mit | -1,004,166,532,938,930,700 | 30.22 | 78 | 0.553171 | false | 4.611521 | false | false | false |
ctSkennerton/BioSQL-Extensions | scripts/load_genome_bin_into_database.py | 1 | 8419 | #!/usr/bin/env python
import sys
import argparse
from getpass import getpass, getuser
from BioSQL import BioSeqDatabase
from Bio import SeqIO
from Bio import Entrez
Entrez.email = 'c.skennerton@gmail.com'
def add_taxid(inIter, taxid):
inIter.annotations['ncbi_taxid'] = taxid
return inIter
def load_gff(db, gff... | mit | -8,473,455,012,816,995,000 | 44.02139 | 345 | 0.631548 | false | 3.480364 | false | false | false |
LearnEra/LearnEraPlaftform | common/lib/xmodule/xmodule/modulestore/mongo/base.py | 1 | 60700 | """
Modulestore backed by Mongodb.
Stores individual XModules as single documents with the following
structure:
{
'_id': <location.as_dict>,
'metadata': <dict containing all Scope.settings fields>
'definition': <dict containing all Scope.content fields>
'definition.children': <list of all child locati... | agpl-3.0 | -2,829,249,504,868,604,000 | 40.348774 | 132 | 0.598468 | false | 4.482351 | false | false | false |
abhyasi/euler_py | euler/sol_7.py | 1 | 2221 | # By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
# we can see that the 6th prime is 13.
# What is the 10001st prime number?
# To-Do: Consider implementing the primality test implemented in GnuPG.
# It works in three steps:
# - The standard sieve algorithm using the primes up to 4999
# ... | gpl-2.0 | -5,355,607,668,578,086,000 | 32.164179 | 77 | 0.592976 | false | 3.689369 | false | false | false |
zhy0216/xtimr | web/views.py | 1 | 5637 | # -*- coding: utf-8 -*-
import datetime
import urlparse
from collections import defaultdict
from django.shortcuts import render
import datetime
import ujson
from django.http import HttpResponse, Http404
from django.views.decorators.http import require_http_methods
### local module
from web.models import WebUrl, U... | mit | -3,702,448,843,463,555,000 | 31.773256 | 130 | 0.632251 | false | 3.572243 | false | false | false |
KirarinSnow/Google-Code-Jam | Round 2 2013/A.py | 1 | 1234 | #!/usr/bin/env python
#
# Problem: Ticket Swapping
# Language: Python
# Author: KirarinSnow
# Usage: python thisfile.py <input.in >output.out
for case in range(int(raw_input())):
n, m = map(int, raw_input().split())
s = [map(int, raw_input().split()) for i in range(m)]
z = 0
do = {}
de = {}
... | gpl-3.0 | 4,155,518,682,742,342,000 | 22.283019 | 57 | 0.363047 | false | 2.785553 | false | false | false |
marcelovilaca/DIRAC | Interfaces/scripts/dirac-wms-job-get-output.py | 2 | 3365 | #!/usr/bin/env python
########################################################################
# $HeadURL$
# File : dirac-wms-job-get-output
# Author : Stuart Paterson
########################################################################
"""
Retrieve output sandbox for a DIRAC job
"""
__RCSID__ = "$Id$"
import ... | gpl-3.0 | -6,525,685,265,879,758,000 | 28.778761 | 111 | 0.583952 | false | 3.572187 | false | false | false |
sql-machine-learning/sqlflow | python/runtime/xgboost/dataset.py | 1 | 14205 | # Copyright 2020 The SQLFlow Authors. All rights reserved.
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law o... | apache-2.0 | -5,927,995,517,684,741,000 | 37.185484 | 78 | 0.528898 | false | 4.182862 | false | false | false |
project-chip/connectedhomeip | src/controller/python/chip/ChipBleUtility.py | 1 | 12096 | #
# Copyright (c) 2020 Project CHIP Authors
# Copyright (c) 2019-2020 Google LLC.
# Copyright (c) 2015-2018 Nest Labs, 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 ... | apache-2.0 | 7,064,038,270,074,011,000 | 32.322314 | 90 | 0.599868 | false | 3.618307 | false | false | false |
oceansystemslab/thrusters_controller | docs/examples/aabitrates.py | 1 | 3167 | #!/bin/env python
#==========================================================================
# (c) 2006 Total Phase, Inc.
#--------------------------------------------------------------------------
# Project : Aardvark Sample Code
# File : aabitrates.py
#------------------------------------------------------------... | bsd-3-clause | -6,108,027,201,605,725,000 | 32.691489 | 75 | 0.513735 | false | 4.583213 | false | false | false |
jbasko/hookery | hookery/base.py | 1 | 18182 | import collections
import contextlib
import functools
import inspect
from typing import Generator, List, Optional
from .utils import optional_args_func
class Handler:
"""
Unbound handler.
See also BoundHandler.
"""
def __init__(self, func, hook):
if isinstance(func, classmethod):
... | mit | -6,265,728,716,245,307,000 | 36.334702 | 117 | 0.606534 | false | 4.409896 | false | false | false |
mkisantal/char-rnn | text_loader2.py | 1 | 3120 | """
loading text, converting it to tensors of one-hot vectors,
splitting to train/eval/test sets
splitting sets to batches
"""
import numpy as np
class MinibatchLoader:
def __init__(self):
self.char_to_ix = {}
self.ix_to_char = {}
self.x = np.array([])
self.y = np.array([])
... | mit | 1,239,016,509,393,022,200 | 32.191489 | 105 | 0.543269 | false | 3.525424 | false | false | false |
Dramac/TriViSiJu | modules/enigme.py | 1 | 3863 | #!/usr/bin/env python
# *-* coding:utf-8 *-*
""" TriViSiJu: Graphical interface for the AstroJeune Festival
Copyright (C) 2012 Jules DAVID, Tristan GREGOIRE, Simon NICOLAS and Vincent PRAT
This file is part of TriViSiJu.
TriViSiJu is free software: you can redistribute it and/or modify
it under the terms... | gpl-3.0 | 9,382,082,432,826,548 | 29.595238 | 110 | 0.587289 | false | 3.592731 | false | false | false |
googleads/google-ads-python | examples/account_management/reject_merchant_center_link.py | 1 | 6207 | #!/usr/bin/env python
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or ... | apache-2.0 | -1,088,833,858,405,421,800 | 35.298246 | 98 | 0.66425 | false | 4.099736 | false | false | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.