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 |
|---|---|---|---|---|---|---|---|---|
55637514e578421e749f90f1ae8bd782831abffb | Add ClientMesh Decoder | kevthehermit/RATDecoders | malwareconfig/decoders/clientmesh.py | malwareconfig/decoders/clientmesh.py | from base64 import b64decode
from malwareconfig.common import Decoder
from malwareconfig.common import string_printable
class ClientMesh(Decoder):
decoder_name = "ClientMesh"
decoder__version = 1
decoder_author = "@kevthehermit"
decoder_description = "ClientMesh Decoder"
def __init__(self):
... | mit | Python | |
0018765068ed533bed6adaa33a7634c104850034 | Create RomanToInt_001.py | Chasego/cod,cc13ny/algo,Chasego/codi,cc13ny/algo,Chasego/cod,Chasego/cod,cc13ny/algo,cc13ny/algo,Chasego/codi,Chasego/codirit,cc13ny/Allin,Chasego/codi,Chasego/cod,Chasego/codirit,Chasego/codi,Chasego/codirit,Chasego/codirit,cc13ny/Allin,cc13ny/algo,Chasego/codirit,Chasego/cod,cc13ny/Allin,Chasego/codi,cc13ny/Allin,cc1... | leetcode/013-Roman-to-Integer/RomanToInt_001.py | leetcode/013-Roman-to-Integer/RomanToInt_001.py | class Solution(object):
def romanToInt(self, s):
"""
:type s: str
:rtype: int
"""
r2i = {'I':1, 'V':5, 'X':10, 'L':50,
'C':100, 'D':500, 'M':1000}
res = 0
for i in range(len(s)):
if i == len(s) - 1 or r2i[s[i]] >= r2i[s[i + 1]]:
... | mit | Python | |
709229c8126a532ca6813298b0d90515a5c1ad9d | test to submit file to databank | dataflow/DataStage,dataflow/DataStage,dataflow/DataStage | test/FileShare/tests/OXDSDataset.py | test/FileShare/tests/OXDSDataset.py | # ---------------------------------------------------------------------
#
# Copyright (c) 2012 University of Oxford
#
# 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, incl... | mit | Python | |
180cae4ec364cf1b2bf9d1f733999a538c5f516f | Create test-events.py | arienchen/pytibrv | test/python/test-events.py | test/python/test-events.py | import datetime
import time
from tibrv.tport import *
from tibrv.status import *
from tibrv.tport import *
from tibrv.events import *
from tibrv.disp import *
import unittest
class EventTest(unittest.TestCase, TibrvMsgCallback):
@classmethod
def setUpClass(cls):
status = Tibrv.open()
if status... | bsd-3-clause | Python | |
95fdd1f96ad4d54fb75ea134ea2195808d4c1116 | Add python script to check big-O notation | prabhugs/scripts,prabhugs/scripts | bigO.py | bigO.py | import timeit
import random
for i in range (10000, 100000, 20000):
t = timeit.Timer("random.randrange(%d) in x"%i, "from __main__ import random, x")
x = list(range(i))
list_time = t.timeit(number = 1000)
x = {j:None for j in range(i)}
dict_time = t.timeit(number = 1000)
print "Counter: " + str(i) + " L... | mit | Python | |
a0ae12ddf581eb77af5ce5c6498c26745bd2cfcb | Add script to extract code/data size after make examples. | jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib,jfpoilpret/fast-arduino-lib | stats.py | stats.py | #!/usr/bin/python
# encoding: utf-8
from __future__ import with_statement
import argparse, re, sys
def filter(args):
bytes_extractor = re.compile(r"([0-9]+) bytes")
with args.output:
with args.input:
for line in args.input:
if line.startswith("avr-size"):
... | lgpl-2.1 | Python | |
23080dfea3ce6997c1cbd784da674902aa8a8cbe | test looping from Ingenico format, through pBER and back to Ingenico | mmattice/pyemvtlv | test/test_loop_ingenico.py | test/test_loop_ingenico.py | from pyemvtlv.codec.ingenico import decoder as ingdec
from pyemvtlv.codec.ingenico import encoder as ingenc
from pyemvtlv.codec.binary import decoder as berdec
from pyemvtlv.codec.binary import encoder as berenc
from binascii import hexlify
import unittest
class RecodeTestCase(unittest.TestCase):
def testFull(s... | bsd-3-clause | Python | |
31e7415f29d22d3ecf709fc0a447c95232b0e294 | Create server.py | filip-marinic/LGS_SimSuite | server.py | server.py | #!/usr/bin/env python
# LGS SimSuite Server
#Copyright (c) 2015 Filip Marinic
from time import sleep, gmtime, strftime
import socket
import math
import sys
TCP_S_IP = '0.0.0.0'
BUFFER_SIZE = 10
FRAME_ID = 1000000000
frames_sent = 0
MESSAGE = "_9HXuFd6BoQGA0t5nvoLfOBUhP9rKGCFKPUG6JvFfBr6zJZDwzHlgTyCoBk04sxPQEaQ20Poey... | mit | Python | |
151a5a64aa5d0e3a2b4e63c7f07916efa087b8a2 | Create car-fleet.py | tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode | Python/car-fleet.py | Python/car-fleet.py | # Time: O(nlogn)
# Space: O(n)
# N cars are going to the same destination along a one lane road.
# The destination is target miles away.
#
# Each car i has a constant speed speed[i] (in miles per hour),
# and initial position position[i] miles towards the target along the road.
#
# A car can never pass another car ah... | mit | Python | |
67d7f3fc03c6bc031f73b53348b140e7f24567c1 | Add opennurbs package (#6570) | krafczyk/spack,LLNL/spack,tmerrick1/spack,tmerrick1/spack,matthiasdiener/spack,tmerrick1/spack,mfherbst/spack,tmerrick1/spack,LLNL/spack,krafczyk/spack,iulian787/spack,matthiasdiener/spack,matthiasdiener/spack,iulian787/spack,mfherbst/spack,EmreAtes/spack,krafczyk/spack,krafczyk/spack,mfherbst/spack,krafczyk/spack,mfhe... | var/spack/repos/builtin/packages/opennurbs/package.py | var/spack/repos/builtin/packages/opennurbs/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | Python | |
d7eaf7c3010b7cec0ef53f033badaa11748224e7 | add link test | echinopsii/net.echinopsii.ariane.community.cli.python3 | tests/acceptance/mapping/link_at.py | tests/acceptance/mapping/link_at.py | # Ariane CLI Python 3
# Link acceptance tests
#
# Copyright (C) 2015 echinopsii
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) an... | agpl-3.0 | Python | |
aa2ddd886cc344889b53eed2ca8102fe5dc0aed4 | Make tf_saved_model/debug_info.py a bit more strict. | annarev/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,paolodedios/tensorflow,arborh/tensorflow,arborh/tensorflow,sarvex/tensorflow,davidzchen/tensorflow,renyi533/tensorflow,xzturn/tensorflow,Intel-tensorflow/tensorflow,freedomtan/tensorflow,gunan/... | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/debug_info.py | tensorflow/compiler/mlir/tensorflow/tests/tf_saved_model/debug_info.py | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2019 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | Python |
7b0005eb7d2b2e05a9fd833a2771573aec69c199 | Add script for comparing test vectors. | BBN-Q/QGL,BBN-Q/QGL | tests/compare_test_data.py | tests/compare_test_data.py | import os
import sys
import glob
import h5py
from QGL import *
import QGL
BASE_AWG_DIR = QGL.config.AWGDir
BASE_TEST_DIR = './test_data/awg/'
def compare_sequences():
test_subdirs = ['TestAPS1', 'TestAPS2']
for subdir in test_subdirs:
testdirs = glob.glob(os.path.join(BASE_TEST_DIR, subdir, '*'))
... | apache-2.0 | Python | |
bf9a5c6f14cfbafe544fcc27f146410afcc84fea | Add migrations for number_of_streams. | streamr/marvin,streamr/marvin,streamr/marvin | migrations/versions/19b7fe1331be_.py | migrations/versions/19b7fe1331be_.py | """Add number_of_streams to movies.
Revision ID: 19b7fe1331be
Revises: 2c76677d803f
Create Date: 2013-11-16 22:11:44.560000
"""
# revision identifiers, used by Alembic.
revision = '19b7fe1331be'
down_revision = '2c76677d803f'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto gene... | mit | Python | |
692f8ab50f4ecf8d40605d535e85077b8e79c510 | Add client test for test_pods | ramielrowe/python-magnumclient,ramielrowe/python-magnumclient,openstack/python-magnumclient | magnumclient/tests/v1/test_pods.py | magnumclient/tests/v1/test_pods.py | # Copyright 2015 IBM Corp.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed t... | apache-2.0 | Python | |
3d10dd8b18096ba51ed4b837f8b297d015258a96 | Add conftest for UI testing | CodeForPhilly/chime,CodeForPhilly/chime,CodeForPhilly/chime | tests/dash_app/conftest.py | tests/dash_app/conftest.py | from pytest import fixture
from selenium.webdriver.chrome.options import Options
from dash_app import app
def pytest_setup_options():
options = Options()
options.add_argument('--disable-gpu')
options.add_argument('--headless')
options.add_argument("--no-sandbox")
options.add_argument("--disable-e... | mit | Python | |
98213db5448f73edb039912bbdf6dd2f69ce26a4 | Add the migration. Oops. | quiltdata/quilt-compiler,quiltdata/quilt,quiltdata/quilt-compiler,quiltdata/quilt,quiltdata/quilt-compiler,quiltdata/quilt-compiler,quiltdata/quilt,quiltdata/quilt,quiltdata/quilt | migrations/versions/c3500625bed8_.py | migrations/versions/c3500625bed8_.py | """empty message
Revision ID: c3500625bed8
Revises: 3dcc171e7253
Create Date: 2017-02-21 16:08:43.397517
"""
from alembic import op
import sqlalchemy as sa
from sqlalchemy.dialects import mysql
# revision identifiers, used by Alembic.
revision = 'c3500625bed8'
down_revision = '3dcc171e7253'
branch_labels = None
depe... | apache-2.0 | Python | |
514f744bc39129a241e704e4ea282befcd31b1b7 | Add about page functional test | andela-kndungu/compshop,kevgathuku/compshop,andela-kndungu/compshop,andela-kndungu/compshop,kevgathuku/compshop,kevgathuku/compshop,kevgathuku/compshop,andela-kndungu/compshop | tests/functional/test_about_page.py | tests/functional/test_about_page.py | from .base import FunctionalTest
class AboutPageTest(FunctionalTest):
def test_about_page_navigation(self):
self.browser.get(self.live_server_url)
self.browser.set_window_size(1024, 768)
about_link = self.browser.find_element_by_link_text('ABOUT US')
about_link.click()
... | bsd-3-clause | Python | |
0e877e6124d370a0d628d12e387d5614ab4c6a6a | Create hacktorial.py | dhellen/Some-Math | hacktorial.py | hacktorial.py | #!/usr/bin/env python
# I got really excited about the recursive functions that come with Python
# Factorial
def factorial(z):
return reduce((lambda a, b: a*b), xrange(1, z+1))
# Some narrow functions as reference for broader functions:
''' A. The sum of squares is limited to only getting sums with exponent of ... | cc0-1.0 | Python | |
fb5a0d0cf9e3e14e418b06c373f26a2e6e2a7c1e | Read data from csv | liuisaiah/Hack-Brown2017,LWprogramming/Hack-Brown2017 | script.py | script.py | import numpy as np
import pandas
def main():
data = pandas.read_csv('sarcasm_v2.csv').as_matrix()
# print(data.shape)
data[:, 0] = np.array([find_category(x) for x in data[:, 0]])
data[:, 1] = np.array([sarcasm(x) for x in data[:, 1]])
# print(data[0,1]) # should be 1 for sarcasm
def find_category(category):
re... | mit | Python | |
350ea09999002935178bf6569411e56455167ff8 | add script to clean cells | adrn/DropOutput | drop_ipynb_output.py | drop_ipynb_output.py | #!/usr/bin/env python
"""
Suppress output and prompt numbers for IPython notebooks included in git
repositories.
By default, this script will tell git to ignore prompt numbers and
cell output when adding ipynb files to git repositories. Note that the
notebook files themselves are *not* changed, this script just filte... | mit | Python | |
0bd974c21f42f7c2e0162b92ea1cde5ee5ff8060 | add wrapper to get all bootstrapped preds | judithfan/graphcomm,judithfan/graphcomm,judithfan/graphcomm | analysis/get_all_bootstrapped_model_predictions.py | analysis/get_all_bootstrapped_model_predictions.py | from __future__ import division
import os
import numpy as np
import pandas as pd
import analysis_helpers as h
'''
Wrapper around bootstrap_model_predictions.py.
It will spawn several threads to get bootstrap vectors from all splits and models.
Estimate uncertainty in estimates of key variables of interest that are d... | mit | Python | |
89464b86d3c94c5aea5aac15e0dc5b581ed2ac3f | Save olass/models/crud_mixin.py needs refactoring in order to have access to the `session` | ufbmi/olass-client,indera/olass-client | olass/models/crud_mixin.py | olass/models/crud_mixin.py | """
Goal: simplify the code when interacting with entities
"""
import sqlalchemy as db
class CRUDMixin():
""" Helper class sqlalchemy entities """
__table_args__ = {'extend_existing': True}
id = db.Column(db.Integer, primary_key=True)
@classmethod
def get_by_id(cls, id):
if any(
... | mit | Python | |
d445b65414325b9281ad6fcdc59ab4a2290d0bdc | Add missing migration | jonge-democraten/website,jonge-democraten/website,jonge-democraten/website,jonge-democraten/website | website/jdpages/migrations/0015_auto_20171209_1040.py | website/jdpages/migrations/0015_auto_20171209_1040.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('jdpages', '0014_organisationmember_email'),
]
operations = [
migrations.AlterModelOptions(
name='blogcategorypag... | mit | Python | |
59e909afcb5dc5e44703c25d183b9edce60882b6 | add comment | NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess | controller/addComment.py | controller/addComment.py | #!/usr/local/bin/python3
"""
created_by: Aninda Manocha
created_date: 3/5/2015
last_modified_by: Aninda Manocha
last_modified date: 3/5/2015
"""
# imports
import constants
import utils
import json
from sql.session import Session
from sql.user import User
from sql.comment import Comment
#Format of com... | mit | Python | |
a46f3dd56b716cf2c9c918e4135d2248388ba030 | Change template debugging back to False | webyneter/cookiecutter-django,ryankanno/cookiecutter-django,webyneter/cookiecutter-django,pydanny/cookiecutter-django,hackebrot/cookiecutter-django,thisjustin/cookiecutter-django,bopo/cookiecutter-django,trungdong/cookiecutter-django,ad-m/cookiecutter-django,topwebmaster/cookiecutter-django,trungdong/cookiecutter-djang... | {{cookiecutter.project_slug}}/config/settings/test.py | {{cookiecutter.project_slug}}/config/settings/test.py | # -*- coding: utf-8 -*-
'''
Test settings
- Used to run tests fast on the continuous integration server and locally
'''
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
# Turn debug off so tests run faster
DEBUG = False
TEMPLATES[0]['OPTIONS']['d... | # -*- coding: utf-8 -*-
'''
Test settings
- Used to run tests fast on the continuous integration server and locally
'''
from .common import * # noqa
# DEBUG
# ------------------------------------------------------------------------------
# Turn debug off so tests run faster
DEBUG = False
# But template debugging m... | bsd-3-clause | Python |
e9b057d13e99dbcbbcf77467de49c6472f042b42 | Add files via upload | R4v3nBl4ck/Apache-Struts-2-CVE-2017-5638-Exploit- | Struts2_Shell001.py | Struts2_Shell001.py | #!/usr/bin/python
import urllib2
import os, sys, time
__Author__="Rvbk"
RED = '\033[1;31m'
BLUE = '\033[94m'
BOLD = '\033[1m'
GREEN = '\033[32m'
OTRO = '\033[36m'
YELLOW = '\033[33m'
ENDC = '\033[0m'
def cls():
os.system(['clear', 'cls'][os.name == 'nt'])
cls()
logo = BLUE+''' ... | mit | Python | |
a45b62ab76324db2ae4a0842b901fec8e463e2f0 | Add tests for the constructor | ppb/ppb-vector,ppb/ppb-vector | tests/test_vector2_ctor.py | tests/test_vector2_ctor.py | import pytest # type: ignore
from hypothesis import given
from utils import floats, vectors, vector_likes
from ppb_vector import Vector2
class V(Vector2): pass
@pytest.mark.parametrize('cls', [Vector2, V])
@given(x=vectors())
def test_ctor_vector_like(cls, x: Vector2):
for x_like in vector_likes(x):
v... | artistic-2.0 | Python | |
221621e88496805fbee7849e376cce40e0d45f03 | Add test for #305 (thanks to @bfredl) | jriehl/numba,IntelLabs/numba,numba/numba,GaZ3ll3/numba,seibert/numba,jriehl/numba,pombredanne/numba,pitrou/numba,stuartarchibald/numba,gdementen/numba,ssarangi/numba,GaZ3ll3/numba,numba/numba,gdementen/numba,GaZ3ll3/numba,IntelLabs/numba,ssarangi/numba,stuartarchibald/numba,pitrou/numba,cpcloud/numba,pombredanne/numba,... | numba/tests/issues/test_issue_305.py | numba/tests/issues/test_issue_305.py | from __future__ import print_function, division, absolute_import
import tempfile
import textwrap
from numba import jit, autojit
# Thanks to @bfredl
def test_fetch_latest_source():
"""
When reloading new versions of the same module into the same session (i.e.
an interactive ipython session), numba sometim... | bsd-2-clause | Python | |
618340e7dfd21c54ac713140079c53b205aae73e | Create tuples.py | JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking,JsWatt/Free-Parking | hacker_rank/python/basic_data_types/tuples.py | hacker_rank/python/basic_data_types/tuples.py | if __name__ == '__main__':
n = int(input())
integer_list = map(int, input().split())
t = (tuple(integer_list))
print(hash(t))
| mit | Python | |
d3b99620a4794376f4319516af65aa0f5c433354 | Create really terrible demo | Zirientis/skulpt-canvas,Zirientis/skulpt-canvas | demo.py | demo.py | import document
pre = document.getElementById('edoutput')
pre.innerHTML = '''
<button onclick="var a=new XMLHttpRequest();a.open('GET','https://raw.githubusercontent.com/Zirientis/skulpt-canvas/master/core.js', false);a.send();console.log(a.response);">Run</button>
<span id="evaltext" style="display:none">
</span>
'''... | mit | Python | |
6af0081721acd4b6258b97c02424b2ccba80a303 | Create scale.py | cuongnb14/lab_clound_computing,huanpc/lab_cloud_computing | docs/learning-by-doing/week06-mesos-and-marathon/scale.py | docs/learning-by-doing/week06-mesos-and-marathon/scale.py | import http.client
import json
URI = 'localhost:8080'
header = {'Content-type': 'application/json'}
data = '"instances": "3"'
json_data = json.dumps(data)
method = 'PUT'
link = '/v2/apps/basic-0?force=true'
con = http.client.HTTPConnection(URI)
con.request(method,link,json_data,header)
response = con.getresponse()
p... | apache-2.0 | Python | |
93a2c523383fd1903e2912c783efdd1d27dc81ee | add tests for inserting rows with missing key columns | scylladb/scylla,scylladb/scylla,scylladb/scylla,scylladb/scylla | test/cql-pytest/test_null.py | test/cql-pytest/test_null.py | # Copyright 2020 ScyllaDB
#
# This file is part of Scylla.
#
# Scylla is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Scylla... | agpl-3.0 | Python | |
2b095ad646f1e8d4280190c9a1c2ccbed512d43c | Create __init__.py | PyThaiNLP/pythainlp | pythainlp/romanization/__init__.py | pythainlp/romanization/__init__.py | from pythainlp.romanization.royin import *
| apache-2.0 | Python | |
2ce83fbdef3a139dfb5618e9dc7fde4f2c8249ec | add method params. | merlian/django-xadmin,f1aky/xadmin,huaishan/django-xadmin,ly0/xxadmin,merlian/django-xadmin,Keleir/django-xadmin,cgcgbcbc/django-xadmin,zhiqiangYang/django-xadmin,hochanh/django-xadmin,hochanh/django-xadmin,tvrcopgg/edm_xadmin,cgcgbcbc/django-xadmin,wbcyclist/django-xadmin,sshwsfc/django-xadmin,sshwsfc/xadmin,vincent-f... | exadmin/views/website.py | exadmin/views/website.py | from django.utils.translation import ugettext as _
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.views.decorators.cache import never_cache
from django.contrib.auth.views import login
from django.contrib.auth.views import logout
from django.http import HttpResponse
from base import BaseAdminView
from ... | from django.utils.translation import ugettext as _
from django.contrib.auth import REDIRECT_FIELD_NAME
from django.views.decorators.cache import never_cache
from django.contrib.auth.views import login
from django.contrib.auth.views import logout
from django.http import HttpResponse
from base import BaseAdminView
from ... | bsd-3-clause | Python |
3419aa3dc2d14718c050e17f6ecc1a76844b5d26 | Add sfirah generator | cheshirex/shul-calendar,cheshirex/shul-calendar | sfirah.py | sfirah.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
import hebcalendar
import sys
import codecs
import uuid
numbers = ['', u'אחד', u'שנים', u'שלושה', u'ארבעה', u'חמשה', u'ששה', u'שבעה', u'שמונה', u'תשעה']
numbersTen = ['', u'עשר', u'עשרים', u'שלושים', u'ארבעים']
def getSfirahText(day):
text = u"בָּרוּךְ אַתָּה ה' אֱלהֵינוּ מ... | mit | Python | |
807a87ef5bfe1f34a072e3de0e1d60c07cefb5fb | Add test_pypy | naturalness/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,orezpraw/unnaturalcode,naturalness/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,orezpraw/unnaturalcode,orezpraw/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,naturalness/unnaturalcode,orezpraw/unnaturalcode,nat... | unnaturalcode/test_pypy.py | unnaturalcode/test_pypy.py | #!/usr/bin/python
# Copyright 2017 Dhvani Patel
#
# This file is part of UnnaturalCode.
#
# UnnaturalCode is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | agpl-3.0 | Python | |
4e0f9d8630847c92f02b0481fc0770cec68dadf7 | Implement auth tests | messente/verigator-python | messente/verigator/test/test_auth.py | messente/verigator/test/test_auth.py | from unittest import TestCase
from mock import MagicMock
from messente.verigator.client import RestClient
from messente.verigator.controllers import Auth
from verigator import routes
# noinspection PyUnresolvedReferences
class TestAuth(TestCase):
def setUp(self):
self.client = RestClient("http://test", ... | apache-2.0 | Python | |
3d32b633904316b077c5d3c3b3444154785f9fd3 | Create utils.py | ChunML/DCGAN | utils.py | utils.py | import math
import numpy as np
import tensorflow as tf
import scipy
from tensorflow.python.framework import ops
image_summary = tf.summary.image
scalar_summary = tf.summary.scalar
histogram_summary = tf.summary.histogram
merge_summary = tf.summary.merge
SummaryWriter = tf.summary.FileWriter
class batch_norm(object):... | mit | Python | |
464d55d687a664a5ed7da4f7ddafce1f647d5efc | add templation url.templation_static to manage statics in dev stage | qdqmedia/django-templation,qdqmedia/django-templation,qdqmedia/django-templation | templation/urls.py | templation/urls.py | from django.conf.urls import patterns, url
from .settings import DAV_ROOT, DAV_STATIC_URL
from .views import static_view
def templation_static(**kwargs):
"""
Helper function to return a URL pattern for serving files in debug mode.
Mostly cloned from django.conf.urls.static function.
from templation.u... | bsd-3-clause | Python | |
89daaaf631258595577dfc1c24dfdde8425f9efc | add migration | neynt/tsundiary,neynt/tsundiary,neynt/tsundiary,neynt/tsundiary | migrations/versions/2d696cdd68df_.py | migrations/versions/2d696cdd68df_.py | """empty message
Revision ID: 2d696cdd68df
Revises: 388d0cc48e7c
Create Date: 2014-11-14 00:27:32.062569
"""
# revision identifiers, used by Alembic.
revision = '2d696cdd68df'
down_revision = '388d0cc48e7c'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated by Alembic - ... | mit | Python | |
c779a68f1cf97693e09f116237c38efa1d791186 | add a module working with http connections | alces/gitlab-rest-client | http.py | http.py | '''
working with HTTP requests & responces
'''
import config
import httplib
import urlparse
'''
make a connection to URL
'''
def mkConn(url):
pars = urlparse.urlparse(url)
conCls = pars.scheme == 'https' and httplib.HTTPSConnection or httplib.HTTPConnection
return conCls(pars.netloc)
'''
send request to a system ... | bsd-2-clause | Python | |
bcd2cdae3176dddca06b0e09774b7c9cd641ce7b | Define custom exceptions | footynews/fn_backend | aggregator/exceptions.py | aggregator/exceptions.py |
class WebCrawlException(Exception):
pass
class AuthorNotFoundException(WebCrawlException):
pass
class DatePublishedNotFoundException(WebCrawlException):
pass
class TitleNotFoundException(WebCrawlException):
pass
| apache-2.0 | Python | |
06dbbfd7a8876f7db14f80e13d45eacd369501ab | add SocketServer | aamalev/aioworkers,aioworkers/aioworkers | aioworkers/net/server.py | aioworkers/net/server.py | import socket
from ..core.base import LoggingEntity
class SocketServer(LoggingEntity):
def __init__(self, *args, **kwargs):
self._sockets = []
super().__init__(*args, **kwargs)
def set_config(self, config):
super().set_config(config)
port = self.config.get_int('port', null=Tr... | apache-2.0 | Python | |
de250e5e63e4b0a36d06f8187644f91157265218 | Remove Privacy stubs | harry-7/Plinth,kkampardi/Plinth,vignanl/Plinth,harry-7/Plinth,jvalleroy/plinth-debian,freedomboxtwh/Plinth,freedomboxtwh/Plinth,harry-7/Plinth,kkampardi/Plinth,harry-7/Plinth,freedomboxtwh/Plinth,jvalleroy/plinth-debian,jvalleroy/plinth-debian,vignanl/Plinth,vignanl/Plinth,jvalleroy/plinth-debian,harry-7/Plinth,vignanl... | modules/installed/privacy/privacy.py | modules/installed/privacy/privacy.py | import cherrypy
from gettext import gettext as _
from plugin_mount import PagePlugin
from modules.auth import require
import cfg
import util
class Privacy(PagePlugin):
order = 20 # order of running init in PagePlugins
def __init__(self, *args, **kwargs):
PagePlugin.__init__(self, *args, **kwargs)
... | import cherrypy
from gettext import gettext as _
from plugin_mount import PagePlugin
from modules.auth import require
import cfg
import util
class Privacy(PagePlugin):
order = 20 # order of running init in PagePlugins
def __init__(self, *args, **kwargs):
PagePlugin.__init__(self, *args, **kwargs)
... | agpl-3.0 | Python |
2ed36e44c80e4b2d059c77fcda741656200f9876 | Add tests/test-muc-invitation.py [re-recorded] | community-ssu/telepathy-gabble,Ziemin/telepathy-gabble,jku/telepathy-gabble,mlundblad/telepathy-gabble,mlundblad/telepathy-gabble,Ziemin/telepathy-gabble,mlundblad/telepathy-gabble,community-ssu/telepathy-gabble,jku/telepathy-gabble,jku/telepathy-gabble,community-ssu/telepathy-gabble,community-ssu/telepathy-gabble,Ziem... | tests/test-muc-invitation.py | tests/test-muc-invitation.py | """
Test MUC invitations.
"""
import dbus
from twisted.words.xish import domish, xpath
from gabbletest import go, make_result_iq
from servicetest import call_async, lazy, match
@match('dbus-signal', signal='StatusChanged', args=[0, 1])
def expect_connected(event, data):
# Bob has invited us to an activity.
... | lgpl-2.1 | Python | |
e6501592303e2345e1262177a11f96e91f371024 | Add a state reading all about the room of a selected entity | WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors | sara_flexbe_states/src/sara_flexbe_states/Wonderland_Get_Entity_Room.py | sara_flexbe_states/src/sara_flexbe_states/Wonderland_Get_Entity_Room.py | #!/usr/bin/env python
# encoding=utf8
from flexbe_core import EventState, Logger
import json
class Wonderland_Get_Entity_Room(EventState):
'''
Read the position of a room in a json string
-- index_function function index of the
># json_text string command to read
># input_value object Input to the ... | bsd-3-clause | Python | |
d813f07e85b070e7ad60e8d9102ff148cc4734b8 | Create index.py | datts68/maas | SourceCode/index.py | SourceCode/index.py | #
| apache-2.0 | Python | |
dab9a2a596151b6fb2127319cacf264cfa7ae4f2 | add an example | jswinarton/django-cerebral-forms | examples/example.py | examples/example.py | import django
from django.conf import settings
from cerebral import forms
settings.configure()
django.setup()
class ExampleForm(forms.Form):
first_name = forms.CharField(
fill=True, hide=False, requires=[])
last_name = forms.CharField(
fill=True, hide=False, requires=[])
email = forms.Ch... | mit | Python | |
21bee0c5b92d03a4803baf237c460223308ebb9f | Add a fake source code so you can embed it in the example | MetaPlot/MetaPlot | examples/fakecode.py | examples/fakecode.py | # Get the hash
# 01/07/2017
# Melissa Hoffman
# Get the current repo
import os
import subprocess
testdir='/Users/melissahoffman1/'
repo = testdir
# Check if the repo is a git repo and get githash
def get_git_hash(path):
os.chdir(path)
try:
sha = subprocess.check_output(['git','rev-parse','HEAD'],... | mit | Python | |
077170874e3a08825e00f2b3cba68cc8f6e987ce | Prepare v1.2.509.dev | oxc/Flexget,qk4l/Flexget,crawln45/Flexget,sean797/Flexget,tobinjt/Flexget,LynxyssCZ/Flexget,malkavi/Flexget,oxc/Flexget,JorisDeRieck/Flexget,JorisDeRieck/Flexget,LynxyssCZ/Flexget,sean797/Flexget,poulpito/Flexget,tarzasai/Flexget,jacobmetrick/Flexget,gazpachoking/Flexget,poulpito/Flexget,dsemi/Flexget,Danfocus/Flexget,... | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | mit | Python |
210f9c6acefdf2f51d33baa1ed7a2c131729fb93 | Update migrations to use lms.yml in the help text | stvstnfrd/edx-platform,eduNEXT/edx-platform,angelapper/edx-platform,angelapper/edx-platform,EDUlib/edx-platform,eduNEXT/edx-platform,arbrandes/edx-platform,edx/edx-platform,arbrandes/edx-platform,eduNEXT/edx-platform,arbrandes/edx-platform,stvstnfrd/edx-platform,eduNEXT/edunext-platform,angelapper/edx-platform,EDUlib/e... | common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py | common/djangoapps/third_party_auth/migrations/0004_auto_20200919_0955.py | # Generated by Django 2.2.16 on 2020-09-19 09:55
from django.db import migrations, models
import openedx.core.lib.hash_utils
class Migration(migrations.Migration):
dependencies = [
('third_party_auth', '0003_samlconfiguration_is_public'),
]
operations = [
migrations.AlterField(
... | agpl-3.0 | Python | |
dc042aea1bb977984fb69a1da9c958f855d479ea | add util plot of precip cells | akrherz/idep,akrherz/dep,akrherz/dep,akrherz/dep,akrherz/idep,akrherz/idep,akrherz/idep,akrherz/dep,akrherz/dep,akrherz/idep,akrherz/idep | scripts/cligen/map_clifile_points.py | scripts/cligen/map_clifile_points.py | """Create a map of where we have climate files!"""
import psycopg2
import numpy as np
import os
import glob
from pyiem.plot import MapPlot
def get_domain():
pgconn = psycopg2.connect(database='idep', host='iemdb', user='nobody')
cursor = pgconn.cursor()
cursor.execute("""with ext as (
SELECT ST_Ex... | mit | Python | |
68d3107c9b7e71c185b2f0b926af0057d96cdc5a | add script that gives invalid output and writes stderr | AlanCoding/Ansible-inventory-file-examples,AlanCoding/Ansible-inventory-file-examples | scripts/empty/invalid_plus_stderr.py | scripts/empty/invalid_plus_stderr.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import print_function
import sys
# Write to standard error
print('TEST', file=sys.stderr)
print('{"_meta": {"hostvars": {}}') | mit | Python | |
52ae438ada955209e14c9c86ba56e3c81347930e | Make p-value calculations more numpythonic | corburn/scikit-bio,Kleptobismol/scikit-bio,jdrudolph/scikit-bio,demis001/scikit-bio,jairideout/scikit-bio,gregcaporaso/scikit-bio,averagehat/scikit-bio,kdmurray91/scikit-bio,colinbrislawn/scikit-bio,gregcaporaso/scikit-bio,jdrudolph/scikit-bio,wdwvt1/scikit-bio,Achuth17/scikit-bio,Kleptobismol/scikit-bio,anderspitman/s... | skbio/math/stats/distance/_mantel.py | skbio/math/stats/distance/_mantel.py | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | # ----------------------------------------------------------------------------
# Copyright (c) 2013--, scikit-bio development team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
# --------------------------------------------... | bsd-3-clause | Python |
504a5390a78811393e011f01e5b6ddf2a3aae8e8 | Create ubuntu-monolith.py | hatchery/Genepool2,hatchery/genepool | ubuntu-monolith.py | ubuntu-monolith.py | #!/usr/bin/env python
import subprocess
import os
def apt_install(packages):
env = os.environ.copy()
env[DEBIAN_FRONTEND] = "noninteractive"
subprocess.call('sudo -E apt-get update')
subprocess.call('sudo -E apt-get install -y ' + ' '.join(packages))
packages = """
- ack-grep
- ant
- atop
- bastet
- binclo... | mit | Python | |
96c873da602bf34fb129b3d86378e729d7d94d72 | Create BoofCv.py | MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab | home/Mats/BoofCv.py | home/Mats/BoofCv.py | boof = Runtime.createAndStart("boof","BoofCv")
args = ["Test"]
boof.main(args)
| apache-2.0 | Python | |
fcfb2b768f07bab8c94d83d9d53d70263d078b75 | Create MAP_loader.py | openEduConnect/eduextractor | eduextractor/MAP_loader.py | eduextractor/MAP_loader.py | import requests
import pandas as pd
from zipfile import ZipFile
from StringIO import StringIO
from nweaconfig import NWEA_USERNAME, NWEA_PASSWORD
## import database configuration from parent directory
## config contains SQLalchemy engine and a few DB functions
import sys
sys.path.append('../config')
import databasecon... | mit | Python | |
feb7dbeeb055696bf6646dba0bf3bb224d70b283 | Add separate text manipulation class | luoliyan/incremental-reading-for-anki,luoliyan/incremental-reading-for-anki | ir/text.py | ir/text.py | from collections import defaultdict
from anki.notes import Note
from aqt import mw
from aqt.addcards import AddCards
from aqt.editcurrent import EditCurrent
from aqt.utils import showInfo, tooltip
from .util import fixImages, getField, getInput, setField
class TextManager:
def __init__(self, setting... | isc | Python | |
b044ba312b126cb17bf906b1984e7b407509fcc6 | Add script to assist in packaging. | davidalber/Geneagrapher,davidalber/Geneagrapher | Geneagrapher/makedist.py | Geneagrapher/makedist.py | """This tool sets up a distribution of the software by automating
several tasks that need to be done.
The directory should be in pristine condition when this is run (i.e.,
devoid of files that need to be removed before packaging begins). It
is best to run this on a fresh check out of the repository."""
import os
impo... | mit | Python | |
410b354cb0e72ba741439a337aba4ef4c3cda8b1 | Add existing python file for performing a very crude analysis on a set of lsl files (as taken from an untarred OAR, for example) | justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools,justinccdev/opensimulator-tools | src/ossa.py | src/ossa.py | #!/usr/bin/python
import re
import sys
""" Taken from http://stackoverflow.com/questions/2669059/how-to-sort-alpha-numeric-set-in-python"""
def sorted_nicely(l):
""" Sort the given iterable in the way that humans expect."""
convert = lambda text: int(text) if text.isdigit() else text
alphanum_key = lam... | bsd-3-clause | Python | |
252ab143b139e39a1ef87150d8008704107fe1d8 | Create Database.py | albertcuesta/PEACHESTORE | database/Database.py | database/Database.py | __author__ = 'albert cuesta'
import os.path
class database:
def listaraplicaiones(self):
result = []
with open("database/data/aplicaciones.txt", mode='r+', encoding='utf-8') as file:
resultado = file.read()
texto = resultado.split("\n")
for linea in texto:
result.... | mit | Python | |
71d8ef8a872656df8a2319032855cb2b5ea5ed4b | Add a new benchmark - readline server | MagicStack/uvloop,1st1/uvloop,MagicStack/uvloop | examples/bench/rlserver.py | examples/bench/rlserver.py | import argparse
import asyncio
import gc
import uvloop
import os.path
import socket as socket_module
from socket import *
PRINT = 0
async def echo_client_streams(reader, writer):
sock = writer.get_extra_info('socket')
try:
sock.setsockopt(IPPROTO_TCP, TCP_NODELAY, 1)
except (OSError, NameError)... | apache-2.0 | Python | |
af2303062c7d4bbbcbe92df3d0c01d7729b910f2 | add swap example | ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt,ccxt/ccxt | examples/py/huobi-swaps.py | examples/py/huobi-swaps.py | # -*- coding: utf-8 -*-
import os
from random import randint
import sys
from pprint import pprint
root = os.path.dirname(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
sys.path.append(root + '/python')
import ccxt # noqa: E402
print('CCXT Version:', ccxt.__version__)
exchange = ccxt.huobi({
'ap... | mit | Python | |
1ac4dd4438dd054f32e23c6db01d2382507ed4c7 | break out shapefile tests | lightmare/mapnik,Airphrame/mapnik,whuaegeanse/mapnik,CartoDB/mapnik,CartoDB/mapnik,Airphrame/mapnik,cjmayo/mapnik,tomhughes/mapnik,rouault/mapnik,Mappy/mapnik,Mappy/mapnik,Mappy/mapnik,mbrukman/mapnik,yiqingj/work,mapycz/mapnik,pnorman/mapnik,lightmare/mapnik,kapouer/mapnik,pnorman/mapnik,rouault/mapnik,tomhughes/pytho... | tests/python_tests/shapefile_test.py | tests/python_tests/shapefile_test.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from nose.tools import *
from utilities import execution_path
import os, mapnik2
def setup():
# All of the paths used are relative, if we run the tests
# from another directory we need to chdir()
os.chdir(execution_path('.'))
if 'shape' in mapnik2.Datasource... | lgpl-2.1 | Python | |
64dac000cd4edb3a461918f8253e43bc47d6b594 | Create editUtils.py | ssarkar2/caffeSEA,ssarkar2/caffeSEA | utils/editUtils.py | utils/editUtils.py | # new_data = {'max_iter': 5000, 'snapshot': 500}
def createSolverPrototxt(new_data, save_loc):
f = open('solverToy.prototxt')
def_text = f.read().split('\n')
def_text.remove('')
solver_default_dict = {module.split(': ')[0]: module.split(': ')[1] for module in def_text}
new_dictionary = solver_defaul... | mit | Python | |
b41776096e6982e6ef0faef1fc95b550bebed9e8 | add script to calculate average oil price | thiagodasilva/home_automation,thiagodasilva/home_automation | oil_price/average_oil_price.py | oil_price/average_oil_price.py | #!/usr/bin/env python
import urllib
import paho.mqtt.publish as publish
from bs4 import BeautifulSoup as bs
newenglandoil = urllib.urlopen("http://www.newenglandoil.com/massachusetts/zone10.asp?x=0").read()
soup = bs(newenglandoil, 'lxml')
oil_table = soup.find('table')
tbody = oil_table.find('tbody')
rows = tbody.f... | mit | Python | |
a7a8cee70ffee9446aad19c9775d13c2b608c397 | Add RungeKuttaEvolver class. | fangohr/oommf-python,fangohr/oommf-python,fangohr/oommf-python | new/evolvers.py | new/evolvers.py | class RungeKuttaEvolve(object):
def __init__(self, alpha, gamma_G=2.210173e5, start_dm=0.01):
if not isinstance(alpha, (int, float)) or alpha < 0:
raise ValueError('alpha must be a positive float or int.')
else:
self.alpha = alpha
if not isinstance(gamma_G, (float, i... | bsd-2-clause | Python | |
39c853f64b837d257333c5731067c811344f9dfd | Add highlight.py (Python syntax highlighting) | kikocorreoso/brython,Isendir/brython,Hasimir/brython,amrdraz/brython,amrdraz/brython,kevinmel2000/brython,JohnDenker/brython,firmlyjin/brython,Mozhuowen/brython,Mozhuowen/brython,molebot/brython,amrdraz/brython,olemis/brython,olemis/brython,rubyinhell/brython,Lh4cKg/brython,molebot/brython,Mozhuowen/brython,brython-dev... | src/Lib/site-packages/highlight.py | src/Lib/site-packages/highlight.py | import keyword
import _jsre as re
from browser import html
letters = 'abcdefghijklmnopqrstuvwxyz'
letters += letters.upper()+'_'
digits = '0123456789'
builtin_funcs = ("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|" +
"eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|" +... | bsd-3-clause | Python | |
d5bf180394233a165f4b5ad8c6561509a4e465ca | add goliad health check | yieldbot/sensu-yieldbot-plugins,yieldbot/sensu-yieldbot-plugins,yieldbot/sensu-yieldbot-plugins | plugins/bongo/check-goliad-health.py | plugins/bongo/check-goliad-health.py | #!/usr/bin/env python
from optparse import OptionParser
import socket
import sys
import httplib
import json
PASS = 0
WARNING = 1
FAIL = 2
def get_bongo_host(server, app):
try:
con = httplib.HTTPConnection(server, timeout=45)
con.request("GET","/v2/apps/" + app)
data = con.getresponse()
... | mit | Python | |
ce68b7f025d1ee25a58a093adf462b4b77fb0ad4 | remove duplicate calls to cfg.get() | bgxavier/nova,klmitch/nova,whitepages/nova,joker946/nova,whitepages/nova,rajalokan/nova,zaina/nova,eonpatapon/nova,scripnichenko/nova,vmturbo/nova,double12gzh/nova,raildo/nova,edulramirez/nova,klmitch/nova,rahulunair/nova,adelina-t/nova,NeCTAR-RC/nova,Juniper/nova,MountainWei/nova,hanlind/nova,mikalstill/nova,iuliat/no... | nova/version.py | nova/version.py | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | # Copyright 2011 OpenStack Foundation
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable l... | apache-2.0 | Python |
02de60c0157aaa52d8f31fe623902a32c734d248 | add generic A&A make script | adamginsburg/APEX_CMZ_H2CO,keflavich/APEX_CMZ_H2CO,adamginsburg/APEX_CMZ_H2CO,keflavich/APEX_CMZ_H2CO | tex/make.py | tex/make.py | #!/bin/env python
import subprocess
import shutil
import glob
import argparse
import os
name = 'apex_cmz_h2co'
parser = argparse.ArgumentParser(description='Make latex files.')
parser.add_argument('--referee', default=False,
action='store_true', help='referee style?')
parser.add_argument('--texpat... | bsd-3-clause | Python | |
c1fb3eb548b15ab8049841696b7ae74604c8ed89 | Test for pytest.ini as session-scoped fixture | opentechinstitute/commotion-router-test-suite | tests/conftest.py | tests/conftest.py | """
Config instructions and test fixtures
"""
import pytest
import os
import sys
# # these are just some fun dividiers to make the output pretty
# # completely unnecessary, I was just playing with autouse fixtures
# @pytest.fixture(scope="function", autouse=True)
# def divider_function(request):
# print('\n ... | agpl-3.0 | Python | |
5da51f9ac93487d144f53de30fed69484b9b64dd | add setup script | janbrohl/XMLCompare | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
import xmlcompare
setup(name="XMLCompare",
version=xmlcompare.__version__,
description="XMLCompare checks XML documents/elements for semantic equality",
author="Jan Brohl",
author_email="janbrohl@t-online.de",
url="https://github.com... | bsd-3-clause | Python | |
ab22712aa4dc628e257b592c56319871b6ed8f18 | Add setup.py file. | danriti/python-traceview | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
import traceview
packages = []
requires = []
setup(
name="python-traceview",
version=traceview.__version__,
description="TraceView API Client",
#long_description=long_description,
# The project URL.
url='https://github.com/danriti/python-t... | mit | Python | |
43bdadcad33751b2ddbdac332106127a938f3492 | Add setuptools-based setup.py file | lvh/txampext | setup.py | setup.py | #!/usr/bin/env python
from setuptools import find_packages, setup
setup(name='txampext',
version='20121226',
description="Extensions to Twisted's AMP implementation",
url='https://github.com/lvh/txampext',
author='Laurens Van Houtven',
author_email='_@lvh.cc',
packages=find_packag... | isc | Python | |
4a42116d0858089dbf2ac2fd8efdcb5ef9226b90 | bump version to 1.0.2 | Filechaser/sickbeard_mp4_automator,phtagn/sickbeard_mp4_automator,Collisionc/sickbeard_mp4_automator,Collisionc/sickbeard_mp4_automator,Filechaser/sickbeard_mp4_automator,phtagn/sickbeard_mp4_automator | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup, Command
from unittest import TextTestRunner, TestLoader
import os
import os.path
class TestCommand(Command):
user_options = []
def initialize_options(self):
self._testdir = os.path.join(os.getcwd(), 'test')
def finalize_options(self):
... | #!/usr/bin/env python
from distutils.core import setup, Command
from unittest import TextTestRunner, TestLoader
import os
import os.path
class TestCommand(Command):
user_options = []
def initialize_options(self):
self._testdir = os.path.join(os.getcwd(), 'test')
def finalize_options(self):
... | mit | Python |
33427521617e45e3227ff7320362c14a6588ea5b | Remove extensions. | materialsproject/custodian,specter119/custodian,davidwaroquiers/custodian,materialsproject/custodian,xhqu1981/custodian,alberthxf/custodian,specter119/custodian,materialsproject/custodian,specter119/custodian | setup.py | setup.py | import os
from distribute_setup import use_setuptools
use_setuptools(version='0.6.10')
from setuptools import setup, find_packages
with open("README.rst") as f:
long_desc = f.read()
setup(
name="custodian",
packages=find_packages(),
version="0.1.0a",
install_requires=[],
extras_require={"vasp... | import os
from distribute_setup import use_setuptools
use_setuptools(version='0.6.10')
from setuptools import setup, find_packages, Extension
with open("README.rst") as f:
long_desc = f.read()
setup(
name="custodian",
packages=find_packages(),
version="0.1.0a",
install_requires=[],
extras... | mit | Python |
048f643921fd291b262cac80fbc68531805419cf | Create setup.py | Flexin1981/AdxSuds | setup.py | setup.py | from distutils.core import setup
setup(
name='AdxSuds',
version='1.0',
packages=[''],
url='https://github.com/Flexin1981/AdxSuds',
license='',
author='John Dowling',
author_email='johndowling01@live.co.uk',
description='Brocade Adx Suds Module for the XML Api'
)
| mit | Python | |
7ec768f50d5d0e8537fac23a2b819965374ce582 | Use version of zope.interface we have available. | wallnerryan/flocker-profiles,jml/flocker,runcom/flocker,beni55/flocker,mbrukman/flocker,wallnerryan/flocker-profiles,1d4Nf6/flocker,moypray/flocker,mbrukman/flocker,hackday-profilers/flocker,beni55/flocker,adamtheturtle/flocker,jml/flocker,lukemarsden/flocker,moypray/flocker,mbrukman/flocker,achanda/flocker,Azulinho/fl... | setup.py | setup.py | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
#
# Generate a Flocker package that can be deployed onto cluster nodes.
#
import os.path
from setuptools import setup
path = os.path.join(os.path.dirname(__file__), b"flocker/version")
with open(path) as fObj:
version = fObj.read().strip()
del path
se... | # Copyright Hybrid Logic Ltd. See LICENSE file for details.
#
# Generate a Flocker package that can be deployed onto cluster nodes.
#
import os.path
from setuptools import setup
path = os.path.join(os.path.dirname(__file__), b"flocker/version")
with open(path) as fObj:
version = fObj.read().strip()
del path
se... | apache-2.0 | Python |
e5175894d49afe8205f0f969ffc4ea9eecec0f72 | add setup.py file | jephdo/pynvd3 | setup.py | setup.py | from distutils.core import setup
setup(
name='pynvd3',
version='0.01',
description='A Python wrapper for NVD3.js',
url='http://github.com/jephdo/pynvd3/',
author='Jeph Do',
author_email='jephdo@gmail.com',
packages=[
'pynvd3',
],
classifiers=[
'Development Status ::... | mit | Python | |
d38554332872c1b8f4a3a44bf4c18dda68752d04 | add setup.py file | pavlov99/json-rpc | setup.py | setup.py | import os
from setuptools import setup, find_packages
from pmll import version
# Import multiprocessing to prevent test run problem. In case of nosetests
# (not nose2) there is probles, for details see:
# https://groups.google.com/forum/#!msg/nose-users/fnJ-kAUbYHQ/_UsLN786ygcJ
# http://bugs.python.org/issue15881#msg... | mit | Python | |
340baa5f077b0ae3cb1ab6de736d67be89319c35 | Create setup.py | theskumar/python-usernames | setup.py | setup.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup
setup(
name="python-usernames",
description="Python library to validate usernames suitable for use in public facing applications.",
version="0.0.1",
author="Saurabh Kumar",
author_email="me+github@saurabh-... | mit | Python | |
c3b44b012ddc18f7a6711609f04060f65bd36846 | include history with readme for setup.py | jimyx17/gmusic,peetahzee/Unofficial-Google-Music-API,nvbn/Unofficial-Google-Music-API,tanhaiwang/gmusicapi,TheOpenDevProject/gmusicapi,simon-weber/Unofficial-Google-Music-API,dvirtz/gmusicapi,thebigmunch/gmusicapi,dvirtz/gmusicapi,simon-weber/gmusicapi | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
from setuptools import find_packages
import re
#This hack is from http://stackoverflow.com/a/7071358/1231454;
# the version is kept in a seperate file and gets parsed - this
# way, setup.py doesn't have to import the package.
VERSIONFILE = 'gmusicapi/version.py'... | #!/usr/bin/env python
from distutils.core import setup
from setuptools import find_packages
import re
VERSIONFILE = 'gmusicapi/version.py'
version_line = open(VERSIONFILE).read()
version_re = r"^__version__ = ['\"]([^'\"]*)['\"]"
match = re.search(version_re, version_line, re.M)
if match:
version = match.group(... | bsd-3-clause | Python |
91dca4294beccd4b7ff4ff9e1f029c7d63273928 | Create setup.py | heinst/track-class-availability,heinst/track-class-availability | setup.py | setup.py | from setuptools import setup
setup(name='track-class-availability',
version='1.0',
install_requires=['BeautifulSoup >= 4.3.2', 'schedule >= 0.3.1']
)
| mit | Python | |
eb12d44dffadf0c62fe231926a5004e5ef58d1a4 | Add the setup script | tschijnmo/ccpoviz | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = "ccpoviz",
version = "0.0.1",
packages = find_packages(),
scripts = [],
install_requires = [
'docutils>=0.3',
'pystache>=0.5',
],
package_data = {
'ccpoviz': ['data/*.json', 'data/*.dat'],
},
# ... | mit | Python | |
d3e1957915ed9d385742232475ac8992b17c6e7e | bump up version to 1.0.0 | nvie/smart_open,EverythingMe/smart_open,laugustyniak/smart_open,val314159/smart_open,piskvorky/smart_open,mpenkov/smart_open,gojomo/smart_open,RaRe-Technologies/smart_open,RaRe-Technologies/smart_open,tarosky/smart_open,asieira/smart_open,ziky90/smart_open,mpenkov/smart_open | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
import os
import sys
# minimum required version is 2.6; py3k not supported yet
if not ((2, 6) <= sys.version_info < (3, 0)... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright (C) 2015 Radim Rehurek <me@radimrehurek.com>
#
# This code is distributed under the terms and conditions
# from the MIT License (MIT).
import os
import sys
# minimum required version is 2.6; py3k not supported yet
if not ((2, 6) <= sys.version_info < (3, 0)... | mit | Python |
7f63c5b2a624870667d62ff21cbfb28c7cf2a189 | add setup script | yinyin/FileWatcher | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from distutils.core import setup
setup(name='FileWatcher',
version='1.00',
description='File watching framework',
packages=['filewatcher', ],
package_dir={'': 'lib'},
requires=['PyYAML (>=3.09)', ],
install_requires=['PyYAML >= 3.09', ],
classifiers=['Dev... | mit | Python | |
58b92617e03742658a6362f66664109de8993038 | Create setup.py | fnielsen/cvrminer,fnielsen/cvrminer,fnielsen/cvrminer | setup.py | setup.py | from setuptools import setup
setup(
name='cvrminer',
author='Finn Aarup Nielsen',
author_email='faan@dtu.dk',
license='Apache License',
url='https://github.com/fnielsen/cvrminer',
packages=['cvrminer'],
test_requires=['flake8'],
)
| apache-2.0 | Python | |
9abae470ce9cf9d255921d7c4306ee7daadcd6f2 | Add setup.py | legnaleurc/telezombie,legnaleurc/wcpan.telegram | setup.py | setup.py | from setuptools import setup, find_packages
from codecs import open
from os import path
here = path.abspath(path.dirname(__file__))
# Get the long description from the relevant file
with open(path.join(here, 'README.md'), encoding='utf-8') as f:
long_description = f.read()
setup(
name='telezombie',
vers... | mit | Python | |
fcf000ee1b6834b5eabc106f6b617157443ed94d | Create sezar.py | GenkaNuank/Crypter | sezar.py | sezar.py | password = [7,29,12,21,5,19,2,11,28,16,10,1,15,24,8,25,4,13,20,18,14,3,17,22,9,23,26,27,6]
def encrypt(a):
cipher = []
i = 0
n = 0
while i < len(a):
while n < len(password):
if int(a[i]) == (n+1):
cipher = cipher + [password[n]]
i += 1
... | mpl-2.0 | Python | |
f1334c006f07b2b1494d4b92a3ecb4186d8e3954 | add stack.py to branch | jesseklein406/data-structures | stack.py | stack.py | from linked_list import LinkedList
#Stack inherits from LinkedList class
class Stack(object):
def __init__(self, iterable=None):
if iterable != None:
self._linkedList = LinkedList(iterable)
else:
self._linkedList = LinkedList()
def push(self, value):
self._link... | mit | Python | |
785a1962c910a722f218bc814d1868f2b4bc7033 | Add interfaces: Parmeterizer, Converter, Analyzer and Synthesizer (and some thier subclasses) | k2kobayashi/sprocket | vctk/interface.py | vctk/interface.py | # coding: utf-8
import numpy as np
"""
Interfaces
"""
class Analyzer(object):
"""
Speech analyzer interface
All of analyzer must implement this interface.
"""
def __init__(self):
pass
def analyze(self, x):
"""
Paramters
---------
x: array, shape (`t... | mit | Python | |
ab7d1b230a5ef1c0763da1d150488add0b75ce31 | Add test file | msoedov/flask-graphql-example,msoedov/flask-graphql-example,msoedov/flask-graphql-example,msoedov/flask-graphql-example | tests.py | tests.py | import unittest
class MyappTestCase(unittest.TestCase):
def setUp(self):
myapp.app.config['DEBUG'] = tempfile.mkstemp()
self.app = myapp.app.test_client()
def tearDown(self):
pass
def test_index(self):
rv = self.app.get('/')
assert '<h2>Posts</h2>' ... | mit | Python | |
4029f604a4c809a201d0334946d680fb53b467dd | add initial pygame prototype | robotenique/RandomAccessMemory,robotenique/RandomAccessMemory,robotenique/RandomAccessMemory | Python_Data/multimedia/pygameTest.py | Python_Data/multimedia/pygameTest.py | import random as rnd
import pygame
import sys
def generateObj():
objPos = (rnd.randint(50, 950), rnd.randint(50, 950))
objColor = (0, 0, 0)
return list([objColor, objPos])
pygame.init()
bgcolor = (255, 255, 204)
surf = pygame.display.set_mode((1000,1000))
circleColor = (255, 51, 51)
x, y = 500, 500
circ... | unlicense | Python | |
b6ee1301075bcd391ce86d54075bf853f4ee6b2d | Add version.py | LabPy/lantz_drivers,MatthieuDartiailh/lantz_drivers,alexforencich/lantz_drivers,elopezga/lantz_drivers | lantz_drivers/version.py | lantz_drivers/version.py | __version__ = '0.0.1'
| bsd-3-clause | Python | |
9387fb8ee3865fdc00b0b96fd8db77ef1b2f13a8 | Create watchingthestuffoverhere.py | ev0x/stuff,ev0x/stuff | python/watchingthestuffoverhere.py | python/watchingthestuffoverhere.py | #!/usr/bin/env python
# coding=utf-8
import string
import re
import csv
from selenium import webdriver
from datetime import datetime
#avaaz url to watch
tehURL = "somethingsomething"
ignores = re.compile('(seconds|minute|minutes|just)\s(ago|now)')
lst = []
while True:
try:
driver = webdriver.PhantomJS()
... | mit | Python | |
fbbb65524a3b8f5486594d89f6cf885663ac7f3d | Support ubuntu variable for DESKTOP_SESSION | hanya/BookmarksMenu,hanya/BookmarksMenu | pythonpath/bookmarks/env/ubuntu.py | pythonpath/bookmarks/env/ubuntu.py |
OPEN = "xdg-open"
FILE_MANAGER = "nautilus"
| apache-2.0 | Python | |
ab52a21b1d4c1260f2f225a4c49f46251bbecd27 | Add script for generating jamendo rewrite rules | foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm | scripts/jamendo-rewrite.py | scripts/jamendo-rewrite.py | #!/usr/bin/env python
# Jamendo database dumps can be fetched from: http://img.jamendo.com/data/dbdump_artistalbumtrack.xml.gz
import xml.etree.cElementTree as ElementTree
import sys, gzip, time, os, os.path, urllib, threading
class JamendoRewrite:
def __init__(self, path):
self.music_path = path
print "Rewrit... | agpl-3.0 | Python | |
a004747df945f3361b53106339dab43e652fce74 | Fix dependencies for weborigin_unittests | hgl888/blink-crosswalk-efl,nwjs/blink,hgl888/blink-crosswalk-efl,XiaosongWei/blink-crosswalk,nwjs/blink,nwjs/blink,XiaosongWei/blink-crosswalk,jtg-gg/blink,smishenk/blink-crosswalk,smishenk/blink-crosswalk,modulexcite/blink,crosswalk-project/blink-crosswalk-efl,Pluto-tv/blink-crosswalk,kurli/blink-crosswalk,jtg-gg/blin... | Source/weborigin/weborigin_tests.gyp | Source/weborigin/weborigin_tests.gyp | #
# Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | #
# Copyright (C) 2013 Google Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and th... | bsd-3-clause | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.