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 |
|---|---|---|---|---|---|---|---|---|
804b7aa609ce1fde97f81f839776501352a59a89 | Create card-flipping-game.py | tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,kamyu104/LeetCode | Python/card-flipping-game.py | Python/card-flipping-game.py | # Time: O(n)
# Space: O(n)
# On a table are N cards, with a positive integer printed on the front
# and back of each card (possibly different).
#
# We flip any number of cards, and after we choose one card.
#
# If the number X on the back of the chosen card is not on the front of
# any card, then this number X is goo... | mit | Python | |
a0bbb3b7befbac0ca13a9fc34df63a409cbe930c | Create plot_WRFtimeseries.py | Peter9192/MAQ_PhD,Peter9192/MAQ_PhD | Python/plot_WRFtimeseries.py | Python/plot_WRFtimeseries.py | #plot_WRFtimeseries.py
"""plot time series of WRF output;
NOTE: we assume variables to have dimension [time,y,x] or [time,z,y,x]
If this is not the case, adapt the dimensions where variable is read
Author: Ingrid Super
Last revisions: 2-6-2016"""
import netCDF4 as nc
import numpy as np
import matplotlib.py... | mit | Python | |
4db53b62f616edb61ce469ffb2f4cd642f925784 | Add patch migration for missing constraints (#6276) | pypa/warehouse,pypa/warehouse,pypa/warehouse,pypa/warehouse | warehouse/migrations/versions/48def930fcfd_webauthn_and_macaroon_constraints.py | warehouse/migrations/versions/48def930fcfd_webauthn_and_macaroon_constraints.py | # 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, software
# distributed under the Li... | apache-2.0 | Python | |
2c6141656e0a0885dbcfecad5f227a950dafc3c3 | Create predict-the-winner.py | githubutilities/LeetCode,githubutilities/LeetCode,githubutilities/LeetCode,githubutilities/LeetCode,githubutilities/LeetCode | Python/predict-the-winner.py | Python/predict-the-winner.py | # Time: O(n^2)
# Space: O(n)
# Given an array of scores that are non-negative integers.
# Player 1 picks one of the numbers from either end of the array
# followed by the player 2 and then player 1 and so on.
# Each time a player picks a number, that number will not be available for the next player.
# This continues ... | mit | Python | |
5de560e8458375a2e03200128ff046927cb3dbb5 | Add first solution to LCq003 | lemming52/white_pawn,lemming52/white_pawn | leetcode/q003/solution.py | leetcode/q003/solution.py |
MAX_SUBSTRING_LENGTH = 26
class Solution:
def lengthOfLongestSubstring(self, s: str) -> int:
"""
for a given string, at each starting position within the string,
check how far you can go without repeating a character
"""
max_length = 0
total_length = l... | mit | Python | |
a53d19fccc8656f5190385e028261e4bcff84531 | add rottest.py | tomba/kmsxx,tomba/kmsxx,tomba/kmsxx,tomba/kmsxx | py/tests/rottest.py | py/tests/rottest.py | #!/usr/bin/python3
import pykms
from enum import Enum
import termios, sys, os, tty
card = pykms.OmapCard()
res = pykms.ResourceManager(card)
conn = res.reserve_connector()
crtc = res.reserve_crtc(conn)
mode = conn.get_default_mode()
modeb = mode.to_blob(card)
rootplane = res.reserve_primary_plane(crtc, pykms.PixelF... | mpl-2.0 | Python | |
c80f789da36ad0c23a6cbbf20fd97808d62c3619 | Create a simple Spinner. | hmleal/py-clui | py_clui/__init__.py | py_clui/__init__.py | #!/usr/bin/env python
# https://en.wikipedia.org/wiki/ANSI_escape_code#Colors
# http://aurelio.net/shell/canivete/
# https://stackoverflow.com/questions/27265322/how-to-print-to-console-in-color
import sys
import time
#def colored(text, color):
# return COLORS[color] + text + COLORS['white']
#def Gauge(value, ma... | mit | Python | |
1f043dd959fa1e1d243a3278abeb66838a2f9305 | Remove the IR target type in migration. | justineaster/interop,auvsi-suas/interop,justineaster/interop,justineaster/interop,auvsi-suas/interop,justineaster/interop,auvsi-suas/interop,auvsi-suas/interop,justineaster/interop | server/auvsi_suas/migrations/0013_remove_ir_as_target_type.py | server/auvsi_suas/migrations/0013_remove_ir_as_target_type.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [('auvsi_suas', '0012_missionclockevent'), ]
operations = [
migrations.AlterField(
model_name='target',
name='target... | apache-2.0 | Python | |
e869920c2334e4d0bcd95d2805c8126952c97b51 | Add tests for `cms.debug`. | danielsamuels/cms,jamesfoley/cms,jamesfoley/cms,jamesfoley/cms,lewiscollard/cms,jamesfoley/cms,dan-gamble/cms,danielsamuels/cms,dan-gamble/cms,danielsamuels/cms,lewiscollard/cms,dan-gamble/cms,lewiscollard/cms | cms/tests/test_debug.py | cms/tests/test_debug.py | from django.test import TestCase
from ..debug import print_exc, print_current_exc
import os
from StringIO import StringIO
import sys
class TestDebug(TestCase):
def test_print_exc(self):
def func():
return True
def func_raise():
raise Exception
self.assertEqual(... | bsd-3-clause | Python | |
f584c26b05ce47f993f02801256370d6dde475ac | create the Spider for Switzerland of McDonalds | iandees/all-the-places,iandees/all-the-places,iandees/all-the-places | locations/spiders/mcdonalds_ch.py | locations/spiders/mcdonalds_ch.py | # -*- coding: utf-8 -*-
import scrapy
import re
import json
import datetime
from locations.items import GeojsonPointItem
class McDonalsCHSpider(scrapy.Spider):
name = "mcdonalds_ch"
allowed_domains = ["www.mcdonalds.ch"]
start_urls = (
'https://www.mcdonalds.ch/api/v1/restaurants/?lon=7.458354699... | mit | Python | |
f301dd2366f53a6cf4b0949942b8520502f54351 | Fix import error when [jwt] not installed. | Tusky/box-python-sdk,sanketdjain/box-python-sdk,sanketdjain/box-python-sdk,Frencil/box-python-sdk,samkuehn/box-python-sdk,lkabongoVC/box-python-sdk,Frencil/box-python-sdk,box/box-python-sdk,lkabongoVC/box-python-sdk,samkuehn/box-python-sdk | boxsdk/__init__.py | boxsdk/__init__.py | # coding: utf-8
from __future__ import unicode_literals
try:
from .auth.jwt_auth import JWTAuth
except ImportError:
JWTAuth = None # If extras are not installed, JWTAuth won't be available.
from .auth.oauth2 import OAuth2
from .client import Client
from .object import * # pylint:disable=wildcard-import,rede... | # coding: utf-8
from __future__ import unicode_literals
from .auth.jwt_auth import JWTAuth
from .auth.oauth2 import OAuth2
from .client import Client
from .object import * # pylint:disable=wildcard-import,redefined-builtin
| apache-2.0 | Python |
334961054d875641d150eec4d6938f6f824ea655 | Add initializer for top-level '_gcloud_vendor' package. | optimizely/gcloud-python,jgeewax/gcloud-python,lucemia/gcloud-python,tseaver/google-cloud-python,dhermes/google-cloud-python,elibixby/gcloud-python,tseaver/gcloud-python,daspecster/google-cloud-python,GrimDerp/gcloud-python,blowmage/gcloud-python,jonparrott/google-cloud-python,tseaver/google-cloud-python,GoogleCloudPla... | _gcloud_vendor/__init__.py | _gcloud_vendor/__init__.py | """Dependencies "vendored in", due to dependencies, Python versions, etc.
Current set
-----------
``apitools`` (pending release to PyPI, plus acceptable Python version
support for its dependencies). Review before M2.
"""
| apache-2.0 | Python | |
906898f6b8139c364994b50e0d6c60da6e4ec549 | Add train module, simplify the code in and modules | minhvvu/writing_ass | train.py | train.py | from nltk.corpus import PlaintextCorpusReader
import networkx as nx
from collections import Counter
from itertools import chain
from itertools import tee
import graph_utils as gutil
def pairwise(itr):
a, b = tee(itr) # two version of itr
next(b, None) # b goes ahead one step
return zip(a, b) # retur... | mit | Python | |
2e9e1f801653d4df60f5103d70ae91a7d307b200 | add the management bare minimum to auto-create site. | 1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow | oneflow/base/management/__init__.py | oneflow/base/management/__init__.py | # -*- coding: utf-8 -*-
from django.contrib.sites import models
from django.db.models import signals
from django.conf import settings
def create_site(app, created_models, verbosity, **kwargs):
""" Create the default site when when we install the sites framework. """
if not models.Site in created_models:
... | agpl-3.0 | Python | |
0f9f4f1ee325d72d09625850ba6a153ae5616ab0 | Update test to load plugin | ptthiem/nose2,little-dude/nose2,little-dude/nose2,leth/nose2,ojengwa/nose2,ezigman/nose2,ojengwa/nose2,ezigman/nose2,leth/nose2,ptthiem/nose2 | nose2/tests/functional/test_collect_plugin.py | nose2/tests/functional/test_collect_plugin.py | import re
from nose2.tests._common import FunctionalTestCase
class CollectOnlyFunctionalTest(FunctionalTestCase):
def test_collect_tests_in_package(self):
self.assertTestRunOutputMatches(
self.runIn('scenario/tests_in_package', '-v', '--collect-only',
'--plugin=nose2.plu... | import re
from nose2.tests._common import FunctionalTestCase
class CollectOnlyFunctionalTest(FunctionalTestCase):
def test_collect_tests_in_package(self):
self.assertTestRunOutputMatches(
self.runIn('scenario/tests_in_package', '-v', '--collect-only'),
stderr=EXPECT_LAYOUT1)
# e... | bsd-2-clause | Python |
8eddb8eafede9fa5aa9761ae53fa0d7081a4ba8f | Add setup.py | InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR,InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR,InsightSoftwareConsortium/ITKAnisotropicDiffusionLBR | setup.py | setup.py | from __future__ import print_function
from os import sys
try:
from skbuild import setup
except ImportError:
print('scikit-build is required to build from source.', file=sys.stderr)
print('Please run:', file=sys.stderr)
print('', file=sys.stderr)
print(' python -m pip install scikit-build')
sys... | apache-2.0 | Python | |
a577c19e1296df413100f6858ded39ab71e757a8 | Add setup.py | gadomski/sbd | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name="sbd",
version="0.1",
description="Iridium Short Burst Data DirectIP handling",
author="Pete Gadomski",
author_email="pete.gadomski@gmail.com",
url="https://github.com/gadomski/sbd",
)
| mit | Python | |
b3c13747dcb72d751dbc2322d240499cb0fa2764 | Add shebang line to setup.py | nkgilley/home-assistant,ct-23/home-assistant,morphis/home-assistant,srcLurker/home-assistant,nnic/home-assistant,aequitas/home-assistant,Zyell/home-assistant,srcLurker/home-assistant,sffjunkie/home-assistant,home-assistant/home-assistant,turbokongen/home-assistant,justyns/home-assistant,deisi/home-assistant,jnewland/ho... | setup.py | setup.py | #!/usr/bin/env python3
import os
from setuptools import setup, find_packages
from homeassistant.const import __version__
PACKAGE_NAME = 'homeassistant'
HERE = os.path.abspath(os.path.dirname(__file__))
DOWNLOAD_URL = ('https://github.com/balloob/home-assistant/archive/'
'{}.zip'.format(__version__))
P... | import os
from setuptools import setup, find_packages
from homeassistant.const import __version__
PACKAGE_NAME = 'homeassistant'
HERE = os.path.abspath(os.path.dirname(__file__))
DOWNLOAD_URL = ('https://github.com/balloob/home-assistant/archive/'
'{}.zip'.format(__version__))
PACKAGES = find_packages... | apache-2.0 | Python |
40183d3ef5b49626e62e2bfd830ad54cfa138df9 | Add setup.py | bennuttall/energenie,RPi-Distro/python-energenie,rjw57/energenie | 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 = "energenie",
version = "0.1.0",
author = "Ben Nuttall",
author_email = "ben@raspberrypi.org",
description = "Python module to control the Energenie add-on bo... | bsd-3-clause | Python | |
02a982614b26dae21c18308c6fc94998805484fb | Add ball collector component | 3299/2017 | components/collector.py | components/collector.py | """
Runs the wheels on the front of the robot to pick up balls.
"""
class BallCollector(object):
def __init__(self, motor):
self.motor = motor
def run(self, trigger):
if (trigger == True):
self.motor.set(1)
else:
self.motor.set(0)
| mit | Python | |
dc3ee951363116b235ec96bef34b06a661fc4795 | Add a test that fails if using an old version of chromedriver | mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase | examples/fail_if_old_driver_test.py | examples/fail_if_old_driver_test.py | from seleniumbase import BaseCase
class ChromedriverTests(BaseCase):
def test_fail_if_using_an_old_chromedriver(self):
if self.browser != "chrome":
print("\n This test is only for Chrome!")
print(" (Run with: '--browser=chrome')")
self.skip("This test is only for Chr... | mit | Python | |
2b1cc5fb7465ec0d14d01d2c5cdec9f3bd222016 | Update import_cluster.py | Tendrl/node-agent,r0h4n/node-agent,Tendrl/node_agent,Tendrl/node-agent,Tendrl/node_agent,r0h4n/node-agent,r0h4n/node-agent,Tendrl/node-agent | tendrl/node_agent/gluster_integration/flows/import_cluster.py | tendrl/node_agent/gluster_integration/flows/import_cluster.py | import json
import uuid
from tendrl.node_agent.flows.flow import Flow
class ImportCluster(Flow):
def run(self):
node_list = self.parameters['Nodes[]']
if len(node_list) > 1:
# This is the master node for this flow
for node in node_list:
if self.node_id != no... | import json
import uuid
from tendrl.node_agent.flows.flow import Flow
class ImportCluster(Flow):
def run(self):
node_list = self.parameters['Nodes[]']
if len(node_list) > 1:
# This is the master node for this flow
for node in node_list:
if self.node_id != no... | lgpl-2.1 | Python |
b426522a82d9ba9caa98731d91b985933466aaf9 | Create setup.py | TheLartians/Expresso,TheLartians/Expresso | setup.py | setup.py | from setuptools import setup, Extension, find_packages
from glob import glob
setup(
name='expresso',
version='0.2',
description='A symbolic expression manipulation library.',
author='Lars Melchior',
author_email='thelartians@gmail.com',
url='https://github.com/TheLartians/Expresso',
#incl... | mit | Python | |
ff61d42f2cc60713437277c69521041c36ee425c | Create Startup.py | alrik11es/pyagent | plugins/events/Startup.py | plugins/events/Startup.py | print 1
| mit | Python | |
dfb5a1146b44979f98dc8aa236f52f0393eeabab | Add a basic setup.py | texastribune/the-dp,texastribune/the-dp,texastribune/the-dp,texastribune/the-dp | setup.py | setup.py | from distutils.core import setup
import os.path
def is_package(path):
return (
os.path.isdir(path) and
os.path.isfile(os.path.join(path, '__init__.py'))
)
def find_packages(path, base=""):
""" Find all packages in path """
packages = {}
for item in os.listdir(path):
d... | apache-2.0 | Python | |
38d7a3671afa0e2c76682c8c409959288b547f82 | Prepare for tagging v4.0b3 | yasserglez/pymdptoolbox,sawcordwell/pymdptoolbox,silgon/pymdptoolbox,McCabeJM/pymdptoolbox,silgon/pymdptoolbox,McCabeJM/pymdptoolbox,sawcordwell/pymdptoolbox,yasserglez/pymdptoolbox | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="pymdptoolbox",
version="4.0-b3",
author="Steven A. W. Cordwell",
author_email="steven.cordwell@uqconnect.edu.au",
url="https://github.com/sawcordwell/pymdptoolbox",
description="Markov Decision Process (MDP) T... | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
setup(name="pymdptoolbox",
version="0",
author="Steven A. W. Cordwell",
author_email="steven.cordwell@uqconnect.edu.au",
url="https://github.com/sawcordwell/pymdptoolbox",
description="Markov Decision Process (MDP) Toolbo... | bsd-3-clause | Python |
12267f2a6ac574924ec991a8719d1d1cbf42f85c | Add installation script | rolurq/flask-gulp | setup.py | setup.py | from setuptools import setup
setup(name='Flask-Static', license='MIT', author='Rolando Urquiza',
author_email='rolurquiza@gmail.com',
description='Task executioner similar to gulp for Python',
packages=['flask_static'], platforms='any',
install_requires=['werkzeug'],
classifiers=['Environ... | mit | Python | |
470617e0fad9381cf5fadf64d1a9ba18dbf5e101 | Fix copy ec scenario files failed. | swiftstack/ssbench,charz/ssbench,charz/ssbench,swiftstack/ssbench | setup.py | setup.py | #!/usr/bin/python
# Copyright (c) 2013 SwiftStack, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | #!/usr/bin/python
# Copyright (c) 2013 SwiftStack, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | Python |
30f704c3e767462fefb5086bbf6b5f190cec7c1b | Add fibonacci search in python | ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovski/al-go-rithms,ZoranPandovs... | search/fibonacci_search/python/fibonacci_search.py | search/fibonacci_search/python/fibonacci_search.py | #Fibonacci search for sorted algorithm
def fibSearch(arr,x):
#fibonacci numbers initialization
fib2 = 0
fib1 = 1
fib = fib2 + fib1
n = len(arr)
#find the smallest fibonacci greater than or equal to array length
while (fib < n):
fib2 = fib1
fib1 = fib
fib = fib2 + fi... | cc0-1.0 | Python | |
215ab7e04495f829caf3583237fbe6c41ec8b40e | add logout API | cboling/xos,cboling/xos,zdw/xos,opencord/xos,zdw/xos,opencord/xos,cboling/xos,open-cloud/xos,cboling/xos,open-cloud/xos,zdw/xos,opencord/xos,zdw/xos,open-cloud/xos,cboling/xos | xos/core/xoslib/methods/loginview.py | xos/core/xoslib/methods/loginview.py | from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.reverse import reverse
from rest_framework import serializers
from rest_framework import generics
from rest_framework.views import APIView
from core.models import *
from services.hpc.models import *
from serv... | from rest_framework.decorators import api_view
from rest_framework.response import Response
from rest_framework.reverse import reverse
from rest_framework import serializers
from rest_framework import generics
from rest_framework.views import APIView
from core.models import *
from services.hpc.models import *
from serv... | apache-2.0 | Python |
f872501586dfe05c5b96402a3d8ea5194a9ff6b3 | add the pseudocode for the reservation random generator | cloudmesh/reservation,cloudmesh/reservation,cloudmesh/reservation | reservation/generate.py | reservation/generate.py | """
Usage:
generate SERVERS RESERVATIONS DURATION
Arguments:
SERVERS Number of servers for which we generate reservations
RESERVATIONS Number of reservations per server
DURATION The maximum duration of a reservation (determined randomly)
"""
def generate(arguments):
print argumen... | apache-2.0 | Python | |
68a7b8b87caca9e80cc827854fa362e8a2911a2a | use Qt4 instead of Tkinter. This will use less code and provide a better appearance | edsoncudjoe/CatDVText2XlsxGui | setup.py | setup.py | """
This is a setup.py script generated by py2applet
Usage:
python setup.py py2app
"""
from setuptools import setup
APP = ['app.py']
DATA_FILES = []
OPTIONS = {'argv_emulation': True, 'includes': ['sip', 'PyQt4',
'PyQt4.QtCore', 'PyQt4.QtGui']}
setup(
name='Ca... | mit | Python | |
0e02dc4390c8376940100bef2bb23abb4e9c1642 | Create merge_fasta.py | vrmarcelino/Shape-4-Qiime,vrmarcelino/Shape-4-Qiime,vrmarcelino/Shape-4-Qiime | merge_fasta.py | merge_fasta.py | # -*- coding: utf-8 -*-
""" Concatenate different fasta files and add barcodes.
Run this script after separate fasta and qual files (see onvert_fastaqual_fastq.py from qiime)
Created on Thu Jul 31 15:49:39 2014
@author: VanessaRM
"""
from Bio import SeqIO
import sys
#input files:
input_files = []
for n in sys.argv... | mit | Python | |
f1907672f276ee7cf19dd9f14824e56361c8128d | Add tests | mpkato/dmr | tests/lda_test.py | tests/lda_test.py | # -*- coding:utf-8 -*-
import unittest
import nose
import dmr
class LDATestCase(unittest.TestCase):
def test___init__(self):
'''
__init__ test
'''
corpus = dmr.Corpus.read("./doc.txt")
voca = dmr.Vocabulary()
docs = voca.read_corpus(corpus)
if __name__ == '__main__... | mit | Python | |
4ee28dbcdf631e3f328dcda5f901b0d4bf20ef3b | Create setup.py | mjvakili/supermean | setup.py | setup.py | from distutils.core import setup
from Cython.Distutils import Extension
from Cython.Distutils import build_ext
import os
import numpy
ext_modules = []
ext_modules.append(Extension("terminator",
["terminator.pyx"],
libraries=["m"],
... | mit | Python | |
10a2fb7d52ce9affcc6157eb7731191b940a7480 | Write some tests | Perlence/porcupy | tests/test_for.py | tests/test_for.py | import pytest
from pyegs.compiler import compile as compile_
@pytest.mark.skip('Not implemented yet')
def test_for():
assert (compile_('items = [11, 22, 33]\nfor item in items: x = item') ==
'p1z 11 p2z 22 p3z 33 p4z 1 '
'p5z p4z+0 p5z p^5z p6z p5z '
'p5z p4z+1 p5z p^5z p6z p5... | bsd-3-clause | Python | |
3b38f7638d1d2e3903cc388cfb3103b1e9c11bc2 | Add setup.py | tristanbrown/whaler | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='whaler',
version='0.0.1',
author = "Tristan R. Brown",
author_email = "brown.tristan.r@gmail.com",
description = ("Analytical package for computational chemistry software, "
"ORCA."),
url = 'https://github.com/tristanbr... | mit | Python | |
54eca489024d3d8f354a44d161797edb8e916600 | Add tests - now very simple and primitive | diNard/Saw | tests/test_saw.py | tests/test_saw.py | import unittest
from saw.saw import Saw
class Test_Saw(unittest.TestCase):
def setUp(self):
text = "Starting right this second, it's way easier to merge Pull Requests! \
We usually merge them from the comfortable glow of our computers, but with the\
new mobile site we're comfortabl... | mit | Python | |
1bd21c7b35a100e0f72f03bd9e0d783dc136c41e | Check for multiple outcome codes occurring today | ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend | cla_backend/apps/cla_butler/management/commands/monitor_multiple_outcome_codes.py | cla_backend/apps/cla_butler/management/commands/monitor_multiple_outcome_codes.py | # coding=utf-8
import logging
from django.core.management.base import BaseCommand
from django.db.models import Count, Max, Min
from django.utils.timezone import now
from cla_butler.stack import is_first_instance, InstanceNotInAsgException, StackException
from cla_eventlog.models import Log
logger = logging.getLogger(_... | mit | Python | |
81418934093eb1eb20862e7fb9f97d6bfbc3cf10 | add setup.py | hephs/dispatk | setup.py | setup.py | #!/usr/bin/python
"""Multiple dispatcher on arguments values."""
from setuptools import setup
long_description = """
# dispatk
## Description
This function is inspired by singledispatch of Python 3.4+ (PEP 443),
but the dispatch happens on the key extracted fro the arguments values.
```
from dispatk import dispatk
... | mit | Python | |
0350dcce8a95df0c04748529b82c1a486d2d4148 | Add setup script, to automatically produce distributable packages | tbentropy/tilecutter,tbentropy/tilecutter,tbentropy/tilecutter,tbentropy/tilecutter | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
import sys, os, os.path
version = "0.5.1"
### this manifest enables the standard Windows XP-looking theme
##manifest = """
##<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
##<assembly xmlns="urn:schemas-microsoft-com:asm.v1"
##manifestVersion... | bsd-3-clause | Python | |
af76038a7cbaa076b3fe0b57145a2fc72bc50b7b | Add basic setup script | alco/numspell,alco/numspell | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='Numspell',
version='0.9',
description='A Python module for spelling numbers',
author='Alexei Sholik',
author_email='alcosholik@gmail.com',
url='https://github.com/alco/numspell',
license="MIT",
packages=['nums... | mit | Python | |
b05ede554c403bb3d03dbe65b02baa2a879f3310 | Add pretty-printers for qi::Buffer | aldebaran/libqi,aldebaran/libqi,bsautron/libqi,vbarbaresi/libqi,aldebaran/libqi | tools/printers.py | tools/printers.py | """Pretty printers for libqi.
Add python execfile("/path/to/this/file") in your ~/.gdbinit or /etc/gdb/gdbinit
Your gdb need to be compile with python and version > 7.0
"""
import gdb
import gdb.types
class QiBufferPrinter:
def __init__(self, val):
self.val = val
def to_string(self):
buf = se... | bsd-3-clause | Python | |
9df8506f86c1f6e95b6c9d0bda2dd8001dc0459b | Disable maxAudioWithBaselineShift test (works locally but not on travis) | linuxipho/mycroft-core,forslund/mycroft-core,forslund/mycroft-core,Dark5ide/mycroft-core,linuxipho/mycroft-core,aatchison/mycroft-core,MycroftAI/mycroft-core,Dark5ide/mycroft-core,MycroftAI/mycroft-core,aatchison/mycroft-core | test/client/dynamic_energy_test.py | test/client/dynamic_energy_test.py | import unittest
import audioop
from speech_recognition import AudioSource
from mycroft.client.speech.mic import ResponsiveRecognizer
__author__ = 'seanfitz'
class MockStream(object):
def __init__(self):
self.chunks = []
def inject(self, chunk):
self.chunks.append(chunk)
def read(self, c... | import unittest
import audioop
from speech_recognition import AudioSource
from mycroft.client.speech.mic import ResponsiveRecognizer
__author__ = 'seanfitz'
class MockStream(object):
def __init__(self):
self.chunks = []
def inject(self, chunk):
self.chunks.append(chunk)
def read(self, c... | apache-2.0 | Python |
8cdf49b093e6fe95570fe4f8c9c488bc8755d83f | Create dust_gp2y1010.py | jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi,jeonghoonkang/BerePi | apps/dust/dust_gp2y1010.py | apps/dust/dust_gp2y1010.py | import time
import sys
#import adc_mcp3008
sys.path.append("../adc")
sys.path.append("../../../../thingsweb/weblib/recv")
sys.path.append("../../../log_lib")
from adc_mcp3008 import *
from lastvalue import *
from raspi_log import *
import requests, json
import fcntl, socket, struct
import RPi.GPIO as GPIO
# Please ch... | bsd-2-clause | Python | |
84ae11ed02eabcc9c00167c710d9eb4e8462e7b0 | Create router.py | Hojalab/sarafu,pesaply/sarafu,Hojalab/sarafu,pesaply/sarafu | router.py | router.py | import jnettool.tool.elements.NetworkElements
import jnettool.tool.Routing
import jnettool.tool.RouteInspector
ne = jnettool.tools.elements.NetworkElements('ip')
try
routing_tableb = ne.getRoutingTable()
except jnettool.tools.elements.MissingVar:
logging.exception('No routing_tableb found')
ne.cleanup... | mit | Python | |
5662e4277c77dc3be308934a1e389cf24259037a | Create remap.py | AndrejIT/map_unexplore | remap.py | remap.py | #!/usr/bin/env python
#Licence LGPL v2.1
#Creates copy of map db, leaving only specified(filtered) blocks.
#Can also be used for map backup, may-be even online backup.
import sqlite3
import mt_block_parser
import re
def getIntegerAsBlock(i):
x = unsignedToSigned(i % 4096, 2048)
i = int((i - x) / 4096)
y... | lgpl-2.1 | Python | |
a049ecd3c3d46f42d145d6d02a9f4f100ab3f4d9 | Create rules_cc.bzl for TSL | tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,yongtang/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,t... | tensorflow/tsl/platform/rules_cc.bzl | tensorflow/tsl/platform/rules_cc.bzl | """Provides an indirection layer to bazel cc_rules"""
load(
"//tensorflow/tsl/platform/default:rules_cc.bzl",
_cc_binary = "cc_binary",
_cc_import = "cc_import",
_cc_library = "cc_library",
_cc_shared_library = "cc_shared_library",
_cc_test = "cc_test",
)
cc_binary = _cc_binary
cc_import = _cc... | apache-2.0 | Python | |
6d5f1afdfe963a927e510a9a2e044fbd4796184f | add tests for cliff, arete, ridge, valley | mapzen/vector-datasource,mapzen/vector-datasource,mapzen/vector-datasource | test/601-cliff-arete-ridge-valley.py | test/601-cliff-arete-ridge-valley.py | #cliff in Yosemite
assert_has_feature(
13, 1374, 3166, "earth",
{"kind": "cliff", "id": 291684864,
"sort_key": 227})
#arete in Yosemite
assert_has_feature(
13, 1379, 3164, "earth",
{"kind": "arete", "id": 375271242,
"sort_key": 228})
#ridge with name in Santa Cruz Mountains, California
asser... | mit | Python | |
918723bb1cbaea66358bd0701728bfb89fa6f00c | add servo_SG90.py | wkentaro/keyopener,wkentaro/keyopener | code/servo_SG90.py | code/servo_SG90.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# servo_SG90.py
# author: Kentaro Wada <www.kentaro.wada@gmail.com>
import time
from RPi import GPIO
def move_pos(pin, deg, speed):
"""
(int) deg: 0 - 60 [deg]
(float) speed: -1 - 1
"""
t_start = time.time()
duration = 0.1 * deg / 60
wh... | mit | Python | |
d31ee1207292e1b6c9f874b500837f91e477728c | Create sender.py | AkshayJoshi/Trial | sender.py | sender.py | """IMAGE_ID="" #Paste image ID here
FLAVOR_ID="" #Paste Flavor_ID here
SSH_KEY="" #Paste key name here - Assuming key already exists"""
from wsgiref.simple_server import make_server
import json
def createvm(ip,instance_name,image_id,flavor_id,ssh_key=None):
"""Creates an instance remotely"""
if ssh_key==None:
pri... | unlicense | Python | |
ff8c866675d8eece3c527a245ec17520f357203e | test the `fastfood` command | samstav/fastfood,martinb3/fastfood,martinb3/fastfood,samstav/fastfood,martinb3/fastfood,samstav/fastfood,rackerlabs/fastfood,rackerlabs/fastfood,samstav/fastfood,martinb3/fastfood,rackerlabs/fastfood | tests/functional/test_entry_point.py | tests/functional/test_entry_point.py | """Functional tests for command line use."""
import subprocess
import unittest
class TestFastfoodCLI(unittest.TestCase):
def test_fastfood_command_is_there(self):
cmd = ['fastfood', '--help']
try:
subprocess.check_output(cmd, stderr=subprocess.STDOUT)
except (subprocess.Call... | apache-2.0 | Python | |
ff151c8ea04268d2060cf8d281294a0d500ecbba | Test that data volumes now survive a crash when recreating | marcusmartins/compose,alexandrev/compose,alunduil/fig,sanscontext/docker.github.io,dopry/compose,aanand/fig,tangkun75/compose,danix800/docker.github.io,cclauss/compose,tiry/compose,joaofnfernandes/docker.github.io,Yelp/docker-compose,BSWANG/denverdino.github.io,twitherspoon/compose,alunduil/fig,rillig/docker.github.io,... | tests/integration/resilience_test.py | tests/integration/resilience_test.py | from __future__ import unicode_literals
from __future__ import absolute_import
import mock
from compose.project import Project
from .testcases import DockerClientTestCase
class ResilienceTest(DockerClientTestCase):
def test_recreate_fails(self):
db = self.create_service('db', volumes=['/var/db'], comman... | apache-2.0 | Python | |
588d2627dee336efdf44862ab31bbbd896aad912 | Add basic tests for several permission types | songyi199111/sentry,boneyao/sentry,kevinlondon/sentry,gg7/sentry,gencer/sentry,korealerts1/sentry,looker/sentry,jean/sentry,wujuguang/sentry,kevinastone/sentry,imankulov/sentry,imankulov/sentry,looker/sentry,ewdurbin/sentry,gg7/sentry,llonchj/sentry,boneyao/sentry,Kryz/sentry,hongliang5623/sentry,felixbuenemann/sentry,... | tests/sentry/api/test_permissions.py | tests/sentry/api/test_permissions.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from sentry.api.permissions import has_perm
from sentry.constants import MEMBER_USER, MEMBER_ADMIN
from sentry.testutils import TestCase
class TeamPermissionTest(TestCase):
def test_basic_user(self):
user = self.create_user(is_superuser=Fals... | bsd-3-clause | Python | |
bb48a8a9a763e594efa06b397d7731f25cedd65d | add parallel perceptron | sfu-natlang/glm-parser,sfu-natlang/glm-parser,sfu-natlang/glm-parser,sfu-natlang/glm-parser | src/learn/spark_perceptron.py | src/learn/spark_perceptron.py | from __future__ import division
import logging
import multiprocessing
from hvector._mycollections import mydefaultdict
from hvector.mydouble import mydouble
from weight.weight_vector import *
# Time accounting and control
import debug.debug
import time
import sys
from pyspark import SparkContext
logging.basicConfig(... | mit | Python | |
33a0b48ec475ec02f60ed27e572709136515763a | Create maxdiff.py | paperparrot/maxdiff | maxdiff.py | maxdiff.py | __author__ = 'sebastiengenty'
import numpy as np
import pandas as pd
# This program is made to take the utilities from a MaxDiff estimation and compute the relative importances for
# the attributes tested. Input for now is .csv though also working on a .xlsx solution.
def avg_imp(utilities_file, filter_var='none', ... | apache-2.0 | Python | |
3d5787cd860b1b3baaa041e49efe6d4af09396ac | Add migrations package to setup.py | rauleb/django-auditlog,kbussell/django-auditlog,Zmeylol/auditlog,robmagee/django-auditlog,chris-griffin/django-auditlog,johnrtipton/django-auditlog,jjkester/django-auditlog | setup.py | setup.py | from distutils.core import setup
setup(
name='django-auditlog',
version='0.2.1',
packages=['auditlog', 'auditlog.migrations'],
package_dir={'': 'src'},
url='https://github.com/jjkester/django-auditlog',
license='MIT',
author='Jan-Jelle Kester',
author_email='janjelle@jjkester.nl',
d... | from distutils.core import setup
setup(
name='django-auditlog',
version='0.2.1',
packages=['auditlog',],
package_dir={'': 'src'},
url='https://github.com/jjkester/django-auditlog',
license='MIT',
author='Jan-Jelle Kester',
author_email='janjelle@jjkester.nl',
description='Audit log ... | mit | Python |
5515fc7207404013ea9ba655b29bc414320971d9 | add setup.py | experimentengine/optimizely-client-python,wlowry88/optimizely-client-python,optimizely/optimizely-client-python | setup.py | setup.py | from setuptools import setup
setup(name='optimizely',
version='0.1',
description='An interface to Optimizely\'s REST API.',
url='https://github.com/optimizely/optimizely-client-python',
author='Optimizely',
packages=['optimizely'],
install_requires=[
'requests',
],
... | mit | Python | |
3ca6447572f165a2de59d8420d7b853158b0ed66 | Add test cases for segment. | xrloong/Xie | tests/test/xie/graphics/segment.py | tests/test/xie/graphics/segment.py | import unittest
import copy
from xie.graphics.segment import BeelineSegment
from xie.graphics.segment import QCurveSegment
from xie.graphics.segment import StrokePath
from xie.graphics.segment import SegmentFactory
class SegmentTestCase(unittest.TestCase):
def setUp(self):
self.segmentFactory = SegmentFactory()
... | apache-2.0 | Python | |
6f7abe8ea3e08ad15adab85c947ad4667e3dd3ab | Add simplejson requirement to setup | Bogh/django-oscar,anentropic/django-oscar,rocopartners/django-oscar,jinnykoo/wuyisj.com,jlmadurga/django-oscar,anentropic/django-oscar,bschuon/django-oscar,bschuon/django-oscar,dongguangming/django-oscar,rocopartners/django-oscar,michaelkuty/django-oscar,django-oscar/django-oscar,saadatqadri/django-oscar,monikasulik/dj... | setup.py | setup.py | #!/usr/bin/env python
"""
Installation script:
To release a new version to PyPi:
- Ensure the version is correctly set in oscar.__init__.py
- Run: python setup.py sdist upload
"""
from setuptools import setup, find_packages
from oscar import get_version
setup(name='django-oscar',
version=get_version().replac... | #!/usr/bin/env python
"""
Installation script:
To release a new version to PyPi:
- Ensure the version is correctly set in oscar.__init__.py
- Run: python setup.py sdist upload
"""
from setuptools import setup, find_packages
from oscar import get_version
setup(name='django-oscar',
version=get_version().replac... | bsd-3-clause | Python |
b16f666af5e7dd1e2201e8e57c0590933b5b73e9 | Add setup script | INM-6/python-gymz | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup
setup(
name='gymz',
version='0.0.1',
author='Jakob Jordan, Philipp Weidel',
author_email='j.jordan@fz-juelich.de',
description=('A light-weight ZMQ wrapper for the OpenAI Gym.'),
license='MIT',
keywords='openai-gym reinforcement-learning ... | mit | Python | |
713e715fb3657a274f60c687eec60bad0d9c7da9 | Update synth.py yaml location (#6480) | tseaver/google-cloud-python,GoogleCloudPlatform/gcloud-python,googleapis/google-cloud-python,tswast/google-cloud-python,tseaver/google-cloud-python,tswast/google-cloud-python,tswast/google-cloud-python,dhermes/google-cloud-python,dhermes/gcloud-python,googleapis/google-cloud-python,dhermes/google-cloud-python,dhermes/g... | container/synth.py | container/synth.py | # Copyright 2018 Google LLC
#
# 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, s... | # Copyright 2018 Google LLC
#
# 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, s... | apache-2.0 | Python |
8e175782c3b79e64d543fb478b146d308d2a2ad8 | Add small python script which calculates how much disk space we save by using CAS | scitran/api,scitran/core,scitran/core,scitran/core,scitran/core,scitran/api | bin/oneoffs/cas_statistic.py | bin/oneoffs/cas_statistic.py | import os
import pymongo
from collections import Counter
db_uri = os.getenv('SCITRAN_PERSISTENT_DB_URI', 'localhost:9001')
db = pymongo.MongoClient(db_uri).get_database('scitran')
COLLECTIONS = ['projects', 'acquisitions', 'analyses']
COLLECTIONS_WITH_EMBEDDED = [('sessions', 'subject')]
def files_of_collection(col... | mit | Python | |
04a24befbaba975720acf5533bc97e7b3d601672 | Install script. | seomoz/url-py,pombredanne/url-py,smeinecke/url-py,seomoz/url-py,masayuko/url-py | setup.py | setup.py | #!/usr/bin/env python
# Copyright (c) 2012 SEOmoz
#
# 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, copy, modify, merge... | mit | Python | |
9afb9954f5d58fe051f60bd336a39d794699d405 | add a demo that plots a comparison of threshold types | rgommers/pywt,rgommers/pywt,rgommers/pywt,rgommers/pywt,grlee77/pywt,PyWavelets/pywt,grlee77/pywt,PyWavelets/pywt | demo/plot_thresholds.py | demo/plot_thresholds.py | import numpy as np
import matplotlib.pyplot as plt
import pywt
s = np.linspace(-4, 4, 1000)
s_soft = pywt.threshold(s, value=0.5, mode='soft')
s_hard = pywt.threshold(s, value=0.5, mode='hard')
s_garotte = pywt.threshold(s, value=0.5, mode='garotte')
s_firm1 = pywt.threshold_firm(s, value_low=0.5, value_high=1)
s_fir... | mit | Python | |
e1b32cdd95c8a11cb492d27d9ac11a46c4037f2e | Add setup.py | mlafeldt/rdd.py,mlafeldt/rdd.py,mlafeldt/rdd.py | setup.py | setup.py | # -*- coding: utf-8 -*-
from setuptools import setup, find_packages
import rdd
setup(name='rdd',
version=rdd.__version__,
author='Mathias Lafeldt',
author_email='mathias.lafeldt@gmail.com',
url='https://github.com/mlafeldt/rdd.py',
license='MIT',
description='Python implementation ... | mit | Python | |
d78e3ba37cb2c88300d1e96010e79c6e4329f720 | bump version to 0.3 | kalessin/python-hubstorage,scrapinghub/python-hubstorage,torymur/python-hubstorage | setup.py | setup.py | from setuptools import setup, find_packages
setup(name='hubstorage',
version='0.3',
license='BSD',
description='Client interface for Scrapinghub HubStorage',
author='Scrapinghub',
author_email='info@scrapinghub.com',
url='http://scrapinghub.com',
platforms = ['Any'],
pac... | from setuptools import setup, find_packages
setup(name='hubstorage',
version='0.2',
license='BSD',
description='Client interface for Scrapinghub HubStorage',
author='Scrapinghub',
author_email='info@scrapinghub.com',
url='http://scrapinghub.com',
platforms = ['Any'],
pac... | bsd-3-clause | Python |
9238e229c63b32e35b46508959450e97901b46ab | Add package setup. | ohsu-qin/qipipe | setup.py | setup.py | import glob
from distutils.core import setup
requires = ['pydicom']
setup(
name = 'qipipe',
version = '1.1.1',
author = 'Fred Loney',
author_email = 'loneyf@ohsu.edu',
packages = find_packages('lib'),
package_dir = {'':'lib'}
scripts = glob.glob('bin/*'),
url = 'http://quip1.ohsu.edu/... | bsd-2-clause | Python | |
cd596bd419352d95fb31aab7116a1dddb061828c | add a setup.py for the trait_documenter package | itziakos/trait-documenter | setup.py | setup.py | #----------------------------------------------------------------------------
#
# Copyright (c) 2014, Enthought, Inc.
# All rights reserved.
#
# This software is provided without warranty under the terms of the BSD
# license included in /LICENSE.txt and may be redistributed only
# under the conditions described in... | bsd-3-clause | Python | |
d611af5a613e444c0c31c269aa382f0996c375d9 | Add setup.py from h3's fork | madteckhead/django-jquery-file-upload,madteckhead/django-jquery-file-upload | setup.py | setup.py | """
django-jquery-file-upload
"""
from setuptools import setup, find_packages
setup(
name = "django-jquery-file-upload",
version = "0.0.1",
url = "",
license = "The MIT License (MIT)",
description = "A minimal django project containing a minimal app with a working jquery file upload form based on ... | mit | Python | |
5ce21100b42dad13815d21cd3fae9a2710756314 | add setup.py | LeeBergstrand/pygenprop | setup.py | setup.py | #!/usr/bin/env python
"""
Created by: Lee Bergstrand (2018)
Description: Setup for installing pygenprop.
"""
from setuptools import setup
setup(name='pygenprop',
version='0.1',
description='A python library for programmatic usage of EBI InterPro Genome Properties.',
url='https://github.com/Microme... | apache-2.0 | Python | |
b9a23638d4cf6cc692a2dce3d42268ca73343493 | Add setup.py | caleb531/alfred-workflow-packager | setup.py | setup.py | #!/usr/bin/env python
# coding=utf-8
from setuptools import setup
setup(
name='alfred-workflow-packager',
version='0.8b',
description='A CLI utility for packaging and exporting Alfred workflows',
url='https://github.com/caleb531/alfred-workflow-packager',
author='Caleb Evans',
author_email='ca... | mit | Python | |
8124ad701f11aad4e127e26fb34e850b80e03bdf | Add compare_to_sim | bryanwweber/UConnRCMPy | compare_to_sim.py | compare_to_sim.py | # -*- coding: utf-8 -*-
"""
Created on Thu May 21 17:55:00 2015
@author: weber
"""
import numpy as np
import matplotlib.pyplot as plt
from glob import glob
from pressure_traces import copy
simdata = np.genfromtxt('export.csv', delimiter=',', skip_header=1)
simtime = simdata[:, 0]
simvolume = simdata[:, 1]
simtemperat... | bsd-3-clause | Python | |
d952b1b42ad82d40b0eb741f189d2525b73e2d19 | add basic configuration | paked/distance-matrix | setup.py | setup.py | from distutils.core import setup
setup(name='distance_matrix',
author='Harrison Shoebridge',
author_email='harrison@theshoebridges.com',
description='A small wrapper around the google distance matrix api',
version='0.1',
py_modules=['distance_matrix'])
| mit | Python | |
39b27532e79f27612bbae0b748ef91d89a429b84 | Exclude buggy setuptools-scm version | untitaker/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,hobarrera/vdirsyncer,untitaker/vdirsyncer | setup.py | setup.py | # -*- coding: utf-8 -*-
'''
Vdirsyncer synchronizes calendars and contacts.
Please refer to https://vdirsyncer.pimutils.org/en/stable/packaging.html for
how to package vdirsyncer.
'''
from setuptools import Command, find_packages, setup
requirements = [
# https://github.com/mitsuhiko/click/issues/200
'clic... | # -*- coding: utf-8 -*-
'''
Vdirsyncer synchronizes calendars and contacts.
Please refer to https://vdirsyncer.pimutils.org/en/stable/packaging.html for
how to package vdirsyncer.
'''
from setuptools import Command, find_packages, setup
requirements = [
# https://github.com/mitsuhiko/click/issues/200
'clic... | mit | Python |
1805e9cc2e2aeb3770b03ebcb05ac189566fa165 | add setup.py | sotetsuk/memozo | setup.py | setup.py | from setuptools import setup, find_packages
setup(
name='memozo',
version="0.1.0",
description='Memotize objects to desk easily',
author='sotetsuk',
url='https://github.com/sotetsuk/memozo',
author_email='sotetsu.koyamada@gmail.com',
license='MIT',
install_requires=[],
packages=find... | mit | Python | |
37dcd46678ca8f22640aa314b174fda78be5392d | Bump version number | snahor/wtforms-mongoengine,rozza/flask-mongoengine,snahor/wtforms-mongoengine,rochacbruno/flask-mongoengine,losintikfos/flask-mongoengine,gerasim13/flask-mongoengine-1,gerasim13/flask-mongoengine-1,rozza/flask-mongoengine,quokkaproject/flask-mongoengine,quokkaproject/flask-mongoengine,rochacbruno/flask-mongoengine,losi... | setup.py | setup.py | """
Flask-MongoEngine
--------------
Flask support for MongoDB using MongoEngine.
Includes `WTForms`_ support.
Links
`````
* `development version
<https://github.com/sbook/flask-mongoengine/raw/master#egg=Flask-MongoEngine-dev>`_
"""
from setuptools import setup
setup(
name='Flask-MongoEngine',
version=... | """
Flask-MongoEngine
--------------
Flask support for MongoDB using MongoEngine.
Includes `WTForms`_ support.
Links
`````
* `development version
<https://github.com/sbook/flask-mongoengine/raw/master#egg=Flask-MongoEngine-dev>`_
"""
from setuptools import setup
setup(
name='Flask-MongoEngine',
version=... | bsd-3-clause | Python |
dbe16470f596ee53ec18975afca4aa0605b9b1bc | Add setup.py. | elektito/pybtracker | setup.py | setup.py | #!/usr/bin/env python3
try:
from setuptools.core import setup
except ImportError:
from distutils.core import setup
from pip.req import parse_requirements
from pip.download import PipSession
import os
def get_file_path(name):
return os.path.abspath(os.path.join(
os.path.dirname(__file__),
n... | mit | Python | |
d8dd594c2ce0defa430f5a7e873c87491c7aab47 | Allow hyperframe 5 | vladmunteanu/hyper-h2,vladmunteanu/hyper-h2,python-hyper/hyper-h2,python-hyper/hyper-h2,Kriechi/hyper-h2,Kriechi/hyper-h2 | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open('h2/__init__.py', 'r') as f:
text = f.read()
... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import codecs
import os
import re
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Get the version
version_regex = r'__version__ = ["\']([^"\']*)["\']'
with open('h2/__init__.py', 'r') as f:
text = f.read()
... | mit | Python |
5e98fe8b6ac368e29d739a2dfa690fdea01382ca | Bring back setup.py | mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea,mozilla/ichnaea | setup.py | setup.py | from codecs import open
import os
import os.path
from setuptools import find_packages, setup
here = os.path.relpath(os.path.abspath(os.path.dirname(__file__)))
with open(os.path.join(here, 'README.rst'), encoding='utf-8') as fd:
long_description = fd.read()
__version__ = '2.2.1'
setup(
name='ichnaea',
... | apache-2.0 | Python | |
95c8e291fe1f89e1d880deff34c6e0aa98f6fdf2 | Package description for setuptools. | shrubberysoft/homophony | setup.py | setup.py | # Copyright (c) 2009 Shrubbery Software
#
# 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, copy, modify, merge, publish,... | mit | Python | |
62439e5c8f174752cd5774c3f240b7cc8fa158ad | add packaging boilerplate | alexvalentine/mecode,jminardi/mecode,razeh/mecode,travisbusbee/mecode | setup.py | setup.py | from setuptools import setup, find_packages
INFO = {'name': 'mecode',
'version': '0.0.1',
}
setup(
name=INFO['name'],
version=INFO['version'],
author='Jack Minardi',
packages=find_packages(),
zip_safe=False,
maintainer='Jack Minardi',
maintainer_email='jack@minardi.org',
)
| mit | Python | |
f6b9a0c75a3b5b37b74856226c8210717def606f | Implement astroid trajectory | bit0001/trajectory_tracking,bit0001/trajectory_tracking | src/trajectory/astroid_trajectory.py | src/trajectory/astroid_trajectory.py | #!/usr/bin/env python
from math import cos, pi, sin
from .trajectory import Trajectory
class AstroidTrajectory(object, Trajectory):
def __init__(self, radius, period):
Trajectory.__init__(self)
self.radius = radius
self.period = period
def get_position_at(self, t):
super(Astr... | mit | Python | |
a9091a140ff158b79b05da5c20e18a0f1368d3d9 | add missing package init file | gonicus/gosa,gonicus/gosa,gonicus/gosa,gonicus/gosa | backend/src/gosa/backend/plugins/two_factor/filter/__init__.py | backend/src/gosa/backend/plugins/two_factor/filter/__init__.py | # This file is part of the GOsa project.
#
# http://gosa-project.org
#
# Copyright:
# (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.
__import__('pkg_resources').declare_namespace(__name__)
| lgpl-2.1 | Python | |
846ec085ff7bc1f5be250ac1ac2df87534bbc5c9 | add gunicorn.conf.py | linventifatelier/cartoterra,linventifatelier/cartoterra,linventifatelier/cartoterra | deploy/gunicorn.conf.py | deploy/gunicorn.conf.py | import os
def numCPUs():
if not hasattr(os, "sysconf"):
raise RuntimeError("No sysconf detected.")
return os.sysconf("SC_NPROCESSORS_ONLN")
workers = numCPUs() * 2 + 1
bind = "127.0.0.1:8000"
pidfile = "/tmp/gunicorn-demo.pid"
backlog = 2048
logfile = "/home/linventifatelier/earthbuilding/log/gunicorn... | agpl-3.0 | Python | |
5574ddd6aaf6ab041bdb186b1455792bff803731 | Add range to ConditionFactory | WillisXChen/django-oscar,michaelkuty/django-oscar,WillisXChen/django-oscar,michaelkuty/django-oscar,spartonia/django-oscar,sonofatailor/django-oscar,solarissmoke/django-oscar,michaelkuty/django-oscar,django-oscar/django-oscar,spartonia/django-oscar,WillisXChen/django-oscar,django-oscar/django-oscar,sasha0/django-oscar,... | src/oscar/test/factories/offer.py | src/oscar/test/factories/offer.py | import factory
from oscar.core.loading import get_model
__all__ = [
'RangeFactory', 'ConditionFactory', 'BenefitFactory',
'ConditionalOfferFactory',
]
class RangeFactory(factory.DjangoModelFactory):
name = factory.Sequence(lambda n: 'Range %d' % n)
slug = factory.Sequence(lambda n: 'range-%d' % n)
... | import factory
from oscar.core.loading import get_model
__all__ = [
'RangeFactory', 'ConditionFactory', 'BenefitFactory',
'ConditionalOfferFactory',
]
class RangeFactory(factory.DjangoModelFactory):
name = factory.Sequence(lambda n: 'Range %d' % n)
slug = factory.Sequence(lambda n: 'range-%d' % n)
... | bsd-3-clause | Python |
710150538efcb56f2b8e968c58707ce2bbe8431b | add script to fill in ltr termini | glennhickey/teHmm,glennhickey/teHmm | bin/fillTermini.py | bin/fillTermini.py | #!/usr/bin/env python
#Copyright (C) 2014 by Glenn Hickey
#
#Released under the MIT license, see LICENSE.txt
import sys
import os
import argparse
import copy
from pybedtools import BedTool, Interval
"""
Stick a bed interval between pairs of lastz termini. Script written to be used
in conjunction with tsdFinder.py:
... | mit | Python | |
eb8354c67e20aca10e0118efcbd8afb98bbb7dde | add missing kde.py | BIOS-IMASL/bomeba0,bomeba/bomeba0 | bomeba0/visualization/kde.py | bomeba0/visualization/kde.py | """One-dimensional kernel density estimate plots."""
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import gaussian, convolve, convolve2d # pylint: disable=no-name-in-module
from scipy.sparse import coo_matrix
from scipy.stats import entropy
def plot_kde(values, values2=None, contour=True, ax=N... | apache-2.0 | Python | |
418a2104ec20a0b8f651320c1cbea10a533dc44d | Add tools/sys-tools/gdb/cmd_example.py | benquike/cheatsheets,benquike/cheatsheets,benquike/cheatsheets,benquike/cheatsheets,benquike/cheatsheets,benquike/cheatsheets | tools/sys-tools/gdb/cmd_example.py | tools/sys-tools/gdb/cmd_example.py | import gdb
class SavePrefixCommand (gdb.Command):
'''
Save the current breakpoints to a file.
This command takes a single argument, a file name.
The breakpoints can be restored using the 'source' command.
'''
def __init__(self):
super(SavePrefixCommand, self).__init__ ("save breakpoint... | cc0-1.0 | Python | |
61677566ce685379456e7853c69a78ea32353422 | Add auto fixture to make sure that output dir does not exists when tests are run | liumengjun/django-static-precompiler,liumengjun/django-static-precompiler,paera/django-static-precompiler,jaheba/django-static-precompiler,paera/django-static-precompiler,jaheba/django-static-precompiler,paera/django-static-precompiler,jaheba/django-static-precompiler,paera/django-static-precompiler,jaheba/django-stati... | static_precompiler/tests/conftest.py | static_precompiler/tests/conftest.py | from static_precompiler.settings import ROOT, OUTPUT_DIR
import shutil
import os
import pytest
@pytest.fixture(autouse=True)
def _no_output_dir(request):
""" Make sure that output dir does not exists. """
path = os.path.join(ROOT, OUTPUT_DIR)
if os.path.exists(path):
shutil.rmtree(path)
def... | mit | Python | |
6a6a76ff5274b01ae8570ae7b1a4153b8705100f | move worker func | adrn/StreamMorphology,adrn/StreamMorphology,adrn/StreamMorphology | streammorphology/freqmap/mpi_util.py | streammorphology/freqmap/mpi_util.py | # coding: utf-8
""" Utilities for running frequency mapping with MPI (map) """
from __future__ import division, print_function
__author__ = "adrn <adrn@astro.columbia.edu>"
# Standard library
import os
from collections import OrderedDict
# Third-party
import numpy as np
from astropy.utils import isiterable
# Proj... | mit | Python | |
422b9458d26866b9f6692ddb0ccf2305c3ac6ea7 | Add an extra file to the surrogates experiments. | negrinho/deep_architect,negrinho/deep_architect | dev/surrogates/plots.py | dev/surrogates/plots.py | import darch.search_logging as sl
import darch.visualization as vi
import numpy as np
import seaborn as sns; sns.set()
# checking these across time.
log_lst = sl.read_search_folder('./logs/cifar10_medium/run-0')
xkey = 'epoch_number'
ykey = 'validation_accuracy'
num_lines = 8
time_plotter = vi.LinePlot(xlabel='time_in... | mit | Python | |
2bcf71638dba9a252378c251bbd32e6f72f74028 | Add integration test | resmo/cloudstack,jcshen007/cloudstack,wido/cloudstack,GabrielBrascher/cloudstack,jcshen007/cloudstack,GabrielBrascher/cloudstack,mufaddalq/cloudstack-datera-driver,resmo/cloudstack,DaanHoogland/cloudstack,GabrielBrascher/cloudstack,wido/cloudstack,mufaddalq/cloudstack-datera-driver,resmo/cloudstack,resmo/cloudstack,jcs... | test/integration/smoke/test_pvlan.py | test/integration/smoke/test_pvlan.py | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | apache-2.0 | Python | |
0e2c7c255043d7ccc5042a8e4905557f2d43e2ca | Add Mandrill backend | hator/django-templated-email,hator/django-templated-email | templated_email/backends/mandrill.py | templated_email/backends/mandrill.py | import vanilla_django
from django.core.mail import EmailMessage
from django.conf import settings
from django.utils.translation import ugettext as _
# Make sure you have Mandrill as your email backend
class TemplateBackend(vanilla_django.TemplateBackend):
def __init__(self, *args, **kwargs):
vanilla_django... | mit | Python | |
8da12f8f269746b086f5d208afb390e304f12e9b | Add stub for submit_glue.py | HazyResearch/metal,HazyResearch/metal | metal/mmtl/submit_glue.py | metal/mmtl/submit_glue.py | import argparse
if __name__ == "__main__":
parser = argparse.ArgumentParser(
description="Evaluate a model and make glue submission bundle", add_help=False
)
parser.add_argument("-mf", "--model-file")
args = parser.parse_args()
| apache-2.0 | Python | |
e1f8358e09cd3299effc112544206361d5a6c7dd | Add migration for latest-ing | thrive-refugee/thrive-refugee,thrive-refugee/thrive-refugee,thrive-refugee/thrive-refugee | refugee_manager/migrations/0003_auto_20141108_1609.py | refugee_manager/migrations/0003_auto_20141108_1609.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('refugee_manager', '0002_volunteer_mailing_address'),
]
operations = [
migrations.AlterModelOptions(
name='assess... | mit | Python | |
660e0955979b7d11b7442a00747673700413bf1d | Add a test of spline filtering vs. matrix solving. | mdhaber/scipy,rgommers/scipy,andyfaff/scipy,lhilt/scipy,mdhaber/scipy,jamestwebber/scipy,grlee77/scipy,jamestwebber/scipy,aeklant/scipy,perimosocordiae/scipy,perimosocordiae/scipy,person142/scipy,zerothi/scipy,WarrenWeckesser/scipy,anntzer/scipy,perimosocordiae/scipy,Stefan-Endres/scipy,andyfaff/scipy,vigna/scipy,jor-/... | scipy/ndimage/tests/test_splines.py | scipy/ndimage/tests/test_splines.py | """Tests for spline filtering."""
from __future__ import division, print_function, absolute_import
import numpy as np
import pytest
from numpy.testing import assert_almost_equal
from scipy import ndimage
def get_spline_knot_values(order):
"""Knot values to the right of a B-spline's center."""
knot_values =... | bsd-3-clause | Python | |
da0794fd63960fa8a836e27ab540cd9f8b8713d7 | Test program for issue #81 | WojciechMula/pyahocorasick,pombredanne/pyahocorasick,WojciechMula/pyahocorasick,pombredanne/pyahocorasick,pombredanne/pyahocorasick,pombredanne/pyahocorasick,WojciechMula/pyahocorasick,WojciechMula/pyahocorasick | unresolved_bugs/bug_81.py | unresolved_bugs/bug_81.py | # -*- coding: utf-8 -*-
"""
Aho-Corasick string search algorithm.
Author : Wojciech Muła, wojciech_mula@poczta.onet.pl
WWW : http://0x80.pl
License : public domain
"""
import os
import sys
import ahocorasick
try:
range = xrange # for Py2
except NameError:
pass
def get_memory_usa... | bsd-3-clause | Python | |
1d4137d43f1b91400d1347d131f56b1698163337 | Create rockpaper.py | jovian34/j34rockpaper | rockpaper.py | rockpaper.py | import players
def showdown(human_choice, computer_guess, h_obj, c_obj):
if (human_choice, computer_guess) == (1, 3):
print('Rock crushes scissors. Human Wins!')
print('-------------------------------------')
h_obj.add_to_score()
elif (human_choice, computer_guess) == (1, 2):
pr... | apache-2.0 | Python | |
48fc7cad7eb4cec0b928aba3daca7e934d46d87c | Add unit tests for sdnvpn | opnfv/functest,mywulin/functest,mywulin/functest,opnfv/functest | functest/tests/unit/features/test_sdnvpn.py | functest/tests/unit/features/test_sdnvpn.py | #!/usr/bin/env python
# Copyright (c) 2017 Orange and others.
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Apache License, Version 2.0
# which accompanies this distribution, and is available at
# http://www.apache.org/licenses/LICENSE-2.0
# pylint: d... | apache-2.0 | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.