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 |
|---|---|---|---|---|---|---|---|
111eb59d2390a008cad5edc8e18456d42b7f7117 | Add hearthPwnCrawler.py, for crawling deck strings from hearthPwn websize. | hearthPwnCrawler.py | hearthPwnCrawler.py | Python | 0 | @@ -0,0 +1,1549 @@
+#!/usr/bin/env python%0A# -*- encoding: utf-8 -*-%0A# Created on 2017-07-17 08:52:38 by lanhin%0A# Project: Deckstring Crawler%0A#%0A# Use this file as a pyspider script%0A# To crawl deck from http://www.hearthpwn.com/decks%0A# Refer to http://docs.pyspider.org/en/latest/Quickstart/ for more details... | |
4cfc07a275a473ed14f7c99150b2f233c680d7c0 | Add db dumping utility | dbcat.py | dbcat.py | Python | 0 | @@ -0,0 +1,219 @@
+#!/usr/bin/env python%0A%0Aimport sys%0Aimport anydbm as dbm%0A%0Adef main():%0A for k,v in dbm.open(sys.argv%5B1%5D).iteritems():%0A print %22key: %7B0:s%7D value: %7B1:s%7D%22.format(k, v)%0A%0Aif __name__ == '__main__':%0A sys.exit(main())
| |
1631731657af28c275b35f9b084807e4f244c334 | debug module. initial code | debug.py | debug.py | Python | 0.999675 | @@ -0,0 +1,1253 @@
+# -*- coding: utf-8 -*-%0A# MusicPlayer, https://github.com/albertz/music-player%0A# Copyright (c) 2013, Albert Zeyer, www.az2000.de%0A# All rights reserved.%0A# This code is under the 2-clause BSD license, see License.txt in the root directory of this project.%0A%0A# This is the debug module: tools... | |
ed43384ece07bf1a02529d2f79423e96c8283443 | Add mangling experimental sample | src_clang/experimental/show-mangle.py | src_clang/experimental/show-mangle.py | Python | 0 | @@ -0,0 +1,939 @@
+import pprint%0Aimport sys%0Aimport clang.cindex%0A%0Adef get_cursor(source, spelling):%0A %22%22%22Obtain a cursor from a source object.%0A%0A This provides a convenient search mechanism to find a cursor with specific%0A spelling within a source. The first argument can be either a%0A Tra... | |
0caaf977096d5936747ad4931d14041675a9864a | create a paths utility to better work with ceph paths | ceph_deploy/util/paths.py | ceph_deploy/util/paths.py | Python | 0 | @@ -0,0 +1,598 @@
+from os.path import join%0A%0Afrom ceph_deploy.util import constants%0A%0A%0Aclass mon(object):%0A%0A _base = join(constants.mon_path, 'ceph-')%0A%0A @classmethod%0A def path(cls, hostname):%0A return %22%25s%25s%22 %25 (cls._base, hostname)%0A%0A @classmethod%0A def done(cls, h... | |
1aeb34f003e5d437ac55c560ef062b22e9f02c0a | Define health blueprint. | rio/blueprints/health.py | rio/blueprints/health.py | Python | 0.000002 | @@ -0,0 +1,134 @@
+# -*- coding: utf-8 -*-%0A%0Afrom flask import Blueprint%0A%0Abp = Blueprint('health', __name__)%0A%0A@bp.route('/')%0Adef index():%0A return 'OK'%0A
| |
a8b48d9174ce9c30166c0c2a8011c2c40624c4bd | Add a spider for Planned Parenthood | locations/spiders/planned_parenthood.py | locations/spiders/planned_parenthood.py | Python | 0 | @@ -0,0 +1,1790 @@
+# -*- coding: utf-8 -*-%0Aimport scrapy%0Aimport json%0Aimport re%0A%0Afrom locations.items import GeojsonPointItem%0A%0A%0Aclass PlannedParenthoodSpider(scrapy.Spider):%0A name = %22planned_parenthood%22%0A allowed_domains = %5B%22www.plannedparenthood.org%22%5D%0A start_urls = (%0A ... | |
7dbf6b978d45428e6162723cfa1c985a42a096df | Use more pythonic "private" methods | tvrenamr/tvrenamr.py | tvrenamr/tvrenamr.py | #!/usr/bin/python
import logging
import os
import sys
from __init__ import get_version
from config import Config
from episode import Episode
from errors import *
from logs import start_logging
from main import TvRenamr
from options import OptionParser
log = logging.getLogger('Core')
parser = OptionParser(usage='tvr... | Python | 0 | @@ -1470,31 +1470,31 @@
= self._
-_determine_type
+build_file_list
(path, o
@@ -1747,17 +1747,16 @@
self._
-_
start_dr
@@ -2103,33 +2103,32 @@
self._
-_
stop_dry_run()%0A%0A
@@ -2140,23 +2140,23 @@
ef _
-_determine_type
+build_file_list
(sel
@@ -4720,32 +4720,51 @@
options.debug:%0A
+ e... |
ffd2985514aef7dd21eb7c8276ddcf98ecdfe075 | Fix duplicate keys | vint/ast/plugin/builtin_identifiers.py | vint/ast/plugin/builtin_identifiers.py | BuiltinIdentifierMap = {
'abs': True,
'acos': True,
'add': True,
'append': True,
'append': True,
'argc': True,
'argidx': True,
'argv': True,
'argv': True,
'asin': True,
'atan': True,
'atan2': True,
'browse': True,
'browsedir': True,
'bufexists': True,
'buf... | Python | 0.003202 | @@ -90,36 +90,16 @@
: True,%0A
- 'append': True,%0A
'arg
@@ -100,32 +100,32 @@
'argc': True,%0A
+
'argidx': Tr
@@ -146,34 +146,16 @@
: True,%0A
- 'argv': True,%0A
'asi
@@ -1543,33 +1543,16 @@
: True,%0A
- 'get': True,%0A
'get
@@ -1860,37 +1860,16 @@
: True,%0A
- 'getline': True,%0... |
0331bffc755ad4234edcca3edaf1b9697b8ae8c3 | Create A.py | Google-Code-Jam/2010-Africa/A.py | Google-Code-Jam/2010-Africa/A.py | Python | 0.000004 | @@ -0,0 +1 @@
+%0A
| |
c568256dac3c13f6740d2a2df5a8a848e2f7d68e | check in new stream settings file | waterbutler/core/streams/settings.py | waterbutler/core/streams/settings.py | Python | 0 | @@ -0,0 +1,179 @@
+from waterbutler import settings%0A%0A%0Aconfig = settings.child('STREAMS_CONFIG')%0A%0A%0AZIP_EXTENSIONS = config.get('ZIP_EXTENSIONS', '.zip .gz .bzip .bzip2 .rar .xz .bz2 .7z').split(' ')%0A
| |
5bea532c7651faacb163745fbbf28fa4f53ba438 | add predicting-office-space-price | ai/machine-learning/predicting-office-space-price/predicting-office-space-price.py | ai/machine-learning/predicting-office-space-price/predicting-office-space-price.py | Python | 0.998153 | @@ -0,0 +1,596 @@
+import numpy as np%0Afrom sklearn.preprocessing import PolynomialFeatures%0Afrom sklearn import linear_model%0A%0Aif __name__ == %22__main__%22:%0A (f, n) = map(int, raw_input().split())%0A x = %5B%5D%0A y = %5B%5D%0A poly = PolynomialFeatures(degree = 4)%0A for i in range(n):%0A ... | |
62271f00475216b7e16aa6deb900702d52973606 | Fix import and stylesheet stripping tests | third_party/tvcm/tvcm/parse_html_deps_unittest.py | third_party/tvcm/tvcm/parse_html_deps_unittest.py | #!/usr/bin/env python
# Copyright (c) 2013 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import unittest
import parse_html_deps
import re
class ParseTests(unittest.TestCase):
def test_parse_empty(self):
parser = ... | Python | 0.000003 | @@ -4471,32 +4471,37 @@
e(html))%0A%0A def
+test_
html_contents_ba
@@ -4697,32 +4697,37 @@
_script)%0A%0A def
+test_
html_contents_wi
@@ -5018,32 +5018,40 @@
links_and_script
+.strip()
)%0A%0A def html_co
@@ -5043,16 +5043,21 @@
%0A%0A def
+test_
html_con
@@ -5379,24 +5379,32 @@
s_and_script
+.strip()
... |
45fea3847e2800a920ccb06e102ebaf9a5f9a4ce | Add forgotten migration for newly introduced default ordering | tk/material/migrations/0002_auto_20170704_2155.py | tk/material/migrations/0002_auto_20170704_2155.py | Python | 0 | @@ -0,0 +1,2175 @@
+# -*- coding: utf-8 -*-%0A# Generated by Django 1.11.2 on 2017-07-04 19:55%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Aimport localized_fields.fields.field%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('material', '0001_in... | |
af0486cd767564cda7259aa30a0d7c90420e226e | Add get json example | chapter2/get.py | chapter2/get.py | Python | 0 | @@ -0,0 +1,113 @@
+import urllib2,json%0Aresults = urllib2.urlopen('http://192.168.168.84/api.json').read()%0Ajson.loads(results)%5B'led'%5D
| |
1acbad02071a4d1ef953bc2c0643525e5d681d54 | Add in a script to run the linter manually | runlint.py | runlint.py | Python | 0.000382 | @@ -0,0 +1,1151 @@
+#!/usr/bin/env python%0A%0Aimport optparse%0Aimport sys%0A%0Afrom closure_linter import checker%0Afrom closure_linter import error_fixer%0Afrom closure_linter import gjslint%0A%0A%0AUSAGE = %22%22%22%25prog %5Boptions%5D %5Bfile1%5D %5Bfile2%5D...%0A%0ARun a JavaScript linter on one or more files.%0... | |
3e5d6e5dd31193f42ebddaeff856bfe53703a19e | Add script to get evidence sources | models/fallahi_eval/evidence_sources.py | models/fallahi_eval/evidence_sources.py | Python | 0 | @@ -0,0 +1,1187 @@
+from util import pklload%0Afrom collections import defaultdict%0Aimport indra.tools.assemble_corpus as ac%0A%0A%0Aif __name__ == '__main__':%0A # Load cached Statements just before going into the model%0A stmts = pklload('pysb_stmts')%0A%0A # Start a dictionary for source counts%0A sourc... | |
276435cc3b4f77dc16dde4a73cd930e461e1ef47 | Implement LM in defn/lm.py | imaginet/defn/lm.py | imaginet/defn/lm.py | Python | 0.001362 | @@ -0,0 +1,2276 @@
+from funktional.layer import Layer, Dense, StackedGRU, StackedGRUH0, %5C%0A Embedding, OneHot, clipped_rectify, CrossEntropy, %5C%0A last, softmax3d, params%0Aimport funktional.context as context %0Afrom funktional.layer import params%0... | |
bcb8615fb0d009ad4e7899b9e91701333dc56990 | Add abyss package (#4555) | var/spack/repos/builtin/packages/abyss/package.py | var/spack/repos/builtin/packages/abyss/package.py | Python | 0 | @@ -0,0 +1,2289 @@
+##############################################################################%0A# Copyright (c) 2013-2016, Lawrence Livermore National Security, LLC.%0A# Produced at the Lawrence Livermore National Laboratory.%0A#%0A# This file is part of Spack.%0A# Created by Todd Gamblin, tgamblin@llnl.gov, All r... | |
418e714e3d544abc7120c7252c51493cd59081a0 | Add custom CommentedObjectManager | comment_utils/managers.py | comment_utils/managers.py | Python | 0.000001 | @@ -0,0 +1,2178 @@
+%22%22%22%0ACustom manager which managers of objects which allow commenting can%0Ainheit from.%0A%0A%22%22%22%0A%0Afrom django.db import models%0A%0Aclass CommentedObjectManager(models.Manager):%0A %22%22%22%0A A custom manager class which provides useful methods for types of%0A objects whi... | |
f189ed9401e82e55a7b3b73ce06a8f5c642344ac | Add functional test file | functional_tests.py | functional_tests.py | Python | 0.000001 | @@ -0,0 +1,348 @@
+from selenium import webdriver%0Aimport unittest%0A%0Aclass Test(unittest.TestCase):%0A%0A def setUp(self):%0A self.browser = webdriver.Firefox()%0A self.browser.implicitly_wait(3) # Browser will eventually wait 3 secs%0A # for a thing to appear... | |
09a25009965d9951614ed0702185947f796c41a0 | Create scraper.py | scraper.py | scraper.py | Python | 0.000004 | @@ -0,0 +1,781 @@
+from lxml.html import parse%0A%0Adef main():%0A%09baseurl = 'http://www.schoolcolleges.com/school.select.php?offset=%25s&val=city=%25270%2527&select=%25s'%0A%09states = %5B%0A%09'Andhra Pradesh',%0A%09'Arunachal Pradesh',%0A%09'Assam',%0A%09'BIHAR',%0A%09'Chhattisgarh',%0A%09'Goa',%0A%09'Gujarat',%0A... | |
691543bb43b67dd9cc9ff6d6ee6a212badd4c61e | add valid unicode example | scripts/unicode_valid.py | scripts/unicode_valid.py | Python | 0.004751 | @@ -0,0 +1,440 @@
+#!/usr/bin/env python%0A# -*- coding: utf-8 -*-%0Aimport json%0A%0A%0Aprint(json.dumps(%7B%0A %22_meta%22: %7B%0A %22hostvars%22: %7B%0A %22not_unicode%22: %7B%22host_var%22: %22unicode here %E6%97%A5%E6%9C%AC%E8%AA%9E%22%7D%0A %7D%0A %7D,%0A %22all%22: %7B%0A ... | |
2bc7acd167d6e18dfbc2bc2625957f2bd58fa1f5 | Create spacial_prototype.py | Vision/spacial_prototype.py | Vision/spacial_prototype.py | Python | 0.000003 | @@ -0,0 +1,2323 @@
+import numpy as np%0Aimport math as m%0A%0A# Prototype code for the image-to-world location system. Requires numpy.%0A%0A# TODO%0Adef _inverse_perspective():%0A pass%0A%0A# Convert a global coordinate to a relative coordinate%0A# (roll, pitch, yaw) = camera_angle%0A# (x, y, z) = camera_pos, cone_... | |
785f6a4f435c68bb6336b4e42da0964cf5cbfce4 | Add module that finds classifier training examples given a ground truth in the graph | hytra/jst/classifiertrainingexampleextractor.py | hytra/jst/classifiertrainingexampleextractor.py | Python | 0.00015 | @@ -0,0 +1,3098 @@
+'''%0AProvide methods to find positive and negative training examples from a hypotheses graph and %0Aa ground truth mapping, in the presence of multiple competing segmentation hypotheseses.%0A'''%0A%0Aimport numpy as np%0Aimport logging%0Afrom hytra.core.random_forest_classifier import RandomForestC... | |
23f6d87b94bf0340b70b9803f1b8c712f1d88726 | Add models in session module. | dataviva/apps/session/models.py | dataviva/apps/session/models.py | Python | 0 | @@ -0,0 +1,1356 @@
+from dataviva.apps.session.login_providers import facebook, twitter, google%0Afrom dataviva.apps.account.models import User%0Afrom dataviva.utils.encode import sha512%0Afrom flask import Blueprint, request, render_template, session, redirect, Response%0A%0Afrom flask.ext.login import login_user, log... | |
ccd1822d65f5565d4881e5a6a32b535e55cc2b50 | Implement preview of entries for restricted users in EntryPreviewMixin | zinnia/views/mixins/entry_preview.py | zinnia/views/mixins/entry_preview.py | Python | 0 | @@ -0,0 +1,857 @@
+%22%22%22Preview mixins for Zinnia views%22%22%22%0Afrom django.http import Http404%0Afrom django.utils.translation import ugettext as _%0A%0Afrom zinnia.managers import PUBLISHED%0A%0A%0Aclass EntryPreviewMixin(object):%0A %22%22%22%0A Mixin implementing the preview of Entries.%0A %22%22%22... | |
120c93a2dd0022de5cb3a30ceffc027e69b23c3a | Add ProgressMonitor | entity_networks/monitors.py | entity_networks/monitors.py | Python | 0 | @@ -0,0 +1,1725 @@
+from __future__ import absolute_import%0Afrom __future__ import print_function%0Afrom __future__ import division%0A%0Aimport numpy as np%0Aimport tensorflow as tf%0A%0Afrom tqdm import tqdm%0A%0Aclass ProgressMonitor(tf.contrib.learn.monitors.EveryN):%0A%0A def __init__(self, tensor_names, every_... | |
eec153999c3aa3dd48cd6f6a0579da61dd5f165b | version bump for 0.21.5.3. | oneflow/__init__.py | oneflow/__init__.py |
VERSION = '0.21.5.2'
| Python | 0 | @@ -12,12 +12,12 @@
'0.21.5.
-2
+3
'%0A%0A
|
d9c59c8f4a3ef682db204f137292952f70e86c3c | version bump for 0.25.11.6. | oneflow/__init__.py | oneflow/__init__.py |
VERSION = '0.25.11.5'
| Python | 0 | @@ -13,12 +13,12 @@
0.25.11.
-5
+6
'%0A%0A
|
fb1785179af9bd731afce3b3c4361f0e8c1cf592 | version bump for 0.83. | oneflow/__init__.py | oneflow/__init__.py |
VERSION = '0.82.14'
| Python | 0 | @@ -12,11 +12,8 @@
'0.8
-2.14
+3
'%0A%0A
|
770ed3ea3ec2ab8d76172b85bd8b37c22517139c | add initial define function | cogs/define.py | cogs/define.py | Python | 0.000004 | @@ -0,0 +1,1605 @@
+import discord%0Afrom discord.ext import commands%0Afrom bs4 import BeautifulSoup%0A%0Aclass Define:%0A def __init__(self, bot):%0A self.bot = bot%0A self.aiohttp_session = bot.aiohttp_session%0A self.url = 'https://google.com/search'%0A self.headers = %7B'User-Agent':... | |
fe7d8e23a6ab8d86c39ef8ede2ddafa40a7fc1fb | Add RIPE space lookup thread | irrexplorer/ripe.py | irrexplorer/ripe.py | Python | 0 | @@ -0,0 +1,3423 @@
+#!/usr/bin/env python%0A# Copyright (C) 2015 Job Snijders %3Cjob@instituut.net%3E%0A#%0A# This file is part of IRR Explorer%0A#%0A# Redistribution and use in source and binary forms, with or without%0A# modification, are permitted provided that the following conditions are met:%0A#%0A# 1. Redistribu... | |
a91386a802d3346c945e107aa3abd6aa5fcfe0d7 | Solve double base palindrome | project_euler/036.double_palindromes.py | project_euler/036.double_palindromes.py | Python | 0.999999 | @@ -0,0 +1,761 @@
+'''%0AProblem 036%0A%0AThe decimal number, 585 = 10010010012 (binary), is palindromic in both bases.%0A%0AFind the sum of all numbers, less than one million, which are palindromic in %0A base 10 and base 2.%0A%0A(Please note that the palindromic number, in either base, may not include %0A leading... | |
3096af347f1cda453eb48f7002371a49b389c568 | use keep_lazy if available | django_extensions/utils/text.py | django_extensions/utils/text.py | # -*- coding: utf-8 -*-
import six
from django.utils.encoding import force_text
from django.utils.functional import allow_lazy
def truncate_letters(s, num):
"""
truncates a string to a number of letters, similar to truncate_words
"""
s = force_text(s)
length = int(num)
if len(s) > length:
... | Python | 0.000001 | @@ -73,16 +73,116 @@
ce_text%0A
+try:%0A from django.utils.functional import keep_lazy%0A KEEP_LAZY = True%0Aexcept ImportError:%0A
from dja
@@ -220,16 +220,38 @@
ow_lazy%0A
+ KEEP_LAZY = False%0A
%0A%0Adef tr
@@ -526,16 +526,106 @@
urn s%0A%0A%0A
+if KEEP_LAZY:%0A truncate_letters = keep_lazy(six.... |
005c9d1a51793fe76c798be2f546552bb2ee2088 | add word graph boilerplate code | graphs/wordgraph.py | graphs/wordgraph.py | Python | 0.000096 | @@ -0,0 +1,546 @@
+def gml2adjlist(G):%0A %22%22%22%0A Return a dict mapping word to adjacent nodes. G.node dict in memory%0A looks like:%0A%0A %7B0: %7B'id': 0, 'value': 0, 'label': 'agreeable'%7D,%0A 1: %7B'id': 1, 'value': 1, 'label': 'man'%7D, ... %7D%0A%0A and G.edge dict looks like:%0A%0A %7B... | |
7c10150d5e667921450e8663fa9440253a495160 | Add migration for moving recomended articles recomended section | gem/migrations/0014_convert_recomended_articles.py | gem/migrations/0014_convert_recomended_articles.py | Python | 0 | @@ -0,0 +1,2319 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import migrations%0Afrom molo.core.models import ArticlePage, ArticlePageRecommendedSections%0Afrom wagtail.wagtailcore.blocks import StreamValue%0A%0A%0Adef create_recomended_articles(main_article, article_list):%... | |
909f2c9739429ea3e6954a829e0776d84714d4fd | Add migration | holonet/core/migrations/0007_auto_20150324_1049.py | holonet/core/migrations/0007_auto_20150324_1049.py | Python | 0.000002 | @@ -0,0 +1,476 @@
+# -*- coding: utf-8 -*-%0Afrom __future__ import unicode_literals%0A%0Afrom django.db import models, migrations%0A%0A%0Aclass Migration(migrations.Migration):%0A%0A dependencies = %5B%0A ('core', '0006_auto_20150324_0035'),%0A %5D%0A%0A operations = %5B%0A migrations.AlterField... | |
abd05378eb6acf742f2deff4228a0bca4492521b | Add example showing scraping/parsing of an HTML table into a Python dict | examples/htmlTableParser.py | examples/htmlTableParser.py | Python | 0.000001 | @@ -0,0 +1,2113 @@
+#%0A# htmlTableParser.py%0A#%0A# Example of parsing a simple HTML table into a list of rows, and optionally into a little database%0A#%0A# Copyright 2019, Paul McGuire%0A#%0A%0Aimport pyparsing as pp%0Aimport urllib.request%0A%0A%0A# define basic HTML tags, and compose into a Table%0Atable, table_en... | |
5aeb0e41621eeb397ea16aff22d7f4deaf8fa7a2 | Add python play example | examples/python/play-url.py | examples/python/play-url.py | Python | 0.000022 | @@ -0,0 +1,1107 @@
+#!/usr/bin/env python%0A%0Afrom BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer%0Aimport urlparse%0Aimport logging%0Afrom xml.dom.minidom import Document%0A%0Alogging.basicConfig(level=logging.DEBUG)%0A%0Aclass MegaAwesomePythonServer(BaseHTTPRequestHandler):%0A%0A def do_POST(self):%0A ... | |
c1f3bb8b3bc3a6685cd839df92a035298ecea2b9 | Create compoundword.py | compoundword.py | compoundword.py | Python | 0.000249 | @@ -0,0 +1,1823 @@
+import random%0Adic1 = %5B%22life%22, %22moon%22, %22butter%22, %22fire%22, %22basket%22, %22foot%22, %22weather%22, %22earth%22, %22play%22, %22super%22, %22grand%22, %22rattle%22, %22skate%22, %22grass%22, %22eye%22, %22honey%22, %22dish%22, %22pop%22, %22book%22, %22thunder%22, %22head%22, %22gla... | |
b48bd670084cd1b2e443eb284813b949edbff6ca | Add gunicorn config | linky/config/gunicorn.conf.py | linky/config/gunicorn.conf.py | Python | 0.000001 | @@ -0,0 +1,305 @@
+import multiprocessing%0A%0Aappname = %22linky%22%0A%0Aprocname = appname%0A%0Abind = %22unix:/tmp/%25s%22 %25 appname%0Aworkers = multiprocessing.cpu_count() * 2 + 1%0Amax_requests = 1000%0Apreload_app = True%0A%0Aaccesslog = %22/home/webapp/apps/linky/logs/access.log%22%0Aerrorlog = %22/home/webapp... | |
19f8cf043437d3ed0feac6ce1619636189904277 | add get_partners.py | sample-code/Python/get_partners.py | sample-code/Python/get_partners.py | Python | 0.000001 | @@ -0,0 +1,1802 @@
+'''%0A- login and get token%0A- process 2FA if 2FA is setup for this account%0A- returns all user types if user is a partner admin (or above) - else error%0A'''%0Aimport requests%0Aimport json%0A%0Aget_token_url = %22https://api.canopy.cloud:443/api/v1/sessions/%22%09%09%0Avalidate_otp_url = %22http... | |
355094293afbe0836304be495307155aea6c26a8 | Create Brain_TTS.py | EmeraldAI/Application/Main/Brain_TTS.py | EmeraldAI/Application/Main/Brain_TTS.py | Python | 0.000001 | @@ -0,0 +1,1553 @@
+#!/usr/bin/python%0A# -*- coding: utf-8 -*-%0Aimport sys%0Aimport os%0Aimport time%0Afrom os.path import dirname, abspath%0Asys.path.append(dirname(dirname(dirname(dirname(abspath(__file__))))))%0Areload(sys)%0Asys.setdefaultencoding('utf-8')%0A%0Aimport rospy%0Afrom std_msgs.msg import String%0A%0A... | |
99b0596f8bdef41e08ff04e53316ae8edaab29c4 | Add loggers helper | pictures/loggers.py | pictures/loggers.py | Python | 0.000001 | @@ -0,0 +1,193 @@
+import logging%0A%0Alogging.basicConfig(level=logging.INFO,%0A format='%25(asctime)s %25(name)s %25(levelname)s %25(message)s')%0A%0A%0Adef logger_from(name):%0A return logging.getLogger(name)%0A
| |
62fe7541fd1c9272616f9e7021617f2fb766bd93 | add models placeholder for django | pillowtop/models.py | pillowtop/models.py | Python | 0 | @@ -0,0 +1,24 @@
+# placeholder for django
| |
ec18575b2a80714db3d9f34e066d5a4b7525f17b | Remove the oneflow.core app, it's not yet in the repository. | oneflow/settings/snippets/common.py | oneflow/settings/snippets/common.py | # -*- coding: utf-8 -*-
# Django common settings for oneflow project.
# These are overridden in hostname.py specific files.
#
# Here we define the settings for the test platform.
# Production will override only the needed directives.
import os
# We need to go down 3 times because we start from
# `oneflow/settings/sni... | Python | 0 | @@ -2305,19 +2305,23 @@
low.
-core
+landing
',%0A
+#
'one
@@ -2325,23 +2325,20 @@
oneflow.
-landing
+core
',%0A)%0A%0ACA
|
6b60c56a3d86de80447fe2ab133db100af97f6d4 | Task_2_17 | BITs/2014/Shmireychik_S_V/task_2_17.py | BITs/2014/Shmireychik_S_V/task_2_17.py | Python | 0.999959 | @@ -0,0 +1,239 @@
+#%D0%97%D0%B0%D0%B4%D0%B0%D1%87%D0%B0 %E2%84%962. %D0%92%D0%B0%D1%80%D0%B8%D0%B0%D0%BD%D1%82 17%0D%0A#%D0%9A%D0%BE%D0%BC%D0%BF%D1%8C%D1%8E%D1%82%D0%B5%D1%80 %D0%B2%D1%8B%D0%B2%D0%BE%D0%B4%D0%B8%D1%82 %D0%BF%D0%BE%D0%BD%D1%80%D0%B0%D0%B2%D0%B8%D0%B2%D1%88%D0%B5%D0%B5%D1%81%D1%8F %D0%B2%D1%8B%D1%81%D0%... | |
2ab86a15b956954f5de99db177a6a69b48677e2b | Add Webcam object | src/Webcam.py | src/Webcam.py | Python | 0 | @@ -0,0 +1,375 @@
+import cv%0A%0Aclass Webcam:%0A%09def __init__(self, cam=-1):%0A%09%09self.capture = None%0A%09%09self.camera_number = cam%0A%09%0A%09def __enter__(self):%0A%09%09self.open()%0A%09%09return self%0A%09%0A%09def __exit__(self):%0A%09%09self.close()%0A%09%0A%09def open()%0A%09%09self.capture = cv.Captur... | |
231943a950b49e46b86467991ca6e4c7b3505be0 | update python learn - module | python/study/module-test.py | python/study/module-test.py | Python | 0 | @@ -0,0 +1,99 @@
+#module test%0A%0Aimport sys%0Aprint 'the sys argv list:'%0Afor i in sys.argv:%0A print i%0A%0Aprint sys.path%0A
| |
18a5ade8fd72edcbca951240d4071f2a8fccaa48 | fix content indexer's handling of the "file" command | addons/document/content_index.py | addons/document/content_index.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | Python | 0.000008 | @@ -5523,25 +5523,26 @@
-f
+po
p = Popen(%5B'
@@ -5598,15 +5598,8 @@
IPE)
-.stdout
%0A
@@ -5615,111 +5615,56 @@
-try:%0A result = fp.read()%0A finally: %0A fp.close()
+(result, _) = pop.communicate()%0A
%0A
|
6d64f88d5536ae14026556729433ea27b5eece61 | fix content indexer, where no filename is supplied | addons/document/content_index.py | addons/document/content_index.py | # -*- coding: utf-8 -*-
##############################################################################
#
# OpenERP, Open Source Management Solution
# Copyright (C) 2004-2010 Tiny SPRL (<http://tiny.be>).
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the... | Python | 0.000001 | @@ -5018,32 +5018,61 @@
else:%0A
+ try:%0A
@@ -5104,33 +5104,138 @@
plitext(filename
-)
+ or 'test.tmp')%0A except Exception:%0A bname, ext = filename, 'tmp'
%0A
|
db9b756dbf68fde9930da8ab6b4594fa3f1d361e | Fix cascades for RecurringEventOverride table | migrations/versions/175_fix_recurring_override_cascade.py | migrations/versions/175_fix_recurring_override_cascade.py | Python | 0 | @@ -0,0 +1,1273 @@
+%22%22%22fix recurring override cascade%0A%0ARevision ID: 6e5b154d917%0ARevises: 41f957b595fc%0ACreate Date: 2015-05-25 16:23:40.563050%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '6e5b154d917'%0Adown_revision = '4ef055945390'%0A%0Afrom alembic import op%0Aimport sqlalc... | |
730548fe74dda462d7aac1e3c5ee8e8ba47f4371 | Add script that extracts clips from HDF5 file. | scripts/extract_clips_from_hdf5_file.py | scripts/extract_clips_from_hdf5_file.py | Python | 0 | @@ -0,0 +1,1045 @@
+from pathlib import Path%0Aimport wave%0A%0Aimport h5py%0A%0A%0ADIR_PATH = Path('/Users/harold/Desktop/Clips')%0AINPUT_FILE_PATH = DIR_PATH / 'Clips.h5'%0ACLIP_COUNT = 5%0A%0A%0Adef main():%0A%0A with h5py.File(INPUT_FILE_PATH, 'r') as file_:%0A%0A clip_group = file_%5B'clips'%5D%0A%0A ... | |
d5aa5aa96aad03b1bd32504b1c9d0a87c1a1c796 | Create y=Wx+b.py | y=Wx+b.py | y=Wx+b.py | Python | 0.000476 | @@ -0,0 +1,531 @@
+import tensorflow as tf%0Aimport numpy as np%0A%0Ax_data = np.random.rand(100).astype(%22float32%22)%0Ay_data = x_data * .1 +.3%0AW = tf.Variable(tf.random_uniform(%5B1%5D, -1.0, 1.0 ))%0Ab = tf.Variable(tf.zeros(%5B1%5D))%0Ay = W * x_data + b%0A%0Aloss = tf.reduce_mean(tf.square(y - y_data ))%0Aopti... | |
a570730af71e3263af2f265a1730db3f808cd201 | Add ex_add_noise.py | Python_3/Miscellaneous/ex_addnoise.py | Python_3/Miscellaneous/ex_addnoise.py | Python | 0.00002 | @@ -0,0 +1,1595 @@
+# Add gaussian noise to an input%0A#%0A# Copyright (C) 2016 Wayne Mogg All rights reserved.%0A#%0A# This file may be used under the terms of the MIT License%0A# (https://github.com/waynegm/OpendTect-External-Attributes/blob/master/LICENSE)%0A#%0A# Author:%09%09Wayne Mogg%0A# Date: %09%09September, 2... | |
b72a4bb06fda18ebca91649808cd2f2c531b392e | Set all events to show banner text | migrations/versions/0060.py | migrations/versions/0060.py | Python | 0.000003 | @@ -0,0 +1,398 @@
+%22%22%22empty message%0A%0ARevision ID: 0060 set all show_banner_text%0ARevises: 0059 add show_banner_text%0ACreate Date: 2021-10-03 00:31:22.285217%0A%0A%22%22%22%0A%0A# revision identifiers, used by Alembic.%0Arevision = '0060 set all show_banner_text'%0Adown_revision = '0059 add show_banner_text'... | |
9132678df072e0c11685aea21c04410fe699ce4f | Create Majority_Element.py | Array/Majority_Element.py | Array/Majority_Element.py | Python | 0.000001 | @@ -0,0 +1,611 @@
+'''%0AGiven an array of size n, find the majority element. The majority element is the element that appears more than %E2%8C%8A n/2 %E2%8C%8B times.%0A%0AYou may assume that the array is non-empty and the majority element always exist in the array.%0A'''%0A%0Aclass Solution:%0A # @param %7Binteger... | |
4b1ac6217d054bd2fe8e5e6b4cfe036e2a4d0360 | Add a template of setup.py. | setup.py | setup.py | Python | 0 | @@ -0,0 +1,809 @@
+from setuptools import setup, find_packages%0Aimport os%0A%0Aversion = '0.1'%0A%0Asetup(name='flask-boilerplate',%0A version=version,%0A description='',%0A long_description=open(os.path.join(os.path.dirname(__file__), 'README.md')).read(),%0A classifiers=%5B%0A %5D, # Get st... | |
b1f689f82bbb6d26511b6a310be798dad1791fc5 | add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,295 @@
+from distutils.core import setup%0Asetup(%0Aversion='0.10',%0Aname=%22saf%22,%0Adescription=%22Python toolkit for handling Simple Annotation Framework files%22,%0Aauthor=%22Wouter van Atteveldt%22,%0Aauthor_email=%22wouter@vanatteveldt.com%22,%0Apackages=%5B%22saf%22%5D,%0Aclassifiers=%5B%0A%22Licens... | |
682d65f8ccf142224912daf8acfc102fc78ea78b | version bump and regen | src/robot/version.py | src/robot/version.py | # Automatically generated by 'package.py' script.
import sys
VERSION = 'trunk'
RELEASE = '20110222'
TIMESTAMP = '20110222-203831'
def get_version(sep=' '):
if RELEASE == 'final':
return VERSION
return VERSION + sep + RELEASE
def get_full_version(who=''):
sys_version = sys.version.split()[0]
... | Python | 0 | @@ -90,19 +90,19 @@
= '20110
-222
+316
'%0ATIMEST
@@ -117,18 +117,18 @@
0110
-222-203831
+316-133752
'%0A%0Ad
|
e37dae306f2dcf17e95a988b332c064fde11fb1a | Create setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,305 @@
+from setuptools import setup%0A%0Asetup(name='rakolighting',%0A version='0.1',%0A description='rakolighting library',%0A url='https://github.com/chrisdpa/rakolighting',%0A author='chrisdpa',%0A author_email='unknown',%0A license='MIT',%0A packages=%5B'rakolighting'%... | |
e1c35ee11d281692f916ebf57b38390b90501304 | Create texted.py | exercises/text-editor/texted.py | exercises/text-editor/texted.py | Python | 0.000002 | @@ -0,0 +1,2422 @@
+import Tkinter as Tk%0Aimport tkFileDialog%0A%0A%0A# Text Editor Skeleton%0A%0Adef on_new():%0A # reset path and delete all text in the text box%0A print %22Not implemented%22%0A%0A%0Adef on_open():%0A # let user choose what file to open from a dialog (tkFileDialog)%0A # replace text in ... | |
d2cbe26e14e23a4482e54a74da1412c5c0c28500 | Update package info | setup.py | setup.py | 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 | @@ -152,39 +152,27 @@
es (
-support http and ftp protocols,
+http,ftp). Supports
cac
@@ -180,17 +180,20 @@
inhg
-,
+ and
allows
acce
@@ -192,17 +192,25 @@
ows
+uniform
access
-ing
+ to
rem
@@ -232,23 +232,8 @@
iles
- in uniform way
',%0D%0A
@@ -388,29 +388,29 @@
com/napuzba/
-FileL
+filel
oader/archiv... |
d6ccfdf365b8df4eefcbe1131dd8b19d184b0fa4 | add monkey patch test for convert command. | bento/commands/tests/test_convert.py | bento/commands/tests/test_convert.py | Python | 0 | @@ -0,0 +1,451 @@
+import sys%0A%0Afrom bento.misc.testing %5C%0A import %5C%0A SubprocessTestCase%0A%0Afrom bento.commands.convert %5C%0A import %5C%0A monkey_patch%0A%0Aclass TestMonkeyPath(SubprocessTestCase):%0A def test_distutils(self):%0A monkey_patch(%22distutils%22, %22setup.py%22)... | |
082c48bcd747c096abd0cd2970edb8cbb0f3d20b | Add contribution admin | features/contributions/admin.py | features/contributions/admin.py | Python | 0 | @@ -0,0 +1,96 @@
+from django.contrib import admin%0Afrom . import models%0A%0Aadmin.site.register(models.Contribution)%0A
| |
24c54c1b5ed1c91d5e1aa24bf8ca6fca1cdbf6b8 | create entry before referencing it in test mode | flexget/plugins/input/sonarr.py | flexget/plugins/input/sonarr.py | from __future__ import unicode_literals, division, absolute_import
from urlparse import urlparse
import logging
from requests import RequestException
from flexget import plugin
from flexget.event import event
from flexget.entry import Entry
log = logging.getLogger('sonarr')
class Sonarr(object):
schema = {
... | Python | 0 | @@ -3854,16 +3854,41 @@
rameter%0A
+ entry = None%0A
@@ -5269,16 +5269,26 @@
if
+entry and
task.opt
@@ -5297,17 +5297,16 @@
ns.test:
-
%0A
@@ -5753,24 +5753,26 @@
%0A
+ #
continue%0A
|
65f903a1de88cee2fdd6fe16cf86aceee3545d7b | Add example | flexx/ui/examples/serve_data.py | flexx/ui/examples/serve_data.py | Python | 0.000003 | @@ -0,0 +1,2219 @@
+%22%22%22%0AThis example demonstrates how data can be provided to the client with the%0AFlexx asset management system.%0A%0AThere are two ways to provide data: via the asset store (%60%60app.assets%60%60),%0Aand via the session (%60%60some_model.session%60%60). In the former, the data%0Ais shared be... | |
17018750ac3ea39c4fe5a96c05db2375ecd4973e | Add regression test for #717 | spacy/tests/regression/test_issue717.py | spacy/tests/regression/test_issue717.py | Python | 0.000001 | @@ -0,0 +1,418 @@
+# coding: utf8%0Afrom __future__ import unicode_literals%0A%0Aimport pytest%0A%0A%0A@pytest.mark.xfail%0A@pytest.mark.models%0A@pytest.mark.parametrize('text1,text2', %5B(%22You're happy%22, %22You are happy%22)%5D)%0Adef test_issue717(EN, text1, text2):%0A %22%22%22Test that contractions are assi... | |
b7efac523bab70532dd2e703f8d4175ec22b3044 | Add output.base unit test. | braubuddy/tests/outputs/test_base.py | braubuddy/tests/outputs/test_base.py | Python | 0.000001 | @@ -0,0 +1,1486 @@
+# -*- coding: utf-8 -*-%0A%22%22%22%0ABraubuddy Base unit tests%0A%22%22%22%0A%0Aimport unittest%0Afrom braubuddy.output import base %0A%0A%0Aclass IOutput(unittest.TestCase):%0A%0A def test_map_c_to_symbol(self):%0A %22%22%22c is mapped to %C2%B0C%22%22%22%0A self.assertEqual(%0A ... | |
437c45509bb2f6387b83cf7d47e51ce46d1c2776 | Add unit test | tests.py | tests.py | Python | 0.000001 | @@ -0,0 +1,473 @@
+from models import AuthenticationError,AuthenticationRequired%0Aimport trello%0Aimport unittest%0Aimport os%0A%0Aclass TestTrello(unittest.TestCase):%0A%0A%09def test_login(self):%0A%09%09username = os.environ%5B'TRELLO_TEST_USER'%5D%0A%09%09password = os.environ%5B'TRELLO_TEST_PASS'%5D%0A%09%09try:%... | |
fdcdfb6f710be10cdead865b09d98b4bd0c0cebd | Create tests.py | tests.py | tests.py | Python | 0.000001 | @@ -0,0 +1,5 @@
+pass%0A
| |
6200bce410eb966b97a5edf2ea8efdcd94e736db | test script which creates a tun tunnel and prints what it received. | tests.py | tests.py | Python | 0 | @@ -0,0 +1,2332 @@
+import pytun%0Aimport logging%0Aimport select%0A%0Adef pprint_buf(buf):%0A %22%22%22 Dirty & convenient function to display the hexademical%0A repr. of a buffer.%0A %22%22%22%0A%0A DEFAULT_SIZE = 4%0A%0A def hex2(i, l = None):%0A l = l if l is not None else DEFAULT_SIZE%0A%... | |
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 | Python | 0.000018 | @@ -0,0 +1,318 @@
+#!/bin/python%0A%0Adef insertion_sort(L):%0A for i in xrange(1, len(L)):%0A j = i - 1%0A key = L%5Bi%5D%0A while (j %3E= 0) and (L%5Bj%5D %3E key):%0A L%5Bj+1%5D, L%5Bj%5D = L%5Bj%5D, L%5Bj + 1%5D%0A j -= 1%0A%0Am = input()%0Aar = %5Bint(i) for i in raw_inp... | |
0caeed31553dbc2a201cf5e2e50013ea946507c1 | Add packagist. | plumeria/plugins/packagist.py | plumeria/plugins/packagist.py | Python | 0 | @@ -0,0 +1,1287 @@
+from plumeria import config%0Afrom plumeria.command import commands, CommandError%0Afrom plumeria.util import http%0Afrom plumeria.util.ratelimit import rate_limit%0A%0A%0A@commands.register(%22packagist%22, %22composer%22, category=%22Development%22)%0A@rate_limit()%0Aasync def packagist(message):%... | |
3b4c1ec38e4725536bb11ec04ec0624282e166c0 | Create proxy.py | proxy.py | proxy.py | Python | 0.000001 | @@ -0,0 +1,496 @@
+import subprocess%0Aimport time%0A%0Aclass ProxyClient():%0A %0A def restart_client(self):%0A while True:%0A (status, output) = subprocess.getstatusoutput('systemctl restart tinyproxy.service')%0A if status ==0:%0A print(%22tinyproxy %E9%87%8D%E5%90%A... | |
9a1cf12d2eab79abe313cc211b697e05d4a1d3c1 | Solve 010 | programming_challenges/010.py | programming_challenges/010.py | Python | 1 | @@ -0,0 +1,927 @@
+'''%0AProblem 010%0A%0ASolutionum of the primes below 10 is 2 + 3 + 5 + 7 = 17.%0A%0AFind the sum of all the primes below two million.%0A%0ACopyright 2017 Dave Cuthbert, MIT License%0A'''%0Aimport math%0A%0A%0Adef get_primes(number):%0A while True:%0A if is_prime(number):%0A yiel... | |
fdcf6fe1792c462221e0c6c35c13cc23ad39a2e3 | Create pythonhelloworld.py | pythonhelloworld.py | pythonhelloworld.py | Python | 0.003233 | @@ -0,0 +1,20 @@
+print %22hello world%22%0A
| |
c9bbd45e3ef6f52473efa4e1a69ac5ebae81c18a | set norm_Steps=5 (instead of 10) since usually only 1 or 2 are required. | qutip/Odeoptions.py | qutip/Odeoptions.py | from __future__ import print_function
#This file is part of QuTIP.
#
# QuTIP is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.... | Python | 0.000001 | @@ -2141,16 +2141,27 @@
ion norm
+ in mcsolve
.%0A no
@@ -2253,16 +2253,27 @@
norm_tol
+ in mcsolve
.%0A gu
@@ -2790,18 +2790,17 @@
m_steps=
-10
+5
,rhs_reu
|
fafbb9e84a63f0de1f84ce94ba8766a8fdc23f8e | package for the item containers | models/item_container.py | models/item_container.py | Python | 0.00002 | @@ -0,0 +1,1058 @@
+# -*- coding: utf-8 -*-%0A%0Afrom models.Model import Model%0A%0A%0Aclass item_container:%0A%09%22%22%22%0A%09Class to interact with the item containers, such as chests.%0A%09%22%22%22%0A%0A%09@staticmethod%0A%09def getAllFromIdArea(idArea):%0A%09%09itemContainerTypes = model.getTypes()%0A%09%09cont... | |
3490b1172f8df77af3963c86ce3967a6d9b4af5e | Add gender choices factory | accelerator/tests/factories/gender_choices_factory.py | accelerator/tests/factories/gender_choices_factory.py | Python | 0.000249 | @@ -0,0 +1,394 @@
+# MIT License%0A# Copyright (c) 2017 MassChallenge, Inc.%0A%0Afrom __future__ import unicode_literals%0A%0Afrom factory import Sequence%0Afrom factory.django import DjangoModelFactory%0A%0AGenderChoices = swapper.load_model('accelerator', 'GenderChoices')%0A%0A%0Aclass GenderChoicesFactory(DjangoMode... | |
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 | Python | 0 | @@ -0,0 +1,822 @@
+# -*- coding: utf-8 -*-%0D%0A'''%0D%0A @author: jeffzhengye%0D%0A @contact: yezheng@scuec.edu.cn%0D%0A @file: tf_dataset_from_generator_args.py%0D%0A @time: 2021/1/5 16:27%0D%0A @desc:%0D%0A '''%0D%0A%0D%0Aimport tensorflow as tf%0D%0Aimport numpy as np%0D%0Aimport collections%0D%0A%0D%0A%0D%0Ad... | |
79637efbdda03cea88fa6a59b24a27f1d393c79f | Add tests for previous commit | corehq/util/tests/test_es_interface.py | corehq/util/tests/test_es_interface.py | Python | 0 | @@ -0,0 +1,1990 @@
+from django.test import SimpleTestCase%0Afrom mock import ANY, patch%0A%0Afrom corehq.apps.es.tests.utils import es_test%0Afrom corehq.elastic import SerializationError, get_es_new%0Afrom corehq.util.es.interface import ElasticsearchInterface%0A%0A%0A@es_test%0Aclass TestESInterface(SimpleTestCase):... | |
a9195264349b695daf02abb5cf17ced8a6a6110c | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,486 @@
+# coding=utf-8%0A%0Afrom distutils.core import setup%0A%0Asetup(%0A name='openprovider.py',%0A version='0.0.1',%0A author='Antagonist B.V.',%0A author_email='info@antagonist.nl',%0A packages=%5B'openprovider'%5D,%0A url='http://pypi.python.org/pypi/openprovider.py/',%0A license='... | |
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.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 | @@ -107,9 +107,9 @@
==3.
-4
+5
.0',
|
d2fd2a473747fa90183c78c0c12cd933bdc1a4b6 | add solution for 2019 day 1 part 1 | 2019/day01/rocket.py | 2019/day01/rocket.py | Python | 0.000009 | @@ -0,0 +1,1904 @@
+#! python3%0A%22%22%22%0Afrom: https://adventofcode.com/2019/day/1%0A%0A--- Day 1: The Tyranny of the Rocket Equation ---%0ASanta 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... | |
4f42bf42c6dcb44f7a0972bb9c00818d087c808f | Add file | setup.py | setup.py | Python | 0 | @@ -0,0 +1,505 @@
+try:%0A from setuptools import setup%0Aexcept ImportError as ex:%0A from distutils.core import setup%0A%0Apackages = %5B%0A 'bren'%0A%5D%0A%0Awith open('README.rst') as f:%0A description_text = f.read()%0A%0Ainstall_req = %5B%22pyyaml%22%5D%0A%0Asetup(%0A name='bulkrename',%0A versi... | |
7e3a894796bb11eb77c0352d5104754086e70f8e | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,776 @@
+from setuptools import setup, find_packages%0Aimport sys, os%0A%0Aversion = '0.1'%0A%0Asetup(name='recall',%0A version=version,%0A description=%22Python High performance RPC framework based on protobuf%22,%0A long_description=%22%22%22%5C%0A%22%22%22,%0A classifiers=%5B%5D, # Get ... | |
24bbb4fafa0732252c4d8561783826ed5eba6cff | add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,539 @@
+# -*- coding: utf-8 -*-%0Afrom setuptools import setup%0A%0Asetup(name='python-voicetext',%0A version='0.1',%0A license='Apache License 2.0',%0A description='Python library of VoiceText Web API',%0A author='Yutaka Kondo',%0A author_email='yutaka.kondo@youtalk.jp',%0A ur... | |
2d3610b8b18e7028b041142461a297e91ca26efc | version 1.4 | setup.py | setup.py | #!/usr/bin/env python
#
# Copyright 2012-2014 Ravello Systems, 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... | Python | 0.000001 | @@ -773,12 +773,8 @@
'1.4
-.dev
',%0A
|
fd3eaa3810ce82db864b3fcafe61d16ab53d85e5 | Add simple Python web server for performance testing | perftest/scripts/webserver.py | perftest/scripts/webserver.py | Python | 0.001733 | @@ -0,0 +1,551 @@
+from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer%0A%0Aclass Handler(BaseHTTPRequestHandler):%0A def do(self):%0A self.send_response(200)%0A self.wfile.write('%7B%22headers%22:%7B%22type%22:%22type%22%7D,%22content%22:%7B%22b%22:2%7D%7D')%0A%0A def do_GET(self):%0A self.do()%0A... | |
891737a86e8f7007ac6d040f3f01afc420cd8c99 | Create 2-keys-keyboard.py | Python/2-keys-keyboard.py | Python/2-keys-keyboard.py | Python | 0.999821 | @@ -0,0 +1,1165 @@
+# Time: O(sqrt(n))%0A# Space: O(1)%0A%0A# Initially on a notepad only one character 'A' is present.%0A# You can perform two operations on this notepad for each step:%0A#%0A# Copy All: You can copy all the characters present on the notepad (partial copy is not allowed).%0A# Paste: You can paste the ... | |
293983d24467cbb224f29b4a6149b518fe966603 | Add forest Predictor. | code/python/seizures/prediction/ForestPredictor.py | code/python/seizures/prediction/ForestPredictor.py | Python | 0.000001 | @@ -0,0 +1,1018 @@
+from abc import abstractmethod%0Afrom sklearn.ensemble import RandomForestClassifier%0Aimport numpy as np%0A%0A%0Aclass ForestPredictor(object):%0A %22%22%22%22%0A A simple application of RandomForestClassifier%0A%0A @author: Shaun%0A %22%22%22%0A%0A def __init__(self):%0A self... | |
c19bc112e7e13f9d63746dfd2b073edf369f8e82 | add `setup.py` | setup.py | setup.py | Python | 0 | @@ -0,0 +1,1151 @@
+#!/usr/bin/env python%0Afrom __future__ import absolute_import, print_function, unicode_literals%0A%0Afrom setuptools import find_packages, setup%0A%0Aimport lu_dj_utils%0A%0A%0Awith open('README.rst') as f:%0A readme = f.read()%0A%0Apackages = find_packages()%0A%0Aclassifiers = (%0A 'Developm... | |
7255a3213418fe4bb3365bd60537f7e88af0c4cd | Add bare-bones setup.py and build file structure | setup.py | setup.py | Python | 0 | @@ -0,0 +1,344 @@
+from setuptools import setup, find_packages%0A%0Asetup(name='pensieve',%0A version='0.0.1',%0A description=u%22A Python package to extract character mems from a corpus of text%22,%0A author=u%22CDIPS-AI 2017%22,%0A author_email='sam.dixon@berkeley.edu',%0A url='https://github... | |
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 = [
"Markdown",
"Pygments",
"Jinja2",
"PyYAML",
"docopt",
]
setup(
name = "simiki",
version = simiki.__version__... | Python | 0 | @@ -178,85 +178,44 @@
s =
-%5B%0A %22Markdown%22,%0A %22Pygments%22,%0A %22Jinja2%22,%0A %22PyYAML%22,%0A %22docopt%22,%0A%5D
+open(%22requirements.txt%22).readlines()
%0A%0Ase
@@ -461,16 +461,58 @@
thon.%22,%0A
+ keywords = %22simiki, wiki, generator%22,%0A
lice
@@ -628,16 +628,16 @@
quires... |
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... | Python | 0.000429 | @@ -1067,16 +1067,65 @@
: 3.3%22,%0A
+ %22Programming Language :: Python :: 3.4%22,%0A
|
2344a5e72d7a3a31d014ca31f42023740c56d060 | add ndncache/fieldpercent.py | ndncache/fieldpercent.py | ndncache/fieldpercent.py | Python | 0 | @@ -0,0 +1,1561 @@
+#!/usr/bin/python %0A#coding:utf-8%0A'''Function:analyze bro conn logs and print specific field percent,%0A@param: log directory%0A@param: field list analyze%0Aauthor:melon li%0Adate: 2016.03.28%0A'''%0Aimport sys%0Aimport os%0AFIELDS=%5B'ts', 'uid', 'id.orig_h', 'id.orig_p', 'id.resp_h', 'id.resp_p... | |
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.1',
url='http://nereid.openlabs.co.in/docs/',
lice... | Python | 0 | @@ -255,17 +255,20 @@
='2.6.0.
-1
+2dev
',%0A u
|
0907e4f32e4e0bb48f4f101b520ce8f28c731d6c | Add setup.py | setup.py | setup.py | Python | 0.000001 | @@ -0,0 +1,956 @@
+from os import path%0Afrom setuptools import setup, find_packages%0A%0Ahere = path.abspath(path.dirname(__file__))%0A%0A# TODO: change to rst%0Awith open(path.join(here, 'README.md'), encoding='utf-8') as f:%0A long_description = f.read()%0A%0Asetup(%0A name='pag',%0A version='0.1.0',%0A ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.