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 |
|---|---|---|---|---|---|---|---|---|
b615f62326a5dd3454fc176786061a36cf6f96ed | use MiniWallet for p2p_leak_tx.py | syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin,syscoin/syscoin | test/functional/p2p_leak_tx.py | test/functional/p2p_leak_tx.py | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that we don't leak txs to inbound peers that we haven't yet announced to"""
from test_framework.m... | #!/usr/bin/env python3
# Copyright (c) 2017-2020 The Bitcoin Core developers
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
"""Test that we don't leak txs to inbound peers that we haven't yet announced to"""
from test_framework.m... | mit | Python |
2ad1bb79c56f5dd1210bc5cd3e05506432669995 | Make launchable. | takavfx/Mantle | gui.py | gui.py | #!/usr/bin/env python
from PySide import QtCore, QtGui, QtSvg
import define as DEFINE
reload(DEFINE)
class MantraMainWindow(QtGui.QMainWindow):
_windowTitle = DEFINE.windowTitle
_mantleIcon = QtGui.QIcon(DEFINE.mantleIconPath)
def __init__(self, parent=None):
super(MantraMainWindow, self).__in... | #!/usr/bin/env python
| mit | Python |
583c6cb8bf3e9373ae97de1d9c78c8c8420e11b5 | disable TRACE and debug printing | xaedes/canopen_301_402 | src/canopen_301_402/canopen.py | src/canopen_301_402/canopen.py | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import can
from canopen_301_402.utils import *
from canopen_301_402.connection_set import ConnectionSet
from canopen_301_402.canopen_msgs.msg import CanOpenMessage
from canopen_301_402.canopen_msgs.msgs import *
import Queue
from collections import defaultdict
TRACE =... | #!/usr/bin/env python2
# -*- coding: utf-8 -*-
import can
from canopen_301_402.utils import *
from canopen_301_402.connection_set import ConnectionSet
from canopen_301_402.canopen_msgs.msg import CanOpenMessage
from canopen_301_402.canopen_msgs.msgs import *
import Queue
from collections import defaultdict
TRACE =... | mit | Python |
d86e475e0d87399ba7487f7b41b12657de997665 | Change user activation complete URL to avoid conflicts | recklessromeo/otm-core,clever-crow-consulting/otm-core,clever-crow-consulting/otm-core,RickMohr/otm-core,recklessromeo/otm-core,maurizi/otm-core,maurizi/otm-core,RickMohr/otm-core,recklessromeo/otm-core,clever-crow-consulting/otm-core,recklessromeo/otm-core,RickMohr/otm-core,RickMohr/otm-core,maurizi/otm-core,maurizi/o... | opentreemap/registration_backend/urls.py | opentreemap/registration_backend/urls.py | from django.conf.urls import patterns
from django.conf.urls import include
from django.conf.urls import url
from django.views.generic.base import TemplateView
from views import RegistrationView, ActivationView
urlpatterns = patterns('',
url(r'^activation-complete/$',
TemplateView.as_view(template_name='r... | from django.conf.urls import patterns
from django.conf.urls import include
from django.conf.urls import url
from django.views.generic.base import TemplateView
from views import RegistrationView, ActivationView
urlpatterns = patterns('',
url(r'^activate/complete/$',
TemplateView.as_view(template_name='reg... | agpl-3.0 | Python |
8df1c772e93f6335f6a1e8b1db1997a8592f0951 | Bump version to 1.14.1 | tylertreat/BigQuery-Python | bigquery/version.py | bigquery/version.py | __version__ = '1.14.1'
| __version__ = '1.14.0'
| apache-2.0 | Python |
5fa94427230970747211941f1ef844b8f856a8ba | Bump version to 1.8.0 | tylertreat/BigQuery-Python | bigquery/version.py | bigquery/version.py | __version__ = '1.8.0'
| __version__ = '1.7.0'
| apache-2.0 | Python |
019d7e38e06e4018e67f6f838926ff5f81d0c539 | fix some datasets tests | sckott/pygbif | test/test-registry-datasets.py | test/test-registry-datasets.py | """Tests for registry module - datasets methods"""
import os
from pygbif import registry
def test_datasets():
"registry.datasets - basic test"
res = registry.datasets()
assert dict == res.__class__
def test_datasets_limit():
"registry.datasets - limit param"
res = registry.datasets(limit=1)
as... | """Tests for registry module - datasets methods"""
import os
from pygbif import registry
def test_datasets():
"registry.datasets - basic test"
res = registry.datasets()
assert dict == res.__class__
def test_datasets_limit():
"registry.datasets - limit param"
res = registry.datasets(limit=1)
as... | mit | Python |
90f2393ae75e170065958d7cd9d5fdc273036d2c | mark current dispaly response as no-cache | setrofim/billboard | billboard/server.py | billboard/server.py | import os
import threading
from flask import Flask,request, send_from_directory
class Server(threading.Thread):
def __init__(self, workdir, port):
super(Server, self).__init__()
self.daemon = True
self.workdir = workdir
self.port = port
def run(self):
app = Flask('bi... | import os
import threading
from flask import Flask, request, send_from_directory
class Server(threading.Thread):
def __init__(self, workdir, port):
super(Server, self).__init__()
self.daemon = True
self.workdir = workdir
self.port = port
def run(self):
app = Flask('b... | bsd-3-clause | Python |
553735a857875abf54bc71b7b73569d223b4ccf7 | Fix minor typing issue in union find test. | cjauvin/python_algorithms,ofenerci/python_algorithms,ofenerci/python_algorithms,pombredanne/python_algorithms,pombredanne/python_algorithms,pombredanne/python_algorithms,cjauvin/python_algorithms,cjauvin/python_algorithms,ofenerci/python_algorithms | tests/basic/test_union_find.py | tests/basic/test_union_find.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_union_find
----------------------------------
Tests for `python_algorithms.union_find` module.
"""
import unittest
from python_algorithms.basic.union_find import UF
class TestUnionFind(unittest.TestCase):
def setUp(self):
self.N = 10
self... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
test_union_find
----------------------------------
Tests for `python_algorithms.union_find` module.
"""
import unittest
from python_algorithms.basic.union_find import UF
class TestUnionFind(unittest.TestCase):
def setUp(self):
self.N = 10
self... | bsd-3-clause | Python |
e320a218e2bcaea15eeaee5b2a0b97092447228e | Add an empty line after finish | Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI,Network-of-BioThings/smartAPI | src/migrate.py | src/migrate.py | import base64
from elasticsearch.client import Elasticsearch
from elasticsearch.helpers import scan
from controller import SmartAPI
from utils import decoder, indices
ES_ORIGIN = "http://smart-api.info:9200"
ES_DESTINATION = "http://localhost:9200" # CANNOT CHANGE THIS
def migrate():
for doc in scan(
... | import base64
from elasticsearch.client import Elasticsearch
from elasticsearch.helpers import scan
from controller import SmartAPI
from utils import decoder, indices
ES_ORIGIN = "http://smart-api.info:9200"
ES_DESTINATION = "http://localhost:9200" # CANNOT CHANGE THIS
def migrate():
for doc in scan(
... | mit | Python |
a9a1155619d1758c3e9087d1ef82cf28d746df45 | implement suggestion: use one-liner in _replace_whitespace | miso-belica/jusText,miso-belica/jusText | justext/utils.py | justext/utils.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division, print_function, unicode_literals
import re
import os
import sys
import pkgutil
MULTIPLE_WHITESPACE_PATTERN = re.compile(r"\s+", re.UNICODE)
def normalize_whitespace(text):
"""
Translates multiple whitespace into... | # -*- coding: utf-8 -*-
from __future__ import absolute_import
from __future__ import division, print_function, unicode_literals
import re
import os
import sys
import pkgutil
MULTIPLE_WHITESPACE_PATTERN = re.compile(r"\s+", re.UNICODE)
def normalize_whitespace(text):
"""
Translates multiple whitespace into... | bsd-2-clause | Python |
a238252c237f33fa9477f93a93b5fb202f0a7c46 | bump to v3.0.6 | jonathf/chaospy | chaospy/__init__.py | chaospy/__init__.py | """
Uncertainty Quantification Toolbox
==================================
This module contains tools for performing uncertainty quantification of models.
"""
import logging
import os
import chaospy.bertran
import chaospy.chol
import chaospy.descriptives
import chaospy.distributions
import chaospy.orthogonal
import ch... | """
Uncertainty Quantification Toolbox
==================================
This module contains tools for performing uncertainty quantification of models.
"""
import logging
import os
import chaospy.bertran
import chaospy.chol
import chaospy.descriptives
import chaospy.distributions
import chaospy.orthogonal
import ch... | mit | Python |
452e187df7e3beeb6b5505badb38a00f837f3e47 | FIx get() and add_interface_port_map(). | midonet/python-midonetclient,midokura/python-midonetclient,midokura/python-midonetclient,midonet/python-midonetclient | src/midonet/hosts.py | src/midonet/hosts.py | # Copyright 2012 Midokura Japan KK
from resource import ResourceBase
class Host(ResourceBase):
def list(self):
return self.cl.get(self.cl.hosts_uri)
def get(self, host_id):
res, hosts = self.list()
return self.cl.get(self._find_resource(hosts, host_id))
def get_interface_port_ma... | # Copyright 2012 Midokura Japan KK
from resource import ResourceBase
class Host(ResourceBase):
def list(self):
return self.cl.get(self.cl.hosts_uri)
def get(self, host_id):
res, hosts = self.list()
return self._find_resource(hosts, host_id)
def get_interface_port_map(self, host_... | apache-2.0 | Python |
9ae82ebff04d016dcecf0ce0e276e8857475f151 | fix 1.4 (no backward) | vosi/django-orderedmodel | orderedmodel/admin.py | orderedmodel/admin.py | from django.contrib import admin
from django.conf import settings
from django.conf.urls.defaults import patterns
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
class OrderedModelAdmin(admin.ModelAdmin):
ordering = ['orde... | from django.contrib import admin
from django.conf import settings
from django.conf.urls.defaults import patterns
from django.shortcuts import get_object_or_404
from django.http import HttpResponseRedirect
from django.utils.translation import ugettext as _
class OrderedModelAdmin(admin.ModelAdmin):
ordering = ['orde... | bsd-3-clause | Python |
aa437eda06a3239fefb6a477115230fe1baeae0d | fix typo | FederatedAI/FATE,FederatedAI/FATE,FederatedAI/FATE | examples/benchmark_quality/hetero_linr/sklearn-linr.py | examples/benchmark_quality/hetero_linr/sklearn-linr.py | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | #
# Copyright 2019 The FATE Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by appli... | apache-2.0 | Python |
3931bd78c1f6c5025633057ba9b2bd50f69c6e24 | Make sure we exit cleanly when a restart fails | stcorp/legato | legato/daemon.py | legato/daemon.py | from __future__ import absolute_import, print_function
import sys
import os
import logging
import signal
from watchdog.observers import Observer
from watchdog.events import *
from legato import registry
from legato.config import read_configuration_file
import time
# plugins
import legato.timed
import legato.filesyste... | from __future__ import absolute_import, print_function
import sys
import os
import logging
import signal
from watchdog.observers import Observer
from watchdog.events import *
from legato import registry
from legato.config import read_configuration_file
import time
# plugins
import legato.timed
import legato.filesyste... | bsd-3-clause | Python |
566fc15f136076db5c421ca18f8b1fcb3d332229 | Return ProjectSearchSerializer on ProjectResourceViewSet if action != 'Create' | OpenVolunteeringPlatform/django-ovp-projects,OpenVolunteeringPlatform/django-ovp-projects | ovp_projects/views.py | ovp_projects/views.py | from ovp_projects import serializers
from ovp_projects import models
from ovp_users import models as users_models
from rest_framework import mixins
from rest_framework import viewsets
from rest_framework import response
from rest_framework import status
class ProjectResourceViewSet(mixins.CreateModelMixin, mixins.Re... | from ovp_projects import serializers
from ovp_projects import models
from ovp_users import models as users_models
from rest_framework import mixins
from rest_framework import viewsets
from rest_framework import response
from rest_framework import status
class ProjectResourceViewSet(mixins.CreateModelMixin, mixins.Re... | agpl-3.0 | Python |
c5ccebbe366cbafbdce76e85b488153e8a1e1245 | update ilb mTLS tests for new private mig implementation | apigee/terraform-modules,apigee/terraform-modules | tests/samples/test_ilb_mtls.py | tests/samples/test_ilb_mtls.py | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | # Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, ... | apache-2.0 | Python |
02ca0147a1aa2b81c18812ba60b54cd6475cdf33 | Fix test bleed | itoed/fabric,akaariai/fabric,askulkarni2/fabric,felix-d/fabric,getsentry/fabric,xLegoz/fabric,tekapo/fabric,pgroudas/fabric,bitprophet/fabric,qinrong/fabric,hrubi/fabric,mathiasertl/fabric,tolbkni/fabric,elijah513/fabric,kxxoling/fabric,pashinin/fabric,amaniak/fabric,rodrigc/fabric,ploxiln/fabric,opavader/fabric,ericho... | tests/test_context_managers.py | tests/test_context_managers.py | from __future__ import with_statement
from nose.tools import eq_
from fabric.state import env
from fabric.context_managers import cd, settings
#
# cd()
#
def test_error_handling():
"""
cd cleans up after itself even in case of an exception
"""
class TestException(Exception):
pass
try:
... | from __future__ import with_statement
from nose.tools import eq_
from fabric.state import env
from fabric.context_managers import cd
#
# cd()
#
def test_error_handling():
"""
cd cleans up after itself even in case of an exception
"""
class TestException(Exception):
pass
try:
wit... | bsd-2-clause | Python |
4607e92b349746a33de266249a8a80fd3fb07a75 | add tests for error reporting | mitya57/pymarkups,retext-project/pymarkups | tests/test_restructuredtext.py | tests/test_restructuredtext.py | # This file is part of python-markups test suite
# License: BSD
# Copyright: (C) Dmitry Shachnev, 2012
import unittest
from markups import ReStructuredTextMarkup
basic_text = \
'''Hello, world!
=============
This is an example **reStructuredText** document.'''
class ReStructuredTextTest(unittest.TestCase):
def tes... | # This file is part of python-markups test suite
# License: BSD
# Copyright: (C) Dmitry Shachnev, 2012
import unittest
from markups import ReStructuredTextMarkup
basic_text = \
'''Hello, world!
=============
This is an example **reStructuredText** document.'''
class ReStructuredTextTest(unittest.TestCase):
def tes... | bsd-3-clause | Python |
050a4944616a1926f851b5f1376d638fcfefb265 | fix addAnswer | NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess,NCSSM-CS/CSAssess | controller/addAnswer.py | controller/addAnswer.py | #!/usr/local/bin/python3
"""
created_by: Aninda Manocha
created_date: 3/4/2015
last_modified_by: Aninda Manocha
last_modified date: 3/6/2015
"""
# imports
import constants
import utils
import json
from sql.user import User
from sql.question import Question
from sql.answer import Answer
from sql.sessio... | #!/usr/local/bin/python3
"""
created_by: Aninda Manocha
created_date: 3/4/2015
last_modified_by: Aninda Manocha
last_modified date: 3/5/2015
"""
# imports
import constants
import json
from sql.user import User
from sql.question import Question
from sql.answer import Answer
from sql.topic import Topic
... | mit | Python |
7765a206f7c8b7c9c8bbb54373bbf596e07d6fc7 | Bump version to 0.4.3 | mhe/pynrrd | nrrd/_version.py | nrrd/_version.py | __version__ = '0.4.3'
| __version__ = '0.4.2'
| mit | Python |
a388f025d8663ddd7d427363cb53153d95376589 | Update documentation copyright year | SectorLabs/django-postgres-extra | docs/source/conf.py | docs/source/conf.py | import os
import sys
import sphinx_rtd_theme
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
sys.path.insert(0, os.path.abspath("../.."))
import django
django.setup()
project = "django-postgres-extra"
copyright = "2019-2020, Sector Labs"
author = "Sector Labs"
extensions = [
"sphinx_rtd_theme",
"... | import os
import sys
import sphinx_rtd_theme
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "settings")
sys.path.insert(0, os.path.abspath("../.."))
import django
django.setup()
project = "django-postgres-extra"
copyright = "2019, Sector Labs"
author = "Sector Labs"
extensions = [
"sphinx_rtd_theme",
"sphin... | mit | Python |
5373408f94fae816e852b5cf0360b6a9bd64a86e | Update run.py | alexandermendes/pybossa-analyst,LibCrowds/libcrowds-analyst,alexandermendes/pybossa-analyst,alexandermendes/pybossa-analyst | run.py | run.py | # -*- coding: utf8 -*-
from libcrowds_analyst.app import create_app
if __name__ == "__main__":
app = create_app()
app.run(host=app.config['HOST'], port=app.config['PORT'],
debug=app.config['DEBUG'])
else:
app = create_app()
| # -*- coding: utf8 -*-
from libcrowds_analyst.app import create_app
app = create_app()
if __name__ == "__main__":
app.run(host=app.config['HOST'], port=app.config['PORT'],
debug=app.config['DEBUG'])
| unknown | Python |
61a71e3396726a81b86a6159fb9efb9cebe1567e | delete the configuration | certik/hermes-gui | run.py | run.py | """ Run the AcmeLab example application. """
# delete the configuration, so that we can easily develop without any "caching"
# effects:
import os
os.system("rm -rf ~/.enthought/acme.acmelab/")
# Standard library imports.
import logging
# Example imports.
from acme.acmelab.api import Acmelab
# Enthought plugins.
fro... | """ Run the AcmeLab example application. """
# Standard library imports.
import logging
# Example imports.
from acme.acmelab.api import Acmelab
# Enthought plugins.
from enthought.envisage.core_plugin import CorePlugin
from enthought.envisage.developer.developer_plugin import DeveloperPlugin
from enthought.envisage... | bsd-3-clause | Python |
4bd9d74f97c26a125110aec74a1b2063f6d86a61 | Modify run script for direct execution | scascketta/LostNumber | run.py | run.py | #!/usr/bin/env python
from logging import FileHandler, Formatter
from app import app
import logging
import time
import os
def config_logging(log_dname="logs"):
log_dname = "{0}/".format(log_dname)
if not os.path.exists(log_dname):
os.mkdir(log_dname)
logpath = os.getcwd() + "/{0}/".format(log_dname) + time.as... | from app import app
import logging
import time
import os
from logging import FileHandler, Formatter
if not os.path.exists('logs/'):
os.mkdir('logs')
logpath = os.getcwd() + '/logs/' + time.asctime() + '.log'
datefmt = '%m/%d/%g@%H:%M'
fh = FileHandler(logpath)
fh.setLevel(logging.DEBUG)
fmt = Formatter('%(asctime)... | mit | Python |
5ee266e6d918580249f838740b2c1d23e0a9eb7f | extend [DY]LD_LIBRARY_PATH instead of overwriting it | randombit/botan,randombit/botan,randombit/botan,randombit/botan,randombit/botan | src/scripts/check.py | src/scripts/check.py | #!/usr/bin/env python
"""
Implements the "make check" target
(C) 2020 Jack Lloyd, Rene Meusel
Botan is released under the Simplified BSD License (see license.txt)
"""
import json
import logging
import optparse # pylint: disable=deprecated-module
import os
import subprocess
import sys
def run_and_check(cmd_line, en... | #!/usr/bin/env python
"""
Implements the "make check" target
(C) 2020 Jack Lloyd, Rene Meusel
Botan is released under the Simplified BSD License (see license.txt)
"""
import json
import logging
import optparse # pylint: disable=deprecated-module
import os
import platform
import subprocess
import sys
def is_macos()... | bsd-2-clause | Python |
8f852fba0e37963f75ea4b5d485c80fa0ea40f19 | fix traverse_watchlist merge argument order | DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,DanielNeugebauer/adhocracy,liqd/adhocracy,liqd/adhocracy,phihag/adhocracy,phihag/adhocracy,phihag/adhocracy,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,alkadis/vcv,phihag/adhocracy,alka... | src/adhocracy/lib/watchlist.py | src/adhocracy/lib/watchlist.py | import logging
from pylons import tmpl_context as c
from adhocracy.model import meta, Watch, Comment, Delegateable
import adhocracy.model.refs as refs
log = logging.getLogger(__name__)
def find_watch(entity):
return Watch.find_by_entity(c.user, entity)
def make_watch(entity):
return refs.to_url(entity)
... | import logging
from pylons import tmpl_context as c
from adhocracy.model import meta, Watch, Comment, Delegateable
import adhocracy.model.refs as refs
log = logging.getLogger(__name__)
def find_watch(entity):
return Watch.find_by_entity(c.user, entity)
def make_watch(entity):
return refs.to_url(entity)
... | agpl-3.0 | Python |
b077360575c8253d08f078d15d2a7ebd1e020f0d | Integrate LLVM at llvm/llvm-project@161755770a44 | gautam1858/tensorflow,karllessard/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/te... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "161755770a44faaedc1a5e74a22b91f4d6ef9669"
LLVM_SHA256 = "87e71f95cfd8aa54bcc54f1b4bb0bd57705766ab3439908671b24b39ab784f75"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "e068c84762ac1ec34631beb5f41cebfa78fcc3df"
LLVM_SHA256 = "4ed528109dbc08cfcfbdf7f74bc52fa066efe6638cae1ab8bc7b6da42c1e045e"
tf_http_archive(
... | apache-2.0 | Python |
7fe0df313afa0d1e5fccf7f419c668fbff222dc3 | Integrate LLVM at llvm/llvm-project@a21c557955c6 | tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,yongtang/tensorflow,Intel-Corporation/tensorflow,paolodedios/tensorflow,yongtang/tensorf... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "a21c557955c6ea5cd02b9a145ad6469c608446c7"
LLVM_SHA256 = "52271917ba42a51ffe166be9f0fbd67a74abf4d33394b550ec2002c2a76c23c5"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "7362cc5ef50b5ebcbb11380ab13a179902c7b8be"
LLVM_SHA256 = "3400074362798632988687602f753f6f7a265d8a8493b2b3ae64f12a0a19d98c"
tf_http_archive(
... | apache-2.0 | Python |
9c73ada2531dd8ec2efe45a5faf44199aed9524e | Integrate LLVM at llvm/llvm-project@b668de2de2c2 | karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_mod... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "b668de2de2c2216a744454dd5144b35a68698031"
LLVM_SHA256 = "7e29619c7527589fb313f4b946a06e7a668bf13a19384481f5828bfdb8139d6b"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "135c9b2c4b47679dd978ca5534559ae66ddc0e6e"
LLVM_SHA256 = "fdb717bde7a309cecae65cf94eddec1dd434834422b34aa2e47a584c392f2c7e"
tf_http_archive(
... | apache-2.0 | Python |
db598c6ca5ded015b162057ba24ea5919cb2e207 | Integrate LLVM at llvm/llvm-project@0946e463e864 | tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow,Intel-tensorflow/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,Intel-tensorflow/tensorflow,paolodedios/tensorflow,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/ten... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "0946e463e8649896654b0dd39193db76a5789e11"
LLVM_SHA256 = "6690037c46bbd9b340baee3dd1778b8eeae54ed1555f961c0cfc64c1269d42e2"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "15cd237cc2afc07074c69ff4bd6c63dd3d6e0ebd"
LLVM_SHA256 = "9525e74a5cb7ff703ec33eabfedaecfa290f6d160e058a1a056b850149c7a1f2"
tf_http_archive(
... | apache-2.0 | Python |
17911f6ab408419df6865e533aeb0b0788ef4e6a | Integrate LLVM at llvm/llvm-project@3bc2b97b34ff | frreiss/tensorflow-fred,frreiss/tensorflow-fred,tensorflow/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_once,sarvex/tensorflow,frreiss/tensorflow-fred,tensorflow/tensorflow-experimental_link_static_libraries_... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "3bc2b97b34ff1d5f817793f83961192e62d5fc7b"
LLVM_SHA256 = "1d89cb7df71bd6fea5978812859ca0a5f5efcae334a2cccefe0b9bd28bddff41"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "e2e1a78abcefb396ea1c08990f4cf20ae5068ef8"
LLVM_SHA256 = "e1d0682790c8ed155681cb877f44a6632bd3ae708168022fc1dd629f4d5d7a20"
tf_http_archive(
... | apache-2.0 | Python |
66b6e7a184806f324e27eb31978c5c4c60243a38 | Integrate LLVM at llvm/llvm-project@bcf6f641acdb | tensorflow/tensorflow-experimental_link_static_libraries_once,gautam1858/tensorflow,frreiss/tensorflow-fred,karllessard/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-Corporation/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,paoloded... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "bcf6f641acdbeb208ea07a9e8ded37cd5b796d26"
LLVM_SHA256 = "31b0cfd4c65a5b46251cb0a1e25ea4ab486cfcef3966ea46d0e8a6f207d4709c"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "f984ac2715f71c38a7872fa2c2ad535b3d4fa285"
LLVM_SHA256 = "a4c93ba7af3484645c237505562192163e658f540f248ef1ae0e72ca54014cb6"
tf_http_archive(
... | apache-2.0 | Python |
03c3623d19317ec0e9709d68a98caf91efb2c8cd | Integrate LLVM at llvm/llvm-project@0d83e7203479 | 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 = "0d83e7203479d6bc7368d5b94351e4907c2afafc"
LLVM_SHA256 = "b010b650445f8811171c5d3b699f3fa60ca0558bce59f675bff00b32a412a445"
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 = "ac312a9d7c03f0be53834d3f295f1971aaf54649"
LLVM_SHA256 = "e1255347d9f085638e10cd362e3f60635d74c398f417f453e9ed3b80a0e87b6a"
tfrt_http_archive(
... | apache-2.0 | Python |
bb6c2188eb434f50670de0ee0fd60fe2c7495ab3 | Integrate LLVM at llvm/llvm-project@5166345f5041 | tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,paolodedios/tensorflow,karllessard/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_saved_model,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,yongtang/tensorflow,tensor... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "5166345f50412f1a380948c18809545c4b7a9bd3"
LLVM_SHA256 = "2dad75b85dad1e3ce48373d8e8a547905aea10e208c179e5ad3182f5e42323c9"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "de3fb0f29ecfd4e7327f2ae409936f8b4f251201"
LLVM_SHA256 = "ce8270898cbef2ec0236e2b9c91cd0105dcde629a7e28630c432113f2428a835"
tf_http_archive(
... | apache-2.0 | Python |
1dd5f97ba72c39706833157cf5d60af23cd51a34 | Integrate LLVM at llvm/llvm-project@5bbe50148f3b | gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-experimental_link_static_libraries_once,yongtang/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,tensorflow/tensorflow-pywrap_tf_optimizer,paolod... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "5bbe50148f3b515c170be22209395b72890f5b8c"
LLVM_SHA256 = "ef8c3f61983f86b85b54306103000865f671ee0574cda36fd0f0ed8209d20b19"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "b927aa69bf2fd50ecf33e3f5ec853eb3c70312c5"
LLVM_SHA256 = "0b7e47bd9a62b7c14d6f4c4b1cf8fdb2fba5996e6b24917deb07d9f636f7ce36"
tf_http_archive(
... | apache-2.0 | Python |
3b043f2c431026e4b7ccaa1d92a1ac0d964a6400 | Integrate LLVM at llvm/llvm-project@862fffd8231c | tensorflow/tensorflow-experimental_link_static_libraries_once,Intel-tensorflow/tensorflow,karllessard/tensorflow,gautam1858/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-experimental_link_static_libraries_once,tensorflow/tensorflow-pywrap_saved_model,Intel-Corporation/tensorflow,tensorflow/tensorflow-experimen... | third_party/llvm/workspace.bzl | third_party/llvm/workspace.bzl | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "862fffd8231c8c44a8ea8071041eac8919aed346"
LLVM_SHA256 = "4059bd7c912854769f82df9ed7284b7c6889c2ea26738e4ee2c91f9dff5762a8"
tf_http_archive(
... | """Provides the repository macro to import LLVM."""
load("//third_party:repo.bzl", "tf_http_archive")
def repo(name):
"""Imports LLVM."""
LLVM_COMMIT = "127d955441649e97411cc1299f39d37aa743c073"
LLVM_SHA256 = "adbd26af850c5a28a04fa421d6c9e16684ab6dc2d6c6af9d7523cf8aab8035b7"
tf_http_archive(
... | apache-2.0 | Python |
8b702543faac20af92a3151af5acfa6463c7f458 | update the version timestamp for the batch of upstream bugfixes that just came through. | ProgVal/Limnoria-test,mazaclub/mazabot-core,ProgVal/Limnoria-test,Ban3/Limnoria,mazaclub/mazabot-core,Ban3/Limnoria | src/version.py | src/version.py | """stick the various versioning attributes in here, so we only have to change
them once."""
version = '0.83.4.1+gribble (2010-10-10T17:52:04-0400)'
| """stick the various versioning attributes in here, so we only have to change
them once."""
version = '0.83.4.1+gribble (2010-09-08T00:11:28-0400)'
| bsd-3-clause | Python |
949ce3b2d52b46577eccbc5417fae2e20519ff5a | Update version number in _version.py | khchine5/opal,khchine5/opal,khchine5/opal | opal/_version.py | opal/_version.py | __version__ = '0.8.0'
| __version__ = '0.7.1'
| agpl-3.0 | Python |
9f9441cf43e66780ca7f24197d3cd9ece923dd30 | Allow kiva.quartz to be imported on non-darwin platforms without error. | tommy-u/enable,tommy-u/enable,tommy-u/enable,tommy-u/enable | kiva/quartz/__init__.py | kiva/quartz/__init__.py | # :Author: Robert Kern
# :Copyright: 2004, Enthought, Inc.
# :License: BSD Style
try:
from mac_context import get_mac_context
except ImportError:
get_mac_context = None
def get_macport(dc):
"""
Returns the Port or the CGContext of a wxDC (or child class) instance.
"""
if 'GetCGContext' i... | # :Author: Robert Kern
# :Copyright: 2004, Enthought, Inc.
# :License: BSD Style
from mac_context import get_mac_context
def get_macport(dc):
"""
Returns the Port or the CGContext of a wxDC (or child class) instance.
"""
if 'GetCGContext' in dir(dc):
ptr = dc.GetCGContext()
retur... | bsd-3-clause | Python |
1d361c8a743868b66bec7bd506aa0e33b19ed59c | Set new developer version `0.2.2` | YACOWS/opps,YACOWS/opps,williamroot/opps,opps/opps,jeanmask/opps,opps/opps,opps/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps | opps/__init__.py | opps/__init__.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 2, 2)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Open Source Content Management Platform - CMS for the "
u"magazines, newspappers websites and porta... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
import pkg_resources
pkg_resources.declare_namespace(__name__)
VERSION = (0, 2, 1)
__version__ = ".".join(map(str, VERSION))
__status__ = "Development"
__description__ = u"Open Source Content Management Platform - CMS for the "
u"magazines, newspappers websites and porta... | mit | Python |
24ba391f1816fecb811b11dc1abf3771437e8f30 | Use built-in function | yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti,yeti-platform/yeti | plugins/analytics/propagate_blocklist.py | plugins/analytics/propagate_blocklist.py | from __future__ import unicode_literals
from datetime import timedelta
from core.analytics import ScheduledAnalytics
from mongoengine import Q
class PropagateBlocklist(ScheduledAnalytics):
default_values = {
"frequency": timedelta(hours=1),
"name": "PropagateBlocklist",
"description": "E... | from __future__ import unicode_literals
from datetime import timedelta
from core.analytics import ScheduledAnalytics
from mongoengine import Q
class PropagateBlocklist(ScheduledAnalytics):
default_values = {
"frequency": timedelta(hours=1),
"name": "PropagateBlocklist",
"description": "E... | apache-2.0 | Python |
63b4d9a0a6674162fd780241d040cc4293413247 | add comment | seongahjo/Mosaicer,seongahjo/Mosaicer | convert.py | convert.py | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from PIL import Image
import glob
import sys
import numpy as np
import tensorflow as tf
data_dir='/tmp/seongah_data'
eval_dir='/tmp/seongah_eval'
def convert():
"""Convert All Images in 'data'
Args:... | from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from PIL import Image
import glob
import sys
import numpy as np
import tensorflow as tf
data_dir='/tmp/seongah_data'
eval_dir='/tmp/seongah_eval'
def convert():
imgs=glob.glob("data/*.jpg")
output=[]
outp... | mit | Python |
2329f4f45bdb99cc5cd5f3a3218370438bd866a7 | Allow slashes in device names | kiwiholmberg/kw-hc | kwhc/api/controllers.py | kwhc/api/controllers.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint, current_app, jsonify
from kwhc import telldus_core
from kwhc.common.telldus import get_device_by_name
from .models import Scene, SceneDevice
bp = Blueprint('api', __name__)
@bp.route('/ping', methods=['GET'])
def pingpong():
return jsoni... | #!/usr/bin/env python
# -*- coding: utf-8 -*-
from flask import Blueprint, current_app, jsonify
from kwhc import telldus_core
from kwhc.common.telldus import get_device_by_name
from .models import Scene, SceneDevice
bp = Blueprint('api', __name__)
@bp.route('/ping', methods=['GET'])
def pingpong():
return jsoni... | mit | Python |
d2009a0ee0e093ea9ea5c929d855b1998eef5b85 | Bump version to 0.5 dev | Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server | lava_server/__init__.py | lava_server/__init__.py | # Copyright (C) 2010, 2011 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software F... | # Copyright (C) 2010, 2011 Linaro Limited
#
# Author: Zygmunt Krynicki <zygmunt.krynicki@linaro.org>
#
# This file is part of LAVA Server.
#
# LAVA Server is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License version 3
# as published by the Free Software F... | agpl-3.0 | Python |
3362fbf627e3437c568b36f9f030bbfc4500a05a | Fix small typo | khanhicetea/distributed-webcrawler,khanhicetea/distributed-webcrawler | crawler.py | crawler.py | #!/usr/bin/python
import sys
import yaml
import rethinkdb as r
import gearman
import redis
from pybloomd import BloomdClient
import re
import urlparse
import requests
import urlnorm
parameter_file = open("parameters.yml", "r")
parameters = yaml.load(parameter_file)
except_url_suffixes = ["js", "css", "json", "png", "... | #!/usr/bin/python
import sys
import yaml
import rethinkdb as r
import gearman
import redis
from pybloomd import BloomdClient
import re
import urlparse
import requests
import urlnorm
parameter_file = open("parameters.yml", "r")
parameters = yaml.load(parameter_file)
except_url_suffixes = ["js", "css", "json", "png", "... | mit | Python |
1816a9427824eadf21e5cae60e1ce87e735567b4 | Prepare BinaryTree class | bowen0701/algorithms_data_structures | lc101_symmetric_tree.py | lc101_symmetric_tree.py | """Leetcode 101. Symmetric Tree
Easy
URL: https://leetcode.com/problems/symmetric-tree/
Given a binary tree, check whether it is a mirror of itself
(ie, symmetric around its center).
For example, this binary tree [1,2,2,3,4,4,3] is symmetric:
1
/ \
2 2
/ \ / \
3 4 4 3
But the following [1,2,2,null,3,... | """Leetcode 101. Symmetric Tree
Easy
URL: https://leetcode.com/problems/symmetric-tree/
Given a binary tree, check whether it is a mirror of itself
(ie, symmetric around its center).
For example, this binary tree [1,2,2,3,4,4,3] is symmetric:
1
/ \
2 2
/ \ / \
3 4 4 3
But the following [1,2,2,null,3... | bsd-2-clause | Python |
51736dab102be5c436fce1167b67f6320e6148d8 | write to file for easier development | ShadyZOZ/Shaqtin-A-Fool-Crawler | crawler.py | crawler.py | import requests
from bs4 import BeautifulSoup
host = 'https://www.youtube.com'
url = 'https://www.youtube.com/playlist?list=PLU6BYY1Lu_feVbuZEscpd6xT32zCrVrev'
r = requests.get(url)
soup = BeautifulSoup(r.content)
links = soup.tbody.find_all('a', 'pl-video-title-link')
url_list = [host + link['href'].split('&')[0] ... | import requests
from bs4 import BeautifulSoup
host = 'https://www.youtube.com'
url = 'https://www.youtube.com/playlist?list=PLU6BYY1Lu_feVbuZEscpd6xT32zCrVrev'
r = requests.get(url)
soup = BeautifulSoup(r.content)
links = soup.tbody.find_all('a', 'pl-video-title-link')
url_list = [host + link['href'].split('&')[0] ... | mit | Python |
966dc965d333bbc9aeaeebabdea51fb06821d33e | Fix numbers not converted from strings when parsed | admk/soap | expr.py | expr.py | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
__author__ = 'Xitong Gao'
__email__ = 'xtg08@ic.ac.uk'
_OPERATORS = ['+', '*']
def _to_number(s):
try:
return int(s)
except ValueError:
return float(s)
def _try_to_number(s):
try:
return _to_number(s)
except (ValueErro... | #!/usr/bin/env python
# vim: set fileencoding=UTF-8 :
__author__ = 'Xitong Gao'
__email__ = 'xtg08@ic.ac.uk'
_OPERATORS = ['+', '*']
def _parse_r(s):
s = s.strip()
bracket_level = 0
operator_pos = -1
for i, v in enumerate(s):
if v == '(':
bracket_level += 1
if v == ')':... | mit | Python |
42d0849b190a2f00295beb95a2202ec5ac92f3f7 | Bump version to 0.2.0 | shoopio/sphinx-shoop-theme,shoopio/sphinx-shoop-theme,shoopio/sphinx-shoop-theme,shoopio/sphinx-shoop-theme | sphinx_shoop_theme/__init__.py | sphinx_shoop_theme/__init__.py | """
Sphinx Shoop theme.
This theme is a fork of Sphinx ReadTheDocs theme from
https://github.com/snide/sphinx_rtd_theme/.
"""
import os
__version__ = '0.2.0'
__version_full__ = __version__
VERSION = tuple(int(x) for x in __version__.split('.'))
def get_html_theme_path():
"""Return list of HTML theme paths."""
... | """
Sphinx Shoop theme.
This theme is a fork of Sphinx ReadTheDocs theme from
https://github.com/snide/sphinx_rtd_theme/.
"""
import os
__version__ = '0.1.9'
__version_full__ = __version__
VERSION = tuple(int(x) for x in __version__.split('.'))
def get_html_theme_path():
"""Return list of HTML theme paths."""
... | mit | Python |
a1204427800042237f20b8cbc67159410b58d80f | Update main.py: Invoke print as a function | spyder-ide/spyder-terminal,andfoy/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,spyder-ide/spyder-terminal,andfoy/spyder-terminal,andfoy/spyder-terminal | spyder_terminal/server/main.py | spyder_terminal/server/main.py | #!/usr/bin/env python
import os
import sys
import routes
import logging
import coloredlogs
import tornado.web
import tornado.ioloop
from tornado import gen
from logic import term_manager
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = ... | #!/usr/bin/env python
import os
import sys
import routes
import logging
import coloredlogs
import tornado.web
import tornado.ioloop
from tornado import gen
from logic import term_manager
LOG_FORMAT = ('%(levelname) -10s %(asctime)s %(name) -30s %(funcName) '
'-35s %(lineno) -5d: %(message)s')
LOGGER = ... | mit | Python |
5facef07f2ce7722cdd7fedf5485add84dab459d | use celery logger and configure it for all worker logger and global logger | bartscheers/tkp,bartscheers/tkp,transientskp/tkp,mkuiack/tkp,transientskp/tkp,mkuiack/tkp | tkp/distribute/celery/tasks.py | tkp/distribute/celery/tasks.py | """
All Celery worker tasks are defined here. No logic should be implemented here,
all functions should be a wrapper around the code in tkp.steps.
"""
import warnings
import logging
from celery import Celery
from celery.signals import after_setup_logger, after_setup_task_logger
import tkp.steps
local_logger = logging... | """
All Celery worker tasks are defined here. No logic should be implemented here,
all functions should be a wrapper around the code in tkp.steps.
convention here is func(iter, *arguments). So the iter element as first
argument
"""
import warnings
import logging
from celery import Celery
import tkp.steps
class Eve... | bsd-2-clause | Python |
dc7b8a3a656d01a737d0901b8c4c382d73a25595 | refactor get_short_path into two functions | bitIO/powerline-shell,paulhybryant/powerline-shell,junix/powerline-shell,banga/powerline-shell,LeonardoGentile/powerline-shell,Menci/powerline-shell,paulhybryant/powerline-shell,banga/powerline-shell,torbjornvatn/powerline-shell,tswsl1989/powerline-shell,mcdope/powerline-shell,iKrishneel/powerline-shell,rbanffy/powerli... | segments/cwd.py | segments/cwd.py | import os
def replace_home_dir(cwd):
home = os.getenv('HOME')
if cwd.startswith(home):
return '~' + cwd[len(home):]
return cwd
def split_path_into_names(cwd):
names = cwd.split(os.sep)
if names[0] == '':
names = names[1:]
if not names[0]:
return ['/']
return na... | import os
def get_short_path(cwd):
home = os.getenv('HOME')
names = cwd.split(os.sep)
if names[0] == '': names = names[1:]
path = ''
for i in range(len(names)):
path += os.sep + names[i]
if os.path.samefile(path, home):
return ['~'] + names[i+1:]
if not names[0]:
... | mit | Python |
c97bae4fe5f0df1fcb6dc9636f67d274a63edc6b | Fix deprecation warning re: urls.defaults | jamespacileo/django-stripe-payments,ZeevG/django-stripe-payments,boxysean/django-stripe-payments,jawed123/django-stripe-payments,crehana/django-stripe-payments,wahuneke/django-stripe-payments,adi-li/django-stripe-payments,aibon/django-stripe-payments,wahuneke/django-stripe-payments,pinax/django-stripe-payments,crehana/... | payments/urls.py | payments/urls.py | from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from payments.views import SubscribeView, ChangePlanView
urlpatterns = patterns(
"payments.views",
url(r"^webhook/$", "webhook", name="payments_webhook"),
... | from django.conf.urls.defaults import patterns, url
from django.views.generic import TemplateView
from django.contrib.auth.decorators import login_required
from payments.views import SubscribeView, ChangePlanView
urlpatterns = patterns(
"payments.views",
url(r"^webhook/$", "webhook", name="payments_webhook"... | mit | Python |
7f7d63d2aa2d8f3b322df9a0cf438659f1a8633c | Add convenience repl_channel function. | renshawbay/pika-python3,vitaly-krugl/pika,knowsis/pika,jstnlef/pika,vrtsystems/pika,skftn/pika,zixiliuyue/pika,benjamin9999/pika,shinji-s/pika,Tarsbot/pika,fkarb/pika-python3,hugoxia/pika,Zephor5/pika,reddec/pika,pika/pika | pika/__init__.py | pika/__init__.py | from pika.spec import \
BasicProperties
from pika.connection import \
PlainCredentials, \
ConnectionParameters, \
SimpleReconnectionStrategy
import pika.asyncore_adapter
from pika.asyncore_adapter import \
AsyncoreConnection
asyncore_loop = pika.asyncore_adapter.loop
from pika.blocking_adapter imp... | from pika.spec import \
BasicProperties
from pika.connection import \
PlainCredentials, \
ConnectionParameters, \
SimpleReconnectionStrategy
import pika.asyncore_adapter
from pika.asyncore_adapter import \
AsyncoreConnection
asyncore_loop = pika.asyncore_adapter.loop
from pika.blocking_adapter imp... | mpl-2.0 | Python |
11e12e1a6811c1d62781f39f0ac75ea326c2ddf3 | Fix store manager docstring | polyaxon/polyaxon,polyaxon/polyaxon,polyaxon/polyaxon | polyaxon_client/stores/stores/manager.py | polyaxon_client/stores/stores/manager.py | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
from polyaxon_client.stores.exceptions import PolyaxonStoresException
from polyaxon_client.stores.stores.base_store import BaseStore
class StoreManager(object):
"""
A convenient class to map experiment/job out... | # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function
import os
from polyaxon_client.stores.exceptions import PolyaxonStoresException
from polyaxon_client.stores.stores.base_store import BaseStore
class StoreManager(object):
"""
A convenient class to store experiment/job o... | apache-2.0 | Python |
6a5cbd290d3e158871570bdc28b57713b3a7feba | Fix div by 0 | zackzachariah/scavenger,zackzachariah/scavenger | server/views.py | server/views.py | from .models import Player, Game
from .util import getPlayerForUser
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render
def index(request):
return render(request, 'server/... | from .models import Player, Game
from .util import getPlayerForUser
from django.contrib.auth.decorators import login_required
from django.core.urlresolvers import reverse
from django.http import HttpResponseRedirect, HttpResponse
from django.shortcuts import render
def index(request):
return render(request, 'server/... | mit | Python |
1a50d2f7063a4e333896cdfe8d9e0b0ef9b7761d | define __all__ | siddhantgoel/tornado-sqlalchemy | tornado_sqlalchemy/__init__.py | tornado_sqlalchemy/__init__.py | from contextlib import contextmanager
from concurrent.futures import ThreadPoolExecutor
from sqlalchemy import create_engine, event
from sqlalchemy.ext.declarative import declarative_base as _declarative_base
from sqlalchemy.orm import sessionmaker
__all__ = ['SessionMixin', 'set_max_workers', 'wrap_in_future',
... | from contextlib import contextmanager
from concurrent.futures import ThreadPoolExecutor
from sqlalchemy import create_engine, event
from sqlalchemy.ext.declarative import declarative_base as _declarative_base
from sqlalchemy.orm import sessionmaker
class MissingFactoryError(Exception):
pass
class AsyncExecutio... | mit | Python |
af84d2bcadad22e15a14878a4145e634971e59bd | add docstring | imiric/clog-py | clog_client/core.py | clog_client/core.py | import warnings
import requests
from .config import Config
class ClogRequestWarning(Warning):
pass
def log(data, metadata={}):
"""Create a log event on the Clog server
Args:
data (str): primary log event data
metadata (dict): optional metadata about the event
Returns:
cla... | import warnings
import requests
from .config import Config
class ClogRequestWarning(Warning):
pass
def log(data, metadata={}):
payload = {'log': {'data': data, 'metadata': metadata},
'source': Config.source}
try:
res = requests.post('{}/api/v1/logs/'.format(Config.server_url),
... | mit | Python |
412265731720b8df9630cbe1ec3bd307986137ad | Add a low-level database API | bioidiap/bob.db.base | bob/db/base/__init__.py | bob/db/base/__init__.py | #!/usr/bin/env python
# Andre Anjos <andre.anjos@idiap.ch>
# Thu 23 Jun 20:22:28 2011 CEST
# vim: set fileencoding=utf-8 :
"""The db package contains simplified APIs to access data for various databases
that can be used in Biometry, Machine Learning or Pattern Classification."""
import pkg_resources
from . import ut... | #!/usr/bin/env python
# Andre Anjos <andre.anjos@idiap.ch>
# Thu 23 Jun 20:22:28 2011 CEST
# vim: set fileencoding=utf-8 :
"""The db package contains simplified APIs to access data for various databases
that can be used in Biometry, Machine Learning or Pattern Classification."""
import pkg_resources
__version__ = pk... | bsd-3-clause | Python |
98b6f81f68ce4338e932afc14b7b9d4c8a810e71 | Use field.to_python to do django type conversions on the field before checking if dirty. | mattcaldwell/django-dirtyfields,georgemarshall/django-dirtyfields | src/dirtyfields/dirtyfields.py | src/dirtyfields/dirtyfields.py | # Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django
from django.db.models.signals import post_save
class DirtyFieldsMixin(object):
def __init__(self, *args, **kwargs):
super(DirtyFieldsMixin, self).__init__(*args, **kwargs)
post_save.connect(reset_state, sender=self.__cl... | # Adapted from http://stackoverflow.com/questions/110803/dirty-fields-in-django
from django.db.models.signals import post_save
class DirtyFieldsMixin(object):
def __init__(self, *args, **kwargs):
super(DirtyFieldsMixin, self).__init__(*args, **kwargs)
post_save.connect(reset_state, sender=self.__cl... | bsd-3-clause | Python |
135935270169f56570cfb936cd0f9ab3dcd69cee | use new pillow in reindexer | dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq | corehq/pillows/group.py | corehq/pillows/group.py | from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed
from corehq.apps.change_feed.document_types import GROUP
from corehq.apps.groups.models import Group
from corehq.elastic import get_es_new
from .mappings.group_mapping import GROUP_INDEX, GROUP_MAPPING, GROUP_INDEX_INFO
from .base import HQPillow
from p... | from corehq.apps.change_feed.consumer.feed import KafkaChangeFeed
from corehq.apps.change_feed.document_types import GROUP
from corehq.apps.groups.models import Group
from corehq.elastic import get_es_new
from .mappings.group_mapping import GROUP_INDEX, GROUP_MAPPING, GROUP_INDEX_INFO
from .base import HQPillow
from p... | bsd-3-clause | Python |
de230a3b912612fe9fae84a3dccb37e2ad26dc40 | Bump to 0.3.8 | gisce/sii | sii/__init__.py | sii/__init__.py | # -*- coding: utf-8 -*-
__LIBRARY_VERSION__ = '0.3.8'
__SII_VERSION__ = '0.7'
| # -*- coding: utf-8 -*-
__LIBRARY_VERSION__ = '0.3.7'
__SII_VERSION__ = '0.7'
| mit | Python |
9bb078552cdbb3ece2aeae9a9b55db01e8dd41fa | Bump to v1.4.3 | gisce/sii | sii/__init__.py | sii/__init__.py | # -*- coding: utf-8 -*-
__LIBRARY_VERSION__ = '1.4.3'
__SII_VERSION__ = '1.0'
| # -*- coding: utf-8 -*-
__LIBRARY_VERSION__ = '1.4.1'
__SII_VERSION__ = '1.0'
| mit | Python |
73ce4a540f87191d010c37af3b8a6cd44d21b432 | Use thread.join instead of Event.wait | ldtri0209/robotframework,waldenner/robotframework,ldtri0209/robotframework,waldenner/robotframework,waldenner/robotframework,fiuba08/robotframework,ldtri0209/robotframework,fiuba08/robotframework,ldtri0209/robotframework,waldenner/robotframework,fiuba08/robotframework,fiuba08/robotframework,waldenner/robotframework,fiu... | src/robot/utils/robotthread.py | src/robot/utils/robotthread.py | # Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# 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... | # Copyright 2008-2011 Nokia Siemens Networks Oyj
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | apache-2.0 | Python |
09a1be334feb5c71ce9b21e1e19dc81fa46100f5 | Add definition filter | moreymat/omw-graph,moreymat/omw-graph,moreymat/omw-graph | parser/srcs/parser.py | parser/srcs/parser.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
def getKeyValue(line):
"""Split the line and get the key and the value"""
splitline = line.split("\t")
key = splitline[0]
value = splitline[2]
return (key, value)
def addDico(dico, key, value):
"""add value with key in the dictiona... | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
import os
def getKeyValue(line):
"""Split the line and get the key and the value"""
splitline = line.split("\t")
key = splitline[0]
value = splitline[2]
return (key, value)
def addDico(dico, key, value):
"""add value with key in the dictiona... | mit | Python |
c596fba8a6c586ebb76c224c3413f23e74c87d28 | Remove decorator from library | LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr,LinuxTeam-teilar/cronos.teilar.gr | library/views.py | library/views.py | # -*- coding: utf-8 -*-
import pycurl
import httplib
import urllib
import StringIO
from cronos.library.forms import *
from BeautifulSoup import BeautifulSoup
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_response
from django.template import Context
from django.templa... | # -*- coding: utf-8 -*-
import pycurl
import httplib
import urllib
import StringIO
from cronos.library.forms import *
from django.contrib.auth.decorators import login_required
from BeautifulSoup import BeautifulSoup
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render_to_respo... | agpl-3.0 | Python |
3d17eeb3c7c995cf132ee849b6d77ce4781165d8 | Update library_magic | baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB,baubie/SpikeDB | library_magic.py | library_magic.py | import sys
import subprocess
import shutil
copied = []
ignore = ["libSystem.B.dylib","libstdc++.6.dylib"]
basefolder = sys.argv[1].rsplit("/",2)[0]
copy = True
recur = True
if len(sys.argv) == 3:
copy = False
if len(sys.argv) == 4:
copy = False
recur = False
def update_libraries(executable):
# Find all the d... | import sys
import subprocess
import shutil
copied = []
ignore = ["libSystem.B.dylib","libstdc++.6.dylib"]
basefolder = sys.argv[1].rsplit("/",2)[0]
copy = True
recur = True
if len(sys.argv) == 3:
copy = False
if len(sys.argv) == 4:
copy = False
recur = False
def update_libraries(executable):
# Find all the d... | bsd-3-clause | Python |
b1717749248a40181722896ec2238b7500805529 | Update version to 1.4.1 | gepd/Deviot,gepd/Deviot | libs/__init__.py | libs/__init__.py | VERSION = (1, 4, 1)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "Deviot"
__description__ = (
"Plugin for IoT development based in the platformIO ecosystem."
"More info about platformIO visit: . http://platformio.org"
)
__url__ = "https://github.com/gepd/Deviot"
__author__ = "GEPD"
__email__ ... | VERSION = (1, 4, 0)
__version__ = ".".join([str(s) for s in VERSION])
__title__ = "Deviot"
__description__ = (
"Plugin for IoT development based in the platformIO ecosystem."
"More info about platformIO visit: . http://platformio.org"
)
__url__ = "https://github.com/gepd/Deviot"
__author__ = "GEPD"
__email__ ... | apache-2.0 | Python |
cba26aae380f8a2ef7d1c31ad75fce5afd17ced1 | Improve testing | llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy,llvmpy/llvmpy | llvm/__init__.py | llvm/__init__.py | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from llvmpy import extra
version = extra.get_llvm_version()
del extra
class Wrapper(object):
__slots__ = '__ptr'
def __init__(self, ptr):
assert ptr
self.__ptr = ptr
@property
def _ptr(self)... | from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
from llvmpy import extra
version = extra.get_llvm_version()
del extra
class Wrapper(object):
__slots__ = '__ptr'
def __init__(self, ptr):
assert ptr
self.__ptr = ptr
@property
def _ptr(self)... | bsd-3-clause | Python |
b7d61b3e62e212cc8b2bf8ca5f8c333d6fb6d078 | handle no aruments | Carreau/PipCreate | pipcreate/__main__.py | pipcreate/__main__.py | from pipcreate.pipcreate import main
import sys
argv = sys.argv
if len(argv)>=2:
main(argv[1])
else:
main()
| from pipcreate.pipcreate import main
import sys
argv = sys.argv
main(argv[1])
| bsd-3-clause | Python |
55a034bff93b1f842f9a6401dccf5016efdc3d38 | use alt theme and default init_css font family | afunTW/moth-graphcut | src/view/ttkstyle.py | src/view/ttkstyle.py | """
Predefined ttk style
"""
import logging
from tkinter import ttk
LOGGER = logging.getLogger(__name__)
class TTKStyle(ttk.Style):
def __init__(self, style_name, **kwargs):
super().__init__()
self.theme_use('alt')
self.configure(style_name, **kwargs)
def init_css():
TTKStyle('H1.TLab... | """
Predefined ttk style
"""
import logging
from tkinter import ttk
LOGGER = logging.getLogger(__name__)
class TTKStyle(ttk.Style):
def __init__(self, style_name, **kwargs):
super().__init__()
self.configure(style_name, **kwargs)
def init_css():
TTKStyle('H1.TLabel', font=('Helvetica',32))
... | mit | Python |
69ca1d8fc7f0dcacf2f29ccfb24b6be0ec2f0eab | Add angular view, convert tabs to spaces | shh-dlce/dplace,D-PLACE/dplace,NESCent/dplace,NESCent/dplace,stefelisabeth/dplace,D-PLACE/dplace,stefelisabeth/dplace,shh-dlce/dplace,stefelisabeth/dplace,shh-dlce/dplace,NESCent/dplace,shh-dlce/dplace,NESCent/dplace,D-PLACE/dplace,D-PLACE/dplace,stefelisabeth/dplace | dplace_app/views.py | dplace_app/views.py | from __builtin__ import dict
from django.shortcuts import render, get_object_or_404
from dplace_app.models import Society
from forms import GeoForm
from models import ISOCode
# Create your views here.
def search_geo(request):
if request.method == 'POST':
# handle search
form = GeoForm(request.POST)... | from django.shortcuts import render, get_object_or_404
from dplace_app.models import Society
from forms import GeoForm
from models import ISOCode
# Create your views here.
def search_geo(request):
if request.method == 'POST':
# handle search
form = GeoForm(request.POST)
results = []
region = None
if form.is... | mit | Python |
921f7a83dfb6f4543e6d67cc0400adbb56e90093 | add in newest batch of tools | ernfrid/svtools,abelhj/svtools,hall-lab/svtools,abelhj/svtools,hall-lab/svtools,hall-lab/svtools,abelhj/svtools,abelhj/svtools,ernfrid/svtools | svtools/cli.py | svtools/cli.py | import argparse, sys
import svtools.lsort
import svtools.lmerge
import svtools.vcfpaste
import svtools.copynumber
import svtools.afreq
import svtools.bedpetobed12
import svtools.bedpetovcf
import svtools.vcftobedpe
import svtools.vcfsort
import svtools.bedpesort
def svtools_cli_parser():
parser = argparse.Argument... | import argparse, sys
import svtools.lsort
import svtools.lmerge
import svtools.vcfpaste
import svtools.copynumber
import svtools.afreq
def svtools_cli_parser():
parser = argparse.ArgumentParser(description='Comprehensive utilities to explore structural variation in genomes', prog='svtools')
subparsers = parser... | mit | Python |
7c1316267b400ae92a47df63e5e38f97d0cea943 | Add "recycled" keyword | WT-Swish/swish | swish/parse.py | swish/parse.py | import rethinkdb as r
from nltk.stem import WordNetLemmatizer
from adapt.engine import IntentDeterminationEngine
from adapt.intent import IntentBuilder
wnl = WordNetLemmatizer()
def register_intent(name, engine, *keywords, **kwargs):
for keyword in keywords:
engine.register_entity(keyword, name.title()... | import rethinkdb as r
from nltk.stem import WordNetLemmatizer
from adapt.engine import IntentDeterminationEngine
from adapt.intent import IntentBuilder
wnl = WordNetLemmatizer()
def register_intent(name, engine, *keywords, **kwargs):
for keyword in keywords:
engine.register_entity(keyword, name.title()... | mit | Python |
cd8c16bf3e5afb2ceb9a3f095b6a75ab412c88e3 | revert of forgotten SelectPoll enforcement | dsiroky/snakemq,dsiroky/snakemq | snakemq/poll.py | snakemq/poll.py | # -*- coding: utf-8 -*-
"""
Stupid poll implementation for non-epoll systems.
Wrapper for select. Not working for file descriptors.
"""
import select
import time
#########################################################################
if not hasattr(select, "epoll"):
select.EPOLLIN = 1
select.EPOLLOUT = 4
... | # -*- coding: utf-8 -*-
"""
Stupid poll implementation for non-epoll systems.
Wrapper for select. Not working for file descriptors.
"""
import select
import time
#########################################################################
if not hasattr(select, "epoll"):
select.EPOLLIN = 1
select.EPOLLOUT = 4
... | mit | Python |
0082c114a2ff5bd609ba4e40401987c8b8999bb5 | Add avatar to EmployeeSimpleSerializer | belatrix/BackendAllStars | stars/serializers.py | stars/serializers.py | from .models import Star
from employees.models import Employee
from rest_framework import serializers
class EmployeeSimpleSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
fields = ('pk', 'username', 'first_name', 'last_name', 'avatar')
class StarSerializer(serializers.ModelS... | from .models import Star
from employees.models import Employee
from rest_framework import serializers
class EmployeeSimpleSerializer(serializers.ModelSerializer):
class Meta:
model = Employee
fields = ('pk', 'username', 'first_name', 'last_name')
class StarSerializer(serializers.ModelSerializer)... | apache-2.0 | Python |
9ea7681ba033a1398007194124b1a01a165de6f9 | Fix selecting heated bed for UMO | hmflash/Cura,Curahelper/Cura,fieldOfView/Cura,hmflash/Cura,ynotstartups/Wanhao,fieldOfView/Cura,ynotstartups/Wanhao,Curahelper/Cura | plugins/UltimakerMachineActions/UMOUpgradeSelection.py | plugins/UltimakerMachineActions/UMOUpgradeSelection.py | # Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.InstanceContainer import InstanceContainer
from cura.MachineAction import MachineAction
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProp... | # Copyright (c) 2017 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.Settings.ContainerRegistry import ContainerRegistry
from UM.Settings.InstanceContainer import InstanceContainer
from cura.MachineAction import MachineAction
from PyQt5.QtCore import pyqtSlot, pyqtSignal, pyqtProp... | agpl-3.0 | Python |
88bc537983dec25cf8844eda17c53c9ae0fe0836 | Print warning if 0 sensors detected. | jcsmith/1w2mqtt | 1w2mqtt.py | 1w2mqtt.py | #!/usr/bin/env python
#
#Copyright (c) 2015, Joshua Smith
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
#1. Redistributions of source code must retain the above copyright notice, this
#list of... | #!/usr/bin/env python
#
#Copyright (c) 2015, Joshua Smith
#All rights reserved.
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
#1. Redistributions of source code must retain the above copyright notice, this
#list of... | bsd-2-clause | Python |
e05d3bfab5dcb26dff1daf54d1874c51dcdabb79 | Update P2.py | AdamOSullivan46/ACM,AdamOSullivan46/ACM,AdamOSullivan46/ACM | 2014/P2.py | 2014/P2.py | # 2014 Problem 2
# Look and Say
lst = [i for i in input().split()]
s = str(lst[0])
n = int(lst[1])
i = 1
if len(s) == 1:
s = "1"+ s
i += 1
while len(s) <= 2:
if s[0] != s[1]:
s = "1" + s[0] + "1" + s[1]
else:
s = "2" + s[0]
i += 1
while i < n:
new = ""
length_... | lst = [i for i in input().split()]
s = str(lst[0])
n = int(lst[1])
i = 1
if len(s) == 1:
s = "1"+ s
i += 1
while len(s) <= 2:
if s[0] != s[1]:
s = "1" + s[0] + "1" + s[1]
else:
s = "2" + s[0]
i += 1
while i < n:
new = ""
length_s = len(s)
count = 1
for ... | mit | Python |
a6c3abe089803d258414efe8de3c42d049164065 | bump the version number | codenrhoden/ceph-deploy,rtulke/ceph-deploy,alfredodeza/ceph-deploy,rtulke/ceph-deploy,jumpstarter-io/ceph-deploy,codenrhoden/ceph-deploy,jumpstarter-io/ceph-deploy,osynge/ceph-deploy,SUSE/ceph-deploy,ceph/ceph-deploy,SUSE/ceph-deploy,branto1/ceph-deploy,zhouyuan/ceph-deploy,branto1/ceph-deploy,isyippee/ceph-deploy,zhou... | ceph_deploy/__init__.py | ceph_deploy/__init__.py |
__version__ = '1.5.9'
|
__version__ = '1.5.8'
| mit | Python |
d0b562ee5c8fef9bf51d2b2d74ef501912109ed1 | Fix webbrowser error | pydelhi/pydelhi_mobile,samukasmk/pythonbrasil_mobile,akshayaurora/PyDelhiMobile,shivan1b/pydelhi_mobile | pydelhiconf/uix/screens/screensponsor.py | pydelhiconf/uix/screens/screensponsor.py | '''ScreenSponsor:
Display all the logos of the sponsors.
'''
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class ScreenSponsor(Screen):
Builder.load_string('''
<ScreenSponsor>
name: 'ScreenSponsor'
BoxLayout
padding: dp(12)
orientation: 'vertical'
sp... | '''ScreenSponsor:
Display all the logos of the sponsors.
'''
from kivy.uix.screenmanager import Screen
from kivy.lang import Builder
class ScreenSponsor(Screen):
Builder.load_string('''
<ScreenSponsor>
name: 'ScreenSponsor'
BoxLayout
padding: dp(12)
orientation: 'vertical'
sp... | agpl-3.0 | Python |
8f599dbd2e81fd6b6015f8199b7d2c643f5ce862 | Update version to 3.9 | sot/chandra_aca,sot/chandra_aca | chandra_aca/__init__.py | chandra_aca/__init__.py | from .transform import *
__version__ = '3.9'
def test(*args, **kwargs):
"""
Run py.test unit tests.
"""
import testr
return testr.test(*args, **kwargs)
| __version__ = '0.9'
from .transform import *
def test(*args, **kwargs):
"""
Run py.test unit tests.
"""
import testr
return testr.test(*args, **kwargs)
| bsd-2-clause | Python |
3db60341b8076290da24a58d74f4398fe5e7667b | split subqueries and better names | DanielNeugebauer/adhocracy,phihag/adhocracy,alkadis/vcv,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,DanielNeugebauer/adhocracy,phihag/adhocracy,alkadis/vcv,alkadis/vcv,DanielNeugebauer/adhocracy,liqd/adhocracy,phihag/adhocracy,phihag/adhocracy,liqd/adhocracy,phihag/adhocracy,alkadis/vcv,liqd/adhocracy,liqd/ad... | src/adhocracy/lib/helpers/category_helper.py | src/adhocracy/lib/helpers/category_helper.py | from pylons import tmpl_context as c
from pylons.i18n import _
from sqlalchemy.orm import aliased
from adhocracy import model
from adhocracy.lib import cache
from adhocracy.lib import logo
from adhocracy.lib.helpers import url as _url
def logo_url(category, y, x=None):
from adhocracy.lib.helpers import base_url... | from pylons import tmpl_context as c
from pylons.i18n import _
from sqlalchemy.orm import aliased
from adhocracy import model
from adhocracy.lib import cache
from adhocracy.lib import logo
from adhocracy.lib.helpers import url as _url
def logo_url(category, y, x=None):
from adhocracy.lib.helpers import base_url... | agpl-3.0 | Python |
1a2cabca5be1b9682e39db12bd52c26f5bb8b5b9 | Add note to gcp session utils method | MGHComputationalPathology/dicomweb-client | src/dicomweb_client/ext/gcp/session_utils.py | src/dicomweb_client/ext/gcp/session_utils.py | """Session management utilities for Google Cloud Platform (GCP)."""
from typing import Optional, Any
try:
import google.auth
from google.auth.transport import requests as google_requests
except ImportError:
raise ImportError(
'The `dicomweb-client` package needs to be installed with the '
'... | """Session management utilities for Google Cloud Platform (GCP)."""
from typing import Optional, Any
try:
import google.auth
from google.auth.transport import requests as google_requests
except ImportError:
raise ImportError(
'The `dicomweb-client` package needs to be installed with the '
'... | mit | Python |
e8ec7a9142023cc0af5621ea3cf437621747d071 | Update abstract_repository.py | sapcc/monasca-persister | monasca_persister/repositories/influxdb/abstract_repository.py | monasca_persister/repositories/influxdb/abstract_repository.py | # (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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 ap... | # (C) Copyright 2016 Hewlett Packard Enterprise Development Company LP
#
# 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 ap... | apache-2.0 | Python |
82a8054226b441710f1e00fb0c0a49dd45760c8a | remove the raise StopIteration() because it fails on python3. see https://www.python.org/dev/peps/pep-0479/ | twiebe/Flask-CacheControl | src/flask_cachecontrol/after_this_request.py | src/flask_cachecontrol/after_this_request.py | # -*- coding: utf-8 -*-
"""
flask_cachecontrol.after_this_request
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by Thomas Wiebe.
:license: BSD, see LICENSE for more details.
"""
from flask import g
########################################################################
class CallbackBa... | # -*- coding: utf-8 -*-
"""
flask_cachecontrol.after_this_request
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:copyright: (c) 2015 by Thomas Wiebe.
:license: BSD, see LICENSE for more details.
"""
from flask import g
########################################################################
class CallbackBa... | bsd-3-clause | Python |
42efd09692dffc67e58050a24a49ee874a8c105d | Fix use of 'json' instead of 'j' | spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover,spiffcode/hostile-takeover | stats/sendcommand.py | stats/sendcommand.py | import os
import models
import config
import time
from hashlib import md5
import json
import serverinfo
from google.appengine.ext import webapp
"""
{
"info": {
"name": "<name>",
"start_utc": <long>
},
"command": {
"command": "<command name>",
"<arg0 name>": "<arg0 value>",... | import os
import models
import config
import time
from hashlib import md5
import json
import serverinfo
from google.appengine.ext import webapp
"""
{
"info": {
"name": "<name>",
"start_utc": <long>
},
"command": {
"command": "<command name>",
"<arg0 name>": "<arg0 value>",... | bsd-2-clause | Python |
84ec75ff6262d7926c0de87dffbeddb223fd190b | Fix a bug in LogType that broke migrations creation | tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador,tic-ull/portal-del-investigador | core/settings.py | core/settings.py | # -*- encoding: UTF-8 -*-
from enum import IntEnum
class LogType(IntEnum):
CVN_STATUS = 0
AUTH_ERROR = 1
LOG_TYPE = (
(LogType.CVN_STATUS.value, 'CVN_STATUS'),
(LogType.AUTH_ERROR.value, 'AUTH_ERROR'),
)
BASE_URL_FLATPAGES = '/investigacion/faq/'
| # -*- encoding: UTF-8 -*-
from enum import IntEnum
class LogType(IntEnum):
CVN_STATUS = 0
AUTH_ERROR = 1
LOG_TYPE = (
(LogType.CVN_STATUS, 'CVN_STATUS'),
(LogType.AUTH_ERROR, 'AUTH_ERROR'),
)
BASE_URL_FLATPAGES = '/investigacion/faq/'
| agpl-3.0 | Python |
ec0770abcf0b0c8cf62668413041533757da06d2 | add uncaught exception logging | tstringer/pypic,tstringer/pypic | main/__main__.py | main/__main__.py | """Do work"""
import logging
import os
import sys
from cameracontroller.cameracontroller import CameraController
from storage.cloudstorage import CloudStorage
logger = logging.getLogger('pypic')
log_dir = os.path.expanduser('~/log')
if not os.path.exists(log_dir):
os.makedirs(log_dir)
logging.basicConfig(
fi... | """Do work"""
import os
from cameracontroller.cameracontroller import CameraController
from storage.cloudstorage import CloudStorage
def main():
"""Main script execution"""
camera_controller = CameraController(
os.path.expanduser('~/pypic_output'),
CloudStorage(
os.environ.get('AZ... | mit | Python |
ad8908753e31420f489f8e5fe2f1c5eac5a5c42a | Add ci parameter to get_ci() and push_ci() methods. | sl4shme/alexandria,sl4shme/alexandria,sl4shme/alexandria,uggla/alexandria | alexandria/drivers.py | alexandria/drivers.py | # coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self,ci):
pass
d... | # coding=utf-8
import types
import config
class Driver(object):
def __init__(self):
self.driver_type = self.__class__.__name__
# Get credentials from conf files for CMDB
pass
def get_driver_type(self):
return self.driver_type
def get_ci(self):
pass
def ... | apache-2.0 | Python |
f9a892f1a100e9f09444cda3ea538d9f4e53449e | Bump version. | informatics-isi-edu/deriva-py | deriva/core/__init__.py | deriva/core/__init__.py | __version__ = "1.3.1"
from deriva.core.utils.core_utils import *
from deriva.core.base_cli import BaseCLI, KeyValuePairArgs
from deriva.core.deriva_binding import DerivaBinding, DerivaPathError, DerivaClientContext
from deriva.core.deriva_server import DerivaServer
from deriva.core.ermrest_catalog import ErmrestCatalo... | __version__ = "1.3.0"
from deriva.core.utils.core_utils import *
from deriva.core.base_cli import BaseCLI, KeyValuePairArgs
from deriva.core.deriva_binding import DerivaBinding, DerivaPathError, DerivaClientContext
from deriva.core.deriva_server import DerivaServer
from deriva.core.ermrest_catalog import ErmrestCatalo... | apache-2.0 | Python |
9fe2f3d915d7f35a56c52a44d42a1dc3e299e6f5 | fix typo | telefonicaid/orchestrator,telefonicaid/orchestrator | src/orchestrator/core/mongo.py | src/orchestrator/core/mongo.py | #
# Copyright 2018 Telefonica Espana
#
# This file is part of IoT orchestrator
#
# IoT orchestrator is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option)... | #
# Copyright 2018 Telefonica Espana
#
# This file is part of IoT orchestrator
#
# IoT orchestrator is free software: you can redistribute it and/or
# modify it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option)... | agpl-3.0 | Python |
8ac9cd4a0f3b68043a0ea2021304055a65d47936 | Update admin for studygroups | p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles,p2pu/learning-circles | studygroups/admin.py | studygroups/admin.py | from django.contrib import admin
# Register your models here.
from studygroups.models import Course
from studygroups.models import StudyGroup
from studygroups.models import StudyGroupMeeting
from studygroups.models import Application
from studygroups.models import Reminder
from studygroups.models import Activity
f... | from django.contrib import admin
# Register your models here.
from studygroups.models import Course, StudyGroup, StudyGroupMeeting, Application, Reminder, Activity
from studygroups.models import Organizer
from studygroups.models import Facilitator
class ApplicationInline(admin.TabularInline):
model = Application
... | mit | Python |
fdcdc0d87cab57a1f8a9a46deb0a2fddf50b7beb | add template dir | childe/esproxy,childe/esproxy | esproxy/settings.py | esproxy/settings.py | """
Django settings for esproxy project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | """
Django settings for esproxy project.
For more information on this file, see
https://docs.djangoproject.com/en/1.7/topics/settings/
For the full list of settings and their values, see
https://docs.djangoproject.com/en/1.7/ref/settings/
"""
# Build paths inside the project like this: os.path.join(BASE_DIR, ...)
im... | mit | Python |
fd88d3cc135eac856b9a66a2a2fb80fdf341abde | Bump version -> v0.0.2 | alphagov/estools | estools/__init__.py | estools/__init__.py | __version__ = '0.0.2'
| __version__ = '0.0.1'
| mit | Python |
370b991d762c047b850d6e5ef19de837228445f5 | Add a since parameter to the deprecated decorator and also log the warning | onitake/Uranium,onitake/Uranium | UM/Logger.py | UM/Logger.py | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.PluginObject import PluginObject
import warnings
def deprecated(message, since = "Unknown"):
def deprecated_decorator(function):
def deprecated_function(*args, **kwargs):
warning = "{0} ... | # Copyright (c) 2015 Ultimaker B.V.
# Uranium is released under the terms of the AGPLv3 or higher.
from UM.PluginObject import PluginObject
import warnings
def deprecated(message):
def deprecated_decorator(function):
def deprecated_function(*args, **kwargs):
warnings.warn(message, Deprecation... | agpl-3.0 | Python |
fb1d41e1debe4a61d305a1f11cd7a139cb124c11 | Remove INCREMENT from Figurate | mackorone/euler | src/figurate.py | src/figurate.py | from sequence import Sequence
class Figurate(Sequence):
@classmethod
def _append(cls):
cls._NUMS.append(
cls._NUMS[-1] * 2 - cls._NUMS[-2] +
cls._NUMS[ 1] - 1 - cls._NUMS[ 0]
)
class Triangle(Figurate):
_NUMS = [1, 3]
class Pentagonal(Figurate):
_NUMS = [1, ... | from sequence import Sequence
class Figurate(Sequence):
_INCREMENT = None
@classmethod
def _append(cls):
cls._NUMS.append(2 * cls._NUMS[-1] - cls._NUMS[-2] + cls._INCREMENT)
class Triangle(Figurate):
_NUMS = [1, 3]
_INCREMENT = 1
class Pentagonal(Figurate):
_NUMS = [1, 5]
_... | mit | Python |
fb6365976647c0cfd8ec29db1a2f071a2f2677ec | Add missing handler registration | opennode/nodeconductor-saltstack | src/nodeconductor_saltstack/exchange/apps.py | src/nodeconductor_saltstack/exchange/apps.py | from django.apps import AppConfig
from django.db.models import signals
from nodeconductor.cost_tracking import CostTrackingRegister
from nodeconductor.template import TemplateRegistry
class SaltStackConfig(AppConfig):
name = 'nodeconductor_saltstack.exchange'
verbose_name = "NodeConductor SaltStack Exchange"... | from django.apps import AppConfig
from django.db.models import signals
from nodeconductor.cost_tracking import CostTrackingRegister
from nodeconductor.template import TemplateRegistry
class SaltStackConfig(AppConfig):
name = 'nodeconductor_saltstack.exchange'
verbose_name = "NodeConductor SaltStack Exchange"... | mit | Python |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.