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
64921ef6d8aafe505efdc30d070c138c741eb38f
Create __init__.py
bigbench/benchmark_tasks/meta_hello_world/__init__.py
bigbench/benchmark_tasks/meta_hello_world/__init__.py
Python
0.000429
@@ -0,0 +1 @@ +%0A
c5e11ce40df5ecd99dfa33cceadc6696ba442084
version bump for pypi
exa/__init__.py
exa/__init__.py
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016, Exa Analytics Development Team # Distributed under the terms of the Apache License 2.0 ''' Exa ######### This package creates a systematic infrastructure for an ecosystem of packages, tailored to specific industry or academic displines, for organizing, processin...
Python
0
@@ -972,17 +972,17 @@ (0, 2, -5 +6 )%0D%0A__ver
ef70a530e9827e96f4984a9c51424cd50b2000cf
Create numbersinlists.py
udacity/numbersinlists.py
udacity/numbersinlists.py
Python
0.000004
@@ -0,0 +1,1695 @@ +# Numbers in lists by SeanMc from forums%0A# define a procedure that takes in a string of numbers from 1-9 and%0A# outputs a list with the following parameters:%0A# Every number in the string should be inserted into the list.%0A# If a number x in the string is less than or equal %0A# to the precedin...
ba09b09e7315cafa96e162a8186abe14c51c8128
Add a script to download files from url
python/download_file_from_url.py
python/download_file_from_url.py
Python
0
@@ -0,0 +1,880 @@ +import urllib2%0A'''%0AScript to download pdf from a url, you need specify the website URL, and change the %0Afilename in the loop, it mostly useful to download a sequence of files with the %0Afilename only differ by a sequence number, e.g. CH1.PDF, CH2.PDF, CH3.PDF ...%0A'''%0A%0Adef download_file(d...
69c01499e92808f2a513e695d09e58f55dcd569b
Update implement-rand10-using-rand7.py
Python/implement-rand10-using-rand7.py
Python/implement-rand10-using-rand7.py
# Time: O(1.199), counted by statistics, limit would be O(log10/log7) = O(1.183) # Space: O(1) # Given a function rand7 which generates a uniform random integer in the range 1 to 7, # write a function rand10 which generates a uniform random integer in the range 1 to 10. # # Do NOT use system's Math.random(). # # Exam...
Python
0.000002
@@ -7,17 +7,17 @@ : O(1.1 -9 +8 9), coun @@ -1134,45 +1134,10 @@ n = -19 # if n = 32, it would be O(1.189) +32 %0A
a83282f43fdf87bad8abc63c5a0b41f8c9053a5f
Add setup script
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,248 @@ +#!/usr/bin/python%0Afrom setuptools import setup%0Aimport sys%0Asys.path.insert(0, 'src')%0Afrom hszinc import __version__%0A%0Asetup (name = 'hszinc',%0A%09package_dir = %7B'': 'src'%7D,%0A version = __version__,%0A%09packages = %5B%0A 'hszinc',%0A %5D,%0A)%0A
60f6a83964b70700883121afb7aed22a7ffe7acc
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,502 @@ +from setuptools import setup%0A%0Asetup(%0A name='bfd',%0A version='0.1',%0A description='ML w/ Concord',%0A url='https://github.com/adi-labs/bfd',%0A author='Andrew Aday, Alan Du, Carlos Martin, Dennis Wei',%0A author_email='alanhdu@gmail.com',%0A license='Apache',%0A package...
68c0dd9d21a1de7c78f7df39d250f1714ff7c445
Deal with more cases of durations set in headers
apps/videos/types/htmlfive.py
apps/videos/types/htmlfive.py
# Amara, universalsubtitles.org # # Copyright (C) 2013-2015 Participatory Culture Foundation # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as # published by the Free Software Foundation, either version 3 of the # License, or (at ...
Python
0
@@ -784,16 +784,20 @@ ess, sys +, re %0Afrom vi @@ -882,16 +882,1574 @@ ame__)%0A%0A +def getDurationFromStreams(streams):%0A # this tries to get around most known cases%0A # of duration set with issues in headers%0A data = %7B%7D%0A durations = set()%0A index = None%0A for line in streams.splitlin...
525e0656f57b67744dfa5529687c5d40d3f43327
Add address/serializers.py
address/serializers.py
address/serializers.py
Python
0.000001
@@ -0,0 +1,392 @@ +# file: address/serializers.py%0A%0Afrom rest_framework import serializers%0Afrom address.models import ipv6_address, ipv4_address%0A%0A%0Aclass Ipv6AddressSerializer(serializers.ModelSerializer):%0A class Meta:%0A model = ipv6_address%0A fields = ('__all__')%0A%0Aclass Ipv6AddressSe...
66bb6c75017eddd952d43e7dc72004a05c9659b1
add test for kvmha_manager
nova/tests/kvmha/test_kvmha_manager.py
nova/tests/kvmha/test_kvmha_manager.py
Python
0
@@ -0,0 +1,1791 @@ +#%0A# KVM HA in OpenStack (Demo Version)%0A#%0A# Copyright HP, Corp. 2014%0A#%0A# Authors:%0A# Lei Li %3Cli.lei2@hp.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 may obt...
e08a1f1db582f34e36d695b32b2377fd7b73d9fe
Fix relative path handling in setup.py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import unicode_literals import re from os.path import join from setuptools import setup, find_packages RE_REQUIREMENT = re.compile(r'^\s*-r\s*(?P<filename>.*)$') PYPI_RST_FILTERS = ( # Replace code-blocks (r'\.\.\s? code-block::\s*(\w|\+)+', '::...
Python
0.000002
@@ -114,17 +114,26 @@ ort join +, dirname %0A - %0Afrom se @@ -512,16 +512,42 @@ ''),%0A)%0A%0A +ROOT = dirname(__file__)%0A%0A %0Adef rst @@ -730,16 +730,27 @@ = open( +join(ROOT, filename @@ -750,16 +750,17 @@ ilename) +) .read()%0A @@ -1022,32 +1022,38 @@ ne in open(join( +ROOT, 'requirements', @@ -13...
c05210b4557c56e7b7585ec22b27dd0f34f69f09
add a setup.py to make this a nice official package
setup.py
setup.py
Python
0
@@ -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 ...
4a92b178d6fe2138a70e5f4f9833d7697437561b
Add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,587 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup%0A%0A%0Asetup(%0A name='django_plim',%0A version='0.0.1',%0A author='iMom0',%0A author_email='mobeiheart@gmail.com',%0A description=('Introduce plim to django'),%0A license='BSD',%0A keywords='plim mako django slim',%0A u...
ba0e4042e25ec007df5766da16902cbeb55388f4
add setup.py
setup.py
setup.py
Python
0
@@ -0,0 +1,324 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup%0A%0Adef main():%0A setup(name = 'pyhpi',%0A version = '1.00',%0A description = 'Pure python HPI library',%0A author_email = 'michael.walle@kontron.com',%0A packages = %5B 'pyhpi',%0A %5D...
63faa61c35aafd658ced61ee95ed857a33eb398b
Add setup.py file
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,348 @@ +#!/usr/bin/env python%0A%0Afrom setuptools import setup, find_packages%0A%0Asetup(%0A name='django-bcrypt',%0A description=%22bcrypt password hash support for Django.%22,%0A version='0.1',%0A url='http://code.playfire.com/django-bcrypt',%0A%0A author='Playfire.com',%0A author_email=...
f830307dc9a904de7791fcdd8cb54020fa1c4977
update scipy version (#691)
setup.py
setup.py
# Copyright (c) 2015, Ecole Polytechnique Federale de Lausanne, Blue Brain Project # All rights reserved. # # This file is part of NeuroM <https://github.com/BlueBrain/NeuroM> # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are ...
Python
0
@@ -2050,11 +2050,11 @@ =0.1 -3.3 +7.0 ',%0A
52792b7a963af9c593e61c78c7f0c7f62550a85b
Update setup.py extra_requires
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from __future__ import absolute_import from __future__ import unicode_literals import codecs import logging import os import re import sys import pkg_resources from setuptools import find_packages from setuptools import setup def read(*parts): path = os.path.join(os...
Python
0
@@ -1311,16 +1311,145 @@ 4, %3C 2'%5D +,%0A ':python_version %3C %223.5%22': %5B'backports.ssl_match_hostname %3E= 3.5'%5D,%0A ':python_version %3C %223.3%22': %5B'ipaddress %3E= 1.0.16'%5D, %0A%7D%0A%0A%0Atry @@ -1738,58 +1738,52 @@ ' -Something went wrong calculating platform specific +Failed to compute p...
e2532bdbe28c8ee30391c67d2962357ce480cf52
Switch from PIL to pillow.
setup.py
setup.py
#!/usr/bin/env python """ Installation script: To release a new version to PyPi: - Ensure the version is correctly set in oscar.__init__.py - Run: python setup.py sdist upload """ from setuptools import setup, find_packages import os import sys from oscar import get_version PROJECT_DIR = os.path.dirname(__file__) ...
Python
0
@@ -1120,30 +1120,75 @@ elds -%0A 'PIL==1.1.7 +, Pillow is the %22friendly%22 PIL fork%0A 'pillow%3E=1.7.8,%3C2.0.0 ',%0A
b97cdbb63923ef3e28bbd329df1afb140f3a349f
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,665 @@ +from setuptools import setup, find_packages%0A%0Asetup(%0A name = 'mobula',%0A version = '1.0',%0A description = 'A Lightweight & Flexible Deep Learning (Neural Network) Framework in Python',%0A author = 'wkcn',%0A author_email = 'wkcn@live.cn',%0A url = 'htt...
0cd5bba6bddbc7b057ff18268e31d7eac50b2d2c
update setup.py
setup.py
setup.py
from setuptools import setup from setuptools.command.test import test as TestCommand class PyPackageTest(TestCommand): def initialize_options(self): TestCommand.initialize_options(self) self.pytest_args = ['--strict'] def finalize_options(self): TestCommand.finalize_options(self) ...
Python
0.000001
@@ -1,20 +1,31 @@ +import sys%0A from setuptools impo @@ -232,16 +232,25 @@ args = %5B +'tests', '--stric @@ -251,16 +251,22 @@ -strict' +, '-s' %5D%0A%0A d
29c2f663556d762167499d23921007f025738188
update setup.py
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Thanks to Kenneth Reitz, I stole the template for this import os import sys try: from setuptools import setup except ImportError: from distutils.core import setup PYTHON3 = sys.version_info[0] > 2 required = ['requests>=2.9', 'websocket-client==0.35.0', ...
Python
0.000001
@@ -275,17 +275,18 @@ ests%3E=2. -9 +12 ', 'webs @@ -305,10 +305,10 @@ ==0. -35 +40 .0', @@ -335,17 +335,17 @@ oup4==4. -4 +5 .1', 'ht @@ -361,16 +361,18 @@ .9999999 +99 ', 'pyfi @@ -381,17 +381,17 @@ et==0.7. -4 +5 ',%0A @@ -410,15 +410,14 @@ =201 -5.04.28 +6.9.26 '%5D%0Ai @@ -464,17 +464,17 @@ ib%3E...
a6e4f8bf2716eda79a27ec025399b18c76b3356a
Fix url
setup.py
setup.py
#!/usr/bin/env python from graphitepager import __version__ import os try: from setuptools import setup except ImportError: from distutils.core import setup def open_file(fname): return open(os.path.join(os.path.dirname(__file__), fname)) def run_setup(): setup( name='graphitepager', ...
Python
0.999531
@@ -515,31 +515,24 @@ hub.com/ -philipcristiano +seatgeek /graphit
b8c739f8befca266544d41d9ace34ae680fe5170
add setup.py
setup.py
setup.py
Python
0.000001
@@ -0,0 +1,387 @@ +#!/usr/bin/env python%0A%0Aimport os%0A%0ATHIS_DIR = os.path.dirname(os.path.realpath(__file__))%0ABIN_DIR = os.path.expanduser(%22~/bin%22)%0A%0Adef symlink_to_bin():%0A ln_src = os.path.join(THIS_DIR, %22webnull.py%22)%0A ln_dest = os.path.join(BIN_DIR, %22webnull%22)%0A if os.path.isfile(...
a03ddd7dc0aa1166e88f71910ece2cd909d7b6c7
Add setup.py to executably document package requirements
setup.py
setup.py
Python
0
@@ -0,0 +1,440 @@ +#!/usr/bin/env python%0Afrom setuptools import setup%0Asetup(%0A name='remoteobjects',%0A version='1.0',%0A description='an Object RESTational Model',%0A packages=%5B'remoteobjects'%5D,%0A package_dir=%7B'remoteobjects': '.'%7D,%0A%0A install_requires=%5B'simplejson%3E=2.0.0', 'http...
7046a54abc31ecc919c628bd197600ac09437989
Make dependency versions consistent.
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright 2016 Google Inc. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0...
Python
0.000008
@@ -1067,12 +1067,10 @@ %3E=1. -0.0b +1. 1'%0A%5D
6d0f54db9654ffa02accb5c557e4d4a5952d0ba0
Add a setup.py
setup.py
setup.py
Python
0.000006
@@ -0,0 +1,989 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Import python libs%0Aimport os%0Aimport sys%0A%0Aif 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules:%0A from setuptools import setup%0Aelse:%0A from distutils.core import setup%0A%0ANAME = 'pkgcmp'%0ADESC = ('Automate the crea...
9aabb59303d59287f1f29119a03c979ca0aeaefc
Bump version number to 0.10.1
setup.py
setup.py
from setuptools import setup, find_packages setup( name='idalink', description='An interface to the insides of IDA!', long_description=open('README.md').read(), version='0.10', url='https://github.com/zardus/idalink', license='GNU General Public License v3', packages=find_packages(), pa...
Python
0.00014
@@ -184,16 +184,18 @@ on='0.10 +.1 ',%0A u
72e907ade08aa92f2a816c7a1d6511d125204dbc
Update package description
setup.py
setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from setuptools import setup import re import os import sys name = 'djangorestframework-jwt' package = 'rest_framework_jwt' description = '' url = 'https://github.com/GetBlimp/django-rest-framework-jwt' author = 'Jose Padilla' author_email = 'jpadilla@getblimp.com' licen...
Python
0.000001
@@ -181,16 +181,77 @@ tion = ' +JSON Web Token based authentication for Django REST framework '%0Aurl =
4646873ec80076759c02deac7ff3c50665e31415
Update the PyPI version to 0.2.12
setup.py
setup.py
# -*- coding: utf-8 -*- import os from setuptools import setup def read(fname): try: return open(os.path.join(os.path.dirname(__file__), fname)).read() except: return '' setup( name='todoist-python', version='0.2.11', packages=['todoist', 'todoist.managers'], author='Doist Team...
Python
0
@@ -241,17 +241,17 @@ n='0.2.1 -1 +2 ',%0A p
380fd95d482af74f40ccc58dbf6238c691fa48f7
Version 1.0.8
setup.py
setup.py
#!/usr/bin/python # # Copyright 2014 Major Hayden # # 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 applicabl...
Python
0
@@ -690,9 +690,9 @@ 1.0. -7 +8 ',%0A
7efc61175c540a56b03e829ec917ce9efc1f06f9
Fix incorrect get_link_flags on Mac
tensorflow/python/platform/sysconfig.py
tensorflow/python/platform/sysconfig.py
# Copyright 2015 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0
@@ -2605,36 +2605,32 @@ flags.append('-l -:lib tensorflow_frame @@ -2640,14 +2640,8 @@ k.%25s -.dylib ' %25
14a96a82209f21ca468a4f765c514ffd68f30f31
add my little test script, 'cuz why not
plugins/python/test.py
plugins/python/test.py
Python
0
@@ -0,0 +1,836 @@ +#!/usr/bin/env python%0A#%0A# Copyright (C) 2005 David Trowbridge%0A#%0A# This program is free software; you can redistribute it and/or%0A# modify it under the terms of the GNU General Public License%0A# as published by the Free Software Foundation; either version 2%0A# of the License, or (at your op...
d22abe4ede958779a64c190bdd54451253eb2778
Add to model only if part of bunsen xxx
bunsenscrapper/spiders/bunsen.py
bunsenscrapper/spiders/bunsen.py
# -*- coding: utf-8 -*- import scrapy from bunsenscrapper.items import BunsenscrapperItem from scrapy.http.request import Request class BunsenSpider(scrapy.Spider): name = "bunsen" allowed_domains = ["bunsencomics.com"] start_urls = ( 'http://www.bunsencomics.com/?category=Bunsen+C%C3%B3mics', ...
Python
0
@@ -452,16 +452,44 @@ th('h1/a +%5Bcontains(text(), %22Bunsen%22)%5D /text()' @@ -620,16 +620,109 @@ tract()%0A +%09%09isLinkGood = sel.xpath('h1/a/@href').re('bunsen-%5Cd*$')%0A%09%09if isLinkGood and item%5B'title'%5D:%0A%09 %09%09yield
23df7b77cde8b5351cf2902b8b11ee07e4b478f4
Add a basic smoke test to check for exceptions and programming errors.
tests/smoke_test.py
tests/smoke_test.py
Python
0
@@ -0,0 +1,1198 @@ +# -*- coding: utf-8 -*-%0A%0Aimport unittest%0Aimport sys%0Asys.path.insert(0, '../mafia')%0A%0Afrom game import Game%0Afrom game import Player%0A%0Aclass TestMessenger:%0A def message_all_players(self, message: str):%0A print ('public: %7Bmessage%7D'.format(message=message))%0A%0A def ...
a1f1efe712205b3bd4702a7ae3d06aa3171ad32f
add missing file...
simuvex/plugins/uc_manager.py
simuvex/plugins/uc_manager.py
Python
0
@@ -0,0 +1,863 @@ +%0Aimport logging%0Al = logging.getLogger('simuvex.plugins.uc_manager')%0A%0Afrom .plugin import SimStatePlugin%0A%0Aclass SimUCManager(SimStatePlugin):%0A def __init__(self, man=None):%0A%0A SimStatePlugin.__init__(self)%0A%0A if man:%0A self._uc_region_base = man._uc_reg...
e33ce5f613c2a7bb9c2c42fba695ee37d3bb66ce
Add integration tests
tests/test_flask.py
tests/test_flask.py
Python
0
@@ -0,0 +1,759 @@ +from main import app%0Aimport pytest%0Aimport json%0A%0A%0A@pytest.fixture%0Adef client():%0A client = app.test_client()%0A%0A yield client%0A%0A%0Asites = %5B%0A %22/kwejk%22,%0A %22/jbzd%22,%0A %22/9gag%22,%0A %22/9gagnsfw%22,%0A %22/demotywatory%22,%0A %22/mistrzowie%22,%0A...
36a85fac06fd1bfe6934883f98b60edcbf3814be
Add test for scuba.utils.format_cmdline()
tests/test_utils.py
tests/test_utils.py
Python
0
@@ -0,0 +1,1338 @@ +from __future__ import print_function%0A%0Afrom nose.tools import *%0Afrom unittest import TestCase%0A%0Aimport logging%0Aimport shlex%0Afrom itertools import chain%0A%0Afrom .utils import *%0A%0Aimport scuba.utils%0A%0A%0Aclass TestUtils(TestCase):%0A%0A def _parse_cmdline(self, cmdline):%0A ...
424db0df3c8be8538d551bd6974a8eccee6e53cc
add tenki.py
tenki.py
tenki.py
Python
0.000162
@@ -0,0 +1,1259 @@ +import urllib.request%0D%0Aimport sys%0D%0Aimport numpy as np%0D%0A%0D%0Aurl=%22http://weather.is.kochi-u.ac.jp/sat/gms.fareast/%22%0D%0Aa=1%0D%0Ab=0%0D%0Ax = input(%22Please Enter Year You Want: %22)%0D%0Ay = input(%22And Enter Folder You Save File: %22) + %22/%22%0D%0Ac=%5B%5D%0D%0Afor ii in range...
d5250790d3509dfe4cbd1f507c83a92bef9614fe
Test cache instance.
tests.py
tests.py
Python
0
@@ -0,0 +1,1729 @@ +# -*- coding: utf-8 -*-%0A%0Aimport pytest%0A%0Afrom flask import Flask%0Afrom flask.ext.cacheobj import FlaskCacheOBJ, Msgpackable%0A%0Aapp = Flask(__name__)%0Acache = FlaskCacheOBJ()%0Acache.init_app(app)%0A%0A@pytest.fixture%0Adef app(request):%0A app = Flask(__name__)%0A ctx = app.app_con...
e87fb6fc09e70dbcd9c65d183c0addb1b290ffcf
Add test cases for Tradfri sensor platform (#64165)
tests/components/tradfri/test_sensor.py
tests/components/tradfri/test_sensor.py
Python
0
@@ -0,0 +1,2369 @@ +%22%22%22Tradfri sensor platform tests.%22%22%22%0A%0Afrom unittest.mock import MagicMock, Mock%0A%0Afrom .common import setup_integration%0A%0A%0Adef mock_sensor(state_name: str, state_value: str, device_number=0):%0A %22%22%22Mock a tradfri sensor.%22%22%22%0A dev_info_mock = MagicMock()%0A ...
5938881e939ce5088974489a943bd7d86925732f
Add unittest for inception
tests/functions_tests/test_inception.py
tests/functions_tests/test_inception.py
Python
0
@@ -0,0 +1,1590 @@ +import unittest%0A%0Aimport numpy%0A%0Aimport chainer%0Afrom chainer import cuda%0Afrom chainer import functions%0Afrom chainer import gradient_check%0Afrom chainer import testing%0Afrom chainer.testing import attr%0Afrom chainer.testing import condition%0A%0A%0Aif cuda.available:%0A cuda.init()%...
92a911a53158a89f0bd7f7e989de47f1854268ff
make ogvs for just one episode
dj/scripts/dv2ogv.py
dj/scripts/dv2ogv.py
#!/usr/bin/python # makes .ogv for all dv in a show import os import subprocess from process import process from main.models import Client, Show, Location, Episode, Raw_File, Cut_List class mkpreview(process): def one_dv(self,loc_dir,dv): src = os.path.join(loc_dir,dv.filename) dst = os.path...
Python
0
@@ -244,16 +244,44 @@ ir,dv):%0A + print dv.filename, %0A @@ -377,16 +377,51 @@ '.ogv')%0A + print os.path.exists(dst) %0A @@ -423,16 +423,17 @@ if +( not os.p @@ -447,16 +447,39 @@ sts(dst) +) or self.options.whack :%0A @@ -963,24 +963,26 @@ %0A + # pri...
36756dbd6b287f8dc6d5629027a8fe75d0f4bb09
Add Chuck Norris bot to the team
NorrisIsSoFunny_bot.py
NorrisIsSoFunny_bot.py
Python
0
@@ -0,0 +1,2154 @@ +import telegram%0A%0A%0ALAST_UPDATE_ID = None%0A%0A%0Adef main():%0A%0A ''' This is the main function that has to be called '''%0A%0A global LAST_UPDATE_ID%0A%0A # Telegram Bot Authorization Token%0A bot = telegram.Bot('put your token here')%0A%0A # This will be our global variable to...
924ef1395214c2f71b96c21f41e240c88f0570a1
Add project_security.xml file entry in update_xml section
addons/project/__terp__.py
addons/project/__terp__.py
{ "name" : "Project Management", "version": "1.0", "author" : "Tiny", "website" : "http://tinyerp.com/module_project.html", "category" : "Generic Modules/Projects & Services", "depends" : ["product", "account", 'mrp', 'sale', 'base'], "description": "Project management module that track multi-level projects, tas...
Python
0.000001
@@ -464,16 +464,19 @@ _xml%22: %5B +%0A%09%09 %22project @@ -483,24 +483,27 @@ _data.xml%22, +%0A%09%09 %22project_wiz @@ -508,24 +508,27 @@ izard.xml%22, +%0A%09%09 %22project_vie @@ -531,24 +531,27 @@ _view.xml%22, +%0A%09%09 %22project_rep @@ -560,16 +560,19 @@ t.xml%22, +%0A%09%09 %22project @@ -581,2...
c1a378adcfd4ccccc44b0c9272e84a765f61f88a
add import script for Selby
polling_stations/apps/data_collection/management/commands/import_selby.py
polling_stations/apps/data_collection/management/commands/import_selby.py
Python
0
@@ -0,0 +1,357 @@ +from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter%0A%0Aclass Command(BaseXpressDemocracyClubCsvImporter):%0A council_id = 'E07000169'%0A addresses_name = 'SelbyDemocracy_Club__04May2017.tsv'%0A stations_name = 'SelbyDemocracy_Club__04May2017.tsv'%0A electi...
821aa6a0130075183a9e8d1ca2d1f3c76ec6d977
Add coverage annotation
lib/python2.6/aquilon/aqdb/model/address_assignment.py
lib/python2.6/aquilon/aqdb/model/address_assignment.py
# ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*- # # Copyright (C) 2010,2011,2012 Contributor # # This program is free software; you can redistribute it and/or modify # it under the terms of the EU DataGrid Software License. You should # have received a copy of the li...
Python
0
@@ -1912,16 +1912,62 @@ t and_%0A%0A +from aquilon.exceptions_ import InternalError%0A from aqu @@ -6943,16 +6943,36 @@ network: + # pragma: no cover %0A @@ -6978,29 +6978,32 @@ raise -Value +Internal Error(%22Addre
76ea699d9b9ffd119f080e79b60d664133bfadbe
Fix trusts initliazation problem
senlin/api/middleware/trust.py
senlin/api/middleware/trust.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.000011
@@ -3033,36 +3033,43 @@ kay%0A -pass +trusts = %5B%5D %0A%0A if len
b01b2757e5bfd9835ce28e6d5e27137c7aa5075b
Add a small test script to call individual methods of a driver
tools/testdriver.py
tools/testdriver.py
Python
0
@@ -0,0 +1,2444 @@ +# -*- Mode: Python; coding: utf-8 -*-%0A# vi:si:et:sw=4:sts=4:ts=4%0A%0A##%0A## Copyright (C) 2007 Async Open Source %3Chttp://www.async.com.br%3E%0A## All rights reserved%0A##%0A## This program is free software; you can redistribute it and/or modify%0A## it under the terms of the GNU General Public...
fb08ad77a821d86a3049628d907577949d525dac
Add unittests to test environment.py methods
toolium/test/behave/test_environment.py
toolium/test/behave/test_environment.py
Python
0.000001
@@ -0,0 +1,1611 @@ +# -*- coding: utf-8 -*-%0Au%22%22%22%0ACopyright 2016 Telef%C3%B3nica Investigaci%C3%B3n y Desarrollo, S.A.U.%0AThis file is part of Toolium.%0A%0ALicensed under the Apache License, Version 2.0 (the %22License%22);%0Ayou may not use this file except in compliance with the License.%0AYou may obtain a...
032876577fa94e2d9ca668d6fe108d725696088b
add 20newsgroups/ml.py
20newsgroups/ml.py
20newsgroups/ml.py
Python
0
@@ -0,0 +1,1303 @@ +from __future__ import division, print_function, unicode_literals%0Aimport numpy%0Afrom sklearn.datasets import fetch_20newsgroups_vectorized%0Afrom sklearn.preprocessing import StandardScaler%0Afrom sklearn.naive_bayes import MultinomialNB%0Afrom sklearn.linear_model import SGDClassifier%0Afrom skl...
63a0a0347272b2ae19f9caa5200aca5c03d67bab
add userselfinfo
api/user.py
api/user.py
Python
0
@@ -0,0 +1,1313 @@ +#coding:utf-8%0Afrom flask import Flask%0Afrom . import app, jsonrpc%0Aimport json%0Afrom auth import auth_login%0A%0A%0A@jsonrpc.method('user.getinfo')%0A@auth_login%0Adef userselfinfo(auth_info, **kwargs):%0A username = auth_info%5B'username'%5D%0A fields = %5B'id','username','name','email'...
c43000d2f9ec20a1c0cdbbec86270d88acb36104
Add implementation of more generic store calls
bench_examples/sparqlstore.py
bench_examples/sparqlstore.py
Python
0
@@ -0,0 +1,453 @@ +from ktbs_bench.graph_store import GraphStore%0Aimport rdflib%0A%0Ardflib.plugin.register('BN', rdflib.store.Store, 'ktbs_bench.bnsparqlstore', 'SPARQLUpdateStore')%0A%0A%0Adef get_sparqlstore(query_endpoint, update_endpoint, identifier=%22http://localhost/generic_sparqlstore/%22):%0A triple_store...
a6c96caa1392868402be9f89db034ef664a12bda
Add open time range support.
utils.py
utils.py
Python
0
@@ -0,0 +1,1569 @@ +import datetime%0Aimport flask%0Aimport functools%0Afrom app import app%0A%0A# Use dateutil if available%0Atry:%0A from dateutil import parser as dateutil%0Aexcept ImportError:%0A dateutil = None%0A%0Aclass GameTime(object):%0A%0A @classmethod%0A def setup(cls):%0A %22%22%22Get start and end ...
70f48f8b72a49929ddba7908fd47175fd4c1685d
add yarn support (test failing)
autoload/thesaurus_query/backends/yarn_synsets_lookup.py
autoload/thesaurus_query/backends/yarn_synsets_lookup.py
Python
0
@@ -0,0 +1,1999 @@ +# Thesaurus Lookup routine for local synsets.csv file.%0A# Author: HE Chong %5B%5Bchong.he.1989@gmail.com%5D%5BE-mail%5D%5D%0A%0A'''%0ALookup routine for local mthesaur.txt file. When query_from_source is called, return:%0A %5Bstatus, %5B%5Bdef_0, %5Bsynonym_0, synonym_1, ...%5D%5D, %5Bdef_...
b036acb164bc0efce18299341b04a7acf226c7db
solve pep_745
pe-solution/src/main/python/pep_745.py
pe-solution/src/main/python/pep_745.py
Python
0.999978
@@ -0,0 +1,820 @@ +from collections import defaultdict%0A%0Afrom math import sqrt%0A%0AMODULO = 1_000_000_007%0A%0A%0Adef g_naive(n: int) -%3E int:%0A %22%22%22maximum perfect square that divides n.%22%22%22%0A upper = int(sqrt(n))%0A for i in range(0, upper):%0A sq = (upper - i) ** 2%0A if n %25...
a59d07a5bfb9f32c37242fd8ffb06d0409896485
add a welch periodogram tool
welch.py
welch.py
Python
0
@@ -0,0 +1,1444 @@ +#!/bin/env python%0A%0Aimport numpy as np%0Aimport scipy.signal as ss%0Aimport astropy.io.fits as fits%0Aimport matplotlib.pyplot as plt%0A%0A%0Ainpt = str(raw_input(%22Nome do Arquivo: %22))%0Alc = fits.open(inpt)%0Abin = float(raw_input(%22bin size (or camera resolution): %22))%0A%0A# Convert to b...
f204c881aabb07dbe6f04008e0637dc4430ae8c8
Add jon submission for problem 01
problem-01/submissions/jon.py
problem-01/submissions/jon.py
Python
0
@@ -0,0 +1,2527 @@ +from submission import Submission%0Aimport collections%0Aimport random%0A%0Aclass JonSubmission(Submission):%0A%0A def author(self):%0A return 'jon'%0A%0A def run(self, input):%0A%0A class Traveler(object):%0A%0A def __init__(self, graph, start_point):%0A ...
9999c27f5a6121d8488c14dd4a2b9843eef9cec9
Add merge migration
events/migrations/0030_merge.py
events/migrations/0030_merge.py
Python
0.000001
@@ -0,0 +1,346 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.10 on 2016-09-27 09:05%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('events', '0029_make_api_key_non_nullable'),%0A ('eve...
aa0e10116580ab013e911c2b14cf216a19716abd
Add schedule to static renderers
wafer/schedule/renderers.py
wafer/schedule/renderers.py
Python
0
@@ -0,0 +1,214 @@ +from django_medusa.renderers import StaticSiteRenderer%0A%0A%0Aclass ScheduleRenderer(StaticSiteRenderer):%0A def get_paths(self):%0A paths = %5B%22/schedule/%22, %5D%0A return paths%0A%0Arenderers = %5BScheduleRenderer, %5D%0A
51d3dee22c3c563b486038edcd9f18fa02b46448
Add new admin views to show how to use RBAC system
project/admin/views.py
project/admin/views.py
Python
0
@@ -0,0 +1,1297 @@ +from werkzeug.exceptions import HTTPException%0Afrom flask import Response, redirect%0Afrom flask_admin import BaseView, expose%0Afrom flask_admin.contrib.sqla import ModelView as DefaultModelView%0Afrom flask_login import login_required%0Afrom project.home.decorators import roles_required%0A%0A%0Ac...
68babe2de9a8204c46ad23e1c82dd0ff8fe44c94
Add a unittest on plot_figs module.
pyarm/tests/test_plot_figs.py
pyarm/tests/test_plot_figs.py
Python
0
@@ -0,0 +1,1350 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A# Copyright (c) 2010 J%C3%A9r%C3%A9mie DECOCK (http://www.jdhp.org)%0A%0Aimport unittest%0Aimport os%0Aimport sys%0A%0Adirname = os.path.dirname(__file__)%0Aif dirname == '':%0A dirname = '.'%0A%0Adirname = os.path.realpath(dirname)%0Aupdir = o...
f34fb2b060c7fd977ca50753c8c1c9d5beaf0516
return index at which acf drops below thresh
agent_model/acfanalyze.py
agent_model/acfanalyze.py
Python
0
@@ -0,0 +1,1920 @@ +__author__ = 'richard'%0A%0Aimport os%0Aimport numpy as np%0Aimport pandas as pd%0Afrom glob import glob%0Aimport statsmodels.tsa%0Aimport statsmodels.graphics.tsaplots%0Aimport matplotlib.pyplot as plt%0A%0Aplt.style.use('ggplot')%0A%0ATRAJECTORY_DATA_DIR = %22experimental_data/control_trajectories...
e3b5f7b0f47b1e7ad4ab024c76a270ba9e88aa02
add impala sqlalchemy resource function
blaze/sql.py
blaze/sql.py
from __future__ import absolute_import, division, print_function from .compute.sql import select from .data.sql import SQL, dispatch, first from .expr import Expr, TableExpr, Projection, Column, UnaryOp from .expr.scalar.core import Scalar from .compatibility import basestring from .api.resource import resource impo...
Python
0.000002
@@ -2220,20 +2220,186 @@ e, *args, **kwargs)%0A +%0A%0A@resource.register('impala://.*')%0Adef resource_sql(uri, table_name, *args, **kwargs):%0A import impala.sqlalchemy%0A return SQL(uri, table_name, *args, **kwargs)%0A
d952776a78901ecd20cb8e79cd00f5498e4b04be
Add generate anagrams
algo/generate_anagrams.py
algo/generate_anagrams.py
Python
0.999999
@@ -0,0 +1,159 @@ +import sys%0Aimport shuffle from random%0A%0Aword = list(sys.argv%5B1%5D)%0Aanagrams = %5B%5D%0A%0Afor i in range(10):%0A anagrams.append(''.join(shuffle(word)))%0A%0Aprint anagrams%0A
4d021acd89abc127d50e6bf82064bd7aac2bca1a
Solve compree the string with groupby
python/compress-the-string.py
python/compress-the-string.py
Python
0.999999
@@ -0,0 +1,145 @@ +from itertools import groupby%0A%0Astring = input()%0A%0Aprint(%22 %22.join(%5B%22(%7B%7D, %7B%7D)%22.format(len(list(group)), char) for char, group in groupby(string)%5D))%0A
cf3a1c26ab650ad2a87d4b4dcc6754c70abde802
Create compat.py
backend/compat.py
backend/compat.py
Python
0.000001
@@ -0,0 +1 @@ +%0A
f11ce837f0200d501c34c8fa7b2f5cfd149c18b6
Add db migrations
SMSFlyCRM/SMSApp/migrations/0002_auto_20160602_2034.py
SMSFlyCRM/SMSApp/migrations/0002_auto_20160602_2034.py
Python
0
@@ -0,0 +1,961 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.9.6 on 2016-06-02 20:34%0Afrom __future__ import unicode_literals%0A%0Aimport datetime%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('SMSApp', '0001_initial'),%0A %5...
86657d78f220345391dc764db22cd9f02903f3a9
Add tests
bluebottle/initiatives/tests/test_admin.py
bluebottle/initiatives/tests/test_admin.py
Python
0.000001
@@ -0,0 +1,1953 @@ +# -*- coding: utf-8 -*-%0A%0Afrom django.contrib.admin.sites import AdminSite%0Afrom django.urls.base import reverse%0A%0Afrom bluebottle.initiatives.admin import InitiativeAdmin%0Afrom bluebottle.initiatives.models import Initiative%0Afrom bluebottle.initiatives.tests.factories import InitiativeFac...
a383d1220c31f153a5519e4aab4703db2b71ef53
Add initial version of season goal leader retrieval
analysis/_goal_leaders.py
analysis/_goal_leaders.py
Python
0
@@ -0,0 +1,1478 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport requests%0Afrom lxml import html%0A%0A%0ASEASON_URL_TEMPLATE = %22http://www.hockey-reference.com/leagues/NHL_%25d.html%22%0ACAREER_GOAL_LEADERS_URL = %22http://www.hockey-reference.com/leaders/goals_career.html%22%0A%0A%0Aseason_goal_leade...
10ce581d1ecbba29913982a56f32c3d93a1b54fe
Add Python benchmark
lib/node_modules/@stdlib/math/base/special/gamma/benchmark/python/benchmark.py
lib/node_modules/@stdlib/math/base/special/gamma/benchmark/python/benchmark.py
Python
0.000138
@@ -0,0 +1,1558 @@ +#!/usr/bin/env python%0A%22%22%22Benchmark gamma.%22%22%22%0A%0Afrom __future__ import print_function%0Aimport timeit%0A%0ANAME = %22gamma%22%0AREPEATS = 3%0AITERATIONS = 1000000%0A%0A%0Adef print_version():%0A %22%22%22Print the TAP version.%22%22%22%0A print(%22TAP version 13%22)%0A%0A%0Adef...
66328709459b2217b3c964848a363c4f3b1cdf5e
Add Python benchmark
lib/node_modules/@stdlib/math/base/special/trunc/benchmark/python/benchmark.py
lib/node_modules/@stdlib/math/base/special/trunc/benchmark/python/benchmark.py
Python
0.000138
@@ -0,0 +1,1561 @@ +#!/usr/bin/env python%0A%22%22%22Benchmark trunc.%22%22%22%0A%0Afrom __future__ import print_function%0Aimport timeit%0A%0ANAME = %22trunc%22%0AREPEATS = 3%0AITERATIONS = 1000000%0A%0A%0Adef print_version():%0A %22%22%22Print the TAP version.%22%22%22%0A print(%22TAP version 13%22)%0A%0A%0Adef...
37b175b6a6ac3f0fd7fdaa5c2ed6435c159a29c2
Add py solution for 553. Optimal Division
py/optimal-division.py
py/optimal-division.py
Python
0.000072
@@ -0,0 +1,1611 @@ +from fractions import Fraction%0Aclass Solution(object):%0A def optimalDivision(self, nums):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :rtype: str%0A %22%22%22%0A min_result, max_result = dict(), dict()%0A min_offset, max_offset = dict(), dict()%0A ...
e14c4f1aeb15491ecbf2981527e2409ab3e82653
Test for BuildQuerySet.concurrent logic
readthedocs/builds/tests/test_build_queryset.py
readthedocs/builds/tests/test_build_queryset.py
Python
0
@@ -0,0 +1,2353 @@ +import pytest%0A%0Aimport django_dynamic_fixture as fixture%0Afrom django.conf import settings%0A%0Afrom readthedocs.builds.querysets import BuildQuerySet%0Afrom readthedocs.builds.models import Build, Version%0Afrom readthedocs.projects.models import Project, Feature%0A%0A%0A@pytest.mark.django_db%...
4c428b78f9bf4d5f044a23921a6f29df34c93753
add python process pool example
python/process_pool.py
python/process_pool.py
Python
0.000001
@@ -0,0 +1,189 @@ +#!/usr/bin/env python3%0A# -*- coding: utf-8 -*-%0A%0Afrom multiprocessing import Pool%0A%0Adef worker(a):%0A print(a)%0A%0Aif __name__ == %22__main__%22:%0A p = Pool(10)%0A p.map(worker, range(0, 1000))%0A
f75bb5319884e9ce9fa36326b1dbd686aeb6add1
use loc='best'
crystal/plot.py
crystal/plot.py
"""Plotting functions for Clusters.""" import matplotlib.pyplot as plt import numpy as np import seaborn as sns def logit(a): return np.log(a / (1 - a)) def ilogit(m): return 1.0 / (1 + np.exp(-m)) sns.set(style="white", context="talk") colors = sns.color_palette("Set1", 8) def _plot_continuous(feature, var, ax): ...
Python
0.000511
@@ -1815,16 +1815,26 @@ .legend( +loc=%22best%22 )%0A re
565dab9ae60d6c7fa92d3385ef4515933850d4a0
Create __init__.py
rdc_16/__init__.py
rdc_16/__init__.py
Python
0.000429
@@ -0,0 +1,1032 @@ +%0A# -*- coding: utf-8 -*-%0A##############################################################################%0A#%0A# Author: Gideoni Silva (Omnes)%0A# Copyright 2013-2014 Omnes Tecnologia%0A#%0A# This program is free software: you can redistribute it and/or modify%0A# it under the terms o...
1199bba46cc16ec1285ab9d58fa1c74e9061f874
Create PedidoDeletar.py
backend/Models/Predio/PedidoDeletar.py
backend/Models/Predio/PedidoDeletar.py
Python
0
@@ -0,0 +1,328 @@ +from Framework.Pedido import Pedido%0Afrom Framework.ErroNoHTTP import ErroNoHTTP%0A%0Aclass PedidoDeletar(Pedido):%0A%0A%09def __init__(self,variaveis_do_ambiente):%0A%09%09super(PedidoDeletar, self).__init__(variaveis_do_ambiente)%0A%09%09try:%0A%09%09%09self.id = self.corpo%5B'id'%5D%09%09%09%0A%0...
8561fba46509db7f74f9770d71dd0ba41e4cb594
Add bids.ext namespace package for subpackages
bids/ext/__init__.py
bids/ext/__init__.py
Python
0
@@ -0,0 +1,65 @@ +__path__ = __import__('pkgutil').extend_path(__path__, __name__)%0A
a75b7cf5634e580b78c5f4cad9255735982b51d1
bump to 0.9.3
billy/__init__.py
billy/__init__.py
__version__ = '0.9.2' from billy.conf import settings class LazyDb(object): def __init__(self): self._db = None def __getattr__(self, attr): if not self._db: import pymongo host = settings.MONGO_HOST port = settings.MONGO_PORT db_name = sett...
Python
0.000008
@@ -16,9 +16,9 @@ 0.9. -2 +3 '%0A%0Af
ac9bcdea0ece3e34943471336499f42213ef5c47
Create zinnia_markitup module
zinnia_markitup/__init__.py
zinnia_markitup/__init__.py
Python
0
@@ -0,0 +1,38 @@ +%22%22%22MarkItUp for Django-blog-zinnia%22%22%22%0A
d61fc5b219186824b8b198c5a4679602372039da
Create leapBasic.py
home/Alessandruino/leapBasic.py
home/Alessandruino/leapBasic.py
Python
0.000001
@@ -0,0 +1,155 @@ +leap = Runtime.start(%22leap%22,%22LeapMotion%22)%0A %0Aleap.addLeapDataListener(python)%0A %0Adef onLeapData(data):%0A print (data.rightHand.index)%0A %0Aleap.startTracking()%0A
c25c0a9942345ed46d8091f7705cb26bbb21dfe5
add plugin test cases
tests/plugin.py
tests/plugin.py
Python
0.000001
@@ -0,0 +1,500 @@ +#%0A# Copyright (C) 2017 Satoru SATOH %3Csatoru.satoh @ gmail.com%3E%0A# License: MIT%0A#%0A# pylint: disable=missing-docstring,invalid-name%0Afrom __future__ import absolute_import%0A%0Aimport os.path%0Aimport os%0Aimport unittest%0A%0Aimport anyconfig%0A%0A%0A_CURDIR = os.path.dirname(__file__)%0A%...
c4bad78b508369e7ef1c682114c0b04340ed371b
Create an abstract Player class
Player.py
Player.py
Python
0.000063
@@ -0,0 +1,1467 @@ +from abc import ABCMeta, abstractmethod%0Afrom Dice import Dice%0A%0Aclass Player(object):%0A %22%22%22An abstract Dudo player%22%22%22%0A%0A __metaclass__ = ABCMeta%0A%0A def __init__(self, name):%0A self._name = name%0A # Create a set of five dice%0A self._diceset = s...
a9ec0b508f9d59d0c920a53141d25de0d6eb1c5f
work in progress
make_lessons.py
make_lessons.py
Python
0.000005
@@ -0,0 +1,546 @@ +# -*- coding: utf-8 -*-%0Aimport sys%0A%0Adef make_lesson():%0A arg = sys.argv%5B1%5D%0A f = open(arg)%0A text = %22%22%0A count = 0%0A for line in f:%0A text += line%0A count += 1%0A if count %3E 9:%0A count = 0%0A text = clean(text)%0A ...
54afce985f7f24e74cd5796e12e3c5f2c4616590
Add Python script to generate (huge) test dumps.
etc/gen-test-dump.py
etc/gen-test-dump.py
Python
0
@@ -0,0 +1,2301 @@ +#!/usr/bin/env python%0A%0Aimport random%0A%0A%0AWORLDS = %5BNone%5D * 8 + %5B'world', 'world_nether', 'creative', 'hardcore'%5D%0A%0AREGIONS = %5BNone%5D * 20 + %5B'Region%25d' %25 i for i in range(10)%5D%0A%0ANUM_PLAYERS = 100%0A%0ANUM_PERMISSIONS_PER_PLAYER = 50%0A%0ANUM_GROUPS = (3, 13, 23, 31, ...
f264a4a15682467549326cc530c152f647bf7832
Add a convenience python script to inline the imports of a file.
replace_imports.py
replace_imports.py
Python
0
@@ -0,0 +1,2469 @@ +from __future__ import with_statement%0D%0Aimport os%0D%0A%0D%0Afile_contents = %7B%7D%0D%0Afile_imports = %7B%7D%0D%0A%0D%0Adef get_file(file_name):%0D%0A if file_name%5B-2:%5D != '.v': file_name += '.v'%0D%0A if file_name not in file_contents.keys():%0D%0A print(file_name)%0D%0A ...
fa067ee22e89111848536c7fa9396575a8f31ac6
add testhttp.py.
examples/testhttp.py
examples/testhttp.py
Python
0
@@ -0,0 +1,89 @@ +from pythymiodw import ThymioReal%0A%0At = ThymioReal()%0At.wheels(100,100)%0At.sleep(1)%0At.quit()
5c40193fe8bce5601190223503d27e73cb8dff39
Create zip.py
exer/zipunzip/zip.py
exer/zipunzip/zip.py
Python
0.000003
@@ -0,0 +1,1230 @@ +def zip(*arg):%0A Result = %5B%5D%0A Check = 1%0A #check if every item in arg has the same length%0A for i in arg:%0A if len(i) != len(arg%5B0%5D):%0A print 'please make sure enter all items with the same length'%0A Check = 0%0A break%0A while (...
6701b9001b85b440f1cea8bdca5f93fb9abbf9b8
Add buzzer1 script(node)
scripts/buzzer1.py
scripts/buzzer1.py
Python
0
@@ -0,0 +1,74 @@ +#!/usr/bin/env python%0Aimport rospy%0Arospy.init_node('buzzer')%0Arospy.spin()%0A
963c0479b22e1cc142b015b5afdccfb8c35aa4b6
Add initial SD cog
cogs/diffusion.py
cogs/diffusion.py
Python
0.000001
@@ -0,0 +1,2759 @@ +import asyncio%0Aimport backoff%0A%0Afrom typing import Any, Literal%0Afrom discord import Embed%0Afrom discord.ext import commands%0Afrom aiohttp import ClientResponseError%0Afrom bot import QTBot%0Afrom utils.custom_context import CustomContext%0A%0A%0Aclass DiffusionError(Exception):%0A pass%0...
01c619826a32a78c121b1ded0c6c5cf3195a0cfe
refactor currency
storemanage/models/Currency.py
storemanage/models/Currency.py
Python
0.999995
@@ -0,0 +1,433 @@ +from django.db import models%0Afrom django.contrib.auth.models import User%0Afrom django.contrib.postgres.fields import JSONField%0A%0A# Create your models here.%0A%0Aclass Currency(models.Model):%0A name = models.CharField(max_length=30)%0A store = models.ForeignKey(User, on_delete=models.CASC...
cdefa248cb481f8b8a676fd674a4290f95d15145
Add tool to fix MP4 file timestamp from GPMF GPS clock
fix_mp4_timestamp.py
fix_mp4_timestamp.py
Python
0
@@ -0,0 +1,2456 @@ +#!/usr/bin/env python3%0Aimport datetime%0Aimport shutil%0A%0Aimport gpmf.extract%0Aimport gpmf.parse%0Aimport hachoir.editor%0Aimport hachoir.parser%0Aimport hachoir.stream%0Afrom hachoir.field import MissingField%0A%0A%0Adef locate_fields_by_subpath(parser, subpath):%0A %22%22%22Locate mp4 fiel...
8103632a7acc080e8a9d108c047acffa2539c4b9
solve factorial problem
graph/2/factorial.py
graph/2/factorial.py
Python
0.99882
@@ -0,0 +1,178 @@ +def factorial(n):%0A if n %3C= 1:%0A return 1%0A return n * factorial(n - 1)%0A%0A%0Aif __name__ == %22__main__%22:%0A n = raw_input(%22n: %22)%0A print %22result is:%22, factorial(int(n))%0A
08e52c671ef405c34e532f1ca29e7fc2ee6892d9
Add python script that should submit to view.cwl API
viewcwl-json.py
viewcwl-json.py
Python
0
@@ -0,0 +1,2582 @@ +#!/usr/bin/env python%0A%0Aimport fnmatch%0Aimport requests%0Aimport time%0Aimport os%0Aimport glob%0A%0A# You can alternatively define these in travis.yml as env vars or arguments%0ABASE_URL = 'https://view.commonwl.org'%0AWORKFLOW_PATH = '/workflows/workflow.cwl'%0A%0A#get the cwl in l7g/cwl-versi...
af6b04531ebbb0d86bf0177f30e7691221e2b17e
fix date citation for gob's
boltons/easterutils.py
boltons/easterutils.py
# -*- coding: utf-8 -*- def gobs_program(): """ A pure-Python implementation of Gob's Algorithm (2013). A brief explanation can be found here: https://www.youtube.com/watch?v=JbnjusltDHk """ while True: print "Penus", if __name__ == '__main__': gobs_program()
Python
0.000007
@@ -106,10 +106,10 @@ (20 -13 +06 ). A
caf0ea95a03b06e09e640799a1f0d959658373ab
Create email.py
models/email.py
models/email.py
Python
0.000002
@@ -0,0 +1,606 @@ +import smtplib%0A %0A# Credenciais%0Aremetente = 'seu-email@gmail.com'%0Asenha = 'sua-senha'%0A %0A# Informa%C3%A7%C3%B5es da mensagem%0Adestinatario = 'email-do-destinatario@qualquercoisa.com'%0Aassunto = 'Enviando email com python'%0Atexto = 'Esse email foi enviado usando pyth...
a11b064622f8dd56f76828f396d29072ece50ab9
Add Python benchmark
lib/node_modules/@stdlib/math/base/special/erfcinv/benchmark/python/benchmark.scipy.py
lib/node_modules/@stdlib/math/base/special/erfcinv/benchmark/python/benchmark.scipy.py
Python
0.000138
@@ -0,0 +1,1547 @@ +#!/usr/bin/env python%0A%22%22%22Benchmark scipy.special.erfcinv.%22%22%22%0A%0Aimport timeit%0A%0Aname = %22erfcinv%22%0Arepeats = 3%0Aiterations = 1000000%0A%0A%0Adef print_version():%0A %22%22%22Print the TAP version.%22%22%22%0A%0A print(%22TAP version 13%22)%0A%0A%0Adef print_summary(tota...
4582d020ec6fe8ef6035fc4a4de484f557f2d026
Add 025
python/025_reverse_nodes_in_k_group.py
python/025_reverse_nodes_in_k_group.py
Python
0.999153
@@ -0,0 +1,1463 @@ +%22%22%22%0AGiven a linked list, reverse the nodes of a linked list k at a time and return%0Aits modified list.%0A%0AIf the number of nodes is not a multiple of k then left-out nodes in the end%0Ashould remain as it is.%0A%0AYou may not alter the values in the nodes, only nodes itself may be changed...
6e44d244a11664798be24a88681f37aad9b0329e
add url
backend-api/image_api/authapp/urls.py
backend-api/image_api/authapp/urls.py
Python
0.000013
@@ -0,0 +1,154 @@ +# config: utf-8%0Afrom rest_framework import routers%0Afrom .views import *%0A%0Arouter = routers.DefaultRouter()%0Arouter.register(r'faceimage', FaceImageViewSet)%0A
48bfe2d20cca35885ad0a460679d0a951d0c584e
Add spider for Giant Eagle
locations/spiders/gianteagle.py
locations/spiders/gianteagle.py
Python
0.00064
@@ -0,0 +1,2823 @@ +# -*- coding: utf-8 -*-%0Aimport json%0Aimport re%0A%0Aimport scrapy%0Afrom locations.items import GeojsonPointItem%0Afrom locations.hours import OpeningHours%0A%0A%0ADAY_MAPPING = %7B%0A 1: %22Su%22,%0A 2: %22Mo%22,%0A 3: %22Tu%22,%0A 4: %22We%22,%0A 5: %22Th%22,%0A 6: %22Fr%22,%0...