commit
stringlengths
40
40
subject
stringlengths
1
3.25k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
old_contents
stringlengths
0
26.3k
lang
stringclasses
3 values
proba
float64
0
1
diff
stringlengths
0
7.82k
7d66a720acb756291adc99ebe444c2c00bd37d84
Remove Ignite Dataset SSL tests by internal policy.
tensorflow/contrib/ignite/python/tests/ignite_dataset_test.py
tensorflow/contrib/ignite/python/tests/ignite_dataset_test.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not # use this file except in compliance with the License. You may obtain a copy of # the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Python
0
@@ -1632,1342 +1632,8 @@ s)%0A%0A - def test_ignite_dataset_with_ssl_client(self):%0A %22%22%22Test Ignite Dataset with ssl client.%0A%0A %22%22%22%0A self._clear_env()%0A os.environ%5B%22IGNITE_DATASET_CERTFILE%22%5D = os.path.dirname(%0A os.path.realpath(__file__)) + %22/keystore/client.pem%22%0A...
39668777b1f5579b37746521ba95b506bea08d1a
Prepare v1.2.295.dev
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
Python
0.000001
@@ -443,7 +443,11 @@ 2.29 -4 +5.dev '%0A
f3bbb887d76ec428c4926f94c119220cc8c63cf8
add offline script to ingest IDOT archived road conditions
scripts/roads/idot_csv_ingest.py
scripts/roads/idot_csv_ingest.py
Python
0
@@ -0,0 +1,1641 @@ +%22%22%22Be able to merge a CSV file that IDOT provides%22%22%22%0Aimport pandas as pd%0Aimport psycopg2%0Aimport sys%0Aimport datetime%0A%0Apgconn = psycopg2.connect(database='postgis', host='localhost', user='mesonet',%0A port=5555)%0Acursor = pgconn.cursor()%0Axref = %7B%...
c2d1344c518dcf7c4cd20786bfa7cf649b977ca5
Create new package (#7378)
var/spack/repos/builtin/packages/perl-file-slurper/package.py
var/spack/repos/builtin/packages/perl-file-slurper/package.py
Python
0
@@ -0,0 +1,1587 @@ +##############################################################################%0A# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Spack.%0A# Created by Todd Gamblin, tgamblin@llnl.gov, All r...
766eff22b8632ae8548fe30e5b44bc8ca5de29b5
Create near_ten.py
Python/CodingBat/near_ten.py
Python/CodingBat/near_ten.py
Python
0.000004
@@ -0,0 +1,100 @@ +# http://codingbat.com/prob/p165321%0A%0Adef near_ten(num):%0A return (num %25 10 %3C= 2) or (num %25 10 %3E= 8)%0A
e143ef5663f1fed402c9c941bd8b18adbf72c02b
add calebasse.url_utils module
calebasse/urls_utils.py
calebasse/urls_utils.py
Python
0.000001
@@ -0,0 +1,1073 @@ +from django.core.urlresolvers import RegexURLPattern, RegexURLResolver%0A%0Aclass DecoratedURLPattern(RegexURLPattern):%0A def resolve(self, *args, **kwargs):%0A result = super(DecoratedURLPattern, self).resolve(*args, **kwargs)%0A if result:%0A result.func = self._decora...
be0e28cfc4628491ba6a2c176cb5458279b94f8d
Create simple_fun_#270_evil_code_medal.py
simple_fun_#270_evil_code_medal.py
simple_fun_#270_evil_code_medal.py
Python
0.998977
@@ -0,0 +1,546 @@ +#Kunal Gautam%0A#Codewars : @Kunalpod%0A#Problem name: Simple Fun #270: Evil Code Medal%0A#Problem level: 7 kyu%0A%0Adef get_sec(time):%0A return time%5B0%5D*3600 + time%5B1%5D*60 + time%5B2%5D%0A%0Adef evil_code_medal(user_time, gold, silver, bronze):%0A user_time = get_sec(user_time.split(':'...
48d0578f32505702d63adc3c580749c4eb18326d
Create most_common_characters.py
most_common_characters.py
most_common_characters.py
Python
0.000177
@@ -0,0 +1,556 @@ +import operator%0A%0Adef most_common_characters(input_string, N):%0A count = %7B%7D%0A for char in inputString:%0A if char in count:%0A count%5Bchar%5D += 1%0A else:%0A count%5Bchar%5D = 1%0A %0A sorted_freq = sorted(count.iteritems(), key=opera...
c06de87c53a8e42660b885de9d14796cc928c687
add pwgen
pwgen.py
pwgen.py
Python
0.000001
@@ -0,0 +1,354 @@ +for a in range(10):%0A for b in range(10):%0A for c in range(10):%0A for d in range(10):%0A for e in range(10):%0A for f in range(10):%0A for g in range(10):%0A for h in range(10):%0A ...
43429ce9c2c21bc919baed5a831402e5c100e0f9
Fix bug related to last update
classes/headers.py
classes/headers.py
class ExtractHeaders(object): def __init__(self, cache, results, log=None): self.cache = cache self.results = results self.log = log self.headers = set() self.category = "Platform" def _split_server_line(self, line): if "(" in line: os = line[line.find('(')+1:line.find(')')] sh = line[:line.find(...
Python
0
@@ -2068,24 +2068,31 @@ g, version, +weight= weight)%0A%0A%09%09%09 @@ -2480,16 +2480,23 @@ ersion, +weight= 0.1)%09%0A%0A%0A
8681d011fabd4d3b3df105e05292699239a1b750
Fix a bug in disco to make jenkins happy again. is_matching_disco_datas datas is a list of tuples not a dict
shinken/objects/discoveryrule.py
shinken/objects/discoveryrule.py
#!/usr/bin/env python #Copyright (C) 2009-2010 : # Gabes Jean, naparuba@gmail.com # Gerhard Lausser, Gerhard.Lausser@consol.de # Gregory Starck, g.starck@gmail.com # Hartmut Goebel, h.goebel@goebel-consult.de # #This file is part of Shinken. # #Shinken is free software: you can redistribute it and/or modify...
Python
0.999827
@@ -5723,36 +5723,24 @@ v) in datas -.iteritems() :%0A @@ -6390,20 +6390,8 @@ atas -.iteritems() :%0A
e47094d2b499ee2667384328194cd8f35ce17022
Add a forgotten file
sinus_subpixel/sinus_subpixel.py
sinus_subpixel/sinus_subpixel.py
Python
0.000004
@@ -0,0 +1,893 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0Aimport pygame%0Afrom pygame.locals import *%0Afrom subpixel_surface import *%0Afrom math import sin, cos%0A%0ADOTS = 100%0A%0A%0Adef main():%0A%0A pygame.init()%0A screen = pygame.display.set_mode((640, 480))%0A clock = pygame.time.Clock(...
a3d7561c3c8930a55f7496c817876e4cf6b187bd
Add migration I forgot
dataactcore/migrations/versions/cd1025ac9399_add_columns_to_AwardProcurement.py
dataactcore/migrations/versions/cd1025ac9399_add_columns_to_AwardProcurement.py
Python
0.000001
@@ -0,0 +1,1070 @@ +%22%22%22add columns to AwardProcurement%0ARevision ID: cd1025ac9399%0ARevises: a767facf8ea8%0ACreate Date: 2017-09-18 15:05:52.772251%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'cd1025ac9399'%0Adown_revision = 'a767facf8ea8'%0Abranch_labels = None%0Adepends_on = None%0A%...
18f162d0260d3bb1de0d95105badb7b3d8ac577b
lucky_numbers solved
algorithms/dynamic_programming/lucky_numbers.py
algorithms/dynamic_programming/lucky_numbers.py
Python
0.999481
@@ -0,0 +1,2028 @@ +'''%0ACreated on Jul 21, 2013%0A%0A@author: nirvam%0A%0A%0AA number is called lucky if the sum of its digits, as well as the sum of the squares of its digits is a prime number. How many numbers between A and B are lucky?%0A%0AInput:%0AThe first line contains the number of test cases T. Each of the n...
36e730ea3d984b8da8081397d4ac0c4dd3bb82f2
add mongoDB cache demo.
PersistenceSpider/demo_mongodb_persistence.py
PersistenceSpider/demo_mongodb_persistence.py
Python
0
@@ -0,0 +1,2181 @@ +import pymongo%0A'''%0APython3 MongoDB%E6%95%B0%E6%8D%AE%E5%BA%93%E6%8C%81%E4%B9%85%E5%8C%96%E6%BC%94%E7%A4%BA%0A'''%0A%0A%0Aclass MongoDBPersistence(object):%0A def __init__(self):%0A self.conn = None%0A self.database = None%0A%0A def connect(self, database):%0A try:%0A ...
930630e886d8666844639e7cf9d273bd8e4c2115
Create rev_shell_server.py
Server/rev_shell_server.py
Server/rev_shell_server.py
Python
0.000003
@@ -0,0 +1,1189 @@ +#!/usr/bin/python%0A%0Aimport socket%0Aimport subprocess%0Aimport sys%0A%0A%0Adef main():%0A try:%0A RHOST = sys.argv%5B1%5D%0A RPORT = 9000%0A except:%0A print (%22Must provide hotst%22)%0A sys.exit()%0A s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)%0A ...
89676cd523818f37e5601003c5859b169200d469
fix Channel window
kismon/windows/channel.py
kismon/windows/channel.py
from gi.repository import Gtk class ChannelWindow: def __init__(self, sources, client): self.sources = sources self.client = client self.changes = {} self.widgets = {} self.gtkwin = Gtk.Window() self.gtkwin.set_position(Gtk.WindowPosition.CENTER) self.gtkwin.set_default_size(320, 240) self.gtkwin.s...
Python
0.000001
@@ -1035,16 +1035,43 @@ ioButton +.new_with_label_from_widget (None, ' @@ -1894,16 +1894,43 @@ ioButton +.new_with_label_from_widget (hop_but
921e4fe305e7d39347635c99fd4f9cc84ed7e534
Add ImageTextAnnotation migration
app/grandchallenge/annotations/migrations/0005_imagetextannotation.py
app/grandchallenge/annotations/migrations/0005_imagetextannotation.py
Python
0
@@ -0,0 +1,1867 @@ +# Generated by Django 2.2.2 on 2019-07-11 10:35%0A%0Afrom django.conf import settings%0Afrom django.db import migrations, models%0Aimport django.db.models.deletion%0Aimport django.utils.timezone%0Aimport uuid%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A migrat...
9a567d283cc2e72e3590305f81b3879d7f2557fa
include json_io.py from another older project.
json_io.py
json_io.py
Python
0
@@ -0,0 +1,1656 @@ +%0Afrom __future__ import division, print_function, unicode_literals%0A%0Aimport numpy as np%0Aimport simplejson as json%0A%0A#%0A# Helpers.%0A#%0AMARKER = ':ndar!'%0A%0A%0Aclass NumpyJSONEncoder(json.JSONEncoder):%0A def default(self, obj):%0A if isinstance(obj, np.ndarray):%0A ...
55cc66bc6d1c2c6280bb959bea23e14b4f26c741
Add Two Numbers problem
add_two_numbers.py
add_two_numbers.py
Python
0.999442
@@ -0,0 +1,2674 @@ +'''%0AYou are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.%0A%0AInput: (2 -%3E 4 -%3E 3) + (5 -%3E 6 -%3E 4)%0AOutput: 7 -%3E 0 -%3E 8%0A'''%0A%...
a3f23b804265bd59473873c2aa071188a73a9a9e
Test fail cases for custom codegen
slumba/tests/test_numbaext.py
slumba/tests/test_numbaext.py
Python
0
@@ -0,0 +1,650 @@ +import pytest%0A%0Afrom numba import boolean, njit, int64, TypingError%0Afrom slumba.numbaext import not_null, sizeof, unsafe_cast%0A%0A%0Adef test_sizeof_invalid():%0A dec = njit(int64(int64))%0A%0A with pytest.raises(TypingError):%0A @dec%0A def bad_sizeof(x):%0A retu...
a1ae01bada1d500bd7f9f7f0f2deb458bfa6d2d1
Add the serial python test
bin/serial_test.py
bin/serial_test.py
Python
0.000097
@@ -0,0 +1,543 @@ +#!/usr/bin/env python%0A%0Afrom serial import Serial%0Afrom time import sleep%0A%0Aser = Serial('/dev/ttyUSB0', 9600)%0Asleep(3) # wait for the board to reset%0A%0Aprint %22start%22%0Aprint %22write%22%0Aser.write(%22hello%5Cn%22)%0Aprint %22read%22%0Aline = ser.readline()%0Aprint %22GOT %25s%22%25li...
22e04237ab43673071acd82e31153e8869a07e8b
Fix faster rcnn example.
client/examples/faster-rcnn.py
client/examples/faster-rcnn.py
# Config of faster rcnn import sys, os sys.path.append('..') from ue4cv import * # RCNN config rcnn_path = '/home/qiuwch/workspace/py-faster-rcnn' sys.path.append(os.path.join(rcnn_path, 'tools')) import demo as D # Use demo.py provided in faster-rcnn import numpy as np import matplotlib.pyplot as plt net = None HOST...
Python
0
@@ -54,16 +54,17 @@ d('..')%0A +# from ue4 @@ -74,16 +74,29 @@ import * +%0Aimport ue4cv %0A%0A# RCNN @@ -988,24 +988,29 @@ e, boxes +=None , scores ):%0A a @@ -1001,16 +1001,21 @@ , scores +=None ):%0A a @@ -1073,16 +1073,61 @@ qual')%0A%0A + if boxes != None and scores != None:%0A CONF @@ ...
804b7aa609ce1fde97f81f839776501352a59a89
Create card-flipping-game.py
Python/card-flipping-game.py
Python/card-flipping-game.py
Python
0.000001
@@ -0,0 +1,1468 @@ +# Time: O(n)%0A# Space: O(n)%0A%0A# On a table are N cards, with a positive integer printed on the front%0A# and back of each card (possibly different).%0A#%0A# We flip any number of cards, and after we choose one card.%0A#%0A# If the number X on the back of the chosen card is not on the front of%0...
a0bbb3b7befbac0ca13a9fc34df63a409cbe930c
Create plot_WRFtimeseries.py
Python/plot_WRFtimeseries.py
Python/plot_WRFtimeseries.py
Python
0.000003
@@ -0,0 +1,2434 @@ +#plot_WRFtimeseries.py%0A%0A%22%22%22plot time series of WRF output; %0A NOTE: we assume variables to have dimension %5Btime,y,x%5D or %5Btime,z,y,x%5D%0A If this is not the case, adapt the dimensions where variable is read%0A%0AAuthor: Ingrid Super%0ALast revisions: 2-6-2016%22%22%22%0A%0Aimp...
4db53b62f616edb61ce469ffb2f4cd642f925784
Add patch migration for missing constraints (#6276)
warehouse/migrations/versions/48def930fcfd_webauthn_and_macaroon_constraints.py
warehouse/migrations/versions/48def930fcfd_webauthn_and_macaroon_constraints.py
Python
0
@@ -0,0 +1,1412 @@ +# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by applicable law or agreed to in writing,...
2c6141656e0a0885dbcfecad5f227a950dafc3c3
Create predict-the-winner.py
Python/predict-the-winner.py
Python/predict-the-winner.py
Python
0.000403
@@ -0,0 +1,1916 @@ +# Time: O(n%5E2)%0A# Space: O(n)%0A%0A# Given an array of scores that are non-negative integers.%0A# Player 1 picks one of the numbers from either end of the array%0A# followed by the player 2 and then player 1 and so on.%0A# Each time a player picks a number, that number will not be available for ...
5de560e8458375a2e03200128ff046927cb3dbb5
Add first solution to LCq003
leetcode/q003/solution.py
leetcode/q003/solution.py
Python
0
@@ -0,0 +1,876 @@ +%0D%0AMAX_SUBSTRING_LENGTH = 26%0D%0A%0D%0Aclass Solution:%0D%0A def lengthOfLongestSubstring(self, s: str) -%3E int:%0D%0A %22%22%22%0D%0A for a given string, at each starting position within the string,%0D%0A check how far you can go without repeating a character%0D%0A ...
42ca9ddc91a213816183f20a985d5273de6a4312
compute bits set to 1
bits_set_to_one.py
bits_set_to_one.py
Python
0.999999
@@ -0,0 +1,219 @@ +def one_bits(x):%0A %22%22%22Given an integer, compute the number of bits set to 1%22%22%22%0A m = 1%0A count = 0%0A for i in range(x // 2 + 1):%0A if x & m == m:%0A count += 1%0A m = m %3C%3C 1%0A return count%0A
c80f789da36ad0c23a6cbbf20fd97808d62c3619
Create a simple Spinner.
py_clui/__init__.py
py_clui/__init__.py
Python
0
@@ -0,0 +1,1651 @@ +#!/usr/bin/env python%0A# https://en.wikipedia.org/wiki/ANSI_escape_code#Colors%0A# http://aurelio.net/shell/canivete/%0A# https://stackoverflow.com/questions/27265322/how-to-print-to-console-in-color%0A%0Aimport sys%0Aimport time%0A%0A#def colored(text, color):%0A# return COLORS%5Bcolor%5D + tex...
1f043dd959fa1e1d243a3278abeb66838a2f9305
Remove the IR target type in migration.
server/auvsi_suas/migrations/0013_remove_ir_as_target_type.py
server/auvsi_suas/migrations/0013_remove_ir_as_target_type.py
Python
0
@@ -0,0 +1,470 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B('auvsi_suas', '0012_missionclockevent'), %5D%0A%0A operations = %5B%0A migrations.AlterField(%0A ...
2f2e85a7f1df46c6f33969a9dd4a945c8dfa33dc
Add Cython-generated C code validator
powertrip.py
powertrip.py
#!/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. # ---------------------...
Python
0.000009
@@ -569,16 +569,62 @@ idator() +,%0A GeneratedCythonValidator() %5D%0A%0A r @@ -2657,16 +2657,1085 @@ , msg%0A%0A%0A +class GeneratedCythonValidator(Validator):%0A def __init__(self, cython_extension='.pyx'):%0A self.cython_extension = cython_extension%0A%0A def validate(self, root):...
e869920c2334e4d0bcd95d2805c8126952c97b51
Add tests for `cms.debug`.
cms/tests/test_debug.py
cms/tests/test_debug.py
Python
0
@@ -0,0 +1,1022 @@ +from django.test import TestCase%0A%0Afrom ..debug import print_exc, print_current_exc%0A%0Aimport os%0Afrom StringIO import StringIO%0Aimport sys%0A%0A%0Aclass TestDebug(TestCase):%0A%0A def test_print_exc(self):%0A def func():%0A return True%0A%0A def func_raise():%0A ...
f301dd2366f53a6cf4b0949942b8520502f54351
Fix import error when [jwt] not installed.
boxsdk/__init__.py
boxsdk/__init__.py
# coding: utf-8 from __future__ import unicode_literals from .auth.jwt_auth import JWTAuth from .auth.oauth2 import OAuth2 from .client import Client from .object import * # pylint:disable=wildcard-import,redefined-builtin
Python
0
@@ -51,16 +51,25 @@ terals%0A%0A +try:%0A from .au @@ -95,16 +95,115 @@ JWTAuth%0A +except ImportError:%0A JWTAuth = None # If extras are not installed, JWTAuth won't be available.%0A from .au
334961054d875641d150eec4d6938f6f824ea655
Add initializer for top-level '_gcloud_vendor' package.
_gcloud_vendor/__init__.py
_gcloud_vendor/__init__.py
Python
0
@@ -0,0 +1,244 @@ +%22%22%22Dependencies %22vendored in%22, due to dependencies, Python versions, etc.%0A%0ACurrent set%0A-----------%0A%0A%60%60apitools%60%60 (pending release to PyPI, plus acceptable Python version%0A support for its dependencies). Review before M2.%0A%22%22%22%0A
00e86dcc5633a4e381ec67bb4fd719b37633e9c4
solved with generators
problem_5.py
problem_5.py
Python
0.997103
@@ -0,0 +1,485 @@ +def test_get_smallest_evenly_divisible_by():%0A assert get_smallest_evenly_divisible_by(1, 10) == 2520%0A%0A%0Adef is_evenly_divisible(value, low, high):%0A high += 1%0A for i in range(low, high):%0A if value %25 i != 0:%0A return False%0A return True%0A%0A%0Adef infite_...
a6e02bdbc29c13b7a41d3848171fb80d8a29e05d
Revert unintended commit.
chrome/browser/sync/protocol/sync_proto.gyp
chrome/browser/sync/protocol/sync_proto.gyp
# Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. { 'variables': { 'chromium_code': 1, }, 'targets': [ { # Protobuf compiler / generate rule for sync.proto. This is used by # t...
Python
0.000009
@@ -1773,18 +1773,16 @@ - # 'messag
bbebd328c8b0b00bd86a0a8f7e86a5312c7fd3c8
fix double showing of entities.
aleph/views/documents_api.py
aleph/views/documents_api.py
import logging from werkzeug.exceptions import BadRequest from flask import Blueprint, redirect, send_file, request from apikit import jsonify, Pager, get_limit, get_offset from aleph.core import get_archive, url_for, db from aleph import authz from aleph.model import Document, Entity, Reference, Collection from alep...
Python
0
@@ -2135,24 +2135,70 @@ == doc.id)%0A + q = q.filter(Reference.origin == 'regex')%0A q = q.jo
2039e9845e669ae83b1ec42fc631f48ff585427a
remove unused variable
cogs/friendcode.py
cogs/friendcode.py
import discord import hashlib import struct from cogs.converters import SafeMember from cogs.database import DatabaseCog from discord.ext import commands class FriendCode(DatabaseCog): """ Stores and obtains friend codes using an SQLite 3 database. """ # based on https://github.com/megumisonoda/Sabe...
Python
0.00003
@@ -2633,44 +2633,8 @@ %22%22%22%0A - c = self.bot.dbcon.cursor()%0A
906898f6b8139c364994b50e0d6c60da6e4ec549
Add train module, simplify the code in and modules
train.py
train.py
Python
0.000001
@@ -0,0 +1,1568 @@ +from nltk.corpus import PlaintextCorpusReader%0Aimport networkx as nx%0A%0Afrom collections import Counter%0Afrom itertools import chain%0Afrom itertools import tee%0A%0Aimport graph_utils as gutil%0A%0A%0Adef pairwise(itr):%0A a, b = tee(itr) # two version of itr%0A next(b, None) # b goes...
e411fcd647e3cdcf415465288e527aecfd026fc5
add additional data to flavor's ViewBuilder
nova/api/openstack/views/flavors.py
nova/api/openstack/views/flavors.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010-2011 OpenStack LLC. # 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...
Python
0
@@ -1536,24 +1536,206 @@ local_gb%22%5D,%0A + %22swap%22: flavor_obj%5B%22swap%22%5D,%0A %22rxtx_quota%22: flavor_obj%5B%22rxtx_quota%22%5D,%0A %22rxtx_cap%22: flavor_obj%5B%22rxtx_cap%22%5D,%0A %22vcpus%22: flavor_obj%5B%22vcpus%22%5D,%0A %7D%0A%0A
2e9e1f801653d4df60f5103d70ae91a7d307b200
add the management bare minimum to auto-create site.
oneflow/base/management/__init__.py
oneflow/base/management/__init__.py
Python
0
@@ -0,0 +1,677 @@ +# -*- coding: utf-8 -*-%0A%0Afrom django.contrib.sites import models%0Afrom django.db.models import signals%0Afrom django.conf import settings%0A%0A%0Adef create_site(app, created_models, verbosity, **kwargs):%0A %22%22%22 Create the default site when when we install the sites framework. %22%22%22...
0f9f4f1ee325d72d09625850ba6a153ae5616ab0
Update test to load plugin
nose2/tests/functional/test_collect_plugin.py
nose2/tests/functional/test_collect_plugin.py
import re from nose2.tests._common import FunctionalTestCase class CollectOnlyFunctionalTest(FunctionalTestCase): def test_collect_tests_in_package(self): self.assertTestRunOutputMatches( self.runIn('scenario/tests_in_package', '-v', '--collect-only'), stderr=EXPECT_LAYOUT1) # e...
Python
0
@@ -269,16 +269,73 @@ ct-only' +,%0A '--plugin=nose2.plugins.collect' ),%0A
8eddb8eafede9fa5aa9761ae53fa0d7081a4ba8f
Add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,2266 @@ +from __future__ import print_function%0Afrom os import sys%0A%0Atry:%0A from skbuild import setup%0Aexcept ImportError:%0A print('scikit-build is required to build from source.', file=sys.stderr)%0A print('Please run:', file=sys.stderr)%0A print('', file=sys.stderr)%0A print(' python...
a577c19e1296df413100f6858ded39ab71e757a8
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,289 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name=%22sbd%22,%0A version=%220.1%22,%0A description=%22Iridium Short Burst Data DirectIP handling%22,%0A author=%22Pete Gadomski%22,%0A author_email=%22pete.gadomski@gmail.com%22,%0A url=%22https://github...
b3c13747dcb72d751dbc2322d240499cb0fa2764
Add shebang line to setup.py
setup.py
setup.py
import os from setuptools import setup, find_packages from homeassistant.const import __version__ PACKAGE_NAME = 'homeassistant' HERE = os.path.abspath(os.path.dirname(__file__)) DOWNLOAD_URL = ('https://github.com/balloob/home-assistant/archive/' '{}.zip'.format(__version__)) PACKAGES = find_packages...
Python
0.000001
@@ -1,12 +1,35 @@ +#!/usr/bin/env python3%0A import os%0Afr
40183d3ef5b49626e62e2bfd830ad54cfa138df9
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,785 @@ +import os%0Afrom setuptools import setup%0A%0Adef read(fname):%0A return open(os.path.join(os.path.dirname(__file__), fname)).read()%0A%0Asetup(%0A name = %22energenie%22,%0A version = %220.1.0%22,%0A author = %22Ben Nuttall%22,%0A author_email = %22ben@raspberrypi.org%22,%0A descri...
28742e2ca822f0e970bf01dcd81ab5ddbbb1aa12
add droid/android to browser mapping
ua2os.py
ua2os.py
"""ua to os - from a user agent return operating system, architecture, and browser""" import sys,splunk.Intersplunk import re os_mapping = ( ('Windows .. 5.1', 'Windows XP'), ('Windows .. 5.2', 'Windows XP'), ('Windows NT 6.0', 'Windows Vista'), ('Windows 6.0', 'Windows Server 2...
Python
0
@@ -1637,24 +1637,64 @@ orer 6.0'),%0A + ('droid', 'Android'),%0A ('iPhone
02a982614b26dae21c18308c6fc94998805484fb
Add ball collector component
components/collector.py
components/collector.py
Python
0
@@ -0,0 +1,289 @@ +%22%22%22%0ARuns the wheels on the front of the robot to pick up balls.%0A%22%22%22%0A%0Aclass BallCollector(object):%0A def __init__(self, motor):%0A self.motor = motor%0A%0A def run(self, trigger):%0A if (trigger == True):%0A self.motor.set(1)%0A else:%0A ...
dc3ee951363116b235ec96bef34b06a661fc4795
Add a test that fails if using an old version of chromedriver
examples/fail_if_old_driver_test.py
examples/fail_if_old_driver_test.py
Python
0.00001
@@ -0,0 +1,1221 @@ +from seleniumbase import BaseCase%0A%0A%0Aclass ChromedriverTests(BaseCase):%0A%0A def test_fail_if_using_an_old_chromedriver(self):%0A if self.browser != %22chrome%22:%0A print(%22%5Cn This test is only for Chrome!%22)%0A print(%22 (Run with: '--browser=chrome')%22...
2b1cc5fb7465ec0d14d01d2c5cdec9f3bd222016
Update import_cluster.py
tendrl/node_agent/gluster_integration/flows/import_cluster.py
tendrl/node_agent/gluster_integration/flows/import_cluster.py
import json import uuid from tendrl.node_agent.flows.flow import Flow class ImportCluster(Flow): def run(self): node_list = self.parameters['Nodes[]'] if len(node_list) > 1: # This is the master node for this flow for node in node_list: if self.node_id != no...
Python
0.000002
@@ -788,16 +788,60 @@ w_params +,%0A %22type%22: %22node%22 %0A
b426522a82d9ba9caa98731d91b985933466aaf9
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1055 @@ +from setuptools import setup, Extension, find_packages%0Afrom glob import glob%0A%0Asetup(%0A name='expresso',%0A version='0.2',%0A description='A symbolic expression manipulation library.',%0A author='Lars Melchior',%0A%0A author_email='thelartians@gmail.com',%0A%0A url='https://g...
ff61d42f2cc60713437277c69521041c36ee425c
Create Startup.py
plugins/events/Startup.py
plugins/events/Startup.py
Python
0.000001
@@ -0,0 +1,8 @@ +print 1%0A
dfb5a1146b44979f98dc8aa236f52f0393eeabab
Add a basic setup.py
setup.py
setup.py
Python
0.000016
@@ -0,0 +1,1492 @@ +from distutils.core import setup%0Aimport os.path%0A%0A%0Adef is_package(path):%0A return (%0A os.path.isdir(path) and%0A os.path.isfile(os.path.join(path, '__init__.py'))%0A )%0A%0A%0Adef find_packages(path, base=%22%22):%0A %22%22%22 Find all packages in path %22%22%22%0...
38d7a3671afa0e2c76682c8c409959288b547f82
Prepare for tagging v4.0b3
setup.py
setup.py
# -*- coding: utf-8 -*- from setuptools import setup, find_packages setup(name="pymdptoolbox", version="0", author="Steven A. W. Cordwell", author_email="steven.cordwell@uqconnect.edu.au", url="https://github.com/sawcordwell/pymdptoolbox", description="Markov Decision Process (MDP) Toolbo...
Python
0
@@ -108,9 +108,14 @@ on=%22 -0 +4.0-b3 %22,%0A @@ -795,20 +795,15 @@ :: -2 - Pre-Alph +4 - Bet a%22,%0A @@ -1263,24 +1263,75 @@ thon :: 3%22,%0A + %22Programming Language :: Python :: 3.2%22,%0A %22P
12267f2a6ac574924ec991a8719d1d1cbf42f85c
Add installation script
setup.py
setup.py
Python
0
@@ -0,0 +1,511 @@ +from setuptools import setup%0A%0Asetup(name='Flask-Static', license='MIT', author='Rolando Urquiza',%0A author_email='rolurquiza@gmail.com',%0A description='Task executioner similar to gulp for Python',%0A packages=%5B'flask_static'%5D, platforms='any',%0A install_requires=%5B'we...
470617e0fad9381cf5fadf64d1a9ba18dbf5e101
Fix copy ec scenario files failed.
setup.py
setup.py
#!/usr/bin/python # Copyright (c) 2013 SwiftStack, 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...
Python
0
@@ -2409,16 +2409,136 @@ narios/* +.scenario')),%0A ('share/ssbench/scenarios/ec_test_scenarios', glob('scenarios/ec_test_scenarios/*.scenario ')),%0A
30f704c3e767462fefb5086bbf6b5f190cec7c1b
Add fibonacci search in python
search/fibonacci_search/python/fibonacci_search.py
search/fibonacci_search/python/fibonacci_search.py
Python
0.000004
@@ -0,0 +1,1225 @@ +#Fibonacci search for sorted algorithm%0Adef fibSearch(arr,x):%0A%0A #fibonacci numbers initialization%0A fib2 = 0%0A fib1 = 1%0A fib = fib2 + fib1%0A%0A n = len(arr)%0A #find the smallest fibonacci greater than or equal to array length%0A while (fib %3C n):%0A fib2 = fib...
215ab7e04495f829caf3583237fbe6c41ec8b40e
add logout API
xos/core/xoslib/methods/loginview.py
xos/core/xoslib/methods/loginview.py
from rest_framework.decorators import api_view from rest_framework.response import Response from rest_framework.reverse import reverse from rest_framework import serializers from rest_framework import generics from rest_framework.views import APIView from core.models import * from services.hpc.models import * from serv...
Python
0.000001
@@ -588,16 +588,128 @@ import * +%0Afrom django.contrib.sessions.backends.db import SessionStore%0Afrom django.contrib.sessions.models import Session %0A%0Aclass @@ -1958,9 +1958,1023 @@ sword)%0A%0A +class LogoutView(APIView):%0A method_kind = %22list%22%0A method_name = %22logout%22%0A%0A def do_logout(s...
f872501586dfe05c5b96402a3d8ea5194a9ff6b3
add the pseudocode for the reservation random generator
reservation/generate.py
reservation/generate.py
Python
0.000001
@@ -0,0 +1,1022 @@ +%22%22%22%0AUsage:%0A generate SERVERS RESERVATIONS DURATION%0A%0AArguments:%0A SERVERS Number of servers for which we generate reservations%0A RESERVATIONS Number of reservations per server%0A DURATION The maximum duration of a reservation (determined randomly)%0A %0A%22%...
68a7b8b87caca9e80cc827854fa362e8a2911a2a
use Qt4 instead of Tkinter. This will use less code and provide a better appearance
setup.py
setup.py
Python
0
@@ -0,0 +1,1083 @@ +%22%22%22%0AThis is a setup.py script generated by py2applet%0A%0AUsage:%0A python setup.py py2app%0A%22%22%22%0A%0Afrom setuptools import setup%0A%0AAPP = %5B'app.py'%5D%0ADATA_FILES = %5B%5D%0AOPTIONS = %7B'argv_emulation': True, 'includes': %5B'sip', 'PyQt4',%0A ...
643a36b0d935bb11ea3e9d661b8da4525700b878
Add metadata_agent.ini to config_path in setup.py.
setup.py
setup.py
# Copyright 2011 OpenStack, LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
0.000052
@@ -1869,24 +1869,59 @@ 3_agent.ini' +,%0A 'etc/metadata_agent.ini' %5D),%0A (roo
f1907672f276ee7cf19dd9f14824e56361c8128d
Add tests
tests/lda_test.py
tests/lda_test.py
Python
0.000001
@@ -0,0 +1,358 @@ +# -*- coding:utf-8 -*-%0Aimport unittest%0Aimport nose%0Aimport dmr%0A%0Aclass LDATestCase(unittest.TestCase):%0A def test___init__(self):%0A '''%0A __init__ test%0A '''%0A corpus = dmr.Corpus.read(%22./doc.txt%22)%0A voca = dmr.Vocabulary()%0A docs = voca...
4ee28dbcdf631e3f328dcda5f901b0d4bf20ef3b
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,588 @@ +from distutils.core import setup%0Afrom Cython.Distutils import Extension%0Afrom Cython.Distutils import build_ext%0Aimport os%0Aimport numpy%0A%0Aext_modules = %5B%5D%0A%0Aext_modules.append(Extension(%22terminator%22,%0A %5B%22terminator.pyx%22%5D,%0A ...
10a2fb7d52ce9affcc6157eb7731191b940a7480
Write some tests
tests/test_for.py
tests/test_for.py
Python
0.000066
@@ -0,0 +1,931 @@ +import pytest%0A%0Afrom pyegs.compiler import compile as compile_%0A%0A%0A@pytest.mark.skip('Not implemented yet')%0Adef test_for():%0A assert (compile_('items = %5B11, 22, 33%5D%5Cnfor item in items: x = item') ==%0A 'p1z 11 p2z 22 p3z 33 p4z 1 '%0A 'p5z p4z+0 p5z p%5E5z p6z...
3b38f7638d1d2e3903cc388cfb3103b1e9c11bc2
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,535 @@ +from setuptools import setup, find_packages%0A%0Asetup(name='whaler',%0A version='0.0.1',%0A author = %22Tristan R. Brown%22,%0A author_email = %22brown.tristan.r@gmail.com%22,%0A description = (%22Analytical package for computational chemistry software, %22%0A %22O...
54eca489024d3d8f354a44d161797edb8e916600
Add tests - now very simple and primitive
tests/test_saw.py
tests/test_saw.py
Python
0
@@ -0,0 +1,624 @@ +import unittest%0Afrom saw.saw import Saw%0A%0Aclass Test_Saw(unittest.TestCase):%0A%0A def setUp(self):%0A text = %22Starting right this second, it's way easier to merge Pull Requests! %5C%0A We usually merge them from the comfortable glow of our computers, but with the%5C%0A ...
986fad3382aadfe636dd5b2a8b9a69ffcdd5bc20
increment version for release 1.14.1
setup.py
setup.py
# coding: utf-8 from setuptools import setup, find_packages try: from distutils.command.build_py import build_py_2to3 as build_py except ImportError: from distutils.command.build_py import build_py import os with open('README.rst') as file: long_description = file.read() MAJOR = 1 MINOR = 14 MICRO = 0 ...
Python
0.000001
@@ -315,9 +315,9 @@ O = -0 +1 %0AISR
9ae54aed54b308bab98031f9a855b1457df0378d
migrate mpl.cbook.iterable to numpy.iterable
metpy/cbook.py
metpy/cbook.py
# Copyright (c) 2008,2015,2018 MetPy Developers. # Distributed under the terms of the BSD 3-Clause License. # SPDX-License-Identifier: BSD-3-Clause """Collection of generally useful utility code from the cookbook.""" import os from matplotlib.cbook import iterable import numpy as np import pooch from . import __vers...
Python
0.000005
@@ -226,64 +226,53 @@ os%0A%0A -from matplotlib.cbook import iterable%0Aimport numpy as np +import numpy as np%0Afrom numpy import iterable %0Aimp
1bd21c7b35a100e0f72f03bd9e0d783dc136c41e
Check for multiple outcome codes occurring today
cla_backend/apps/cla_butler/management/commands/monitor_multiple_outcome_codes.py
cla_backend/apps/cla_butler/management/commands/monitor_multiple_outcome_codes.py
Python
0
@@ -0,0 +1,2594 @@ +# coding=utf-8%0Aimport logging%0Afrom django.core.management.base import BaseCommand%0Afrom django.db.models import Count, Max, Min%0Afrom django.utils.timezone import now%0Afrom cla_butler.stack import is_first_instance, InstanceNotInAsgException, StackException%0Afrom cla_eventlog.models import L...
f45b31b9d242ec85f66508f19b7b3561fb5ee165
Set development status: Production/Stable
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys import codecs extra = {} tests_require = ["nose", "nose-cover3"] if sys.version_info >= (3, 0): extra.update(use_2to3=True) elif sys.version_info <= (2, 6): tests_require.append("unittest2") elif sys.version_info <= (2, 5): tests_require.ap...
Python
0
@@ -2585,16 +2585,29 @@ :: -4 - Beta +5 - Production/Stable %22,%0A @@ -3194,16 +3194,57 @@ uting%22,%0A + %22Topic :: System :: Networking%22,%0A
81418934093eb1eb20862e7fb9f97d6bfbc3cf10
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1550 @@ +#!/usr/bin/python%0A%22%22%22Multiple dispatcher on arguments values.%22%22%22%0Afrom setuptools import setup%0A%0Along_description = %22%22%22%0A# dispatk%0A%0A## Description%0A%0AThis function is inspired by singledispatch of Python 3.4+ (PEP 443),%0Abut the dispatch happens on the key extracted f...
af76038a7cbaa076b3fe0b57145a2fc72bc50b7b
Add basic setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,382 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='Numspell',%0A version='0.9',%0A description='A Python module for spelling numbers',%0A author='Alexei Sholik',%0A author_email='alcosholik@gmail.com',%0A url='https://github.com/alco/numspell',%0A ...
b05ede554c403bb3d03dbe65b02baa2a879f3310
Add pretty-printers for qi::Buffer
tools/printers.py
tools/printers.py
Python
0.00001
@@ -0,0 +1,704 @@ +%22%22%22Pretty printers for libqi.%0AAdd python execfile(%22/path/to/this/file%22) in your ~/.gdbinit or /etc/gdb/gdbinit%0AYour gdb need to be compile with python and version %3E 7.0%0A%22%22%22%0A%0Aimport gdb%0Aimport gdb.types%0A%0Aclass QiBufferPrinter:%0A def __init__(self, val):%0A ...
2cc14dae641f41f76a8652f3431651c1300868f9
Update forward compatibility horizon to 2021-05-12
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1445,17 +1445,17 @@ 21, 5, 1 -1 +2 )%0A_FORWA
c21bca4fb2f83e3f68806920a928372c3566a04b
Update forward compatibility horizon to 2022-02-15
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1339,9 +1339,9 @@ 2, 1 -4 +5 )%0A_F
842a1062837a9c847f8bf89e298061eca9de4efd
Update forward compatibility horizon to 2021-04-14
tensorflow/python/compat/compat.py
tensorflow/python/compat/compat.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -1445,17 +1445,17 @@ 21, 4, 1 -3 +4 )%0A_FORWA
9df8506f86c1f6e95b6c9d0bda2dd8001dc0459b
Disable maxAudioWithBaselineShift test (works locally but not on travis)
test/client/dynamic_energy_test.py
test/client/dynamic_energy_test.py
import unittest import audioop from speech_recognition import AudioSource from mycroft.client.speech.mic import ResponsiveRecognizer __author__ = 'seanfitz' class MockStream(object): def __init__(self): self.chunks = [] def inject(self, chunk): self.chunks.append(chunk) def read(self, c...
Python
0
@@ -859,32 +859,101 @@ :%0A pass%0A%0A + @unittest.skip('Disabled while unittests are brought upto date')%0A def testMaxA
84ae11ed02eabcc9c00167c710d9eb4e8462e7b0
Create router.py
router.py
router.py
Python
0.000002
@@ -0,0 +1,1013 @@ +import jnettool.tool.elements.NetworkElements%0Aimport jnettool.tool.Routing%0Aimport jnettool.tool.RouteInspector%0A ne = jnettool.tools.elements.NetworkElements('ip')%0A%09try%0A%09 routing_tableb = ne.getRoutingTable()%0A%09except jnettool.tools.elements.MissingVar:%0A%09 logging.exception...
5662e4277c77dc3be308934a1e389cf24259037a
Create remap.py
remap.py
remap.py
Python
0
@@ -0,0 +1,2071 @@ +#!/usr/bin/env python%0A%0A#Licence LGPL v2.1%0A#Creates copy of map db, leaving only specified(filtered) blocks.%0A#Can also be used for map backup, may-be even online backup.%0A%0Aimport sqlite3%0Aimport mt_block_parser%0A%0Aimport re%0A%0Adef getIntegerAsBlock(i):%0A x = unsignedToSigned(i %25...
a049ecd3c3d46f42d145d6d02a9f4f100ab3f4d9
Create rules_cc.bzl for TSL
tensorflow/tsl/platform/rules_cc.bzl
tensorflow/tsl/platform/rules_cc.bzl
Python
0
@@ -0,0 +1,411 @@ +%22%22%22Provides an indirection layer to bazel cc_rules%22%22%22%0A%0Aload(%0A %22//tensorflow/tsl/platform/default:rules_cc.bzl%22,%0A _cc_binary = %22cc_binary%22,%0A _cc_import = %22cc_import%22,%0A _cc_library = %22cc_library%22,%0A _cc_shared_library = %22cc_shared_library%22,%0A...
6d5f1afdfe963a927e510a9a2e044fbd4796184f
add tests for cliff, arete, ridge, valley
test/601-cliff-arete-ridge-valley.py
test/601-cliff-arete-ridge-valley.py
Python
0.000008
@@ -0,0 +1,639 @@ +#cliff in Yosemite%0Aassert_has_feature(%0A 13, 1374, 3166, %22earth%22,%0A %7B%22kind%22: %22cliff%22, %22id%22: 291684864,%0A %22sort_key%22: 227%7D)%0A%0A#arete in Yosemite%0Aassert_has_feature(%0A 13, 1379, 3164, %22earth%22,%0A %7B%22kind%22: %22arete%22, %22id%22: 375271242,%0A ...
918723bb1cbaea66358bd0701728bfb89fa6f00c
add servo_SG90.py
code/servo_SG90.py
code/servo_SG90.py
Python
0.000006
@@ -0,0 +1,722 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# servo_SG90.py%0A# author: Kentaro Wada %3Cwww.kentaro.wada@gmail.com%3E%0A%0Aimport time%0A%0Afrom RPi import GPIO%0A%0A%0Adef move_pos(pin, deg, speed):%0A %22%22%22%0A (int) deg: 0 - 60 %5Bdeg%5D%0A (float) speed: -1 - 1%0A %22%2...
d31ee1207292e1b6c9f874b500837f91e477728c
Create sender.py
sender.py
sender.py
Python
0.000004
@@ -0,0 +1,1198 @@ +%22%22%22IMAGE_ID=%22%22 #Paste image ID here%0AFLAVOR_ID=%22%22%09#Paste Flavor_ID here%0ASSH_KEY=%22%22%09#Paste key name here - Assuming key already exists%22%22%22%0Afrom wsgiref.simple_server import make_server%0Aimport json%0A%0Adef createvm(ip,instance_name,image_id,flavor_id,ssh_key=None):%...
ff8c866675d8eece3c527a245ec17520f357203e
test the `fastfood` command
tests/functional/test_entry_point.py
tests/functional/test_entry_point.py
Python
0.999995
@@ -0,0 +1,928 @@ +%22%22%22Functional tests for command line use.%22%22%22%0A%0Aimport subprocess%0Aimport unittest%0A%0A%0Aclass TestFastfoodCLI(unittest.TestCase):%0A%0A def test_fastfood_command_is_there(self):%0A%0A cmd = %5B'fastfood', '--help'%5D%0A try:%0A subprocess.check_output(cmd...
ff151c8ea04268d2060cf8d281294a0d500ecbba
Test that data volumes now survive a crash when recreating
tests/integration/resilience_test.py
tests/integration/resilience_test.py
Python
0
@@ -0,0 +1,1026 @@ +from __future__ import unicode_literals%0Afrom __future__ import absolute_import%0A%0Aimport mock%0A%0Afrom compose.project import Project%0Afrom .testcases import DockerClientTestCase%0A%0A%0Aclass ResilienceTest(DockerClientTestCase):%0A def test_recreate_fails(self):%0A db = self.create...
4606d80a6103fd7d358e0a8fb5a537c2a1e3f72b
Tweak doc generation script a bit.
script/generate_docs.py
script/generate_docs.py
#!/usr/bin/env python import glob import markdown import os import shutil import sys import time from datetime import datetime def compare_modification_times(path, out_path): # See if it's up to date. source_mod = os.path.getmtime(path) source_mod = max(source_mod, os.path.getmtime('doc/site/template.html')) ...
Python
0
@@ -130,34 +130,21 @@ def -compare_modification_times +is_up_to_date (pat @@ -552,20 +552,20 @@ %22build/ -site +docs /%22 + bas @@ -610,34 +610,21 @@ and -compare_modification_times +is_up_to_date (pat @@ -2241,16 +2241,17 @@ o_date)%0A +%0A # Copy @@ -2316,20 +2316,20 @@ %22build/ -site +docs /style.c...
bb48a8a9a763e594efa06b397d7731f25cedd65d
add parallel perceptron
src/learn/spark_perceptron.py
src/learn/spark_perceptron.py
Python
0.999907
@@ -0,0 +1,2737 @@ +from __future__ import division%0Aimport logging%0Aimport multiprocessing%0Afrom hvector._mycollections import mydefaultdict%0Afrom hvector.mydouble import mydouble%0Afrom weight.weight_vector import *%0A# Time accounting and control%0Aimport debug.debug%0Aimport time%0Aimport sys%0A%0Afrom pyspark ...
33a0b48ec475ec02f60ed27e572709136515763a
Create maxdiff.py
maxdiff.py
maxdiff.py
Python
0
@@ -0,0 +1,1224 @@ +__author__ = 'sebastiengenty'%0A%0Aimport numpy as np%0Aimport pandas as pd%0A%0A# This program is made to take the utilities from a MaxDiff estimation and compute the relative importances for%0A# the attributes tested. Input for now is .csv though also working on a .xlsx solution.%0A%0A%0Adef avg_i...
1902351fc88c1e18b4d8de032ff2aa8da547dac0
Bump nydus testing requirement to 0.9.0
setup.py
setup.py
#!/usr/bin/env python """ Sentry ====== Sentry is a realtime event logging and aggregation platform. It specializes in monitoring errors and extracting all the information needed to do a proper post-mortem without any of the hassle of the standard user feedback loop. Sentry is a Server ------------------ The Sentry ...
Python
0
@@ -1311,11 +1311,11 @@ ==0. -8.2 +9.0 ',%0A
3d5787cd860b1b3baaa041e49efe6d4af09396ac
Add migrations package to setup.py
setup.py
setup.py
from distutils.core import setup setup( name='django-auditlog', version='0.2.1', packages=['auditlog',], package_dir={'': 'src'}, url='https://github.com/jjkester/django-auditlog', license='MIT', author='Jan-Jelle Kester', author_email='janjelle@jjkester.nl', description='Audit log ...
Python
0.000001
@@ -108,16 +108,38 @@ ditlog', + 'auditlog.migrations' %5D,%0A p
5515fc7207404013ea9ba655b29bc414320971d9
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,340 @@ +from setuptools import setup%0A%0Asetup(name='optimizely',%0A version='0.1',%0A description='An interface to Optimizely%5C's REST API.',%0A url='https://github.com/optimizely/optimizely-client-python',%0A author='Optimizely',%0A packages=%5B'optimizely'%5D,%0A install_re...
5aa8d60a7f702b71c902224394ac6bddf088c0ad
fix missing import
configure-aspen.py
configure-aspen.py
from __future__ import division import os import sys import threading import time import traceback import gittip import gittip.wireup from gittip import canonize from gittip.security import authentication, csrf, x_frame_options from gittip.utils import cache_static, set_cookie, timer import aspen from aspen import ...
Python
0.008361
@@ -156,16 +156,23 @@ canonize +, utils %0Afrom gi
6f7abe8ea3e08ad15adab85c947ad4667e3dd3ab
Add simplejson requirement to setup
setup.py
setup.py
#!/usr/bin/env python """ Installation script: To release a new version to PyPi: - Ensure the version is correctly set in oscar.__init__.py - Run: python setup.py sdist upload """ from setuptools import setup, find_packages from oscar import get_version setup(name='django-oscar', version=get_version().replac...
Python
0
@@ -1107,24 +1107,55 @@ ting==0.1',%0A + 'simplejson==2.5.2',%0A %5D,
b16f666af5e7dd1e2201e8e57c0590933b5b73e9
Add setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,825 @@ +# -*- coding: utf-8 -*-%0Afrom setuptools import setup%0A%0Asetup(%0A name='gymz',%0A version='0.0.1',%0A author='Jakob Jordan, Philipp Weidel',%0A author_email='j.jordan@fz-juelich.de',%0A description=('A light-weight ZMQ wrapper for the OpenAI Gym.'),%0A license='MIT',%0A keywo...
82ec309f1c708071b4d1c9b8dc9d2c9b3b3ca1fb
Version update
setup.py
setup.py
import sys from setuptools import setup, find_packages deps = ["distribute", "PyYaml", "voluptuous"] if sys.version_info[:2] == (2, 6): deps.append('argparse') setup( name='toxer', version='0.1.0', packages=find_packages(exclude=("test.*",)), entry_points={ 'console_scripts': [ ...
Python
0
@@ -206,17 +206,17 @@ on='0.1. -0 +1 ',%0A p
9dc0619d6528e9fbef328faf56a982d4af7379ba
Prepare for Jinja 2.5.3
setup.py
setup.py
# -*- coding: utf-8 -*- """ Jinja2 ~~~~~~ Jinja2 is a template engine written in pure Python. It provides a `Django`_ inspired non-XML syntax but supports inline expressions and an optional `sandboxed`_ environment. Nutshell -------- Here a small example of a Jinja template:: {% extends 'base.html' %} {% b...
Python
0
@@ -2223,17 +2223,17 @@ on='2.5. -2 +3 ',%0A u
713e715fb3657a274f60c687eec60bad0d9c7da9
Update synth.py yaml location (#6480)
container/synth.py
container/synth.py
# Copyright 2018 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
Python
0
@@ -1011,16 +1011,19 @@ ontainer +_v1 .yaml',%0A
8e175782c3b79e64d543fb478b146d308d2a2ad8
Add small python script which calculates how much disk space we save by using CAS
bin/oneoffs/cas_statistic.py
bin/oneoffs/cas_statistic.py
Python
0.000001
@@ -0,0 +1,1911 @@ +import os%0Aimport pymongo%0Afrom collections import Counter%0A%0Adb_uri = os.getenv('SCITRAN_PERSISTENT_DB_URI', 'localhost:9001')%0Adb = pymongo.MongoClient(db_uri).get_database('scitran')%0A%0ACOLLECTIONS = %5B'projects', 'acquisitions', 'analyses'%5D%0ACOLLECTIONS_WITH_EMBEDDED = %5B('sessions',...
04a24befbaba975720acf5533bc97e7b3d601672
Install script.
setup.py
setup.py
Python
0
@@ -0,0 +1,2021 @@ +#!/usr/bin/env python%0A%0A# Copyright (c) 2012 SEOmoz%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining%0A# a copy of this software and associated documentation files (the%0A# %22Software%22), to deal in the Software without restriction, including%0A# without limitation ...