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
790c9debf2f89dca49a5e6f5b3842aebfba2a796
Add interrupt signal handler in non-debug mode
martinp/jarvis2,martinp/jarvis2,martinp/jarvis2,mpolden/jarvis2,mpolden/jarvis2,Foxboron/Frank,Foxboron/Frank,mpolden/jarvis2,Foxboron/Frank
run.py
run.py
#!/usr/bin/env python import os import signal import sys from app.main import app, queues, sched def _teardown(signal, frame): sched.shutdown(wait=False) for queue in queues.values(): queue.put(None) queues.clear() # Let the interrupt bubble up so that Flask/Werkzeug see it raise Keyboard...
#!/usr/bin/env python import os import signal import sys from app.main import app, queues, sched def _teardown(signal, frame): sched.shutdown(wait=False) for queue in queues.values(): queue.put(None) queues.clear() # Let the interrupt bubble up so that Flask/Werkzeug see it raise Keyboard...
mit
Python
a70e2df4f35db6aa13d88c43b61b4fa4babec37f
enable https
openforis/gee-gateway,openforis/gee-gateway
run.py
run.py
import logging, argparse from flask import Flask from flask_cors import CORS from gee_gateway import gee_gateway, gee_initialize if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--gmaps_api_key', action='store', default='', help='Google Maps API key') parser.add_argumen...
import logging, argparse from flask import Flask from flask_cors import CORS from gee_gateway import gee_gateway, gee_initialize if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('--gmaps_api_key', action='store', default='', help='Google Maps API key') parser.add_argumen...
mit
Python
6945400e083064f12547dce691b108e4b1332906
Delete spam message after time has elapsed
ErikBoesen/selfbot
run.py
run.py
import os from discord.ext import commands import discord import asyncio import configparser import random # Read config config = configparser.ConfigParser() config.read('config.ini') prefix = ['$ '] bot = commands.Bot(command_prefix=prefix, description='Erik\'s selfbot', pm_help=None, self_bot=True) @bot.event asy...
import os from discord.ext import commands import discord import asyncio import configparser import random # Read config config = configparser.ConfigParser() config.read('config.ini') prefix = ['$ '] bot = commands.Bot(command_prefix=prefix, description='Erik\'s selfbot', pm_help=None, self_bot=True) @bot.event asy...
mit
Python
f3c4e5a813728704b2cba48a706277ba02477d54
update version
pavlov99/json-rpc
jsonrpc/__init__.py
jsonrpc/__init__.py
__version = (1, 5, 0) __version__ = version = '.'.join(map(str, __version)) __project__ = PROJECT = __name__ from .manager import JSONRPCResponseManager from .dispatcher import Dispatcher dispatcher = Dispatcher() # lint_ignore=W0611,W0401
__version = (1, 4, 0) __version__ = version = '.'.join(map(str, __version)) __project__ = PROJECT = __name__ from .manager import JSONRPCResponseManager from .dispatcher import Dispatcher dispatcher = Dispatcher() # lint_ignore=W0611,W0401
mit
Python
7cd642032ec4ddd44b3288895d5efde047744007
Extend testing/coverage for search.
leotrubach/sourceforge-allura,heiths/allura,Bitergia/allura,apache/incubator-allura,apache/allura,apache/allura,Bitergia/allura,heiths/allura,lym/allura-git,leotrubach/sourceforge-allura,heiths/allura,lym/allura-git,leotrubach/sourceforge-allura,lym/allura-git,lym/allura-git,apache/incubator-allura,apache/allura,apache...
Allura/allura/tests/test_search.py
Allura/allura/tests/test_search.py
import os from datetime import datetime, timedelta import mock from pylons import c, g, request from webob import Request from ming.orm.ormsession import ThreadLocalORMSession from allura import model as M from allura.lib import search from allura.lib import helpers as h from allura.command import reactor from allur...
import os import mock from pylons import c, g, request from webob import Request from ming.orm.ormsession import ThreadLocalORMSession from allura import model as M from allura.lib import search from allura.lib import helpers as h from allura.command import reactor from allura.ext.search import search_main from allu...
apache-2.0
Python
f7f7ce1a7fa1544dd5c1ca5df84e08d0d2ea74d9
Allow / in SDB paths
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
salt/utils/sdb.py
salt/utils/sdb.py
# -*- coding: utf-8 -*- ''' Basic functions for accessing the SDB interface For configuration options, see the docs for specific sdb modules. ''' from __future__ import absolute_import import salt.loader from salt.ext.six import string_types def sdb_get(uri, opts): ''' Get a value from a db, using a uri in t...
# -*- coding: utf-8 -*- ''' Basic functions for accessing the SDB interface For configuration options, see the docs for specific sdb modules. ''' from __future__ import absolute_import import salt.loader from salt.ext.six import string_types def sdb_get(uri, opts): ''' Get a value from a db, using a uri in t...
apache-2.0
Python
c47d43551f5ef79c959a93fb8dfdb68abfde9028
Adjust imports for Python 3 compat
facebook/Recipes-for-AutoPkg
Shared_Processors/Rsync.py
Shared_Processors/Rsync.py
#!/usr/bin/python # # Copyright (c) 2015, 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. """See d...
#!/usr/bin/python # # Copyright (c) 2015, 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. """See d...
apache-2.0
Python
32d4ea22c1bca4a96a8d826f0225dfee2a4c21d2
Include static file-related tests in 'test' package.
tomturner/django-tenants,tomturner/django-tenants,tomturner/django-tenants
django_tenants/tests/__init__.py
django_tenants/tests/__init__.py
from .files import * from .staticfiles import * from .template import * from .test_routes import * from .test_tenants import * from .test_cache import *
from .test_routes import * from .test_tenants import * from .test_cache import *
mit
Python
1a7cefb23584e4de658ff698e9dd44675873153c
active quest calculation improved
Edmonton-Public-Library/centennial,Edmonton-Public-Library/centennial,Edmonton-Public-Library/centennial
hyquest/questmanager.py
hyquest/questmanager.py
from hyquest.models import QuestSet, UserQuestSetAction from hyquest.actionmanager import beginQuestSet from hyquest.constants import MAX_ACTIVE_QUESTS def replenishQuestSets(user): activeQuests = UserQuestSetAction.objects.filter(user=user, questset__featured=False, questset__active=True).count() if(activeQue...
from hyquest.models import QuestSet, UserQuestSetAction from hyquest.actionmanager import beginQuestSet from hyquest.constants import MAX_ACTIVE_QUESTS def replenishQuestSets(user): activeQuests = UserQuestSetAction.objects.filter(user=user, questset__featured=False).count() if(activeQuests < MAX_ACTIVE_QUESTS...
mit
Python
ccfb6d64bf39fd571406ab1d3773c7d54e81502c
handle 404 returned by resolve()
wwitzel3/awx,wwitzel3/awx,wwitzel3/awx,wwitzel3/awx
awx/wsgi.py
awx/wsgi.py
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging from awx import __version__ as tower_version # Prepare the AWX environment. from awx import prepare_env, MODE prepare_env() from django.core.wsgi import WSGIHandler # NOQA import django # NOQA from django.conf import settings # NOQA from dj...
# Copyright (c) 2015 Ansible, Inc. # All Rights Reserved. import logging from awx import __version__ as tower_version # Prepare the AWX environment. from awx import prepare_env, MODE prepare_env() from django.core.wsgi import WSGIHandler # NOQA import django # NOQA from django.conf import settings # NOQA from dj...
apache-2.0
Python
e4acfd1ebfaddf729a493c913b0df371ac398ca8
bump version
goose3/goose,raven47git/python-goose,goose3/goose3,grangier/python-goose,github4ry/python-goose,raven47git/python-goose,cursesun/python-goose,zzz686970/python-goose,goose3/goose3,vetal4444/python-goose,cursesun/python-goose,ii0/python-goose,muckrack/python-goose,blmlove409/python-goose,muckrack/python-goose,heianxing/p...
goose/version.py
goose/version.py
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
# -*- coding: utf-8 -*- """\ This is a python port of "Goose" orignialy licensed to Gravity.com under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. Python port was written by Xavier Grangier for Recrutae Gravity.co...
apache-2.0
Python
1094753fe94f5ac75a9b1d4ef43e3cdaa20b1558
Update example runner.
probcomp/cgpm,probcomp/cgpm
gpmcc/example.py
gpmcc/example.py
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2014 Baxter S. Eaves Jr, # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # Lead Developer: Feras Saad <fsaad@mit.edu> # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documen...
# -*- coding: utf-8 -*- # The MIT License (MIT) # Copyright (c) 2014 Baxter S. Eaves Jr, # Copyright (c) 2015-2016 MIT Probabilistic Computing Project # Lead Developer: Feras Saad <fsaad@mit.edu> # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documen...
apache-2.0
Python
47358ffc62fd94aa6dab2632a7f96e6eeeeff7f3
use correct nomenclature
geometalab/osmaxx,geometalab/drf-utm-zone-info,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx-frontend,geometalab/osmaxx,geometalab/osmaxx-frontend,geometalab/drf-utm-zone-info,geometalab/osmaxx
tests/conversion_job/view_test.py
tests/conversion_job/view_test.py
from unittest.mock import patch from django.test import TestCase from conversion_job.models import Extent, ConversionJob, GISFormat from conversion_job.views import ConversionJobStatusViewSet from converters import converter_options from shared import ConversionProgress from rq.job import JobStatus as RQJobStatus c...
from unittest.mock import patch from django.test import TestCase from conversion_job.models import Extent, ConversionJob, GISFormat from conversion_job.views import ConversionJobStatusViewSet from converters import converter_options from shared import ConversionProgress from rq.job import JobStatus as RQJobStatus c...
mit
Python
72e681fe1ccf98b5de50d54928ba1d2e996c29da
Remove pixelated.adapter.soledad package from setup.py
PuZZleDucK/pixelated-user-agent,kaeff/pixelated-user-agent,pixelated-project/pixelated-user-agent,pixelated/pixelated-user-agent,pixelated-project/pixelated-user-agent,sw00/pixelated-user-agent,kaeff/pixelated-user-agent,kaeff/pixelated-user-agent,sw00/pixelated-user-agent,pixelated/pixelated-user-agent,sw00/pixelated-...
service/setup.py
service/setup.py
#!/usr/bin/env python # # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated 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) any later version. # ...
#!/usr/bin/env python # # Copyright (c) 2014 ThoughtWorks, Inc. # # Pixelated 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) any later version. # ...
agpl-3.0
Python
8a4a2173fe587d716148a74d5b11c7ca83a7ca6f
Fix bug 1239380: Remove vestiges of NOSE in settings
SphinxKnight/kuma,jwhitlock/kuma,a2sheppy/kuma,SphinxKnight/kuma,safwanrahman/kuma,safwanrahman/kuma,Elchi3/kuma,escattone/kuma,mozilla/kuma,ollie314/kuma,mozilla/kuma,ollie314/kuma,safwanrahman/kuma,ollie314/kuma,jwhitlock/kuma,safwanrahman/kuma,mozilla/kuma,a2sheppy/kuma,a2sheppy/kuma,jgmize/kuma,safwanrahman/kuma,sa...
settings_test.py
settings_test.py
from settings import * DEBUG = False TEMPLATE_DEBUG = True CELERY_ALWAYS_EAGER = True ES_LIVE_INDEX = False ES_URLS = ['localhost:9200'] INSTALLED_APPS += ( 'kuma.core.tests.taggit_extras', ) BANISH_ENABLED = False LOGGING['loggers'].update({ 'django.db.backends': { 'handlers': ['console'], '...
from settings import * DEBUG = False TEMPLATE_DEBUG = True CELERY_ALWAYS_EAGER = True ES_LIVE_INDEX = False ES_URLS = ['localhost:9200'] INSTALLED_APPS += ( 'kuma.core.tests.taggit_extras', ) BANISH_ENABLED = False LOGGING['loggers'].update({ 'django.db.backends': { 'handlers': ['console'], '...
mpl-2.0
Python
93f8b4df04e4a57d4514e13dfdcc1d33cc571044
Use CamelCase.
adityatrivedi/shopping-list
shopping_list.py
shopping_list.py
#!/usr/bin/env python3 shoppingList = [] def show_help(): print("What should we pick up at the store?") print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.") def add_to_list(item): shoppingList.append(item) print("Added! List has {} items.".format(len(shoppingLis...
#!/usr/bin/env python3 shopping_list = [] def show_help(): print("What should we pick up at the store?") print("Enter DONE to stop. Enter HELP for this help. Enter SHOW to see your current list.") def add_to_list(item): shopping_list.append(item) print("Added! List has {} items.".format(len(shopping_...
mit
Python
1826cae73d766d6e12fdb6a321c7b672336ca42c
fix xkcd error message (errored before)
mikevb1/discordbot,mikevb1/lagbot
cogs/misc.py
cogs/misc.py
import random from discord.ext import commands import aiohttp class Misc: def __init__(self, bot): self.bot = bot @commands.command() async def roll(self, dice='1d6'): """In format XdY, rolls X dice each with Y sides. Default: 1d6 Usage: {prefix}roll {prefix}roll...
import random from discord.ext import commands import aiohttp class Misc: def __init__(self, bot): self.bot = bot @commands.command() async def roll(self, dice='1d6'): """In format XdY, rolls X dice each with Y sides. Default: 1d6 Usage: {prefix}roll {prefix}roll...
mit
Python
47310125c53d80e4ff09af6616955ccb2d9e3bc8
Boost should be referenced automatically by silicium
TyRoXx/conan_using_silicium,TyRoXx/conan_using_silicium
conanfile.py
conanfile.py
from conans import ConanFile, CMake class ConanUsingSilicium(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "silicium/0.1@tyroxx/testing" generators = "cmake" default_options = "Boost:shared=True"
from conans import ConanFile, CMake class ConanUsingSilicium(ConanFile): settings = "os", "compiler", "build_type", "arch" requires = "Boost/1.59.0@lasote/stable", "silicium/0.1@tyroxx/testing" generators = "cmake" default_options = "Boost:shared=True"
mit
Python
8b0dcad50860df86fb72805a0e26ec24987b8fa0
Make update dataset name test pass on windows
JIC-CSB/dtoolcore
tests/test_update_dataset_name.py
tests/test_update_dataset_name.py
"""Test the dtoolcore.ProtoDataset.update_name method.""" import pytest from . import tmp_uri_fixture # NOQA def test_update_name(tmp_uri_fixture): # NOQA import dtoolcore admin_metadata = dtoolcore.generate_admin_metadata("test_name") proto_dataset = dtoolcore.generate_proto_dataset( admin_...
"""Test the dtoolcore.ProtoDataset.update_name method.""" import pytest from . import tmp_dir_fixture # NOQA def test_update_name(tmp_dir_fixture): # NOQA import dtoolcore admin_metadata = dtoolcore.generate_admin_metadata("test_name") proto_dataset = dtoolcore.generate_proto_dataset( admin_...
mit
Python
a752ad370465f14f9f029edea36a94596f8fb98b
Add field id and content to the Hearing serializer
City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,vikoivun/kerrokantasi
kk/views/hearing.py
kk/views/hearing.py
import django_filters from rest_framework import viewsets from rest_framework import serializers from rest_framework import filters from rest_framework.decorators import detail_route from rest_framework.response import Response from kk.models import Hearing from .image import ImageFieldSerializer, ImageSerializer ...
import django_filters from rest_framework import viewsets from rest_framework import serializers from rest_framework import filters from rest_framework.decorators import detail_route from rest_framework.response import Response from kk.models import Hearing from .image import ImageFieldSerializer, ImageSerializer ...
mit
Python
a4110e97f973cbb0f5dfad0f9ed3f3b1b1f140ab
rewrite test_EventLoop.py with pytest
alphatwirl/alphatwirl,alphatwirl/alphatwirl,alphatwirl/alphatwirl,alphatwirl/alphatwirl
tests/unit/loop/test_EventLoop.py
tests/unit/loop/test_EventLoop.py
# Tai Sakuma <tai.sakuma@gmail.com> import logging import pytest try: import unittest.mock as mock except ImportError: import mock from alphatwirl.loop import EventLoop ##__________________________________________________________________|| @pytest.fixture() def events(): event1 = mock.Mock(name='event1')...
from alphatwirl.loop import EventLoop import unittest ##__________________________________________________________________|| class MockEvent(object): pass ##__________________________________________________________________|| class MockEventBuilder(object): def __init__(self, events): self.events = events...
bsd-3-clause
Python
50d4a340588a0203593bc56a2f0faff7b54a6d0c
Set customer to False on create in medical_manufacturer
laslabs/vertical-medical,laslabs/vertical-medical
medical_manufacturer/models/medical_manufacturer.py
medical_manufacturer/models/medical_manufacturer.py
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import fields, models, api class MedicalManufacturer(models.Model): _name = 'medical.manufacturer' _description = 'Medical Manufacturer' _inherits = {'res.partner': 'partner_id'...
# -*- coding: utf-8 -*- # © 2016 LasLabs Inc. # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). from openerp import fields, models, api class MedicalManufacturer(models.Model): _name = 'medical.manufacturer' _description = 'Medical Manufacturer' _inherits = {'res.partner': 'partner_id'...
agpl-3.0
Python
598bfe8ca858e7c3ae0dfee156d02c70ae4ab126
add currency to accounting models
qedsoftware/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,SEL-Columbia/commcare-hq,gmimano/commcaretest,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttara...
corehq/apps/accounting/models.py
corehq/apps/accounting/models.py
from django.conf import settings from django.core.exceptions import ObjectDoesNotExist from django.db import models class HQAccountingSetupError(Exception): pass class Currency(models.Model): """ Keeps track of the current conversion rates so that we don't have to poll the free, but rate limited API ...
class HQAccountingSetupError(Exception): pass
bsd-3-clause
Python
7048a9c995e9704340110f1c69d22139da7f9c31
add original picture
bennlich/scikit-image,robintw/scikit-image,SamHames/scikit-image,GaZ3ll3/scikit-image,vighneshbirodkar/scikit-image,oew1v07/scikit-image,newville/scikit-image,almarklein/scikit-image,pratapvardhan/scikit-image,WarrenWeckesser/scikits-image,almarklein/scikit-image,ajaybhat/scikit-image,ajaybhat/scikit-image,emon10005/sc...
doc/examples/plot_convex_hull.py
doc/examples/plot_convex_hull.py
""" =========== Convex Hull =========== The convex hull of a binary image is the set of pixels included in the smallest convex polygon that surround all white pixels in the input. In this example, we show how the input pixels (white) get filled in by the convex hull (white and grey). A good overview of the algorithm...
""" =========== Convex Hull =========== The convex hull of a binary image is the set of pixels included in the smallest convex polygon that surround all white pixels in the input. In this example, we show how the input pixels (white) get filled in by the convex hull (white and grey). A good overview of the algorithm...
bsd-3-clause
Python
5733fefc7e713159f2b113e81e524e0738814c1f
fix import
FederatedAI/FATE,FederatedAI/FATE,FederatedAI/FATE
federatedml/transfer_variable/base_transfer_variable.py
federatedml/transfer_variable/base_transfer_variable.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
f61dbc476a3f65154603a624e753cd278a2dbc2c
Integrate LLVM at llvm/llvm-project@dbf0d8118ccb
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 = "dbf0d8118ccbfd09def0974bf671c39e94d0be93" LLVM_SHA256 = "21f4fbaba22a145d229964c7aef8b6c0974960d1d7d85c21ce46a05ef1f36f7b" 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 = "8e284be04f2cd43a821289133a759afa2844f935" LLVM_SHA256 = "bfd6b305b16fc26f563a832b383074314f8839ebfa177a07e7727d289d7806bb" tfrt_http_archive( ...
apache-2.0
Python
e1e64a45b138980a6d8c125bacc81f22142d2b53
Integrate LLVM at llvm/llvm-project@7272a8c23ceb
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 = "7272a8c23ceb218b3bd6f0dd303c6df2c773cc74" LLVM_SHA256 = "a6c7081387e63778f7c05902c1e155352ec595bbe489ceb453c76086958a61cb" 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 = "cc88212d817ca4e16a90668e85f16526da16bc5e" LLVM_SHA256 = "914e1b1531b4c9a59c596f8317810f908d0ba57fbd5bc733e78611783695a2eb" tfrt_http_archive( ...
apache-2.0
Python
19aee824eb01046da93952b4ce09515e271a85d3
Integrate LLVM at llvm/llvm-project@5af9e648ae10
yongtang/tensorflow,Intel-tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow-pywrap_saved_model,karllessard/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,karllessard/tensorflow,tensorflow/tensorflow-pywrap_saved_model,yongtang/tensorflow,karllessard/tensorflow,Intel-tensorfl...
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 = "5af9e648ae10c50d94ab169f65907e12f210ec99" LLVM_SHA256 = "44417364e1c2b30d57f9e4c958637ec5a14ca9cc5f81b1d9f050a35498a564cc" 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 = "da4b929da79f4ce886f5612e3c84d29c1d2632f7" LLVM_SHA256 = "51372c1d0a248b8b03895b9503fe71808c7c386d28f96bf14a4a9d02691d82af" tf_http_archive( ...
apache-2.0
Python
b237d9b612ed7f81af5f1382ff31c26bd553b724
Integrate LLVM at llvm/llvm-project@506df1bbfd16
karllessard/tensorflow,tensorflow/tensorflow-pywrap_tf_optimizer,paolodedios/tensorflow,paolodedios/tensorflow,paolodedios/tensorflow,yongtang/tensorflow,tensorflow/tensorflow,tensorflow/tensorflow,Intel-Corporation/tensorflow,gautam1858/tensorflow,karllessard/tensorflow,petewarden/tensorflow,paolodedios/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 = "506df1bbfd16233134a6ddea96ed2d49077840fd" LLVM_SHA256 = "4d4db27ac8b1681c102a540f5afa193c2cb064fb52f97fab39a18b97172230b7" 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 = "85ab413b53aeb135eb58dab066afcbf20bef0cf8" LLVM_SHA256 = "8dcc2e5494c36b0f7d7f176847e66c1df6546029cd00ee7534744cd11ce46bf2" tf_http_archive( ...
apache-2.0
Python
e637337f80ddf36d47cab552d016117bf5609ffd
use i18n url patterns
pigjuliux/fedora-software,pombredanne/fedora-software,pombredanne/fedora-software,misli/fedora-software,misli/fedora-software,misli/fedora-software,pombredanne/fedora-software,pigjuliux/fedora-software,pigjuliux/fedora-software
fedora_software/urls.py
fedora_software/urls.py
from django.conf.urls import patterns, include, url from django.conf.urls.i18n import i18n_patterns from .views import HomeView, AppView, SearchView, CategoryView, FaqView #from django.contrib import admin #admin.autodiscover() urlpatterns = i18n_patterns('', # url(r'^admin/', include(admin.site.urls)), url(...
from django.conf.urls import patterns, include, url from .views import HomeView, AppView, SearchView, CategoryView, FaqView #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns('', # url(r'^admin/', include(admin.site.urls)), url(r'^$', HomeView.as_view(), name='home'), url(r'^a...
bsd-3-clause
Python
5a038800ec20fb18bca4366482cac7de371f90a5
Update doc version
code4bones/udis86,vmt/udis86,madmoose/udis86,nfedera/vmt-udis86,madmoose/udis86,unixfreaxjp/udis86,semi/udis86,code4bones/udis86,semi/udis86,DoomHammer/udis86,radare/udis86,nfedera/vmt-udis86,bSr43/udis86,bSr43/udis86,nfedera/vmt-udis86,vmt/udis86,unixfreaxjp/udis86,semi/udis86,DoomHammer/udis86,bSr43/udis86,stephenfew...
docs/manual/conf.py
docs/manual/conf.py
# -*- coding: utf-8 -*- import sys, os source_suffix = '.rst' master_doc = 'index' project = u'udis86' copyright = u'2013, Vivek Thampi' version = '1.7' release = '1.7.2' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['...
# -*- coding: utf-8 -*- import sys, os source_suffix = '.rst' master_doc = 'index' project = u'udis86' copyright = u'2013, Vivek Thampi' version = '1.7' release = '1.7.1' # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. exclude_patterns = ['...
bsd-2-clause
Python
a6431eebb094491621428fcf27eee1a23541903d
Add copyright code.
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
d1_libclient_python/src/setup.py
d1_libclient_python/src/setup.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # This work was created by participants in the DataONE project, and is # jointly copyrighted by participating institutions in DataONE. For # more information on DataONE, see our web site at http://dataone.org. # # Copyright ${year} # # Licensed under the Apache License,...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ :mod:`setup` ==================== :Synopsis: Create egg. :Author: DataONE (Dahl) """ from setuptools import setup, find_packages import d1_client setup( name='DataONE_ClientLib', version=d1_client.__version__, description='A DataONE client library for Python', ...
apache-2.0
Python
6a003e3a3975eebc870bab8d75bfa1914858a49c
Prepare for release.
obviel/obviel,obviel/obviel,obviel/obviel
py/js.obviel/setup.py
py/js.obviel/setup.py
from setuptools import setup, find_packages import os version = '0.11.1' def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() long_description = ( read('README.txt') + '\n' + read('CHANGES.txt')) setup( name='js.obviel', version=version, description="Fa...
from setuptools import setup, find_packages import os version = '0.12' def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() long_description = ( read('README.txt') + '\n' + read('CHANGES.txt')) setup( name='js.obviel', version=version, description="Fans...
mit
Python
089099c195fbd442b597884782ffd96b3ecb4020
set develop version to 1.5.0-dev after tagging 1.4.0
emory-libraries/findingaids,mprefer/findingaids,mprefer/findingaids,emory-libraries/findingaids
findingaids/__init__.py
findingaids/__init__.py
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
# file findingaids/__init__.py # # Copyright 2012 Emory University Library # # 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 # # U...
apache-2.0
Python
1797baa8a948d3d11618dc2815715e215cf0d467
Update pyActLearn Version
TinghuiWang/pyActLearn
pyActLearn/version.py
pyActLearn/version.py
MAJOR = 0 MINOR = 2 MICRO = 0 SUFFIX = "dev0" version = '%d.%d.%d.%s' % (MAJOR, MINOR, MICRO, SUFFIX)
MAJOR = 0 MINOR = 1 MICRO = 0 SUFFIX = "dev0" version = '%d.%d.%d.%s' % (MAJOR, MINOR, MICRO, SUFFIX)
bsd-3-clause
Python
e07a7de121d2309899c387c830d9027ce0387373
implement _Application class
free-free/pyblog,free-free/pyblog,free-free/pyblog,free-free/pyblog
pyblog/application.py
pyblog/application.py
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) from aiohttp import web from pyblog.log import Log from pyblog.httptools import Middleware,Route from pyblog.template import Template from pyblog.config import Config from pyblog.database import DB from pyblog....
# -*- coding:utf-8 -*- import os,time,asyncio,json import logging logging.basicConfig(level=logging.ERROR) from aiohttp import web from pyblog.log import Log from pyblog.httptools import Middleware,Route from pyblog.template import Template from pyblog.config import Config from pyblog.database import DB from pyblog....
mit
Python
6d17e6ac8816280cba8672e57eb4688191e9eb8f
delete useless code
Hubert51/ROOMr
server_part/manage.py
server_part/manage.py
from flask import Flask from flask import render_template import MySQLdb app = Flask(__name__) db = MySQLdb.connect(host="Gengruijie.mysql.pythonanywhere-services.com",user="Gengruijie",passwd="jixiaofang123",db="Gengruijie$ROOMr") cur = db.cursor() @app.route('/') def hello_world(): query551 = "select state f...
# A very simple Flask Hello World app for you to get started with... from flask import Flask from flask import render_template import MySQLdb app = Flask(__name__) db = MySQLdb.connect(host="Gengruijie.mysql.pythonanywhere-services.com",user="Gengruijie",passwd="jixiaofang123",db="Gengruijie$ROOMr") cur = db.cursor(...
mit
Python
7e0b215e6452647a8270571b0b54f03f4b994f23
Make pybtex.style.names.plain produce something reasonable.
live-clones/pybtex
pybtex/style/names.py
pybtex/style/names.py
# Copyright (C) 2006, 2007, 2008 Andrey Golovizin # # This file is part of pybtex. # # pybtex is free software; you can redistribute it and/or modify # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later vers...
# Copyright (C) 2006, 2007, 2008 Andrey Golovizin # # This file is part of pybtex. # # pybtex is free software; you can redistribute it and/or modify # under the terms of the GNU General Public License as published by the # Free Software Foundation; either version 2 of the License, or (at your # option) any later vers...
mit
Python
f6832927f8af939aed7ba2e3c6f9d6b09879e6c2
Update HttpClient.py
MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab,MyRobotLab/pyrobotlab
service/HttpClient.py
service/HttpClient.py
################################################ # HttpClient service is a service wrapper of the Apache HttpClient # So, you can download webpages, images, and a all sorts of # goodies from the internet http = Runtime.start("http","HttpClient") # blocking methods # GETs print(http.get("https://www.google.com")) pri...
# start the service httpclient = Runtime.start("httpclient","HttpClient")
apache-2.0
Python
59d81ad9942483280cee110cae83aea8b094e7f2
Add type hinting for `Model.get()`
agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft
pycroft/model/base.py
pycroft/model/base.py
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. """ pycroft.model.base ~~~~~~~~~~~~~~ This module contains base stuff for a...
# -*- coding: utf-8 -*- # Copyright (c) 2015 The Pycroft Authors. See the AUTHORS file. # This file is part of the Pycroft project and licensed under the terms of # the Apache License, Version 2.0. See the LICENSE file for details. """ pycroft.model.base ~~~~~~~~~~~~~~ This module contains base stuff for a...
apache-2.0
Python
6200980210c2168616450bd259b9d14d7d55866f
Fix silly typo
Flumotion/flumotion,flumotion-mirror/flumotion,timvideos/flumotion,Flumotion/flumotion,timvideos/flumotion,flumotion-mirror/flumotion,Flumotion/flumotion,Flumotion/flumotion,timvideos/flumotion
flumotion/common/vfs.py
flumotion/common/vfs.py
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free Software Founda...
# -*- Mode: Python -*- # vi:si:et:sw=4:sts=4:ts=4 # # Flumotion - a streaming media server # Copyright (C) 2008 Fluendo, S.L. (www.fluendo.com). # All rights reserved. # This file may be distributed and/or modified under the terms of # the GNU General Public License version 2 as published by # the Free Software Founda...
lgpl-2.1
Python
265def3f82b427fee90a46ba4332e354104d1cb4
Update class Score
ajnebro/pyMSAScoring
pymsascoring/score.py
pymsascoring/score.py
__author__ = "Antonio J. Nebro" __license__ = "GPL" __version__ = "1.0-SNAPSHOT" __status__ = "Development" __email__ = "antonio@lcc.uma.es" class Score: """ Class representing MSA (Multiple Sequence Alignment) scores A msa has to be a Python list containing pairs of (identifier, sequence), as in this exa...
__author__ = "Antonio J. Nebro" __license__ = "GPL" __version__ = "1.0-SNAPSHOT" __status__ = "Development" __email__ = antonio@lcc.uma.es class Score: """ Class representing MSA (Multiple Sequence Alignment) scores A msa has to be a Python list containing pairs of (identifier, sequence), as in this examp...
mit
Python
1181efb288db18420e5a376ed5dba53eadf8c2cb
update qcom tests (#26404)
commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot,commaai/openpilot
tools/gpstest/test_gps_qcom.py
tools/gpstest/test_gps_qcom.py
#!/usr/bin/env python3 import time import unittest import subprocess as sp from common.params import Params from system.hardware import TICI import cereal.messaging as messaging from selfdrive.manager.process_config import managed_processes def exec_mmcli(cmd): cmd = "mmcli -m 0 " + cmd p = sp.Popen(cmd, shell=T...
#!/usr/bin/env python3 import time import unittest import subprocess as sp from common.params import Params from system.hardware import TICI import cereal.messaging as messaging from selfdrive.manager.process_config import managed_processes def exec_mmcli(cmd): cmd = "mmcli -m 0 " + cmd p = sp.Popen(cmd, shell=T...
mit
Python
46c1430c34207ed79401be56a30c08abd6c105f0
Add the url for the previously unavailable latest messages view.
qubs/data-centre,qubs/data-centre,qubs/climate-data-api,qubs/climate-data-api
core/urls.py
core/urls.py
# Copyright 2016 the Queen's University Biological Station # 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 la...
# Copyright 2016 the Queen's University Biological Station # 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 la...
apache-2.0
Python
1ebd245750a7de2f39d28678fe6dc6fadd5f90f4
test for websocket_connect failure
Fydot/tornado,0xkag/tornado,LTD-Beget/tornado,ColorFuzzy/tornado,ListFranz/tornado,tornadoweb/tornado,wujuguang/tornado,fengsp/tornado,ZhuPeng/tornado,ms7s/tornado,ifduyue/tornado,futurechallenger/tornado,sxfmol/tornado,eklitzke/tornado,wsyzxcn/tornado,legnaleurc/tornado,kaushik94/tornado,andyaguiar/tornado,gitchs/torn...
tornado/test/websocket_test.py
tornado/test/websocket_test.py
from tornado.testing import AsyncHTTPTestCase, gen_test from tornado.web import Application from tornado.websocket import WebSocketHandler, websocket_connect class EchoHandler(WebSocketHandler): def on_message(self, message): self.write_message(message, isinstance(message, bytes)) class WebSocketTest(As...
from tornado.testing import AsyncHTTPTestCase, gen_test from tornado.web import Application from tornado.websocket import WebSocketHandler, websocket_connect class EchoHandler(WebSocketHandler): def on_message(self, message): self.write_message(message, isinstance(message, bytes)) class WebSocketTest(As...
apache-2.0
Python
383d2df79a2c85523393746d36b7b6647f369fa2
Increment version revision number
viennacl/pyviennacl-dev,opticode/pyviennacl-dev,viennacl/pyviennacl-dev,opticode/pyviennacl-dev
pyviennacl/version.py
pyviennacl/version.py
VERSION = (1, 0, 1) VERSION_STATUS = "" VERSION_TEXT = ".".join(str(x) for x in VERSION) + VERSION_STATUS
VERSION = (1, 0) VERSION_STATUS = "" VERSION_TEXT = ".".join(str(x) for x in VERSION) + VERSION_STATUS
mit
Python
fae3e4ffd69a65da0503068a8e46bf39fe3a9e5f
bump version
SylvainCorlay/qtawesome,daodaoliang/qtawesome,spyder-ide/qtawesome
qtawesome/__init__.py
qtawesome/__init__.py
""" qtawesome - use font-awesome in PyQt / PySide applications This is a port to Python of the C++ QtAwesome library by Rick Blommers """ from .iconic_font import IconicFont, set_global_defaults from .animation import Pulse, Spin __version__ = '0.1.9' _resource = {'iconic': None, } def _instance(): if _resourc...
""" qtawesome - use font-awesome in PyQt / PySide applications This is a port to Python of the C++ QtAwesome library by Rick Blommers """ from .iconic_font import IconicFont, set_global_defaults from .animation import Pulse, Spin __version__ = '0.1.8' _resource = {'iconic': None, } def _instance(): if _resourc...
mit
Python
538f8e3382e274402f2f71ba79439fae0828b3cf
Add shim to new widgets repository.
ipython/ipython,ipython/ipython
IPython/html.py
IPython/html.py
""" Shim to maintain backwards compatibility with old IPython.html imports. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys from warnings import warn warn("The `IPython.html` package has been deprecated. " "You should import from `jupyter_notebo...
""" Shim to maintain backwards compatibility with old IPython.html imports. """ # Copyright (c) IPython Development Team. # Distributed under the terms of the Modified BSD License. import sys from warnings import warn warn("The `IPython.html` package has been deprecated. " "You should import from jupyter_noteboo...
bsd-3-clause
Python
ec9beee5e933d2cc18328c3f34e35d053847daaf
Use ApplicationCommand
rexdf/ChineseLocalization
Localization.py
Localization.py
import sublime import sublime_plugin import zipfile import os from hashlib import md5 CONFIG_NAME = "Localization.sublime-settings" LANGS = { "ZH_CN": { 'zipfile': 'ZH_CN.zip', 'syntax_md5sum': '44cd99cdd8ef6c2c60c0a89d53a40b95' }, "ZH_TW": { "zipfile": "ZH_TW.zip", ...
import sublime import sublime_plugin import zipfile import os from hashlib import md5 CONFIG_NAME = "Localization.sublime-settings" LANGS = { "ZH_CN": { 'zipfile': 'ZH_CN.zip', 'syntax_md5sum': '44cd99cdd8ef6c2c60c0a89d53a40b95' }, "ZH_TW": { "zipfile": "ZH_TW.zip", ...
mit
Python
01cdc867b6bd8eb39ab194ed3316d298f0b68c59
Add a call to close when the spi class is destroyed
fjacob21/pycon2015
elpiwear/Rpi/spi.py
elpiwear/Rpi/spi.py
# The MIT License (MIT) # # Copyright (c) 2015 Frederic Jacob # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
# The MIT License (MIT) # # Copyright (c) 2015 Frederic Jacob # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights # to use, copy, mo...
mit
Python
9a4c944560c92ee122e084036cfa7587c7e85063
remove unnecessary settings_module argument
drgarcia1986/simple-settings
simple_settings/core.py
simple_settings/core.py
# -*- coding: utf-8 -*- import importlib import os import sys class _Settings(object): def __init__(self): self._dict = {} self._setup() def _setup(self): self._settings_module = self._get_settings_from_cmd_line() if not self._settings_module: self._settings_module...
# -*- coding: utf-8 -*- import importlib import os import sys class _Settings(object): def __init__(self): self._dict = {} self._setup() def _setup(self): self._settings_module = self._get_settings_from_cmd_line() if not self._settings_module: self._settings_module...
mit
Python
aab3c9fe2d357d16e0eb2ed6148ae3cd7b8f143c
Clean up admin.py.
myimages/django-registration,ubernostrum/django-registration
registration/admin.py
registration/admin.py
""" Admin class for the RegistrationProfile model, providing several conveniences. This is only enabled if 'registration' is in your INSTALLED_APPS setting, which should only occur if you are using the model-based activation backend. """ from django.contrib import admin from django.contrib.sites.shortcuts import get...
from django.contrib import admin from django.contrib.sites.models import Site from django.contrib.sites.requests import RequestSite from django.utils.translation import ugettext_lazy as _ from registration.models import RegistrationProfile @admin.register(RegistrationProfile) class RegistrationAdmin(admin.ModelAdmin...
bsd-3-clause
Python
9ca21452aa12b56dd657be922c406aa7f1c73865
update sidebar
UCBerkeleySETI/blimpy,UCBerkeleySETI/blimpy
docs/conf.py
docs/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: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
# 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: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or module...
bsd-3-clause
Python
84022dc0b80d4eb093b88695012c0df770b5fde9
correct version number
polysimtools/pysimm,polysimtools/pysimm
docs/conf.py
docs/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...
mit
Python
1b2e4f5f669ca2e5187702ec2c215aa8c8fa4031
Set master doc explicitly in docs/conf.py.
HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper,HaroldMills/Vesper
docs/conf.py
docs/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...
mit
Python
56d18d3963bb66a7f35b5227276230af525deb86
set html_theme_options
Nobatek/flask-rest-api,Nobatek/flask-rest-api
docs/conf.py
docs/conf.py
# Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or mo...
# Configuration file for the Sphinx documentation builder. # # This file does only contain a selection of the most common options. For a # full list see the documentation: # http://www.sphinx-doc.org/en/master/config # -- Path setup -------------------------------------------------------------- # If extensions (or mo...
mit
Python
56d72eb7d0e240e877b12ecdc34ca4d694e0a6ad
Comment out unused html_static_path Sphinx setting
TangledWeb/tangled.session
docs/conf.py
docs/conf.py
import datetime import pkg_resources import sphinx_rtd_theme # -- General configuration ------------------------------------------------ current_year = datetime.datetime.today().year project = 'tangled.session' author = 'Wyatt Baldwin' copyright = '2014-{} {}'.format(current_year, author) # The short X.Y |version| ...
import datetime import pkg_resources import sphinx_rtd_theme # -- General configuration ------------------------------------------------ current_year = datetime.datetime.today().year project = 'tangled.session' author = 'Wyatt Baldwin' copyright = '2014-{} {}'.format(current_year, author) # The short X.Y |version| ...
mit
Python
2d87b50a80f062fbd79b4817169b9296347b8533
update version
chfw/moban,chfw/moban
docs/conf.py
docs/conf.py
extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'moban' copyright = '2016, C.W.' author = 'C.W.' version = '0.0.6' release = '0.0.5' language = None exclude_patterns = [] pygments_style = 'sphinx' todo_include_todos = False html_theme = 'alabaster' html_static_path ...
extensions = [] templates_path = ['_templates'] source_suffix = '.rst' master_doc = 'index' project = 'moban' copyright = '2016, C.W.' author = 'C.W.' version = '0.0.4' release = '0.0.4' language = None exclude_patterns = [] pygments_style = 'sphinx' todo_include_todos = False html_theme = 'alabaster' html_static_path ...
mit
Python
f64446216e6129ff02432e0d970638ed67d69c05
Update bundle.py for metadata
pshc/archipelago,pshc/archipelago,pshc/archipelago
ui/bundle.py
ui/bundle.py
#!/usr/bin/env python from os import mkdir, readlink, rename from os.path import exists, join FILES = ['bedrock', 'builtins', 'forms'] SRC = '..' DEST = 'forms.bundle' def mod(name): return join(SRC, 'mods', name) def opt(name): return join(SRC, 'opt', name) def to_dest(full): return DEST + full[len(SRC)...
#!/usr/bin/env python from os import mkdir, readlink, rename from os.path import exists, join FILES = ['bedrock', 'builtins', 'forms'] SRC = '..' DEST = 'forms.bundle' def mod(name): return join(SRC, 'mods', name) def opt(name): return join(SRC, 'opt', name) def to_dest(full): return DEST + full[len(SRC)...
mit
Python
6bb10b43b5a8240d6612c62066e01bb875b155d4
return error code
olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net,olebole/astrometry.net
util/file.py
util/file.py
import os import cPickle as pickle def _filesize(fn): st = os.stat(fn) return st.st_size def file_size(fn, error=None): if error is None: return _filesize(fn) try: return _filesize(fn) except OSError: return error def read_file(fn): return open(fn).read() def write_file(data, fn): f = file(fn, 'w...
import os import cPickle as pickle def file_size(fn): st = os.stat(fn) return st.st_size def read_file(fn): return open(fn).read() def write_file(data, fn): f = file(fn, 'wb') f.write(data) f.close() def pickle_to_file(data, fn): f = open(fn, 'wb') # MAGIC -1: highest pickle protocol ...
bsd-3-clause
Python
903fd8e9f2d26f3f84249bd56fbd80967e236640
Implement start
esarafianou/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,esarafianou/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,dimkarakostas/rupture,dimriou/rupture,dimriou/rupture,esarafianou/rupture,dimkarakostas/rupture,dimkarakostas/rupture,dionyziz/rupture,dimriou/rupture,dionyziz/rupture,esarafi...
sniffer/sniff.py
sniffer/sniff.py
import logging from time import sleep from sniffer import Sniffer from flask import Flask, request, jsonify app = Flask(__name__) INTERFACE = 'wlan0' # Capturing interface, should be same for all sniffers level = logging.DEBUG logger = logging.getLogger('sniffer') logger.setLevel(level) FORMAT = '%(asctime)s - %(n...
import logging from flask import Flask, request, jsonify app = Flask(__name__) level = logging.DEBUG logger = logging.getLogger('sniffer') logger.setLevel(level) FORMAT = '%(asctime)s - %(name)s - %(levelname)s: %(message)s' logging.basicConfig(format=FORMAT) @app.route('/set_sniffer') def set_sniffer(): retur...
mit
Python
40a5202d9ef4bd3350d82176fc0cebf76cad209d
Fix flake8 errors
ecordell/pymacaroons
pymacaroons/__init__.py
pymacaroons/__init__.py
from .caveat import Caveat from .macaroon import Macaroon from .verifier import Verifier __all__ = [ 'Macaroon', 'Caveat', 'Verifier', ] __author__ = 'Evan Cordell' __version__ = "0.9.1" __version_info__ = tuple(__version__.split('.')) __short_version__ = __version__
__author__ = 'Evan Cordell' __version__ = "0.9.1" __version_info__ = tuple(__version__.split('.')) __short_version__ = __version__ from .caveat import Caveat from .macaroon import Macaroon from .verifier import Verifier __all__ = [ 'Macaroon', 'Caveat', 'Verifier', ]
mit
Python
2beebd92b8ad3fb59a93714c799450dbfebe3922
update pymysql.constants.CR (#1029)
PyMySQL/PyMySQL,pymysql/pymysql
pymysql/constants/CR.py
pymysql/constants/CR.py
# flake8: noqa # errmsg.h CR_ERROR_FIRST = 2000 CR_UNKNOWN_ERROR = 2000 CR_SOCKET_CREATE_ERROR = 2001 CR_CONNECTION_ERROR = 2002 CR_CONN_HOST_ERROR = 2003 CR_IPSOCK_ERROR = 2004 CR_UNKNOWN_HOST = 2005 CR_SERVER_GONE_ERROR = 2006 CR_VERSION_ERROR = 2007 CR_OUT_OF_MEMORY = 2008 CR_WRONG_HOST_INFO = 2009 CR_LOCALHOST_CONN...
# flake8: noqa # errmsg.h CR_ERROR_FIRST = 2000 CR_UNKNOWN_ERROR = 2000 CR_SOCKET_CREATE_ERROR = 2001 CR_CONNECTION_ERROR = 2002 CR_CONN_HOST_ERROR = 2003 CR_IPSOCK_ERROR = 2004 CR_UNKNOWN_HOST = 2005 CR_SERVER_GONE_ERROR = 2006 CR_VERSION_ERROR = 2007 CR_OUT_OF_MEMORY = 2008 CR_WRONG_HOST_INFO = 2009 CR_LOCALHOST_CONN...
mit
Python
dcce519a807f507509ffd2b5c66bbda77e28dd78
Reimplement Trie with dict and terminal
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
python/ctci_contacts.py
python/ctci_contacts.py
from collections import deque class Node: def __init__(self, terminal = False): self.children = dict() self.terminal = terminal def __repr__(self): return "Children: (" + str(self.children) + ") and Terminal: (" + str(self.terminal) + ")" class Trie: def __init__(self): ...
from collections import deque class Node: def __init__(self, data): self.data = data self.children = set() def add_child(self, child): self.children.add(child) def get_child(self, data): for child in self.children: if child.data == data: ...
mit
Python
8b1fa3440f029c3249390daf578ee56ea0ffab68
Fix method definition
umbc-hackafe/sign-drivers,umbc-hackafe/sign-drivers,umbc-hackafe/sign-drivers
python/games/twitter.py
python/games/twitter.py
import graphics import driver import game import twython import time TWITTER_APP_KEY = 'ntLFB6p6IApzcEECKF4NdHsdJ' TWITTER_APP_KEY_SECRET = '9AkI8vTZwxPXFrBMzcENZUscp9TEAJyFdXwCVrN3fVFZLifalO' TWITTER_ACCESS_TOKEN = '808021956-h3pMy2nfM2afQE6aC8hDTl69bb0JDu2hutYUqdoY' TWITTER_ACCESS_TOKEN_SECRET = 'RLozX4oMPu7rUpfehH...
import graphics import driver import game import twython import time TWITTER_APP_KEY = 'ntLFB6p6IApzcEECKF4NdHsdJ' TWITTER_APP_KEY_SECRET = '9AkI8vTZwxPXFrBMzcENZUscp9TEAJyFdXwCVrN3fVFZLifalO' TWITTER_ACCESS_TOKEN = '808021956-h3pMy2nfM2afQE6aC8hDTl69bb0JDu2hutYUqdoY' TWITTER_ACCESS_TOKEN_SECRET = 'RLozX4oMPu7rUpfehH...
mit
Python
71b6a88c04a7d2fadae5cdfd58aa53622f72b7bd
Remove debug flag
Mark-Shine/django-qiniu-storage,jackeyGao/django-qiniu-storage,glasslion/django-qiniu-storage,jeffrey4l/django-qiniu-storage
qiniu-6.1.9/qiniu/io.py
qiniu-6.1.9/qiniu/io.py
# -*- coding: utf-8 -*- import rpc import conf import random import string try: import zlib binascii = zlib except ImportError: zlib = None import binascii # @gist PutExtra class PutExtra(object): params = {} mime_type = 'application/octet-stream' crc32 = "" check_crc = 0 # @endgist ...
# -*- coding: utf-8 -*- import rpc import conf import random import string try: import zlib binascii = zlib except ImportError: zlib = None import binascii # @gist PutExtra class PutExtra(object): params = {} mime_type = 'application/octet-stream' crc32 = "" check_crc = 0 # @endgist ...
mit
Python
3e5c79fc05c9806152088492a6aafefba0ec5a13
add test for right identifier in debug-mode
Thor77/TeamspeakStats,Thor77/TeamspeakStats
tsstats/tests/test_template.py
tsstats/tests/test_template.py
import logging from os import remove import pytest from bs4 import BeautifulSoup from tsstats.log import parse_log from tsstats.template import render_template from tsstats.utils import seconds_to_text output_path = 'tsstats/tests/res/output.html' clients = parse_log('tsstats/tests/res/test.log') logger = logging.g...
import logging from os import remove import pytest from bs4 import BeautifulSoup from tsstats.log import parse_log from tsstats.template import render_template from tsstats.utils import seconds_to_text output_path = 'tsstats/tests/res/output.html' clients = parse_log('tsstats/tests/res/test.log') logger = logging.g...
mit
Python
5994c8eb517ac65e45a406901b65eda688cb2daa
Move 1 to right logic change
prathamtandon/g4gproblems
Arrays/separate_zeros_and_ones.py
Arrays/separate_zeros_and_ones.py
import unittest """ Given an array of 0s and 1s in random order, segregate 0s and 1s such that all 1s are at the right. Input: 0 1 0 1 0 0 1 1 1 0 Output: 0 0 0 0 0 1 1 1 1 1 """ """ Approach: 1. Have two pointers at the end of array. 2. Decrement till there are zeros 3. When there is a one, swap with rightmost zero ...
import unittest """ Given an array of 0s and 1s in random order, segregate 0s and 1s such that all 1s are at the right. Input: 0 1 0 1 0 0 1 1 1 0 Output: 0 0 0 0 0 1 1 1 1 1 """ """ Approach: 1. Have two pointers at the end of array. 2. Decrement till there are zeros 3. When there is a one, swap with rightmost zero ...
mit
Python
3d682e7ce1a43577839e37445ab5b7820ca6ce57
Bump version
mesnardo/snake
snake/version.py
snake/version.py
""" Sets up the version. """ import os _version_major = 0 _version_minor = 2 _version_micro = '1' _version_extra = '' # construct full version string _ver = [_version_major, _version_minor] if _version_micro: _ver.append(_version_micro) if _version_extra: _ver.append(_version_extra) __version__ = '.'.join(map(s...
""" Sets up the version. """ import os _version_major = 0 _version_minor = 2 _version_micro = '0' _version_extra = '' # construct full version string _ver = [_version_major, _version_minor] if _version_micro: _ver.append(_version_micro) if _version_extra: _ver.append(_version_extra) __version__ = '.'.join(map(s...
mit
Python
a735cbed889ebf81d96041c7572ed959f8823a6b
implement ansible yaml conversion
pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral,pioneers/PieCentral
griff/ansible.py
griff/ansible.py
import zmq, yaml from multiprocessing import Process, Queue from Queue import Empty # Sender process. def sender(port, send_queue): context = zmq.Context() socket = context.socket(zmq.PAIR) socket.bind("tcp://127.0.0.1:%d" % port) while True: msg = send_queue.get() socket.send_json(msg)...
import zmq from multiprocessing import Process, Queue from Queue import Empty # Sender process. def sender(port, send_queue): context = zmq.Context() socket = context.socket(zmq.PAIR) socket.bind("tcp://127.0.0.1:%d" % port) while True: msg = send_queue.get() socket.send_json(msg) # Re...
apache-2.0
Python
0ac38e1a05cc7dfcf587eee876786706648de0f2
Fix groovy_image crash on recent bazel versions (#336)
bazelbuild/rules_docker,bazelbuild/rules_docker,bazelbuild/rules_docker,bazelbuild/rules_docker
groovy/image.bzl
groovy/image.bzl
# Copyright 2017 Google Inc. 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 applicable law or a...
# Copyright 2017 Google Inc. 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 applicable law or a...
apache-2.0
Python
6b5cdce4aa963c7e00951f5ce755cbbe432ed66b
Update face detection example
openmv/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,kwagyeman/openmv,iabdalkader/openmv,iabdalkader/openmv,kwagyeman/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv
usr/examples/face_detection.py
usr/examples/face_detection.py
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.HQVGA) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. face_cascade = im...
import sensor, time, image # Reset sensor sensor.reset() # Sensor settings sensor.set_contrast(1) sensor.set_gainceiling(16) sensor.set_framesize(sensor.QCIF) sensor.set_pixformat(sensor.GRAYSCALE) # Load Haar Cascade # By default this will use all stages, lower satges is faster but less accurate. face_cascade = ima...
mit
Python
794b629a406c77189683a3cfbbe83a74f6f42a89
Update __init__.py
DigitalSlideArchive/HistomicsTK,DigitalSlideArchive/HistomicsTK
histomicstk/__init__.py
histomicstk/__init__.py
# -*- coding: utf-8 -*- from .ColorConvolution import ColorConvolution from .ColorDeconvolution import ColorDeconvolution from .ComplementStainMatrix import ComplementStainMatrix from .ConvertSchedule import ConvertSchedule from .EmbedBounds import EmbedBounds from .EstimateVariance import EstimateVariance from .Gauss...
# -*- coding: utf-8 -*- from .ColorConvolution import ColorConvolution from .ColorDeconvolution import ColorDeconvolution from .ComplementStainMatrix import ComplementStainMatrix from .ConvertSchedule import ConvertSchedule from .EstimateVariance import EstimateVariance from .GaussianGradient import GaussianGradient f...
apache-2.0
Python
a1bf1aace7ac19f2b7918a75cf58e9748bb91514
Add ExactDecimal
admk/soap
semantics/core.py
semantics/core.py
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : __author__ = 'Xitong Gao' __email__ = 'xtg08@ic.ac.uk' import decimal decimal.getcontext().traps[decimal.Inexact] = True class ExactDecimal(decimal.Decimal): def __init__(self, v): if not isinstance(v, str): raise ValueError('Value is ...
#!/usr/bin/env python # vim: set fileencoding=UTF-8 : __author__ = 'Xitong Gao' __email__ = 'xtg08@ic.ac.uk' class AbstractSemantics(object): def __init__(self, ): pass
mit
Python
d61219d908eb2916833edf270ce8b3dcefe38b55
Remove broken line from test
sorgerlab/indra,pvtodorov/indra,bgyori/indra,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/indra,sorgerlab/belpy,johnbachman/belpy,pvtodorov/indra,sorgerlab/indra,johnbachman/belpy,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,sorgerlab/belpy,bgyori/indra
indra/tests/test_bbn.py
indra/tests/test_bbn.py
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from os.path import join, dirname from nose.tools import raises from indra.sources.bbn.bbn_api import * from indra.statements import * # Path to the BBN test file path_this = os.path.dirname(os.path.abspath(__file_...
from __future__ import absolute_import, print_function, unicode_literals from builtins import dict, str from os.path import join, dirname from nose.tools import raises from indra.sources.bbn.bbn_api import * from indra.statements import * # Path to the BBN test file path_this = os.path.dirname(os.path.abspath(__file_...
bsd-2-clause
Python
eb84e4d4dd256fc4779c3bd07ea6b8d74c543380
Update on path
israelzuniga/python-octo-wookie
head1stpython/Chapter3/sketch.py
head1stpython/Chapter3/sketch.py
#Import dependencies #Load OS functions from the standard library import os #Change path for the current directory os.chdir('~/Development/Python_Exercises/python-octo-wookie/head1stpython/Chapter3') #Start our program try: #Load the text file into 'data' variable data = open('sketch.txt') #Start it...
#Import dependencies #Load OS functions from the standard library import os #Change path for the current directory os.chdir('/home/israel/Development/Python_Exercises/python-octo-wookie/head1stpython/Chapter3') #Start our program try: #Load the text file into 'data' variable data = open('sketch.txt') ...
unlicense
Python
cbe76c75dd6e2a959bf96a0c73c05d205fb7356a
bump version
yassu/hyuki-cvs-graph
hyuki_graph/__init__.py
hyuki_graph/__init__.py
#!/usr/bin/env python # coding: UTF-8 __VERSION__ = '0.0.6'
#!/usr/bin/env python # coding: UTF-8 __VERSION__ = '0.0.5'
mit
Python
1faf4cd6ef75af6ad9a77a678c7bc884f3e1d52d
Build mqlight.js during the build on Windows
mqlight/nodejs-mqlight
binding.gyp
binding.gyp
{ "targets": [{ "target_name": "proton", "type": "loadable_module", "sources": ["messenger.cpp", "message.cpp", "proton.cpp"], "conditions": [ ["OS=='win'", { "cflags_cc+": ["/W3", "/Zi"], 'msvs_settings': { 'VCCLCompilerT...
{ "targets": [{ "target_name": "proton", "type": "loadable_module", "sources": ["messenger.cpp", "message.cpp", "proton.cpp"], "conditions": [ ["OS=='win'", { "cflags_cc+": ["/W3", "/Zi"], 'msvs_settings': { 'VCCLCompilerT...
apache-2.0
Python
2654815ee873f6d22592516a2533bb31a47042b7
reduce number of parallel browsers
seiflotfy/compatipede,seiflotfy/compatipede,seiflotfy/compatipede,seiflotfy/compatipede
webcompat.py
webcompat.py
#!/usr/bin/env python import sys import time import os import pika import subprocess import urllib2 import json RWCY_URL = "http://arewecompatibleyet.com/data/masterbugtable.js" RWCY_PREFIX =\ """/* This file is generated by preproc/buildlists.py - do not edit */ var masterBugTable =""" BASEPATH = os.path.abspath...
#!/usr/bin/env python import sys import time import os import pika import subprocess import urllib2 import json RWCY_URL = "http://arewecompatibleyet.com/data/masterbugtable.js" RWCY_PREFIX =\ """/* This file is generated by preproc/buildlists.py - do not edit */ var masterBugTable =""" BASEPATH = os.path.abspath...
mpl-2.0
Python
4725b892c1facb3703e2fee842b5865656f7b67c
enable all warnings
davedoesdev/shared-memory-disruptor,davedoesdev/shared-memory-disruptor,davedoesdev/shared-memory-disruptor,davedoesdev/shared-memory-disruptor
binding.gyp
binding.gyp
{ "targets": [ { "target_name": "disruptor", "sources": [ "src/disruptor.cc" ], "include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"], "dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"], 'cflags+': [ '-std=gnu++14', '-Wall', '-Wextra', '-Werror' ], ...
{ "targets": [ { "target_name": "disruptor", "sources": [ "src/disruptor.cc" ], "include_dirs": ["<!@(node -p \"require('node-addon-api').include\")"], "dependencies": ["<!(node -p \"require('node-addon-api').gyp\")"], 'cflags+': [ '-std=gnu++14', '-Wall', '-Wextra', '-Werror' ], ...
mit
Python
d08060faa444c621004f33c2d3c58f0b68570cd7
Remove flags that don't work anyway.
rubenv/zipper,rubenv/zipper,rubenv/zipper,rubenv/zipper
binding.gyp
binding.gyp
{ "targets": [ { "target_name": "zipper", "variables": { "libzip%": "0.10" }, "sources": [ "src/_zipper.cc", "src/zipper.cpp" ], "include_dirs": [ "deps/libzip-<(libzip)/li...
{ "targets": [ { "target_name": "zipper", "variables": { "libzip%": "0.10" }, "sources": [ "src/_zipper.cc", "src/zipper.cpp" ], "include_dirs": [ "deps/libzip-<(libzip)/li...
bsd-3-clause
Python
7c83fbb007594095102c0d41d3a1f90c949fd017
Modify author to short company name.
xpansa/hr,raycarnes/hr,hbrunn/hr,acsone/hr,damdam-s/hr,Antiun/hr,charbeljc/hr,iDTLabssl/hr,alanljj/oca_hr,thinkopensolutions/hr,iDTLabssl/hr,open-synergy/hr,Vauxoo/hr,open-synergy/hr,xpansa/hr,acsone/hr,feketemihai/hr,vrenaville/hr,yelizariev/hr,vrenaville/hr,damdam-s/hr,feketemihai/hr,abstract-open-solutions/hr,alanlj...
hr_job_categories/__openerp__.py
hr_job_categories/__openerp__.py
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero ...
# -*- coding:utf-8 -*- ############################################################################## # # Copyright (C) 2013 Michael Telahun Makonnen <mmakonnen@gmail.com>. # All Rights Reserved. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero ...
agpl-3.0
Python
0b5a657339870c7669082c39f8290c88732aa92e
Make code a little cleaner
Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,SeerLabs/new-csx-extractor
extractor.py
extractor.py
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter, ExtractorResult import os import sys import grobid import pdfbox import filters def get_extraction_runner(): runner = ExtractionRunner() runner.add_runnable(grobid.GrobidPlainTextExtractor) # OR ...
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter, ExtractorResult import os import sys import grobid import pdfbox import filters if __name__ == '__main__': runner = ExtractionRunner() runner.add_runnable(pdfbox.PDFBoxPlainTextExtractor) runner.ad...
apache-2.0
Python
c243179a6a563bde1a16cc02cc260e918e3f18c5
add extractor to change grobid results into plain text
Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor,SeerLabs/new-csx-extractor,Tiger66639/new-csx-extractor
extractor.py
extractor.py
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter import extraction.utils as utils import subprocess32 as subprocess import os import requests import re class GrobidExtractor(Extractor): def extract(self, data, dep_results): files = {'input': data}...
from extraction.core import ExtractionRunner from extraction.runnables import Extractor, RunnableError, Filter import extraction.utils as utils import tempfile import os import glob import subprocess32 as subprocess import requests class GrobidExtractor(Extractor): def extract(self, data, dep_results): files...
apache-2.0
Python
88abe2367a00f1fb3323821b42c310c43e66a1c2
Remove redundant line
sakset/getyourdata,sakset/getyourdata,sakset/getyourdata,sakset/getyourdata
getyourdata/data_request/forms.py
getyourdata/data_request/forms.py
from django import forms from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from data_request.models import DataRequest class AuthenticationAttributeField(forms.CharField): def __init__(self, *args, **kwargs)...
from django import forms from django.core.validators import RegexValidator from django.core.exceptions import ValidationError from django.utils.translation import ugettext_lazy as _ from data_request.models import DataRequest class AuthenticationAttributeField(forms.CharField): def __init__(self, *args, **kwargs)...
mit
Python
af182857b4a70245b0b06bbf37e2d67e0ded493f
Split out gpg key list into its own class
sgnn7/ez_gpg,sgnn7/ez_gpg
ez_gpg/ui.py
ez_gpg/ui.py
import gi import gnupg # Requires python3-gnupg gi.require_version('Gtk', '3.0') from gi.repository import Gtk class GpgKeyList(Gtk.ComboBox): def __init__(self): Gtk.ComboBox.__init__(self) gpg_keys_list = Gtk.ListStore(str, str) for key in self._get_gpg_keys(): key_id = ke...
import gi import gnupg # Requires python3-gnupg gi.require_version('Gtk', '3.0') from gi.repository import Gtk class MainWindow(Gtk.Window): def __init__(self): Gtk.Window.__init__(self, title="EZ GPG") self.connect("delete-event", Gtk.main_quit) self.set_border_width(30) gpg_k...
lgpl-2.1
Python
d0805a7fa918ef71529be9f07a00fe49981058d0
make output nicer
akersten/speedgraph,akersten/speedgraph
speedgraphing.py
speedgraphing.py
import os, subprocess, time, re # Check that we ran the init script. if os.environ.get('RAN_VIA_INIT') != "YES": print('Please run speedgraphing.py via the wrapper script, speedgraphing.sh.') exit(1) print(''' *----------------* | Speedgraphing! | *----------------* ''') # Par...
import os, subprocess, time, re # Check that we ran the init script. if os.environ.get('RAN_VIA_INIT') != "YES": print('Please run speedgraphing.py via the wrapper script, speedgraphing.sh.') exit(1) print(''' *----------------* | Speedgraphing! | *----------------* ''') # Par...
mit
Python
a5a67fb91302062ee8044cc21e124aa07154342a
add try/except in case folder already exists
YeoLab/gscripts,YeoLab/gscripts,YeoLab/gscripts,YeoLab/gscripts
gscripts/mapping/fastq_filters.py
gscripts/mapping/fastq_filters.py
__author__ = 'olga' from glob import iglob, glob from gscripts.qtools._Submitter import Submitter import sys import os try: os.mkdir('filtered/') except OSError: pass commands = [] for filename in iglob('*.fastq.gz'): #TODO: the -l argument "20" should be a % of read length commands.append('zcat {0} ...
__author__ = 'olga' from glob import iglob, glob from gscripts.qtools._Submitter import Submitter import sys import os os.mkdir('filtered/') commands = [] for filename in iglob('*.fastq.gz'): commands.append('zcat {0} | fastx_artifacts_filter | ' 'fastq_quality_trimmer -l 20 -t 30 | ' ...
mit
Python
249e33541b10cb18f335d54d96c62b0056a049a4
update prototype
sachinio/redalert,sachinio/redalert,sachinio/redalert,sachinio/redalert,sachinio/redalert,sachinio/redalert,sachinio/redalert
hardware/prototype/read_serial.py
hardware/prototype/read_serial.py
__author__ = 'sachinpatney' import serial import time import binascii ser = serial.Serial('/dev/ttyUSB0', baudrate=9600, timeout=1.0) s = b'' def do(cmd): if cmd == 'play': print('Playing music ...') while True: bytesToRead = ser.inWaiting() if bytesToRead > 0: s += ser.rea...
__author__ = 'sachinpatney' import serial import time import binascii ser = serial.Serial('/dev/ttyUSB0', baudrate=9600, timeout=1.0) s = b'' def do(cmd): if cmd == 'play': print('Playing music ...') while True: bytesToRead = ser.inWaiting() if bytesToRead > 0: s += ser.rea...
mit
Python
8cd2ffb226fe18d896f3772aa687d39b5989fb7c
Fix a H302 pep error in the api
stackforge/solum,gilbertpilz/solum,stackforge/solum,mohitsethi/solum,mohitsethi/solum,gilbertpilz/solum,ed-/solum,ed-/solum,openstack/solum,openstack/solum,julienvey/solum,gilbertpilz/solum,devdattakulkarni/test-solum,julienvey/solum,devdattakulkarni/test-solum,ed-/solum,ed-/solum,gilbertpilz/solum
solum/api/app.py
solum/api/app.py
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
# -*- coding: utf-8 -*- # # Copyright 2013 - Noorul Islam K M # # 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 applic...
apache-2.0
Python
9d991a24ea2437f1f1b29b46008e7db324cab3e8
Add version string (#2450)
facebookresearch/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI,facebookresearch/ParlAI
parlai/tasks/empathetic_dialogues/build.py
parlai/tasks/empathetic_dialogues/build.py
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # Download and build the data if it does not exist. from parlai.core.build_data import DownloadableFile import parlai.c...
#!/usr/bin/env python3 # Copyright (c) Facebook, Inc. and its affiliates. # This source code is licensed under the MIT license found in the # LICENSE file in the root directory of this source tree. # Download and build the data if it does not exist. from parlai.core.build_data import DownloadableFile import parlai.c...
mit
Python
93ff30fb35ec6ac67ae93a9e10a61354482976b8
refactor from review
globus/globus-cli,globus/globus-cli
src/globus_cli/commands/group/_common.py
src/globus_cli/commands/group/_common.py
import functools from typing import Callable, Optional import click def group_id_arg(f: Optional[Callable] = None, *, required=True): """ By default, the group ID is made required; pass `required=False` to the decorator arguments to make it optional. """ if f is None: return functools.par...
import functools from typing import Callable, Optional import click def group_id_arg(f: Optional[Callable] = None, *, required=True): """ By default, the group ID is made required; pass `required=False` to the decorator arguments to make it optional. """ if f is None: return functools.par...
apache-2.0
Python
cfa5ea508491278a00ad8d3560560fdb72753a67
Add sample Sudoku puzzle
totallyhuman/sudoku-solver
SudokuSolver.py
SudokuSolver.py
# !/usr/bin/env python3 # -*- coding: utf-8 -*- rows = [] rows[1] = [0, 0, 0, 2, 6, 0, 7, 0, 1] rows[2] = [6, 8, 0, 0, 7, 0, 0, 9, 0] rows[3] = [1, 9, 0, 0, 0, 4, 5, 0, 0] rows[4] = [8, 2, 0, 1, 0, 0, 0, 4, 0] rows[5] = [0, 0, 4, 6, 0, 2, 9, 0, 0] rows[6] = [0, 5, 0, 0, 0, 3, 0, 2, 8] rows[7] = [0, 0, 9, 3, 0, 0, 0, 7...
mit
Python
b7d0bb7f2a9d8dd3c75edcc020a315354beddb43
add class RegionCentreDingo for routing (part of #51)
openego/dingo,openego/dingo
dingo/core/structure/__init__.py
dingo/core/structure/__init__.py
from oemof.core.energy_system import Region class RegionDingo(Region): """ Defines a region in DINGO, derived from oemof --------------------------------------------- """ def __init__(self, **kwargs): #inherit parameters from oemof's Region super().__init__(**kwargs) #mor...
from oemof.core.energy_system import Region class RegionDingo(Region): """ Defines a region in DINGO, derived from oemof ---------------------------- """ def __init__(self, **kwargs): #inherit parameters from oemof's Region super().__init__(**kwargs) #more params ...
agpl-3.0
Python
0a1170318d81bb5a10c8836d998f626c45d8dfc3
fix example
ponty/discogui,ponty/discogui
discogui/examples/clickbutton.py
discogui/examples/clickbutton.py
""" 1. start zenity Yes/No dialog on Xvfb 2. discover buttons using :mod:`discogui.buttons` module 3. click first button, print return code 4. click second button, print return code """ from discogui.buttons import discover_buttons from discogui.mouse import PyMouse from easyprocess import EasyProcess from pyvirtualdis...
""" 1. start zenity Yes/No dialog on Xvfb 2. discover buttons using :mod:`discogui.buttons` module 3. click first button, print return code 4. click second button, print return code """ from discogui.buttons import discover_buttons from discogui.mouse import PyMouse from easyprocess import EasyProcess from pyvirtualdis...
bsd-2-clause
Python
250376595cde2780208a5efca3de8357c4142110
Add class-based implementation for thread-safety.
stochastic-technologies/shortuuid,skorokithakis/shortuuid
shortuuid/main.py
shortuuid/main.py
""" Concise UUID generation. """ import uuid as _uu class ShortUUID(object): def __init__(self, alphabet=None): if alphabet is None: # Define our alphabet. self._alphabet = list("23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") self._alpha_len = len(self._al...
""" Concise UUID generation. """ import uuid as _uu # Define our alphabet. _ALPHABET = list("23456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz") _ALPHA_LEN = len(_ALPHABET) def encode(uuid): """ Encodes a UUID into a string (LSB first) according to the alphabet If leftmost (MSB) bits 0, string m...
bsd-3-clause
Python
4d97194527be72231cacde533142849ceb58cdb1
Use self.key instead
locke105/streaming-python-testdrive
speyer/ingest/gerrit.py
speyer/ingest/gerrit.py
from __future__ import print_function import select import paramiko from paramiko import rsakey import six class GerritEvents(object): def __init__(self, userid, host, key=None): self.userid = userid self.host = host self.port = 29418 self.key = key def _read_events(self, s...
from __future__ import print_function import select import paramiko from paramiko import rsakey import six class GerritEvents(object): def __init__(self, userid, host, key=None): self.userid = userid self.host = host self.port = 29418 self.key = key def _read_events(self, s...
apache-2.0
Python
99f55f78f8f025c1999162c44cc3c5e4af3c7cb7
store in float32 instead of float64 works okay and half memory
karpathy/arxiv-sanity-preserver,karpathy/arxiv-sanity-preserver,karpathy/arxiv-sanity-preserver
buildsvm.py
buildsvm.py
# standard imports import os import sys import pickle # non-standard imports import numpy as np from sklearn import svm from sqlite3 import dbapi2 as sqlite3 # local imports from utils import safe_pickle_dump, strip_version, Config num_recommendations = 1000 # papers to recommend per user # ---------------------------...
# standard imports import os import sys import pickle # non-standard imports import numpy as np from sklearn import svm from sqlite3 import dbapi2 as sqlite3 # local imports from utils import safe_pickle_dump, strip_version, Config num_recommendations = 1000 # papers to recommend per user # ---------------------------...
mit
Python
8d3da62ecbbe0428a4daa17abdaa2508e50db6e6
set ALLOWED_HOSTS
baylee-d/cos.io,baylee-d/cos.io,baylee-d/cos.io,baylee-d/cos.io
website/settings/production.py
website/settings/production.py
from __future__ import absolute_import, unicode_literals import dj_database_url from .base import * DEBUG = False DATABASES['default'] = dj_database_url.config() SECRET_KEY = os.environ['SECRET_KEY'] ALLOWED_HOSTS = ['cosio.herokuapp.com'] try: from .local import * except ImportError: pass
from __future__ import absolute_import, unicode_literals import dj_database_url from .base import * DEBUG = False DATABASES['default'] = dj_database_url.config() SECRET_KEY = os.environ['SECRET_KEY'] try: from .local import * except ImportError: pass
apache-2.0
Python
b8e22d37ed97f12a44291b3b8eeec8c7f3686a8e
fix django 4 regression
thread/django-lightweight-queue,thread/django-lightweight-queue
django_lightweight_queue/urls.py
django_lightweight_queue/urls.py
from django.urls import re_path from . import views app_name = 'django_lightweight_queue' urlpatterns = ( re_path(r'^debug/django-lightweight-queue/debug-run$', views.debug_run, name='debug-run'), )
from django.conf.urls import url from . import views app_name = 'django_lightweight_queue' urlpatterns = ( url(r'^debug/django-lightweight-queue/debug-run$', views.debug_run, name='debug-run'), )
bsd-3-clause
Python