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
e0e31d0b4fe3a2bdba75c2072161eb2867d95ae4
Fix deprecation warnings
vapoursynth/vapoursynth,vapoursynth/vapoursynth,vapoursynth/vapoursynth,vapoursynth/vapoursynth
test/zimgtest.py
test/zimgtest.py
import vapoursynth as vs core = vs.core colorfamilies = (vs.GRAY, vs.YUV, vs.RGB) intbitdepths = (8, 9, 10, 11, 12, 13, 14, 15, 16) floatbitdepths = (16, 32) yuvss = (0, 1, 2) formatids = [] for cfs in colorfamilies: for bps in intbitdepths: if cfs == vs.YUV: for wss in yuvss: ...
import vapoursynth as vs core = vs.core colorfamilies = (vs.GRAY, vs.YUV, vs.RGB) intbitdepths = (8, 9, 10, 11, 12, 13, 14, 15, 16) floatbitdepths = (16, 32) yuvss = (0, 1, 2) formatids = [] for cfs in colorfamilies: for bps in intbitdepths: if cfs == vs.YUV: for wss in yuvss: ...
lgpl-2.1
Python
a8688151804a37712a3092d3474e988d2f3f0433
Bump version: 0.1.3 → 0.1.4
h2non/paco
paco/__init__.py
paco/__init__.py
from .map import map from .run import run from .each import each from .some import some from .race import race from .once import once from .wait import wait from .wraps import wraps from .apply import apply from .defer import defer from .every import every from .until import until from .times import times from .gather ...
from .map import map from .run import run from .each import each from .some import some from .race import race from .once import once from .wait import wait from .wraps import wraps from .apply import apply from .defer import defer from .every import every from .until import until from .times import times from .gather ...
mit
Python
fbb55d5646ca0a4e5588ff1853478731d8aa1f0a
Remove unused import
tom-henderson/bookmarks,tom-henderson/bookmarks,tom-henderson/bookmarks
bookmarks/config/urls.py
bookmarks/config/urls.py
from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth.views import LoginView from django.conf import settings from django_common.views import LogOutRedirectView admin.autodiscover() urlpatterns = [ path('login/', LoginView.as_vie...
from django.urls import include, path from django.conf.urls.static import static from django.contrib import admin from django.contrib.auth.views import LoginView from django.conf import settings from django_common.views import LogOutRedirectView import django.contrib.auth.views admin.autodiscover() urlpatterns = [ ...
mit
Python
cd2fd5e4a2efbf444ef3cf1908cd891aad8b8023
Add style mappings for LibreOffice footnotes and endnotes
mwilliamson/python-mammoth
mammoth/options.py
mammoth/options.py
from . import style_reader, lists def read_options(options): custom_style_map = _read_style_map(options.get("style_map") or "") include_default_style_map = options.get("include_default_style_map", True) options["style_map"] = custom_style_map + \ (_default_style_map if include_default_style_m...
from . import style_reader, lists def read_options(options): custom_style_map = _read_style_map(options.get("style_map") or "") include_default_style_map = options.get("include_default_style_map", True) options["style_map"] = custom_style_map + \ (_default_style_map if include_default_style_m...
bsd-2-clause
Python
290ed09dc618df8c3b0789ce1dbb0c3329a3cdcc
Update new_address_template.py
mbauskar/phrerp,gangadhar-kadam/latestchurcherp,4commerce-technologies-AG/erpnext,Tejal011089/fbd_erpnext,mbauskar/helpdesk-erpnext,indictranstech/erpnext,indictranstech/tele-erpnext,rohitwaghchaure/GenieManager-erpnext,gangadharkadam/contributionerp,mbauskar/sapphire-erpnext,gangadharkadam/vlinkerp,hernad/erpnext,suya...
erpnext/patches/v4_0/new_address_template.py
erpnext/patches/v4_0/new_address_template.py
import frappe def execute(): frappe.reload_doc("utilities", "doctype", "address_template") d = frappe.new_doc("Address Template") d.update({"country":frappe.db.get_default("country")}) try: d.insert() except Exception: pass
import frappe def execute(): d = frappe.new_doc("Address Template") d.update({"country":frappe.db.get_default("country")}) try: d.insert() except Exception: pass
agpl-3.0
Python
e8affdc88ded772bffbc32e2d69f5dc97fb678c7
Add exception test to io.numpy_to_vti
rosswhitfield/javelin
tests/io_test.py
tests/io_test.py
import pytest import javelin.io as io from numpy.testing import assert_almost_equal, assert_array_equal import os def test_save_read_mantid_MDHisto_ZrO2nxs(tmpdir): pytest.importorskip("h5py") # Test load load_filename = os.path.join(os.path.dirname(__file__), 'data', 'ZrO2.nxs') ZrO2 = io.read_manti...
import pytest import javelin.io as io from numpy.testing import assert_almost_equal, assert_array_equal import os def test_save_read_mantid_MDHisto_ZrO2nxs(tmpdir): pytest.importorskip("h5py") # Test load load_filename = os.path.join(os.path.dirname(__file__), 'data', 'ZrO2.nxs') ZrO2 = io.read_manti...
mit
Python
d37f030842f12ca7380533dfde9e7958c73cb351
refactor _gene_codes_and_lengths
carlosp420/dataset-creator
src/dataset_creator/dataset.py
src/dataset_creator/dataset.py
from .creator import Creator class Dataset(object): """ User's class for making datasets of several formats. It needs as input a list of SeqRecord-expanded objects with as much info as possible: * reading_frames * gene_codes * translation tables * taxonomy * sequen...
from .creator import Creator class Dataset(object): """ User's class for making datasets of several formats. It needs as input a list of SeqRecord-expanded objects with as much info as possible: * reading_frames * gene_codes * translation tables * taxonomy * sequen...
bsd-2-clause
Python
054e7c379f2595d16d4dfffd92adb046a3466f5d
Update infodesk tasks for 2022
FOSDEM/volunteers,FOSDEM/volunteers,FOSDEM/volunteers,FOSDEM/volunteers
volunteers/management/commands/sync_volunteers_with_penta_account.py
volunteers/management/commands/sync_volunteers_with_penta_account.py
from django.core.management.base import BaseCommand from volunteers.models import Edition, Task from django.db import connections import datetime import logging class Command(BaseCommand): def handle(self, *args, **options): for task in Task.objects.filter(edition=Edition.get_current()): if t...
from django.core.management.base import BaseCommand from volunteers.models import Edition, Task from django.db import connections import datetime import logging class Command(BaseCommand): def handle(self, *args, **options): for task in Task.objects.filter(edition=Edition.get_current()): if t...
agpl-3.0
Python
b82673dcdbd4472b0a531a8918f4fd1e3f6e1eef
add check_dtypes
google/jax,google/jax,tensorflow/probability,tensorflow/probability,google/jax,google/jax
tests/nn_test.py
tests/nn_test.py
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
# Copyright 2019 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
apache-2.0
Python
e8641f0e6335ea61d9697f8e2e766bc5503cfda1
Change config.py to the correct test name to fix publishing
jackzhao-mj/ok,jordonwii/ok,jackzhao-mj/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,Cal-CS-61A-Staff/ok,jackzhao-mj/ok,jackzhao-mj/ok,jordonwii/ok,jordonwii/ok,Cal-CS-61A-Staff/ok,jordonwii/ok,Cal-CS-61A-Staff/ok
client/config.py
client/config.py
import models.concept_case import models.doctest_case cases = { 'concept' : models.concept_case.ConceptCase, 'python' : models.doctest_case.DoctestCase } protocols = [ 'grading', 'unlock' ]
import models.concept_case import models.doctest_case cases = { 'concept' : models.concept_case.ConceptTestCase, 'python' : models.doctest_case.PythonTestCase } protocols = [ 'grading', 'unlock' ]
apache-2.0
Python
ca0eea42ca59e0928109c055034c3dcdeb18c301
Fix import error in Py3 #36
khchine5/atelier,khchine5/atelier,lsaffre/atelier,lsaffre/atelier
atelier/tasks.py
atelier/tasks.py
# -*- coding: UTF-8 -*- # Copyright 2016 by Luc Saffre & Hamza Khchine. # License: BSD, see LICENSE for more details. """""" from __future__ import print_function from __future__ import absolute_import from __future__ import unicode_literals import os from unipath import Path from invoke import Collection from atel...
# -*- coding: UTF-8 -*- # Copyright 2016 by Luc Saffre & Hamza Khchine. # License: BSD, see LICENSE for more details. """""" from __future__ import print_function import os from unipath import Path from invoke import Collection import invlib ns = Collection() ns.add_collection(invlib) def setup_from_tasks( ...
bsd-2-clause
Python
63feda754316fb61b2346cfa5eddd085fbcfa4d2
Update __init__.py
tbarrongh/cosc-learning-labs,SivagnanamCiena/cosc-learning-labs,tbarrongh/cosc-learning-labs,SivagnanamCiena/cosc-learning-labs
src/settings/__init__.py
src/settings/__init__.py
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
# Copyright 2015 Cisco Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with # the License. You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writ...
apache-2.0
Python
9c49814763a48189b3d704eb2ce6358f4501628e
Fix relative path to .gitignore and other minor changes.
jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chromium_org_third_party_webrtc,Omegaphora/external_chromium_org_third_party_webrtc,android-ia/platform_external_chromium_org_third_party_webrtc,jgcaaprom/android_external_chr...
build/extra_gitignore.py
build/extra_gitignore.py
#!/usr/bin/env python # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All c...
#!/usr/bin/env python # Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. # # Use of this source code is governed by a BSD-style license # that can be found in the LICENSE file in the root of the source # tree. An additional intellectual property rights grant can be found # in the file PATENTS. All c...
bsd-3-clause
Python
7fa90e8d0fd2cd09879edcc3410cd13b9936bb52
Bump version for release
frankwiles/django-admin-views,frankwiles/django-admin-views
admin_views/__init__.py
admin_views/__init__.py
VERSION = (0, 8, 0)
VERSION = (0, 7, 0)
bsd-3-clause
Python
979ced23fe7432a7cb06249236548e099d081536
Bump version to 1.0.7
PressLabs/django-payu,PressLabs/django-payu
payu/__init__.py
payu/__init__.py
# # Copyright 2012-2016 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
# # Copyright 2012-2016 PressLabs SRL # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law o...
apache-2.0
Python
17a6a66abbd330d7d9cf5fe0b5000c53179af5d2
delete old code
opencivicdata/scrapers-ca,opencivicdata/scrapers-ca
ca_qc_brossard/people.py
ca_qc_brossard/people.py
# coding: utf-8 from pupa.scrape import Scraper from utils import lxmlize, CanadianLegislator as Legislator import re COUNCIL_PAGE = 'http://www.ville.brossard.qc.ca/Ma-ville/conseil-municipal.aspx?lang=en-CA' class BrossardPersonScraper(Scraper): def get_people(self): page = lxmlize(COUNCIL_PAGE) coun...
# coding: utf-8 from pupa.scrape import Scraper from utils import lxmlize, CanadianLegislator as Legislator import re COUNCIL_PAGE = 'http://www.ville.brossard.qc.ca/Ma-ville/conseil-municipal.aspx?lang=en-CA' class BrossardPersonScraper(Scraper): def get_people(self): page = lxmlize(COUNCIL_PAGE) coun...
mit
Python
0bbaedcc14ba07227e005392273fcb86d3b4207e
add more logic for activation view
Edmonton-Public-Library/centennial,Edmonton-Public-Library/centennial,Edmonton-Public-Library/centennial
timemap/views.py
timemap/views.py
from django.template.loader import get_template from django.template import Context from django.http import HttpResponse from django.core.exceptions import ObjectDoesNotExist, ValidationError import epl.settings import util from timemap.models import Story from timemap.forms import UploadForm def timemap(request): ...
from django.template.loader import get_template from django.template import Context from django.http import HttpResponse from django.core.exceptions import ObjectDoesNotExist, ValidationError import epl.settings import util from timemap.models import Story from timemap.forms import UploadForm def timemap(request): ...
mit
Python
f9ddb7c1b02b1ced9df55e87928033f356b5d5c8
Bump 1.0.0
wikibusiness/aiologstash
aiologstash/__init__.py
aiologstash/__init__.py
"""asyncio-compatible logstash logging handler.""" __version__ = '1.0.0' import asyncio import logging import types from .tcp_handler import TCPLogstashHandler __all__ = ('create_tcp_handler',) async def create_tcp_handler(host, port, level=logging.NOTSET, close_timeout=5, ...
"""asyncio-compatible logstash logging handler.""" __version__ = '0.0.5' import asyncio import logging import types from .tcp_handler import TCPLogstashHandler __all__ = ('create_tcp_handler',) async def create_tcp_handler(host, port, level=logging.NOTSET, close_timeout=5, ...
mit
Python
01eea5f6f9f50f3fcadd984128784ae3a59859eb
remove unnecessary part of creation failure test code
tipsi/aiozk,tipsi/aiozk
aiozk/test/test_lock.py
aiozk/test/test_lock.py
import asyncio import logging import pytest import types from aiozk.exc import TimeoutError from aiozk.states import States log = logging.getLogger(__name__) @pytest.mark.asyncio async def test_creation_failure_deadlock(zk, path): lock = zk.recipes.Lock(path) await lock.ensure_path() async def change_s...
import asyncio import logging import pytest import types from aiozk.exc import TimeoutError from aiozk.states import States log = logging.getLogger(__name__) @pytest.mark.asyncio async def test_creation_failure_deadlock(zk, path): lock = zk.recipes.Lock(path) await lock.ensure_path() async def change_s...
mit
Python
499defc47f0647afda47be8a8a25d04095b07e1b
Use to_float instead of cast
raviqqe/tensorflow-extenteten,raviqqe/tensorflow-extenteten
nn/slmc/accuracy.py
nn/slmc/accuracy.py
import tensorflow as tf from ..util import static_shape, static_rank def accuracy(output_layer, true_label): assert static_rank(output_layer) == 2 #assert static_shape(output_layer)[0] == (batch size) #assert static_shape(output_layer)[1] == (number of classes) assert static_rank(true_label) == 1 #assert ...
import tensorflow as tf from ..util import static_shape, static_rank def accuracy(output_layer, true_label): assert static_rank(output_layer) == 2 #assert static_shape(output_layer)[0] == (batch size) #assert static_shape(output_layer)[1] == (number of classes) assert static_rank(true_label) == 1 #assert ...
unlicense
Python
eaceab5ba7acfe6b112644278cf25cae6784f050
edit init file to import all of axwx
rexthompson/axwx,rexthompson/axwx
axwx/__init__.py
axwx/__init__.py
from .axwx import *
mit
Python
30fc552b4d521deef5b51862f7a872b5575024cb
return xmlrpclib success for every non-PUT response
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
tom/putserver.py
tom/putserver.py
from mod_python import apache import os, sys from conary.lib import util import xmlrpclib def handler(req): if req.method.upper() != "PUT": req.write(xmlrpclib.dumps((0, ''))) return apache.OK fn = os.path.normpath('output/' + req.parsed_uri[6]) util.mkdirChain(os.path.dirname(fn)) f = file(...
from mod_python import apache import os, sys from conary.lib import util def handler(req): if req.method.upper() != "PUT": return apache.METHOD_NOT_ALLOWED fn = os.path.normpath('output/' + req.parsed_uri[6]) util.mkdirChain(os.path.dirname(fn)) f = file(fn, 'w+') l = util.copyfileobj(req...
apache-2.0
Python
5954352d5144426b0dde86b84a8273adf701b3ab
Fix hashtable - doesn't accurately reflect the hashing notion.
christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL,christabor/MoAL
MOAL/data_structures/hashes/hashtable.py
MOAL/data_structures/hashes/hashtable.py
# -*- coding: utf-8 -*- __author__ = """Chris Tabor (dxdstudio@gmail.com)""" if __name__ == '__main__': from os import getcwd from os import sys sys.path.append(getcwd()) from MOAL.helpers.text import gibberish from MOAL.helpers.display import Section DEBUG = True if __name__ == '__main__' else False ...
# -*- coding: utf-8 -*- __author__ = """Chris Tabor (dxdstudio@gmail.com)""" if __name__ == '__main__': from os import getcwd from os import sys sys.path.append(getcwd()) from MOAL.helpers.text import gibberish from MOAL.helpers.display import Section from MOAL.helpers.display import print_vars from rand...
apache-2.0
Python
a594810b6da2c57d2fa72e63a87d8af419c7a23f
Fix import error for smart_text
oscarmcm/django-places,oscarmcm/django-places,oscarmcm/django-places
places/fields.py
places/fields.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal from django.db import models from django.utils.translation import gettext_lazy as _ try: from django.utils.encoding import smart_text except ImportError: from django.utils.encoding import smart_str as smart_text from ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from decimal import Decimal from django.db import models from django.utils.encoding import smart_text from django.utils.translation import gettext_lazy as _ from . import Places from .forms import PlacesField as PlacesFormField class PlacesField(model...
mit
Python
9585c35f2f07f8f9eb13b868a7fb4bd66c1ee82a
Allow overwriting methods for configuring range for range verificator.
pozytywnie/webapp-health-monitor,serathius/webapp-health-monitor
webapp_health_monitor/verificators/base.py
webapp_health_monitor/verificators/base.py
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
from webapp_health_monitor import errors class Verificator(object): verificator_name = None def __init__(self, **kwargs): pass def run(self): raise NotImplementedError() def __str__(self): if self.verificator_name: return self.verificator_name else: ...
mit
Python
07bd88fa540f8fe5646f20f0c6410eb7dc3f934b
Enable allow_auto_create_journal in the automated tests
OCA/bank-statement-import,OCA/bank-statement-import,OCA/bank-statement-import
account_bank_statement_import_ofx/tests/test_import_bank_statement.py
account_bank_statement_import_ofx/tests/test_import_bank_statement.py
# -*- coding: utf-8 -*- # noqa: This is a backport from Odoo. OCA has no control over style here. # flake8: noqa from openerp.tests.common import TransactionCase from openerp.modules.module import get_module_resource class TestOfxFile(TransactionCase): """Tests for import bank statement ofx file format (account.ba...
# -*- coding: utf-8 -*- # noqa: This is a backport from Odoo. OCA has no control over style here. # flake8: noqa from openerp.tests.common import TransactionCase from openerp.modules.module import get_module_resource class TestOfxFile(TransactionCase): """Tests for import bank statement ofx file format (account.ba...
agpl-3.0
Python
4c536de1732c531bfb87018826a92de2744e8d1a
Add missing import following merge from trunk (cset 150).
alexandrucoman/vbox-nova-driver,raildo/nova,Brocade-OpenSource/OpenStack-DNRM-Nova,sacharya/nova,barnsnake351/nova,zhimin711/nova,JianyuWang/nova,berrange/nova,fnordahl/nova,cloudbase/nova-virtualbox,yatinkumbhare/openstack-nova,russellb/nova,ewindisch/nova,CEG-FYP-OpenStack/scheduler,double12gzh/nova,ted-gould/nova,Yu...
nova/virt/images.py
nova/virt/images.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2010 United States Government as represented by the # Administrator of the National Aeronautics and Space Administration. # All Rights Reserved. # Copyright (c) 2010 Citrix Systems, Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); you m...
apache-2.0
Python
c747aab30852d991563a4e21fb9f2e3be67d1840
Use assert_equal(a, b) instead of assert a == b
devendra12/werkzeug-1,j-fuentes/werkzeug,cvrebert/werkzeug,cvrebert/werkzeug,magne4000/werkzeug,ThiefMaster/werkzeug,liaoqingwei/werkzeug,Eagles2F/werkzeug,tomviner/werkzeug,sonnyhu/werkzeug,devendra12/werkzeug-1,pallets/werkzeug,miumok98/werkzeug,EasonYi/werkzeug,zhaoguixu/werkzeug,dkdewitt/werkzeug,kmee/werkzeug,anik...
werkzeug/testsuite/contrib/securecookie.py
werkzeug/testsuite/contrib/securecookie.py
# -*- coding: utf-8 -*- """ werkzeug.testsuite.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the secure cookie. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.utils import...
# -*- coding: utf-8 -*- """ werkzeug.testsuite.securecookie ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Tests the secure cookie. :copyright: (c) 2011 by Armin Ronacher. :license: BSD, see LICENSE for more details. """ import unittest from werkzeug.testsuite import WerkzeugTestCase from werkzeug.utils import...
bsd-3-clause
Python
edd4cfd5cf4102ab77e889c680306f25280e6165
Hide IP from input form
Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap,Alwnikrotikz/marinemap,Alwnikrotikz/marinemap,Alwnikrotikz/marinemap,google-code-export/marinemap,google-code-export/marinemap
lingcod/bookmarks/forms.py
lingcod/bookmarks/forms.py
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
from lingcod.features.forms import FeatureForm from lingcod.bookmarks.models import Bookmark from django import forms class BookmarkForm(FeatureForm): name = forms.CharField(label='Bookmark Name') latitude = forms.FloatField(widget=forms.HiddenInput()) longitude = forms.FloatField(widget=forms.HiddenInput(...
bsd-3-clause
Python
a33dc7509995f80c3756bfde626bcf208afe5b07
change to CamelCase for root_generator
googleinterns/connectivity-test
src/derivation_rules/root_generator.py
src/derivation_rules/root_generator.py
# Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
# Copyright 2020 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
apache-2.0
Python
7601715c6a33124b71067511fbc58c4ad976f543
Update for v1.3.0
maxmind/minfraud-api-python,maxmind/minfraud-api-python
minfraud/version.py
minfraud/version.py
"""Internal module for version (to prevent cyclic imports)""" __version__ = '1.3.0'
"""Internal module for version (to prevent cyclic imports)""" __version__ = '1.2.0'
apache-2.0
Python
cafebf6d9bbe9d871d5e705af31934e5dbe22394
add imports from sub-modules
joshuagryphon/minihmm
minihmm/__init__.py
minihmm/__init__.py
#!/usr/bin/env python """ """ __version__ = "0.1.1" __author__ = "Joshua G. Dunn" from minihmm.hmm import * from minihmm.represent import * from minihmm.factors import *
#!/usr/bin/env python """ """ __version__ = "0.1.1" __author__ = "Joshua G. Dunn"
bsd-3-clause
Python
7cdc2c0a549247d098b53595257d649d59bf92b7
add a missing importx (RBL-5128)
sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint,sassoftware/mint
mint/lib/maillib.py
mint/lib/maillib.py
global _dnspython_present try: import dns.resolver _dnspython_present = True except ImportError: _dnspython_present = False import smtplib import socket from email import MIMEText from mint.mint_error import MailError import xmlrpclib def digMX(hostname): try: answers = dns.resolver.query(ho...
global _dnspython_present try: import dns.resolver _dnspython_present = True except ImportError: _dnspython_present = False import smtplib import socket from email import MIMEText from mint.mint_error import MailError def digMX(hostname): try: answers = dns.resolver.query(hostname, 'MX') ...
apache-2.0
Python
fed0b8a393a30b2920f5a5446e2f851594d1c70b
Implement DRY principle inside of campaign data manipulation views
wk-tech/crm-smsfly,wk-tech/crm-smsfly,wk-tech/crm-smsfly
SMSFlyCRM/SMSApp/views/campaigns_crud.py
SMSFlyCRM/SMSApp/views/campaigns_crud.py
import logging from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import CreateView, UpdateView from ..forms.task import ( OneTimeTaskForm, RecurringTaskForm, EventDrivenTaskForm ) logger = logging.getLogger(__name__) class CampaignEditViewMixin: """Retrieves model class...
import logging from django.core.urlresolvers import reverse_lazy from django.views.generic.edit import CreateView, UpdateView from ..forms.task import ( OneTimeTaskForm, RecurringTaskForm, EventDrivenTaskForm ) logger = logging.getLogger(__name__) class CampaignEditViewMixin: """Retrieves model class...
mit
Python
e745e9daedfa0d1f6090faa192f701f8dd2f7919
Update start.py for new plugins
Gjum/Bat
start.py
start.py
from spockbot import Client from spockbot.plugins import default_plugins as plugins from bat import bat, command, curses plugins.extend([ ('bat', bat.BatPlugin), ('commands', command.CommandPlugin), ('curses', curses.CursesPlugin), ]) # login_credentials should contain a dict with 'username' and 'password...
from spockbot import Client from spockbot.plugins.core import auth, event, net, taskmanager, timer, ticker from spockbot.plugins.helpers import ( chat, clientinfo, craft, entities, interact, inventory, keepalive, movement, physics, respawn, start, world) from bat import bat, command, curses plugins = [ ('a...
mit
Python
a0d4b1edb7dde56c74d479402901071f4890b30a
Fix indentation.
richardingham/octopus,richardingham/octopus,richardingham/octopus,richardingham/octopus
octopus/__init__.py
octopus/__init__.py
__version__ = "trunk" def run (runnable, logging = True): from twisted.internet import reactor if reactor.running: return runnable.run() else: if logging: import sys from twisted.python import log log.startLogging(sys.stdout) runnable.on("log", log.msg) def _complete (result): reactor.stop...
__version__ = "trunk" def run (runnable, logging = True): from twisted.internet import reactor if reactor.running: return runnable.run() else: if logging: import sys from twisted.python import log log.startLogging(sys.stdout) runnable.on("log", log.msg) def _complete (result): reactor.stop...
mit
Python
00cb2e343cabacce6bb02b4ff30c95b3b93029df
Update tests
HIIT/mediacollection
test/test_hs.py
test/test_hs.py
import sys import os import filecmp import importlib import datetime import common path = os.path.abspath('.') sys.path.append(path) domain = 'hs' url = 'https://www.hs.fi/talous/art-2000005509982.html' out = 'test/parser_out.txt' module = importlib.import_module( 'sites.' + domain ) d = module.parse(url) class Tes...
import sys import os import filecmp import importlib import datetime import common path = os.path.abspath('.') sys.path.append(path) domain = 'hs' url = 'http://www.hs.fi/kaupunki/art-2000004887599.html' out = 'test/parser_out.txt' module = importlib.import_module( 'sites.' + domain ) d = module.parse(url) class Te...
mit
Python
6480290f3aa4781494291a098f81d320e44f4bfc
Create service trajectory
bit0001/trajectory_tracking,bit0001/trajectory_tracking
src/trajectory_server.py
src/trajectory_server.py
#!/usr/bin/env python import rospy from trajectory_tracking.srv import TrajectoryPoint, TrajectoryPointResponse def compute_trajectory(request): pass if __name__ == '__main__': rospy.init_node('trajectory_server') service = rospy.Service('trajectory', TrajectoryPoint, compute_trajectory) rospy.spin()...
#!/usr/bin/env python import rospy if __name__ == '__main__': pass
mit
Python
60260821ac0ccadfba9ebfe67fe4902b2db20519
Remove trailing slash from the endpoint
transtats/transtats-cli,transtats/transtats-cli
tscli/restapi.py
tscli/restapi.py
# Copyright 2017, 2018 Red Hat, 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 la...
# Copyright 2017, 2018 Red Hat, 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 la...
apache-2.0
Python
51346025b638159c69fe2c8da85170784d065d60
Add unit test for valid blacklist
Videonauth/passgen
test_passgen.py
test_passgen.py
#!/usr/bin/env python3 import argparse from passgen import make_parser, sanitize_input import unittest class PassGenTestCase(unittest.TestCase): def setUp(self): self.parse_args = make_parser().parse_args def test_duplicate_flags(self): for duplicate_flag in ['dd', 'll', 'uu', 'pp', 'ss']: ...
#!/usr/bin/env python3 import argparse from passgen import make_parser, sanitize_input import unittest class PassGenTestCase(unittest.TestCase): def setUp(self): self.parse_args = make_parser().parse_args def test_duplicate_flags(self): for duplicate_flag in ['dd', 'll', 'uu', 'pp', 'ss']: ...
mit
Python
97c17e2fb6651e22c33c4bc6074587e33721cc03
make LogLevel's cmp behave decently for unknown types
alessandrod/twiggy,alessandrod/twiggy
twiggy/Levels.py
twiggy/Levels.py
__all__ = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] class LogLevel(object): __slots__ = ['__name', '__value'] _name2levels = {} def __init__(self, name, value): self.__name = name self.__value = value self._name2levels[name] = self def __str__(self): return sel...
__all__ = ['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'] class LogLevel(object): __slots__ = ['__name', '__value'] _name2levels = {} def __init__(self, name, value): self.__name = name self.__value = value self._name2levels[name] = self def __str__(self): return sel...
bsd-3-clause
Python
fd533f5d19a007e4b3e4706e53677c4ea127fafe
Define user group member getter.
soasme/flask-perm,soasme/flask-perm,soasme/flask-perm
flask_perm/services/user_group_member.py
flask_perm/services/user_group_member.py
# -*- coding: utf-8 -*- from sqlalchemy.exc import IntegrityError from ..core import db from ..models import UserGroupMember def create(user_id, user_group_id): member = UserGroupMember( user_id=user_id, user_group_id=user_group_id, ) db.session.add(member) try: db.session.comm...
# -*- coding: utf-8 -*- from sqlalchemy.exc import IntegrityError from ..core import db from ..models import UserGroupMember def create(user_id, user_group_id): member = UserGroupMember( user_id=user_id, user_group_id=user_group_id, ) db.session.add(member) try: db.session.comm...
mit
Python
1f36df068a40bde39b1d34d223e9c2b2103cbeb3
update version submodule
Berserker66/omnitool
omnitool/version.py
omnitool/version.py
from functools import total_ordering @total_ordering class Version(): """Organization Class for comparable Version System Version integer uses decimal shift: 2 digits major version, 2 digits minor version, 2 digits micro version 170100 -> 17.1.0 """ def __init__(self, in...
from functools import total_ordering @total_ordering class Version(): """Organization Class for comparable Version System Version integer uses decimal shift: 2 digits major version, 2 digits minor version, 2 digits micro version 170100 -> 17.1.0 """ def __init__(self, in...
mit
Python
797de0aeeaf8682eff6aa5f35a4b16909006e86e
Fix ena2fasta
RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline,RNAcentral/rnacentral-import-pipeline
bin/ena2fasta.py
bin/ena2fasta.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright [2009-2020] EMBL-European Bioinformatics Institute 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...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Copyright [2009-2020] EMBL-European Bioinformatics Institute 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...
apache-2.0
Python
2205d0abc039577d4eb96bc4f825161b25028137
fix test path
semio/ddf_utils
tests/common.py
tests/common.py
# -*- coding: utf-8 -*- import os import ddf_utils ddf_utils.config.DDF_SEARCH_PATH = './datasets'
# -*- coding: utf-8 -*- import os import ddf_utils modulepath = os.path.dirname(ddf_utils.__file__) ddf_utils.config.DDF_SEARCH_PATH = os.path.join(modulepath, '../tests/datasets')
mit
Python
a2dd6b82fc06712ac6d7985f2c847dd74d1aa889
Optimize for Chinese
82Flex/DCRM,82Flex/DCRM,82Flex/DCRM,82Flex/DCRM
fluent_comments/templatetags/gravatar.py
fluent_comments/templatetags/gravatar.py
import hashlib import urllib from django import template from DCRM.settings import LANGUAGE_CODE register = template.Library() # return only the URL of the gravatar # TEMPLATE USE: {{ email|gravatar_url:150 }} @register.filter def gravatar_url(email, size=128): # Optimize for Chinese url = "https://cdn.v2ex.c...
import hashlib import urllib from django import template register = template.Library() # return only the URL of the gravatar # TEMPLATE USE: {{ email|gravatar_url:150 }} @register.filter def gravatar_url(email, size=128): # default image, doc: https://en.gravatar.com/site/implement/images/ default = 'mm' ...
agpl-3.0
Python
fc836088c06f0b004174b96ba02e0b87c705616d
Correct mistake of double settings definition
spendb/spendb,spendb/spendb,spendb/spendb,pudo/spendb,pudo/spendb,openspending/spendb,pudo/spendb,openspending/spendb,openspending/spendb
prod_settings.py
prod_settings.py
import os env = os.environ.get DEBUG = False CELERY_ALWAYS_EAGER = False CACHE = not DEBUG SITE_TITLE = env('SPENDB_SITE_TITLE', 'SpenDB') SECRET_KEY = env('SPENDB_SECRET') SQLALCHEMY_DATABASE_URI = env('SPENDB_DATABASE_URL') CELERY_BROKER_URL = env('SPENDB_AMQP_URL', env('SPENDB_CLOUDAMQP_URL')) MAIL_SERVER = env(...
import os env = os.environ.get DEBUG = False CELERY_ALWAYS_EAGER = False CACHE = not DEBUG SITE_TITLE = env('SPENDB_SITE_TITLE', 'SpenDB') SECRET_KEY = env('SPENDB_SECRET') SQLALCHEMY_DATABASE_URI = env('SPENDB_DATABASE_URL') CELERY_BROKER_URL = env('SPENDB_AMQP_URL', env('SPENDB_CLOUDAMQP_URL')) MAIL_SERVER = env(...
agpl-3.0
Python
dc4355a7ea44e0e9a74f6bc2ed34c7bff0c084e8
Update django doc links
tooreht/django-jsonsuit,tooreht/django-jsonsuit,tooreht/django-jsonsuit
jsonsuit/widgets.py
jsonsuit/widgets.py
from django.forms import widgets from django.template.loader import render_to_string from .app_settings import ( WIDGET_MEDIA_JS, WIDGET_MEDIA_CSS, READONLY_WIDGET_MEDIA_JS, READONLY_WIDGET_MEDIA_CSS ) class JSONSuit(widgets.Textarea): def render(self, name, value, attrs={}, renderer=None): attrs...
from django.forms import widgets from django.template.loader import render_to_string from .app_settings import ( WIDGET_MEDIA_JS, WIDGET_MEDIA_CSS, READONLY_WIDGET_MEDIA_JS, READONLY_WIDGET_MEDIA_CSS ) class JSONSuit(widgets.Textarea): def render(self, name, value, attrs={}, renderer=None): attrs...
mit
Python
2167a291d84d2611a396853d59a35bafda2f16e0
bump version in __init__.py
WillianPaiva/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.11.6'
VERSION = '0.20.11.5'
agpl-3.0
Python
2d8b1209c696e815c6c4e1be2950474578ffa509
bump version in __init__.py
1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow
oneflow/__init__.py
oneflow/__init__.py
VERSION = '0.20.14.13'
VERSION = '0.20.14.12'
agpl-3.0
Python
aaa03a21d545398f7450ef0f3b0b81a109e19b09
Handle comment deleted (APIException) cas
Chaseshak/MockSalutesBot
comment_reply.py
comment_reply.py
import praw import config import peewee import prawcore # DB Connection for peewee using config values db = peewee.MySQLDatabase(config.db_name, user=config.db_user, password=config.db_pass, host=config.db_host) # Define comment table class class PendingComments(peewee.Model): comment_id = peewee.TextField() ...
import praw import config import peewee import prawcore import urllib.request import json # DB Connection for peewee using config values db = peewee.MySQLDatabase(config.db_name, user=config.db_user, password=config.db_pass, host=config.db_host) # Define comment table class class PendingComments(peewee.Model): c...
mit
Python
d42f321e6b519fefc5ddceea6d8c399d8b589bcb
Add new properties to application base class
khchine5/opal,khchine5/opal,khchine5/opal
opal/application.py
opal/application.py
""" Application helpers for OPAL """ class OpalApplication(object): schema_module = None flow_module = None javascripts = [] actions = [] def get_app(): """ Return the current Opal Application """ return OpalApplication.__subclasses__()[0]
""" Application helpers for OPAL """ class OpalApplication(object): schema_module = None flow_module = None def get_app(): """ Return the current Opal Application """ return OpalApplication.__subclasses__()[0]
agpl-3.0
Python
ffe10d1b7c68f9516bcf0a191716b63da7e019f8
test `HttpResponse.write`
github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql,github/codeql
python/ql/test/experimental/library-tests/frameworks/django-v1/response_test.py
python/ql/test/experimental/library-tests/frameworks/django-v1/response_test.py
from django.http.response import HttpResponse, HttpResponseRedirect, JsonResponse, HttpResponseNotFound # Not an XSS sink, since the Content-Type is not "text/html" # FP reported in https://github.com/github/codeql-python-team/issues/38 def safe__json_response(request): # implicitly sets Content-Type to "applicati...
from django.http.response import HttpResponse, HttpResponseRedirect, JsonResponse, HttpResponseNotFound # Not an XSS sink, since the Content-Type is not "text/html" # FP reported in https://github.com/github/codeql-python-team/issues/38 def safe__json_response(request): # implicitly sets Content-Type to "applicati...
mit
Python
50e22ed0eaf737ddd06755e535f88fec1999dabe
improve wine scan skeleton
chrissorchard/malucrawl,chrissorchard/malucrawl,graingert/reportificate,graingert/reportificate
malware_crawl/scan/wine.py
malware_crawl/scan/wine.py
import os from sh import wine import tempfile import hashlib import shutil from urlparse import urlparse template_specifications = ( { "name": "ie6", "hash": b'[\xdfoK\x03\xdb\xcbR$\xef\xc97O\xbf^_\x8f,Fn>\xca\x80\x19\x83\xaa,^R\xe1\x0f\x92', "url": "https://github.com/downloads/chrissorcha...
import os import sys from sh import wine import tempfile import shutil wine_env = os.environ.copy().update({ "WINEPREFIX": tempfile.mkdtemp(prefix="malucrawl_prefix"), "WINEARCH": "win32" } ) ie6_template = os.path.join( os.path.dirname(sys.modules["malware_crawl"].__file__), "wineprefix/i...
mit
Python
83a6fd89a05ef5b6379ceebc6afc8bea2fb38847
Move a comment into it's appropriate place
pombredanne/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,mokshaproject/moksha,lmacken/moksha,pombredanne/moksha,ralphbean/moksha,pombredanne/moksha,pombredanne/moksha,lmacken/moksha,ralphbean/moksha,lmacken/moksha,ralphbean/moksha
moksha/lib/base.py
moksha/lib/base.py
# This file is part of Moksha. # Copyright (C) 2008-2009 Red Hat, Inc. # # This program 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...
# This file is part of Moksha. # Copyright (C) 2008-2009 Red Hat, Inc. # # This program 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...
apache-2.0
Python
6db0fdbec32598bf9620fafaca827c838146bceb
Bump version to 0.4.1
opensistemas-hub/osbrain
osbrain/__init__.py
osbrain/__init__.py
import os import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZERS_ACCEPTED.add('dill') Pyro4.config.SERIALIZER = 'dill' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'thread' Pyro4.config.REQUIRE_EXPOSE = False Pyro4.config.COMMTIMEOUT = 0. Pyro4.config.DETAILED_TRACEBACK = T...
import os import Pyro4 Pyro4.config.SERIALIZERS_ACCEPTED.add('pickle') Pyro4.config.SERIALIZERS_ACCEPTED.add('dill') Pyro4.config.SERIALIZER = 'dill' Pyro4.config.THREADPOOL_SIZE = 16 Pyro4.config.SERVERTYPE = 'thread' Pyro4.config.REQUIRE_EXPOSE = False Pyro4.config.COMMTIMEOUT = 0. Pyro4.config.DETAILED_TRACEBACK = T...
apache-2.0
Python
b94b354235dbc2114ec9e12e0b3600ec3da8e163
bump version [ci skip]
guillochon/MOSFiT,villrv/MOSFiT,guillochon/MOSFiT,bmockler/MOSFiT,bmockler/MOSFiT,guillochon/MOSFiT,mnicholl/MOSFiT,mnicholl/MOSFiT,villrv/MOSFiT,guillochon/FriendlyFit,mnicholl/MOSFiT
mosfit/__init__.py
mosfit/__init__.py
"""MOSFiT: Modular light curve fitting software.""" import astrocats import os from . import constants # noqa: F401 from . import fitter # noqa: F401 from . import model # noqa: F401 from . import plotting # noqa: F401 from . import printer # noqa: F401 from . import utils # noqa: F401 authors = [] contributors...
"""MOSFiT: Modular light curve fitting software.""" import astrocats import os from . import constants # noqa: F401 from . import fitter # noqa: F401 from . import model # noqa: F401 from . import plotting # noqa: F401 from . import printer # noqa: F401 from . import utils # noqa: F401 authors = [] contributors...
mit
Python
449cfce5af3c7be03e8c6135ec3d46f3ee5fe241
Fix typo
TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker,TamiaLab/carnetdumaker
apps/contentreport/tests/__init__.py
apps/contentreport/tests/__init__.py
""" Tests suites for the content report app. """
""" Test suite for the content report app. """
agpl-3.0
Python
4af103860f49d59fc6206c8b13788ea49a5d0831
fix broken synth file (#10077)
googleapis/python-cloudbuild,googleapis/python-cloudbuild
synth.py
synth.py
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
# Copyright 2019 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
57d8c3a6f52bc57dec0475322fec088f54bbb748
Remove unused import
ElliotPenson/cryptography
cryptography_utilities.py
cryptography_utilities.py
#!/usr/local/bin/python """ cryptography_utilities.py @author Elliot and Erica """ def decimal_to_binary(decimal): """Convert an integer into a binary string. E.g. 5 -> '101'.""" return format(decimal, 'b') def binary_to_decimal(binary): """Convert a binary string into an integer. E.g. '101' -> 5.""" ...
#!/usr/local/bin/python """ cryptography_utilities.py @author Elliot and Erica """ import sys def decimal_to_binary(decimal): """Convert an integer into a binary string. E.g. 5 -> '101'.""" return format(decimal, 'b') def binary_to_decimal(binary): """Convert a binary string into an integer. E.g. '101'...
mit
Python
19e6648ab02657261dc00623cbeee29aaa2f22ae
Remove mongo, because blah
sunlightlabs/sotumachine,sunlightlabs/sotumachine
tasks.py
tasks.py
import json import os from boto.s3.connection import S3Connection from boto.s3.key import Key s3 = S3Connection(os.environ.get('AWS_KEY'), os.environ.get('AWS_SECRET')) s3_bucket = s3.get_bucket(os.environ.get('AWS_BUCKET')) def archive_speech(speech): hsh = speech['id'] path = "speeches/%s/%s/%s/%s.json...
import json import os from boto.s3.connection import S3Connection from boto.s3.key import Key from pymongo import MongoClient mongo = MongoClient(os.environ.get('MONGOHQ_URL')) db = mongo.app21542251 s3 = S3Connection(os.environ.get('AWS_KEY'), os.environ.get('AWS_SECRET')) s3_bucket = s3.get_bucket(os.environ.get(...
bsd-3-clause
Python
7c70cb4045642d732ecefc941a5cfcc6127acbc4
Fix tasks confilicting eachother
raphiz/bsAbstimmungen,raphiz/bsAbstimmungen
tasks.py
tasks.py
#!/usr/bin/env python # coding=utf-8 from invoke import run, task from datetime import datetime import os from bsAbstimmungen.utils import setup_logging @task(name='import', help={ 'from-date': "The first date to importing data from (eg. 24.03.2015)", 'to-date': "The last date to import data from (eg. 24.03.2...
#!/usr/bin/env python # coding=utf-8 from invoke import run, task from datetime import datetime import os from bsAbstimmungen.utils import setup_logging @task(name='import', help={ 'from-date': "The first date to importing data from (eg. 24.03.2015)", 'to-date': "The last date to import data from (eg. 24.03.2...
mit
Python
948229fc297aad4a2ae6d33d770c638e9248ecd8
Update linked_list node class
hongta/practice-python,hongta/practice-python
linked_list/node.py
linked_list/node.py
class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next = next_node def __str__(self): return str(self.data) @property def data(self): return self._data @data.setter def data(self, v): if v is None: self...
class Node(object): def __init__(self, data=None, next_node=None): self.data = data self.next = next_node def __str__(self): return self.data @property def data(self): return str(self._data) @data.setter def data(self, v): if v is None: self...
mit
Python
3b47f048e9c9d08ddbefa233c5ff8ae6b8860c0b
fix deprecation warning in test_default_views.py (#22346)
Acehaidrey/incubator-airflow,apache/airflow,Acehaidrey/incubator-airflow,apache/airflow,Acehaidrey/incubator-airflow,danielvdende/incubator-airflow,nathanielvarona/airflow,apache/airflow,apache/airflow,danielvdende/incubator-airflow,cfei18/incubator-airflow,Acehaidrey/incubator-airflow,danielvdende/incubator-airflow,Ac...
tests/dags/test_default_views.py
tests/dags/test_default_views.py
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
# # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the # "License"); you may not...
apache-2.0
Python
a19637ece1497c8ef2ebc8479dd349813ad6d09e
Update yadisk.py
haitaka/DroiTaka
cogs/utils/api/yadisk.py
cogs/utils/api/yadisk.py
import json import requests DEVICE_ID = '141f72b7-fd02-11e5-981a-00155d860f42' DEVICE_NAME = 'DroiTaka' CLIENT_ID = 'b12710fc26ee46ba82e34b97f08f2305' CLIENT_SECRET = '4ff2284115644e04acc77c54526364d2' class YaDisk(object): def __init__(self, token): self.session = requests.session() self.session.headers.update...
import json import requests DEVICE_ID = '141f72b7-fd02-11e5-981a-00155d860f42' DEVICE_NAME = 'DroiTaka' CLIENT_ID = 'b12710fc26ee46ba82e34b97f08f2305' CLIENT_SECRET = '4ff2284115644e04acc77c54526364d2' class YaDisk(object): def __init__(self, token): self.session = requests.session() self.session.headers.update...
mit
Python
9a64322a098bd5949ae2d1d825a86cf3bab71ca9
fix the upstream tarball url for banshee
BansheeMediaPlayer/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,mono/bockbuild,bl8/bockbuild,bl8/bockbuild,bl8/bockbuild,BansheeMediaPlayer/bockbuild
packages/banshee.py
packages/banshee.py
class BansheePackage (Package): def __init__ (self): Package.__init__ (self, 'banshee-1', '1.5.3') self.sources = [ 'http://download.banshee-project.org/banshee/stable/%{version}/%{name}-%{version}.tar.bz2' ] self.configure_flags = [ '--disable-docs' ] if Package.profile.name == 'darwin': self....
class BansheePackage (Package): def __init__ (self): Package.__init__ (self, 'banshee-1', '1.5.3') self.sources = [ 'http://getbanshee.org/~abock/%{name}-%{version}.tar.bz2' # 'http://download.banshee-project.org/banshee/stable/%{version}/%{name}-%{version}.tar.bz2' ] self.configure_flags = [ '--disa...
mit
Python
60eb069ff6cf0cbdd82412e66774ac4ebe37c9f6
Add partial completion of sets koan.
javierjulio/python-koans-completed,javierjulio/python-koans-completed
koans/about_sets.py
koans/about_sets.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutSets(Koan): def test_sets_make_keep_lists_unique(self): highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas', 'MacLeod', 'Malcolm', 'MacLeod'] there_can_only_be_only_one = set(highlanders) self.assert...
#!/usr/bin/env python # -*- coding: utf-8 -*- from runner.koan import * class AboutSets(Koan): def test_sets_make_keep_lists_unique(self): highlanders = ['MacLeod', 'Ramirez', 'MacLeod', 'Matunas', 'MacLeod', 'Malcolm', 'MacLeod'] there_can_only_be_only_one = set(highlanders) self.assert...
mit
Python
af21f67abcf15f6eaf9261aaec05d4e30100f508
Update version.py
jblance/mpp-solar
mppsolar/version.py
mppsolar/version.py
__version__ = "0.9.04" __version_comment__ = "add hass long term stats fix from porkytin"
__version__ = "0.9.03" __version_comment__ = "add results_topic to json_mqtt output"
mit
Python
2549949354b6a31f976056a0bc020df54658bbdd
Add missing import.
ms705/napper
napper_memaslap.py
napper_memaslap.py
import sys, socket, time, logging, random import shlex, subprocess from kazoo.client import KazooClient from kazoo.exceptions import NodeExistsError def zkConnect(conn_str): zk = KazooClient(hosts=conn_str) zk.start() return zk def zkCreateJobDir(zk, job_name): zk.ensure_path("/napper/memaslap/%s" % (job_name...
import sys, socket, time, logging import shlex, subprocess from kazoo.client import KazooClient from kazoo.exceptions import NodeExistsError def zkConnect(conn_str): zk = KazooClient(hosts=conn_str) zk.start() return zk def zkCreateJobDir(zk, job_name): zk.ensure_path("/napper/memaslap/%s" % (job_name)) def ...
mit
Python
686e9a69ff44bc019ef752bd7c404959889ae106
Add more tests for custom context_processor
mishbahr/django-usersettings2,mishbahr/django-usersettings2
tests/test_context_processors.py
tests/test_context_processors.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import reverse from django.test.utils import override_settings from django.test import TestCase from django.contrib.sites.models import Site from usersettings.shortcuts import get_usersettings_model class Mi...
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.conf import settings from django.core.urlresolvers import reverse from django.test import TestCase from django.contrib.sites.models import Site from usersettings.shortcuts import get_usersettings_model class MiddlewareTest(TestCase): usersettings_model ...
bsd-3-clause
Python
0e56032197d299ae3fd23782c58adc8dba74b3aa
use the new config methods in plugins/log
mineo/lala,mineo/lala
lala/plugins/log.py
lala/plugins/log.py
import codecs import lala.config import logging import logging.handlers from lala.util import command, msg, regex chatlogger = None lala.config.set_default_options(max_lines="30") @command def last(user, channel, text): """Show the last lines from the log""" max_lines = lala.config.get_int("max_lines") ...
import codecs import lala.config import logging from lala.util import command, msg, regex chatlogger = None @command def last(user, channel, text): """Show the last lines from the log""" max_lines = int(lala.config.get("max_lines", default=30)) s_text = text.split() try: lines = min(max_lin...
mit
Python
e3db59b157863bd4d1379cc8154829a1737315e6
Bump version number.
csherwood-usgs/landlab,laijingtao/landlab,cmshobe/landlab,Carralex/landlab,SiccarPoint/landlab,SiccarPoint/landlab,csherwood-usgs/landlab,RondaStrauch/landlab,RondaStrauch/landlab,landlab/landlab,cmshobe/landlab,landlab/landlab,ManuSchmi88/landlab,RondaStrauch/landlab,Carralex/landlab,cmshobe/landlab,amandersillinois/l...
landlab/__init__.py
landlab/__init__.py
#! /usr/bin/env python """ The Landlab :Package name: TheLandlab :Release date: 2013-03-24 :Authors: Greg Tucker, Nicole Gasparini, Erkan Istanbulluoglu, Daniel Hobley, Sai Nudurupati, Jordan Adams, Eric Hutton :URL: http://csdms.colorado.edu/trac/landlab :License: MIT """ from __future__ import absol...
#! /usr/bin/env python """ The Landlab :Package name: TheLandlab :Release date: 2013-03-24 :Authors: Greg Tucker, Nicole Gasparini, Erkan Istanbulluoglu, Daniel Hobley, Sai Nudurupati, Jordan Adams, Eric Hutton :URL: http://csdms.colorado.edu/trac/landlab :License: MIT """ from __future__ import absol...
mit
Python
d63d1aa92021bdb674f037286dadddd1ed62a36f
Update outdate __init__.py file.
puolival/multipy,puolival/multipy
multipy/__init__.py
multipy/__init__.py
__all__ = ['fwer', 'fdr', 'data', 'permutation', 'rft', 'util', 'viz']
__all__ = ['fwer', 'adaptive', 'data']
bsd-3-clause
Python
36cdda6cc1753750d441a21f432b581d063ebabf
rename field searching to adjust with model field
essanpupil/cashflow,essanpupil/cashflow
functional_tests/test_cash_activity.py
functional_tests/test_cash_activity.py
from selenium.webdriver.support.ui import Select from django.utils import timezone from functional_tests.base import BrowserTest class CashActivityTest(BrowserTest): def test_enter_cash_activity_credit(self): # enter dashboard self.browser.get(self.live_server_url) self.assertEqual('Wel...
from selenium.webdriver.support.ui import Select from django.utils import timezone from functional_tests.base import BrowserTest class CashActivityTest(BrowserTest): def test_enter_cash_activity_credit(self): # enter dashboard self.browser.get(self.live_server_url) self.assertEqual('Wel...
mit
Python
6e8efdbb31c8713eeee0105ddafbd88d6286cfc9
Add check for no tasks
thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts,thomasleese/gantt-charts
ganttcharts/cli/send_summary_emails.py
ganttcharts/cli/send_summary_emails.py
import datetime import time from .. import emails from ..database import get_sql_connection from ..models import Account, Session as SqlSession __description__ = 'Send out summary emails.' def send_out_emails(): session = SqlSession() today = datetime.date.today() accounts = session.query(Account) \ ...
import datetime import time from .. import emails from ..database import get_sql_connection from ..models import Account, Session as SqlSession __description__ = 'Send out summary emails.' def send_out_emails(): session = SqlSession() today = datetime.date.today() accounts = session.query(Account) \ ...
mit
Python
aeb0e4e719d4a35f2a61ace03c9ea9cca983f4b5
use bigger mocks in tests
sulami/nozdormu
tests.py
tests.py
#!/usr/bin/env python3 # coding: utf-8 import sys import unittest from unittest.mock import Mock import titus.main from titus.batch import BenchBatch from titus.loader import BenchLoader from titus.suite import BenchSuite class BatchMock(BenchBatch): """Serve as a mock to load a batch from a module""" def be...
#!/usr/bin/env python3 # coding: utf-8 import sys import unittest from unittest.mock import Mock import titus.main from titus.batch import BenchBatch from titus.loader import BenchLoader from titus.suite import BenchSuite class BatchMock(BenchBatch): """Serve as a mock to load a batch from a module""" def be...
mit
Python
99c8cb626908ce247898c216d8ec4d48123ed8c4
send an error if netifaces is not installed
Geal/PilotSSH-scripts,Geal/PilotSSH-scripts,Geal/PilotSSH-scripts
network/network.py
network/network.py
#!/usr/bin/python try: import netifaces, sys except ImportError: print '{ "version": 1, "title": "Network", "type":"status", "status":"error", "message":"Please install the netifaces Python module to use this script" }' exit() def command_from_interface(intf): return '{ "name" : "' + intf + '", "value"...
#!/usr/bin/python import netifaces, sys def command_from_interface(intf): return '{ "name" : "' + intf + '", "value" : "'+ netifaces.ifaddresses(intf)[netifaces.AF_INET][0]["addr"] + '", "command" : ".pilotssh/network/network.py ' + intf + '" }' def index(): result = '{ "version": 1, "title": "Network Interfa...
mit
Python
225745f0e1510a1ef923fd12d4e042659d049bce
Bump version 0.19.0rc20 --> 0.19.0rc21
lbryio/lbry,lbryio/lbry,lbryio/lbry
lbrynet/__init__.py
lbrynet/__init__.py
import logging __version__ = "0.19.0rc21" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
import logging __version__ = "0.19.0rc20" version = tuple(__version__.split('.')) logging.getLogger(__name__).addHandler(logging.NullHandler())
mit
Python
f73f9c366f1018ca1e0aff9bae2da49b7588990b
update filename format, notes
dshean/vmap,dshean/vmap
vmap/wv_cdate.py
vmap/wv_cdate.py
#! /usr/bin/env python import sys from datetime import datetime, timedelta import numpy as np from pygeotools.lib import timelib """ Create clean filenames with center date for velocity maps generated from WV DEMs """ #Rename all #mkdir vm_rename #for i in */2*vm.tif; do ln -s ../$i vm_rename/$(~/src/vmap/vmap/wv_cd...
#! /usr/bin/env python import sys from datetime import datetime, timedelta import numpy as np from pygeotools.lib import timelib """ Create clean filenames with center date for velocity maps generated from WV DEMs """ #Rename all #for i in */2*vm.tif; do ln -s $i $(~/src/vmap/vmap/wv_cdate.py $i)_vm.tif; done fn = ...
mit
Python
f0339071dce5a325131ded7f1134b67c233f93fb
Make DEFAULT_BLOG_SLUG setting fully optional
Nomadblue/django-nomad-country-blogs
nomadblog/views.py
nomadblog/views.py
from django.views.generic import ListView, DetailView from django.shortcuts import get_object_or_404 from django.conf import settings from nomadblog.models import Blog, Category from nomadblog import get_post_model DEFAULT_STATUS = getattr(settings, 'PUBLIC_STATUS', 0) POST_MODEL = get_post_model() class NomadBlog...
from django.views.generic import ListView, DetailView from django.shortcuts import get_object_or_404 from django.conf import settings from nomadblog.models import Blog, Category from nomadblog import get_post_model DEFAULT_STATUS = getattr(settings, 'PUBLIC_STATUS', 0) POST_MODEL = get_post_model() class NomadBlog...
bsd-3-clause
Python
da00e9d9b9ec47090eae6ad2455abbb5f07816c7
include goa.yaml
geneontology/go-site,geneontology/go-site,geneontology/go-site,geneontology/go-site,geneontology/go-site
pipeline/util/model_organism.py
pipeline/util/model_organism.py
import click import os import sys import yaml import re @click.group() def cli(): pass @cli.command() @click.argument("dataset_dir", type=click.Path(exists=True)) @click.option("--out", "-o", type=click.File("w")) def taxons(dataset_dir, out): datasets_paths = [os.path.abspath(os.path.join(dataset_dir, datase...
import click import os import sys import yaml import re @click.group() def cli(): pass @cli.command() @click.argument("dataset_dir", type=click.Path(exists=True)) @click.option("--out", "-o", type=click.File("w")) def taxons(dataset_dir, out): datasets_paths = [os.path.abspath(os.path.join(dataset_dir, datase...
bsd-3-clause
Python
126edc3fe3a824bea72be031c4c25b679fa4e60c
bump version after dcef254
sergiocorreia/panflute
panflute/version.py
panflute/version.py
__version__ = '1.6.8'
__version__ = '1.6.7'
bsd-3-clause
Python
fbae1592e9a94a4b6faec0896abfc38acb06d5d2
Implement basic printing of the singles chart
kevgathuku/top40,andela-kndungu/top40
top40.py
top40.py
#/usr/bin/env python # -*- coding: utf-8 -*- import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' @click.command() @click.option('--count', default=10, help='Number of songs to show. Maximum is 40') def get_charts(count): """Prints the top COUNT songs in the UK Top 40 char...
import click import requests url = 'http://ben-major.co.uk/labs/top40/api/singles/' response = requests.get(url) print response.json()
mit
Python
6dddd80fe78251433ebf9a6a4f4892c067e068b4
Make topen.py executable
WesleyAC/topen,WesleyAC/topen
topen.py
topen.py
#!/usr/bin/python import sys import os import re import subprocess if len(sys.argv) != 2: print("Usage: " + sys.argv[0] + " url\nI only take one argument, but you proveded " + str(len(sys.argv)-1) + "!") sys.exit(1) url = sys.argv[1] helpers = [ [r"http(s)?://[A-Za-z0-9\-\.]+\.[A-Za-z]+/.*(\.png|\.jpg|\....
import sys import os import re import subprocess if len(sys.argv) != 2: print("Usage: " + sys.argv[0] + " url\nI only take one argument, but you proveded " + str(len(sys.argv)-1) + "!") sys.exit(1) url = sys.argv[1] helpers = [ [r"http(s)?://[A-Za-z0-9\-\.]+\.[A-Za-z]+/.*(\.png|\.jpg|\.jpeg)$", "generic-...
mit
Python
d60b16912cc3aa5c0a4f231b63b564683b2b8f64
Rename parameter DEFAULT_PROTOCOL to DEFAULT_URL_PROTOCOL
magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3,magnet-cl/django-project-template-py3
parameters/enums.py
parameters/enums.py
# -*- coding: utf-8 -*- # standard library import collections # django from django.utils.translation import ugettext_lazy as _ ParameterDefinition = collections.namedtuple( 'Parameter', [ 'name', 'default', 'kind', 'verbose_name', ] ) class ParameterDefinitionList(object...
# -*- coding: utf-8 -*- # standard library import collections # django from django.utils.translation import ugettext_lazy as _ ParameterDefinition = collections.namedtuple( 'Parameter', [ 'name', 'default', 'kind', 'verbose_name', ] ) class ParameterDefinitionList(object...
mit
Python
565d9b54c65c02fa04f7625a762b2ea2aae0de3f
Rearrange fields to correctly place the type and vlan data into the packet.
gvnn3/PCS,gvnn3/PCS
pcs/packets/vlan.py
pcs/packets/vlan.py
# Copyright (c) 2008, Bruce M. Simpson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
# Copyright (c) 2008, Bruce M. Simpson. # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are # met: # # Redistributions of source code must retain the above copyright notice, # this list of conditions and t...
bsd-3-clause
Python
b158a322cfb60fb8356920de3f6714e0d4f0e89d
Add a few more options to the plotting
alito/deep_q_rl,alito/deep_q_rl
deep_q_rl/plot_results.py
deep_q_rl/plot_results.py
"""Plots data corresponding to Figure 2 in Playing Atari with Deep Reinforcement Learning Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, Martin Riedmiller """ import sys, os import logging import numpy as np import matplotlib.pyplot as plt DefaultTrainedEpoch = 10...
"""Plots data corresponding to Figure 2 in Playing Atari with Deep Reinforcement Learning Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Alex Graves, Ioannis Antonoglou, Daan Wierstra, Martin Riedmiller Usage: plot_results.py RESULTS_CSV_FILE """ import numpy as np import matplotlib.pyplot as plt import sys # Mo...
bsd-3-clause
Python
0e4069bf7ee7b597a2962b8040768ea57b6ee0ec
add docstring.
jwilk/pydiatra,jwilk/pydiatra
pydiatra/main.py
pydiatra/main.py
# encoding=UTF-8 # Copyright © 2011-2016 Jakub Wilk <jwilk@jwilk.net> # # 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,...
# encoding=UTF-8 # Copyright © 2011-2016 Jakub Wilk <jwilk@jwilk.net> # # 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,...
mit
Python
cd7bd136f2bbb0f1d7d5c31bb872294bd5df5185
Update lsh 어기저기
Yokan-Study/study,Yokan-Study/study,Yokan-Study/study
2017/11.28/python/lsh-edit.excel.py
2017/11.28/python/lsh-edit.excel.py
from openpyxl import load_workbook from openpyxl.utils import column_index_from_string wb = load_workbook('../datas/daily_gabia_20171127.xlsx') # 엑셀 열기 ws = wb.active # 현재 워크시크 가져오기 E = ws['E4':'E10'] column_idx = 5 for t in E: # ( (), () ) row_idx = t[0].row # 현재 행 index print('row_idx: {0}'.format(row_i...
# Let do it! from openpyxl import load_workbook from openpyxl.utils import column_index_from_string wb = load_workbook('../datas/daily_gabia_20171127.xlsx') # 엑셀 열기 ws = wb.active # 현재 워크시크 가져오기 E = ws['E4':'E10'] column_idx = 5 for t in E: # ( (), () ) row_idx = t[0].row # 현재 행 index print('row_idx: {0}...
mit
Python
5e88c3c73ca87316d986c3ab25f777ab488463c4
format building room data
pennlabs/penn-sdk-python,pennlabs/penn-sdk-python
penn/studyspaces.py
penn/studyspaces.py
import requests import json from bs4 import BeautifulSoup BASE_URL = "http://libcal.library.upenn.edu" class StudySpaces(object): def __init__(self): pass def get_buildings(self): """Returns a list of building IDs, building names, and services.""" soup = BeautifulSoup(requests.get...
import requests import json from bs4 import BeautifulSoup BASE_URL = "http://libcal.library.upenn.edu" class StudySpaces(object): def __init__(self): pass def get_buildings(self): """Returns a list of building IDs, building names, and services.""" soup = BeautifulSoup(requests.get...
mit
Python
47c8bed57025ce91501d08593b0ac8b777c43ba7
Update dependency bazelbuild/buildtools to latest version
google/copybara,google/copybara,google/copybara
third_party/bazel_buildtools.bzl
third_party/bazel_buildtools.bzl
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
# Copyright 2019 Google Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing,...
apache-2.0
Python
aa7ebbbd912e0bc732d8a3cc3604e1327e226878
use AnalyzerResult
Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide
timeside/analyzer/aubio_pitch.py
timeside/analyzer/aubio_pitch.py
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Paul Brossier <piem@piem.org> # This file is part of TimeSide. # TimeSide is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # ...
# -*- coding: utf-8 -*- # # Copyright (c) 2013 Paul Brossier <piem@piem.org> # This file is part of TimeSide. # TimeSide is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License, or # ...
agpl-3.0
Python
99976c5ec69ae3a5edb1e5f2208a4df1f7b2af95
Add expires check to session validation
ollien/Timpani,ollien/Timpani,ollien/Timpani
py/auth.py
py/auth.py
import bcrypt import database import uuid import datetime def createUser(username, password, can_change_settings, can_write_posts): username = username.lower() passwordAsBytes = bytes(password, "utf-8") passwordHash = bcrypt.hashpw(passwordAsBytes, bcrypt.gensalt()).decode("utf-8") databaseConnection = database.Co...
import bcrypt import database import uuid import datetime def createUser(username, password, can_change_settings, can_write_posts): username = username.lower() passwordAsBytes = bytes(password, "utf-8") passwordHash = bcrypt.hashpw(passwordAsBytes, bcrypt.gensalt()).decode("utf-8") databaseConnection = database.Co...
mit
Python
9871f8b2ded994ba126006282b77db4a680b12c6
Update version number; forever end the confusion of differing majors.
salopensource/sal-scripts,salopensource/sal-scripts,salopensource/sal-scripts
sal_python_pkg/sal/version.py
sal_python_pkg/sal/version.py
__version__ = '4.0.0'
__version__ = '3.2.1'
apache-2.0
Python
b4989b0a2b01b88834ec05f712c1a33f503dd674
Fix blocking on services with large number of items
victronenergy/dbus-recorder,victronenergy/dbus-recorder
dbusdevice.py
dbusdevice.py
# Local import import dbus from dbusitem import Dbusitem import tracing class DbusDevice(object): ## The constructor processes the tree of dbus-items. # @param bus Session/System bus object # @param name the dbus-service-name. def __init__(self, bus, name, eventCallback): self._dbus_name = name self._dbus_conn...
# Local import import dbus from dbusitem import Dbusitem import tracing class DbusDevice(object): ## The constructor processes the tree of dbus-items. # @param bus Session/System bus object # @param name the dbus-service-name. def __init__(self, bus, name, eventCallback): self._dbus_name = name self._tree = Db...
mit
Python
3561775ebfc15c7d0bb665e54f2ce398f5b30eaf
Update startup script
scenerygraphics/SciView,scenerygraphics/SciView
src/main/resources/sc/iview/startup.py
src/main/resources/sc/iview/startup.py
import sc.iview.SciView as SciView from org.joml import * from graphics.scenery import * from graphics.scenery.volumes import * from graphics.scenery.volumes import TransferFunction from graphics.scenery.volumes import Colormap from graphics.scenery.utils import * print("Welcome to SciView. Enjoy the scenery!")
import sc.iview.SciView as SciView from org.joml import * from graphics.scenery import * print("Welcome to SciView. Enjoy the scenery!")
bsd-2-clause
Python
740b4d94a3a58c043c22d80f7f3fb920367e3548
modify print
yinkaisheng/Python-UIAutomation-for-Windows
demos/pretty_print_dir.py
demos/pretty_print_dir.py
#!python3 # -*- coding: utf-8 -*- import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # not required after 'pip install uiautomation' import uiautomation as auto def GetDirChildren(directory): if os.path.isdir(directory): subdirs = [] files = [] ...
#!python3 # -*- coding: utf-8 -*- import os import sys sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) # not required after 'pip install uiautomation' import uiautomation as auto def GetDirChildren(directory): if os.path.isdir(directory): subdirs = [] files = [] ...
apache-2.0
Python
6859714bcb4fb88f56a6b5729a42e2ada989f429
Update XENBUS to tip
OwenSmith/win-installer,benchalmers/win-installer,kostaslamda/win-installer,xenserver/win-installer,benchalmers/win-installer,OwenSmith/win-installer,benchalmers/win-installer,xenserver/win-installer,kostaslamda/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,benchalmers/win-installer,kostaslamda/win-inst...
manifestspecific.py
manifestspecific.py
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of condition...
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of condition...
bsd-2-clause
Python
631bfd535c0e4b5dd5cf47dd0718f172085b246b
Update XENBUS and XENVIF
OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer,xenserver/win-installer,OwenSmith/win-installer
manifestspecific.py
manifestspecific.py
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
bsd-2-clause
Python
57b57ada6a04a9469cf1fd894fbedddcb443f10c
Update XENVBD
xenserver/win-installer,xenserver/win-installer,xenserver/win-installer,xenserver/win-installer,kostaslamda/win-installer,xenserver/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,OwenSmith/win-installer,OwenSmith/win-installer,kostaslamda/win-installer,kostaslamda/win-installer,OwenSmith/win-installe...
manifestspecific.py
manifestspecific.py
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
# Copyright (c) Citrix Systems Inc. # All rights reserved. # # Redistribution and use in source and binary forms, # with or without modification, are permitted provided # that the following conditions are met: # # * Redistributions of source code must retain the above # copyright notice, this list of conditions a...
bsd-2-clause
Python