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 |
|---|---|---|---|---|---|---|---|
005c9d1a51793fe76c798be2f546552bb2ee2088 | add word graph boilerplate code | graphs/wordgraph.py | graphs/wordgraph.py | def gml2adjlist(G):
"""
Return a dict mapping word to adjacent nodes. G.node dict in memory
looks like:
{0: {'id': 0, 'value': 0, 'label': 'agreeable'},
1: {'id': 1, 'value': 1, 'label': 'man'}, ... }
and G.edge dict looks like:
{0: {1: {}, 2: {}, 3: {}}, 1: {0: {}, 19: {}, 2: {}, 102: {}... | Python | 0.000096 | |
7c10150d5e667921450e8663fa9440253a495160 | Add migration for moving recomended articles recomended section | gem/migrations/0014_convert_recomended_articles.py | gem/migrations/0014_convert_recomended_articles.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations
from molo.core.models import ArticlePage, ArticlePageRecommendedSections
from wagtail.wagtailcore.blocks import StreamValue
def create_recomended_articles(main_article, article_list):
'''
Creates recommended arti... | Python | 0 | |
909f2c9739429ea3e6954a829e0776d84714d4fd | Add migration | holonet/core/migrations/0007_auto_20150324_1049.py | holonet/core/migrations/0007_auto_20150324_1049.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('core', '0006_auto_20150324_0035'),
]
operations = [
migrations.AlterField(
model_name='user',
name='... | Python | 0.000002 | |
abd05378eb6acf742f2deff4228a0bca4492521b | Add example showing scraping/parsing of an HTML table into a Python dict | examples/htmlTableParser.py | examples/htmlTableParser.py | #
# htmlTableParser.py
#
# Example of parsing a simple HTML table into a list of rows, and optionally into a little database
#
# Copyright 2019, Paul McGuire
#
import pyparsing as pp
import urllib.request
# define basic HTML tags, and compose into a Table
table, table_end = pp.makeHTMLTags('table')
thead, thead_end ... | Python | 0.000001 | |
5aeb0e41621eeb397ea16aff22d7f4deaf8fa7a2 | Add python play example | examples/python/play-url.py | examples/python/play-url.py | #!/usr/bin/env python
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
import urlparse
import logging
from xml.dom.minidom import Document
logging.basicConfig(level=logging.DEBUG)
class MegaAwesomePythonServer(BaseHTTPRequestHandler):
def do_POST(self):
length = int(self.headers.getheader('... | Python | 0.000022 | |
c1f3bb8b3bc3a6685cd839df92a035298ecea2b9 | Create compoundword.py | compoundword.py | compoundword.py | import random
dic1 = ["life", "moon", "butter", "fire", "basket", "foot", "weather", "earth", "play", "super", "grand", "rattle", "skate", "grass", "eye", "honey", "dish", "pop", "book", "thunder", "head", "glass", "boot", "air", "baby", "ham", "common", "sea", "sand", "river", "tooth", "town", "sauce", "disk", "horse"... | Python | 0.000249 | |
b48bd670084cd1b2e443eb284813b949edbff6ca | Add gunicorn config | linky/config/gunicorn.conf.py | linky/config/gunicorn.conf.py | import multiprocessing
appname = "linky"
procname = appname
bind = "unix:/tmp/%s" % appname
workers = multiprocessing.cpu_count() * 2 + 1
max_requests = 1000
preload_app = True
accesslog = "/home/webapp/apps/linky/logs/access.log"
errorlog = "/home/webapp/apps/linky/logs/error.log"
loglevel = "info"
| Python | 0.000001 | |
19f8cf043437d3ed0feac6ce1619636189904277 | add get_partners.py | sample-code/Python/get_partners.py | sample-code/Python/get_partners.py | '''
- login and get token
- process 2FA if 2FA is setup for this account
- returns all user types if user is a partner admin (or above) - else error
'''
import requests
import json
get_token_url = "https://api.canopy.cloud:443/api/v1/sessions/"
validate_otp_url = "https://api.canopy.cloud:443/api/v1/sessions/otp/val... | Python | 0.000001 | |
355094293afbe0836304be495307155aea6c26a8 | Create Brain_TTS.py | EmeraldAI/Application/Main/Brain_TTS.py | EmeraldAI/Application/Main/Brain_TTS.py | #!/usr/bin/python
# -*- coding: utf-8 -*-
import sys
import os
import time
from os.path import dirname, abspath
sys.path.append(dirname(dirname(dirname(dirname(abspath(__file__))))))
reload(sys)
sys.setdefaultencoding('utf-8')
import rospy
from std_msgs.msg import String
from EmeraldAI.Logic.Modules import Pid
from E... | Python | 0.000001 | |
99b0596f8bdef41e08ff04e53316ae8edaab29c4 | Add loggers helper | pictures/loggers.py | pictures/loggers.py | import logging
logging.basicConfig(level=logging.INFO,
format='%(asctime)s %(name)s %(levelname)s %(message)s')
def logger_from(name):
return logging.getLogger(name)
| Python | 0.000001 | |
8c2305844c2c0ac501d72567c7f70f5cf784fc7c | Add script to apply a tilix colorscheme file. (#524) | scripts/apply-tilix-colorscheme.py | scripts/apply-tilix-colorscheme.py | #!/usr/bin/env python3
import collections
import logging
import shutil
import json
import sys
import os
import yaml
log = logging.getLogger(__name__)
XDG_CONFIG_HOME = os.environ.get('XDG_CONFIG_HOME', os.path.expanduser('~/.config'))
ALACONF_FN = os.path.join(XDG_CONFIG_HOME, 'alacritty', 'alacritty.yml')
Palette... | Python | 0 | |
62fe7541fd1c9272616f9e7021617f2fb766bd93 | add models placeholder for django | pillowtop/models.py | pillowtop/models.py | # placeholder for django | Python | 0 | |
6b60c56a3d86de80447fe2ab133db100af97f6d4 | Task_2_17 | BITs/2014/Shmireychik_S_V/task_2_17.py | BITs/2014/Shmireychik_S_V/task_2_17.py | #Задача №2. Вариант 17
#Компьютер выводит понравившееся высказывание Ас-Cамарканди
#Шмирейчик С.В.
#29.02.2016
print("Любовь - это то, что запрещает слова и речи.\n" + "\t\t\t\t\t Ас-Cамарканди")
input("Нажмите Еnter для выхода.") | Python | 0.999959 | |
2ab86a15b956954f5de99db177a6a69b48677e2b | Add Webcam object | src/Webcam.py | src/Webcam.py | import cv
class Webcam:
def __init__(self, cam=-1):
self.capture = None
self.camera_number = cam
def __enter__(self):
self.open()
return self
def __exit__(self):
self.close()
def open()
self.capture = cv.CaptureFromCAM(self.camera_number)
def close()
cv.ReleaseCapture(self.capture)
def qu... | Python | 0 | |
231943a950b49e46b86467991ca6e4c7b3505be0 | update python learn - module | python/study/module-test.py | python/study/module-test.py | #module test
import sys
print 'the sys argv list:'
for i in sys.argv:
print i
print sys.path
| Python | 0 | |
3d3602faf4a47855be264f05d9d52253e8bd0f9d | Add RPC test for the p2p mempool command in conjunction with disabled bloomfilters | qa/rpc-tests/p2p-mempool.py | qa/rpc-tests/p2p-mempool.py | #!/usr/bin/env python3
# Copyright (c) 2015-2016 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
from test_framework.mininode import *
from test_framework.test_framework import BitcoinTestFramework
from... | Python | 0 | |
db9b756dbf68fde9930da8ab6b4594fa3f1d361e | Fix cascades for RecurringEventOverride table | migrations/versions/175_fix_recurring_override_cascade.py | migrations/versions/175_fix_recurring_override_cascade.py | """fix recurring override cascade
Revision ID: 6e5b154d917
Revises: 41f957b595fc
Create Date: 2015-05-25 16:23:40.563050
"""
# revision identifiers, used by Alembic.
revision = '6e5b154d917'
down_revision = '4ef055945390'
from alembic import op
import sqlalchemy as sa
from sqlalchemy.sql import text
def upgrade()... | Python | 0 | |
730548fe74dda462d7aac1e3c5ee8e8ba47f4371 | Add script that extracts clips from HDF5 file. | scripts/extract_clips_from_hdf5_file.py | scripts/extract_clips_from_hdf5_file.py | from pathlib import Path
import wave
import h5py
DIR_PATH = Path('/Users/harold/Desktop/Clips')
INPUT_FILE_PATH = DIR_PATH / 'Clips.h5'
CLIP_COUNT = 5
def main():
with h5py.File(INPUT_FILE_PATH, 'r') as file_:
clip_group = file_['clips']
for i, clip_id in enumerate(clip_group):
... | Python | 0 | |
d5aa5aa96aad03b1bd32504b1c9d0a87c1a1c796 | Create y=Wx+b.py | y=Wx+b.py | y=Wx+b.py | import tensorflow as tf
import numpy as np
x_data = np.random.rand(100).astype("float32")
y_data = x_data * .1 +.3
W = tf.Variable(tf.random_uniform([1], -1.0, 1.0 ))
b = tf.Variable(tf.zeros([1]))
y = W * x_data + b
loss = tf.reduce_mean(tf.square(y - y_data ))
optimizer = tf.train.GradientDescentOptimizer(0.5)
trai... | Python | 0.000476 | |
a570730af71e3263af2f265a1730db3f808cd201 | Add ex_add_noise.py | Python_3/Miscellaneous/ex_addnoise.py | Python_3/Miscellaneous/ex_addnoise.py | # Add gaussian noise to an input
#
# Copyright (C) 2016 Wayne Mogg All rights reserved.
#
# This file may be used under the terms of the MIT License
# (https://github.com/waynegm/OpendTect-External-Attributes/blob/master/LICENSE)
#
# Author: Wayne Mogg
# Date: September, 2016
# Homepage: http://waynegm.github.io/Op... | Python | 0.00002 | |
b72a4bb06fda18ebca91649808cd2f2c531b392e | Set all events to show banner text | migrations/versions/0060.py | migrations/versions/0060.py | """empty message
Revision ID: 0060 set all show_banner_text
Revises: 0059 add show_banner_text
Create Date: 2021-10-03 00:31:22.285217
"""
# revision identifiers, used by Alembic.
revision = '0060 set all show_banner_text'
down_revision = '0059 add show_banner_text'
from alembic import op
def upgrade():
op.ex... | Python | 0.000003 | |
9132678df072e0c11685aea21c04410fe699ce4f | Create Majority_Element.py | Array/Majority_Element.py | Array/Majority_Element.py | '''
Given an array of size n, find the majority element. The majority element is the element that appears more than ⌊ n/2 ⌋ times.
You may assume that the array is non-empty and the majority element always exist in the array.
'''
class Solution:
# @param {integer[]} nums
# @return {integer}
def majorityEl... | Python | 0.000001 | |
4b1ac6217d054bd2fe8e5e6b4cfe036e2a4d0360 | Add a template of setup.py. | setup.py | setup.py | from setuptools import setup, find_packages
import os
version = '0.1'
setup(name='flask-boilerplate',
version=version,
description='',
long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),
classifiers=[
], # Get strings from http://pypi.python.org/pypi?%3Aa... | Python | 0 | |
b1f689f82bbb6d26511b6a310be798dad1791fc5 | add setup.py | setup.py | setup.py | from distutils.core import setup
setup(
version='0.10',
name="saf",
description="Python toolkit for handling Simple Annotation Framework files",
author="Wouter van Atteveldt",
author_email="wouter@vanatteveldt.com",
packages=["saf"],
classifiers=[
"License :: OSI Approved :: MIT License",
],
)
| Python | 0.000001 | |
e37dae306f2dcf17e95a988b332c064fde11fb1a | Create setup.py | setup.py | setup.py | from setuptools import setup
setup(name='rakolighting',
version='0.1',
description='rakolighting library',
url='https://github.com/chrisdpa/rakolighting',
author='chrisdpa',
author_email='unknown',
license='MIT',
packages=['rakolighting'],
zip_safe=False)
| Python | 0.000001 | |
e1c35ee11d281692f916ebf57b38390b90501304 | Create texted.py | exercises/text-editor/texted.py | exercises/text-editor/texted.py | import Tkinter as Tk
import tkFileDialog
# Text Editor Skeleton
def on_new():
# reset path and delete all text in the text box
print "Not implemented"
def on_open():
# let user choose what file to open from a dialog (tkFileDialog)
# replace text in text box with text from file
# handle cancelli... | Python | 0.000002 | |
d2cbe26e14e23a4482e54a74da1412c5c0c28500 | Update package info | setup.py | setup.py | from distutils.core import setup
setup(
name = 'fileloader',
packages = ['fileloader'],
version = '0.1',
description = 'Downloading files (http,ftp). Supports cachinhg and allows uniform access to remote and local files',
author = 'napuzba',
author_email = 'kobi@napuzba.com',
url = 'https://git... | from distutils.core import setup
setup(
name = 'fileloader',
packages = ['fileloader'],
version = '0.1',
description = 'Downloading files (support http and ftp protocols, cachinhg, allows accessing remote and local files in uniform way',
author = 'napuzba',
author_email = 'kobi@napuzba.com',
ur... | Python | 0 |
d6ccfdf365b8df4eefcbe1131dd8b19d184b0fa4 | add monkey patch test for convert command. | bento/commands/tests/test_convert.py | bento/commands/tests/test_convert.py | import sys
from bento.misc.testing \
import \
SubprocessTestCase
from bento.commands.convert \
import \
monkey_patch
class TestMonkeyPath(SubprocessTestCase):
def test_distutils(self):
monkey_patch("distutils", "setup.py")
self.assertTrue("setuptools" not in sys.modules)
... | Python | 0 | |
844cec0985bc4272a760191fe383eee53f00ca79 | Create make_string_sample.py | Tianchi_Alimama/make_string_sample.py | Tianchi_Alimama/make_string_sample.py | #encoding=utf-8
__author__ = 'peng'
import fire, logging
import pandas as pd
import time ,datetime
class Predict_Category_Property(object):
def __init__(self, line):
units = line.split(';')
buf = []
for u in units:
cate, ps = u.split(':')
pss = ps.split(',')
... | Python | 0.000004 | |
082c48bcd747c096abd0cd2970edb8cbb0f3d20b | Add contribution admin | features/contributions/admin.py | features/contributions/admin.py | from django.contrib import admin
from . import models
admin.site.register(models.Contribution)
| Python | 0 | |
65f903a1de88cee2fdd6fe16cf86aceee3545d7b | Add example | flexx/ui/examples/serve_data.py | flexx/ui/examples/serve_data.py | """
This example demonstrates how data can be provided to the client with the
Flexx asset management system.
There are two ways to provide data: via the asset store (``app.assets``),
and via the session (``some_model.session``). In the former, the data
is shared between sessions. In the latter, the data is specific fo... | Python | 0.000003 | |
17018750ac3ea39c4fe5a96c05db2375ecd4973e | Add regression test for #717 | spacy/tests/regression/test_issue717.py | spacy/tests/regression/test_issue717.py | # coding: utf8
from __future__ import unicode_literals
import pytest
@pytest.mark.xfail
@pytest.mark.models
@pytest.mark.parametrize('text1,text2', [("You're happy", "You are happy")])
def test_issue717(EN, text1, text2):
"""Test that contractions are assigned the correct lemma."""
doc1 = EN(text1)
doc2 ... | Python | 0.000001 | |
b7efac523bab70532dd2e703f8d4175ec22b3044 | Add output.base unit test. | braubuddy/tests/outputs/test_base.py | braubuddy/tests/outputs/test_base.py | # -*- coding: utf-8 -*-
"""
Braubuddy Base unit tests
"""
import unittest
from braubuddy.output import base
class IOutput(unittest.TestCase):
def test_map_c_to_symbol(self):
"""c is mapped to °C"""
self.assertEqual(
base.IOutput.map_temp_units_to_symbol('c'), '°C')
def test_map... | Python | 0.000001 | |
437c45509bb2f6387b83cf7d47e51ce46d1c2776 | Add unit test | tests.py | tests.py | from models import AuthenticationError,AuthenticationRequired
import trello
import unittest
import os
class TestTrello(unittest.TestCase):
def test_login(self):
username = os.environ['TRELLO_TEST_USER']
password = os.environ['TRELLO_TEST_PASS']
try:
trello.login(username, password)
except AuthenticationEr... | Python | 0.000001 | |
2324be51d7ded00ad9b92ededff93b57f8b656c0 | add labeltile program | labeltile.py | labeltile.py | #!/usr/bin/env python3
import argparse
from collections import Counter
from math import ceil, floor
import colorsys
import logging
from PIL import Image, ImageDraw
__author__ = 'Morten Brekkevold <morten@snabel.org>'
__copyright__ = '(C) 2015 Morten Brekkevold'
__license__ = 'MIT'
_logger = logging.getLogger('beerlab... | Python | 0.000001 | |
fdcdfb6f710be10cdead865b09d98b4bd0c0cebd | Create tests.py | tests.py | tests.py | pass
| Python | 0.000001 | |
6200bce410eb966b97a5edf2ea8efdcd94e736db | test script which creates a tun tunnel and prints what it received. | tests.py | tests.py | import pytun
import logging
import select
def pprint_buf(buf):
""" Dirty & convenient function to display the hexademical
repr. of a buffer.
"""
DEFAULT_SIZE = 4
def hex2(i, l = None):
l = l if l is not None else DEFAULT_SIZE
h = hex(i).upper()[2:]
if len(h) ... | Python | 0 | |
cc967aa97954be1614ca49489e1b97a940b2ef2b | Create solution.py | hackerrank/algorithms/sorting/easy/correctness_and_the_loop_invariant/py/solution.py | hackerrank/algorithms/sorting/easy/correctness_and_the_loop_invariant/py/solution.py | #!/bin/python
def insertion_sort(L):
for i in xrange(1, len(L)):
j = i - 1
key = L[i]
while (j >= 0) and (L[j] > key):
L[j+1], L[j] = L[j], L[j + 1]
j -= 1
m = input()
ar = [int(i) for i in raw_input().strip().split()]
insertion_sort(ar)
print " ".join(map(str,ar))
| Python | 0.000018 | |
0caeed31553dbc2a201cf5e2e50013ea946507c1 | Add packagist. | plumeria/plugins/packagist.py | plumeria/plugins/packagist.py | from plumeria import config
from plumeria.command import commands, CommandError
from plumeria.util import http
from plumeria.util.ratelimit import rate_limit
@commands.register("packagist", "composer", category="Development")
@rate_limit()
async def packagist(message):
"""
Search the Packagist repository for ... | Python | 0 | |
7a3d41aea381ba914fb7a615ab6de1ff10d1cf89 | Add initial tool dependencies generator. | get_galaxy_tool_dependencies.py | get_galaxy_tool_dependencies.py | #!/usr/bin/env python
import sys
import requests
from string import Template
try:
import rpy2.robjects as robjects
from rpy2.robjects.packages import importr
from rpy2.robjects.vectors import StrVector
import rpy2.robjects.packages as rpackages
except ImportError:
raise ImportError(
"RPy2... | Python | 0 | |
19f7538ec804916e2ba702669f1aa3e69de44592 | add parallel_map | galpy/util/multi.py | galpy/util/multi.py | #Brian Refsdal's parallel_map, from astropython.org
#Not sure what license this is released under, but until I know better:
#
#Copyright (c) 2010, Brian Refsdal
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions... | Python | 0.000001 | |
3b4c1ec38e4725536bb11ec04ec0624282e166c0 | Create proxy.py | proxy.py | proxy.py | import subprocess
import time
class ProxyClient():
def restart_client(self):
while True:
(status, output) = subprocess.getstatusoutput('systemctl restart tinyproxy.service')
if status ==0:
print("tinyproxy 重启成功")
time.sleep(3600)
else... | Python | 0.000001 | |
9a1cf12d2eab79abe313cc211b697e05d4a1d3c1 | Solve 010 | programming_challenges/010.py | programming_challenges/010.py | '''
Problem 010
Solutionum of the primes below 10 is 2 + 3 + 5 + 7 = 17.
Find the sum of all the primes below two million.
Copyright 2017 Dave Cuthbert, MIT License
'''
import math
def get_primes(number):
while True:
if is_prime(number):
yield number
number += 1
def is_prime(numbe... | Python | 1 | |
fdcf6fe1792c462221e0c6c35c13cc23ad39a2e3 | Create pythonhelloworld.py | pythonhelloworld.py | pythonhelloworld.py | print "hello world"
| Python | 0.003233 | |
fafbb9e84a63f0de1f84ce94ba8766a8fdc23f8e | package for the item containers | models/item_container.py | models/item_container.py | # -*- coding: utf-8 -*-
from models.Model import Model
class item_container:
"""
Class to interact with the item containers, such as chests.
"""
@staticmethod
def getAllFromIdArea(idArea):
itemContainerTypes = model.getTypes()
containers = model.loadBy({'id_area': idArea})
for k, c in enumerate(container... | Python | 0.00002 | |
3490b1172f8df77af3963c86ce3967a6d9b4af5e | Add gender choices factory | accelerator/tests/factories/gender_choices_factory.py | accelerator/tests/factories/gender_choices_factory.py | # MIT License
# Copyright (c) 2017 MassChallenge, Inc.
from __future__ import unicode_literals
from factory import Sequence
from factory.django import DjangoModelFactory
GenderChoices = swapper.load_model('accelerator', 'GenderChoices')
class GenderChoicesFactory(DjangoModelFactory):
class Meta:
model ... | Python | 0.000249 | |
44e6c6007a37dc4c9375303a6555c646618d4e38 | add tf dadaset with generator with args | tensorflow_learning/tf2/tf_dataset_from_generator_args.py | tensorflow_learning/tf2/tf_dataset_from_generator_args.py | # -*- coding: utf-8 -*-
'''
@author: jeffzhengye
@contact: yezheng@scuec.edu.cn
@file: tf_dataset_from_generator_args.py
@time: 2021/1/5 16:27
@desc:
'''
import tensorflow as tf
import numpy as np
import collections
def movingWindow(data, window_size):
print(type(window_size))
wind... | Python | 0 | |
79637efbdda03cea88fa6a59b24a27f1d393c79f | Add tests for previous commit | corehq/util/tests/test_es_interface.py | corehq/util/tests/test_es_interface.py | from django.test import SimpleTestCase
from mock import ANY, patch
from corehq.apps.es.tests.utils import es_test
from corehq.elastic import SerializationError, get_es_new
from corehq.util.es.interface import ElasticsearchInterface
@es_test
class TestESInterface(SimpleTestCase):
@classmethod
def setUpClass(... | Python | 0 | |
a9195264349b695daf02abb5cf17ced8a6a6110c | Add setup.py | setup.py | setup.py | # coding=utf-8
from distutils.core import setup
setup(
name='openprovider.py',
version='0.0.1',
author='Antagonist B.V.',
author_email='info@antagonist.nl',
packages=['openprovider'],
url='http://pypi.python.org/pypi/openprovider.py/',
license='LICENSE.rst',
description='An unofficial ... | Python | 0.000001 | |
e8568c3fd621a37020de015fac59dfd15141b51f | Update praw to 3.5.0 | setup.py | setup.py | import sys
import setuptools
from version import __version__ as version
requirements = ['tornado', 'praw==3.5.0', 'six', 'requests', 'kitchen']
# Python 2: add required concurrent.futures backport from Python 3.2
if sys.version_info.major <= 2:
requirements.append('futures')
setuptools.setup(
name='rtv',
... | import sys
import setuptools
from version import __version__ as version
requirements = ['tornado', 'praw==3.4.0', 'six', 'requests', 'kitchen']
# Python 2: add required concurrent.futures backport from Python 3.2
if sys.version_info.major <= 2:
requirements.append('futures')
setuptools.setup(
name='rtv',
... | Python | 0 |
d2fd2a473747fa90183c78c0c12cd933bdc1a4b6 | add solution for 2019 day 1 part 1 | 2019/day01/rocket.py | 2019/day01/rocket.py | #! python3
"""
from: https://adventofcode.com/2019/day/1
--- Day 1: The Tyranny of the Rocket Equation ---
Santa has become stranded at the edge of the Solar System while delivering presents to other planets! To accurately calculate his position in space, safely align his warp drive, and return to Earth in time to sav... | Python | 0.000009 | |
4f42bf42c6dcb44f7a0972bb9c00818d087c808f | Add file | setup.py | setup.py | try:
from setuptools import setup
except ImportError as ex:
from distutils.core import setup
packages = [
'bren'
]
with open('README.rst') as f:
description_text = f.read()
install_req = ["pyyaml"]
setup(
name='bulkrename',
version='1.0.0',
description='bulk file rename',
author='Mic... | Python | 0 | |
0954ec9e191f1a5280ea190ca025d005683db595 | add an analyze script for kld | scripts/ensemble/analyze.py | scripts/ensemble/analyze.py | # coding: utf-8
""" Analyze the output from KLD mapping """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
# Third-party
from astropy import log as logger
import matplotlib.pyplot as plt
import numpy as np
# Project
from streammorphology.... | Python | 0 | |
7e3a894796bb11eb77c0352d5104754086e70f8e | Add setup.py | setup.py | setup.py | from setuptools import setup, find_packages
import sys, os
version = '0.1'
setup(name='recall',
version=version,
description="Python High performance RPC framework based on protobuf",
long_description="""\
""",
classifiers=[], # Get strings from http://pypi.python.org/pypi?%3Aaction=list_class... | Python | 0.000001 | |
24bbb4fafa0732252c4d8561783826ed5eba6cff | add setup.py | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(name='python-voicetext',
version='0.1',
license='Apache License 2.0',
description='Python library of VoiceText Web API',
author='Yutaka Kondo',
author_email='yutaka.kondo@youtalk.jp',
url='https://github.com/youtalk/python-... | Python | 0.000001 | |
fd3eaa3810ce82db864b3fcafe61d16ab53d85e5 | Add simple Python web server for performance testing | perftest/scripts/webserver.py | perftest/scripts/webserver.py | from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer
class Handler(BaseHTTPRequestHandler):
def do(self):
self.send_response(200)
self.wfile.write('{"headers":{"type":"type"},"content":{"b":2}}')
def do_GET(self):
self.do()
def do_POST(self):
self.do()
def main():
try:
server = ... | Python | 0.001733 | |
891737a86e8f7007ac6d040f3f01afc420cd8c99 | Create 2-keys-keyboard.py | Python/2-keys-keyboard.py | Python/2-keys-keyboard.py | # Time: O(sqrt(n))
# Space: O(1)
# Initially on a notepad only one character 'A' is present.
# You can perform two operations on this notepad for each step:
#
# Copy All: You can copy all the characters present on the notepad (partial copy is not allowed).
# Paste: You can paste the characters which are copied last t... | Python | 0.999821 | |
293983d24467cbb224f29b4a6149b518fe966603 | Add forest Predictor. | code/python/seizures/prediction/ForestPredictor.py | code/python/seizures/prediction/ForestPredictor.py | from abc import abstractmethod
from sklearn.ensemble import RandomForestClassifier
import numpy as np
class ForestPredictor(object):
""""
A simple application of RandomForestClassifier
@author: Shaun
"""
def __init__(self):
self.clf = RandomForestClassifier()
@abstractmethod
def... | Python | 0.000001 | |
c2d2d086d336a48593cae6950584566fc40a68b0 | 添加498789867插件的源代码 | Replay_buttons_on_card.py | Replay_buttons_on_card.py | # -*- mode: Python ; coding: utf-8 -*-
#
# Copyright © 2013–16 Roland Sieker <ospalh@gmail.com>
#
# License: GNU AGPL, version 3 or later;
# http://www.gnu.org/copyleft/agpl.html
"""Add-on for Anki 2 to add AnkiDroid-style replay buttons."""
import os
import re
import shutil
from BeautifulSoup import BeautifulSoup
f... | Python | 0 | |
c19bc112e7e13f9d63746dfd2b073edf369f8e82 | add `setup.py` | setup.py | setup.py | #!/usr/bin/env python
from __future__ import absolute_import, print_function, unicode_literals
from setuptools import find_packages, setup
import lu_dj_utils
with open('README.rst') as f:
readme = f.read()
packages = find_packages()
classifiers = (
'Development Status :: 4 - Beta',
'Intended Audience ... | Python | 0 | |
7255a3213418fe4bb3365bd60537f7e88af0c4cd | Add bare-bones setup.py and build file structure | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='pensieve',
version='0.0.1',
description=u"A Python package to extract character mems from a corpus of text",
author=u"CDIPS-AI 2017",
author_email='sam.dixon@berkeley.edu',
url='https://github.com/CDIPS-AI-2017/pensieve',
licen... | Python | 0 | |
73edec331031de644320927800375b9f84f6e143 | Read requirements.txt for setup install_requires, keywords and classifiers added for PyPi | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import simiki
entry_points = {
"console_scripts": [
"simiki = simiki.cli:main",
]
}
requires = open("requirements.txt").readlines()
setup(
name = "simiki",
version = simiki.__version__,
url = "https://github.com/tankywoo/... | #!/usr/bin/env python
from setuptools import setup, find_packages
import simiki
entry_points = {
"console_scripts": [
"simiki = simiki.cli:main",
]
}
requires = [
"Markdown",
"Pygments",
"Jinja2",
"PyYAML",
"docopt",
]
setup(
name = "simiki",
version = simiki.__version__... | Python | 0 |
88a617758eb869786d0703b2b53b5a030d7e7ac2 | Add Python 3.4 to working environments | setup.py | setup.py | import os, sys
from setuptools import setup, find_packages
import mongonaut
LONG_DESCRIPTION = open('README.rst').read() + "\n\n"
CHANGELOG = open('CHANGELOG.rst').read()
LONG_DESCRIPTION += CHANGELOG
version = mongonaut.__version__
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
pr... | import os, sys
from setuptools import setup, find_packages
import mongonaut
LONG_DESCRIPTION = open('README.rst').read() + "\n\n"
CHANGELOG = open('CHANGELOG.rst').read()
LONG_DESCRIPTION += CHANGELOG
version = mongonaut.__version__
if sys.argv[-1] == 'publish':
os.system("python setup.py sdist upload")
pr... | Python | 0.000429 |
2344a5e72d7a3a31d014ca31f42023740c56d060 | add ndncache/fieldpercent.py | ndncache/fieldpercent.py | ndncache/fieldpercent.py | #!/usr/bin/python
#coding:utf-8
'''Function:analyze bro conn logs and print specific field percent,
@param: log directory
@param: field list analyze
author:melon li
date: 2016.03.28
'''
import sys
import os
FIELDS=['ts', 'uid', 'id.orig_h', 'id.orig_p', 'id.resp_h', 'id.resp_p',
'proto', 'service duration', 'o... | Python | 0 | |
4a6d45d102c76647bc7c4ff30f4b888108dd2d7c | Bump version to 2.6.0.2dev | setup.py | setup.py | '''
Nereid
Nereid - Tryton as a web framework
:copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) Ltd.
:license: GPLv3, see LICENSE for more details
'''
from setuptools import setup
setup(
name='Nereid',
version='2.6.0.2dev',
url='http://nereid.openlabs.co.in/docs/',
l... | '''
Nereid
Nereid - Tryton as a web framework
:copyright: (c) 2010-2013 by Openlabs Technologies & Consulting (P) Ltd.
:license: GPLv3, see LICENSE for more details
'''
from setuptools import setup
setup(
name='Nereid',
version='2.6.0.1',
url='http://nereid.openlabs.co.in/docs/',
lice... | Python | 0 |
0907e4f32e4e0bb48f4f101b520ce8f28c731d6c | Add setup.py | setup.py | setup.py | from os import path
from setuptools import setup, find_packages
here = path.abspath(path.dirname(__file__))
# TODO: change to rst
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='pag',
version='0.1.0',
description='A simple text-based adventure ... | Python | 0.000001 | |
7b0779a402070ec88d9afeab42388b6432391336 | ADD AND CHANGE | zt.py | zt.py | #!/usr/bin/env python
# -*- conding: utf-8 -*-
########################
#File Name:zt.py
#Author:WmTiger
#Mail:bfstiger@gmail.com
#Created Time:2016-09-07 12:59:28
########################
import picamera
import time
import io
import zbar
from PIL import Image
def getQR():
stream = io.BytesIO()
sc = zbar.Imag... | Python | 0.000001 | |
8812d487c33a8f0f1c96336cd27ad2fa942175f6 | add setup.py | setup.py | setup.py | from distutils.core import setup
setup(
name="sequential",
packages=["sequential"],
version="1.0.0",
description="Sequential wrappers for python functions.",
author="Phil Condreay",
author_email="0astex@gmail.com",
url="https://github.com/astex/sequential",
keywords=["functions", "decor... | Python | 0.000001 | |
365540e17885cf41043358f14a04d0fa15ecb4ec | update 002 with python | 002.py | 002.py | def func(thresh):
a = 1
b = 1
ret = 0
while 1:
a, b = a + b, a
if a > thresh:
return ret
if a % 2 == 0:
ret += a
print func(4*1000*1000)
| Python | 0 | |
a675b289f7848a773ded80f943f60156a224fd17 | Add a setup.py to allow use in pip requirements files. | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(
name='tweetar',
version='1.0.0',
description='Script to post on Twitter METARs retrieved from NOAA.',
author='Adam Fast',
author_email='adamfast@gmail.com',
url='https://github.com/adamfast/python-t... | Python | 0 | |
62a405bf2574320a7fe1e941129056e8157121b5 | Add setup.py | setup.py | setup.py | # coding=utf-8
from setuptools import setup, find_packages
PACKAGES_DATA = {'sii': ['data/*.xsd']}
setup(
name='sii',
description='Librería de Suministro Inmediato de Información',
author='GISCE-TI, S.L.',
author_email='devel@gisce.net',
url='http://www.gisce.net',
version='0.1.0alpha',
l... | Python | 0.000001 | |
6fc87957cff4e0ef1c95d604a8fb0630f2bcda38 | Add initial setup.py to please buildout. | setup.py | setup.py | import os
import re
from setuptools import setup, find_packages
setup(
name = 'e-cidadania',
description=("e-cidadania is a project to develop an open source "
"application for citizen participation, usable by "
"associations, companies and administrations."),
version = '... | Python | 0 | |
7f0eaa3974845b0e62c033fc4c3b0079c8e37465 | Add setup.py | setup.py | setup.py | # -*- coding: utf-8 -*-
# imagecodecs/setup.py
from setuptools import setup, Extension
from Cython.Distutils import build_ext
import sys
import os
import re
import warnings
import numpy
buildnumber = '' # '.post0'
with open('imagecodecs/_imagecodecs.pyx') as fh:
code = fh.read()
version = re.search("__versio... | Python | 0.000001 | |
c862150e8b9d015263f450483f7163e067df5b92 | add setup.py | setup.py | setup.py | #/usr/bin/python
#coding=utf8
import os
import sys
def authenticate():
'''Prompt the user for the superuser password if required.'''
# The euid (effective user id) of the superuser is 0.
euid = os.geteuid()
if euid != 0:
args = ['sudo', '-E', sys.executable] + sys.argv[:] + [os.environ]
... | Python | 0.000001 | |
5f410124e439ba5795335b3e0159eb1421e3ba52 | Package setup definition | setup.py | setup.py | from setuptools import setup
setup(
name='plotta',
version='1.0.0a1',
install_requires=['unirest'],
description='Python wrapper for Plotta API',
url='https://github.com/gzuidhof/plotta-python',
license='MIT',
keywords='plot plotting plotta',
classifiers=[
'Development Status ... | Python | 0 | |
a03b9b0d219b54fce5bd3fcbef88b117d49115b1 | Add files via upload | self-driving-car-ai/mlp_training.py | self-driving-car-ai/mlp_training.py | __author__ = 'zhengwang'
import cv2
import numpy as np
import glob
print 'Loading training data...'
e0 = cv2.getTickCount()
# load training data
image_array = np.zeros((1, 38400))
label_array = np.zeros((1, 4), 'float')
training_data = glob.glob('training_data/*.npz')
# image_array, label_array = np.load('training_d... | Python | 0 | |
27b7fe3c6ef33e2a810f0394e83b5f776e17a60b | add setup.py | setup.py | setup.py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from setuptools import setup, find_packages
setup(
name = "missh",
version = "0.1.1rc7",
# packages = find_packages(), #["mipass","missh-nox"],
py_modules = ["mipass"],
scripts = ['missh'],
install_requires = ["npyscreen >=2.0pre47", "pycrypto... | Python | 0.000001 | |
34bb61bb7b634255a5828a0dbc695668bfe357cf | add setup.py for setuptools | setup.py | setup.py | #!/usr/bin/env python
from os.path import join
from setuptools import setup, find_packages
setup(name='egniter',
version='1.0',
description='Egniter is a command line tool for easy launching VMWare' +
'ESX virtual machines using ESX API',
author='',
author_email='',
lic... | Python | 0 | |
a00f47d66f87632fc28d49b97500132535c25d68 | Create setup.py | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='WiFiSuite',
version='v 1.05282017',
description='Enterprise WPA Wireless Tool suite ',
classifiers=[
'Development Status :: 1 - Beta',
'License :: OSI Approved :: MIT License',
'Programming Language :: Python :: 2.7',
'... | Python | 0.000001 | |
3d6fb311e55e62cb0b1bbf9108af4d42853e32d6 | apply 26_win32_setup.diff from pjenvey | setup.py | setup.py | #!/usr/bin/env python
from ez_setup import use_setuptools
import sys
if 'cygwin' in sys.platform.lower():
min_version='0.6c6'
else:
min_version='0.6a9'
try:
use_setuptools(min_version=min_version)
except TypeError:
# If a non-local ez_setup is already imported, it won't be able to
# use the min_versi... | #!/usr/bin/env python
from ez_setup import use_setuptools
import sys
if 'cygwin' in sys.platform.lower():
min_version='0.6c6'
else:
min_version='0.6a9'
try:
use_setuptools(min_version=min_version)
except TypeError:
# If a non-local ez_setup is already imported, it won't be able to
# use the min_versi... | Python | 0 |
fb53445b97f6667f4773b7f4ec32e03e2e2019d6 | Make setuptools optional for install. | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='XlsxWriter',
version='0.5.7',
author='John McNamara',
author_email='jmcnamara@cpan.org',
url='https://github.com/jmcnamara/XlsxWriter',
packages=['xlsxwriter'],
license='BSD',
des... | from setuptools import setup
setup(
name='XlsxWriter',
version='0.5.7',
author='John McNamara',
author_email='jmcnamara@cpan.org',
url='https://github.com/jmcnamara/XlsxWriter',
packages=['xlsxwriter'],
license='BSD',
description='A Python module for creating Excel XLSX files.',
lon... | Python | 0 |
118e6fdd95d16c69a9d887d327046eadc61853f1 | Add setup.py | setup.py | setup.py | #!/usr/bin/python3
from setuptools import setup, find_packages
setup(name='grafcli',
version='0.1.0',
description='Grafana CLI management tool',
author='Milosz Smolka',
author_email='m110@m110.pl',
url='https://github.com/m110/grafcli',
packages=find_packages(exclude=['tests']),
... | Python | 0.000001 | |
98ce14b1ed7fb8729f26e5705910b15ab4928275 | Create rf_Table_Helpers.py | rf_Table_Helpers.py | rf_Table_Helpers.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
.. module:: rf_Table_Helpers
:platform: Unix, Windows
:synopsis: Useful table introspection functions for Robot Framework's Selenium 2 Library.
.. moduleauthor:: Greg Meece <glmeece@gmail.com>
"""
from lxml import html
# ---------------------------------------... | Python | 0 | |
bd724a63413ea3234d6f404ccac662febb2e1ccd | Complete exercise 9 | ex/ex09.py | ex/ex09.py | # LPTHW Exercise 9 -- Printing, Printing, Printing
# Here's some new strange stuff, remember type it exactly.
days = "Mon Tue Wed Thu Fri Sat Sun"
months = "Jan\nFeb\nMar\nApr\nMay\nJun\nJul\nAug"
print "Here are the days: ", days
print "Here are the months: ", months
print """
There's something going on here.
With... | Python | 0 | |
d510fcf6675900ccea8706b4ff6fdc4a88862f2a | Add a new test script that tests various features of the sys module. This increases code coverage of Python/sysmodule.c from 68% to 77% (on Linux). | Lib/test/test_sys.py | Lib/test/test_sys.py | # -*- coding: iso-8859-1 -*-
import unittest, test.test_support
import sys, cStringIO
class SysModuleTest(unittest.TestCase):
def test_original_displayhook(self):
import __builtin__
savestdout = sys.stdout
out = cStringIO.StringIO()
sys.stdout = out
dh = sys.__displayhook_... | Python | 0 | |
64f79354695b24d99479f63c770887e6326b7102 | Create app.py | app.py | app.py | print("hello")
| Python | 0.000003 | |
cfc7830874a5d643c55991280b7288158a3918c6 | Add script to grab latest template libraries for plenary use | src/scripts/plenary_template_library.py | src/scripts/plenary_template_library.py | #!/usr/bin/env python2
import logging
from urllib import urlopen
from json import load
from datetime import datetime, timedelta
from os.path import exists, isdir, join, abspath
from os import chdir, makedirs, sep
from shutil import rmtree
from tempfile import mkdtemp
from sys import exit as sys_exit
from argparse impo... | Python | 0 | |
dc391d441310cc27f92d8feff8e46dc05a5af7b3 | Add unit tests for disabling orphaned workflow executions gc | st2reactor/tests/unit/test_garbage_collector.py | st2reactor/tests/unit/test_garbage_collector.py | # Copyright 2019 Extreme Networks, Inc.
#
# 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 i... | Python | 0 | |
989d8516e40890f3a75d040f6923cbe8bd9749ff | Create subprocess.py | subprocess.py | subprocess.py | #system information gather script.
import subprocess
def uname_func():
uname = 'uname'
uname_arg='-a'
print "collecting system information with %s command:\n" %uname
subprocess.call([uname,uname_arg])
def disk_func():
diskspace = "df"
diskspace_arg = "-h"
print "collecting diskspace information %s command: ... | Python | 0.000006 | |
a7685738c9bd54a53858199b2225dbb4d1adce8e | Fix warning in plot_rank_mean | doc/examples/filters/plot_rank_mean.py | doc/examples/filters/plot_rank_mean.py | """
============
Mean filters
============
This example compares the following mean filters of the rank filter package:
* **local mean**: all pixels belonging to the structuring element to compute
average gray level.
* **percentile mean**: only use values between percentiles p0 and p1
(here 10% and 90%).
* **bila... | """
============
Mean filters
============
This example compares the following mean filters of the rank filter package:
* **local mean**: all pixels belonging to the structuring element to compute
average gray level.
* **percentile mean**: only use values between percentiles p0 and p1
(here 10% and 90%).
* **bila... | Python | 0.99936 |
64cc611c8a13379f62151629585e3fec9e442f82 | add timeout decorator | timeout.py | timeout.py | #
# Copyright 2012, Couchbase, Inc.
# All Rights Reserved
#
# Licensed under the Apache License, Version 2.0 (the "License")
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | Python | 0 | |
72be8a8fd8345542096ba31e3f1428ea25ea9498 | Print with vs without a comma | ex6.py | ex6.py | end1 = "C"
end2 = "H"
end3 = "E"
end4 = "E"
end5 = "S"
end6 = "E"
end7 = "B"
end8 = "U"
end9 = "R"
end10 = "G"
end11 = "E"
end12 = "R"
# Printing without a comma
print end1 + end2 + end3 + end4 + end5 + end6
print end7 + end8 + end9 + end10 + end11 + end12
# Printing with a comma
print end1 + end2 + end3 + end4 + end5 ... | Python | 0.000001 | |
e58fe43d032a98849acc9c0ca041432bea0dbdba | Create brick-wall.py | Python/brick-wall.py | Python/brick-wall.py | # Time: O(n), n is the total number of the bricks
# Space: O(m), m is the total number different widths
# There is a brick wall in front of you. The wall is rectangular and has several rows of bricks.
# The bricks have the same height but different width. You want to draw a vertical line from
# the top to the bottom ... | Python | 0.000933 | |
96035f6bb2a298cea859b1e5e9812e2dd83982d2 | Add script to upload files to shell applet | dnanexus/shell/resources/home/dnanexus/upload_file.py | dnanexus/shell/resources/home/dnanexus/upload_file.py | #!/usr/bin/env python
# -*- coding: latin-1 -*-
import os, sys, time, subprocess, json, requests
HEADERS = {
'Content-type': 'application/json',
'Accept': 'application/json',
}
path = 'test.fastq'
FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/'
ENCODED_KEY = '...'
ENCODED_SECRET_KEY = '...'
respo... | Python | 0 | |
2737bd64cd33a592a4d50ec1596177e01d859e72 | add point artist with draw and draw collection | src/compas_rhino/artists/pointartist.py | src/compas_rhino/artists/pointartist.py | from __future__ import print_function
from __future__ import absolute_import
from __future__ import division
import compas_rhino
from compas_rhino.artists import PrimitiveArtist
__all__ = ['PointArtist']
class PointArtist(PrimitiveArtist):
"""Artist for drawing ``Point`` objects.
Parameters
---------... | Python | 0 | |
85f6b2437b57c6e33ff56422b15aaab690704218 | Add test to validate against schema | ckanext/doi/tests/test_schema.py | ckanext/doi/tests/test_schema.py | #!/usr/bin/env python
# encoding: utf-8
#
# This file is part of ckanext-doi
# Created by the Natural History Museum in London, UK
import ckanext.doi.api as doi_api
import ckanext.doi.lib as doi_lib
import mock
import requests
from ckantest.factories import DataConstants
from ckantest.models import TestBase
from lxml ... | Python | 0.000001 | |
56e3ec2e0e788797b252cf28438d7ca6bede29ef | Correct comparison | tests/sentry/api/endpoints/test_broadcast_index.py | tests/sentry/api/endpoints/test_broadcast_index.py | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Broadcast, BroadcastSeen
from sentry.testutils import APITestCase
class BroadcastListTest(APITestCase):
def test_simple(self):
broadcast1 = Broadcast.objects.create(message='bar', is_active=True... | from __future__ import absolute_import
from django.core.urlresolvers import reverse
from sentry.models import Broadcast, BroadcastSeen
from sentry.testutils import APITestCase
class BroadcastListTest(APITestCase):
def test_simple(self):
broadcast1 = Broadcast.objects.create(message='bar', is_active=True... | Python | 0.00011 |
de5e7e3555788bb5e62d1ad2d20208d4289e5fe5 | Add script for printing max accuracy across many networks | max.py | max.py | #!/usr/bin/env python3
import argparse
import numpy
import sys
import re
import os
import os.path
import tempfile
parser = argparse.ArgumentParser()
parser.add_argument('model',
type=argparse.FileType('rb'),
nargs='+',
help='path to .mdl to extract plot data... | Python | 0 | |
9f67de8a0823edf66212ed84116a1138a5fd0adb | add tests | tests/gdr-test1.py | tests/gdr-test1.py | # -*- coding: utf-8 -*-
# Copyright (c) 2017 shmilee
import os
import logging
import gdpy3.read as gdr
log = logging.getLogger('gdr')
if __name__ == '__main__':
# log.setLevel(20)
log.setLevel(10)
datadir = '/home/IFTS_shmilee/phiobo-4-test'
numpat = r'[-+]?\d+[\.]?\d*[eE]?[-+]?\d*'
mypats = [r'... | Python | 0 | |
4a9e2ac4a92fb67fd1f77605b5db6e6c3e5becc4 | add CubicToQuadraticFilter | Lib/ufo2ft/filters/cubicToQuadratic.py | Lib/ufo2ft/filters/cubicToQuadratic.py | from __future__ import (
print_function, division, absolute_import, unicode_literals)
from ufo2ft.filters import BaseFilter
from cu2qu.ufo import DEFAULT_MAX_ERR
from cu2qu.pens import Cu2QuPointPen
class CubicToQuadraticFilter(BaseFilter):
_kwargs = {
'conversionError': None,
'unitsPerEm': ... | Python | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.