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
17e36bbcbd34f7fee2280ce04c9700b8aa5a2ec9
Migrate copy application
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq
corehq/apps/app_manager/forms.py
corehq/apps/app_manager/forms.py
from crispy_forms.helper import FormHelper from crispy_forms.layout import Fieldset, Hidden, Layout from crispy_forms.bootstrap import StrictButton from django import forms from django.utils.translation import ugettext as _ from corehq.apps.domain.models import Domain from corehq.apps.style import crispy as hqcrispy ...
from crispy_forms.bootstrap import FormActions from crispy_forms.helper import FormHelper from crispy_forms.layout import ButtonHolder, Fieldset, Hidden, Layout, Submit from django import forms from django.utils.translation import ugettext as _ from corehq.apps.domain.models import Domain class CopyApplicationForm(fo...
bsd-3-clause
Python
cd1f577dd580e922cef8e46a0cc3c83ad183172d
Change version number
scoder/cython,larsmans/cython,bzzzz/cython,roxyboy/cython,mcanthony/cython,roxyboy/cython,rguillebert/CythonCTypesBackend,fperez/cython,da-woods/cython,cython/cython,c-blake/cython,rguillebert/CythonCTypesBackend,dahebolangkuan/cython,bzzzz/cython,cython/cython,da-woods/cython,mcanthony/cython,achernet/cython,hhsprings...
Cython/Compiler/Version.py
Cython/Compiler/Version.py
version = '0.9.6.9'
version = '0.9.6.8'
apache-2.0
Python
d148f1309a5392a4b927b59e0cda6b3299b8c99e
Update DeathSwitch.py
henfredemars/python-personal-projects
DeathSwitch/DeathSwitch.py
DeathSwitch/DeathSwitch.py
#A dead-man's switch for sending important information in the event that I die import smtplib import Config from Messages import msgs from datetime import datetime from datetime import timedelta from time import sleep import os, sys, signal def send_emails(): s = smtplib.SMTP_SSL(Config.host) s.login(Config.emai...
#A dead-man's switch for sending important information in the event that I die import smtplib import Config from Messages import msgs from datetime import datetime from datetime import timedelta from time import sleep import os, sys, signal def send_emails(): s = smtplib.SMTP_SSL(Config.host) s.login(Config.emai...
mit
Python
44298710b0716b0391837b50b3292226a8ebee90
Update task_4_15.py
Mariaanisimova/pythonintask
INBa/2015/Mitin_D_S/task_4_15.py
INBa/2015/Mitin_D_S/task_4_15.py
# Задача 4. Вариант 15. # Напишите программу, которая выводит имя, под которым скрывается Анри Мари Бейль. 4 #Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), #вычислить возраст на данный момент (или момент смерти). Для хранения всех нео...
# Задача 4. Вариант 15. # Напишите программу, которая выводит имя, под которым скрывается Анри Мари Бейль. 4 #Дополнительно необходимо вывести область интересов указанной личности, место рождения, годы рождения и смерти (если человек умер), #вычислить возраст на данный момент (или момент смерти). Для хранения всех нео...
apache-2.0
Python
1559a1dde254e7f5f0e3a41eac9558b40f4382af
fix style
sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs,sdpython/ensae_teaching_cs
src/ensae_teaching_cs/cli/code.py
src/ensae_teaching_cs/cli/code.py
""" @file @brief Starts an app locally to test it. """ from ..helpers import enumerate_inspect_source_code def inspect_source_code(folder, file_pattern=".*[.]((py)|(ipynb))$", line_patterns="from sklearn[_0-9a-zA-Z.]* import ([_a-zA-Z0-9]+);;import sklearn[.]([_a-z]+)", ...
""" @file @brief Starts an app locally to test it. """ from ..helpers import enumerate_inspect_source_code def inspect_source_code(folder, file_pattern=".*[.]((py)|(ipynb))$", line_patterns="from sklearn[_0-9a-zA-Z.]* import ([_a-zA-Z0-9]+);;import sklearn[.]([_a-z]+)", ...
mit
Python
814042e2a512195b77dee23b40f63e1bf4ea3afd
Update same_first_last.py
RCoon/CodingBat,RCoon/CodingBat
Python/List_1/same_first_last.py
Python/List_1/same_first_last.py
# Given an array of ints, return True if the array is length 1 or more, and the # first element and the last element are equal. # same_first_last([1, 2, 3]) --> False # same_first_last([1, 2, 3, 1]) --> True # same_first_last([1, 2, 1]) --> True def same_first_last(nums): return (len(nums) >= 1 and nums[0] == nums[...
# Given an array of ints, return True if the array is length 1 or more, and the # first element and the last element are equal. # same_first_last([1, 2, 3]) -> False # same_first_last([1, 2, 3, 1]) -> True # same_first_last([1, 2, 1]) -> True def same_first_last(nums): return (len(nums) >= 1 and nums[0] == nums[-1]...
mit
Python
ddc4ddec0db1e9111d91ad255494b15bb56ea1fd
Update REMINDERS.py
JLJTECH/TutorialTesting
Misc/REMINDERS.py
Misc/REMINDERS.py
#Python reminders # Collapse the list ''.join(list) #Scan list for longest string and print max item print(max(len(i) for i in string.split())) #Count occurrences of item in list [a,b,c,d,e].count(item) #put anything in square brackets to search list index a[0] #Strange list rotation def rotate_left3(nums): a...
#Python reminders # Collapse the list ''.join(list) #Scan list for longest string and print max item print(max(len(i) for i in string.split())) #Count occurrences of item in list [a,b,c,d,e].count(item) #put anything in square brackets to search list index a[0] #Strange list rotation def rotate_left3(nums): a...
mit
Python
1cf79d8fbc6b6066b3f1237ead377c8614a7daa7
Add more python plugin api.
qianlifeng/Wox,lances101/Wox,Wox-launcher/Wox,Wox-launcher/Wox,qianlifeng/Wox,lances101/Wox,qianlifeng/Wox
PythonHome/wox.py
PythonHome/wox.py
#encoding=utf8 import json import sys import inspect class Wox(object): """ Wox python plugin base """ def __init__(self): rpc_request = json.loads(sys.argv[1],encoding="gb2312") self.proxy = rpc_request.get("proxy",{}) request_method_name = rpc_request.get("method") re...
#encoding=utf8 import json import sys import inspect class Wox(object): """ Wox python plugin base """ def __init__(self): rpc_request = json.loads(sys.argv[1],encoding="gb2312") self.proxy = rpc_request.get("proxy",{}) request_method_name = rpc_request.get("method") re...
mit
Python
57b0dd23179559e8094aeff0dc110dc933fc31f0
Update palindrome-permutation.py
yiwen-luo/LeetCode,jaredkoontz/leetcode,yiwen-luo/LeetCode,kamyu104/LeetCode,jaredkoontz/leetcode,kamyu104/LeetCode,yiwen-luo/LeetCode,kamyu104/LeetCode,githubutilities/LeetCode,tudennis/LeetCode---kamyu104-11-24-2015,githubutilities/LeetCode,yiwen-luo/LeetCode,githubutilities/LeetCode,yiwen-luo/LeetCode,tudennis/LeetC...
Python/palindrome-permutation.py
Python/palindrome-permutation.py
# Time: O(n) # Space: O(1) class Solution(object): def canPermutePalindrome(self, s): """ :type s: str :rtype: bool """ return sum(v % 2 for k, v in collections.Counter(s).iteritems()) < 2
# Time: O(n) # Space: O(n) class Solution(object): def canPermutePalindrome(self, s): """ :type s: str :rtype: bool """ return sum(v % 2 for k, v in collections.Counter(s).iteritems()) < 2
mit
Python
55f99efbc655c658cb12008f57d13a764d4a631d
Update normaliseIO.py
FlaminMad/RPiProcessRig,FlaminMad/RPiProcessRig
RPiProcessRig/src/normaliseIO.py
RPiProcessRig/src/normaliseIO.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Alexander David Leech @date: Sat Jun 04/06/2016 @rev: 1 @lang: Python 2.7 @deps: <None> @desc: Functions to convert the hardware data to sensible numbers/scales """ from yamlImport import yamlImport class normaliseIO(): def __init__(self):...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ @author: Alexander David Leech @date: Sat Jun 04/06/2016 @rev: 1 @lang: Python 2.7 @deps: <> @desc: Functions to convert the hardware data to sensible numbers/scales """ from yamlImport import yamlImport class normaliseIO(): def __init__(self): ...
mit
Python
9363443419bdf07aa273e51db7d03bb8147feb9f
Remove main
misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot,misalcedo/RapBot
Sense/src/main/python/service.py
Sense/src/main/python/service.py
from flask import Flask, Response from sense_hat import SenseHat sense = SenseHat() sense.set_imu_config(True, True, True) app = Flask(__name__) @app.route('/') def all_sensors(): return "Hello, world!" @app.route('/humidity') def humidity(): return "Hello, world!" @app.route('/pressure') def pressure()...
from flask import Flask, Response from sense_hat import SenseHat sense = SenseHat() sense.set_imu_config(True, True, True) app = Flask(__name__) @app.route('/') def all_sensors(): return "Hello, world!" @app.route('/humidity') def humidity(): return "Hello, world!" @app.route('/pressure') def pressure()...
mit
Python
d6c1afdd7b199434df8dd49097e9362fec609168
Update copyright.
fairdemocracy/vilfredo-core
VilfredoReloadedCore/__init__.py
VilfredoReloadedCore/__init__.py
# -*- coding: utf-8 -*- # # This file is part of VilfredoReloadedCore. # # Copyright © 2009-2013 Pietro Speroni di Fenizio / Derek Paterson. # # VilfredoReloadedCore 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 ...
# -*- coding: utf-8 -*- # # This file is part of VilfredoReloadedCore. # # Copyright © 2009-2013 Pietro Speroni di Fenizio / Derek Paterson. # # VilfredoReloadedCore 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 ...
agpl-3.0
Python
50dc14bdd80e46aefa53fbec2a9abcbfac1d82f5
Update Meh.py
kallerdaller/Cogs-Yorkfield
Meh/Meh.py
Meh/Meh.py
import discord from discord.ext import commands class Mycog: """Tells a user that you said meh""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True, pass_message=True) async def meh(self, ctx, user : discord.Member, message): """Tags a person and tells them m...
import discord from discord.ext import commands class Mycog: """Tells a user that you said meh""" def __init__(self, bot): self.bot = bot @commands.command(pass_context=True) async def meh(self, ctx, user : discord.Member, message): """Tags a person and tells them meh""" #You...
mit
Python
056e91baa7331dc7d0752cbcf382683e1dec3a57
Test update with weight decay is independent of loss scale
niboshi/chainer,okuta/chainer,chainer/chainer,chainer/chainer,wkentaro/chainer,wkentaro/chainer,pfnet/chainer,hvy/chainer,okuta/chainer,niboshi/chainer,niboshi/chainer,okuta/chainer,hvy/chainer,hvy/chainer,wkentaro/chainer,okuta/chainer,hvy/chainer,chainer/chainer,niboshi/chainer,chainer/chainer,wkentaro/chainer
tests/chainer_tests/optimizer_hooks_tests/test_weight_decay.py
tests/chainer_tests/optimizer_hooks_tests/test_weight_decay.py
import unittest import numpy as np import chainer import chainer.functions as F import chainer.initializers as I from chainer import optimizer_hooks from chainer import optimizers from chainer import testing from chainer.testing import attr class SimpleLink(chainer.Link): def __init__(self, w, g): supe...
import unittest import numpy as np import chainer import chainer.initializers as I from chainer import optimizer_hooks from chainer import optimizers from chainer import testing from chainer.testing import attr class SimpleLink(chainer.Link): def __init__(self, w, g): super(SimpleLink, self).__init__()...
mit
Python
1a57265970f7b49e594cc130d772ca8904a55ccf
Duplicate filter in the query, closes #175
kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com,kkamkou/gitmostwanted.com
gitmostwanted/tasks/repo_status.py
gitmostwanted/tasks/repo_status.py
from gitmostwanted.models.repo import Repo, RepoStars, RepoMean from gitmostwanted.app import db, celery from sqlalchemy.sql import expression from statistics import variance, mean from datetime import datetime, timedelta from types import GeneratorType @celery.task() def status_detect(num_days, num_segments): re...
from gitmostwanted.models.repo import Repo, RepoStars, RepoMean from gitmostwanted.app import db, celery from sqlalchemy.sql import expression from statistics import variance, mean from datetime import datetime, timedelta from types import GeneratorType @celery.task() def status_detect(num_days, num_segments): re...
mit
Python
5439fd5cc81694550e8985bbc27315cce9af965a
remove account.reconcile before deleting a account.move
acsone/bank-statement-reconcile,VitalPet/bank-statement-reconcile,damdam-s/bank-statement-reconcile,BT-jmichaud/bank-statement-reconcile,raycarnes/bank-statement-reconcile,Antiun/bank-statement-reconcile,VitalPet/bank-statement-reconcile,Endika/bank-statement-reconcile,BT-ojossen/bank-statement-reconcile,acsone/bank-st...
account_statement_ext/account.py
account_statement_ext/account.py
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joel Grand-Guillaume # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
# -*- coding: utf-8 -*- ############################################################################## # # Author: Joel Grand-Guillaume # Copyright 2011-2012 Camptocamp SA # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License a...
agpl-3.0
Python
90636d0d445ba28d9ba880b967c5d8a99fb25483
Set version as 0.8.12
Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend
alignak_backend/__init__.py
alignak_backend/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Alignak REST backend This module is an Alignak REST backend """ # Application version and manifest VERSION = (0, 8, 12) __application__ = u"Alignak_Backend" __short_version__ = '.'.join((str(each) for each in VERSION[:2])) __version__ = '.'.join((str(each) f...
#!/usr/bin/env python # -*- coding: utf-8 -*- """ Alignak REST backend This module is an Alignak REST backend """ # Application version and manifest VERSION = (0, 8, 11) __application__ = u"Alignak_Backend" __short_version__ = '.'.join((str(each) for each in VERSION[:2])) __version__ = '.'.join((str(each) f...
agpl-3.0
Python
b1716e580da78fcd534e62da2cb073f12cefc5c3
Add missing brackets in load_models.
catsmith/magpy,zeth/magpy,catsmith/magpy,zeth/magpy
magpy/management/commands/load_models.py
magpy/management/commands/load_models.py
"""Load models from an app.""" from magpy.server.instances import InstanceLoader from magpy.management import BaseCommand, CommandError import importlib class Command(BaseCommand): """Load the models from app_name(s).""" help = ('Load the models from app_name(s).') args = '[app_name ...]' def handle(...
"""Load models from an app.""" from magpy.server.instances import InstanceLoader from magpy.management import BaseCommand, CommandError import importlib class Command(BaseCommand): """Load the models from app_name(s).""" help = ('Load the models from app_name(s).') args = '[app_name ...]' def handle(...
bsd-3-clause
Python
cdb799f5d12fc64296e3ed18590ac5b94d0419bd
Add activePeriod method to helper/timeline
rhyolight/nupic.son,rhyolight/nupic.son,rhyolight/nupic.son
app/soc/logic/helper/timeline.py
app/soc/logic/helper/timeline.py
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
#!/usr/bin/env python2.5 # # Copyright 2009 the Melange authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
apache-2.0
Python
82d37302b567366c840eed9ec43b3ddb0526d4e5
Improve database validator
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
dbaas/logical/validators.py
dbaas/logical/validators.py
# -*- coding: utf-8 -*- from logical.models import Database from django.core.exceptions import ObjectDoesNotExist from system.models import Configuration def database_name_evironment_constraint(database_name, environment_name): try: database = Database.objects.get(name=database_name) except ObjectDoes...
# -*- coding: utf-8 -*- from django.utils.translation import ugettext_lazy as _ from logical.models import Database from django.core.exceptions import ValidationError from django.core.exceptions import ObjectDoesNotExist from system.models import Configuration def validate_evironment(database_name, environment_name):...
bsd-3-clause
Python
d06b22ce2802a68fec9bcfaa578891852375ee51
add comment
stephenliu1989/msmbuilder,mpharrigan/mixtape,brookehus/msmbuilder,rmcgibbo/msmbuilder,stephenliu1989/msmbuilder,rafwiewiora/msmbuilder,dr-nate/msmbuilder,cxhernandez/msmbuilder,peastman/msmbuilder,mpharrigan/mixtape,msultan/msmbuilder,Eigenstate/msmbuilder,dotsdl/msmbuilder,Eigenstate/msmbuilder,dotsdl/msmbuilder,brook...
msmbuilder/tests/test_msm_uncertainty.py
msmbuilder/tests/test_msm_uncertainty.py
from __future__ import print_function import numpy as np import scipy.linalg from scipy.linalg import eigvals from scipy.optimize import approx_fprime from msmbuilder.cluster import NDGrid from msmbuilder.example_datasets import load_doublewell from msmbuilder.msm import MarkovStateModel, ContinuousTimeMSM from msmbuil...
from __future__ import print_function import numpy as np import scipy.linalg from scipy.linalg import eigvals from scipy.optimize import approx_fprime from msmbuilder.cluster import NDGrid from msmbuilder.example_datasets import load_doublewell from msmbuilder.msm import MarkovStateModel, ContinuousTimeMSM from msmbuil...
lgpl-2.1
Python
e108482126c6ade2916723bff9d8de2525e7109b
Extend adapt-es-path.py script to handle deleted files
crate/crate,crate/crate,EvilMcJerkface/crate,EvilMcJerkface/crate,EvilMcJerkface/crate,crate/crate
devs/tools/adapt-es-path.py
devs/tools/adapt-es-path.py
#!/usr/bin/env python3 """ Use to apply patches from ES upstream with: git apply --reject \ <(curl -L https://github.com/elastic/elasticsearch/pull/<NUMBER>.diff | ./devs/tools/adapt-es-path.py) """ import sys def main(): for line in sys.stdin: sys.stdout.write( line ...
#!/usr/bin/env python3 """ Use to apply patches from ES upstream with: git apply --reject \ <(curl -L https://github.com/elastic/elasticsearch/pull/<NUMBER>.patch | ./devs/tools/adapt-es-path.py) """ import sys def main(): for line in sys.stdin: print( line .rstrip()...
apache-2.0
Python
8be98a311f5fa6313f6849f832b7cb525438c19f
Enable CELERY_ALWAYS_EAGER for Travis
wetneb/dissemin,wetneb/dissemin,dissemin/dissemin,dissemin/dissemin,dissemin/dissemin,wetneb/dissemin,dissemin/dissemin,wetneb/dissemin,dissemin/dissemin
dissemin/settings/travis.py
dissemin/settings/travis.py
""" Travis specific settings for tests """ from .common import * import os # Cache backend # https://docs.djangoproject.com/en/1.8/topics/cache/ CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' } } if 'CORE_API_KEY' in os.environ: CORE_API_KEY = os.environ['CORE_API_KEY...
""" Travis specific settings for tests """ from .common import * import os # Cache backend # https://docs.djangoproject.com/en/1.8/topics/cache/ CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache' } } if 'CORE_API_KEY' in os.environ: CORE_API_KEY = os.environ['CORE_API_KEY...
agpl-3.0
Python
e5c33da39795d0f85a65c603ab91b7f718a150d2
Fix categories validation
mmalter/dlstats,MichelJuillard/dlstats,Widukind/dlstats,mmalter/dlstats,Widukind/dlstats,MichelJuillard/dlstats,MichelJuillard/dlstats,mmalter/dlstats
dlstats/fetchers/schemas.py
dlstats/fetchers/schemas.py
# -*- coding: utf-8 -*- from datetime import datetime import bson from voluptuous import Required, All, Length, Schema, Invalid, Optional, Any, Extra def date_validator(value): """Custom validator (only a few types are natively implemented in voluptuous) """ if isinstance(value, datetime): return...
# -*- coding: utf-8 -*- from datetime import datetime import bson from voluptuous import Required, All, Length, Schema, Invalid, Optional, Any, Extra def date_validator(value): """Custom validator (only a few types are natively implemented in voluptuous) """ if isinstance(value, datetime): return...
agpl-3.0
Python
5a6970349ace3ddcf12cfac6bc72ec6dbc3424a2
Make the default setting retrieval more elegant.
dwaiter/django-bcrypt
django_bcrypt/models.py
django_bcrypt/models.py
import bcrypt from django.contrib.auth.models import User from django.conf import settings rounds = getattr(settings, "BCRYPT_ROUNDS", 12) _check_password = User.check_password def bcrypt_check_password(self, raw_password): if self.password.startswith('bc$'): salt_and_hash = self.password[3:] ret...
import bcrypt from django.contrib.auth.models import User from django.conf import settings try: rounds = settings.BCRYPT_ROUNDS except AttributeError: rounds = 12 _check_password = User.check_password def bcrypt_check_password(self, raw_password): if self.password.startswith('bc$'): salt_and_has...
mit
Python
62f9f578de461815892c5a5321669bd1f5375a52
Bump to 0.5
uranusjr/django-mosql
djangomosql/__init__.py
djangomosql/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.5'
#!/usr/bin/env python # -*- coding: utf-8 -*- __version__ = '0.4.1'
bsd-3-clause
Python
4edb6f5fbe1d480dd64e18cf0c913b4cca109f9e
Update for v2.0.2
maxmind/MaxMind-DB-Reader-python,maxmind/MaxMind-DB-Reader-python,maxmind/MaxMind-DB-Reader-python
maxminddb/__init__.py
maxminddb/__init__.py
# pylint:disable=C0111 import os from typing import AnyStr, IO, Union import maxminddb.reader try: import maxminddb.extension except ImportError: maxminddb.extension = None # type: ignore from maxminddb.const import ( MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY, MODE_...
# pylint:disable=C0111 import os from typing import AnyStr, IO, Union import maxminddb.reader try: import maxminddb.extension except ImportError: maxminddb.extension = None # type: ignore from maxminddb.const import ( MODE_AUTO, MODE_MMAP, MODE_MMAP_EXT, MODE_FILE, MODE_MEMORY, MODE_...
apache-2.0
Python
7ae886fe7913397ff8add60c5d1692262d540ce7
fix logging level and remove unneeded logger
spirali/haydi,Kobzol/haydi,spirali/haydi,Kobzol/haydi
src/haydi/base/runtime/util.py
src/haydi/base/runtime/util.py
import logging import time from datetime import datetime, timedelta class TimeoutManager(object): def __init__(self, timeout): """ :type timeout: int | timedelta """ if isinstance(timeout, timedelta): timeout = timeout.total_seconds() self.timeout = timeout ...
from datetime import datetime, timedelta import time import logging class TimeoutManager(object): def __init__(self, timeout): """ :type timeout: int | timedelta """ if isinstance(timeout, timedelta): timeout = timeout.total_seconds() self.timeout = timeout ...
mit
Python
4d3a9755d6eb3bab84a3081145d08d4b5e8fff36
Remove legacy import from weather app
ManchesterIO/mollyproject-next,ManchesterIO/mollyproject-next,ManchesterIO/mollyproject-next
tests/molly/apps/weather/test_weather_app.py
tests/molly/apps/weather/test_weather_app.py
# coding=utf-8 from mock import Mock, sentinel import unittest2 as unittest from flask import Flask from flask.ext.babel import Babel from molly.apps import weather class WeatherAppTest(unittest.TestCase): _OBSERVATION = {'hello': 'world'} def setUp(self): self._provider = Mock() self._pro...
# coding=utf-8 from mock import Mock, sentinel import unittest2 as unittest from flask import Flask from flaskext.babel import Babel from molly.apps import weather class WeatherAppTest(unittest.TestCase): _OBSERVATION = {'hello': 'world'} def setUp(self): self._provider = Mock() self._provi...
apache-2.0
Python
d1b8b76e047cdbecfdb573b3d7ce4643b804d2d6
fix to work with different line endings
jaredhasenklein/the-blue-alliance,1fish2/the-blue-alliance,bvisness/the-blue-alliance,bdaroz/the-blue-alliance,josephbisch/the-blue-alliance,verycumbersome/the-blue-alliance,1fish2/the-blue-alliance,phil-lopreiato/the-blue-alliance,1fish2/the-blue-alliance,1fish2/the-blue-alliance,tsteward/the-blue-alliance,the-blue-al...
controllers/admin/admin_main_controller.py
controllers/admin/admin_main_controller.py
import os import json import re from google.appengine.ext.webapp import template from controllers.base_controller import LoggedInHandler class AdminMain(LoggedInHandler): def get(self): self._require_admin() # version info try: fname = os.path.join(os.path.dirname(__f...
import os import json import re from google.appengine.ext.webapp import template from controllers.base_controller import LoggedInHandler class AdminMain(LoggedInHandler): def get(self): self._require_admin() # version info try: fname = os.path.join(os.path.dirname(__f...
mit
Python
b13778c2c6950ad2cd2d32618a80667e4cf86632
add new versions 2.8.4 (#27680)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/py-iminuit/package.py
var/spack/repos/builtin/packages/py-iminuit/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyIminuit(PythonPackage): """Interactive IPython-Friendly Minimizer based on SEAL Minuit2....
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class PyIminuit(PythonPackage): """Interactive IPython-Friendly Minimizer based on SEAL Minuit2....
lgpl-2.1
Python
68e9a325c5072aa40f8d7a799c63f037d4a2e20b
add logging to mspaint example; fix the example for my system
drinkertea/pywinauto,pywinauto/pywinauto,airelil/pywinauto,vasily-v-ryabov/pywinauto,cetygamer/pywinauto
examples/mspaint.py
examples/mspaint.py
""" Example script for MS Paint Requirements: - tested on Windows 10 (should work on Win7+) - pywinauto 0.6.1+ The example shows how to work with MS Paint application. It opens JPEG image and resizes it using "Resize and Skew" dialog. """ import logging import sys from pywinauto import actionlogger from pywinauto...
""" Example script for MS Paint Requirements: - tested on Windows 10 (should work on Win7+) - pywinauto 0.6.1+ The example shows how to work with MS Paint application. It opens JPEG image and resizes it using "Resize and Skew" dialog. """ from pywinauto import Application app = Application(backend='uia').start(...
bsd-3-clause
Python
3043141a7064a479a29509ee441f104642abe84b
Rename Connection transmit function to process for use in IPFGraph
anton-golubkov/Garland,anton-golubkov/Garland
src/ipf/ipfblock/connection.py
src/ipf/ipfblock/connection.py
# -*- coding: utf-8 -*- import ioport class Connection(object): """ Connection class for IPFBlock Connection binding OPort and IPort of some IPFBlocks """ def __init__(self, oport, iport): # Check port compatibility and free of input port if ioport.compatible(oport, iport) ...
# -*- coding: utf-8 -*- import ioport class Connection(object): """ Connection class for IPFBlock Connection binding OPort and IPort of some IPFBlocks """ def __init__(self, oport, iport): # Check port compatibility and free of input port if ioport.compatible(oport, iport) ...
lgpl-2.1
Python
628f16ff8f540605349f7edb8e61cdc0f229a97d
debug file upload
datea/datea-api,datea/datea-api,lafactura/datea-api,lafactura/datea-api,lafactura/datea-api,datea/datea-api
datea_api/apps/file/resources.py
datea_api/apps/file/resources.py
from tastypie import fields from tastypie.resources import ModelResource from .models import File from datea_api.apps.api.authorization import DateaBaseAuthorization from datea_api.apps.api.authentication import ApiKeyPlusWebAuthentication from datea_api.apps.api.base_resources import JSONDefaultMixin from tastypie.cac...
from tastypie import fields from tastypie.resources import ModelResource from .models import File from datea_api.apps.api.authorization import DateaBaseAuthorization from datea_api.apps.api.authentication import ApiKeyPlusWebAuthentication from datea_api.apps.api.base_resources import JSONDefaultMixin from tastypie.cac...
agpl-3.0
Python
74c6c0ee0638b984ee18d1ea0c58076a489686e3
send uses UDP_BROADCAST_IP_ADDRS instead of the single old global variable
mclarkk/lifxlan
examples/sniffer.py
examples/sniffer.py
#!/usr/bin/env python # coding=utf-8 # sniffer.py # Author: Meghan Clark # Listens to broadcast UDP messages. If you are using the LIFX app to control a bulb, # you might see some things. from socket import AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_BROADCAST, SO_REUSEADDR, socket, timeout from lifxlan import UDP_BROADCAST...
#!/usr/bin/env python # coding=utf-8 # sniffer.py # Author: Meghan Clark # Listens to broadcast UDP messages. If you are using the LIFX app to control a bulb, # you might see some things. from socket import AF_INET, SOCK_DGRAM, SOL_SOCKET, SO_BROADCAST, SO_REUSEADDR, socket, timeout from lifxlan import UDP_BROADCAST...
mit
Python
c4a0dc9ecc12a82735738fe4b80dc74f991b66d7
Add version option to CLI.
yanqd0/csft
csft/__main__.py
csft/__main__.py
#!/usr/bin/env python # -*- coding:utf-8 -*- """ The entry point of csft. """ import argparse as ap from os.path import isdir from . import __name__ as _name from . import __version__ as _version from .csft import print_result def main(argv=None): """ Execute the application CLI. """ parser = ap.ArgumentPa...
#!/usr/bin/env python # -*- coding:utf-8 -*- """ The entry point of csft. """ import argparse as ap from os.path import isdir from .csft import print_result def main(argv=None): parser = ap.ArgumentParser(add_help='add help') parser.add_argument('path', help='the directory to be analyzed') args = parse...
mit
Python
850e4b5de19427ff4ff8c48b9ee5df34b3b01bda
Fix linkedin pageset for RecreateSKPs bot
aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/pl...
tools/skp/page_sets/skia_linkedin_desktop.py
tools/skp/page_sets/skia_linkedin_desktop.py
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 import os from page_sets.login_helpers import linkedin_login from telemetry import story from telemetry.page import page as p...
# Copyright 2019 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. # pylint: disable=W0401,W0614 import os from page_sets.login_helpers import linkedin_login from telemetry import story from telemetry.page import page as p...
bsd-3-clause
Python
8e6101436e6cf629b02adbc60530b886872c0c2e
update version to 0.7.0
sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp,sahlinet/fastapp
fastapp/__init__.py
fastapp/__init__.py
__version__ = "0.7.0" import os from django.core.exceptions import ImproperlyConfigured # load plugins from django.conf import settings try: for plugin in getattr(settings, "FASTAPP_PLUGINS", []): def my_import(name): # from http://effbot.org/zone/import-string.htm m = __import__...
__version__ = "0.6.15" import os from django.core.exceptions import ImproperlyConfigured # load plugins from django.conf import settings try: for plugin in getattr(settings, "FASTAPP_PLUGINS", []): def my_import(name): # from http://effbot.org/zone/import-string.htm m = __import_...
mit
Python
169d092462cb877e3173b5d0482c39cfe6db4289
correct adding of settings
fiduswriter/fiduswriter,fiduswriter/fiduswriter,fiduswriter/fiduswriter,fiduswriter/fiduswriter
fiduswriter/urls.py
fiduswriter/urls.py
# # This file is part of Fidus Writer <http://www.fiduswriter.org> # # Copyright (C) 2013 Takuto Kojima, Johannes Wilm # # 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 o...
# # This file is part of Fidus Writer <http://www.fiduswriter.org> # # Copyright (C) 2013 Takuto Kojima, Johannes Wilm # # 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 o...
agpl-3.0
Python
c82d696fd8854af97833a09943dd9f7b0b7b44d8
revert setup file to use process killing
hperadin/FrameworkBenchmarks,yunspace/FrameworkBenchmarks,lcp0578/FrameworkBenchmarks,Rydgel/FrameworkBenchmarks,thousandsofthem/FrameworkBenchmarks,F3Community/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,jebbstewart/FrameworkBenchmarks,hperadin/Framew...
flask/setup_pypy.py
flask/setup_pypy.py
import subprocess import sys import setup_util import os proc = None def start(args): global proc setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host) proc = subprocess.Popen("~/FrameworkBenchmarks/installs/pypy-2.0/bin/pypy run_pypy.py --port=8080 --logging=error", shell=True, cwd="flask")...
import subprocess import sys import setup_util import os proc = None def start(args): global proc setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host) proc = subprocess.Popen("~/FrameworkBenchmarks/installs/pypy-2.0/bin/pypy run_pypy.py --port=8080 --logging=error", shell=True, cwd="flask")...
bsd-3-clause
Python
6e698f2b1c5a884f22832fa3968fdfc0edebc391
revert setup file to use process killing
knewmanTE/FrameworkBenchmarks,grob/FrameworkBenchmarks,actframework/FrameworkBenchmarks,saturday06/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,Ocramius/FrameworkBenchmarks,RockinRoel/FrameworkBenchmarks,jeevatkm/FrameworkBenchmarks,martin-g/FrameworkBenchmarks,kostya-sh/FrameworkBenchmarks,PermeAgility/FrameworkBe...
flask/setup_pypy.py
flask/setup_pypy.py
import subprocess import sys import setup_util import os proc = None def start(args): global proc setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host) proc = subprocess.Popen("~/FrameworkBenchmarks/installs/pypy-2.0/bin/pypy run_pypy.py --port=8080 --logging=error", shell=True, cwd="flask")...
import subprocess import sys import setup_util import os proc = None def start(args): global proc setup_util.replace_text("flask/app.py", "DBHOSTNAME", args.database_host) proc = subprocess.Popen("~/FrameworkBenchmarks/installs/pypy-2.0/bin/pypy run_pypy.py --port=8080 --logging=error", shell=True, cwd="flask")...
bsd-3-clause
Python
b6d58897eed1dab5759eb9842896dec2379a4e5b
Update ipc_lista1.14.py
any1m1c/ipc20161
lista1/ipc_lista1.14.py
lista1/ipc_lista1.14.py
#ipc_lista1.14 #Professor: Jucimar
ipc_lista1.14
apache-2.0
Python
d4e47a450d5d3a3f92c42d354465660c9c6d1676
Prepare v2.12.11.dev
ianstalk/Flexget,crawln45/Flexget,Flexget/Flexget,tobinjt/Flexget,malkavi/Flexget,malkavi/Flexget,JorisDeRieck/Flexget,LynxyssCZ/Flexget,malkavi/Flexget,jawilson/Flexget,Danfocus/Flexget,crawln45/Flexget,jawilson/Flexget,Flexget/Flexget,Danfocus/Flexget,JorisDeRieck/Flexget,gazpachoking/Flexget,crawln45/Flexget,ianstal...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
0948aa0b1027c5500d0c0db813322f9308ffef31
Update ipc_lista1.15.py
any1m1c/ipc20161
lista1/ipc_lista1.15.py
lista1/ipc_lista1.15.py
#ipc_lista1.15 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o total do seu salário no referido mês, sabendo-se que são descontados 11% para o Imposto de Renda, 8% para o INSS e 5% p...
#ipc_lista1.15 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um Programa que pergunte quanto você ganha por hora e o número de horas trabalhadas no mês. Calcule e mostre o total do seu salário no referido mês, sabendo-se que são descontados 11% para o Imposto de Renda, 8% para o INSS e 5% p...
apache-2.0
Python
0368ceb5b59565037fd46c536a79b6787e3978f2
Update ipc_lista2.02.py
any1m1c/ipc20161
lista2/ipc_lista2.02.py
lista2/ipc_lista2.02.py
#ipc_lista2.02 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que peça um valor e mostre na tela se o valor é positivo ou negativo. valor = float(input("Informe um numero: ")) if (valor > 0): print ("O numero
#ipc_lista2.02 #Professor: Jucimar Junior #Any Mendes Carvalho - 1615310044 # # # # #Faça um programa que peça um valor e mostre na tela se o valor é positivo ou negativo. valor = float(input("Informe um numero: ")) if (valor > 0): print
apache-2.0
Python
075549641e1c589ae7657833777ec8c587a5b0fa
Prepare v2.18.7.dev
crawln45/Flexget,Danfocus/Flexget,malkavi/Flexget,Danfocus/Flexget,malkavi/Flexget,crawln45/Flexget,malkavi/Flexget,JorisDeRieck/Flexget,crawln45/Flexget,Flexget/Flexget,ianstalk/Flexget,Danfocus/Flexget,tobinjt/Flexget,malkavi/Flexget,gazpachoking/Flexget,ianstalk/Flexget,tobinjt/Flexget,Danfocus/Flexget,Flexget/Flexg...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
ebdd31055eeb722fc753841c46260fec2fbf4704
Prepare v1.2.369.dev
tarzasai/Flexget,jacobmetrick/Flexget,lildadou/Flexget,antivirtel/Flexget,dsemi/Flexget,tsnoam/Flexget,jawilson/Flexget,antivirtel/Flexget,Danfocus/Flexget,jacobmetrick/Flexget,Flexget/Flexget,lildadou/Flexget,tsnoam/Flexget,qk4l/Flexget,JorisDeRieck/Flexget,poulpito/Flexget,JorisDeRieck/Flexget,LynxyssCZ/Flexget,crawl...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
38453ff32360c12b860b582ef893e98884a23861
Prepare v1.2.355.dev
qvazzler/Flexget,Danfocus/Flexget,Pretagonist/Flexget,ZefQ/Flexget,xfouloux/Flexget,drwyrm/Flexget,tobinjt/Flexget,jawilson/Flexget,qk4l/Flexget,grrr2/Flexget,tsnoam/Flexget,OmgOhnoes/Flexget,JorisDeRieck/Flexget,lildadou/Flexget,JorisDeRieck/Flexget,qvazzler/Flexget,xfouloux/Flexget,gazpachoking/Flexget,cvium/Flexget,...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
d729fe72869f7548768181b85e02e5e7ceaa7530
Prepare v3.1.77.dev
Flexget/Flexget,Flexget/Flexget,crawln45/Flexget,Flexget/Flexget,Flexget/Flexget,crawln45/Flexget,crawln45/Flexget,crawln45/Flexget
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
db786c0a6d1177af85140407d7c94e8074f7137c
Prepare v2.3.23.dev
tarzasai/Flexget,OmgOhnoes/Flexget,LynxyssCZ/Flexget,JorisDeRieck/Flexget,poulpito/Flexget,tobinjt/Flexget,crawln45/Flexget,LynxyssCZ/Flexget,qk4l/Flexget,jawilson/Flexget,tobinjt/Flexget,drwyrm/Flexget,LynxyssCZ/Flexget,qk4l/Flexget,malkavi/Flexget,ianstalk/Flexget,tarzasai/Flexget,Danfocus/Flexget,LynxyssCZ/Flexget,d...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
3e0e0da46f4ee395129dd4a970fa981ed8f18351
Prepare v1.2.335.dev
dsemi/Flexget,tobinjt/Flexget,grrr2/Flexget,antivirtel/Flexget,sean797/Flexget,OmgOhnoes/Flexget,ratoaq2/Flexget,thalamus/Flexget,Danfocus/Flexget,Flexget/Flexget,malkavi/Flexget,oxc/Flexget,malkavi/Flexget,Pretagonist/Flexget,ibrahimkarahan/Flexget,malkavi/Flexget,antivirtel/Flexget,Flexget/Flexget,offbyone/Flexget,Ly...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
506b573768664ec83d26f99afb75f612d239cada
Prepare v2.6.10.dev
Flexget/Flexget,crawln45/Flexget,crawln45/Flexget,drwyrm/Flexget,Flexget/Flexget,ianstalk/Flexget,crawln45/Flexget,jawilson/Flexget,tobinjt/Flexget,Flexget/Flexget,tobinjt/Flexget,drwyrm/Flexget,Danfocus/Flexget,sean797/Flexget,JorisDeRieck/Flexget,malkavi/Flexget,poulpito/Flexget,Danfocus/Flexget,ianstalk/Flexget,tobi...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
9fabd2ffaa97dfdaa7a820dfafdb39b9b9efeef9
Prepare v1.2.420.dev
gazpachoking/Flexget,jacobmetrick/Flexget,qvazzler/Flexget,oxc/Flexget,tsnoam/Flexget,Flexget/Flexget,cvium/Flexget,Danfocus/Flexget,jawilson/Flexget,sean797/Flexget,poulpito/Flexget,antivirtel/Flexget,ianstalk/Flexget,Pretagonist/Flexget,lildadou/Flexget,malkavi/Flexget,malkavi/Flexget,jawilson/Flexget,qk4l/Flexget,po...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
60459d08dd34e551721d7934b4243dfbf368857f
Prepare v1.2.364.dev
qk4l/Flexget,grrr2/Flexget,Flexget/Flexget,tobinjt/Flexget,ianstalk/Flexget,qvazzler/Flexget,crawln45/Flexget,Flexget/Flexget,cvium/Flexget,Flexget/Flexget,poulpito/Flexget,qk4l/Flexget,tobinjt/Flexget,OmgOhnoes/Flexget,drwyrm/Flexget,jawilson/Flexget,malkavi/Flexget,tobinjt/Flexget,OmgOhnoes/Flexget,sean797/Flexget,dr...
flexget/_version.py
flexget/_version.py
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
""" Current FlexGet version. This is contained in a separate file so that it can be easily read by setup.py, and easily edited and committed by release scripts in continuous integration. Should (almost) never be set manually. The version should always be set to the <next release version>.dev The jenkins release job wi...
mit
Python
9c0fb86b48099a0092e6e2dc848bf694436f38d5
fix typo in the latest version (#24209)
LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack,LLNL/spack
var/spack/repos/builtin/packages/openkim-models/package.py
var/spack/repos/builtin/packages/openkim-models/package.py
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class OpenkimModels(CMakePackage): """OpenKIM is an online framework for making molecular simula...
# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other # Spack Project Developers. See the top-level COPYRIGHT file for details. # # SPDX-License-Identifier: (Apache-2.0 OR MIT) from spack import * class OpenkimModels(CMakePackage): """OpenKIM is an online framework for making molecular simula...
lgpl-2.1
Python
13f0a6da9adb569c4207aeedebfd65b4a70d5743
Update attachment_queue/__manifest__.py
OCA/server-tools,YannickB/server-tools,OCA/server-tools,YannickB/server-tools,OCA/server-tools,YannickB/server-tools
attachment_queue/__manifest__.py
attachment_queue/__manifest__.py
# Copyright 2015 Florian DA COSTA @ Akretion # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Attachment Queue", "version": "12.0.1.0.0", "author": "Akretion,Odoo Community Association (OCA)", "summary": "Base module adding the concept of queue for processing files", ...
# Copyright 2015 Florian DA COSTA @ Akretion # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { "name": "Attachment Queue", "version": "12.0.1.0.0", "author": "Akretion,Odoo Community Association (OCA)", "summary": "Base module adding the concept of queue for processing file", "...
agpl-3.0
Python
e5a2ddd11532144c452207e44ab05dc82ab4f951
update ART API
PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas,PanDAWMS/panda-bigmon-atlas
atlas/art/api/client/__init__.py
atlas/art/api/client/__init__.py
__author__ = 'Misha Borodin' __email__ = 'mborodin@cern.ch' import json import requests class Client(object): BASE_URL = 'https://prodtask-dev.cern.ch' def __init__(self, auth_key, verify_ssl_cert=False, base_url=None): self.verify_ssl_cert = verify_ssl_cert if base_url: self.bas...
__author__ = 'Misha Borodin' __email__ = 'mborodin@cern.ch' import json import requests class Client(object): BASE_URL = 'https://prodtask-dev.cern.ch' def __init__(self, auth_key, verify_ssl_cert=False, base_url=None): self.verify_ssl_cert = verify_ssl_cert if base_url: self.bas...
apache-2.0
Python
25c9d9ecd457635492c028f278a3197959c85904
rename field Passport to Passport Number
it-projects-llc/website-addons,it-projects-llc/website-addons,it-projects-llc/website-addons
website_event_attendee_fields_custom/models/res_partner.py
website_event_attendee_fields_custom/models/res_partner.py
# -*- coding: utf-8 -*- from odoo import models, fields class Partner(models.Model): _inherit = "res.partner" passport = fields.Char( string='Passport Number', compute=lambda s: s._compute_identification( 'passport', 'passport', ), inverse=lambda s: s._inverse_iden...
# -*- coding: utf-8 -*- from odoo import models, fields class Partner(models.Model): _inherit = "res.partner" passport = fields.Char( compute=lambda s: s._compute_identification( 'passport', 'passport', ), inverse=lambda s: s._inverse_identification( 'passport'...
mit
Python
fa3a3022cd242c4ce61d4089d79c018a8ce67cf8
FIX EXAMPLE: No longer working with current code base since the TokenStream.next() method was removed.
livepy/jinja2,justinfay/jinja2,dext0r/jinja2,invenia/jinja2,mitsuhiko/jinja2,pgjones/jinja,icio/jinja2,mukeshmugunthan/jinja2,wangjun/jinja2,icio/jinja2,DentonGentry/jinja2,saydulk/jinja2,invenia/jinja2,tark-hidden/jinja2,wongkwunkit/jinja2,extremewaysback/jinja2,pallets/jinja,pgjones/jinja,Perkville/jinja2,extremeways...
docs/cache_extension.py
docs/cache_extension.py
from jinja2 import nodes from jinja2.ext import Extension class FragmentCacheExtension(Extension): # a set of names that trigger the extension. tags = set(['cache']) def __init__(self, environment): super(FragmentCacheExtension, self).__init__(environment) # add the defaults to the envir...
from jinja2 import nodes from jinja2.ext import Extension class FragmentCacheExtension(Extension): # a set of names that trigger the extension. tags = set(['cache']) def __init__(self, environment): super(FragmentCacheExtension, self).__init__(environment) # add the defaults to the envir...
bsd-3-clause
Python
7bbe3dc6192bd3ae9015d8bbcea271b395e8ca07
Tweak genini.
pombredanne/http-repo.gem5.org-gem5-,vovojh/gem5,pombredanne/http-repo.gem5.org-gem5-,vovojh/gem5,vovojh/gem5,vovojh/gem5,hoangt/tpzsimul.gem5,vovojh/gem5,hoangt/tpzsimul.gem5,pombredanne/http-repo.gem5.org-gem5-,hoangt/tpzsimul.gem5,vovojh/gem5,pombredanne/http-repo.gem5.org-gem5-,pombredanne/http-repo.gem5.org-gem5-,...
test/genini.py
test/genini.py
#!/usr/bin/env python # Copyright (c) 2005 The Regents of The University of Michigan # 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 copyrigh...
#!/usr/bin/env python # Copyright (c) 2005 The Regents of The University of Michigan # 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 copyrigh...
bsd-3-clause
Python
fb28813fbb906c1ea7c4fb3c52e60219c3ae1f19
Remove chaves do redis referentes a votaçãoi
douglasbastos/votacao_with_redis,douglasbastos/votacao_with_redis
votacao_with_redis/management/commands/gera_votacao.py
votacao_with_redis/management/commands/gera_votacao.py
# coding: utf-8 from django.core.management.base import BaseCommand from ...models import Poll, Option import redis cache = redis.StrictRedis(host='127.0.0.1', port=6379, db=0) class Command(BaseCommand): def handle(self, *args, **kwargs): options = [1, 2, 3, 4] Poll.objects.filter(id=1).delete(...
# coding: utf-8 from django.core.management.base import BaseCommand from ...models import Poll, Option class Command(BaseCommand): def handle(self, *args, **kwargs): Poll.objects.filter(id=1).delete() Option.objects.filter(id__in=[1, 2, 3, 4]).delete() question = Poll.objects.create(id=1...
mit
Python
a44943e73e9d7e9e5a04dcb11f2bac27d8e3fc74
Add all tests back to runner.
silverfernsys/agentserver,silverfernsys/agentserver
test/runner.py
test/runner.py
#! /usr/bin/env python import unittest, sys, os, logging sys.path.insert(0, os.path.join(os.path.split(os.path.dirname(os.path.abspath(__file__)))[0], 'agentserver')) logging.disable(logging.CRITICAL) testmodules = [ 'test_admin', 'test_db', 'test_http', 'test_validators', 'test_ws', 'test_uti...
#! /usr/bin/env python import unittest, sys, os, logging sys.path.insert(0, os.path.join(os.path.split(os.path.dirname(os.path.abspath(__file__)))[0], 'agentserver')) logging.disable(logging.CRITICAL) testmodules = [ # 'test_admin', # 'test_db', # 'test_http', # 'test_validators', 'test_ws', #...
bsd-3-clause
Python
e861def07da1f0dea7f5273d06e7dc674a79025f
Update Django catch-all URL path to not catch URLs with a . in them.
kdechant/eamon,kdechant/eamon,kdechant/eamon,kdechant/eamon
adventure/urls.py
adventure/urls.py
from django.conf.urls import url, include from rest_framework import routers from . import views from .views import PlayerViewSet, AdventureViewSet, RoomViewSet, ArtifactViewSet, EffectViewSet, MonsterViewSet router = routers.DefaultRouter(trailing_slash=False) router.register(r'players', PlayerViewSet) router.regis...
from django.conf.urls import url, include from rest_framework import routers from . import views from .views import PlayerViewSet, AdventureViewSet, RoomViewSet, ArtifactViewSet, EffectViewSet, MonsterViewSet router = routers.DefaultRouter(trailing_slash=False) router.register(r'players', PlayerViewSet) router.regis...
mit
Python
34873d172e73d3c778ed53311838297a609f2ca5
Add SSL support
koendeschacht/python-logstash-async,eht16/python-logstash-async,loganasherjones/python-logstash-async
logstash/handler_tcp.py
logstash/handler_tcp.py
import ssl from logging.handlers import SocketHandler from logstash import formatter # Derive from object to force a new-style class and thus allow super() to work # on Python 2.6 class TCPLogstashHandler(SocketHandler, object): """Python logging handler for Logstash. Sends events over TCP. :param host: The h...
from logging.handlers import DatagramHandler, SocketHandler from logstash import formatter # Derive from object to force a new-style class and thus allow super() to work # on Python 2.6 class TCPLogstashHandler(SocketHandler, object): """Python logging handler for Logstash. Sends events over TCP. :param host:...
mit
Python
57a07d58b8a5b52bc4cda5dafc491bee249c7fd1
Fix auth issue
adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub
src/settings.py
src/settings.py
#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """Main views of the Friday Film Club app.""" __author__ = 'adamjmcgrath@gmail.com (Adam McGrath)' import os DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') FMJ_EMAIL_SHORT = 'fmj@fridayfilmclub.com' FMJ_EMAIL = 'Film Master...
#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """Main views of the Friday Film Club app.""" __author__ = 'adamjmcgrath@gmail.com (Adam McGrath)' import os DEBUG = os.environ.get('SERVER_SOFTWARE', '').startswith('Dev') FMJ_EMAIL_SHORT = 'fmj@fridayfilmclub.com' FMJ_EMAIL = 'Film Master...
mpl-2.0
Python
2baabd0f0d18e9bd81797a384e34adca0c39d7ed
Revert string -> integer change for statsd port
bu-ist/bux-grader-framework,abduld/bux-grader-framework
bux_grader_framework/__init__.py
bux_grader_framework/__init__.py
""" bux_grader_framework ~~~~~~~~~~~~~~~~~~~~ A framework for bootstraping of external graders for your edX course. :copyright: 2014 Boston University :license: GNU Affero General Public License """ __version__ = '0.4.3' DEFAULT_LOGGING = { 'version': 1, 'disable_existing_loggers': False...
""" bux_grader_framework ~~~~~~~~~~~~~~~~~~~~ A framework for bootstraping of external graders for your edX course. :copyright: 2014 Boston University :license: GNU Affero General Public License """ __version__ = '0.4.3' DEFAULT_LOGGING = { 'version': 1, 'disable_existing_loggers': False...
agpl-3.0
Python
e176fa8fd8a0375d0b87b156b019fa887ebfd880
Met à jour Solr.
dezede/dezede,dezede/dezede,dezede/dezede,dezede/dezede
dezede/management/commands/install_solr.py
dezede/management/commands/install_solr.py
# coding: utf-8 from __future__ import unicode_literals from django.core.management.base import BaseCommand import os import tarfile class Command(BaseCommand): help = 'Télécharge et installe Apache Solr' def handle(self, *args, **options): version = '3.6.2' filename = 'apache-solr-%s.tgz' %...
# coding: utf-8 from __future__ import unicode_literals from django.core.management.base import BaseCommand import os import tarfile class Command(BaseCommand): help = 'Télécharge et installe Apache Solr' def handle(self, *args, **options): version = '3.6.1' filename = 'apache-solr-%s.tgz' %...
bsd-3-clause
Python
ab398f8216bd78a764db2f14d78d0ad7d67764eb
Update drivers.py
ariegg/webiopi-drivers,ariegg/webiopi-drivers
chips/digital/pca9698/drivers.py
chips/digital/pca9698/drivers.py
# This code has to be added to the corresponding __init__.py DRIVERS["pca9698" ] = ["PCA9698"]
DRIVERS["pca9698" ] = ["PCA9698"]
apache-2.0
Python
1d7af00687040222ea5138f9a97f3507fea307a9
Remove __all__ from __init__
erkghlerngm44/malaffinity
malaffinity/__init__.py
malaffinity/__init__.py
""" Calculate affinity between two MyAnimeList users """ from .malaffinity import MALAffinity # Meta stuff from .__about__ import ( __author__, __copyright__, __email__, __license__, __summary__, __title__, __uri__, __version__ ) def calculate_affinity(user1, user2, round=False): """ Quick one-off...
""" Calculate affinity between two MyAnimeList users """ from .malaffinity import MALAffinity # Meta stuff from .__about__ import ( __author__, __copyright__, __email__, __license__, __summary__, __title__, __uri__, __version__ ) __all__ = ["MALAffinity", "calculate_affinity", "NoAffinityError", ...
mit
Python
b0236a2cb936df9571139f074b35c178e2573593
Remove extraneous setting of masked fill value.
RyanGutenkunst/dadi,niuhuifei/dadi,cheese1213/dadi,yangjl/dadi,yangjl/dadi,ChenHsiang/dadi,paulirish/dadi,beni55/dadi,ChenHsiang/dadi,beni55/dadi,RyanGutenkunst/dadi,paulirish/dadi,cheese1213/dadi,niuhuifei/dadi
dadi/__init__.py
dadi/__init__.py
import Integration import PhiManip import Numerics import SFS import ms try: import Plotting except ImportError: pass try: import os __DIRECTORY__ = os.path.dirname(Integration.__file__) __svn_file__ = os.path.join(__DIRECTORY__, 'svnversion') __SVNVERSION__ = file(__svn_file__).read().strip() ...
import numpy # This gives a nicer printout for masked arrays. numpy.ma.default_real_fill_value = numpy.nan import Integration import PhiManip import Numerics import SFS import ms try: import Plotting except ImportError: pass try: import os __DIRECTORY__ = os.path.dirname(Integration.__file__) __sv...
bsd-3-clause
Python
02a56750e6ba12cebae2ac8f6d5641b980ac92f0
Fix simple typo: produciton -> production (#86)
marrow/mailer
marrow/mailer/logger.py
marrow/mailer/logger.py
# encoding: utf-8 import logging from marrow.mailer import Mailer class MailHandler(logging.Handler): """A class which sends records out via e-mail. This handler should be configured using the same configuration directives that Marrow Mailer itself understands. Be careful how many notific...
# encoding: utf-8 import logging from marrow.mailer import Mailer class MailHandler(logging.Handler): """A class which sends records out via e-mail. This handler should be configured using the same configuration directives that Marrow Mailer itself understands. Be careful how many notific...
mit
Python
4e29d900bbe0fb06b16a7c4c44b81b8633f81274
Bump version
xLegoz/marshmallow,mwstobo/marshmallow,marshmallow-code/marshmallow
marshmallow/__init__.py
marshmallow/__init__.py
# -*- coding: utf-8 -*- from __future__ import absolute_import from marshmallow.schema import ( Schema, SchemaOpts, MarshalResult, UnmarshalResult, ) from marshmallow.decorators import ( pre_dump, post_dump, pre_load, post_load, validates, validates_schema ) from marshmallow.utils import pprint, mi...
# -*- coding: utf-8 -*- from __future__ import absolute_import from marshmallow.schema import ( Schema, SchemaOpts, MarshalResult, UnmarshalResult, ) from marshmallow.decorators import ( pre_dump, post_dump, pre_load, post_load, validates, validates_schema ) from marshmallow.utils import pprint, mi...
mit
Python
52a08a912deca677cf3a673acd0ca7fc1f63c280
Bump release version to 0.3.3.
yunojuno/django-inbound-email
django_inbound_email/__init__.py
django_inbound_email/__init__.py
"""An inbound email handler for Django.""" __title__ = 'django-inbound-email' __version__ = '0.3.3' __author__ = 'YunoJuno Ltd' __license__ = 'MIT' __copyright__ = 'Copyright 2014 YunoJuno' __description__ = ( "A Django app to make it easy to receive inbound emails from " "a hosted transactional email service ...
"""An inbound email handler for Django.""" __title__ = 'django-inbound-email' __version__ = '0.3.2' __author__ = 'YunoJuno Ltd' __license__ = 'MIT' __copyright__ = 'Copyright 2014 YunoJuno' __description__ = ( "A Django app to make it easy to receive inbound emails from " "a hosted transactional email service ...
mit
Python
b7d71629cdaff34cae717c216b47222e650d7efb
convert from re_path to path
thread/django-lightweight-queue,thread/django-lightweight-queue
django_lightweight_queue/urls.py
django_lightweight_queue/urls.py
from django.urls import path from . import views app_name = 'django_lightweight_queue' urlpatterns = ( path(r'debug/django-lightweight-queue/debug-run', views.debug_run, name='debug-run'), )
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'), )
bsd-3-clause
Python
92b1d88eaf606b323cf9ee2da571d7f79ebda7d0
Increase version
dreipol/djangocms-spa-vue-js
djangocms_spa_vue_js/__init__.py
djangocms_spa_vue_js/__init__.py
__version__ = '0.1.2'
__version__ = '0.1.1'
mit
Python
8ab96584d244cedef8596713f6cc9ea742ffd252
Use Majority in ripple carry adder
pombredanne/pyeda,GtTmy/pyeda,karissa/pyeda,cjdrake/pyeda,pombredanne/pyeda,GtTmy/pyeda,pombredanne/pyeda,sschnug/pyeda,cjdrake/pyeda,karissa/pyeda,karissa/pyeda,sschnug/pyeda,sschnug/pyeda,GtTmy/pyeda,cjdrake/pyeda
pyeda/logic/addition.py
pyeda/logic/addition.py
""" Logic functions for addition Interface Functions: ripple_carry_add kogge_stone_add """ # Disable "invalid variable name" # pylint: disable=C0103 from pyeda.boolalg.expr import Xor, Majority from pyeda.boolalg.vexpr import BitVector from pyeda.util import clog2 def ripple_carry_add(A, B, cin=0): """R...
""" Logic functions for addition Interface Functions: ripple_carry_add kogge_stone_add """ # Disable "invalid variable name" # pylint: disable=C0103 from pyeda.boolalg.expr import Xor from pyeda.boolalg.vexpr import BitVector from pyeda.util import clog2 def ripple_carry_add(A, B, cin=0): """Return symb...
bsd-2-clause
Python
8f2ef581d62e7076ea6ddfe4313ab57f3b01784e
Initialize struct flock for AIX with O_LARGEFILE used by Python.
svn2github/gyp,pyokagan/gyp,pyokagan/gyp,svn2github/kgyp,pyokagan/gyp,svn2github/gyp,svn2github/kgyp,svn2github/kgyp,svn2github/kgyp,svn2github/kgyp,svn2github/gyp,pyokagan/gyp,svn2github/gyp,pyokagan/gyp,svn2github/gyp
pylib/gyp/flock_tool.py
pylib/gyp/flock_tool.py
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
#!/usr/bin/env python # Copyright (c) 2011 Google Inc. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. """These functions are executed via gyp-flock-tool when using the Makefile generator. Used on systems that don't have a built-in flock.""" ...
bsd-3-clause
Python
9b039a0e9ae7df3a70d11480ac808a1f893465b5
add docstrings to padder
unibg-seclab/aesmix,unibg-seclab/aesmix
python/aesmix/padder.py
python/aesmix/padder.py
from __future__ import print_function, division from Crypto.Util import number as _number import math as _math class Padder(object): """Padding class for Mix&Slice. Padder extends the ANSI.X923 padding and permits any blocksize. """ @staticmethod def get_padinfosize(max_paddable_bits): ...
from __future__ import print_function, division from Crypto.Util import number as _number import math as _math class Padder(object): @staticmethod def get_padinfosize(max_paddable_bits): padinfosize = 1 while _math.log(max_paddable_bits, 256) >= padinfosize: max_paddable_bits +=...
mit
Python
8bd9e8b93efcf40ba1692d26f0890ab5c242f2ee
Update for API change
intact/livestreamer,programming086/livestreamer,wolftankk/livestreamer,Klaudit/livestreamer,hmit/livestreamer,blxd/livestreamer,Masaz-/livestreamer,wolftankk/livestreamer,blxd/livestreamer,programming086/livestreamer,Masaz-/livestreamer,caorong/livestreamer,caorong/livestreamer,derrod/livestreamer,derrod/livestreamer,S...
src/livestreamer/plugins/streamupcom.py
src/livestreamer/plugins/streamupcom.py
import re from livestreamer.compat import urljoin from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import RTMPStream RTMP_URL = "rtmp://{0}/app/{1}" CHANNEL_DETAILS_URI = "https://api.streamup.com/1.0/channels/{0}?access_token={1}" REDIRECT_SERVICE_URI...
import re from livestreamer.compat import urljoin from livestreamer.plugin import Plugin from livestreamer.plugin.api import http, validate from livestreamer.stream import RTMPStream RTMP_URL = "rtmp://{0}/app/{1}" STATUS_REQUEST_URI = "https://lancer.streamup.com/api/channels/{0}" BALANCING_REQUEST_URI = "https://st...
bsd-2-clause
Python
bf14a34ef712e9294703e777fa9cc3d9c3fa15cb
Update util.py
mahesh-9/ML,konemshad/ML
ml/activation/util.py
ml/activation/util.py
import numpy as np def sigmoid(X,prime=None): """an activation function which outputs the value between (0,1)""" if isinstance(X,np.ndarray): if prime: return sigmoid(X)*(np.ones(len(X))-sigmoid(X)) else: return 1.0/(1.0+np.exp(-X)) else: X=np.array(X) return sigmoid(X) #return 1.0/(1.0+np.exp(-X)) ...
import numpy as np def sigmoid(X): """an activation function which outputs the value between (0,1)""" if isinstance(X,np.ndarray): return 1.0/(1.0+np.exp(-X)) else: X=np.array(X) return sigmoid(X) #return 1.0/(1.0+np.exp(-X)) def tanh(X): """an activation function which outputs the value between (-1,1)""" ...
mit
Python
7bbb8a3ea86da5312f3dcbb089da0e0b757732de
Update config.py
bmeyang/mlat-server,bmeyang/mlat-server
mlat/server/config.py
mlat/server/config.py
# -*- mode: python; indent-tabs-mode: nil -*- # Part of mlat-server: a Mode S multilateration server # Copyright (C) 2015 Oliver Jowett <oliver@mutability.co.uk> # 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 ...
# -*- mode: python; indent-tabs-mode: nil -*- # Part of mlat-server: a Mode S multilateration server # Copyright (C) 2015 Oliver Jowett <oliver@mutability.co.uk> # 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 ...
agpl-3.0
Python
f10a8c498df0f83b43e636dfcb0b50d60860ed5e
Update Python agent version to include fixes for broken pipe issues.
GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python,GoogleCloudPlatform/cloud-profiler-python
googlecloudprofiler/__version__.py
googlecloudprofiler/__version__.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, 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 # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, s...
apache-2.0
Python
7b72e97b1ed34cdcbc88f3a9eb1e6f33f6a1f1da
adjust max number of batches
sbailey/knltest
code/loopsine_mp.py
code/loopsine_mp.py
#- Test loopsine functions with multiprocessing parallelism from __future__ import division, print_function import multiprocessing as mp import numpy as np from loopsine import loopsine_purepy, loopsine_numpy, loopsine_numba from knltest import timeit #- Wake up functions in case there is loading overhead loopsine_p...
#- Test loopsine functions with multiprocessing parallelism from __future__ import division, print_function import multiprocessing as mp from loopsine import loopsine_purepy, loopsine_numpy, loopsine_numba from knltest import timeit #- Wake up functions in case there is loading overhead loopsine_purepy(2) loopsine_n...
bsd-3-clause
Python
4f8c2afd3f9843e675848a8104b9ec3700eec33f
Update __init__.py
mfem/PyMFEM,mfem/PyMFEM,mfem/PyMFEM
mfem/__init__.py
mfem/__init__.py
import os path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) mfem_mode = None pymfem_debug = -1 def debug_print(message): if pymfem_debug < 0: # debug < 0 return elif pymfem_debug == 0: # debug = 0 pass elif pymfem_debug > 0: # debug = 1 pass elif pymfem...
import os path = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) mfem_mode = None pymfem_debug = -1 def debug_print(message): if pymfem_debug < 0: # debug < 0 return elif pymfem_debug == 0: # debug = 0 pass elif pymfem_debug > 0: # debug = 1 pass elif pymfem...
bsd-3-clause
Python
7242fea34a798a1612238b6cf7c7b029df952aad
Revert "removing default queryset cache --experimental"
antsmc2/mics,unicefuganda/uSurvey,unicefuganda/uSurvey,unicefuganda/uSurvey,unicefuganda/mics,antsmc2/mics,unicefuganda/mics,antsmc2/mics,unicefuganda/uSurvey,unicefuganda/mics,unicefuganda/uSurvey
mics/__init__.py
mics/__init__.py
from johnny.cache import enable enable()
bsd-3-clause
Python
90ca88b8aacea32b5698ee4449a47ddea663cbad
add copyright, cleanups
fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary,fedora-conary/conary
display.py
display.py
# # Copyright (c) 2004 Specifix, Inc. # All rights reserved # import package import versions _pkgFormat = "%-39s %s" _fileFormat = " %-35s %s" def displayPkgs(repos, cfg, pkg = "", versionStr = None): if pkg and pkg[0] != "/": pkg = cfg.packagenamespace + "/" + pkg for pkgName in repos.getPackageList(pk...
import package import versions def displayPkgs(repos, cfg, pkg = "", versionStr = None): if pkg and pkg[0] != "/": pkg = cfg.packagenamespace + "/" + pkg for pkgName in repos.getPackageList(pkg): pkgSet = repos.getPackageSet(pkgName) if not versionStr: l = pkgSet.versionList() versions.versionSor...
apache-2.0
Python
8763f5aff4cea81d45f7b166998a3c52b3f82101
Bump 0.5.1
alorence/django-modern-rpc,alorence/django-modern-rpc
modernrpc/__init__.py
modernrpc/__init__.py
# coding: utf-8 default_app_config = 'modernrpc.apps.ModernRpcConfig' __version__ = '0.5.1'
# coding: utf-8 default_app_config = 'modernrpc.apps.ModernRpcConfig' __version__ = '0.5.0'
mit
Python
c8cc10501afec10d1df06e8fd3ce459a3ef717ce
Test updated
carragom/modoboa,RavenB/modoboa,bearstech/modoboa,RavenB/modoboa,carragom/modoboa,modoboa/modoboa,RavenB/modoboa,tonioo/modoboa,mehulsbhatt/modoboa,tonioo/modoboa,bearstech/modoboa,modoboa/modoboa,mehulsbhatt/modoboa,tonioo/modoboa,modoboa/modoboa,modoboa/modoboa,mehulsbhatt/modoboa,bearstech/modoboa,carragom/modoboa,b...
modoboa/core/tests.py
modoboa/core/tests.py
"""Tests for core application.""" from django.core.urlresolvers import reverse from modoboa.lib.tests import ModoTestCase from . import factories class ProfileTestCase(ModoTestCase): def setUp(self): super(ProfileTestCase, self).setUp() self.account = factories.UserFactory( username...
"""Tests for core application.""" from django.core.urlresolvers import reverse from modoboa.lib.tests import ModoTestCase from . import factories class ProfileTestCase(ModoTestCase): def setUp(self): super(ProfileTestCase, self).setUp() self.account = factories.UserFactory( username...
isc
Python
829aa30a052b1a35d2c0d0797abe6b0c34c2f9d2
Add script to create the recruiting class.
isuraed/bluechip
bluechip/player/createplayers.py
bluechip/player/createplayers.py
import random from player.models import Player #TODO: Need to centralize this function call. random.seed(123456789) # For now just create a new class each Player.objects.all().delete() for _ in xrange(3000): p = Player.objects.create_player() p.save
import random from models import Player def create_players(): #TODO: Need to centralize this function call. random.seed(123456789) # TODO: Do we need to delete all? Player.objects.all().delete() for _ in xrange(3000): p = Player.objects.create_player() p.save
mit
Python
a619404478d964ebcf94bc6d473f78b255ce81fe
fix bug application context
PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature,PnEcrins/GeoNature
backend/server.py
backend/server.py
#coding: utf8 ''' Démarrage de l'application ''' from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS db = SQLAlchemy() app_globals = {} def get_app(): print(get_app) if app_globals.get('app', False): return app_globals['app'] app = Flask(__name__) a...
#coding: utf8 ''' Démarrage de l'application ''' from flask import Flask from flask_sqlalchemy import SQLAlchemy from flask_cors import CORS db = SQLAlchemy() app_globals = {} def get_app(): print(get_app) if app_globals.get('app', False): return app_globals['app'] app = Flask(__name__) a...
bsd-2-clause
Python
7032f8ccdefb62c75dac8b325f66817f69922922
Update images.py
baylee-d/cos.io,baylee-d/cos.io,baylee-d/cos.io,baylee-d/cos.io
common/blocks/images.py
common/blocks/images.py
from wagtail.wagtailcore.blocks import CharBlock from wagtail.wagtailcore.blocks import ChoiceBlock from wagtail.wagtailcore.blocks import StructBlock from wagtail.wagtailimages.blocks import ImageChooserBlock IMAGE_STYLE_CHOICES = [ ('max-width:225px;max-height:145px', 'Small'), ('max-width:225px;max-height:1...
from wagtail.wagtailcore.blocks import CharBlock from wagtail.wagtailcore.blocks import ChoiceBlock from wagtail.wagtailcore.blocks import StructBlock from wagtail.wagtailimages.blocks import ImageChooserBlock IMAGE_STYLE_CHOICES = [ ('max-width:225px;max-height:145px', 'Small'), ('max_width:250px;max-height:2...
apache-2.0
Python
ac84255aae191c3f674c9d1223dec417e7a91b12
include thread id in cache key - fixes problems with caching SQLAlchemy objects across thread boundaries.
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
portal/models/lazy.py
portal/models/lazy.py
import thread from sqlalchemy.orm.util import class_mapper from ..extensions import db def _is_sql_wrapper(instance): """Determines if instance is a SQLAlchemy wrapper (ORM instance)""" try: class_mapper(instance.__class__) return True except: return False def lazyprop(fn): "...
from sqlalchemy.orm.util import class_mapper from ..extensions import db def _is_sql_wrapper(instance): """Determines if instance is a SQLAlchemy wrapper (ORM instance)""" try: class_mapper(instance.__class__) return True except: return False def lazyprop(fn): """Property dec...
bsd-3-clause
Python
881b25dfec32b487073c5dfc9fd0a989722f534c
Remove unused import
click-contrib/click-log
click_log/core.py
click_log/core.py
# -*- coding: utf-8 -*- import logging import sys import click _ctx = click.get_current_context LOGGER_KEY = __name__ + '.logger' DEFAULT_LEVEL = logging.INFO PY2 = sys.version_info[0] == 2 if PY2: text_type = unicode # noqa else: text_type = str def _meta(): return _ctx().meta.setdefault(LOGGER_KE...
# -*- coding: utf-8 -*- import sys import collections import functools import logging import click _ctx = click.get_current_context LOGGER_KEY = __name__ + '.logger' DEFAULT_LEVEL = logging.INFO PY2 = sys.version_info[0] == 2 if PY2: text_type = unicode # noqa else: text_type = str def _meta(): re...
mit
Python
3f77cc9a13dad1e1fda76054f55695fbce5986f4
Update Sala.py
AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb,AEDA-Solutions/matweb
backend/Models/Sala/Sala.py
backend/Models/Sala/Sala.py
class Sala(object): def __init__(self,sala): self.id = sala.getId() self.codigo = sala.getCodigo()
class Predio(object): def __init__(self,predio): self.id = predio.getId() self.codigo = predio.getCodigo()
mit
Python
c02dacd10024c446470b45895d44a581516af3fd
Update models file with 2015 data
rtfoley/scorepy,rtfoley/scorepy,rtfoley/scorepy
app/scoring/models.py
app/scoring/models.py
from app import db # Robot score behavior and calculation class RobotScore(db.Model): __tablename__ = 'robot_scores' id = db.Column(db.Integer, primary_key=True) team_id = db.Column(db.Integer, db.ForeignKey('teams.id')) round_number = db.Column(db.Integer) # 2014 prototype data, remove once all...
from app import db # Robot score behavior and calculation class RobotScore(db.Model): __tablename__ = 'robot_scores' id = db.Column(db.Integer, primary_key=True) team_id = db.Column(db.Integer, db.ForeignKey('teams.id')) round_number = db.Column(db.Integer) tree_branch_is_closer = db.Column(db.Bo...
mit
Python
2554c8dbd2e47dee5551be37ae10248474fe1110
fix multiple instances of the same unit in one message
suclearnub/scubot
modules/units.py
modules/units.py
from collections import namedtuple import re import discord Unit = namedtuple("Unit", "name prefix conversionValue") Units = [Unit("feet", "ft", 0.3048), Unit("meters", "m", 3.28084), Unit("pounds", "lbs", 0.453592), Unit("kilograms", "kg", 2.20462), Unit("fathoms", "fsw", 1.8288)]...
from collections import namedtuple import re import discord Unit = namedtuple("Unit", "name prefix conversionValue") Units = [Unit("feet", "ft", 0.3048), Unit("meters", "m", 3.28084), Unit("pounds", "lbs", 0.453592), Unit("kilograms", "kg", 2.20462), Unit("fathoms", "fsw", 1.8288)]...
mit
Python
468ce899542197f8ab7ae51800b56132e6e81bd4
Add timeit to measure each python implementation of problem 2
mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler,mdsrosa/project_euler
problem_2/solution.py
problem_2/solution.py
from timeit import timeit def sum_even_fibonacci_numbers_1(): f1, f2, s, = 0, 1, 0, while f2 < 4000000: f2, f1 = f1, f1 + f2 if f2 % 2 == 0: s += f2 return s def sum_even_fibonacci_numbers_2(): s, a, b = 0, 1, 1 c = a + b while c < 4000000: s += c a = ...
def sum_even_fibonacci_numbers_1(): f1, f2, s, = 0, 1, 0, while f2 < 4000000: f2, f1 = f1, f1 + f2 if f2 % 2 == 0: s += f2 return s def sum_even_fibonacci_numbers_2(): s, a, b = 0, 1, 1 c = a + b while c < 4000000: s += c a = b + c b = a + c ...
mit
Python
4eec6e978c18b60fc6ea71cfd4763a9c580aec23
Fix import
appul/applebot
applebot/botmodule.py
applebot/botmodule.py
import logging import discord from applebot.utils import caller_attr log = logging.getLogger(__name__) class BotModule(object): def __init__(self, client=None): self.__name__ = None self.client = client or caller_attr('client') or discord.Client() self.__register_handlers() def __r...
import logging import discord from utils import caller_attr log = logging.getLogger(__name__) class BotModule(object): def __init__(self, client=None): self.__name__ = None self.client = client or caller_attr('client') or discord.Client() self.__register_handlers() def __register_h...
mit
Python
864c43c725bcccfeeaf4896c23e285b1b744d175
Clean up flake.
rduplain/jeni-python,groner/jeni-python
test_jeni_python2.py
test_jeni_python2.py
import unittest import jeni class Python2AnnotationTestCase(unittest.TestCase): def test_annotate_without_annotations(self): def fn(hello): "unused" self.assertRaises(AttributeError, jeni.annotate, fn) if __name__ == '__main__': unittest.main()
import unittest import jeni from test_jeni import BasicInjector class Python2AnnotationTestCase(unittest.TestCase): def test_annotate_without_annotations(self): def fn(hello): "unused" self.assertRaises(AttributeError, jeni.annotate, fn) if __name__ == '__main__': unittest.main()
bsd-2-clause
Python
9f6cedbb2083ea71d4c7dad769cbca9fcbcbe5dc
Add can_change to project resource
nvbn/coviolations_web,nvbn/coviolations_web
projects/resources.py
projects/resources.py
from tastypie.resources import ModelResource from tastypie import fields from tastypie.authentication import Authentication from tastypie.authorization import Authorization from push.base import sender from .models import Project class ProjectsAuthorization(Authorization): """Projects authorization""" def cr...
from tastypie.resources import ModelResource from tastypie import fields from tastypie.authentication import Authentication from tastypie.authorization import Authorization from push.base import sender from .models import Project class ProjectsAuthorization(Authorization): """Projects authorization""" def cr...
mit
Python