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 |
|---|---|---|---|---|---|---|---|---|
fd8d72bc5023a96b426fd93ae0abfd5e8474ebee | Improve a snippet. | jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets | python/tkinter/python3/listbox.py | python/tkinter/python3/listbox.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
# Copyright (c) 2016 Jérémie DECOCK (http://www.jdhp.org)
# 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 witho... | mit | Python |
dabd5bcc3eb20448a06c0707bf95fca8dc3e1b06 | Fix failing test | scopely-devops/skew,garnaat/skew,ryandub/skew | tests/unit/test_resource.py | tests/unit/test_resource.py | # Copyright (c) 2014 Scopely, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distrib... | # Copyright (c) 2014 Scopely, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"). You
# may not use this file except in compliance with the License. A copy of
# the License is located at
#
# http://aws.amazon.com/apache2.0/
#
# or in the "license" file accompanying this file. This file is
# distrib... | apache-2.0 | Python |
2b0fe117a816c4301a3704a329f3c0ba4138a621 | Fix tests for map view 404 | der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles,der-michik/c3bottles | tests/webtest/test_views.py | tests/webtest/test_views.py | import pytest
from flask import url_for
from c3bottles import app
from .fixtures import testapp, fresh_state
basic_views = [
"main.index", "main.faq", "view.list_", "statistics.numbers"
]
@pytest.mark.parametrize("view", basic_views)
def test_basic_views(view, fresh_state):
with app.test_request_context()... | import pytest
from flask import url_for
from c3bottles import app
from .fixtures import testapp, fresh_state
basic_views = [
"main.index", "main.faq", "view.list_", "view.map_", "statistics.numbers"
]
@pytest.mark.parametrize("view", basic_views)
def test_basic_views(view, fresh_state):
with app.test_requ... | mit | Python |
9346e9750dee78484766d912919cfacc2e6b4b7e | Replace triple dots with ellipsis in search commands | mixxorz/wagtail,FlipperPA/wagtail,mixxorz/wagtail,zerolab/wagtail,mixxorz/wagtail,thenewguy/wagtail,wagtail/wagtail,gasman/wagtail,rsalmaso/wagtail,takeflight/wagtail,nealtodd/wagtail,gasman/wagtail,FlipperPA/wagtail,gasman/wagtail,rsalmaso/wagtail,takeflight/wagtail,kaedroho/wagtail,kaedroho/wagtail,timorieber/wagtail... | wagtail/search/management/commands/search_garbage_collect.py | wagtail/search/management/commands/search_garbage_collect.py | from django.core.management.base import BaseCommand
from wagtail.search import models
class Command(BaseCommand):
def handle(self, **options):
# Clean daily hits
self.stdout.write("Cleaning daily hits records…")
models.QueryDailyHits.garbage_collect()
self.stdout.write("Done")
... | from django.core.management.base import BaseCommand
from wagtail.search import models
class Command(BaseCommand):
def handle(self, **options):
# Clean daily hits
self.stdout.write("Cleaning daily hits records... ")
models.QueryDailyHits.garbage_collect()
self.stdout.write("Done")
... | bsd-3-clause | Python |
94cc0d480b28d5bcf8bba33ff3fe6e3f1e65aa10 | remove crossing from tests | gdsfactory/gdsfactory,gdsfactory/gdsfactory | gdsfactory/tests/test_components.py | gdsfactory/tests/test_components.py | import pytest
from pytest_regressions.data_regression import DataRegressionFixture
from gdsfactory.components import cells
from gdsfactory.difftest import difftest
skip_test = {
"version_stamp",
"extend_ports_list",
"extend_port",
"component_sequence",
"mzi_arm",
"pack_doe",
"pack_doe_grid... | import pytest
from pytest_regressions.data_regression import DataRegressionFixture
from gdsfactory.components import cells
from gdsfactory.difftest import difftest
skip_test = {
"version_stamp",
"extend_ports_list",
"extend_port",
"component_sequence",
"mzi_arm",
"pack_doe",
"pack_doe_grid... | mit | Python |
ed7400f1eaf1ea8b58e82db574f87e66681656f0 | check for refprop | pauliacomi/pyGAPS | tests/utilities/test_coolprop_interaction.py | tests/utilities/test_coolprop_interaction.py | """Test CoolProp interaction."""
import CoolProp
import pygaps
class TestCoolProp():
"""Test CoolProp interaction."""
def test_backend_change(self):
"""Test if backend can change."""
previous_backend = pygaps.COOLPROP_BACKEND
pygaps.backend_use_refprop()
assert previous_back... | """Test CoolProp interaction."""
import CoolProp
import pygaps
class TestCoolProp():
"""Test CoolProp interaction."""
def test_backend_change(self):
"""Test if backend can change."""
previous_backend = pygaps.COOLPROP_BACKEND
pygaps.backend_use_refprop()
assert previous_back... | mit | Python |
5f604a5e353f0816910ea11da29021b12cf27362 | Update __init__.py | kwilcox/thredds_crawler | thredds_crawler/__init__.py | thredds_crawler/__init__.py | __version__ = '0.6'
| __version__ = '0.6-dev' | mit | Python |
96d213dee52c927ad728724645f236932ab1b783 | fix the text size test | mixpanel/mixpanel-android,LLin233/mixpanel-android,shaoshao613/mixpanel-android,danmcknight/mixpanel-android,LLin233/mixpanel-android,zumper/mixpanel-android,danmcknight/mixpanel-android,dreamseekerkun/mixpanel-android,omadahealth/mixpanel-android,LLin233/mixpanel-android,shaoshao613/mixpanel-android,zumper/mixpanel-an... | acceptance/test.py | acceptance/test.py | import unittest
from selenium import webdriver
class AndroidTest(unittest.TestCase):
def _launch_app(self):
desired_capabilities = {'aut': 'com.mixpanel.example.hello:1.0'}
self.driver = webdriver.Remote(
desired_capabilities=desired_capabilities
)
self.driver.implicitly... | import unittest
from selenium import webdriver
class AndroidTest(unittest.TestCase):
def _launch_app(self):
desired_capabilities = {'aut': 'com.mixpanel.example.hello:1.0'}
self.driver = webdriver.Remote(
desired_capabilities=desired_capabilities
)
self.driver.implicitly... | apache-2.0 | Python |
3e85056686630b79011d06c4f99ebf73ff1c6077 | Fix parent drug relationship | renalreg/radar,renalreg/radar,renalreg/radar,renalreg/radar | radar/radar/models/medications.py | radar/radar/models/medications.py | from collections import OrderedDict
from sqlalchemy import Column, Date, String, ForeignKey, Numeric, Index
from sqlalchemy import Integer
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.common import MetaModelMixin, uuid_pk_column, patient_id_column, patient_relationship
MEDIC... | from collections import OrderedDict
from sqlalchemy import Column, Date, String, ForeignKey, Numeric, Index
from sqlalchemy import Integer
from sqlalchemy.orm import relationship
from radar.database import db
from radar.models.common import MetaModelMixin, uuid_pk_column, patient_id_column, patient_relationship
MEDIC... | agpl-3.0 | Python |
f415b139dd7642c67d825b7a1d24ecd7890a89e9 | Fix to work with girc | DanielOaks/goshu,DanielOaks/goshu | modules/commands.py | modules/commands.py | #!/usr/bin/env python3
# Goshu IRC Bot
# written by Daniel Oaks <daniel@danieloaks.net>
# licensed under the ISC license
from gbot.modules import Module
from gbot.libs.helper import split_num
class commands(Module):
"""Provides general IRC commands such as msg, me, join, part."""
core = True
# irc
d... | #!/usr/bin/env python3
# Goshu IRC Bot
# written by Daniel Oaks <daniel@danieloaks.net>
# licensed under the ISC license
from gbot.modules import Module
from gbot.libs.helper import split_num
class commands(Module):
"""Provides general IRC commands such as msg, me, join, part."""
core = True
# irc
d... | isc | Python |
9468ad184ec10d90ef18ab95291ee75e8d11129a | Change kt-toolbox global param key from kt-toolbox to kttoolbox, refs: #4234 | SmartJog/python-toolbox2 | toolbox2/action/extract/kttoolbox_extract.py | toolbox2/action/extract/kttoolbox_extract.py | # -*- coding: utf-8 -*-
import os
from toolbox2.action import Action, ActionException
from toolbox2.worker.kttoolbox import KTToolboxWorker
class KTToolboxActionException(ActionException):
pass
class KTToolboxAction(Action):
"""
Extract subtitles from a gxf file using kt-toolbox from Keres Technologie... | # -*- coding: utf-8 -*-
import os
from toolbox2.action import Action, ActionException
from toolbox2.worker.kttoolbox import KTToolboxWorker
class KTToolboxActionException(ActionException):
pass
class KTToolboxAction(Action):
"""
Extract subtitles from a gxf file using kt-toolbox from Keres Technologie... | lgpl-2.1 | Python |
5f7dbd03aaee87c1df629829b0b1e6aa26761bc0 | Increment version number | davesque/django-rest-framework-simplejwt,davesque/django-rest-framework-simplejwt | rest_framework_simplejwt/__init__.py | rest_framework_simplejwt/__init__.py | __version__ = '2.0.4'
| __version__ = '2.0.3'
| mit | Python |
ea09d968b74e5ea42e9e7fa77accf8fedfd35d1b | Fix travis test | desihub/desisurvey,desihub/desisurvey | py/desisurvey/test/test_scripts.py | py/desisurvey/test/test_scripts.py | import tempfile, unittest, os, shutil, uuid, datetime
import numpy as np
from astropy.table import Table
import desimodel.io
import desisurvey.config
from desisurvey.scripts import surveyinit, surveyplan
class TestScripts(unittest.TestCase):
@classmethod
def setUpClass(cls):
# Create a temporary dir... | import tempfile, unittest, os, shutil, uuid, datetime
import numpy as np
from astropy.table import Table
import desimodel.io
import desisurvey.config
from desisurvey.scripts import surveyinit, surveyplan
class TestScripts(unittest.TestCase):
@classmethod
def setUpClass(cls):
# Create a temporary dir... | bsd-3-clause | Python |
a14226245786e2a81e3a0725ea2bd7a6a1946a15 | fix regex test | desihub/desiutil,desihub/desiutil | py/desiutil/test/test_top_level.py | py/desiutil/test/test_top_level.py | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""test top-level desiutil functions
"""
#
from __future__ import absolute_import, division, print_function, unicode_literals
#
import unittest
import re
import sys
from .. import __version__ as theVersion
#
class TestTopLevel(unitt... | # Licensed under a 3-clause BSD style license - see LICENSE.rst
# -*- coding: utf-8 -*-
"""test top-level desiutil functions
"""
#
from __future__ import absolute_import, division, print_function, unicode_literals
#
import unittest
import re
import sys
from .. import __version__ as theVersion
#
class TestTopLevel(unitt... | bsd-3-clause | Python |
34b2e37ccda443046e0b5b6a8273b36fab37d97c | Fix typo | barseghyanartur/django-haystack,celerityweb/django-haystack,sgaist/django-haystack,celerityweb/django-haystack,sgaist/django-haystack,celerityweb/django-haystack,sgaist/django-haystack,barseghyanartur/django-haystack,barseghyanartur/django-haystack | test_haystack/elasticsearch2_tests/__init__.py | test_haystack/elasticsearch2_tests/__init__.py | # -*- coding: utf-8 -*-
import warnings
from django.conf import settings
from ..utils import unittest
from haystack.utils import log as logging
warnings.simplefilter('ignore', Warning)
def setup():
log = logging.getLogger('haystack')
try:
import elasticsearch
if not ((2, 0, 0) <= elasticsea... | # -*- coding: utf-8 -*-
import warnings
from django.conf import settings
from ..utils import unittest
from haystack.utils import log as logging
warnings.simplefilter('ignore', Warning)
def setup():
log = logging.getLogger('haystack')
try:
import elasticsearch
if not ((2, 0, 0) <= elasticsea... | bsd-3-clause | Python |
9f9303ec855d1e18fdee43c91b6f7c5ef34d2d77 | check http | brandonium21/snowflake,brandonium21/snowflake,brandonium21/snowflake,brandonium21/snowflake,brandonium21/snowflake | app/users/views.py | app/users/views.py | # Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <ling.thio@gmail.com>
from flask import redirect, render_template, render_template_string
from flask import request, url_for
from app.app_and_db import app, db
from app.users.forms import UserProfileForm
from flask_user import current_user, ... | # Copyright 2014 SolidBuilds.com. All rights reserved
#
# Authors: Ling Thio <ling.thio@gmail.com>
from flask import redirect, render_template, render_template_string
from flask import request, url_for
from app.app_and_db import app, db
from app.users.forms import UserProfileForm
from flask_user import current_user, ... | bsd-2-clause | Python |
ad5bb994b1cff56c4f021f88bfa62f38055f1416 | add py3 compatibility | dalf/searx,asciimoo/searx,dalf/searx,dalf/searx,asciimoo/searx,dalf/searx,asciimoo/searx,asciimoo/searx | searx/engines/scanr_structures.py | searx/engines/scanr_structures.py | """
ScanR Structures (Science)
@website https://scanr.enseignementsup-recherche.gouv.fr
@provide-api yes (https://scanr.enseignementsup-recherche.gouv.fr/api/swagger-ui.html)
@using-api yes
@results JSON
@stable yes
@parse url, title, content, img_src
"""
from json import loads, dumps
fro... | """
ScanR Structures (Science)
@website https://scanr.enseignementsup-recherche.gouv.fr
@provide-api yes (https://scanr.enseignementsup-recherche.gouv.fr/api/swagger-ui.html)
@using-api yes
@results JSON
@stable yes
@parse url, title, content, img_src
"""
from json import loads, dumps
fro... | agpl-3.0 | Python |
e63a2081acc4fdfa05e092f6b8ab61fa1f4244b4 | fix edge case | ychaim/explorer,ychaim/explorer,blockcypher/explorer,ychaim/explorer,blockcypher/explorer,blockcypher/explorer | addresses/forms.py | addresses/forms.py | from django import forms
from django.utils.translation import ugettext_lazy as _
from blockcypher.constants import COIN_CHOICES, COIN_SYMBOL_MAPPINGS
from blockcypher.utils import is_valid_address_for_coinsymbol
class KnownUserAddressSubscriptionForm(forms.Form):
# TODO: add advanced granulatiry for confirms (b... | from django import forms
from django.utils.translation import ugettext_lazy as _
from blockcypher.constants import COIN_CHOICES, COIN_SYMBOL_MAPPINGS
from blockcypher.utils import is_valid_address_for_coinsymbol
class KnownUserAddressSubscriptionForm(forms.Form):
# TODO: add advanced granulatiry for confirms (b... | apache-2.0 | Python |
424551a86649d0218765c7a37949d6333bfcece9 | Use simplifying operator | cjdrake/pyeda,sschnug/pyeda,karissa/pyeda,karissa/pyeda,GtTmy/pyeda,karissa/pyeda,pombredanne/pyeda,sschnug/pyeda,pombredanne/pyeda,cjdrake/pyeda,GtTmy/pyeda,sschnug/pyeda,GtTmy/pyeda,pombredanne/pyeda,cjdrake/pyeda | pyeda/boolalg/test/test_picosat.py | pyeda/boolalg/test/test_picosat.py | # Filename: test_picosat.py
from nose.tools import assert_raises
from pyeda.boolalg import picosat
from pyeda.boolalg.expr import expr, expr2dimacscnf
def test_basic():
assert picosat.COPYRIGHT == "Copyright (c) 2006 - 2014 Armin Biere JKU Linz"
assert picosat.VERSION == "959"
def test_satisfy_one_errors()... | # Filename: test_picosat.py
from nose.tools import assert_raises
from pyeda.boolalg import picosat
from pyeda.boolalg.expr import expr, expr2dimacscnf
def test_basic():
assert picosat.COPYRIGHT == "Copyright (c) 2006 - 2014 Armin Biere JKU Linz"
assert picosat.VERSION == "959"
def test_satisfy_one_errors()... | bsd-2-clause | Python |
6e724725fca65d3e63b1bfe44f9c2bcb22ae862d | Remove a leftover module from the `__all__` attribute. | christophercrouzet/bana,christophercrouzet/banana.maya | banana/maya/__init__.py | banana/maya/__init__.py | # __
# | |--.---.-.-----.---.-.-----.---.-. .--------.---.-.--.--.---.-.
# | _ | _ | | _ | | _ |__| | _ | | | _ |
# |_____|___._|__|__|___._|__|__|___._|__|__|__|__|___._|___ |___._|
# ... | # __
# | |--.---.-.-----.---.-.-----.---.-. .--------.---.-.--.--.---.-.
# | _ | _ | | _ | | _ |__| | _ | | | _ |
# |_____|___._|__|__|___._|__|__|___._|__|__|__|__|___._|___ |___._|
# ... | mit | Python |
e534d30190db05636a0ccea9573c7ccea74cd958 | update namedropper-py version to 0.1.0-pre | emory-libraries-ecds/namedropper-py | namedropper/__init__.py | namedropper/__init__.py | __version_info__ = (0, 1, 0, 'pre')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| __version_info__ = (0, 1, 0, 'dev')
# Dot-connect all but the last. Last is dash-connected if not None.
__version__ = '.'.join([str(i) for i in __version_info__[:-1]])
if __version_info__[-1] is not None:
__version__ += ('-%s' % (__version_info__[-1],))
| apache-2.0 | Python |
68ca1cf482d538f78f379883ca04984a41eeff6a | Add support for Windows(cmd/PowerShell) | alishtory/qrcode-terminal | qrcode_terminal/qrcode_terminal.py | qrcode_terminal/qrcode_terminal.py | #!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
@author: ‘wang_pc‘
@site:
@software: PyCharm
@file: qrcode_terminal.py
@time: 2017/2/10 16:38
@Update: 2018/2/6 21:58
'''
import qrcode
from optparse import OptionParser
import sys
import platform
parser = OptionParser()
parser.add_option('-d', '--data', dest='data', h... | #!/usr/bin/env python
# -*- coding:utf-8 -*-
'''
@author: ‘wang_pc‘
@site:
@software: PyCharm
@file: qrcode_terminal.py
@time: 2017/2/10 16:38
'''
import qrcode
from optparse import OptionParser
import sys
parser = OptionParser()
parser.add_option('-d', '--data', dest='data', help='data to be paser to QRCode')
parser... | mit | Python |
369ad29f07e0d587b3488c22d0ea60482a6fe38b | Update transportation data retrieval | Mause/statistical_atlas_of_au | saau/sections/transportation/data.py | saau/sections/transportation/data.py | from operator import attrgetter, itemgetter
from itertools import chain, tee
import sys
sys.path.insert(0, 'C:\\Users\\Dominic\\Dropbox\\temp\\arcrest')
from arcrest import Catalog
import numpy as np
def get_layers(service):
layers = service.layers
return {
layer.name: layer
for layer in lay... | from operator import attrgetter, itemgetter
from itertools import chain, tee
import sys
sys.path.insert(0, 'C:\\Users\\Dominic\\Dropbox\\temp\\arcrest')
from arcrest import Catalog
import numpy as np
def get_layers(service):
return dict(zip(service.layernames, service.layers))
def mend(env):
env.wkid = en... | mit | Python |
9cdb22cbb793977db71c72b3deff4c883ec45d84 | Update version | jackzhao-mj/ok-client,Cal-CS-61A-Staff/ok-client,jathak/ok-client | client/__init__.py | client/__init__.py | __version__ = 'v1.3.11'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| __version__ = 'v1.3.10'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| apache-2.0 | Python |
f0eafc5cca20068c7193a80284e4d483c1c959d7 | Update to v1.3.14 | Cal-CS-61A-Staff/ok-client,jathak/ok-client,jackzhao-mj/ok-client | client/__init__.py | client/__init__.py | __version__ = 'v1.3.14'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| __version__ = 'v1.3.13'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| apache-2.0 | Python |
6d1c03699f017c5737195072db00c7f256bc7492 | Update ok to v1.3.4 | jathak/ok-client,Cal-CS-61A-Staff/ok-client,jackzhao-mj/ok-client | client/__init__.py | client/__init__.py | __version__ = 'v1.3.4'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| __version__ = 'v1.3.3'
import os
import sys
sys.path.insert(0, '')
# Add directory in which the ok.zip is stored to sys.path.
sys.path.append(os.path.dirname(os.path.abspath(os.path.dirname(__file__))))
| apache-2.0 | Python |
306d75108e493f9a71ddf96f0bdce2ff2a087387 | update test | Unidata/netcdf4-python,Unidata/netcdf4-python,Unidata/netcdf4-python | test/tst_unlimdim.py | test/tst_unlimdim.py | import sys
import unittest
import os
import tempfile
import numpy as NP
from numpy.random.mtrand import uniform
from numpy.testing import assert_array_equal, assert_array_almost_equal
import netCDF4
# test creating variables with unlimited dimensions,
# writing to and retrieving data from such variables.
# create an... | import sys
import unittest
import os
import tempfile
import numpy as NP
from numpy.random.mtrand import uniform
from numpy.testing import assert_array_equal, assert_array_almost_equal
import netCDF4
# test creating variables with unlimited dimensions,
# writing to and retrieving data from such variables.
# create an... | mit | Python |
00300077402fa451e2d5d407a8ddebbd993200bb | Allow the receive to time out | wking/bes | test/udp_listener.py | test/udp_listener.py | import socket as _socket
import threading as _threading
class UDPListener (object):
def __init__(self, host='', port=9000, buffsize=65565, count=0):
self.host = host
self.port = port
self.bufsize = buffsize
self.count = count
self._sock = None
self._thread = None
... | import socket as _socket
import threading as _threading
class UDPListener (object):
def __init__(self, host='', port=9000, buffsize=65565, count=0):
self.host = host
self.port = port
self.bufsize = buffsize
self.count = count
self._sock = None
self._thread = None
... | bsd-2-clause | Python |
15ccff2b470daa53352b8956ed8e032606ef1db2 | add newline after generation | KingPixil/ice,KingPixil/ice | index.py | index.py | import os
import time
import png
import TwitterAPI
import src.loader
import src.seed
import src.pixel
# Configuration
rows = 1000
cols = 1000
twitterAPI = TwitterAPI.TwitterAPI(
consumer_key=os.environ["CONSUMER_KEY"],
consumer_secret=os.environ["CONSUMER_SECRET"],
access_token_key=os.environ["ACCESS_TOKEN... | import os
import time
import png
import TwitterAPI
import src.loader
import src.seed
import src.pixel
# Configuration
rows = 1000
cols = 1000
twitterAPI = TwitterAPI.TwitterAPI(
consumer_key=os.environ["CONSUMER_KEY"],
consumer_secret=os.environ["CONSUMER_SECRET"],
access_token_key=os.environ["ACCESS_TOKEN... | mit | Python |
dcc4a0682befae9e6fccbdb18a517789249259ec | Fix for 1.6 & 1.7 | nikolas/django-interval-field,mpasternak/django-interval-field,mpasternak/django-interval-field,nikolas/django-interval-field | test_project/urls.py | test_project/urls.py | from django.views.generic.base import TemplateView
from django.conf.urls import patterns, url, include
import settings
import os
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$', TemplateView.as_view(template_name="index.html")),
url(r'^test/', 'test_app.views.tes... | try:
from django.conf.urls.defaults import patterns, include, url
except ImportError:
from django.conf.urls import patterns, url, include
import settings
import os
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^$',
'django.views.generic.simple.direct_to_t... | mit | Python |
77b30ed53006a6c186d41769aaa13395663bc22f | remove debug printing | adaptive-learning/proso-apps,adaptive-learning/proso-apps,adaptive-learning/proso-apps | proso_common/management/commands/load_global_custom_config.py | proso_common/management/commands/load_global_custom_config.py | from django.conf import settings
from django.core.management.base import BaseCommand
from proso_common.models import CustomConfig
import os.path
import yaml
from django.db import transaction
from optparse import make_option
class Command(BaseCommand):
option_list = BaseCommand.option_list + (
make_option... | from django.conf import settings
from django.core.management.base import BaseCommand
from proso_common.models import CustomConfig
import os.path
import yaml
from django.db import transaction
from optparse import make_option
print(settings.BASE_DIR)
class Command(BaseCommand):
option_list = BaseCommand.option_li... | mit | Python |
15763699817841a56c8857d8b57a475c3ecad3d1 | update time2 regex | dragoon/kilogram,dragoon/kilogram,dragoon/kilogram | kilogram/lang/__init__.py | kilogram/lang/__init__.py | import re
FLOAT_REGEX = r'(?:[1-9]\d*|0)(?:[\.,]\d+)?'
PERCENT_RE = re.compile(r'\b\d{1,2}([\.,]\d{1,2})?\%(\s|$)')
NUM_RE = re.compile(FLOAT_REGEX)
TIME_RE1 = re.compile(r'\b\d{1,2}:\d{2}\b')
TIME_RE2 = re.compile(r'\b\d{1,2}(?:[:\.][0-5]\d)?(a\.m\.|p\.m\.|am|pm)(\s|$)')
# we need to separate square and volume, oth... | import re
FLOAT_REGEX = r'(?:[1-9]\d*|0)(?:[\.,]\d+)?'
PERCENT_RE = re.compile(r'\b\d{1,2}([\.,]\d{1,2})?\%(\s|$)')
NUM_RE = re.compile(FLOAT_REGEX)
TIME_RE1 = re.compile(r'\b\d{1,2}:\d{2}\b')
TIME_RE2 = re.compile(r'\b[01]\d(?:[:\.][0-5]\d)?(a\.m\.|p\.m\.|am|pm)(\s|$)')
# we need to separate square and volume, othe... | apache-2.0 | Python |
bf0055edd30ce209b35bd72f7b46372a03a5ffb9 | Add credits | TheProgrammingDuck/Europa-Challenge,TheProgrammingDuck/Europa-Challenge,TheProgrammingDuck/Europa-Challenge | Experimental/call_daily.py | Experimental/call_daily.py | '''
Author: Vishal Soomaney
@License: MIT, See License.txt at root of project.
This script is called everyday by the server. It calls the relevant scripts to get new model predictions
'''
from threading import Timer
import dark_sky as darksky
import MakePrediction as MakePrediction
import schedule
import time... | import datetime
from threading import Timer
import dark_sky as darksky
import MakePrediction as MakePrediction
import schedule
import time
"""The url for the csv containing forest locations and our Dark Sky key.
Dark Sky key has been removed so that it cannot be copied and used by another"""
file='forest_lo... | mit | Python |
506c5c3d7ca2aa8d680ed7c1029097144a59af58 | Use extension to allow 32 bits limit | schriftgestalt/Mekka-Scripts,mekkablue/Glyphs-Scripts | Features/devideFeatures.py | Features/devideFeatures.py | #!/usr/bin/python
# a quick script to divide features into sub groups of 3000 lines
# It would be good to implement this into Glyphs so we can set feature name automatically if not present
import re
# Maximum number of lines in feature
maxSub = 3000; # 3000 for Glyphs
# Global lookup count
lookUpCount = 0
featureCo... | #!/usr/bin/python
# A quick and rough script to divide features into sub groups of 3000 lines
# It would be good to implement this into Glyphs so we can set feature name automatically if not present
import re
# Maximum number of lines in feature
maxSub = 3000; # 3000 for Glyphs
# Global lookup count
lookUpCount = 0... | apache-2.0 | Python |
08049cc1079ff448dc68e2598b3a0c0994f0df1a | Raise TypeErrors when @task is given unknown args | frol/invoke,tyewang/invoke,mkusz/invoke,pfmoore/invoke,kejbaly2/invoke,pfmoore/invoke,frol/invoke,mattrobenolt/invoke,singingwolfboy/invoke,pyinvoke/invoke,mkusz/invoke,pyinvoke/invoke,alex/invoke,mattrobenolt/invoke,sophacles/invoke,kejbaly2/invoke | invoke/task.py | invoke/task.py | import inspect
from lexicon import Lexicon
class Task(object):
def __init__(self, body, aliases=(), default=False):
self.body = body
self.aliases = aliases
self.is_default = default
@property
def argspec(self):
spec = inspect.getargspec(self.body)
# Associate defa... | import inspect
from lexicon import Lexicon
class Task(object):
def __init__(self, body, aliases=(), default=False):
self.body = body
self.aliases = aliases
self.is_default = default
@property
def argspec(self):
spec = inspect.getargspec(self.body)
# Associate defa... | bsd-2-clause | Python |
66d9d704c726dbb5bde061213c30565332368955 | add product_id to debug report | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | scripts/dbutil/clean_unknown_hads.py | scripts/dbutil/clean_unknown_hads.py | """
I look at the unknown HADS table and see if any of these stations exist
in the mesosite database, if so, then I set online to true!
Run from RUN_2AM.sh
"""
from pyiem.util import get_dbconn
def main():
"""Go Main Go"""
hads = get_dbconn("hads")
mesosite = get_dbconn("mesosite")
hcursor = hads.cu... | """
I look at the unknown HADS table and see if any of these stations exist
in the mesosite database, if so, then I set online to true!
Run from RUN_2AM.sh
"""
from pyiem.util import get_dbconn
def main():
"""Go Main Go"""
hads = get_dbconn("hads")
mesosite = get_dbconn("mesosite")
hcursor = hads... | mit | Python |
176ec2381a403519f4b68af26a5c4293a082c448 | add short option for --hide-empty, use -s and --skip-empty as a synonym | dirk-thomas/vcstool,dirk-thomas/vcstool | vcstool/commands/command.py | vcstool/commands/command.py | import argparse
import os
from vcstool.crawler import find_repositories
from vcstool.executor import execute_jobs, generate_jobs, output_repositories, output_results
class Command(object):
command = None
def __init__(self, args):
self.debug = args.debug if 'debug' in args else False
self.hi... | import argparse
import os
from vcstool.crawler import find_repositories
from vcstool.executor import execute_jobs, generate_jobs, output_repositories, output_results
class Command(object):
command = None
def __init__(self, args):
self.debug = args.debug if 'debug' in args else False
self.hi... | apache-2.0 | Python |
ffacb00f41a8ec02a3660081d98cbd21bb28a48a | fix golf | Empire-of-Code-Puzzles/checkio-empire-digit-stack,Empire-of-Code-Puzzles/checkio-empire-digit-stack,Vachenzo/checkio-empire-digit-stack,Vachenzo/checkio-empire-digit-stack,Empire-of-Code-Puzzles/checkio-empire-digit-stack,Vachenzo/checkio-empire-digit-stack | verification/src/referee.py | verification/src/referee.py | from checkio_referee import RefereeCodeGolf, representations
import settings
import settings_env
from tests import TESTS
cover = """def cover(func, data):
return f(tuple(str(x) for x in data))
"""
class Referee(RefereeCodeGolf):
TESTS = TESTS
EXECUTABLE_PATH = settings.EXECUTABLE_PATH
CURRENT_ENV = ... | from checkio_referee import RefereeCodeGolf
import settings
import settings_env
from tests import TESTS
cover = """def cover(func, data):
return f(tuple(str(x) for x in data))
"""
class Referee(RefereeCodeGolf):
TESTS = TESTS
EXECUTABLE_PATH = settings.EXECUTABLE_PATH
CURRENT_ENV = settings_env.CURR... | mit | Python |
7f5ab42ec080024af1e80d0c08af14a1adc31783 | add more stuff | cmccabe/lksmith,cmccabe/lksmith | proto.py | proto.py | #!/usr/bin/python
import copy
import threading
import time
class LMutex(object):
def __init__(self, name):
self.mutex = threading.Lock()
self.selfmutex = threading.Lock()
self.name = name
self.before = dict()
self.after = dict()
def lock(self, tls):
after_copy ... | #!/usr/bin/python
import threading
import time
class LMutex(object):
def __init__(self, name):
self.mutex = threading.Lock()
self.name = name
def lock(self):
self.mutex.acquire()
def unlock(self):
self.mutex.release()
lock_a = LMutex("a")
lock_b = LMutex("b")
class LThre... | bsd-2-clause | Python |
870746dd0b0f1ff2196c7f17bd3d48b3a63c313f | Remove UserLabel admin. | Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server,Kegbot/kegbot-server | pykeg/src/pykeg/core/admin.py | pykeg/src/pykeg/core/admin.py | # -*- coding: latin-1 -*-
# Copyright 2009 Mike Wakerly <opensource@hoho.com>
#
# This file is part of the Pykeg package of the Kegbot project.
# For more information on Pykeg or Kegbot, see http://kegbot.org/
#
# Pykeg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | # -*- coding: latin-1 -*-
# Copyright 2009 Mike Wakerly <opensource@hoho.com>
#
# This file is part of the Pykeg package of the Kegbot project.
# For more information on Pykeg or Kegbot, see http://kegbot.org/
#
# Pykeg is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Publ... | mit | Python |
a5ef25b3933f6da31866d80f656263de54e17ba3 | add snow departure plot | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | scripts/season/plot_cli_jul1_snow.py | scripts/season/plot_cli_jul1_snow.py | import psycopg2
from pandas.io.sql import read_sql
import datetime
from pyiem.plot import MapPlot
IEM = psycopg2.connect(database='iem', host='iemdb', user='nobody')
def main():
df = read_sql("""
select station, st_x(geom), st_y(geom), snow_jul1, snow_jul1_normal
from cli_data c JOIN stations t on (t.i... | import psycopg2
import datetime
IEM = psycopg2.connect(database='iem', host='iemdb', user='nobody')
cursor = IEM.cursor()
cursor.execute("""
select station, st_x(geom), st_y(geom), snow_jul1
from cli_data c JOIN stations t on (t.id = c.station)
WHERE c.valid = 'YESTERDAY' and t.network = 'NWSCLI' and snow_jul1... | mit | Python |
13e274959771d3aa8b622c9a1f1959734b2172e5 | Update dictionary key in special particle tests | StanczakDominik/PlasmaPy | plasmapy/atomic/tests/test_special_particles.py | plasmapy/atomic/tests/test_special_particles.py | import pytest
from ..special_particles import (ParticleZoo, _Particles)
particle_antiparticle_pairs = [
('e-', 'e+'),
('mu-', 'mu+'),
('tau-', 'tau+'),
('p+', 'p-'),
('n', 'antineutron'),
('nu_e', 'anti_nu_e'),
('nu_mu', 'anti_nu_mu'),
('nu_tau', 'anti_nu_tau'),
]
@pytest.mark.parame... | import pytest
from ..special_particles import (ParticleZoo, _Particles)
particle_antiparticle_pairs = [
('e-', 'e+'),
('mu-', 'mu+'),
('tau-', 'tau+'),
('p+', 'p-'),
('n', 'antineutron'),
('nu_e', 'anti_nu_e'),
('nu_mu', 'anti_nu_mu'),
('nu_tau', 'anti_nu_tau'),
]
@pytest.mark.parame... | bsd-3-clause | Python |
8e3df66d4f2042467eef386e0f46e20048b59e1f | Use multiple threads in proxy server. | ccd0/4chan-x-proxy | proxy.py | proxy.py | #!/usr/bin/env python3
import http.server, http.client, socketserver, threading, sys, re
proxyConfig = b'''function FindProxyForURL(url, host) {
if (/^http:\/\/boards\.4chan\.org\//.test(url)) {
return 'PROXY localhost:8000';
}
return 'DIRECT';
}
'''
resources = {'/proxy.pac': ('application/x-javascript-conf... | #!/usr/bin/env python3
import http.server, http.client, sys, re
proxyConfig = b'''function FindProxyForURL(url, host) {
if (/^http:\/\/boards\.4chan\.org\//.test(url)) {
return 'PROXY localhost:8000';
}
return 'DIRECT';
}
'''
resources = {'/proxy.pac': ('application/x-javascript-config', proxyConfig)}
class... | mit | Python |
9c02c4b4b6e6ee4082bcbce651ef84872d4ca1a0 | extend assert helpers | liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin | tests/helpers.py | tests/helpers.py | from contextlib import contextmanager
from datetime import timedelta
import factory
from django.contrib.auth.models import AnonymousUser
from django.db.models.signals import post_save
from django.utils.encoding import smart_text
from freezegun import freeze_time
from adhocracy4.test.helpers import redirect_target
@... | from contextlib import contextmanager
from datetime import timedelta
import factory
from django.contrib.auth.models import AnonymousUser
from django.db.models.signals import post_save
from freezegun import freeze_time
@factory.django.mute_signals(post_save)
def setup_phase(phase_factory, item_factory, phase_content_... | agpl-3.0 | Python |
e6b41c10b8a0e86c685b0fb11a596a0941e1f50b | Exclude a few things that aren't tea | palfrey/teakittens | index.py | index.py | #!/usr/bin/env python
from wsgiref.handlers import CGIHandler
from wsgiref.util import request_uri
from codecs import getencoder
output_folder = "output"
try:
exception = BaseException
except NameError: # python <2.5
exception = Exception
import random
from cache import get_list
random.seed()
def get_html(tags):
... | #!/usr/bin/env python
from wsgiref.handlers import CGIHandler
from wsgiref.util import request_uri
from codecs import getencoder
output_folder = "output"
try:
exception = BaseException
except NameError: # python <2.5
exception = Exception
import random
from cache import get_list
random.seed()
def get_html(tags):
... | agpl-3.0 | Python |
b3ebcd6e59a3a81cc77f3c02a970d729a6a806a9 | Write ISO format time strings, rather than attempting to write the time objects | williamleuschner/TimeTracker,williamleuschner/TimeTracker | index.py | index.py | import datetime
import json
import csv
from flask import Flask, render_template, url_for, redirect
app = Flask(__name__)
app.config.update(dict(Tracker=None))
class TimeTracker(object):
def __init__(self, subjects, timer_file, logger_file):
self.subjects = subjects
self.timer_file = timer_file
... | import datetime
import json
import csv
from flask import Flask, render_template, url_for, redirect
app = Flask(__name__)
app.config.update(dict(Tracker=None))
class TimeTracker(object):
def __init__(self, subjects, timer_file, logger_file):
self.subjects = subjects
self.timer_file = timer_file
... | mit | Python |
4240eb410de64a2d85d4de620bee1bb58b0400eb | Fix parameter handling | diegorodriguezv/easywd | index.py | index.py | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
import cgi
import cgitb
import easywd
cgitb.enable()
print "Content-Type: text/plain;charset=utf-8"
print
args = cgi.FieldStorage()
lang = "es"
size = 20
sep = "-"
if "lang" in args:
if args["lang"].value in ["en", "es"]:
lang = args["lang"]... | #!/usr/bin/env python
# -*- coding: UTF-8 -*-
# enable debugging
import cgitb
import easywd
import cgi
cgitb.enable()
print "Content-Type: text/plain;charset=utf-8"
print
# cgi.test()
# print "Hello World!"
# defaults = {lang:"es", size:20, sep:"-"}
lang = "es"
size = 20
sep = "-"
args = cgi.FieldStorage()
if "lang... | mit | Python |
c07f813cae87bc1a0363ee9831e093fd6cfc43fe | Add build graphs tests. | DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site,DataViva/dataviva-site | tests/test_access.py | tests/test_access.py | from flask import g, url_for
from test_base import BaseTestCase
class AccessScreenTests(BaseTestCase):
def setUp(self):
g.locale = 'en'
def test_should_redirect_when_access_root(self):
assert '302 FOUND' == self.client.get('/').status
# def test_english_home_screen_is_up_and_running(sel... | from flask import g, url_for
from test_base import BaseTestCase
class AccessScreenTests(BaseTestCase):
def setUp(self):
g.locale = 'en'
def test_should_redirect_when_access_root(self):
assert '302 FOUND' == self.client.get('/').status
# def test_english_home_screen_is_up_and_running(sel... | mit | Python |
133923da18d773aaef68ffa9191f8c0a9995bb3c | Test TBS can compute till 2020 | antoinearnoud/openfisca-france,antoinearnoud/openfisca-france,sgmap/openfisca-france,sgmap/openfisca-france | tests/test_basics.py | tests/test_basics.py | # -*- coding: utf-8 -*-
from __future__ import division
import datetime
from cache import tax_benefit_system
scenarios_arguments = [
dict(
period = year,
parent1 = dict(
date_naissance = datetime.date(1972, 1, 1),
salaire_de_base = 2000,
effectif_entreprise =... | # -*- coding: utf-8 -*-
from __future__ import division
import datetime
from cache import tax_benefit_system
scenarios_arguments = [
dict(
period = year,
parent1 = dict(
date_naissance = datetime.date(1972, 1, 1),
salaire_de_base = 2000,
effectif_entreprise =... | agpl-3.0 | Python |
34f02f1802f3f0c299ce05fd221ee865eece4ed1 | add doc | aksnzhy/xLearn,aksnzhy/xLearn,PKU-Cloud-Lab/xLearn,PKU-Cloud-Lab/xLearn,PKU-Cloud-Lab/xLearn,PKU-Cloud-Lab/xLearn,aksnzhy/xLearn,aksnzhy/xLearn | python-package/xlearn/base.py | python-package/xlearn/base.py | # coding: utf-8
import sys
import os
import ctypes
from .libpath import find_lib_path
class XLearnError(Exception):
"""Error thrown by xlearn trainer"""
pass
def _load_lib():
"""Load xlearn shared library"""
lib_path = find_lib_path()
if len(lib_path) == 0:
return None
lib = ctypes.cdll.Loadlibrary(lib_pat... | # coding: utf-8
import sys
import os
import ctypes
class XLearnError(Exception):
"""Error thrown by xlearn trainer"""
pass
def _load_lib():
"""Load xlearn shared library"""
lib_path = find_lib_path()
if len(lib_path) == 0:
return None
lib = ctypes.cdll.Loadlibrary(lib_path[0])
return lib
# load the xlear... | apache-2.0 | Python |
5ee199c8f07efa79dfb9e0904473f95059342d06 | fix loader | joequant/sptrader,joequant/sptrader,joequant/sptrader,joequant/sptrader,joequant/sptrader | tests/test_loader.py | tests/test_loader.py | import cffi
import os
import sys
import time
import threading
from ctypes import *
location = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, location)
sys.path.insert(0, os.path.join(location, "..", "sptrader"))
import sptrader
import config
cv = threading.Condition()
login = config.logininfo;
sp = sp... | import cffi
import os
import sys
import time
import threading
from ctypes import *
location = os.path.dirname(os.path.realpath(__file__))
sys.path.insert(0, location)
sys.path.insert(0, os.path.join(location, "..", "sptrader"))
import sptrader
import config
cv = threading.Condition()
login = config.logininfo;
sptrade... | bsd-2-clause | Python |
bf415a59b47bc804f319c6d43a52aebfd9e50099 | Remove unused import causing flake8 error | blue-yonder/pyscaffold,blue-yonder/pyscaffold | tests/test_termui.py | tests/test_termui.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
from imp import reload
from six import StringIO
import pytest
from pyscaffold import termui
@pytest.fixture(scope='module')
def after():
# Reload termui after tests to ensure constants are calculated
# with original logic... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from __future__ import absolute_import
import sys
from imp import reload
from six import StringIO
import pytest
from pyscaffold import termui
@pytest.fixture(scope='module')
def after():
# Reload termui after tests to ensure constants are calculated
# with ori... | mit | Python |
d859fd756da0fc7826e27b987023e33a05057049 | Add testcases for allocation base continuity | schieb/angr,angr/angr,iamahuman/angr,tyb0807/angr,f-prettyland/angr,schieb/angr,iamahuman/angr,angr/angr,angr/tracer,iamahuman/angr,angr/angr,f-prettyland/angr,schieb/angr,f-prettyland/angr,tyb0807/angr,tyb0807/angr | tests/test_tracer.py | tests/test_tracer.py | import os
import nose
import tracer
import logging
l = logging.getLogger("tracer.tests.test_tracer")
bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries-private'))
pov_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "povs"))
test_data_location = str(os... | import os
import nose
import tracer
import logging
l = logging.getLogger("tracer.tests.test_tracer")
bin_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '../../binaries-private'))
pov_location = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), "povs"))
test_data_location = str(os... | bsd-2-clause | Python |
89bba1df416869ce907a1a6a8129567998719c4f | Fix Channels routing for new Resolwe | genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio,genialis/resolwe-bio | tests/routing.py | tests/routing.py | """Routing configuration for Django Channels."""
# from channels.routing import route
from channels.routing import route_class
from resolwe.flow.managers.consumer import ManagerConsumer
channel_routing = [ # pylint: disable=invalid-name
route_class(ManagerConsumer),
]
| """Routing configuration for Django Channels."""
# from channels.routing import route
from channels.routing import route_class
from resolwe.flow.managers import manager
manager.update_routing()
channel_routing = [ # pylint: disable=invalid-name
route_class(type(manager)),
]
| apache-2.0 | Python |
ed4fc1c569e59c4b80819bd9a374e33e93ad72f9 | Update python_access_token.py | JunctionTV/Getting-Access-Tokens,JunctionTV/Getting-Access-Tokens,JunctionTV/Getting-Access-Tokens | python/python_access_token.py | python/python_access_token.py | """
To get the authentication token for Junction TV API calls
This code had two function:
- ``getAuthToken(client_id, client_secret)``: to get the authentication call from `http://cloud.junctiontv.net/ums/2.0/oauth/`
- ``getFeeds(token)``: to get the Feeds according to vairous Junction TV API
For detailed descript... | """
To get the authentication token for Junction TV API calls
This code had two function:
- ``getAuthToken(client_id, client_secret)``: to get the authentication call from `http://cloud.junctiontv.net/ums/2.0/oauth/`
- ``getFeeds(token)``: to get the Feeds according to vairous Junction TV API
For detailed descript... | mit | Python |
426232e28846a3c9a9a7c7d1aa6d2e736895356f | replace nova endpoint | openstack/watcher,openstack/watcher,stackforge/watcher,stackforge/watcher | watcher/conf/nova_client.py | watcher/conf/nova_client.py | # -*- encoding: utf-8 -*-
# Copyright (c) 2016 Intel Corp
#
# Authors: Prudhvi Rao Shedimbi <prudhvi.rao.shedimbi@intel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | # -*- encoding: utf-8 -*-
# Copyright (c) 2016 Intel Corp
#
# Authors: Prudhvi Rao Shedimbi <prudhvi.rao.shedimbi@intel.com>
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apa... | apache-2.0 | Python |
eb040b375c2aaba5086d40c995a8b83923ee8201 | fix build | pyexcel/pyexcel-text,pyexcel/pyexcel-text | tests/test_io.py | tests/test_io.py | import os
import sys
from textwrap import dedent
import pyexcel as pe
from pyexcel.ext import text
if sys.version_info[0] < 3:
from StringIO import StringIO
else:
from io import StringIO
class TestIO:
def setUp(self):
self.testfile = "testfile.txt"
def test_normal_usage(self):
content =... | import os
import sys
from textwrap import dedent
import pyexcel as pe
from pyexcel.ext import text
if sys.version_info[0] < 3:
from StringIO import StringIO
else:
from io import StringIO
class TestIO:
def setUp(self):
self.testfile = "testfile.txt"
def test_normal_usage(self):
content =... | bsd-3-clause | Python |
b93c71659752437b44787bbbae8a0d7b682a5793 | update test_uk | savoirfairelinux/num2words | tests/test_uk.py | tests/test_uk.py | # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ver... | # Copyright (c) 2013, Savoir-faire Linux inc. All Rights Reserved.
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later ver... | lgpl-2.1 | Python |
83d4b0971dd165876428132ff614c3c94dbf8980 | use new pytest astropy package for header | adrn/thejoker,adrn/thejoker | thejoker/conftest.py | thejoker/conftest.py | import os
try:
from pytest_astropy_header.display import PYTEST_HEADER_MODULES, TESTED_VERSIONS
ASTROPY_HEADER = True
except ImportError:
ASTROPY_HEADER = False
def pytest_configure(config):
"""Configure Pytest with Astropy.
Parameters
----------
config : pytest configuration
"""
... | # This file is used to configure the behavior of pytest when using the Astropy
# test infrastructure. It needs to live inside the package in order for it to
# get picked up when running the tests inside an interpreter using
# packagename.test
import os
from astropy.version import version as astropy_version
# For Ast... | mit | Python |
78eb75e1208c386c8f0b2fde5b53e9970490dd0b | Fix API tests | uiri/toml,uiri/toml | toml/__init__.py | toml/__init__.py | """Python module which parses and emits TOML.
Released under the MIT license.
"""
from toml import encoder
from toml import decoder
__version__ = "0.9.3"
__spec__ = "0.4.0"
load = decoder.load
loads = decoder.loads
dump = encoder.dump
dumps = encoder.dumps
TomlDecodeError = decoder.TomlDecodeError
| """Python module which parses and emits TOML.
Released under the MIT license.
"""
from toml import encoder
from toml import decoder
__version__ = "0.9.3"
__spec__ = "0.4.0"
load = decoder.load
loads = decoder.loads
dump = encoder.dump
dumps = encoder.dumps
| mit | Python |
bfe8e4b0c978420d60b4b451669661b86476a154 | Make queue display ordering stable. | mutability/redfrog-scraper,mutability/redfrog-scraper | queue.py | queue.py | #!/usr/bin/env python2.7
import db, datetime
def load(conn):
queue_contracts = db.Contract.load_by_state(conn = conn, state = db.Contract.IN_QUEUE)
accepted_contracts = db.Contract.load_by_state(conn = conn, state = db.Contract.IN_PROGRESS)
last_update = reduce(max, [x.last_seen for x in queue_contracts]... | #!/usr/bin/env python2.7
import db, datetime
def load(conn):
queue_contracts = db.Contract.load_by_state(conn = conn, state = db.Contract.IN_QUEUE)
queue_contracts.sort(lambda x,y: cmp(x.created_min, y.created_min))
accepted_contracts = db.Contract.load_by_state(conn = conn, state = db.Contract.IN_PROGRES... | bsd-2-clause | Python |
d78dc36331581ae1416f7df6deffd0c441582907 | Fix issue where AWCY script fails with str concat and fails if multiple attempts with same commit | xiph/rav1e,xiph/rav1e | tools/submit_awcy.py | tools/submit_awcy.py | #!/usr/bin/env python
from __future__ import print_function
import requests
import argparse
import os
import subprocess
import sys
from datetime import datetime
#our timestamping function, accurate to milliseconds
#(remove [:-3] to display microseconds)
def GetTime():
return datetime.now().strftime("%Y-%m-%d %H:... | #!/usr/bin/env python
from __future__ import print_function
import requests
import argparse
import os
import subprocess
import sys
from datetime import datetime
#our timestamping function, accurate to milliseconds
#(remove [:-3] to display microseconds)
def GetTime():
return datetime.now().strftime("%Y-%m-%d %H:... | bsd-2-clause | Python |
2463fff021e9453fb6f5894b15167aa04bf8baa3 | remove cruft from pelicanconf.py | BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog,BayesianLogic/blog | docs/pelicanconf.py | docs/pelicanconf.py | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u''
SITENAME = u'BLOG Programming Language'
SITEURL = ''
TIMEZONE = 'America/Los_Angeles'
DEFAULT_LANG = u'en'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRAN... | #!/usr/bin/env python
# -*- coding: utf-8 -*- #
from __future__ import unicode_literals
AUTHOR = u''
SITENAME = u'BLOG Programming Language'
SITEURL = ''
TIMEZONE = 'America/Los_Angeles'
DEFAULT_LANG = u'en'
# Feed generation is usually not desired when developing
FEED_ALL_ATOM = None
CATEGORY_FEED_ATOM = None
TRAN... | bsd-3-clause | Python |
cd7043bf65122c546f2b259ae8bc4513888576ef | add instruction to write list row | CaptainDesAstres/Blender-Render-Manager,CaptainDesAstres/Simple-Blender-Render-Manager | queue.py | queue.py | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module that contain queue class'''
from renderingTask import renderingTask
import os
class queue:
'''class who contain the list of all the rendering task to manage'''
def __init__(self,xml=False):
'''initialize queue object with empty queue who is filled with values... | #!/usr/bin/python3.4
# -*-coding:Utf-8 -*
'''module that contain queue class'''
from renderingTask import renderingTask
import os
class queue:
'''class who contain the list of all the rendering task to manage'''
def __init__(self,xml=False):
'''initialize queue object with empty queue who is filled with values... | mit | Python |
9417091dabf9d8e9ebec078942a2fbba0966e42f | Update sol1.py (#643) | TheAlgorithms/Python | project_euler/problem_08/sol1.py | project_euler/problem_08/sol1.py | import sys
def main():
LargestProduct = -sys.maxsize-1
number=input().strip()
for i in range(len(number)-12):
product=1
for j in range(13):
product *= int(number[i+j])
if product > LargestProduct:
LargestProduct = product
print(LargestProduct)
if __name_... | import sys
def main():
LargestProduct = -sys.maxsize-1
number=input().strip()
for i in range(len(number)-13):
product=1
for j in range(13):
product *= int(number[i+j])
if product > LargestProduct:
LargestProduct = product
print(LargestProduct)
if __name_... | mit | Python |
e6c9ceb3f838a613d182a3fdea961ca1f73e90c4 | Update import for classproperty in django 3.1 and above | dreipol/django-translator | translator/models.py | translator/models.py | # coding=utf-8
from django.conf import settings
from django.core.cache import cache
from django.db import models
from taggit.managers import TaggableManager
from translator.util import get_key
try:
# Django 3.1 and above
from django.utils.functional import classproperty
except ImportError:
from django.uti... | # coding=utf-8
from django.conf import settings
from django.core.cache import cache
from django.db import models
from django.utils.decorators import classproperty
from taggit.managers import TaggableManager
from translator.util import get_key
class TranslationBase(models.Model):
key = models.CharField(max_length... | mit | Python |
a1d532d3c2ce8941a9ce47433713d4bd42364863 | build step fix | raymank26/yandex-money-sdk-nodejs,raymank26/yandex-money-sdk-nodejs | travis/build_step.py | travis/build_step.py | #!/usr/bin/python
import os
if "yandex-money" in os.environ['TRAVIS_REPO_SLUG']:
encrypted_filename = "constants.js.enc.yamoney"
else:
encrypted_filename = "constants.js.enc"
os.system("openssl aes-256-cbc -K {} -iv"
" {} -in {}"
"-out test/constants.js -d".format(
os.environ... | #!/usr/bin/python
import os
if "yandex-money" in os.environ['TRAVIS_REPO_SLUG']:
encrypted_filename = "constants.js.enc.yamoney"
else:
encrypted_filename = "constants.js.enc"
os.system("openssl aes-256-cbc -K $encrypted_bd8aa6273b70_key -iv"
"$encrypted_bd8aa6273b70_iv -in {}"
"-out test/c... | mit | Python |
5c6c806e51882ab0e053a02633ceb4e36737e29a | document how to execute report generators from command-line | shapiromatron/tblBuilder,shapiromatron/tblBuilder,shapiromatron/tblBuilder,shapiromatron/tblBuilder,shapiromatron/tblBuilder | private/scripts/generateReport.py | private/scripts/generateReport.py | """
Generate Word reports using python. Two input values are required:
1) The report class name, for example: NtpAnimalHtmlTables
2) The JSON formatted context
Inputs can be passed either via the command line:
source ~/.virtualenvs/tblBuilder/bin/activate
cd ~/dev/tblBuilder/private/scripts
python genera... | import os
import sys
import json
import reports
def generate_report(root_path, report_type, context):
try:
Reporter = getattr(reports, report_type)
except AttributeError:
raise ValueError("Report name not found: {}".format(report_type))
report = Reporter(root_path, context)
docx = re... | mit | Python |
40b16735c1ee72cd7e52848bd71f7cd8238f3d18 | Fix slash | Zloool/manyfaced-honeypot | runme.py | runme.py | import os
import datetime
from socket import socket, AF_INET, SOCK_STREAM
from cases import cases
from httphandler import HTTPRequest
import signal
# в shutdown определяешь то, что нужно сделать в таком случае.
# такой подход сработает железобетонно-одинаково во всех случаях
# signal.signal(signal.SIGINT, exit)
def cr... | import os
import datetime
from socket import socket, AF_INET, SOCK_STREAM
from cases import cases
from httphandler import HTTPRequest
def create_file(message, directory):
if not os.path.exists("bots/"+directory):
os.makedirs("bots/"+directory)
filename = "bots/"+directory+"/"+str(datetime.datetime.now... | mit | Python |
82fd8a2ccde468d1cb16a193eed0ffb31b3e8341 | usa nuovo metodo path() in URLconf | kbytesys/django_comuni_italiani | comuni_italiani/autocomplete/urls.py | comuni_italiani/autocomplete/urls.py | from django.urls import path
from . import views
urlpatterns = [
path(
'regione/',
views.RegioneAutocomplete.as_view(),
name='regione-autocomplete',
),
path(
'provincia/',
views.ProvinciaAutocomplete.as_view(),
name='provincia-autocomplete',
),
path(... | from django.conf.urls import url
from . import views
urlpatterns = [
url(
r'^regione/$',
views.RegioneAutocomplete.as_view(),
name='regione-autocomplete',
),
url(
r'^provincia/$',
views.ProvinciaAutocomplete.as_view(),
name='provincia-autocomplete',
),
... | lgpl-2.1 | Python |
13de8e856ee1184dddaaebc2786cf7ce90094911 | test features: handle different Step classes in after.each_step | muccg/rdrf,muccg/rdrf,muccg/rdrf,muccg/rdrf,muccg/rdrf | rdrf/rdrf/features/terrain.py | rdrf/rdrf/features/terrain.py | import os
import logging
from contextlib import contextmanager
from aloe import before, after, around, world
from selenium import webdriver
from . import steps
from selenium.common.exceptions import NoAlertPresentException
logger = logging.getLogger(__name__)
def get_desired_capabilities(browser):
return {
... | import os
import logging
from contextlib import contextmanager
from aloe import before, after, around, world
from selenium import webdriver
from . import steps
from selenium.common.exceptions import NoAlertPresentException
logger = logging.getLogger(__name__)
def get_desired_capabilities(browser):
return {
... | agpl-3.0 | Python |
b19eb216f1f1e9c059b083af7ff72864994f5920 | Put admin at the top of the default URLs | jimray/django-project-skeleton,jimray/django-project-skeleton | project_name/project_name/urls.py | project_name/project_name/urls.py | from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
# include urls from your app like so
# url(r'^', include('my_app.urls')),
)
| from django.conf.urls import patterns, include, url
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
# include urls from your app like so
# url(r'^', include('my_app.urls')),
url(r'^admin/', include(admin.site.urls)),
)
| mit | Python |
ed5d3fc549e53ed5cc01ad52047bd0146391212a | add indices | gooofy/zamia-ai,gooofy/zamia-ai | model.py | model.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017 Guenter Bartsch
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
#
# Copyright 2016, 2017 Guenter Bartsch
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your o... | apache-2.0 | Python |
5e01257f3fc5dc135626ecd18c1465175f6e51c7 | test for class correctness | open-traffic-generator/snappi,open-traffic-generator/snappi | snappi/tests/test_snappi_lists.py | snappi/tests/test_snappi_lists.py | import pytest
import snappi
def test_snappi_lists(api):
"""Validate SnappiList object indexing and unpacking
"""
config = api.config()
flows = config.flows.flow(name='1')
assert(flows.__class__ == snappi.flowlist.FlowList)
flow = flows[0]
assert(flow.__class__ == snappi.flow.Flow)
eth... | import pytest
def test_snappi_lists(api):
"""Demonstrate using a SnappiList object
"""
config = api.config()
flow = config.flows.flow(name='1')
eth, vlan, vlan1 = flow.packet.ethernet().vlan().vlan()
vlan.id.value = 1
flow = config.flows.flow(name='2')
eth, vlan, ipv4, tcp = flow.pac... | mit | Python |
3fb53d513e6e687116f14460da043d2bfee0fc25 | Delete now redundant explanatory text in definitions | openclimatedata/pymagicc,openclimatedata/pymagicc | pymagicc/definitions/__init__.py | pymagicc/definitions/__init__.py | from pathlib import Path
import pandas as pd
from pandas_datapackage_reader import read_datapackage
path = Path(__file__).parent
_dtrm = read_datapackage(path, "magicc_dattype_regionmode_regions")
region_cols = _dtrm.columns.to_series().apply(lambda x: x.startswith("Region"))
dattype_regionmode_regions = _dtrm.loc... | from pathlib import Path
import pandas as pd
from pandas_datapackage_reader import read_datapackage
path = Path(__file__).parent
_dtrm = read_datapackage(path, "magicc_dattype_regionmode_regions")
region_cols = _dtrm.columns.to_series().apply(lambda x: x.startswith("Region"))
dattype_regionmode_regions = _dtrm.loc... | agpl-3.0 | Python |
aa82d3493c33d43f5109c63d94d12455e8a8b0d1 | Fix selfcheck and don't rely on click. | ecmwf/eccodes-python,ecmwf/eccodes-python | eccodes/__main__.py | eccodes/__main__.py | #
# Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF).
#
# 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... | #
# Copyright 2017-2019 European Centre for Medium-Range Weather Forecasts (ECMWF).
#
# 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... | apache-2.0 | Python |
a944252d8f5ae38f395a3ebce171cd5b69bd8417 | improve --cli output | openaps/openaps,openaps/openaps | openaps/reports/show.py | openaps/reports/show.py |
"""
show - show all reports
"""
from openaps.devices.device import Device
from openaps.reports.report import Report
from openaps.cli import helpers
import argparse
class Formatter (object):
def __init__ (self, app):
self.app = app
def __call__ (self, thing):
return self.format_cli(thing)
def format... |
"""
show - show all reports
"""
from openaps.devices.device import Device
from openaps.reports.report import Report
from openaps.cli import helpers
class Formatter (object):
def __init__ (self, app):
self.app = app
def __call__ (self, thing):
return self.format_cli(thing)
def format_cli (self, repo... | mit | Python |
610a16ef19678d869f8349580b8c2ff9f86b2bf6 | Update setup.py to *find* the new location of the README file. | dbaxa/django_xss_detection,dbaxa/django_xss_detection | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='django_xss_detection',
author='david black',
author_email='dblack@atlassian.com',
url='https://bitbucket.org/atlassian/django_xss_detection',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='django_xss_detection',
author='david black',
author_email='dblack@atlassian.com',
url='https://bitbucket.org/atlassian/django_xss_detection',
... | bsd-2-clause | Python |
c8ef8ebd3fea27962bf3975321a79f3161f466d5 | Use README for long_description in package info | jean/ZopeSkel | setup.py | setup.py | import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
version = '1.0'
setup(name='ZopeSkel',
version=version,
description="A collection of skeletons for quickstarting Zope projects.",
long_description=open('README.txt').read(),
classifiers=[
"Developmen... | import ez_setup
ez_setup.use_setuptools()
from setuptools import setup, find_packages
import sys, os
version = '1.0'
setup(name='ZopeSkel',
version=version,
description="A collection of skeletons for quickstarting Zope projects.",
long_description="""
A collection of skeletons for quickstarting Zop... | mit | Python |
65906bef4d4caca0fca71fd43329b0da48392009 | update setup | wutron/compbio,wutron/compbio,mdrasmus/compbio,mdrasmus/compbio | setup.py | setup.py | #!/usr/bin/env python
#
# setup for the compbio package
#
# use the following to install:
# python setup.py install
#
from distutils.core import setup
import os
VERSION = '0.9'
scripts = [os.path.join('bin', x) for x in os.listdir('bin')]
setup(
name='compbio',
version=VERSION,
description='Python lib... | #!/usr/bin/env python
#
# setup for the compbio package
#
# use the following to install:
# python setup.py install
#
from distutils.core import setup
import os
VERSION = '0.9'
scripts = [os.path.join('bin', x) for x in os.listdir('bin')]
print setup(
name='compbio',
version=VERSION,
description='Pyth... | mit | Python |
94c47f691358878fd98c36ab202d0ee45344c897 | remove py2.5 support | xingguang2013/githubpy,michaelliao/githubpy | setup.py | setup.py | from distutils.core import setup
import sys
import github
kw = dict(
name = 'githubpy',
version = github.__version__,
description = 'Github v3 API Python SDK',
long_description = open('README', 'r').read(),
author = 'Michael Liao',
author_email = 'askxuefeng@gmail.com',
url = 'https://gith... | from distutils.core import setup
import sys
import github
kw = dict(
name = 'githubpy',
version = github.__version__,
description = 'Github v3 API Python SDK',
long_description = open('README', 'r').read(),
author = 'Michael Liao',
author_email = 'askxuefeng@gmail.com',
url = 'https://gith... | apache-2.0 | Python |
d12a901715823603b0b2c5189a30fc38ab2a7732 | Add svn revision number to version. | Ademan/NumPy-GSoC,efiring/numpy-work,Ademan/NumPy-GSoC,Ademan/NumPy-GSoC,teoliphant/numpy-refactor,illume/numpy3k,teoliphant/numpy-refactor,jasonmccampbell/numpy-refactor-sprint,teoliphant/numpy-refactor,illume/numpy3k,chadnetzer/numpy-gaurdro,jasonmccampbell/numpy-refactor-sprint,jasonmccampbell/numpy-refactor-sprint,... | setup.py | setup.py | """NumPy: array processing for numbers, strings, records, and objects.
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. NumPy is built on the Numeric code ba... | """NumPy: array processing for numbers, strings, records, and objects.
NumPy is a general-purpose array-processing package designed to
efficiently manipulate large multi-dimensional arrays of arbitrary
records without sacrificing too much speed for small multi-dimensional
arrays. NumPy is built on the Numeric code ba... | bsd-3-clause | Python |
feec8f0af7abb2863eb8c1141d9add71932588b7 | Add classifiers | harsh00008/pystache,harsh00008/pystache,beni55/pystache,nitish116/pystache,arlenesr28/pystache,charbeljc/pystache,rismalrv/pystache,dmfrancisco/django-pystache,harsh00008/pystache,charbeljc/pystache,rismalrv/pystache,jrnold/pystache,alex/pystache,defunkt/pystache,nitish116/pystache,arlenesr28/pystache,rismalrv/pystache... | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
from distutils.core import setup
def publish():
"""Publish to Pypi"""
os.system("python setup.py sdist upload")
if sys.argv[-1] == "publish":
publish()
sys.exit()
setup(name='pystache',
version='0.2.0',
description='Mustache for Python',
... | #!/usr/bin/env python
import os
import sys
from distutils.core import setup
def publish():
"""Publish to Pypi"""
os.system("python setup.py sdist upload")
if sys.argv[-1] == "publish":
publish()
sys.exit()
setup(name='pystache',
version='0.2.0',
description='Mustache for Python',
... | mit | Python |
f3bc2416b1cad35dc92d2efc71207671f8eb9da9 | Add license to the setup.py | jgm/pandocfilters,AugustH/pandocfilters | setup.py | setup.py | from distutils.core import setup
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='pandocfilters',
version='1.4.2',
description='Utilities for writing pandoc filters in python',
long_description=read('README.rst'),
author='John MacFa... | from distutils.core import setup
import os
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(name='pandocfilters',
version='1.4.2',
description='Utilities for writing pandoc filters in python',
long_description=read('README.rst'),
author='John MacFa... | bsd-3-clause | Python |
146ddb0a4e4d4b2b57895c054594d47cbd432dad | bump version | singer-io/singer-python | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import subprocess
setup(name="singer-python",
version='1.9.7',
description="Singer.io utility library",
author="Stitch",
classifiers=['Programming Language :: Python :: 3 :: Only'],
url="http://singer.io",
install_re... | #!/usr/bin/env python
from setuptools import setup, find_packages
import subprocess
setup(name="singer-python",
version='1.9.6',
description="Singer.io utility library",
author="Stitch",
classifiers=['Programming Language :: Python :: 3 :: Only'],
url="http://singer.io",
install_re... | apache-2.0 | Python |
435797227f86b2fce73ce22033d2d180d19e12e5 | Bump version number (7.1). | cwant/tessagon | setup.py | setup.py | from setuptools import setup, find_packages
long_description = '''
===========================================
tessagon: tessellation / tiling with python
===========================================
Tessellate your favorite 3D surfaces (technically, 2D manifolds) with
triangles, hexagons, or a number of other curated... | from setuptools import setup, find_packages
long_description = '''
===========================================
tessagon: tessellation / tiling with python
===========================================
Tessellate your favorite 3D surfaces (technically, 2D manifolds) with
triangles, hexagons, or a number of other curated... | apache-2.0 | Python |
298956095e80c8800d566d132d12c3de2222a624 | Bump flake8-bugbear from 21.3.2 to 21.4.3 | sloria/ped,sloria/ped | setup.py | setup.py | import re
from setuptools import setup
EXTRAS_REQUIRE = {
"tests": ["pytest", "mock", "pytest-mock", "scripttest==1.3"],
"lint": ["flake8==3.9.0", "flake8-bugbear==21.4.3", "mypy==0.812", "pre-commit"],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
PYTHON_REQUIRES = ">=3.... | import re
from setuptools import setup
EXTRAS_REQUIRE = {
"tests": ["pytest", "mock", "pytest-mock", "scripttest==1.3"],
"lint": ["flake8==3.9.0", "flake8-bugbear==21.3.2", "mypy==0.812", "pre-commit"],
}
EXTRAS_REQUIRE["dev"] = EXTRAS_REQUIRE["tests"] + EXTRAS_REQUIRE["lint"] + ["tox"]
PYTHON_REQUIRES = ">=3.... | mit | Python |
6cebcbd6fa5b10d341b2311ea98e07c43ed38bd2 | update for python 2.7 support | ourway/marmoolak | setup.py | setup.py | import glob
import imp
import io
import os
from os import path
from setuptools import setup, find_packages, Extension
import sys
MYDIR = path.abspath(os.path.dirname(__file__))
# NOTE
REQUIRES = ['fysom', 'redis']
cmdclass = {}
ext_modules = []
setup(
name='marmoolak',
version='0.0.7',
description='Yet... | import glob
import imp
import io
import os
from os import path
from setuptools import setup, find_packages, Extension
import sys
MYDIR = path.abspath(os.path.dirname(__file__))
# NOTE
REQUIRES = ['fysom', 'redis']
cmdclass = {}
ext_modules = []
setup(
name='marmoolak',
version='0.0.6',
description='Yet... | mit | Python |
f7ac5e9b30dcc8fae66f558aeaeae87374c8ad46 | Bump version. | HDE/python-lambda-local,HDE/python-lambda-local | setup.py | setup.py | '''
python-lambda-local: Run lambda function in python on local machine.
Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.)
Licensed under MIT.
'''
import io
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
# This is a plug-in for setuptools th... | '''
python-lambda-local: Run lambda function in python on local machine.
Copyright 2015-2019 HENNGE K.K. (formerly known as HDE, Inc.)
Licensed under MIT.
'''
import io
import sys
from setuptools import setup, find_packages
from setuptools.command.test import test as TestCommand
# This is a plug-in for setuptools th... | mit | Python |
e5b2b947d87b876431afe4b25abc320c4fbd574f | update meshio | nschloe/voropy | setup.py | setup.py | import codecs
import os
from setuptools import find_packages, setup
# https://packaging.python.org/single_source_version/
base_dir = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(base_dir, "meshplex", "__about__.py"), "rb") as f:
exec(f.read(), about)
def read(fname):
return c... | import codecs
import os
from setuptools import find_packages, setup
# https://packaging.python.org/single_source_version/
base_dir = os.path.abspath(os.path.dirname(__file__))
about = {}
with open(os.path.join(base_dir, "meshplex", "__about__.py"), "rb") as f:
exec(f.read(), about)
def read(fname):
return c... | mit | Python |
7839addc35fc63393b9124e745d798aac7a54a10 | bump version | EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi,EBI-Metagenomics/emgapi | setup.py | setup.py | import sys
import os
from setuptools import setup, find_packages
_base = os.path.dirname(os.path.abspath(__file__))
_requirements = os.path.join(_base, 'requirements.txt')
_requirements_test = os.path.join(_base, 'requirements-test.txt')
version = "0.2.4"
install_requirements = []
with open(_requirements) as f:
... | import sys
import os
from setuptools import setup, find_packages
_base = os.path.dirname(os.path.abspath(__file__))
_requirements = os.path.join(_base, 'requirements.txt')
_requirements_test = os.path.join(_base, 'requirements-test.txt')
version = "0.2.3"
install_requirements = []
with open(_requirements) as f:
... | apache-2.0 | Python |
2f33a5cf0fdf6bca08d71eba72d4b5af94a9e902 | Add PyPI long_description | jbrudvik/yahooscraper | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
README = 'README.md'
try:
import pypandoc
long_description = pypandoc.convert(README, 'rst')
except:
long_description = open(README).read()
setup(
name='yahooscraper',
version='0.0.1',
description='... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='yahooscraper',
version='0.0.1',
description='Utilities for scraping Yahoo pages',
license='MIT',
author='Jeremy Brudvik',
author_email='jeremy@brudvik.me',
url='https://github.com/jbr... | mit | Python |
c51927e3c19d3298b98f162abf06960a0ce4bdf9 | Update version for PyPi to 0.2.5 | thecynic/pylutron | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'pylutron',
version = '0.2.5',
license = 'MIT',
description = 'Python library for Lutron RadioRA 2',
author = 'Dima Zavin',
author_email = 'thecynic@gmail.com',
url = 'http://github.com/thecynic/pylutron',
... | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name = 'pylutron',
version = '0.2.4',
license = 'MIT',
description = 'Python library for Lutron RadioRA 2',
author = 'Dima Zavin',
author_email = 'thecynic@gmail.com',
url = 'http://github.com/thecynic/pylutron',
... | mit | Python |
4497bcebcdf21e1661d927b74e3594743101e2bd | Bump django-email-extras version to 0.2 | iddqd1/django-forms-builder,Afnarel/django-forms-builder,vinnyrose/django-forms-builder,GetHappie/django-forms-builder,nimbis/django-forms-builder,bichocj/django-forms-builder,frontendr/django-forms-builder,JostCrow/django-forms-builder,stephenmcd/django-forms-builder,GetHappie/django-forms-builder,Afnarel/django-forms... | setup.py | setup.py |
from __future__ import with_statement
import os
from setuptools import setup, find_packages
exclude = ["forms_builder/example_project/dev.db",
"forms_builder/example_project/local_settings.py"]
exclude = dict([(e, None) for e in exclude])
for e in exclude:
if e.endswith(".py"):
try:
... |
from __future__ import with_statement
import os
from setuptools import setup, find_packages
exclude = ["forms_builder/example_project/dev.db",
"forms_builder/example_project/local_settings.py"]
exclude = dict([(e, None) for e in exclude])
for e in exclude:
if e.endswith(".py"):
try:
... | bsd-2-clause | Python |
60255bb04c33d6aa4b2b3408e010d999b483f864 | Update setup.py module | Outernet-Project/squery-lite | setup.py | setup.py | import os
from setuptools import setup, find_packages
import squery_lite as pkg
def read(fname):
""" Return content of specified file """
return open(os.path.join(os.path.dirname(__file__), fname)).read()
VERSION = pkg.__version__
setup(
name='squery-lite',
version=VERSION,
license='BSD',
... | #!/usr/bin/env python
import os
from setuptools import setup
import squery_lite as pkg
VERSION = pkg.__version__
def read(fname):
""" Return content of specified file """
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name='squery-lite',
version=VERSION,
license='B... | bsd-3-clause | Python |
d55e38f194ce080a1a1b76d778b98c6a76371e30 | Use github URL and official license name. | Jarn/jarn.mkrelease | setup.py | setup.py | from setuptools import setup, find_packages
version = '3.11'
setup(name='jarn.mkrelease',
version=version,
description='Python egg releaser',
long_description=open('README.rst').read() + '\n' +
open('CHANGES.rst').read(),
classifiers=[
'Development Status :: 5 ... | from setuptools import setup, find_packages
version = '3.11'
setup(name='jarn.mkrelease',
version=version,
description='Python egg releaser',
long_description=open('README.rst').read() + '\n' +
open('CHANGES.rst').read(),
classifiers=[
'Development Status :: 5 ... | bsd-2-clause | Python |
5e764d5960420d73f343d57add51ed7ae7fbc1f7 | fix setup.py syntax | sivy/pystatsd,diogobaeder/pystatsd,sivy/pystatsd,diogobaeder/pystatsd | setup.py | setup.py | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "pystatsd",
version = "0.1.2",
author = "Steve Ivy",
author_email = "steveivy@gmail.com",
description = ("pystatsd is a client for Etsy's brilliant statsd se... | import os
from setuptools import setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "pystatsd",
version = "0.1.2",
author = "Steve Ivy",
author_email = "steveivy@gmail.com",
description = ("pystatsd is a client for Etsy's brilliant statsd se... | bsd-2-clause | Python |
772930310534c48243098c87a2a4ebc05ab1011a | Bump version number. | lewiscollard/cms,dan-gamble/cms,jamesfoley/cms,danielsamuels/cms,jamesfoley/cms,jamesfoley/cms,lewiscollard/cms,danielsamuels/cms,jamesfoley/cms,dan-gamble/cms,lewiscollard/cms,dan-gamble/cms,danielsamuels/cms | setup.py | setup.py | from distutils.core import setup
setup(
name='onespacemedia-cms',
version='1.1',
description='A collection of Django extensions that add content-management facilities to Django projects.',
author='Daniel Samuels',
author_email='daniel@onespacemedia.com',
url='https://github.com/onespacemedia/cm... | from distutils.core import setup
setup(
name='onespacemedia-cms',
version='1.0',
description='A collection of Django extensions that add content-management facilities to Django projects.',
author='Daniel Samuels',
author_email='daniel@onespacemedia.com',
url='https://github.com/onespacemedia/cm... | bsd-3-clause | Python |
4936c5460669b20feb354dc4b2c07246cdac480d | Bump bugfix version. | AlejandroFrias/case-conversion | setup.py | setup.py | from setuptools import setup
setup(
name='case_conversion',
version='2.0.1',
packages=['case_conversion'],
install_requires=['regex>=2016.2.25'],
description='Convert between different types of cases (unicode supported)',
license='MIT',
author='Alejandro Frias',
author_email='joker454@gmail.com',
url=... | from setuptools import setup
setup(
name='case_conversion',
version='2.0.0',
packages=['case_conversion'],
install_requires=['regex>=2016.2.25'],
description='Convert between different types of cases (unicode supported)',
license='MIT',
author='Alejandro Frias',
author_email='joker454@gmail.com',
url=... | mit | Python |
9571044158856d2fb20e52746607a37ec00dc707 | bump version to 0.11.9 | edx/edx-proctoring,edx/edx-proctoring,edx/edx-proctoring | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
def is_requirement(line):
"""
Return True if the requirement line is a package requirement;
that is, it is not blank, a comment, or editable.
"""
# Remove whitespace at the start/end of the line
line = line.strip()
# Skip b... | #!/usr/bin/env python
from setuptools import setup, find_packages
def is_requirement(line):
"""
Return True if the requirement line is a package requirement;
that is, it is not blank, a comment, or editable.
"""
# Remove whitespace at the start/end of the line
line = line.strip()
# Skip b... | agpl-3.0 | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.