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
2460bd91632da0e6b02e0faf379fe27b273575bc
Add rotate.py
rotate.py
rotate.py
Python
0.000004
@@ -0,0 +1,72 @@ +%22%22%22Funtion to rotate image 90 degress.%22%22%22%0A%0A%0Adef rotate(matrix):%0A pass
7a068872a071af2e60bf24ca7a00b3f1e999f139
add request builder
builders.py
builders.py
Python
0
@@ -0,0 +1,1565 @@ +# -*- coding: utf-8 -*-%0A%0Aimport json%0A%0A%0Aclass PostBuilder(object):%0A%0A def __init__(self):%0A self.parameters = %7B%0A 'title': '',%0A 'body': '',%0A 'coediting': False,%0A 'gist': False,%0A 'private': False,%0A '...
857a5cb7effa03e9cd700fa69ae4d3b231212754
Create business.py
business.py
business.py
Python
0.000003
@@ -0,0 +1,144 @@ +# business logic here%0A# - account managing%0A# - create%0A# - edit%0A# - delete%0A# - payment data -%3E tokens%0A# - scripts running%0A# - statistics%0A
4a45256b614ebf8a8455562b63c1d50ec1521c71
add a test class for auth.py
BigStash/t/test_auth.py
BigStash/t/test_auth.py
Python
0.000002
@@ -0,0 +1,958 @@ +from mock import Mock%0Afrom testtools.matchers import Contains%0Afrom testtools import TestCase%0A%0A%0Aclass AuthTest(TestCase):%0A def setUp(self):%0A super(AuthTest, self).setUp()%0A%0A def tearDown(self):%0A super(AuthTest, self).tearDown()%0A%0A def _makeit(self, *args, *...
c212d1c25095f3b6e2f88cfccdc5c49280b22be0
Add test for tilequeue changes related to #1387.
integration-test/1387-business-and-spur-routes.py
integration-test/1387-business-and-spur-routes.py
Python
0
@@ -0,0 +1,511 @@ +from . import FixtureTest%0A%0A%0Aclass BusinessAndSpurRoutes(FixtureTest):%0A%0A def test_first_capitol_dr_i70_business(self):%0A self.load_fixtures(%5B%0A 'https://www.openstreetmap.org/relation/1933234',%0A %5D)%0A%0A # check that First Capitol Dr, part of the ab...
672210c3af1a1b56a145b5265e5f316a1f6f36df
Add test folder
py3utils/test/__init__.py
py3utils/test/__init__.py
Python
0
@@ -0,0 +1 @@ +%0A
7ec15caf8f2c9d0a21581261a356f6decc548061
Add some basic UI tests
test/ui_test.py
test/ui_test.py
Python
0.000001
@@ -0,0 +1,589 @@ +from app import app%0Aimport unittest%0A%0Aclass UiTestCase(unittest.TestCase):%0A def setUp(self):%0A self.app = app.test_client()%0A%0A def test_index(self):%0A self.assertEqual(self.app.get('/').status_code, 200)%0A%0A def test_no_page(self):%0A self.assertEqual(self....
59cc25693f2185ddfe36370d7f6641b2795d4798
Test File Upload
ladybug/test.py
ladybug/test.py
Python
0.000001
@@ -0,0 +1,39 @@ +import epw%0Afrom comfort.pmv import PMV%0A
d1b2d330d2a43814d89c7f17a347e425c434957d
Add Eoin's resampling function.
pyrate/tools/resampler.py
pyrate/tools/resampler.py
Python
0.000001
@@ -0,0 +1,1171 @@ +import pandas as pd%0Aimport numpy%0A%0A# Does the resampling%0A# Called internally, one of the wrapper functions should be called if its needed%0A######################%0Adef convert_messages_to_hourly_bins(df,period='H',fillnans=False,run_resample=True):%0A%0A if df.empty:%0A ret...
c9ef02e2c8c48affed869bbbd9649ebfaded0143
fix login
src/son_editor/app/__main__.py
src/son_editor/app/__main__.py
''' Created on 18.07.2016 @author: Jonas ''' import logging import urllib from os import path from sys import platform from flask import Flask, session from flask.globals import request from flask_restplus import Api from son_editor import apis from son_editor.app.database import db_session, init_db, scan_workspaces...
Python
0.000002
@@ -2300,24 +2300,75 @@ ogged_in():%0A + if request.endpoint == 'login':%0A return%0A if reque @@ -2707,17 +2707,8 @@ in %5B -'login', 'sta
3b064d6933ef7e910fab5634420358562866f1bc
Add test
tests/test_camera.py
tests/test_camera.py
Python
0.000005
@@ -0,0 +1,884 @@ +# coding: utf-8%0Afrom __future__ import unicode_literals%0Aimport unittest%0Aimport tempfile%0Aimport shutil%0A%0Afrom flask import Flask%0Afrom pitools import camera%0A%0Aapp = Flask(__name__)%0Aapp.register_blueprint(camera.blueprint)%0A%0A%0Aclass CameraTestCase(unittest.TestCase):%0A%0A def s...
7ddfb39256229aa8c985ed8d70a29479187c76ad
Create script for beta invites
lily/management/commands/generate_beta_invites.py
lily/management/commands/generate_beta_invites.py
Python
0
@@ -0,0 +1,2338 @@ +import csv%0Aimport gc%0Aimport logging%0Afrom datetime import date%0Afrom hashlib import sha256%0A%0Afrom django.conf import settings%0Afrom django.core.files.storage import default_storage%0Afrom django.core.management import call_command%0Afrom django.core.management.base import BaseCommand%0Afro...
5bc089a98bf578fd0c56e3e50cf76888ee74aba2
Add py solution for 537. Complex Number Multiplication
py/complex-number-multiplication.py
py/complex-number-multiplication.py
Python
0.000635
@@ -0,0 +1,465 @@ +import re%0Aclass Solution(object):%0A def complexNumberMultiply(self, a, b):%0A %22%22%22%0A :type a: str%0A :type b: str%0A :rtype: str%0A %22%22%22%0A pat = re.compile(r'(-?%5Cd+)%5C+(-?%5Cd+)i')%0A mata = pat.match(a)%0A matb = pat.match(...
400ad736a271946569efa438e8fc9d00a7ce0075
test for #22
tests/test_issues.py
tests/test_issues.py
Python
0.000001
@@ -0,0 +1,1835 @@ +from tgbot import plugintest%0Afrom tgbot.botapi import Update%0Afrom test_plugin import TestPlugin%0A%0A%0Aclass TestPluginTest(plugintest.PluginTestCase):%0A def setUp(self):%0A self.plugin = TestPlugin()%0A self.bot = self.fake_bot(%0A '',%0A plugins=%5Bself...
06e82c471afa83bf0f08f0779b32dd8a09b8d1ba
Add py solution for 350. Intersection of Two Arrays II
py/intersection-of-two-arrays-ii.py
py/intersection-of-two-arrays-ii.py
Python
0.001158
@@ -0,0 +1,297 @@ +from collections import Counter%0Aclass Solution(object):%0A def intersect(self, nums1, nums2):%0A %22%22%22%0A :type nums1: List%5Bint%5D%0A :type nums2: List%5Bint%5D%0A :rtype: List%5Bint%5D%0A %22%22%22%0A c1, c2 = Counter(nums1), Counter(nums2)%0A ...
742e827178ee28663699acbb4a5f0ad5440649fc
add new keyboard_locks module
py3status/modules/keyboard_locks.py
py3status/modules/keyboard_locks.py
Python
0.000001
@@ -0,0 +1,2956 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0AMonitor CapsLock, NumLock, and ScrLock keys%0A%0ANumLock: Allows the user to type numbers by pressing the keys on the number pad,%0Arather than having them act as up, down, left, right, page up, end, and so forth.%0A%0ACapsLock: When enabled, letters the user ty...
9d7c348170fc0f9d339a2ef57a9e64b1ceaa7516
Add demo MNH event scraper
web/whim/core/scrapers/mnh.py
web/whim/core/scrapers/mnh.py
Python
0
@@ -0,0 +1,2891 @@ +from datetime import datetime, timezone, time%0A%0Aimport requests%0Afrom bs4 import BeautifulSoup%0A%0Afrom django.db import transaction%0A%0Afrom .base import BaseScraper%0Afrom .exceptions import ScraperException%0A%0Afrom whim.core.models import Event, Source, Category%0Afrom whim.core.utils imp...
0f208d6b08968c779bd3aafa6e43763419eb117b
fix mac builds
gyp/debugger.gyp
gyp/debugger.gyp
{ 'targets': [ { 'target_name': 'debugger', 'type': 'executable', 'include_dirs' : [ '../src/core', '../debugger', # To pull SkDebugger.h '../debugger/QT', # For all the QT UI Goodies '../src/gpu', # To pull gl/GrGLUtil.h ], 'sources': [ '../de...
Python
0.000001
@@ -2392,24 +2392,81 @@ h != 64', %7B%0A +# this is now mysteriously triggered for all mac builds%0A# 'e
423554349177a5c8ed987f249b13fac9c8b8d79a
Add links to upgrade actions in the change log
gen-changelog.py
gen-changelog.py
# Writes a changelog in trac WikiFormatting based on a git log from __future__ import unicode_literals, division, absolute_import import codecs from itertools import ifilter import os import re import subprocess import sys import dateutil.parser out_path = 'ChangeLog' if len(sys.argv) > 1: dir_name = os.path.dir...
Python
0
@@ -240,16 +240,73 @@ l.parser +%0Aimport requests%0A%0Afrom flexget.utils.soup import get_soup %0A%0Aout_pa @@ -545,16 +545,123 @@ rgv%5B1%5D%0A%0A +ua_response = requests.get('http://flexget.com/wiki/UpgradeActions')%0Aua_soup = get_soup(ua_response.text)%0A%0A # 1.0.32 @@ -1326,16 +1326,255 @@ if tag:%0A + ...
35b1fc5e43f553e95ad4c8a42c37ca66639d9120
add test for core.py
HARK/tests/test_core.py
HARK/tests/test_core.py
Python
0
@@ -0,0 +1,371 @@ +%22%22%22%0AThis file implements unit tests for interpolation methods%0A%22%22%22%0Afrom HARK.core import HARKobject%0A%0Aimport numpy as np%0Aimport unittest%0A%0Aclass testHARKobject(unittest.TestCase):%0A def setUp(self):%0A self.obj_a = HARKobject()%0A self.obj_b = HARKobject()%0...
be17fa5026fd7cd64ccfc6e7241137a3f864725b
add google doc generator
generate_gpad.py
generate_gpad.py
Python
0
@@ -0,0 +1,1087 @@ +import httplib2%0Aimport webbrowser%0A%0Afrom apiclient.discovery import build%0Afrom oauth2client import client %0A%0Aflow = client.flow_from_clientsecrets(%0A 'client_secret.json',%0A scope=%5B'https://www.googleapis.com/auth/drive.file',%0A 'https://www.googleapis.c...
f9e6176bc43262882a0d50f4d850c04c3460b9d8
Add SS :-)
rna_pdb_tools/SecondaryStructure.py
rna_pdb_tools/SecondaryStructure.py
Python
0
@@ -0,0 +1,783 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A%22%22%22Seq and secondary structure prediction%22%22%22%0A%0Aimport os%0Aimport tempfile%0Aimport shutil%0A%0AVARNA_PATH = '/Users/magnus/skills/rnax/varna_tut/'%0A%0Adef draw_ss(title,seq, ss, img_out):%0A %22%22%22%22%22%22%0A curr = os.g...
e5fed1895b69d824e3dc773dd6c6f88974e24f67
discard module (#61452)
lib/ansible/modules/network/checkpoint/cp_mgmt_discard.py
lib/ansible/modules/network/checkpoint/cp_mgmt_discard.py
Python
0
@@ -0,0 +1,2164 @@ +#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0A#%0A# Ansible module to manage CheckPoint Firewall (c) 2019%0A#%0A# Ansible is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version ...
1bd0669e67fc082cbd496b3aa54c6a6f6a0d5fce
Add grab.util.log::print_dict method for fuzzy displaying of dict objects in console
grab/util/log.py
grab/util/log.py
Python
0.000001
@@ -0,0 +1,511 @@ +def repr_value(val):%0A if isinstance(val, unicode):%0A return val.encode('utf-8')%0A elif isinstance(val, (list, tuple)):%0A return '%5B%25s%5D' %25 ', '.join(repr_val(x) for x in val)%0A elif isinstance(val, dict):%0A return '%7B%25s%7D' %25 ', '.join('%25s: %25s' %25 ...
e5bd12b67f58c1a099c2bd2dd66b043b43969267
Add a tool to publish packages in the repo to pub. Review URL: https://codereview.chromium.org//11415191
tools/publish_pkg.py
tools/publish_pkg.py
Python
0.000003
@@ -0,0 +1,2693 @@ +#!/usr/bin/env python%0A#%0A# Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file%0A# for details. All rights reserved. Use of this source code is governed by a%0A# BSD-style license that can be found in the LICENSE file.%0A#%0A# Script to push a package to pub. %0A#%0A# Usage...
f734cbd91ff8997b9f2aac6bbec2238f8b5f7511
Create __init__.py
graf/__init__.py
graf/__init__.py
Python
0.000429
@@ -0,0 +1,2 @@ + %0A
a1c2423c349757f4725ef1250b9de084a469683c
Fix indentation
ceph_medic/checks/cluster.py
ceph_medic/checks/cluster.py
from ceph_medic import metadata # # Error checks # def check_osds_exist(): code = 'ECLS1' msg = 'There are no OSDs available' osd_count = len(metadata['osds'].keys()) if not osd_count: return code, msg def check_nearfull(): """ Checks if the osd capacity is at nearfull ...
Python
0.000065
@@ -223,16 +223,17 @@ e, msg%0A%0A +%0A def chec @@ -246,28 +246,24 @@ full():%0A - %22%22%22%0A @@ -250,28 +250,24 @@ ():%0A %22%22%22%0A - Checks i @@ -300,20 +300,16 @@ earfull%0A - %22%22%22%0A @@ -312,20 +312,16 @@ %22%22%22%0A - - code = ' @@ -327,20 +327,16 ...
84990a4ef20c2e0f42133ed06ade5ce2d4e98ae3
Save team member picture with extension.
chmvh_website/team/models.py
chmvh_website/team/models.py
from django.db import models def team_member_image_name(instance, filename): return 'team/{0}'.format(instance.name) class TeamMember(models.Model): bio = models.TextField( verbose_name='biography') name = models.CharField( max_length=50, unique=True, verbose_name='name')...
Python
0
@@ -1,8 +1,19 @@ +import os%0A%0A from dja @@ -83,16 +83,57 @@ ename):%0A + _, ext = os.path.splitext(filename)%0A%0A retu @@ -144,16 +144,19 @@ team/%7B0%7D +%7B1%7D '.format @@ -169,16 +169,21 @@ nce.name +, ext )%0A%0A%0Aclas
bf993439a7c53bcffe099a61138cf8c17c39f943
Add Partner label factory
accelerator/migrations/0066_partnerlabel.py
accelerator/migrations/0066_partnerlabel.py
Python
0
@@ -0,0 +1,995 @@ +# Generated by Django 2.2.10 on 2021-08-24 13:27%0A%0Afrom django.conf import settings%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('accelerator', '0065_organization_note'),%0A %5D%0A%0A operations = %5B%0A ...
6f9dcee86d986f05e289b39f6b4700d5d302f551
add tests for base models
jsonrpc/tests/test_base.py
jsonrpc/tests/test_base.py
Python
0
@@ -0,0 +1,851 @@ +%22%22%22 Test base JSON-RPC classes.%22%22%22%0Aimport unittest%0A%0Afrom ..base import JSONRPCBaseRequest, JSONRPCBaseResponse%0A%0A%0Aclass TestJSONRPCBaseRequest(unittest.TestCase):%0A%0A %22%22%22 Test JSONRPCBaseRequest functionality.%22%22%22%0A%0A def test_data(self):%0A request ...
216b96e7f36d8b72ccd3ddf6809f0cc5af14d15a
Add fat_ready.py
fat_ready.py
fat_ready.py
Python
0.00007
@@ -0,0 +1,845 @@ +#!/usr/bin/env python3%0A'''Make all files in a directory suitable for copying to a FAT filesystem.%0A'''%0A%0Afrom __future__ import print_function%0A%0Aimport os%0Aimport os.path%0Aimport sys%0A%0Afrom six import u%0A%0Aif __name__ == u('__main__'):%0A if len(sys.argv) != 2:%0A print(u('U...
272c67aeccbd0c8c1cb1cf3a583b3586abef1832
raise ImportError when SparkSQL uses old-style classes
blaze/sparksql.py
blaze/sparksql.py
from __future__ import absolute_import, division, print_function import datashape from datashape import (dshape, DataShape, Record, isdimension, Option, discover, Tuple) from .dispatch import dispatch from .expr import Expr from .compatibility import _strtypes __all__ = [] try: import pyspark from p...
Python
0
@@ -622,16 +622,185 @@ = None%0A%0A +%0Aif not issubclass(SQLContext, object):%0A raise ImportError(%22This version of SparkSQL uses old-style classes%22%0A %22Please update to newer version of Spark%22)%0A%0A%0A def deop
257134bdaea7c250d5956c4095adf0b917b65aa6
Fix null case for event details
database/dict_converters/event_details_converter.py
database/dict_converters/event_details_converter.py
from database.dict_converters.converter_base import ConverterBase class EventDetailsConverter(ConverterBase): SUBVERSIONS = { # Increment every time a change to the dict is made 3: 0, } @classmethod def convert(cls, event_details, dict_version): CONVERTERS = { 3: cls.even...
Python
0.000017
@@ -561,16 +561,43 @@ lections + if event_details else None ,%0A @@ -650,16 +650,43 @@ t_points + if event_details else None ,%0A @@ -736,16 +736,43 @@ rankings + if event_details else None ,%0A @@ -810,16 +810,43 @@ tchstats + if event_details else None ,%0A
1a296a5203c422a7eecc0be71a91994798f01c10
copy name->title for BehaviorAction and BehaviorSequences
tndata_backend/goals/migrations/0020_populate_basebehavior_title_slugs.py
tndata_backend/goals/migrations/0020_populate_basebehavior_title_slugs.py
Python
0
@@ -0,0 +1,1454 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Afrom django.utils.text import slugify%0A%0A%0Adef _copy_name_to_title(model, apps):%0A %22%22%22Copy the values from the Model's name -%3E title and name_slug -%3E title_slug.%22%22%22%0A ...
94cfc0a7598dd8dcf455311f8bb41c2016c7c3a8
Create solution.py
hackerrank/algorithms/warmup/easy/plus_minus/py/solution.py
hackerrank/algorithms/warmup/easy/plus_minus/py/solution.py
Python
0.000018
@@ -0,0 +1,821 @@ +#include %3Cmath.h%3E%0A#include %3Cstdio.h%3E%0A#include %3Cstring.h%3E%0A#include %3Cstdlib.h%3E%0A#include %3Cassert.h%3E%0A#include %3Climits.h%3E%0A#include %3Cstdbool.h%3E%0A%0Aint main(void) %0A%7B%0A int n; %0A scanf(%22%25d%22,&n);%0A int arr%5Bn%5D;%0A for(int arr_i = 0; arr_i %...
a27d30c4514cef93e054d5597829dc758b04c95e
add xycut in util
TranskribusDU/util/XYcut.py
TranskribusDU/util/XYcut.py
Python
0.000001
@@ -0,0 +1,2311 @@ +# -*- coding: utf-8 -*-%0A%22%22%22%0A%0A%0A XYcut.py%0A %0A vertical/ horizontal cuts for page elements: %0A%0A copyright Naver Labs Europe 2018%0A READ project %0A%0A%22%22%22%0A%0Adef mergeSegments(lSegment, iMin):%0A %22%22%22Take as input a list of interval on some axis,%0A ...
e5e24ddccf5de2fba743a97c1790406259399d18
Create one fixture for all tests
conftest.py
conftest.py
Python
0
@@ -0,0 +1,202 @@ +import pytest%0Afrom fixture.application import Application%0A%0A%0A@pytest.fixture(scope = %22session%22)%0Adef app(request):%0A fixture = Application()%0A request.addfinalizer(fixture.destroy)%0A return fixture%0A
044135bc108336cb4543b84578465c04a48e4eb9
Fix the get_version import for local use
tvrenamr/tvrenamr.py
tvrenamr/tvrenamr.py
#!/usr/bin/python import logging import os import sys from . import get_version from config import Config from episode import Episode from errors import * from logs import start_logging from main import TvRenamr from options import OptionParser log = logging.getLogger('Core') parser = OptionParser(usage='tvr [optio...
Python
0.000002
@@ -54,17 +54,24 @@ s%0A%0Afrom -. +__init__ import
74d274f02fa23f1a6799e9f96ccb1ef77162f1bc
Add new package: consul (#18044)
var/spack/repos/builtin/packages/consul/package.py
var/spack/repos/builtin/packages/consul/package.py
Python
0
@@ -0,0 +1,981 @@ +# 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 Consul(MakefilePackage):%0A %22%22%22Consul is a distrib...
6427406fc627b467dd4851f32b6a15a74356ef2d
Create new package. (#6043)
var/spack/repos/builtin/packages/r-gviz/package.py
var/spack/repos/builtin/packages/r-gviz/package.py
Python
0
@@ -0,0 +1,3127 @@ +##############################################################################%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...
0a25b4d4c0bc511592d797f6b214dd6fa3f70dd8
FIX unhardwire 'modDate' to easy support for 'creDate'
scripts/managedb/lastest-updates.py
scripts/managedb/lastest-updates.py
#!/usr/bin/python # -*- coding: latin-1 -*- # Copyright 2013 Telefonica Investigacion y Desarrollo, S.A.U # # This file is part of Orion Context Broker. # # Orion Context Broker 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 Fr...
Python
0
@@ -1013,16 +1013,176 @@ t argv%0A%0A +# This script can be easily adapted to used creation date instead of modification date%0A# just changing the following variable to 'creDate'%0ArefDate = 'modDate'%0A%0A def prin @@ -2265,25 +2265,23 @@ query%5B -'mod +ref Date -' %5D = %7B'$e @@ -2326,33 +2326,31 @@ query)...
0f68667e2ddfee6a370afe5c816a1358cfba799e
Correct GitHub URL.
openfisca_qt/widgets/__init__.py
openfisca_qt/widgets/__init__.py
# -*- coding: utf-8 -*- # OpenFisca -- A versatile microsimulation software # By: OpenFisca Team <contact@openfisca.fr> # # Copyright (C) 2011, 2012, 2013, 2014 OpenFisca Team # https://github.com/openfisca/openfisca # # This file is part of OpenFisca. # # OpenFisca is free software; you can redistribute it and/or mo...
Python
0.000028
@@ -201,26 +201,16 @@ penfisca -/openfisca %0A#%0A# Thi
b02b3e2e385bc04b2f1b1160371d55f8b6122006
add migration file
pyanalysis/apps/corpus/migrations/0001_initial.py
pyanalysis/apps/corpus/migrations/0001_initial.py
Python
0.000001
@@ -0,0 +1,3077 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0Aimport django.utils.timezone%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A %5D%0A%0A operations = %5B%0A migrations.CreateModel(%0A ...
980594ab26887a4628620e9e0e00d89ddbdc4e49
Create hackstring.py
hackstring.py
hackstring.py
Python
0.000003
@@ -0,0 +1,148 @@ +#! /usr/bin/env python%0Aimport sys%0A%0Aprint %22%22.join(%5B%22%25%25%2502x%22 %25 ord(x) for x in sys.argv%5B1%5D%5D)%0Aprint %22%22.join(%5B%22%5C%5Cu%2504x%22 %25 ord(x) for x in sys.argv%5B1%5D%5D)%0A
2df34105a58a05fd1f50f88bc967360b4bd9afc8
Create LongestIncreasingSubseq_001.py
leetcode/300-Longest-Increasing-Subsequence/LongestIncreasingSubseq_001.py
leetcode/300-Longest-Increasing-Subsequence/LongestIncreasingSubseq_001.py
Python
0.000562
@@ -0,0 +1,453 @@ +class Solution(object):%0A def lengthOfLIS(self, nums):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :rtype: int%0A %22%22%22%0A n = len(nums)%0A %0A if n == 0:%0A return 0%0A %0A maxlen = %5B1 for i in range(n)%5D%0A ...
c2d26a5942cb22f4510abd6d5ff8c83d6a386810
make migrations and model updates
masterlist/candidates/migrations/0005_auto_20160725_1759.py
masterlist/candidates/migrations/0005_auto_20160725_1759.py
Python
0
@@ -0,0 +1,2655 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('candidates', '0004_auto_20160708_1422'),%0A %5D%0A%0A operations = %5B%0A migrations.Rem...
94e4d30dbdbcf9765bf731b1bd792d0fcf3f9d4a
Add prettification middleware
maccman/middleware/prettify.py
maccman/middleware/prettify.py
Python
0.000001
@@ -0,0 +1,356 @@ +from bs4 import BeautifulSoup%0A%0Aclass PrettifyMiddleware(object):%0A def process_response(self, request, response):%0A if response.status_code == 200:%0A if response%5B%22content-type%22%5D.startswith(%22text/html%22):%0A beauty = BeautifulSoup(response.content)...
be530dc2e18ccbeeb3e4396f47d2a527364e6ab1
Add migration for ADS.added_via
migrations/versions/f8c0bde5d368_match_sqlalchemy_defintion_and_actual_.py
migrations/versions/f8c0bde5d368_match_sqlalchemy_defintion_and_actual_.py
Python
0.000001
@@ -0,0 +1,654 @@ +%22%22%22Match sqlalchemy defintion and actual schema%0A%0ARevision ID: f8c0bde5d368%0ARevises: ae904ac154cf%0ACreate Date: 2019-11-19 11:24:40.555110%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'f8c0bde5d368'%0Adown_revision = 'ae904ac154cf'%0A%0Afrom alembic import op%...
50415300e3ce1e7cc10782aa4661da14d900d6de
Add code generation tests
benchmarks/regression/benchmarks/codegen.py
benchmarks/regression/benchmarks/codegen.py
Python
0
@@ -0,0 +1,310 @@ +from examples.seismic.tti.tti_example import tti_setup%0A%0A%0Arepeat = 3%0A%0A%0Aclass TTI(object):%0A%0A space_order = 12%0A%0A def setup(self):%0A self.solver = tti_setup(space_order=TTI.space_order)%0A%0A def time_forward(self):%0A self.solver.op_fwd()%0A%0A def time_adj...
5dd3424e9d95c12c2fb4c770f527b85b928da705
create a separate module for decoration/coloring
decorate.py
decorate.py
Python
0
@@ -0,0 +1,202 @@ +class bcolors:%0A HEADER = '%5C033%5B95m'%0A OKBLUE = '%5C033%5B94m'%0A OKGREEN = '%5C033%5B92m'%0A WARNING = '%5C033%5B93m'%0A FAIL = '%5C033%5B91m'%0A ENDC = '%5C033%5B0m'%0A BOLD = '%5C033%5B1m'%0A UNDERLINE = '%5C033%5B4m'
89d08498f7f7e12fa5486eb88f64829621aa27f9
Add missing migration
src/nodeconductor_saltstack/saltstack/migrations/0005_label_change.py
src/nodeconductor_saltstack/saltstack/migrations/0005_label_change.py
Python
0.0002
@@ -0,0 +1,438 @@ +# -*- 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 ('saltstack', '0004_remove_spl_state'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterMo...
8cde7867eb98cc56533ab0156768ad2409e8c65e
Fix bug
user_notification.py
user_notification.py
#!/usr/bin/python # encoding: utf-8 from datetime import datetime import string from django.core.mail import send_mail from notifications.models import UserNotification import settings email_template = u'''${username}您好: 您有${cnt}条新消息,请点击下面的链接查看: ${msg_url} 感谢使用我们的网站! ${site_name}团队 ''' today = datetime.now() sit...
Python
0.000001
@@ -451,16 +451,93 @@ += '/'%0A +site_root = settings.SITE_ROOT%0Aif site_root%5B-1%5D != '/':%0A site_root += '/'%0A url = si @@ -545,16 +545,28 @@ e_base + + site_root + 'home/m
6d8fb7d052dc7341ecd9fb3388b804b82f77fa0f
add example usage
examples/scores.py
examples/scores.py
Python
0
@@ -0,0 +1,914 @@ +%22%22%22Get a list of average scores for each professor in a department.%22%22%22%0Aimport sys%0Afrom collections import defaultdict%0A%0Aimport penncoursereview as pcr%0A%0A%0Adef prof_scores(dept):%0A professor_scores = defaultdict(list)%0A dept = pcr.Department(dept)%0A for review in dep...
7dbc289897ecf35f0b709177ac3feacffd8691ca
add a test file
ch_04/testfile.py
ch_04/testfile.py
Python
0.000001
@@ -0,0 +1,32 @@ +#this is a test file for eclipse
2b1b1e1d5db7edf4350239b712d2e872e7769d84
add problem 24
euler024.py
euler024.py
Python
0.998228
@@ -0,0 +1,671 @@ +#!/usr/bin/env python%0A%0Adef nextperm(s):%0A '''%0A http://en.wikipedia.org/wiki/Permutation#Generation_in_lexicographic_order%0A '''%0A k = None%0A for i in range(len(s)-1):%0A if s%5Bi%5D %3C s%5Bi+1%5D:%0A k = i%0A if k is None:%0A # sequence in descending order, last permutatio...
03279bbc6193d3944dcd2542daa65701a1e0eded
Add solution for problem 26
euler026.py
euler026.py
Python
0.000159
@@ -0,0 +1,469 @@ +#!/usr/bin/python%0A%0A%22%22%22%0AFor resolve this, we have to find the maximum%0AFull Reptend Prime int he given limit. To do that, we need%0Ato check if the 10 is a primitive root of p.%0A%0ASee http://mathworld.wolfram.com/FullReptendPrime.html for details%0A%22%22%22%0A%0Afrom sys import exit%0A...
8373611a9c5b035953aee208bc65f4be92890314
add the conversion script
scripts/conversionScripts/toTransformationNode.py
scripts/conversionScripts/toTransformationNode.py
Python
0.000001
@@ -0,0 +1,985 @@ +import xml.etree.ElementTree as ET%0Aimport xml.dom.minidom as pxml%0Aimport os%0A%0Adef convert(tree,fileName=None):%0A %22%22%22%0A Converts input files to be compatible with merge request ....%0A change the attribute of node %3CvariablesTransformation%3E from 'model' to 'distribution'%0A ...
55a35c642b64a6bdb8314b9470c1f7fedb16478f
print results
tensorflow/python/keras/utils/np_utils.py
tensorflow/python/keras/utils/np_utils.py
# Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applica...
Python
0.000004
@@ -1229,11 +1229,111 @@ ay(%5B -... +%5B1., 0., 0., 0.%5D,%0A %5B0., 1., 0., 0.%5D,%0A %5B0., 0., 1., 0.%5D,%0A %5B0., 0., 0., 1.%5D %5D, d
ae972cd7fe6856a1265981810ea1d03fc5efcf54
write test for django admin
tests/organisations/test_admin.py
tests/organisations/test_admin.py
Python
0.000001
@@ -0,0 +1,520 @@ +import pytest%0Afrom django.urls import reverse%0A%0A%0A@pytest.mark.django_db%0Adef test_organisation_admin_form(client, organisation,%0A admin, user_factory,%0A group_factory):%0A%0A client.login(username=admin, password='password')...
cce3b017f36de8fb8682971e13201c0143c524cf
add indexes to make deleting faster
aeromancer/db/alembic/versions/a3d002d161a_add_indexes.py
aeromancer/db/alembic/versions/a3d002d161a_add_indexes.py
Python
0.000001
@@ -0,0 +1,501 @@ +%22%22%22add indexes%0A%0ARevision ID: a3d002d161a%0ARevises: 22e0aa22ab8e%0ACreate Date: 2014-11-24 14:24:29.824147%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = 'a3d002d161a'%0Adown_revision = '22e0aa22ab8e'%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa%0A%0A%0Ad...
61c2823b5da460001ca02db6b028fc770d204e32
Add initial test case
api_tests.py
api_tests.py
Python
0.00002
@@ -0,0 +1,1287 @@ +from flask import Flask, g%0Aimport unittest%0Aimport json%0Afrom simplekv.fs import FilesystemStore%0Afrom flaskext.kvsession import KVSessionExtension%0A%0Afrom api import app, db%0Afrom common.database import Database%0A%0Aclass APITest(unittest.TestCase):%0A%0A def setUp(self):%0A glob...
72db299a3974b05f511420da5e5861f3bead0065
Create solution_1.py
problem301/Python/solution_1.py
problem301/Python/solution_1.py
Python
0.005726
@@ -0,0 +1,528 @@ +#!/usr/bin/env python%0A# coding=utf-8%0Adef nim():%0A binary_map = %5B0,1%5D%0A total = 3%0A for k in range(28):%0A binary_map_new = %5B%5D%0A for i in range(0, len(binary_map), 2):%0A if binary_map%5Bi:i+2%5D == %5B0,0%5D:%0A binary_map_new.extend(%5...
9b9e76e08531dec4cca5a2eac1067b0a1c7730dc
Remove serializer include
project/apps/bhs/serializers.py
project/apps/bhs/serializers.py
# Third-Party from dry_rest_permissions.generics import DRYPermissionsField from rest_framework.validators import UniqueTogetherValidator from rest_framework_json_api import serializers from rest_framework.serializers import SerializerMethodField # Local from .fields import TimezoneField from .models import Group fr...
Python
0
@@ -3387,33 +3387,43 @@ ssignments': 'ap -i +ps.cmanager .serializers.Ass @@ -3445,24 +3445,26 @@ er',%0A + # 'members': @@ -3503,32 +3503,34 @@ alizer',%0A + # 'officers': 'ap @@ -4597,34 +4597,32 @@ me',%0A - # 'assignments',%0A
53bf5c12b77e19d54e3ab50ade8840843cca9649
add sql group_by unit tests
siuba/tests/test_verb_group_by.py
siuba/tests/test_verb_group_by.py
Python
0.000001
@@ -0,0 +1,1378 @@ +%22%22%22%0ANote: this test file was heavily influenced by its dbplyr counterpart.%0A%0Ahttps://github.com/tidyverse/dbplyr/blob/master/tests/testthat/test-verb-group_by.R%0A%22%22%22%0A %0Afrom siuba import _, group_by, ungroup, summarize%0Afrom siuba.dply.vector import row_number, n%0A%0Aimport...
c0d0496eb2675ba2dbd5dbaa9d4b4c701409308f
Allow IHaskellPrelude.hs to not be formatting checked
verify_formatting.py
verify_formatting.py
#!/usr/bin/env python3 from __future__ import print_function import sys import os import subprocess def hindent(contents): with open(".tmp3", "w") as f: f.write(contents) with open(".tmp3", "r") as f: output = subprocess.check_output(["hindent", "--style", "gibiansky"], ...
Python
0
@@ -1394,16 +1394,153 @@ etup.hs%0A + # Also ignore IHaskellPrelude.hs, it uses CPP in weird places%0A ignored_files = %5B%22Setup.hs%22, %22IHaskellPrelude.hs%22%5D%0A @@ -1588,21 +1588,28 @@ ame -!= %22Setup.hs%22 +not in ignored_files :%0A
930a8b1a7c980183df5469627a734033ca39a444
Add functional tests for create_image
shade/tests/functional/test_image.py
shade/tests/functional/test_image.py
Python
0.000012
@@ -0,0 +1,1689 @@ +# -*- coding: utf-8 -*-%0A%0A# Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A# not use this file except in compliance with the License. You may obtain%0A# a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required by appli...
59ef02377c41041fd8010231f2c86d1aba072c0f
Complete recur sol
lc0105_construct_binary_tree_from_preorder_and_inorder_traversal.py
lc0105_construct_binary_tree_from_preorder_and_inorder_traversal.py
Python
0.000007
@@ -0,0 +1,2369 @@ +%22%22%22Leetcode 105. Construct Binary Tree from Preorder and Inorder Traversal%0AMedium%0A%0AURL: https://leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/%0A%0AGiven preorder and inorder traversal of a tree, construct the binary tree.%0A%0ANote: You may assume that ...
9c045f7667e1bdc6c9137c3877292907f4623774
Add a management command to check if URNs are present in the database
make_a_plea/management/commands/check_urns_in_db.py
make_a_plea/management/commands/check_urns_in_db.py
Python
0
@@ -0,0 +1,1405 @@ +import csv%0Afrom django.core.management.base import BaseCommand%0A%0A%0Afrom apps.plea.models import DataValidation, Case%0Afrom apps.plea.standardisers import standardise_urn, format_for_region%0A%0A%0Aclass Command(BaseCommand):%0A help = %22Build weekly aggregate stats%22%0A%0A def add_arg...
4759cf1b058d1a1b5999882a8b44f84ad89a8a9a
Add tests file
arangodb/tests.py
arangodb/tests.py
Python
0.000001
@@ -0,0 +1,24 @@ +# -*- coding: utf-8 -*-%0A
64b572a4e1e8359d781591e22439fb432c5860b6
Create click_location.py
click_location.py
click_location.py
Python
0.000001
@@ -0,0 +1,188 @@ +from PIL import Image%0Afrom pylab import *%0A%0Aim = array(Image.open('img.jpg'))%0Ashow()%0Awhile(1):%0A imshow(im)%0A print %22Please click 3 points%22%0A x = ginput(1)%0A print 'you clicked:',x%0A
d6e9971ceefc69f0eefc7440cc5e7035e7dcc05d
Add the middleware for reporting errors to gcloud.
contentcuration/contentcuration/middleware/ErrorReportingMiddleware.py
contentcuration/contentcuration/middleware/ErrorReportingMiddleware.py
Python
0
@@ -0,0 +1,264 @@ +from google.cloud import error_reporting%0A%0A%0Aclass ErrorReportingMiddleware(object):%0A def __init__(self, *args, **kwargs):%0A self.client = error_reporting.Client()%0A%0A def process_exception(self, request, exception):%0A self.client.report_exception()%0A
e3ab7c126f808864f0458b52f36518e485f546ca
Add a session class to help tie everything together in a convenient way.
source/harmony/session.py
source/harmony/session.py
Python
0
@@ -0,0 +1,2373 @@ +# :coding: utf-8%0A# :copyright: Copyright (c) 2013 Martin Pengelly-Phillips%0A# :license: See LICENSE.txt.%0A%0Aimport os%0A%0Afrom harmony.schema.collection import Collection%0Afrom harmony.schema.collector import FilesystemCollector%0Afrom harmony.schema.processor import MixinProcessor, ValidateP...
c2036cd7629b93bfc12069eaf174f2427d47e769
add another test
tests/monitoring/test_check_mesos_duplicate_frameworks.py
tests/monitoring/test_check_mesos_duplicate_frameworks.py
Python
0.000004
@@ -0,0 +1,2964 @@ +# Copyright 2015-2016 Yelp Inc.%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# http://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless required ...
21462355d04264fff88232a638f218de926061e8
send Bob's presence when joining the room
tests/twisted/muc/test-muc-invitation.py
tests/twisted/muc/test-muc-invitation.py
""" Test MUC invitations. """ import dbus from twisted.words.xish import domish, xpath from gabbletest import exec_test, make_muc_presence from servicetest import call_async, EventPattern import constants as cs def test(q, bus, conn, stream): conn.Connect() q.expect('dbus-signal', signal='StatusChanged', a...
Python
0
@@ -3275,16 +3275,154 @@ VITED%5D%0A%0A + # Send presence for Bob's membership of room.%0A stream.send(make_muc_presence('owner', 'moderator', 'chat@conf.localhost', 'bob'))%0A%0A # Se @@ -3453,32 +3453,32 @@ ership of room.%0A - stream.send( @@ -3610,16 +3610,106 @@ hanged') +%0A%0A room_bob_hand...
0b81997dd12f775fc9f814c19fb62ef35bde998e
Add ceres library
autoconf/ceres.py
autoconf/ceres.py
Python
0.000001
@@ -0,0 +1,286 @@ +from _external import *%0Afrom pthread import *%0Afrom amd import *%0Afrom gomp import *%0Afrom lapack import *%0Afrom suitesparse import *%0Afrom glog import *%0A%0Aceres = LibWithHeaderChecker('ceres', 'ceres/ceres.h', 'c++', name='ceres', dependencies = %5Bgomp,lapack,suitesparse,amd,pthread,glog%...
681f73490fd7d333883134a417477492744ce22a
Add project permissions
src/python/expedient/clearinghouse/project/permissions.py
src/python/expedient/clearinghouse/project/permissions.py
Python
0.000001
@@ -0,0 +1,1895 @@ +'''%0ACreated on Aug 3, 2010%0A%0A@author: jnaous%0A'''%0Afrom expedient.common.permissions.shortcuts import create_permission%0Afrom expedient.clearinghouse.permissionmgmt.utils import %5C%0A request_permission_wrapper%0A%0Acreate_permission(%0A %22can_create_project%22,%0A description=%5C...
bd9fce88c235ea6be032a1d15a31bf41df14a444
Fix missing migration
djangocms_blog/migrations/0033_auto_20180226_1410.py
djangocms_blog/migrations/0033_auto_20180226_1410.py
Python
0.999773
@@ -0,0 +1,487 @@ +# -*- 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 ('djangocms_blog', '0032_auto_20180109_0023'),%0A %5D%0A%0A operations = %5B%0A migrations....
07ef4a6440b59ed6ce207d3442f7ba950a8f9ec8
Python script to compute cost.
compute_cost.py
compute_cost.py
Python
0.999849
@@ -0,0 +1,1799 @@ +%22%22%22compute_cost.py: %0A%0A%22%22%22%0A %0A__author__ = %22Dilawar Singh%22%0A__copyright__ = %22Copyright 2016, Dilawar Singh%22%0A__credits__ = %5B%22NCBS Bangalore%22%5D%0A__license__ = %22GNU GPL%22%0A__version__ = %221.0.0%22%0A__maintainer__ ...
7a0bbdb2395ca1e8579e0f2cc6ccd43807c51161
Create 6kyu_alpha_to_numeric_and_numeric_to_alpha.py
Solutions/6kyu/6kyu_alpha_to_numeric_and_numeric_to_alpha.py
Solutions/6kyu/6kyu_alpha_to_numeric_and_numeric_to_alpha.py
Python
0.999268
@@ -0,0 +1,191 @@ +import re%0A%0Adef AlphaNum_NumAlpha(string):%0A return ''.join(swap(s) for s in re.findall('%5Cd%7B1,2%7D%7C%5Ba-z%5D', string))%0A%0A%0Adef swap(s):%0A return chr(int(s)+96) if s.isdigit() else str(ord(s)-96)%0A
20c51dbcd2d90bfa234efa5027254a4915995edd
add nmap_hosts migration
alembic/versions/13b7c3d4c802_create_nmap_hosts_table.py
alembic/versions/13b7c3d4c802_create_nmap_hosts_table.py
Python
0
@@ -0,0 +1,786 @@ +%22%22%22create nmap_hosts table%0A%0ARevision ID: 13b7c3d4c802%0ARevises: ecd5f49567a6%0ACreate Date: 2017-07-21 08:19:17.849112%0A%0A%22%22%22%0Afrom sqlalchemy.dialects import postgresql%0Afrom alembic import op%0Aimport sqlalchemy as sa%0Aimport datetime%0A%0A%0Adef _get_date():%0A return date...
941985a561d0bdce1a8aba2e57fc60f90b6164fb
Add jrun main module so "python jrun" works
jrun/__main__.py
jrun/__main__.py
Python
0.000036
@@ -0,0 +1,60 @@ +import jrun%0Aif __name__ == '__main__':%0A jrun.jrun_main()%0A
b27b3089f393a84c3d004e8d89be43165862be1d
add match matrix
matrix_match.py
matrix_match.py
Python
0.000002
@@ -0,0 +1,1296 @@ +import random%0A%0Aw1 = int(raw_input(%22%3E%3E%3E w1: %22))%0Ah1 = int(raw_input(%22%3E%3E%3E h1: %22))%0Aw2 = int(raw_input(%22%3E%3E%3E w2: %22))%0Ah2 = int(raw_input(%22%3E%3E%3E h2: %22))%0A%0Ar1 = int(raw_input(%22%3E%3E%3E r1: %22))%0Ar2 = int(raw_input(%22%3E%3E%3E r2: %22))%0A%0A# w1 = 20%0...
40f92e6293bb13ee1462b932be15f5f11ceeee74
Add initial implementation of TempType.
compiler/infer.py
compiler/infer.py
Python
0
@@ -0,0 +1,1115 @@ +%22%22%22%0A# ----------------------------------------------------------------------%0A# infer.py%0A#%0A# Type inference for Llama%0A# http://courses.softlab.ntua.gr/compilers/2012a/llama2012.pdf%0A#%0A# Authors: Nick Korasidis %3Crenelvon@gmail.com%3E%0A# Dimitris Koutsoukos %3Cdim.kou.shm...
a2e27feff324d5aed7220a520df651f688cd1829
Add migration
bluebottle/assignments/migrations/0002_auto_20190529_1755.py
bluebottle/assignments/migrations/0002_auto_20190529_1755.py
Python
0.000002
@@ -0,0 +1,425 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.15 on 2019-05-29 15:45%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('assignments', '0001_initial'),%0A %5D%0A%0A operatio...
9ca926d052edc754ca3b6f3663b1c00887b2965a
add migration with blank projects.Tag
brasilcomvc/projects/migrations/0004_tag_may_be_blank.py
brasilcomvc/projects/migrations/0004_tag_may_be_blank.py
Python
0.000001
@@ -0,0 +1,453 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('projects', '0003_project_tags'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField(%...
a6d3ae8b27f6e97e7e5b4388a20836f25953c26d
Add example config file
config-example.py
config-example.py
Python
0.000001
@@ -0,0 +1,374 @@ +%22%22%22%0AMinimal config file for kahvibot. Just define values as normal Python code.%0A%22%22%22%0A%0A# put your bot token here as a string%0Abot_token = %22%22%0A%0A# the tg username of the bot's admin.%0Aadmin_username = %22%22%0A%0A# if a message contains any of these words, the bot responds%0A...
bcda14f8258daaf3475dd9d3ca3eb7b25aa0496c
Add py-voluptuous (#13457)
var/spack/repos/builtin/packages/py-voluptuous/package.py
var/spack/repos/builtin/packages/py-voluptuous/package.py
Python
0
@@ -0,0 +1,614 @@ +# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other%0A# Spack Project Developers. See the top-level COPYRIGHT file for details.%0A#%0A# SPDX-License-Identifier: (Apache-2.0 OR MIT)%0A%0Afrom spack import *%0A%0A%0Aclass PyVoluptuous(PythonPackage):%0A %22%22%22Voluptous, desp...
93000ab88c489f720d0f7e6a8921dc69342d61f1
Add migration
webapp/apps/dynamic/migrations/0012_auto_20160616_1908.py
webapp/apps/dynamic/migrations/0012_auto_20160616_1908.py
Python
0.000002
@@ -0,0 +1,408 @@ +# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('dynamic', '0011_auto_20160614_1902'),%0A %5D%0A%0A operations = %5B%0A migrations.RenameF...
662ad845a0ce729d8d8b72121a4c7c6f22e3eaa2
support for phonetic similarity added
src/indicnlp/script/phonetic_sim.py
src/indicnlp/script/phonetic_sim.py
Python
0
@@ -0,0 +1,2391 @@ +# Copyright Anoop Kunchukuttan 2014 - present%0A#%0A# This file is part of Indic NLP Library.%0A# %0A# Indic NLP Library is free software: you can redistribute it and/or modify%0A# it under the terms of the GNU General Public License as published by%0A# the Free Software Foundation, either version 3...
30ea7b5c77acc0af8826e3aef6155f9d329ed419
Create getCpuUsage2.py
mesosmetrics/getCpuUsage2.py
mesosmetrics/getCpuUsage2.py
Python
0
@@ -0,0 +1,1195 @@ +import urllib%0Aimport json%0Aimport time%0Aimport sys%0A%0A%0Aif __name__ == '__main__':%0A%0A%09agent=sys.argv%5B1%5D%0A%0A%09url = %22http://%22 + agent + %22:5051/monitor/statistics%22%0A%0A%0A%09executors = %7B%7D%0A%0A%0A%09response = urllib.urlopen(url)%0A%0A%09data = json.loads(response.read...
93a41a7d406e5f7c264865d96c0f85b1181e5cb0
add basic test
tests/utils_tests/extension_tests/test_forward.py
tests/utils_tests/extension_tests/test_forward.py
Python
0.000022
@@ -0,0 +1,2054 @@ +import mock%0Aimport numpy as np%0Aimport unittest%0A%0Aimport chainer%0Afrom chainer import testing%0A%0Afrom chainercv.utils import forward%0A%0A%0A@testing.parameterize(*testing.product(%7B%0A 'in_shapes': %5B((3, 4),), ((3, 4), (5,))%5D,%0A 'out_shapes': %5B((3, 4),), ((3, 4), (5,))%5D,%0A...
4cc1c75356ac97632345c1900d45ac74521079cd
Find an average
ch03_03_p.py
ch03_03_p.py
Python
0.999994
@@ -0,0 +1,273 @@ +summation = 0%0Ainput_number = float(input()) %0Anumber_of_input = 0%0A%0Awhile input_number != -1:%0A number_of_input += 1%0A summation += input_number%0A input_number = float(input())%0A%0Aif 0 == number_of_input:%0A print(%22No Data%22)%0Aelse:%0A print(summation / number_of_input)%...
133da92ed69aafc6c0a8d4466cf3b0266c5edc68
Add migration for change in profile model.
userprofile/migrations/0006_auto_20180309_2215.py
userprofile/migrations/0006_auto_20180309_2215.py
Python
0
@@ -0,0 +1,482 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11 on 2018-03-09 22:15%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations, models%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('userprofile', '0005_auto_20171121_1923'),%0A %5D%0...
c0adf6df21e85c1a0462e59078d7a26af9c7dceb
Add error to see if flake8 catches it
checklist.py
checklist.py
#!/usr/bin/env python # ---------------------------------------------------------------------------- # Copyright (c) 2013--, scikit-bio development team. # # Distributed under the terms of the Modified BSD License. # # The full license is in the file COPYING.txt, distributed with this software. # ---------------------...
Python
0
@@ -492,16 +492,40 @@ rt sys%0A%0A +import skbio as biolopy%0A %0Adef mai
4bce7685c39e7efbb674407184d0bf436cbdaec0
Create ftxproxy.py
ftxproxy.py
ftxproxy.py
Python
0
@@ -0,0 +1,3251 @@ +#!/usr/bin/python%0A# This is a simple port-forward / proxy, written using only the default python%0A# library. If you want to make a suggestion or fix something you can contact-me%0A# at voorloop_at_gmail.com%0A# Distributed over IDC(I Don't Care) license%0Aimport socket%0Aimport select%0Aimport ti...
ec8f6fdba200fcb4816e170c1517899f1c03db04
added vowels
vowels.py
vowels.py
Python
0.999665
@@ -0,0 +1,182 @@ +# Copyright %C2%A9 2014 Bart Massey%0A# Print the hex value of the set of vowels.%0A%0An = 0%0Afor c in ('a', 'e', 'i', 'o', 'u'):%0A b = 2**(ord(c) - ord('a'))%0A n += b%0Aprint(format(n, %22x%22))%0A
0f1475eddf3f9237a1f746784b090a4f65d96226
add import script for Swindon
polling_stations/apps/data_collection/management/commands/import_swindon.py
polling_stations/apps/data_collection/management/commands/import_swindon.py
Python
0
@@ -0,0 +1,394 @@ +from data_collection.management.commands import BaseXpressDemocracyClubCsvImporter%0A%0Aclass Command(BaseXpressDemocracyClubCsvImporter):%0A council_id = 'E06000030'%0A addresses_name = 'parl.2017-06-08/Version 1/Democracy_Club__08June2017 (11).tsv'%0A stations_name = 'parl.2017-06-08/Versi...
9366fe261b2f13f81678851fd5ae4a0035a811c7
Add new package: py-walinuxagent (#18961)
var/spack/repos/builtin/packages/py-walinuxagent/package.py
var/spack/repos/builtin/packages/py-walinuxagent/package.py
Python
0
@@ -0,0 +1,862 @@ +# 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 PyWalinuxagent(PythonPackage):%0A %22%22%22Microsoft Azu...
f3db6608c2b4afeb214c3f1b94e0175609ad0b88
Add migration file for event slug changes
cs4teachers/events/migrations/0018_auto_20170706_0803.py
cs4teachers/events/migrations/0018_auto_20170706_0803.py
Python
0
@@ -0,0 +1,1289 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.2 on 2017-07-06 08:03%0Afrom __future__ import unicode_literals%0A%0Aimport autoslug.fields%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('events', '0017_auto_20170705_0952...
7ee468a779d2cfb558ebf89af59ac2f8d12218fa
Add better help output
src/sentry/runner/commands/backup.py
src/sentry/runner/commands/backup.py
""" sentry.runner.commands.backup ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ :copyright: (c) 2015 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import click from sentry.runner.decorators import configuration @click.comman...
Python
0.999999
@@ -4036,16 +4036,50 @@ lag=True +, help='Silence all debug output.' )%0A@click @@ -4111,49 +4111,175 @@ lt=2 -)%0A@click.option('--exclude', default=None +, help='Number of spaces to indent for the JSON output. (default: 2)')%0A@click.option('--exclude', default=None, help='Models to exclude from export.', metavar=...