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
0ee023d29f613f718f5b88c158b120adb8b2fe2e
add new package (#16289)
var/spack/repos/builtin/packages/py-murmurhash/package.py
var/spack/repos/builtin/packages/py-murmurhash/package.py
Python
0
@@ -0,0 +1,621 @@ +# Copyright 2013-2020 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%0A%0Aclass PyMurmurhash(PythonPackage):%0A %22%22%22Cython bindings for MurmurHash.%22%22%22...
e4bc3edf4180ac1385e125a11d01f222747b13f7
send File Over FTP using ftplib
python/sendFileOverFTP.py
python/sendFileOverFTP.py
Python
0
@@ -0,0 +1,565 @@ +#---License---%0A#This is free and unencumbered software released into the public domain.%0A%0A#Anyone is free to copy, modify, publish, use, compile, sell, or%0A#distribute this software, either in source code form or as a compiled%0A#binary, for any purpose, commercial or non-commercial, and by any...
cc4df17dbab6f2fd44b7e53f0638a47d342d76bb
Rename chars to caps as capabilities, not some characters.
astm/records.py
astm/records.py
# -*- coding: utf-8 -*- # # Copyright (C) 2012 Alexander Shorin # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. # """Common ASTM records structure.""" from datetime import datetime from .mapping import ( Record,...
Python
0
@@ -1089,19 +1089,18 @@ (name='c -har +ap s'),%0A
b33725e2a3153b27312e820797bbc8375dbe8970
Create beta_interweaving_strings_and_removing_digits.py
Solutions/beta_interweaving_strings_and_removing_digits.py
Solutions/beta_interweaving_strings_and_removing_digits.py
Python
0.000066
@@ -0,0 +1,201 @@ +from itertools import zip_longest as zlo%0Afrom string import digits%0A%0Ainterweave = lambda a,b: ''.join((i if i not in digits else '')+(j if j not in digits else '') for i,j in zlo(a, b, fillvalue = ''))%0A
6b53e890958251bd34c29b09f597c8221f4bc98b
Add sublime text utils module
modules/st_utils.py
modules/st_utils.py
Python
0
@@ -0,0 +1,109 @@ +import sublime%0A%0A%0Adef open_window():%0A sublime.run_command(%22new_window%22)%0A return sublime.active_window()%0A
ff2fba1c09cff57c9fb01ff3c12f076aff23d56a
Create __init__.py
__init__.py
__init__.py
Python
0.000429
@@ -0,0 +1,232 @@ +#!/usr/bin/python%0A%0A%0A#-------------------------------IMPORT--------------------------------#%0Afrom lib import *%0A%0A%0A#-------------------------------EXPORT--------------------------------#%0A__all__ = %5B'%3C#PREFIX#%3E_app','%3C#PREFIX#%3E_index'%5D%0A
1641de48deab3e6cc18de7eb40e1d02ab28dd88c
Create StarTrek.py
StarTrek.py
StarTrek.py
Python
0
@@ -0,0 +1,13 @@ +# Star Treck%0A
ae93eaf84487339c5fba696c7900485f2918546e
Add __init__.py
__init__.py
__init__.py
Python
0.006636
@@ -0,0 +1,62 @@ +from .pytypecheck import tc, tc_opts%0Afrom . import predicates%0A
59e9281d94acf529113697057d80bb6a1eac6191
Add global init file
__init__.py
__init__.py
Python
0.000001
@@ -0,0 +1,200 @@ +# -*- coding: utf-8 -*-%0A%22%22%22Marble: analyse social stratification in cities%22%22%22%0A%0A%0A__author__ = %22R%C3%A9mi Louf%22%0A__email__ = %22remilouf@sciti.es%22%0A__website__ = %22www.sciti.es%22%0A__copyright__ = %222015, R%C3%A9mi Louf%22%0A
f06ebc1da601de961311c4b753e966227eadb911
Create __init__.py
__init__.py
__init__.py
Python
0.000429
@@ -0,0 +1,1326 @@ +%22%22Backport of importlib.import_module from 3.x.%22%22%22%0A# While not critical (and in no way guaranteed!), it would be nice to keep this%0A# code compatible with Python 2.3.%0Aimport sys%0A%0Adef _resolve_name(name, package, level):%0A %22%22%22Return the absolute name of the module to be i...
a09fa218a918fbde70ea99a67fa1d964b17c5e2c
add init
__init__.py
__init__.py
Python
0.998609
@@ -0,0 +1,49 @@ +__all__ = %5B'bust'%5D%0A%0Afrom .detector import bust%0A%0A%0A
7b8136d77f2968ac02d17991eca30862bdf9e104
add __init__ file
__init__.py
__init__.py
Python
0.000128
@@ -0,0 +1,21 @@ +from resnet import *%0A
da874ace234dbac4f0fc8f428cf43d3f415cc596
Create __init__.py
__init__.py
__init__.py
Python
0.000429
@@ -0,0 +1,14 @@ +# __init__.py%0A
1e716efd7e275068a18d309f42ec8e955309b4b7
Create __init__.py
__init__.py
__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
f7cc1a858ae88ac14ac18548d70d00c932359b7f
finish question 1060
p1060_Missing_Element_In_Sorted_Array.py
p1060_Missing_Element_In_Sorted_Array.py
Python
0.999999
@@ -0,0 +1,1604 @@ +'''%0A- Leetcode problem: 1060%0A%0A- Difficulty: Medium%0A%0A- Brief problem description:%0A%0A Given a sorted array A of unique numbers, find the K-th missing number starting from the leftmost number of the array.%0A%0AExample 1:%0A%0AInput: A = %5B4,7,9,10%5D, K = 1%0AOutput: 5%0AExplanation:%...
d72f11fbfc23de44af8a2600a7310adafe3e2ffe
Create a.py
agc015/a.py
agc015/a.py
Python
0.000489
@@ -0,0 +1,204 @@ +def main():%0A n, a, b = map(int, input().split())%0A%0A if a %3E b or (n == 1 and a != b):%0A print(0)%0A else:%0A print((n - 1) * (b - a) - (b - a - 1))%0A%0A%0Aif __name__ == '__main__':%0A main()%0A
47ba8815c7a0de0191fb363c22c42732781a8e38
Fix blank index_for
daiquiri/metadata/migrations/0020_blank_index_for.py
daiquiri/metadata/migrations/0020_blank_index_for.py
Python
0.999194
@@ -0,0 +1,594 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.4 on 2018-04-05 15:25%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('daiquiri_metadata', '0019_column_index_for'),%0A ...
a9d5c1dcb059f02f6c3ec5dbff6b07f54c20194d
Add an example directory
example/main.py
example/main.py
Python
0.000002
@@ -0,0 +1,819 @@ +from beckett import clients, resources%0A%0A%0Aclass PersonResource(resources.BaseResource):%0A class Meta:%0A name = 'Person'%0A resource_name = 'people'%0A identifier = 'url'%0A attributes = (%0A 'name',%0A 'birth_year',%0A 'eye_color'...
3367f9d1e394bf686bc6bbd6316265c9feef4f03
Add basic tests for config usb
test/on_yubikey/test_cli_config.py
test/on_yubikey/test_cli_config.py
Python
0
@@ -0,0 +1,1421 @@ +from .util import (DestructiveYubikeyTestCase, ykman_cli)%0A%0A%0Aclass TestConfigUSB(DestructiveYubikeyTestCase):%0A%0A def setUp(self):%0A ykman_cli('config', 'usb', '--enable-all', '-f')%0A%0A def tearDown(self):%0A ykman_cli('config', 'usb', '--enable-all', '-f')%0A%0A def...
4dbe1b21ab0f82eeba82be7db2e141260942b998
add num_states to mixture convenience wrapper
basic/models.py
basic/models.py
# These classes make aliases of class members and properties so as to make # pybasicbayes mixture models look more like pyhsmm models. When comparing # H(S)MM model fits to pybasicbayes mixture model fits, it's easier to write one # code path by using these models. import pybasicbayes from ..util.general import rle c...
Python
0.000001
@@ -775,16 +775,93 @@ Labels%0A%0A + @property%0A def num_states(self):%0A return len(self.obs_distns)%0A%0A @pro
fb7a5b279da36b9dbd6338867168a79011edd0d6
Create new package (#7208)
var/spack/repos/builtin/packages/glimmer/package.py
var/spack/repos/builtin/packages/glimmer/package.py
Python
0
@@ -0,0 +1,1791 @@ +##############################################################################%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...
ec54ae0e59058cadecec38fb70be2947d0907d6a
Hello World
pyexamples/conditions.py
pyexamples/conditions.py
Python
0.99998
@@ -0,0 +1,22 @@ +%0Aprint('Hello World')%0A
fe1af6449ec4feeaf75a248422e806ad9c818749
remove doc
python/qidoc/__init__.py
python/qidoc/__init__.py
## Copyright (c) 2012 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. """ qidoc : handle generating sphinx and doxygen documentation of qibuild projects qiDoc: documentation generator ============================== qi...
Python
0.00001
@@ -249,1288 +249,8 @@ ts%0A%0A -%0A%0AqiDoc: documentation generator%0A==============================%0A%0A%0AqiDoc helps you easily write and merge several%0Adocumentation formats, doxygen and sphinx for the moment.%0A%0AUsage:%0A-----%0A%0Aqidoc is controlled by a simple config file, looking like%0A%0A.. code-block...
ceb8ec420e5e894644aecce8b96463cc3769ce1d
Add process_alerts management command
cityhallmonitor/management/commands/process_alerts.py
cityhallmonitor/management/commands/process_alerts.py
Python
0.000003
@@ -0,0 +1,3081 @@ +from django.conf import settings%0Afrom django.core.mail import send_mail%0Afrom django.core.management.base import BaseCommand, CommandError%0Afrom django.utils import timezone%0Afrom cityhallmonitor.models import Subscription%0Afrom documentcloud import DocumentCloud%0A%0A%0ADEFAULT_PROJECT = 'Chi...
44597a9b9f5e2ef2eb391b096d3240b81960ce68
fix doc generation on plot_lasso_coordinate_descent_path.py example (pb on my box)
examples/glm/plot_lasso_coordinate_descent_path.py
examples/glm/plot_lasso_coordinate_descent_path.py
""" ===================== Lasso and Elastic Net ===================== Lasso and elastic net (L1 and L2 penalisation) implemented using a coordinate descent. """ print __doc__ # Author: Alexandre Gramfort <alexandre.gramfort@inria.fr> # License: BSD Style. from itertools import cycle import numpy as np import pylab a...
Python
0
@@ -1239,40 +1239,58 @@ ts%0A%0A -color_iter = +ax = pl.gca()%0Aax.set_color_ cycle( +2 * %5B'b', ' -g +r ', ' -r +g ', ' @@ -1298,244 +1298,74 @@ ', ' -m', 'y', 'k'%5D)%0Afor color, coef_lasso, coef_enet in zip(color_iter,%0A coefs_lasso.T, coefs_enet.T):%0A pl.plot(-np.log10(alph...
c12305c59f9c95149e95094179768ac627d7faf9
Add test file for upload client class
tests/client/test_upload_client.py
tests/client/test_upload_client.py
Python
0
@@ -0,0 +1,2836 @@ +import os%0Aimport mock%0Aimport unittest%0A%0Afrom qingstor.sdk.config import Config%0Afrom qingstor.sdk.service.qingstor import Bucket%0Afrom qingstor.sdk.service.qingstor import QingStor%0Afrom qingstor.sdk.client.upload_client import UploadClient%0Afrom qingstor.sdk.error import (%0A BadReque...
305ab2ede27fde9097c7a69804189a529c868140
add missing filter plugins
filter_plugins/customs.py
filter_plugins/customs.py
Python
0.000001
@@ -0,0 +1,227 @@ +class FilterModule(object):%0A def filters(self):%0A return %7B%0A 'filename_without_extension': self.filename_without_extension%0A %7D%0A%0A def filename_without_extension(self, path, extension):%0A return path%5B:-len(extension)%5D
bc581b1ac7a12fd3026667663a4812fe0bd3869b
add dict.py
dict.py
dict.py
Python
0.000002
@@ -0,0 +1,516 @@ +#! /usr/bin/env python2%0A# -*- coding: utf-8 -*-%0A%0Aimport sys%0Aimport json%0Aimport urllib%0Aimport subprocess%0A%0Adef main():%0A word = subprocess.check_output('xsel')%0A params = urllib.urlencode(%7B'from': 'auto', 'to': 'auto', 'client_id':'WGCxN9fzvCxPo0nqlzGLCPUc', 'q': word%7D)%0A ...
28b5fef57580640cd78775d6c0544bc633e5958a
Add helper script to generate API keys.
generate-key.py
generate-key.py
Python
0
@@ -0,0 +1,518 @@ +#!/usr/bin/python%0A%0Aimport os%0Aimport sqlite3%0Aimport sys%0Aimport time%0A%0Aif len(sys.argv) %3C 3:%0A raise ValueError('Usage: %25s %22Firstnam Lastname%22 email@example.com' %25 sys.argv%5B0%5D)%0A%0Adb = sqlite3.connect('/var/lib/zon-api/data.db')%0Aapi_key = str(os.urandom(26).encode('he...
a314da2415e661ed6cbc9929095a0f34610d9c21
FIX _get_search_domain in partner
transindar_personalization/res_partner.py
transindar_personalization/res_partner.py
# -*- coding: utf-8 -*- ############################################################################## # For copyright and license notices, see __openerp__.py file in module root # directory ############################################################################## from openerp import models, api, fields class re...
Python
0
@@ -1014,16 +1014,23 @@ , name)%5D + + args ,%0A @@ -1107,32 +1107,39 @@ '=ilike', name)%5D + + args %0A els @@ -1250,16 +1250,23 @@ , name)%5D + + args %0A
6807ce92c5d0a26a43db8cb25ef5ffd8b8ff6277
Add skeleton cryptdev module
salt/modules/cryptdev.py
salt/modules/cryptdev.py
Python
0
@@ -0,0 +1,553 @@ +# -*- coding: utf-8 -*-%0A'''%0ASalt module to manage Unix cryptsetup jobs and the crypttab file%0A'''%0A%0A# Import python libraries%0Afrom __future__ import absolute_import%0Aimport logging%0A%0A# Import salt libraries%0Aimport salt%0A%0A# Set up logger%0Alog = logging.getLogger(__name__)%0A%0A# De...
9b457a08ce433b574f186bb1b32da666edee485a
Complete sol by recursion
lc0108_convert_sorted_array_to_binary_search_tree.py
lc0108_convert_sorted_array_to_binary_search_tree.py
Python
0.006524
@@ -0,0 +1,1346 @@ +%22%22%22Leetcode 108. Convert Sorted Array to Binary Search Tree%0AEasy%0A%0AURL: https://leetcode.com/problems/convert-sorted-array-to-binary-search-tree/%0A%0AGiven an array where elements are sorted in ascending order,%0Aconvert it to a height balanced BST.%0A%0AFor this problem, a height-balanc...
e36df0c827de666fa00d9b806759cde0f0cb1697
Test code
game.py
game.py
Python
0.000001
@@ -0,0 +1,2943 @@ +class Room:%0A def __init__(self, configuration=%7B%7D):%0A self.doors = configuration%0A%0Aclass Merchant:%0A def __init__(self, markup=1.2, markdown=0.8):%0A self.inventory = %5B%5D%0A self.markup = markup%0A self.markdown = markdown%0A %0A def add_item(...
e9eed6b6e99e948ed2863fcc45a037b0e2b1e80f
fix import in tornado worker
gunicorn/workers/gtornado.py
gunicorn/workers/gtornado.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. from tornado.httpserver import HTTPServer from tornado.ioloop import IOLoop, PeriodicCallback from gunicorn.workers.base import Worker class TornadoWorker(Worker): def watchdog(sel...
Python
0.000001
@@ -122,16 +122,27 @@ ation.%0A%0A +import os%0A%0A from tor
0051c9bfef75f51c8ccc8591e1dc8d723a17625e
Add another orphan-made tip to self-check :(.
gittip/models/__init__.py
gittip/models/__init__.py
""" The most important object in the Gittip object model is Participant, and the second most important one is Ccommunity. There are a few others, but those are the most important two. Participant, in particular, is at the center of everything on Gittip. """ from postgres import Postgres class GittipDB(Postgres): ...
Python
0
@@ -4990,16 +4990,23 @@ t(%5B25206 +, 46266 %5D) # '4c
796cce78bc1f12b9cc5bdb813172331433dd9e72
Move configuration details to docs
homeassistant/components/device_tracker/thomson.py
homeassistant/components/device_tracker/thomson.py
""" homeassistant.components.device_tracker.thomson ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Device tracker platform that supports scanning a THOMSON router for device presence. This device tracker needs telnet to be enabled on the router. Configuration: To use the THOMSON tracker you will need to add somethi...
Python
0
@@ -183,553 +183,147 @@ e.%0A%0A -This device tracker needs telnet to be enabled on the router.%0A%0AConfiguration:%0A%0ATo use the THOMSON tracker you will need to add something like the following%0Ato your configuration.yaml file.%0A%0Adevice_tracker:%0A platform: thomson%0A host: YOUR_ROUTER_IP%0A username: YOUR...
96451643294003992e6d73ec34876badae177ed8
Add PULSE support
libpebble2/communication/transports/pulse.py
libpebble2/communication/transports/pulse.py
Python
0
@@ -0,0 +1,3084 @@ +from __future__ import absolute_import%0A__author__ = 'Liam McLoughlin'%0A%0Aimport struct%0A%0Atry:%0A import pulse2%0Aexcept ImportError:%0A pass%0A%0Afrom . import BaseTransport, MessageTargetWatch%0Afrom libpebble2.exceptions import ConnectionError, PebbleError%0A%0A%0Aclass PULSETransport...
4fd03b93f7c2ff31b6a7ab6bf6d404cc579a6bf8
Rewrite download_hash in Python (#5995)
scripts/download_hash.py
scripts/download_hash.py
Python
0
@@ -0,0 +1,1718 @@ +#!/usr/bin/env python3%0A%0A# After a new version of Kubernetes has been released,%0A# run this script to update roles/download/defaults/main.yml%0A# with new hashes.%0A%0Aimport hashlib%0Aimport sys%0A%0Aimport requests%0Afrom ruamel.yaml import YAML%0A%0AMAIN_YML = %22../roles/download/defaults/ma...
f8bea417fe0a09e50938d0fc837bd1ab97ac3a0b
Add MarkedDict.keydict attribute
powerline/lint/markedjson/markedvalue.py
powerline/lint/markedjson/markedvalue.py
__all__ = ['gen_marked_value', 'MarkedValue'] try: from __builtin__ import unicode except ImportError: unicode = str def gen_new(cls): def __new__(arg_cls, value, mark): r = super(arg_cls, arg_cls).__new__(arg_cls, value) r.mark = mark r.value = value return r return __new__ def gen_init(cls): def __...
Python
0
@@ -1414,69 +1414,384 @@ %0A%09__ -init__ = gen_init(dict)%0A%09__getnewargs__ = gen_getnewargs(dict +getnewargs__ = gen_getnewargs(dict)%0A%0A%09def __init__(self, value, mark):%0A%09%09dict.__init__(self, value)%0A%09%09self.keydict = dict(((key, key) for key in self))%0A%0A%09def __setitem__(self, key, value):%0A%0...
41e115305a4de332689199ecf6a52a37c0d72e55
Fix #108
src/collectors/memory/memory.py
src/collectors/memory/memory.py
# coding=utf-8 """ This class collects data on memory utilization Note that MemFree may report no memory free. This may not actually be the case, as memory is allocated to Buffers and Cache as well. See [this link](http://www.linuxatemyram.com/) for more details. #### Dependencies * /proc/meminfo or psutil """ im...
Python
0.000001
@@ -3203,35 +3203,40 @@ ue=phymem_usage. -fre +availabl e, oldUnit=units
3b27b1d6b1c4739b8d456703542ec8182ce12277
Add a Wordpress+MySQL composed instance functional test case
heat/tests/functional/test_WordPress_Composed_Instances.py
heat/tests/functional/test_WordPress_Composed_Instances.py
Python
0.000002
@@ -0,0 +1,2055 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4%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.org/licenses/LICENSE-2.0...
1172287e38f623994b039cea0dab36ea68d18471
add RabbitService
ics_demo/remote_services/demo.py
ics_demo/remote_services/demo.py
Python
0
@@ -0,0 +1,619 @@ +from base import Service%0Afrom ics_demo.helpers.base import uuidgen%0A%0Aclass RabbitService(Service):%0A%0A def it_is_my_warren(self, name):%0A cmd = 'mkdir -p /tmp/%25s' %25 name%0A self.remote_cmd_quiet(cmd)%0A%0A def put_carrot_bucket_in_my_warren(self, rabbit):%0A cmd...
66d215c9c148572c4ebd9370453f7406da89abaf
Fix for unknown connection alias error message.
mongoengine/connection.py
mongoengine/connection.py
import pymongo from pymongo import Connection, ReplicaSetConnection, uri_parser __all__ = ['ConnectionError', 'connect', 'register_connection', 'DEFAULT_CONNECTION_NAME'] DEFAULT_CONNECTION_NAME = 'default' class ConnectionError(Exception): pass _connection_settings = {} _connections = {} _dbs = ...
Python
0
@@ -2910,16 +2910,24 @@ defined' + %25 alias %0A
8de10ac1bf133c41cc1d0e330714e1659e42b092
add script to write consul-manager ip to a text file
consul/get_consul_manager_ip.py
consul/get_consul_manager_ip.py
Python
0
@@ -0,0 +1,614 @@ +%0Aimport os%0Aimport digitalocean%0A%0ATOKEN_FILE = %22/srv/secrets-newsblur/keys/digital_ocean.token%22%0A%0Awith open(TOKEN_FILE) as f:%0A token = f.read().strip()%0A os.environ%5B'DO_API_TOKEN'%5D = token%0A%0Amanager = digitalocean.Manager(token=token)%0Amy_droplets = manager.get_all_dropl...
32f4055b52c8768c80cf82451f6ace74af600d0c
test new analyze rewrite
lib/neuroimaging/refactoring/tests/test_analyze.py
lib/neuroimaging/refactoring/tests/test_analyze.py
Python
0.000002
@@ -0,0 +1,483 @@ +import unittest%0Afrom neuroimaging.refactoring.analyze import AnalyzeImage%0Afrom neuroimaging.tests.data import repository%0Afrom neuroimaging.visualization.arrayview import arrayview%0A%0Aclass AnalyzeImageTest(unittest.TestCase):%0A%0A def setUp(self):%0A self.image = AnalyzeImage(%22rh...
6feae8e14b4e690cb0d5c71880b9d6c167ac978b
add stub for a csv scraping script
ipeds_reporter/scripts/scrape.py
ipeds_reporter/scripts/scrape.py
Python
0
@@ -0,0 +1,225 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%22%22%22%0AWIP thing to scrape ipeds for me.%0A%22%22%22%0Afrom selenium import webdriver%0A%0A%0Adef main():%0A driver = webdriver.Firefox()%0A driver.close()%0A%0A%0Aif __name__ == '__main__':%0A main()%0A
4241d67149887f8edc0636f7cb4fdbcb22e8e98b
Create repeatings.py
job_interview_algs/repeatings.py
job_interview_algs/repeatings.py
Python
0.000006
@@ -0,0 +1,650 @@ +TEXT = %22%22%22abba com mother bill mother com %0Aabba dog abba mother com%22%22%22%0A%0A%0Adef secuenced_words(txt):%0A %22%22%22%0A Function identifies and displays the three words%0A most often repeated as a group, regardless of the%0A words order in the group%0A %22%22...
3bd95d8789871246fb90c6eb0487d9746ef5cb27
Migrate all project contents blocks to activity contents blocks
bluebottle/cms/migrations/0056_auto_20191106_1041.py
bluebottle/cms/migrations/0056_auto_20191106_1041.py
Python
0
@@ -0,0 +1,1653 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.15 on 2019-11-06 09:41%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Adef migrate_project_blocks(apps, schema_editor):%0A ProjectsContent = apps.get_model('cms', 'ProjectsContent')%0A ActivitiesConten...
06570a926bde2ea10730062b05a2348c3020745c
Add example: filtered ensemble average.
examples/filter_ensemble_average.py
examples/filter_ensemble_average.py
Python
0
@@ -0,0 +1,939 @@ +import numpy as np%0Aimport matplotlib.pyplot as plt%0Aimport atomic%0A%0Afrom ensemble_average import time_dependent_power%0A%0A%0Aif __name__ == '__main__':%0A times = np.logspace(-7, 0, 50)%0A temperature = np.logspace(0, 3, 50)%0A density = 1e19%0A%0A from atomic.pec import Transition...
d9985ec4fa37cf99e0e541c7affadd5ec9288a0c
Create multithread.py
APIs/multithread.py
APIs/multithread.py
Python
0.000001
@@ -0,0 +1,935 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%22%22%22%0ACreated on Mon Jan 15 22:59:02 2018%0A%0A@author: zhurundong%0A%22%22%22%0A%0Aimport time%0Aimport requests%0Aimport asyncio%0Aimport aiohttp%0Afrom concurrent.futures import ThreadPoolExecutor%0A%0ANUMBERS = range(12)%0AURL = 'http://htt...
93f6ebde39ef0538624ad3eb94316bf8bdf69fd9
Create N_QueensII.py
Array/N_QueensII.py
Array/N_QueensII.py
Python
0.000011
@@ -0,0 +1,1010 @@ +Follow up for N-Queens problem.%0A%0ANow, instead outputting board configurations, return the total number of distinct solutions.%0A%0Aclass Solution:%0A # @param %7Binteger%7D n%0A # @return %7Binteger%7D%0A def totalNQueens(self, n):%0A if n == 0: return 0%0A self.result = 0...
38b4ec7164f07af7135c41c401c4f403c1061d66
Add skeleton for parsing commands
app/main.py
app/main.py
Python
0.000002
@@ -0,0 +1,1430 @@ +%22%22%22lazy%0A%0A Usage:%0A lazy (new%7Cn)%0A lazy (show%7Cs) %5B%3Cid%3E%5D%0A lazy (delete%7Cd) %5B%3Cid%3E%5D%0A lazy (import%7Ci) %3Cpath%3E%0A lazy (export%7Ce) %3Cpath%3E %5B%3Cid%3E%5D%0A%0A Options:%0A -h, --help: Show this help message.%0A%22%22...
3ed9dd0ca03216311771cda5f9cd3eb954a14d4f
Add boilerplate with simple test sounds
telemeta/management/commands/telemeta-test-boilerplate.py
telemeta/management/commands/telemeta-test-boilerplate.py
Python
0
@@ -0,0 +1,1249 @@ +from optparse import make_option%0Afrom django.conf import settings%0Afrom django.core.management.base import BaseCommand, CommandError%0Afrom django.contrib.auth.models import User%0Afrom django.template.defaultfilters import slugify%0A%0Aimport os%0Afrom telemeta.models import *%0Afrom timeside.co...
eeea573c3ecf6aa2baacdda61c0f9a248a28780f
add missing migration
ynr/apps/uk_results/migrations/0034_auto_20180130_1243.py
ynr/apps/uk_results/migrations/0034_auto_20180130_1243.py
Python
0.000258
@@ -0,0 +1,1247 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.13 on 2018-01-30 12:43%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('uk_results', '0033_auto_20170506_2042'),%0A %5D...
59f0a18b5232e866f84fdaf6688ced5a1b4a9c44
Add fedora.tg.widgets module containing a few proof-of-concept Fedora TurboGears widgets
fedora/tg/widgets.py
fedora/tg/widgets.py
Python
0
@@ -0,0 +1,2155 @@ +# Proof-of-concept Fedora TurboGears widgets%0A# Authors: Luke Macken %3Clmacken@redhat.com%3E%0A%0Aimport re%0Aimport urllib2%0Aimport feedparser%0Aimport simplejson%0A%0Afrom bugzilla import Bugzilla%0Afrom turbogears.widgets import Widget%0A%0Aclass FedoraPeopleWidget(Widget):%0A template = %2...
046922c6b842e5ba78fc44848ddf24e6434dd799
Add related options to floating ip config options
nova/conf/floating_ips.py
nova/conf/floating_ips.py
# needs:fix_opt_description # Copyright 2016 Huawei Technology corp. # 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/license...
Python
0.000011
@@ -1,33 +1,4 @@ -# needs:fix_opt_description%0A%0A # Co @@ -666,126 +666,8 @@ g%0A%0A%0A -# TODO(johngarbutt) all of these opitions only work with nova-network.%0A# We need to find a good way to document that.%0A floa @@ -1131,20 +1131,16 @@ alues:%0A%0A - * Any st @@ -1927,36 +1927,32 @@ ssible values:%0A%0...
1c410bcf4061efc2130dccc000fc132b487d7ea4
Fix problem with jinja2 filters not working properly on LazyField objects from set plugin.
flexget/plugins/modify/set_field.py
flexget/plugins/modify/set_field.py
from copy import copy from datetime import datetime, date, time from email.utils import parsedate from time import mktime import os import re import sys import logging from flexget.plugin import register_plugin, priority from flexget.utils.tools import replace_from_entry log = logging.getLogger('set') jinja = False ...
Python
0.000004
@@ -4206,16 +4206,22 @@ nedError +, meta %0A @@ -4539,32 +4539,349 @@ g, basestring):%0A + # Make sure any LazyFields that are referenced are loaded before rendering%0A for var in meta.find_undeclared_variables(env.parse(template_string)):%0A if ent...
efee783cb87fe2015ab719699e80a661aa3b4d4b
Create main.py
main.py
main.py
Python
0.000001
@@ -0,0 +1,979 @@ +import os%0Aimport cv2%0Aimport FocusStack%0A%22%22%22%0A%0A Focus stack driver program%0A%0A This program looks for a series of files of type .jpg, .jpeg, or .png%0A in a subdirectory %22input%22 and then merges them together using the%0A FocusStack module. The output is put in the file...
3e0ababfeb0e22d33853d4bad68a29a0249e1a60
Add script demonstrating thread deadlock
other/iterate_deadlock.py
other/iterate_deadlock.py
Python
0
@@ -0,0 +1,495 @@ +%0A%22%22%22%0A Demonstrates deadlock related to attribute iteration.%0A%22%22%22%0A%0Afrom threading import Thread%0A%0Aimport h5py%0A%0AFNAME = %22deadlock.hdf5%22%0A%0Adef make_file():%0A with h5py.File(FNAME,'w') as f:%0A for idx in xrange(1000):%0A f.attrs%5B'%25d'%25idx%...
b1517f63c3aa549170d77c6fb3546901fdbe744b
Remove the hard-coded extra 'cv' and 'program' fields
candidates/migrations/0017_remove_cv_and_program_fields.py
candidates/migrations/0017_remove_cv_and_program_fields.py
Python
0.000636
@@ -0,0 +1,475 @@ +# -*- 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%0A ('candidates', '0016_migrate_data_to_extra_fields'),%0A %5D%0A%0A operations = %5B%0A migra...
5789cc585a69f3c73e63a36d99c02b119f593bc9
Create accelerometer.py
gadgets/navigators/accelerometer.py
gadgets/navigators/accelerometer.py
Python
0.000074
@@ -0,0 +1,624 @@ +from spi.rpi_spi import rpi_spi_dev%0Afrom spi.adc.MCP3208 import MCP3208%0A%0Aclass ACCEL_GY61():%0A%09# use chip ADXL335%0A%09def __init__(self,device=0,x_channel=0,y_channel=1,z_channel=2):%0A%09%09self.spi = rpi_spi_dev(device).spi%0A%09%09self.mcp = None%0A%09%09if self.spi is not None:%0A%09%09...
c0da1aecb6e663d9586238e9d8f2b7a8abb40cf7
Add transform module to place ongoing built in transformmers
hug/transform.py
hug/transform.py
Python
0
@@ -0,0 +1,1727 @@ +%22%22%22hug/transform.py%0A%0ADefines Hug's built-in output transforming functions%0A%0ACopyright (C) 2015 Timothy Edmund Crosley%0A%0APermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated%0Adocumentation files (the %22Software%22), to deal in...
3ed52b0a51ccb18b053ca69984d8072e1ffdec25
Add 328
Ninja/Leetcode/328_Odd_Even_Linked_List.py
Ninja/Leetcode/328_Odd_Even_Linked_List.py
Python
0.998625
@@ -0,0 +1,1318 @@ +%22%22%22%0AGiven a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.%0A%0AYou should try to do it in place. The program should run in O(1) space complexity and O(nodes) time complexity.%...
bbd43a3af7fdd5eacea13fae9c1670aa5436e7bc
add data not sufficient exception that shall be raised when data provided to a feature is not sufficient
features/exception_data_not_suffient.py
features/exception_data_not_suffient.py
Python
0
@@ -0,0 +1,252 @@ +%22%22%22This exception shall be raised in case the data provided to a feature is not%0Asufficient%22%22%22%0A%0A%0Aclass DataNotSufficientError(Exception):%0A%0A def __init__(self, value):%0A self.value = value%0A%0A def __str__(self):%0A return repr(self.value)%0A
e41d4fa8a61126495dc5cc42575fa5ce5b89f1b7
add spiel on whitespace
1_start/whitespace.py
1_start/whitespace.py
Python
0.99847
@@ -0,0 +1,2102 @@ +# FUN WITH WHITESPACE IN PYTHON%0A%0A%0A# Whitespace is critical in Python. Unlike some other scripting languages,%0A# which use characters to tell the interpreter where functions and loops%0A# end, Python uses structured indentation for new lines, making %22blocks%22 of%0A# code.%0A%0Amy_string = '...
acf7e2a9eeedfef28f892d4633b9bbeae479390a
Set conditional to be against result of get_realm, not input.
zerver/management/commands/soft_activate_deactivate_users.py
zerver/management/commands/soft_activate_deactivate_users.py
from __future__ import absolute_import from __future__ import print_function from django.db import connection from django.conf import settings from django.utils.timezone import now as timezone_now from typing import Any, List, Dict from argparse import ArgumentParser from six.moves import map import sys from zerver....
Python
0
@@ -2064,16 +2064,17 @@ ptions)%0A +%0A @@ -2129,35 +2129,33 @@ if -options%5B'realm_id'%5D +realm is not None :%0A @@ -4025,35 +4025,33 @@ if -options%5B'realm_id'%5D +realm is not None :%0A
9760f81ce6cc7783f8fb097931e98f8234307a00
add nilearn interface for correlations
src/nibetaseries/interfaces/nilearn.py
src/nibetaseries/interfaces/nilearn.py
Python
0
@@ -0,0 +1,2579 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-%0A# vi: set ft=python sts=4 ts=4 sw=4 et:%0A%0Afrom nipype.interfaces.nilearn import NilearnBaseInterface%0Afrom nipype.interfaces.base import (%0A BaseInterfaceInputSpec, T...
eea6c7477d348e0a12fed89a7d38763c42621977
Fix an unicode error on Windows platform.
pelican/contents.py
pelican/contents.py
# -*- coding: utf-8 -*- from pelican.utils import slugify, truncate_html_words from pelican.log import * from pelican.settings import _DEFAULT_CONFIG from os import getenv class Page(object): """Represents a page Given a content, and metadata, create an adequate object. :param content: the string to parse...
Python
0.000002
@@ -164,16 +164,48 @@ t getenv +%0Afrom sys import platform, stdin %0A%0Aclass @@ -2911,24 +2911,213 @@ f, 'date'):%0A + if platform == 'win32':%0A self.locale_date = self.date.strftime(self.date_format.encode('ascii','xmlcharrefreplace')).decode(stdin.encoding)%0A else:%0A ...
eee7862cead703d11405276c1a399466c9f102c5
add shell.py
scripts/opencontrail-kubelet/opencontrail_kubelet/shell.py
scripts/opencontrail-kubelet/opencontrail_kubelet/shell.py
Python
0.000003
@@ -0,0 +1,358 @@ +#%0A# Copyright (c) 2015 Juniper Networks, Inc.%0A#%0A%0Aimport subprocess%0Aimport logging%0A%0Aclass Shell:%0A # Run a shell command. Log the command run and its output.%0A @staticmethod%0A def run(str):%0A logging.debug('sh: %25s' %25 str)%0A cmd = subprocess.check_output(st...
73369f23bd008331884d5644ba9923aae4809756
add offline db comparison tool
scripts/DEV/postgresql/compare_counts.py
scripts/DEV/postgresql/compare_counts.py
Python
0
@@ -0,0 +1,1060 @@ +import psycopg2%0A%0Aoldpg = psycopg2.connect(database='postgis', host='localhost', port=5555, user='mesonet')%0Acursor = oldpg.cursor()%0A%0Adbs = %5B%5D%0Acursor.execute(%22%22%22SELECT datname FROM pg_database%0AWHERE datistemplate = false ORDER by datname%22%22%22)%0Afor row in cursor:%0A dbs.a...
b61a423497c21fa4df818c8b5e5eaea788eb84ea
add ia_cdx_checker
scripts/ia_cdx_checker/ia_cdx_checker.py
scripts/ia_cdx_checker/ia_cdx_checker.py
Python
0.000216
@@ -0,0 +1,1656 @@ +#!/usr/bin/env python%0A%22%22%22%0A$ python ia_cdx_checker.py elxn42-tweets-urls-fixed-uniq-no-count.txt %7C cat %3E elx42_urls_in_ia.txt%0A%22%22%22%0A%0Afrom __future__ import print_function%0A%0Aimport sys%0Aimport json%0Aimport fileinput%0Aimport io%0Afrom urllib2 import Request, urlopen, URLEr...
22ba7e7bfce711257f055733ecd260b8e61ced91
Add example script to parse CapnProto traces
src/Backends/SynchroTraceGen/scripts/stgen_capnp_parser.py
src/Backends/SynchroTraceGen/scripts/stgen_capnp_parser.py
Python
0
@@ -0,0 +1,3685 @@ +#!/bin/python%0A%22%22%22%0AThis script demonstrates parsing a CapnProto SynchroTrace event trace.%0AThe 'STEventTrace.capnp' file must exist in the sys.path.%0AAdd its directory to the PYTHONPATH environmental variable or%0Acopy it to the current working directory.%0A%0AThe pycapnp library is requi...
a1d2023aa6e8baa89747497e69a0a79fe1a27bdd
Drop ProjectPlan table
migrations/versions/36d7c98ddfee_drop_projectplan_table.py
migrations/versions/36d7c98ddfee_drop_projectplan_table.py
Python
0
@@ -0,0 +1,405 @@ +%22%22%22Drop ProjectPlan table%0A%0ARevision ID: 36d7c98ddfee%0ARevises: 12569fada93%0ACreate Date: 2014-10-14 11:25:48.151275%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '36d7c98ddfee'%0Adown_revision = '12569fada93'%0A%0Afrom alembic import op%0A%0A%0Adef upgrade():%0...
730b208b490290c84bde8aa017a8f556d457d729
add list to integer
resource-4/combinatorics/digits/list-to-integer.py
resource-4/combinatorics/digits/list-to-integer.py
Python
0.002321
@@ -0,0 +1,84 @@ +def listToInt(listt,base=2):%0A%09return reduce(lambda x,y:base*x+y,reversed(listt), 0)%0A
5e3bc841800bb4e92df5871d97559810d67d7660
Create __init__.py
cmd/__init__.py
cmd/__init__.py
Python
0.000429
@@ -0,0 +1,22 @@ +__version__ = '0.0.0'%0A
2acb5d6da30c9b25eb05ca7a0da77bdaa45499a5
Create cod_variable.py
cod_variable.py
cod_variable.py
Python
0.000085
@@ -0,0 +1,357 @@ +def encode_single_vb(n):%0A byts = %5B%5D%0A while True:%0A byts.append(n %25 128)%0A if n %3C 128:%0A break%0A n //= 128%0A byts = byts%5B::-1%5D%0A byts%5B-1%5D += 128%0A return %5Bbin(n)%5B2:%5D for n in byts%5D%0A%0A%0Adef encode_vb(numbers):%0A b...
624c133ba1afdb904e31742ac5f00a76859ab5b7
Write some docs for the response object
buffer/response.py
buffer/response.py
class ResponseObject(dict): def __init__(self, *args, **kwargs): super(ResponseObject, self).__init__(*args, **kwargs) self.__dict__ = self._check_for_inception(self) def _check_for_inception(self, root_dict): for key in root_dict: if type(root_dict[key]) == dict: root_dict[key] = Re...
Python
0.000018
@@ -16,24 +16,333 @@ bject(dict): +%0A '''%0A Simple data structure that convert any dict to an empty object%0A where all the atributes are the keys of the dict, but also preserve a dict%0A behavior%0A e.g:%0A%0A obj = ResponseObject(%7B'a':'b'%7D)%0A obj.key = 'value'%0A%0A obj.a =%3E 'b...
d22242bda1a15cf59e395177c44b6d2701a5e246
add code to replicate issue #376
tests_on_large_datasets/redd_house3_f1_score.py
tests_on_large_datasets/redd_house3_f1_score.py
Python
0
@@ -0,0 +1,1214 @@ +from __future__ import print_function, division%0Afrom nilmtk import DataSet, HDFDataStore%0Afrom nilmtk.disaggregate import fhmm_exact%0Afrom nilmtk.metrics import f1_score%0Afrom os.path import join%0Aimport matplotlib.pyplot as plt%0A%0A%22%22%22%0AThis file replicates issue #376 (which should no...
80bf877306a78a63cf7752975f980a2d435f7d5e
Add standard services and lazy service wrapper
polyaxon/libs/services.py
polyaxon/libs/services.py
Python
0
@@ -0,0 +1,1870 @@ +import inspect%0Aimport itertools%0Aimport logging%0A%0Afrom django.utils.functional import empty, LazyObject%0A%0Afrom libs.imports import import_string%0A%0A%0Alogger = logging.getLogger(__name__)%0A%0A%0Aclass InvalidService(Exception):%0A pass%0A%0A%0Aclass Service(object):%0A __all__ = ()...
e204dd02b44066b28d09c0143cdeec557ff420fd
add a module for effects that can be applied to waveforms
potty_oh/effects.py
potty_oh/effects.py
Python
0
@@ -0,0 +1,932 @@ +# Copyright 2016 Curtis Sand%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-2.0%0A#%0A# Unless required ...
b9a8d24048a5c5b83a996f9fb1b2b07857a56db0
unwind the changes to tracker main
heron/tracker/src/python/main.py
heron/tracker/src/python/main.py
import os import sys import tornado.httpserver import tornado.ioloop import tornado.web from tornado.escape import json_encode, utf8 from tornado.options import define, options from heron.tracker.src.python import handlers from heron.tracker.src.python import log from heron.tracker.src.python.log import Log as LOG fro...
Python
0.000001
@@ -393,20 +393,18 @@ efault=' -file +zk statecon
451e8f3ea4765051088ea1c84f81e32691591d89
Create __init__.py
core/__init__.py
core/__init__.py
Python
0.000429
@@ -0,0 +1,22 @@ +#!/usr/bin/env python%0A
65aa1424f7ea8e184180d93e790b1ece6705775d
fix missing coma
addons/purchase_requisition/__openerp__.py
addons/purchase_requisition/__openerp__.py
############################################################################## # # OpenERP, Open Source Management Solution # Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>). # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public L...
Python
0.000012
@@ -2081,16 +2081,17 @@ nce.xml' +, %0A
72738366fa074b457021faab0c21c3b89070b5ad
Add first revision of Nautilus extension.
nautilus/wizbit-extension.py
nautilus/wizbit-extension.py
Python
0
@@ -0,0 +1,2840 @@ +from urlparse import urlparse%0Afrom os.path import exists, split, isdir%0A%0Aimport nautilus%0Afrom lxml import etree%0A%0AWIZ_CONTROLLED = %22wiz-controlled%22%0AWIZ_CONFLICT = %22wiz-conflict%22%0A%0AYES = %22Yes%22%0ANO = %22No%22%0A%0Aclass WizbitExtension(nautilus.ColumnProvider, nautilus.Info...
2a9858381a78bd9ff9ff459a23f73630237e6669
send vm
weibo_data_input.py
weibo_data_input.py
Python
0
@@ -0,0 +1,1179 @@ +__author__ = 'heipiao'%0A# -*- coding: utf-8 -*-%0Afrom weibo import APIClient%0Aimport urllib2%0Aimport urllib%0A%0A#APP_KEY%E5%92%8CAPP_SECRET%EF%BC%8C%E9%9C%80%E8%A6%81%E6%96%B0%E5%BB%BA%E4%B8%80%E4%B8%AA%E5%BE%AE%E5%8D%9A%E5%BA%94%E7%94%A8%E6%89%8D%E8%83%BD%E5%BE%97%E5%88%B0%0AAPP_KEY = '3722673...
7b899fbcf7a661758ab2a9cdca7ade6c461c8e65
add c model
transiNXOR_modeling/caffe2_tensor_to_c_array.py
transiNXOR_modeling/caffe2_tensor_to_c_array.py
Python
0.000001
@@ -0,0 +1,863 @@ +import sys%0Asys.path.append('../')%0Aimport caffe2_paths%0Afrom caffe2.python import workspace%0Afrom pinn import exporter%0Afrom scipy.io import savemat%0Aimport numpy as np%0Aimport pickle%0A%0Amodel_name = 'bise_h216_0'%0A%0Ainit_net = exporter.load_init_net('./transiXOR_Models/'+model_name+'_ini...
27275d932d0fc8fe3d8079c8c5e07793ab0c0271
Update main.py
device/src/main.py
device/src/main.py
#This is the file executing while STM32 MCU bootup, and in this file, #it will call other functions to fullfill the project. #Communication module: LoRa. #Communication method with gateway via LoRa. #Uart port drive LoRa module. #Parse JSON between device and gateway via LoRa channel. #LoRa module: E32-TTL-100 #Pin s...
Python
0.000001
@@ -869,16 +869,34 @@ ainfall%0A +import WaterLevel%0A import s @@ -3318,24 +3318,106 @@ print('') +%0A%0A print('5. WaterLevel:')%0A print(WaterLevel.getWaterLevel())%09%0A print('') %0A%09%0A time.
c9cd743151b3bbef3e484613f58e2c8b462ee6f4
initialize new_family in ReadDirectory
directory_tools.py
directory_tools.py
#!/usr/bin/env python """This module contains the tools to injest a MemberHub directory dump into a dictionary, and display portions of the dictionary for analysis. """ import family def ReadDirectory(): """directory_tools.ReadDirectory INPUTS: Prompts user for name of comma-separated text file containing...
Python
0.000007
@@ -1760,16 +1760,39 @@ ated = 0 +%0A new_family = False %0A%0A #
f3cab8d72b9a070305f4f2c44922e381ea091205
add context manager example
examples/context_manager.py
examples/context_manager.py
Python
0.000063
@@ -0,0 +1,779 @@ +# -*- coding: utf-8 -*-%0Aimport riprova%0A%0A# Store number of function calls for error simulation%0Acalls = 0%0A%0A%0A# Register retriable operation with custom evaluator%0Adef mul2(x):%0A global calls%0A%0A if calls %3C 4:%0A calls += 1%0A raise RuntimeError('simulated call err...
24cf3c2676e4ea7342e95e6a37857c6fa687865e
Remove managers for article obj.
src/submission/migrations/0058_auto_20210812_1254.py
src/submission/migrations/0058_auto_20210812_1254.py
Python
0
@@ -0,0 +1,411 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.29 on 2021-08-12 12:54%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('submission', '0057_merge_20210811_1506'),%0A %5D%0A%0A ...
9687ca646dd7ae5a7ff31e5b8657fb1ab88a0f5e
add buildbot
buildbot.py
buildbot.py
Python
0.000001
@@ -0,0 +1,2629 @@ +#!/usr/bin/env python%0A# encoding: utf-8%0A%0Aimport sys%0Aimport json%0Aimport subprocess%0A%0Aproject_name = 'bourne'%0A%0A%0Adef run_command(args):%0A print(%22Running: %7B%7D%22.format(args))%0A # sys.stdout.flush()%0A # subprocess.check_call(args)%0A%0A%0Adef get_tool_options(properti...
0f6866a91e4d8af2faedf2af277ad0df573536aa
Set win_delay_load_hook to false
binding.gyp
binding.gyp
{ 'target_defaults': { 'conditions': [ ['OS=="win"', { 'msvs_disabled_warnings': [ 4530, # C++ exception handler used, but unwind semantics are not enabled 4506, # no definition for inline function ], }], ], }, 'targets': [ { 'target_name': 'runa...
Python
0.999875
@@ -18,16 +18,52 @@ lts': %7B%0A + 'win_delay_load_hook': 'false',%0A 'con
0d6da71cb759c3819133baa3d7c043fb92df425e
Create weibo.py
2/weibo.py
2/weibo.py
Python
0.000001
@@ -0,0 +1,427 @@ +from bs4 import BeautifulSoup%0Aimport json%0Aimport ConfigParser%0Aimport urllib2%0A%0Afrom util import get_content%0A%0Alink_id = 18%0A%0Acf = ConfigParser.ConfigParser()%0Acf.read(%22config.ini%22)%0A%0AweiyinUrl = 'http://wb.weiyin.cc/Book/BookView/W440164363452#' + str(link_id)%0A%0Acontent = ur...
666caee40af2dccc30e78d52f8de962110408146
Add fan device
xknx/devices/fan.py
xknx/devices/fan.py
Python
0
@@ -0,0 +1,2918 @@ +%22%22%22%0AModule for managing a fan via KNX.%0A%0AIt provides functionality for%0A%0A* setting fan to specific speed%0A* reading the current speed from KNX bus.%0A%22%22%22%0Aimport asyncio%0Afrom .device import Device%0Afrom .remote_value_scaling import RemoteValueScaling%0A%0Aclass Fan(Device):%...
eefa144b7a01f6beee1fcba30af32a967598d44f
add tests
tests/test_tabela_fipe.py
tests/test_tabela_fipe.py
Python
0
@@ -0,0 +1,1315 @@ +# -*- coding: utf-8 -*-%0D%0A#%0D%0A# Copyright 2015 Alexandre Villela (SleX) %3Chttps://github.com/sxslex/sxtools/%3E%0D%0A#%0D%0A# This program is free software: you can redistribute it and/or modify%0D%0A# it under the terms of the GNU General Public License as published by%0D%0A# the Fr...
a467cf8e92a783112bcecc82acf7b33c31282c49
Bump to 3.2.0.rc2
cms/__init__.py
cms/__init__.py
# -*- coding: utf-8 -*- __version__ = '3.2.0.dev4' default_app_config = 'cms.apps.CMSConfig'
Python
0.000003
@@ -42,12 +42,11 @@ 2.0. -dev4 +rc2 '%0A%0Ad
68a7f9faf1933bb224113d9fa5d0ddd362b2e5ea
Add script to generate the site documentation containing the sizes of the binary shellcodes.
SizeDocGenerator.py
SizeDocGenerator.py
Python
0
@@ -0,0 +1,703 @@ +import os, re;%0D%0A# I got the actual size of the binary code wrong on the site once - this script should help prevent that.%0D%0A%0D%0AdsDoc_by_sArch = %7B%22w32%22: %22x86%22, %22w64%22: %22x64%22, %22win%22: %22x86+x64%22%7D;%0D%0Awith open(%22build_info.txt%22, %22rb%22) as oFile:%0D%0A iBuildN...
45b77de143a6ffcc46091d7879da4fa3009bc3e0
add jm client
python/jm_client.py
python/jm_client.py
Python
0
@@ -0,0 +1,501 @@ +#!/usr/bin/python%0A#%0A# jm_client.py%0A#%0A# Author: Zex %3Ctop_zlynch@yahoo.com%3E%0A#%0A%0Aimport dbus %0Aimport dbus.service%0Aimport dbus.mainloop.glib%0Aimport gobject%0A%0Afrom basic import * %0A%0Adef start_request():%0A %22%22%22%0A Start sending requests to server%0A %22%22%22%0A ...
4ea6def1bdeb332b1f530f359a333e4f95078b2b
Update docstrings and link to docs
homeassistant/components/updater.py
homeassistant/components/updater.py
""" homeassistant.components.sensor.updater ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Sensor that checks for available updates. For more details about this platform, please refer to the documentation at at https://home-assistant.io/components/sensor.updater/ """ import logging import requests from homeassistant.const imp...
Python
0
@@ -22,23 +22,16 @@ ponents. -sensor. updater%0A @@ -66,19 +66,18 @@ ~~~~ -~~~~%0ASensor +%0AComponent tha @@ -228,15 +228,8 @@ nts/ -sensor. upda @@ -626,13 +626,13 @@ -''' s +%22%22%22 S etup @@ -653,20 +653,21 @@ omponent - ''' +. %22%22%22 %0A%0A de @@ -710,13 +710,13 @@ -''' c +%22%22%22 C...
7084442bb78098f05acbe3243231243543061bf6
Create gloabl_moran.py
gloabl_moran.py
gloabl_moran.py
Python
0.000006
@@ -0,0 +1,239 @@ +import arcpy%0Aarcpy.env.workspace = r%22C:%5CUsers%5Callenje4%5CDesktop%5CGGRC32 Lab 4 Files%5CGGRC32 Lab 4 Files%5CLocal Statistics Data%22%0Am = %0Aarcpy.SpatialAutocorrelation_stats(%22pop_sci.shp%22, %22PDens2011%22,%22NO_REPORT%22, %22CONTIGUITY_EDGES_CORNERS%22, %22#%22,)%0A%0A