commit
stringlengths
40
40
subject
stringlengths
4
1.73k
repos
stringlengths
5
127k
old_file
stringlengths
2
751
new_file
stringlengths
2
751
new_contents
stringlengths
1
8.98k
old_contents
stringlengths
0
6.59k
license
stringclasses
13 values
lang
stringclasses
23 values
aaab87fb11c60cb7582caadde69e78abbb340246
Add corpus training example
vkosuri/ChatterBot,gunthercox/ChatterBot
examples/training_example_chatterbot_corpus.py
examples/training_example_chatterbot_corpus.py
from chatterbot import ChatBot import logging ''' This is an example showing how to train a chat bot using the ChatterBot Corpus of conversation dialog. ''' # Enable info level logging logging.basicConfig(level=logging.INFO) chatbot = ChatBot( 'Example Bot', trainer='chatterbot.trainers.ChatterBotCorpusTrai...
bsd-3-clause
Python
1ec1bede9f5451aeef09d250ad4542bfb0cedb3d
Add functional tests for the salt user module
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/pytests/functional/modules/test_user.py
tests/pytests/functional/modules/test_user.py
import pathlib import pytest from saltfactories.utils import random_string pytestmark = [ pytest.mark.skip_if_not_root, pytest.mark.destructive_test, pytest.mark.windows_whitelisted, ] @pytest.fixture(scope="module") def user(modules): return modules.user @pytest.fixture def username(user): _u...
apache-2.0
Python
a2ab40bd7da2131ff6b9d502cc3dde1f6a8531e6
Build a legacy distance export
janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system,janLo/meet-and-eat-registration-system,eXma/meet-and-eat-registration-system
src/legacy_data_export.py
src/legacy_data_export.py
import json import sys import database as db from database.model import Team from geotools import simple_distance from geotools.routing import MapPoint from webapp.cfg.config import DB_CONNECTION if len(sys.argv) == 2: MAX_TEAMS = sys.argv[1] else: MAX_TEAMS = 9 print "init db..." db.init_session(connection_...
bsd-3-clause
Python
62c2a4a3addeed800809bbcff4a1a9481b5071a6
Add test for issue 77
stefanseefeld/numba,pitrou/numba,GaZ3ll3/numba,GaZ3ll3/numba,ssarangi/numba,gdementen/numba,stonebig/numba,ssarangi/numba,stonebig/numba,stefanseefeld/numba,gdementen/numba,stuartarchibald/numba,jriehl/numba,pombredanne/numba,stefanseefeld/numba,numba/numba,jriehl/numba,sklam/numba,pombredanne/numba,seibert/numba,stefa...
numba/tests/issues/test_issue_77.py
numba/tests/issues/test_issue_77.py
import numpy as np from numba import autojit @autojit def slicing_error(X, window_size, i): return X[max(0, i - window_size):i + 1] def test_slicing_shape(): X = np.random.normal(0, 1, (20, 2)) i = 0 gold = slicing_error.py_func(X, 10, i) ans = slicing_error(X, 10, i) assert gold.shape == a...
bsd-2-clause
Python
ec3a8d7cd364b25a364ec6a14459045ee48193dc
Add BomberFactory Test
setokinto/slack-bomber
test/game/bomber_test.py
test/game/bomber_test.py
import unittest from app.game.bomber import BomberFactory, Bomber class InputTest(unittest.TestCase): def setUp(self): pass def test_BomberFactory_should_create_bomber_instance(self): bomber = BomberFactory.create("channel", []) self.assertIsInstance(bomber, Bomber) def test_Bo...
mit
Python
47789a49a95ddf16a5f851917316de329f771c67
Create keeloq-python.py
cahlen/keeloq-python
keeloq-python.py
keeloq-python.py
#!/usr/bin/python # keeloq encryption cipher # # Cahlen Humphreys (3/12/2015) # Setup plaintext 32-bit plaintext block and 64-bit key, and number of rounds (keeloq wants 528). change these at will. PLAINTEXT = "01010101010101010101010101010101"; KEY = "000001000010001010001110000000001000011000001100100111100001000...
mit
Python
6201491fd1210bd0d69f21327ae931cb1690e8da
add tests for linear solvers
michaellaier/pymor,michaellaier/pymor,michaellaier/pymor,michaellaier/pymor
src/pymortests/solver.py
src/pymortests/solver.py
# This file is part of the pyMOR project (http://www.pymor.org). # Copyright Holders: Rene Milk, Stephan Rave, Felix Schindler # License: BSD 2-Clause License (http://opensource.org/licenses/BSD-2-Clause) from __future__ import absolute_import, division, print_function import numpy as np from scipy.sparse import diag...
bsd-2-clause
Python
31ec9c566cf0645638a5970f510252c66009efa0
add some moderator commands
Naught0/qtbot
cogs/mod.py
cogs/mod.py
#!/bin/env python3 import discord from discord.ext import commands class Moderator: def __init__(self, bot): self.bot = bot @commands.command(aliases=['k']) async def kick(self, ctx, user, *, reason=None): """ Kick a user from the server """ try: await ctx.guild.kick(u...
mit
Python
73f5520a1c1eea3d5c441a3729af073bd03d1013
handle anon user for auth flows (#4615)
looker/sentry,jean/sentry,looker/sentry,zenefits/sentry,ifduyue/sentry,mvaled/sentry,JackDanger/sentry,zenefits/sentry,JamesMura/sentry,looker/sentry,gencer/sentry,BuildingLink/sentry,mvaled/sentry,looker/sentry,JamesMura/sentry,zenefits/sentry,gencer/sentry,mvaled/sentry,beeftornado/sentry,JamesMura/sentry,ifduyue/sen...
src/sentry/plugins/providers/base.py
src/sentry/plugins/providers/base.py
from __future__ import absolute_import import six from django.core.urlresolvers import reverse from rest_framework.response import Response from social_auth.models import UserSocialAuth from sentry.exceptions import InvalidIdentity, PluginError class ProviderMixin(object): auth_provider = None logger = Non...
from __future__ import absolute_import import six from django.core.urlresolvers import reverse from rest_framework.response import Response from social_auth.models import UserSocialAuth from sentry.exceptions import InvalidIdentity, PluginError class ProviderMixin(object): auth_provider = None logger = Non...
bsd-3-clause
Python
38b3c5a9054adf96f1574697e000d58a7d65afc4
Create commhelp.py
Myselfminer/N
commhelp.py
commhelp.py
##def get(what): ## if what=="q": ## what=what.strip("?help ") ## site=what ## else: ## a=open("commreg.temp","r") ## a.readlines() ## result=[] ## for i in a: ## result.append(a[i+site*5]+":"+a[i+site*5]) ## return result def get(): a=open("commreg....
apache-2.0
Python
00f5601e4eeab93053561a8600c29366ebbc1d10
add file
AthrunArthur/dotfile
clang-format.py
clang-format.py
# This file is a minimal clang-format vim-integration. To install: # - Change 'binary' if clang-format is not on the path (see below). # - Add to your .vimrc: # # map <C-I> :pyf <path-to-this-file>/clang-format.py<cr> # imap <C-I> <c-o>:pyf <path-to-this-file>/clang-format.py<cr> # # The first line enables clang-fo...
mit
Python
a49e7d3904f8100ddf45657431bb8547ca0cad69
fix preferences.py so that instann test for opaque_instance can be confirmed
wwoast/constantina,wwoast/constantina,wwoast/constantina,wwoast/constantina
constantina/preferences.py
constantina/preferences.py
import os import ConfigParser import json import syslog from jwcrypto import jwk, jwt from shared import GlobalConfig syslog.openlog(ident='constantina.preferences') class ConstantinaPreferences: """ Set preferences for an individual user. Constantina's strategy for this is to leave all settings off o...
agpl-3.0
Python
c5117aec3c014dd6a160d6b58d4359ccfbafe11f
Add a Python script "verify-history" to run "make check" on every commit.
Quuxplusone/from-scratch,Quuxplusone/from-scratch,Quuxplusone/from-scratch
dependency-graph/verify-history.py
dependency-graph/verify-history.py
#!/usr/bin/env python import argparse import re import subprocess def get_list_of_commits(start): args = ['git', 'log', '--format=oneline'] if start is not None: args += ['%s..master' % start] commits = [] lines = subprocess.check_output(args).splitlines() for line in lines: m = r...
mit
Python
117dfcae25b3d1d072a9a79302970918815a9372
add new package (#23589)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/model-traits/package.py
var/spack/repos/builtin/packages/model-traits/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class ModelTraits(CMakePackage): """ Model setup and querying in C++. """ homepage = "https...
lgpl-2.1
Python
43b4d63f8587bcc7078635a099f1acf48264303c
Add serialization tests for tagger
honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,spacy-io/spaCy,aikramer2/spaCy,aikramer2/spaCy,explosion/spaCy,recognai/spaCy,honnibal/spaCy,honnibal/spaCy,recognai/spaCy,recognai/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,recognai/spaCy,explosion/spaCy,aikramer2/spaCy,explosion/spa...
spacy/tests/serialize/test_serialize_tagger.py
spacy/tests/serialize/test_serialize_tagger.py
# coding: utf-8 from __future__ import unicode_literals from ..util import make_tempdir from ...pipeline import NeuralTagger as Tagger import pytest @pytest.fixture def taggers(en_vocab): tagger1 = Tagger(en_vocab, True) tagger2 = Tagger(en_vocab, True) tagger1.model = tagger1.Model(None, None) tagg...
mit
Python
1dff65da48ca675f77a940c2035bd7a78b8de817
Create 0728_balanced_word.py
boisvert42/npr-puzzle-python
2019/0728_balanced_word.py
2019/0728_balanced_word.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- """ NPR 2019-07-28 https://www.npr.org/2019/07/28/745971618/sunday-puzzle-high-cs The word BEVY is "alphabetically balanced." That is, the first letter, B, is second from the start of the alphabet, and the last letter, Y, is second from the end of the alphabet. Similar...
cc0-1.0
Python
0a10268652143cfaa35bf807f0f2a38aaa92158e
update seed_data to respect namespace settings
aelialper/skyline,loggly/skyline,CDKGlobal/skyline,pombredanne/skyline,etsy/skyline,triplekill/skyline,hcxiong/skyline,aelialper/skyline,klynch/skyline,sdgdsffdsfff/skyline,CDKGlobal/skyline,etsy/skyline,aelialper/skyline,hcxiong/skyline,klynch/skyline,CDKGlobal/skyline,sdgdsffdsfff/skyline,loggly/skyline,aelialper/sky...
utils/seed_data.py
utils/seed_data.py
#!/usr/bin/env python import json import os import pickle import socket import sys import time from os.path import dirname, join, realpath from multiprocessing import Manager, Process, log_to_stderr from struct import Struct, pack import redis import msgpack # Get the current working directory of this file. # http:/...
#!/usr/bin/env python import json import os import pickle import socket import sys import time from os.path import dirname, join, realpath from multiprocessing import Manager, Process, log_to_stderr from struct import Struct, pack import redis import msgpack # Get the current working directory of this file. # http:/...
mit
Python
3f5b80ae2a64a2603762768d5f3b4bc4cfaa762c
Fix import python 3
vheon/JediHTTP,micbou/JediHTTP,micbou/JediHTTP,vheon/JediHTTP
tests/end_to_end_test.py
tests/end_to_end_test.py
# Copyright 2015 Cedraro Andrea <a.cedraro@gmail.com> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
# Copyright 2015 Cedraro Andrea <a.cedraro@gmail.com> # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or...
apache-2.0
Python
448fac951898f81466db3900cb8d1cfe0c40373e
add 148
ufjfeng/leetcode-jf-soln,ufjfeng/leetcode-jf-soln
python/148_sort_list.py
python/148_sort_list.py
""" Sort a linked list in O(n log n) time using constant space complexity. """ # Definition for singly-linked list. # class ListNode(object): # def __init__(self, x): # self.val = x # self.next = None class Solution(object): def sortList(self, head): """ :type head: ListNode ...
mit
Python
3f0d314a90989649f6b620b9ecf393e884729e0c
add program to plot psf distribution
dmargala/blupe,dmargala/blupe,dmargala/blupe
python/plot_psf_dist.py
python/plot_psf_dist.py
#!/usr/bin/env python import argparse import numpy as np import matplotlib as mpl mpl.use('Agg') #mpl.rcParams.update({'font.size': 8}) import matplotlib.pyplot as plt def add_stat_legend(x): textstr = '$\mathrm{N}=%d$\n$\mathrm{mean}=%.2f$\n$\mathrm{median}=%.2f$\n$\mathrm{std}=%.2f$' % ( len(x), np.nan...
mit
Python
17da66e7324b97efd4aeb98b2dcceb940669012b
Create binja_get_cfg.py
trailofbits/remill,trailofbits/remill,trailofbits/remill,trailofbits/remill
scripts/binja_get_cfg.py
scripts/binja_get_cfg.py
#!/usr/bin/env python def main(): pass if __name__ == '__main__': main()
apache-2.0
Python
fc055d109f65fea0c5b08a8e82b905a79dafbc89
add empty unittest for rpcinterface module
julien6387/supvisors,julien6387/supervisors,julien6387/supervisors,julien6387/supervisors,julien6387/supvisors,julien6387/supvisors,julien6387/supervisors,julien6387/supvisors
supvisors/tests/test_rpcinterface.py
supvisors/tests/test_rpcinterface.py
#!/usr/bin/python #-*- coding: utf-8 -*- # ====================================================================== # Copyright 2017 Julien LE CLEACH # # 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 Lice...
apache-2.0
Python
f03901543996836de91a030e154e4c9d9cd752a3
create test for shortcut function
clair3st/code-katas
src/test_vowel_remover.py
src/test_vowel_remover.py
"""Test vowel remover function.""" import pytest STRING = [ ['hello', 'hll'], ['claire', 'clr'], ['borriquito como tu', 'brrqt cm t'], ['We are the Knights who say ni!', 'W r th Knghts wh sy n!'], ["It's just a flesh wound.", "It's jst flsh wnd."] ] @pytest.mark.parametrize("n, result", STRING...
mit
Python
d7957fffe2d1a5483325fb7c1e81142df14ec431
add swith-waterman algorithm.
mizuy/seqtool,mizuy/seqtool,mizuy/seqtool,mizuy/seqtool,mizuy/seqtool
seqtool/nucleotide/sw.py
seqtool/nucleotide/sw.py
import numpy # http://en.wikipedia.org/wiki/Smith%E2%80%93Waterman_algorithm # http://www.ibm.com/developerworks/jp/java/library/j-seqalign/ class Score(object): def __init__(self, match, mismatch, gap): self.match = match self.mismatch = mismatch self.gap = gap SCORE = Score(2,-2,-1) de...
mit
Python
8c3e41d9d5c051210f51f1c1c23bee74183258d1
Create draw_shapes.py
CSavvy/python
simulator/draw_shapes.py
simulator/draw_shapes.py
# IMPORTANT! For this program, be sure to also download the background image at # www.github.com/CSavvy/python/blob/master/shape_gui_background.png # and put it in the same folder that you put this program!! from Myro import * init("sim") penDown() from Graphics import * win = Window('Draw Shapes with Scribbler', 50...
mit
Python
159af598c05c3ff4b72aa88154282d531edd2320
Create statements.py
henrik645/rpp
statements.py
statements.py
class Statements: def __init__(self, statements): self.statements = statements def eval(self, env): for statement in self.statements: statement.eval(env) def __repr__(self): string = "Statements:" for statement in self.statements: str...
mit
Python
a18ed42fa2b28e6f439b2d6201e6fa967852d49d
Fix pogcal authentication issues. fix #2128
spencerjanssen/Flexget,poulpito/Flexget,antivirtel/Flexget,cvium/Flexget,qvazzler/Flexget,thalamus/Flexget,xfouloux/Flexget,OmgOhnoes/Flexget,drwyrm/Flexget,grrr2/Flexget,LynxyssCZ/Flexget,camon/Flexget,tobinjt/Flexget,sean797/Flexget,voriux/Flexget,v17al/Flexget,dsemi/Flexget,qk4l/Flexget,Pretagonist/Flexget,asm0dey/F...
flexget/plugins/input/pogcal.py
flexget/plugins/input/pogcal.py
from __future__ import unicode_literals, division, absolute_import import logging from bs4 import BeautifulSoup from flexget.utils import requests from flexget.entry import Entry from flexget import plugin log = logging.getLogger('pogcal') class InputPogDesign(object): def validator(self): from flexget ...
from __future__ import unicode_literals, division, absolute_import import logging from bs4 import BeautifulSoup from flexget.utils import requests from flexget.entry import Entry from flexget import plugin log = logging.getLogger('pogcal') class InputPogDesign(object): def validator(self): from flexget ...
mit
Python
8c22304c3998bcbc2d1c90fb86f705851b5b779d
Add first search algorithm
Deborah-Digges/SDC-ND-term-3,Deborah-Digges/SDC-ND-term-3,Deborah-Digges/SDC-ND-term-3,Deborah-Digges/SDC-ND-term-3,Deborah-Digges/SDC-ND-term-3
p1-path-planning/class-notes/search.py
p1-path-planning/class-notes/search.py
# ---------- # User Instructions: # # Define a function, search() that returns a list # in the form of [optimal path length, row, col]. For # the grid shown below, your function should output # [11, 4, 5]. # # If there is no valid path from the start point # to the goal, your function should return the string # 'fail'...
apache-2.0
Python
81728590b09270e4e32af61cdb5855bb814f683c
Add unit test for quick sort implementation.
weichen2046/algorithm-study,weichen2046/algorithm-study
test/unit/sorting/test_quick_sort.py
test/unit/sorting/test_quick_sort.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import unittest from helper.read_data_file import read_int_array from sorting.quick_sort import sort BASE_DIR = os.path.dirname(os.path.abspath(__file__)) class InsertionSortTester(unittest.TestCase): # Test sort in default order, i.e., in ascending ord...
mit
Python
5d1a9af4b53f96316934368821c839e95c5a50b1
Add salt-ssh grains.items test
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
tests/integration/ssh/test_grains.py
tests/integration/ssh/test_grains.py
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import # Import Salt Testing Libs from tests.support.case import SSHCase from tests.support.unit import skipIf # Import Salt Libs import salt.utils @skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows') class SSHGrainsTest(...
apache-2.0
Python
6cfc7b2e3ada61d2f94837c0cadd42b3bb42b550
add test-disco-no-reply.py (re-recorded)
jku/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,community-ssu/telepathy-gabble,Ziemin/telepathy-gabble,Ziemin/telepathy-gabble,jku/telepathy-gabble,community-ssu/telepathy-gabble,Ziemin/...
tests/twisted/test-disco-no-reply.py
tests/twisted/test-disco-no-reply.py
""" Test that Gabble disconnects connection if it doesn't receive a response to its service discovery request """ from twisted.words.xish import domish from gabbletest import exec_test, JabberXmlStream def test(q, bus, conn, stream): conn.Connect() # connecting q.expect('dbus-signal', signal='StatusChan...
lgpl-2.1
Python
688654e3d8fd526c136fb0a7a75d0a9af4b626eb
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/d844fd905b93d287da9c5864e1739b40987575af.
tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,karllessard/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-experimental_link...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "d844fd905b93d287da9c5864e1739b40987575af" TFRT_SHA256 = "e50e8758042bd1ed357785329339...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "636ca0ead542d825560b3948f8c8e0e84edd47e4" TFRT_SHA256 = "6b41156d88a414235550908cd490...
apache-2.0
Python
63b4a169594374a8f85161fe9cd8c6c09fe61213
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/527789bef0f0f386fcdbd929d3e1e4244d4861ce.
tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tenso...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "527789bef0f0f386fcdbd929d3e1e4244d4861ce" TFRT_SHA256 = "b941926730becd4b8c774b13fdc3...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "8b40c57bb60bdff64b2eb7e189adf8dea2e0a7ac" TFRT_SHA256 = "ed34df2943ecd4db9ae901716585...
apache-2.0
Python
b28769f23bf3ba2644da1d446f16afc78e12b5ff
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/14ffe8e8370f2d6644aa701517b0f763d39c11b8.
tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "14ffe8e8370f2d6644aa701517b0f763d39c11b8" TFRT_SHA256 = "874cde2c16e25702433f95cc21d90efab0841c30fcc1c9...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "a91477d7da9cdc992e006e70cfc790f6a608d83c" TFRT_SHA256 = "0e34d02cb1533869a81a9942119558306398238010e7ca...
apache-2.0
Python
1d63394c01c7d139a85bcee1e351ebcbfd61f09a
Update TFRT dependency to use revision http://github.com/tensorflow/runtime/commit/9ad01386ce4afc3950a5784f702b91d63fa630d8.
tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model...
third_party/tf_runtime/workspace.bzl
third_party/tf_runtime/workspace.bzl
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "9ad01386ce4afc3950a5784f702b91d63fa630d8" TFRT_SHA256 = "7f879cfcfb99ec37a0b32a9b3190...
"""Provides the repository macro to import TFRT.""" load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") def repo(): """Imports TFRT.""" # Attention: tools parse and update these lines. TFRT_COMMIT = "7c99aeadacee949f4de11eafe7e83bae80358791" TFRT_SHA256 = "482deb3aecbaff840b9de99c5dc5...
apache-2.0
Python
8565062439a34b4249ac7f2268d8c4f3d29acf73
Add a script to populate the PRISTINE table from a .svn/pristine/ hierarchy.
jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion,jmckaskill/subversion
tools/dev/wc-ng/populate-pristine.py
tools/dev/wc-ng/populate-pristine.py
#!/usr/bin/env python """ A script that takes a .svn/pristine/ hierarchy, with its existing .svn/wc.db database, and populates the database's PRISTINE table accordingly. (Use 'svn cleanup' to remove unreferenced pristines.) Usage: %s /path/to/wc [...] """ # TODO: resolve the NotImplemented() in __main__ # TODO:...
apache-2.0
Python
aee402317122281e7e361beb1b0eb0f5f6ed126d
Support onlinetvrecorder.com
vuolter/pyload,vuolter/pyload,vuolter/pyload
module/plugins/hoster/OnlineTvRecorder.py
module/plugins/hoster/OnlineTvRecorder.py
# -*- coding: utf-8 -*- import re from module.plugins.hoster.Http import Http from module.network.HTTPRequest import BadHeader # Support onlinetvrecorder.com class OnlineTvRecorder(Http): __name__ = "OnlineTvRecorder" __type__ = "hoster" __version__ = "0.01" __status__ = "testing" # RIPE...
agpl-3.0
Python
5fb4c8ff86ecebbe7ede9954236cdce896dc15b4
add paired conv node
diogo149/treeano,nsauder/treeano,nsauder/treeano,diogo149/treeano,jagill/treeano,jagill/treeano,nsauder/treeano,diogo149/treeano,jagill/treeano
treeano/sandbox/nodes/paired_conv.py
treeano/sandbox/nodes/paired_conv.py
""" node for 2 conv's paired together, which allows more flexible combinations of filter size and padding - specifically even filter sizes can have "same" padding """ import numpy as np import theano import theano.tensor as T import treeano import treeano.nodes as tn import canopy fX = theano.config.floatX @treeano...
apache-2.0
Python
5995fb29869e828ae7dd6bcca9eb30bfe00a959d
Fix for Blender version check
mrachinskiy/blender-addon-booltron
__init__.py
__init__.py
bl_info = { "name": "Booltron", "author": "Mikhail Rachinskiy (jewelcourses.com)", "version": (2000,), "blender": (2,74,0), "location": "3D View → Tool Shelf", "description": "Booltron—super add-on for super fast booleans.", "wiki_url": "https://github.com/mrachinskiy/blender-addon-booltron", "tracker_url": "ht...
bl_info = { "name": "Booltron", "author": "Mikhail Rachinskiy (jewelcourses.com)", "version": (2000,), "blender": (2,7,4), "location": "3D View → Tool Shelf", "description": "Booltron—super add-on for super fast booleans.", "wiki_url": "https://github.com/mrachinskiy/blender-addon-booltron", "tracker_url": "htt...
mit
Python
549f77a2c91be84c98217a9c81d81cd2b45b26af
Create __init__.py
lukebranch/website_custom_pages
__init__.py
__init__.py
mit
Python
560228cbc2e95fd24f994e0a78465a031f6e0eef
Create the Contacts App - Part II > New Contact - Create Form
deenaariff/Django,tabdon/crmeasyapp,tabdon/crmeasyapp
crmapp/contacts/forms.py
crmapp/contacts/forms.py
from django import forms from .models import Contact class ContactForm(forms.ModelForm): class Meta: model = Contact fields = ('first_name', 'last_name', 'role', 'phone', 'email', 'account', ) widgets = { 'first_name': forms.TextInput( ...
mit
Python
b273248f1c33abfe355657e8b0e4e85492efb10d
Add tests for limits api in V1 api
cneill/designate-testing,muraliselva10/designate,ionrock/designate,grahamhayes/designate,ramsateesh/designate,tonyli71/designate,cneill/designate-testing,grahamhayes/designate,tonyli71/designate,ramsateesh/designate,openstack/designate,grahamhayes/designate,muraliselva10/designate,cneill/designate-testing,ionrock/desig...
designate/tests/test_api/test_v1/test_limits.py
designate/tests/test_api/test_v1/test_limits.py
# coding=utf-8 # Copyright 2012 Managed I.T. # # Author: Kiall Mac Innes <kiall@managedit.ie> # # 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...
apache-2.0
Python
52b62e2bfd5bef7ad1047259d0516539c20a2442
Add 'manage.py' command for unattended password setup
turboj55/scifight,turboj55/scifight,scifight/scifight,scifight/scifight,turboj55/scifight,scifight/scifight
scifight_proj/management/commands/changepassword_quiet.py
scifight_proj/management/commands/changepassword_quiet.py
from django.contrib.auth import get_user_model from django.core.management.base import BaseCommand, CommandError from django.db import DEFAULT_DB_ALIAS class Command(BaseCommand): help = "Quietly change a user's password for django.contrib.auth." requires_system_checks = False def add_arguments(self, pa...
agpl-3.0
Python
7136bddf70c5c60cb360c1916f08c7237a7fe2a5
Add 151-reverse-words-in-a-string.py
mvj3/leetcode
151-reverse-words-in-a-string.py
151-reverse-words-in-a-string.py
""" Question: Reverse Words in a String Given an input string, reverse the string word by word. For example, Given s = "the sky is blue", return "blue is sky the". Update (2015-02-12): For C programmers: Try to solve it in-place in O(1) space. click to show clarification. Clarif...
mit
Python
7f4d21ad84dc12165ea65abd1606d4aa3689e3cb
Add script to find destructors which are not virtual, but should be
myint/cppclean,myint/cppclean,myint/cppclean,myint/cppclean
headers/cpp/nonvirtual_dtors.py
headers/cpp/nonvirtual_dtors.py
#!/usr/bin/env python # # Copyright 2008 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law ...
apache-2.0
Python
1ae445e97ae400800fb4e69fc12e42319602c440
Add migration for 88ee81029c695f093b72220c64c97a20bee1ef8c
Mariatta/pythondotorg,SujaySKumar/pythondotorg,SujaySKumar/pythondotorg,malemburg/pythondotorg,malemburg/pythondotorg,proevo/pythondotorg,willingc/pythondotorg,python/pythondotorg,SujaySKumar/pythondotorg,SujaySKumar/pythondotorg,manhhomienbienthuy/pythondotorg,python/pythondotorg,willingc/pythondotorg,proevo/pythondot...
downloads/migrations/0003_auto_20150824_1612.py
downloads/migrations/0003_auto_20150824_1612.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('downloads', '0002_auto_20150416_1853'), ] operations = [ migrations.AlterField( model_name='release', ...
apache-2.0
Python
cfe5a6579519d8fd5827b2bcbfd343691f480242
Create find-closest-combo.py
exDeos/hello-world
value-matching/find-closest-combo.py
value-matching/find-closest-combo.py
import logging import itertools logging.basicConfig(level=logging.DEBUG) def smash_it(X,t): best= (t,[]) N= len(X) for i in range(len(X)//2): left_side_attack= i+1 right_side_attack= len(X)-i Q= itertools.combinations(X,left_side_attack) logging.info("Attack Length= {}".form...
unlicense
Python
895ee7de3fbe51f7bde3d59a9ed98c282252704d
Fix playlist_dir not resolving relative path
kelvinhammond/beets,lengtche/beets,xsteadfastx/beets,lengtche/beets,m-urban/beets,artemutin/beets,swt30/beets,diego-plan9/beets,imsparsh/beets,dfc/beets,shanemikel/beets,PierreRust/beets,arabenjamin/beets,parapente/beets,lightwang1/beets,sadatay/beets,shanemikel/beets,jmwatte/beets,multikatt/beets,beetbox/beets,andremi...
beetsplug/smartplaylist.py
beetsplug/smartplaylist.py
# This file is part of beets. # Copyright 2013, Dang Mai <contact@dangmai.net>. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the right...
# This file is part of beets. # Copyright 2013, Dang Mai <contact@dangmai.net>. # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the right...
mit
Python
aa4ec4656846cf002eb0a2ae99bc4f156a6476fb
add script/function to guess step-size for the input data
brentp/combined-pvalues,brentp/combined-pvalues
cpv/stepsize.py
cpv/stepsize.py
""" calculate the step-size that should be used for the ACF calculations. The step-size is calculated as:: median(distance-between-adjacent-starts) This heuristic seems to work well for creating bins with equal amounts of records for the ACF. """ import argparse from _common import get_col_num, bedit...
mit
Python
9e4287cd02d7a2446cb7c02e49d56043700eb83a
Create postgres.py
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/pillar/postgres.py
salt/pillar/postgres.py
# -*- coding: utf-8 -*- ''' Retrieve Pillar data by doing a postgres query :maturity: new :depends: psycopg2 :platform: all Complete example ===================================== .. code-block:: yaml postgres: user: 'salt' pass: 'super_secret_password' db: 'salt_db' ext_pillar: - po...
apache-2.0
Python
a1ad14994a4a6dcdafddcf091de805ab694fcdf0
Move salt.utils.itersplit() to salt.utils.itertools.split()
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/utils/itertools.py
salt/utils/itertools.py
# -*- coding: utf-8 -*- ''' Helpful generators and other tools ''' # Import python libs from __future__ import absolute_import import re def split(orig, sep=None): ''' Generator function for iterating through large strings, particularly useful as a replacement for str.splitlines(). See http://stacko...
apache-2.0
Python
b3f091bbab15a349c1ba4471462994bc8ca5ef69
Add make-prefetch script
bigfix/make-prefetch,bigfix/make-prefetch
make-prefetch.py
make-prefetch.py
#!/usr/bin/env python from argparse import ArgumentParser from hashlib import sha1, sha256 import os import sys usage = """make-prefetch.py [options] <file> Create a prefetch statement for IBM Endpoint Manager ActionScript Options: -a, --algorithm ALGORITHM Hash algorithm to use (all, sha1, sha256) ...
apache-2.0
Python
1d55de171d0c5c4d178d5af063f8957f436cc2d9
Add migration
theirc/ServiceInfo,theirc/ServiceInfo,theirc/ServiceInfo,theirc/ServiceInfo,theirc/ServiceInfo-ircdeploy
services/migrations/0035_auto_20150325_1637.py
services/migrations/0035_auto_20150325_1637.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('services', '0034_create_nationalities'), ] operations = [ migrations.AlterModelOptions( name='nationality', ...
bsd-3-clause
Python
bedf18a0124a006e0b6814ae642d7f0c5d616908
add a command to force a key rolloer
dstufft/jutils
crate_project/apps/crate/management/commands/force_key_rollover.py
crate_project/apps/crate/management/commands/force_key_rollover.py
from django.core.management.base import BaseCommand from pypi.tasks import pypi_key_rollover class Command(BaseCommand): def handle(self, *args, **options): pypi_key_rollover.delay()
bsd-2-clause
Python
50886a39d3cda7b487ed3862626d565c80737add
Add migrations for verbose name changes
california-civic-data-coalition/django-calaccess-processed-data,california-civic-data-coalition/django-calaccess-processed-data
calaccess_processed/migrations/0011_auto_20171023_1620.py
calaccess_processed/migrations/0011_auto_20171023_1620.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.7 on 2017-10-23 16:20 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('calaccess_processed', '0010_auto_20171013_1838'), ] operations = [ migrations.Alter...
mit
Python
0a3655975de1da7869b902c437a6a5dd49322850
Add missing tasks.py
rocketDuck/folivora,rocketDuck/folivora,rocketDuck/folivora
folivora/tasks.py
folivora/tasks.py
#-*- coding: utf-8 -*- """ folivora.tasks ~~~~~~~~~~~~~~ Celery tasks that execute syncronization with PyPi and other stuff. """ import time import datetime import pytz from celery import task from django.utils.timezone import make_naive, make_aware from folivora.models import SyncState, Package, Packa...
isc
Python
7f0f5a351d5cf36208cb27991d86aae7a496a811
update view.py
podhub-io/follower
follower/views.py
follower/views.py
from app import app from feed import Entry, Feed from flask import jsonify, render_template @app.route('/') def index(): return jsonify() @app.route('/cast/<url>/<index>') def feed(url, index): """ :param url: Podcast feed URL. :type url: ``str`` :param index: Index representing the episode numb...
bsd-3-clause
Python
9afabf0cc4739d7433e3f360eff1d1f37d8ab889
Add tree.py
phyng/c-lang,phyng/c-lang,phyng/c-lang
chapter6/tree.py
chapter6/tree.py
# coding: utf-8 import json from random import randrange, shuffle class Node(object): def __init__(self, word): self.word = word self.count = 1 self.left = None self.right = None def __str__(self): return '{{"word": "{}", "count": {}, "left": {}, "right": {}}}'.forma...
mit
Python
e1f32736e2ec47e6794835b82c79f47e514004ed
test script for wordcloud added
NCBI-Hackathons/PhenVar
test_wordcloudfornouns.py
test_wordcloudfornouns.py
from lanpros import * from wordcloud import * import matplotlib.pyplot as plt from ncbiutils import * def create_wordcloud(normalized_all_counts): word_cloud_list = [(key + ' ') * int(round(normalized_all_counts[key],4)*10000) for key in normalized_all_counts.keys()] word_cloud_text = '-'.join(word_cloud_list...
mit
Python
a524fbeb36e764ca881750ffd02dde89e8148521
Add module with common IO functions. Functions to write recarrays to text.
awblocker/cplate,awblocker/cplate
lib/cplate/io.py
lib/cplate/io.py
import numpy as np # Define functions def convert_dtype_to_fmt(dtype, quote=True): ''' Converts dtype from record array to output format Uses %d for integers, %g for floats, and %s for strings ''' # Get kinds kinds = [dtype.fields[key][0].kind for key in dtype.names] # Iterate through ...
apache-2.0
Python
1e97780c8ac16c32b297c8cbdd086e6bfac5e678
increase popup space.
cchristelis/feti,cchristelis/feti,cchristelis/feti,cchristelis/feti
django_project/feti/migrations/0033_auto_20150923_0716.py
django_project/feti/migrations/0033_auto_20150923_0716.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('feti', '0032_auto_20150909_1127'), ] operations = [ migrations.AlterField( model_name='campus', name...
bsd-2-clause
Python
188df1f76110f9c8fcb7daa1949d6ca088bc9f6b
add script to generate lines to execute
poppingtonic/BayesDB,fivejjs/crosscat,fivejjs/crosscat,probcomp/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,fivejjs/crosscat,JDReutt/BayesDB,JDReutt/BayesDB,poppingtonic/BayesDB,mit-probabilistic-computing-project/crosscat,probcomp/crosscat,mit-probabilistic-computing-project/crosscat,poppin...
tabular_predDB/timing_analysis/generate_runtime_script.py
tabular_predDB/timing_analysis/generate_runtime_script.py
import itertools num_rows = 1000 num_cols = 20 n_steps = 200 base_str = ' '.join([ 'python runtime_scripting.py', '--num_clusters %s', '--num_rows %s' % num_rows, '--num_cols %s' % num_cols, '--num_splits %s', '--n_steps %s' % n_steps, '-do_remote >>out 2>>err &', ]) num_clusters_list = [5, 10, 20, ...
apache-2.0
Python
7efc5129008503d581861b8dc00f569353eeb565
add inheritence test
SexualHealthInnovations/callisto-core,SexualHealthInnovations/django-wizard-builder,project-callisto/callisto-core,scattermagic/django-wizard-builder,SexualHealthInnovations/django-wizard-builder,project-callisto/callisto-core,scattermagic/django-wizard-builder,SexualHealthInnovations/callisto-core
tests/test_inheritence.py
tests/test_inheritence.py
from wizard_builder.models import QuestionPage, SingleLineText from django.test import TestCase class InheritenceTest(TestCase): def test_site_passed_to_question_page_manager(self): page = QuestionPage.objects.create() question = SingleLineText.objects.create(page_id=page.id) self.assert...
agpl-3.0
Python
f8b43ccee527993eca5764f90e3caba43b347f01
Update gtrois import conf
camillemonchicourt/Geotrek,mabhub/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,Anaethelion/Geotrek,GeotrekCE/Geotrek-admin,GeotrekCE/Geotrek-admin,johan--/Geotrek,Anaethelion/Geotrek,johan--/Geotrek,mabhub/Geotrek,camillemonchicourt/Geotrek,johan--/Geotrek,makinacorpus/Geotrek,camillemonchi...
.salt/files/gtrois.py
.salt/files/gtrois.py
import os {% set cfg = salt['mc_utils.json_load'](data) %} {% set ddata = cfg.data %} DATABASE = { 'NAME': '{{ddata.db_name}}', 'USER': '{{ddata.db_user}}', 'PASSWORD': '{{ddata.db_pass}}', 'HOST': '{{ddata.db_host}}}}', 'PORT': '{{ddata.db_port}}', } FTP = { 'HOST': '{{ddata.gtrois.ftp_host}}'...
import os {% set cfg = salt['mc_utils.json_load'](data) %} {% set ddata = cfg.data %} DATABASE = { 'NAME': '{{ddata.db_name}}', 'USER': '{{ddata.db_user}}', 'PASSWORD': '{{ddata.db_pass}}', 'HOST': '{{ddata.db_host}}}}', 'PORT': '{{ddata.db_port}}', } FTP = { 'HOST': '{{ddata.gtrois.ftp_host}}'...
bsd-2-clause
Python
d388709d1c7d52cf1f2552bcfdbfd6b83b578675
Raise robohornetpro timeout. Is it timing out on cros.
ChromiumWebApps/chromium,ChromiumWebApps/chromium,anirudhSK/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,ondra-novak/chromium.src,dednal/chromium.src,markYoungH/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,bright-spar...
tools/perf/benchmarks/robohornet_pro.py
tools/perf/benchmarks/robohornet_pro.py
# Copyright (c) 2012 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. """Runs Microsoft's RoboHornet Pro benchmark.""" import os from telemetry import test from telemetry.core import util from telemetry.page import page_m...
# Copyright (c) 2012 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. """Runs Microsoft's RoboHornet Pro benchmark.""" import os from telemetry import test from telemetry.core import util from telemetry.page import page_m...
bsd-3-clause
Python
4432952e60958ffa4087f6c6819df62391bfe438
add __init__ in graph
helloTC/ATT,BNUCNL/ATT
graph/__init__.py
graph/__init__.py
# emacs: -*- mode: python-mode; py-indent-offset: 4; indent-tabs-mode: nil -*- # vi: set ft=python sts=4 ts=4 sw=4 et: """ Modules for graph analysis (contains graph signal extraction and parcellation) """ __all__ = []
mit
Python
77515c6a4289b321ee2b8539135f2071efd12ab3
Add test_logpuzzle.py
beepscore/google-python-exercises,beepscore/google-python-exercises
logpuzzle/test_logpuzzle.py
logpuzzle/test_logpuzzle.py
#!/usr/bin/env python3 # References # http://docs.python.org/3.3/library/unittest.html import unittest import logpuzzle class TestCopySpecial(unittest.TestCase): def setUp(self): pass def test_read_urls(self): pass def test_download_images(self): pass if __name__ == "__main_...
apache-2.0
Python
5c1fad9e6a75ee43d3a3b7bce6c9249cf601b4b9
Write cluster_tendrl_context to proper location
r0h4n/commons,Tendrl/commons,rishubhjain/commons
tendrl/commons/objects/cluster_tendrl_context/__init__.py
tendrl/commons/objects/cluster_tendrl_context/__init__.py
import json import logging import os import socket import uuid from tendrl.commons.etcdobj import EtcdObj from tendrl.commons.utils import cmd_utils from tendrl.commons import objects LOG = logging.getLogger(__name__) class ClusterTendrlContext(objects.BaseObject): def __init__( self, integra...
import json import logging import os import socket import uuid from tendrl.commons.etcdobj import EtcdObj from tendrl.commons.utils import cmd_utils from tendrl.commons import objects LOG = logging.getLogger(__name__) class ClusterTendrlContext(objects.BaseObject): def __init__( self, integra...
lgpl-2.1
Python
17d7336059df1ea80cc57623065ca5e7362ec133
Allow markdown.py script to run on Windows - stop it from importing itself instead of the library. Note that this only works if the markdown library is installed (mostly likely in sitepackages). It will not work if the markdown library is in the same directory as markdown.py (such as an uninstalled source distribution)...
gogobook/Python-Markdown,joachimneu/Python-Markdown,me-and/Python-Markdown,zestedesavoir/Python-ZMarkdown,dataquestio/Python-Markdown,fernandezcuesta/Python-Markdown,Situphen/Python-ZMarkdown,waylan/Python-Markdown,Situphen/Python-ZMarkdown,cyisfor/Python-Markdown,cyisfor/Python-Markdown,evertqin/Python-Markdown,evertq...
markdown.py
markdown.py
#!/usr/bin/env python """ Python Markdown, the Command Line Script ======================================== This is the command line script for Python Markdown. Basic use from the command line: python markdown.py source.txt > destination.html Run "python markdown.py --help" to see more options. See markdown/__...
#!/usr/bin/env python """ Python Markdown, the Command Line Script ======================================== This is the command line script for Python Markdown. Basic use from the command line: python markdown.py source.txt > destination.html Run "python markdown.py --help" to see more options. See markdown/__...
bsd-3-clause
Python
2a7a14c37b8bb34aba9de29b9a528b2ed6f53be9
Add new consistency checking script
GENI-NSF/gram,GENI-NSF/gram,GENI-NSF/gram
src/gram/am/gram/consistency.py
src/gram/am/gram/consistency.py
#!/usr/bin/python # check on open_stack consistency import open_stack_interface as osi def check_openstack_consistency(): # Get all the tenants tenants = {} command_string = "keystone tenant-list" output = osi._execCommand(command_string) output_lines = output.split('\n') for i in range(3, len...
mit
Python
803fc01824391494746c2a7b5d6d868a493c898d
Add text from Helmut.
Brown-University-Library/vivo-data-management,Brown-University-Library/vivo-data-management
vdm/text.py
vdm/text.py
""" Text normalizing routines. Adapted from the Helmut project. https://github.com/okfn/helmut/blob/master/helmut/text.py """ import re from unicodedata import normalize as ucnorm, category def normalize(text): """ Simplify a piece of text to generate a more canonical representation. This involves lowercasin...
mit
Python
9a3695316f469bb70161d50665697ab248b0d7f1
Package for console_mode test suite.
Nikea/VisTrails,Nikea/VisTrails,minesense/VisTrails,VisTrails/VisTrails,minesense/VisTrails,hjanime/VisTrails,minesense/VisTrails,Nikea/VisTrails,celiafish/VisTrails,VisTrails/VisTrails,celiafish/VisTrails,hjanime/VisTrails,hjanime/VisTrails,minesense/VisTrails,celiafish/VisTrails,hjanime/VisTrails,VisTrails/VisTrails,...
vistrails/tests/resources/console_mode_test.py
vistrails/tests/resources/console_mode_test.py
############################################################################ ## ## Copyright (C) 2006-2007 University of Utah. All rights reserved. ## ## This file is part of VisTrails. ## ## This file may be used under the terms of the GNU General Public ## License version 2.0 as published by the Free Software Foundat...
bsd-3-clause
Python
fd2d0d2dd7c896d60c736f31e08271d88211d603
fix indentation...
xieyanhao/xunlei-lixian,iambus/xunlei-lixian,ccagg/xunlei,sdgdsffdsfff/xunlei-lixian,windygu/xunlei-lixian,myself659/xunlei-lixian,davies/xunlei-lixian,liujianpc/xunlei-lixian,sndnvaps/xunlei-lixian,wangjun/xunlei-lixian,wogong/xunlei-lixian,GeassDB/xunlei-lixian
lixian_config.py
lixian_config.py
import os LIXIAN_DEFAULT_CONFIG = os.path.join(os.getenv('USERPROFILE') or os.getenv('HOME'), '.xunlei.lixian.config') LIXIAN_DEFAULT_COOKIES = os.path.join(os.getenv('USERPROFILE') or os.getenv('HOME'), '.xunlei.lixian.cookies') def load_config(path): values = {} if os.path.exists(path): with open(path) as x: ...
import os LIXIAN_DEFAULT_CONFIG = os.path.join(os.getenv('USERPROFILE') or os.getenv('HOME'), '.xunlei.lixian.config') LIXIAN_DEFAULT_COOKIES = os.path.join(os.getenv('USERPROFILE') or os.getenv('HOME'), '.xunlei.lixian.cookies') def load_config(path): values = {} if os.path.exists(path): with open(path) as x: ...
mit
Python
0bb77630478ac6407e8d78d8fda142117539f512
add remove-duplicate-letters
EdisonAlgorithms/LeetCode,zeyuanxy/leet-code,EdisonAlgorithms/LeetCode,zeyuanxy/leet-code,zeyuanxy/leet-code,EdisonAlgorithms/LeetCode
vol7/remove-duplicate-letters/remove-duplicate-letters.py
vol7/remove-duplicate-letters/remove-duplicate-letters.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # @Author: Zeyuan Shang # @Date: 2015-12-09 13:38:18 # @Last Modified by: Zeyuan Shang # @Last Modified time: 2015-12-09 13:38:32 import collections class Solution(object): def removeDuplicateLetters(self, s): """ :type s: str :rtype: str ...
mit
Python
c372ddd727cb29dd3345d24073006ac38558663c
Create __init__.py
RonsenbergVI/trendpy,RonsenbergVI/trendpy
trendpy/tests/__init__.py
trendpy/tests/__init__.py
# -*- coding: utf-8 -*- # __init__.py # MIT License # Copyright (c) 2017 Rene Jean Corneille # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitat...
mit
Python
8efab0283613dd09b09b1771fe35732c9cbc5cea
Add missing file for last commit
tobbez/lys-reader
common/config.py
common/config.py
import imp module = imp.new_module('config') module.__file__ = 'config.py' config = {} config_file = open(module.__file__) exec(compile(config_file.read(), 'config.py', 'exec'), module.__dict__) for key in dir(module): if key.isupper(): config[key] = getattr(module, key)
isc
Python
7d818fbc07d3f9e2bd2376cad48e253c5c783a8c
Create get_data.py
aingvarf/zabbix-bdchecker,aingvarf/zabbix-bdchecker,aingvarf/zabbix-bdchecker
client/get_data.py
client/get_data.py
#!/usr/bin/python import socket import sys # echo "DSN1,SQL_NAME,PARAM1,PARAM2" | ./get_data.py localhost 10000 if (len(sys.argv) != 3): print "usage: " + sys.argv[0] + " host port <message >answer" else: s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((sys.argv[1], int(sys.argv[2]))) ...
mit
Python
7a8a1c9f14050ee34813a70f09a1fa285e333b36
Add Iterator interface
kiyukuta/chainer,ktnyt/chainer,wkentaro/chainer,jnishi/chainer,hvy/chainer,keisuke-umezawa/chainer,cupy/cupy,jnishi/chainer,hvy/chainer,chainer/chainer,wkentaro/chainer,cupy/cupy,ktnyt/chainer,okuta/chainer,hvy/chainer,cupy/cupy,chainer/chainer,tkerola/chainer,niboshi/chainer,niboshi/chainer,ktnyt/chainer,kikusu/chaine...
chainer/dataset/iterator.py
chainer/dataset/iterator.py
class Iterator(object): """Base class of all dataset iterators. Iterator iterates over the dataset, yielding a minibatch at each iteration. Minibatch is a list of examples. Each implementation should implement an iterator protocol (e.g., the :meth:`next` method). Note that, even if the iterator s...
mit
Python
c7f5c52f6217c79ee98f4c27dfce8f3c92c20cd5
add script/library to make coffee with relay
davidbradway/beaglebone-python
oncoffee.py
oncoffee.py
#!/usr/bin/python """ coffee.py Library for making coffee ======= run with: sudo ./coffee.py Copyright 2014 David P. Bradway (dpb6@duke.edu) 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 h...
apache-2.0
Python
d2c2566ee171cac5abde24128fffb6dfb5726b77
Add svm method
chuajiesheng/twitter-sentiment-analysis
analysis/svm_sgd.py
analysis/svm_sgd.py
# import dataset import json INPUT_FILE = './analysis/input/dev_posts.json' tweets = [] with open(INPUT_FILE, 'r') as f: for line in f: t = json.loads(line) tweets.append(t['body']) print('Total number of tweets: {}'.format(len(tweets))) # import results import numpy as np TARGET_FILE = './anal...
apache-2.0
Python
3fce2f26bc488fff39a99ce92e438d2b4aece3a1
Test PluginManager.stop()
coyle5280/honeypot,laurenmalone/honeypot,theplue/honeypot,coyle5280/honeypot,ckaz18/honeypot,theplue/honeypot,ckaz18/honeypot,laurenmalone/honeypot,theplue/honeypot,laurenmalone/honeypot,laurenmalone/honeypot,coyle5280/honeypot,theplue/honeypot,ckaz18/honeypot,ckaz18/honeypot,coyle5280/honeypot
Tests/TestPluginManager.py
Tests/TestPluginManager.py
import time from unittest import TestCase from PluginManager import PluginManager class TestPluginManager(TestCase): def test_stop(self): class Plugin: def get_port(self): return 30000 plugin_manager = PluginManager(Plugin(), lambda: None) plugin_manager.start() ...
mit
Python
1a127dee4bb8a4fe9208acbf84b2972ac8f053b5
Create exec.py
MyRobotLab/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,sstocker46/pyrobotlab
home/GroG/exec.py
home/GroG/exec.py
from jarray import zeros, array from java.lang import String from java.lang import Runtime r = Runtime.getRuntime() r.exec("notepad.exe")
apache-2.0
Python
4dbad1ecf300836f67c6e67b70d728b993bb96a5
add proxy for easier remote method invocation
jab1982/opennsa,jeroenh/OpenNSA,jab1982/opennsa,jeroenh/OpenNSA,NORDUnet/opennsa,jeroenh/OpenNSA,NORDUnet/opennsa,NORDUnet/opennsa
opennsa/proxy.py
opennsa/proxy.py
""" Handy proxy wrapping for easier / shorter calls to NSI agents. Author: Henrik Thostrup Jensen <htj@nordu.net> Copyright: NORDUnet (2011) """ class NSIProxy: def __init__(self, client, nsa_id, topology): self.client = client # client adhering to the NSIInterface self.nsa_id = nsa_...
bsd-3-clause
Python
ab9fed3a9a9152ed266d40eab2f16b12c77349fd
Add unit tests for bazaar URL handling
pypa/pip,willingc/pip,jythontools/pip,blarghmatey/pip,patricklaw/pip,domenkozar/pip,rouge8/pip,squidsoup/pip,zorosteven/pip,benesch/pip,pjdelport/pip,zvezdan/pip,dstufft/pip,supriyantomaftuh/pip,sbidoul/pip,caosmo/pip,natefoo/pip,h4ck3rm1k3/pip,techtonik/pip,minrk/pip,jasonkying/pip,sigmavirus24/pip,RonnyPfannschmidt/p...
tests/test_vcs_bazaar.py
tests/test_vcs_bazaar.py
from tests.test_pip import pyversion from pip.vcs.bazaar import Bazaar if pyversion >= '3': VERBOSE_FALSE = False else: VERBOSE_FALSE = 0 def test_bazaar_simple_urls(): """ Test bzr url support. SSH and launchpad have special handling. """ http_bzr_repo = Bazaar(url='bzr+http://bzr.mypro...
mit
Python
fd352435c1c58c2370d837626b46d79bf6f7db63
Add the analyse_gate_failures.py tool.
JordanP/openstack-snippets,JordanP/openstack-snippets
analyse-gate-failures/analyse_gate_failures.py
analyse-gate-failures/analyse_gate_failures.py
#!/usr/bin/env python3.5 import argparse import collections import datetime import json import requests TIME_FORMAT = "%Y-%m-%d %H:%M:%S" def parse_args(): parser = argparse.ArgumentParser( description='Print which jobs are responsible for Gate failures', ) parser.add_argument('--project', requ...
apache-2.0
Python
e52b5412b5c5a71d8b9b286cf96af1a0e4e29dfa
add python script to parse a TCX file
davidbradway/fusefit,davidbradway/fusefit,davidbradway/fusefit
parseTCX.py
parseTCX.py
# -*- coding: utf-8 -*- """ Created on Fri Feb 27 21:22:08 2015 @author: David """ filename = r'phone\activity_704970907.tcx' #filename = r'fused\uniqueStructure.tcx' try: from lxml import etree print("running with lxml.etree") except ImportError: try: # Python 2.5 import xml.etree.cElementTree as etree...
mit
Python
104eecfcc1dbc4ebc2a11f9a36a790a05e8eb295
Create paska.py
jasuka/pyBot,jasuka/pyBot
modules/paska.py
modules/paska.py
#perse
mit
Python
a1a552857498206b6684681eb457978dd5adf710
Add Publisher mixins for using Mappers
limbera/django-nap,MarkusH/django-nap
nap/rest/mapper.py
nap/rest/mapper.py
''' Mixins for using Mappers with Publisher ''' from django.core.exceptions import ValidationError from nap import http from nap.utils import flatten_errors class MapperListMixin(object): def list_get_default(self, request, action, object_id): ''' Replace the default list handler with one that r...
bsd-3-clause
Python
60e24d34a6798262e307266a6b9dd6905a5d8894
add regression tests
ProgVal/irctest
irctest/server_tests/test_regressions.py
irctest/server_tests/test_regressions.py
""" Regression tests for bugs in oragono. """ from irctest import cases class RegressionsTestCase(cases.BaseServerTestCase): @cases.SpecificationSelector.requiredBySpecification('RFC1459') def testFailedNickChange(self): # see oragono commit d0ded906d4ac8f self.connectClient('alice') ...
mit
Python
404a601b32453ff35f240c08c692eae537ecb811
add example
fukatani/stacked_generalization
example/cross_validation_for_iris.py
example/cross_validation_for_iris.py
from sklearn import datasets from sklearn.utils.validation import check_random_state from stacked_generalization.lib.stacking import StackedClassifier from sklearn.ensemble import RandomForestClassifier from sklearn.ensemble import ExtraTreesClassifier from sklearn.ensemble import GradientBoostingClassifier from sklear...
apache-2.0
Python
355d0c4f6b8a7687a3940a2d90d66b08e560bfa7
add getcoins.py script to get coins from (signet) faucet
particl/particl-core,sipsorcery/bitcoin,fujicoin/fujicoin,tecnovert/particl-core,AkioNak/bitcoin,particl/particl-core,practicalswift/bitcoin,particl/particl-core,instagibbs/bitcoin,MeshCollider/bitcoin,jlopp/statoshi,jambolo/bitcoin,achow101/bitcoin,prusnak/bitcoin,achow101/bitcoin,particl/particl-core,sstone/bitcoin,a...
contrib/signet/getcoins.py
contrib/signet/getcoins.py
#!/usr/bin/env python3 # Copyright (c) 2020 The Bitcoin Core developers # Distributed under the MIT software license, see the accompanying # file COPYING or http://www.opensource.org/licenses/mit-license.php. import argparse import subprocess import requests import sys parser = argparse.ArgumentParser(description='Sc...
mit
Python
6097b1e21012ec11c54ec6da7055eabd1fa4d120
complete 27 quadratic primes
dawran6/project-euler
27-quadratic-primes.py
27-quadratic-primes.py
from utils import prime_gen from utils import prime_factors def number_of_consec_primes(a, b): n = 0 while True: formula = n*n + a*n + b if sum(prime_factors(formula)) != formula: return n n += 1 if __name__ == '__main__': p = prime_gen() ps = [] while True: ...
mit
Python
195438aea5418196a1feff68cc6550b4a719df7c
Implement a barebones trollnormal for testing.
probcomp/cgpm,probcomp/cgpm
src/dummy/trollnormal.py
src/dummy/trollnormal.py
# -*- coding: utf-8 -*- # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # 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 # Unles...
apache-2.0
Python
e7f8dcc37398c858219e396cdba5f153f83edead
Create htmlParser.py
mysmartcity/flux,mysmartcity/flux,mysmartcity/flux,mysmartcity/flux
crawler/linux/htmlParser.py
crawler/linux/htmlParser.py
#!/usr/bin/python3.4 import urllib2 import os import re import string import sys import getpass import urllib import subprocess import codecs from bs4 import BeautifulSoup STATIC_MTS="mts.ro" STATIC_MT="www.mt.ro" class Flux: @staticmethod def execute(): filename=sys.argv[1] f = open(filename) li...
apache-2.0
Python
a096ed28d4098f3420f3e0bf1ebcc3fbf79a4472
Add picture model code
gelnior/newebe,gelnior/newebe,gelnior/newebe,gelnior/newebe
pictures/models.py
pictures/models.py
import datetime from couchdbkit.schema import StringProperty, BooleanProperty, \ DateTimeProperty from newebe.core.models import NewebeDocument PICTURE_LIMIT = 50 class PictureManager(): ''' Utility methods to retrieve pictures data. ''' @staticmethod ...
agpl-3.0
Python
ff50744e2dd1f04959e4f7f63ff3a08d21ef9839
Add pint numpy type snippet
cmey/surprising-snippets,cmey/surprising-snippets
pint-numpy-type.py
pint-numpy-type.py
# A variable imbued with pint unit mutates its state when touched by Numpy. # Source https://github.com/hgrecco/pint/blob/master/pint/quantity.py#L1165-L1167 # Since https://github.com/hgrecco/pint/commit/53d5fca35948a5bb80cb900e8e692e8206b1512a import pint # 0.7.2 import numpy as np # 1.11.1 units = pint.UnitRegist...
mit
Python
8cb516f44c063b3d991339a2c3912c9fbdf83eb8
Add OpenStackDriver
cloudcomputinghust/CAL
calplus/v1/object_storage/drivers/openstack.py
calplus/v1/object_storage/drivers/openstack.py
"""OpenStackDriver for Object Storage based on BaseDriver """ from keystoneauth1.identity import v3 from keystoneauth1 import session from swiftclient.client import Connection from calplus.v1.object_storage.drivers.base import BaseDriver, BaseQuota PROVIDER = "OPENSTACK" class OpenStackDriver(BaseDriver): ...
apache-2.0
Python
2b5d1ef0b74618a4e406499bd0f3f745f3e3a402
Remove unused locales
mathjazz/pontoon,m8ttyB/pontoon,participedia/pontoon,Osmose/pontoon,m8ttyB/pontoon,sudheesh001/pontoon,jotes/pontoon,sudheesh001/pontoon,participedia/pontoon,mozilla/pontoon,mathjazz/pontoon,mathjazz/pontoon,mozilla/pontoon,m8ttyB/pontoon,participedia/pontoon,vivekanand1101/pontoon,m8ttyB/pontoon,yfdyh000/pontoon,jotes...
pontoon/base/migrations/0012_auto_20150804_0859.py
pontoon/base/migrations/0012_auto_20150804_0859.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations def remove_unused_locales(apps, schema_editor): Locale = apps.get_model('base', 'Locale') for unused_locale in UNUSED_LOCALES: locale = Locale.objects.get(code=unused_locale) locale.delet...
bsd-3-clause
Python
7aa39a13d557d1fa50c0573e2bf7c1f9107885b2
Implement RoutingPublisher which routes between publishers. (#10)
googleapis/python-pubsublite,googleapis/python-pubsublite
google/cloud/pubsublite/internal/wire/routing_publisher.py
google/cloud/pubsublite/internal/wire/routing_publisher.py
from typing import Dict from google.cloud.pubsublite.internal.wire.publisher import Publisher from google.cloud.pubsublite.internal.wire.routing_policy import RoutingPolicy from google.cloud.pubsublite.partition import Partition from google.cloud.pubsublite.publish_metadata import PublishMetadata from google.cloud.pub...
apache-2.0
Python
c9be60a3e023b2f41c15e5cd4bd3f9d0fab6e016
Split in lists
rahulbohra/Python-Basic
65_split_in_list.py
65_split_in_list.py
people = "Happy Birthday Nani" names = people.split() print names print len(names) for name in names: print name print "\n" fact = "Python:PHP:C" languages = fact.split(":") for language in languages: print language
mit
Python