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
6da928b7e113e30af0da0aa5b18d48c9584a631d
add script
ditto.py
ditto.py
Python
0.000001
@@ -0,0 +1,887 @@ +#!/usr/local/bin/python3%0A%22%22%22%0AThe purpose of this script is to update dot files somewhere. It works in the%0Afollowing way. Two locations are set%0A%0Adothome : ($HOME)%0A absolute path to the set the dotfiles%0A%0Adotarchive : ($HOME/.dotarchive)%0A absolute path to the dot files (u...
0d0bf5b67f432fd4ee182b9026ea6e319babf9bd
Create ChamBus_create_database.py
ChamBus_create_database.py
ChamBus_create_database.py
Python
0.000003
@@ -0,0 +1,885 @@ +# coding: utf-8%0A%0A# https://github.com/ChamGeeks/GetAroundChamonix/blob/master/www/js/services/TripPlanner.js%0A%0Aimport datetime, os, requests, sqlite3%0A%0Adb_filename = 'ChamBus.db'%0Adb_url = 'https://chx-transit-db.herokuapp.com/api/export/sql'%0A %0Aif os.path.exists(db_filename):%0A ...
a7b31346835c8fdd1724432596650a6de137fe3f
test read_meta
test/Python/test_Func.py
test/Python/test_Func.py
Python
0.000001
@@ -0,0 +1,434 @@ +import os, sys%0Asys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '../../bin')))%0A%0Afrom file_def import read_meta%0Aimport unittest%0A%0Aclass BasicTestSuite(unittest.TestCase):%0A def test_read_meta(self):%0A meta_file = os.path.abspath(os.path.join(os.path.dirname(_...
c8d48e9996f048b1844258ef427c4359645521c6
Create solution.py
leetcode/easy/length_of_last_word/py/solution.py
leetcode/easy/length_of_last_word/py/solution.py
Python
0.000018
@@ -0,0 +1,250 @@ +class Solution(object):%0A def lengthOfLastWord(self, s):%0A %22%22%22%0A :type s: str%0A :rtype: int%0A %22%22%22%0A words = s.split()%0A %0A if len(words) %3E 0:%0A return len(words%5B-1%5D)%0A %0A return 0%0A
a84f965e16e68cb8973d6cc91fbacec56bb92a64
add lottery.py
ext/lottery.py
ext/lottery.py
Python
0.999723
@@ -0,0 +1,1774 @@ +import decimal%0Aimport logging%0A%0Aimport discord%0Afrom discord.ext import commands%0A%0Afrom .common import Cog%0A%0Alog = logging.getLogger(__name__)%0A%0APERCENTAGE_PER_TAXBANK = (0.2 / 100)%0ATICKET_PRICE = 20%0A%0A%0Aclass Lottery(Cog):%0A %22%22%22Weekly lottery.%0A%0A The lottery wor...
210429b1acbb099479c06f5bd4ceddfabfa6ee5c
Create qualysguard_remediation_ignore_non-running_kernels.py
qualysguard_remediation_ignore_non-running_kernels.py
qualysguard_remediation_ignore_non-running_kernels.py
Python
0.000002
@@ -0,0 +1,22 @@ +#!/usr/bin/env python%0A
c92954f240ef990eae06967c12426367f0eb6319
Add migration
readthedocs/donate/migrations/0003_add-impressions.py
readthedocs/donate/migrations/0003_add-impressions.py
Python
0.000002
@@ -0,0 +1,919 @@ +# -*- 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 ('donate', '0002_dollar-drop-choices'),%0A %5D%0A%0A operations = %5B%0A migrations.CreateM...
9cdf52e71fa31c52335f9cb9c6cdb542d658dfb1
update conv tests
tests/keras_contrib/layers/test_convolutional.py
tests/keras_contrib/layers/test_convolutional.py
import pytest import numpy as np import itertools from numpy.testing import assert_allclose from keras.utils.test_utils import layer_test, keras_test from keras.utils.conv_utils import conv_input_length from keras import backend as K from keras_contrib import backend as KC from keras_contrib.layers import convolutiona...
Python
0
@@ -6397,10 +6397,21 @@ == ' +channels_las t -f ':%0A
dc7cf288c5c5c9733a59184770fbaa26db036833
Add basic tests for custom_urls system
tests/unit_project/test_core/test_custom_urls.py
tests/unit_project/test_core/test_custom_urls.py
Python
0
@@ -0,0 +1,1587 @@ +# -*- coding: utf-8 -*-%0Afrom djangosanetesting import UnitTestCase%0A%0Afrom django.http import Http404%0A%0Afrom ella.core.custom_urls import DetailDispatcher%0A%0A# dummy functions to register as views%0Adef view(request, bits, context):%0A return request, bits, context%0A%0Adef custom_view(r...
861120c5ba7e6e126cac13497a489bc035d27026
add partition show
bin/partition_show.py
bin/partition_show.py
Python
0
@@ -0,0 +1,1208 @@ +#!/usr/bin/python%0Aimport datetime%0Aimport MySQLdb%0Aimport json%0Aimport os%0A%0ACONFIG_FILE=%22partition.json%22%0A%0A# -----------------------------------%0Adef config_read(filename):%0A config = json.load(open(filename))%0A return config%0A%0A# -----------------------------------%0A%0Ade...
c50a7189e730fc3e95eb209eed00ebdcd7001bde
Create ImgurStorage.py
ImgurStorage.py
ImgurStorage.py
Python
0.000001
@@ -0,0 +1,2414 @@ +import base64%0Aimport os%0Aimport tempfile%0A%0Afrom django.core.exceptions import SuspiciousFileOperation%0Afrom django.core.files import File%0Afrom django.utils._os import safe_join%0Aimport requests%0A%0Afrom django.core.files.storage import Storage%0Afrom imgurpython import ImgurClient%0A%0Acl...
c153bc9422308599d1354abf782273ca7bd78952
Add a few unit tests for libvirt_conn.
nova/tests/virt_unittest.py
nova/tests/virt_unittest.py
Python
0
@@ -0,0 +1,3084 @@ +# vim: tabstop=4 shiftwidth=4 softtabstop=4%0A#%0A# Copyright 2010 OpenStack LLC%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# ht...
07500dbd92aa15540ddf77b96a7072c5f66d34b2
Add files via upload
heat_map.py
heat_map.py
Python
0
@@ -0,0 +1,643 @@ +# -*- coding: utf-8 -*-%0D%0A%22%22%22%0D%0ACreated on Wed Jun 21 17:27:18 2017%0D%0A%0D%0A@author: DWyatt%0D%0A%22%22%22%0D%0Aimport pandas as pd%0D%0Aimport seaborn as sns%0D%0Aimport sys%0D%0A%0D%0Adf_train = pd.read_csv('train.csv')%0D%0Atarget = 'SalePrice'%0D%0Avariables = %5Bcolumn for column ...
e755977ee0ada391149e55d3331bf2ffe045d243
Add a build configuration test for zlib, for #187
examples/tests/test_build_config.py
examples/tests/test_build_config.py
Python
0
@@ -0,0 +1,1791 @@ +#! /usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# vi:ts=4:et%0A%0Aimport pycurl%0Aimport zlib%0Atry:%0A from io import BytesIO%0Aexcept ImportError:%0A try:%0A from cStringIO import StringIO as BytesIO%0A except ImportError:%0A from StringIO import StringIO as BytesIO%0A%0A...
9f1c5612c717bac3690d093a27a0a362ff4793b4
add parameters class for fitting data
nsls2/fitting/parameters.py
nsls2/fitting/parameters.py
Python
0
@@ -0,0 +1,1305 @@ +# Copyright (c) Brookhaven National Lab 2O14%0A# All rights reserved%0A# BSD License%0A# See LICENSE for full text%0A# @author: Li Li (lili@bnl.gov)%0A# created on 07/20/2014%0A%0A%0A%0A%0Aclass ParameterBase(object):%0A %22%22%22%0A base class to save data structure %0A for each fitting p...
17de6f90ce081984cab528526fcf9d9e7008be14
Create beta_scraping_get_users_honor.py
Solutions/beta/beta_scraping_get_users_honor.py
Solutions/beta/beta_scraping_get_users_honor.py
Python
0.000001
@@ -0,0 +1,514 @@ +from bs4 import BeautifulSoup as BS%0Afrom urllib.request import urlopen%0A%0AUrl = 'https://www.codewars.com/users/leaderboard'%0A%0Adef get_honor(username):%0A html = urlopen(Url).read().decode('utf-8')%0A soup = BS(html, 'html.parser')%0A %0A for i in soup.find_all('tr'):%0A try...
8c737c22ae5d896f5445995660d664d959ce1c08
add ctc reader
fluid/ocr_recognition/ctc_reader.py
fluid/ocr_recognition/ctc_reader.py
Python
0
@@ -0,0 +1,2085 @@ +import os%0Aimport cv2%0Aimport numpy as np%0A%0Afrom paddle.v2.image import load_image%0A%0A%0Aclass DataGenerator(object):%0A def __init__(self):%0A pass%0A%0A def train_reader(self, img_root_dir, img_label_list):%0A '''%0A Reader interface for training.%0A%0A%09%09:para...
90c7f90a8d409fd68ebe20ed4ac35fd378abfee5
Create flush.py
flush.py
flush.py
Python
0.000004
@@ -0,0 +1,163 @@ +f = open('out.log', 'w+')%0Af.write('output is ')%0A%0A# some work%0As = 'OK.'%0Af.write(s)%0Af.write('%5Cn')%0Af.flush()%0A%0A# some other work%0Af.write('done%5Cn')%0Af.flush()%0Af.close()%0A
ea11ae8919139eae8eaa6b9b1dfe256726d3c584
Copy SBSolarcell tests into individual file
test/test_SBSolarcell.py
test/test_SBSolarcell.py
Python
0
@@ -0,0 +1,2565 @@ +# -*- coding: utf-8 -*-%0Aimport numpy as np%0Aimport ibei%0Afrom astropy import units%0Aimport unittest%0A%0Atemp_sun = 5762.%0Atemp_earth = 288.%0Abandgap = 1.15%0A%0Ainput_params = %7B%22temp_sun%22: temp_sun,%0A %22temp_planet%22: temp_earth,%0A %22bandgap%22: bandg...
a973b1daca340031c671070e0f102a6114f58fab
add files
mysite/wordclips/ventriloquy/test_ventriloquy.py
mysite/wordclips/ventriloquy/test_ventriloquy.py
Python
0.000002
@@ -0,0 +1,1640 @@ +from django.test import TestCase%0Afrom wordclips.ventriloquy.ventriloquy import Ventriloquy%0Afrom wordclips.models import Wordclip%0A%0A%0Aclass VentriloquyTestCase(TestCase):%0A def setUp(self):%0A self.ventriloquy = Ventriloquy()%0A # Put dummy object in databse for testing purp...
8fd466ecd16db736177104902eb84f661b2b62cc
Create sitemap for google news
opps/sitemaps/googlenews.py
opps/sitemaps/googlenews.py
Python
0.000095
@@ -0,0 +1,873 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom django.contrib.sitemaps import GenericSitemap%0Afrom django.contrib.sites.models import Site%0A%0A%0Aclass GoogleNewsSitemap(GenericSitemap):%0A # That's Google News limit. Do not increase it!%0A limit = 1000%0A sitemap_template = 'sitem...
2a106a12db2a59ccb0517a13db67b35f475b3ef5
Add args to survey_data url
apps/survey/urls.py
apps/survey/urls.py
from django.conf.urls.defaults import * from . import views urlpatterns = patterns('', url(r'^profile/$', views.profile_index, name='survey_profile'), url(r'^profile/electric/$', views.profile_electric, name='survey_profile_electric'), url(r'^main/$', views.main_index), url(r'^group_management/$', vie...
Python
0.000002
@@ -472,54 +472,178 @@ ata/ -$', views.survey_data, name='survey_management +(?P%3Csurvey_shortname%3E.+)/(?P%3Cid%3E%5Cd+)/$', views.survey_data, name='survey_data'),%0A #url(r'%5Esurvey_data/(?P%3Csurvey_shortname%3E.+)/$', views.survey_data, name='survey_data '),%0A
8822eba1c4351f8cc575fdb33c15bcd6a27bf21c
allow for nodePort to be None in case of ClusterIP
kubernetes/models/v1/ServicePort.py
kubernetes/models/v1/ServicePort.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # This file is subject to the terms and conditions defined in # file 'LICENSE.md', which is part of this source code package. # from kubernetes.utils import is_valid_string class ServicePort(object): VALID_PROTOCOLS = ['TCP', 'UDP'] def __init__(self, name=N...
Python
0.000398
@@ -3093,32 +3093,53 @@ ne):%0A if +port is not None and isinstance(port, @@ -3196,32 +3196,53 @@ ort)%0A if +port is not None and not isinstance(p
f3a6281098b11ddd353a394d914186d5c7683f9b
add jupyter module
rasa/jupyter.py
rasa/jupyter.py
Python
0
@@ -0,0 +1,1320 @@ +import pprint as pretty_print%0Afrom typing import Any, Dict, Text, TYPE_CHECKING%0Afrom rasa_core.utils import print_success, print_error%0A%0Aif TYPE_CHECKING:%0A from rasa_core.agent import Agent%0A from rasa_core.interpreter import NaturalLanguageInterpreter%0A%0A%0Adef pprint(object: Any)...
d8407723f9bf40ca166e5471e76c03c257bc71f9
Add lc208_implement_trie_prefix_tree.py
lc208_implement_trie_prefix_tree.py
lc208_implement_trie_prefix_tree.py
Python
0.000001
@@ -0,0 +1,1397 @@ +%22%22%22Leetcode 208. Implement Trie (Prefix Tree)%0AMedium%0A%0AURL: https://leetcode.com/problems/implement-trie-prefix-tree/%0A%0AImplement a trie with insert, search, and startsWith methods.%0A%0AExample:%0ATrie trie = new Trie();%0Atrie.insert(%22apple%22);%0Atrie.search(%22apple%22); // ret...
1b00a597d8145b2df05054fef8d072d452209463
Make SurfaceHandler (for sfc data)
src/data/surface.py
src/data/surface.py
Python
0
@@ -0,0 +1,2243 @@ +from glob import glob%0A# Third-party modules%0Aimport pandas as pd%0A# Hand-made modules%0Afrom base import LocationHandlerBase%0A%0ASFC_REGEX_DIRNAME = %22sfc%5B1-5%5D%22%0AKWARGS_READ_CSV_SFC_MASTER = %7B%0A %22index_col%22: 0,%0A%7D%0AKWARGS_READ_CSV_SFC_LOG = %7B%0A %22index_col%22: 0,%0A...
c025cd6649e2326ade7b81df8408c4363fdb2050
add music handler
app/music_handler.py
app/music_handler.py
Python
0.000001
@@ -0,0 +1,419 @@ +#-*- coding:utf-8 -*-%0Afrom tools.httptools import Route%0Afrom models import Music%0A%0A@Route.get(%22/music%22)%0Adef get_music_handler(app):%0A%09ret=%7B%7D;%0A%09ret%5B'code'%5D=200%0A%09ret%5B'msg'%5D='ok'%0A%09ret%5B'type'%5D=3%0A%09ret%5B'data'%5D=%5B%0A%09 %7B'music_name':'CountrintStars','m...
3091555ca7fc421f886a1df1ac28f677feb70a53
Add default value for the fields object and field of the social network app model
app/migrations/0006_auto_20150825_1513.py
app/migrations/0006_auto_20150825_1513.py
Python
0
@@ -0,0 +1,757 @@ +# -*- 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 ('app', '0005_auto_20150819_1054'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField(...
f05bd26c7a275c38c092c821e5ef62284c36e783
Test transormation matrices
test/test_interpolate.py
test/test_interpolate.py
Python
0
@@ -0,0 +1,707 @@ +import pywt%0Aimport sys%0Aimport numpy as np%0Afrom scipy.ndimage.interpolation import affine_transform%0Asys.path.insert(0, '../mlp_test')%0Afrom data_utils import load_mnist%0Afrom skimage import transform as tf%0A%0A%0A%0Atest_data = load_mnist()%5B2%5D%0A%0Achosen_index = 7%0A%0Atest_x_chosen =...
47cbcf130e76604ed93306f02fc2221a276d3bbf
Split out
pentai/gui/spacer.py
pentai/gui/spacer.py
Python
0.000462
@@ -0,0 +1,102 @@ +from kivy.uix.widget import Widget%0A%0Aclass HSpacer(Widget):%0A pass%0A%0Aclass VSpacer(Widget):%0A pass%0A%0A
e37a616d23805ced7250d4cdd6422751d8ae5143
Add populate_anticrispr.py
phageAPI/populate_anticrispr.py
phageAPI/populate_anticrispr.py
Python
0
@@ -0,0 +1,1615 @@ +#! /usr/bin/env python%0A%0Aimport os%0Afrom Bio import SeqIO%0Aimport textwrap%0A%0A%0Adef populate(sequences, AntiCRISPR):%0A for seq in sequences:%0A spacer, _ = AntiCRISPR.objects.get_or_create(%0A accession=seq.name,%0A sequence=str(seq.seq))%0A spacer.sav...
333cbe13d8104934a924f223427fa06a60a8b080
Create php4dvd_1.py
php4dvd/php4dvd_1.py
php4dvd/php4dvd_1.py
Python
0.000013
@@ -0,0 +1,1591 @@ +# -*- coding: utf-8 -*-%0Afrom selenium import webdriver%0Aimport unittest%0A%0Aclass Untitled(unittest.TestCase):%0A def setUp(self):%0A self.driver = webdriver.Firefox()%0A self.driver.implicitly_wait(30)%0A self.base_url = %22http://localhost:8080/%22%0A self.verifi...
d894e39e0280aaa45cef914f2202e978797b26fb
Update and rename 2 to 28.py
exercises/28.py
exercises/28.py
Python
0.0001
@@ -0,0 +1,212 @@ +'''%0AWrite a function find_longest_word()%0Athat takes a list of words and returns%0Athe length of the longest one.%0AUse only higher order functions.%0A'''%0A%0A%0Adef find_longest_word(lst):%0A return len(max(lst, key=len))%0A
4d9da24a0356bc63be6ab06eb084f97116d1dac4
should be functioning
cogs/packages.py
cogs/packages.py
Python
0.999455
@@ -0,0 +1,653 @@ +import discord%0Afrom cogs import common%0A%0Aclass Packages:%0A def __init__(self, bot):%0A self.bot = bot%0A def pkg_url(pkg):%0A %22%22%22Returns the URL for JSON data about a package on PyPI.%22%22%22%0A return f'https://pypi.python.org/pypi/%7Bpkg%7D/json'%...
183b0c573478ff5e2480758abec629ddce4f0766
Create missing migration for model Meta changes in 9d1e29150407e906bc651a8249c53e5e6d1fb1e7.
atmo/jobs/migrations/0035_auto_20170529_1424.py
atmo/jobs/migrations/0035_auto_20170529_1424.py
Python
0
@@ -0,0 +1,450 @@ +# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.1 on 2017-05-29 14:24%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('jobs', '0034_auto_20170529_1424'),%0A %5D%0A%0A opera...
b674ff31ab846bc4c11b615ad7f738ff176d5f96
Add /team test
picoCTF-web/tests/api/functional/v1/test_team.py
picoCTF-web/tests/api/functional/v1/test_team.py
Python
0
@@ -0,0 +1,1582 @@ +%22%22%22Tests for the /api/v1/team endpoints.%22%22%22%0A%0Afrom common import ( # noqa (fixture)%0A ADMIN_DEMOGRAPHICS,%0A clear_db,%0A client,%0A decode_response,%0A get_csrf_token,%0A register_test_accounts,%0A TEACHER_DEMOGRAPHICS,%0A USER_DEMOGRAPHICS,%0A get_conn%0A)%0A%0A%0Adef test...
d8c8287cce7ddc48f4ea271a54bd6efa8dcabe66
Create OutputNeuronGroup_multiple_outputs_1.py
examples/OutputNeuronGroup_multiple_outputs_1.py
examples/OutputNeuronGroup_multiple_outputs_1.py
Python
0
@@ -0,0 +1,2856 @@ +'''%0AExample of a spike receptor (only receives spikes)%0A%0AIn this example spikes are received and processed creating a raster plot at the end of the simulation.%0A%0A'''%0A%0Afrom brian import *%0Aimport numpy%0A%0Afrom brian_multiprocess_udp import BrianConnectUDP%0A%0A# The main function with ...
c70a127e17286f18e8d2d46bdc2e5ec6b0c55d0d
Add script to output statistics on body part emotion pairs
generate_body_part_emotion_pairs.py
generate_body_part_emotion_pairs.py
Python
0
@@ -0,0 +1,3033 @@ +%22%22%22Find known body parts in sentences with predicted label 'Lichaamsdeel'.%0A%0AExtended body parts are saved to new text files.%0A%0AUsage: python classify_body_parts.py %3Cjson file with body part mapping%3E %3Cdir%0Awith input texts%3E %3Cdir for output texts%3E%0A%22%22%22%0Aimport os%0Aim...
19ee2fbee238e94b7944154d692a9e488ee19a79
Add basic opps database configuration
opps/db/conf.py
opps/db/conf.py
Python
0
@@ -0,0 +1,557 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom django.conf import settings%0A%0Afrom appconf import AppConf%0A%0A%0Aclass OppsDataBaseConf(AppConf):%0A%0A HOST = getattr(settings, 'OPPS_DB_HOSR', None)%0A USER = getattr(settings, 'OPPS_DB_USER', None)%0A PASSWORD = getattr(settings, ...
d1c791ccf5b2873bbc248c9b079a5b68159ffb50
Add ECM Keys script
python/ecep/portal/management/commands/update_ecm.py
python/ecep/portal/management/commands/update_ecm.py
Python
0
@@ -0,0 +1,849 @@ +import csv%0Aimport os%0Aimport re%0A%0Afrom django.core.management.base import NoArgsCommand%0Afrom django.conf import settings%0A%0Afrom portal.models import Location%0A%0A%0Aclass Command(NoArgsCommand):%0A %22%22%22%0A Import Cleaned Site Name, Address, and ECM Keys%0A %22%22%22%0A%0A ...
8ed1fccb2a1d72815bde93b19d45069e59db0900
add force404 sample
force404.py
force404.py
Python
0
@@ -0,0 +1,273 @@ +# -*- coding:utf-8 -*-%0D%0Afrom bottle import route, run, abort, error%0D%0A%0D%0A@route(%22/%22)%0D%0Adef top():%0D%0A abort(404, %22go to 404%22)%0D%0A return %22Hello world!%22%0D%0A%0D%0A@error(404)%0D%0Adef error404(error):%0D%0A return %22Not Found!%22%0D%0A%0D%0Arun(host=%220.0.0.0%2...
5d58200622e05728acce8ffba1ddf7e5063f556c
Create formatIO.py
formatIO.py
formatIO.py
Python
0.000003
@@ -0,0 +1,1576 @@ +%0A# %E5%B0%86%E8%BE%93%E5%85%A5%E8%BE%93%E5%87%BA%E6%A0%BC%E5%BC%8F%E5%8C%96%E4%BE%8B%E5%A6%82:(xxxx) -%3E (x)(x)(x)(x), (%5Bx%5D) -%3E x, %5Bxxxx%5D -%3E%5Bx%5D%5Bx%5D%5Bx%5D%5Bx%5D%0A%0Adef formatting(old_tune):%0A '''%0A %E6%A0%BC%E5%BC%8F%E5%8C%96%0A '''%0A new_tune = ''%0A sharp...
aff6ff82ec4fc0076f8356d782a2a103510ebbfd
use Queue for product and custom problem
product_custom/use_queue.py
product_custom/use_queue.py
Python
0
@@ -0,0 +1,626 @@ +%0A%0A# http://blog.jobbole.com/52412/ %0Afrom threading import Thread%0Aimport time%0Aimport random%0Afrom Queue import Queue%0A %0Aqueue = Queue(10)%0A %0Aclass ProducerThread(Thread):%0A def run(self):%0A nums = range(5)%0A while True:%0A num = random.choice(nums)%0A ...
b75a0293f214de4196d9df50ef5906885c2810fc
Create empClass.py
empClass.py
empClass.py
Python
0.000002
@@ -0,0 +1,449 @@ +from rgfunc import *%0A%0Aclass Employee(object):%0A%09year = 0%0A%09month = 0%0A%09day = 0%0A%09city = %22%22%0A%09country = %22%22%0A%09lastname = %22%22%0A%09%0A%0A%09%0A%09def __init__(self,name):%0A%09%09self.name = name%0A%09%09%0A%09%0A%09def dateofbirth(self):%0A%09%09return str(self.day)+%22...
d9be3f189fc34117bdec6e0c7856f7a7dc5f902a
Add tool for generating the JSONP required by the documentation versions.
cdap-docs/tools/versionscallback-gen.py
cdap-docs/tools/versionscallback-gen.py
Python
0
@@ -0,0 +1,2140 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0A#%0A# Copyright %C2%A9 2014 Cask Data, Inc.%0A#%0A# Used to generate JSONP from a CDAP documentation directory on a webserver.%0A# %0A# sudo echo %22versionscallback(%7B%5C%22development%5C%22: %5C%222.6.0-SNAPSHOT%5C%22, %5C%22current%5C%22: %5C%...
fe1d75065f7371502cf81ea57e2a1019c2db093c
add config.py
custom_config.py
custom_config.py
Python
0.000002
@@ -0,0 +1,333 @@ +# ===== GAE dev_appserver.py settings =====%0A# %5BRequired%5D%0Agae_sdk_path = %22%22%0Aproject_path = %22%22%0A%0A%0A# %5BOptional%5D%0Adatastore_path = %22%22%0Aport = %22%22%0Aadmin_port = %22%22%0A%0A%0A# ===== GAE Helper settings =====%0A# %5BLog%5D%0Alog_path = %22%22%0Aappend_date_to_log = Fa...
90c36d54f8822ef28bef98be4ba735d15b405648
add get_dump.py utility
get_dump.py
get_dump.py
Python
0.000002
@@ -0,0 +1,1464 @@ +#!/usr/bin/python%0Aimport argparse%0A%0Aimport mosquitto%0Aimport time, random%0Aimport sys%0A%0A%0A%0Adef on_mqtt_message(arg0, arg1, arg2=None):%0A #%0A #~ print %22on_mqtt_message%22, arg0, arg1, arg2%0A if arg2 is None:%0A mosq, obj, msg = None, arg0, arg1%0A else:%0A ...
e04d3bfd20879d0e8e404a3fff4ab37b914cd303
Add ContactForm
contact/forms.py
contact/forms.py
Python
0
@@ -0,0 +1,629 @@ +from django import forms%0Afrom django.core.exceptions import ValidationError%0A%0A%0Afrom prosodyauth.forms import PlaceholderForm%0Afrom simplecaptcha import captcha%0A%0A%0Acontact_reasons = (%0A ('question', 'Question'),%0A ('problem', 'Problem'),%0A ('suggestion', 'Suggestio...
0aed5df2f7c08cdb365b098a93800b0269c0c6b4
Create class Dataset
gammacat/dataset.py
gammacat/dataset.py
Python
0.000002
@@ -0,0 +1,1194 @@ +# Licensed under a 3-clause BSD style license - see LICENSE.rst%0Aimport logging%0Afrom .utils import load_yaml, write_yaml%0Afrom gammapy.catalog.gammacat import GammaCatResource%0A%0A__all__ = %5B%0A 'DataSet',%0A%5D%0A%0Alog = logging.getLogger(__name__)%0A%0Aclass DataSet:%0A %22%22%22Proc...
52f1805bdce7d6aa60047911b600d068cbee05e7
Add another test case for checkout
saleor/checkout/test_checkout.py
saleor/checkout/test_checkout.py
from django.contrib.auth.models import AnonymousUser from django.test import TestCase from mock import MagicMock, patch from . import BillingAddressStep, ShippingStep from ..checkout import STORAGE_SESSION_KEY from ..checkout.steps import BaseAddressStep from ..userprofile.models import Address NEW_ADDRESS = { 'f...
Python
0
@@ -3127,16 +3127,25 @@ data = %7B +%0A 'first_n @@ -3173,16 +3173,16 @@ y LTD',%0A - @@ -3765,38 +3765,47 @@ 'first_name': ' -Change +Billing Address ',%0A ' @@ -3809,34 +3809,36 @@ 'last_name': ' -Me +Test ',%0A ' @@ -4001,32 +4001,32 @@ step.save()%0A - ass...
828b065e857b5f148a0d20b06fd9d45824a1befc
add manager.py flask api for genmodel
genmodel/manager.py
genmodel/manager.py
Python
0
@@ -0,0 +1,1646 @@ +from flask import Flask, request, render_template, jsonify%0Aimport psycopg2%0Aimport os%0A%0A# Connect to Database%0Atry:%0A DB_NAME=os.environ%5B'DB_NAME'%5D%0A DB_USER=os.environ%5B'DB_USER'%5D%0A DB_PASS=os.environ%5B'DB_PASS'%5D%0Aexcept KeyError as e:%0A raise Exception('environmen...
7e28a3fe54c24a38a90bf0e7cf2f634ca78ee2ed
Add script used to generate a Cantor set
cantorset.py
cantorset.py
Python
0
@@ -0,0 +1,2582 @@ +### BEGIN LICENSE%0A# The MIT License (MIT)%0A#%0A# Copyright (C) 2015 Christopher Wells %3Ccwellsny@nycap.rr.com%3E%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining a copy%0A# of this software and associated documentation files (the %22Software%22), to deal%0A# in the S...
282383ab66f85ff6eb58b98c34558c02c9cf44eb
add a tool to list recipes used by builders (and ones not on recipes)
scripts/tools/builder_recipes.py
scripts/tools/builder_recipes.py
Python
0.000004
@@ -0,0 +1,2147 @@ +#!/usr/bin/env python%0A# Copyright 2015 The Chromium Authors. All rights reserved.%0A# Use of this source code is governed by a BSD-style license that can be%0A# found in the LICENSE file.%0A%0Aimport argparse%0Aimport json%0Aimport operator%0Aimport os%0Aimport subprocess%0Aimport sys%0Aimport tem...
bf3f14692b6e2a348f5a0171ad57e494801ed4f4
Add python script to write lib svm expected data format from my collected data
scripts/writelibsvmdataformat.py
scripts/writelibsvmdataformat.py
Python
0
@@ -0,0 +1,2659 @@ +%22%22%22%0AA script to write out lib svm expected data format from my collecting data%0A%22%22%22%0Aimport os%0Aimport sys%0Aimport csv%0Aimport getopt%0A%0Acmd_usage = %22%22%22%0A usage: writelibsvmdataformat.py --inputs=%22/inputs/csv_files%22 --output=%22/output/lib_svm_data%22%0A%22%22%22%0...
900c93e6917ef92da02cca6865284e0004b01695
add file
aiovk/mixins.py
aiovk/mixins.py
Python
0.000001
@@ -0,0 +1,64 @@ +class LimitRateDriverMixin(object):%0A requests_per_second = 3%0A
a30277835e65195fc68e6708fe5da394bc43e08c
Test Projection
tests/test_projection.py
tests/test_projection.py
Python
0.000001
@@ -0,0 +1,302 @@ +from demosys.test import DemosysTestCase%0Afrom demosys.opengl import Projection%0A%0A%0Aclass ProjectionTest(DemosysTestCase):%0A%0A def test_create(self):%0A proj = Projection(fov=60, near=0.1, far=10)%0A proj.update(fov=75, near=1, far=100)%0A proj.tobytes()%0A proj....
1c2c7d5134780e58bd69f24ee06050b2f405d946
Add unit test for run_nohw
src/program/lwaftr/tests/subcommands/run_nohw_test.py
src/program/lwaftr/tests/subcommands/run_nohw_test.py
Python
0
@@ -0,0 +1,1991 @@ +%22%22%22%0ATest the %22snabb lwaftr run_nohw%22 subcommand.%0A%22%22%22%0A%0Aimport unittest%0A%0Afrom random import randint%0Afrom subprocess import call, check_call%0Afrom test_env import DATA_DIR, SNABB_CMD, BaseTestCase%0A%0Aclass TestRun(BaseTestCase):%0A%0A program = %5B%0A str(SNAB...
ff3e3e6be3a5a46db73a772f99071e83b9026d98
add wikipedia plugin
plugins/wiki.py
plugins/wiki.py
Python
0.000001
@@ -0,0 +1,606 @@ +import wikipedia%0A%0AMAX_LEN = 350%0A%0A@yui.command('wiki', 'wk', 'w')%0Adef wiki(argv):%0A %22%22%22wiki %5B-lang%5D %3Carticle%3E%22%22%22%0A lang = 'en'%0A if len(argv) %3C 2:%0A return%0A%0A # check if a language is given%0A argv = argv%5B1:%5D%0A if len(argv) %3E 1 and...
8fc91c780cf7f0b43deac69b0e60f2b9472af172
Add script to automatically setup ln -s for the utilities I use
set-links.py
set-links.py
Python
0
@@ -0,0 +1,1072 @@ +%22%22%22%0AHelper script to set up ln -s %3Cdesired utilities%3E on a given bin/ PATH.%0A%22%22%22%0Aimport os%0A%0A%0Autilities = (%0A 'mineutils/mc',%0A 'misc/gitmail',%0A 'misc/pipu',%0A 'misc/reclick',%0A)%0A%0A%0Adef run(program, *args):%0A %22%22%22Spawns a the given program as...
7556fd9f55fe84a82a4843fb0ba43e7ad144e874
Update tendrl_definitions.py
tendrl/node_agent/persistence/tendrl_definitions.py
tendrl/node_agent/persistence/tendrl_definitions.py
from tendrl.bridge_common.etcdobj.etcdobj import EtcdObj from tendrl.bridge_common.etcdobj import fields class TendrlDefinitions(EtcdObj): """A table of the Os, lazily updated """ __name__ = '/tendrl_definitions_node_agent' data = fields.StrField("data") def render(self): self.__name__ ...
Python
0
@@ -272,137 +272,4 @@ a%22)%0A -%0A def render(self):%0A self.__name__ = self.__name__ %25 self.node_uuid%0A return super(TendrlDefinitions, self).render()%0A
907fa0a42dd90ca67d86e61ce7984d5764455fb9
add missing __init__.py
src/distribution/__init__.py
src/distribution/__init__.py
Python
0.001057
@@ -0,0 +1,1348 @@ +# -*- coding: iso-8859-1 -*-%0A# -----------------------------------------------------------------------------%0A# core.py - distutils functions for kaa packages%0A# -----------------------------------------------------------------------------%0A# $Id: distribution.py 2110 2006-11-29 00:41:31Z tack ...
92f63d6ad055aa213b67ad2778187faee1fde821
Add in printParents.py
printParents.py
printParents.py
Python
0.001401
@@ -0,0 +1,1585 @@ +%EF%BB%BFfrom types import *%0A%0A# https://stackoverflow.com/questions/2611892/get-python-class-parents%0Adef printParents(thing, ident = 2):%0A%09'''%0A%09Print out all the parents (till the ancestors) of a given class / object.%0A%09@param indent: Print indentation%0A%09'''%0A%09typ = type(thing)...
87565c1e6032bff2cc3e20f5c4f46b7a17977f7c
Add organisation for TFL Dial a Ride
migrations/versions/0098_tfl_dar.py
migrations/versions/0098_tfl_dar.py
Python
0
@@ -0,0 +1,666 @@ +%22%22%22empty message%0A%0ARevision ID: 0098_tfl_dar%0ARevises: 0097_notnull_inbound_provider%0ACreate Date: 2017-06-05 16:15:17.744908%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '0098_tfl_dar'%0Adown_revision = '0097_notnull_inbound_provider'%0A%0Afrom alembic import ...
22585d29220709dc3a3de16b03c626ca27c715ca
Add migration version? Not sure if this is right
migrations/versions/3025c44bdb2_.py
migrations/versions/3025c44bdb2_.py
Python
0.000006
@@ -0,0 +1,292 @@ +%22%22%22empty message%0A%0ARevision ID: 3025c44bdb2%0ARevises: None%0ACreate Date: 2014-12-16 12:13:55.759378%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '3025c44bdb2'%0Adown_revision = None%0A%0Afrom alembic import op%0Aimport sqlalchemy as sa%0A%0A%0Adef upgrade():%0A...
e21657f377cab4319c1a3ce6fedc76d15c8e6c0a
UVA 11777 Automate the grades
cp-book/ch2/lineards/collections/_11777_AutomateTheGrades.py
cp-book/ch2/lineards/collections/_11777_AutomateTheGrades.py
Python
0.999999
@@ -0,0 +1,1157 @@ +# Problem name: 11777 Automate the Grades%0A# Problem url: https://uva.onlinejudge.org/external/117/11777.pdf%0A# Author: Andrey Yemelyanov%0A%0Aimport sys%0Aimport math%0A%0Adef readline():%0A%09return sys.stdin.readline().strip()%0A%0Adef main():%0A%09n_tests = int(readline())%0A%09for test in ran...
8eaf6eca9c0bf1be8ef5b76e166098b1cd35cef7
remove bootloaderiness for easy compile
boards/NRF52832DK.py
boards/NRF52832DK.py
#!/bin/false # This file is part of Espruino, a JavaScript interpreter for Microcontrollers # # Copyright (C) 2013 Gordon Williams <gw@pur3.co.uk> # # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at h...
Python
0
@@ -1292,16 +1292,17 @@ ompile.%0A +# 'bootlo
64c70f3f73d14d5bdd18cf5c4ad8b15ec745f517
Add helpful script for ascii checking - fyi @bruskiza
config/check_ascii.py
config/check_ascii.py
Python
0
@@ -0,0 +1,586 @@ +import json%0Afiles = %5B%22go-ussd_public.ibo_NG.json%22%5D%0A%0A%0Adef is_ascii(s):%0A return all(ord(c) %3C 128 for c in s)%0A%0Acurrent_message_id = 0%0Afor file_name in files:%0A json_file = open(file_name, %22rU%22).read()%0A json_data = json.loads(json_file)%0A print %22Proccessing...
289ce4a720c5863f6a80e1b86083fd2919b52f14
Add file for tests of start symbol as not nonterminal
tests/startsymbol_tests/NotNonterminalTest.py
tests/startsymbol_tests/NotNonterminalTest.py
Python
0.000001
@@ -0,0 +1,258 @@ +#!/usr/bin/env python%0A%22%22%22%0A:Author Patrik Valkovic%0A:Created 10.08.2017 23:12%0A:Licence GNUv3%0APart of grammpy%0A%0A%22%22%22%0A%0Afrom unittest import TestCase, main%0Afrom grammpy import *%0A%0A%0Aclass NotNonterminalTest(TestCase):%0A pass%0A%0A%0Aif __name__ == '__main__':%0A ma...
764f02e5e8c53b47cb2e28375a049accba442f0c
Create __init__.py
app/__init__.py
app/__init__.py
Python
0.000429
@@ -0,0 +1,45 @@ +# -*- encoding: utf-8 -*-%0A%0A# app/__init__.py%0A
d9291843d575e587efdd7aa0c4605fee766dc232
clean up test queries
examples/test_query.py
examples/test_query.py
Python
0.000007
@@ -0,0 +1,1573 @@ +from raco import RACompiler%0Afrom raco.language import CCAlgebra, MyriaAlgebra%0Afrom raco.algebra import LogicalAlgebra%0A%0Aimport logging%0Alogging.basicConfig(level=logging.DEBUG)%0ALOG = logging.getLogger(__name__)%0A%0A%0Adef testEmit(query, name):%0A LOG.info(%22compiling %25s%22, query)%...
acfa4877ac50a3895cc9f9cb2e349f948d4b8001
add a script to fetch official hero data from battle.net
bin/get_official_heroes.py
bin/get_official_heroes.py
Python
0
@@ -0,0 +1,869 @@ +import sys%0A%0Afrom selenium import webdriver%0Afrom selenium.common.exceptions import WebDriverException%0A%0A%22%22%22%0AThe official heroes listing on battle.net is populated by a list of%0AObjects defined in JS (window.heroes). This script fetches the full%0Alist and outputs a list of tuples rel...
381c2537eff5003758d552281edfd885ee40ab80
Add migrations
sideloader/migrations/0003_auto_20141203_1708.py
sideloader/migrations/0003_auto_20141203_1708.py
Python
0.000001
@@ -0,0 +1,921 @@ +# -*- 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 ('sideloader', '0002_auto_20141203_1611'),%0A %5D%0A%0A operations = %5B%0A migrations.Alte...
f405829f9f4bed9c833f7e25dc97610e34b5dd71
Add JSONField tests
cornflake/tests/fields/test_json_field.py
cornflake/tests/fields/test_json_field.py
Python
0.000001
@@ -0,0 +1,717 @@ +import pytest%0A%0Afrom cornflake.fields import JSONField%0A%0A%0A@pytest.mark.parametrize(('value', 'expected'), %5B%0A (True, True),%0A (False, False),%0A (123, 123),%0A (123.456, 123.456),%0A ('foo', 'foo'),%0A (%5B'foo', 'bar'%5D, %5B'foo', 'bar'%5D),%0A (%7B'foo': 'bar'%7D, ...
8df06647abc7e5125e88af68000f04ac9eca3290
add missing file
quadpy/_exception.py
quadpy/_exception.py
Python
0.000003
@@ -0,0 +1,39 @@ +class QuadpyError(Exception):%0A pass%0A
f641c8aa8e2eb5d98a90a10813fae6af4b136133
Add command that reindexes all tenants in parallel
bluebottle/clients/management/commands/reindex.py
bluebottle/clients/management/commands/reindex.py
Python
0.000001
@@ -0,0 +1,1124 @@ +from optparse import make_option%0A%0Aimport subprocess%0Afrom multiprocessing import Pool%0Afrom bluebottle.common.management.commands.base import Command as BaseCommand%0A%0Afrom bluebottle.clients.models import Client%0A%0A%0Adef reindex(schema_name):%0A print(f'reindexing tenant %7Bschema_nam...
1bfc53f5645d6dc7dbbdd020f23e86bebfdc2fc9
Add quick.py (quicksort)
python/quick.py
python/quick.py
Python
0.000001
@@ -0,0 +1,634 @@ +#!/usr/bin/env python3%0A%0Adef main():%0A arr = %5B%5D%0A fname = sys.argv%5B1%5D%0A with open(fname, 'r') as f:%0A for line in f:%0A arr.append(int(line.rstrip('%5Cr%5Cn')))%0A quicksort(arr, start=0, end=len(arr)-1)%0A print('Sorted list is: ', arr)%0A return%0A...
25a6ad2a6b37bac4dd553c4e534092f2261d6037
Add response classes
client/responses.py
client/responses.py
Python
0.000001
@@ -0,0 +1,618 @@ +%0A%0Aclass SuccessResponse:%0A def __new__(cls, data=None, text=None, *args, **kwargs):%0A return %7B%0A 'status_code': 200,%0A 'ok': True,%0A 'data': data,%0A 'text': text%0A %7D%0A%0A%0Aclass NonSuccessResponse:%0A def __new__(cls, st...
d89bb401926698dc829be937d8f9c1959ecfd580
make ok,eq actual functions
cement/utils/test.py
cement/utils/test.py
"""Cement testing utilities.""" import unittest from ..core import backend, foundation # shortcuts from nose.tools import ok_ as ok from nose.tools import eq_ as eq from nose.tools import raises from nose import SkipTest class TestApp(foundation.CementApp): """ Basic CementApp for generic testing. "...
Python
0.000012
@@ -510,32 +510,8 @@ %22%22%22%0A - ok = ok%0A eq = eq%0A @@ -507,32 +507,32 @@ %22%22%22%0A %0A + def __init__ @@ -610,25 +610,29 @@ , **kw)%0A + %0A - def setU @@ -884,29 +884,25 @@ e_app()%0A - %0A + def make @@ -1442,24 +1442,24 @@ %5B_hook%5D %0A - ...
8e1e6585c4bfa76ebbd945d765c6a4a3dc98025d
Add new package: dnstracer (#18933)
var/spack/repos/builtin/packages/dnstracer/package.py
var/spack/repos/builtin/packages/dnstracer/package.py
Python
0
@@ -0,0 +1,867 @@ +# 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 Dnstracer(Package):%0A %22%22%22Dnstracer determines whe...
2f889b045c1a03b3b046127380f15909ea117265
add new package (#25844)
var/spack/repos/builtin/packages/py-kornia/package.py
var/spack/repos/builtin/packages/py-kornia/package.py
Python
0
@@ -0,0 +1,716 @@ +# Copyright 2013-2021 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 PyKornia(PythonPackage):%0A %22%22%22Open Source Differe...
e73aac38882b90e7219035800b400c2ed1e181ef
add http data wrapper that can be used to specify options for a specific request
robj/lib/httputil.py
robj/lib/httputil.py
Python
0
@@ -0,0 +1,3214 @@ +#%0A# Copyright (c) 2010 rPath, Inc.%0A#%0A# This program is distributed under the terms of the MIT License as found %0A# in a file called LICENSE. If it is not present, the license%0A# is always available at http://www.opensource.org/licenses/mit-license.php.%0A#%0A# This program is distributed in ...
bc2abe4c295a371358064952e6c3afa395a4bd13
Rename Longest-Common-Prefix.py to LongestCommonPrefixtwo.py
leetcode/14.-Longest-Common-Prefix/LongestCommonPrefixtwo.py
leetcode/14.-Longest-Common-Prefix/LongestCommonPrefixtwo.py
Python
0.999999
@@ -0,0 +1,712 @@ +#!/usr/bin/python%0A#_*_ coding:utf-8 _*_%0A%0Aclass Solution(object): %0A def longestCommonPrefix(self, strs): %0A %22%22%22 %0A :type strs: List%5Bstr%5D %0A :rtype: str %0A %22%22%22%0A strNum=len(strs) #%E5%AD%97%E7%AC%A6%E4%B8%B2%E7%9A%84%E9%95%BF%E5%BA%A...
5f9c9500296627a94221ecd9614209a2c791e8b9
remove pointless condition
plugins/messages.py
plugins/messages.py
import random class Message: def __init__(self, sent, msg): self.sent = sent self.msg = msg def replyFormat(self): return 'From {user}: {msg}'.format(user = self.sent, msg = self.msg) class MessageDatabase: def __init__(self): self.messages = {} def pendingMessages(self...
Python
0.000581
@@ -1206,41 +1206,8 @@ nt %3E - 0 and len(self.messages%5Buser%5D) %3E 0:%0A @@ -1797,17 +1797,16 @@ essages: - %0A @@ -1853,22 +1853,16 @@ ormat()) - %0A
badbf8c89216b97ac29ea3582d99d28535f82a7e
Update __init__.py
slither/__init__.py
slither/__init__.py
from slither import slither __all__ = ['slither','Mouse','Stage','Sprite','Sound']
Python
0.000072
@@ -1,20 +1,14 @@ from -slither +. import
79df8ab80e6b14f16af125895f5b7338e5c41a60
add IOTools
base/IOTools.py
base/IOTools.py
Python
0.000001
@@ -0,0 +1,2117 @@ +import ROOT%0Aimport os%0A%0A%0Aclass Writer:%0A def __init__(self, directory=None):%0A %22%22%22%0A%0A :param directory:%0A %22%22%22%0A if directory is None:%0A directory = os.path.abspath(os.curdir)%0A self.dir = directory%0A self.__check_an...
2786dd91b0bb7dc8849e3549ff40de28d72d40d5
add a django multi-database router
rdrf/rdrf/db.py
rdrf/rdrf/db.py
Python
0.000001
@@ -0,0 +1,2781 @@ +from io import StringIO%0Aimport os%0A%0Afrom django.core.management import call_command%0Afrom django.db import connections%0A%0Aclass RegistryRouter:%0A # Whether clinical db is configured at all.%0A one_db = %22clinical%22 not in connections%0A # Whether clinical db is configured to be t...
0b6f6a9fd3916d8a028d5c3ccf4ca4a0277b9781
Add arena class prototype
src/arena.py
src/arena.py
Python
0
@@ -0,0 +1,270 @@ +import jsonpickle%0A%0Aclass ArenaType():%0A%09Circle = 0%0A%09Square = 1%0A%0Aclass ArenaCoverType():%0A%09Soil = 0%0A%09Sand = 1%0A%09Grass = 2%0A%09Stone = 3%0A%0Aclass Arena():%0A%09def __init__(self, name, size, stype, cover):%0A%09%09self.name = name%0A%09%09self.size = size%0A%09%09self.type =...
4b0a21dd813d58370805053e60376f64b5927cd9
Add tutorial for MakeNumpyDataFrame
tutorials/dataframe/df032_MakeNumpyDataFrame.py
tutorials/dataframe/df032_MakeNumpyDataFrame.py
Python
0
@@ -0,0 +1,828 @@ +## %5Cfile%0A## %5Cingroup tutorial_dataframe%0A## %5Cnotebook%0A## Read data from Numpy arrays into RDataFrame.%0A##%0A## %5Cmacro_code%0A## %5Cmacro_output%0A##%0A## %5Cdate March 2021%0A## %5Cauthor Stefan Wunsch (KIT, CERN)%0A%0Aimport ROOT%0Aimport numpy as np%0A%0A# Let's create some data in nu...
93f852782a7148887b3dea0d52c5dde1e0fefb58
Fix --var=val arg handling.
src/python/m5/__init__.py
src/python/m5/__init__.py
# Copyright (c) 2005 The Regents of The University of Michigan # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: redistributions of source code must retain the above copyright # notice, this list ...
Python
0
@@ -5109,32 +5109,58 @@ g.split('=', 1)%0A + var = var%5B2:%5D%0A except V @@ -5306,20 +5306,20 @@ e -val( +xec %22%25s = %25s @@ -5338,17 +5338,16 @@ pr(val)) -) %0A eli
f36a3e4e6cfbc5d3aa14017dcfea6e0fc67514f0
add delete_environment command
ebs_deploy/commands/delete_environment_command.py
ebs_deploy/commands/delete_environment_command.py
Python
0.000003
@@ -0,0 +1,1161 @@ +from ebs_deploy import out, parse_env_config%0A%0A%0Adef add_arguments(parser):%0A %22%22%22%0A Args for the delete environment command%0A %22%22%22%0A parser.add_argument('-e', '--environment',%0A help='Environment name', required=True)%0A%0A%0Adef execute(helper,...
cf4e468ed28a7e750adfbcd41235ac5b90cb562b
Add new package: diffmark (#18930)
var/spack/repos/builtin/packages/diffmark/package.py
var/spack/repos/builtin/packages/diffmark/package.py
Python
0
@@ -0,0 +1,658 @@ +# 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 Diffmark(AutotoolsPackage):%0A %22%22%22Diffmark is a DS...
ddff4237ae0bb8dd2575265707a843f4497ccbf2
Create headache.py
headache.py
headache.py
Python
0.001409
@@ -0,0 +1,831 @@ +%22%22%22%0A%0Apython plaintext obfuscator%0A%0Aby n.bush%0A%0A%22%22%22%0Aimport string%0Aimport random%0A%0A%0Adef mess_maker(size=6, chars=string.ascii_uppercase + string.ascii_lowercase + string.digits):%0A return ''.join(random.choice(chars) for x in range(size))%0A%0Adef headache(text):%0A ...
a7d6344428ef43374fb82f5b357968ec38402984
Create test_step_motor_Model_28BYJ_48p.py
test/test_step_motor_Model_28BYJ_48p.py
test/test_step_motor_Model_28BYJ_48p.py
Python
0.00001
@@ -0,0 +1,183 @@ +from gadgets.motors.step_motor import Model_28BYJ_48%0Ast_mot = Model_28BYJ_48(%5B11,15,16,18%5D)%0A%0Afor i in range(2):%0A st_mot.angular_step(60,direction=2,waiting_time=2,bi_direction=True) %0A
4585d6426a6c2945a359bbe02c58702a07e68746
Create new package. (#6209)
var/spack/repos/builtin/packages/r-gsubfn/package.py
var/spack/repos/builtin/packages/r-gsubfn/package.py
Python
0
@@ -0,0 +1,2399 @@ +##############################################################################%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...
e76fa7d23894bb88d47b761f683b4bbd797ef889
Add Helpers object for cleaner helper syntax
knights/utils.py
knights/utils.py
Python
0
@@ -0,0 +1,190 @@ +%0Aclass Helpers:%0A '''%0A Provide a cheaper way to access helpers%0A '''%0A def __init__(self, members):%0A for key, value in members.items():%0A setattr(self, key, value)%0A
6c0e5b7823be4d2defc9f0ff7b4abe76bc6f9af7
sequence learner abc
marmot/learning/sequence_learner.py
marmot/learning/sequence_learner.py
Python
0.999952
@@ -0,0 +1,1016 @@ +# this is an abstract class representing a sequence learner, or 'structured' learner%0A# implementations wrap various sequence learning tools, in order to provide a consistent interface within Marmot%0A%0Afrom abc import ABCMeta, abstractmethod%0A%0Aclass SequenceLearner(object):%0A%0A __metaclas...
4fe6f81e1ce58474761b7bae673e92e1d08c75b3
required drilldown*s* not singular
cubes/backends/mixpanel/store.py
cubes/backends/mixpanel/store.py
# -*- coding=utf -*- from ...model import * from ...browser import * from ...stores import Store from ...errors import * from .mixpanel import * from string import capwords DIMENSION_COUNT_LIMIT = 100 time_dimension_md = { "name": "time", "levels": ["year", "month", "day", "hour"], "hierarchies": [ ...
Python
0.99897
@@ -1946,16 +1946,17 @@ rilldown +s might b @@ -2049,25 +2049,28 @@ rilldown +s %22: +%5B %22time%22 +%5D ,%0A
2838711c7fa12525c2ae6670bb130999654fe7ea
add shortest-palindrome
vol5/shortest-palindrome/shortest-palindrome.py
vol5/shortest-palindrome/shortest-palindrome.py
Python
0.999999
@@ -0,0 +1,580 @@ +#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# @Author: Zeyuan Shang%0A# @Date: 2015-11-19 20:43:07%0A# @Last Modified by: Zeyuan Shang%0A# @Last Modified time: 2015-11-19 20:43:21%0Aclass Solution(object):%0A def shortestPalindrome(self, s):%0A %22%22%22%0A :type s: str%0A ...
10f72d72e988bf4aa570e21b0e0d6979edb843a7
add example "fit text path into a box"
examples/addons/fit_text_path_into_box.py
examples/addons/fit_text_path_into_box.py
Python
0
@@ -0,0 +1,1096 @@ +# Copyright (c) 2021, Manfred Moitzi%0A# License: MIT License%0A%0Afrom pathlib import Path%0Aimport ezdxf%0Afrom ezdxf import path, zoom%0Afrom ezdxf.math import Matrix44%0Afrom ezdxf.tools import fonts%0Afrom ezdxf.addons import text2path%0A%0ADIR = Path('~/Desktop/Outbox').expanduser()%0Afonts....
e075b0b1c8d581107209e869eda7f6ff07a7321c
Add script to create a historic->modern dictionary
reverse_dict.py
reverse_dict.py
Python
0
@@ -0,0 +1,1517 @@ +%22%22%22Reverse modern-%3Ehistoric spelling variants dictonary to historic-%3Emodern%0Amappings%0A%22%22%22%0Aimport argparse%0Aimport codecs%0Aimport json%0Afrom collections import Counter%0A%0Aif __name__ == '__main__':%0A parser = argparse.ArgumentParser()%0A parser.add_argument('input_dic...