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
66c33c880d1e5f20a23e01937f8c88f5b66bfc5c
fix SQL error on non existing column
ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo,ygol/odoo
addons/website_membership/models/membership.py
addons/website_membership/models/membership.py
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MembershipLine(models.Model): _inherit = 'membership.membership_line' def get_published_companies(self, limit=None): if not self.ids: return [] limit_c...
# -*- coding: utf-8 -*- # Part of Odoo. See LICENSE file for full copyright and licensing details. from odoo import models class MembershipLine(models.Model): _inherit = 'membership.membership_line' def get_published_companies(self, limit=None): if not self.ids: return [] limit_c...
agpl-3.0
Python
d5cb2a37ea77b15c5725d6ebf8e0ab79f3bea613
Fix interface in historian service interface
genome/flow-workflow,genome/flow-workflow,genome/flow-workflow
flow_workflow/historian/service_interface.py
flow_workflow/historian/service_interface.py
import logging from flow_workflow.historian.messages import UpdateMessage LOG = logging.getLogger(__name__) class WorkflowHistorianServiceInterface(object): def __init__(self, broker=None, exchange=None, routing_key=None): self.broker = broker self.exchange = ex...
import logging from flow_workflow.historian.messages import UpdateMessage LOG = logging.getLogger(__name__) class WorkflowHistorianServiceInterface(object): def __init__(self, broker=None, exchange=None, routing_key=None): self.broker = broker self.exchange = ex...
agpl-3.0
Python
26f5adea28f81ebbe830d4a207958320e0b40520
update version
hammerlab/gtfparse,hammerlab/gtfparse,hammerlab/gtftools,hammerlab/gtftools
gtfparse/__init__.py
gtfparse/__init__.py
# Copyright (c) 2015. Mount Sinai School of Medicine # # 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 o...
# Copyright (c) 2015. Mount Sinai School of Medicine # # 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 o...
apache-2.0
Python
85dc28b44def27658e282d621749598ec80ea420
Fix typo
telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari,telefonicaid/fiware-cosmos-ambari
ambari-server/src/main/python/TeardownAgent.py
ambari-server/src/main/python/TeardownAgent.py
#!/usr/bin/env python ''' 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")...
#!/usr/bin/env python ''' 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")...
apache-2.0
Python
31f55658d7495bf1fed8a5a466ffe54502a0348c
Make countersong check for language-dependent spells
GrognardsFromHell/TemplePlus,GrognardsFromHell/TemplePlus,GrognardsFromHell/TemplePlus,GrognardsFromHell/TemplePlus,GrognardsFromHell/TemplePlus
tpdatasrc/tpgamefiles/scr/tpModifiers/countersong.py
tpdatasrc/tpgamefiles/scr/tpModifiers/countersong.py
from templeplus.pymod import PythonModifier from toee import * import tpdp def Remove(char, args, evt_obj): if evt_obj.is_modifier('Countersong'): args.condition_remove() return 0 # built-in hook only checks for Sonic descriptor def Lang(char, args, evt_obj): lang = 1 << (D20STD_F_SPELL_DESCRIPTOR_LANGUAGE_DEPEN...
from templeplus.pymod import PythonModifier from toee import * import tpdp def Remove(char, args, evt_obj): if evt_obj.is_modifier('Countersong'): args.condition_remove() return 0 countersong = PythonModifier() countersong.ExtendExisting('Countersong') countersong.AddHook(ET_OnConditionAddPre, EK_NONE, Remove, ()...
mit
Python
e535def2bc9b7de203e1fd37fc592cdeed1be526
fix selection bug
facebook/PathPicker,facebook/PathPicker,Shenil/PathPicker,slackorama/PathPicker,alecjacobson/PathPicker,Shenil/PathPicker,pallavagarwal07/PathPicker,slackorama/PathPicker,facebook/PathPicker,Shenil/PathPicker,alecjacobson/PathPicker,slackorama/PathPicker,pallavagarwal07/PathPicker,pallavagarwal07/PathPicker,alecjacobso...
src/choose.py
src/choose.py
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # # @nolint from __future...
# Copyright (c) 2015-present, Facebook, Inc. # All rights reserved. # # This source code is licensed under the BSD-style license found in the # LICENSE file in the root directory of this source tree. An additional grant # of patent rights can be found in the PATENTS file in the same directory. # # @nolint from __future...
mit
Python
0a44fc07efb902912e22e72979f69fbab200cd32
Update version 0.6.8 -> 0.6.9
dwavesystems/dimod,dwavesystems/dimod
dimod/package_info.py
dimod/package_info.py
__version__ = '0.6.9' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
__version__ = '0.6.8' __author__ = 'D-Wave Systems Inc.' __authoremail__ = 'acondello@dwavesys.com' __description__ = 'A shared API for binary quadratic model samplers.'
apache-2.0
Python
6d86e8565a9ea1aac07b8a1470e2f3b724b981c2
fix for use on python 2.1
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Lib/bsddb/test/test_misc.py
Lib/bsddb/test/test_misc.py
"""Miscellaneous bsddb module test cases """ import os import sys import unittest try: # For Python 2.3 from bsddb import db, dbshelve except ImportError: # For earlier Pythons w/distutils pybsddb from bsddb3 import db, dbshelve #---------------------------------------------------------------------- ...
"""Miscellaneous bsddb module test cases """ import os import sys import unittest try: # For Python 2.3 from bsddb import db, dbshelve except ImportError: # For earlier Pythons w/distutils pybsddb from bsddb3 import db, dbshelve from test.test_support import verbose #--------------------------------...
mit
Python
d7b8186f0f4115307753d0aef038ec61155c83bc
Fix typo in python
ikinz/Benchmark-exjobb,ikinz/Benchmark-exjobb,ikinz/Benchmark-exjobb,ikinz/Benchmark-exjobb,ikinz/Benchmark-exjobb,ikinz/Benchmark-exjobb
Test/Test-IO/python/TestIO.py
Test/Test-IO/python/TestIO.py
#!/usr/bin/python import timeit, sys, io def wrapper(func, *args, **kwargs): def wrapped(): return func(*args, **kwargs) return wrapped def start(file, outfile): input = open(file, 'r') output = open(outfile, 'w') line = input.readline() while line: line = line.replace('Tellu...
#!/usr/bin/python import timeit, sys, io def wrapper(func, *args, **kwargs): def wrapped(): return func(*args, **kwargs) return wrapped def start(file, outfile): #input = open(file, 'r') #output = open(outfile, 'w') line = input.readline() while line: line = line.replace('Tel...
mit
Python
b19429159f3c813297ba2e237abba276045f9ff1
add 0.10.17, mariadb-connector-c dependency (#11044)
iulian787/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,iulian787/spack,iulian787/spack,iulian787/spack,iulian787/spack,LLNL/spack
var/spack/repos/builtin/packages/r-rmysql/package.py
var/spack/repos/builtin/packages/r-rmysql/package.py
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRmysql(RPackage): """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases.""" ...
# Copyright 2013-2019 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class RRmysql(RPackage): """Implements 'DBI' Interface to 'MySQL' and 'MariaDB' Databases.""" ...
lgpl-2.1
Python
bcff742c27904f995d9f5e8a184f0348b58139a5
fix closing bracket
uhuramedia/cookiecutter-django,uhuramedia/cookiecutter-django
{{cookiecutter.repo_name}}/fabfile.py
{{cookiecutter.repo_name}}/fabfile.py
# -*- coding: utf-8 -*- import os import datetime from contextlib import contextmanager from fabric.api import env, run, local, prefix, sudo def live(): """Connects to the server.""" env.hosts = [os.environ.get('{{cookiecutter.repo_name}}_host')] env.user = 'freshmilk' env.cwd = '/var/www...
# -*- coding: utf-8 -*- import os import datetime from contextlib import contextmanager from fabric.api import env, run, local, prefix, sudo def live(): """Connects to the server.""" env.hosts = [os.environ.get('{{cookiecutter.repo_name}}_host')] env.user = 'freshmilk' env.cwd = '/var/www...
bsd-3-clause
Python
88a028663b7688af362a2ebd5c168aaccc5695c0
Comment updates
prat0318/swagger-py,analogue/bravado-core,analogue/bravado,prat0318/bravado-core,vi4m/bravado,stratosgear/bravado,admetricks/bravado-core
bravado/mapping/request.py
bravado/mapping/request.py
from bravado.mapping.operation import log from bravado.mapping.param import unmarshal_param class RequestLike(object): """ Common interface for server side request objects. Subclasses are responsible for providing attrs for __required_attrs__. """ __required_attrs__ = [ 'path', # dict...
from bravado.mapping.operation import log from bravado.mapping.param import unmarshal_param class RequestLike(object): """ Define a common interface for bravado to interface with server side request objects. Subclasses are responsible for providing attrs for __required_attrs__. """ __required...
bsd-3-clause
Python
10a2b3def6936d94e21ac68a15b3ae1428e75e41
Make the disassembler script work on Linux.
mewbak/idc,mewbak/idc
util/dasm.py
util/dasm.py
#!/usr/bin/env python import sys import optparse import subprocess import re def dasm(infile, outfp, verbose = True): command_line = [ 'objdump', '--disassemble', '--disassemble-zeroes', '--disassembler-options=att,suffix', #'--prefix-addresses', '--no-show-raw-insn', '--wide', infile ] p = subpr...
#!/usr/bin/env python import sys import optparse import subprocess import re def dasm(infile, outfp, verbose = True): command_line = [ 'objdump', '--disassemble', '--disassemble-zeroes', '--disassembler-options=att,suffix', '--prefix-addresses', '--no-show-raw-insn', '--wide', inf...
lgpl-2.1
Python
887b03d7587525509d3652ef42b930025194d2ad
Update 2sum.py
UmassJin/Leetcode
Array/2sum.py
Array/2sum.py
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based. Yo...
Given an array of integers, find two numbers such that they add up to a specific target number. The function twoSum should return indices of the two numbers such that they add up to the target, where index1 must be less than index2. Please note that your returned answers (both index1 and index2) are not zero-based. Yo...
mit
Python
dbdfbc18ebadc0a1d50a6513bb982d2e3881036f
Add MAX_TURNS and some more output to train-ml-bot
JWageM/planet-wars,intelligent-systems-course/planet-wars
train-ml-bot.py
train-ml-bot.py
""" Train a machine learning model for the classifier bot. We create a player, and watch it play games against itself. Every observed state is converted to a feature vector and labeled with the eventual outcome (-1.0: player 2 won, 1.0: player 1 won) This is part of the second worksheet. """ from api import State, uti...
""" Train a machine learning model for the classifier bot. We create a player, and watch it play games against itself. Every observed state is converted to a feature vector and labeled with the eventual outcome (-1.0: player 2 won, 1.0: player 1 won) This is part of the second worksheet. """ from api import State, uti...
mit
Python
6454bca66b73efa6e124fce80634fc98bd0b9c25
add new dependencies for python 3.7.6
NaturalSolutions/NsPortal,NaturalSolutions/NsPortal,NaturalSolutions/NsPortal
Back/setup.py
Back/setup.py
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.txt')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'marshmallow==3.3.0', 'pyodbc==4.0.27', 'p...
import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) with open(os.path.join(here, 'README.txt')) as f: README = f.read() with open(os.path.join(here, 'CHANGES.txt')) as f: CHANGES = f.read() requires = [ 'pyodbc==4.0.28', 'pyramid==1.10.4', 'sqla...
mit
Python
d9c9f9c363f5520f37800930efd9eaa1e43daed7
bump version
yerejm/ttt,yerejm/ttt
ttt/__init__.py
ttt/__init__.py
# -*- coding: utf-8 -*- __version__ = '0.3.2'
# -*- coding: utf-8 -*- __version__ = '0.3.1'
isc
Python
aa3a6dd01d7681f92d1be42fb2831126ced7a76e
Update __init__.py
adamcharnock/django-su,PetrDlouhy/django-su,PetrDlouhy/django-su,adamcharnock/django-su
django_su/__init__.py
django_su/__init__.py
import os # The fake password we will use to authenticate su'ed users SECRET_PASSWORD = os.urandom(64) VERSION = (0, 4, 8) __version__ = '.'.join([str(n) for n in VERSION])
import os # The fake password we will use to authenticate su'ed users SECRET_PASSWORD = os.urandom(64) __version__ = '0.4.8'
mit
Python
f623312b5df6e8f201f641f87193075e8d3f70ea
Add version attribute
arameshkumar/nuxeo-drive,IsaacYangSLA/nuxeo-drive,IsaacYangSLA/nuxeo-drive,loopingz/nuxeo-drive,IsaacYangSLA/nuxeo-drive,ssdi-drive/nuxeo-drive,ssdi-drive/nuxeo-drive,IsaacYangSLA/nuxeo-drive,DirkHoffmann/nuxeo-drive,rsoumyassdi/nuxeo-drive,arameshkumar/base-nuxeo-drive,arameshkumar/base-nuxeo-drive,arameshkumar/nuxeo-...
nuxeo-drive-client/nxdrive/__init__.py
nuxeo-drive-client/nxdrive/__init__.py
_version_ = '1.0.0-dev'
lgpl-2.1
Python
c9277fa65afcf513c2e3000193d7837900ff8ee1
Improve logging runtime state poll fail message
opennode/nodeconductor-openstack
src/nodeconductor_openstack/tasks/base.py
src/nodeconductor_openstack/tasks/base.py
from celery import shared_task from nodeconductor.core.tasks import Task from .. import models # TODO: move this signal to itacloud assembly application @shared_task def register_instance_in_zabbix(instance_uuid): from nodeconductor.template.zabbix import register_instance instance = models.Instance.objects...
from celery import shared_task from nodeconductor.core.tasks import Task from .. import models # TODO: move this signal to itacloud assembly application @shared_task def register_instance_in_zabbix(instance_uuid): from nodeconductor.template.zabbix import register_instance instance = models.Instance.objects...
mit
Python
e3035fb91a96a3ff5627b6847203e3dc11fbc78f
Add libunwind-1.2.1 (#8145)
tmerrick1/spack,krafczyk/spack,krafczyk/spack,mfherbst/spack,matthiasdiener/spack,tmerrick1/spack,tmerrick1/spack,iulian787/spack,matthiasdiener/spack,krafczyk/spack,mfherbst/spack,krafczyk/spack,matthiasdiener/spack,LLNL/spack,krafczyk/spack,matthiasdiener/spack,LLNL/spack,LLNL/spack,mfherbst/spack,matthiasdiener/spac...
var/spack/repos/builtin/packages/libunwind/package.py
var/spack/repos/builtin/packages/libunwind/package.py
############################################################################## # Copyright (c) 2013-2018, 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...
############################################################################## # Copyright (c) 2013-2018, 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
77db7bb96686e3308a4061d24c257466d9987405
add delete_project dashboard api.
soasme/rio,soasme/rio,soasme/rio
rio/blueprints/dashboard.py
rio/blueprints/dashboard.py
# -*- coding: utf-8 -*- from slugify import slugify from flask import Blueprint from flask import jsonify from flask_wtf import Form from wtforms import StringField from wtforms.validators import DataRequired from wtforms.validators import ValidationError from wtforms.validators import Length from rio.utils.user impor...
# -*- coding: utf-8 -*- from slugify import slugify from flask import Blueprint from flask import jsonify from flask_wtf import Form from wtforms import StringField from wtforms.validators import DataRequired from wtforms.validators import ValidationError from wtforms.validators import Length from rio.utils.user impor...
mit
Python
91a77b860387ebed146b9e4e604d007bfabf0b9e
Fix potential bug in parameter passing
thaim/ansible,thaim/ansible
lib/ansible/plugins/action/normal.py
lib/ansible/plugins/action/normal.py
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com> # # This file is part of Ansible # # Ansible is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any lat...
mit
Python
e0db9a970c6ea778419cc1f20ca66adedffb7aae
Set HOME, allow errors to pass through to stdout/stderr
hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2,hotosm/osm-export-tool2
utils/mwm.py
utils/mwm.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import shutil import subprocess import tempfile from string import Template from .artifact import Artifact LOG = logging.getLogger(__name__) class MWM(object): name = 'mwm' description = 'maps.me MWM' cmd = Template...
# -*- coding: utf-8 -*- from __future__ import absolute_import import logging import os import shutil import subprocess import tempfile from string import Template from .artifact import Artifact LOG = logging.getLogger(__name__) class MWM(object): name = 'mwm' description = 'maps.me MWM' cmd = Template...
bsd-3-clause
Python
12efb71143a18e191e05a1b5f0e6d7c59854e0ba
fix brampton scraper class name
opencivicdata/scrapers-ca,opencivicdata/scrapers-ca
ca_on_brampton/__init__.py
ca_on_brampton/__init__.py
# coding: utf-8 from utils import CanadianJurisdiction class Brampton(CanadianJurisdiction): jurisdiction_id = u'ocd-jurisdiction/country:ca/csd:3521010/council' geographic_code = 3521010 division_name = u'Brampton' name = u'Brampton City Council' url = 'http://www.brampton.ca'
# coding: utf-8 from utils import CanadianJurisdiction class London(CanadianJurisdiction): jurisdiction_id = u'ocd-jurisdiction/country:ca/csd:3521010/council' geographic_code = 3521010 division_name = u'Brampton' name = u'Brampton City Council' url = 'http://www.brampton.ca'
mit
Python
a4fbc3372a446861f086d847186726b80443f212
add utils for printing results; add ndiff table
azide0x37/CausalInference,laurencium/CausalInference
causalinference/results.py
causalinference/results.py
import numpy as np from scipy.stats import norm class Results(object): def __init__(self, causal): self.causal = causal self.table_width = 80 def _varnames(self, varnums): return ['X'+str(varnum+1) for varnum in varnums] def _make_row(self, entries): col_width = self.table_width // len(entries) f...
import numpy as np from scipy.stats import norm class Results(object): def __init__(self, causal): self.causal = causal def ndiff(self): print self.causal.ndiff def propensity(self): if not hasattr(self.causal, 'pscore'): self.causal.propensity() print 'Coefficients:', self.causal.pscore['coeff...
bsd-3-clause
Python
d0ce2b074ffd603c507069d8a5ab1189fad0ca56
Update a version number from trunk r9016
VcamX/pywikibot-core,npdoty/pywikibot,npdoty/pywikibot,emijrp/pywikibot-core,darthbhyrava/pywikibot-local,magul/pywikibot-core,magul/pywikibot-core,h4ck3rm1k3/pywikibot-core,trishnaguha/pywikibot-core,xZise/pywikibot-core,valhallasw/pywikibot-core,Darkdadaah/pywikibot-core,icyflame/batman,PersianWikipedia/pywikibot-cor...
pywikibot/families/wikia_family.py
pywikibot/families/wikia_family.py
# -*- coding: utf-8 -*- __version__ = '$Id$' import family # The Wikia Search family # user-config.py: usernames['wikia']['wikia'] = 'User name' class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = u'wikia' self.langs = { u'wikia': None,...
# -*- coding: utf-8 -*- __version__ = '$Id$' import family # The Wikia Search family # user-config.py: usernames['wikia']['wikia'] = 'User name' class Family(family.Family): def __init__(self): family.Family.__init__(self) self.name = u'wikia' self.langs = { u'wikia': None,...
mit
Python
69642fbfa143d475b3dcc548bffbda8a6dd6c680
Enable template caching in production
XeryusTC/rotd,XeryusTC/rotd,XeryusTC/rotd
rotd/settings/production.py
rotd/settings/production.py
# -*- coding: utf-8 -*- from .base import * from .util import get_env_setting DEBUG = False DOMAIN = get_env_setting('ROTD_DOMAIN') ALLOWED_HOSTS = [ DOMAIN, ] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": get_env_setting('ROTD_DB_NAME'), ...
# -*- coding: utf-8 -*- from .base import * from .util import get_env_setting DEBUG = False DOMAIN = get_env_setting('ROTD_DOMAIN') ALLOWED_HOSTS = [ DOMAIN, ] DATABASES = { "default": { "ENGINE": "django.db.backends.postgresql_psycopg2", "NAME": get_env_setting('ROTD_DB_NAME'), ...
agpl-3.0
Python
faaf1d64fc8c5b15c346f70288235426f0647757
use /usr/bin/env python to run the script
tracysmith/RGAPepPipe,tracysmith/RGAPepPipe,tracysmith/RGAPepPipe
FulltoSNP.py
FulltoSNP.py
#!/usr/bin/env python import sys import re import itertools import math from Bio import SeqIO #SNP alignment from full Alignment nexus file #Check for correct commandline arguments if len(sys.argv) != 4: print("Usage: FulltoSNP.py <nexus file> <output file> <threshold>") sys.exit(0) #Get filenames InFileNam...
#!/usr/bin/env python2.6 import sys import re import itertools import math from Bio import SeqIO #SNP alignment from full Alignment nexus file #Check for correct commandline arguments if len(sys.argv) != 4: print("Usage: FulltoSNP.py <nexus file> <output file> <threshold>") sys.exit(0) #Get filenames InFile...
mit
Python
d01bb6e89c6fcfe8a17d90f3ace175ad26f921b5
Support CSV files beginning with a byte order mark
git-keeper/git-keeper,git-keeper/git-keeper
git-keeper-core/gkeepcore/local_csv_files.py
git-keeper-core/gkeepcore/local_csv_files.py
# Copyright 2016 Nathan Sommer and Ben Coleman # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is dis...
# Copyright 2016 Nathan Sommer and Ben Coleman # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # This program is dis...
agpl-3.0
Python
1657e46cd5c2a81df4cbb73b292b0bf9072d5c51
Fix test: make sure that Isolation Forest actually make a categorical split
h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,michalkurka/h2o-3,h2oai/h2o-dev,h2oai/h2o-dev,h2oai/h2o-3
h2o-py/tests/testdir_tree/pyunit_tree_irf.py
h2o-py/tests/testdir_tree/pyunit_tree_irf.py
import h2o from h2o.tree import H2OTree from h2o.estimators import H2OIsolationForestEstimator from tests import pyunit_utils def check_tree(tree, tree_number, tree_class = None): assert tree is not None assert len(tree) > 0 assert tree._tree_number == tree_number assert tree._tree_class == tree_clas...
import h2o from h2o.tree import H2OTree from h2o.estimators import H2OIsolationForestEstimator from tests import pyunit_utils def check_tree(tree, tree_number, tree_class = None): assert tree is not None assert len(tree) > 0 assert tree._tree_number == tree_number assert tree._tree_class == tree_clas...
apache-2.0
Python
7e5477682dfc0d907fe55a489c75179a6e4c832b
fix Swale import script
DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations,chris48s/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,DemocracyClub/UK-Polling-Stations,chris48s/UK-Polling-Stations
polling_stations/apps/data_collection/management/commands/import_swale.py
polling_stations/apps/data_collection/management/commands/import_swale.py
from data_collection.management.commands import BaseCsvStationsShpDistrictsImporter class Command(BaseCsvStationsShpDistrictsImporter): srid = 27700 council_id = 'E07000113' districts_name = 'shp/Swale Polling Districts' stations_name = 'Swale 21 Feb 2017 Polling scheme station numbers.csv' electio...
from data_collection.management.commands import BaseShpStationsShpDistrictsImporter class Command(BaseShpStationsShpDistrictsImporter): srid = 27700 council_id = 'E07000113' districts_name = 'shp/Swale Polling Districts' stations_name = 'shp/Swale Polling Stations.shp' #elections = ['local.kent.201...
bsd-3-clause
Python
fc7f51877b6b991ad5a25afb755dd7a35e91dfea
Use get_or_create to avoid duplicate objects
ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend,ministryofjustice/cla_backend
cla_backend/apps/legalaid/migrations/0022_default_contact_for_research_methods.py
cla_backend/apps/legalaid/migrations/0022_default_contact_for_research_methods.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import uuid from cla_common.constants import RESEARCH_CONTACT_VIA def create_default_contact_for_research_methods(apps, schema_editor): ContactResearchMethods = apps.get_model("legalaid", "ContactResearchMethod") ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import uuid from cla_common.constants import RESEARCH_CONTACT_VIA def create_default_contact_for_research_methods(apps, schema_editor): ContactResearchMethods = apps.get_model("legalaid", "ContactResearchMethod") ...
mit
Python
d6a8e42cb3bd963632500541b5e4e71c700c246e
Fix migration
opennode/nodeconductor,opennode/nodeconductor,opennode/nodeconductor
nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py
nodeconductor/cost_tracking/migrations/0006_add_pricelist_backend_ids.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ('cost_tracking', '0005_expand_item_type_size'), ] operations = [ migrations.RenameF...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('contenttypes', '0001_initial'), ('cost_tracking', '0005_expand_item_type_size'), ] operations = [ migrations.RenameF...
mit
Python
0b14f93121f3feaa4433eaf8275f5ad40c646b48
Update NumberPathShuffled.py
hectorpefo/hectorpefo.github.io,hectorpefo/hectorpefo.github.io,hectorpefo/hectorpefo.github.io,hectorpefo/hectorpefo.github.io
_includes/NumberPathShuffled.py
_includes/NumberPathShuffled.py
from random import shuffle N = 100 shufflePeriod = 10000000 print(N) connected = [[]] for i in range(N): connected.append([]) for m in range(1,N+1): # for n in range(1,N+1): for n in range(N,0,-1): if ((not m == n) and (m%n == 0 or n%m == 0)): connected[m].append(n) def explore(path): global longestLength, l...
from random import shuffle N = 100 shufflePeriod = 10000000 print(N) connected = [[]] for i in range(N): connected.append([]) for m in range(1,N+1): # for n in range(1,N+1): for n in range(N,0,-1): if ((not m == n) and (m%n == 0 or n%m == 0)): connected[m].append(n) def explore(path): global longestLength, l...
mit
Python
936382b1744c2a9b5f3082abe9a3e0f2fbba58d0
Return None when an error while reading config occurs
dbaelz/adbons
src/config.py
src/config.py
import yaml SECTION_APP = "app" SECTION_DEVICE = "device" KEY_DEFAULT = "default" def read_value(section, key): try: with open(".adbons.yml", 'r') as ymlfile: config = yaml.safe_load(ymlfile) return config[section][key] except: pass def write_value(section, key, value): ...
import yaml SECTION_APP = "app" SECTION_DEVICE = "device" KEY_DEFAULT = "default" def read_value(section, key): with open(".adbons.yml", 'r') as ymlfile: config = yaml.safe_load(ymlfile) try: return config[section][key] except: return "" def write_value(section, key, value): ...
bsd-2-clause
Python
89a1a37e91ace4af2983e63ef68ff1d22811aa32
Fix syntax error
hackeriet/nfcd,hackeriet/pyhackeriet,hackeriet/pyhackeriet,hackeriet/pyhackeriet,hackeriet/nfcd,hackeriet/nfcd
hackeriet/cardreaderd/__init__.py
hackeriet/cardreaderd/__init__.py
#!/usr/bin/env python from hackeriet import mifare from hackeriet.mqtt import MQTT from hackeriet.door import users import os, logging logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s') door_name = os.getenv("DOOR_NAME", 'hackeriet') door_topic = "hackeriet/door/%s/open" % door_name door_tim...
#!/usr/bin/env python from hackeriet import mifare from hackeriet.mqtt import MQTT from hackeriet.door import users import os, logging logging.basicConfig(level=logging.INFO, format='%(asctime)-15s %(message)s') door_name = os.getenv("DOOR_NAME", 'hackeriet') door_topic = "hackeriet/door/%s/open" % door_name door_tim...
apache-2.0
Python
15403668edf9b81b9dbb2c3b0075416e422ce55c
bump version to dev55
euroscipy/symposion,pydata/symposion,pinax/symposion,pyohio/symposion,toulibre/symposion,mbrochh/symposion,pyconau2017/symposion,pyconau2017/symposion,mbrochh/symposion,faulteh/symposion,TheOpenBastion/symposion,toulibre/symposion,TheOpenBastion/symposion,miurahr/symposion,python-spain/symposion,python-spain/symposion,...
symposion/__init__.py
symposion/__init__.py
__version__ = "1.0b1.dev55"
__version__ = "1.0b1.dev54"
bsd-3-clause
Python
ec14293f02de84a12ce602d6a0dfbb3c21203bc4
fix data types from ENV
AppEnlight/channelstream,AppEnlight/channelstream,AppEnlight/channelstream
channelstream/cli/utils.py
channelstream/cli/utils.py
import argparse import copy import logging import json import pkg_resources import jinja2 import os from channelstream.cli import CONFIGURABLE_PARAMS, SHARED_DEFAULTS from channelstream.utils import set_config_types log = logging.getLogger(__name__) log.setLevel(logging.INFO) def main(): config = copy.deepcopy(...
import argparse import copy import logging import json import pkg_resources import jinja2 import os from channelstream.cli import CONFIGURABLE_PARAMS, SHARED_DEFAULTS log = logging.getLogger(__name__) log.setLevel(logging.INFO) def main(): config = copy.deepcopy(SHARED_DEFAULTS) parser = argparse.ArgumentP...
bsd-3-clause
Python
23fd2953a41d8b087fa5252df2de0baf36244e43
remove stupid debug string
FederatedAI/FATE,FederatedAI/FATE,FederatedAI/FATE
doc/readthedoc/conf.py
doc/readthedoc/conf.py
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
# Configuration file for the Sphinx documentation builder. # # This file only contains a selection of the most common options. For a full # list see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html # -- Path setup -------------------------------------------------------------- # If ex...
apache-2.0
Python
f2181d50fb17be9e1db6129300d720139ca00636
use absolute imports for compatibility with python 2.5
scrapy/parsel
scrapy/selector/__init__.py
scrapy/selector/__init__.py
""" XPath selectors Two backends are currently available: libxml2 and lxml To select the backend explicitly use the SELECTORS_BACKEND variable in your project. Otherwise, libxml2 will be tried first. If libxml2 is not available, lxml will be used. """ from scrapy.conf import settings if settings['SELECTORS_BACKEND'...
""" XPath selectors Two backends are currently available: libxml2 and lxml To select the backend explicitly use the SELECTORS_BACKEND variable in your project. Otherwise, libxml2 will be tried first. If libxml2 is not available, lxml will be used. """ from scrapy.conf import settings if settings['SELECTORS_BACKEND'...
bsd-3-clause
Python
d2cadcb9be08730f5ccefec5f3e0316265ebf307
Check request ID value
tisnik/fabric8-analytics-common,tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common,tisnik/fabric8-analytics-common,jpopelka/fabric8-analytics-common,jpopelka/fabric8-analytics-common
integration-tests/features/src/json_utils.py
integration-tests/features/src/json_utils.py
"""Functions for handling JSON responses returned by various API endpoints.""" import string from src.attribute_checks import * def get_value_using_path(obj, path): """Get the attribute value using the XMLpath-like path specification. Return any attribute stored in the nested object and list hierarchy using...
"""Functions for handling JSON responses returned by various API endpoints.""" import string from src.attribute_checks import * def get_value_using_path(obj, path): """Get the attribute value using the XMLpath-like path specification. Return any attribute stored in the nested object and list hierarchy using...
apache-2.0
Python
de4e5a34aaa322b2ce83161dd4bce7897953ab73
add Unix socket support to API collector
aaronkaplan/intelmq,aaronkaplan/intelmq,certtools/intelmq,aaronkaplan/intelmq,certtools/intelmq,certtools/intelmq
intelmq/bots/collectors/api/collector_api.py
intelmq/bots/collectors/api/collector_api.py
# SPDX-FileCopyrightText: 2018 tavi.poldma # # SPDX-License-Identifier: AGPL-3.0-or-later # -*- coding: utf-8 -*- """ API Collector bot """ from threading import Thread from typing import Optional import os import socket from intelmq.lib.bot import CollectorBot from intelmq.lib.exceptions import MissingDependencyErro...
# SPDX-FileCopyrightText: 2018 tavi.poldma # # SPDX-License-Identifier: AGPL-3.0-or-later # -*- coding: utf-8 -*- """ API Collector bot """ from threading import Thread from intelmq.lib.bot import CollectorBot from intelmq.lib.exceptions import MissingDependencyError try: import tornado.web from tornado.iolo...
agpl-3.0
Python
7dc01fa4593e81448db2749d460737cbfa57b63d
Return normalized version
rolandgeider/wger,rolandgeider/wger,petervanderdoes/wger,rolandgeider/wger,petervanderdoes/wger,wger-project/wger,petervanderdoes/wger,wger-project/wger,wger-project/wger,petervanderdoes/wger,wger-project/wger,rolandgeider/wger
wger/__init__.py
wger/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: 2011, 2012 by OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ VERSION = (1, 9, 0, 'beta', 1) RELEASE = False def get_version(version=None, release=None): """Derives a PEP386-compliant version number from VERS...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :copyright: 2011, 2012 by OpenSlides team, see AUTHORS. :license: GNU GPL, see LICENSE for more details. """ VERSION = (1, 9, 0, 'beta', 1) RELEASE = False def get_version(version=None, release=None): """Derives a PEP386-compliant version number from VERS...
agpl-3.0
Python
a7a14619f7662ccb510b6a0031a58647cf0b34e7
Remove duplicated path for build script
mwilliamson/whack
whack/builder.py
whack/builder.py
import os import subprocess from . import downloads from .tempdir import create_temporary_dir from .common import WHACK_ROOT from .files import mkdir_p, write_file from .errors import FileNotFoundError def build(package_request, package_dir): with create_temporary_dir() as build_dir: _build_in_dir(packag...
import os import subprocess from . import downloads from .tempdir import create_temporary_dir from .common import WHACK_ROOT from .files import mkdir_p, write_file from .errors import FileNotFoundError def build(package_request, package_dir): with create_temporary_dir() as build_dir: _build_in_dir(packag...
bsd-2-clause
Python
4c017462c41ad080c1f6a98f8be7ef843f379253
Fix test name
p/wolis-phpbb,p/wolis-phpbb
tests/search_backend_sphinx.py
tests/search_backend_sphinx.py
from wolis.test_case import WolisTestCase from wolis import utils class SearchBackendSphinxTest(WolisTestCase): @utils.restrict_database('mysql*', 'postgres') @utils.restrict_phpbb_version('>=3.1.0') def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morph...
from wolis.test_case import WolisTestCase from wolis import utils class SearchBackendMysqlTest(WolisTestCase): @utils.restrict_database('mysql*', 'postgres') @utils.restrict_phpbb_version('>=3.1.0') def test_set_search_backend(self): self.login('morpheus', 'morpheus') self.acp_login('morphe...
bsd-2-clause
Python
b3ef8f04fa7abd688d7c8669b4f1dfeda2a55c81
test fixed
sohaibfarooqi/flask-stargate
tests/test_resource_manager.py
tests/test_resource_manager.py
# from . import ManagerTestBase # from flask import json # import datetime # from app import db # from stargate.resource_info import resource_info # from stargate.const import ResourceInfoConst # from app.models import TestPrimaryKey # from app import init_app, db # from functools import partial # class TestResourceMa...
from . import ManagerTestBase from flask import json import datetime from app import db from stargate.resource_info import resource_info from stargate.const import ResourceInfoConst from app.models import TestPrimaryKey from app import init_app, db from functools import partial class TestResourceManager(ManagerTestBas...
agpl-3.0
Python
e721511a24f98e57e8bfeb45a953d7d42cf78f33
increase the max length of a link that is to be shortenend to 500 characters
einvalentin/django-teenyweeny
teeny_weeny/models.py
teeny_weeny/models.py
from django.db import models from django.utils import timezone class ShortLink(models.Model): short = models.CharField(max_length=128, unique=True) link = models.URLField(max_length=500) hit = models.BigIntegerField(default=0) date = models.DateTimeField(default=timezone.now) def __unicode__(self)...
from django.db import models from django.utils import timezone class ShortLink(models.Model): short = models.CharField(max_length=128, unique=True) link = models.URLField() hit = models.BigIntegerField(default=0) date = models.DateTimeField(default=timezone.now) def __unicode__(self): retu...
apache-2.0
Python
adb7f16a1b441e550e1f6f75a3ed7dfe3e25ec1c
Sort list of devices.
eunchong/build,eunchong/build,eunchong/build,eunchong/build
scripts/slave/recipe_modules/adb/resources/list_devices.py
scripts/slave/recipe_modules/adb/resources/list_devices.py
# Copyright (c) 2014 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. """Generates json output of the adb devices that are online. Argument 1: the repr() of the adb command to run. Argument 2: the temporary json file to wr...
# Copyright (c) 2014 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. """Generates json output of the adb devices that are online. Argument 1: the repr() of the adb command to run. Argument 2: the temporary json file to wr...
bsd-3-clause
Python
027c9d24ecf00a8435ad012fdab9e64b4201ed42
fix migration conflict, re #7128
archesproject/arches,archesproject/arches,archesproject/arches,archesproject/arches
arches/app/models/migrations/7128_resource_instance_filter.py
arches/app/models/migrations/7128_resource_instance_filter.py
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('models', '7442_delete_manifest_images_table'), ] operations = [ migrations.RunSQL(""" UPDATE d_data_types SET defaultconfig = defaultconfig || '{"searchString": "", ...
from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('models', '7262_report_template_data_fetch_bool'), ] operations = [ migrations.RunSQL(""" UPDATE d_data_types SET defaultconfig = defaultconfig || '{"searchString": "...
agpl-3.0
Python
e987a010f2242735ad60008774d25c00b7f89f76
Tweak CI report
fran-jo/OpenIPSL,OpenIPSL/OpenIPSL,MaximeBaudette/OpenIPSL,SmarTS-Lab/OpenIPSL,tinrabuzin/OpenIPSL,SmarTS-Lab/OpenIPSL
CI/CITests.py
CI/CITests.py
import os from OMPython import OMCSessionZMQ class CITests(): ''' Python class used to run CI tests ''' def __init__(self, rootPath): ''' Constructor starts omc and loads MSL ''' self.rootPath = rootPath self.omc = OMCSessionZMQ() os.chdir(self.rootPath) ...
import os from OMPython import OMCSessionZMQ class CITests(): ''' Python class used to run CI tests ''' def __init__(self, rootPath): ''' Constructor starts omc and loads MSL ''' self.rootPath = rootPath self.omc = OMCSessionZMQ() os.chdir(self.rootPath) ...
bsd-3-clause
Python
33c51e6a0612aece239bf01236f110ef9fb40c86
Add some uncovered code
steve98654/pycon-tutorial-steve98564,kojoidrissa/pycon-tutorial-cbtd,steve98654/pycon-tutorial-steve98564,bazfire/satarvo_project,lif3isg0od/pycon-tutorial-learn,hrjn/2016-pycon_project,jdcorless/pycon-tutorial-jdcorless,janecofino/pycon-tutorial-mjc,jwarner308/pycon-tutorial-JW,lifan0127/2016-pycon-tutorial-project,st...
wordcount_lib.py
wordcount_lib.py
def consume(filename): chars = 0 words = 0 lines = 0 with open(filename, 'rt') as fp: for line in fp: lines += 1 words += len(line.strip().split()) chars += len(line) return chars, words, lines def daaaangerous(param=0): print("I'm the most dangerou...
def consume(filename): chars = 0 words = 0 lines = 0 with open(filename, 'rt') as fp: for line in fp: lines += 1 words += len(line.strip().split()) chars += len(line) return chars, words, lines
bsd-3-clause
Python
05cb079fd4e6b7a9bfd32c1470c9c638af5b7bc9
Add comments clarifying implementation choices
python/importlib_metadata
importlib_metadata/_py39compat.py
importlib_metadata/_py39compat.py
""" Compatibility layer with Python 3.8/3.9 """ from typing import TYPE_CHECKING, Any, Optional, Tuple if TYPE_CHECKING: # -> prevent circular imports on runtime. from . import Distribution, EntryPoint else: Distribution = EntryPoint = Any def normalized_name(dist: Distribution) -> Optional[str]: """ ...
""" Compatibility layer with Python 3.8/3.9 """ from typing import TYPE_CHECKING, Any, Optional, Tuple if TYPE_CHECKING: from . import Distribution, EntryPoint else: Distribution = EntryPoint = Any def normalized_name(dist: Distribution) -> Optional[str]: """ Honor name normalization for distributio...
apache-2.0
Python
4bd53d96be49c01c04a30d2c064774bac23fc20a
Rewrite entry update in DatabaseStorage without explicit update call
catcombo/django-speedinfo,catcombo/django-speedinfo,catcombo/django-speedinfo
speedinfo/storage/database/storage.py
speedinfo/storage/database/storage.py
# coding: utf-8 from django.db import IntegrityError from django.db.models import ExpressionWrapper, F, FloatField, IntegerField from django.forms import model_to_dict from speedinfo.models import ViewProfiler from speedinfo.storage.base import AbstractStorage from speedinfo.storage.database.models import Storage c...
# coding: utf-8 from django.db import IntegrityError from django.db.models import ExpressionWrapper, F, FloatField, IntegerField from django.forms import model_to_dict from speedinfo.models import ViewProfiler from speedinfo.storage.base import AbstractStorage from speedinfo.storage.database.models import Storage c...
mit
Python
953d83119005075b9bc59d040389c209208263d5
Integrate LLVM at llvm/llvm-project@7354a73945f1
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "7354a73945f1c123d66b01f51374ecbdba18fab3" LLVM_SHA256 = "73a86e6f9d263a812bfdda5120b8f08467bd8ee39564b75da752854328a72803" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "7f2b016b820487f2fb69b93e784fff5d8297dea0" LLVM_SHA256 = "348e586173038ab248e76be34d4a3e5667d56429350150a4a8130fba5a318e05" tfrt_http_archive( ...
apache-2.0
Python
509a542fd5e3171979fb74aec9226c057d289623
Integrate LLVM at llvm/llvm-project@04a5ca862bb9
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "04a5ca862bb989acdd2729d0991b4e5a104bf244" LLVM_SHA256 = "10a0c150c477a36eff25d49f0f50379fddf626a7d87a2b1846fb101173c742c9" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "b3a0bed5fb8766dcf27583ab1f73edc6e7232657" LLVM_SHA256 = "0ee751d5754af930e05cea8b54b061e819e4254e06f64d211e07f2faf3395adf" tfrt_http_archive( ...
apache-2.0
Python
94fbcf6224624810a30a17cc9bc8d4c1f3458954
Integrate LLVM at llvm/llvm-project@5c7b43aa8298
tensorflow/runtime,tensorflow/runtime,tensorflow/runtime,tensorflow/runtime
third_party/llvm/workspace.bzl
third_party/llvm/workspace.bzl
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "5c7b43aa8298a389b906d72c792941a0ce57782e" LLVM_SHA256 = "e34534a864e2bedaff6811effb757d2eed3a50c9c1e540515ed1568addf1815d" tfrt_http_archive( ...
"""Provides the repository macro to import LLVM.""" load("//third_party:repo.bzl", "tfrt_http_archive") def repo(name): """Imports LLVM.""" LLVM_COMMIT = "9ba661f91276dd8cc728f9b2e82905b78c0119b4" LLVM_SHA256 = "f89c033b0e8e6d4e6ff5ce3883aadc82a502b063a830cd685672cec4bea3dfb1" tfrt_http_archive( ...
apache-2.0
Python
fda8088ec3330ec5bc6ea7769c79d2fb9f227728
Fix bug with valid hostnames with dashes. I added underscores even though they aren't valid just for good measure
lincolnloop/salmon,lincolnloop/salmon
salmon/apps/monitor/urls.py
salmon/apps/monitor/urls.py
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.dashboard, name="dashboard"), url(r'^(?P<name>[-\w\._]*)$', views.history, name="history"), )
from django.conf.urls import patterns, url from . import views urlpatterns = patterns('', url(r'^$', views.dashboard, name="dashboard"), url(r'^(?P<name>[\w\.]*)$', views.history, name="history"), )
bsd-3-clause
Python
0efe8e9cfbd3a5d3319553aabf4f0dd17fa53d33
fix license test
wwitzel3/awx,snahelou/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,snahelou/awx,snahelou/awx,snahelou/awx
awx/main/tests/functional/api/test_settings.py
awx/main/tests/functional/api/test_settings.py
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. # Python import pytest import os # Django from django.core.urlresolvers import reverse # AWX from awx.conf.models import Setting ''' Ensures that tests don't pick up dev container license file ''' @pytest.fixture def mock_no_license_file(mocker): os.envi...
# Copyright (c) 2016 Ansible, Inc. # All Rights Reserved. # Python import pytest # Django from django.core.urlresolvers import reverse # AWX from awx.conf.models import Setting @pytest.mark.django_db def test_license_cannot_be_removed_via_system_settings(get, put, patch, delete, admin, enterprise_license): url...
apache-2.0
Python
c91e7dcc969485644d8e26c459c894925b3f0720
add in fasta format
ctSkennerton/BioSQL-Extensions
scripts/dump_biodatabase.py
scripts/dump_biodatabase.py
#!/usr/bin/env python import sys from getpass import getpass from BioSQL import BioSeqDatabase from common import standard_options, generate_placeholders, chunks, extract_feature_sql def get_seqfeature_for_db(server, biodb): ''' find all seqfeatures that have the given value for the qualifier returns a lis...
#!/usr/bin/env python from getpass import getpass from BioSQL import BioSeqDatabase from common import standard_options, generate_placeholders, chunks, extract_feature_sql def get_seqfeature_for_db(server, biodb): ''' find all seqfeatures that have the given value for the qualifier returns a list of seqfea...
mit
Python
95d8f915e4aee6fbab4ca741197a3563eb3a5ff2
bump version to 0.4
intip/aldryn-bootstrap3,intip/aldryn-bootstrap3
aldryn_bootstrap3/__init__.py
aldryn_bootstrap3/__init__.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import __version__ = '0.4'
# -*- coding: utf-8 -*- from __future__ import unicode_literals, absolute_import __version__ = '0.3'
bsd-3-clause
Python
de0fd677d94b7fb8b044fa597b687dba0f3e1c0e
Test coercions for generic type constructors
jcrist/blaze,AbhiAgarwal/blaze,alexmojaki/blaze,jcrist/blaze,markflorisson/blaze-core,FrancescAlted/blaze,aterrel/blaze,mrocklin/blaze,aterrel/blaze,xlhtc007/blaze,AbhiAgarwal/blaze,scls19fr/blaze,ContinuumIO/blaze,FrancescAlted/blaze,jdmcbr/blaze,jdmcbr/blaze,nkhuyu/blaze,FrancescAlted/blaze,LiaoPan/blaze,dwillmer/bla...
blaze/datashape/tests/test_type_constructor.py
blaze/datashape/tests/test_type_constructor.py
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest from blaze import error from blaze.datashape import unify_simple, promote, coerce, dshapes, coretypes as T #------------------------------------------------------------------------ # Test data #------------------...
# -*- coding: utf-8 -*- from __future__ import print_function, division, absolute_import import unittest from blaze import error from blaze.datashape import unify_simple, promote, coerce, dshapes, coretypes as T #------------------------------------------------------------------------ # Test data #------------------...
bsd-3-clause
Python
7da15f2e16c95a4be179a1cc1efd108dbaaa3be9
Update forward_ZMQ_Angle.py
VitorHugoAguiar/ProBot,VitorHugoAguiar/ProBot,VitorHugoAguiar/ProBot,VitorHugoAguiar/ProBot
ProBot_BeagleBone/forward_ZMQ_Angle.py
ProBot_BeagleBone/forward_ZMQ_Angle.py
#!/usr/bin/python import zmq def main(): try: context = zmq.Context(1) # Socket facing clients frontend = context.socket(zmq.SUB) frontend.bind("tcp://*:5583") frontend.setsockopt(zmq.SUBSCRIBE, "") # Socket facing services backend = context.socket(zmq.PUB)...
import zmq def main(): try: context = zmq.Context(1) # Socket facing clients frontend = context.socket(zmq.SUB) frontend.bind("tcp://*:5583") frontend.setsockopt(zmq.SUBSCRIBE, "") # Socket facing services backend = context.socket(zmq.PUB) backend.bi...
agpl-3.0
Python
a7ac41830ac0472442069deead739ddd4c137be3
add future import for print
tomlanyon/dnspython
examples/receive_notify.py
examples/receive_notify.py
#!/usr/bin/env python3 # This is just a toy, real code would check that the received message # really was a NOTIFY, and otherwise handle errors. from __future__ import print_function import socket import dns.flags import dns.message import dns.rdataclass import dns.rdatatype address = '127.0.0.1' port = 53535 s =...
#!/usr/bin/env python3 # This is just a toy, real code would check that the received message # really was a NOTIFY, and otherwise handle errors. import socket import dns.flags import dns.message import dns.rdataclass import dns.rdatatype address = '127.0.0.1' port = 53535 s = socket.socket(socket.AF_INET, socket.S...
isc
Python
9bbe8057a627ba81282a76de94e57ca0b0e02b89
change default port
gonicus/gosa,gonicus/gosa,gonicus/gosa,gonicus/gosa
backend/src/gosa/backend/plugins/foreman/gosa_integration.py
backend/src/gosa/backend/plugins/foreman/gosa_integration.py
#!/usr/bin/env python3 """ Foreman / GOsa3 integration to send hook events data to GOsa3 """ import hmac import sys import requests import json #. /etc/sysconfig/foreman-gosa # Gosa settings GOSA_SERVER = "http://localhost" GOSA_PORT = 8050 HTTP_X_HUB_SENDER = "foreman-hook" SECRET = "e540f417-4c36-4e5d-b78a-4d36f5172...
#!/usr/bin/env python3 """ Foreman / GOsa3 integration to send hook events data to GOsa3 """ import hmac import sys import requests import json #. /etc/sysconfig/foreman-gosa # Gosa settings GOSA_SERVER = "http://localhost" GOSA_PORT = 8000 HTTP_X_HUB_SENDER = "foreman-hook" SECRET = "e540f417-4c36-4e5d-b78a-4d36f5172...
lgpl-2.1
Python
94b216fb8c15db7228e54e35058c7143b02d103f
prepare 1.1.1 bugfix release, from now on tests for new features..
wlanslovenija/cmsplugin-blog,wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog,wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog,wlanslovenija/cmsplugin-blog,divio/cmsplugin-blog
cmsplugin_blog/__init__.py
cmsplugin_blog/__init__.py
# -*- coding: utf-8 -*- VERSION = (1, 1, 1, 'post', 0) def get_version(): # pragma: no cover version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: i...
# -*- coding: utf-8 -*- VERSION = (1, 1, 0, 'post', 0) def get_version(): # pragma: no cover version = '%s.%s' % (VERSION[0], VERSION[1]) if VERSION[2]: version = '%s.%s' % (version, VERSION[2]) if VERSION[3:] == ('alpha', 0): version = '%s pre-alpha' % version else: i...
bsd-3-clause
Python
77d8f11277e3b006c9f9137a35291892a73156f2
format python code
mralext20/alex-bot
alexBot/cogs/games_reposting.py
alexBot/cogs/games_reposting.py
import logging from typing import Dict import discord from discord import PartialEmoji from discord.ext import commands from discord.message import Message from discord.webhook import AsyncWebhookAdapter, WebhookMessage from emoji_data import EmojiSequence from ..tools import Cog log = logging.getLogger(__name__) ...
import logging from typing import Dict import discord from discord import PartialEmoji from discord.ext import commands from discord.message import Message from discord.webhook import AsyncWebhookAdapter, WebhookMessage from emoji_data import EmojiSequence from ..tools import Cog log = logging.getLogger(__name__) ...
mit
Python
cdb7c87fd133b6e99916919b525e9d277a3913dd
Fix a typo.
techhat/libcloud,t-tran/libcloud,mtekel/libcloud,aviweit/libcloud,aleGpereira/libcloud,pquentin/libcloud,niteoweb/libcloud,pantheon-systems/libcloud,mgogoulos/libcloud,supertom/libcloud,Cloud-Elasticity-Services/as-libcloud,cloudControl/libcloud,ClusterHQ/libcloud,NexusIS/libcloud,thesquelched/libcloud,SecurityCompass/...
libcloud/test/compute/test_ikoula.py
libcloud/test/compute/test_ikoula.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 use ...
# 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 use ...
apache-2.0
Python
8c70752c87eb0519150e7cf17b146c97847b1460
add new preview-graylog ip to reversedns.py
alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet,alphagov/govuk-puppet
modules/nagios/files/reversedns.py
modules/nagios/files/reversedns.py
#!/usr/bin/env python import socket import sys if sys.argv[1] == "ip-10-236-86-54.eu-west-1.compute.internal": print "frontend.production.alphagov.co.uk" exit(0) if sys.argv[1] == "ip-10-250-157-37.eu-west-1.compute.internal": print "static.production.alphagov.co.uk" exit(0) if sys.a...
#!/usr/bin/env python import socket import sys if sys.argv[1] == "ip-10-236-86-54.eu-west-1.compute.internal": print "frontend.production.alphagov.co.uk" exit(0) if sys.argv[1] == "ip-10-250-157-37.eu-west-1.compute.internal": print "static.production.alphagov.co.uk" exit(0) if sys.a...
mit
Python
b5b4c1f5b72494e00064b36f2ee1c53d1b5c2aca
Revert 83430 - NaCl: Re-enable tests, since they pass on the trybotsBUG=noneTEST=nacl_integrationReview URL: http://codereview.chromium.org/6904067 TBR=mseaborn@chromium.org Review URL: http://codereview.chromium.org/6902132
gavinp/chromium,yitian134/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,adobe/chromium,adobe/chromium,Crystalnix/house-of-life-chromium,yitian134/chromium,Crystalnix/house-of-life-chromium,adobe/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,Crystalnix/house-of-life-chr...
chrome/test/nacl_test_injection/buildbot_nacl_integration.py
chrome/test/nacl_test_injection/buildbot_nacl_integration.py
#!/usr/bin/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. import os import subprocess import sys def Main(): # TODO(ncbray): figure out why this is failing on windows and enable. if (sys....
#!/usr/bin/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. import os import subprocess import sys def Main(): script_dir = os.path.dirname(os.path.abspath(__file__)) test_dir = os.path.dir...
bsd-3-clause
Python
4ab211d6dd50c043cacd24db93a6bc64cfdb9ed5
update tools/validate_runtests_log.py for pytest
e-q/scipy,ilayn/scipy,rgommers/scipy,endolith/scipy,anntzer/scipy,jamestwebber/scipy,nmayorov/scipy,andyfaff/scipy,arokem/scipy,grlee77/scipy,matthew-brett/scipy,aarchiba/scipy,vigna/scipy,apbard/scipy,zerothi/scipy,perimosocordiae/scipy,pizzathief/scipy,perimosocordiae/scipy,nmayorov/scipy,scipy/scipy,Stefan-Endres/sc...
tools/validate_runtests_log.py
tools/validate_runtests_log.py
#!/usr/bin/env python """ Take the test runner log output from the stdin, looking for the magic line nose runner prints when the test run was successful. In an ideal world, this should be done directly in runtests.py using the nose API, some failure modes are fooling nose to terminate the python process with zero exi...
#!/usr/bin/env python """ Take the test runner log output from the stdin, looking for the magic line nose runner prints when the test run was successful. In an ideal world, this should be done directly in runtests.py using the nose API, some failure modes are fooling nose to terminate the python process with zero exi...
bsd-3-clause
Python
992b9c46dd432ad409025a3cbaeb1c06f880526c
Resolve readline/ncurses dependency when building Lua
krafczyk/spack,EmreAtes/spack,iulian787/spack,LLNL/spack,mfherbst/spack,EmreAtes/spack,iulian787/spack,LLNL/spack,TheTimmy/spack,tmerrick1/spack,lgarren/spack,matthiasdiener/spack,skosukhin/spack,matthiasdiener/spack,LLNL/spack,krafczyk/spack,EmreAtes/spack,tmerrick1/spack,tmerrick1/spack,lgarren/spack,mfherbst/spack,T...
var/spack/packages/lua/package.py
var/spack/packages/lua/package.py
from spack import * import os class Lua(Package): """ The Lua programming language interpreter and library """ homepage = "http://www.lua.org" url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" version('5.3.1', '797adacada8d85761c079390ff1d9961') version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8a...
from spack import * import os class Lua(Package): """ The Lua programming language interpreter and library """ homepage = "http://www.lua.org" url = "http://www.lua.org/ftp/lua-5.1.5.tar.gz" version('5.3.1', '797adacada8d85761c079390ff1d9961') version('5.3.0', 'a1b0a7e92d0c85bbff7a8d27bf29f8a...
lgpl-2.1
Python
4f2fa4e43b314c9d05e0b9b9e73641463c16a9cb
Set up the proposal tasks on app startup
cityofsomerville/citydash,codeforboston/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/cornerwise,cityofsomerville/cornerwise,codeforboston/cornerwise,cityofsomerville/citydash,cityofsomerville/citydash,codeforboston/cornerwise,cityofsomerville/cornerwise,cityofsomerville/cornerwise
server/proposal/__init__.py
server/proposal/__init__.py
from django.apps import AppConfig class ProposalConfig(AppConfig): name = "proposal" def ready(self): # Register tasks with Celery: from . import tasks tasks.set_up_hooks()
from django.apps import AppConfig class ProposalConfig(AppConfig): name = "proposal" def ready(self): # Register tasks with Celery: from . import tasks
mit
Python
69a16e61f0b0d5eb6d1f0819ff379c0d86b67dc3
fix in lcb
numairmansur/RoBO,automl/RoBO,numairmansur/RoBO,automl/RoBO
robo/acquisition/lcb.py
robo/acquisition/lcb.py
import logging import numpy as np from robo.acquisition.base_acquisition import BaseAcquisitionFunction logger = logging.getLogger(__name__) class LCB(BaseAcquisitionFunction): def __init__(self, model, X_lower, X_upper, par=0.0, **kwargs): r""" The lower confidence bound acquisition functions...
import logging import numpy as np from robo.acquisition.base_acquisition import BaseAcquisitionFunction logger = logging.getLogger(__name__) class LCB(BaseAcquisitionFunction): def __init__(self, model, X_lower, X_upper, par=0.0, **kwargs): r""" The lower confidence bound acquisition functions...
bsd-3-clause
Python
3468b32964560f4092593e03ba552d7e6b56943d
Support renaming of _ to % routines
OSEHRA/VistA,OSEHRA-Sandbox/VistA,timmvt/VistA_tt,OSEHRA/VistA,OSEHRA/VistA,timmvt/VistA_tt,apexdatasolutions/VistA,josephsnyder/VistA,josephsnyder/VistA,josephsnyder/VistA,OSEHRA-Sandbox/VistA,timmvt/VistA_tt,OSEHRA/VistA,apexdatasolutions/VistA,timmvt/VistA_tt,timmvt/VistA_tt,mdgeek/VistA-FHIR-CWF,OSEHRA-Sandbox/Vist...
Scripts/PackRO.py
Scripts/PackRO.py
#!/usr/bin/env python # Pack .m files into M[UMPS] routine transfer format (^%RO) # # python PackRO.py *.m > routines.ro # # or # # ls *.m | python PackRO.py > routines.ro # #--------------------------------------------------------------------------- # Copyright 2011 The Open Source Electronic Health Record Agent #...
#!/usr/bin/env python # Pack .m files into M[UMPS] routine transfer format (^%RO) # # python PackRO.py *.m > routines.ro # # or # # ls *.m | python PackRO.py > routines.ro # #--------------------------------------------------------------------------- # Copyright 2011 The Open Source Electronic Health Record Agent #...
apache-2.0
Python
d6c1774b75839192b0235e5737cdba0d17759fde
Update mqtt_easydriver_stepper.py
pumanzor/iot-redlibre,pumanzor/iot-redlibre
linkit/easydriver/mqtt_easydriver_stepper.py
linkit/easydriver/mqtt_easydriver_stepper.py
import paho.mqtt.client as mqtt import json, time import mraa pin19 = mraa.Pwm(19) pin0 = mraa.Gpio(0) pin0.dir(mraa.DIR_OUT) # ----- CHANGE THESE FOR YOUR SETUP ----- MQTT_HOST = "190.97.168.236" MQTT_PORT = 1883 #--------------------------------------- def on_connect(client, userdata, rc): print("\nConnecte...
import paho.mqtt.client as mqtt import json, time import mraa pin19 = mraa.Pwm(19) pin0 = mraa.Gpio(0) pin0.dir(mraa.DIR_OUT) # ----- CHANGE THESE FOR YOUR SETUP ----- MQTT_HOST = "190.97.168.236" MQTT_PORT = 1883 def on_connect(client, userdata, rc): print("\nConnected with result code " + str(rc) + "\n") ...
mit
Python
6b7bd1c412b21a748b39a07a792f8b2c8461f9e2
Fix issue #17
aibor/marmoset
marmoset/installimage/installimage_config.py
marmoset/installimage/installimage_config.py
import os class InstallimageConfig: CFG_DIR = '/srv/tftp/installimage/' def __init__(self, mac): self.variables = {} self.mac = mac if self.exists(): self.__read_config_file() def add_or_set(self, key, value): self.variables[key.upper()] = value def crea...
import os class InstallimageConfig: CFG_DIR = '/srv/tftp/installimage/' def __init__(self, mac): self.variables = {} self.mac = mac if self.exists(): self.__read_config_file() def add_or_set(self, key, value): self.variables[key] = value def create(self)...
agpl-3.0
Python
74cfb1bd8e60e1d348115677e92c5e64858ec785
Add clearer instructions on no component support. (#2685)
QingChenmsft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,yugangw-msft/azure-cli,samedder/azure-cli,samedder/azure-cli,QingChenmsft/azure-cli,QingChenmsft/azure-cli,QingChenmsft/azure-cli
packaged_releases/patches/patch_component_custom.py
packaged_releases/patches/patch_component_custom.py
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # --------------------------------------------------------------------...
mit
Python
c5a31be1bd452224c2b35c4f3e3132b2df1431e7
reorder imports
liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin,liqd/a4-meinberlin
meinberlin/apps/documents/exports.py
meinberlin/apps/documents/exports.py
from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from adhocracy4.comments.models import Comment from adhocracy4.exports import mixins as export_mixins from adhocracy4.exports import views as export_views from meinberlin.apps.exports import mixins as mb_export_mixins from meinbe...
from django.utils import timezone from django.utils.translation import ugettext_lazy as _ from adhocracy4.comments.models import Comment from adhocracy4.exports import mixins as export_mixins from adhocracy4.exports import views as export_views from adhocracy4.projects.mixins import ProjectMixin from meinberlin.apps.e...
agpl-3.0
Python
1c6c31653889c8acb60a54dc1dc9ea0f8795f122
bump to next dev version: 0.6.7-dev
ocefpaf/ulmo,nathanhilbert/ulmo,cameronbracken/ulmo,nathanhilbert/ulmo,cameronbracken/ulmo,ocefpaf/ulmo
ulmo/version.py
ulmo/version.py
# set version number __version__ = '0.6.7-dev'
# set version number __version__ = '0.6.6'
bsd-3-clause
Python
8546e14e152c79f137e0db15e3cd7de71cd0e8b4
bump to next dev version: 0.7.3-dev
ulmo-dev/ulmo-common
ulmo/version.py
ulmo/version.py
# set version number __version__ = '0.7.3-dev'
# set version number __version__ = '0.7.2'
bsd-3-clause
Python
a8b43950610adb41a3de4c342c51d5b22fd5454b
Fix indents
maferelo/saleor,UITools/saleor,mociepka/saleor,mociepka/saleor,UITools/saleor,mociepka/saleor,maferelo/saleor,UITools/saleor,UITools/saleor,UITools/saleor,maferelo/saleor
saleor/product/forms.py
saleor/product/forms.py
import json from django import forms from django.utils.encoding import smart_text from django.utils.translation import pgettext_lazy from django_prices.templatetags.prices_i18n import gross from ..cart.forms import AddToCartForm class VariantChoiceField(forms.ModelChoiceField): discounts = None def __init_...
import json from django import forms from django.utils.encoding import smart_text from django.utils.translation import pgettext_lazy from django_prices.templatetags.prices_i18n import gross from ..cart.forms import AddToCartForm class VariantChoiceField(forms.ModelChoiceField): discounts = None def __init_...
bsd-3-clause
Python
833f8ce0673701eb64fb20ee067ccd8c58e473c6
Correct wrong inheritance on sponsorship_typo3 child_depart wizard.
MickSandoz/compassion-switzerland,ecino/compassion-switzerland,CompassionCH/compassion-switzerland,ndtran/compassion-switzerland,ndtran/compassion-switzerland,CompassionCH/compassion-switzerland,MickSandoz/compassion-switzerland,CompassionCH/compassion-switzerland,eicher31/compassion-switzerland,Secheron/compassion-swi...
child_sync_typo3/wizard/child_depart_wizard.py
child_sync_typo3/wizard/child_depart_wizard.py
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __open...
# -*- encoding: utf-8 -*- ############################################################################## # # Copyright (C) 2014 Compassion CH (http://www.compassion.ch) # Releasing children from poverty in Jesus' name # @author: Emanuel Cino <ecino@compassion.ch> # # The licence is in the file __open...
agpl-3.0
Python
97c5cb0312d7b093752376a373cc3773fcf44f34
Add SunOS to the basic service module
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/modules/service.py
salt/modules/service.py
''' The default service module, if not otherwise specified salt will fall back to this basic module ''' import os grainmap = { 'Arch': '/etc/rc.d', 'Debian': '/etc/init.d', 'Fedora': '/etc/init.d', 'RedHat': '/etc/init.d', 'Ubuntu': '/etc/init.d', 'Gen...
''' The default service module, if not otherwise specified salt will fall back to this basic module ''' import os grainmap = { 'Arch': '/etc/rc.d', 'Debian': '/etc/init.d', 'Fedora': '/etc/init.d', 'RedHat': '/etc/init.d', 'Ubuntu': '/etc/init.d', 'Gen...
apache-2.0
Python
e40a9b3676101d7d7bd65cff8487f48a285f3139
Fix typo
googleapis/google-auth-library-python,googleapis/google-auth-library-python
scripts/obtain_user_auth.py
scripts/obtain_user_auth.py
# Copyright 2016 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 required by applicable law or agreed to in writing,...
# Copyright 2016 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 required by applicable law or agreed to in writing,...
apache-2.0
Python
f1e1513cf739b8f25b9364226cc8ce987a47fa56
Fix check for helpers with staff perms
916253/Kurisu
utils/checks.py
utils/checks.py
import discord from discord import app_commands from discord.ext import commands from utils.configuration import StaffRank from typing import Union, TYPE_CHECKING if TYPE_CHECKING: from kurisu import Kurisu class InsufficientStaffRank(commands.CheckFailure): message: str def is_staff(role: str): async...
import discord from discord import app_commands from discord.ext import commands from utils.configuration import StaffRank from typing import Union, TYPE_CHECKING if TYPE_CHECKING: from kurisu import Kurisu class InsufficientStaffRank(commands.CheckFailure): message: str def is_staff(role: str): async...
apache-2.0
Python
6cba22ad2c26185f6b3454116c3e31ea14160db8
Make collect-sprite-metadata.py work from any directory
johnsoft/dustcourse,johnsoft/dustcourse,johnsoft/dustcourse,johnsoft/dustcourse,johnsoft/dustcourse,johnsoft/dustcourse
scripts/collect-sprite-metadata.py
scripts/collect-sprite-metadata.py
from collections import OrderedDict import glob import json import os def main(): c = collect() c.sort(key = lambda x: x[0]) c = OrderedDict(c) print(json.dumps(c, separators=(',',':'))) def collect(): root = os.path.dirname(os.path.abspath(__file__)) + '/../build/website/assets/sprites' hitb...
from collections import OrderedDict import glob import json import os def main(): c = collect() c.sort(key = lambda x: x[0]) c = OrderedDict(c) print(json.dumps(c, separators=(',',':'))) def collect(): root = '../build/website/static/sprites' hitboxes = [] for (dirpath, dirnames, filename...
mit
Python
2192219d92713c6eb76593d0c6c29413d040db6a
Revert "Added script for cron job to load surveys to database."
paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation,paepcke/json_to_relation
scripts/cronRefreshEdxQualtrics.py
scripts/cronRefreshEdxQualtrics.py
from surveyextractor import QualtricsExtractor import getopt, sys # Script for scheduling regular EdxQualtrics updates # Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r" qe = QualtricsExtractor() opts, args = getopt.getopt(sys.argv[1:], 'amsr', ['--reset', '--loadmeta', '--loadsurveys', '--loadresponses...
from surveyextractor import QualtricsExtractor import getopt import sys ### Script for scheduling regular EdxQualtrics updates ### Usage for cron should be "cronRefreshEdxQualtrics.py -m -s -r" # Append directory for dependencies to PYTHONPATH sys.path.append("/home/dataman/Code/qualtrics_etl/src/qualtrics_etl/") qe...
bsd-3-clause
Python
98311b8b80d28ac6e6d92dbae3bcf987d5027e7a
Fix for housekeeping script error
damianmoore/photo-manager,damianmoore/photo-manager,damianmoore/photo-manager,damianmoore/photo-manager
photonix/photos/management/commands/housekeeping.py
photonix/photos/management/commands/housekeeping.py
import os from pathlib import Path from shutil import rmtree from time import sleep from django.conf import settings from django.core.management.base import BaseCommand from photonix.photos.models import Photo, Task from photonix.photos.utils.thumbnails import THUMBNAILER_VERSION class Command(BaseCommand): hel...
import os from pathlib import Path from shutil import rmtree from time import sleep from django.conf import settings from django.core.management.base import BaseCommand from photonix.photos.models import Photo, Task from photonix.photos.utils.thumbnails import THUMBNAILER_VERSION class Command(BaseCommand): hel...
agpl-3.0
Python
3fadef637ad17458f629a4baeba7fd38205a1510
Bump Katib Python SDK to 0.12.0rc0 version (#1640)
kubeflow/katib,kubeflow/katib,kubeflow/katib,kubeflow/katib,kubeflow/katib,kubeflow/katib
sdk/python/v1beta1/setup.py
sdk/python/v1beta1/setup.py
# Copyright 2021 The Kubeflow Authors. # # 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 ...
# Copyright 2021 The Kubeflow Authors. # # 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 ...
apache-2.0
Python
8517803a2cb3f3dd46911ec63acdeae283f23efd
Increase fund graph detail
felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget,felamaslen/budget
srv/config.py
srv/config.py
""" Global configuration variables """ import os.path PIE_TOLERANCE = 0.075 PIE_DETAIL = 30 GRAPH_FUND_HISTORY_DETAIL = 200 OVERVIEW_NUM_LAST = 25 OVERVIEW_NUM_FUTURE = 10 START_YEAR = 2014 START_MONTH = 9 LIST_CATEGORIES = ('funds', 'in', 'bills', 'food', 'general', 'holiday', 'social') # common columns are adde...
""" Global configuration variables """ import os.path PIE_TOLERANCE = 0.075 PIE_DETAIL = 30 GRAPH_FUND_HISTORY_DETAIL = 100 OVERVIEW_NUM_LAST = 25 OVERVIEW_NUM_FUTURE = 10 START_YEAR = 2014 START_MONTH = 9 LIST_CATEGORIES = ('funds', 'in', 'bills', 'food', 'general', 'holiday', 'social') # common columns are adde...
mit
Python
899e3c9f81a43dcb94e290ce0a86f128bd94effd
Apply filter channel published on menu list (channel context processors)
YACOWS/opps,jeanmask/opps,YACOWS/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,williamroot/opps,jeanmask/opps,opps/opps,williamroot/opps,williamroot/opps,opps/opps,YACOWS/opps,opps/opps
opps/channel/context_processors.py
opps/channel/context_processors.py
# -*- coding: utf-8 -*- from django.utils import timezone from .models import Channel def channel_context(request): """ Channel context processors """ opps_menu = Channel.objects.filter(date_available__lte=timezone.now(), published=True) return {'opps_menu': opp...
# -*- coding: utf-8 -*- from .models import Channel def channel_context(request): return {'opps_menu': Channel.objects.all()}
mit
Python
54451c4030bfeece4ab2157afe1ee3f8f65c4dcb
Fix sentry_useremail "duplicate key" error (#16)
kmlebedev/getsentry-ldap-auth,Banno/getsentry-ldap-auth
sentry_ldap_auth/backend.py
sentry_ldap_auth/backend.py
from __future__ import absolute_import from django_auth_ldap.backend import LDAPBackend from django.conf import settings from sentry.models import ( Organization, OrganizationMember, UserOption, ) class SentryLdapBackend(LDAPBackend): def get_or_create_user(self, username, ldap_user): model =...
from __future__ import absolute_import from django_auth_ldap.backend import LDAPBackend from django.conf import settings from sentry.models import ( Organization, OrganizationMember, UserOption, ) class SentryLdapBackend(LDAPBackend): def get_or_create_user(self, username, ldap_user): model =...
apache-2.0
Python
c55bf8d153c47500615b8ded3c95957be8ee70a3
Refactor JSONResponse views to include ListView
okfse/froide,stefanw/froide,LilithWittmann/froide,CodeforHawaii/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,okfse/froide,catcosmo/froide,ryankanno/froide,fin/froide,LilithWittmann/froide,okfse/froide,ryankanno/froide,ryankanno/froide,LilithWittmann/froide,fin/froide,CodeforHawaii/froide,LilithWittmann/froide...
froide/helper/json_view.py
froide/helper/json_view.py
from django import http from django.views.generic import DetailView, ListView class JSONResponseMixin(object): def render_to_json_response(self, context): "Returns a JSON response containing 'context' as payload" return self.get_json_response(self.convert_context_to_json(context)) def get_json...
from django import http from django.views.generic import DetailView class JSONResponseDetailView(DetailView): def render_to_json_response(self, context): "Returns a JSON response containing 'context' as payload" return self.get_json_response(self.convert_context_to_json(context)) def get_json_...
mit
Python
e03103c74a066184178980f1073505724e094394
Fix url order
stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten,stadtgestalten/stadtgestalten
stadt/urls.py
stadt/urls.py
from django.conf import settings, urls from django.conf.urls import static from django.contrib import admin urlpatterns = [ urls.url(r'^stadt/admin/', admin.site.urls), urls.url(r'^stadt/api/', urls.include('core.api_urls')), urls.url(r'^stadt/', urls.include('account.urls')), urls.url(r'^stadt/', url...
from django.conf import settings, urls from django.conf.urls import static from django.contrib import admin urlpatterns = [ urls.url(r'^stadt/admin/', admin.site.urls), urls.url(r'^stadt/api/', urls.include('core.api_urls')), urls.url(r'^stadt/', urls.include('account.urls')), urls.url(r'^stadt/', url...
agpl-3.0
Python
a72f72c16aaf1689fc364311afe3b42a6fed7eae
add examples
Tosta-Mixta/CourierToDovecot,Tosta-Mixta/CourierToDovecot
CourierToDovecot.py
CourierToDovecot.py
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ----------------------- # Author : jgo # Execute a perl script into all mailbox newly created, # on the Dovecot server. # ----------------------- import subprocess import os import logging from logging.handlers import RotatingFileHandler ## [Config VARS] -----------...
#!/usr/bin/env python2 # -*- coding: utf-8 -*- # ----------------------- # Author : jgo # Execute a perl script into all mailbox newly created, # on the Dovecot server. # ----------------------- import subprocess import os import logging from logging.handlers import RotatingFileHandler ## [Config VARS] -----------...
apache-2.0
Python
83ed8a4fd258f351da2ea358613ff57dadbf03f6
Remove blank line
pythonindia/junction,ChillarAnand/junction,ChillarAnand/junction,pythonindia/junction,ChillarAnand/junction,pythonindia/junction,pythonindia/junction,ChillarAnand/junction
junction/proposals/permissions.py
junction/proposals/permissions.py
# -*- coding: utf-8 -*- # Third Party Stuff from django.core.exceptions import PermissionDenied # Junction Stuff from junction.conferences.models import ConferenceProposalReviewer from junction.base.constants import ConferenceStatus from .models import ProposalSectionReviewer def is_proposal_voting_allowed(proposa...
# -*- coding: utf-8 -*- # Third Party Stuff from django.core.exceptions import PermissionDenied # Junction Stuff from junction.conferences.models import ConferenceProposalReviewer from junction.base.constants import ConferenceStatus from .models import ProposalSectionReviewer def is_proposal_voting_allowed(proposa...
mit
Python
f8ea5ef37280366b4b3991442e406952bb0575b3
Create calculate_cosine_distance.py
bt3gl/Advanced-Machine-Learning
k-NN/calculate_cosine_distance.py
k-NN/calculate_cosine_distance.py
''' Calculates the cosine distance for an input data ''' import math import numpy as np import scipy.io __author__ = """Marina von Steinkirch""" def cosineDistance(x, y): ''' This function computes the cosine distance between feature vectors x and y. This distance is frequently used for text classif...
''' Calculates the cosine distance for an input data ''' import math import numpy as np import scipy.io __author__ = """Mari Wahl""" def cosineDistance(x, y): ''' This function computes the cosine distance between feature vectors x and y. This distance is frequently used for text classification. ...
mit
Python
2cde35bb6f948f861026921daf7fe24b353af273
Add bulleted and numbered list to CKEditor
vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,stephawe/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi
kerrokantasi/settings/__init__.py
kerrokantasi/settings/__init__.py
from .util import get_settings, load_local_settings, load_secret_key from . import base settings = get_settings(base) load_local_settings(settings, "local_settings") load_secret_key(settings) if not settings["DEBUG"] and settings["JWT_AUTH"]["JWT_SECRET_KEY"] == "kerrokantasi": raise ValueError("Refusing to run o...
from .util import get_settings, load_local_settings, load_secret_key from . import base settings = get_settings(base) load_local_settings(settings, "local_settings") load_secret_key(settings) if not settings["DEBUG"] and settings["JWT_AUTH"]["JWT_SECRET_KEY"] == "kerrokantasi": raise ValueError("Refusing to run o...
mit
Python
d09cc197d11efa2181ce68ef4212cb9df5ee285c
add daemon argument to launcher
commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot
selfdrive/athena/manage_athenad.py
selfdrive/athena/manage_athenad.py
#!/usr/bin/env python3 import time from multiprocessing import Process from common.params import Params from selfdrive.manager.process import launcher from selfdrive.swaglog import cloudlog from selfdrive.version import get_version, is_dirty ATHENA_MGR_PID_PARAM = "AthenadPid" def main(): params = Params() don...
#!/usr/bin/env python3 import time from multiprocessing import Process from common.params import Params from selfdrive.manager.process import launcher from selfdrive.swaglog import cloudlog from selfdrive.version import get_version, is_dirty ATHENA_MGR_PID_PARAM = "AthenadPid" def main(): params = Params() don...
mit
Python