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
55a17b2ed3c506e240e35ae8bff432e08e588787
fix encoding error on *too* random bytes
pathod/language/websockets.py
pathod/language/websockets.py
import os import netlib.websockets import pyparsing as pp from . import base, generators, actions, message NESTED_LEADER = "pathod!" class WF(base.CaselessLiteral): TOK = "wf" class OpCode(base.IntField): names = { "continue": netlib.websockets.OPCODE.CONTINUE, "text": netlib.websockets.OPC...
Python
0.999999
@@ -3,16 +3,44 @@ port os%0A +import random%0Aimport string%0A import n @@ -3151,32 +3151,197 @@ d not self.key:%0A + allowed_chars = string.ascii_letters + string.digits%0A k = ''.join(%5Ballowed_chars%5Brandom.randrange(0, len(allowed_chars))%5D for i in range(4)%5D)%0A toke @@ -...
6f2e9362ac8925878e96d18f9b792ff440d83e83
819. Most Common Word
LeetCode/MostCommonWord.py
LeetCode/MostCommonWord.py
Python
0.999999
@@ -0,0 +1,449 @@ +from collections import Counter%0Afrom re import sub%0A%0Aclass Solution:%0A def mostCommonWord(self, paragraph, banned):%0A %22%22%22%0A :type paragraph: str%0A :type banned: List%5Bstr%5D%0A :rtype: str%0A %22%22%22%0A return Counter(%5Bp_word for p_word...
c80fb5f4b391a76ead84d79b6701cf1a8013f1bc
Update Espressif platform // Resolve #245
platformio/builder/scripts/espressif.py
platformio/builder/scripts/espressif.py
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. """ Builder for Espressif MCUs """ from os.path import join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) def BeforeUpload(target, source, env): # pylint: di...
Python
0
@@ -1741,24 +1741,65 @@ %22-ca%22, + %220x40000%22 if %22FRAMEWORK%22 not in env else %220x10000%22,%0A @@ -3325,15 +3325,77 @@ are_ +%25s%22 %25%0A (%2240000%22 if %22FRAMEWORK%22 not in env else %22 10000%22) +) %5D, t
c4e42c88fe6ec09df573f4d379512c516966526b
Fix Espressif "uploadlazy" target for @SmartAnthill Project
platformio/builder/scripts/espressif.py
platformio/builder/scripts/espressif.py
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. """ Builder for Espressif MCUs """ from os.path import join from SCons.Script import (COMMAND_LINE_TARGETS, AlwaysBuild, Builder, Default, DefaultEnvironment) def BeforeUpload(target, source, env): # pylint: di...
Python
0
@@ -3162,16 +3162,26 @@ t_firm = + %5B%0A join(%22$ @@ -3205,14 +3205,137 @@ ware -.bin%22) +_00000.bin%22),%0A join(%22$BUILD_DIR%22, %22firmware_%25s.bin%22 %25%0A (%2240000%22 if %22FRAMEWORK%22 not in env else %2210000%22))%0A %5D %0Aels
7c1a1ee17b83a39d7dfb37b595090ccb7bc23532
create default group for ODIN users (if necessary)
promort/odin/migrations/0001_initial.py
promort/odin/migrations/0001_initial.py
Python
0
@@ -0,0 +1,790 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.3 on 2017-08-01 08:00%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0Afrom promort import settings as pms%0A%0Aimport logging%0Alogger = logging.getLogger('promort')%0A%0A%0Adef create_odin_group(apps, schema_ed...
b1ef2e8c130debb8c43c6453ba1d99d0f33543b5
Use -j option for parallel testing
astropy_helpers/test_helpers.py
astropy_helpers/test_helpers.py
from __future__ import (absolute_import, division, print_function, unicode_literals) import os import shutil import subprocess import sys import tempfile from distutils.core import Command from .compat import _fix_user_options PY3 = sys.version_info[0] == 3 class AstropyTest(Command, objec...
Python
0
@@ -1672,17 +1672,17 @@ lel=', ' -n +j ',%0A
bf979d2c32d84c4011a7363489798056d3cc6a58
add TestBEventsWithFile
tests/unit/Events/test_BEventsWithFile.py
tests/unit/Events/test_BEventsWithFile.py
Python
0.000001
@@ -0,0 +1,1637 @@ +from AlphaTwirl.Events import BEvents as Events%0Afrom AlphaTwirl.Events import Branch%0Aimport unittest%0Aimport ROOT%0A%0A##____________________________________________________________________________%7C%7C%0AinputPath = '/Users/sakuma/work/cms/c150130_RA1_data/c150130_01_PHYS14/20150331_SingleMu/...
0782e8786272fcd6e3e1a41d31bea253865c468b
Add SolveTimer - print number of iterations and elapsed time to console while running ml.solve() - see docstring for usage
pastas/timer.py
pastas/timer.py
Python
0
@@ -0,0 +1,1016 @@ +try:%0A from tqdm.auto import tqdm%0Aexcept ModuleNotFoundError:%0A raise ModuleNotFoundError(%22SolveTimer requires 'tqdm' to be installed.%22)%0A%0A%0Aclass SolveTimer(tqdm):%0A %22%22%22Progress indicator for model optimization.%0A%0A Usage%0A ----- %0A Print timer and number of...
0d12fe35e0c7a31987d83737d22bfc9f54e72709
Add Binary
add-binary.py
add-binary.py
Python
0.999982
@@ -0,0 +1,508 @@ +# author: Fei Gao%0A#%0A# Add Binary%0A#%0A# Given two binary strings, return their sum (also a binary string).%0A# For example,%0A# a = %2211%22%0A# b = %221%22%0A# Return %22100%22.%0A%0A%0Aclass Solution:%0A # @param a, a string%0A # @param b, a string%0A # @return a string%0A def addB...
dd30bed54205eb3639e8af0e2cf879e7cf319701
add solution for Symmetric Tree
src/symmetricTree.py
src/symmetricTree.py
Python
0.000001
@@ -0,0 +1,622 @@ +# Definition for a binary tree node%0A# class TreeNode:%0A# def __init__(self, x):%0A# self.val = x%0A# self.left = None%0A# self.right = None%0A%0A%0Aclass Solution:%0A # @param root, a tree node%0A # @return a boolean%0A%0A def isSymmetric(self, root):%0A ...
6ece957e5317a9f54499714f9a7cb9bca221d4e5
Add a simple script that runs the pipeline for the single specified user
bin/debug/intake_single_user.py
bin/debug/intake_single_user.py
Python
0
@@ -0,0 +1,659 @@ +import json%0Aimport logging%0Aimport argparse%0Aimport numpy as np%0Aimport uuid%0A%0Aimport emission.pipeline.intake_stage as epi%0Aimport emission.core.wrapper.user as ecwu%0A%0Aif __name__ == '__main__':%0A np.random.seed(61297777)%0A%0A parser = argparse.ArgumentParser(prog=%22intake_singl...
4c5f750801cef0424fd93432b688fb74b079f4c5
Add migration to backfill recipient counts
temba/msgs/migrations/0037_backfill_recipient_counts.py
temba/msgs/migrations/0037_backfill_recipient_counts.py
Python
0
@@ -0,0 +1,854 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('msgs', '0036_auto_20151103_1014'),%0A %5D%0A%0A def backfill_recipient_counts(apps, schema):%0A ...
b44f13bfa1ac8b3c1bd24e528fc7874a06df0121
Add script that creates a filtered list of required packages
dev_tools/src/d1_dev/update-requirements-txt.py
dev_tools/src/d1_dev/update-requirements-txt.py
Python
0.000001
@@ -0,0 +1,1647 @@ +#!/usr/bin/env python%0A%0Aimport shutil%0Aimport d1_dev.util%0Aimport os%0Aimport pip._internal.utils.misc%0Aimport re%0A%0A%0AREQUIREMENTS_FILENAME = 'requirements.txt'%0A%0A%0A# Modules in my dev environment that are not required by the stack%0A%0AMODULE_FILTER_REGEX_LIST = %7B%0A 'beautifulso...
869e0d41a498698b3c785af7c86dc2bc831e0791
Create three-words.py
CheckiO/three-words.py
CheckiO/three-words.py
Python
0.99997
@@ -0,0 +1,100 @@ +def checkio(words):%0A return '111' in ''.join('1' if w.isalpha() else '0' for w in words.split())%0A
2521df36a3decb2824ef1207420a9b288b544fee
1512. Number of Good Pairs
LeetCode/NumberOfGoodPairs.py
LeetCode/NumberOfGoodPairs.py
Python
0.999999
@@ -0,0 +1,388 @@ +# don't need to show the pairs, so the order doesn't matter%0A# just need to find how many times each number appears and count the pairs%0A%0Afrom collections import Counter%0A%0Aclass Solution:%0A def numIdenticalPairs(self, nums: List%5Bint%5D) -%3E int:%0A counts = Counter(nums)%0A ...
f7d95d4df21bc442261723298f9889bd093feb97
add spaceapi module
py3status/modules/spaceapi.py
py3status/modules/spaceapi.py
Python
0.000001
@@ -0,0 +1,2336 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0AThis module shows if your favorite hackerspace is open or not%0A%0ALast modified: 2015-02-01%0AAuthor: @timmszigat%0ALicense: WTFPL http://www.wtfpl.net/txt/copying/%0A%22%22%22%0A%0Afrom time import time%0Aimport datetime%0Aimport json%0Aimport urllib.request%0...
651c44b51a26733dde22e82a80b0668302e5df52
implement a base class for backends
merfi/backends/base.py
merfi/backends/base.py
Python
0
@@ -0,0 +1,471 @@ +from merfi import base, util%0Afrom tambo import Transport%0A%0A%0Aclass BaseBackend(base.BaseCommand):%0A%0A options = %5B%5D%0A parser = None%0A%0A def parse_args(self):%0A self.parser = Transport(self.argv, options=self.options)%0A self.parser.catch_help = self.help()%0A ...
7086ce47e4a2b6611596d177cc5adb166b382f48
Create cryptography.py
cryptography.py
cryptography.py
Python
0.999878
@@ -0,0 +1,4 @@ +%22%22%22%0A
2eb5ba178e3bed422a2cb7437362b30df717103e
remove dbcred file from staging interface
dataactvalidator/interfaces/validatorStagingInterface.py
dataactvalidator/interfaces/validatorStagingInterface.py
from sqlalchemy.exc import ResourceClosedError from dataactcore.models.baseInterface import BaseInterface class ValidatorStagingInterface(BaseInterface): """ Manages all interaction with the staging database """ dbName = "staging" credFileName = "dbCred.json" Session = None engine = None sessi...
Python
0
@@ -1,51 +1,4 @@ -from sqlalchemy.exc import ResourceClosedError%0A from @@ -51,16 +51,57 @@ nterface +%0Afrom dataactcore.config import CONFIG_DB %0A%0Aclass @@ -222,50 +222,36 @@ e = -%22staging%22%0A credFileName = %22dbCred.json%22 +CONFIG_DB%5B'staging_db_name'%5D %0A @@ -304,16 +304,16 @@ = None%0A%...
6f2529d1891b5c256394b9c8aa991b25a029b5f1
Add a migration to load users and buckets
migrations/004_load_seed_file.py
migrations/004_load_seed_file.py
Python
0
@@ -0,0 +1,501 @@ +%22%22%22%0ALoad initial user and bucket data from seed files.%0A%22%22%22%0Aimport logging%0Aimport os%0Aimport subprocess%0Aimport sys%0A%0Alog = logging.getLogger(__name__)%0A%0A%0Adef up(db):%0A names = db.collection_names()%0A%0A if %22users%22 in names:%0A log.info(%22users collect...
3dbe5ce617d882dc74a1b95e830634dc0d0f800c
Add examples from the ORM tutorial
python/sqlalchemy/tutorial.py
python/sqlalchemy/tutorial.py
Python
0
@@ -0,0 +1,1615 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A#%0A# Examples from the ORM tutorial%0A#%0A%0Afrom __future__ import print_function, division%0A%0Afrom sqlalchemy import Column, Integer, String, Sequence, ForeignKey%0Afrom sqlalchemy.ext.declarative import declarative_base%0Afrom sqlalchemy.orm im...
e3eaa56e95719957c72106640d574e6ec28a76b8
fix problem with high fluxes at edges which include occluded porosity
autotest/src/solution_reader.py
autotest/src/solution_reader.py
### ==================================================================== ### Python-file ### author: Ethan T. Coon ### filename: solution_reader.py ### version: ### created: 25 January 2011 ### on: 10:53:33 MST ### last modified: 14 February 2011 ...
Python
0
@@ -297,17 +297,17 @@ ied: 1 -4 +6 Februar @@ -343,14 +343,14 @@ 1 -5:29:1 +0:38:2 0 MS @@ -2975,16 +2975,169 @@ efactor%0A + print np.where(np.abs(npvec)/np.abs(npvec).mean() %3E 1e2)%5B0%5D%0A npvec = np.where(np.abs(npvec)/np.abs(npvec).mean() %3E 1e2, 0., npvec) %0A%0A
b9da5732579dce0f25a413cbfe4936b8ac024aa5
move gzip classes into gzip
bamboo_crawler/gzip/__init__.py
bamboo_crawler/gzip/__init__.py
Python
0.000002
@@ -0,0 +1,387 @@ +import gzip%0A%0Afrom ..interfaces.deserializer import Deserializer%0Afrom ..interfaces.serializer import Serializer%0A%0A%0Aclass GzipSerializer(Serializer%5Bbytes, bytes%5D):%0A def serialize(self, value: bytes) -%3E bytes:%0A return gzip.compress(value)%0A%0A%0Aclass GzipDeserializer(Des...
99282d42a3948b9ed45b02df657c344667ec0cf2
Add a migration for directive_sections -> relationships
src/ggrc/migrations/versions/20150521125008_324d461206_migrate_directive_sections_to_.py
src/ggrc/migrations/versions/20150521125008_324d461206_migrate_directive_sections_to_.py
Python
0
@@ -0,0 +1,1557 @@ +# Copyright (C) 2015 Google Inc., authors, and contributors %3Csee AUTHORS file%3E%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A# Created By: anze@reciprocitylabs.com%0A# Maintained By: anze@reciprocitylabs.com%0A%0A%22%22%22Migrate directive_sections to rel...
5b9d9f531e3544f6d3dfe0a2e48dcaaebf132921
Test case for RPC HTTP handler.
test/services/appmanager/test_http.py
test/services/appmanager/test_http.py
Python
0
@@ -0,0 +1,2080 @@ +import time%0A%0Aimport requests%0Afrom weavelib.messaging import Receiver%0Afrom weavelib.rpc import RPCServer, ServerAPI%0Afrom weavelib.services import BaseService%0A%0Afrom weaveserver.core.services import ServiceManager%0Afrom weaveserver.services.appmanager import ApplicationService%0A%0A%0AAU...
42ff16cade98512d0e80c1d467b01df1f4c33428
use new style str formatting
examples/ensemble/plot_gradient_boosting_oob.py
examples/ensemble/plot_gradient_boosting_oob.py
""" ====================================== Gradient Boosting Out-of-Bag estimates ====================================== Out-of-bag (OOB) estimates can be a useful heuristic to estimate the "optimal" number of boosting iterations. OOB estimates are almost identical to cross-validation estimates but they can be compute...
Python
0
@@ -2185,20 +2185,28 @@ CC: -%25.4f%22 %25 +%7B:.4f%7D%22.format( acc) +) %0A%0An_
8ba5b29200520d853791943341d41798ff80a248
Change meta option for Github
src/repository/migrations/0003_auto_20170524_1503.py
src/repository/migrations/0003_auto_20170524_1503.py
Python
0.000001
@@ -0,0 +1,467 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.10.5 on 2017-05-24 15:03%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('repository', '0002_auto_20170522_2021'),%0A %5D%0A%0A ...
811c1ed7324075970f0009d691866d1d47de43a2
add a setup.py to make this a nice official package
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,334 @@ +#!/usr/bin/python2.4%0A#%0A# Copyright 2006 Google Inc. All Rights Reserved.%0A%0Afrom distutils.core import setup%0A%0Asetup(name=%22google-mysql-tools%22,%0A description=%22Google MySQL Tools%22,%0A url=%22http://code.google.com/p/google-mysql-tools%22,%0A version=%220.1%22,%0A ...
193aa3ff7ef4219fd29a0ea40a8c0d2e5467de75
Add setup.py script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,568 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name = %22MutatorMath%22,%0A version = %221.8%22,%0A description = %22Python for piecewise linear interpolation in multiple dimensions with multiple, arbitrarily placed, masters.%22,%0A author = %22Erik van Blokland...
21a0948eb1d25e9126e2940cbc7d0496181d6a93
Add Django version trove classifiers.
setup.py
setup.py
import os from setuptools import setup, find_packages NAME = 'djangae' PACKAGES = find_packages() DESCRIPTION = 'Django integration with Google App Engine' URL = "https://github.com/potatolondon/djangae" LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read() AUTHOR = 'Potato London Ltd.'...
Python
0
@@ -700,16 +700,92 @@ jango',%0A + 'Framework :: Django :: 1.7',%0A 'Framework :: Django :: 1.8',%0A
f1ae87bd9df2c3d70db980ea5e721223b545da5f
Add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,345 @@ +#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='Djheroku',%0A version='0.1',%0A description='Some helper functionality for binding Heroku configuration to Django',%0A author='Ferrix Hovi',%0A author_email='ferrix+git@ferrix.fi',%0A url='http://git...
6f57426a6a3881816506868f8278e252e5b0e5cd
Add setup.py file.
setup.py
setup.py
Python
0
@@ -0,0 +1,1811 @@ +try:%0A from setuptools import setup%0Aexcept ImportError:%0A from distutils.core import setup%0A%0A%0Aconfig = %7B%0A 'description': 'A set of tools to plan astronomical observations.',%0A 'author': 'iastro-pt',%0A 'url': 'https://github.com/iastro-pt/ObservationTools',%0A 'downlo...
50e9d1f1f66c6fc4e549fa7084f0189e0805d58e
Add first version of setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,978 @@ +#!/usr/bin/env python%0A%0Aimport sys%0Aif sys.version_info %3C (3,5):%0A sys.exit(%22doctr requires Python 3.5 or newer%22)%0A%0Afrom setuptools import setup%0Aimport versioneer%0A%0Asetup(%0A name='doctr',%0A version=versioneer.get_version(),%0A cmdclass=versioneer.get_cmdclass(),%0A ...
d9bfa5d255a9a2a3ab278f94f338d2147dcdd1db
Fix setup
setup.py
setup.py
try: from setuptools import setup except ImportError: from distutils.core import setup setup(name='scikit-optimize', version='0.1', description='Sequential model-based optimization toolbox.', long_description=('Scikit-Optimize, or skopt, is a simple and efficient' ' li...
Python
0.000001
@@ -634,16 +634,35 @@ earning' +, 'skopt.optimizer' %5D,%0A
e1d4cbbeab04e6c04b822073937ef19d7ec8e34a
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,607 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup, find_packages%0A%0Asetup(name='raspberryturk',%0A version='0.0.1',%0A description='Python package powering the Raspberry Turk chess-playing robot.',%0A author='Joey Meyer',%0A author_email='jmeyer41@gmail.com',%0A url='...
a4f05ca4022a542dac45114a832991c6bfc93e4a
Remove setuptools dependence.
setup.py
setup.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from setuptools import setup description = """ """ setup( name = "sse", url = "https://github.com/niwibe/sse", author = "Andrei Antoukh", author_email = "niwi@niwi.be", version="1.0", description = "Server Sent Events protocol im...
Python
0
@@ -27,94 +27,35 @@ rom -__future__ import unicode_literals%0Afrom setuptools import setup%0A%0Adescription = %22%22%22%0A%22%22%22 +distutils.core import setup %0A%0Ase @@ -205,9 +205,9 @@ =%221. -0 +1 %22,%0A @@ -230,17 +230,17 @@ %22Server - +- Sent Eve @@ -273,65 +273,8 @@ .%22,%0A - install_requires=...
b30e1c560ecde7b2c949de42eceddf5c49c9ba01
add setup.py file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,128 @@ +from setuptools import setup%0A%0Asetup(%0A%09name=%22localFoodLearner%22,%0A%09version=%220.0.1%22,%0A%09install_requires=%5B%0A%09%09%22pandas%22,%0A%09%09%22numpy%22,%0A%09%5D%0A)
7036801e6931c480a3eec611ed87f13e29a181bf
Bump version to 0.7.9
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import sys here = lambda *a: os.path.join(os.path.dirname(__file__), *a) try: from setuptools import setup except ImportError: from distutils.core import setup if sys.argv[-1] == 'publish': os.system('python setup.py sdist upload') sys.exit() ...
Python
0
@@ -555,12 +555,11 @@ ='0. -8dev +7.9 ',%0A
1cbe793a5260fcfe8e16462e224bcfc19125063c
add a setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,1073 @@ +import os%0Afrom setuptools import setup%0A%0AREADME = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()%0A%0A# allow setup.py to be run from any path%0Aos.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))%0A%0Asetup(%0A name='django-admin-resumable-js',%...
2af222aed53f4cf799824b564ecd7e633d6356b8
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,420 @@ +from setuptools import setup%0Asetup(%0A name = %22datatank_py%22,%0A version = %220.1%22,%0A packages = %5B %22datatank_py%22 %5D,%0A %0A install_requires = %5B'numpy%3E1.0'%5D,%0A # package_data = %7B%0A # %22%22 : %5B %22*.tank%22, %22*.markdown%22, %22*.txt%22 %5D%0A #...
a8b809a8f0f13bda454c2c78c08b35127bed16d6
Bump the patch version to 1.0.1.
setup.py
setup.py
from setuptools import setup setup( name="django-redis-cache", url="http://github.com/sebleier/django-redis-cache/", author="Sean Bleier", author_email="sebleier@gmail.com", version="1.0.0", packages=["redis_cache", "redis_cache.backends"], description="Redis Cache Backend for Django", ...
Python
0
@@ -201,17 +201,17 @@ on=%221.0. -0 +1 %22,%0A p
2dc04229247f28c8c098f8e3e00341419a1ead1c
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,765 @@ +# -*- coding:utf-8 -*-%0Afrom setuptools import setup%0Afrom setuptools.command.test import test as TestCommand%0A%0Aclass PyTest(TestCommand):%0A def finalize_options(self):%0A TestCommand.finalize_options(self)%0A self.test_args = %5B%5D%0A self.test_suite = True%0A%0A de...
926beaa12c0e17e949c362487014a6ec7521d654
Add distutils - setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,527 @@ +#!/usr/bin/env python%0A%0Afrom sslyze import SSLYZE_VERSION, PROJECT_URL%0Afrom distutils.core import setup%0A%0Asetup(name='SSLyze',%0A version=SSLYZE_VERSION,%0A description='Fast and full-featured SSL scanner',%0A long_description=open('README.md').read(),%0A author_email='sslyze@isec...
81ed734de508cb9dff61d2bc2703e54bda02067a
remove netifaces from package dependencies
setup.py
setup.py
from setuptools import setup setup( name='vent', version='v0.4.3.dev', packages=['vent', 'vent.core', 'vent.core.file_drop', 'vent.core.rq_worker', 'vent.core.rq_dashboard', 'vent.menus', 'vent.core.rmq_es_connector', 'vent.helpers', 'vent.api'], install_requires=['docker', ...
Python
0
@@ -316,21 +316,8 @@ er', - 'netifaces', 'np
5262ff764e09b7d8e20cce848a288968014e648e
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,994 @@ +from setuptools import setup%0A%0Asetup(%0A name='iron',%0A version='0.0.1',%0A author='Alexander Schepanovski',%0A author_email='suor.web@gmail.com',%0A%0A description='Iron out your python code.',%0A long_description=open('README.rst').read(),%0A url='http://github.com/Suor/iro...
8dea7c6cc036e228c6a963413195d45f03a55850
add setup
setup.py
setup.py
Python
0
@@ -0,0 +1,61 @@ +from setuptools import setup%0Asetup(scripts=%5B'pip-check.py'%5D)%0A
4fe0efd61c848aa55e900031e5ae27bc3eb4b149
Add caffe profile tool.
tools/profiling/py_caffe_profiling.py
tools/profiling/py_caffe_profiling.py
Python
0
@@ -0,0 +1,1567 @@ +#!/usr/bin/env python%0A%0Aimport sys%0Aimport os%0Aimport argparse%0Aimport time%0Aimport numpy as np%0A%0Aif __name__ == '__main__':%0A parser = argparse.ArgumentParser('Time profiling of certain Caffe code.')%0A parser.add_argument('--caffe',%0A help='Path to caffe repository.')%0A ...
185851cfb4614ebe97f38a43c5e2eb9503ce5c6c
Add tests for model render methods
masterfirefoxos/base/tests.py
masterfirefoxos/base/tests.py
Python
0
@@ -0,0 +1,1246 @@ +from django.test import SimpleTestCase%0A%0Afrom feincms.module.medialibrary.models import MediaFile%0A%0Afrom . import models%0A%0A%0Aclass TestYouTubeParagraphEntry(SimpleTestCase):%0A def test_render(self):%0A test_data = %7B'title': 'Test Title', 'text': 'test text',%0A ...
a8e3570e373409cb442605218f1a6c936c518c5a
Add spotify liquid tag
liquid_tags/spotify.py
liquid_tags/spotify.py
Python
0.000008
@@ -0,0 +1,1314 @@ +%22%22%22%0ASpotify Tag%0A---------%0AThis implements a Liquid-style spotify tag for Pelican,%0Abased on the jekyll / octopress youtube tag %5B1%5D_%0A%0ASyntax%0A------%0A%7B%25 spotify id %25%7D%0A%0AExample%0A-------%0A%7B%25 spotify 1HNZcRFlIKwHAJD3LxvX4d %25%7D%0A%0AOutput%0A------%0A%3Ciframe ...
958abe5b298f255df5e4aef94b12d647f1319650
Create new package (#6811)
var/spack/repos/builtin/packages/py-pyani/package.py
var/spack/repos/builtin/packages/py-pyani/package.py
Python
0
@@ -0,0 +1,2432 @@ +##############################################################################%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...
04ddb34d3dd312294bdc61f694f1db862091cf57
Create beta_move_zeroes.py
Solutions/beta_move_zeroes.py
Solutions/beta_move_zeroes.py
Python
0.000002
@@ -0,0 +1,164 @@ +def move_zeroes(*args):%0A return sum(%5B%5Bx%5D*args.count(x) for x in range(min(args), max(args)+1) if x!=0%5D, %5B%5D) + %5C%0A %5B0%5D*args.count(0) if args else %5B%5D%0A
c45ccd0f258fcbb152ffa9597ceb1bacd472f73b
Add test for email backend coverage
web/impact/impact/tests/test_impact_email_backend.py
web/impact/impact/tests/test_impact_email_backend.py
Python
0
@@ -0,0 +1,1509 @@ +from mock import patch%0Afrom django.core import mail%0Afrom django.test import TestCase%0Afrom django.urls import reverse%0A%0Afrom impact.minimal_email_handler import MinimalEmailHandler%0A%0Aclass TestEmailBackend(TestCase):%0A%0A @patch(%22impact.impact_email_backend.ImpactEmailBackend._add_l...
33aa9e79d2fe331f88574c02ad297072455be86a
add command to create scripts with the shell env
cerbero/commands/gensdkshell.py
cerbero/commands/gensdkshell.py
Python
0
@@ -0,0 +1,2901 @@ +# cerbero - a multi-platform build system for Open Source software%0A# Copyright (C) 2012 Andoni Morales Alastruey %3Cylatuya@gmail.com%3E%0A#%0A# This library is free software; you can redistribute it and/or%0A# modify it under the terms of the GNU Library General Public%0A# License as published by...
a8c3bbc363a319cd2e5748b1265b6e00563d510a
add udp.py
Foundations.of.Python.Network.Programming.369p/udp.py
Foundations.of.Python.Network.Programming.369p/udp.py
Python
0.000113
@@ -0,0 +1,1418 @@ +import argparse, socket%0Afrom datetime import datetime%0AMAX_BYTES = 65535%0Adef server(port):%0A sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)%0A sock.bind(('127.0.0.1', port))%0A print('Listening at %7B%7D'.format(sock.getsockname()))%0A while True:%0A data, address =...
b1c0b9afacb12e8255681db25a01b94f25fed89e
add http tps test
test/test_http.py
test/test_http.py
Python
0
@@ -0,0 +1,1206 @@ +#!/usr/bin/env python3%0A%22%22%22 Vpp HTTP tests %22%22%22%0A%0Aimport unittest%0Aimport os%0Aimport subprocess%0Aimport http.client%0Afrom framework import VppTestCase, VppTestRunner, Worker%0Afrom vpp_devices import VppTAPInterface%0A%0A%0A@unittest.skip(%22Requires root%22)%0Aclass TestHttpTps(V...
51b90afe8388b0425810bc1560cffe2e5a02fca8
Add boolean matrix generator - from mocogenomics
code/generate_boolean_matrix.py
code/generate_boolean_matrix.py
Python
0.000001
@@ -0,0 +1,1608 @@ +import itertools%0A%0Aletters = %5B'A','R','N','D','C','E','Q','G','H','I','L','K','M','F','P','S','T','W','Y','V'%5D%0A%0A# generates a matrix from all peptides and saves to CSV%0Adef generateBooleanMatrix(peptides):%0A%09# generate header ------%0A%09peptide_length = 9%0A%09aa_list = %5B'A','R','...
7de5d0df0b726c629724d931766ede629a451d18
Add logging tests.
tests/logutils.py
tests/logutils.py
Python
0
@@ -0,0 +1,236 @@ +%22%22%22%0A.. moduleauthor:: Adam Gagorik %3Cadam.gagorik@gmail.com%3E%0A%22%22%22%0Aimport unittest%0Aimport pydarkstar.logutils%0A%0Apydarkstar.logutils.setDebug()%0A%0Aclass TestLogutils(unittest.TestCase):%0A pass%0A%0Aif __name__ == '__main__':%0A unittest.main()%0A
7a7c8c1f735982ca8403aec05861430ba70aca7f
add a test that checks _mssql whilst being run in threads
tests/threaded.py
tests/threaded.py
Python
0
@@ -0,0 +1,973 @@ +import _mssql%0Aimport unittest%0Aimport threading%0Afrom mssqltests import server, username, password, database%0A%0Aclass TestingThread(threading.Thread):%0A%0A def run(self):%0A self.running = True%0A mssql = _mssql.connect(server, username, password)%0A mssql.select_db(dat...
8a332dc133d27f02bac126528e576fb2b787438d
Converting the font image to a convenient format
tool/font_conv.py
tool/font_conv.py
Python
0.99999
@@ -0,0 +1,728 @@ +# -*- coding: utf-8 -*-%0A%0Aimport sys, os, argparse%0Aimport Image, struct, shutil%0A%0A__version__ = %220.1.0%22%0A%0Adef main (argv):%0A parser = argparse.ArgumentParser(description=%22Generates a bmf file from a BMFont fnt file.%22)%0A parser.add_argument(%22bmf_file%22)%0A parser.add_a...
d16b48d49f23bbf2f3ca0f6bc82d961b5b3ce50b
Add user_data parameter for Notify.add_action
udiskie/notify.py
udiskie/notify.py
""" Notification utility. """ import logging import sys from udiskie.dbus import DBusException __all__ = ['Notify'] class Notify(object): """ Notification tool. Can be connected to udisks daemon in order to automatically issue notifications when system status has changed. NOTE: the action b...
Python
0.000006
@@ -6338,16 +6338,22 @@ on_click +, None )%0A
9f7fc07dbe48494b19826dfe06a1e1a4cf5469c5
Add in a few global options. Feel free to rename them, they're just the first thing that came to mind.
src/python/m5/__init__.py
src/python/m5/__init__.py
# Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
Python
0.000001
@@ -2907,271 +2907,1357 @@ ue%0A%0A -# Standard optparse options. Need to be explicitly included by the%0A# user script when it calls optparse.OptionParser().%0AstandardOptions = %5B%0A optparse.make_option(%22--traceflags%22, type=%22string%22, action=%22callback%22,%0A callback=setTraceFl...
d3c6845e83514f59f421d042cab9cf8fa817e33c
Add tests for common.signal.SignalCompare
tests/test_signal.py
tests/test_signal.py
Python
0
@@ -0,0 +1,1364 @@ +# 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-2.0%0A#%0A# Unless requ...
f91d32d25bc84a795d53f2f7698b77862d08f690
Add a test_traits file
tests/test_traits.py
tests/test_traits.py
Python
0.000003
@@ -0,0 +1,900 @@ +# -*- coding: utf-8 -*-%0Afrom dynmen import common%0Aimport unittest%0A%0Aclass TestFlag(unittest.TestCase):%0A @classmethod%0A def setUpClass(cls):%0A class TFlag(object):%0A dflt_t = common.Flag('dflt_t', default=True, flag='-dt')%0A dflt_f = common.Flag('dflt_f'...
34b7d99becd1664c1a5881da178fb4ae8b871bee
Add new package: mahout (#18048)
var/spack/repos/builtin/packages/mahout/package.py
var/spack/repos/builtin/packages/mahout/package.py
Python
0
@@ -0,0 +1,1230 @@ +# 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%0Afrom spack import *%0A%0A%0Aclass Mahout(Package):%0A %22%22%22The Apache Mahout project'...
3867db9e3c2107deae0c2b3e7f8ba3461bb550b2
Add test case to check invalid time_start (#558)
monitoring/prober/scd/test_subscription_query_time.py
monitoring/prober/scd/test_subscription_query_time.py
Python
0
@@ -0,0 +1,1412 @@ +%22%22%22Strategic conflict detection Subscription put query tests:%0A%0A - query with different time formats.%0A%22%22%22%0A%0Aimport datetime%0A%0Afrom monitoring.monitorlib.infrastructure import default_scope%0Afrom monitoring.monitorlib import scd%0Afrom monitoring.monitorlib.scd import SCOPE_S...
32fb5d7d98c112bf9a358339931f2708114fd56b
fix commentary of DimensionKey in questions.models in API for sphinx
msgvis/apps/questions/models.py
msgvis/apps/questions/models.py
from django.db import models from msgvis.apps.dimensions import registry from django.db.models import Q class Article(models.Model): """ A published research article. """ year = models.PositiveIntegerField(null=True, default=None, blank=True) """The publication year for the article.""" aut...
Python
0
@@ -897,16 +897,19 @@ imension +Key %60 object
f1b8216408f26094a70789297198d2a63b0db0dd
Add pframe test.
tests/pframe_test.py
tests/pframe_test.py
Python
0
@@ -0,0 +1,1806 @@ +%22%22%22Tests for scripts/pframe.py.%22%22%22%0Aimport re%0Aimport unittest%0A%0Afrom test_utils import import_utils%0Aimport_utils.prepare_lldb_import_or_exit()%0A%0Aimport lldb%0A%0Aimport_utils.prepare_for_scripts_imports()%0A%0Afrom scripts import pframe%0A%0Aclass PFrameTest(unittest.TestCase)...
9524f44838df21f386b56d047e4a45e2aba9ad4e
Create Valid_Palindrome.py
Array/Valid_Palindrome.py
Array/Valid_Palindrome.py
Python
0.000001
@@ -0,0 +1,1602 @@ +Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.%0A%0AFor example,%0A%22A man, a plan, a canal: Panama%22 is a palindrome.%0A%22race a car%22 is not a palindrome.%0A%0ANote:%0AHave you consider that the string might be empty? This is a goo...
bffa61da4576c088c081daea3833142af58fef1d
Add in some tests for cities
tests/test_cities.py
tests/test_cities.py
Python
0.000019
@@ -0,0 +1,204 @@ +import testtools%0A%0Aimport cities%0A%0A%0Aclass TestCities(testtools.TestCase):%0A def test_largest(self):%0A largest = 'Sydney'%0A self.assertEqual(largest, cities.largest(cities.get_cities()).name)%0A%0A
102a1c57763c646962eb62569e1f7b57793142f3
fix test_step test
tests/test_client.py
tests/test_client.py
try: from urllib.parse import urljoin except ImportError: from urlparse import urljoin import pytest from mock import patch, Mock from plaid.client import Client, require_access_token def test_require_access_token_decorator(): class TestClass(object): access_token = 'foo' @require_access...
Python
0.000005
@@ -1178,24 +1178,29 @@ %0A%0A%0Adef test_ +auth_ step():%0A @@ -1316,32 +1316,262 @@ %0A client. +auth_step('bofa', 'foo')%0A assert mock_requests_post.called%0A%0A%0Adef test_connect_step():%0A with patch('requests.post') as mock_requests_post:%0A client = Client('myclientid', 'mysecret...
91d24f62505462e5009cd5e0fb1176824d7c57d9
Test config
tests/test_config.py
tests/test_config.py
Python
0.000001
@@ -0,0 +1,1061 @@ +from changes import config%0Afrom . import BaseTestCase%0A%0A%0Aclass ConfigTestCase(BaseTestCase):%0A arguments = %7B%0A '--debug': True,%0A '--dry-run': False,%0A '--help': False,%0A '--major': False,%0A '--minor': False,%0A '--new-version': '0.0.1',%0A...
71fda989816e1848c99b801c133171216abe0df5
Add test for setting scheduler parameters
tests/test_domain.py
tests/test_domain.py
Python
0
@@ -0,0 +1,525 @@ +%0Aimport unittest%0Aimport libvirt%0A%0Aclass TestLibvirtDomain(unittest.TestCase):%0A def setUp(self):%0A self.conn = libvirt.open(%22test:///default%22)%0A self.dom = self.conn.lookupByName(%22test%22)%0A%0A def tearDown(self):%0A self.dom = None%0A self.conn = No...
726ae01462c8945df1b7d3f32d56fc54ed9b6fa2
Write hub initialization tests
tests/test_bicycle_wheel.py
tests/test_bicycle_wheel.py
Python
0.000001
@@ -0,0 +1,1986 @@ +import pytest%0Afrom bikewheelcalc import BicycleWheel, Rim, Hub%0A%0A%0A# -------------------------------------------------------------------------------%0A# Test fixtures%0A#------------------------------------------------------------------------------%0A@pytest.fixture%0Adef std_radial():%0A '...
d05a2a7504bf8e6adf6d5d94d0b810060f66a9ec
Create test_it_all.py
tests/test_it_all.py
tests/test_it_all.py
Python
0.000009
@@ -0,0 +1,9 @@ +#soon TM%0A
afe2cac782f2578e610137891566d862f62375c6
Create uds18.py
uds18.py
uds18.py
Python
0.000002
@@ -0,0 +1,85 @@ +%22%22%22%0ACustom fits for the lens in UDS-18%0A%22%22%22%0Aimport unicorn%0Aimport pyfits%0Aimport emcee%0A
df26dc408dc629e4802716ace5d0b3879c2b110b
Create factories.py
trendpy/factories.py
trendpy/factories.py
Python
0.000001
@@ -0,0 +1,1495 @@ +# factory.py%0A%0A# MIT License%0A%0A# Copyright (c) 2017 Rene Jean Corneille%0A%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the Software without restriction, including w...
df7cf8ef2bdba9f50e21f4a7fc96904122fde311
Add gunicorn config file
gunicorn_cfg.py
gunicorn_cfg.py
Python
0
@@ -0,0 +1,724 @@ +%22%22%22%0AThis file contains gunicorn settings.%0ATo run sqmpy with gunicorn run the following command:%0A%0A gunicorn -c gunicorn_cfg.py run:app%0A%0AIn order to daemonize gunicorn add -D flag:%0A%0A gunicorn -c gunicorn_cfg.py run:app -D%0A%0A%22%22%22%0Aimport multiprocessing%0A%0A%0A# Gun...
cb875f2043a1c3a9ec5201336d1b577655612279
move utility methods into their own module as functions, clean up type lookup
utils.py
utils.py
Python
0
@@ -0,0 +1,327 @@ +def bytes_to_unicode(data):%0A return data.decode(%22UTF-8%22)%0A%0A%0Adef unicode_to_bytes(data):%0A return data.encode(%22UTF-8%22)%0A%0A%0Adef pretty_print(self, user, msg_type, destination, message):%0A if isinstance(message, list):%0A message = %22 %22.join(message)%0A pri...
568fe1ff8c4ef27f93751f53a27707f045f19037
update core api module
simphony_paraview/core/api.py
simphony_paraview/core/api.py
from .iterators import iter_cells, iter_grid_cells from .cuba_data_accumulator import CUBADataAccumulator from .cuba_utils import ( supported_cuba, cuba_value_types, default_cuba_value, VALUETYPES) from .constants import points2edge, points2face, points2cell, dataset2writer from .paraview_utils import write_to_file...
Python
0
@@ -300,16 +300,22 @@ import +(%0A write_to @@ -339,16 +339,45 @@ paraview +, typical_distance, set_data) %0A%0Afrom . @@ -713,10 +713,50 @@ uds2vtk' +,%0A 'typical_distance',%0A 'set_data' %5D%0A
f418e9e68d1f2a7f6a0ad5060a1ed5a7ed74664f
Add YCM configuration
_vim/ycm_global_extra_conf.py
_vim/ycm_global_extra_conf.py
Python
0
@@ -0,0 +1,2560 @@ +# Copied from https://gist.github.com/micbou/f8ed3f8bd6bd24e9f89bef286437306b. Kudos to micbou%0A%0Aimport os%0Aimport ycm_core%0A%0A%0ASOURCE_EXTENSIONS = %5B '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' %5D%0A%0A%0Adef IsHeaderFile( filename ):%0A extension = os.path.splitext( filename )%5B 1 %5D%0A ...
be4374fd50d0c1148e3a734cc53391e15d4bbdc4
Create wksp5.py
wksp5.py
wksp5.py
Python
0.000003
@@ -0,0 +1,699 @@ +%22%22%22Rx Workshop: Event Processing.%0APart 2 - Grouping.%0AUsage:%0A python wksp5.py%0A%22%22%22%0Afrom __future__ import print_function%0Aimport rx%0A%0A%0Aclass Program:%0A %0A @staticmethod%0A def main():%0A src = rx.Observable.from_iterable(get_input(),%0A ...
e789579c77d2d96d098f4b46f1dfec4d54c843e5
move AbstractProductCategory and AbstractNestedProductCategory
eca_catalogue/categorization/abstract_models.py
eca_catalogue/categorization/abstract_models.py
Python
0.000006
@@ -0,0 +1,801 @@ +from django.db import models%0Afrom django.utils.translation import ugettext_lazy as _%0A%0Afrom treebeard.mp_tree import MP_Node%0A%0A%0Aclass AbstractProductCategory(models.Model):%0A name = models.CharField(_(%22Name%22), max_length=128, unique=True)%0A description = models.TextField(_(%22De...
3bbaf37193fe147f66b17d848f646f4400aa6278
Fix lights issue #8098 (#8101)
homeassistant/components/light/vera.py
homeassistant/components/light/vera.py
""" Support for Vera lights. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/light.vera/ """ import logging from homeassistant.components.light import ( ATTR_BRIGHTNESS, ATTR_RGB_COLOR, ENTITY_ID_FORMAT, SUPPORT_BRIGHTNESS, SUPPORT_RGB_COLOR, Lig...
Python
0
@@ -2407,16 +2407,182 @@ ed_on()%0A + if self.vera_device.is_dimmable:%0A # If it is dimmable, both functions exist. In case color%0A # is not supported, it will return None%0A @@ -2634,16 +2634,20 @@ tness()%0A +
000239e4f838f6514f6e902510d70fdc41b196d5
Add wordpress_post
wordpress_post.py
wordpress_post.py
Python
0.000006
@@ -0,0 +1,2271 @@ +import os %0D%0Aimport time%0D%0Afrom base64 import b64encode%0D%0Aimport json%0D%0Aimport requests%0D%0Afrom wordpresspushmedia import *%0D%0A%0D%0A#%0D%0A# publish the image as a media in wordpress, and return the HTML to include into the post%0D%0A#%0D%0Adef wordpress_publish_image(blogid,title,i...
2fdbd208ee6db593df6f8b7c171a716ea3716920
Add a checks module
doc8/checks.py
doc8/checks.py
Python
0
@@ -0,0 +1,1826 @@ +# -*- coding: utf-8 -*-%0A%0A# Copyright (C) 2014 Ivan Melnikov %3Civ at altlinux dot org%3E%0A#%0A# Author: Joshua Harlow %3Charlowja@yahoo-inc.com%3E%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...
35de07472674c01c4816214123bf786599c239fb
Update source exe_17
Exe_17.py
Exe_17.py
# File. Input/Output #name = input("What is your name? ") #print("Your name is", name) # ============ OPENING and CLOSING Files ============= # Syntax (opening_ # file object = open(file_name [, access_mode][, buffering]) # # Here are parameter details: #  file_name: The file_name argument is a string value tha...
Python
0
@@ -15,17 +15,16 @@ Output%0A%0A -# name = i @@ -52,17 +52,16 @@ me? %22)%0A%0A -# print(%22Y @@ -1288,18 +1288,16 @@ o.mode)%0A -# print(%22S
6c21cab0bc08fcce83b35b4f51a2d7f369af3af6
Build RequestContext in webhook middleware
senlin/api/middleware/webhook.py
senlin/api/middleware/webhook.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed unde...
Python
0.000207
@@ -2662,16 +2662,31 @@ context. +RequestContext. get_serv @@ -2699,16 +2699,297 @@ ntext()%0A + # Build a RequestContext from senlin_context since DB API%0A # needs the session parameter.%0A # TODO(Anyone): This converting is not needed any more after%0A # the context redesign is finally...
dbcaa9f2cda37269cd5dfca1166394f71bb3adfc
Create Example5.py
Example5.py
Example5.py
Python
0
@@ -0,0 +1,1560 @@ +# Carlos Pedro Gon%C3%A7alves (2015), Game Theory with Python%0A# Game Theory and Applied A.I. Classes%0A# Instituto Superior de Ci%C3%AAncias Sociais e Pol%C3%ADticas (ISCSP)%0A# University of Lisbon%0A# cgoncalves@iscsp.ulisboa.pt%0A#%0A# New Entrant vs Market Leader (payoffs correspond to strateg...
f0e1fc1751b20019e87cc50085c1350806b02f9f
Add missing visualizer module
thinc/extra/visualizer.py
thinc/extra/visualizer.py
Python
0.000001
@@ -0,0 +1,945 @@ +''' A visualizer module for Thinc '''%0Aimport seaborn%0Aimport matplotlib.pyplot as plt%0A%0A%0Adef visualize_attention(x, y, weights, layer='Encoder', self_attn=True):%0A '''%0A Visualize self/outer attention%0A Args:%0A x: sentence%0A y: sentence%0A ...
0a23dddae52c861ef8f359affc71c082e970c9a5
Create WhatsApp.py
WhatsApp.py
WhatsApp.py
Python
0.000003
@@ -0,0 +1,1034 @@ +from selenium import webdriver%0Afrom selenium.webdriver.support.ui import WebDriverWait%0Afrom selenium.webdriver.support import expected_conditions as EC%0Afrom selenium.webdriver.common.keys import Keys%0Afrom selenium.webdriver.common.by import By%0Aimport time%0A %0A# Replace below path with th...
927c9bcb0beab4f8fd6c2003573316906ad9dee3
add init file
__init__.py
__init__.py
Python
0.000002
@@ -0,0 +1,22 @@ +#!-*- coding:utf-8 -*-
1ab69075e39ad52674ffa52b86f64839f24d9016
Update merge person tool
project/apps/api/management/commands/merge_persons.py
project/apps/api/management/commands/merge_persons.py
Python
0.000001
@@ -0,0 +1,2331 @@ +from optparse import make_option%0A%0Afrom django.core.management.base import (%0A BaseCommand,%0A CommandError,%0A)%0A%0Afrom apps.api.models import (%0A Person,%0A Singer,%0A Director,%0A Arranger,%0A)%0A%0A%0Aclass Command(BaseCommand):%0A help = %22Merge selected singers by ...
0bcc7fa0b5ab0b59cdc5fdfeeae8ffa39ead72bc
Refactor PatternMachine to use private variables
nupic/data/pattern_machine.py
nupic/data/pattern_machine.py
# ---------------------------------------------------------------------- # Numenta Platform for Intelligent Computing (NuPIC) # Copyright (C) 2014, Numenta, Inc. Unless you have an agreement # with Numenta, Inc., for a separate license for this software code, the # following terms and conditions apply: # # This progra...
Python
0
@@ -1620,14 +1620,15 @@ elf. +_ n = n%0A - @@ -1648,16 +1648,17 @@ self. +_ num = nu @@ -1717,32 +1717,33 @@ (seed)%0A self. +_ patterns = dict( @@ -1943,32 +1943,33 @@ number in self. +_ patterns:%0A @@ -2016,24 +2016,25 @@ return self. +_ patterns%5Bnum @@ -2236,16 +2236,17 @@ %3E= self....
fee0bf6ab2fdeab8e81ca3f0381cdcc76454ee28
Add openai environment viewer
openai/environments_viewer.py
openai/environments_viewer.py
Python
0
@@ -0,0 +1,428 @@ +import gym%0A%0A# LunarLanderContinuous-v2%0A# BipedalWalker-v2%0A%0Aenv = gym.make('BipedalWalker-v2')%0A%0An_epsiodes = 20%0An_timesteps = 100%0Afor i_episode in range(n_epsiodes):%0A%09observation = env.reset()%0A%09for t in range(n_timesteps):%0A%09%09env.render()%0A%09%09print(observation)%0A%09...
17173e7688c7a544678086eb5081051e90b3510b
Make gui.util a package.
Cura/gui/util/__init__.py
Cura/gui/util/__init__.py
Python
0
@@ -0,0 +1,15 @@ +# coding=utf-8%0A
c2b75140bf01b8c8e57a4a835f7cae017b15a939
Fix config validation import to make things more readable
homeassistant/components/sensor/wunderground.py
homeassistant/components/sensor/wunderground.py
""" Support for Weather Underground weather service. For more details about this platform, please refer to the documentation at https://home-assistant.io/components/sensor.wunderground/ """ from datetime import timedelta import logging import requests import voluptuous as vol from homeassistant.helpers.entity import...
Python
0.000001
@@ -321,20 +321,22 @@ Entity%0A -from +import homeass @@ -372,36 +372,13 @@ ion -import (ensure_list, string) +as cv %0Afro @@ -2332,16 +2332,19 @@ I_KEY): +cv. string,%0A @@ -2374,16 +2374,19 @@ WS_ID): +cv. string,%0A @@ -2467,16 +2467,19 @@ vol.All( +cv. ensure_l
fd03d3c8a032e06ff2a84af48f6d23e3b3365695
Integrate LLVM at llvm/llvm-project@f011d32c3a62
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "3cd5696a33095fe41c8c63f933d239f2c0dbb36e" LLVM_SHA256 = "5d6e9211f9886586b20fc4c88e9c72833fa686212df82957f3d0b67a5c090d23" tf_http_archive( ...
Python
0.000001
@@ -160,133 +160,133 @@ = %22 -3cd5696a33095fe41c8c63f933d239f2c0dbb36e%22%0A LLVM_SHA256 = %225d6e9211f9886586b20fc4c88e9c72833fa686212df82957f3d0b67a5c090d23 +f011d32c3a625eb86d1e33a70100b0a031f5fcd4%22%0A LLVM_SHA256 = %22b3ec1a2253da80c473df9addacc6ff5b7cfc3a788043a1c59480a93fd0d6fe0e %22%0A%0A
8d473ee89ea43e5004b78314c0ca49cde0049980
Integrate LLVM at llvm/llvm-project@961fd77687d2
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "4004fb6453d9cee1fc0160d6ebac62fa8e898131" LLVM_SHA256 = "faec068929d9f039b3f65d8f074bfbee4d9bdc0829b50f7848b110f2bf7c3383" tf_http_archive( ...
Python
0.000001
@@ -160,133 +160,133 @@ = %22 -4004fb6453d9cee1fc0160d6ebac62fa8e898131%22%0A LLVM_SHA256 = %22faec068929d9f039b3f65d8f074bfbee4d9bdc0829b50f7848b110f2bf7c3383 +961fd77687d27089acf0a09ea29a87fb8ccd7522%22%0A LLVM_SHA256 = %227c225e465ae120daa639ca68339fe7f43796ab08ff0ea893579a067b8f875078 %22%0A%0A
0869a26cc061b86b31e7e5144bf90c276fa8c786
Add numpy_checkwiki.py
numpy_checkwiki.py
numpy_checkwiki.py
Python
0.000427
@@ -0,0 +1,664 @@ +#!/usr/bin/env python%0Aimport subprocess%0Aimport os, shutil, tempfile%0Afrom numpy_towiki import *%0A%0APATCH = os.path.join(DIR, 'wiki.patch')%0A%0Adef main():%0A regenerate_base_xml()%0A os.chdir(DIR)%0A%0A new_xml = tempfile.NamedTemporaryFile()%0A %0A if not os.path.isdir(SITE_PT...
728c4db461bdf22a668436ac25ca1cb9afb80e81
add argparse01.py
trypython/stdlib/argparse01.py
trypython/stdlib/argparse01.py
Python
0.004268
@@ -0,0 +1,1015 @@ +%22%22%22%0Aargparse %E3%83%A2%E3%82%B8%E3%83%A5%E3%83%BC%E3%83%AB%E3%81%AE%E3%82%B5%E3%83%B3%E3%83%97%E3%83%AB%E3%81%A7%E3%81%99%E3%80%82%0A%E5%9F%BA%E6%9C%AC%E7%9A%84%E3%81%AA%E4%BD%BF%E3%81%84%E6%96%B9%E3%81%AB%E3%81%A4%E3%81%84%E3%81%A6%E3%80%82%0A%0A%E5%8F%82%E8%80%83%EF%BC%9A http://bit.ly/2UX...