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 |
|---|---|---|---|---|---|---|---|---|
1ace5845055050c0ac3d9e14a5f76ad78f6778bf | Add python script for calculating fuel pitch fraction. | gridley/moltres,arfc/moltres,arfc/moltres,arfc/moltres,arfc/moltres,lindsayad/moltres,lindsayad/moltres,lindsayad/moltres,lindsayad/moltres,gridley/moltres,gridley/moltres,gridley/moltres | python/calc_fuel_pitch_fraction.py | python/calc_fuel_pitch_fraction.py | import sympy as sp
import sys
def calc_spacing(R, n):
x = sp.symbols('x')
Af = 0
Am = 0
for m in range(2*n - 1):
if m % 2 == 0:
Af += sp.pi * (R/n * (m/2 + x))**2
if m % 2 == 1:
Af -= sp.pi * (R/n * (m+1)/2)**2
for m in range(2*n):
if m % 2 == 0:
... | lgpl-2.1 | Python | |
975493d0376dd565242718c588ce0d24eca8b923 | add initial script for copying local solutions to the baseline directory | OpenFAST/r-test,OpenFAST/r-test | newBaselineSolutions.py | newBaselineSolutions.py | """
"""
import sys
import os
import shutil
##### Helper functions
def exitWithError(error):
print(error)
sys.exit(1)
def exitWithDirNotFound(dir):
exitWithError("Directory does not exist: {}\n".format(dir))
##### Main
sourceDir = sys.argv[1]
targetDir = sys.argv[2]
machine = sys.argv[3]
compiler = sys.... | apache-2.0 | Python | |
3646ca1fc66a174d787ffd4a7569f48bc8f23cf5 | Update downladable clang to r335091. | jbedorf/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,karllessard/tensorflow,dancingdan/tensorflow,xzturn/tensorflow,jalexvig/tensorflow,snnn/tensorflow,Bismarrck/tensorflow,aselle/tensorflow,Bismarrck/tensorflow,tensorflow/tensorflow,caisq/tensorflow,frreiss/tensorflow-fred,ppwwyyxx/tensorflow,freedomtan/tensor... | third_party/clang_toolchain/download_clang.bzl | third_party/clang_toolchain/download_clang.bzl | """ Helpers to download a recent clang release."""
def _get_platform_folder(os_name):
os_name = os_name.lower()
if os_name.startswith('windows'):
return 'Win'
if os_name.startswith('mac os'):
return 'Mac'
if not os_name.startswith('linux'):
fail('Unknown platform')
return 'Linux_x64'
def _downlo... | """ Helpers to download a recent clang release."""
def _get_platform_folder(os_name):
os_name = os_name.lower()
if os_name.startswith('windows'):
return 'Win'
if os_name.startswith('mac os'):
return 'Mac'
if not os_name.startswith('linux'):
fail('Unknown platform')
return 'Linux_x64'
def _downlo... | apache-2.0 | Python |
bfd85c18e788c4e89569f7a35fa85d80d3bcd031 | Add the IPython version helper | astrofrog/reducer,astrofrog/reducer,StuartLittlefair/reducer,StuartLittlefair/reducer,mwcraig/reducer | reducer/ipython_version_helper.py | reducer/ipython_version_helper.py | from __future__ import (division, print_function, absolute_import,
unicode_literals)
from IPython import version_info
def ipython_version_as_string():
"""
The IPython version is a tuple (major, minor, patch, vendor). We only
need major, minor, patch.
"""
return ''.join([st... | bsd-3-clause | Python | |
cd7822eb0017a59e71fb98e395228f891282082f | Revert r10641 | smalyshev/pywikibot-core,PersianWikipedia/pywikibot-core,wikimedia/pywikibot-core,Darkdadaah/pywikibot-core,h4ck3rm1k3/pywikibot-core,hasteur/g13bot_tools_new,jayvdb/pywikibot-core,icyflame/batman,valhallasw/pywikibot-core,emijrp/pywikibot-core,hasteur/g13bot_tools_new,happy5214/pywikibot-core,magul/pywikibot-core,happ... | pywikibot/families/commons_family.py | pywikibot/families/commons_family.py | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikimedia Commons family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'commons'
self.langs = {
'commons': 'commons.wikimedia.org',
}
... | # -*- coding: utf-8 -*-
__version__ = '$Id$'
from pywikibot import family
# The Wikimedia Commons family
class Family(family.Family):
def __init__(self):
family.Family.__init__(self)
self.name = 'commons'
self.langs = {
'commons': 'commons.wikimedia.org',
}
... | mit | Python |
f110fdd778b450a0bed2b8bfb68f12648c4fd3e7 | add base_tester.py | clburlison/vendored,clburlison/vendored | tests/base_tester.py | tests/base_tester.py | # -*- coding: utf-8 -*-
"""
This is a utility script designed to allow you to run either py2 or py3 via:
/some/path/to/python base_tester.py
in order to verify TLS 1.2 support and the version of openssl that python is
linked against.
Thank you to Hanno Böck for providing https://fancyssl.hboeck.de/ for free.
"""
... | mit | Python | |
f2044b0771f278c2a0de5cb69783b264a2d2363d | Add clustering metrics calculator file. | theovasi/browsewiki,theovasi/browsewiki,theovasi/browsewiki | cluster_metrics.py | cluster_metrics.py | "Calculates Silhouette coefficient and Calinski-Harabaz index for a kmeans model."
import os, sys
import argparse, joblib
from sklearn import metrics
def cluster_metrics(data_file_path):
if not os.path.exists(data_file_path + '/kmodel.txt'):
print('No k-means model file found.')
sys.exit(0)
kmo... | mit | Python | |
3b182032ae092560b2423e77f657ec0794ce38e6 | Add new users to all deployments | cboling/xos,wathsalav/xos,cboling/xos,open-cloud/xos,opencord/xos,xmaruto/mcord,open-cloud/xos,wathsalav/xos,opencord/xos,wathsalav/xos,opencord/xos,zdw/xos,jermowery/xos,jermowery/xos,zdw/xos,zdw/xos,cboling/xos,wathsalav/xos,open-cloud/xos,xmaruto/mcord,zdw/xos,jermowery/xos,xmaruto/mcord,xmaruto/mcord,cboling/xos,cb... | planetstack/model_policies/model_policy_User.py | planetstack/model_policies/model_policy_User.py | from core.models import *
def handle(user):
deployments = Deployment.objects.all()
site_deployments = SiteDeployments.objects.all()
site_deploy_lookup = defaultdict(list)
for site_deployment in site_deployments:
site_deploy_lookup[site_deployment.site].append(site_deployment.deployment)
user_deploy_lookup = de... | apache-2.0 | Python | |
7e7bd440a1e3f585464df3458070528d0100d456 | Add helper to run requested Python script | gdb/pyseidon,gdb/pyseidon | pyseidon/handlers/__init__.py | pyseidon/handlers/__init__.py | import pyseidon
import sys
def handle_script():
import runpy
"""
Allow the client to run an arbitrary Python script.
Here's sample usage:
```
def expensive_setup():
...
if __name__ == '__main__':
expensive_setup()
import pyseidon.handlers
pyseidon.handlers.handle_script()
```
"""
def handler():... | mit | Python | |
c022bffe21dce408cd348e69796da4dcc573af23 | Add tests for errors.py | Akrog/gcs-client | tests/test_errors.py | tests/test_errors.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Copyright 2015 Red Hat, 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 ... | apache-2.0 | Python | |
87172e2b9e0143cf164dc34c26c69fc4eda7dd1e | Add initial block list for ad_block functionality | seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase | seleniumbase/config/ad_block_list.py | seleniumbase/config/ad_block_list.py | """
For use with SeleniumBase ad_block functionality.
Usage:
On the command line:
"pytest SOME_TEST.py --ad_block"
From inside a test:
self.ad_block()
If using the command line version, the ad_block functionality gets
activated after "self.wait_for_ready_state_complete()" is called,
which is always r... | mit | Python | |
c7cdb6750ac3a927fe773f7d86be94d24df937b1 | Add Choice module | Didero/DideRobot | commands/Choice.py | commands/Choice.py | import random
from CommandTemplate import CommandTemplate
class Command(CommandTemplate):
triggers = ['choice', 'choose']
helptext = "Helps you make a choice between options in a comma-separated list"
def execute(self, message):
"""
:type message: IrcMessage.IrcMessage
"""
replytext = None
if message.m... | mit | Python | |
0a4bc484b465b2cfa0d763026a161ab7a92a3abb | Create squreRootBi.py | crazyhottommy/some-unorganized-old-scripts,crazyhottommy/some-unorganized-old-scripts,crazyhottommy/some-unorganized-old-scripts | python_scripts/squreRootBi.py | python_scripts/squreRootBi.py | def squreRootBi(x, epsilon):
'''assume x>=0 and epsilon > 0
Return y s.t y*y is within epsilon of x'''
assert x>= 0, 'x must be non-negative, not' + str(x)
assert epsilon > 0 , 'epsilon must be positive, not' + str(epsilon)
low = 0
high= max (x, 1.0) # incase x is smaller than 1, 0.5**2=0.25
... | mit | Python | |
645316b5583a69c834c3f6800007eadf2c6d8fed | test ra package | postatum/ra,brandicted/ra,ramses-tech/ra | tests/test_ra.py | tests/test_ra.py |
def test_api(mocker, test_raml):
import ra
raml = test_raml('simple')
app = mocker.Mock()
api = ra.api(raml, app)
assert isinstance(api, ra.dsl.APISuite)
| apache-2.0 | Python | |
2d4f09fe8c31aa2b996e71565292d5ef249986c7 | Add a small tool to answer questions like "Why does target A depend on target B". | yitian134/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,ropik/... | tools/gyp-explain.py | tools/gyp-explain.py | #!/usr/bin/env python
# Copyright (c) 2011 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
"""Prints paths between gyp targets.
"""
import json
import os
import sys
import time
from collections import deque
def usage():... | bsd-3-clause | Python | |
5e32d890fe0762163f1edab6672df91e7d461d8f | Check if a given sequence of moves for a robot is circular or not (py) | MayankAgarwal/GeeksForGeeks | check-if-a-given-sequence-of-moves-for-a-robot-is-circular-or-not.py | check-if-a-given-sequence-of-moves-for-a-robot-is-circular-or-not.py | from operator import add
import math
moves = raw_input("Enter the moves: ")
start_position = [0,0]
current_position = [0,0]
'''
heading = [1,90] - 1 step North
[1, -90] - 1 step South
[1,0] - East
[1,360] - West
'''
heading = [1,0]
for move in moves:
if move.upper() == "G":
angle = heading[1]
ste... | apache-2.0 | Python | |
7e1113801b04c7cc7300ee0cdebea25d0ea190a6 | Create scrap.py | alangfiles/graphscraper | scrap.py | scrap.py | import urllib2
import json
from bs4 import BeautifulSoup
base_url = ""
starting_page = ""
json_export = '{ "pages": [ \n'
index = 0
url_list = []
url_list.append(base_url+starting_page)
urls_tested = []
for url in url_list:
page_json = '{ "page" : \n { "url": "' + url + '", '
urls_tested.append(url) #add this u... | mit | Python | |
2eec69e94538d16adea4b6c0193a4cb9cd68cfd6 | Add utility to dump pairs of frames from a list of videos | achalddave/frame-pairs,achalddave/frame-pairs | dump_frame_pairs.py | dump_frame_pairs.py | """Dump pairs of frames from videos."""
import argparse
import logging
import random
import sys
import os
from collections import namedtuple
import cv2
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('video_list',
default=None,
help='New-line separat... | mit | Python | |
4c7536d6f2c5c8b6f1c76a8fb6af062f3cfebf6c | add setup.py | blcook223/dummy_data | setup.py | setup.py | from setuptools import setup
setup(name='dummy_data',
version='0.0.0',
description='Generate dummy data ',
url='http://github.com/blcook223/dummy_data',
author='Benjamin Cook',
author_email='benjamin.l.cook@gmail.com',
license='MIT',
packages=['dummy_data'],
zip_safe=Fal... | mit | Python | |
b253d58d9feb614e00bdff3b41e087eafd0bfc5d | Bump version. | subhaoi/kioskuser,bradleyg/django-ajaximage,subhaoi/kioskuser,subhaoi/kioskuser,bradleyg/django-ajaximage,bradleyg/django-ajaximage | setup.py | setup.py | import os
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
setup(
name='django-ajaximage',
version='0.1.17',
description='Add ajax image upload functionality with a progress bar to file input fields within Django admin. Images are opti... | import os
from setuptools import setup
f = open(os.path.join(os.path.dirname(__file__), 'README.md'))
readme = f.read()
f.close()
setup(
name='django-ajaximage',
version='0.1.16-rohanza',
description='Add ajax image upload functionality with a progress bar to file input fields within Django admin. Images ... | mit | Python |
4f4a30e9d0be7b282be6a5378d67b9d5cad047bc | Add classdata for bayes | kevinwilde/WildeBot,kevinwilde/WildeBot,kevinwilde/WildeBot,kevinwilde/WildeBot | bayes/classdata.py | bayes/classdata.py | # Name: Kevin Wilde (kjw731)
# Date: May 23, 2016
# Description: Sentiment Analysis with Naive Bayes Classifiers
#
# All group members were present and contributing during all work on this
# project. (I worked alone.)
#
# Class to hold class data. Necessary to define in separate module because
# I will be pickling inst... | mit | Python | |
4e396326c2c053713bc6699ff572cd96669fa041 | Add setup.py | ludios/tagmyrebase,ludios/tagmyrebase | setup.py | setup.py | #!/usr/bin/env python3
from distutils.core import setup
setup(
name="tagmyrebase",
version="2.0.0",
description="Utility to tag HEAD and the upstream commit after a rebase",
scripts=["tagmyrebase"],
)
| mit | Python | |
af07e75b3f13970b16b8e8c8509e4e83a2dbfd18 | Add setup.py | epayet/playlist_kreator,epayet/playlist_kreator | setup.py | setup.py | # Always prefer setuptools over distutils
from setuptools import setup, find_packages
# To use a consistent encoding
from codecs import open
from os import path
from playlist_kreator import VERSION
here = path.abspath(path.dirname(__file__))
# Get the long description from the README file
with open(path.join(here, '... | mit | Python | |
247c57b08f9f7baf8d0fb71ca323ac60005f280f | Initialize setup file for microservice | chrswt/vicarious-microservice | setup.py | setup.py | from setuptools import find_packages, setup
setup(name='pig_latin_microservice',
version='1.0',
description='Vicarious Pig Latin Microservice Project',
author='Christopher Tham',
platforms=['any'],
license='MIT',
packages=find_packages())
| mit | Python | |
5c09bc5cd1611c81c70db7248a45fcbb10c61d71 | add setup.py | robertchase/spindrift,robertchase/spindrift | setup.py | setup.py | from setuptools import find_packages
from distutils.core import setup
setup(
name='spindrift',
version='1.0.0',
packages=find_packages(exclude=['tests']),
description='A rest framework',
long_description="""
Documentation
-------------
You can see the project and documentation at the `GitHub re... | mit | Python | |
d976725de01d2691c42b796d30c69c42d2934c07 | Update setup.py | blabla1337/skf-flask,akaasjager/skf-flask,dpnl87/skf-flask,dpnl87/skf-flask,blabla1337/skf-flask,blabla1337/skf-flask,akaasjager/skf-flask,dpnl87/skf-flask,blabla1337/skf-flask,akaasjager/skf-flask,blabla1337/skf-flask,akaasjager/skf-flask | setup.py | setup.py | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='owasp-skf',
version='1.3.14',
description='The OWASP Security Knowledge Framework',
url='https://github.com/blabla1337/skf-flask',
author='Glenn ten Cate, Riccardo ten Cate',
author_email='gte... | try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(name='owasp-skf',
version='1.3.12',
description='The OWASP Security Knowledge Framework',
url='https://github.com/blabla1337/skf-flask',
author='Glenn ten Cate, Riccardo ten Cate',
author_email='gte... | agpl-3.0 | Python |
85a7279c08b1997b5d2483106a10a0c428d44458 | Add setup.py. | FelixLoether/python-sharer | setup.py | setup.py | from setuptools import setup, Command
import subprocess
class PyTest(Command):
user_options = []
def initialize_options(self):
pass
def finalize_options(self):
pass
def run(self):
errno = subprocess.call(['py.test'])
raise SystemExit(errno)
setup(
name='python-s... | mit | Python | |
a45885947fa10c9143beec5294870e801fff8bc6 | Create apg_de.py | t3sl4/APGTool-gui | apg_de.py | apg_de.py | #!/usr/bin/env python2
#
#
#
# by t3sl4/tesl23
#
import base64
import random
import string
from Crypto.Cipher import AES
decoded = ''
def makepasswd(bsize, key, spass, username, passfor, saveto, pad, dec, low, upp, pun):
if bsize == '32':
bsize = 32
elif bsize == '16':
bsize = 16
elif bsize == '24':
... | cc0-1.0 | Python | |
77f6f387d2eda3accc2969a02daf5c8315016d6b | Fix #5: add setup.py for PyPI package | snowblink14/smatch | setup.py | setup.py | #!/usr/bin/env python
import sys
import os
try:
from setuptools import setup, find_packages
except ImportError:
from disutils.core import setup
here = os.path.abspath(os.path.dirname(__file__))
with open(os.path.join(here, "README.md")) as f:
README = f.read()
setup(name="smatch",
version="1.0",
... | mit | Python | |
c09aae8181fd7ab706b6fca84e64830e76007687 | add setup.py file | jesford/cluster-lensing | setup.py | setup.py | import os
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
DESCRIPTION = "Galaxy Cluster Properties and Weak Lensing Profiles"
LONG_DESCRIPTION = """
cluster-lensing: galaxy cluster halo calculations
======================================================
This package inclu... | mit | Python | |
b89347a6aaec2f5d74f788b966ead5cc8a2ae37e | add setup.py | vpelletier/python-libusb1,vpelletier/python-libusb1 | setup.py | setup.py | from distutils.core import setup
setup(name='python-libusb1',
description='a Python wrapper around libusb-1.0',
version='0.0.1',
author='vpelletier',
url='http://github.com/vpelletier/python-libusb1',
py_modules=['libusb1','usb1'],
)
| lgpl-2.1 | Python | |
e0550aa39f76eb186be41914afb484d135d0257c | Add setup.py | inean/LinkHeader | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='LinkHeader',
version='0.1',
description='The parsing and formatting of Link Headers',
author='Michael Burrows',
author_email='mjb@asplake.co.uk ',
url='http://bitbucket.org/asplake/link_header',
py_modul... | mit | Python | |
62facc7d99797330fbd03b55a88ba12c60c23ea2 | add setup.py | encorehu/django-home,encorehu/django-home,encorehu/django-home | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
setup(
name='home',
version="0.1",
author='encorehu',
author_email='huyoo353@126.com',
description='a django project specific app.',
url='https://github.com/encorehu/django-home',
packages=find_packages(),
package_dir={'... | mit | Python | |
56f1a366c8a482c63782933514222376bb827a8a | add setup.py | ldo/dbussy | setup.py | setup.py | #+
# Distutils script to install DBussy. Invoke from the command line
# in this directory as follows:
#
# python3 setup.py build
# sudo python3 setup.py install
#
# Written by Lawrence D'Oliveiro <ldo@geek-central.gen.nz>.
#-
import distutils.core
distutils.core.setup \
(
name = "DBussy",
version = ... | lgpl-2.1 | Python | |
475458a322525f429b31fe54f1295685b2195c39 | Add setup.py | scolby33/address_extractor | setup.py | setup.py | """Setup module for the address_extractor package"""
import setuptools
import codecs # To use a consistent encoding
import os
import re
#################################################################
PACKAGES = setuptools.find_packages(where='src')
META_PATH = os.path.join('src', 'address_extractor', '__init__.py'... | mit | Python | |
72af391ec00facfbabc8ac89ff3bea1b54799d97 | Add plot of days per year with precip | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | htdocs/plotting/auto/scripts/p50.py | htdocs/plotting/auto/scripts/p50.py | import matplotlib
matplotlib.use('agg')
import matplotlib.pyplot as plt
import psycopg2.extras
import pyiem.nws.vtec as vtec
from pyiem.network import Table as NetworkTable
import numpy as np
import pytz
PDICT = {
"hadgem=a1b": "HADGEM A1B",
"cnrm=a1b" : "CNRM A1B",
"echam5=a1b" : "ECHAM5 A1B",
"ec... | mit | Python | |
a950eb82f62f98900db8dcc4f30fd444f760b6e0 | Bump for 1.9.9-04 | bopo/cookiecutter-django,schacki/cookiecutter-django,mistalaba/cookiecutter-django,hairychris/cookiecutter-django,thisjustin/cookiecutter-django,pydanny/cookiecutter-django,ad-m/cookiecutter-django,asyncee/cookiecutter-django,hackebrot/cookiecutter-django,trungdong/cookiecutter-django,luzfcb/cookiecutter-django,hackebr... | setup.py | setup.py | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Our version ALWAYS matches the version of Django we support
# If Django has a new release, we branch, tag, then update this setting after the tag.
version = '1.9.9-04'
if sys.a... | #!/usr/bin/env python
import os
import sys
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
# Our version ALWAYS matches the version of Django we support
# If Django has a new release, we branch, tag, then update this setting after the tag.
version = '1.9.9-03'
if sys.a... | bsd-3-clause | Python |
1d693c0e32cb3247e861c819d389f51fc2fc6be0 | add setup.py | encorehu/webqq | setup.py | setup.py | #!/usr/bin/env python
#-*- coding:utf-8 -*-
from setuptools import setup, find_packages
setup(
name = "webqq",
version="0.1.0",
packages = find_packages(),
zip_safe = False,
description = "python 2.7.x webqq lib, for fun.",
long_description = "python 2.7.x webqq lib, f... | mit | Python | |
e3c32fb0775a17d47906c5fdd48a9809a00430b3 | include kismon.windows in the setup.py | krzotr/kismon,Kismon/kismon,vaginessa/kismon | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='kismon',
version='0.2',
description='PyGTK based kismet client',
author='Patrick Salecker',
author_email='mail@salecker.org',
url='http://www.salecker.org/software/kismon/en',
license='BSD',
packages=['kismon', 'kismon.windows'],
scripts=['bin... | #!/usr/bin/env python
from distutils.core import setup
setup(name='kismon',
version='0.2',
description='PyGTK based kismet client',
author='Patrick Salecker',
author_email='mail@salecker.org',
url='http://www.salecker.org/software/kismon/en',
license='BSD',
packages=['kismon'],
scripts=['bin/kismon'],
platfo... | bsd-3-clause | Python |
392458f6d5cea3d723d86d6238d1f1b46cfc95a5 | Add a setup.py | zain/jogging | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(name='jogging',
version='0.1',
description='Jogging makes logging in django easier',
author='Zain',
author_email='zain@inzain.net',
url='',
packages = ['jogging',],
package_dir = {'jogging':'jogging'},
)
| mit | Python | |
e67e2ca56310c35a0a8bb30ecb9fceeb55dcc9f5 | Add setup.py | tiwilliam/sverigesradio | setup.py | setup.py | # -*- coding: utf8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
version='0.3',
name='sverigesradio',
description='Python bindings for Sveriges Radio API',
author='William Tisäter',
author_email='william@defunct.cc',
packages=['sverig... | mit | Python | |
ec087b033b8e9b4172a4d5e77a26a10ea16ffb64 | Add setup.py | LuqueDaniel/pybooru,buzzbyte/pybooru,LuqueDaniel/pybooru,buzzbyte/pybooru | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
from setuptools import find_packages
__author__ = 'Daniel Luque <danielluque14@gmail.com>'
__version__ = '1.0.0'
setup(
name='pybooru',
version=__version__,
author=__author__
author_email="danielluque14@gmail.com",
url="http://mundogeek.net/tu... | mit | Python | |
072d6a2ad1ab293427aadd074c5485483f701eb1 | Add a setuptools wrapper | smarkets/statprof,bos/statprof.py | setup.py | setup.py | #!/usr/bin/env python
import os
from setuptools import find_packages, setup
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
setup(
name = "statprof",
version = "0.1",
author = "Jeff Muizelaar",
author_email = "jmuizelaar@mozilla.com",
description = ("Statis... | lgpl-2.1 | Python | |
8500effa4ade8ecb3eff0501a749a869467a8768 | Add setup.py | omf2097/pyomftools,omf2097/pyomftools | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
setup(
name='OMFTools',
version='0.1',
description='Tools for modifying OMF2097 files',
author='Tuomas Virtanen',
author_email='katajakasa@gmail.com',
url='https://github.com/omf2097/pyomftools',
packages=['omftools', 'omftools.pyshado... | mit | Python | |
7b8f76d53fb820e4fd429f880557bf52ec5dc4be | Add setup | Rhathe/fixtureupper | setup.py | setup.py | from setuptools import setup
setup(
name='fixture-generator',
version='0.0.1',
packages=['fixture-generator'],
url='https://github.com/Rhathe/Fixture-Generator',
license='MIT',
author='Ramon Sandoval',
description='SqlAlchemy Fixture Generator',
long_description='SqlAlchemy Fixture Gene... | mit | Python | |
12dce1474946d1a9bc41681af6dc2723ecfcc7f1 | Add setup.py | carlcarl/grabflickr | setup.py | setup.py | from setuptools import setup
from setuptools import find_packages
with open('requirements.txt') as f:
required = f.read().splitlines()
setup(
name='downflickr',
description='Download photoset of flickr using gevent',
long_description=open('README.rst').read(),
version='0.0.1',
author='carlcarl... | mit | Python | |
3cd157c12224ba8cee54be36f7da92f30c38964f | Update issue 120 Moving parsers and serializer implementations into rdflib.plugins package | yingerj/rdflib,yingerj/rdflib,avorio/rdflib,marma/rdflib,dbs/rdflib,marma/rdflib,marma/rdflib,RDFLib/rdflib,RDFLib/rdflib,dbs/rdflib,avorio/rdflib,RDFLib/rdflib,avorio/rdflib,marma/rdflib,RDFLib/rdflib,armandobs14/rdflib,yingerj/rdflib,ssssam/rdflib,ssssam/rdflib,ssssam/rdflib,armandobs14/rdflib,dbs/rdflib,avorio/rdfli... | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
# Install rdflib
from rdflib import __version__
setup(
name = 'rdflib',
version = __version__,
description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.",
author = "Daniel 'eikeo... | #!/usr/bin/env python
from distutils.core import setup
# Install rdflib
from rdflib import __version__
setup(
name = 'rdflib',
version = __version__,
description = "RDFLib is a Python library for working with RDF, a simple yet powerful language for representing information.",
author = "Daniel 'eikeo... | bsd-3-clause | Python |
43947b54e8774306ead2fa86ef587526f058e572 | Add manage.py for quick access to management commands | zostera/django-modeltrans,zostera/django-modeltrans | manage.py | manage.py | #!/usr/bin/env python
import os
import sys
if __name__ == "__main__":
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "tests.app.settings")
try:
from django.core.management import execute_from_command_line
except ImportError:
# The above import may fail for some other reason. Ensure that th... | bsd-3-clause | Python | |
23f797bcf30bb7de26d1558e5eafc7818141f640 | Create __init__.py | marcoikeda/attribution_model | attribution/__init__.py | attribution/__init__.py | mit | Python | ||
34530a8b60bc1ebfe9bdd56250ecf23e05b8c935 | add setup.py | OpenTouch/vsphere-client | setup.py | setup.py | #!/usr/bin/env python2.7
from setuptools import setup
long_description = """\
vSphere Client for Python is pure-Python implementation of
collection tools to access to VMware's vSphere API.
It provides both a Python API and a CLI to manage vSphere.
"""
pkgdir = {'': 'src'}
setup(
name = 'vsphere',
version = ... | apache-2.0 | Python | |
6b3c3a2e0dd4f47fc014f86fa0e85d38e11366b7 | Create run_test.py | kwilcox/staged-recipes,jakirkham/staged-recipes,chrisburr/staged-recipes,igortg/staged-recipes,cpaulik/staged-recipes,basnijholt/staged-recipes,johanneskoester/staged-recipes,birdsarah/staged-recipes,NOAA-ORR-ERD/staged-recipes,guillochon/staged-recipes,jochym/staged-recipes,synapticarbors/staged-recipes,ceholden/stage... | recipes/pytest-django/run_test.py | recipes/pytest-django/run_test.py | import django
from django.conf import settings
settings.configure(INSTALLED_APPS=['pytest_django', 'django.contrib.contenttypes', 'django.contrib.auth'])
django.setup()
import pytest_django
| bsd-3-clause | Python | |
4a7a103204989af7e2b6bc97a4109d81beebd34c | Add python_requires to setup.py (#2465) | pydata/xarray,jhamman/xarray,jhamman/xarray,pydata/xarray,markelg/xray,jhamman/xray,pydata/xarray,jhamman/xarray,shoyer/xarray,shoyer/xarray,shoyer/xray,markelg/xray,chunweiyuan/xarray,xray/xray,markelg/xray | setup.py | setup.py | #!/usr/bin/env python
import sys
from setuptools import find_packages, setup
import versioneer
DISTNAME = 'xarray'
LICENSE = 'Apache'
AUTHOR = 'xarray Developers'
AUTHOR_EMAIL = 'xarray@googlegroups.com'
URL = 'https://github.com/pydata/xarray'
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'License :: O... | #!/usr/bin/env python
import sys
from setuptools import find_packages, setup
import versioneer
DISTNAME = 'xarray'
LICENSE = 'Apache'
AUTHOR = 'xarray Developers'
AUTHOR_EMAIL = 'xarray@googlegroups.com'
URL = 'https://github.com/pydata/xarray'
CLASSIFIERS = [
'Development Status :: 4 - Beta',
'License :: O... | apache-2.0 | Python |
09d2d84c73bd3c232bdc78d1c46be43c676ef7ac | remove email | adriangb/scikeras | setup.py | setup.py | #!/usr/bin/env python
"""The setup script."""
from setuptools import setup, find_packages
with open("README.md") as readme_file:
readme = readme_file.read()
with open("HISTORY.md") as history_file:
history = history_file.read()
with open("requirements.txt") as f:
requirements = f.read().splitlines()
s... | mit | Python | |
f0ad13539a040fe019cc299979caa5764b581faf | Add simple setuptools based build script | qnorsten/svtplay-dl,OakNinja/svtplay-dl,selepo/svtplay-dl,leakim/svtplay-dl,dalgr/svtplay-dl,leakim/svtplay-dl,olof/svtplay-dl,leakim/svtplay-dl,iwconfig/svtplay-dl,qnorsten/svtplay-dl,dalgr/svtplay-dl,spaam/svtplay-dl,OakNinja/svtplay-dl,olof/svtplay-dl,OakNinja/svtplay-dl,selepo/svtplay-dl,iwconfig/svtplay-dl,spaam/s... | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
import sys
setup(
name = "svtplay-dl",
version = "0.9.2013.03.06", # FIXME - extract from svtplay-dl
packages = find_packages(
'lib',
exclude=["tests", "*.tests", "*.tests.*"]),
package_dir = {'': 'lib'},
scripts =... | mit | Python | |
7fb257178f032feaa13a7761cf242f8be202b07d | Add setup.py | BuzzFeedNews/bikeshares | setup.py | setup.py | import sys
from setuptools import setup, find_packages
setup(
name="bikeshares",
version="0.0.0",
description="Standardized access to the data published by bicycle sharing programs.",
long_description="",
classifiers=[
"Development Status :: 3 - Alpha",
"Intended Audience :: Develop... | mit | Python | |
1f16c8d71ef550c92f3f1851a8b1a94285675eb2 | add setup.py | zencoder/zencoder-py,torchbox/zencoder-py,pbs/zencoder-py | setup.py | setup.py |
from distutils.core import setup
setup(name='zencoder',
version='0.1',
description='Integration library for Zencoder',
author='Alex Schworer',
author_email='alex.schworer@gmail.com',
url='http://github.com/schworer/zencoder-py',
license="MIT License",
packages=['zencoder']
... | mit | Python | |
e5023ed11a8aff0b84b330bad2796bb28f93483b | add basic setuptools setup.py | opmuse/opmuse,opmuse/opmuse,opmuse/opmuse,opmuse/opmuse | setup.py | setup.py | import os.path
import re
import subprocess
from setuptools import setup
from pip.req import parse_requirements
project_root = os.path.dirname(os.path.abspath(__file__))
git_version = subprocess.check_output(['git', 'describe', 'HEAD', '--tags']).strip().decode('utf8')
git_url = 'https://raw.github.com/opmuse/opmuse/%s... | agpl-3.0 | Python | |
4364b952701b6ce3883094676ea9d8d93757cbde | Add bare setup.py | teddywing/django-sneak-peek | setup.py | setup.py | import os
from setuptools import setup, find_packages
setup(
name='django-sneak-peek',
version='0.0.1',
description='',
long_description='',
url='',
license='MIT',
author='Teddy Wing',
author_email='',
include_package_data=True,
packages=find_packages(),
classifiers=[],
) | mit | Python | |
14aa0c03673abea5cbd954aafb909b581c8ce849 | Add setup.py | vshymanskyy/blynk-library-python | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup
setup(
name = "blynk-library-python",
version = "0.1.0", #blynk.lib.__version__
description = "Blynk library",
platforms = "any",
url = "http://www.blynk.cc",
license = "MIT",
author = "Volodymyr Shyman... | mit | Python | |
1b96dbf3882301dbfa8d8d102f1cead2e2b0447d | bump version | autopulated/yotta,eyeye/yotta,BlackstoneEngineering/yotta,BlackstoneEngineering/yotta,autopulated/yotta,eyeye/yotta,stevenewey/yotta,stevenewey/yotta,ARMmbed/yotta,ARMmbed/yotta | setup.py | setup.py | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
import os
from setuptools import setup, find_packages
# Utility function to cat in a file (used for the README)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
... | # Copyright 2014-2015 ARM Limited
#
# Licensed under the Apache License, Version 2.0
# See LICENSE file for details.
import os
from setuptools import setup, find_packages
# Utility function to cat in a file (used for the README)
def read(fname):
return open(os.path.join(os.path.dirname(__file__), fname)).read()
... | apache-2.0 | Python |
6e601d9720139bbb04c1fd30dc6552730270ba0a | Fix the versioned Django, we're grabbing 1.4.1 off the requirements.txt | sunlightlabs/billy,loandy/billy,mileswwatkins/billy,sunlightlabs/billy,openstates/billy,loandy/billy,loandy/billy,openstates/billy,mileswwatkins/billy,mileswwatkins/billy,sunlightlabs/billy,openstates/billy | setup.py | setup.py | #!/usr/bin/env python
from setuptools import setup, find_packages
from billy import __version__
long_description = open('README.rst').read()
setup(name='billy',
version=__version__,
packages=find_packages(),
package_data={'billy': ['schemas/*.json',
'schemas/api/*.json'... | #!/usr/bin/env python
from setuptools import setup, find_packages
from billy import __version__
long_description = open('README.rst').read()
setup(name='billy',
version=__version__,
packages=find_packages(),
package_data={'billy': ['schemas/*.json',
'schemas/api/*.json'... | bsd-3-clause | Python |
e38e0789f65e174770aeca44abec9e3e47503cbb | include user-extensions.js containing flex methods into installation | bs00336332/robotframework-seleniumlibrary,ramsundhar20/robotframework-seleniumlibrary,bs00336332/robotframework-seleniumlibrary,sourabhkt/robotframework-seleniumlibrary,sagarpabba/robotframework-seleniumlibrary,jadooman/robotframework-seleniumlibrary,qitaos/robotframework-seleniumlibrary,bs00336332/robotframework-selen... | setup.py | setup.py | #!/usr/bin/env python
from distutils.core import setup
from os.path import abspath, dirname, join
execfile(join(dirname(abspath(__file__)), 'src', 'SeleniumLibrary', 'version.py'))
setup(name = 'robotframework-seleniumlibrary',
version = VERSION,
description = 'Web testing library for Robot... | #!/usr/bin/env python
from distutils.core import setup
from os.path import abspath, dirname, join
execfile(join(dirname(abspath(__file__)), 'src', 'SeleniumLibrary', 'version.py'))
setup(name = 'robotframework-seleniumlibrary',
version = VERSION,
description = 'Web testing library for Robot... | apache-2.0 | Python |
cd9aea1addd55be7c9d8adfb91137d9581af9317 | Add minimum setup.py | gchandrasa/expertsender | setup.py | setup.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
try:
from setuptools import setup
except ImportError:
from distutils.core import setup
setup(
name='expertsender',
version='0.1.0',
description='Python API library for the ExpertSender email platform',
author='Gilang Chandrasa',
author_email=... | mit | Python | |
fb4034da63c69e653441417e6037fe72127f0a8a | Create step1.py | gangulydebojyoti/method-for-security-system-bypassing | step1.py | step1.py | from Tkinter import *
import time
import sqlite3 as lite
import random
root=Tk()
a4=[]
m1=0
m2=0
m3=0
a5=[]
a6=''
from tkMessageBox import *
def check1():
h=en.get()
if(h==a6):
t2=time.time()
t3=t2-t1
print "t3 is: ",t3
cur.execute("insert into pro_crypto values(?,?,?,?)",(m1,m2,... | unlicense | Python | |
dd37a333a84fb6c636a26a3d96d56925c0ec06a8 | Create cleaner.py | DataScience-appliquee/Plateforme-prediction-velov,DataScience-appliquee/Plateforme-prediction-velov | Meteo/meteociel/cleaner.py | Meteo/meteociel/cleaner.py | #!/usr/bin/python
# -*- coding: UTF-8 -*-
def cleaner(source):
"Clean all source code to make something sweet or at least, trying to"
# Brute encode to utf-8 because source code looks like a mix between iso-8859-1 and something else (kind of a joke isn't it ?)
# It seems to be ok but at html.fromString(tr... | mit | Python | |
7736c11b005f9baefc7ba9c35884deddc56bc191 | Test file to check if twistd is working | HubbeKing/Hubbot_Twisted | test.tac | test.tac | from twisted.application import internet, service
from hubbebot import *
application = service.Application("AllTheHubbeBots")
internet.TCPClient("irc.desertbus.org", 6667, HubbeBotFactory()).setServiceParent(application)
| mit | Python | |
24e914da9e0e38728d862ecc82f8443a3b88e68f | add expression to improve the domain | Danisan/odoo-1,fdvarela/odoo8,tvtsoft/odoo8,xzYue/odoo,sysadminmatmoz/OCB,hopeall/odoo,papouso/odoo,hip-odoo/odoo,savoirfairelinux/odoo,patmcb/odoo,goliveirab/odoo,lombritz/odoo,avoinsystems/odoo,makinacorpus/odoo,shingonoide/odoo,acshan/odoo,sve-odoo/odoo,jfpla/odoo,MarcosCommunity/odoo,bkirui/odoo,camptocamp/ngo-addo... | bin/tools/expression.py | bin/tools/expression.py | #!/usr/bin/env python
def _is_operator( element ):
return isinstance( element, str ) and element in ['&','|']
def _is_leaf( element ):
return isinstance( element, tuple ) and len( element ) == 3 and element[1] in ['=', '<>', '!=', '<=', '<', '>', '>=', 'like', 'not like', 'ilike', 'not ilike']
def _is_expre... | agpl-3.0 | Python | |
8a86c1c9bec625b58c2dc4914837b2e3a0ef175c | Add FDIC | lukerosiak/inspectors-general,divergentdave/inspectors-general | inspectors/fdic.py | inspectors/fdic.py | #!/usr/bin/env python
import datetime
import logging
import os
from urllib.parse import urljoin
from bs4 import BeautifulSoup
from utils import utils, inspector
# http://www.fdicoig.gov
# Oldest report: 1998
# options:
# standard since/year options for a year range to fetch from.
#
# Notes for IG's web team:
#
R... | cc0-1.0 | Python | |
545ce0a57b92aaaa26e6f960990648dd05b637af | Add a new task for batch generation and loading. | SalesforceFoundation/CumulusCI,SalesforceFoundation/CumulusCI | cumulusci/tasks/bulkdata/generate_and_load_data.py | cumulusci/tasks/bulkdata/generate_and_load_data.py | import os
from cumulusci.tasks.salesforce import BaseSalesforceApiTask
from cumulusci.tasks.bulkdata import LoadData
from cumulusci.utils import temporary_dir
from cumulusci.core.config import TaskConfig
from cumulusci.core.utils import import_global
from cumulusci.core.exceptions import TaskOptionsError
class Genera... | bsd-3-clause | Python | |
cec3eebace1ad5f236761bdd98bef0d5ac52d3ba | Replace list-to-set cast with normal set literal | hmflash/Cura,fieldOfView/Cura,Curahelper/Cura,ynotstartups/Wanhao,ynotstartups/Wanhao,Curahelper/Cura,fieldOfView/Cura,hmflash/Cura | cura/Settings/MaterialSettingsVisibilityHandler.py | cura/Settings/MaterialSettingsVisibilityHandler.py | # Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.Settings.Models.SettingVisibilityHandler import SettingVisibilityHandler
class MaterialSettingsVisibilityHandler(SettingVisibilityHandler):
def __init__(self, parent = None, *args, **kwargs):
super()... | # Copyright (c) 2016 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.Settings.Models.SettingVisibilityHandler import SettingVisibilityHandler
class MaterialSettingsVisibilityHandler(SettingVisibilityHandler):
def __init__(self, parent = None, *args, **kwargs):
super()... | agpl-3.0 | Python |
8094267faf7a9cdbd1520383f51e537e159cdca2 | Add unit column unit tests. | kdeldycke/cqlengine-relation-columns | tests.py | tests.py | # -*- coding: utf-8 -*-
""" Test relation columns.
"""
import math
import uuid
from unittest import TestCase
import arrow
from cqlengine import columns
from cqlengine.models import Model
def truncate_to_milliseconds(date_time):
""" Truncate datetime to milliseconds and return an arrow object.
Used to emula... | bsd-3-clause | Python | |
71f073ca40459c56ce666650af982a9f08d613f1 | Add support for PodDisruptionBudget | fiaas/k8s | k8s/models/pod_disruption_budget.py | k8s/models/pod_disruption_budget.py | #!/usr/bin/env python
# -*- coding: utf-8
from __future__ import absolute_import
import six
from .common import ObjectMeta
from ..base import Model
from ..fields import Field, ListField
class PodDisruptionBudgetMatchExpressions(Model):
key = Field(six.text_type)
operator = Field(six.text_type)
values = ... | apache-2.0 | Python | |
4c46b7b86171b89f0c85f6d48eaf6d24e702c6f9 | Add a Tasks sample that demonstrates Service accounts. | jonparrott/oauth2client,clancychilds/oauth2client,googleapis/oauth2client,jonparrott/oauth2client,clancychilds/oauth2client,googleapis/google-api-python-client,googleapis/google-api-python-client,googleapis/oauth2client,google/oauth2client,google/oauth2client | samples/service_account/tasks.py | samples/service_account/tasks.py | #!/usr/bin/python2.4
# -*- coding: utf-8 -*-
#
# Copyright (C) 2012 Google Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless ... | apache-2.0 | Python | |
b541d4c9ab1d7f199cc551179f454c5c3a53625f | add tests for "patch" command | red-hat-storage/rhcephpkg,red-hat-storage/rhcephpkg | rhcephpkg/tests/test_patch.py | rhcephpkg/tests/test_patch.py | import os
import pytest
from rhcephpkg import Patch
TESTS_DIR = os.path.dirname(os.path.abspath(__file__))
FIXTURES_DIR = os.path.join(TESTS_DIR, 'fixtures')
class FakePatch(object):
pass
class TestPatch(object):
def test_wrong_branch(self, monkeypatch):
monkeypatch.setenv('HOME', FIXTURES_DIR)
... | mit | Python | |
ed27c75a2d3400955d8e3e85d08d480db3fd3657 | Add generate_vocab script | chunfengh/seq2seq,shashankrajput/seq2seq,google/seq2seq,shashankrajput/seq2seq,liyi193328/seq2seq,kontact-chan/seq2seq,kontact-chan/seq2seq,liyi193328/seq2seq,liyi193328/seq2seq,liyi193328/seq2seq,chunfengh/seq2seq,kontact-chan/seq2seq,shashankrajput/seq2seq,chunfengh/seq2seq,google/seq2seq,kontact-chan/seq2seq,liyi193... | seq2seq/scripts/generate_vocab.py | seq2seq/scripts/generate_vocab.py | #! /usr/bin/env python
#pylint: disable=invalid-name
"""
Generate vocabulary for a tokenized text file.
"""
import argparse
import collections
parser = argparse.ArgumentParser(description="Generate vocabulary for a tokenized text file.")
parser.add_argument("--input_file", type=str, help="path to the input file", re... | apache-2.0 | Python | |
21eac65d8a252e9d3cc83d97a9f270ef0078be9c | add indexer | gavin09/peen_movie,gavin09/peen_movie,gavin09/peen_movie | indexer.py | indexer.py | # -*- coding: utf-8 -*-
import json
import os
import argparse
import sys
import re
class Indexer:
def __init__(self):
self.forward_index = dict()
def create_index(self, raw_data, keyword):
keyword_utf8 = keyword.decode('utf-8')
if not self.forward_index.has_key(keyword_utf8):
... | apache-2.0 | Python | |
37e87ad6eed85e83a2199f851e8b07135d779909 | Add wsgi script | fmarco76/DiscourseSSO,fmarco76/DiscourseSSO | DiscourseSSO.wsgi | DiscourseSSO.wsgi | # Copyright 2015 INFN
# All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicab... | apache-2.0 | Python | |
261b2879c830aeaa21351c34a78dc0b5262436c2 | Create 7kyu_simple_fun138_similarity.py | Orange9000/Codewars,Orange9000/Codewars | Solutions/7kyu/7kyu_simple_fun138_similarity.py | Solutions/7kyu/7kyu_simple_fun138_similarity.py | def similarity(a, b):
return len(set(a).intersection(set(b)))/len(set(a)|set(b))
| mit | Python | |
c5427bc00678e9f9122b8201b79af2ab454288f3 | Create popServer.py | GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde,GiladE/birde | popServer.py | popServer.py | __author__ = 'JontyHome'
import poplib
class popServer():
# host = ''
# username = ''
# password = ''
# port = 0
def __init__(self, username, password, host, port):
self.host = host
self.username = username
self.password = password
self.port = port
self.ma... | mit | Python | |
eaf59371ea4ec9d5ceb98331c1a4b58a54558d3b | Solve Ch3_Q5 - Implement queue using two stacks | roommen/CtCI | fourth_edition/ch3_stacks_and_queues/python/3.5.py | fourth_edition/ch3_stacks_and_queues/python/3.5.py | '''
Implement a MyQueue class which implements a queue using two stacks.
'''
stack1 = list()
stack2 = list()
max_ = 10
def push(val):
global stack1, stack2
if len(stack1) == max_:
if len(stack2) == 0:
for x in stack1[::-1]:
stack2.append(x)
stack1 = []
... | mit | Python | |
39668777b1f5579b37746521ba95b506bea08d1a | Prepare v1.2.295.dev | qk4l/Flexget,ibrahimkarahan/Flexget,grrr2/Flexget,jawilson/Flexget,patsissons/Flexget,jawilson/Flexget,Danfocus/Flexget,vfrc2/Flexget,grrr2/Flexget,jawilson/Flexget,jacobmetrick/Flexget,LynxyssCZ/Flexget,antivirtel/Flexget,cvium/Flexget,dsemi/Flexget,tsnoam/Flexget,malkavi/Flexget,Flexget/Flexget,sean797/Flexget,vfrc2/... | flexget/_version.py | flexget/_version.py | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | """
Current FlexGet version.
This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by
release scripts in continuous integration. Should (almost) never be set manually.
The version should always be set to the <next release version>.dev
The jenkins release job wi... | mit | Python |
f3bbb887d76ec428c4926f94c119220cc8c63cf8 | add offline script to ingest IDOT archived road conditions | akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem | scripts/roads/idot_csv_ingest.py | scripts/roads/idot_csv_ingest.py | """Be able to merge a CSV file that IDOT provides"""
import pandas as pd
import psycopg2
import sys
import datetime
pgconn = psycopg2.connect(database='postgis', host='localhost', user='mesonet',
port=5555)
cursor = pgconn.cursor()
xref = {}
cursor.execute("""SELECT idot_id, segid from roads_... | mit | Python | |
8c17c087ee1674bccfd8d34d382eca508fdf7cd9 | Create train.py | simonbr73/nyc-subway-finder | train.py | train.py | import time
import calendar
class Train:
"""Creates a train object that represents one subway train we have data for. The methods
contained in this class interpret information we get from the MTA's feed, such as route number,
direction, arrival time, and upcoming stops.
"""
def __init__(self, trip... | mit | Python | |
c2d1344c518dcf7c4cd20786bfa7cf649b977ca5 | Create new package (#7378) | LLNL/spack,EmreAtes/spack,krafczyk/spack,LLNL/spack,iulian787/spack,iulian787/spack,tmerrick1/spack,krafczyk/spack,matthiasdiener/spack,tmerrick1/spack,EmreAtes/spack,iulian787/spack,LLNL/spack,matthiasdiener/spack,EmreAtes/spack,EmreAtes/spack,matthiasdiener/spack,matthiasdiener/spack,mfherbst/spack,tmerrick1/spack,tm... | var/spack/repos/builtin/packages/perl-file-slurper/package.py | var/spack/repos/builtin/packages/perl-file-slurper/package.py | ##############################################################################
# Copyright (c) 2013-2017, Lawrence Livermore National Security, LLC.
# Produced at the Lawrence Livermore National Laboratory.
#
# This file is part of Spack.
# Created by Todd Gamblin, tgamblin@llnl.gov, All rights reserved.
# LLNL-CODE-64... | lgpl-2.1 | Python | |
766eff22b8632ae8548fe30e5b44bc8ca5de29b5 | Create near_ten.py | dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey,dvt32/cpp-journey | Python/CodingBat/near_ten.py | Python/CodingBat/near_ten.py | # http://codingbat.com/prob/p165321
def near_ten(num):
return (num % 10 <= 2) or (num % 10 >= 8)
| mit | Python | |
e143ef5663f1fed402c9c941bd8b18adbf72c02b | add calebasse.url_utils module | ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide,ZTH1970/alcide | calebasse/urls_utils.py | calebasse/urls_utils.py | from django.core.urlresolvers import RegexURLPattern, RegexURLResolver
class DecoratedURLPattern(RegexURLPattern):
def resolve(self, *args, **kwargs):
result = super(DecoratedURLPattern, self).resolve(*args, **kwargs)
if result:
result.func = self._decorate_with(result.func)
ret... | agpl-3.0 | Python | |
be0e28cfc4628491ba6a2c176cb5458279b94f8d | Create simple_fun_#270_evil_code_medal.py | Kunalpod/codewars,Kunalpod/codewars | simple_fun_#270_evil_code_medal.py | simple_fun_#270_evil_code_medal.py | #Kunal Gautam
#Codewars : @Kunalpod
#Problem name: Simple Fun #270: Evil Code Medal
#Problem level: 7 kyu
def get_sec(time):
return time[0]*3600 + time[1]*60 + time[2]
def evil_code_medal(user_time, gold, silver, bronze):
user_time = get_sec(user_time.split(':'))
gold = get_sec(gold.split(':'))
silver... | mit | Python | |
48d0578f32505702d63adc3c580749c4eb18326d | Create most_common_characters.py | sookoor/PythonInterviewPrep | most_common_characters.py | most_common_characters.py | import operator
def most_common_characters(input_string, N):
count = {}
for char in inputString:
if char in count:
count[char] += 1
else:
count[char] = 1
sorted_freq = sorted(count.iteritems(), key=operator.itemgetter(1), reverse=True)
for i in rang... | mit | Python | |
c06de87c53a8e42660b885de9d14796cc928c687 | add pwgen | anokata/pythonPetProjects,anokata/pythonPetProjects,anokata/pythonPetProjects,anokata/pythonPetProjects | pwgen.py | pwgen.py | for a in range(10):
for b in range(10):
for c in range(10):
for d in range(10):
for e in range(10):
for f in range(10):
for g in range(10):
for h in range(10):
print("{}{}{}{}{... | mit | Python | |
e47094d2b499ee2667384328194cd8f35ce17022 | Add a forgotten file | holkasepsem/python-lessons | sinus_subpixel/sinus_subpixel.py | sinus_subpixel/sinus_subpixel.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import pygame
from pygame.locals import *
from subpixel_surface import *
from math import sin, cos
DOTS = 100
def main():
pygame.init()
screen = pygame.display.set_mode((640, 480))
clock = pygame.time.Clock()
dot = pygame.image.load("dot.png")
dot_... | mit | Python | |
a3d7561c3c8930a55f7496c817876e4cf6b187bd | Add migration I forgot | fedspendingtransparency/data-act-broker-backend,fedspendingtransparency/data-act-broker-backend | dataactcore/migrations/versions/cd1025ac9399_add_columns_to_AwardProcurement.py | dataactcore/migrations/versions/cd1025ac9399_add_columns_to_AwardProcurement.py | """add columns to AwardProcurement
Revision ID: cd1025ac9399
Revises: a767facf8ea8
Create Date: 2017-09-18 15:05:52.772251
"""
# revision identifiers, used by Alembic.
revision = 'cd1025ac9399'
down_revision = 'a767facf8ea8'
branch_labels = None
depends_on = None
from alembic import op
import sqlalchemy as sa
def u... | cc0-1.0 | Python | |
51cf34acc3566804948804f835961b2b281dfbd1 | add 07geometry_shader_blending | mackst/opengl-samples | OpenGL-Examples/07geometry_shader_blending.py | OpenGL-Examples/07geometry_shader_blending.py | # -*- coding: utf-8 -*-
# OpenGL example code - Geometry Shader and Blending
# Uses a geometry shader to expand points to billboard quads.
# The billboards are then blended while drawing to create a galaxy
# made of particles.
import ctypes
import numpy as np
from OpenGL.GL import *
from OpenGL.GL import shaders
fr... | mit | Python | |
1728765f6a1858086030abb6a96c47bc8c336e6e | Add natural optimizer. | GPflow/GPflow | gpflow/training/natgrad_optimizer.py | gpflow/training/natgrad_optimizer.py | import tensorflow as tf
from . import optimizer
class NatGradOptimizer(optimizer.Optimizer):
"""
"""
def __init__(self, gamma):
self._gamma = gamma
@property
def gamma(self):
"""
"""
return self.gamma
def minimize(self, model, session=None, var_list=None... | apache-2.0 | Python | |
36e730ea3d984b8da8081397d4ac0c4dd3bb82f2 | add mongoDB cache demo. | yanbober/SmallReptileTraining | PersistenceSpider/demo_mongodb_persistence.py | PersistenceSpider/demo_mongodb_persistence.py | import pymongo
'''
Python3 MongoDB数据库持久化演示
'''
class MongoDBPersistence(object):
def __init__(self):
self.conn = None
self.database = None
def connect(self, database):
try:
self.conn = pymongo.MongoClient('mongodb://localhost:27017/')
self.database = self.conn[... | mit | Python | |
930630e886d8666844639e7cf9d273bd8e4c2115 | Create rev_shell_server.py | panagiks/reverse_shell,panagiks/RSPET | Server/rev_shell_server.py | Server/rev_shell_server.py | #!/usr/bin/python
import socket
import subprocess
import sys
def main():
try:
RHOST = sys.argv[1]
RPORT = 9000
except:
print ("Must provide hotst")
sys.exit()
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect((RHOST,RPORT))
while True:
#recie... | mit | Python | |
921e4fe305e7d39347635c99fd4f9cc84ed7e534 | Add ImageTextAnnotation migration | comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django | app/grandchallenge/annotations/migrations/0005_imagetextannotation.py | app/grandchallenge/annotations/migrations/0005_imagetextannotation.py | # Generated by Django 2.2.2 on 2019-07-11 10:35
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import uuid
class Migration(migrations.Migration):
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_M... | apache-2.0 | Python | |
9a567d283cc2e72e3590305f81b3879d7f2557fa | include json_io.py from another older project. | Who8MyLunch/HackingForMovieTrends | json_io.py | json_io.py |
from __future__ import division, print_function, unicode_literals
import numpy as np
import simplejson as json
#
# Helpers.
#
MARKER = ':ndar!'
class NumpyJSONEncoder(json.JSONEncoder):
def default(self, obj):
if isinstance(obj, np.ndarray):
name = '%s.%s' % (MARKER, obj.dtype.name)
... | mit | Python | |
55cc66bc6d1c2c6280bb959bea23e14b4f26c741 | Add Two Numbers problem | zsmountain/leetcode,zsmountain/leetcode,zsmountain/leetcode | add_two_numbers.py | add_two_numbers.py | '''
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.
Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8
'''
'''
The main idea is quite simple, but need ... | apache-2.0 | Python | |
a3f23b804265bd59473873c2aa071188a73a9a9e | Test fail cases for custom codegen | cpcloud/slumba,cpcloud/slumba | slumba/tests/test_numbaext.py | slumba/tests/test_numbaext.py | import pytest
from numba import boolean, njit, int64, TypingError
from slumba.numbaext import not_null, sizeof, unsafe_cast
def test_sizeof_invalid():
dec = njit(int64(int64))
with pytest.raises(TypingError):
@dec
def bad_sizeof(x):
return sizeof(x)
def test_not_null_invalid():... | apache-2.0 | Python | |
a1ae01bada1d500bd7f9f7f0f2deb458bfa6d2d1 | Add the serial python test | Pitchless/arceye,Pitchless/arceye | bin/serial_test.py | bin/serial_test.py | #!/usr/bin/env python
from serial import Serial
from time import sleep
ser = Serial('/dev/ttyUSB0', 9600)
sleep(3) # wait for the board to reset
print "start"
print "write"
ser.write("hello\n")
print "read"
line = ser.readline()
print "GOT %s"%line
print "write world..."
ser.write("world\n")
print "read"
line = ser... | apache-2.0 | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.