commit
stringlengths
40
40
old_file
stringlengths
4
118
new_file
stringlengths
4
118
old_contents
stringlengths
0
2.94k
new_contents
stringlengths
1
4.43k
subject
stringlengths
15
444
message
stringlengths
16
3.45k
lang
stringclasses
1 value
license
stringclasses
13 values
repos
stringlengths
5
43.2k
prompt
stringlengths
17
4.58k
response
stringlengths
1
4.43k
prompt_tagged
stringlengths
58
4.62k
response_tagged
stringlengths
1
4.43k
text
stringlengths
132
7.29k
text_tagged
stringlengths
173
7.33k
86971c0aef3a470adf73f13b95aad67590725b3a
LC-Parser/problem.py
LC-Parser/problem.py
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
Add support for multiple trees imput
Add support for multiple trees imput
Python
bsd-3-clause
fabriziodemaria/LeetCode-Tree-Parser
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
<commit_before>from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1...
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1,2,3...]> Note...
<commit_before>from lcparser import * import pdb """ Usage: 1) Paste the code under Solution(object) line 2) Paste the method called by LeetCode in the corresponding line you find the "main" method 3) Insert "pdb.set_trace()" wherever in your code to enable debugging 4) From the shell: <python problem.py --tree [1...
cef4c09d59bb5666565cf6d7e7453fc6eb87316d
circuits/app/dropprivileges.py
circuits/app/dropprivileges.py
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", **kwargs): self.user = user ...
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", umask=0o077, **kwargs): self.use...
Allow to set umask in DropPrivileges
Allow to set umask in DropPrivileges
Python
mit
eriol/circuits,nizox/circuits,eriol/circuits,eriol/circuits
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", **kwargs): self.user = user ...
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", umask=0o077, **kwargs): self.use...
<commit_before>from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", **kwargs): self.u...
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", umask=0o077, **kwargs): self.use...
from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", **kwargs): self.user = user ...
<commit_before>from pwd import getpwnam from grp import getgrnam from traceback import format_exc from os import getuid, setgroups, setgid, setuid, umask from circuits.core import handler, BaseComponent class DropPrivileges(BaseComponent): def init(self, user="nobody", group="nobody", **kwargs): self.u...
897dd874a34ddfc164ea7dbd4bfd5eaffd02aabd
tests/QtUiTools/bug_376.py
tests/QtUiTools/bug_376.py
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
Replace type() comparison with isinstance.
Replace type() comparison with isinstance. type() comparison won't work due to weakproxy. Reviewer: Luciano Wolf <[email protected]> Reviewer: Hugo Lima <[email protected]> Reviewer: Renato Filho <16af9705e5a16d85aed275f2f9e8171326ec17f6@openbo...
Python
lgpl-2.1
gbaty/pyside2,enthought/pyside,RobinD42/pyside,pankajp/pyside,M4rtinK/pyside-android,PySide/PySide,BadSingleton/pyside2,M4rtinK/pyside-bb10,IronManMark20/pyside2,M4rtinK/pyside-android,BadSingleton/pyside2,pankajp/pyside,PySide/PySide,pankajp/pyside,IronManMark20/pyside2,gbaty/pyside2,enthought/pyside,RobinD42/pyside,B...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
<commit_before>import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file__), 'test.ui')...
<commit_before>import unittest import os from helper import UsesQApplication from PySide import QtCore, QtGui from PySide.QtUiTools import QUiLoader class BugTest(UsesQApplication): def testCase(self): w = QtGui.QWidget() loader = QUiLoader() filePath = os.path.join(os.path.dirname(__file...
adddfdb946ab45a186535ab4dcfc8848cf914dc0
allmychanges/validators.py
allmychanges/validators.py
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:http|ftp|)s?|git...
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp|feed|rss|atom)\+)?' # optional http+ or git+ or hg+ r'(?:ht...
Allow feed, rss, and atom prefixes in URL validator.
Allow feed, rss, and atom prefixes in URL validator.
Python
bsd-2-clause
AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com,AllMyChanges/allmychanges.com
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:http|ftp|)s?|git...
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp|feed|rss|atom)\+)?' # optional http+ or git+ or hg+ r'(?:ht...
<commit_before>import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:h...
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp|feed|rss|atom)\+)?' # optional http+ or git+ or hg+ r'(?:ht...
import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:http|ftp|)s?|git...
<commit_before>import re from django.core import validators class URLValidator(validators.URLValidator): """Custom url validator to include git urls and urls with http+ like prefixes """ regex = re.compile( r'^(?:(?:(?:(?:http|git|hg|rechttp)\+)?' # optional http+ or git+ or hg+ r'(?:h...
11e158cae1e6c5d910f640303abc181550fb2127
members/models.py
members/models.py
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.count()
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.all()
Make attended_meetings return lists of meetings
Make attended_meetings return lists of meetings
Python
mit
Hackfmi/Diaphanum,Hackfmi/Diaphanum
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.count() Make attended_meetings retu...
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.all()
<commit_before>from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.count() <commit_msg>...
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.all()
from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.count() Make attended_meetings retu...
<commit_before>from django.db import models from django.contrib.auth.models import AbstractUser class Member(AbstractUser): faculty_number = models.CharField(max_length=8) def __unicode__(self): return self.username def attended_meetings(self): return self.protocols.count() <commit_msg>...
d13c08315eb24194ff845fbbe8a801dbb1b680cb
chrome/test/nacl_test_injection/buildbot_nacl_integration.py
chrome/test/nacl_test_injection/buildbot_nacl_integration.py
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
Revert 85807 - Enabled nacl_integration tests on the Linux bots.
Revert 85807 - Enabled nacl_integration tests on the Linux bots. BUG= none TEST= none Review URL: http://codereview.chromium.org/7038025 [email protected] Review URL: http://codereview.chromium.org/7042025 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@85846 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,littlstar/chromium.src,rogerwang/chromium,littlstar/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,Pluto-tv/chromium-cr...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
<commit_before>#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why ...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why this is failing...
<commit_before>#!/usr/bin/python # Copyright (c) 2011 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import os import subprocess import sys def Main(): pwd = os.environ.get('PWD', '') # TODO(ncbray): figure out why ...
7e5240967e926c47301318df4833dd9af1fe9c7c
tests/test_address_book.py
tests/test_address_book.py
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
from unittest import TestCase from address_book import AddressBook, Person class AddressBookTestCase(TestCase): def test_add_person(self): address_book = AddressBook() person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova stre...
Update person addition test to create address book inside test func + import needed classes from the package
Update person addition test to create address book inside test func + import needed classes from the package
Python
mit
dizpers/python-address-book-assignment
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
from unittest import TestCase from address_book import AddressBook, Person class AddressBookTestCase(TestCase): def test_add_person(self): address_book = AddressBook() person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova stre...
<commit_before>from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) sel...
from unittest import TestCase from address_book import AddressBook, Person class AddressBookTestCase(TestCase): def test_add_person(self): address_book = AddressBook() person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova stre...
from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) self.address_book....
<commit_before>from unittest import TestCase class AddressBookTestCase(TestCase): def test_add_person(self): person = Person( 'John', 'Doe', ['Russian Federation, Kemerovo region, Kemerovo, Kirova street 23, apt. 42'], ['+79834772053'] ) sel...
03d695a5ed30dcdfb3941a105318a059b9bd9768
sorting/insertion_sort.py
sorting/insertion_sort.py
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a if __name__ == '__main__': d = [34,2,24,12...
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a def insertion_sort2(a): for i in range(0, ...
Add two other implement of insertion sort
Add two other implement of insertion sort
Python
mit
hongta/practice-python,hongta/practice-python
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a if __name__ == '__main__': d = [34,2,24,12...
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a def insertion_sort2(a): for i in range(0, ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a if __name__ == '__main__': ...
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a def insertion_sort2(a): for i in range(0, ...
#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a if __name__ == '__main__': d = [34,2,24,12...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- def insertion_sort(a): for i in range(1, len(a)): current_val = a[i] j = i while j > 0 and a[j-1] > current_val: a[j] = a[j-1] j -= 1 a[j] = current_val return a if __name__ == '__main__': ...
7a651446413b2391284fd13f7df9b9c6ae1b78a7
InvenTree/key.py
InvenTree/key.py
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): return ''.join(random.choices(string.digits + string.ascii_letters + string.punctuation, k=50)) if __name__ == '__main__': # Ensure key file is placed in same directory as this script path = os.pat...
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): options = string.digits + string.ascii_letters + string.punctuation key = ''.join([random.choice(options) for i in range(50)]) return key if __name__ == '__main__': # Ensure key file is plac...
Use random.choice instead of random.choices
Use random.choice instead of random.choices - Allows compatibility with python3.5
Python
mit
SchrodingersGat/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,inventree/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree,inventree/InvenTree,SchrodingersGat/InvenTree
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): return ''.join(random.choices(string.digits + string.ascii_letters + string.punctuation, k=50)) if __name__ == '__main__': # Ensure key file is placed in same directory as this script path = os.pat...
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): options = string.digits + string.ascii_letters + string.punctuation key = ''.join([random.choice(options) for i in range(50)]) return key if __name__ == '__main__': # Ensure key file is plac...
<commit_before># Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): return ''.join(random.choices(string.digits + string.ascii_letters + string.punctuation, k=50)) if __name__ == '__main__': # Ensure key file is placed in same directory as this script ...
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): options = string.digits + string.ascii_letters + string.punctuation key = ''.join([random.choice(options) for i in range(50)]) return key if __name__ == '__main__': # Ensure key file is plac...
# Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): return ''.join(random.choices(string.digits + string.ascii_letters + string.punctuation, k=50)) if __name__ == '__main__': # Ensure key file is placed in same directory as this script path = os.pat...
<commit_before># Generate a SECRET_KEY file import random import string import os fn = 'secret_key.txt' def generate_key(): return ''.join(random.choices(string.digits + string.ascii_letters + string.punctuation, k=50)) if __name__ == '__main__': # Ensure key file is placed in same directory as this script ...
9b9e1872bf3281249a318c69b18e60cd6995ad2d
elmo/elmo/urls.py
elmo/elmo/urls.py
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
Add support for Django debug sidebar.
Add support for Django debug sidebar.
Python
mit
StephenSwat/eve_lunar_mining_organiser,StephenSwat/eve_lunar_mining_organiser
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
<commit_before>"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom...
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based...
<commit_before>"""elmo URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.11/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='hom...
3965aa953fb8a68140531c1f3ab112082b75f343
netconsole.py
netconsole.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread def recv(): global client while True: data, client = server.recvfrom(max_size) sys.stdout.write(data) def send(): while True : server_input = sys.stdin.readline() if server_input ==...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread HOST = '' # Symbolic name meaning all available interfaces PORT = 6666 # Default netconsole client IN Port def recv(): global client while True: data, client = server.recvfrom(max_size) ...
Set Netconsole default listen port to 6666
Set Netconsole default listen port to 6666 according to linux/Documentation/networking/netconsole.txt
Python
mit
danielk1031/netconsole
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread def recv(): global client while True: data, client = server.recvfrom(max_size) sys.stdout.write(data) def send(): while True : server_input = sys.stdin.readline() if server_input ==...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread HOST = '' # Symbolic name meaning all available interfaces PORT = 6666 # Default netconsole client IN Port def recv(): global client while True: data, client = server.recvfrom(max_size) ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread def recv(): global client while True: data, client = server.recvfrom(max_size) sys.stdout.write(data) def send(): while True : server_input = sys.stdin.readline() if ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread HOST = '' # Symbolic name meaning all available interfaces PORT = 6666 # Default netconsole client IN Port def recv(): global client while True: data, client = server.recvfrom(max_size) ...
#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread def recv(): global client while True: data, client = server.recvfrom(max_size) sys.stdout.write(data) def send(): while True : server_input = sys.stdin.readline() if server_input ==...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- import socket, sys from datetime import datetime from threading import Thread def recv(): global client while True: data, client = server.recvfrom(max_size) sys.stdout.write(data) def send(): while True : server_input = sys.stdin.readline() if ...
481c57e552b5d52051a6ce34a836f2db1c41d13f
InstagramAPI/src/http/Response/ReelsTrayFeedResponse.py
InstagramAPI/src/http/Response/ReelsTrayFeedResponse.py
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
Make sure that tray items is a list This fixes an exception when tray['items'] is None. The same conditional check is added for response['tray'].
Make sure that tray items is a list This fixes an exception when tray['items'] is None. The same conditional check is added for response['tray'].
Python
mit
danleyb2/Instagram-API
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
<commit_before>from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: ...
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: tra...
<commit_before>from InstagramAPI.src.http.Response.Objects.Item import Item from InstagramAPI.src.http.Response.Objects.Tray import Tray from .Response import Response class ReelsTrayFeedResponse(Response): def __init__(self, response): self.trays = None if self.STATUS_OK == response['status']: ...
6e1befa9021494f5a63ccf2943570765d5b4c6e6
SessionManager.py
SessionManager.py
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
Make "is_saveable" a staticmethod of SaveSession
Make "is_saveable" a staticmethod of SaveSession
Python
mit
Zeeker/sublime-SessionManager
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
<commit_before>import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_mes...
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_message(messages.e...
<commit_before>import sublime import sublime_plugin from datetime import datetime from .modules import messages from .modules import serialize from .modules import settings from .modules.session import Session def plugin_loaded(): settings.load() def error_message(errno): sublime.error_mes...
6659fdebbc383d22c3abd303c41dbb0f326c12b1
distarray/tests/test_utils.py
distarray/tests/test_utils.py
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
Replace assertEquals with assertEquals for Py3.
Replace assertEquals with assertEquals for Py3.
Python
bsd-3-clause
RaoUmer/distarray,enthought/distarray,enthought/distarray,RaoUmer/distarray
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
<commit_before>import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2,...
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2, 3]: ...
<commit_before>import unittest from distarray import utils class TestMultPartitions(unittest.TestCase): """ Test the multiplicative parition code. """ def test_both_methods(self): """ Do the two methods of computing the multiplicative partitions agree? """ for s in [2,...
e90c10093a9948e87008c2cd9411f3abfda00a20
priorityq.py
priorityq.py
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority): super(QNode, self).__init__() ...
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority=None): super(QNode, self).__init__()...
Set default priority level to None
Set default priority level to None
Python
mit
jonathanstallings/data-structures,jay-tyler/data-structures
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority): super(QNode, self).__init__() ...
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority=None): super(QNode, self).__init__()...
<commit_before>from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority): super(QNode, self)....
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority=None): super(QNode, self).__init__()...
from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority): super(QNode, self).__init__() ...
<commit_before>from __future__ import unicode_literals from functools import total_ordering from binary_heap import BinaryHeap @total_ordering # Will build out the remaining comparison methods class QNode(object): """A class for a queue node.""" def __init__(self, val, priority): super(QNode, self)....
6b4b51a7f8e89e023c933f99aaa3a8329c05e750
salt/runners/ssh.py
salt/runners/ssh.py
# utf-8 ''' A Runner module interface on top of the salt-ssh Python API This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' import salt.client.ssh.client def cmd( tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None): ''' E...
# -*- coding: utf-8 -*- ''' A Runner module interface on top of the salt-ssh Python API. This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' # Import Python Libs from __future__ import absolute_import # Import Salt Libs import salt.client.ssh.client def cmd( tgt, fun,...
Fix pylint errors that snuck into 2015.2
Fix pylint errors that snuck into 2015.2
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
# utf-8 ''' A Runner module interface on top of the salt-ssh Python API This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' import salt.client.ssh.client def cmd( tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None): ''' E...
# -*- coding: utf-8 -*- ''' A Runner module interface on top of the salt-ssh Python API. This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' # Import Python Libs from __future__ import absolute_import # Import Salt Libs import salt.client.ssh.client def cmd( tgt, fun,...
<commit_before># utf-8 ''' A Runner module interface on top of the salt-ssh Python API This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' import salt.client.ssh.client def cmd( tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None)...
# -*- coding: utf-8 -*- ''' A Runner module interface on top of the salt-ssh Python API. This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' # Import Python Libs from __future__ import absolute_import # Import Salt Libs import salt.client.ssh.client def cmd( tgt, fun,...
# utf-8 ''' A Runner module interface on top of the salt-ssh Python API This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' import salt.client.ssh.client def cmd( tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None): ''' E...
<commit_before># utf-8 ''' A Runner module interface on top of the salt-ssh Python API This allows for programmatic use from salt-api, the Reactor, Orchestrate, etc. ''' import salt.client.ssh.client def cmd( tgt, fun, arg=(), timeout=None, expr_form='glob', kwarg=None)...
82ff9fc32b472acf357166ea823f9e082288e818
scapy/asn1packet.py
scapy/asn1packet.py
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
Add cache support for ASN1_Packet()
Add cache support for ASN1_Packet() --HG-- branch : fix-padding-after-pull-request-18
Python
apache-2.0
mytliulei/Scapy,mytliulei/Scapy
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
<commit_before>## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(Packet): AS...
<commit_before>## This file is part of Scapy ## See http://www.secdev.org/projects/scapy for more informations ## Copyright (C) Philippe Biondi <[email protected]> ## This program is published under a GPLv2 license """ Packet holding data in Abstract Syntax Notation (ASN.1). """ from packet import * class ASN1_Packet(...
38be74ac4370ff0f1c30864b037eed3af8cc643f
packagename/__init__.py
packagename/__init__.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
Add missing import in incantation
Add missing import in incantation
Python
bsd-3-clause
alexrudy/Zeeko,alexrudy/Zeeko
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # -----------------------------------...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
# Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # --------------------------------------------------...
<commit_before># Licensed under a 3-clause BSD style license - see LICENSE.rst # Packages may add whatever they like to this file, but # should keep this content at the top. # ---------------------------------------------------------------------------- from ._astropy_init import * # -----------------------------------...
8f5fdcb2d66d013a5f5e888344704d0a1fbfd881
flask_limiter/errors.py
flask_limiter/errors.py
""" errors and exceptions """ from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources if pkg_resources.get_distribution("werkzeug").version < "0.9": # sorry, for touching your internals :). import werkzeug._internal # pragma: no cover werkzeug._interna...
""" errors and exceptions """ from distutils.version import LooseVersion from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources werkzeug_version = pkg_resources.get_distribution("werkzeug").version if LooseVersion(werkzeug_version) < LooseVersion("0.9"): # sorry,...
Fix version comparison of Werkzeug.
Fix version comparison of Werkzeug.
Python
mit
alisaifee/flask-limiter,alisaifee/flask-limiter,joshfriend/flask-limiter,joshfriend/flask-limiter
""" errors and exceptions """ from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources if pkg_resources.get_distribution("werkzeug").version < "0.9": # sorry, for touching your internals :). import werkzeug._internal # pragma: no cover werkzeug._interna...
""" errors and exceptions """ from distutils.version import LooseVersion from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources werkzeug_version = pkg_resources.get_distribution("werkzeug").version if LooseVersion(werkzeug_version) < LooseVersion("0.9"): # sorry,...
<commit_before>""" errors and exceptions """ from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources if pkg_resources.get_distribution("werkzeug").version < "0.9": # sorry, for touching your internals :). import werkzeug._internal # pragma: no cover we...
""" errors and exceptions """ from distutils.version import LooseVersion from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources werkzeug_version = pkg_resources.get_distribution("werkzeug").version if LooseVersion(werkzeug_version) < LooseVersion("0.9"): # sorry,...
""" errors and exceptions """ from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources if pkg_resources.get_distribution("werkzeug").version < "0.9": # sorry, for touching your internals :). import werkzeug._internal # pragma: no cover werkzeug._interna...
<commit_before>""" errors and exceptions """ from werkzeug.exceptions import HTTPException def _patch_werkzeug(): import pkg_resources if pkg_resources.get_distribution("werkzeug").version < "0.9": # sorry, for touching your internals :). import werkzeug._internal # pragma: no cover we...
4a597ff48f5fd22ab1c6317e8ab1e65a887da284
dosagelib/__pyinstaller/hook-dosagelib.py
dosagelib/__pyinstaller/hook-dosagelib.py
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib')
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = ['dosagelib.data'] + collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib')
Make sure dosagelib.data is importable
PyInstaller: Make sure dosagelib.data is importable
Python
mit
webcomics/dosage,webcomics/dosage
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib') PyInstaller: Make sure dosagel...
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = ['dosagelib.data'] + collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib')
<commit_before># SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib') <commit_msg>PyI...
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = ['dosagelib.data'] + collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib')
# SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib') PyInstaller: Make sure dosagel...
<commit_before># SPDX-License-Identifier: MIT # Copyright (C) 2016-2022 Tobias Gruetzmacher from PyInstaller.utils.hooks import collect_data_files, collect_submodules, copy_metadata hiddenimports = collect_submodules('dosagelib.plugins') datas = copy_metadata('dosage') + collect_data_files('dosagelib') <commit_msg>PyI...
f84df81f060746567b611a2071ff1a161fcf3206
generic_links/models.py
generic_links/models.py
# -*- coding: UTF-8 -*- from django import VERSION from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ def get_user_model_fk_ref...
# -*- coding: UTF-8 -*- from django.contrib.auth import get_user_model from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ class GenericLink(models.Model): "...
Make User model compatible with Django 2.x
Make User model compatible with Django 2.x
Python
bsd-3-clause
matagus/django-generic-links,matagus/django-generic-links
# -*- coding: UTF-8 -*- from django import VERSION from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ def get_user_model_fk_ref...
# -*- coding: UTF-8 -*- from django.contrib.auth import get_user_model from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ class GenericLink(models.Model): "...
<commit_before># -*- coding: UTF-8 -*- from django import VERSION from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ def get_us...
# -*- coding: UTF-8 -*- from django.contrib.auth import get_user_model from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ class GenericLink(models.Model): "...
# -*- coding: UTF-8 -*- from django import VERSION from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ def get_user_model_fk_ref...
<commit_before># -*- coding: UTF-8 -*- from django import VERSION from django.conf import settings from django.contrib.contenttypes.fields import GenericForeignKey from django.contrib.contenttypes.models import ContentType from django.db import models from django.utils.translation import ugettext_lazy as _ def get_us...
ace25952c3590f2b130b064815c90658f4495cb5
code/marv/marv/app/wsgi.py
code/marv/marv/app/wsgi.py
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ['MARV_APPLICATION_ROOT'] import marv.app import marv.site ...
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ.get('MARV_APPLICATION_ROOT') or '/' import marv.app import...
Make fetching application root from env less error-prone
[marv] Make fetching application root from env less error-prone
Python
agpl-3.0
ternaris/marv-robotics,ternaris/marv-robotics
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ['MARV_APPLICATION_ROOT'] import marv.app import marv.site ...
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ.get('MARV_APPLICATION_ROOT') or '/' import marv.app import...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ['MARV_APPLICATION_ROOT'] import marv.app im...
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ.get('MARV_APPLICATION_ROOT') or '/' import marv.app import...
# -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ['MARV_APPLICATION_ROOT'] import marv.app import marv.site ...
<commit_before># -*- coding: utf-8 -*- # # Copyright 2016 - 2018 Ternaris. # SPDX-License-Identifier: AGPL-3.0-only import os from marv_cli import setup_logging setup_logging(os.environ.get('MARV_LOGLEVEL', 'info')) config = os.environ['MARV_CONFIG'] app_root = os.environ['MARV_APPLICATION_ROOT'] import marv.app im...
94a944b01953ed75bfbefbd11ed62ca438cd9200
accounts/tests/test_models.py
accounts/tests/test_models.py
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """ def test_user_valid_with_only_email(self): ...
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """...
Add test for unsupplied email for user model
Add test for unsupplied email for user model
Python
mit
randomic/aniauth-tdd,randomic/aniauth-tdd
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """ def test_user_valid_with_only_email(self): ...
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """...
<commit_before>"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """ def test_user_valid_with_only_e...
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model from django.core.exceptions import ValidationError USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """...
"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """ def test_user_valid_with_only_email(self): ...
<commit_before>"""accounts app unittests for models """ from django.test import TestCase from django.contrib.auth import get_user_model USER = get_user_model() TEST_EMAIL = '[email protected]' class UserModelTest(TestCase): """Tests for passwordless user model. """ def test_user_valid_with_only_e...
e52b134704951f4ff66a24e348bd20c5a3e85391
adhocracy4/filters/filters.py
adhocracy4/filters/filters.py
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
Make constructor of DefaultFilterSet compatible
Make constructor of DefaultFilterSet compatible - arguments had different names than FilterSet before
Python
agpl-3.0
liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4,liqd/adhocracy4
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
<commit_before>import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data...
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data = data.copy() ...
<commit_before>import django_filters class PagedFilterSet(django_filters.FilterSet): """Removes page parameters from the query when applying filters.""" page_kwarg = 'page' def __init__(self, data, *args, **kwargs): if self.page_kwarg in data: # Create a mutable copy data...
a450d2ead6a8174fe47fdec5557b85cddef759e8
analysis/plot-single-trial.py
analysis/plot-single-trial.py
import climate import lmj.plot import source def main(subject): subj = source.Subject(subject) trial = subj.blocks[0].trials[0] trial.load() ax = lmj.plot.axes(111, projection='3d', aspect='equal') x, y, z = trial.marker('r-fing-index') ax.plot(x, z, zs=y) x, y, z = trial.marker('l-fing-...
import climate import lmj.plot import source import plots @climate.annotate( subjects='plot data from these subjects', marker=('plot data for this mocap marker', 'option'), trial_num=('plot data for this trial', 'option', None, int), ) def main(marker='r-fing-index', trial_num=0, *subjects): with plo...
Expand single-trial plot to include multiple subjects.
Expand single-trial plot to include multiple subjects.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
import climate import lmj.plot import source def main(subject): subj = source.Subject(subject) trial = subj.blocks[0].trials[0] trial.load() ax = lmj.plot.axes(111, projection='3d', aspect='equal') x, y, z = trial.marker('r-fing-index') ax.plot(x, z, zs=y) x, y, z = trial.marker('l-fing-...
import climate import lmj.plot import source import plots @climate.annotate( subjects='plot data from these subjects', marker=('plot data for this mocap marker', 'option'), trial_num=('plot data for this trial', 'option', None, int), ) def main(marker='r-fing-index', trial_num=0, *subjects): with plo...
<commit_before>import climate import lmj.plot import source def main(subject): subj = source.Subject(subject) trial = subj.blocks[0].trials[0] trial.load() ax = lmj.plot.axes(111, projection='3d', aspect='equal') x, y, z = trial.marker('r-fing-index') ax.plot(x, z, zs=y) x, y, z = trial....
import climate import lmj.plot import source import plots @climate.annotate( subjects='plot data from these subjects', marker=('plot data for this mocap marker', 'option'), trial_num=('plot data for this trial', 'option', None, int), ) def main(marker='r-fing-index', trial_num=0, *subjects): with plo...
import climate import lmj.plot import source def main(subject): subj = source.Subject(subject) trial = subj.blocks[0].trials[0] trial.load() ax = lmj.plot.axes(111, projection='3d', aspect='equal') x, y, z = trial.marker('r-fing-index') ax.plot(x, z, zs=y) x, y, z = trial.marker('l-fing-...
<commit_before>import climate import lmj.plot import source def main(subject): subj = source.Subject(subject) trial = subj.blocks[0].trials[0] trial.load() ax = lmj.plot.axes(111, projection='3d', aspect='equal') x, y, z = trial.marker('r-fing-index') ax.plot(x, z, zs=y) x, y, z = trial....
2b4323c0b19fbdac4efc5735b6c09bcdfa8a83b1
starminder/main/templatetags/url_format.py
starminder/main/templatetags/url_format.py
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
Mark mark_safe as safe :)
Mark mark_safe as safe :)
Python
mit
nkantar/Starminder
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
<commit_before>from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a ...
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a href='{url}' ti...
<commit_before>from django import template from django.utils.safestring import mark_safe register = template.Library() @register.simple_tag def url_format(link_format, url, text, title): if link_format == "markdown": link = f"[{text}]({url} '{title}')" if link_format == "html": link = f"<a ...
691f2f8c1bf9a5e13c66913dcbb205dfdbba8fa8
tests/core/test_runner/test_yaml_runner.py
tests/core/test_runner/test_yaml_runner.py
from openfisca_core.tools.test_runner import _run_test from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} class Simulation: def __in...
from openfisca_core.tools.test_runner import _run_test, _get_tax_benefit_system from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} de...
Add unit test for test_runner _get_tax_benefit_system
Add unit test for test_runner _get_tax_benefit_system
Python
agpl-3.0
openfisca/openfisca-core,openfisca/openfisca-core
from openfisca_core.tools.test_runner import _run_test from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} class Simulation: def __in...
from openfisca_core.tools.test_runner import _run_test, _get_tax_benefit_system from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} de...
<commit_before>from openfisca_core.tools.test_runner import _run_test from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} class Simulatio...
from openfisca_core.tools.test_runner import _run_test, _get_tax_benefit_system from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} de...
from openfisca_core.tools.test_runner import _run_test from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} class Simulation: def __in...
<commit_before>from openfisca_core.tools.test_runner import _run_test from openfisca_core.errors import VariableNotFound import pytest class TaxBenefitSystem: def __init__(self): self.variables = {} def get_package_metadata(self): return {"name": "Test", "version": "Test"} class Simulatio...
b700cc013be2236c50937876b974891355842782
esis/__init__.py
esis/__init__.py
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0' from esis.es import Client
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" from esis.es import Client __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0'
Move import to the top of the file
Move import to the top of the file
Python
mit
jcollado/esis
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0' from esis.es import Client Move import to the top of the file
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" from esis.es import Client __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0'
<commit_before># -*- coding: utf-8 -*- """Elastic Search Index & Search.""" __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0' from esis.es import Client <commit_msg>Move import to the top of the file<commit_after>
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" from esis.es import Client __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0'
# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0' from esis.es import Client Move import to the top of the file# -*- coding: utf-8 -*- """Elastic Search Index & Search.""" from esis.es import Client __author__ = 'Jav...
<commit_before># -*- coding: utf-8 -*- """Elastic Search Index & Search.""" __author__ = 'Javier Collado' __email__ = '[email protected]' __version__ = '0.2.0' from esis.es import Client <commit_msg>Move import to the top of the file<commit_after># -*- coding: utf-8 -*- """Elastic Search Index & Search.""" from...
128f6f722f14ac1a202559ffe373304928f7c842
patients/tests/test_views.py
patients/tests/test_views.py
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Testar para 1 Paciente retornado. #Testar para mais de 1 Paciente retor...
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet from patients.views import search_patient from patients.models import Paciente class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Test...
Create assert true in teste_view
Create assert true in teste_view
Python
mit
msfernandes/anato-hub,msfernandes/anato-hub,msfernandes/anato-hub,msfernandes/anato-hub
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Testar para 1 Paciente retornado. #Testar para mais de 1 Paciente retor...
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet from patients.views import search_patient from patients.models import Paciente class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Test...
<commit_before>from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Testar para 1 Paciente retornado. #Testar para mais de 1...
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet from patients.views import search_patient from patients.models import Paciente class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Test...
from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Testar para 1 Paciente retornado. #Testar para mais de 1 Paciente retor...
<commit_before>from django.test import TestCase, Client from should_dsl import should, should_not from django.db.models.query import QuerySet class TestVies(TestCase): def setUp(self): self.client = Client() #Valores de testes: #Testar para 1 Paciente retornado. #Testar para mais de 1...
9cfc5c5acf568b56f4f150e3040827e5856b52c2
insertion_sort.py
insertion_sort.py
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
Update module with timeit testing for best and worst case scenarios.
Update module with timeit testing for best and worst case scenarios.
Python
mit
jonathanstallings/data-structures
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
<commit_before>def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = cur...
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = current if __name...
<commit_before>def insertion_sort(un_list): for idx in range(1, len(un_list)): current = un_list[idx] position = idx while position > 0 and un_list[position-1] > current: un_list[position] = un_list[position-1] position = position - 1 un_list[position] = cur...
ce7e025607cbd871bc4840f7ebf3c3af8b8e1881
flycam.py
flycam.py
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
import capture from picamera import PiCamera import time def image_cap_loop(camera, status=None): """Set image parameters, capture image, set wait time, repeat""" resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest[1]) ...
Adjust day size to 100k. Change status flag placement.
Adjust day size to 100k. Change status flag placement.
Python
mit
gnfrazier/YardCam
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
import capture from picamera import PiCamera import time def image_cap_loop(camera, status=None): """Set image parameters, capture image, set wait time, repeat""" resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest[1]) ...
<commit_before>import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size ...
import capture from picamera import PiCamera import time def image_cap_loop(camera, status=None): """Set image parameters, capture image, set wait time, repeat""" resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image_size(latest[1]) ...
import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size = capture.image...
<commit_before>import capture from picamera import PiCamera import time def image_cap_loop(camera): """Set image parameters, capture image, set wait time, repeat""" images = 18 status = None resolution = (854, 480) latest = capture.cap(camera, resolution, status) status = latest[0] size ...
c7785ff4367de929392b85f73a396e987cfe4606
apps/chats/models.py
apps/chats/models.py
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
Add HTML representation of chat
Add HTML representation of chat
Python
mit
tofumatt/quotes,tofumatt/quotes
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out o...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out of context) post...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A chat is a single or multi-line text excerpt from a chat (usually purposefully out o...
2c74cc83f2060cf0ea6198a955fbbe2f07e2dd05
apps/chats/models.py
apps/chats/models.py
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
Clean up Quote model code
Clean up Quote model code
Python
mit
tofumatt/quotes,tofumatt/quotes
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped toge...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped together like a cha...
<commit_before>from django.db import models from django.contrib.auth.models import User from django.utils.text import truncate_words from automatic_timestamps.models import TimestampModel class Chat(TimestampModel): """ A collection of chat items (quotes), ordered by their created_at values, grouped toge...
f36baf09fbbe62ff2fef97528f2d00df43797b43
flow/__init__.py
flow/__init__.py
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
Add NumpyFeature to top-level exports
Add NumpyFeature to top-level exports
Python
mit
JohnVinyard/featureflow,JohnVinyard/featureflow
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
<commit_before>from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdP...
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdProvider, KeyBui...
<commit_before>from model import BaseModel from feature import Feature, JSONFeature, TextFeature, CompressedFeature, \ PickleFeature from extractor import Node, Graph, Aggregator, NotEnoughData from bytestream import ByteStream, ByteStreamFeature from data import \ IdProvider, UuidProvider, UserSpecifiedIdP...
41a04ca380dca8d2b358f84bd7982f0ea01ac7f2
camoco/Config.py
camoco/Config.py
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] refge...
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] force...
Add force option for testing.
Add force option for testing.
Python
mit
schae234/Camoco,schae234/Camoco
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] refge...
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] force...
<commit_before>#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbos...
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] force...
#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbose [test] refge...
<commit_before>#!/usr/env/python3 import os import configparser global cf cf = configparser.ConfigParser() cf._interpolation = configparser.ExtendedInterpolation() cf_file = os.path.expanduser('~/.camoco.conf') default_config = ''' [options] basedir = ~/.camoco/ testdir = ~/.camoco/ [logging] log_level = verbos...
b9a752c8f6ea7fd9ada1ec283b7aaaa2eaf4b271
src/gui/loggers_ui/urls.py
src/gui/loggers_ui/urls.py
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap')...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session')...
Move global map url before session url.
gui: Move global map url before session url.
Python
mit
alberand/tserver,alberand/tserver,alberand/tserver,alberand/tserver
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap')...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session')...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), na...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session')...
from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), name='GlobalMap')...
<commit_before>from django.conf.urls import url from . import views urlpatterns = [ url(r'^$', views.MainPage.as_view(), name='index'), url(r'^(?P<ses_id>[a-zA-Z0-9]+)/$', views.SessionPage.as_view(), name='Session'), url(r'^GlobalMap/$', views.GlobalMap.as_view(), na...
586d031ce6b9f5b62122ca1970c9cef36fa6625f
client_libraries-DEPRECATED/python/src/setup.py
client_libraries-DEPRECATED/python/src/setup.py
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Consumer Surveys", ...
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Surveys", autho...
Update PyPi package information to reflect rebranding.
Update PyPi package information to reflect rebranding.
Python
apache-2.0
googlearchive/surveys,googlearchive/surveys,googlearchive/surveys
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Consumer Surveys", ...
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Surveys", autho...
<commit_before>#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Cons...
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Surveys", autho...
#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Consumer Surveys", ...
<commit_before>#!/usr/bin/env python """Packaging, distributing, and installing the ConsumerSurveys lib.""" import setuptools # To debug, set DISTUTILS_DEBUG env var to anything. setuptools.setup( name="GoogleConsumerSurveys", version="0.0.0.4", packages=setuptools.find_packages(), author="Google Cons...
b9d1dcf614faa949975bc5296be451abd2594835
repository/presenter.py
repository/presenter.py
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
Fix small issue with `--top-n` command switch
Fix small issue with `--top-n` command switch
Python
mit
moacirosa/git-current-contributors,moacirosa/git-current-contributors
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
<commit_before>import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: ...
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: template =...
<commit_before>import logger import datetime def out(counter, argv, elapsed_time = None): sum_lines = sum(counter.values()) blue = '\033[94m' grey = '\033[0m' endcolor = '\033[0m' italic = '\x1B[3m' eitalic = '\x1B[23m' template = '{0:>7.2%} {3}{2}{4}' if argv.show_absolute > 0: ...
94d2fb9241874d7feb89aa6fee6bc14b76e3a441
grains/grains.py
grains/grains.py
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM board = [x for x in range(1, 65)] grains...
Add two lists with square and grain numbers
Add two lists with square and grain numbers
Python
mit
amalshehu/exercism-python
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM Add two lists with square and grain numbe...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM board = [x for x in range(1, 65)] grains...
<commit_before># File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM <commit_msg>Add two lists ...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM board = [x for x in range(1, 65)] grains...
# File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM Add two lists with square and grain numbe...
<commit_before># File: grains.py # Purpose: Write a program that calculates the number of grains of wheat # on a chessboard given that the number on each square doubles. # Programmer: Amal Shehu # Course: Exercism # Date: Sunday 18 September 2016, 05:25 PM <commit_msg>Add two lists ...
c833f55999f6fd9029626d1b794c86b2b5b11256
post_office/test_settings.py
post_office/test_settings.py
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
Use "DjangoTestSuiteRunner" to in Django 1.6.
Use "DjangoTestSuiteRunner" to in Django 1.6.
Python
mit
CasherWest/django-post_office,carrerasrodrigo/django-post_office,fapelhanz/django-post_office,RafRaf/django-post_office,ui/django-post_office,jrief/django-post_office,yprez/django-post_office,JostCrow/django-post_office,ui/django-post_office,LeGast00n/django-post_office,CasherWest/django-post_office,ekohl/django-post_o...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
<commit_before># -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { ...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
# -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { 'BACKEND'...
<commit_before># -*- coding: utf-8 -*- DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, } CACHES = { 'default': { 'BACKEND': 'django.core.cache.backends.locmem.LocMemCache', 'TIMEOUT': 36000, 'KEY_PREFIX': 'post-office', }, 'post_office': { ...
d8ae8f7bccdbe8eace5bb67b94a75a8003cc30b6
github/models.py
github/models.py
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
Fix github top_events if events empty
Fix github top_events if events empty
Python
agpl-3.0
terotic/devheldev,terotic/devheldev,City-of-Helsinki/devheldev,terotic/devheldev,City-of-Helsinki/devheldev,City-of-Helsinki/devheldev
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
<commit_before>import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models.CharField(defa...
<commit_before>import json, requests from wagtail.wagtailadmin.edit_handlers import FieldPanel from wagtail.wagtailcore.models import Page, Orderable import django.utils.dateparse as dateparse from django.db import models from django.core.cache import cache class GithubOrgIndexPage(Page): github_org_name = models...
9f0e5c941c769c4d7c1cbdfcdcf98ddf643173d0
cea/interfaces/dashboard/server/__init__.py
cea/interfaces/dashboard/server/__init__.py
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint from flask_restplus import Api from .jobs import api as jobs from .streams import api as streams __author__ = "Daren Thomas" __...
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint, current_app from flask_restplus import Api, Resource from .jobs import api as jobs from .streams import api as streams __autho...
Add server alive and shutdown api endpoints
Add server alive and shutdown api endpoints
Python
mit
architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst,architecture-building-systems/CityEnergyAnalyst
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint from flask_restplus import Api from .jobs import api as jobs from .streams import api as streams __author__ = "Daren Thomas" __...
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint, current_app from flask_restplus import Api, Resource from .jobs import api as jobs from .streams import api as streams __autho...
<commit_before>""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint from flask_restplus import Api from .jobs import api as jobs from .streams import api as streams __author__ = "D...
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint, current_app from flask_restplus import Api, Resource from .jobs import api as jobs from .streams import api as streams __autho...
""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint from flask_restplus import Api from .jobs import api as jobs from .streams import api as streams __author__ = "Daren Thomas" __...
<commit_before>""" The /server api blueprint is used by cea-worker processes to manage jobs and files. """ from __future__ import print_function from __future__ import division from flask import Blueprint from flask_restplus import Api from .jobs import api as jobs from .streams import api as streams __author__ = "D...
92f98b24eb1718f200ea75874b932e8335dbb35c
frappe/patches/v14_0/set_document_expiry_default.py
frappe/patches/v14_0/set_document_expiry_default.py
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30) frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1)
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", { "document_share_key_expiry": 30, "allow_older_web_view_links": 1 })
Set values in a single query
refactor: Set values in a single query
Python
mit
StrellaGroup/frappe,yashodhank/frappe,yashodhank/frappe,StrellaGroup/frappe,yashodhank/frappe,frappe/frappe,frappe/frappe,StrellaGroup/frappe,frappe/frappe,yashodhank/frappe
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30) frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1) refactor: Set values in a single query
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", { "document_share_key_expiry": 30, "allow_older_web_view_links": 1 })
<commit_before>import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30) frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1) <commit_msg>refactor: Set values in a single query<commit_after>
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", { "document_share_key_expiry": 30, "allow_older_web_view_links": 1 })
import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30) frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1) refactor: Set values in a single queryimport frappe def execute(): frappe.db.set_value("System Settings"...
<commit_before>import frappe def execute(): frappe.db.set_value("System Settings", "System Settings", "document_share_key_expiry", 30) frappe.db.set_value("System Settings", "System Settings", "allow_older_web_view_links", 1) <commit_msg>refactor: Set values in a single query<commit_after>import frappe def execute(...
c78fa20de52468ceb2cdbbee952f486ac2533902
helusers/apps.py
helusers/apps.py
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin.AdminSi...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin_site.Ad...
Fix wrong path for helusers AdminSite
Fix wrong path for helusers AdminSite
Python
bsd-2-clause
City-of-Helsinki/django-helusers,City-of-Helsinki/django-helusers
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin.AdminSi...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin_site.Ad...
<commit_before>from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'heluser...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin_site.Ad...
from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'helusers.admin.AdminSi...
<commit_before>from django.apps import AppConfig from django.utils.translation import ugettext_lazy as _ from django.contrib.admin.apps import AdminConfig class HelusersConfig(AppConfig): name = 'helusers' verbose_name = _("Helsinki Users") class HelusersAdminConfig(AdminConfig): default_site = 'heluser...
8c7080e93f7966bb64d7ea531d9f19b4c75b5fd5
bucketeer/test/test_commit.py
bucketeer/test/test_commit.py
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Crea...
Add comment about constant values
Add comment about constant values
Python
mit
mgarbacz/bucketeer
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Crea...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on exi...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): # Constants - TODO move to config file global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Crea...
import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on existing bucket ...
<commit_before>import unittest, boto, os from bucketeer import commit class BuckeeterTest(unittest.TestCase): global existing_bucket, test_dir, test_file existing_bucket = 'bucket.exists' test_dir = 'bucketeer_test_dir' test_file = 'bucketeer_test_file' def setUp(self): # Create a bucket to test on exi...
de6a7ab74b2a826aee8cb0ef18d595c04281a50c
froide/publicbody/law_urls.py
froide/publicbody/law_urls.py
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)/$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), )
Add a slash to law urls
Add a slash to law urls
Python
mit
stefanw/froide,CodeforHawaii/froide,CodeforHawaii/froide,catcosmo/froide,CodeforHawaii/froide,catcosmo/froide,ryankanno/froide,okfse/froide,ryankanno/froide,fin/froide,CodeforHawaii/froide,stefanw/froide,LilithWittmann/froide,catcosmo/froide,ryankanno/froide,stefanw/froide,ryankanno/froide,CodeforHawaii/froide,okfse/fr...
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), ) Add a slash to law urls
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)/$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), )
<commit_before>from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), ) <commit_msg>Add a slash to law urls<commit_after>
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)/$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), )
from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), ) Add a slash to law urlsfrom django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)/$", 'publi...
<commit_before>from django.conf.urls.defaults import patterns, url urlpatterns = patterns("", url(r"^(?P<slug>[-\w]+)$", 'publicbody.views.show_foilaw', name="publicbody-foilaw-show"), ) <commit_msg>Add a slash to law urls<commit_after>from django.conf.urls.defaults import patterns, url urlpatterns = patterns("...
e9964a0f96777c5aae83349ccde3d14fbd04353b
contrib/generate-gresource-xml.py
contrib/generate-gresource-xml.py
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
Fix compile when using python 3.7 or older
trivial: Fix compile when using python 3.7 or older Signed-off-by: Richard Hughes <[email protected]>
Python
lgpl-2.1
fwupd/fwupd,fwupd/fwupd,fwupd/fwupd,fwupd/fwupd
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
<commit_before>#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root =...
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root = ET.Element("gr...
<commit_before>#!/usr/bin/python3 # pylint: disable=invalid-name,missing-docstring # # Copyright (C) 2022 Richard Hughes <[email protected]> # # SPDX-License-Identifier: LGPL-2.1+ import sys import os import xml.etree.ElementTree as ET if len(sys.argv) < 2: print("not enough arguments") sys.exit(1) root =...
cc9aa5c8e612cf4fcd79cbe8f4c1ff64c94b0b0e
saleor/product/views.py
saleor/product/views.py
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import ProductForm from ...
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import Product...
Add missing redirect after POST in product details
Add missing redirect after POST in product details
Python
bsd-3-clause
itbabu/saleor,dashmug/saleor,jreigel/saleor,hongquan/saleor,avorio/saleor,UITools/saleor,hongquan/saleor,arth-co/saleor,rchav/vinerack,mociepka/saleor,avorio/saleor,paweltin/saleor,laosunhust/saleor,spartonia/saleor,taedori81/saleor,UITools/saleor,arth-co/saleor,maferelo/saleor,laosunhust/saleor,KenMutemi/saleor,avorio...
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import ProductForm from ...
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import Product...
<commit_before>from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import Pr...
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404, redirect from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import Product...
from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import ProductForm from ...
<commit_before>from __future__ import unicode_literals from django.http import HttpResponsePermanentRedirect from django.contrib import messages from django.shortcuts import get_object_or_404 from django.template.response import TemplateResponse from django.utils.translation import ugettext as _ from .forms import Pr...
ace1500bde0f4680ad71b51395fd72c4306f8c4b
feature_extraction/measurements/edge_intensity_ratio.py
feature_extraction/measurements/edge_intensity_ratio.py
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
Fix a massive bug in EdgeIntensityRatio
Fix a massive bug in EdgeIntensityRatio Due to a typo, the code was dividing by the mean of a mask, not the mean of the image sliced by the mask
Python
apache-2.0
widoptimization-willett/feature-extraction
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
<commit_before>import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] fo...
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] for width in np.h...
<commit_before>import numpy as np from . import Measurement from ..util.cleanup import cell_boundary_mask import skimage.morphology as morph import matplotlib.pyplot as plt class EdgeIntensityRatio(Measurement): default_options = { 'border_width': 10 # pixels } def compute(self, image): measurements = [] fo...
c961fbf4be3152efc10d2d67d2f62fdae047ccab
datapipe/targets/filesystem.py
datapipe/targets/filesystem.py
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() self._timestamp = 0 def identifier(self): return self._path def exists(self): return os.path.exists(self._path) def pat...
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() if self.exists(): self._memory['timestamp'] = os.path.getmtime(self._path) else: self._memory['timestamp'] = 0 de...
Fix unnecessary recomputation of file targets
Fix unnecessary recomputation of file targets
Python
mit
ibab/datapipe
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() self._timestamp = 0 def identifier(self): return self._path def exists(self): return os.path.exists(self._path) def pat...
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() if self.exists(): self._memory['timestamp'] = os.path.getmtime(self._path) else: self._memory['timestamp'] = 0 de...
<commit_before>import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() self._timestamp = 0 def identifier(self): return self._path def exists(self): return os.path.exists(self._pat...
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() if self.exists(): self._memory['timestamp'] = os.path.getmtime(self._path) else: self._memory['timestamp'] = 0 de...
import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() self._timestamp = 0 def identifier(self): return self._path def exists(self): return os.path.exists(self._path) def pat...
<commit_before>import os from ..target import Target class LocalFile(Target): def __init__(self, path): self._path = path super(LocalFile, self).__init__() self._timestamp = 0 def identifier(self): return self._path def exists(self): return os.path.exists(self._pat...
9ae5b882b987cd56fe20996733a828171b18aa3a
polygraph/types/tests/test_object_type.py
polygraph/types/tests/test_object_type.py
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String from polygraph.types.object_type impor...
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String, Int from polygraph.types.object_type ...
Add tests around ObjectType Meta
Add tests around ObjectType Meta
Python
mit
polygraph-python/polygraph
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String from polygraph.types.object_type impor...
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String, Int from polygraph.types.object_type ...
<commit_before>from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String from polygraph.types.ob...
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String, Int from polygraph.types.object_type ...
from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String from polygraph.types.object_type impor...
<commit_before>from collections import OrderedDict from unittest import TestCase from graphql.type.definition import GraphQLField, GraphQLObjectType from graphql.type.scalars import GraphQLString from polygraph.types.definitions import PolygraphNonNull from polygraph.types.fields import String from polygraph.types.ob...
9cb2bf5d1432bf45666f939356bfe7057d8e5960
server/mod_auth/auth.py
server/mod_auth/auth.py
from flask import Response from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id): """Returns a user from the database based on their id""" return User.query.filter_by(id=user_id).first() def handle_...
import flask from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id: int) -> User: """Returns a user from the database based on their id :param user_id: a users unique id :return: User object with c...
Add type declartions and docstrings
Add type declartions and docstrings
Python
mit
ganemone/ontheside,ganemone/ontheside,ganemone/ontheside
from flask import Response from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id): """Returns a user from the database based on their id""" return User.query.filter_by(id=user_id).first() def handle_...
import flask from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id: int) -> User: """Returns a user from the database based on their id :param user_id: a users unique id :return: User object with c...
<commit_before>from flask import Response from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id): """Returns a user from the database based on their id""" return User.query.filter_by(id=user_id).first(...
import flask from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id: int) -> User: """Returns a user from the database based on their id :param user_id: a users unique id :return: User object with c...
from flask import Response from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id): """Returns a user from the database based on their id""" return User.query.filter_by(id=user_id).first() def handle_...
<commit_before>from flask import Response from flask_login import login_user from server.models import User from server.login_manager import login_manager @login_manager.user_loader def load_user(user_id): """Returns a user from the database based on their id""" return User.query.filter_by(id=user_id).first(...
f1b78e050a2b4e8e648e6570c1d2e8688f104899
bin/pylama/lint/extensions.py
bin/pylama/lint/extensions.py
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
Fix import Linter from pylam_pylint
Fix import Linter from pylam_pylint
Python
mit
AtomLinter/linter-pylama
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
<commit_before>"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from...
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from pylama.lint.py...
<commit_before>"""Load extensions.""" import os import sys CURDIR = os.path.abspath(os.path.dirname(__file__)) sys.path.insert(0, os.path.join(CURDIR, '..', '..', 'deps')) LINTERS = {} try: from pylama.lint.pylama_mccabe import Linter LINTERS['mccabe'] = Linter() except ImportError: pass try: from...
9f93a420842b1ee9e761e3d5a08fc3669c3f6ef7
django_classified/forms.py
django_classified/forms.py
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
Set input type to phone for phone.
Set input type to phone for phone.
Python
mit
inoks/dcf,inoks/dcf
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
<commit_before># -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceF...
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
# -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceField(label=_('G...
<commit_before># -*- coding:utf-8 -*- from django import forms from django.utils.translation import ugettext as _ from .models import Item, Group, Profile, Area class SearchForm(forms.Form): area = forms.ModelChoiceField(label=_('Area'), queryset=Area.objects.all(), required=False) group = forms.ModelChoiceF...
66d13005993553a849449539e6daf6551a616c4b
indra/sources/isi/__init__.py
indra/sources/isi/__init__.py
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. For processing nxml files, install the nxml2txt utility (https://github.com/spyysalo/nxml2txt) and ...
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. """ from .api import process_text, process_nxml, process_preprocessed, \ process_output_folder...
Remove deprecated comment about nxml2text
Remove deprecated comment about nxml2text
Python
bsd-2-clause
sorgerlab/belpy,sorgerlab/belpy,johnbachman/belpy,johnbachman/belpy,johnbachman/indra,sorgerlab/indra,sorgerlab/belpy,bgyori/indra,johnbachman/indra,sorgerlab/indra,sorgerlab/indra,bgyori/indra,bgyori/indra,johnbachman/belpy,johnbachman/indra
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. For processing nxml files, install the nxml2txt utility (https://github.com/spyysalo/nxml2txt) and ...
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. """ from .api import process_text, process_nxml, process_preprocessed, \ process_output_folder...
<commit_before>""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. For processing nxml files, install the nxml2txt utility (https://github.com/spyysalo...
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. """ from .api import process_text, process_nxml, process_preprocessed, \ process_output_folder...
""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. For processing nxml files, install the nxml2txt utility (https://github.com/spyysalo/nxml2txt) and ...
<commit_before>""" This module provides an input interface and processor to the ISI reading system. The reader is set up to run within a Docker container. For the ISI reader to run, set the Docker memory and swap space to the maximum. For processing nxml files, install the nxml2txt utility (https://github.com/spyysalo...
dadc13021684976599bed4c949d28d9ebd296eb8
linter.py
linter.py
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" from SublimeLinter.lint import RubyLinter class SlimLint(RubyLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" import os from SublimeLinter.lint import RubyLinter, util class SlimLint(RubyLinter): """...
Add functionality to find rubocop config
Add functionality to find rubocop config Once it's found, we set it as an environment variable for the rubocop linter to pick up.
Python
mit
elstgav/SublimeLinter-slim-lint
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" from SublimeLinter.lint import RubyLinter class SlimLint(RubyLinter): """Provides an inte...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" import os from SublimeLinter.lint import RubyLinter, util class SlimLint(RubyLinter): """...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" from SublimeLinter.lint import RubyLinter class SlimLint(RubyLinter): """P...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" import os from SublimeLinter.lint import RubyLinter, util class SlimLint(RubyLinter): """...
# # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" from SublimeLinter.lint import RubyLinter class SlimLint(RubyLinter): """Provides an inte...
<commit_before># # linter.py # Linter for SublimeLinter3, a code checking framework for Sublime Text 3 # # Written by Gavin Elster # Copyright (c) 2015 Gavin Elster # # License: MIT # """This module exports the SlimLint plugin class.""" from SublimeLinter.lint import RubyLinter class SlimLint(RubyLinter): """P...
74667c044f703355811fb8dd38c0b2c29056c943
metashare/sync/management/commands/get_resource_list.py
metashare/sync/management/commands/get_resource_list.py
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
Fix to correctly check for publication status
Fix to correctly check for publication status
Python
bsd-3-clause
zeehio/META-SHARE,MiltosD/CEFELRC,JuliBakagianni/META-SHARE,MiltosD/CEF-ELRC,JuliBakagianni/CEF-ELRC,JuliBakagianni/META-SHARE,JuliBakagianni/META-SHARE,JuliBakagianni/CEF-ELRC,JuliBakagianni/CEF-ELRC,zeehio/META-SHARE,JuliBakagianni/CEF-ELRC,JuliBakagianni/META-SHARE,MiltosD/CEF-ELRC,MiltosD/CEFELRC,JuliBakagianni/CEF...
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
<commit_before> from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj...
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj._get_published...
<commit_before> from django.core.management.base import BaseCommand from metashare.repository.models import resourceInfoType_model class Command(BaseCommand): def handle(self, *args, **options): for res in resourceInfoType_model.objects.all(): sto_obj = res.storage_object if sto_obj...
d0f67d9ac8236e83a77b84e33ba7217c7e8f67b9
bird/utils.py
bird/utils.py
def noise_mask(spectrogram): print("noise_mask is undefined") def structure_mask(spectrogram): print("structure_mask is undefined") def extract_signal(mask, spectrogram): print("extract_signal is undefined")
import numpy as np import os import sys import subprocess import wave import wave from scipy import signal from scipy import fft from matplotlib import pyplot as plt MLSP_DATA_PATH="/home/darksoox/gits/bird-species-classification/mlsp_contest_dataset/" def noise_mask(spectrogram): print("noise_mask is undefined")...
Add draft of spectrogram computions.
Add draft of spectrogram computions.
Python
mit
johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification
def noise_mask(spectrogram): print("noise_mask is undefined") def structure_mask(spectrogram): print("structure_mask is undefined") def extract_signal(mask, spectrogram): print("extract_signal is undefined") Add draft of spectrogram computions.
import numpy as np import os import sys import subprocess import wave import wave from scipy import signal from scipy import fft from matplotlib import pyplot as plt MLSP_DATA_PATH="/home/darksoox/gits/bird-species-classification/mlsp_contest_dataset/" def noise_mask(spectrogram): print("noise_mask is undefined")...
<commit_before>def noise_mask(spectrogram): print("noise_mask is undefined") def structure_mask(spectrogram): print("structure_mask is undefined") def extract_signal(mask, spectrogram): print("extract_signal is undefined") <commit_msg>Add draft of spectrogram computions.<commit_after>
import numpy as np import os import sys import subprocess import wave import wave from scipy import signal from scipy import fft from matplotlib import pyplot as plt MLSP_DATA_PATH="/home/darksoox/gits/bird-species-classification/mlsp_contest_dataset/" def noise_mask(spectrogram): print("noise_mask is undefined")...
def noise_mask(spectrogram): print("noise_mask is undefined") def structure_mask(spectrogram): print("structure_mask is undefined") def extract_signal(mask, spectrogram): print("extract_signal is undefined") Add draft of spectrogram computions.import numpy as np import os import sys import subprocess impo...
<commit_before>def noise_mask(spectrogram): print("noise_mask is undefined") def structure_mask(spectrogram): print("structure_mask is undefined") def extract_signal(mask, spectrogram): print("extract_signal is undefined") <commit_msg>Add draft of spectrogram computions.<commit_after>import numpy as np im...
09b5a3f531a3d0498aae21f2c8014b77df5f8d41
version.py
version.py
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/dist_build/manifest.json', 'src/chrome/app/dev_build/manifest.json', 'src...
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/manifest.json', 'src/chrome/extension/manifest.json', 'src/firefox/packag...
Update manifest files being bumped.
Update manifest files being bumped.
Python
apache-2.0
itplanes/uproxy,chinarustin/uproxy,uProxy/uproxy,dhkong88/uproxy,dhkong88/uproxy,MinFu/uproxy,itplanes/uproxy,jpevarnek/uproxy,dhkong88/uproxy,jpevarnek/uproxy,chinarustin/uproxy,roceys/uproxy,roceys/uproxy,dhkong88/uproxy,uProxy/uproxy,uProxy/uproxy,qida/uproxy,chinarustin/uproxy,roceys/uproxy,chinarustin/uproxy,MinFu...
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/dist_build/manifest.json', 'src/chrome/app/dev_build/manifest.json', 'src...
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/manifest.json', 'src/chrome/extension/manifest.json', 'src/firefox/packag...
<commit_before># Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/dist_build/manifest.json', 'src/chrome/app/dev_build/manifest.json',...
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/manifest.json', 'src/chrome/extension/manifest.json', 'src/firefox/packag...
# Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/dist_build/manifest.json', 'src/chrome/app/dev_build/manifest.json', 'src...
<commit_before># Update uProxy version in all relevant places. # # Run with: # python version.py <new version> # e.g. python version.py 0.8.10 import json import collections import sys import re manifest_files = [ 'src/chrome/app/dist_build/manifest.json', 'src/chrome/app/dev_build/manifest.json',...
b022b2f017ed102d8e194427b92dce8cdc8918f9
manage.py
manage.py
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
Add note on Varda server start
Add note on Varda server start
Python
mit
varda/varda,sndrtj/varda
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
<commit_before>#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@loca...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@localhost identifie...
<commit_before>#!/usr/bin/env python """ Run the Varda REST server. To setup the database: create database varda; create database vardacelery; create database vardaresults; grant all privileges on varda.* to varda@localhost identified by 'varda'; grant all privileges on vardacelery.* to varda@loca...
50130fa011104806cc66331fe5a6ebc3f98c9d5c
vistrails/packages/tej/widgets.py
vistrails/packages/tej/widgets.py
from __future__ import division from PyQt4 import QtGui from vistrails.gui.modules.source_configure import SourceConfigurationWidget class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a shell script that will be run on the se...
from __future__ import division from vistrails.gui.modules.source_configure import SourceConfigurationWidget from vistrails.gui.modules.string_configure import TextEditor class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a sh...
Use smart text editor in tej.SubmitShellJob
Use smart text editor in tej.SubmitShellJob
Python
bsd-3-clause
minesense/VisTrails,VisTrails/VisTrails,hjanime/VisTrails,hjanime/VisTrails,hjanime/VisTrails,minesense/VisTrails,VisTrails/VisTrails,hjanime/VisTrails,minesense/VisTrails,VisTrails/VisTrails,VisTrails/VisTrails,minesense/VisTrails,minesense/VisTrails,hjanime/VisTrails,VisTrails/VisTrails
from __future__ import division from PyQt4 import QtGui from vistrails.gui.modules.source_configure import SourceConfigurationWidget class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a shell script that will be run on the se...
from __future__ import division from vistrails.gui.modules.source_configure import SourceConfigurationWidget from vistrails.gui.modules.string_configure import TextEditor class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a sh...
<commit_before>from __future__ import division from PyQt4 import QtGui from vistrails.gui.modules.source_configure import SourceConfigurationWidget class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a shell script that will b...
from __future__ import division from vistrails.gui.modules.source_configure import SourceConfigurationWidget from vistrails.gui.modules.string_configure import TextEditor class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a sh...
from __future__ import division from PyQt4 import QtGui from vistrails.gui.modules.source_configure import SourceConfigurationWidget class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a shell script that will be run on the se...
<commit_before>from __future__ import division from PyQt4 import QtGui from vistrails.gui.modules.source_configure import SourceConfigurationWidget class ShellSourceConfigurationWidget(SourceConfigurationWidget): """Configuration widget for SubmitShellJob. Allows the user to edit a shell script that will b...
09c24ac93b6e697b48c52b614fe92f7978fe2320
linter.py
linter.py
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
Add iverilog flags reference URL
Add iverilog flags reference URL Signed-off-by: Jack Cherng <[email protected]>
Python
mit
jfcherng/SublimeLinter-contrib-iverilog,jfcherng/SublimeLinter-contrib-iverilog
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
<commit_before># # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attr...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
# # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attributes.html ...
<commit_before># # linter.py # Linter for SublimeLinter4, a code checking framework for Sublime Text 3 # # Written by Jack Cherng # Copyright (c) 2017-2019 jfcherng # # License: MIT # from SublimeLinter.lint import Linter import sublime class Iverilog(Linter): # http://www.sublimelinter.com/en/stable/linter_attr...
db41b744b4fea9d16ad53cb7915ddee5ddcffed0
scheduler.py
scheduler.py
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
Revert "Re-raise even when capturing by Sentry"
Revert "Re-raise even when capturing by Sentry" This reverts commit 3fe290fe02390e79910e7ded87070d6e03a705a5.
Python
apache-2.0
randsleadershipslack/destalinator,royrapoport/destalinator,royrapoport/destalinator,randsleadershipslack/destalinator,TheConnMan/destalinator,TheConnMan/destalinator
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
<commit_before>import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_S...
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_SCHEDULE" envvar...
<commit_before>import logging import os from apscheduler.schedulers.blocking import BlockingScheduler from raven.base import Client as RavenClient import warner import archiver import announcer import flagger raven_client = RavenClient() logger = logging.getLogger(__name__) # When testing changes, set the "TEST_S...
11f758dc6c4ee3b64d47ac133c4b7f57cd4fc25b
contrib/performance/report.py
contrib/performance/report.py
import sys, pickle def main(): statistics = pickle.load(file(sys.argv[1])) if len(sys.argv) == 2: print 'Available benchmarks' print '\t' + '\n\t'.join(statistics.keys()) return statistics = statistics[sys.argv[2]] if len(sys.argv) == 3: print 'Available parameters' ...
import sys, pickle from benchlib import select def main(): if len(sys.argv) < 5: print 'Usage: %s <datafile> <benchmark name> <parameter value> <metric> [command]' % (sys.argv[0],) else: stat, samples = select(pickle.load(file(sys.argv[1])), *sys.argv[2:5]) if len(sys.argv) == 5: ...
Use stats.select() instead of re-implementing all of this.
Use stats.select() instead of re-implementing all of this. This is preparation for being able to squash statistics in different ways. git-svn-id: 81e381228600e5752b80483efd2b45b26c451ea2@6563 e27351fd-9f3e-4f54-a53b-843176b1656c
Python
apache-2.0
trevor/calendarserver,trevor/calendarserver,trevor/calendarserver
import sys, pickle def main(): statistics = pickle.load(file(sys.argv[1])) if len(sys.argv) == 2: print 'Available benchmarks' print '\t' + '\n\t'.join(statistics.keys()) return statistics = statistics[sys.argv[2]] if len(sys.argv) == 3: print 'Available parameters' ...
import sys, pickle from benchlib import select def main(): if len(sys.argv) < 5: print 'Usage: %s <datafile> <benchmark name> <parameter value> <metric> [command]' % (sys.argv[0],) else: stat, samples = select(pickle.load(file(sys.argv[1])), *sys.argv[2:5]) if len(sys.argv) == 5: ...
<commit_before>import sys, pickle def main(): statistics = pickle.load(file(sys.argv[1])) if len(sys.argv) == 2: print 'Available benchmarks' print '\t' + '\n\t'.join(statistics.keys()) return statistics = statistics[sys.argv[2]] if len(sys.argv) == 3: print 'Availab...
import sys, pickle from benchlib import select def main(): if len(sys.argv) < 5: print 'Usage: %s <datafile> <benchmark name> <parameter value> <metric> [command]' % (sys.argv[0],) else: stat, samples = select(pickle.load(file(sys.argv[1])), *sys.argv[2:5]) if len(sys.argv) == 5: ...
import sys, pickle def main(): statistics = pickle.load(file(sys.argv[1])) if len(sys.argv) == 2: print 'Available benchmarks' print '\t' + '\n\t'.join(statistics.keys()) return statistics = statistics[sys.argv[2]] if len(sys.argv) == 3: print 'Available parameters' ...
<commit_before>import sys, pickle def main(): statistics = pickle.load(file(sys.argv[1])) if len(sys.argv) == 2: print 'Available benchmarks' print '\t' + '\n\t'.join(statistics.keys()) return statistics = statistics[sys.argv[2]] if len(sys.argv) == 3: print 'Availab...
76f0e242341aba7ce57f50d3d13f2e0da1dcb750
cycli/buffer.py
cycli/buffer.py
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
Allow double return to execute query
Allow double return to execute query If there’s a double return the text will end with “\n”. Closes #5.
Python
mit
nicolewhite/cycli,nicolewhite/cycli,ikwattro/cycli
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
<commit_before>from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) supe...
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) super(self.__class_...
<commit_before>from prompt_toolkit.buffer import Buffer from prompt_toolkit.filters import Condition class CypherBuffer(Buffer): def __init__(self, *args, **kwargs): @Condition def is_multiline(): text = self.document.text return not self.user_wants_out(text) supe...
746c3a55b5935199a293f05d042c0029029d970a
planetstack/openstack_observer/steps/sync_images.py
planetstack/openstack_observer/steps/sync_images.py
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
Check the existence of the images_path
Check the existence of the images_path ERROR:planetstack.log:[Errno 2] No such file or directory: '/opt/xos/images' BEG TRACEBACK Traceback (most recent call last): File "/opt/xos/observer/event_loop.py", line 349, in sync failed_objects = sync_step(failed=list(self.failed_step_objects), deletion=deletion) Fil...
Python
apache-2.0
open-cloud/xos,cboling/xos,opencord/xos,cboling/xos,zdw/xos,open-cloud/xos,opencord/xos,zdw/xos,cboling/xos,cboling/xos,cboling/xos,zdw/xos,open-cloud/xos,zdw/xos,opencord/xos
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
<commit_before>import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pendin...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pending(self, deleted...
<commit_before>import os import base64 from django.db.models import F, Q from xos.config import Config from observer.openstacksyncstep import OpenStackSyncStep from core.models.image import Image class SyncImages(OpenStackSyncStep): provides=[Image] requested_interval=0 observes=Image def fetch_pendin...
22de2eb4263de87f93f243af8200029e08da37db
tests/test_cli_bands.py
tests/test_cli_bands.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
Add absolute tolerance to allclose test
Add absolute tolerance to allclose test
Python
apache-2.0
Z2PackDev/TBmodels,Z2PackDev/TBmodels
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR d...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR def test_cli_ban...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- # # Author: Dominik Gresch <[email protected]> import os import pytest import tempfile import numpy as np import bandstructure_utils as bs from click.testing import CliRunner import tbmodels from tbmodels._cli import cli from parameters import SAMPLES_DIR d...
2c8077039573296ecbc31ba9b7c5d6463cf39124
cmakelists_parsing/parsing.py
cmakelists_parsing/parsing.py
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
Fix up output by including endls.
Fix up output by including endls.
Python
apache-2.0
wjwwood/parse_cmake,ijt/cmakelists_parsing
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
<commit_before># -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str):...
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
# -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str): grammar = ...
<commit_before># -*- coding: utf-8 -*- '''A CMakeLists parser using funcparserlib. The parser is based on [examples of the CMakeLists format][1]. [1]: http://www.vtk.org/Wiki/CMake/Examples ''' from __future__ import unicode_literals, print_function import re import pypeg2 as p import list_fix class Arg(p.str):...
050319a4a5257b8f98d5dfcb1651b6b6f50a5b98
pysqli/core/__init__.py
pysqli/core/__init__.py
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
Fix a regression inserted previously.
Fix a regression inserted previously.
Python
mit
sysdream/pysqli,sysdream/pysqli
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
<commit_before>#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, Cookie...
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, CookieInjector, UserA...
<commit_before>#-*- coding:utf-8 -*- ## @package Core # Core module contains everything required to SQLinject. # @author Damien "virtualabs" Cauquil <[email protected]> from context import Context, InbandContext, BlindContext from dbms import DBMS, allow, dbms from injector import GetInjector, PostInjector, Cookie...
5a531923246f15dc42d690fb6b2b4fa4322891e2
examples/status_watcher.py
examples/status_watcher.py
import logging from flist import account_login, start_chat, opcode import asyncio logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(status)s: %(statusmsg)s"...
import logging from flist import account_login, start_chat, opcode import asyncio from sys import argv logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(sta...
Simplify main method, wait until status logger completes
Simplify main method, wait until status logger completes Hint: It never will.
Python
bsd-2-clause
StormyDragon/python-flist
import logging from flist import account_login, start_chat, opcode import asyncio logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(status)s: %(statusmsg)s"...
import logging from flist import account_login, start_chat, opcode import asyncio from sys import argv logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(sta...
<commit_before>import logging from flist import account_login, start_chat, opcode import asyncio logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(status)s:...
import logging from flist import account_login, start_chat, opcode import asyncio from sys import argv logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(sta...
import logging from flist import account_login, start_chat, opcode import asyncio logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(status)s: %(statusmsg)s"...
<commit_before>import logging from flist import account_login, start_chat, opcode import asyncio logger = logging.getLogger('status_watcher') logging.getLogger('').setLevel('DEBUG') async def log_status_async(status_provider): async for message in status_provider: logger.info("%(character)s is %(status)s:...
bb5f027fa6573c913d90fa91d9920b40d48fbe62
flask-app/nickITAPI/app.py
flask-app/nickITAPI/app.py
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/<id>') def example(id=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/search/<query>') def example(query=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp
Add query capture in flask.
Add query capture in flask.
Python
mit
cthit/nickIT,cthit/nickIT,cthit/nickIT
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/<id>') def example(id=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp Add query capture in flask.
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/search/<query>') def example(query=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp
<commit_before>from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/<id>') def example(id=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp <commit_msg>Add query captur...
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/search/<query>') def example(query=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp
from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/<id>') def example(id=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp Add query capture in flask.from flask impor...
<commit_before>from flask import Flask, Response app = Flask(__name__) @app.route('/') def hello_world(): return 'Hello, World!' @app.route('/<id>') def example(id=None): resp = Response(id) resp.headers['Access-Control-Allow-Origin'] = 'http://localhost:3000' return resp <commit_msg>Add query captur...
ed64d0611ccf047c1da8ae85d13c89c77dfe1930
packages/grid/backend/grid/tests/utils/auth.py
packages/grid/backend/grid/tests/utils/auth.py
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "password": password} res = await client.post(app.url_path_...
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient OWNER_EMAIL = "[email protected]" OWNER_PWD = "changethis" async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "p...
ADD constant test variables OWNER_EMAIL / OWNER_PWD
ADD constant test variables OWNER_EMAIL / OWNER_PWD
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "password": password} res = await client.post(app.url_path_...
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient OWNER_EMAIL = "[email protected]" OWNER_PWD = "changethis" async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "p...
<commit_before># stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "password": password} res = await client.pos...
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient OWNER_EMAIL = "[email protected]" OWNER_PWD = "changethis" async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "p...
# stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "password": password} res = await client.post(app.url_path_...
<commit_before># stdlib from typing import Dict # third party from fastapi import FastAPI from httpx import AsyncClient async def authenticate_user( app: FastAPI, client: AsyncClient, email: str, password: str ) -> Dict[str, str]: user_login = {"email": email, "password": password} res = await client.pos...
fb3a0db023161fbf5b08147dfac1b56989918bf6
tvseries/core/models.py
tvseries/core/models.py
from tvseries.ext import db class TVSerie(db.Model): __table_args__ = {'sqlite_autoincrement': True} id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) descri...
from tvseries.ext import db class TVSerie(db.Model): id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) description = db.Column(db.Text, nullable=True) episod...
Remove autoincrement sqlite paramether from model
Remove autoincrement sqlite paramether from model
Python
mit
rafaelhenrique/flask_tutorial,python-sorocaba/flask_tutorial,python-sorocaba/flask_tutorial,rafaelhenrique/flask_tutorial,python-sorocaba/flask_tutorial
from tvseries.ext import db class TVSerie(db.Model): __table_args__ = {'sqlite_autoincrement': True} id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) descri...
from tvseries.ext import db class TVSerie(db.Model): id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) description = db.Column(db.Text, nullable=True) episod...
<commit_before>from tvseries.ext import db class TVSerie(db.Model): __table_args__ = {'sqlite_autoincrement': True} id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=Fa...
from tvseries.ext import db class TVSerie(db.Model): id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) description = db.Column(db.Text, nullable=True) episod...
from tvseries.ext import db class TVSerie(db.Model): __table_args__ = {'sqlite_autoincrement': True} id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=False) descri...
<commit_before>from tvseries.ext import db class TVSerie(db.Model): __table_args__ = {'sqlite_autoincrement': True} id = db.Column(db.Integer(), nullable=False, unique=True, autoincrement=True, primary_key=True) name = db.Column(db.String(50), unique=True, nullable=Fa...
72045f86b25b396160e1a4c9237e977ed575afb2
apps/catalogue/constants.py
apps/catalogue/constants.py
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
Support for 'deed.pl' license URL.
Support for 'deed.pl' license URL.
Python
agpl-3.0
fnp/wolnelektury,fnp/wolnelektury,fnp/wolnelektury,fnp/wolnelektury
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
<commit_before># -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': {...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
# -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': { 'icon'...
<commit_before># -*- coding: utf-8 -*- # This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later. # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information. # from django.utils.translation import ugettext_lazy as _ LICENSES = { 'http://creativecommons.org/licenses/by-sa/3.0/': {...
c830e66431dab010309b4ad92ef38c418ec7029b
models.py
models.py
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
Add default votes and topscores
Add default votes and topscores
Python
mit
dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend,dpuleri/simpoll_backend
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
<commit_before>import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 ...
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 = db.StringFiel...
<commit_before>import datetime from flask import url_for from Simpoll import db class Poll(db.Document): created_at = db.DateTimeField(default=datetime.datetime.now, required=True) question = db.StringField(max_length=255, required=True) option1 = db.StringField(max_length=255, required=True) option2 ...
eb9a3bd81a09efec8646a2c1de3fac9271762d33
opps/__init__.py
opps/__init__.py
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 2) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 3) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
Upgrade VERSION 0.1.2 to 0.1.3 on @oppsproject Milestones 2 (github)
Upgrade VERSION 0.1.2 to 0.1.3 on @oppsproject Milestones 2 (github)
Python
mit
YACOWS/opps,williamroot/opps,opps/opps,opps/opps,jeanmask/opps,jeanmask/opps,jeanmask/opps,williamroot/opps,williamroot/opps,YACOWS/opps,opps/opps,YACOWS/opps,opps/opps,YACOWS/opps,williamroot/opps,jeanmask/opps
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 2) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 3) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 2) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __lic...
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 3) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 2) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __license__ = u"MIT ...
<commit_before>#!/usr/bin/env python # -*- coding: utf-8 -*- VERSION = (0, 1, 2) __version__ = ".".join(map(str, VERSION)) __status__ = "Development" __description__ = u"Opps CMS websites magazines and high-traffic" __author__ = u"Thiago Avelino" __credits__ = [] __email__ = u"[email protected]" __lic...
041afe6cec2fadd37b8e18fb1ac8a01cf9050dbf
xpserver_api/urls.py
xpserver_api/urls.py
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^activate_account/$', view...
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-auth/', include('rest...
Add login/logout for DRF web interface
Add login/logout for DRF web interface
Python
mit
xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server,xp2017-hackergarden/server
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^activate_account/$', view...
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-auth/', include('rest...
<commit_before>from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^activate_a...
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-auth/', include('rest...
from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^activate_account/$', view...
<commit_before>from xpserver_api import views from django.conf.urls import url, include from rest_framework import routers from xpserver_api.serializers import UserViewSet router = routers.DefaultRouter() router.register(r'users', UserViewSet) urlpatterns = [ url(r'^', include(router.urls)), url(r'^activate_a...
c7f91d43fc833e43f20c3412ed1fe89c84a39704
forumuser/tests/test_views.py
forumuser/tests/test_views.py
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
Remove logged in user test from forumuser
Remove logged in user test from forumuser
Python
mit
hellsgate1001/thatforum_django,hellsgate1001/thatforum_django,hellsgate1001/thatforum_django
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
<commit_before>from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def te...
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def test_non_logged_i...
<commit_before>from django.core.urlresolvers import reverse from forumuser.tests.factories import UserFactory from thatforum.test_helpers import ThatForumTestCase class TestUserListView(ThatForumTestCase): def setUp(self): self.user = UserFactory() self.list_url = reverse('user:list') def te...
2546bb13065f35f4ddbfee76c63717e0692beabf
rst2pdf/utils.py
rst2pdf/utils.py
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
Fix encoding (thanks to Yasushi Masuda)
Fix encoding (thanks to Yasushi Masuda)
Python
mit
rst2pdf/rst2pdf,pombreda/rst2pdf,rst2pdf/rst2pdf,liuyi1112/rst2pdf,liuyi1112/rst2pdf,pombreda/rst2pdf
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
<commit_before>#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others...
# -*- coding: utf-8 -*- #$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can...
#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others on request): ...
<commit_before>#$HeadURL$ #$LastChangedDate$ #$LastChangedRevision$ import sys from reportlab.platypus import PageBreak, Spacer from flowables import * import shlex from log import log def parseRaw (data): '''Parse and process a simple DSL to handle creation of flowables. Supported (can add others...
e7a4402736518ae27cc87d4cdb22d411de2fc301
packages/mono.py
packages/mono.py
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
Fix shell syntax for non bash shells
Fix shell syntax for non bash shells The custom make command in mono.py is executed with the default shell, which on some systems doesn't support the fancy for loop syntax, like dash on Ubuntu.
Python
mit
mono/bockbuild,BansheeMediaPlayer/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,mono/bockbuild,BansheeMediaPlayer/bockbuild,bl8/bockbuild,bl8/bockbuild
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
<commit_before>class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=n...
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=no', '--with...
<commit_before>class MonoPackage (Package): def __init__ (self): Package.__init__ (self, 'mono', '2.10', sources = [ 'http://ftp.novell.com/pub/%{name}/sources/%{name}/%{name}-%{version}.tar.bz2', 'patches/mono-runtime-relocation.patch' ], configure_flags = [ '--with-jit=yes', '--with-ikvm=n...
99f53e007aac85aba162136dfa8ce131c965308b
pale/__init__.py
pale/__init__.py
import inspect import types import adapters import arguments import config import context from endpoint import Endpoint from resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, types.ModuleType) and \ ...
import inspect import types from . import adapters from . import arguments from . import config from . import context from .endpoint import Endpoint from .resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, ...
Add dots to pale things
Add dots to pale things
Python
mit
Loudr/pale
import inspect import types import adapters import arguments import config import context from endpoint import Endpoint from resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, types.ModuleType) and \ ...
import inspect import types from . import adapters from . import arguments from . import config from . import context from .endpoint import Endpoint from .resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, ...
<commit_before>import inspect import types import adapters import arguments import config import context from endpoint import Endpoint from resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, types.ModuleTyp...
import inspect import types from . import adapters from . import arguments from . import config from . import context from .endpoint import Endpoint from .resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, ...
import inspect import types import adapters import arguments import config import context from endpoint import Endpoint from resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, types.ModuleType) and \ ...
<commit_before>import inspect import types import adapters import arguments import config import context from endpoint import Endpoint from resource import NoContentResource, Resource, ResourceList ImplementationModule = "_pale__api_implementation" def is_pale_module(obj): is_it = isinstance(obj, types.ModuleTyp...
22ecda2f6879a140783a4e0105fb215e8cb12536
passwd_change.py
passwd_change.py
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 5: keys_file = _args[1] target_file = _args[2] result_file = _args[3] log_file = _args[4] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
Add log file name to command line.
Add log file name to command line.
Python
mit
maxsocl/oldmailer
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 5: keys_file = _args[1] target_file = _args[2] result_file = _args[3] log_file = _args[4] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
<commit_before>#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 5: keys_file = _args[1] target_file = _args[2] result_file = _args[3] log_file = _args[4] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() keys = [key.s...
<commit_before>#!/usr/bin/env python3 import sys _args = sys.argv if __name__ == "__main__": if len(_args) == 4: keys_file = _args[1] target_file = _args[2] result_file = _args[3] try: with open(keys_file, 'r') as k: keys = k.readlines() ...
4271d2ce0fc1cd2db4dab30aa59fece48c83f0bf
go/base/models.py
go/base/models.py
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
Enable search whenever a user profile is saved (to allow easier recovery from accounts created incorrectly).
Enable search whenever a user profile is saved (to allow easier recovery from accounts created incorrectly).
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
<commit_before>from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_a...
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_account_store():...
<commit_before>from django.db import models from django.db.models.signals import post_save from django.contrib.auth.models import User from django.conf import settings from vumi.persist.riak_manager import RiakManager from go.vumitools.account import AccountStore from go.base.utils import vumi_api_for_user def get_a...
473e900fba1378e212a42c93624d1dd4f8acfb6e
fjord/alerts/migrations/0002_alertflavor_allowed_tokens.py
fjord/alerts/migrations/0002_alertflavor_allowed_tokens.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
Fix migration for fixing AlertFlavor.allowed_tokens
Fix migration for fixing AlertFlavor.allowed_tokens Recently, I changed AlertFlavor.allowed_tokens so that you could create a flavor without specifying the tokens that go with it (i.e. I added blank=True). The resulting migration for that change does a bunch of SQL, but doesn't actually change the db. So I'm tweakin...
Python
bsd-3-clause
hoosteeno/fjord,mozilla/fjord,Ritsyy/fjord,rlr/fjord,mozilla/fjord,rlr/fjord,hoosteeno/fjord,staranjeet/fjord,Ritsyy/fjord,hoosteeno/fjord,staranjeet/fjord,lgp171188/fjord,lgp171188/fjord,rlr/fjord,lgp171188/fjord,mozilla/fjord,lgp171188/fjord,Ritsyy/fjord,rlr/fjord,hoosteeno/fjord,staranjeet/fjord,staranjeet/fjord,moz...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( ...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( model_name...
<commit_before># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('api_auth', '0001_initial'), ('alerts', '0001_initial'), ] operations = [ migrations.AddField( ...
32320073263926ca6a36956e7cf2359254105d6c
hierarchical_auth/admin.py
hierarchical_auth/admin.py
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
Work with custom user models in django >= 1.5
Work with custom user models in django >= 1.5
Python
bsd-3-clause
digitalemagine/django-hierarchical-auth,zhangguiyu/django-hierarchical-auth
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
<commit_before>from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_us...
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_user_model Us...
<commit_before>from django.contrib import admin from django.conf import settings from django.db.models import get_model from django.contrib.auth.models import Group from django.contrib.auth.admin import GroupAdmin from django.contrib.auth.forms import UserChangeForm try: from django.contrib.auth import get_us...
471d9c2ab901a018ef7b64464f19898dfbc9dd12
ca_mb/__init__.py
ca_mb/__init__.py
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
Fix for new divisions and parties
ca_mb: Fix for new divisions and parties
Python
mit
opencivicdata/scrapers-ca,opencivicdata/scrapers-ca
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
<commit_before>from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties ...
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties = [ {'n...
<commit_before>from utils import CanadianJurisdiction class Manitoba(CanadianJurisdiction): classification = 'legislature' division_id = 'ocd-division/country:ca/province:mb' division_name = 'Manitoba' name = 'Legislative Assembly of Manitoba' url = 'http://www.gov.mb.ca/legislature/' parties ...
f0ed3faa716c05315ca0108650c49ef4e83f1f59
deflect/views.py
deflect/views.py
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
Use a dict representation of the GET QueryDict
Use a dict representation of the GET QueryDict
Python
bsd-3-clause
jbittel/django-deflect
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
<commit_before>from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models imp...
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models import ShortURLAli...
<commit_before>from __future__ import unicode_literals import base32_crockford import logging from django.http import Http404 from django.http import HttpResponsePermanentRedirect from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404 from .models import ShortURL from .models imp...
0afdab2f6feced873c88ba1e73fdde0dad5f041e
skytap/Quotas.py
skytap/Quotas.py
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
Comment re: API usage to clarify quotas.
Comment re: API usage to clarify quotas.
Python
mit
mapledyne/skytap,FulcrumIT/skytap
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
<commit_before>"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quo...
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quotas(SkytapGroup...
<commit_before>"""Support for Skytap API access to the company quotas. If accessed via the command line (``python -m skytap.Quotas``) this will return the quotas from Skytap in a JSON format. """ import json import sys from skytap.models.Quota import Quota from skytap.models.SkytapGroup import SkytapGroup class Quo...
829f71c488f2332d66362d7aea309a8b8958d522
jarviscli/tests/test_voice.py
jarviscli/tests/test_voice.py
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
Fix unit test of voice function
Fix unit test of voice function
Python
mit
sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis,sukeesh/Jarvis
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
<commit_before>import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(Plugi...
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(PluginTest): # ...
<commit_before>import unittest from tests import PluginTest from plugins import voice from CmdInterpreter import JarvisAPI from Jarvis import Jarvis # this test class contains test cases for the plugins "gtts" and "disable_gtts" # which are included in the "voice.py" file in the "plugins" folder class VoiceTest(Plugi...
d5e5ddbd1e1108f327a8d4c27cc18925cf7a3e1a
src/sentry/api/endpoints/project_stats.py
src/sentry/api/endpoints/project_stats.py
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): def get(self, request, pro...
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint, DocSection from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): doc_section = ...
Add project stats to docs
Add project stats to docs
Python
bsd-3-clause
looker/sentry,kevinlondon/sentry,pauloschilling/sentry,1tush/sentry,daevaorn/sentry,wong2/sentry,fuziontech/sentry,gencer/sentry,imankulov/sentry,felixbuenemann/sentry,ifduyue/sentry,gg7/sentry,1tush/sentry,camilonova/sentry,hongliang5623/sentry,boneyao/sentry,camilonova/sentry,songyi199111/sentry,llonchj/sentry,mvaled...
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): def get(self, request, pro...
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint, DocSection from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): doc_section = ...
<commit_before>from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): def get(sel...
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint, DocSection from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): doc_section = ...
from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): def get(self, request, pro...
<commit_before>from __future__ import absolute_import from rest_framework.response import Response from sentry.app import tsdb from sentry.api.base import BaseStatsEndpoint from sentry.api.permissions import assert_perm from sentry.models import Project class ProjectStatsEndpoint(BaseStatsEndpoint): def get(sel...
2230832033df7f5d8511dc75f799a9cc738dc46f
games/managers.py
games/managers.py
from django.db.models import Manager class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: return query.filter(Q(published=Tru...
from django.db.models import Manager from django.db.models import Q class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: retu...
Fix missing import and bad query for screenshots
Fix missing import and bad query for screenshots
Python
agpl-3.0
Turupawn/website,Turupawn/website,lutris/website,lutris/website,lutris/website,lutris/website,Turupawn/website,Turupawn/website
from django.db.models import Manager class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: return query.filter(Q(published=Tru...
from django.db.models import Manager from django.db.models import Q class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: retu...
<commit_before>from django.db.models import Manager class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: return query.filter(...
from django.db.models import Manager from django.db.models import Q class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: retu...
from django.db.models import Manager class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: return query.filter(Q(published=Tru...
<commit_before>from django.db.models import Manager class ScreenshotManager(Manager): def published(self, user=None, is_staff=False): query = self.get_query_set() query = query.order_by('uploaded_at') if is_staff: return query elif user: return query.filter(...
ebba310de088d8d295e1fc94d368da4edc430756
user/admin.py
user/admin.py
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') search_fi...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
Set User Admin default ordering.
Ch23: Set User Admin default ordering.
Python
bsd-2-clause
jambonrose/DjangoUnleashed-1.8,jambonrose/DjangoUnleashed-1.8
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') search_fi...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined'...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') ordering ...
from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined') search_fi...
<commit_before>from django.contrib import admin from .models import User @admin.register(User) class UserAdmin(admin.ModelAdmin): # list view list_display = ( 'email', 'is_staff', 'is_superuser') list_filter = ( 'is_staff', 'is_superuser', 'profile__joined'...
988678cf6d0eb8459588e1067dd3a91468cbaa2d
numpy/numarray/setup.py
numpy/numarray/setup.py
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/') config.add_extension('_capi', sources=['_capi.c'], ...
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/*') config.add_extension('_capi', sources=['_capi.c'], ...
Fix installation of numarray headers on Windows.
Fix installation of numarray headers on Windows.
Python
bsd-3-clause
WarrenWeckesser/numpy,GrimDerp/numpy,kirillzhuravlev/numpy,yiakwy/numpy,mortada/numpy,GaZ3ll3/numpy,maniteja123/numpy,abalkin/numpy,Yusa95/numpy,bmorris3/numpy,ajdawson/numpy,pyparallel/numpy,kiwifb/numpy,pelson/numpy,solarjoe/numpy,mhvk/numpy,jakirkham/numpy,grlee77/numpy,naritta/numpy,WarrenWeckesser/numpy,ajdawson/n...
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/') config.add_extension('_capi', sources=['_capi.c'], ...
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/*') config.add_extension('_capi', sources=['_capi.c'], ...
<commit_before>from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/') config.add_extension('_capi', sources=['_...
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/*') config.add_extension('_capi', sources=['_capi.c'], ...
from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/') config.add_extension('_capi', sources=['_capi.c'], ...
<commit_before>from os.path import join def configuration(parent_package='',top_path=None): from numpy.distutils.misc_util import Configuration config = Configuration('numarray',parent_package,top_path) config.add_data_files('numpy/') config.add_extension('_capi', sources=['_...
602d1ceb755d5d74312e965b5515bbe22c868fd4
sale_commission_pricelist/models/sale_order.py
sale_commission_pricelist/models/sale_order.py
# -*- coding: utf-8 -*- # Copyright 2018 Carlos Dauden - Tecnativa <[email protected]> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' @api.onchange('product_id', 'product_uom_qty') de...
# -*- coding: utf-8 -*- # Copyright 2018 Tecnativa - Carlos Dauden <[email protected]> # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' def _get_...
Make this to work on button recompute
[FIX] sale_commission_pricelist: Make this to work on button recompute
Python
agpl-3.0
OCA/commission,OCA/commission
# -*- coding: utf-8 -*- # Copyright 2018 Carlos Dauden - Tecnativa <[email protected]> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' @api.onchange('product_id', 'product_uom_qty') de...
# -*- coding: utf-8 -*- # Copyright 2018 Tecnativa - Carlos Dauden <[email protected]> # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' def _get_...
<commit_before># -*- coding: utf-8 -*- # Copyright 2018 Carlos Dauden - Tecnativa <[email protected]> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' @api.onchange('product_id', 'product_u...
# -*- coding: utf-8 -*- # Copyright 2018 Tecnativa - Carlos Dauden <[email protected]> # Copyright 2018 Tecnativa - Pedro M. Baeza # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' def _get_...
# -*- coding: utf-8 -*- # Copyright 2018 Carlos Dauden - Tecnativa <[email protected]> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' @api.onchange('product_id', 'product_uom_qty') de...
<commit_before># -*- coding: utf-8 -*- # Copyright 2018 Carlos Dauden - Tecnativa <[email protected]> # License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). from odoo import api, models class SaleOrderLine(models.Model): _inherit = 'sale.order.line' @api.onchange('product_id', 'product_u...
40bfd177cea186bc975fdc51ab61cf4d9e7026a3
tests/testapp/manage.py
tests/testapp/manage.py
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
Make sure to use abspath when adding dynamic_choices to sys.path
Make sure to use abspath when adding dynamic_choices to sys.path
Python
mit
charettes/django-dynamic-choices,charettes/django-dynamic-choices,charettes/django-dynamic-choices
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
<commit_before>#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\n...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to ...
<commit_before>#!/usr/bin/env python from django.core.management import execute_manager try: import settings # Assumed to be in the same directory. except ImportError: import sys sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\n...
5b563f91d5e7bad48d8a90a190749bcbf09264c0
tests/test_basic.py
tests/test_basic.py
import sys import pubrunner import pubrunner.command_line import os def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line...
import sys import pubrunner import pubrunner.command_line import os import time def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner....
Add sleeps to test to avoid eutils issues
Add sleeps to test to avoid eutils issues
Python
mit
jakelever/pubrunner,jakelever/pubrunner
import sys import pubrunner import pubrunner.command_line import os def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line...
import sys import pubrunner import pubrunner.command_line import os import time def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner....
<commit_before>import sys import pubrunner import pubrunner.command_line import os def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunn...
import sys import pubrunner import pubrunner.command_line import os import time def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner....
import sys import pubrunner import pubrunner.command_line import os def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunner.command_line...
<commit_before>import sys import pubrunner import pubrunner.command_line import os def test_countwords(): parentDir = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) projectPath = os.path.join(parentDir,'examples','CountWords') sys.argv = ['pubrunner', '--defaultsettings', '--test',projectPath] pubrunn...
bfbc156d9efca37c35d18481c4366d3e6deed1ba
slave/skia_slave_scripts/chromeos_run_bench.py
slave/skia_slave_scripts/chromeos_run_bench.py
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep, BuildStepWarning from chromeos_build_step import ChromeOS...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep from chromeos_build_step import ChromeOSBuildStep from run...
Stop skipping Bench on ChromeOS
Stop skipping Bench on ChromeOS (RunBuilders:Skia_ChromeOS_Alex_Debug_32) Unreviewed. git-svn-id: 32fc27f4dcfb6c0385cd9719852b95fe6680452d@8094 2bbb7eff-a529-9590-31e7-b0007b416f81
Python
bsd-3-clause
Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbot,google/skia-buildbot,google/skia-buildbot,Tiger66639/skia-buildbot,google/skia-buildbo...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep, BuildStepWarning from chromeos_build_step import ChromeOS...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep from chromeos_build_step import ChromeOSBuildStep from run...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep, BuildStepWarning from chromeos_build_step ...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep from chromeos_build_step import ChromeOSBuildStep from run...
#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep, BuildStepWarning from chromeos_build_step import ChromeOS...
<commit_before>#!/usr/bin/env python # Copyright (c) 2013 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. """ Run the Skia bench executable. """ from build_step import BuildStep, BuildStepWarning from chromeos_build_step ...
e781229453a5d6d654c6ab6acae5ad2866b28f9c
tools/srenqueuer.py
tools/srenqueuer.py
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
Handle exceptions better in enqueuer
Handle exceptions better in enqueuer We don't care too much, so just swallow them. People will complain at me if their "pushed" jobs don't get run (eventually).
Python
mpl-2.0
mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
<commit_before>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): ...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): parser = stoner...
<commit_before>#!/usr/bin/env python # This Source Code Form is subject to the terms of the Mozilla Public License, # v. 2.0. If a copy of the MPL was not distributed with this file, You can # obtain one at http://mozilla.org/MPL/2.0/. import json import requests import stoneridge @stoneridge.main def main(): ...
1de37d04c71713f811d057f63f505348f7124c54
{{cookiecutter.repo_name}}/config/urls.py
{{cookiecutter.repo_name}}/config/urls.py
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('apps.users.urls', namespace='users')), url(r'^$', TemplateView.as_view(template_name='start.html'), na...
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', TemplateView.as_view(template_name='start.html'), name='start'), ]
Revert to old master 2
Revert to old master 2
Python
mit
ameistad/amei-django-template,ameistad/dokku-django-template,ameistad/amei-django-template,ameistad/dokku-django-template,ameistad/amei-django-template,ameistad/django-template,ameistad/amei-django-template,ameistad/dokku-django-template,ameistad/django-template,ameistad/django-template
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('apps.users.urls', namespace='users')), url(r'^$', TemplateView.as_view(template_name='start.html'), na...
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', TemplateView.as_view(template_name='start.html'), name='start'), ]
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('apps.users.urls', namespace='users')), url(r'^$', TemplateView.as_view(template_name='s...
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', TemplateView.as_view(template_name='start.html'), name='start'), ]
from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('apps.users.urls', namespace='users')), url(r'^$', TemplateView.as_view(template_name='start.html'), na...
<commit_before>from django.conf.urls import include, url from django.contrib import admin from django.views.generic import TemplateView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^users/', include('apps.users.urls', namespace='users')), url(r'^$', TemplateView.as_view(template_name='s...
86142c9893d52f3c339675c89b50f27c4bdc64e6
localtv/openid/__init__.py
localtv/openid/__init__.py
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None): """ We assume that the openid_user has already been externally validated, and simply return the appropriate User, """ return op...
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None, username=None, password=None): """ If we get an openid_userassume that the openid_user has already been externally validated, and simply return ...
Make all users get logged in through the OpenIdBackend
Make all users get logged in through the OpenIdBackend By routing all the logins through the OpenIdBackend, we can handle the permissions checking on our own. This allows us use apps (like comments) which depend on the Django authentication system, but with our own permissions system.
Python
agpl-3.0
natea/Miro-Community,natea/Miro-Community,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity,pculture/mirocommunity
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None): """ We assume that the openid_user has already been externally validated, and simply return the appropriate User, """ return op...
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None, username=None, password=None): """ If we get an openid_userassume that the openid_user has already been externally validated, and simply return ...
<commit_before>from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None): """ We assume that the openid_user has already been externally validated, and simply return the appropriate User, """ ...
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None, username=None, password=None): """ If we get an openid_userassume that the openid_user has already been externally validated, and simply return ...
from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None): """ We assume that the openid_user has already been externally validated, and simply return the appropriate User, """ return op...
<commit_before>from django.contrib.auth.models import User from localtv.models import SiteLocation class OpenIdBackend: def authenticate(self, openid_user=None): """ We assume that the openid_user has already been externally validated, and simply return the appropriate User, """ ...