commit
stringlengths
40
40
subject
stringlengths
1
1.49k
old_file
stringlengths
4
311
new_file
stringlengths
4
311
new_contents
stringlengths
1
29.8k
old_contents
stringlengths
0
9.9k
lang
stringclasses
3 values
proba
float64
0
1
c9a0fb540a9ee8005c1ee2d70613c39455891bee
Add analyze_bound_horizontal tests module
tests/plantcv/test_analyze_bound_horizontal.py
tests/plantcv/test_analyze_bound_horizontal.py
import pytest import cv2 from plantcv.plantcv import analyze_bound_horizontal, outputs @pytest.mark.parametrize('pos,exp', [[200, 58], [-1, 0], [100, 0], [150, 11]]) def test_analyze_bound_horizontal(pos, exp, test_data): # Clear previous outputs outputs.clear() # Read in test data img = cv2.imread(te...
Python
0.000001
198cf78895db88a8986926038e817ebb2bf75eb2
add migration for notification tables
portal/migrations/versions/458dd2fc1172_.py
portal/migrations/versions/458dd2fc1172_.py
from alembic import op import sqlalchemy as sa """empty message Revision ID: 458dd2fc1172 Revises: 8ecdd6381235 Create Date: 2017-12-21 16:38:49.659073 """ # revision identifiers, used by Alembic. revision = '458dd2fc1172' down_revision = '8ecdd6381235' def upgrade(): # ### commands auto generated by Alembic...
Python
0
8c7fa4e16805dc9e8adbd5615c610be8ba92c444
Add argparse tests for gatherkeys
ceph_deploy/tests/parser/test_gatherkeys.py
ceph_deploy/tests/parser/test_gatherkeys.py
import pytest from ceph_deploy.cli import get_parser class TestParserGatherKeys(object): def setup(self): self.parser = get_parser() def test_gather_help(self, capsys): with pytest.raises(SystemExit): self.parser.parse_args('gatherkeys --help'.split()) out, err = capsys....
Python
0
5fb08288c1250174a7de2caa9163f49a0a9d761a
RSSD ID can be null
institutions/respondants/migrations/0005_auto__chg_field_institution_rssd_id.py
institutions/respondants/migrations/0005_auto__chg_field_institution_rssd_id.py
# -*- coding: utf-8 -*- from south.utils import datetime_utils as datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Institution.rssd_id' db.alter_column('respondants_inst...
Python
0.999997
2803b237af18c6d5cd0613eaf4eccf2b61e65100
Create afImgPanel.py
scripts/afImgPanel.py
scripts/afImgPanel.py
import pymel.core as pm import pymel.all as pa imgOp = 0.3 imgDep = 10 #get current camera curCam = pm.modelPanel(pm.getPanel(wf=True),q=True,cam=True) #select image and creat imagePlane and setup fileNm = pm.fileDialog2(ds=0,fm=1,cap='open',okc='Select Image') ImgPln = pm.imagePlane(fn=fileNm[0],lookThrough=curCam,m...
Python
0.000001
96a6f45dd73819ebbe11169cc17bf3c056ce7a9e
Add sfp_api_recon_dev module
modules/sfp_api_recon_dev.py
modules/sfp_api_recon_dev.py
# -*- coding: utf-8 -*- # ------------------------------------------------------------------------------- # Name: sfp_api_recon_dev # Purpose: Search api.recon.dev for subdomains. # # Authors: <bcoles@gmail.com> # # Created: 2020-08-14 # Copyright: (c) bcoles 2020 # Licence: GPL # -------------...
Python
0.000002
f24fe32329625ec037a9afc8d3bdeed5f41e69a0
Add a script for easy diffing of two Incars.
scripts/diff_incar.py
scripts/diff_incar.py
#!/usr/bin/env python ''' Created on Nov 12, 2011 ''' __author__="Shyue Ping Ong" __copyright__ = "Copyright 2011, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "shyue@mit.edu" __date__ = "Nov 12, 2011" import sys import itertools from pymatgen.io.vaspio import Incar from p...
Python
0.999906
7e2170feef60866b8938595f674ae4dd70c5cc46
Add benchmark for F.transpose()
python/benchmark/function/test_transpose.py
python/benchmark/function/test_transpose.py
# Copyright 2022 Sony Group Corporation. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to ...
Python
0.000002
c36ae47bee44ff8aa8eaf17f8ded88192d7a6573
implement query term search
queryAnswer.py
queryAnswer.py
import pickle # Loads the posting Index index = open("posIndex.dat", "rb"); posIndex = pickle.load(index); print posIndex['made']; query = "Juan made of youtube" # query = raw_input('Please enter your query: '); queryTerms = ' '.join(query.split()); queryTerms = queryTerms.split(' '); k = len(queryTerms); print (que...
Python
0.999171
625d250c7eabcf48292590a6b0ca57f1b3cc7c49
Add meshprocessing scratch
scratch/meshprocessing.py
scratch/meshprocessing.py
import networkx as nx from time import time import numpy as np def mesh2graph(faces): """ Converts a triangular mesh to a graph only taking the connectivity into account """ g = nx.Graph() for i in range(len(faces)): g.add_edge(faces[i,0], faces[i,1]) g.add_edge(faces[i,1], faces[i,2]) ...
Python
0.000001
6a13511db8401a17a5c6feb7071af821211c2836
Create sitemap urls
opps/sitemaps/urls.py
opps/sitemaps/urls.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf.urls import patterns, url from django.contrib.sitemaps import views as sitemap_views from opps.sitemaps.sitemaps import GenericSitemap, InfoDisct sitemaps = { 'articles': GenericSitemap(InfoDisct(), priority=0.6), } sitemaps_googlenews = { 'arti...
Python
0.000207
78d926434ff1ad6ade0764ac18cca2413a5beccb
Bump dev version in master
fabric/version.py
fabric/version.py
""" Current Fabric version constant plus version pretty-print method. This functionality is contained in its own module to prevent circular import problems with ``__init__.py`` (which is loaded by setup.py during installation, which in turn needs access to this version information.) """ from subprocess import Popen, ...
""" Current Fabric version constant plus version pretty-print method. This functionality is contained in its own module to prevent circular import problems with ``__init__.py`` (which is loaded by setup.py during installation, which in turn needs access to this version information.) """ from subprocess import Popen, ...
Python
0
f18dc77d49a7c5154df11232f645dbb8e0f897dd
Remove bias
models/dual_encoder.py
models/dual_encoder.py
import tensorflow as tf import numpy as np from models import helpers FLAGS = tf.flags.FLAGS def get_embeddings(hparams): if hparams.glove_path and hparams.vocab_path: tf.logging.info("Loading Glove embeddings...") vocab_array, vocab_dict = helpers.load_vocab(hparams.vocab_path) glove_vectors, glove_dic...
import tensorflow as tf import numpy as np from models import helpers FLAGS = tf.flags.FLAGS def get_embeddings(hparams): if hparams.glove_path and hparams.vocab_path: tf.logging.info("Loading Glove embeddings...") vocab_array, vocab_dict = helpers.load_vocab(hparams.vocab_path) glove_vectors, glove_dic...
Python
0.000017
04d122d88bb9f71843df924e048b12de1976b847
Add missing migration
src/keybar/migrations/0008_entry_salt.py
src/keybar/migrations/0008_entry_salt.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('keybar', '0007_remove_entry_key'), ] operations = [ migrations.AddField( model_name='entry', name='s...
Python
0.0002
3ac5648f8f3ab9e2dd6d93002f63c65bedb3e637
Patch beanstalkd collector
src/collectors/beanstalkd/beanstalkd.py
src/collectors/beanstalkd/beanstalkd.py
# coding=utf-8 """ Collects the following from beanstalkd: - Server statistics via the 'stats' command - Per tube statistics via the 'stats-tube' command #### Dependencies * beanstalkc """ import re import diamond.collector try: import beanstalkc beanstalkc # workaround for pyflakes issue #13 ex...
# coding=utf-8 """ Collects the following from beanstalkd: - Server statistics via the 'stats' command - Per tube statistics via the 'stats-tube' command #### Dependencies * beanstalkc """ import re import diamond.collector try: import beanstalkc beanstalkc # workaround for pyflakes issue #13 ex...
Python
0.00001
531da297c57c7b359c37a743095c10e7ad0592cf
Add test_container
tests/test_container.py
tests/test_container.py
import pdir def test_acting_like_a_list(): dadada = 1 cadada = 1 vadada = 1 apple1 = 1 xapple2 = 1 result, correct = pdir(), dir() assert len(correct) == len(result) for x, y in zip(correct, result): assert x == y def test_acting_like_a_list_when_search(): dadada = 1 ...
Python
0.000003
79ebedc800c31b47bd0cc340de06dafcd6ade7f9
Add TwrOauth basic test
tests/test_twr_oauth.py
tests/test_twr_oauth.py
#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the righ...
Python
0
221f8a23c92e8fdb58589b7958d5a1fbe63c326b
Create utils.py
bitcoin/utils.py
bitcoin/utils.py
from bitcoin.main import * from bitcoin.pyspecials import * import urlparse, re def satoshi_to_btc(val): return (float(val) / 10**8) def btc_to_satoshi(val): return int(val * 10**8 + 0.5) # Return the address and btc_amount from the # parsed uri_string. If either of address # or amount is not found that part...
Python
0.000001
d15c8eaca5fb115b8600a8e743ae73a9edba9a5b
Initialize P04_datetimeModule
books/AutomateTheBoringStuffWithPython/Chapter15/P04_datetimeModule.py
books/AutomateTheBoringStuffWithPython/Chapter15/P04_datetimeModule.py
# This program uses the datetime module to manipulate dates and times. # The datetime Module import datetime, time print(datetime.datetime.now()) dt = datetime.datetime(2015, 10, 21, 16, 29, 0) print((dt.year, dt.month, dt.day)) print((dt.hour, dt.minute, dt.second)) print(datetime.datetime.fromtimestamp(1000000)) p...
Python
0.000008
8106c22a5c05f438eb9c6436af054fd1e72b103c
Add SK_IGNORE_FASTER_TEXT_FIX define for staging Skia change.
public/blink_skia_config.gyp
public/blink_skia_config.gyp
# # Copyright (C) 2012 Google Inc. 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 of conditions an...
# # Copyright (C) 2012 Google Inc. 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 of conditions an...
Python
0.000004
f7586e8009ae9d2cfdc471b7dbdc9cf5d171c53b
Create string2.py
google/string2.py
google/string2.py
#!/usr/bin/env python # Copyright 2010 Google Inc. # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 # Google's Python Class # http://code.google.com/edu/languages/google-python-class/ # Additional basic string exercises # D. verbing # Given a string, if its length is at l...
Python
0
e96aaab43a8433fd812cae91c0cdaed31486244f
Add sqlalchemy_sandbox.py for SQL DB experimentation
sqlalchemy_sandbox.py
sqlalchemy_sandbox.py
#!/usr/bin/env python3 """A Sandbox Script to allow me to play with and learn the SQALchemy Tools.""" import sys, argparse, os, random, sqlite3 from collections import OrderedDict try: import sqlalchemy as sqla from sqlalchemy.ext.declarative import declarative_base except ImportError: print('Error: Canno...
Python
0.000001
bb940826d78e44a4098023e83d788b3d915b9b1f
Revert "Add the GitHub-supported format extensions."
grip/constants.py
grip/constants.py
# The supported extensions, as defined by https://github.com/github/markup supported_extensions = ['.md', '.markdown'] # The default filenames when no file is provided default_filenames = map(lambda ext: 'README' + ext, supported_extensions)
# The supported extensions, as defined by https://github.com/github/markup supported_extensions = [ '.markdown', '.mdown', '.mkdn', '.md', '.textile', '.rdoc', '.org', '.creole', '.mediawiki', '.wiki', '.rst', '.asciidoc', '.adoc', '.asc', '.pod', ] # The default filenames when no ...
Python
0
7eaca8eea7adf6e1b8a487a78e9cde950d7221f7
Split out and speed up producer tests
test/test_producer_integration.py
test/test_producer_integration.py
import unittest import time from kafka import * # noqa from kafka.common import * # noqa from kafka.codec import has_gzip, has_snappy from .fixtures import ZookeeperFixture, KafkaFixture from .testutil import * class TestKafkaProducerIntegration(KafkaIntegrationTestCase): topic = 'produce_topic' @classmeth...
Python
0
f5718764185ce1149ed291601e4fe28f9cd2be06
add single list module for mini-stl (Python)
python/mini-stl/single_list.py
python/mini-stl/single_list.py
#!/usr/bin/python -e # -*- encoding: utf-8 -*- # # Copyright (c) 2013 ASMlover. 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 copyrigh...
Python
0
0be7f2fe05588d93eb478a4fa648d310055b3ce7
Add experimental generation code to make drafts from raster images
pyweaving/generators/raster.py
pyweaving/generators/raster.py
from .. import Draft from PIL import Image def point_threaded(im, warp_color=(0, 0, 0), weft_color=(255, 255, 255), shafts=40, max_float=8, repeats=2): """ Given an image, generate a point-threaded drawdown that attempts to represent the image. Results in a drawdown with bilateral symme...
Python
0
de325dbe53bbd28eddcbbf188f2689474994249b
add migration for new version of storedmessages
osmaxx-py/osmaxx/third_party_apps/stored_messages/migrations/0002_message_url.py
osmaxx-py/osmaxx/third_party_apps/stored_messages/migrations/0002_message_url.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('stored_messages', '0001_initial'), ] operations = [ migrations.AddField( model_name='message', name=...
Python
0
1472011cb8cd323357626443f714284feedfed62
add merge of ACIS provided data
scripts/climodat/use_acis.py
scripts/climodat/use_acis.py
"""Use data provided by ACIS to replace climodat data""" import requests import sys import psycopg2 import datetime SERVICE = "http://data.rcc-acis.org/StnData" def safe(val): if val in ['M', 'S']: return None if val == 'T': return 0.0001 try: return float(val) except: ...
Python
0
b333d95f3f4187b9d9b480ba8ff4985a62d65f41
Add tests for nginx version
tests/pytests/unit/modules/test_nginx.py
tests/pytests/unit/modules/test_nginx.py
import pytest import salt.modules.nginx as nginx from tests.support.mock import patch @pytest.fixture def configure_loader_modules(): return {nginx: {}} @pytest.mark.parametrize( "expected_version,nginx_output", [ ("1.2.3", "nginx version: nginx/1.2.3"), ("1", "nginx version: nginx/1"), ...
Python
0.999999
e77b9a5dff36b3318759a18a786c7cc08bb8ac3e
Create Scramble_String.py
Array/Scramble_String.py
Array/Scramble_String.py
Given a string s1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively. Below is one possible representation of s1 = "great": great / \ gr eat / \ / \ g r e at / \ a t To scramble the string, we may choose any non-leaf node an...
Python
0.000081
156d3c7035e4b7867d1e715c0bac98cf16d24d77
add script to fix workspace info for search
src/scripts/fix_workspace_info.py
src/scripts/fix_workspace_info.py
""" Fixes workspace info to do the following. 1. Make sure the "narrative" metadata field contains an int that points to the narrative. 1. Make sure the "narrative_nice_name" metadata field is correct. 2. Make sure the "is_temporary" metadata field exists and is correct. 3. Adds a count of the number of narrative cells...
Python
0
f25b69a6ad6777576e31d0b01c4fc2c2bbe02788
Create new.py
simple_mqtt/templates/new.py
simple_mqtt/templates/new.py
Python
0.000001
0ee5d568ddc1f37abedb94f32d6b7da0439e6a4d
Create title_retriever.py
solutions/title_retriever.py
solutions/title_retriever.py
''' Script that will scrape the title of the given website ''' import urllib import re def getstock(title): regex = '<title>(.+?)</title>' #find all contents within title braces pattern = re.compile(regex) #converts regex into a pattern that can be understood by re module htmlfile = urllib.urlopen(title) ...
Python
0.000003
071da9c0668d495e052baf5ad4d5bc9e068aa6a7
Create dict2xml.py
dict2xml.py
dict2xml.py
# Python Dictionary to XML converter # Written by github.com/Pilfer # @CodesStuff class dict2xml: def __init__(self, debug = False): self.debug = debug if self.debug: print "json2xml class has been loaded" def genXML(self,xmldict): tag = xmldict['tag'] attrs = ...
Python
0
320da5dcc192d654d09ea631e9684f26e97795c0
add mitm script
reversing/400a-graphic/mitm.py
reversing/400a-graphic/mitm.py
vals = [0xdeadbeef,0xcafebabe,0xdeadbabe,0x8badf00d,0xb16b00b5,0xcafed00d,0xdeadc0de,0xdeadfa11,0xdefec8ed,0xdeadfeed,0xfee1dead,0xfaceb00b,0xfacefeed,0x000ff1ce,0x12345678,0x743029ab,0xdeed1234,0x00000000,0x11111111,0x11111112,0x11111113,0x42424242] start = 0xdeadbeef target = 0x764c648c group1 = vals[:11] group2 = ...
Python
0
d80f9ef4592cde488ece9f95b662f5e1e73eac42
change database
lib/wunderlist.py
lib/wunderlist.py
#!/usr/bin/env python from lib.base import BaseHandler import tornado.locale import tornado.httpserver import tornado.ioloop import tornado.options import tornado.web from datetime import datetime from tornado.options import define, options import pymongo if __name__ == "__main__": define("port", default=8000,...
Python
0.000001
056bd290a4df08876109ef4e2da1115783a06f25
Add examples for setting classes attribute
examples/classes.py
examples/classes.py
from flask_table import Table, Col """If we want to put an HTML class onto the table element, we can set the "classes" attribute on the table class. This should be an iterable of that are joined together and all added as classes. If none are set, then no class is added to the table element. """ class Item(object):...
Python
0
f16187d5943158d82fc87611f998283789b5ecdf
Add libarchive 3.1.2
packages/libarchive.py
packages/libarchive.py
Package ('libarchive', '3.1.2', sources = ['http://libarchive.org/downloads/%{name}-%{version}.tar.gz'], configure_flags = [ '--enable-bsdtar=shared', '--enable-bsdcpio=shared', '--disable-silent-rules', '--without-nettle'] )
Python
0.000004
b9b2b87f0d630de931765c1c9f448e295440e611
Create fetch_qt_version.py
fetch_qt_version.py
fetch_qt_version.py
"""Module to return the Qt version of a Qt codebase. This module provides a function that returns the version of a Qt codebase, given the toplevel qt5 repository directory. Note, the `qt5` directory applies to both Qt 5.x and Qt 6.x If it is run standalone with a python interpreter and not as part of another Python m...
Python
0
f9b38f675df9752a4b5309df059c6d15a1e1b3c2
Add module for range support.
ex_range.py
ex_range.py
from collections import namedtuple from vintage_ex import EX_RANGE_REGEXP import location EX_RANGE = namedtuple('ex_range', 'left left_offset separator right right_offset') def get_range_parts(range): parts = EX_RANGE_REGEXP.search(range).groups() return EX_RANGE( left=parts[1], ...
Python
0
15cf6b5d35e2fbaf39d419ddbe5da1b16247ccaa
add test_parse_table_options.py
tests/test_parse_table_options.py
tests/test_parse_table_options.py
#!/usr/bin/env python3 """ `header` and `markdown` is checked by `test_to_bool` instead """ from .context import pandoc_tables import panflute def test_parse_table_options(): options = { 'caption': None, 'alignment': None, 'width': None, 'table-width': 1.0, 'header': True, ...
Python
0.000005
71dd485685a481f21e03af6db5a4bc1f91a64ce9
Add service settings migration
nodeconductor/structure/migrations/0018_service_settings_plural_form.py
nodeconductor/structure/migrations/0018_service_settings_plural_form.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('structure', '0017_add_azure_service_type'), ] operations = [ migrations.AlterModelOptions( name='servicesettings...
Python
0
93a2caab2963423e40714ada59abcfeab5c57aea
Add NetBox pillar
salt/pillar/netbox.py
salt/pillar/netbox.py
# -*- coding: utf-8 -*- ''' A module that adds data to the Pillar structure from a NetBox API. Configuring the NetBox ext_pillar ==================================== .. code-block:: yaml ext_pillar: - netbox: api_url: http://netbox_url.com/api/ The following are optional, and determine whether or not...
Python
0
578f532bb7a6c75dd6526b9fe130879e0a7cc0e6
Pick best out of two outputs
session2/select_best_output.py
session2/select_best_output.py
import argparse, logging, codecs from nltk.translate.bleu_score import sentence_bleu as bleu def setup_args(): parser = argparse.ArgumentParser() parser.add_argument('out1', help = 'Output 1') parser.add_argument('out2', help = 'Output 2') parser.add_argument('input', help = 'Input') parser.add_ar...
Python
1
a595665ab75c5995f0cb3af7463215f9cd7aabf7
Add Miguel Grinberg's Flask API decorators from his PyCon talk
sandman/decorators.py
sandman/decorators.py
import functools import hashlib from flask import jsonify, request, url_for, current_app, make_response, g from .rate_limit import RateLimit from .errors import too_many_requests, precondition_failed, not_modified def json(f): @functools.wraps(f) def wrapped(*args, **kwargs): rv = f(*args, **kwargs) ...
Python
0
ca8d7773a2d1a5ce4195ce693ccd66bbf53af394
Read in proteinGroupts.txt from MS data
proteinGroupsParser.py
proteinGroupsParser.py
# -*- coding: utf-8 -*- """ Created on Sat Oct 10 08:46:25 2015 @author: student """ import pandas as pd #import numpy as np # read in file #peptideNames = """'Protein IDs’, 'Majority protein IDs’, 'Peptide counts (all)’, 'Peptide counts (razor+unique)’, 'Peptide counts (unique)’, 'Fasta headers’, 'Number of protein...
Python
0
3509585cd14bb51fb00b60df1dcb295bc561d679
Add _version.py file
py/desidatamodel/_version.py
py/desidatamodel/_version.py
__version__ = '0.2.0.dev71'
Python
0.000004
b3383e6c428eccdd67ddc4cfa90e6d22da35412a
Add lib/sccache.py helper script
script/lib/sccache.py
script/lib/sccache.py
import os import sys from config import TOOLS_DIR VERSION = '0.2.6' SUPPORTED_PLATFORMS = { 'cygwin': 'windows', 'darwin': 'mac', 'linux2': 'linux', 'win32': 'windows', } def is_platform_supported(platform): return platform in SUPPORTED_PLATFORMS def get_binary_path(): platform = sys.platform if no...
Python
0.000001
b7459feac37753928fcfc1fe25a0f40d21d89ecf
add collections07.py
trypython/stdlib/collections07.py
trypython/stdlib/collections07.py
# coding: utf-8 """ collections.namedtupleについてのサンプルです。 namedtupleの基本的な使い方については、collections04.py を参照。 """ import collections as cols from trypython.common.commoncls import SampleBase from trypython.common.commonfunc import pr class Sample(SampleBase): def exec(self): MyVal01 = cols.namedtuple('MyVal01', [...
Python
0
8302536cafa07a078cfb6629b5e9cc85e1798e1e
Add Appalachian Regional Commission.
inspectors/arc.py
inspectors/arc.py
#!/usr/bin/env python import datetime import logging import os from urllib.parse import urljoin from bs4 import BeautifulSoup from utils import utils, inspector # http://www.arc.gov/oig # Oldest report: 2003 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web team: # A...
Python
0
d834216bcc93eac7b324d95498d9580e3f769dfa
Add Government Printing Office.
inspectors/gpo.py
inspectors/gpo.py
#!/usr/bin/env python import datetime import logging from urllib.parse import urljoin from bs4 import BeautifulSoup from utils import utils, inspector # http://www.gpo.gov/oig/ # Oldest report: 2004 # options: # standard since/year options for a year range to fetch from. # # Notes for IG's web team: # AUDIT_REPO...
Python
0
c2eeb3eb6909b6763e4ae6d4110f316f4d9b4e65
Add a generator for clocking primitives
timing/tools/gen_clk.py
timing/tools/gen_clk.py
import random # CABGA400 clk_pins = "J2 K2 K3 L5 L7 M2 V1 Y2 R5 Y5 R7 W7 T10 W10 W11 Y12 W14 T13 N19 M19 M17 L20 L16 L13 E13 E12".split(" ") banks = "7 7 7 6 6 6 5 5 5 5 4 4 4 4 3 3 3 3 2 2 2 1 1 1 0 0".split(" ") plls = ["PLL_LLC", "PLL_LRC", "PLL_ULC"] pll_pins = ["CLKOP", "CLKOS", "CLKOS2", "CLKOS3", "CLKOS4", "CL...
Python
0
d3c9a6bdc1b8cfb56f9ad408f5257b9ac518b2ac
Add preprocessor
scripts/preprocess.py
scripts/preprocess.py
#!/usr/bin/env python import argparse import os def preprocess(path): includes = set() res = [] def preprocess_line(path, line): if line.strip().startswith('#'): line = line.strip() if line.startswith('#include') and len(line.split('"')) >= 3: lx = line.sp...
Python
0.000138
e285c097be60f9db5fae075f21b7450f403640d2
add scaffold for an AvailabilityAssessment class
python/cvmfs/availability.py
python/cvmfs/availability.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Created by René Meusel This file is part of the CernVM File System auxiliary tools. """ import cvmfs class WrongRepositoryType(Exception): def __init__(self, repo, expected_type): assert repo.type != expected_type self.repo = repo ...
Python
0
0e9da5d0099b9c7b527250d6bf8051242e77103a
Add script for showing the results
triangular_lattice/distances_analyze.py
triangular_lattice/distances_analyze.py
#!/usr/bin/env python # -*- coding:utf-8 -*- # # written by Shotaro Fujimoto # 2016-10-12 import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.axes3d import Axes3D if __name__ == '__main__': # result_data_path = "./results/data/distances/beta=0.00_161012_171430.npz" # result_data_pat...
Python
0
29e170f9f92f8327c71a9dfc2b9fb9e18947db72
create predictions on pre-trained models
source/generate_predictions.py
source/generate_predictions.py
import numpy as np import pandas as pd from sklearn.externals import joblib from data_preprocessing import join_strings from model import mlb, count_vectorizer_test_x, tfidf_vectorizer_test_x, file_cnt, file_tfidf count_vectorizer_model, tfidf_vectorizer_model = joblib.load(file_cnt), joblib.load(file_tfidf) print("B...
Python
0.000001
c6358b282ea28dd113c9053dab0fe2fa66f4d59d
Allow metrics to start with a braces expression
webapp/graphite/render/grammar.py
webapp/graphite/render/grammar.py
from graphite.thirdparty.pyparsing import * ParserElement.enablePackrat() grammar = Forward() expression = Forward() # Literals intNumber = Combine( Optional('-') + Word(nums) )('integer') floatNumber = Combine( Optional('-') + Word(nums) + Literal('.') + Word(nums) )('float') aString = quotedString('string') ...
from graphite.thirdparty.pyparsing import * ParserElement.enablePackrat() grammar = Forward() expression = Forward() # Literals intNumber = Combine( Optional('-') + Word(nums) )('integer') floatNumber = Combine( Optional('-') + Word(nums) + Literal('.') + Word(nums) )('float') aString = quotedString('string') ...
Python
0.000005
1fdd1f306d45f6aeee91c7f016f7c37286ee3b3b
clear signing
lang/python/examples/howto/clear-sign-file.py
lang/python/examples/howto/clear-sign-file.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- from __future__ import absolute_import, division, unicode_literals # Copyright (C) 2018 Ben McGinnes <ben@gnupg.org> # # This program is free software; you can redistribute it and/or modify it under # the terms of the GNU General Public License as published by the Free S...
Python
0
c199892e07217f164ae694d510b206bfa771090b
remove unused import
src/vmw/vco/components.py
src/vmw/vco/components.py
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
# Copyright (c) 2001-2010 Twisted Matrix Laboratories. # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, modify, me...
Python
0.000001
f76c06acf52094cd13cdf7087fa8d3914c2b992a
Add interactive module
sirius/interactive.py
sirius/interactive.py
"""Interactive sirius module Use this module to define variables and functions to be globally available when using 'from sirius.interactive import *' """ from pyaccel.interactive import * import sirius.SI_V07 as si_model import sirius.BO_V901 as bo_model __all__ = [name for name in dir() if not name.startswit...
Python
0.000001
f1e6926f964877acc3bfe0d667a199861b431ed7
add test_xadc
software/test_xadc.py
software/test_xadc.py
def main(wb): wb.open() regs = wb.regs # # # print("temperature: %f°C" %(regs.xadc_temperature.read()*503.975/4096 - 273.15)) print("vccint: %fV" %(regs.xadc_vccint.read()/4096*3)) print("vccaux: %fV" %(regs.xadc_vccaux.read()/4096*3)) print("vccbram: %fV" %(regs.xadc_vccbram.read()/4096*3)) # # # wb.close()
Python
0.000001
c2dab85f24e648c66daae847f19b605271ed858b
Add more threader tests
spec/threader_spec.py
spec/threader_spec.py
import queue from functools import partial from doublex import Spy, Mock from expects import expect, be from doublex_expects import have_been_called from pysellus import threader with description('the threader module'): with it('should create as many threads as the sum of len(values) of the supplied dict'): ...
from expects import expect, be from doublex import Spy, Mock from pysellus import threader with description('the threader module'): with it('should create as many threads as keys * values in the supplied dict'): a_stream = Mock() another_stream = Mock() foo = Spy() a_function = Sp...
Python
0
e6a137026ff9b84814199517a452d354e121a476
Create quiz_3.py
laboratorios/quiz_3.py
laboratorios/quiz_3.py
#dado un intervalo de tiempo en segundos, calcular los segundos restantes #corresponden para convertirse exactamente en minutos. Este programa debe #funcionar para 5 oportunidades. chance = 0 segundos_restantes = 0 while chance < 5: segundos = int (input("Introduzca sus segundos:")) chance +=1 if segundos / 60: ...
Python
0.001596
90851f4fdb1eb69bb3d6d953974d9a399d60bd13
add browser_render.py
5.动态内容/5.browser_render.py
5.动态内容/5.browser_render.py
#!/usr/bin/env python # coding:utf-8 # 渲染效果的类实现方式 # 定时器用于跟踪等待时间,并在截止时间到达时取消事件循环。否则,当出现网络问题时,事件循环就会无休止地运行下去 。 import re import csv import time import lxml.html try: from PySide.QtGui import QApplication from PySide.QtCore import QUrl, QEventLoop, QTimer from PySide.QtWebKit import QWebView except ImportEr...
Python
0.000002
58ac46511964ca1dd3de25d2b6053eb785e3e281
Add outlier detection util script.
util/detect-outliers.py
util/detect-outliers.py
#!/usr/bin/env python2 # # Detect outlier faces (not of the same person) in a directory # of aligned images. # Brandon Amos # 2016/02/14 # # Copyright 2015-2016 Carnegie Mellon University # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Licens...
Python
0
dad13d26aaf58ea186891e138ac9a10153363c8a
add vicon data extraction
script_r448_vicon_process.py
script_r448_vicon_process.py
import pickle import signal_processing as sig_proc dir_name = '../data/r448/r448_131022_rH/' img_ext = '.png' save_img = True show = False save_obj = True sp = sig_proc.Signal_processing(save_img, show, img_ext) filename='p0_3RW05' file_events=sp.load_csv(dir_name+filename+'_EVENTS.csv') file_analog=sp.load_csv(dir...
Python
0.000001
b46e7e31c5476c48e2a53d5a632354700d554174
Add test_html_fetchers
tests/test_html_fetchers.py
tests/test_html_fetchers.py
import os import sys sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) import unittest from unittest import mock from web_scraper.core import html_fetchers def mocked_requests_get(*args, **kwargs): """this method will be used by the mock to replace requests.get""" class MockResponse:...
Python
0.000001
b4f8e8d38636a52d3d4b199fdc670ff93eca33f6
Add prototype for filters module.
mltils/filters.py
mltils/filters.py
# pylint: disable=missing-docstring, invalid-name, import-error class VarianceFilter(object): pass class SimilarityFilter(object): pass class CorrelationFilter(object): pass
Python
0
b0f5c33461d08325581cc0ad272c7f2b39b8dc66
Fix typo.
metpy/calc/__init__.py
metpy/calc/__init__.py
import basic from basic import * __all__ = [] __all__.extend(basic.__all__)
import basic from basic import * __all__ == [] __all__.extend(basic.__all__)
Python
0.001604
167712a6640abca106bbcd50daf5dc22ba90083d
Fix log formatting
src/sentry/tasks/email.py
src/sentry/tasks/email.py
""" sentry.tasks.email ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import logging from django.core.mail import get_connection from sentry.tasks.base import inst...
""" sentry.tasks.email ~~~~~~~~~~~~~~~~~~ :copyright: (c) 2010-2014 by the Sentry Team, see AUTHORS for more details. :license: BSD, see LICENSE for more details. """ from __future__ import absolute_import, print_function import logging from django.core.mail import get_connection from sentry.tasks.base import inst...
Python
0.000005
5e1c58db69adad25307d23c240b905eaf68e1671
Add fade animation
src/fade_animation.py
src/fade_animation.py
import animation, colorsys def colorunpack(color): color = int(color) return ((color >> 16) / 255, ((color >> 8) & 255) / 0xff, (color & 0xff) / 0xff) def colorpack(color): return sum(int(color[i] * 0xff) << (16 - 8*i) for i in range(3)) class FadeAnimation(animation.Animation): ...
Python
0.000001
f537abe2ff1826a9decd9dace5597cbc4f7f318b
Add 1.6
1_arrays_hashtables/string_compression.py
1_arrays_hashtables/string_compression.py
def compress(string): count_array = [] element_count = 1 for index, character in enumerate(string[1:]): print(character, string[index]) if string[index] == character: element_count = element_count + 1 else: count_array.append(element_count) element...
Python
0.999996
3e15f6d64ccbb1f98ff64323a25304db662a45ba
Add nice_number function to format decimals to english
mycroft/util/format.py
mycroft/util/format.py
# -*- coding: iso-8859-15 -*- # Copyright 2017 Mycroft AI, Inc. # # This file is part of Mycroft Core. # # Mycroft Core is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (...
Python
0.002965
296efcc28e19fc76371496881a546f1ca52dc622
add nagios check for iembot availability
nagios/check_iembot.py
nagios/check_iembot.py
"""Ensure iembot is up.""" import sys import requests def main(): """Go Main Go.""" req = requests.get('http://iembot:9004/room/kdmx.xml') if req.status_code == 200: print("OK - len(kdmx.xml) is %s" % (len(req.content), )) return 0 print("CRITICAL - /room/kdmx.xml returned code %s" % ...
Python
0
1d0c0741f1605f3786a752288161c679ab271ea2
Add a utility file for aggregating decorators
website/addons/osfstorage/decorators.py
website/addons/osfstorage/decorators.py
import functools from webargs import Arg from webargs import core from framework.auth.decorators import must_be_signed from website.models import User from framework.exceptions import HTTPError from website.addons.osfstorage import utils from website.project.decorators import ( must_not_be_registration, must_hav...
Python
0.000001
bb8e7ee023d678e68d1da3018bf6d1d3d36d55bd
Create new package (#6588)
var/spack/repos/builtin/packages/perl-statistics-descriptive/package.py
var/spack/repos/builtin/packages/perl-statistics-descriptive/package.py
############################################################################## # Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC. # Produced at the Lawrence Livermore National Laboratory. # # This file is part of Spack. # Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved. # LLNL-CODE-64...
Python
0
81bcfe4a31d8e9ea92497288c3d264755949d809
check for some statistics on the dataset.
stats_about_tweet_data.py
stats_about_tweet_data.py
from collections import defaultdict import codecs import matplotlib.pyplot as plt import pylab as P import numpy as np F_IN = "usrs_with_more_than_20_tweets.dat" #F_OUT = "tweets_with_usrs_with_more_than_20_tweets.dat" #f_out = "usrs_with_more_than_20_tweets.dat" USR_TWEETS = defaultdict(int) def plot_hist(data): ...
Python
0
d7c0525a1b62bbe6b8425c0bb2dda0e1fad680b8
Create enforce.py
enforce.py
enforce.py
"""This plugins allows a user to enforce modes set on channels""" """e.g. enforcing +o on nick""" """Requires admin""" from utils import add_cmd, add_handler import utils from admin import deop name = "enforce" cmds = ["enforce"] def main(irc): if name not in irc.plugins.keys(): irc.plugins[name] = {} ...
Python
0
12f7dddcbe8c7c2160bf8de8f7a9c3082b950003
Create longest-harmonious-subsequence.py
Python/longest-harmonious-subsequence.py
Python/longest-harmonious-subsequence.py
# Time: O(n) # Space: O(n) class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ lookup = collections.defaultdict(int) result = 0 for num in nums: lookup[num] += 1 for diff in [-1, 1]: ...
Python
0.999951
d7cc3d6590d1d6d46bdf780b93e76ea6aa50334d
Create peak-index-in-a-mountain-array.py
Python/peak-index-in-a-mountain-array.py
Python/peak-index-in-a-mountain-array.py
# Time: O(logn) # Space: O(1) # Let's call an array A a mountain if the following properties hold: # # A.length >= 3 # There exists some 0 < i < A.length - 1 # such that A[0] < A[1] < ... A[i-1] < A[i] > A[i+1] > ... > A[A.length - 1] # Given an array that is definitely a mountain, # return any i such that # A[0] < A...
Python
0.032261
64eab4beaf4e00d47423ea027ec6f40129ee2e95
Create execi-3.py
execi-3.py
execi-3.py
n1 = int(input("Digite um valor: ")) if n1 < 0: print (n1 * -1) elif n1 > 10: n2 = int(input("Digite outro valor: ")) print (n1 - n2) else: print (n1/5.0)
Python
0.000001
7dce21cc8fa3b81e150ed6586db8ca80cd537fc7
Add compat module to test package
test/compat.py
test/compat.py
# -*- coding: utf-8 -*- ''' A common module for compatibility related imports and definitions used during testing ''' from __future__ import unicode_literals import unittest from six import assertCountEqual, PY2 try: from unittest.mock import Mock, MagicMock, patch # @NoMove except ImportError: from mock imp...
Python
0
9a97847419ad569b1f9f3d302507aca8544944e2
test file
test_scheme.py
test_scheme.py
import unittest import scheme_mongo class TestScheme(unittest.TestCase): def runTest(self): mongo_uri = "mongodb://localhost/test.in" wrapper = scheme_mongo.open(mongo_uri) assert wrapper for result in wrapper: print result if __name__ == '__main__': unittest.main()
Python
0.000002
2e8e2450e5a2b800b2587e75b9e25fd0f5c678a6
Add tests for `pyrakoon.sequence`
test/test_sequence.py
test/test_sequence.py
# This file is part of Pyrakoon, a distributed key-value store client. # # Copyright (C) 2010 Incubaid BVBA # # Licensees holding a valid Incubaid license may use this file in # accordance with Incubaid's Arakoon commercial license agreement. For # more information on how to enter into this agreement, please contact # ...
Python
0.000001
fc95c998dc8c3caee3e0a4590b96c9ed7e0321a7
add a test suite for Division
test_htmlgen/block.py
test_htmlgen/block.py
from unittest import TestCase from asserts import assert_equal from htmlgen import Division class DivisionTest(TestCase): def test_render(self): div = Division() div.append("Test") assert_equal([b"<div>", b"Test", b"</div>"], list(iter(div)))
Python
0
e4980879f0f4a0d223cccc99a486fb62cbe5807f
change models.py
physics/models.py
physics/models.py
from django.db import models class Student(models.Model): """Student Info""" stu_id = models.CharField(u'学号', max_length=30, primary_key=True) name = models.CharField(u'姓名', max_length=30) password = models.CharField(u'密码', max_length=30) def __unicode__(self): return '{stu_id} {name}'.fo...
from django.db import models class Student(models.Model): """Student Info""" stu_id = models.CharField(u'学号', max_length=30, primary_key=True) name = models.CharField(u'姓名', max_length=30) password = models.CharField(u'密码', max_length=30) def __unicode__(self): return '{stu_id} {name}'.fo...
Python
0.000001
964d1f97df600308b23b6a91b9de8811795509a4
Add a test for the @cachit decorator.
sympy/core/tests/test_cache.py
sympy/core/tests/test_cache.py
from sympy.core.cache import cacheit def test_cacheit_doc(): @cacheit def testfn(): "test docstring" pass assert testfn.__doc__ == "test docstring" assert testfn.__name__ == "testfn"
Python
0
a8ddae9343683ca69067eecbece5ecff6d4e5d1d
Add myStrom switch platform
homeassistant/components/switch/mystrom.py
homeassistant/components/switch/mystrom.py
""" homeassistant.components.switch.mystrom ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support for myStrom switches. For more details about this component, please refer to the documentation at https://home-assistant.io/components/switch.mystrom/ """ import logging import requests from homeassistant.components.switch imp...
Python
0
fbf5ecffb4249e7f881f53f30625a47a6e779592
Create selective_array_reversing.py
selective_array_reversing.py
selective_array_reversing.py
#Kunal Gautam #Codewars : @Kunalpod #Problem name: Selective Array Reversing #Problem level: 6 kyu def sel_reverse(arr,l): li=[] if not l: return arr for i in range(0,len(arr),l): if i+l>len(arr): li+=(list(reversed(arr[i:]))) else: li+=(list(reversed(arr[...
Python
0.000166
afe8e16be43b5e66df0f7bf14832f77009aab151
Create __init__.py
oauth/__init__.py
oauth/__init__.py
#!/usr/bin/python # -*- coding: utf-8 -*- """ Created by bu on 2017-05-10 """ from __future__ import unicode_literals import json as complex_json import requests from utils import verify_sign from utils import get_sign class RequestClient(object): __headers = { 'Content-Type': 'application/json; charset=u...
Python
0.000429
05c3430b8a1cd1fc204a40916fe5ec7ab2a48e81
Save xls operations
operations/xls.py
operations/xls.py
# -*- coding: utf-8 -*- """ Load xlxs file (2010) """ from openpyxl import load_workbook class ExReader(object): """ Reading spreadsheets from a file """ def __init__(self, filename=None): super(ExReader, self).__init__() if filename is None: filename = "/Users/paulie/D...
Python
0
a3bbd175ef5640843cb16b0166b462ffaed25242
standardize logging interface for fs-drift
fsd_log.py
fsd_log.py
import logging # standardize use of logging module in fs-drift def start_log(prefix): log = logging.getLogger(prefix) h = logging.StreamHandler() log_format = prefix + ' %(asctime)s - %(levelname)s - %(message)s' formatter = logging.Formatter(log_format) h.setFormatter(formatter) log.addHandler...
Python
0
52e71001b7e775daaaaf42280ebe06c31291b595
Add a simplemeshtest variant where all AJ packets of one node are always dropped
tests/failmeshtest.py
tests/failmeshtest.py
#!/usr/bin/env python from twisted.internet import reactor from mesh import Mesh, MeshNode, packet_type, ATTEMPT_JOIN import sys NUMNODES = 5 NUMPACKETS = 10 DELAY = 0.1 nodes = [] # We're optimists success = True class TestMeshNode(MeshNode): nodes = 1 def __init__ (self, name, mesh): MeshNode.__init__(s...
Python
0.000002
57fc053939702f4baf04604a9226873c98526ae5
Add test for Moniker
tests/lsp/test_moniker.py
tests/lsp/test_moniker.py
############################################################################ # Copyright(c) Open Law Library. All rights reserved. # # See ThirdPartyNotices.txt in the project root for additional notices. # # # # Licensed u...
Python
0.000001
20c4df8c61ee1f625ebd77c8613fc470a3e87438
add another lazy function
lazy_function/another_lazy_class.py
lazy_function/another_lazy_class.py
#!/usr/bin/env python # -*- coding: utf-8 -*- class lazy_property(object): def __init__(self, func, name=None, doc=None): self._func = func self._name = name or func.func_name self.__doc__ = doc or func.__doc__ def __get__(self, obj, objtype=None): if obj is None: re...
Python
0.000217
1d8fccf6943adf40c77d5d2df002330719dcfcd1
test for S3Sync
tests/test_s3_sync.py
tests/test_s3_sync.py
import os import unittest from pathlib import Path import mock from taskcat._s3_sync import S3Sync class TestS3Sync(unittest.TestCase): def test_init(self): m_s3_client = mock.Mock() m_s3_client.list_objects_v2.return_value = { "Contents": [{"Key": "test_prefix/test_object", "ETag": ...
Python
0
0f1cf524c2b90d77e17d516a30d62632ebb5ed2f
Add pipeline for untar'ing GCS blobs.
datathon/datathon_etl_pipelines/generic_imagining/untar_gcs.py
datathon/datathon_etl_pipelines/generic_imagining/untar_gcs.py
r"""Untar .tar and .tar.gz GCS files.""" from __future__ import absolute_import from __future__ import division from __future__ import print_function import argparse import apache_beam as beam from apache_beam.options.pipeline_options import PipelineOptions from apache_beam.options.pipeline_options import SetupOption...
Python
0
d68d4e8c1adfa1cdc9577d133c48717b504092e5
Test extension
tests/testcallable.py
tests/testcallable.py
# Copyright (C) 2007-2011 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import is_instance, unittest2, X, SomeClass from mock import ( Mock, MagicMock, NonCallableMagicMock, NonCallableMock, patch, create_autospec ) ...
# Copyright (C) 2007-2011 Michael Foord & the mock team # E-mail: fuzzyman AT voidspace DOT org DOT uk # http://www.voidspace.org.uk/python/mock/ from tests.support import is_instance, unittest2, X from mock import ( Mock, MagicMock, NonCallableMagicMock, NonCallableMock, patch, create_autospec ) """ Note th...
Python
0.000001
4302389b1e4e5ba753b2f76427408910c05f683c
replace our single use of assertEquals with assertEqual
tests/thirdparty_tests.py
tests/thirdparty_tests.py
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- paulett.org) # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. import unittest import jsonpickle RSS_DOC = """<?xml version="1.0" encoding="utf-8"...
# -*- coding: utf-8 -*- # # Copyright (C) 2008 John Paulett (john -at- paulett.org) # All rights reserved. # # This software is licensed as described in the file COPYING, which # you should have received as part of this distribution. import unittest import jsonpickle RSS_DOC = """<?xml version="1.0" encoding="utf-8"...
Python
0
0bf6f0b6021b2ca3801b0d68c0ee63e39ddc36df
Make a ValueBuffer class
proj/avg_pdti8/util.py
proj/avg_pdti8/util.py
#!/bin/env python # Copyright 2021 Google LLC # # 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agre...
Python
0