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
6988a498504b382fd86099d3c037100ad14c62d3
fix bug, tpl_path is related to simiki source path, not wiki path
simiki/configs.py
simiki/configs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import sys from os import path as osp from pprint import pprint import yaml from simiki import utils def parse_configs(config_file): #base_dir = osp.dirname(osp.dirname(osp.realpath(__file__))) try: with open(config_file, "rb") as fd: configs...
Python
0
@@ -180,17 +180,16 @@ e):%0A -# base_dir @@ -995,33 +995,24 @@ sp.join( -configs%5B%22 base_dir %22%5D, %22sim @@ -1003,18 +1003,16 @@ base_dir -%22%5D , %22simik
6adae60ee018966199ee1f8e2120b2eb65dcdc9e
Add stub for registration executable.
nanshe/nanshe/nanshe_registerer.py
nanshe/nanshe/nanshe_registerer.py
Python
0
@@ -0,0 +1,122 @@ +#!/usr/bin/env python%0A%0A__author__ = %22John Kirkham %3Ckirkhamj@janelia.hhmi.org%3E%22%0A__date__ = %22$Feb 20, 2015 13:00:51 EST$%22%0A%0A%0A
b83c4ddb14c9ba555d187125838a5189dfb3530c
Remove six as an explicit dependency.
setup.py
setup.py
import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('mycli/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) description = 'CLI for MySQL Database. With auto-completi...
Python
0
@@ -971,34 +971,8 @@ 4',%0A - 'six %3E= 1.9',%0A
540bf48cdca59744baf043cbfa5056b07e493429
fix sage script to work generally over a list of account ids to produce lists of journals
portality/scripts/journals_in_doaj_by_account.py
portality/scripts/journals_in_doaj_by_account.py
Python
0
@@ -0,0 +1,2177 @@ +from portality import models%0Afrom portality.core import app%0Afrom portality.core import es_connection%0Aimport esprit%0Aimport csv%0Aimport json%0Afrom portality.util import ipt_prefix%0A%0Aclass JournalQuery(object):%0A def __init__(self, owner):%0A self.owner = owner%0A%0A def quer...
4d139c6d2b9ea368bfc5189537d9af67cea582f6
Create demo_Take_Photo_when_PIR_high.py
demo_Take_Photo_when_PIR_high.py
demo_Take_Photo_when_PIR_high.py
Python
0.000001
@@ -0,0 +1,1677 @@ +import time%0Aimport picamera%0Aimport datetime%0Aimport RPi.GPIO as GPIO%0A%0Adef CheckPIR():%0A # dependencies are RPi.GPIO and time%0A # returns whats_here with %22NOTHING HERE%22 or %22SOMETHING HERE%22%0A time.sleep(1)%0A #don't rush the PIR!%0A GPIO.setmode(GPIO.BOARD)%0A # s...
feeb386efe01fb3dd4e70e216337c8a4b476cb9a
Add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,2234 @@ +#!/usr/bin/env python%0A# Copyright 2015-2015 ARM Limited%0A#%0A# 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...
4a4231976f2f084c1233e3efe27f5d18b486f146
Create setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,406 @@ +from setuptools import setup%0Aimport re%0A%0Aname = 'gcdb'%0A%0Aversion = ''%0Awith open('%7B0%7D/__init__.py'.format(name), 'rb') as f:%0A match_object = re.search(%0A r'%5E__version__%5Cs*=%5Cs*%5B%5C'%22%5D(%5B%5E%5C'%22%5D*)%5B%5C'%22%5D',%0A f.read(),%0A re.MULTILINE)%0A...
3c314d006fb1726b671d0223f08fe16f0944cd82
test call started sla
cla_backend/apps/reports/tests/test_mi_sla_report.py
cla_backend/apps/reports/tests/test_mi_sla_report.py
Python
0.000001
@@ -0,0 +1,2150 @@ +# -*- coding: utf-8 -*-%0Afrom contextlib import contextmanager%0Aimport datetime%0Afrom django.test import TestCase%0Afrom legalaid.forms import get_sla_time%0Aimport mock%0A%0Afrom core.tests.mommy_utils import make_recipe, make_user%0Afrom cla_eventlog import event_registry%0Afrom cla_eventlog.mo...
0e45b8fcf1978f560713864e18a270719d7d4872
Make sure the handle dict values are string. Looks like dbus-python get confused if they are dbus.String.
sugar/activity/activityhandle.py
sugar/activity/activityhandle.py
# Copyright (C) 2006-2007 Red Hat, Inc. # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is dis...
Python
0
@@ -2740,16 +2740,66 @@ ult = %7B +%7D%0A if self.activity_id:%0A result%5B 'activit @@ -2807,11 +2807,16 @@ _id' - : +%5D = str( self @@ -2827,18 +2827,17 @@ ivity_id - %7D +) %0A @@ -2890,24 +2890,28 @@ vice_id'%5D = +str( self.pservic @@ -2906,32 +2906,33 @@ self.pservice_id +) ...
26cbfe83f0047c8ce66a21237db8ae484736a085
Add TensorboardLogs class for use as a proxy to tensorboard data.
helpers/tensorboard.py
helpers/tensorboard.py
Python
0
@@ -0,0 +1,2180 @@ +import glob%0Aimport numpy as np%0Aimport os%0Afrom tensorflow.tensorboard.backend.event_processing.event_accumulator import EventAccumulator%0Afrom . import get_first_existing_path, get_nth_matching_path%0Afrom ..experiments import Experiment%0A%0Aclass TensorboardLogs(object):%0A%0A def __init_...
c184e79b91a63299c249e207dba1e8cd95a8e5d0
Add fpocket (#12675)
var/spack/repos/builtin/packages/fpocket/package.py
var/spack/repos/builtin/packages/fpocket/package.py
Python
0
@@ -0,0 +1,892 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other%0A# Spack Project Developers. See the top-level COPYRIGHT file for details.%0A#%0A# SPDX-License-Identifier: (Apache-2.0 OR MIT)%0A%0Afrom spack import *%0A%0A%0Aclass Fpocket(MakefilePackage):%0A %22%22%22fpocket is a very ...
fb6eee18b2bf48dd0063623515ced00e980bdf10
Add a few tests for docparse.
nipype/utils/tests/test_docparse.py
nipype/utils/tests/test_docparse.py
Python
0.999642
@@ -0,0 +1,808 @@ +from nipype.testing import *%0A%0Afrom nipype.utils.docparse import reverse_opt_map, build_doc%0A%0Aclass Foo(object):%0A opt_map = %7B'outline': '-o', 'fun': '-f %25.2f', 'flags': '%25s'%7D%0A%0Afoo_doc = %22%22%22Usage: foo infile outfile %5Bopts%5D%0A%0ABunch of options:%0A%0A -o someth...
e71742bc0fc09ebf37532b92458670a4efe8926b
Add setup file
setup.py
setup.py
Python
0
@@ -0,0 +1,367 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name='django-device-notifications',%0A version='0.0.1',%0A description='Generic library for APN & GCM notifications',%0A author='Johann Heller',%0A author_email='johann@rover.com',%0A url='https://github.com/roverdotcom/djan...
ec54935e169019067f2179a92d0f6e833f133bc9
add a DataContainer implemented as a subclass of dict
simphony/core/data_container.py
simphony/core/data_container.py
Python
0
@@ -0,0 +1,2406 @@ +from collections import Mapping%0A%0Afrom simphony.core.cuba import CUBA%0A%0A_ERROR_MESSAGE = %22Keys %7B!r%7D are not in the approved CUBA keywords%22%0A_CUBA_KEYS = set(CUBA)%0A%0A%0Aclass DataContainer(dict):%0A %22%22%22 A DataContainer instance%0A%0A The DataContainer object is implement...
4912bac4ab534ca942393c36f71dd7df4182eb94
add test_dot.py
sympy/printing/tests/test_dot.py
sympy/printing/tests/test_dot.py
Python
0.00008
@@ -0,0 +1,1351 @@ +from sympy.printing.dot import (purestr, styleof, attrprint, dotnode,%0A dotedges, dotprint)%0Afrom sympy import Symbol, Integer, Basic, Expr%0Afrom sympy.abc import x%0A%0Adef test_purestr():%0A assert purestr(Symbol('x')) == %22Symbol(x)%22%0A assert purestr(Basic(1, 2)) == %22Basic(1...
4567a9810b8c9abdb450a442c892dbdb4eecf0e0
Add test.py to test gsutil in pantheon
vm_server/accept/test.py
vm_server/accept/test.py
Python
0.000001
@@ -0,0 +1,311 @@ +from google.cloud import storage%0A%0Abucket_name = %22automation-interns%22%0Adestination_file_name = (%22./text.txt%22)%0Asource_blob_name = %22test/text_file.txt%22%0Astorage_client = storage.Client()%0Abucket = storage_client.bucket(bucket_name)%0Ablob = bucket.blob(source_blob_name)%0Ablob.downl...
a43acda7271c3fc48a82552721aec1332e9892d6
Create OpticalDensityInv.py
OpticalDensityInv.py
OpticalDensityInv.py
Python
0.000001
@@ -0,0 +1,593 @@ +import numpy%0A%0Adef OpticalDensityInv( I ):%0A '''%0A Transforms input RGB image %22I%22 into optical density space for color deconvolution.%0A *Inputs:%0A I (rgbimage) - a floating-point image of optical density values obtained%0A from OpticalDensityFwd.%0A ...
fa049b79c24f8213fa9335a31a34c354faf67459
Add exmaple about proving equivalence of exprs
src/examples/python/proving_equivalence.py
src/examples/python/proving_equivalence.py
Python
0.000119
@@ -0,0 +1,2094 @@ +#!/usr/bin/env python%0A## -*- coding: utf-8 -*-%0A##%0A## $ python ./proving equivalence.py%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A## True%0A##%0A%0Aimport sys%0Afrom triton import *%0A%0A%0Adef prove(ctx, ...
3c997e3a9eb92c3053c521f6c2fff6cfdf99c126
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1040 @@ +# noqa: D100%0Aimport os%0Aimport re%0A%0Afrom setuptools import setup%0A%0Arequirements_txt = open(os.path.join(os.path.dirname(__file__), 'requirements.txt')).read()%0Arequirements = re.findall(r'%5E(%5B%5E%5Cs#%5D+)', requirements_txt, re.M)%0A%0Asetup(name='assignment_dashboard',%0A package...
11cf7dd63f8fe7453057ef0846d4e645fa05f124
Add setuptools setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,372 @@ +from setuptools import setup%0A%0Asetup(name='pybeam',%0A version='0.1',%0A description='Python module to parse Erlang BEAM files',%0A url='http://github.com/matwey/pybeam',%0A author='Matwey V. Kornilov',%0A author_email='matwey.kornilov@gmail.com',%0A license='MIT',%0A...
555dac76a8810cfeaae96f8de04e9eb3362a3314
Remove old notification status column
migrations/versions/0109_rem_old_noti_status.py
migrations/versions/0109_rem_old_noti_status.py
Python
0.000001
@@ -0,0 +1,1224 @@ +%22%22%22%0A%0ARevision ID: 0109_rem_old_noti_status%0ARevises: 0108_change_logo_not_nullable%0ACreate Date: 2017-07-10 14:25:15.712055%0A%0A%22%22%22%0Afrom alembic import op%0Aimport sqlalchemy as sa%0Afrom sqlalchemy.dialects import postgresql%0A%0Arevision = '0109_rem_old_noti_status'%0Adown_rev...
21a67556b83b7905134439d55afe33c35e4b3422
Add an index on notifications for (service_id, created_at) to improve the performance of the notification queries. We've already performed this update on production since you need to create the index concurrently, which is not allowed from the alembic script. For that reason we are checking if the index exists.
migrations/versions/0246_notifications_index.py
migrations/versions/0246_notifications_index.py
Python
0
@@ -0,0 +1,542 @@ +%22%22%22%0A%0ARevision ID: 0246_notifications_index%0ARevises: 0245_archived_flag_jobs%0ACreate Date: 2018-12-12 12:00:09.770775%0A%0A%22%22%22%0Afrom alembic import op%0A%0Arevision = '0246_notifications_index'%0Adown_revision = '0245_archived_flag_jobs'%0A%0A%0Adef upgrade():%0A conn = op.get_b...
1337c19df3ccecf5739c58a719742d970c7faa14
Calculate LDA
build_topics.py
build_topics.py
Python
0.998653
@@ -0,0 +1,1883 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport argparse%0Aimport json%0Aimport logging%0Aimport os%0A%0Afrom gensim import corpora%0Afrom gensim.models.ldamulticore import LdaMulticore%0A%0Afrom common import SimpleTokenizer%0A%0A%0Adef parse_args():%0A description = '''%0A Finds ...
86b2f32bd212a14e904b9823fbf543b321f46ca7
Add very basic setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,116 @@ +from distutils.core import setup%0A%0Asetup(name='astcheck',%0A version='0.1',%0A py_modules=%5B'astcheck'%5D,%0A )
523a6fe005149bf0a8a91cd81c9f692f5aaaf1c9
fix description
farmer/models.py
farmer/models.py
#coding=utf8 import os import sys import time from psutil import Process from datetime import datetime from threading import Thread from ansible.runner import Runner from ansible.inventory import Inventory from django.db import models from farmer.settings import WORKER_TIMEOUT, ANSIBLE_FORKS class Task(models.Mod...
Python
0.020455
@@ -2479,16 +2479,20 @@ derr = ' +JOB TIMEOUT'
5acc7d50cbe199af49aece28b95ea97484ae31c7
Add solution class for Ghia et al. (1982)
snake/solutions/ghiaEtAl1982.py
snake/solutions/ghiaEtAl1982.py
Python
0
@@ -0,0 +1,2151 @@ +%22%22%22%0AImplementation of the class %60GhiaEtAl1982%60 that reads the centerline velocities%0Areported in Ghia et al. (1982).%0A%0A_References:_%0A* Ghia, U. K. N. G., Ghia, K. N., & Shin, C. T. (1982).%0A High-Re solutions for incompressible flow using the Navier-Stokes equations%0A and a mul...
a893a8f9375164cbbec4e276ae73f181f74fd9ae
create image,py
src/image.py
src/image.py
Python
0.000001
@@ -0,0 +1,63 @@ +#%0A# image.py%0A# Created by pira on 2017/07/28.%0A#%0A%0A#coding: utf-8
14068a2e3ca445c02895aed38420baf846338aae
Add smile detection example script.
scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py
scripts/examples/25-Machine-Learning/nn_haar_smile_detection.py
Python
0
@@ -0,0 +1,1011 @@ +# Simle detection using Haar Cascade + CNN.%0Aimport sensor, time, image, os, nn%0A%0Asensor.reset() # Reset and initialize the sensor.%0Asensor.set_contrast(2)%0Asensor.set_pixformat(sensor.GRAYSCALE) # Set pixel format to RGB565%0Asensor.set_framesize(sensor.QQVGA) #...
b31e7a3471daefb79b1d63a433c480cf51b75745
Create __init__.py
FireModules/FileDownloads/AccountBruting/__init__.py
FireModules/FileDownloads/AccountBruting/__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
7a4df9d8c385ed53e29e5171c115939920a271b3
Add a setup.py script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,462 @@ +# Use the setuptools package if it is available. It's preferred %0A# because it creates an exe file on Windows for Python scripts.%0Atry:%0A from setuptools import setup%0Aexcept ImportError:%0A from ez_setup import use_setuptools%0A use_setuptools()%0A from setuptools import setup%0A ...
1e7548a5b237f18c3bf5918a2254d04125492372
Add setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,221 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup, find_packages%0A%0Asetup(name='rapidtest',%0A version='0.1',%0A author='Simon Zhang',%0A license='MIT',%0A packages=find_packages(),%0A install_requires=%5B%5D)%0A
61fcca809b31372bb5e793359df243cff5ee23cf
Add the setup.py file
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,588 @@ +# -*- coding: utf-8 -*-%0Afrom setuptools import setup%0A%0Asetup(%0A name='fedmsg_fasclient',%0A version='0.1',%0A description='A fedmsg consumer that runs the fasClient based on fedmsg FAS messages',%0A license=%22LGPLv2+%22,%0A author='Janez Nemani%C4%8D, Ralph Bean and Pierre-Yves ...
139123ddb81eec12d0f932ff6ff73aadb4b418cc
Add decorator to make a Node class from a regular function
ocradmin/lib/nodetree/decorators.py
ocradmin/lib/nodetree/decorators.py
Python
0.000001
@@ -0,0 +1,1516 @@ +%22%22%22%0ANodetree decorators.%0A%22%22%22%0A%0Aimport inspect%0Aimport textwrap%0Aimport node%0A%0A%0Adef underscore_to_camelcase(value):%0A def camelcase(): %0A yield str.lower%0A while True:%0A yield str.capitalize%0A c = camelcase()%0A return %22%22.join(c.nex...
a34810b957ee5381db2ea62fbcfc103c5ad0cf0e
Check for image earlier so we can open in binary
grip/server.py
grip/server.py
import os import re import errno import requests import mimetypes from traceback import format_exc from flask import Flask, current_app, safe_join, abort, url_for, send_from_directory from .renderer import render_page, render_image default_filenames = ['README.md', 'README.markdown'] def serve(path=None, host=None,...
Python
0
@@ -2173,16 +2173,246 @@ rt(404)%0A +%0A # if we think this file is an image, we need to read it in%0A # binary mode and serve it as such%0A mimetype, _ = mimetypes.guess_type(filename)%0A is_image = mimetype.startswith(%22image/%22)%0A%0A @@ -2454,32 +2454,42 @@ ...
fe7f07cbd9ff9844efa2b191a900f6efb9de576e
add db model file
model/db.py
model/db.py
Python
0
@@ -0,0 +1,29 @@ +# db model - all db handlers%0A
8ec524a7a64c55f0759e18ea4b70c63c9c83f99a
Add admin for the various models
pombola/interests_register/admin.py
pombola/interests_register/admin.py
Python
0
@@ -0,0 +1,949 @@ +from django.contrib import admin%0A%0Afrom . import models%0A%0A%0Aclass CategoryAdmin(admin.ModelAdmin):%0A prepopulated_fields = %7B%22slug%22: %5B%22name%22%5D%7D%0A list_display = %5B'slug', 'name', 'sort_order'%5D%0A search_fields = %5B'name'%5D%0A%0A%0Aclass ReleaseAdmin(admin.ModelAdm...
a4f49b988a10afc160c217d32da46ea854059e8c
Add migration file
ureport/polls/migrations/0060_populate_category_displayed.py
ureport/polls/migrations/0060_populate_category_displayed.py
Python
0.000001
@@ -0,0 +1,800 @@ +# Generated by Django 2.2.10 on 2020-05-05 15:01%0A%0Afrom django.db import migrations%0A%0A%0Adef noop(apps, schema_editor): # pragma: no cover%0A pass%0A%0A%0Adef populate_category_displayed(apps, schema_editor): # pragma: no cover%0A PollResponseCategory = apps.get_model(%22polls%22, %22Po...
b7cd3081585c0a4695db4f85b7db8e346a525e23
add to pypi
setup.py
setup.py
Python
0
@@ -0,0 +1,398 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name=%22libraw.py%22,%0A version=%221.0%22,%0A description=%22python bindings using ctypes for libraw%22,%0A url=%22https://github.com/paroj/libraw.py%22,%0A author=%22Pavel Rojtberg%22,%0A license=%22LGPLv2%22,%0A classi...
88cb2155d55100d9b00dca1ecf4f9a01dec7c3f5
Add missing 'import os' for integrationtest/vm/basic/suite_setup.py
integrationtest/vm/basic/suite_setup.py
integrationtest/vm/basic/suite_setup.py
''' @author: Frank ''' import zstackwoodpecker.setup_actions as setup_actions import zstackwoodpecker.operations.deploy_operations as deploy_operations import zstackwoodpecker.operations.config_operations as config_operations import zstackwoodpecker.test_lib as test_lib import zstackwoodpecker.test_util as t...
Python
0.000011
@@ -23,16 +23,27 @@ %0A'''%0D%0A%0D%0A +import os%0D%0A import z
e3cbc79cc60e21978fe682b73413e9de19b71543
add a print hello world function
helloAlyssa.py
helloAlyssa.py
Python
0.999999
@@ -0,0 +1,55 @@ +#This is my hello world program%0Aprint ('Hello World')%0A%0A
9339307b6bd42ad014e528d337fc9f195c632245
Add tick class
zaifbot/exchange/tick.py
zaifbot/exchange/tick.py
Python
0.000001
@@ -0,0 +1,404 @@ +class Tick:%0A def __init__(self, currency_pair):%0A self.size = currency_pair.info%5B'aux_unit_step'%5D%0A self._decimal_digits = currency_pair.info%5B'aux_unit_point'%5D%0A%0A def truncate_price(self, price):%0A remainder = price %25 self.size%0A truncated_price = ...
d9d84083a488ad1b4643298d7a75b54b4e0e34be
add OptionChainConsistencyRegressionAlgorithm
Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py
Algorithm.Python/OptionChainConsistencyRegressionAlgorithm.py
using System; namespace QuantConnect.Algorithm.Python { public class OptionChainConsistencyRegressionAlgorithm { public OptionChainConsistencyRegressionAlgorithm() { } } }
Python
0.000001
@@ -1,182 +1,3317 @@ %EF%BB%BF -using System;%0Anamespace QuantConnect.Algorithm.Python%0A%7B%0A%09public class OptionChainConsistencyRegressionAlgorithm%0A%09%7B%0A%09%09public OptionChainConsistencyRegressionAlgorithm()%0A%09%09%7B%0A%09%09%7D%0A%09%7D%0A%7D%0A +# QUANTCONNECT.COM - Democratizing Finance, Empowering...
aafb77596ae0cb6c27b2564434367d2b4d5debd1
Add tests
Orange/widgets/visualize/tests/test_owscatterplot.py
Orange/widgets/visualize/tests/test_owscatterplot.py
Python
0
@@ -0,0 +1,1126 @@ +import numpy as np%0A%0Afrom Orange.data import Table%0Afrom Orange.widgets.tests.base import WidgetTest%0Afrom Orange.widgets.visualize.owscatterplot import OWScatterPlot%0A%0A%0Aclass TestOWScatterPlot(WidgetTest):%0A def setUp(self):%0A self.widget = self.create_widget(OWScatterPlot)%0A...
a1049edc842e54784b5ac93427ab1c1dace930f7
Remove delay from end of volTM2DRotateClip.py.
Rendering/Volume/Testing/Python/volTM2DRotateClip.py
Rendering/Volume/Testing/Python/volTM2DRotateClip.py
#!/usr/bin/env python import time import vtk from vtk.test import Testing from vtk.util.misc import vtkGetDataRoot VTK_DATA_ROOT = vtkGetDataRoot() # Simple volume rendering example. reader = vtk.vtkImageReader() reader.SetDataByteOrderToLittleEndian() reader.SetDataExtent(0,63,0,63,1,93) reader.SetFilePrefix("" + str...
Python
0.000001
@@ -19,20 +19,8 @@ hon%0A -import time%0A impo @@ -4133,71 +4133,8 @@ 1%0A%0A -# force a wait for hardware to finish rendering%0Atime.sleep(1)%0A%0A # --
47ad7f4d3b69315e25ae96099fe73b4d9cd7666e
Use file extension to select config file parser
dotbot/config.py
dotbot/config.py
import yaml import json from .util import string class ConfigReader(object): def __init__(self, config_file_path): self._config = self._read(config_file_path) def _read(self, config_file_path): try: with open(config_file_path) as fin: try: data =...
Python
0
@@ -17,16 +17,31 @@ rt json%0A +import os.path%0A from .ut @@ -249,17 +249,33 @@ -with open +_, ext = os.path.splitext (con @@ -292,16 +292,8 @@ ath) - as fin: %0A @@ -305,101 +305,42 @@ - try:%0A data = yaml.safe_load(fin)%0A except Exception +with open(config_f...
935f1d257dc4126a3d4f8b2f76dda6890ce68f3b
Allow cycles of install/uninstall of Twisted Reactor
kivy/support.py
kivy/support.py
''' Support ======= Activate other framework/toolkit inside our event loop ''' __all__ = ('install_gobject_iteration', 'install_twisted_reactor', 'install_android') from kivy.compat import PY2 def install_gobject_iteration(): '''Import and install gobject context iteration inside our event loop. This i...
Python
0
@@ -7357,8 +7357,537 @@ _stop)%0A%0A +%0Adef uninstall_twisted_reactor(**kwargs):%0A '''Uninstalls a threaded twisted reactor. It blocks, and no iteration will%0A run after.%0A '''%0A import twisted%0A%0A # prevent uninstalling more than once%0A if not hasattr(twisted, '_kivy_twisted_reactor_installe...
fec74a5401f925755484955a1b38dd3044824eb3
Create npy2ckpt.py
npy2ckpt.py
npy2ckpt.py
Python
0.000006
@@ -0,0 +1,2027 @@ +%22%22%22Conversion of the .npy weights into the .ckpt ones.%0A%0AThis script converts the weights of the DeepLab-ResNet model%0Afrom the numpy format into the TensorFlow one.%0A%22%22%22%0A%0Afrom __future__ import print_function%0A%0Aimport argparse%0Aimport os%0A%0Aimport tensorflow as tf%0Aimpor...
8b5bf433b304895f04813c64d556316c48c046fe
add setup.py for distribute
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1327 @@ +#!/usr/bin/env python%0D%0Aimport os, os.path%0D%0Afrom distutils.core import setup, Extension%0D%0Aimport distutils.msvccompiler%0D%0A%0D%0Asource_files = %5B%22Engine.cpp%22, %22Wrapper.cpp%22, %22PyV8.cpp%22%5D%0D%0A%0D%0Amacros = %5B(%22BOOST_PYTHON_STATIC_LIB%22, None)%5D%0D%0Athird_party_libra...
56915ed7d290fff6e37859181781687590a2e974
Remove early_stopping.py from estimator/contrib in favor of estimator/python/estimator/early_stopping.py. And the test.
tensorflow/contrib/estimator/python/estimator/early_stopping.py
tensorflow/contrib/estimator/python/estimator/early_stopping.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.000131
@@ -1023,34 +1023,16 @@ timator. -contrib.estimator. python.e @@ -1266,26 +1266,8 @@ tor. -contrib.estimator. pyth
1ee1d0daab4b8e123bc04996019fb12cc65b8888
Add tISM SDB module (#36957)
salt/sdb/tism.py
salt/sdb/tism.py
Python
0
@@ -0,0 +1,2158 @@ +# -*- coding: utf-8 -*-%0A'''%0AtISM - the Immutalbe Secrets Manager SDB Module%0A%0A:maintainer: tISM%0A:maturity: New%0A:platform: all%0A%0A.. versionadded:: TBD%0A%0AThis module will decrypt PGP encrypted secrets against a tISM server.%0A%0A.. code::%0A%0A sdb://%3Cprofile%3E/%3Cenc...
8dad8cf8c83eba037b29d3243b29b985dc4004a1
add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,145 @@ +#!/usr/bin/python%0A%0Afrom distutils.core import setup%0A%0Asetup(%0A name='telepathy-python',%0A version='0.0.1',%0A packages=%5B'telepathy'%5D,%0A )%0A%0A
b5c2986ccf3c70b9cb52d0374c53bc8232719554
Add dbm_metrics.py script where the AIS method will be stored
pylearn2/scripts/dbm/dbm_metrics.py
pylearn2/scripts/dbm/dbm_metrics.py
Python
0
@@ -0,0 +1,396 @@ +#!/usr/bin/env python%0Aimport argparse%0A%0Aif __name__ == '__main__':%0A # Argument parsing%0A parser = argparse.ArgumentParser()%0A parser.add_argument(%22metric%22, help=%22the desired metric%22,%0A choices=%5B%22ais%22%5D)%0A parser.add_argument(%22model_path%2...
a8b079b8be1e9559770dd0f701385b2361158e24
Add tests_require to setup.py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com> # # This code is distributed under the terms and conditions # from the MIT License (MIT). import io import os import sys if sys.version_info < (2, 6): raise ImportError("smart_open requires python >= 2.6") ...
Python
0.000001
@@ -1151,16 +1151,98 @@ %5D,%0A%0A + tests_require=%5B%0A 'mock',%0A 'moto',%0A 'responses',%0A %5D,%0A%0A%0A test
c230fc69e2509c79190e53589457f161accd1626
Change long_description in setup.py.
setup.py
setup.py
import re import ast from setuptools import setup, find_packages _version_re = re.compile(r'__version__\s+=\s+(.*)') with open('mycli/__init__.py', 'rb') as f: version = str(ast.literal_eval(_version_re.search( f.read().decode('utf-8')).group(1))) description = 'CLI for MySQL Database. With auto-completi...
Python
0
@@ -716,32 +716,19 @@ ion= -open('README.md').read() +description ,%0A
2a331f0165b2e3874243fcfecc3e3deab2760ff4
Add python setup filie
setup.py
setup.py
Python
0.000002
@@ -0,0 +1,297 @@ +from setuptools import setup%0A%0Asetup(name='bitevery',%0A version='0.0.1.b2',%0A description='BitEvery Python API',%0A url='https://www.bitevery.com',%0A author='BitEvery',%0A author_email='support@bitevery.com',%0A license='MIT',%0A packages=%5B'bitevery'%5D,%0A ...
57bfd23957bdd535b5ae21ed1df3ff25dd75a8bd
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,373 @@ +from setuptools import setup%0A%0Asetup(%0A name='pirx',%0A version='0.1',%0A author='Piotr Wasilewski',%0A author_email='wasilewski.piotrek@gmail.com',%0A description='Django settings builder',%0A license='MIT',%0A keywords='django settings build builder',%0A url='https://git...
876d02a03382863acaf1e8a5327475014734cc8b
add metadata proxy support for Quantum Networks
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
@@ -4603,32 +4603,221 @@ um_agent:main',%0A + 'quantum-metadata-agent ='%0A 'quantum.agent.metadata.agent:main',%0A 'quantum-ns-metadata-proxy ='%0A 'quantum.agent.metadata.namespace_proxy:main',%0A 'qua
76a8834243cc70f3065b686dd09004f1dc3ffdb0
Create rapideye_remover_bordas_catalogo.py
rapideye_remover_bordas_catalogo.py
rapideye_remover_bordas_catalogo.py
Python
0.000038
@@ -0,0 +1,1124 @@ +from osgeo import ogr%0Aimport os%0Afrom osgeo import osr%0Afrom qgis.core import *%0A%0Ashapefile = %22C:/Users/pedro.mendes/Desktop/Brasil_00_2016.shp%22%0Adriver = ogr.GetDriverByName(%22ESRI Shapefile%22)%0AdataSource = driver.Open(shapefile, 0)%0Alayer = dataSource.GetLayer()%0Aproj=layer.GetSp...
737dadd2e447c9f03de80ea808e137dcc1206c9b
Create Nvidia_GPU_Temperature.py
Nvidia_GPU_Temperature.py
Nvidia_GPU_Temperature.py
Python
0.000028
@@ -0,0 +1,1025 @@ +import time%0Afrom BlinkyTape import BlinkyTape%0Aimport subprocess%0Aimport os%0Aimport re%0A%0A#bb = BlinkyTape('/dev/tty.usbmodemfa131')%0Abb = BlinkyTape('COM8')%0A%0Awhile True:%0A%0A output = subprocess.check_output(%5B%22C:%5C%5CProgram Files%5C%5CNVIDIA Corporation%5C%5CNVSMI%5C%5Cnvidia-...
b39af3af2104875919577f769701e7bde73967fd
clean file initialized
genetic_music.py
genetic_music.py
Python
0.000003
@@ -0,0 +1,18 @@ +print('hola chio')
fbc780c7beb94d73b2a4ea110e733f8c87763741
Add location name lookup for ajax_select.
geoip/lookups.py
geoip/lookups.py
Python
0
@@ -0,0 +1,1532 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A##%0A## Author: Orcun Avsar %3Corc.avs@gmail.com%3E%0A##%0A## Copyright (C) 2011 S2S Network Consultoria e Tecnologia da Informacao LTDA%0A##%0A## This program is free software: you can redistribute it and/or modify%0A## it under the terms of the GNU...
af3ba846a8074132c64568c420ecb9b6ade9c6ea
Work on defining RegEx to find and format molecular geometries in Gaussian output files.
geomRegexTest.py
geomRegexTest.py
Python
0
@@ -0,0 +1,1327 @@ +__author__ = 'Thomas Heavey'%0A%0Aimport re%0A%0Afilename = %22testg.out%22%0A%0Adef findgeoms(filename):%0A %22%22%22A function that takes a file name and returns a list of%0A geometries.%22%22%22%0A relevantelem = %5B1,3,4,5%5D%0A xyzformat = '%7B:%3E2%7D %7B: f%7D %7B: f%7D %...
df9a6ab91eedfe91343ceb103156fe08cd965614
test script form new Keras 2x API model config
app/backend-test/keras_2x_api/run01_print_keras_model_json.py
app/backend-test/keras_2x_api/run01_print_keras_model_json.py
Python
0
@@ -0,0 +1,96 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A__author__ = 'ar'%0A%0Aif __name__ == '__main__':%0A pass
1498e786201c1c1e2127da7d23db142559ad68a8
Add support for Assembla
services/assembla.py
services/assembla.py
Python
0
@@ -0,0 +1,813 @@ +import foauth.providers%0A%0A%0Aclass Assembla(foauth.providers.OAuth2):%0A # General info about the provider%0A provider_url = 'https://www.assembla.com/'%0A docs_url = 'http://api-doc.assembla.com/content/api_reference.html'%0A category = 'Code'%0A%0A # URLs to interact with the API%...
e67abde6228feaa231b2b3bfc97d6ca1f2cf8276
Use match argument in calls to pytest.raises when testing pin
tests/unit_tests/test_pin.py
tests/unit_tests/test_pin.py
""" Tests for constructing Pin universes """ import numpy import pytest import openmc from openmc.model import Pin @pytest.fixture def pin_mats(): fuel = openmc.Material(name="UO2") clad = openmc.Material(name="zirc") water = openmc.Material(name="water") return fuel, clad, water @pytest.fixture d...
Python
0
@@ -613,32 +613,48 @@ aises(ValueError +, match=%22length%22 ) as exec_info:%0A @@ -722,46 +722,8 @@ ats) -%0A assert %22length%22 in str(exec_info) %0A%0A @@ -805,32 +805,49 @@ aises(ValueError +, match=%22index 0%22 ) as exec_info:%0A @@ -887,47 +887,8 @@ ats) -%0A assert %22index 0%22 in str(exec_info...
0fc46c92f8682879591d9fc473be34116c9106be
add migration
custom/ilsgateway/migrations/0010_auto_20160830_1923.py
custom/ilsgateway/migrations/0010_auto_20160830_1923.py
Python
0.000001
@@ -0,0 +1,1166 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Aimport datetime%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('ilsgateway', '0009_auto_20160413_1311'),%0A %5D%0A%0A operations = %5B%0A ...
fdd9ac1da19d37ca482d770bb0c8f159fb7d4752
optimize to not instantiate Fortune.
flask/app.py
flask/app.py
#!/usr/bin/env python from flask import Flask, jsonify, request, render_template from flask.ext.sqlalchemy import SQLAlchemy from sqlalchemy import create_engine from random import randint from operator import attrgetter try: import MySQLdb mysql_schema = "mysql:" except ImportError: mysql_schema = "mysql+...
Python
0
@@ -2748,26 +2748,13 @@ s = -%5B%5D%0A for row in +list( dbra @@ -2798,73 +2798,8 @@ ne%22) -:%0A fortunes.append(Fortune(id=row.id, message=row.message) )%0A
c2b69a51faac56689edc88e747a00b60cf08cc04
Add default ordering of progress outcome groups
dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py
dthm4kaiako/poet/migrations/0003_auto_20190731_1912.py
Python
0
@@ -0,0 +1,358 @@ +# Generated by Django 2.1.5 on 2019-07-31 07:12%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('poet', '0002_progressoutcomegroup'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterModelOptions(%0A n...
32a79573b38c6d2ea7f5b81363610a5d9332ed4e
Add python script to parse JSON output
src/main/resources/jsonformat.py
src/main/resources/jsonformat.py
Python
0.000006
@@ -0,0 +1,1202 @@ +#!/usr/bin/python2.7%0Aimport json%0Aimport socket%0Aimport sys%0A%0Adef readOutput(host, port):%0A%09data = None%0A%09s = None%0A%09try:%0A%09%09s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)%0A%09%09s.connect((host, int(port)))%0A%09except socket.error as msg:%0A%09%09s = None%0A%09%09print...
699469342179fdc4319b5f39ea201015860ef09d
Add migration for CI fix
infrastructure/migrations/0020_auto_20210922_0929.py
infrastructure/migrations/0020_auto_20210922_0929.py
Python
0
@@ -0,0 +1,606 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.29 on 2021-09-22 07:29%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0Aimport django.db.models.deletion%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('infrastructure'...
2ead746f0e697276e7753c735befbd1a14feba6d
Restrict parquet many cols test to one test dimension.
tests/query_test/test_parquet.py
tests/query_test/test_parquet.py
#!/usr/bin/env python # Copyright (c) 2012 Cloudera, Inc. All rights reserved. import pytest from tests.common.test_vector import * from tests.common.impala_test_suite import * # Tests specific to parquet. class TestParquetManyColumns(ImpalaTestSuite): @classmethod def get_workload(self): return 'functional-q...
Python
0.999962
@@ -428,16 +428,154 @@ sions()%0A + # There is no reason to run these tests using all dimensions.%0A cls.TestMatrix.add_dimension(create_single_exec_option_dimension())%0A cls.
09d815c6b53c74ae9a2f3831a2eec9c2b266eca7
add the prototype.
simple_xls_to_xml.py
simple_xls_to_xml.py
Python
0
@@ -0,0 +1,824 @@ +%EF%BB%BF# encoding:utf-8%0A%0Aimport codecs%0Aimport xlrd%0Aimport xml.dom.minidom%0A%0Afilter_words = None%0A%0Adef xlsRead():%0A global filter_words%0A %0A data = xlrd.open_workbook(%22filter.xlsx%22)%0A table = data.sheets()%5B0%5D # %E8%8E%B7%E5%8F%96%E7%AC%AC%E4%B8%80%E4%B8%A...
6a268c69fced2a5b9e97086fa2a9089837376db4
add subfolder
keras/metrics/empty.py
keras/metrics/empty.py
Python
0.000005
@@ -0,0 +1,2 @@ +#%0A
1d1712259a1e6e23b7a6a5541f70573b05619e99
Create stock.py
stock.py
stock.py
Python
0.000001
@@ -0,0 +1,2308 @@ +from openerp.osv import fields, osv%0A%0Aclass stock_move(osv.Model):%0A _name = 'stock.move'%0A _inherit = 'stock.move'%0A%0A def onchange_product_id(self, cr, uid, ids, prod_id=False, loc_id=False,%0A loc_dest_id=False, partner_id=False):%0A res_prod = su...
4094ea54fd9bec8c40d7666364c4ad4427eaf1c3
Use `caches` over `get_cache` per django deprecation
regulations/generator/api_reader.py
regulations/generator/api_reader.py
from django.core.cache import get_cache from regulations.generator import api_client class ApiCache(object): """ Interface with the cache. """ def __init__(self): self.cache = get_cache('api_cache') def get(self, key): return self.cache.get(key) def set(self, key, value): sel...
Python
0.000001
@@ -23,25 +23,22 @@ import -get_ cache +s %0Afrom re @@ -188,18 +188,15 @@ e = -get_ cache -( +s%5B 'api @@ -202,17 +202,17 @@ i_cache' -) +%5D %0A%0A de @@ -2109,16 +2109,17 @@ # + Add the
ed09ca11fc3586c9782103269b12240ed6b27911
complete and tested juliaset, HW4
juliaset.py
juliaset.py
Python
0
@@ -0,0 +1,956 @@ +class JuliaSet(object):%0A%0A def set_plane(self, _d):%0A self._d=_d%0A self._complexplane=%5B%5D%0A x=-2%0A y=-2%0A while x%3C=2:%0A while y%3C=2:%0A self._complexplane.append(complex(x,y))%0A y+=_d%0A x+=_d%0A...
8282cca05b784bb0966ba8246900627286c5d98c
Use invoke as build tool
tasks.py
tasks.py
Python
0.000001
@@ -0,0 +1,2416 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals, absolute_import%0A%0Afrom os.path import join, abspath, dirname, exists%0A%0Afrom invoke import run, task%0A%0AROOT = abspath(join(dirname(__file__)))%0AI18N_DOMAIN = 'udata-admin'%0A%0A%0Adef green(text):%0A return '%5C033%5B1;32...
c63144242d9cf2ecf02d58eb9a93cfe426acc6dc
Add script to send unregister user emails
scripts/send_preprint_unreg_contributor_emails.py
scripts/send_preprint_unreg_contributor_emails.py
Python
0
@@ -0,0 +1,2354 @@ +# -*- coding: utf-8 -*-%0A%22%22%22Sends an unregistered user claim email for preprints created after 2017-03-14. A hotfix was made on that%0Adate which caused unregistered user claim emails to not be sent. The regression was fixed on 2017-05-05. This%0Asends the emails that should have been sent du...
83bb6d6685f9ac20da9324580c760306b04eb7d6
Add Experiment.from_results
learning/experiment.py
learning/experiment.py
from __future__ import division import sys sys.path.append("../lib") import logging import time import cPickle as pickle import os import os.path import errno from shutil import copyfile import numpy as np import h5py import theano import theano.tensor as T from utils.datalog import dlog, StoreToH5, TextPrinter ...
Python
0.000013
@@ -679,16 +679,435 @@ riment%0A%0A + @classmethod%0A def from_results(cls, path, row=-1):%0A param_fname = path + %22/paramfile.py%22%0A results_fname = path + %22/results.h5%22%0A%0A experiment = cls()%0A experiment.load_param_file(param_fname)%0A %0A model = experimen...
fcac525d3f974c7d4a1e90c1adc444c6d6e72018
Add sed executor #123
executors/SED.py
executors/SED.py
Python
0.000001
@@ -0,0 +1,497 @@ +%0Afrom .base_executor import ScriptExecutor%0Afrom judgeenv import env%0A%0A%0Aclass Executor(ScriptExecutor):%0A ext = '.sed'%0A name = 'SED'%0A command = env%5B'runtime'%5D.get('sed')%0A test_program = '''s/.*/echo: Hello, World!/%0Aq'''%0A fs = %5B'.*%5C.(so%7Csed)', '/dev/urandom$...
84cf95cde942d91f53959fea4151847902a69d14
Add a cleanup script.
rl-rc-car/cleanup.py
rl-rc-car/cleanup.py
Python
0
@@ -0,0 +1,58 @@ +from rccar import RCCar%0A%0Acar = RCCar()%0Acar.cleanup_gpio()%0A
b2741a8316ea1ffbf9e88a9fb883ef9e2507be42
Upgrade libchromiuncontent to 3245ef8
script/lib/config.py
script/lib/config.py
#!/usr/bin/env python import platform import sys BASE_URL = 'https://gh-contractor-zcbenz.s3.amazonaws.com/libchromiumcontent' LIBCHROMIUMCONTENT_COMMIT = 'f0c3a4546d8e75689c16b9aee1052a72951e58de' ARCH = { 'cygwin': '32bit', 'darwin': '64bit', 'linux2': platform.architecture()[0], 'win32': '32bit', ...
Python
0
@@ -155,47 +155,47 @@ = ' -f0c3a4546d8e75689c16b9aee1052a72951e58d +3245ef802fbf546f1a1d206990aa9d18be6bfbf e'%0A%0A
a03eaddd3e950f628320d1b5b007d87b11906844
add saveload.py (with error)
converter/saveload.py
converter/saveload.py
Python
0
@@ -0,0 +1,1409 @@ +#!/usr/local/bin/python%0A# -*- encoding:utf-8%0A%0Aimport sys%0Aimport subprocess as sp%0Aimport numpy%0A%0Adef load_mp3(filename):%0A%09command = %5B 'ffmpeg',%0A%09'-i', sys.argv%5B1%5D,%0A%09'-f', 's16le',%0A%09'-acodec', 'pcm_s16le',%0A%09'-ar', '44100', # ouput will have 44100 Hz%0A%09'-ac', '...
4ab3e59b7e9fe339c96042107c3f59bdf1afc46a
add instagram compliance fix
requests_oauthlib/compliance_fixes/instagram.py
requests_oauthlib/compliance_fixes/instagram.py
Python
0
@@ -0,0 +1,1071 @@ +try:%0A from urlparse import urlparse, parse_qs%0Aexcept ImportError:%0A from urllib.parse import urlparse, parse_qs%0A%0Afrom oauthlib.common import add_params_to_uri%0A%0A%0Adef instagram_compliance_fix(session):%0A def _non_compliant_param_name(url, headers, data):%0A # If the use...
b9b34eb2bca76e76ba4f7399b12daa27ed2ab7f4
Create uvSetTgl.py
af_scripts/uv/uvSetTgl.py
af_scripts/uv/uvSetTgl.py
Python
0.000002
@@ -0,0 +1,888 @@ +# This script will switch UV Set between %22map1%22 and %22atlasmap%22.%0A# Useage:%0A# Select meshes and run this script%0Aimport maya.cmds as cmds%0Adef uvsetTgl():%0A shape_node = cmds.ls(sl=True, fl=True, dag=True, type='shape')%0A current_uvset = cmds.polyUVSet(shape_node%5B0%5D,q=True, cu...
a9b45bf50dae68c9a801ec7942c4f4cc38fa08f5
Create GenerateUnifiedReports.py
GenerateUnifiedReports.py
GenerateUnifiedReports.py
Python
0
@@ -0,0 +1,1252 @@ +import argparse%0A%0A%0A%0A# Read options on which PayPal records to process (year / month) or run on discovery to find the files or discover new files and generate new unified files but preserve the old ones (default)%0A# load all the Website records based on discovery%0A# load the PayPal monthly r...
24f665e02912a3f79eec9776c86863a9e172d94a
Create HR_pythonPrintFunction.py
HR_pythonPrintFunction.py
HR_pythonPrintFunction.py
Python
0.000991
@@ -0,0 +1,229 @@ +import sys%0A%0Aif __name__ == '__main__':%0A n = int(input())%0A %0A # imported sys for a elegant solution, Python 3%0A # * before range means taking everything 0 or more%0A print(*range(1,n+1), sep='',end='%5Cn', file= sys.stdout)%0A
ce552a70f77934d4b76b5710b76b22967484d17e
Create folderwatcher.py
folderwatcher.py
folderwatcher.py
Python
0.000001
@@ -0,0 +1,390 @@ +import os%0Aimport time%0Aimport datetime%0A%0Aoutold = %5B%5D%0Atry:%0A%09while True:%0A%09%09out = os.listdir()%0A%09%09if outold != out:%0A%09%09%09ldate= datetime.datetime.now().strftime('%25I:%25M:%25S')%0A%09%09%09for x in outold:%0A%09%09%09%09if x not in out:%0A%09%09%09%09%09print ('Moved: ...
207c211f93b7b98b2e55a060d91e3329d441faaf
format metrics more idiomatically
src/diamond/handler/tsdb.py
src/diamond/handler/tsdb.py
# coding=utf-8 """ Send metrics to a [OpenTSDB](http://opentsdb.net/) server. [OpenTSDB](http://opentsdb.net/) is a distributed, scalable Time Series Database (TSDB) written on top of [HBase](http://hbase.org/). OpenTSDB was written to address a common need: store, index and serve metrics collected from computer syst...
Python
0
@@ -2135,16 +2135,121 @@ meout'%5D) +%0A self.metric_format = str(self.config%5B'format'%5D)%0A self.tags = str(self.config%5B'tags'%5D) %0A%0A @@ -2585,32 +2585,82 @@ 'timeout': '',%0A + 'format': '',%0A 'tags': '',%0A %7D)%0A%0A @@ -2950,16 +2950,129 @@ ...
41fc87e402aa2864c22adb5c09a713c2b0eacb72
Add replace test that shutdowns a node and replaces a pod (#806)
frameworks/cassandra/tests/test_recovery_shutdown.py
frameworks/cassandra/tests/test_recovery_shutdown.py
Python
0
@@ -0,0 +1,2324 @@ +import pytest%0Afrom tests.config import *%0Aimport sdk_install as install%0Aimport sdk_tasks as tasks%0Aimport sdk_utils as utils%0Aimport json%0Aimport shakedown%0Aimport time%0Aimport sdk_cmd as cmd%0A%0A%0Adef setup_module(module):%0A install.uninstall(PACKAGE_NAME)%0A utils.gc_frameworks(...
c11e74d4210c6de8917dfde6cb33d75f6b1b835a
add migration that solves BigAutoField problem
hordak/migrations/0032_check_account_type_big_int.py
hordak/migrations/0032_check_account_type_big_int.py
Python
0
@@ -0,0 +1,733 @@ +# Generated by Django 4.0.7 on 2022-09-18 10:33%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A (%22hordak%22, %220031_alter_account_currencies%22),%0A %5D%0A%0A operations = %5B%0A migrations.RunSQL(%0A ...
d3a11021f8be8e93c5c067b5fcf59bc4f9f92cea
add computation of sts for ISUSM
scripts/dbutil/compute_isusm_sts.py
scripts/dbutil/compute_isusm_sts.py
Python
0.000376
@@ -0,0 +1,1163 @@ +%22%22%22%0A Figure out when the ISUSM data started...%0A%22%22%22%0A%0Aimport psycopg2%0Aimport network%0Aimport sys%0Aimport datetime%0Aimport pytz%0A%0Abasets = datetime.datetime.now()%0Abasets = basets.replace(tzinfo=pytz.timezone(%22America/Chicago%22))%0A%0Aisuag = psycopg2.connect(database='i...
133a4311fdb3c96edeb927250e549fcaf4080696
add silly module
modules/silly.py
modules/silly.py
Python
0.000001
@@ -0,0 +1,444 @@ +# -*- coding: ISO-8859-15 -*-%0A%0Afrom core.Uusipuu import UusipuuModule%0Aimport random, time%0Afrom core.tdiff import *%0A%0Aclass Module(UusipuuModule):%0A %0A def cmd_noppa(self, user, target, params):%0A self.log('ok noppaa heitetn!!')%0A self.chanmsg('%25s!' %25 random.choi...
f340bde6e047d86171385b90a023ac01e8914d0c
Add simple neural network (#6452)
neural_network/simple_neural_network.py
neural_network/simple_neural_network.py
Python
0
@@ -0,0 +1,1596 @@ +%22%22%22%0AForward propagation explanation:%0Ahttps://towardsdatascience.com/forward-propagation-in-neural-networks-simplified-math-and-code-version-bbcfef6f9250%0A%22%22%22%0A%0Aimport math%0Aimport random%0A%0A%0A# Sigmoid%0Adef sigmoid_function(value: float, deriv: bool = False) -%3E float:%0A ...
4b07d7cdd791a03ef4c7ec7e6e4188b625ffb8dc
Add migration
src/clarityv2/portfolio/migrations/0002_auto_20180228_2055.py
src/clarityv2/portfolio/migrations/0002_auto_20180228_2055.py
Python
0.000002
@@ -0,0 +1,471 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.6 on 2018-02-28 18:55%0Afrom __future__ import unicode_literals%0A%0Aimport ckeditor.fields%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('portfolio', '0001_initial'),%0A ...
0bc48c7131e0589e7f2980e16bce6c2dfcdbafda
Fix usage message from tag:file to tag=file
python/utils.py
python/utils.py
''' This file is part of the PyPhantomJS project. Copyright (C) 2011 James Roe <roejames12@hotmail.com> Copyright (C) 2011 Ariya Hidayat <ariya.hidayat@gmail.com> 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 F...
Python
0.000623
@@ -2488,17 +2488,17 @@ var='tag -: += file', h
4065a08ea401e0d95e8d40d9d735edf92edda861
Add unit tests on cache handler
oslo_policy/tests/test_cache_handler.py
oslo_policy/tests/test_cache_handler.py
Python
0.000002
@@ -0,0 +1,2076 @@ +# Copyright (c) 2020 OpenStack Foundation.%0A# All Rights Reserved.%0A%0A# Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A# not use this file except in compliance with the License. You may obtain%0A# a copy of the License at%0A#%0A# http://www.apache.o...
a4012beca6f7ff2514076297cbc4fb9b1b126590
Bump and pypi publish core
depends/docker-registry-core/docker_registry/core/__init__.py
depends/docker-registry-core/docker_registry/core/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2014 Docker. # # 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...
Python
0
@@ -1206,17 +1206,17 @@ = '2.0. -1 +2 '%0A__main
b3a7bca64b256dcc09b8ad49a7491e7a3717e74f
disable automatic deployment of images (needs verification)
planetstack/observer/steps/sync_image_deployments.py
planetstack/observer/steps/sync_image_deployments.py
import os import base64 from collections import defaultdict from django.db.models import F, Q from planetstack.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.deployment import Deployment from core.models.image import Image, ImageDeployments from util.logger import Logger,...
Python
0
@@ -495,16 +495,193 @@ (self):%0A + # smbaker: commented out automatic creation of ImageDeployments as%0A # as they will now be configured in GUI. Not sure if this is%0A # sufficient.%0A%0A# @@ -725,32 +725,33 @@ all deployments%0A +# image_de @@ -785,32 +785,33 @@ s....
3661ca3947763656165f8fc68ea42358ad37285a
Add stub for qiprofile update test.
test/unit/helpers/test_qiprofile.py
test/unit/helpers/test_qiprofile.py
Python
0
@@ -0,0 +1,1208 @@ +import os%0Aimport glob%0Aimport shutil%0Afrom nose.tools import (assert_equal, assert_is_not_none)%0Aimport qixnat%0Afrom ... import (project, ROOT)%0Afrom ...helpers.logging import logger%0Afrom qipipe.helpers import qiprofile%0A%0ACOLLECTION = 'Sarcoma'%0A%22%22%22The test collection.%22%22%22%0A...