commit stringlengths 40 40 | subject stringlengths 1 3.25k | old_file stringlengths 4 311 | new_file stringlengths 4 311 | old_contents stringlengths 0 26.3k | lang stringclasses 3
values | proba float64 0 1 | diff stringlengths 0 7.82k |
|---|---|---|---|---|---|---|---|
5e574a24d95e686bc2592af439e148e68036c61d | Add unit test for nova connector | tests/unit/cloud/clouds/nova_test.py | tests/unit/cloud/clouds/nova_test.py | Python | 0 | @@ -0,0 +1,1612 @@
+# -*- coding: utf-8 -*-%0A'''%0A :codeauthor: :email:%60Bo Maryniuk %3Cbo@suse.de%3E%60%0A'''%0A%0A# Import Python libs%0Afrom __future__ import absolute_import%0A%0A# Import Salt Testing Libs%0Afrom salttesting import TestCase%0Afrom salt.cloud.clouds import nova%0Afrom salttesting.mock import M... | |
2b8ff3b38e4f8bdc9da30c7978062174b0259f76 | Add lc0068_text_justification.py | lc0068_text_justification.py | lc0068_text_justification.py | Python | 0.000002 | @@ -0,0 +1,2240 @@
+%22%22%22Leetcode 68. Text Justification%0AHard%0A%0AURL: https://leetcode.com/problems/text-justification/%0A%0AGiven an array of words and a width maxWidth, format the text such that each line has%0Aexactly maxWidth characters and is fully (left and right) justified.%0A%0AYou should pack your word... | |
8fe5e768f20abfdd790870075950b6537c5cad6a | Add class containing test state and report + print methods | ptest.py | ptest.py | Python | 0 | @@ -0,0 +1,1191 @@
+#!/usr/bin/python3%0A%0Afrom sys import exit%0A%0Aclass Ptest(object):%0A%0A def __init__(self, module_name):%0A self.module_name = module_name%0A self.passed = 0%0A self.failed = 0%0A%0A print('%5CnRunning tests for module %22', module_name, '%22', sep='')%0A%0A de... | |
1669f9a3a9fabc2ded8fa92542dca65036c201e5 | Create sizes.py | plantcv/plantcv/visualize/sizes.py | plantcv/plantcv/visualize/sizes.py | Python | 0.000001 | @@ -0,0 +1,2512 @@
+# Visualize an annotated image with object sizes%0A%0Aimport os%0Aimport cv2%0Aimport random%0Aimport numpy as np%0Afrom plantcv.plantcv import params%0Afrom plantcv.plantcv import plot_image%0Afrom plantcv.plantcv import print_image%0Afrom plantcv.plantcv import find_objects%0Afrom plantcv.plantcv ... | |
e03ecf68055e820106172413967713f98f7905ac | copy api_util to client to make it self-contained | net/client/api_util.py | net/client/api_util.py | Python | 0.000001 | @@ -0,0 +1,142 @@
+import simplejson%0A%0Adef json2python(json):%0A%09try:%0A%09%09return simplejson.loads(json)%0A%09except:%0A%09%09pass%0A%09return None%0A%0Apython2json = simplejson.dumps%0A%0A
| |
addc7f33af75070333369a01c71e8acd231376ba | Add FilterNotifier for keyword based notification filtering | reconbot/notifiers/filter.py | reconbot/notifiers/filter.py | Python | 0 | @@ -0,0 +1,530 @@
+class FilterNotifier:%0A %22%22%22 Filters notifications based on their type or keywords %22%22%22%0A def __init__(self, notifier, keywords=%5B%5D, ignore=%5B%5D):%0A self.notifier = notifier%0A self.keywords = keywords%0A self.ignore = ignore%0A%0A def notify(self, text... | |
b09b11de1a025196cceb1c8fd71bda5515437a10 | Add max31855 example driver | sw/examples/drivers/max31855.py | sw/examples/drivers/max31855.py | Python | 0 | @@ -0,0 +1,1403 @@
+#!/usr/bin/env python%0A%0A#%0A# SPI example (using the STM32F407 discovery board)%0A#%0A%0Aimport sys%0Aimport time%0Aimport ctypes%0Afrom silta import stm32f407%0A%0Adef bytes_to_int(byte_list):%0A num = 0%0A%0A for byte in range(len(byte_list)):%0A num += byte_list%5Bbyte%5D %3C%3C (... | |
a15e363718ab41c5e02b9eaa919fb689cd266af6 | Add common module for our tests | nose2/tests/_common.py | nose2/tests/_common.py | Python | 0 | @@ -0,0 +1,994 @@
+%22%22%22Common functionality.%22%22%22%0D%0Aimport os.path%0D%0Aimport tempfile%0D%0Aimport shutil%0D%0Aimport sys%0D%0A%0D%0Aclass TestCase(unittest2.TestCase):%0D%0A %22%22%22TestCase extension.%0D%0A %0D%0A If the class variable _RUN_IN_TEMP is True (default: False), tests will be%0D%0A ... | |
b802f1d5453840ea4b16113d5d03f6c27224ce0c | Add try/except example. | examples/try.py | examples/try.py | Python | 0 | @@ -0,0 +1,904 @@
+# Honeybadger for Python%0A# https://github.com/honeybadger-io/honeybadger-python%0A#%0A# This file is an example of how to catch an exception in Python and report it%0A# to Honeybadger without re-raising. To run this example:%0A%0A# $ pip install honeybadger%0A# $ HONEYBADGER_API_KEY=your-api-key py... | |
6bbef11c982ddee4981318e6bca9fa85610f1cc8 | Increase revision content lenght | src/ggrc/migrations/versions/20170112112254_177a979b230a_update_revision_content_field.py | src/ggrc/migrations/versions/20170112112254_177a979b230a_update_revision_content_field.py | Python | 0 | @@ -0,0 +1,949 @@
+# Copyright (C) 2017 Google Inc.%0A# Licensed under http://www.apache.org/licenses/LICENSE-2.0 %3Csee LICENSE file%3E%0A%0A%22%22%22Update revision content field.%0A%0ACreate Date: 2017-01-12 11:22:54.998164%0A%22%22%22%0A# disable Invalid constant name pylint warning for mandatory Alembic variables.... | |
eb4fbb28ed06b223282b02bb31f5f91e1eeb3f9f | Add RenormalizeWeight callback | seya/callbacks.py | seya/callbacks.py | Python | 0 | @@ -0,0 +1,511 @@
+import numpy as np%0Afrom keras.callbacks import Callback%0A%0A%0Aclass RenormalizeWeight(Callback):%0A def __init__(self, W):%0A Callback.__init__(self)%0A self.W = W%0A self.W_shape = self.W.get_value().shape%0A%0A def on_batch_start(self, batch, logs=%7B%7D):%0A W... | |
1f1d2df36a16b80c770974a9ac2bf48ccbebc3ab | add callable list | jasily/collection/funcs.py | jasily/collection/funcs.py | Python | 0.000002 | @@ -0,0 +1,773 @@
+# -*- coding: utf-8 -*-%0A#%0A# Copyright (c) 2018~2999 - Cologler %3Cskyoflw@gmail.com%3E%0A# ----------%0A#%0A# ----------%0A%0Afrom functools import partial%0A%0Aclass CallableList(list):%0A '''%0A a simple callable list.%0A '''%0A%0A def __call__(self):%0A ret = None%0A ... | |
a44821de91b5ac3a082b2253ec8e695a69ccf2be | Fix GlobalStepTests to specify the collection | tensorflow/python/training/training_util_test.py | tensorflow/python/training/training_util_test.py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | Python | 0.000069 | @@ -919,58 +919,8 @@
ops%0A
-from tensorflow.python.framework import test_util%0A
from
@@ -959,16 +959,16 @@
riables%0A
+
from ten
@@ -1119,46 +1119,8 @@
l%0A%0A%0A
-@test_util.run_v1_only('b/120545219')%0A
clas
@@ -1584,16 +1584,18 @@
Variable
+V1
(%0A
@@ -1694,32 +1694,83 @@
Keys.GLOBAL_STEP
+,%0A ... |
44b6b0ff5efc6d9fcda4f886640663b68e7d6c14 | Add initial code for getting batting stats over a specified timeframe | pybaseball/league_batting_stats.py | pybaseball/league_batting_stats.py | Python | 0 | @@ -0,0 +1,1315 @@
+%0A%22%22%22%0ATODO%0Apull batting stats over specified time period %0Aallow option to get stats for full seasons instead of ranges%0A%22%22%22%0A%0Aimport requests%0Aimport pandas as pd%0Afrom bs4 import BeautifulSoup%0A%0Adef get_soup(start_dt, end_dt):%0A%09# get most recent standings if date not... | |
072423365ad1c03dd593f5b8528a7b60c0c9bee9 | Add AuctionHouse table. | pydarkstar/tables/auction_house.py | pydarkstar/tables/auction_house.py | Python | 0 | @@ -0,0 +1,960 @@
+%22%22%22%0A.. moduleauthor:: Adam Gagorik %3Cadam.gagorik@gmail.com%3E%0A%22%22%22%0Afrom sqlalchemy import Column, Integer, SmallInteger, String, text%0Afrom pydarkstar.tables.base import Base%0A%0Aclass AuctionHouse(Base):%0A __tablename__ = 'auction_house'%0A%0A id = Column(Integer... | |
f85f6ba07c47a6ccbd38a9e7bc2e9a2c69ebd09a | read senor values from rpi | pythonLib/ArduinoMoistureSensor.py | pythonLib/ArduinoMoistureSensor.py | Python | 0.000001 | @@ -0,0 +1,177 @@
+import smbus%0Aimport time%0A%0Abus = smbus.SMBus(1)%0Aaddress = int(sys.argv%5B1%5D)%0A%0Adata = bus.read_i2c_block_data(address,0)%0A%0Afor i in range (0,6):%0A%09print (data%5B2*i%5D %3C%3C 8)+ data%5B2*i+1%5D%0A
| |
47d7cfcd9db1a54e52532819895060527e1988b9 | update qlcoder | qlcoder/scheme_study/functional.py | qlcoder/scheme_study/functional.py | Python | 0.000001 | @@ -0,0 +1,109 @@
+if __name__ == '__main__':%0A my_arr = %5BNone%5D * 7654321%0A for i in range(0, 7654321):%0A my_arr%5Bi%5D=i%0A
| |
7618697cdb892388d7c5ddb731f5b9f138389ca4 | add A4 | A4/TestHashtable.py | A4/TestHashtable.py | Python | 0.999996 | @@ -0,0 +1,2077 @@
+#!/usr/bin/env python2%0A%0Afrom hashtable import Hashtable, LinkedList, hashFunction%0Aimport unittest%0Aimport collections%0A%0A%0Aclass TestHashtable(unittest.TestCase):%0A%0A def setUp(self):%0A buildings = %7B%0A %22CSCI%22 : %22McGlothlin-Street%22,%0A %22GSWS%2... | |
d635a60140c11c64db4ac887bc79396484bb55e3 | Add model_utils.print_graph_layer_shapes to handle Graph models. Also handle Merge layers | keras/utils/model_utils.py | keras/utils/model_utils.py | from __future__ import print_function
import numpy as np
import theano
def print_layer_shapes(model, input_shape):
"""
Utility function that prints the shape of the output at each layer.
Arguments:
model: An instance of models.Model
input_shape: The shape of the input you will provide to ... | Python | 0 | @@ -65,17 +65,16 @@
theano%0A%0A
-%0A
def prin
@@ -74,16 +74,996 @@
ef print
+_graph_layer_shapes(graph, input_shapes):%0A %22%22%22%0A Utility function to print the shape of the output at each layer of a Graph%0A%0A Arguments:%0A graph: An instance of models.Graph%0A input_shapes: A dict that... |
f379160e56a94359d9571ea1b1db1f7544677a57 | Fix reference to `latestEvent` in tests. | tests/sentry/api/serializers/test_grouphash.py | tests/sentry/api/serializers/test_grouphash.py | from __future__ import absolute_import
from sentry.api.serializers import serialize
from sentry.models import Event, GroupHash
from sentry.testutils import TestCase
class GroupHashSerializerTest(TestCase):
def test_no_latest_event(self):
user = self.create_user()
group = self.create_group()
... | Python | 0 | @@ -509,34 +509,33 @@
t result%5B'latest
-_e
+E
vent'%5D is None%0A%0A
@@ -985,34 +985,33 @@
t result%5B'latest
-_e
+E
vent'%5D is None%0A%0A
@@ -1532,26 +1532,25 @@
sult%5B'latest
-_e
+E
vent'%5D is No
@@ -2081,26 +2081,25 @@
sult%5B'latest
-_e
+E
vent'%5D == se
|
91e04b558b95aa21d5f7c730fc8355e5413ab83c | Use values and values_list in API closes #433 | judge/views/api.py | judge/views/api.py | from operator import attrgetter
from django.db.models import Prefetch
from django.http import JsonResponse, Http404
from django.shortcuts import get_object_or_404
from dmoj import settings
from judge.models import Contest, Problem, Profile, Submission, ContestTag
def sane_time_repr(delta):
days = delta.days
... | Python | 0 | @@ -668,16 +668,37 @@
_list'))
+.defer('description')
:%0A
@@ -1308,15 +1308,117 @@
for
-p in qs
+code, points, partial, name, group in qs.values_list('code', 'points', 'partial', 'name', 'group__full_name')
:%0A
@@ -1432,18 +1432,16 @@
roblems%5B
-p.
code%5D =
@@ -1456,34 +1456,32 @@
'points':
... |
db13f88055d5ea2357ecc4b996f80d3392655516 | Create parse.py | parse.py | parse.py | Python | 0.00002 | @@ -0,0 +1,2934 @@
+__version__ = %221.0%22%0A%0Aimport os%0Afrom ciscoconfparse import CiscoConfParse%0A%0A# -----------------------------------------------%0A# Create the db dictionary to store all records%0A# -----------------------------------------------%0Adb = %7B%7D%0A# ------------------------------------------... | |
bee35885bb845ea77aa4586bca33da3e54b92ed2 | Add `albumtypes` plugin | beetsplug/albumtypes.py | beetsplug/albumtypes.py | Python | 0.000001 | @@ -0,0 +1,2108 @@
+# -*- coding: utf-8 -*-%0A%0A# This file is part of beets.%0A# Copyright 2021, Edgars Supe.%0A#%0A# Permission is hereby granted, free of charge, to any person obtaining%0A# a copy of this software and associated documentation files (the%0A# %22Software%22), to deal in the Software without restricti... | |
f859eb67fdc66b930c3664a3586c454f5c9afe87 | Add files via upload | subunits/blink.py | subunits/blink.py | Python | 0 | @@ -0,0 +1,514 @@
+from nanpy import ArduinoApi%0D%0Afrom nanpy import SerialManager%0D%0Afrom time import sleep%0D%0A%0D%0Alink = SerialManager(device='/dev/ttyACM0')%0D%0AA = ArduinoApi(connection=link)%0D%0A%0D%0Aled = 13%0D%0A%0D%0A# SETUP:%0D%0AA.pinMode(led, A.OUTPUT)%0D%0A%0D%0A# LOOP:%0D%0Awhile True:%0D%0A ... | |
7d258bdb68119ad54a69e92ac7c7c1c2fc51e087 | Create scrap.py | scrap.py | scrap.py | Python | 0.000001 | @@ -0,0 +1,222 @@
+#!usr/bin/env python %0A%0Aimport requests%0Afrom bs4 import BeautifulSoup%0A%0Auri = requests.get(%22http://video9.in/english/%22)%0Asoup=BeautifulSoup(url.text)%0Afor link in soup.find_all(%22div%22,%7B%22class%22: %22updates%22%7D):%0A print link.text%0A
| |
2aae4701fd98f560e7e112084f47f66515f6f574 | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,458 @@
+from setuptools import setup, find_packages%0Aimport go_nogo_rig%0A%0A%0Asetup(%0A name='Go-NoGo',%0A version=go_nogo_rig.__version__,%0A packages=find_packages(),%0A install_requires=%5B'moa', 'pybarst', 'moadevs'%5D,%0A author='Matthew Einhorn',%0A author_email='moiein2000@gmail.c... | |
a903268692cef9054de9281622423234714d4596 | update FIXME to reflect partial progress | jsonrpc_http/Engine.py | jsonrpc_http/Engine.py | import inspect
#
import tabular_predDB.cython_code.State as State
import tabular_predDB.python_utils.sample_utils as su
def int_generator(start=0):
next_i = start
while True:
yield next_i
next_i += 1
class Engine(object):
def __init__(self, seed=0):
self.seed_generator = int_gene... | Python | 0 | @@ -974,20 +974,30 @@
tion to
-c, r
+max_iterations
, max_ti
|
7ae1d4b99e2354f76bed894493281d4885d97f34 | Add newer template rendering code | cms/test_utils/project/placeholderapp/views.py | cms/test_utils/project/placeholderapp/views.py | from django.http import HttpResponse
from django.shortcuts import render
from django.template import RequestContext
from django.template.base import Template
from django.views.generic import DetailView
from cms.test_utils.project.placeholderapp.models import (
Example1, MultilingualExample1, CharPksExample)
from cm... | Python | 0 | @@ -614,33 +614,16 @@
l.html',
-%0A
item_na
@@ -626,32 +626,49 @@
m_name=%22char_1%22,
+%0A
template_string
|
aef67e19a3494880620fd87a68ff581edaa9ce81 | Add unittest for madx.evaluate | test/test_madx.py | test/test_madx.py | Python | 0.000001 | @@ -0,0 +1,395 @@
+import unittest%0Afrom cern.madx import madx%0Afrom math import pi%0A%0Aclass TestMadX(unittest.TestCase):%0A %22%22%22Test methods of the madx class.%22%22%22%0A%0A def setUp(self):%0A self.madx = madx()%0A%0A def tearDown(self):%0A del self.madx%0A%0A def testEvaluate(self... | |
0a55f6f2bf49c679a422d44007df3f66c323e719 | mask unit test | test/test_mask.py | test/test_mask.py | Python | 0 | @@ -0,0 +1,531 @@
+import numpy as np%0Afrom minimask.mask import Mask%0Afrom minimask.spherical_poly import spherical_polygon%0A%0A%0Adef test_mask_sample():%0A %22%22%22 %22%22%22%0A vertices = %5B%5B0,0%5D,%5B10,0%5D,%5B10,10%5D,%5B0,10%5D%5D%0A S = spherical_polygon(vertices)%0A%0A M = Mask(polys=%5BS%5... | |
25495d675c44a75d7dedfe123f30a858f9cd60be | Add minimal (no asserts) test for play plugin | test/test_play.py | test/test_play.py | Python | 0.000001 | @@ -0,0 +1,852 @@
+# -*- coding: utf-8 -*-%0A%0A%22%22%22Tests for the play plugin%22%22%22%0A%0Afrom __future__ import (division, absolute_import, print_function,%0A unicode_literals)%0A%0Afrom mock import patch, Mock%0A%0Afrom test._common import unittest%0Afrom test.helper import TestHelper%0A... | |
b3ad7a7735d55a91682ea6798e6ebcfcf94b1969 | 287. Find the Duplicate Number. Brent's | p287_brent.py | p287_brent.py | Python | 0.999999 | @@ -0,0 +1,1130 @@
+import unittest%0A%0A%0Aclass Solution(object):%0A def findDuplicate(self, nums):%0A %22%22%22%0A :type nums: List%5Bint%5D%0A :rtype: int%0A %22%22%22%0A t = nums%5B0%5D%0A h = nums%5Bt%5D%0A max_loop_length = 1%0A loop_length = 1%0A%0A ... | |
83d00fea8adf611984c3b56a63f080f144612c69 | Create data_tool.py | data_tool.py | data_tool.py | Python | 0.000001 | @@ -0,0 +1,823 @@
+#!/usr/bin/python%0A# -*- coding:utf-8 -*-%0A%0Aimport pickle%0Aimport random%0A%0Adef load_data():%0A with open('dataset.pkl', 'r') as file:%0A data_set = pickle.load(file)%0A return data_set%0A%0Adef feature_format(data_set):%0A features = %5B%5D%0A labels = %5B%5D%0A for ... | |
c488e446aee3d28fa84bb24d446ca22af20e461c | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,492 @@
+#!/usr/bin/env python%0Afrom setuptools import setup, find_packages%0A%0A%0Adef lt27():%0A import sys%0A v = sys.version_info%0A return (v%5B0%5D, v%5B1%5D) %3C (2, 7)%0A %0A%0Atests_require = %5B%0A 'nose%3E=1.0',%0A 'mock',%0A%5D%0A%0A%0Aif lt27():%0A tests_require.append('unit... | |
6d3a9f41bec03405fa648ce169b9565f937e4598 | add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1065 @@
+from setuptools import setup%0A%0A%0Asetup(%0A name=%22timekeeper%22,%0A version=%220.1.0%22,%0A description=%22Send runtime measurements of your code to InfluxDB%22,%0A author=%22Torsten Rehn%22,%0A author_email=%22torsten@rehn.email%22,%0A license=%22ISC%22,%0A url=%22https://... | |
bc9401da60e8f10827f37772af937d4fb11ca248 | Add PyPI setup.py file | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,617 @@
+try:%0A from setuptools import setup%0Aexcept ImportError:%0A from distutils.core import setup%0A%0A%0Asetup(%0A name='component',%0A author='Daniel Chatfield',%0A author_email='chatfielddaniel@gmail.com',%0A version='0.0.1',%0A url='http://github.com/import/component',%0A py_... | |
1d7fa31d9f4ce42586fb33bea98d5af87bd95f3a | Allow setup.py install | setup.py | setup.py | Python | 0 | @@ -0,0 +1,361 @@
+from setuptools import setup%0A%0Asetup(name='multifil',%0A version='0.2',%0A description='A spatial half-sarcomere model and the means to run it',%0A url='https://github.com/cdw/multifil',%0A author='C David Williams',%0A author_email='cdave@uw.edu',%0A license='MIT',%0... | |
30220f57bc5052cb05ed5c7e3dc01c763152d175 | Add setup for python installation | setup.py | setup.py | Python | 0 | @@ -0,0 +1,217 @@
+#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='lqrrt',%0A version='1.0',%0A description='Kinodynamic RRT Implementation',%0A author='Jason Nezvadovitz',%0A packages=%5B'lqrrt'%5D,%0A )%0A
| |
0c7ec853c97a71eacc838be925c46ac0c26d1518 | Create setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,498 @@
+from distutils.core import setup%0Asetup(%0A name = 'ratio-merge',%0A packages = %5B'ratio-merge'%5D,%0A version = '0.1',%0A description = 'A small utility function for merging two lists by some ratio',%0A author = 'Adam Lev-Libfeld',%0A author_email = 'adam@tamarlabs.com',%0A url = 'https://g... | |
a29b7195af2550e5646f3aac581cbaf47244e8f4 | Create setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1063 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A# setup.py%0A%22%22%22%0ASetup files%0A%0ACopyright (c) 2020, David Hoffman%0A%22%22%22%0A%0Aimport setuptools%0A%0A# read in long description%0Awith open(%22README.md%22, %22r%22) as fh:%0A long_description = fh.read()%0A%0A# get requirements%0Aw... | |
45d734cb495e7f61c5cbbac2958e220868033a9d | Add setup.py for RTD | setup.py | setup.py | Python | 0 | @@ -0,0 +1,683 @@
+from distutils.core import setup%0A%0Asetup(%0A name='mayatools',%0A version='0.1-dev',%0A description='Collection of general tools and utilities for working in and with Maya.',%0A url='https://github.com/westernx/mayatools',%0A %0A packages=%5B'mayatools'%5D,%0A %0A author='M... | |
1ac147a2a9f627cccd917006f61cdda7b25ccc06 | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,531 @@
+from distutils.core import setup%0A%0Asetup(%0A name='applied-sims',%0A version='0.1',%0A classifiers=%5B%0A 'License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)',%0A 'Programming Language :: Python :: 3',%0A 'Topic :: Scientific/Engineering :: Physics',%0A ... | |
e6e96d9fa725ec28028b090c900086474e69cdb8 | Add basic setup.py | setup.py | setup.py | Python | 0.000002 | @@ -0,0 +1,328 @@
+%0Afrom distutils.core import setup%0A%0Asetup(%0A name='litemap',%0A version='1.0a',%0A description='Mapping class which stores in SQLite database.',%0A url='http://github.com/mikeboers/LiteMap',%0A py_modules=%5B'litemap'%5D,%0A %0A author='Mike Boers',%0A author_email='lite... | |
479ff810c07ebe5c309bb4c9f712e689e831945e | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1233 @@
+import os%0Afrom setuptools import setup%0A%0Athis_dir = os.path.dirname(__file__)%0Along_description = %22%5Cn%22 + open(os.path.join(this_dir, 'README.rst')).read()%0A%0Asetup(%0A name='ansible_role_apply',%0A version='0.0.0',%0A description='Apply a single Ansible role to host(s) easily'... | |
9d12617170982fc1b6b01d109d986f5cd45e0552 | Update setup.py. | setup.py | setup.py | from setuptools import setup,find_packages
setup (
name = 'pymatgen',
version = '1.0.1',
packages = find_packages(),
# Declare your packages' dependencies here, for eg:
install_requires = ['numpy','matplotlib','pymongo','PyCIFRW','psycopg2'],
author = 'Shyue Ping Ong, Anubhav Jain, Michael Kocher, Dan ... | Python | 0 | @@ -204,16 +204,24 @@
numpy','
+scipy','
matplotl
@@ -229,42 +229,20 @@
b','
-pymongo','PyCIFRW','psycopg2
+PyCIFRW
'%5D,%0A%0A
-%0A
au
@@ -665,30 +665,8 @@
cts,
- database access APIs,
and
|
4a7234d4592166a1a13bc6b8e8b3b201019df23b | Create prims_minimum_spanning.py | algorithms/graph/prims_minimum_spanning.py | algorithms/graph/prims_minimum_spanning.py | Python | 0.000041 | @@ -0,0 +1,738 @@
+import heapq # for priority queue%0A%0A# input number of nodes and edges in graph%0An, e = map (int,input().split())%0A%0A# initializing empty graph as a dictionary (of the form %7Bint:list%7D)%0Ag = dict (zip (%5Bi for i in range(1,n+1)%5D,%5B%5B%5D for i in range(n)%5D))%0A%0A# input graph data%0A... | |
a879ac0db99ba45ff3b6d453795a85635243fa11 | version change | setup.py | setup.py | from distutils.core import setup
setup(name='jieba',
version='0.22',
description='Chinese Words Segementation Utilities',
author='Sun, Junyi',
author_email='ccnusjy@gmail.com',
url='http://github.com/fxsjy',
packages=['jieba'],
package_dir={'jieba':'jieba'},
... | Python | 0.000001 | @@ -68,17 +68,17 @@
ion='0.2
-2
+3
', %0A
|
b12072d9245aaec0d242ee1d78118e9ad8d0e93a | Build documentation before install | setup.py | setup.py | #!/usr/bin/python
#
# This file is part of Plinth.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This pro... | Python | 0 | @@ -892,16 +892,34 @@
t shutil
+%0Aimport subprocess
%0A%0Afrom p
@@ -1162,17 +1162,16 @@
c'),%0A%5D%0A%0A
-%0A
class Cu
@@ -1260,16 +1260,25 @@
creation
+ and copy
%22%22%22%0A
@@ -1326,24 +1326,78 @@
command%22%22%22%0A
+ subprocess.check_call(%5B'make', '-C', 'doc'%5D)%0A%0A
inst
|
24f6cbdcf2f4261a651d058934c65c3696988586 | add setup.py to document deps | setup.py | setup.py | Python | 0 | @@ -0,0 +1,314 @@
+from setuptools import setup%0A%0Asetup(%0A name='gentle',%0A version='0.1',%0A description='Robust yet lenient forced-aligner built on Kaldi.',%0A url='http://lowerquality.com/gentle',%0A author='Robert M Ochshorn',%0A license='MIT',%0A packages=%5B'gentle'%5D,%0A ... | |
7f90879651bb3d0403db3a503ca53041aab1fefb | version bump | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='sendgrid',
version='0.2.3',
author='Yamil Asusta',
author_email='yamil@sendgrid.com',
url='https://github.com/sendgrid/sendgrid-python/',
packages=find_packages(),
license='MIT',
description='SendGrid library for Python'... | Python | 0.000001 | @@ -91,9 +91,9 @@
0.2.
-3
+4
',%0D%0A
|
654bd46a8226ea97000a1263132a37f7bf130718 | ADD setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,435 @@
+#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='kernel_regression',%0A version='1.0',%0A description='Implementation of Nadaraya-Watson kernel regression with automatic bandwidth selection compatible with sklearn.',%0A author='Jan Hendrik Metzen',%0A a... | |
1707306cdee6442e78fe9eaee1d472a0248f75d5 | make license consistent | setup.py | setup.py | # -*- coding: utf-8 -*-
"""
argcomplete
~~~~
Argcomplete provides easy and extensible automatic tab completion of arguments and options for your Python script.
It makes two assumptions:
- You're using bash as your shell
- You're using argparse to manage your command line options
See AUTODOCS_LINK for more info.
""... | Python | 0.000004 | @@ -480,11 +480,11 @@
se='
-BSD
+GPL
',%0A
|
1f1096046e11067c4d42235d3b1aadbfec869bff | Remove setuptools from install_requires | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
from os import path
import codecs
import os
import re
import sys
def read(*parts):
file_path = path.join(path.dirname(__file__), *parts)
return codecs.open(file_path, encoding='utf-8').read()
def find_version(*parts):
version_file = read(... | Python | 0 | @@ -1128,45 +1128,8 @@
%7D,%0A%0A
- install_requires=%5B'setuptools'%5D,%0A
|
260911a0a46601092aa75882c806ca921a0cbf6d | Add setup.py file so we can install | setup.py | setup.py | Python | 0 | @@ -0,0 +1,1540 @@
+from __future__ import with_statement%0Aimport sys%0A%0Afrom setuptools import setup, find_packages%0Afrom setuptools.command.test import test as TestCommand%0A%0Aversion = %220.0.1-dev%22%0A%0A%0Adef readme():%0A with open('README.md') as f:%0A return f.read()%0A%0Areqs = %5Bline.strip() ... | |
b1d87a8f96fb6a019bc7ebab71fe8e0c5921d80f | Include setup.py | setup.py | setup.py | Python | 0 | @@ -0,0 +1,474 @@
+from setuptools import find_packages%0Afrom setuptools import setup%0A%0AREQUIRED_PACKAGES = %5B'distance', 'tensorflow', 'numpy', 'six'%5D%0A%0Asetup(%0A name='attentionocr',%0A url='https://github.com/emedvedev/attention-ocr',%0A author_name='Ed Medvedev',%0A version='0.1',%0A instal... | |
6ded510fa9c694e8a836302131157604859d40b1 | add setup settings | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,355 @@
+from setuptools import setup%0A%0Asetup(name='uc-numero-alumno',%0A version='0.1.0',%0A description='Valida un n%C3%BAmero de alumno de la UC ',%0A url='https://github.com/mrpatiwi/uc-numero-alumno-python',%0A author='Patricio L%C3%B3pez',%0A author_email='patricio@lopezjuri.... | |
414c5d0f9e7e92772cf65be976791889e96e2799 | Package with setuptools | setup.py | setup.py | Python | 0 | @@ -0,0 +1,963 @@
+#!/usr/bin/env python%0A%0Afrom setuptools import setup, find_packages%0A%0Aclassifiers = %5B%0A 'Development Status :: 5 - Production/Stable',%0A 'Framework :: Twisted',%0A 'Intended Audience :: Developers',%0A 'License :: OSI Approved :: MIT License',%0A 'Operating System :: OS Indep... | |
8aada38d951d039e11e03a6bae9445c784bb4cce | Write a brief demo using nltk | parse-demo.py | parse-demo.py | Python | 0.000001 | @@ -0,0 +1,720 @@
+#!/usr/bin/python3%0A%0Aimport sys, os%0Aimport nltk%0A%0Aif len(sys.argv) %3C 2:%0A print(%22Please supply a filename.%22)%0A sys.exit(1)%0A%0Afilename = sys.argv%5B1%5D%0A%0Awith open(filename, 'r') as f:%0A data = f.read()%0A%0A# Break the input down into sentences, then into words, and p... | |
89fa937d218bef113d2bcc681cb4dbd547940c45 | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,549 @@
+from distutils.core import setup%0Asetup(%0A name = 'koofr',%0A packages = %5B'koofr'%5D, # this must be the same as the name above%0A install_requires=%5B'requests'%5D,%0A version = '0.1',%0A description = 'Python SDK for Koofr',%0A author = 'Andraz Vrhovec',%0A author_email = 'andraz@koofr.n... | |
8ecfe73916fbca42b9a1b47fb2758bb561b76eec | Remove print. | setup.py | setup.py | import os
from setuptools import setup, find_packages
README = os.path.join(os.path.dirname(__file__), 'README.md')
long_description = open(README).read() + '\n\n'
print find_packages()
setup (
name = 'pymatgen',
version = '1.2.4',
packages = find_packages(),
install_requires = ['numpy', 'scipy', 'matplotli... | Python | 0.000001 | @@ -164,31 +164,8 @@
n'%0A%0A
-print find_packages()%0A%0A
setu
|
004f720bd064c12f63aaf1dca44ee2da365a7365 | version change | setup.py | setup.py | from distutils.core import setup
setup(name='jieba',
version='0.11',
description='Chinese Words Segementation Utilities',
author='Sun, Junyi',
author_email='ccnusjy@gmail.com',
url='http://github.com/fxsjy',
packages=['jieba'],
package_dir={'jieba':'jieba'},
... | Python | 0.000001 | @@ -68,17 +68,17 @@
ion='0.1
-1
+4
', %0A
|
fe8cc65832b389314ee6e83c76371809e40cc5d1 | Bump to 0.1.1 | setup.py | setup.py | from ez_setup import use_setuptools
use_setuptools()
from setuptools import setup
setup(
name='Kivy Garden',
version='0.1',
license='MIT',
packages=['garden'],
scripts=['bin/garden', 'bin/garden.bat'],
install_requires=['requests'],
)
| Python | 0.000683 | @@ -132,16 +132,18 @@
ion='0.1
+.1
',%0A
|
9a0d2a8d207d9f8a105795eb97bdeaac0c30ddec | add ping_interval property | aiohttp_sse/__init__.py | aiohttp_sse/__init__.py | import asyncio
from aiohttp import hdrs
from aiohttp.protocol import Response as ResponseImpl
from aiohttp.web import StreamResponse
from aiohttp.web import HTTPMethodNotAllowed
__version__ = '0.0.1'
__all__ = ['EventSourceResponse']
class EventSourceResponse(StreamResponse):
PING_TIME = 15
def __init__(se... | Python | 0.000001 | @@ -278,25 +278,37 @@
):%0A%0A
-PING_TIME
+DEFAULT_PING_INTERVAL
= 15%0A%0A
@@ -713,32 +713,89 @@
nish_fut = None%0A
+ self._ping_interval = self.DEFAULT_PING_INTERVAL%0A
self._pi
@@ -1401,16 +1401,39 @@
Allowed(
+request.method, %5B'GET'%5D
)%0A%0A
@@ -2634,24 +2634,391 @@
resp_impl%0... |
b35affdf2183fa81e628f03a904ce80beb165de2 | Fix quote output | bertil.py | bertil.py | # -*- coding: utf-8 -*-
import sys
import datetime
import time
import urllib
import json
import socket
import re
import random
from slackbot.bot import Bot, listen_to, respond_to
from tinydb import TinyDB
db = TinyDB('/home/simon/bertil/quotes.json')
def get_food(day):
# Get JSON
URL = 'http://www.hanssono... | Python | 0.999424 | @@ -2225,17 +2225,16 @@
reply(u%22
-%3E
%7B%7D%22.form
|
ce7914dd35e66820248cb82760b50a31bc8a625b | Add setup.py script to install whip-neustar cli script | setup.py | setup.py | Python | 0 | @@ -0,0 +1,231 @@
+from setuptools import setup%0A%0Asetup(%0A name='whip-neustar',%0A version='0.1',%0A packages=%5B'whip_neustar'%5D,%0A entry_points=%7B%0A 'console_scripts': %5B%0A 'whip-neustar = whip_neustar.cli:main',%0A %5D,%0A %7D%0A)%0A
| |
a72bc73aab4b696113bee16f5f7f9da1540bc02f | Create playerlist.py | playerlist.py | playerlist.py | Python | 0.000001 | @@ -0,0 +1,937 @@
+import config%0Aclass players:%0A def __init__(self):%0A self.path=config.install_path+%22reg%5C%5CN_NOW_RUNNING%5C%5CPLAYERS%5C%5CLIST.nreg%22%0A def get_names_str(self,level):%0A a=open(self.path,%22r%22)%0A b=a.readlines()%0A string=%22%22%0A for i in b:%0A... | |
7fa6d8beb2637bed6b31cf1cea5fdafffc6049bf | add tests | tests/test_dfg.py | tests/test_dfg.py | Python | 0.000001 | @@ -0,0 +1,2839 @@
+#!/usr/bin/env python%0A%0Aimport logging%0Aimport time%0Aimport sys%0A%0Afrom os.path import join, dirname, realpath%0A%0Al = logging.getLogger(%22angr.tests.test_dfg%22)%0Al.setLevel(logging.DEBUG)%0A%0Aimport nose%0Aimport angr%0Aimport pyvex%0A%0Atest_location = str(join(dirname(realpath(__file_... | |
504612eb0c3c6ec210dd6e555941c13523333f12 | install without cython | setup.py | setup.py | from setuptools import setup, Extension
from Cython.Build import cythonize
from glob import glob
library = ('primesieve', dict(
sources=glob("lib/primesieve/src/primesieve/*.cpp"),
include_dirs=["lib/primesieve/include"],
language="c++",
))
extension = Extension(
"primesieve",
["primes... | Python | 0 | @@ -37,43 +37,8 @@
ion%0A
-from Cython.Build import cythonize%0A
from
@@ -217,16 +217,102 @@
))%0A%0A
+try:%0A from Cython.Build import cythonize%0Aexcept ImportError:%0A cythonize = None%0A%0A
extensio
@@ -385,16 +385,64 @@
ve.pyx%22%5D
+ if cythonize else %5B%22primesieve/primesieve.cpp%22%5D
,%0A ... |
42ca323888dc13246fa7f6a01a6e29efcdb2d5c5 | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1293 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0A%0Aimport os%0Afrom setuptools import setup%0A%0Aimport molvs%0A%0A%0Aif os.path.exists('README.rst'):%0A long_description = open('README.rst').read()%0Aelse:%0A long_description = ''''''%0A%0Asetup(%0A name='MolVS',%0A version=molvs.__ve... | |
e91b1c56b252ddc3073a15209e38e73424911b62 | Remove unused import. | setup.py | setup.py | #!/usr/bin/env python
#
# Copyright 2014 Quantopian, 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 ... | Python | 0 | @@ -631,23 +631,8 @@
tup,
- find_packages,
Ext
|
52cd79d7045a69ff5073af7ed14e9ed774de7a39 | Add setup.py. | setup.py | setup.py | Python | 0 | @@ -0,0 +1,1026 @@
+from setuptools import setup%0A%0Asetup(%0A name='pySUMO',%0A version='0.0.0a1',%0A description='A graphical IDE for Ontologies written in SUO-Kif',%0A long_description='A graphical IDE for Ontologies written in SUO-Kif',%0A url='',%0A author='',%0A author_email='',%0A licens... | |
7354dc674a4551169fb55bfcec208256e956d14e | Add skeleton class for conditions | components/condition.py | components/condition.py | Python | 0 | @@ -0,0 +1,766 @@
+%22%22%22A class to store conditions (eg. WHERE %5Bcond%5D).%22%22%22%0A%0A%0Aclass SgConditionSimple:%0A %22%22%22%0A A class to store a simple condition.%0A A simple condition is composed of 2 operands and 1 operator.%0A %22%22%22%0A %0A def __init__(self, operand-l, operator, ope... | |
8e3de37e14013dc371064eec5102f682b32d0cfc | modify cwd so setup.py can be run from anywhere | setup.py | setup.py | #!/usr/bin/python
import os
# old crosscat setup.py
from distutils.core import setup
from distutils.extension import Extension
from Cython.Distutils import build_ext
# venture setup.py
# from distutils.core import setup, Extension
def generate_sources(dir_files_tuples):
sources = []
for dir, files in dir_... | Python | 0 | @@ -11,18 +11,16 @@
/python%0A
-%0A%0A
import o
@@ -24,33 +24,8 @@
t os
-%0A%0A# old crosscat setup.py
%0Afro
@@ -140,74 +140,8 @@
xt%0A%0A
-# venture setup.py%0A# from distutils.core import setup, Extension%0A%0A
%0Adef
@@ -405,16 +405,141 @@
urces%0A%0A%0A
+# make sure cwd is correct%0Athis_file = os.path.absp... |
a0607d0f9b7c08ddcf81459868b33761d8ed5bb2 | Set up the dependency | setup.py | setup.py | Python | 0.000008 | @@ -0,0 +1,1614 @@
+# Copyright 2021 The KerasNLP Authors%0A#%0A# Licensed under the Apache License, Version 2.0 (the %22License%22);%0A# you may not use this file except in compliance with the License.%0A# You may obtain a copy of the License at%0A#%0A# https://www.apache.org/licenses/LICENSE-2.0%0A#%0A# Unless re... | |
d9be2b8a61a88f0ee228c08d1f277770602840b1 | Add python version for compress | compression/compress.py | compression/compress.py | Python | 0.000002 | @@ -0,0 +1,486 @@
+%0A%0A%0Adef compress(uncompressed):%0A count = 1%0A compressed = %22%22%0A if not uncompressed:%0A return compressed%0A letter = uncompressed%5B0%5D%0A for nx in uncompressed%5B1:%5D:%0A if letter == nx:%0A count = count + 1%0A else:%0A compr... | |
d480c2738bb4d0ae72643fc9bc1f911cb630539c | add 12-list.py | python/12-list.py | python/12-list.py | Python | 0.000003 | @@ -0,0 +1,429 @@
+#!/usr/bin/env python%0A%0Aimport math%0A%0Alist = %5B'physics', 'chemistry', 1997, 2001%5D;%0A%0Aprint %22list%5B2%5D = %22, list%5B2%5D%0Aprint %22list%5B1:3%5D = %22, list%5B1:3%5D%0A%0Alist%5B2%5D = %22math%22;%0A%0A%0Aprint %22update, list%5B2%5D = %22, list%5B2%5D%0A%0Adel list%5B2%5D%0Aprint %... | |
240b22d0b078951b7d1f0df70156b6e2041a530f | fix setup.py dor pypi. | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2009 Benoit Chesneau <benoitc@e-engura.org>
#
# This software is licensed as described in the file COPYING, which
# you should have received as part of this distribution.
import os
import sys
from setuptools import setup
data_files = []
root_dir = os.path.... | Python | 0 | @@ -1132,9 +1132,9 @@
chDB
-%E2%80%99
+'
s%0A
@@ -1884,24 +1884,16 @@
chdb
-%3E=0.5dev
',%0A %5D
%0A)%0A%0A
@@ -1888,12 +1888,13 @@
',%0A %5D
+,
%0A)%0A%0A
|
3ada80358a059b3a5ee4dd4ceed572f933a1ec67 | Create setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1795 @@
+from setuptools import setup, find_packages%0A# To use a consistent encoding%0Afrom codecs import open%0Afrom os import path%0A%0Ahere = path.abspath(path.dirname(__file__))%0A%0A# Get the long description from the README file%0Awith open(path.join(here, 'README.rst'), encoding='utf-8') as f:%0A ... | |
c5b12c2f93c5e1da1fa5011ecc089f46febe11d1 | version bump | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='chromote',
version='0.1.1',
description="Python Wrapper for the Google Chrome Remote Debugging Protocol",
author='Chris Seymour',
packages=find_packages(),
install_requires=['requests', 'websocket-client']
)
| Python | 0.000001 | @@ -83,17 +83,17 @@
on='0.1.
-1
+2
',%0A d
|
606853d904c1967b41b30d828940c4aa7ab4c0ab | add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,1062 @@
+#!/usr/bin/env python%0A#%0A# Licensed to the Apache Software Foundation (ASF) under one%0A# or more contributor license agreements. See the NOTICE file%0A# distributed with this work for additional information%0A# regarding copyright ownership. The ASF licenses this file%0A# to you under the Apac... | |
90ec011ebec93f4c0b0e93fc831b0f782be1b13e | Add the setup.py PIP install config file. | setup.py | setup.py | Python | 0 | @@ -0,0 +1,214 @@
+from setuptools import setup%0A%0Asetup(%0A name='SedLex',%0A version='0.1',%0A install_requires=%5B%0A 'html5lib',%0A 'beautifulsoup4',%0A 'requests',%0A 'jinja2',%0A 'python-gitlab'%0A %5D%0A)%0A
| |
fa88dac9c35fc473ebfea05926e0200926251d9d | Create setup.py | setup.py | setup.py | Python | 0 | @@ -0,0 +1,564 @@
+#!/usr/bin/env python%0A%0Afrom distutils.core import setup%0A%0Asetup(name='RPiProcessRig',%0A version='1.0',%0A description='A simple industrial rig that can be used for experimentation with a variety of different control algortithms',%0A author='Alexander Leech',%0A author_emai... | |
c0989ce01ee62367a92eb48855a42c3c4986de84 | Add setup.py. | setup.py | setup.py | Python | 0 | @@ -0,0 +1,1331 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Aimport codecs%0Aimport os%0A%0Afrom setuptools import find_packages, setup%0A%0A%0Adef read(file_name):%0A file_path = os.path.join(os.path.dirname(__file__), file_name)%0A return codecs.open(file_pa... | |
7634b58b1bd0fc2eee121bad2a20b61077a48d7b | Update setup.py | setup.py | setup.py | #!/usr/bin/env python
import sys
from distutils.core import setup
try:
import fontTools
except:
print "*** Warning: defcon requires FontTools, see:"
print " fonttools.sf.net"
try:
import robofab
except:
print "*** Warning: defcon requires RoboFab, see:"
print " robofab.com"
#if "sdist"... | Python | 0 | @@ -939,30 +939,46 @@
http
+s
://
-code.typesupply.com
+github.com/typesupply/defconAppKit
%22,%0A
@@ -1211,8 +1211,9 @@
%22Lib%22%7D%0A)
+%0A
|
3c5802bda34ed9c772f7bb2e33b29f265440f286 | Add a simple setup.py. | setup.py | setup.py | Python | 0 | @@ -0,0 +1,947 @@
+import os%0Afrom setuptools import setup, find_packages%0A%0A%0AREADME_PATH = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'README.markdown')%0Adescription = 'django-goodfields makes creating good form fields easy.'%0Along_description = os.path.exists(README_PATH) and open(README_PATH).re... | |
26cc1c4ff2b5c0de8b83bb9bd088d80f5650dda1 | Create setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,369 @@
+__author__ = 'Alumne'%0A%0Afrom distutils.core import setup%0A%0Asetup(name='PEACHESTORE',%0A version='python 3',%0A author='albert cuesta',%0A author_email='albert_cm_91@hotmail.com',%0A url='https://github.com/albertcuesta/PEACHESTORE',%0A description='es una tienda online ... | |
d64367eda03772997af21792e82a2825848c1ae6 | add tests for splat utils | astroquery/splatalogue/tests/test_utils.py | astroquery/splatalogue/tests/test_utils.py | Python | 0 | @@ -0,0 +1,939 @@
+# Licensed under a 3-clause BSD style license - see LICENSE.rst%0Afrom ... import splatalogue%0Afrom astropy import units as u%0Aimport numpy as np%0Afrom .test_splatalogue import patch_post%0Afrom .. import utils%0A%0Adef test_clean(patch_post):%0A x = splatalogue.Splatalogue.query_lines(114*u.GH... | |
b72f8a9b0d9df7d42c43c6a294cc3aab2cb91641 | Add missing migrations for limit_choices_to on BlogPage.author | blog/migrations/0002_auto_20190605_1104.py | blog/migrations/0002_auto_20190605_1104.py | Python | 0.000001 | @@ -0,0 +1,675 @@
+# Generated by Django 2.2.2 on 2019-06-05 08:04%0A%0Aimport blog.abstract%0Afrom django.conf import settings%0Afrom django.db import migrations, models%0Aimport django.db.models.deletion%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('blog', '0001_squashed_0006_... | |
7fdf796440c3a4ed84ffcb4343cd92f0013c8b1f | add current client, supports basic chatting | slack.py | slack.py | Python | 0 | @@ -0,0 +1,156 @@
+from slackclient import SlackClient%0A%0Adef get_client(token='4577027817.4577075131'):%0A return SlackClient(token)%0A%0Aprint get_client().api_call('api.test')%0A%0A
| |
f1c1206af29ee0f7be8b7477cd409f2844c816b3 | add Todo generator | todo/generator.py | todo/generator.py | Python | 0 | @@ -0,0 +1,1643 @@
+# coding=utf8%0A%0A%22%22%22%0AGenerator from todo object to todo format string%0A%22%22%22%0A%0Afrom models import Task%0Afrom models import Todo%0A%0A%0Aclass Generator(object):%0A %22%22%22%0A Generator from todo object to readable string.%0A %22%22%22%0A%0A newline = %22%5Cn%22%0A%0A... | |
3c290803bbd6d7401903506b3a27cf2c9ebad0b4 | Add ChatInfoFormatter | bot/action/standard/info/formatter/chat.py | bot/action/standard/info/formatter/chat.py | Python | 0 | @@ -0,0 +1,2510 @@
+from bot.action.standard.info.formatter import ApiObjectInfoFormatter%0Afrom bot.action.util.format import ChatFormatter%0Afrom bot.api.api import Api%0Afrom bot.api.domain import ApiObject%0A%0A%0Aclass ChatInfoFormatter(ApiObjectInfoFormatter):%0A def __init__(self, api: Api, chat: ApiObject, b... | |
1ad56e631c29869d127931b555d0b366f7e75641 | Add test for fftpack. | numpy/fft/tests/test_fftpack.py | numpy/fft/tests/test_fftpack.py | Python | 0 | @@ -0,0 +1,267 @@
+import sys%0Afrom numpy.testing import *%0Aset_package_path()%0Afrom numpy.fft import *%0Arestore_path()%0A%0Aclass test_fftshift(NumpyTestCase):%0A def check_fft_n(self):%0A self.failUnlessRaises(ValueError,fft,%5B1,2,3%5D,0)%0A%0Aif __name__ == %22__main__%22:%0A NumpyTest().run()%0A
| |
ab6fa9717b092f3b8eea4b70920a1d7cef042b69 | Return disappeared __main__ | certchecker/__main__.py | certchecker/__main__.py | Python | 0.000169 | @@ -0,0 +1,290 @@
+import click%0A%0Afrom certchecker import CertChecker%0A%0A@click.command()%0A@click.option(%0A '--profile',%0A default='default',%0A help=%22Section name in your boto config file%22%0A)%0Adef main(profile):%0A cc = CertChecker(profile)%0A print(cc.result)%0A%0Aif __name__ == %22__main... | |
b9feeb2a37f0596b48f9582e8953d29485167fc8 | Add an event-driven recording tool | tools/sofa-edr.py | tools/sofa-edr.py | Python | 0.000002 | @@ -0,0 +1,1975 @@
+#!/usr/bin/env python3%0Aimport subprocess%0Aimport time%0Aimport argparse%0A%0Aif __name__ == '__main__':%0A bwa_is_recorded = False%0A smb_is_recorded = False%0A htvc_is_recorded = False%0A%0A parser = argparse.ArgumentParser(description='A SOFA wrapper which supports event-driven reco... | |
42ab52b6d077443fac20ea872b503589f6ddb3f7 | Create pyPostings.py | pyPostings.py | pyPostings.py | Python | 0 | @@ -0,0 +1,913 @@
+import re%0Aimport string%0A%0Adef posting(corpus):%0A posting = %5B%5D%0A %0A tokens = tokenize(corpus)%0A for index, token in enumerate(tokens):%0A posting.append(%5Btoken, (index+1)%5D)%0A%0A return posting%0A%0Adef posting_list(corpus):%0A posting_list = %7B%7D%0A %0A ... | |
ee39e69fe5d6e93844f47eaff0d9547622600fa7 | make parsing times easier | py/phlsys_strtotime.py | py/phlsys_strtotime.py | Python | 0.000002 | @@ -0,0 +1,2836 @@
+#!/usr/bin/env python%0A# encoding: utf-8%0A%0A%22%22%22A poor substitute for PHP's strtotime function.%22%22%22%0A%0Aimport datetime%0A%0A%0Adef describeDurationStringToTimeDelta():%0A return str('time can be specified like %225 hours 20 minutes%22, use '%0A 'combinations of second... | |
2cf2a89bf3c7ccf667e4bcb623eeb6d0e1ea37bb | print sumthing pr1 | python/py1.py | python/py1.py | Python | 0.999948 | @@ -0,0 +1,349 @@
+#!/usr/bin/env python3%0A%0A%22%22%22%0AIf we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.%0A%0AFind the sum of all the multiples of 3 or 5 below 1000.%0A%22%22%22%0A%0Athing = %5B%5D%0A%0Afor urmom in range(1,1000):%0A ... | |
784fd8b08ee0f268350a2003a9c06522c0678874 | Add python code for doing tensor decomposition with scikit-tensor. | python/run.py | python/run.py | Python | 0 | @@ -0,0 +1,1093 @@
+import logging%0Aimport numpy%0Afrom numpy import genfromtxt%0Afrom sktensor import sptensor, cp_als%0A# Set logging to DEBUG to see CP-ALS information%0Alogging.basicConfig(level=logging.DEBUG)%0A%0Adata = genfromtxt('../datasets/movielens-synthesized/ratings-synthesized-50k.csv', delimiter=',')%0A... | |
00413958a12607aab942c98581b1a9e6d682ef28 | Create Single-Prime.py | python/Single-Prime.py | python/Single-Prime.py | Python | 0.000003 | @@ -0,0 +1,878 @@
+#By Isabelle.%0A#Checks a single number and lists all of its factors (except 1 and itself)%0A%0Aimport math%0A%0Anum = int(input(%22Pick a number to undergo the primality test!%5Cn%22))%0Aroot = int(round(math.sqrt(num)))%0Aprime = True%0Afor looper in range(2,root + 1): #53225 should normally be 3%0... | |
1cb8df64d4f6f257d0bd03caaaddb33ad11a5c2c | Add or_gate | python/ch02/or_gate.py | python/ch02/or_gate.py | Python | 0.000001 | @@ -0,0 +1,342 @@
+import numpy as np%0A%0A%0Adef OR(x1, x2):%0A x = np.array(%5Bx1, x2%5D)%0A w = np.array(%5B0.5, 0.5%5D)%0A b = -0.2%0A tmp = np.sum(w * x) + b%0A if tmp %3C= 0:%0A return 0%0A else:%0A return 1%0A%0A%0Aif __name__ == '__main__':%0A for xs in %5B(0, 0), (1, 0), (0, ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.