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
e4efa5a447e85c11723991870bd6fc632bc97ed5
us_ignite/common/templatetags/common_markdown.py
us_ignite/common/templatetags/common_markdown.py
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from us_ignite.common import output register = template.Library() @register.filter(is_safe=True) @stringfilter def markdown(value): return mark_safe(output.to_html(value))
Add template tag to render ``markdown``.
Add template tag to render ``markdown``.
Python
bsd-3-clause
us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite,us-ignite/us_ignite
Add template tag to render ``markdown``.
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from us_ignite.common import output register = template.Library() @register.filter(is_safe=True) @stringfilter def markdown(value): return mark_safe(output.to_html(value))
<commit_before><commit_msg>Add template tag to render ``markdown``.<commit_after>
from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from us_ignite.common import output register = template.Library() @register.filter(is_safe=True) @stringfilter def markdown(value): return mark_safe(output.to_html(value))
Add template tag to render ``markdown``.from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from us_ignite.common import output register = template.Library() @register.filter(is_safe=True) @stringfilter def markdown(value): return mar...
<commit_before><commit_msg>Add template tag to render ``markdown``.<commit_after>from django import template from django.template.defaultfilters import stringfilter from django.utils.safestring import mark_safe from us_ignite.common import output register = template.Library() @register.filter(is_safe=True) @stringf...
2cdc649d810e49c3879ec055741b1bdd909c55e0
feincms/management/commands/rebuild_mptt.py
feincms/management/commands/rebuild_mptt.py
# ------------------------------------------------------------------------ # coding=utf-8 # $Id$ # ------------------------------------------------------------------------ from django.core.management.base import NoArgsCommand from django.db import transaction from feincms.module.page.models import Page class Command...
Add a command to rebuild the mptt tree.
Add a command to rebuild the mptt tree. Only for emergencies to get your tree back in useable state should anything happen to the node indexes.
Python
bsd-3-clause
mjl/feincms,matthiask/django-content-editor,michaelkuty/feincms,matthiask/feincms2-content,nickburlett/feincms,matthiask/feincms2-content,michaelkuty/feincms,joshuajonah/feincms,joshuajonah/feincms,hgrimelid/feincms,hgrimelid/feincms,michaelkuty/feincms,feincms/feincms,pjdelport/feincms,nickburlett/feincms,matthiask/dj...
Add a command to rebuild the mptt tree. Only for emergencies to get your tree back in useable state should anything happen to the node indexes.
# ------------------------------------------------------------------------ # coding=utf-8 # $Id$ # ------------------------------------------------------------------------ from django.core.management.base import NoArgsCommand from django.db import transaction from feincms.module.page.models import Page class Command...
<commit_before><commit_msg>Add a command to rebuild the mptt tree. Only for emergencies to get your tree back in useable state should anything happen to the node indexes.<commit_after>
# ------------------------------------------------------------------------ # coding=utf-8 # $Id$ # ------------------------------------------------------------------------ from django.core.management.base import NoArgsCommand from django.db import transaction from feincms.module.page.models import Page class Command...
Add a command to rebuild the mptt tree. Only for emergencies to get your tree back in useable state should anything happen to the node indexes.# ------------------------------------------------------------------------ # coding=utf-8 # $Id$ # ------------------------------------------------------------------------ fro...
<commit_before><commit_msg>Add a command to rebuild the mptt tree. Only for emergencies to get your tree back in useable state should anything happen to the node indexes.<commit_after># ------------------------------------------------------------------------ # coding=utf-8 # $Id$ # ------------------------------------...
92fd6c4785523a6891aa02eed460451552fb186e
scripts/tag_lyrics.py
scripts/tag_lyrics.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # needs mutagen # grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/ # simplified to only work on one file and get lyrics from stdin import os import sys import codecs from mutagen.mp3 import MP3 from mutagen.id3 ...
Add a little script to create test files with lyrics.
Add a little script to create test files with lyrics. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@3088 35dc7657-300d-0410-a2e5-dc2837fedb53
Python
lgpl-2.1
Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123,Distrotech/mpg123
Add a little script to create test files with lyrics. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@3088 35dc7657-300d-0410-a2e5-dc2837fedb53
#!/usr/bin/env python # -*- coding: utf-8 -*- # needs mutagen # grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/ # simplified to only work on one file and get lyrics from stdin import os import sys import codecs from mutagen.mp3 import MP3 from mutagen.id3 ...
<commit_before><commit_msg>Add a little script to create test files with lyrics. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@3088 35dc7657-300d-0410-a2e5-dc2837fedb53<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # needs mutagen # grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-tag/ # simplified to only work on one file and get lyrics from stdin import os import sys import codecs from mutagen.mp3 import MP3 from mutagen.id3 ...
Add a little script to create test files with lyrics. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@3088 35dc7657-300d-0410-a2e5-dc2837fedb53#!/usr/bin/env python # -*- coding: utf-8 -*- # needs mutagen # grabbed from: http://code.activestate.com/recipes/577138-embed-lyrics-into-mp3-files-using-mutagen-uslt-...
<commit_before><commit_msg>Add a little script to create test files with lyrics. git-svn-id: 793bb72743a407948e3701719c462b6a765bc435@3088 35dc7657-300d-0410-a2e5-dc2837fedb53<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # needs mutagen # grabbed from: http://code.activestate.com/recipes/577138-embed-...
ac3ef2ed9d8fd5418a5f7365dde78afc7a9ae29c
getMoisture.py
getMoisture.py
#!/usr/bin/python import spidev import time import RPi.GPIO as GPIO import datetime import time #je potreba nastavit SPI na raspberry #GPIO GPIO.setmode(GPIO.BOARD) pin = 11 GPIO.setup(pin,GPIO.OUT) GPIO.output(pin,True) # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) # Function to read SPI data from MCP3008 ...
Add script for soil moisture sensors.
Add script for soil moisture sensors.
Python
lgpl-2.1
TomasBedrnik/Meteo-Backend,TomasBedrnik/Meteo-Backend,TomasBedrnik/Meteo-Backend
Add script for soil moisture sensors.
#!/usr/bin/python import spidev import time import RPi.GPIO as GPIO import datetime import time #je potreba nastavit SPI na raspberry #GPIO GPIO.setmode(GPIO.BOARD) pin = 11 GPIO.setup(pin,GPIO.OUT) GPIO.output(pin,True) # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) # Function to read SPI data from MCP3008 ...
<commit_before><commit_msg>Add script for soil moisture sensors.<commit_after>
#!/usr/bin/python import spidev import time import RPi.GPIO as GPIO import datetime import time #je potreba nastavit SPI na raspberry #GPIO GPIO.setmode(GPIO.BOARD) pin = 11 GPIO.setup(pin,GPIO.OUT) GPIO.output(pin,True) # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) # Function to read SPI data from MCP3008 ...
Add script for soil moisture sensors.#!/usr/bin/python import spidev import time import RPi.GPIO as GPIO import datetime import time #je potreba nastavit SPI na raspberry #GPIO GPIO.setmode(GPIO.BOARD) pin = 11 GPIO.setup(pin,GPIO.OUT) GPIO.output(pin,True) # Open SPI bus spi = spidev.SpiDev() spi.open(0,0) # Fu...
<commit_before><commit_msg>Add script for soil moisture sensors.<commit_after>#!/usr/bin/python import spidev import time import RPi.GPIO as GPIO import datetime import time #je potreba nastavit SPI na raspberry #GPIO GPIO.setmode(GPIO.BOARD) pin = 11 GPIO.setup(pin,GPIO.OUT) GPIO.output(pin,True) # Open SPI bus s...
6abdfdd5f33aaaf05df4821ae14f594cb5b826a7
src/test/swarm_test.py
src/test/swarm_test.py
import unittest import pyoptima as opt class SwarmTest(unittest.TestCase): def test_swarm_with_parabola(self): hyper_params = {'phi_local': 1, 'phi_global': 1, 'omega': 0.01} params = {'x0': (-1, 1), 'x1': (-1, 1)} num_particles = 100 s = opt.Swarm(params, hyper_params, num_parti...
Add python test for swarm optimisation
Add python test for swarm optimisation This will still need to be hooked into the main build system
Python
mit
samueljackson92/optima,samueljackson92/metaopt,samueljackson92/optima,samueljackson92/metaopt
Add python test for swarm optimisation This will still need to be hooked into the main build system
import unittest import pyoptima as opt class SwarmTest(unittest.TestCase): def test_swarm_with_parabola(self): hyper_params = {'phi_local': 1, 'phi_global': 1, 'omega': 0.01} params = {'x0': (-1, 1), 'x1': (-1, 1)} num_particles = 100 s = opt.Swarm(params, hyper_params, num_parti...
<commit_before><commit_msg>Add python test for swarm optimisation This will still need to be hooked into the main build system<commit_after>
import unittest import pyoptima as opt class SwarmTest(unittest.TestCase): def test_swarm_with_parabola(self): hyper_params = {'phi_local': 1, 'phi_global': 1, 'omega': 0.01} params = {'x0': (-1, 1), 'x1': (-1, 1)} num_particles = 100 s = opt.Swarm(params, hyper_params, num_parti...
Add python test for swarm optimisation This will still need to be hooked into the main build systemimport unittest import pyoptima as opt class SwarmTest(unittest.TestCase): def test_swarm_with_parabola(self): hyper_params = {'phi_local': 1, 'phi_global': 1, 'omega': 0.01} params = {'x0': (-1, 1...
<commit_before><commit_msg>Add python test for swarm optimisation This will still need to be hooked into the main build system<commit_after>import unittest import pyoptima as opt class SwarmTest(unittest.TestCase): def test_swarm_with_parabola(self): hyper_params = {'phi_local': 1, 'phi_global': 1, 'ome...
b0c8a5b114837ae9b6f4d7e81fc587ac0d1fc3a4
test/test_hpack_structures.py
test/test_hpack_structures.py
# -*- coding: utf-8 -*- from hyper.http20.hpack_structures import Reference class TestReference(object): """ Tests of the HPACK reference structure. """ def test_references_can_be_created(self): r = Reference(None) assert r def test_two_references_to_the_same_object_compare_equal(s...
Test the HPACK reference structure.
Test the HPACK reference structure.
Python
mit
fredthomsen/hyper,jdecuyper/hyper,plucury/hyper,jdecuyper/hyper,lawnmowerlatte/hyper,plucury/hyper,fredthomsen/hyper,irvind/hyper,masaori335/hyper,masaori335/hyper,Lukasa/hyper,lawnmowerlatte/hyper,irvind/hyper,Lukasa/hyper
Test the HPACK reference structure.
# -*- coding: utf-8 -*- from hyper.http20.hpack_structures import Reference class TestReference(object): """ Tests of the HPACK reference structure. """ def test_references_can_be_created(self): r = Reference(None) assert r def test_two_references_to_the_same_object_compare_equal(s...
<commit_before><commit_msg>Test the HPACK reference structure.<commit_after>
# -*- coding: utf-8 -*- from hyper.http20.hpack_structures import Reference class TestReference(object): """ Tests of the HPACK reference structure. """ def test_references_can_be_created(self): r = Reference(None) assert r def test_two_references_to_the_same_object_compare_equal(s...
Test the HPACK reference structure.# -*- coding: utf-8 -*- from hyper.http20.hpack_structures import Reference class TestReference(object): """ Tests of the HPACK reference structure. """ def test_references_can_be_created(self): r = Reference(None) assert r def test_two_references...
<commit_before><commit_msg>Test the HPACK reference structure.<commit_after># -*- coding: utf-8 -*- from hyper.http20.hpack_structures import Reference class TestReference(object): """ Tests of the HPACK reference structure. """ def test_references_can_be_created(self): r = Reference(None) ...
a233f685f6cb514420fd534388d51ee92459d886
src/diamond/__init__.py
src/diamond/__init__.py
# coding=utf-8 import os import sys import string import logging import time import traceback import configobj import socket import re import os import sys import re import logging import time import datetime import random import urllib2 import base64 import csv import platform import string import traceback import co...
# coding=utf-8 """ Diamond module init code """ import os import sys import logging import time import traceback import configobj import socket import re import datetime import random import urllib2 import base64 import csv import platform from urlparse import urlparse
Remove duplicate imports and remove entirly unused string
Remove duplicate imports and remove entirly unused string
Python
mit
szibis/Diamond,russss/Diamond,TAKEALOT/Diamond,szibis/Diamond,signalfx/Diamond,dcsquared13/Diamond,python-diamond/Diamond,eMerzh/Diamond-1,jumping/Diamond,codepython/Diamond,socialwareinc/Diamond,actmd/Diamond,cannium/Diamond,Slach/Diamond,eMerzh/Diamond-1,saucelabs/Diamond,zoidbergwill/Diamond,disqus/Diamond,bmhatfiel...
# coding=utf-8 import os import sys import string import logging import time import traceback import configobj import socket import re import os import sys import re import logging import time import datetime import random import urllib2 import base64 import csv import platform import string import traceback import co...
# coding=utf-8 """ Diamond module init code """ import os import sys import logging import time import traceback import configobj import socket import re import datetime import random import urllib2 import base64 import csv import platform from urlparse import urlparse
<commit_before># coding=utf-8 import os import sys import string import logging import time import traceback import configobj import socket import re import os import sys import re import logging import time import datetime import random import urllib2 import base64 import csv import platform import string import trac...
# coding=utf-8 """ Diamond module init code """ import os import sys import logging import time import traceback import configobj import socket import re import datetime import random import urllib2 import base64 import csv import platform from urlparse import urlparse
# coding=utf-8 import os import sys import string import logging import time import traceback import configobj import socket import re import os import sys import re import logging import time import datetime import random import urllib2 import base64 import csv import platform import string import traceback import co...
<commit_before># coding=utf-8 import os import sys import string import logging import time import traceback import configobj import socket import re import os import sys import re import logging import time import datetime import random import urllib2 import base64 import csv import platform import string import trac...
ce1f05c9943b365e35758502a38122ffe02c0d85
prefix_sums/min_slice.py
prefix_sums/min_slice.py
# It is required to find the position of a slice with min avg in the # numerical sequence. There is a mathematical proof for such problem # where only slices of 2 and 3 elements are taken into account. # Having that, solution become really simple. def get_prefix_sum(A): result = [0] * (len(A) + 1) for i in xr...
Add min avg slice solution.
Add min avg slice solution.
Python
apache-2.0
isendel/algorithms
Add min avg slice solution.
# It is required to find the position of a slice with min avg in the # numerical sequence. There is a mathematical proof for such problem # where only slices of 2 and 3 elements are taken into account. # Having that, solution become really simple. def get_prefix_sum(A): result = [0] * (len(A) + 1) for i in xr...
<commit_before><commit_msg>Add min avg slice solution.<commit_after>
# It is required to find the position of a slice with min avg in the # numerical sequence. There is a mathematical proof for such problem # where only slices of 2 and 3 elements are taken into account. # Having that, solution become really simple. def get_prefix_sum(A): result = [0] * (len(A) + 1) for i in xr...
Add min avg slice solution.# It is required to find the position of a slice with min avg in the # numerical sequence. There is a mathematical proof for such problem # where only slices of 2 and 3 elements are taken into account. # Having that, solution become really simple. def get_prefix_sum(A): result = [0] * (...
<commit_before><commit_msg>Add min avg slice solution.<commit_after># It is required to find the position of a slice with min avg in the # numerical sequence. There is a mathematical proof for such problem # where only slices of 2 and 3 elements are taken into account. # Having that, solution become really simple. de...
05864894b876a679726f1063832f70cfecb4325e
py/print-binary-tree.py
py/print-binary-tree.py
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def printTree(self, root): """ :type root: TreeNode :rtype: List[List[str]] """ q...
Add py solution for 655. Print Binary Tree
Add py solution for 655. Print Binary Tree 655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 655. Print Binary Tree 655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def printTree(self, root): """ :type root: TreeNode :rtype: List[List[str]] """ q...
<commit_before><commit_msg>Add py solution for 655. Print Binary Tree 655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/<commit_after>
# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def printTree(self, root): """ :type root: TreeNode :rtype: List[List[str]] """ q...
Add py solution for 655. Print Binary Tree 655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/# Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution(object): def p...
<commit_before><commit_msg>Add py solution for 655. Print Binary Tree 655. Print Binary Tree: https://leetcode.com/problems/print-binary-tree/<commit_after># Definition for a binary tree node. # class TreeNode(object): # def __init__(self, x): # self.val = x # self.left = None # self.right ...
9645b58b73e689efafd50ee2681beb813f3e410d
tests/test_complex_dtypes.py
tests/test_complex_dtypes.py
import logging import sys import uuid import numpy as np import pytest import rasterio logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) @pytest.fixture(scope='function') def tempfile(): """A temporary filename in the GDAL '/vsimem' filesystem""" return '/vsimem/{}'.format(uuid.uuid4()) def co...
Add test of complex types
Add test of complex types
Python
bsd-3-clause
brendan-ward/rasterio,brendan-ward/rasterio,brendan-ward/rasterio
Add test of complex types
import logging import sys import uuid import numpy as np import pytest import rasterio logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) @pytest.fixture(scope='function') def tempfile(): """A temporary filename in the GDAL '/vsimem' filesystem""" return '/vsimem/{}'.format(uuid.uuid4()) def co...
<commit_before><commit_msg>Add test of complex types<commit_after>
import logging import sys import uuid import numpy as np import pytest import rasterio logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) @pytest.fixture(scope='function') def tempfile(): """A temporary filename in the GDAL '/vsimem' filesystem""" return '/vsimem/{}'.format(uuid.uuid4()) def co...
Add test of complex typesimport logging import sys import uuid import numpy as np import pytest import rasterio logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) @pytest.fixture(scope='function') def tempfile(): """A temporary filename in the GDAL '/vsimem' filesystem""" return '/vsimem/{}'.form...
<commit_before><commit_msg>Add test of complex types<commit_after>import logging import sys import uuid import numpy as np import pytest import rasterio logging.basicConfig(stream=sys.stderr, level=logging.DEBUG) @pytest.fixture(scope='function') def tempfile(): """A temporary filename in the GDAL '/vsimem' f...
f888799f4c88952f3ee77578fc1aface8eb4b067
olympiad/bestfit.py
olympiad/bestfit.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
Add solution for problem C1
Add solution for problem C1
Python
apache-2.0
fabianm/olympiad,fabianm/olympiad,fabianm/olympiad
Add solution for problem C1
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
<commit_before><commit_msg>Add solution for problem C1<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
Add solution for problem C1#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICE...
<commit_before><commit_msg>Add solution for problem C1<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Copyright 2014 Fabian M. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at...
726cae5bfbb4a53ba979babc87e681b19562112e
lib/reinteract/format_escaped.py
lib/reinteract/format_escaped.py
# # Very, very partial implementation of g_markup_printf_escaped(). Doesn't # handling things like a %c with an integer argument that evaluates to # a markup special character, or special characters in the repr() or str() # of an object. It also doesn't handle %(name)s type arguments with # keyword arguments. # # To do...
Add a simple implementation of functionality like g_markup_printf_escaped()
Add a simple implementation of functionality like g_markup_printf_escaped()
Python
bsd-2-clause
rschroll/reinteract,johnrizzo1/reinteract,jbaayen/reinteract,alexey4petrov/reinteract,alexey4petrov/reinteract,rschroll/reinteract,alexey4petrov/reinteract,jbaayen/reinteract,rschroll/reinteract,jbaayen/reinteract,johnrizzo1/reinteract,johnrizzo1/reinteract
Add a simple implementation of functionality like g_markup_printf_escaped()
# # Very, very partial implementation of g_markup_printf_escaped(). Doesn't # handling things like a %c with an integer argument that evaluates to # a markup special character, or special characters in the repr() or str() # of an object. It also doesn't handle %(name)s type arguments with # keyword arguments. # # To do...
<commit_before><commit_msg>Add a simple implementation of functionality like g_markup_printf_escaped()<commit_after>
# # Very, very partial implementation of g_markup_printf_escaped(). Doesn't # handling things like a %c with an integer argument that evaluates to # a markup special character, or special characters in the repr() or str() # of an object. It also doesn't handle %(name)s type arguments with # keyword arguments. # # To do...
Add a simple implementation of functionality like g_markup_printf_escaped()# # Very, very partial implementation of g_markup_printf_escaped(). Doesn't # handling things like a %c with an integer argument that evaluates to # a markup special character, or special characters in the repr() or str() # of an object. It also...
<commit_before><commit_msg>Add a simple implementation of functionality like g_markup_printf_escaped()<commit_after># # Very, very partial implementation of g_markup_printf_escaped(). Doesn't # handling things like a %c with an integer argument that evaluates to # a markup special character, or special characters in th...
fbace843f6febaea28f35511035c8c997ba0fdab
queues/priority_queue.py
queues/priority_queue.py
""" Implementation of priority queue """ class PriorityQueueNode: def __init__(self, data, priority): self.data = data self.priority = priority def __repr__(self): return str(self.data) + ": " + str(self.priority) class PriorityQueue: def __init__(self): self.priority_queue_list = [] def size(self): ...
Add priority queue implementation using lists
Add priority queue implementation using lists
Python
mit
keon/algorithms,amaozhao/algorithms
Add priority queue implementation using lists
""" Implementation of priority queue """ class PriorityQueueNode: def __init__(self, data, priority): self.data = data self.priority = priority def __repr__(self): return str(self.data) + ": " + str(self.priority) class PriorityQueue: def __init__(self): self.priority_queue_list = [] def size(self): ...
<commit_before><commit_msg>Add priority queue implementation using lists<commit_after>
""" Implementation of priority queue """ class PriorityQueueNode: def __init__(self, data, priority): self.data = data self.priority = priority def __repr__(self): return str(self.data) + ": " + str(self.priority) class PriorityQueue: def __init__(self): self.priority_queue_list = [] def size(self): ...
Add priority queue implementation using lists""" Implementation of priority queue """ class PriorityQueueNode: def __init__(self, data, priority): self.data = data self.priority = priority def __repr__(self): return str(self.data) + ": " + str(self.priority) class PriorityQueue: def __init__(self): self....
<commit_before><commit_msg>Add priority queue implementation using lists<commit_after>""" Implementation of priority queue """ class PriorityQueueNode: def __init__(self, data, priority): self.data = data self.priority = priority def __repr__(self): return str(self.data) + ": " + str(self.priority) class Pr...
d662bf8ddcdd78b6cc75ea7b6731f5ac2379645d
rflink1.py
rflink1.py
import serial import time import logging import re logging.basicConfig(filename='debug.log',level=logging.DEBUG) def readlineCR(port): rv = "" while True: ch = port.read().decode() rv += ch if ch=='\r': rv = rv.strip('\r').strip('\n') return rv def sendData(data,p...
Test python script to get data from Rflink.
Test python script to get data from Rflink.
Python
apache-2.0
matt2005/pyrflink
Test python script to get data from Rflink.
import serial import time import logging import re logging.basicConfig(filename='debug.log',level=logging.DEBUG) def readlineCR(port): rv = "" while True: ch = port.read().decode() rv += ch if ch=='\r': rv = rv.strip('\r').strip('\n') return rv def sendData(data,p...
<commit_before><commit_msg>Test python script to get data from Rflink.<commit_after>
import serial import time import logging import re logging.basicConfig(filename='debug.log',level=logging.DEBUG) def readlineCR(port): rv = "" while True: ch = port.read().decode() rv += ch if ch=='\r': rv = rv.strip('\r').strip('\n') return rv def sendData(data,p...
Test python script to get data from Rflink.import serial import time import logging import re logging.basicConfig(filename='debug.log',level=logging.DEBUG) def readlineCR(port): rv = "" while True: ch = port.read().decode() rv += ch if ch=='\r': rv = rv.strip('\r').strip('\n'...
<commit_before><commit_msg>Test python script to get data from Rflink.<commit_after>import serial import time import logging import re logging.basicConfig(filename='debug.log',level=logging.DEBUG) def readlineCR(port): rv = "" while True: ch = port.read().decode() rv += ch if ch=='\r': ...
4e0af69b8803e798fe1a90ea8c261cbcd85d149d
languages/python/talking-clock.py
languages/python/talking-clock.py
#!/usr/bin/env python3 # # Talking clock, using my Google Home device as a media player. # import pychromecast, uuid, time, datetime # # Get list of all Chromecast devices. # The local computer must be in the same Wi-Fi network. # def print_all_chromecasts(): all_cast_devices = pychromecast.get_chromecasts() p...
Add talking clock via Chromecast.
Add talking clock via Chromecast.
Python
apache-2.0
sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-opensource,sergev/vak-o...
Add talking clock via Chromecast.
#!/usr/bin/env python3 # # Talking clock, using my Google Home device as a media player. # import pychromecast, uuid, time, datetime # # Get list of all Chromecast devices. # The local computer must be in the same Wi-Fi network. # def print_all_chromecasts(): all_cast_devices = pychromecast.get_chromecasts() p...
<commit_before><commit_msg>Add talking clock via Chromecast.<commit_after>
#!/usr/bin/env python3 # # Talking clock, using my Google Home device as a media player. # import pychromecast, uuid, time, datetime # # Get list of all Chromecast devices. # The local computer must be in the same Wi-Fi network. # def print_all_chromecasts(): all_cast_devices = pychromecast.get_chromecasts() p...
Add talking clock via Chromecast.#!/usr/bin/env python3 # # Talking clock, using my Google Home device as a media player. # import pychromecast, uuid, time, datetime # # Get list of all Chromecast devices. # The local computer must be in the same Wi-Fi network. # def print_all_chromecasts(): all_cast_devices = pyc...
<commit_before><commit_msg>Add talking clock via Chromecast.<commit_after>#!/usr/bin/env python3 # # Talking clock, using my Google Home device as a media player. # import pychromecast, uuid, time, datetime # # Get list of all Chromecast devices. # The local computer must be in the same Wi-Fi network. # def print_all_...
69978f33eb1b7fb7c24d06da33cec1ee48667bef
train/labs/acp-workshop/scripts/centos.py
train/labs/acp-workshop/scripts/centos.py
#!/usr/bin/env python # -*- coding: utf-8 -*- PRIMARY_OS = 'CENTOS-7.0' CS_ENGINE = '''#!/bin/sh # FQDN="{fqdn}" export DEBIAN_FRONTEND=noninteractive # locale sudo locale-gen en_US.UTF-8 # /etc/hostname - /etc/hosts sed -i "1 c\\127.0.0.1 $FQDN localhost" /etc/hosts echo $FQDN > /etc/hostname service hostname rest...
Add CentOS config for acp-workshop
Add CentOS config for acp-workshop Signed-off-by: Jerry Baker <[email protected]>
Python
apache-2.0
curtisz/train,curtisz/train,anokun7/train,kizbitz/train,kizbitz/train,danielpalstra/train,danielpalstra/train,anokun7/train
Add CentOS config for acp-workshop Signed-off-by: Jerry Baker <[email protected]>
#!/usr/bin/env python # -*- coding: utf-8 -*- PRIMARY_OS = 'CENTOS-7.0' CS_ENGINE = '''#!/bin/sh # FQDN="{fqdn}" export DEBIAN_FRONTEND=noninteractive # locale sudo locale-gen en_US.UTF-8 # /etc/hostname - /etc/hosts sed -i "1 c\\127.0.0.1 $FQDN localhost" /etc/hosts echo $FQDN > /etc/hostname service hostname rest...
<commit_before><commit_msg>Add CentOS config for acp-workshop Signed-off-by: Jerry Baker <[email protected]><commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- PRIMARY_OS = 'CENTOS-7.0' CS_ENGINE = '''#!/bin/sh # FQDN="{fqdn}" export DEBIAN_FRONTEND=noninteractive # locale sudo locale-gen en_US.UTF-8 # /etc/hostname - /etc/hosts sed -i "1 c\\127.0.0.1 $FQDN localhost" /etc/hosts echo $FQDN > /etc/hostname service hostname rest...
Add CentOS config for acp-workshop Signed-off-by: Jerry Baker <[email protected]>#!/usr/bin/env python # -*- coding: utf-8 -*- PRIMARY_OS = 'CENTOS-7.0' CS_ENGINE = '''#!/bin/sh # FQDN="{fqdn}" export DEBIAN_FRONTEND=noninteractive # locale sudo locale-gen en_US.UTF-8 # /etc/hostn...
<commit_before><commit_msg>Add CentOS config for acp-workshop Signed-off-by: Jerry Baker <[email protected]><commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- PRIMARY_OS = 'CENTOS-7.0' CS_ENGINE = '''#!/bin/sh # FQDN="{fqdn}" export DEBIAN_FRONTEND=noninteractive # locale ...
d03d4bf0ca7ec4d66868f384d6864c9fb456cb84
src/test_io.py
src/test_io.py
import RPi.GPIO as GPIO import time # This test is made for a quick check of the gpios # List of the in channels to test. When pressed they output a message. in_chanels = [] # A list of output channels to test. These whill be switched on and off in a pattern. out_chanels = [] def switch_called(channel): print 'Edg...
Test for rudimentary io tests added
Test for rudimentary io tests added
Python
apache-2.0
baumartig/vpn_switcher,baumartig/vpn_switcher
Test for rudimentary io tests added
import RPi.GPIO as GPIO import time # This test is made for a quick check of the gpios # List of the in channels to test. When pressed they output a message. in_chanels = [] # A list of output channels to test. These whill be switched on and off in a pattern. out_chanels = [] def switch_called(channel): print 'Edg...
<commit_before><commit_msg>Test for rudimentary io tests added<commit_after>
import RPi.GPIO as GPIO import time # This test is made for a quick check of the gpios # List of the in channels to test. When pressed they output a message. in_chanels = [] # A list of output channels to test. These whill be switched on and off in a pattern. out_chanels = [] def switch_called(channel): print 'Edg...
Test for rudimentary io tests addedimport RPi.GPIO as GPIO import time # This test is made for a quick check of the gpios # List of the in channels to test. When pressed they output a message. in_chanels = [] # A list of output channels to test. These whill be switched on and off in a pattern. out_chanels = [] def ...
<commit_before><commit_msg>Test for rudimentary io tests added<commit_after>import RPi.GPIO as GPIO import time # This test is made for a quick check of the gpios # List of the in channels to test. When pressed they output a message. in_chanels = [] # A list of output channels to test. These whill be switched on and...
089208e4cb85da5b85c20242097cbe7f0c0e0ece
fabfile.py
fabfile.py
#!/usr/bin/env python2 #-*- coding: utf-8 -*- import os from fabric.api import local, task from pylua.settings import LOG_CONFIG ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) SRC_DIR = 'pylua' TESTS_DIR = os.path.join(SRC_DIR, 'test') LOG_CONFIG_PATH = os.path.join(ROOT_DIR, SRC_DIR, LOG_CONFIG) @task def ...
Add fab file with two tasks: test_all, run_test
Add fab file with two tasks: test_all, run_test
Python
mit
malirod/pylua,malirod/pylua
Add fab file with two tasks: test_all, run_test
#!/usr/bin/env python2 #-*- coding: utf-8 -*- import os from fabric.api import local, task from pylua.settings import LOG_CONFIG ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) SRC_DIR = 'pylua' TESTS_DIR = os.path.join(SRC_DIR, 'test') LOG_CONFIG_PATH = os.path.join(ROOT_DIR, SRC_DIR, LOG_CONFIG) @task def ...
<commit_before><commit_msg>Add fab file with two tasks: test_all, run_test<commit_after>
#!/usr/bin/env python2 #-*- coding: utf-8 -*- import os from fabric.api import local, task from pylua.settings import LOG_CONFIG ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) SRC_DIR = 'pylua' TESTS_DIR = os.path.join(SRC_DIR, 'test') LOG_CONFIG_PATH = os.path.join(ROOT_DIR, SRC_DIR, LOG_CONFIG) @task def ...
Add fab file with two tasks: test_all, run_test#!/usr/bin/env python2 #-*- coding: utf-8 -*- import os from fabric.api import local, task from pylua.settings import LOG_CONFIG ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) SRC_DIR = 'pylua' TESTS_DIR = os.path.join(SRC_DIR, 'test') LOG_CONFIG_PATH = os.path.j...
<commit_before><commit_msg>Add fab file with two tasks: test_all, run_test<commit_after>#!/usr/bin/env python2 #-*- coding: utf-8 -*- import os from fabric.api import local, task from pylua.settings import LOG_CONFIG ROOT_DIR = os.path.dirname(os.path.realpath(__file__)) SRC_DIR = 'pylua' TESTS_DIR = os.path.join(SRC...
d38751f466f2b76f71dc716b85cdd1ffbabd481d
cpro/migrations/0015_auto_20170217_0801.py
cpro/migrations/0015_auto_20170217_0801.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cpro.models class Migration(migrations.Migration): dependencies = [ ('cpro', '0014_auto_20170129_2236'), ] operations = [ migrations.AlterField( model_name='card',...
Add 2 new skills: concentration and all round, with sentences in English and Japanese
Add 2 new skills: concentration and all round, with sentences in English and Japanese
Python
apache-2.0
SchoolIdolTomodachi/CinderellaProducers,SchoolIdolTomodachi/CinderellaProducers
Add 2 new skills: concentration and all round, with sentences in English and Japanese
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cpro.models class Migration(migrations.Migration): dependencies = [ ('cpro', '0014_auto_20170129_2236'), ] operations = [ migrations.AlterField( model_name='card',...
<commit_before><commit_msg>Add 2 new skills: concentration and all round, with sentences in English and Japanese<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cpro.models class Migration(migrations.Migration): dependencies = [ ('cpro', '0014_auto_20170129_2236'), ] operations = [ migrations.AlterField( model_name='card',...
Add 2 new skills: concentration and all round, with sentences in English and Japanese# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cpro.models class Migration(migrations.Migration): dependencies = [ ('cpro', '0014_auto_20170129_2236'), ...
<commit_before><commit_msg>Add 2 new skills: concentration and all round, with sentences in English and Japanese<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import cpro.models class Migration(migrations.Migration): dependencies = [ ...
1875c5f1a813abda0ecf52b5b2604011fe2f2c15
Examples/Scripting/PostJob/Sample/Sample.py
Examples/Scripting/PostJob/Sample/Sample.py
#Python.NET ############################################################### # This is an Python.net/CPython script. # # To use IronPython, remove "#Python.NET" from the first # # line of this file. Make sure you don't use the quotes. # ####################################################...
Add a sample Pre/Post job
Add a sample Pre/Post job
Python
apache-2.0
ThinkboxSoftware/Deadline,ThinkboxSoftware/Deadline,ThinkboxSoftware/Deadline
Add a sample Pre/Post job
#Python.NET ############################################################### # This is an Python.net/CPython script. # # To use IronPython, remove "#Python.NET" from the first # # line of this file. Make sure you don't use the quotes. # ####################################################...
<commit_before><commit_msg>Add a sample Pre/Post job<commit_after>
#Python.NET ############################################################### # This is an Python.net/CPython script. # # To use IronPython, remove "#Python.NET" from the first # # line of this file. Make sure you don't use the quotes. # ####################################################...
Add a sample Pre/Post job#Python.NET ############################################################### # This is an Python.net/CPython script. # # To use IronPython, remove "#Python.NET" from the first # # line of this file. Make sure you don't use the quotes. # ###########################...
<commit_before><commit_msg>Add a sample Pre/Post job<commit_after>#Python.NET ############################################################### # This is an Python.net/CPython script. # # To use IronPython, remove "#Python.NET" from the first # # line of this file. Make sure you don't use the q...
8bebea72536a8a6fc480631d737f2426f52a356c
Lib/fontTools/ttLib/tables/_k_e_r_n_test.py
Lib/fontTools/ttLib/tables/_k_e_r_n_test.py
from __future__ import print_function, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib import unittest from ._k_e_r_n import KernTable_format_0 class MockFont(object): def getGlyphOrder(self): return ["glyph00000", "glyph00001", "glyph00002", "glyph00003"] ...
Test for load a kern table with a bad glyph id.
Test for load a kern table with a bad glyph id.
Python
mit
googlefonts/fonttools,fonttools/fonttools
Test for load a kern table with a bad glyph id.
from __future__ import print_function, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib import unittest from ._k_e_r_n import KernTable_format_0 class MockFont(object): def getGlyphOrder(self): return ["glyph00000", "glyph00001", "glyph00002", "glyph00003"] ...
<commit_before><commit_msg>Test for load a kern table with a bad glyph id.<commit_after>
from __future__ import print_function, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib import unittest from ._k_e_r_n import KernTable_format_0 class MockFont(object): def getGlyphOrder(self): return ["glyph00000", "glyph00001", "glyph00002", "glyph00003"] ...
Test for load a kern table with a bad glyph id.from __future__ import print_function, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib import unittest from ._k_e_r_n import KernTable_format_0 class MockFont(object): def getGlyphOrder(self): return ["glyph00000", "g...
<commit_before><commit_msg>Test for load a kern table with a bad glyph id.<commit_after>from __future__ import print_function, absolute_import from fontTools.misc.py23 import * from fontTools import ttLib import unittest from ._k_e_r_n import KernTable_format_0 class MockFont(object): def getGlyphOrder(self):...
7d89303fddd12fc88fd04bcf27826c3c801b1eff
scripts/import_submissions.py
scripts/import_submissions.py
#!/usr/bin/env python # Copyright (C) 2012 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import json from acoustid.script import run_script from acoustid.data.submission import import_queued_submissions logger = logging.getLogger(__name__) def main(script, opts, args): c...
Add a dummy script for continuous submission importing
Add a dummy script for continuous submission importing
Python
mit
lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server,lalinsky/acoustid-server
Add a dummy script for continuous submission importing
#!/usr/bin/env python # Copyright (C) 2012 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import json from acoustid.script import run_script from acoustid.data.submission import import_queued_submissions logger = logging.getLogger(__name__) def main(script, opts, args): c...
<commit_before><commit_msg>Add a dummy script for continuous submission importing<commit_after>
#!/usr/bin/env python # Copyright (C) 2012 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import json from acoustid.script import run_script from acoustid.data.submission import import_queued_submissions logger = logging.getLogger(__name__) def main(script, opts, args): c...
Add a dummy script for continuous submission importing#!/usr/bin/env python # Copyright (C) 2012 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import json from acoustid.script import run_script from acoustid.data.submission import import_queued_submissions logger = logging.get...
<commit_before><commit_msg>Add a dummy script for continuous submission importing<commit_after>#!/usr/bin/env python # Copyright (C) 2012 Lukas Lalinsky # Distributed under the MIT license, see the LICENSE file for details. import json from acoustid.script import run_script from acoustid.data.submission import import...
206454788c6d054f8c562d4d5d13a737d9cb6d27
tests/sentry/api/serializers/test_project.py
tests/sentry/api/serializers/test_project.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.api.serializers.models.project import ( ProjectWithOrganizationSerializer, ProjectWithTeamSerializer ) from sentry.testutils import TestCase class ProjectSerializerTest(TestCase): ...
Add tests for project serializer
test(projects): Add tests for project serializer
Python
bsd-3-clause
beeftornado/sentry,ifduyue/sentry,gencer/sentry,ifduyue/sentry,beeftornado/sentry,gencer/sentry,mvaled/sentry,mvaled/sentry,gencer/sentry,looker/sentry,gencer/sentry,beeftornado/sentry,gencer/sentry,mvaled/sentry,looker/sentry,ifduyue/sentry,ifduyue/sentry,mvaled/sentry,looker/sentry,mvaled/sentry,looker/sentry,ifduyue...
test(projects): Add tests for project serializer
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.api.serializers.models.project import ( ProjectWithOrganizationSerializer, ProjectWithTeamSerializer ) from sentry.testutils import TestCase class ProjectSerializerTest(TestCase): ...
<commit_before><commit_msg>test(projects): Add tests for project serializer<commit_after>
# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.api.serializers.models.project import ( ProjectWithOrganizationSerializer, ProjectWithTeamSerializer ) from sentry.testutils import TestCase class ProjectSerializerTest(TestCase): ...
test(projects): Add tests for project serializer# -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.api.serializers.models.project import ( ProjectWithOrganizationSerializer, ProjectWithTeamSerializer ) from sentry.testutils import Te...
<commit_before><commit_msg>test(projects): Add tests for project serializer<commit_after># -*- coding: utf-8 -*- from __future__ import absolute_import import six from sentry.api.serializers import serialize from sentry.api.serializers.models.project import ( ProjectWithOrganizationSerializer, ProjectWithTeamSer...
f5b185fa2bba29efe3c1db2cd6c6a50188be24e3
tests/test_unlocking.py
tests/test_unlocking.py
# Tests for SecretStorage # Author: Dmitry Shachnev, 2018 # License: BSD import unittest from secretstorage import dbus_init, get_any_collection from secretstorage.util import BUS_NAME from secretstorage.exceptions import LockedException @unittest.skipIf(BUS_NAME == "org.freedesktop.secrets", "This...
Add a basic test for locking and unlocking
Add a basic test for locking and unlocking To improve test coverage.
Python
bsd-3-clause
mitya57/secretstorage
Add a basic test for locking and unlocking To improve test coverage.
# Tests for SecretStorage # Author: Dmitry Shachnev, 2018 # License: BSD import unittest from secretstorage import dbus_init, get_any_collection from secretstorage.util import BUS_NAME from secretstorage.exceptions import LockedException @unittest.skipIf(BUS_NAME == "org.freedesktop.secrets", "This...
<commit_before><commit_msg>Add a basic test for locking and unlocking To improve test coverage.<commit_after>
# Tests for SecretStorage # Author: Dmitry Shachnev, 2018 # License: BSD import unittest from secretstorage import dbus_init, get_any_collection from secretstorage.util import BUS_NAME from secretstorage.exceptions import LockedException @unittest.skipIf(BUS_NAME == "org.freedesktop.secrets", "This...
Add a basic test for locking and unlocking To improve test coverage.# Tests for SecretStorage # Author: Dmitry Shachnev, 2018 # License: BSD import unittest from secretstorage import dbus_init, get_any_collection from secretstorage.util import BUS_NAME from secretstorage.exceptions import LockedException @unittest...
<commit_before><commit_msg>Add a basic test for locking and unlocking To improve test coverage.<commit_after># Tests for SecretStorage # Author: Dmitry Shachnev, 2018 # License: BSD import unittest from secretstorage import dbus_init, get_any_collection from secretstorage.util import BUS_NAME from secretstorage.exce...
085efb9bfe476232695cb66ddf28d6c1a6f84c2f
core/migrations/0005_auto_20170506_1026.py
core/migrations/0005_auto_20170506_1026.py
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-06 14:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20170426_1717'), ] operations = [ ...
Add migration for Model changes.
Add migration for Model changes.
Python
bsd-2-clause
cdubz/timestrap,cdubz/timestrap,cdubz/timestrap,muhleder/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,Leahelisabeth/timestrap,muhleder/timestrap,overshard/timestrap,overshard/timestrap,Leahelisabeth/timestrap,overshard/timestrap,Leahelisabeth/timestrap
Add migration for Model changes.
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-06 14:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20170426_1717'), ] operations = [ ...
<commit_before><commit_msg>Add migration for Model changes.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-06 14:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20170426_1717'), ] operations = [ ...
Add migration for Model changes.# -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-06 14:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('core', '0004_auto_20170426_17...
<commit_before><commit_msg>Add migration for Model changes.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11 on 2017-05-06 14:26 from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = ...
3bc86ca5bd302103a57b6e2829d549aa1e243766
go/apps/jsbox/tests/test_forms.py
go/apps/jsbox/tests/test_forms.py
from django.test import TestCase from go.apps.jsbox.forms import JsboxForm class JsboxFormTestCase(TestCase): def test_to_metdata(self): form = JsboxForm(data={ 'javascript': 'x = 1;', }) self.assertTrue(form.is_valid()) metadata = form.to_metadata() self.asser...
Add basic test for jsbox forms.
Add basic test for jsbox forms.
Python
bsd-3-clause
praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go,praekelt/vumi-go
Add basic test for jsbox forms.
from django.test import TestCase from go.apps.jsbox.forms import JsboxForm class JsboxFormTestCase(TestCase): def test_to_metdata(self): form = JsboxForm(data={ 'javascript': 'x = 1;', }) self.assertTrue(form.is_valid()) metadata = form.to_metadata() self.asser...
<commit_before><commit_msg>Add basic test for jsbox forms.<commit_after>
from django.test import TestCase from go.apps.jsbox.forms import JsboxForm class JsboxFormTestCase(TestCase): def test_to_metdata(self): form = JsboxForm(data={ 'javascript': 'x = 1;', }) self.assertTrue(form.is_valid()) metadata = form.to_metadata() self.asser...
Add basic test for jsbox forms.from django.test import TestCase from go.apps.jsbox.forms import JsboxForm class JsboxFormTestCase(TestCase): def test_to_metdata(self): form = JsboxForm(data={ 'javascript': 'x = 1;', }) self.assertTrue(form.is_valid()) metadata = form.t...
<commit_before><commit_msg>Add basic test for jsbox forms.<commit_after>from django.test import TestCase from go.apps.jsbox.forms import JsboxForm class JsboxFormTestCase(TestCase): def test_to_metdata(self): form = JsboxForm(data={ 'javascript': 'x = 1;', }) self.assertTrue(f...
a6712ce13b0c6e62488adf0ae13fabf986a1b890
imgsort.py
imgsort.py
#!/usr/bin/env python3 import os import shutil from PIL import Image whitelist = ( (1366, 768), (1600, 900), (1680, 1050), (1920, 1080), (1920, 1200), ) def split(directory): filemap = {dimensions: set() for dimensions in whitelist} filemap['others'] = set() makepath = lambda filena...
Add simple script to sort images
Add simple script to sort images
Python
mit
ranisalt/imgsort
Add simple script to sort images
#!/usr/bin/env python3 import os import shutil from PIL import Image whitelist = ( (1366, 768), (1600, 900), (1680, 1050), (1920, 1080), (1920, 1200), ) def split(directory): filemap = {dimensions: set() for dimensions in whitelist} filemap['others'] = set() makepath = lambda filena...
<commit_before><commit_msg>Add simple script to sort images<commit_after>
#!/usr/bin/env python3 import os import shutil from PIL import Image whitelist = ( (1366, 768), (1600, 900), (1680, 1050), (1920, 1080), (1920, 1200), ) def split(directory): filemap = {dimensions: set() for dimensions in whitelist} filemap['others'] = set() makepath = lambda filena...
Add simple script to sort images#!/usr/bin/env python3 import os import shutil from PIL import Image whitelist = ( (1366, 768), (1600, 900), (1680, 1050), (1920, 1080), (1920, 1200), ) def split(directory): filemap = {dimensions: set() for dimensions in whitelist} filemap['others'] = set...
<commit_before><commit_msg>Add simple script to sort images<commit_after>#!/usr/bin/env python3 import os import shutil from PIL import Image whitelist = ( (1366, 768), (1600, 900), (1680, 1050), (1920, 1080), (1920, 1200), ) def split(directory): filemap = {dimensions: set() for dimensions ...
004d8fc6edae142cff7d26e53a79183b1ca29a5b
src/greplin/defer/wait.py
src/greplin/defer/wait.py
# Copyright 2010 Greplin, Inc. All Rights Reserved. """Mixin for waiting on deferreds, and cancelling them if needed.""" class WaitMixin(object): """Mixin for waiting on deferreds, and cancelling them if needed.""" __currentWait = None def _wait(self, deferred): """Waits for the given deferred.""" ...
Migrate greplin.defer's remaining used code to greplin-twisted-utils
Migrate greplin.defer's remaining used code to greplin-twisted-utils
Python
apache-2.0
Cue/greplin-twisted-utils
Migrate greplin.defer's remaining used code to greplin-twisted-utils
# Copyright 2010 Greplin, Inc. All Rights Reserved. """Mixin for waiting on deferreds, and cancelling them if needed.""" class WaitMixin(object): """Mixin for waiting on deferreds, and cancelling them if needed.""" __currentWait = None def _wait(self, deferred): """Waits for the given deferred.""" ...
<commit_before><commit_msg>Migrate greplin.defer's remaining used code to greplin-twisted-utils<commit_after>
# Copyright 2010 Greplin, Inc. All Rights Reserved. """Mixin for waiting on deferreds, and cancelling them if needed.""" class WaitMixin(object): """Mixin for waiting on deferreds, and cancelling them if needed.""" __currentWait = None def _wait(self, deferred): """Waits for the given deferred.""" ...
Migrate greplin.defer's remaining used code to greplin-twisted-utils# Copyright 2010 Greplin, Inc. All Rights Reserved. """Mixin for waiting on deferreds, and cancelling them if needed.""" class WaitMixin(object): """Mixin for waiting on deferreds, and cancelling them if needed.""" __currentWait = None de...
<commit_before><commit_msg>Migrate greplin.defer's remaining used code to greplin-twisted-utils<commit_after># Copyright 2010 Greplin, Inc. All Rights Reserved. """Mixin for waiting on deferreds, and cancelling them if needed.""" class WaitMixin(object): """Mixin for waiting on deferreds, and cancelling them if ...
6a08dc8ae70ebb7d759514991033a54e35ef0a93
bin/desi_make_bricks.py
bin/desi_make_bricks.py
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--fibermap', default = None, metavar = 'FILE',...
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import os.path import glob import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--verbose', action ...
Update brick maker to use new meta functionality
Update brick maker to use new meta functionality
Python
bsd-3-clause
profxj/desispec,timahutchinson/desispec,profxj/desispec,gdhungana/desispec,desihub/desispec,gdhungana/desispec,timahutchinson/desispec,desihub/desispec
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--fibermap', default = None, metavar = 'FILE',...
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import os.path import glob import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--verbose', action ...
<commit_before>#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--fibermap', default = None, me...
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import os.path import glob import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--verbose', action ...
#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--fibermap', default = None, metavar = 'FILE',...
<commit_before>#!/usr/bin/env python # # See top-level LICENSE file for Copyright information # # -*- coding: utf-8 -*- import argparse import desispec.io def main(): parser = argparse.ArgumentParser(formatter_class=argparse.ArgumentDefaultsHelpFormatter) parser.add_argument('--fibermap', default = None, me...
af127fa56d2ce9304034e19ed2e0a598d10bebba
tests/tests_cyclus.py
tests/tests_cyclus.py
#! /usr/bin/env python import os from tests_list import sim_files from cyclus_tools import run_cyclus, db_comparator """Tests""" def test_cyclus(): """Test for all inputs in sim_files. Checks if reference and current cyclus output is the same. WARNING: the tests require cyclus executable to be included...
Add main regression test file for cyclus
Add main regression test file for cyclus
Python
bsd-3-clause
Baaaaam/cyBaM,gonuke/cycamore,gonuke/cycamore,cyclus/cycaless,Baaaaam/cyCLASS,gonuke/cycamore,rwcarlsen/cycamore,gonuke/cycamore,jlittell/cycamore,rwcarlsen/cycamore,Baaaaam/cyBaM,Baaaaam/cycamore,Baaaaam/cyBaM,jlittell/cycamore,Baaaaam/cycamore,jlittell/cycamore,Baaaaam/cycamore,Baaaaam/cyCLASS,jlittell/cycamore,cyclu...
Add main regression test file for cyclus
#! /usr/bin/env python import os from tests_list import sim_files from cyclus_tools import run_cyclus, db_comparator """Tests""" def test_cyclus(): """Test for all inputs in sim_files. Checks if reference and current cyclus output is the same. WARNING: the tests require cyclus executable to be included...
<commit_before><commit_msg>Add main regression test file for cyclus<commit_after>
#! /usr/bin/env python import os from tests_list import sim_files from cyclus_tools import run_cyclus, db_comparator """Tests""" def test_cyclus(): """Test for all inputs in sim_files. Checks if reference and current cyclus output is the same. WARNING: the tests require cyclus executable to be included...
Add main regression test file for cyclus#! /usr/bin/env python import os from tests_list import sim_files from cyclus_tools import run_cyclus, db_comparator """Tests""" def test_cyclus(): """Test for all inputs in sim_files. Checks if reference and current cyclus output is the same. WARNING: the tests ...
<commit_before><commit_msg>Add main regression test file for cyclus<commit_after>#! /usr/bin/env python import os from tests_list import sim_files from cyclus_tools import run_cyclus, db_comparator """Tests""" def test_cyclus(): """Test for all inputs in sim_files. Checks if reference and current cyclus out...
ad5f851b7959f7bf09d7cd669d8db126fa962982
pymatgen/symmetry/tests/test_spacegroup.py
pymatgen/symmetry/tests/test_spacegroup.py
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic.
Add a unittest for spacegroup. Still very basic.
Python
mit
migueldiascosta/pymatgen,yanikou19/pymatgen,sonium0/pymatgen,migueldiascosta/pymatgen,ctoher/pymatgen,sonium0/pymatgen,Dioptas/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,yanikou19/pymatgen,Bismarrck/pymatgen,sonium0/pymatgen,rousseab/pymatgen,Bismarrck/pymatgen,Dioptas/pymatgen,Bismarrck/pymatgen,ctoher/pymatgen,mig...
Add a unittest for spacegroup. Still very basic.
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic.<commit_after>
#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 12, 2012" import unittest import os from pymatg...
Add a unittest for spacegroup. Still very basic.#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __email__ = "[email protected]" __date__ = "Mar 1...
<commit_before><commit_msg>Add a unittest for spacegroup. Still very basic.<commit_after>#!/usr/bin/env python ''' Created on Mar 12, 2012 ''' from __future__ import division __author__="Shyue Ping Ong" __copyright__ = "Copyright 2012, The Materials Project" __version__ = "0.1" __maintainer__ = "Shyue Ping Ong" __em...
e1e90a8d704666613e6f2f6aaf839724af05cc19
tools/create_token.py
tools/create_token.py
#!/usr/bin/env python import argparse from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend import scitokens # Arguments: def add_args(): parser = argparse.ArgumentParser(description='Create a new SciToken') parser.add_argument('claims', meta...
Add CLI tool for creating SciTokens.
Add CLI tool for creating SciTokens.
Python
apache-2.0
scitokens/scitokens,scitokens/scitokens
Add CLI tool for creating SciTokens.
#!/usr/bin/env python import argparse from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend import scitokens # Arguments: def add_args(): parser = argparse.ArgumentParser(description='Create a new SciToken') parser.add_argument('claims', meta...
<commit_before><commit_msg>Add CLI tool for creating SciTokens.<commit_after>
#!/usr/bin/env python import argparse from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend import scitokens # Arguments: def add_args(): parser = argparse.ArgumentParser(description='Create a new SciToken') parser.add_argument('claims', meta...
Add CLI tool for creating SciTokens.#!/usr/bin/env python import argparse from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend import scitokens # Arguments: def add_args(): parser = argparse.ArgumentParser(description='Create a new SciToken') ...
<commit_before><commit_msg>Add CLI tool for creating SciTokens.<commit_after>#!/usr/bin/env python import argparse from cryptography.hazmat.primitives import serialization from cryptography.hazmat.backends import default_backend import scitokens # Arguments: def add_args(): parser = argparse.ArgumentParse...
29f32ec5cc3b050d6307688995907d094966b369
indra/sources/sofia/make_sofia_ontology.py
indra/sources/sofia/make_sofia_ontology.py
import sys import json from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal from indra.sources import sofia # Note that this is just a placeholder, it doesn't resolve as a URL sofia_ns = Namespace('http://cs.cmu.edu/sofia/') indra_ns = 'http://sorger.med.harvard.edu/indra/' indra_re...
Add script to make SOFIA ontology
Add script to make SOFIA ontology
Python
bsd-2-clause
sorgerlab/indra,bgyori/indra,sorgerlab/belpy,pvtodorov/indra,pvtodorov/indra,sorgerlab/belpy,johnbachman/indra,bgyori/indra,johnbachman/belpy,pvtodorov/indra,johnbachman/belpy,sorgerlab/indra,pvtodorov/indra,johnbachman/indra,sorgerlab/indra,johnbachman/belpy,sorgerlab/belpy,johnbachman/indra,bgyori/indra
Add script to make SOFIA ontology
import sys import json from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal from indra.sources import sofia # Note that this is just a placeholder, it doesn't resolve as a URL sofia_ns = Namespace('http://cs.cmu.edu/sofia/') indra_ns = 'http://sorger.med.harvard.edu/indra/' indra_re...
<commit_before><commit_msg>Add script to make SOFIA ontology<commit_after>
import sys import json from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal from indra.sources import sofia # Note that this is just a placeholder, it doesn't resolve as a URL sofia_ns = Namespace('http://cs.cmu.edu/sofia/') indra_ns = 'http://sorger.med.harvard.edu/indra/' indra_re...
Add script to make SOFIA ontologyimport sys import json from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal from indra.sources import sofia # Note that this is just a placeholder, it doesn't resolve as a URL sofia_ns = Namespace('http://cs.cmu.edu/sofia/') indra_ns = 'http://sorger...
<commit_before><commit_msg>Add script to make SOFIA ontology<commit_after>import sys import json from os.path import join, dirname, abspath from rdflib import Graph, Namespace, Literal from indra.sources import sofia # Note that this is just a placeholder, it doesn't resolve as a URL sofia_ns = Namespace('http://cs.c...
7a01615d50ec374687a5676e53e103eff9082b3e
kivy/core/clipboard/clipboard_xsel.py
kivy/core/clipboard/clipboard_xsel.py
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
Fix return get_types for ClipboardXsel
Fix return get_types for ClipboardXsel
Python
mit
gonzafirewall/kivy,LogicalDash/kivy,aron-bordin/kivy,jffernandez/kivy,VinGarcia/kivy,vipulroxx/kivy,jehutting/kivy,rafalo1333/kivy,matham/kivy,matham/kivy,MiyamotoAkira/kivy,mSenyor/kivy,kivy/kivy,thezawad/kivy,bionoid/kivy,LogicalDash/kivy,aron-bordin/kivy,bionoid/kivy,bionoid/kivy,KeyWeeUsr/kivy,arlowhite/kivy,Farkal...
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
<commit_before>''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import...
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import subprocess ...
<commit_before>''' Clipboard xsel: an implementation of the Clipboard using xsel command line tool. ''' __all__ = ('ClipboardXsel', ) from kivy.utils import platform from kivy.core.clipboard import ClipboardBase if platform != 'linux': raise SystemError('unsupported platform for xsel clipboard') try: import...
a71807789bd09181369fff8b18b3ab5544ba58dd
locations/spiders/sunloan.py
locations/spiders/sunloan.py
# -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem DAYS={ 'Monday':'Mo', 'Tuesday':'Tu', 'Wednesday':'We', 'Friday':'Fr', 'Thursday':'Th', 'Saturday':'Sa', 'Sunday':'Su', } class SunLoanSpider(scrapy.Spider): name = "sunloan" a...
Add spider for Sun Loan Company
Add spider for Sun Loan Company
Python
mit
iandees/all-the-places,iandees/all-the-places,iandees/all-the-places
Add spider for Sun Loan Company
# -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem DAYS={ 'Monday':'Mo', 'Tuesday':'Tu', 'Wednesday':'We', 'Friday':'Fr', 'Thursday':'Th', 'Saturday':'Sa', 'Sunday':'Su', } class SunLoanSpider(scrapy.Spider): name = "sunloan" a...
<commit_before><commit_msg>Add spider for Sun Loan Company<commit_after>
# -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem DAYS={ 'Monday':'Mo', 'Tuesday':'Tu', 'Wednesday':'We', 'Friday':'Fr', 'Thursday':'Th', 'Saturday':'Sa', 'Sunday':'Su', } class SunLoanSpider(scrapy.Spider): name = "sunloan" a...
Add spider for Sun Loan Company# -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem DAYS={ 'Monday':'Mo', 'Tuesday':'Tu', 'Wednesday':'We', 'Friday':'Fr', 'Thursday':'Th', 'Saturday':'Sa', 'Sunday':'Su', } class SunLoanSpider(scrapy.Spid...
<commit_before><commit_msg>Add spider for Sun Loan Company<commit_after># -*- coding: utf-8 -*- import scrapy import json import re from locations.items import GeojsonPointItem DAYS={ 'Monday':'Mo', 'Tuesday':'Tu', 'Wednesday':'We', 'Friday':'Fr', 'Thursday':'Th', 'Saturday':'Sa', 'Sunday'...
66a0622ba63d89b6cfcfa74f7b342f4df55c5045
src/sponsors/migrations/0004_auto_20160501_1632.py
src/sponsors/migrations/0004_auto_20160501_1632.py
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-05-01 16:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sponsors', '0003_auto_20160427_0722'), ] operations = [ migrations.AlterModelOptions...
Add missing migration for sponsors
Add missing migration for sponsors
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
Add missing migration for sponsors
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-05-01 16:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sponsors', '0003_auto_20160427_0722'), ] operations = [ migrations.AlterModelOptions...
<commit_before><commit_msg>Add missing migration for sponsors<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-05-01 16:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sponsors', '0003_auto_20160427_0722'), ] operations = [ migrations.AlterModelOptions...
Add missing migration for sponsors# -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-05-01 16:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sponsors', '0003_auto_20160427_0722'), ] operations = [ ...
<commit_before><commit_msg>Add missing migration for sponsors<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9.3 on 2016-05-01 16:32 from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('sponsors', '0003_auto_2016...
df8e3a2b6f7c8dbb0b93e06e204e802104aad70f
faker/providers/date_time/ru_RU/__init__.py
faker/providers/date_time/ru_RU/__init__.py
# coding: utf-8 from __future__ import unicode_literals from .. import Provider as DateTimeProvider class Provider(DateTimeProvider): @classmethod def day_of_week(cls): day = cls.date('%w') DAY_NAMES = { "0": "Воскресенье", "1": "Понедельник", "2": "Вторни...
Add russian words for date_time
Add russian words for date_time
Python
mit
joke2k/faker,joke2k/faker,danhuss/faker,trtd/faker
Add russian words for date_time
# coding: utf-8 from __future__ import unicode_literals from .. import Provider as DateTimeProvider class Provider(DateTimeProvider): @classmethod def day_of_week(cls): day = cls.date('%w') DAY_NAMES = { "0": "Воскресенье", "1": "Понедельник", "2": "Вторни...
<commit_before><commit_msg>Add russian words for date_time<commit_after>
# coding: utf-8 from __future__ import unicode_literals from .. import Provider as DateTimeProvider class Provider(DateTimeProvider): @classmethod def day_of_week(cls): day = cls.date('%w') DAY_NAMES = { "0": "Воскресенье", "1": "Понедельник", "2": "Вторни...
Add russian words for date_time# coding: utf-8 from __future__ import unicode_literals from .. import Provider as DateTimeProvider class Provider(DateTimeProvider): @classmethod def day_of_week(cls): day = cls.date('%w') DAY_NAMES = { "0": "Воскресенье", "1": "Понедел...
<commit_before><commit_msg>Add russian words for date_time<commit_after># coding: utf-8 from __future__ import unicode_literals from .. import Provider as DateTimeProvider class Provider(DateTimeProvider): @classmethod def day_of_week(cls): day = cls.date('%w') DAY_NAMES = { "0":...
d6cf9df23e8c9e3b6a8d261ea79dfe16cfa1dbb1
numba/tests/test_redefine.py
numba/tests/test_redefine.py
from numba import * import unittest class TestRedefine(unittest.TestCase): def test_redefine(self): def foo(x): return x + 1 jfoo = jit(int32(int32))(foo) # Test original function self.assertTrue(jfoo(1), 2) jfoo = jit(int32(int32))(foo) # Test re-c...
Add test for function re-definition
Add test for function re-definition
Python
bsd-2-clause
IntelLabs/numba,GaZ3ll3/numba,stuartarchibald/numba,pitrou/numba,seibert/numba,stefanseefeld/numba,ssarangi/numba,jriehl/numba,seibert/numba,gdementen/numba,pombredanne/numba,sklam/numba,stefanseefeld/numba,jriehl/numba,IntelLabs/numba,stefanseefeld/numba,pombredanne/numba,seibert/numba,stonebig/numba,GaZ3ll3/numba,skl...
Add test for function re-definition
from numba import * import unittest class TestRedefine(unittest.TestCase): def test_redefine(self): def foo(x): return x + 1 jfoo = jit(int32(int32))(foo) # Test original function self.assertTrue(jfoo(1), 2) jfoo = jit(int32(int32))(foo) # Test re-c...
<commit_before><commit_msg>Add test for function re-definition<commit_after>
from numba import * import unittest class TestRedefine(unittest.TestCase): def test_redefine(self): def foo(x): return x + 1 jfoo = jit(int32(int32))(foo) # Test original function self.assertTrue(jfoo(1), 2) jfoo = jit(int32(int32))(foo) # Test re-c...
Add test for function re-definitionfrom numba import * import unittest class TestRedefine(unittest.TestCase): def test_redefine(self): def foo(x): return x + 1 jfoo = jit(int32(int32))(foo) # Test original function self.assertTrue(jfoo(1), 2) jfoo = jit(int3...
<commit_before><commit_msg>Add test for function re-definition<commit_after>from numba import * import unittest class TestRedefine(unittest.TestCase): def test_redefine(self): def foo(x): return x + 1 jfoo = jit(int32(int32))(foo) # Test original function self.assertT...
956d524a8694bb63532ac5f4a8121f57d75b7ad1
test/BuildDir/guess-subdir.py
test/BuildDir/guess-subdir.py
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add a test case for guessing the BuildDir associated with a subdirectory argument.
Add a test case for guessing the BuildDir associated with a subdirectory argument.
Python
mit
Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons,Distrotech/scons
Add a test case for guessing the BuildDir associated with a subdirectory argument.
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
<commit_before><commit_msg>Add a test case for guessing the BuildDir associated with a subdirectory argument.<commit_after>
#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, ...
Add a test case for guessing the BuildDir associated with a subdirectory argument.#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction...
<commit_before><commit_msg>Add a test case for guessing the BuildDir associated with a subdirectory argument.<commit_after>#!/usr/bin/env python # # __COPYRIGHT__ # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the # "Software"), to...
654d2070dc25a288f680b5d93e5eb4662da403eb
planner/scrapers/virginia.py
planner/scrapers/virginia.py
from lxml import etree from planner.scrapers.base import Scraper class UVAScraper(Scraper): """Scraper for the University of Virginia""" def scrape(self): with open('/home/matt/lcp/uva.html', 'r') as f: text = f.read() html = etree.HTML(text) # Filter to a closer div to...
Add the start of the UVA scraper.
Add the start of the UVA scraper.
Python
bsd-2-clause
mblayman/lcp,mblayman/lcp,mblayman/lcp
Add the start of the UVA scraper.
from lxml import etree from planner.scrapers.base import Scraper class UVAScraper(Scraper): """Scraper for the University of Virginia""" def scrape(self): with open('/home/matt/lcp/uva.html', 'r') as f: text = f.read() html = etree.HTML(text) # Filter to a closer div to...
<commit_before><commit_msg>Add the start of the UVA scraper.<commit_after>
from lxml import etree from planner.scrapers.base import Scraper class UVAScraper(Scraper): """Scraper for the University of Virginia""" def scrape(self): with open('/home/matt/lcp/uva.html', 'r') as f: text = f.read() html = etree.HTML(text) # Filter to a closer div to...
Add the start of the UVA scraper.from lxml import etree from planner.scrapers.base import Scraper class UVAScraper(Scraper): """Scraper for the University of Virginia""" def scrape(self): with open('/home/matt/lcp/uva.html', 'r') as f: text = f.read() html = etree.HTML(text) ...
<commit_before><commit_msg>Add the start of the UVA scraper.<commit_after>from lxml import etree from planner.scrapers.base import Scraper class UVAScraper(Scraper): """Scraper for the University of Virginia""" def scrape(self): with open('/home/matt/lcp/uva.html', 'r') as f: text = f.re...
7a8488327ba41275d4b569fc73da617140e64aea
sedlex/AddGitHubArticleLinkVisitor.py
sedlex/AddGitHubArticleLinkVisitor.py
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor class AddGitHubArticleLinkVisitor(AbstractVisitor): def __init__(self, args): self.repo = args.github_repository self.law_id = None super(AddGitHubArticleLinkVisitor, self).__init__() def visit_law_reference_node(sel...
Add a visitor to generate the github history link.
Add a visitor to generate the github history link.
Python
agpl-3.0
Legilibre/SedLex
Add a visitor to generate the github history link.
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor class AddGitHubArticleLinkVisitor(AbstractVisitor): def __init__(self, args): self.repo = args.github_repository self.law_id = None super(AddGitHubArticleLinkVisitor, self).__init__() def visit_law_reference_node(sel...
<commit_before><commit_msg>Add a visitor to generate the github history link.<commit_after>
# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor class AddGitHubArticleLinkVisitor(AbstractVisitor): def __init__(self, args): self.repo = args.github_repository self.law_id = None super(AddGitHubArticleLinkVisitor, self).__init__() def visit_law_reference_node(sel...
Add a visitor to generate the github history link.# -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor class AddGitHubArticleLinkVisitor(AbstractVisitor): def __init__(self, args): self.repo = args.github_repository self.law_id = None super(AddGitHubArticleLinkVisitor, self...
<commit_before><commit_msg>Add a visitor to generate the github history link.<commit_after># -*- coding: utf-8 -*- from AbstractVisitor import AbstractVisitor class AddGitHubArticleLinkVisitor(AbstractVisitor): def __init__(self, args): self.repo = args.github_repository self.law_id = None ...
6200630904db2452ecfb551d54974acfad978d17
synapse/crypto/context_factory.py
synapse/crypto/context_factory.py
from twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers.""" def __init__(self, config): self._context = SSL.Contex...
Add server TLS context factory
Add server TLS context factory
Python
apache-2.0
illicitonion/synapse,illicitonion/synapse,howethomas/synapse,TribeMedia/synapse,iot-factory/synapse,matrix-org/synapse,illicitonion/synapse,iot-factory/synapse,iot-factory/synapse,iot-factory/synapse,rzr/synapse,illicitonion/synapse,TribeMedia/synapse,matrix-org/synapse,rzr/synapse,howethomas/synapse,rzr/synapse,howeth...
Add server TLS context factory
from twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers.""" def __init__(self, config): self._context = SSL.Contex...
<commit_before><commit_msg>Add server TLS context factory<commit_after>
from twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers.""" def __init__(self, config): self._context = SSL.Contex...
Add server TLS context factoryfrom twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers.""" def __init__(self, config): ...
<commit_before><commit_msg>Add server TLS context factory<commit_after>from twisted.internet import reactor, ssl from OpenSSL import SSL class ServerContextFactory(ssl.ContextFactory): """Factory for PyOpenSSL SSL contexts that are used to handle incoming connections and to make connections to remote servers....
c7daf4548580b0de2aa9ec02cffc17ef3e796b28
vertex/test/test_q2qclient.py
vertex/test/test_q2qclient.py
# Copyright 2005-2008 Divmod, Inc. See LICENSE file for details # -*- vertex.test.test_q2q.UDPConnection -*- """ Tests for L{vertex.q2qclient}. """ from twisted.trial import unittest from twisted.internet.protocol import Factory from twisted.protocols.amp import Command, AMP, AmpBox from vertex import q2q, q2qclie...
Add a silly test for vertex.q2qclient.enregister.
Add a silly test for vertex.q2qclient.enregister.
Python
mit
insequent/vertex,twisted/vertex,glyph/vertex,insequent/vertex,twisted/vertex
Add a silly test for vertex.q2qclient.enregister.
# Copyright 2005-2008 Divmod, Inc. See LICENSE file for details # -*- vertex.test.test_q2q.UDPConnection -*- """ Tests for L{vertex.q2qclient}. """ from twisted.trial import unittest from twisted.internet.protocol import Factory from twisted.protocols.amp import Command, AMP, AmpBox from vertex import q2q, q2qclie...
<commit_before><commit_msg>Add a silly test for vertex.q2qclient.enregister.<commit_after>
# Copyright 2005-2008 Divmod, Inc. See LICENSE file for details # -*- vertex.test.test_q2q.UDPConnection -*- """ Tests for L{vertex.q2qclient}. """ from twisted.trial import unittest from twisted.internet.protocol import Factory from twisted.protocols.amp import Command, AMP, AmpBox from vertex import q2q, q2qclie...
Add a silly test for vertex.q2qclient.enregister.# Copyright 2005-2008 Divmod, Inc. See LICENSE file for details # -*- vertex.test.test_q2q.UDPConnection -*- """ Tests for L{vertex.q2qclient}. """ from twisted.trial import unittest from twisted.internet.protocol import Factory from twisted.protocols.amp import Comm...
<commit_before><commit_msg>Add a silly test for vertex.q2qclient.enregister.<commit_after># Copyright 2005-2008 Divmod, Inc. See LICENSE file for details # -*- vertex.test.test_q2q.UDPConnection -*- """ Tests for L{vertex.q2qclient}. """ from twisted.trial import unittest from twisted.internet.protocol import Factor...
b447470e8f4e8826d87f712c6726bf8855216330
ureport/jobs/migrations/0005_add_photos.py
ureport/jobs/migrations/0005_add_photos.py
# Generated by Django 2.2.5 on 2019-09-26 23:07 from django.db import migrations def generate_job_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root").first() if not root: root = User.objects.create(username="root") DashBlockTyp...
Add migration to add photo blocks type
Add migration to add photo blocks type
Python
agpl-3.0
Ilhasoft/ureport,rapidpro/ureport,rapidpro/ureport,Ilhasoft/ureport,Ilhasoft/ureport,rapidpro/ureport,Ilhasoft/ureport,rapidpro/ureport
Add migration to add photo blocks type
# Generated by Django 2.2.5 on 2019-09-26 23:07 from django.db import migrations def generate_job_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root").first() if not root: root = User.objects.create(username="root") DashBlockTyp...
<commit_before><commit_msg>Add migration to add photo blocks type<commit_after>
# Generated by Django 2.2.5 on 2019-09-26 23:07 from django.db import migrations def generate_job_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root").first() if not root: root = User.objects.create(username="root") DashBlockTyp...
Add migration to add photo blocks type# Generated by Django 2.2.5 on 2019-09-26 23:07 from django.db import migrations def generate_job_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root").first() if not root: root = User.objects.cre...
<commit_before><commit_msg>Add migration to add photo blocks type<commit_after># Generated by Django 2.2.5 on 2019-09-26 23:07 from django.db import migrations def generate_job_block_types(apps, schema_editor): User = apps.get_model("auth", "User") root = User.objects.filter(username="root").first() if ...
3c01ff0ecee7abdd25a5812c5d3a9bfcb1df732d
tests/test_units/test_route_escapes.py
tests/test_units/test_route_escapes.py
import unittest from routes.route import Route class TestRouteEscape(unittest.TestCase): def test_normal_route(self): r = Route('test', '/foo/bar') self.assertEqual(r.routelist, ['/foo/bar']) def test_route_with_backslash(self): r = Route('test', '/foo\\\\bar') self.assertEqua...
Add tests for backslash escapes in route paths
Add tests for backslash escapes in route paths Co-Authored-By: Stephen Finucane <[email protected]>
Python
mit
bbangert/routes,webknjaz/routes
Add tests for backslash escapes in route paths Co-Authored-By: Stephen Finucane <[email protected]>
import unittest from routes.route import Route class TestRouteEscape(unittest.TestCase): def test_normal_route(self): r = Route('test', '/foo/bar') self.assertEqual(r.routelist, ['/foo/bar']) def test_route_with_backslash(self): r = Route('test', '/foo\\\\bar') self.assertEqua...
<commit_before><commit_msg>Add tests for backslash escapes in route paths Co-Authored-By: Stephen Finucane <[email protected]><commit_after>
import unittest from routes.route import Route class TestRouteEscape(unittest.TestCase): def test_normal_route(self): r = Route('test', '/foo/bar') self.assertEqual(r.routelist, ['/foo/bar']) def test_route_with_backslash(self): r = Route('test', '/foo\\\\bar') self.assertEqua...
Add tests for backslash escapes in route paths Co-Authored-By: Stephen Finucane <[email protected]>import unittest from routes.route import Route class TestRouteEscape(unittest.TestCase): def test_normal_route(self): r = Route('test', '/foo/bar') self.assertEqual(...
<commit_before><commit_msg>Add tests for backslash escapes in route paths Co-Authored-By: Stephen Finucane <[email protected]><commit_after>import unittest from routes.route import Route class TestRouteEscape(unittest.TestCase): def test_normal_route(self): r = Route('tes...
52c34e5cd6222de35ab750e6feb88be4ef8498f1
vumi/middleware/session_length.py
vumi/middleware/session_length.py
# -*- test-case-name: vumi.middleware.tests.test_provider_setter -*- from twisted.internet.defer import inlineCallbacks from vumi.middleware.base import BaseMiddleware from vumi.persist.txredis_manager import TxRedisManager class SessionLengthMiddleware(BaseMiddleware): """ Middleware for storing the session le...
Add basic framework for middleware.
Add basic framework for middleware.
Python
bsd-3-clause
TouK/vumi,TouK/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix,vishwaprakashmishra/xmatrix,TouK/vumi,harrissoerja/vumi,harrissoerja/vumi,vishwaprakashmishra/xmatrix
Add basic framework for middleware.
# -*- test-case-name: vumi.middleware.tests.test_provider_setter -*- from twisted.internet.defer import inlineCallbacks from vumi.middleware.base import BaseMiddleware from vumi.persist.txredis_manager import TxRedisManager class SessionLengthMiddleware(BaseMiddleware): """ Middleware for storing the session le...
<commit_before><commit_msg>Add basic framework for middleware.<commit_after>
# -*- test-case-name: vumi.middleware.tests.test_provider_setter -*- from twisted.internet.defer import inlineCallbacks from vumi.middleware.base import BaseMiddleware from vumi.persist.txredis_manager import TxRedisManager class SessionLengthMiddleware(BaseMiddleware): """ Middleware for storing the session le...
Add basic framework for middleware.# -*- test-case-name: vumi.middleware.tests.test_provider_setter -*- from twisted.internet.defer import inlineCallbacks from vumi.middleware.base import BaseMiddleware from vumi.persist.txredis_manager import TxRedisManager class SessionLengthMiddleware(BaseMiddleware): """ Mi...
<commit_before><commit_msg>Add basic framework for middleware.<commit_after># -*- test-case-name: vumi.middleware.tests.test_provider_setter -*- from twisted.internet.defer import inlineCallbacks from vumi.middleware.base import BaseMiddleware from vumi.persist.txredis_manager import TxRedisManager class SessionLen...
8eb21692d01f474b2dd8f0d7e05cb0713dbb0475
CodeFights/growingPlant.py
CodeFights/growingPlant.py
#!/usr/local/bin/python # Code Fights Growing Plant Problem def growingPlant(upSpeed, downSpeed, desiredHeight): if upSpeed >= desiredHeight: return 1 else: return (desiredHeight // (upSpeed - downSpeed)) def main(): tests = [ [100, 10, 910, 10], [10, 9, 4, 1] ] ...
Solve Code Fights growing plant problem
Solve Code Fights growing plant problem
Python
mit
HKuz/Test_Code
Solve Code Fights growing plant problem
#!/usr/local/bin/python # Code Fights Growing Plant Problem def growingPlant(upSpeed, downSpeed, desiredHeight): if upSpeed >= desiredHeight: return 1 else: return (desiredHeight // (upSpeed - downSpeed)) def main(): tests = [ [100, 10, 910, 10], [10, 9, 4, 1] ] ...
<commit_before><commit_msg>Solve Code Fights growing plant problem<commit_after>
#!/usr/local/bin/python # Code Fights Growing Plant Problem def growingPlant(upSpeed, downSpeed, desiredHeight): if upSpeed >= desiredHeight: return 1 else: return (desiredHeight // (upSpeed - downSpeed)) def main(): tests = [ [100, 10, 910, 10], [10, 9, 4, 1] ] ...
Solve Code Fights growing plant problem#!/usr/local/bin/python # Code Fights Growing Plant Problem def growingPlant(upSpeed, downSpeed, desiredHeight): if upSpeed >= desiredHeight: return 1 else: return (desiredHeight // (upSpeed - downSpeed)) def main(): tests = [ [100, 10, 910,...
<commit_before><commit_msg>Solve Code Fights growing plant problem<commit_after>#!/usr/local/bin/python # Code Fights Growing Plant Problem def growingPlant(upSpeed, downSpeed, desiredHeight): if upSpeed >= desiredHeight: return 1 else: return (desiredHeight // (upSpeed - downSpeed)) def mai...
824eea86b5166bce428c466c867708a9c8b15fb0
tests/lows_and_highs.py
tests/lows_and_highs.py
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from vector import cb, plot_peaks import peakutils.peak def plot_peaks_lows_highs(x, highs, lows, algorithm=None, mph=None, mpd=None): """Plot results of the peak dectection.""" try: import matplotlib.pyplot as plt except ImportError:...
Add example for high and low peak detection
Add example for high and low peak detection
Python
mit
MonsieurV/py-findpeaks,MonsieurV/py-findpeaks
Add example for high and low peak detection
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from vector import cb, plot_peaks import peakutils.peak def plot_peaks_lows_highs(x, highs, lows, algorithm=None, mph=None, mpd=None): """Plot results of the peak dectection.""" try: import matplotlib.pyplot as plt except ImportError:...
<commit_before><commit_msg>Add example for high and low peak detection<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from vector import cb, plot_peaks import peakutils.peak def plot_peaks_lows_highs(x, highs, lows, algorithm=None, mph=None, mpd=None): """Plot results of the peak dectection.""" try: import matplotlib.pyplot as plt except ImportError:...
Add example for high and low peak detection#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from vector import cb, plot_peaks import peakutils.peak def plot_peaks_lows_highs(x, highs, lows, algorithm=None, mph=None, mpd=None): """Plot results of the peak dectection.""" try: import matpl...
<commit_before><commit_msg>Add example for high and low peak detection<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- import numpy as np from vector import cb, plot_peaks import peakutils.peak def plot_peaks_lows_highs(x, highs, lows, algorithm=None, mph=None, mpd=None): """Plot results of the peak dec...
73f891d7eebb5d524cee2da606bc0d195aeea890
tests/test_checkinfo.py
tests/test_checkinfo.py
from itertools import combinations from string import ascii_lowercase from botbot import checkinfo as ci def test_bidirectional_problem_serialization(tmpdir): info = ci.CheckResult(tmpdir.strpath) for probs in combinations(ascii_lowercase, 3): info.add_problem(''.join(probs)) old_probs = info.pro...
Add new test for CheckResult
Add new test for CheckResult
Python
mit
jackstanek/BotBot,jackstanek/BotBot
Add new test for CheckResult
from itertools import combinations from string import ascii_lowercase from botbot import checkinfo as ci def test_bidirectional_problem_serialization(tmpdir): info = ci.CheckResult(tmpdir.strpath) for probs in combinations(ascii_lowercase, 3): info.add_problem(''.join(probs)) old_probs = info.pro...
<commit_before><commit_msg>Add new test for CheckResult<commit_after>
from itertools import combinations from string import ascii_lowercase from botbot import checkinfo as ci def test_bidirectional_problem_serialization(tmpdir): info = ci.CheckResult(tmpdir.strpath) for probs in combinations(ascii_lowercase, 3): info.add_problem(''.join(probs)) old_probs = info.pro...
Add new test for CheckResultfrom itertools import combinations from string import ascii_lowercase from botbot import checkinfo as ci def test_bidirectional_problem_serialization(tmpdir): info = ci.CheckResult(tmpdir.strpath) for probs in combinations(ascii_lowercase, 3): info.add_problem(''.join(probs...
<commit_before><commit_msg>Add new test for CheckResult<commit_after>from itertools import combinations from string import ascii_lowercase from botbot import checkinfo as ci def test_bidirectional_problem_serialization(tmpdir): info = ci.CheckResult(tmpdir.strpath) for probs in combinations(ascii_lowercase, 3...
9a2a8100b566d2332db958979b776a10ac59f38a
alexa_parser.py
alexa_parser.py
import csv import requests import zipfile import os import pika from os.path import expanduser BASEPATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ALEXA_FILE = BASEPATH + "/alexa.zip" connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() chann...
Add Alexa top 1 Million fetcher to push into RabbitMQ
Add Alexa top 1 Million fetcher to push into RabbitMQ
Python
mpl-2.0
seiflotfy/compatipede,seiflotfy/compatipede,seiflotfy/compatipede,seiflotfy/compatipede
Add Alexa top 1 Million fetcher to push into RabbitMQ
import csv import requests import zipfile import os import pika from os.path import expanduser BASEPATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ALEXA_FILE = BASEPATH + "/alexa.zip" connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() chann...
<commit_before><commit_msg>Add Alexa top 1 Million fetcher to push into RabbitMQ<commit_after>
import csv import requests import zipfile import os import pika from os.path import expanduser BASEPATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ALEXA_FILE = BASEPATH + "/alexa.zip" connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) channel = connection.channel() chann...
Add Alexa top 1 Million fetcher to push into RabbitMQimport csv import requests import zipfile import os import pika from os.path import expanduser BASEPATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ALEXA_FILE = BASEPATH + "/alexa.zip" connection = pika.BlockingConnection(pika.ConnectionParamete...
<commit_before><commit_msg>Add Alexa top 1 Million fetcher to push into RabbitMQ<commit_after>import csv import requests import zipfile import os import pika from os.path import expanduser BASEPATH = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) ALEXA_FILE = BASEPATH + "/alexa.zip" connection = pika.B...
8510d648730059518ca6953aa716d59cc9f853ca
pybug/matlab/__init__.py
pybug/matlab/__init__.py
from numpy import gradient as np_gradient, reshape as np_reshape def gradient(f, *varargs): """ Return the gradient of an N-dimensional array. The gradient is computed using central differences in the interior and first differences at the boundaries. The returned gradient hence has the same shape as ...
Add gradient and reshape functions to match Matlab
Add gradient and reshape functions to match Matlab
Python
bsd-3-clause
jabooth/menpo-archive,yuxiang-zhou/menpo,grigorisg9gr/menpo,jabooth/menpo-archive,mozata/menpo,patricksnape/menpo,grigorisg9gr/menpo,jabooth/menpo-archive,patricksnape/menpo,mozata/menpo,grigorisg9gr/menpo,menpo/menpo,menpo/menpo,mozata/menpo,yuxiang-zhou/menpo,menpo/menpo,jabooth/menpo-archive,patricksnape/menpo,yuxia...
Add gradient and reshape functions to match Matlab
from numpy import gradient as np_gradient, reshape as np_reshape def gradient(f, *varargs): """ Return the gradient of an N-dimensional array. The gradient is computed using central differences in the interior and first differences at the boundaries. The returned gradient hence has the same shape as ...
<commit_before><commit_msg>Add gradient and reshape functions to match Matlab<commit_after>
from numpy import gradient as np_gradient, reshape as np_reshape def gradient(f, *varargs): """ Return the gradient of an N-dimensional array. The gradient is computed using central differences in the interior and first differences at the boundaries. The returned gradient hence has the same shape as ...
Add gradient and reshape functions to match Matlabfrom numpy import gradient as np_gradient, reshape as np_reshape def gradient(f, *varargs): """ Return the gradient of an N-dimensional array. The gradient is computed using central differences in the interior and first differences at the boundaries. ...
<commit_before><commit_msg>Add gradient and reshape functions to match Matlab<commit_after>from numpy import gradient as np_gradient, reshape as np_reshape def gradient(f, *varargs): """ Return the gradient of an N-dimensional array. The gradient is computed using central differences in the interior and ...
80966a18fbe92839370c90271d1118a0ac621501
examples/check_equal.py
examples/check_equal.py
#!/usr/bin/env python3 from segpy.reader import create_reader from segpy.trace_header import TraceHeaderRev1 from segpy.types import Int16 from segpy.writer import write_segy from segpy.header import are_equal, field class CustomTraceHeader(TraceHeaderRev1): unassigned_1 = field( Int16, offset=2...
Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.
Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.
Python
agpl-3.0
hohogpb/segpy,Kramer477/segpy,kwinkunks/segpy,abingham/segpy,kjellkongsvik/segpy,asbjorn/segpy
Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.
#!/usr/bin/env python3 from segpy.reader import create_reader from segpy.trace_header import TraceHeaderRev1 from segpy.types import Int16 from segpy.writer import write_segy from segpy.header import are_equal, field class CustomTraceHeader(TraceHeaderRev1): unassigned_1 = field( Int16, offset=2...
<commit_before><commit_msg>Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.<commit_after>
#!/usr/bin/env python3 from segpy.reader import create_reader from segpy.trace_header import TraceHeaderRev1 from segpy.types import Int16 from segpy.writer import write_segy from segpy.header import are_equal, field class CustomTraceHeader(TraceHeaderRev1): unassigned_1 = field( Int16, offset=2...
Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.#!/usr/bin/env python3 from segpy.reader import create_reader from segpy.trace_header import TraceHeaderRev1 from segpy.types import Int16 from segpy.writer import write_segy from segpy.header import are_equal, field ...
<commit_before><commit_msg>Add a small program for checking whether SEG Y files roundtrip through the data structure flawlessly.<commit_after>#!/usr/bin/env python3 from segpy.reader import create_reader from segpy.trace_header import TraceHeaderRev1 from segpy.types import Int16 from segpy.writer import write_segy fr...
68c3ee25d505c680a08ef53de24c4b920099e081
scripts/clear_invalid_unclaimed_records.py
scripts/clear_invalid_unclaimed_records.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to remove unclaimed records for confirmed users. Once a user has confirmed their email address, all their unclaimed records should be cleared so that their full name shows up correctly on all projects. To run: :: $ python -m scripts.clear_invalid_unclaimed_r...
Add migration script to clear invalid unclaimed records
Add migration script to clear invalid unclaimed records Confirmed users should not have unclaimed records
Python
apache-2.0
danielneis/osf.io,bdyetton/prettychart,petermalcolm/osf.io,CenterForOpenScience/osf.io,jnayak1/osf.io,lamdnhan/osf.io,icereval/osf.io,icereval/osf.io,zkraime/osf.io,icereval/osf.io,cldershem/osf.io,chrisseto/osf.io,dplorimer/osf,doublebits/osf.io,MerlinZhang/osf.io,DanielSBrown/osf.io,kwierman/osf.io,hmoco/osf.io,lynds...
Add migration script to clear invalid unclaimed records Confirmed users should not have unclaimed records
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to remove unclaimed records for confirmed users. Once a user has confirmed their email address, all their unclaimed records should be cleared so that their full name shows up correctly on all projects. To run: :: $ python -m scripts.clear_invalid_unclaimed_r...
<commit_before><commit_msg>Add migration script to clear invalid unclaimed records Confirmed users should not have unclaimed records<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to remove unclaimed records for confirmed users. Once a user has confirmed their email address, all their unclaimed records should be cleared so that their full name shows up correctly on all projects. To run: :: $ python -m scripts.clear_invalid_unclaimed_r...
Add migration script to clear invalid unclaimed records Confirmed users should not have unclaimed records#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to remove unclaimed records for confirmed users. Once a user has confirmed their email address, all their unclaimed records should be cleared so that their fu...
<commit_before><commit_msg>Add migration script to clear invalid unclaimed records Confirmed users should not have unclaimed records<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """Script to remove unclaimed records for confirmed users. Once a user has confirmed their email address, all their unclaimed r...
1073485bc5ceadf771b09501e3302b792de75691
portal/migrations/versions/9ebdfeb28bef_.py
portal/migrations/versions/9ebdfeb28bef_.py
"""Correct rank of CRV baseline Revision ID: 9ebdfeb28bef Revises: a679f493bcdd Create Date: 2017-10-09 10:16:40.584279 """ from alembic import op from sqlalchemy.orm import sessionmaker from portal.models.questionnaire_bank import QuestionnaireBank # revision identifiers, used by Alembic. revision = '9ebdfeb28bef'...
Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)
Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)
Python
bsd-3-clause
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)
"""Correct rank of CRV baseline Revision ID: 9ebdfeb28bef Revises: a679f493bcdd Create Date: 2017-10-09 10:16:40.584279 """ from alembic import op from sqlalchemy.orm import sessionmaker from portal.models.questionnaire_bank import QuestionnaireBank # revision identifiers, used by Alembic. revision = '9ebdfeb28bef'...
<commit_before><commit_msg>Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)<commit_after>
"""Correct rank of CRV baseline Revision ID: 9ebdfeb28bef Revises: a679f493bcdd Create Date: 2017-10-09 10:16:40.584279 """ from alembic import op from sqlalchemy.orm import sessionmaker from portal.models.questionnaire_bank import QuestionnaireBank # revision identifiers, used by Alembic. revision = '9ebdfeb28bef'...
Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)"""Correct rank of CRV baseline Revision ID: 9ebdfeb28bef Revises: a679f493bcdd Create Date: 2017-10-09 10:16:40.584279 """ from alembic import op from sqlalchemy.orm import sessionmaker from portal.models.questionnai...
<commit_before><commit_msg>Correct crv baseline questionnaire rank w/ migration (FKs prevent site_persistence fix from working)<commit_after>"""Correct rank of CRV baseline Revision ID: 9ebdfeb28bef Revises: a679f493bcdd Create Date: 2017-10-09 10:16:40.584279 """ from alembic import op from sqlalchemy.orm import ses...
91abe26fd0b06339b3283d1dbe096edfdc52dadb
numpy-array-of-tuple.py
numpy-array-of-tuple.py
# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D # array instead. list_of_tuples = [(1, 2), (3, 4)] import numpy as np print('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples)) A = np.array(list_of_tuples) print('numpy array of tuples:', A, 'type:', type(A)) # It makes comp...
Add numpy array of tuples
Add numpy array of tuples
Python
mit
cmey/surprising-snippets,cmey/surprising-snippets
Add numpy array of tuples
# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D # array instead. list_of_tuples = [(1, 2), (3, 4)] import numpy as np print('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples)) A = np.array(list_of_tuples) print('numpy array of tuples:', A, 'type:', type(A)) # It makes comp...
<commit_before><commit_msg>Add numpy array of tuples<commit_after>
# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D # array instead. list_of_tuples = [(1, 2), (3, 4)] import numpy as np print('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples)) A = np.array(list_of_tuples) print('numpy array of tuples:', A, 'type:', type(A)) # It makes comp...
Add numpy array of tuples# Numpy converts a list of tuples *not* into an array of tuples, but into a 2D # array instead. list_of_tuples = [(1, 2), (3, 4)] import numpy as np print('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples)) A = np.array(list_of_tuples) print('numpy array of tuples:', A, 'type:', t...
<commit_before><commit_msg>Add numpy array of tuples<commit_after># Numpy converts a list of tuples *not* into an array of tuples, but into a 2D # array instead. list_of_tuples = [(1, 2), (3, 4)] import numpy as np print('list of tuples:', list_of_tuples, 'type:', type(list_of_tuples)) A = np.array(list_of_tuples) prin...
45c4b092a7753c3a5dd7c36baf2bcfc17b32a871
blink_strip/python_example/flash_example.py
blink_strip/python_example/flash_example.py
import serial import time class blinkyBoard: def init(self, port, baud): self.serial = serial.Serial(port, baud) self.serial.open() def sendPixel(self,r,g,b): data = bytearray() data.append(0x80 | (r>>1)) data.append(0x80 | (g>>1)) data.append(0x80 | (b>>1)) self.serial.write(data) ...
Add python data transmission example.
Add python data transmission example.
Python
apache-2.0
Blinkinlabs/BlinkyTape,Blinkinlabs/BlinkyTape,Blinkinlabs/BlinkyTape
Add python data transmission example.
import serial import time class blinkyBoard: def init(self, port, baud): self.serial = serial.Serial(port, baud) self.serial.open() def sendPixel(self,r,g,b): data = bytearray() data.append(0x80 | (r>>1)) data.append(0x80 | (g>>1)) data.append(0x80 | (b>>1)) self.serial.write(data) ...
<commit_before><commit_msg>Add python data transmission example.<commit_after>
import serial import time class blinkyBoard: def init(self, port, baud): self.serial = serial.Serial(port, baud) self.serial.open() def sendPixel(self,r,g,b): data = bytearray() data.append(0x80 | (r>>1)) data.append(0x80 | (g>>1)) data.append(0x80 | (b>>1)) self.serial.write(data) ...
Add python data transmission example.import serial import time class blinkyBoard: def init(self, port, baud): self.serial = serial.Serial(port, baud) self.serial.open() def sendPixel(self,r,g,b): data = bytearray() data.append(0x80 | (r>>1)) data.append(0x80 | (g>>1)) data.append(0x80 | (b...
<commit_before><commit_msg>Add python data transmission example.<commit_after>import serial import time class blinkyBoard: def init(self, port, baud): self.serial = serial.Serial(port, baud) self.serial.open() def sendPixel(self,r,g,b): data = bytearray() data.append(0x80 | (r>>1)) data.append...
4bf03eaf81f8d4c28e3b3b89c7442a787361eb5e
scripts/structure_mlsp2013_dataset.py
scripts/structure_mlsp2013_dataset.py
import csv def test(): with open("CVfolds_2.txt", newline='') as id2set, open("rec_id2filename.txt", newline='') as id2file, open("rec_labels_test_hidden.txt", newline='') as id2label: with open("file2label.csv", 'w', newline='') as file2label: readId2Label = csv.reader(id2label) re...
Add a script which structures the mlsp2013 data
Add a script which structures the mlsp2013 data - creates a csv file which maps a file name to a label set
Python
mit
johnmartinsson/bird-species-classification,johnmartinsson/bird-species-classification
Add a script which structures the mlsp2013 data - creates a csv file which maps a file name to a label set
import csv def test(): with open("CVfolds_2.txt", newline='') as id2set, open("rec_id2filename.txt", newline='') as id2file, open("rec_labels_test_hidden.txt", newline='') as id2label: with open("file2label.csv", 'w', newline='') as file2label: readId2Label = csv.reader(id2label) re...
<commit_before><commit_msg>Add a script which structures the mlsp2013 data - creates a csv file which maps a file name to a label set<commit_after>
import csv def test(): with open("CVfolds_2.txt", newline='') as id2set, open("rec_id2filename.txt", newline='') as id2file, open("rec_labels_test_hidden.txt", newline='') as id2label: with open("file2label.csv", 'w', newline='') as file2label: readId2Label = csv.reader(id2label) re...
Add a script which structures the mlsp2013 data - creates a csv file which maps a file name to a label setimport csv def test(): with open("CVfolds_2.txt", newline='') as id2set, open("rec_id2filename.txt", newline='') as id2file, open("rec_labels_test_hidden.txt", newline='') as id2label: with open("fi...
<commit_before><commit_msg>Add a script which structures the mlsp2013 data - creates a csv file which maps a file name to a label set<commit_after>import csv def test(): with open("CVfolds_2.txt", newline='') as id2set, open("rec_id2filename.txt", newline='') as id2file, open("rec_labels_test_hidden.txt", newli...
dc399c7834b918ea99baa92d1cdededa43623d87
ovp_projects/migrations/0033_auto_20170208_2118.py
ovp_projects/migrations/0033_auto_20170208_2118.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-08 21:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ovp_projects', '0032_auto_20170206_1905'), ] operations = [ migrations.Alte...
Add missing migrations for last commit
Add missing migrations for last commit
Python
agpl-3.0
OpenVolunteeringPlatform/django-ovp-projects,OpenVolunteeringPlatform/django-ovp-projects
Add missing migrations for last commit
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-08 21:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ovp_projects', '0032_auto_20170206_1905'), ] operations = [ migrations.Alte...
<commit_before><commit_msg>Add missing migrations for last commit<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-08 21:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ovp_projects', '0032_auto_20170206_1905'), ] operations = [ migrations.Alte...
Add missing migrations for last commit# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-08 21:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ovp_projects', '0032_auto_20170206_1905'), ] ...
<commit_before><commit_msg>Add missing migrations for last commit<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-02-08 21:18 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('ovp_projects'...
f320ff11f74de4df9933fc25db6e9fabbcb89f81
api/bots/followup/test_followup.py
api/bots/followup/test_followup.py
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path....
Add tests for followup bot.
bots: Add tests for followup bot. 'followup' bot has different message handling behavior for different messages. For usual messages it calls 'send_message' function of 'BotHandlerApi' class. For empty messages it calls 'send_reply' function of 'BotHandlerApi' class.
Python
apache-2.0
verma-varsha/zulip,eeshangarg/zulip,vabs22/zulip,punchagan/zulip,tommyip/zulip,vaidap/zulip,synicalsyntax/zulip,vabs22/zulip,punchagan/zulip,kou/zulip,vabs22/zulip,timabbott/zulip,vaidap/zulip,amanharitsh123/zulip,andersk/zulip,shubhamdhama/zulip,jrowan/zulip,rht/zulip,Galexrt/zulip,rht/zulip,rht/zulip,andersk/zulip,br...
bots: Add tests for followup bot. 'followup' bot has different message handling behavior for different messages. For usual messages it calls 'send_message' function of 'BotHandlerApi' class. For empty messages it calls 'send_reply' function of 'BotHandlerApi' class.
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path....
<commit_before><commit_msg>bots: Add tests for followup bot. 'followup' bot has different message handling behavior for different messages. For usual messages it calls 'send_message' function of 'BotHandlerApi' class. For empty messages it calls 'send_reply' function of 'BotHandlerApi' class.<commit_after>
#!/usr/bin/env python from __future__ import absolute_import from __future__ import print_function import os import sys our_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.insert(0, os.path.normpath(os.path.join(our_dir))) # For dev setups, we can find the API in the repo itself. if os.path.exists(os.path....
bots: Add tests for followup bot. 'followup' bot has different message handling behavior for different messages. For usual messages it calls 'send_message' function of 'BotHandlerApi' class. For empty messages it calls 'send_reply' function of 'BotHandlerApi' class.#!/usr/bin/env python from __future__ import absolut...
<commit_before><commit_msg>bots: Add tests for followup bot. 'followup' bot has different message handling behavior for different messages. For usual messages it calls 'send_message' function of 'BotHandlerApi' class. For empty messages it calls 'send_reply' function of 'BotHandlerApi' class.<commit_after>#!/usr/bin/e...
0f9697c94c75e86edacfaa7982a5128779ee82e7
ideascube/search/migrations/0002_reindex.py
ideascube/search/migrations/0002_reindex.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from ideascube.search.utils import create_index_table reindex = lambda *args: create_index_table(force=True) class Migration(migrations.Migration): dependencies = [('search', '0001_initial')] operations = [ ...
Add a migration script that reindex the contents
Add a migration script that reindex the contents
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
Add a migration script that reindex the contents
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from ideascube.search.utils import create_index_table reindex = lambda *args: create_index_table(force=True) class Migration(migrations.Migration): dependencies = [('search', '0001_initial')] operations = [ ...
<commit_before><commit_msg>Add a migration script that reindex the contents<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from ideascube.search.utils import create_index_table reindex = lambda *args: create_index_table(force=True) class Migration(migrations.Migration): dependencies = [('search', '0001_initial')] operations = [ ...
Add a migration script that reindex the contents# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from ideascube.search.utils import create_index_table reindex = lambda *args: create_index_table(force=True) class Migration(migrations.Migration): dependencies = [('...
<commit_before><commit_msg>Add a migration script that reindex the contents<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from ideascube.search.utils import create_index_table reindex = lambda *args: create_index_table(force=True) class Migration(migra...
93642ed71a2a0ec8fe96858b20c319c061706f39
cleanup_repo.py
cleanup_repo.py
#!/usr/bin/env python import subprocess import os.path import sys import re from contextlib import contextmanager TAGS_RE = re.compile('.+/tags/(.+)') def git(*args): p = subprocess.Popen(['git'] + list(args), stdout=subprocess.PIPE) output = p.communicate()[0] if p.returncode != 0: raise Exce...
Add little script to do basic cleanup after git svn clone
Add little script to do basic cleanup after git svn clone
Python
mit
develersrl/git-externals,develersrl/git-externals,develersrl/git-externals
Add little script to do basic cleanup after git svn clone
#!/usr/bin/env python import subprocess import os.path import sys import re from contextlib import contextmanager TAGS_RE = re.compile('.+/tags/(.+)') def git(*args): p = subprocess.Popen(['git'] + list(args), stdout=subprocess.PIPE) output = p.communicate()[0] if p.returncode != 0: raise Exce...
<commit_before><commit_msg>Add little script to do basic cleanup after git svn clone<commit_after>
#!/usr/bin/env python import subprocess import os.path import sys import re from contextlib import contextmanager TAGS_RE = re.compile('.+/tags/(.+)') def git(*args): p = subprocess.Popen(['git'] + list(args), stdout=subprocess.PIPE) output = p.communicate()[0] if p.returncode != 0: raise Exce...
Add little script to do basic cleanup after git svn clone#!/usr/bin/env python import subprocess import os.path import sys import re from contextlib import contextmanager TAGS_RE = re.compile('.+/tags/(.+)') def git(*args): p = subprocess.Popen(['git'] + list(args), stdout=subprocess.PIPE) output = p.commu...
<commit_before><commit_msg>Add little script to do basic cleanup after git svn clone<commit_after>#!/usr/bin/env python import subprocess import os.path import sys import re from contextlib import contextmanager TAGS_RE = re.compile('.+/tags/(.+)') def git(*args): p = subprocess.Popen(['git'] + list(args), std...
3055bc1e261c4f3eef7eb24d704cb9c19a8d4723
sfepy/discrete/dg/dg_conditions.py
sfepy/discrete/dg/dg_conditions.py
from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function from sfepy.discrete.conditions import Condition, PeriodicBC, EssentialBC import six class DGPeriodicBC(PeriodicBC): ... class DGEssentialBC(EssentialBC)...
Reformat source files, add some docstrings.
Reformat source files, add some docstrings.
Python
bsd-3-clause
sfepy/sfepy,sfepy/sfepy,vlukes/sfepy,BubuLK/sfepy,BubuLK/sfepy,vlukes/sfepy,sfepy/sfepy,BubuLK/sfepy,rc/sfepy,rc/sfepy,vlukes/sfepy,rc/sfepy
Reformat source files, add some docstrings.
from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function from sfepy.discrete.conditions import Condition, PeriodicBC, EssentialBC import six class DGPeriodicBC(PeriodicBC): ... class DGEssentialBC(EssentialBC)...
<commit_before><commit_msg>Reformat source files, add some docstrings.<commit_after>
from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function from sfepy.discrete.conditions import Condition, PeriodicBC, EssentialBC import six class DGPeriodicBC(PeriodicBC): ... class DGEssentialBC(EssentialBC)...
Reformat source files, add some docstrings.from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function from sfepy.discrete.conditions import Condition, PeriodicBC, EssentialBC import six class DGPeriodicBC(PeriodicBC)...
<commit_before><commit_msg>Reformat source files, add some docstrings.<commit_after>from __future__ import absolute_import import numpy as nm from sfepy.base.base import basestr, Container, Struct from sfepy.discrete.functions import Function from sfepy.discrete.conditions import Condition, PeriodicBC, EssentialBC im...
10fc0e0b85edb04c676fd75e95ab539084063d13
python/lisa_workbook.py
python/lisa_workbook.py
chapters, problems_per_page = list(map(int, input().strip().split(' '))) problems_per_chapter = list(map(int, input().strip().split(' '))) pages = [[]] special_problems = 0 for chapter, problems in enumerate(problems_per_chapter): current_problem = 1 if len(pages[-1]) != 0: pages.append([]) while ...
Solve lisa workbook w/ too many nested loops
Solve lisa workbook w/ too many nested loops
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
Solve lisa workbook w/ too many nested loops
chapters, problems_per_page = list(map(int, input().strip().split(' '))) problems_per_chapter = list(map(int, input().strip().split(' '))) pages = [[]] special_problems = 0 for chapter, problems in enumerate(problems_per_chapter): current_problem = 1 if len(pages[-1]) != 0: pages.append([]) while ...
<commit_before><commit_msg>Solve lisa workbook w/ too many nested loops<commit_after>
chapters, problems_per_page = list(map(int, input().strip().split(' '))) problems_per_chapter = list(map(int, input().strip().split(' '))) pages = [[]] special_problems = 0 for chapter, problems in enumerate(problems_per_chapter): current_problem = 1 if len(pages[-1]) != 0: pages.append([]) while ...
Solve lisa workbook w/ too many nested loopschapters, problems_per_page = list(map(int, input().strip().split(' '))) problems_per_chapter = list(map(int, input().strip().split(' '))) pages = [[]] special_problems = 0 for chapter, problems in enumerate(problems_per_chapter): current_problem = 1 if len(pages[-1...
<commit_before><commit_msg>Solve lisa workbook w/ too many nested loops<commit_after>chapters, problems_per_page = list(map(int, input().strip().split(' '))) problems_per_chapter = list(map(int, input().strip().split(' '))) pages = [[]] special_problems = 0 for chapter, problems in enumerate(problems_per_chapter): ...
f88e5b7438617fdd10a25951fc442f59a8def1ca
zerver/migrations/0018_realm_emoji_message.py
zerver/migrations/0018_realm_emoji_message.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('zerver', '0017_userprofile_bot_type'), ] operations = [ migrations.AlterField( mod...
Add missing no-op migration for realm_emoji.
Add missing no-op migration for realm_emoji. Because of how Django's migration system works, changing the error message attached to a model field's validator results in an extra migration.
Python
apache-2.0
joyhchen/zulip,sharmaeklavya2/zulip,vaidap/zulip,timabbott/zulip,ahmadassaf/zulip,mohsenSy/zulip,arpith/zulip,AZtheAsian/zulip,zulip/zulip,niftynei/zulip,rht/zulip,dhcrzf/zulip,vabs22/zulip,vaidap/zulip,calvinleenyc/zulip,calvinleenyc/zulip,umkay/zulip,synicalsyntax/zulip,SmartPeople/zulip,KingxBanana/zulip,niftynei/zu...
Add missing no-op migration for realm_emoji. Because of how Django's migration system works, changing the error message attached to a model field's validator results in an extra migration.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('zerver', '0017_userprofile_bot_type'), ] operations = [ migrations.AlterField( mod...
<commit_before><commit_msg>Add missing no-op migration for realm_emoji. Because of how Django's migration system works, changing the error message attached to a model field's validator results in an extra migration.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.validators class Migration(migrations.Migration): dependencies = [ ('zerver', '0017_userprofile_bot_type'), ] operations = [ migrations.AlterField( mod...
Add missing no-op migration for realm_emoji. Because of how Django's migration system works, changing the error message attached to a model field's validator results in an extra migration.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations import django.core.valida...
<commit_before><commit_msg>Add missing no-op migration for realm_emoji. Because of how Django's migration system works, changing the error message attached to a model field's validator results in an extra migration.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import mod...
5968c21c2c2b0e8305229fe5976d9d13786390e5
notifications/schedule_posted.py
notifications/schedule_posted.py
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class SchedulePostedNotification(BaseNotification): def __init__(self, event): self.event = event def _build_dict(self): data = {} data['message_type'] = NotificationTyp...
Add notification for schedule being posted
Add notification for schedule being posted
Python
mit
fangeugene/the-blue-alliance,phil-lopreiato/the-blue-alliance,nwalters512/the-blue-alliance,synth3tk/the-blue-alliance,verycumbersome/the-blue-alliance,the-blue-alliance/the-blue-alliance,verycumbersome/the-blue-alliance,1fish2/the-blue-alliance,josephbisch/the-blue-alliance,tsteward/the-blue-alliance,tsteward/the-blue...
Add notification for schedule being posted
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class SchedulePostedNotification(BaseNotification): def __init__(self, event): self.event = event def _build_dict(self): data = {} data['message_type'] = NotificationTyp...
<commit_before><commit_msg>Add notification for schedule being posted<commit_after>
from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class SchedulePostedNotification(BaseNotification): def __init__(self, event): self.event = event def _build_dict(self): data = {} data['message_type'] = NotificationTyp...
Add notification for schedule being postedfrom consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class SchedulePostedNotification(BaseNotification): def __init__(self, event): self.event = event def _build_dict(self): data = {} ...
<commit_before><commit_msg>Add notification for schedule being posted<commit_after>from consts.notification_type import NotificationType from notifications.base_notification import BaseNotification class SchedulePostedNotification(BaseNotification): def __init__(self, event): self.event = event def ...
4aa37bafa437614542c58f6d8ad40d9d8670df95
test/test_logger.py
test/test_logger.py
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals import logbook from pytablewriter import ( set_logger, set_log_level, ) import pytest class Test_set_logger(object): @pytest.mark.para...
Add test cases for the logger
Add test cases for the logger
Python
mit
thombashi/pytablewriter
Add test cases for the logger
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals import logbook from pytablewriter import ( set_logger, set_log_level, ) import pytest class Test_set_logger(object): @pytest.mark.para...
<commit_before><commit_msg>Add test cases for the logger<commit_after>
# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals import logbook from pytablewriter import ( set_logger, set_log_level, ) import pytest class Test_set_logger(object): @pytest.mark.para...
Add test cases for the logger# encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals import logbook from pytablewriter import ( set_logger, set_log_level, ) import pytest class Test_set_logger(ob...
<commit_before><commit_msg>Add test cases for the logger<commit_after># encoding: utf-8 """ .. codeauthor:: Tsuyoshi Hombashi <[email protected]> """ from __future__ import print_function from __future__ import unicode_literals import logbook from pytablewriter import ( set_logger, set_log_level, )...
71cd3709ba08bf87825816099e203eae57c05752
dictionaries/scripts/create_english_superset_addendum.py
dictionaries/scripts/create_english_superset_addendum.py
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-n", "--new_files", dest="new_files", default="", help="Comma separated list of new files") optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") optparser.add_option("...
Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in
Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in
Python
mit
brendandc/multilingual-google-image-scraper
Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-n", "--new_files", dest="new_files", default="", help="Comma separated list of new files") optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") optparser.add_option("...
<commit_before><commit_msg>Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in<commit_after>
import optparse import os optparser = optparse.OptionParser() optparser.add_option("-n", "--new_files", dest="new_files", default="", help="Comma separated list of new files") optparser.add_option("-d", "--directory", dest="directory", default="dictionaries/", help="Directory with dictionaries") optparser.add_option("...
Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them inimport optparse import os optparser = optparse.OptionParser() optparser.add_option("-n", "--new_files", dest="new_files", de...
<commit_before><commit_msg>Add script that creates an addendum to the english superset, to account for new dictionaries being added. Ensures we don't already have the english words in the existing set before adding them in<commit_after>import optparse import os optparser = optparse.OptionParser() optparser.add_option(...
a68699fbea88b541c6ce8bd519c3886b0fa8f197
scripts/etherbone_perf.py
scripts/etherbone_perf.py
import time import cProfile import argparse from utils import memread, memwrite def run(wb, rw, n, *, burst, profile=True): datas = list(range(n)) ctx = locals() ctx['wb'] = wb ctx['memread'] = memread ctx['memwrite'] = memwrite fname = 'tmp/profiling/{}_0x{:x}_b{}.profile'.format(rw, n, bu...
Add a script for EtherBone transfers profiling
Add a script for EtherBone transfers profiling
Python
apache-2.0
antmicro/litex-rowhammer-tester,antmicro/litex-rowhammer-tester,antmicro/litex-rowhammer-tester
Add a script for EtherBone transfers profiling
import time import cProfile import argparse from utils import memread, memwrite def run(wb, rw, n, *, burst, profile=True): datas = list(range(n)) ctx = locals() ctx['wb'] = wb ctx['memread'] = memread ctx['memwrite'] = memwrite fname = 'tmp/profiling/{}_0x{:x}_b{}.profile'.format(rw, n, bu...
<commit_before><commit_msg>Add a script for EtherBone transfers profiling<commit_after>
import time import cProfile import argparse from utils import memread, memwrite def run(wb, rw, n, *, burst, profile=True): datas = list(range(n)) ctx = locals() ctx['wb'] = wb ctx['memread'] = memread ctx['memwrite'] = memwrite fname = 'tmp/profiling/{}_0x{:x}_b{}.profile'.format(rw, n, bu...
Add a script for EtherBone transfers profilingimport time import cProfile import argparse from utils import memread, memwrite def run(wb, rw, n, *, burst, profile=True): datas = list(range(n)) ctx = locals() ctx['wb'] = wb ctx['memread'] = memread ctx['memwrite'] = memwrite fname = 'tmp/pro...
<commit_before><commit_msg>Add a script for EtherBone transfers profiling<commit_after>import time import cProfile import argparse from utils import memread, memwrite def run(wb, rw, n, *, burst, profile=True): datas = list(range(n)) ctx = locals() ctx['wb'] = wb ctx['memread'] = memread ctx['me...
0a75aa4bbb9396c448b4cef58a42068d30933a95
tests/formatter/test_rawer.py
tests/formatter/test_rawer.py
import unittest, argparse from echolalia.formatter.rawer import Formatter class RawerTestCase(unittest.TestCase): def setUp(self): self.parser = argparse.ArgumentParser() self.data = [{chr(i): i - 96} for i in xrange(97, 123)] self.formatter = Formatter() def test_add_args(self): self.assertEqual...
Add tests for formatter raw
Add tests for formatter raw
Python
mit
eiri/echolalia-prototype
Add tests for formatter raw
import unittest, argparse from echolalia.formatter.rawer import Formatter class RawerTestCase(unittest.TestCase): def setUp(self): self.parser = argparse.ArgumentParser() self.data = [{chr(i): i - 96} for i in xrange(97, 123)] self.formatter = Formatter() def test_add_args(self): self.assertEqual...
<commit_before><commit_msg>Add tests for formatter raw<commit_after>
import unittest, argparse from echolalia.formatter.rawer import Formatter class RawerTestCase(unittest.TestCase): def setUp(self): self.parser = argparse.ArgumentParser() self.data = [{chr(i): i - 96} for i in xrange(97, 123)] self.formatter = Formatter() def test_add_args(self): self.assertEqual...
Add tests for formatter rawimport unittest, argparse from echolalia.formatter.rawer import Formatter class RawerTestCase(unittest.TestCase): def setUp(self): self.parser = argparse.ArgumentParser() self.data = [{chr(i): i - 96} for i in xrange(97, 123)] self.formatter = Formatter() def test_add_args(...
<commit_before><commit_msg>Add tests for formatter raw<commit_after>import unittest, argparse from echolalia.formatter.rawer import Formatter class RawerTestCase(unittest.TestCase): def setUp(self): self.parser = argparse.ArgumentParser() self.data = [{chr(i): i - 96} for i in xrange(97, 123)] self.form...
546bc7ffab0a0ca287550d97946d3e8b12b6c59a
tools/distribute.py
tools/distribute.py
#!/usr/bin/python2 # Copyright (c) 2015 Kenneth Henderick <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
Add script to copy the files to their correct location (e.g. during testing)
Add script to copy the files to their correct location (e.g. during testing)
Python
mit
khenderick/zfs-snap-manager,tylerjl/zfs-snap-manager
Add script to copy the files to their correct location (e.g. during testing)
#!/usr/bin/python2 # Copyright (c) 2015 Kenneth Henderick <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
<commit_before><commit_msg>Add script to copy the files to their correct location (e.g. during testing)<commit_after>
#!/usr/bin/python2 # Copyright (c) 2015 Kenneth Henderick <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including without limitation the rights ...
Add script to copy the files to their correct location (e.g. during testing)#!/usr/bin/python2 # Copyright (c) 2015 Kenneth Henderick <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # i...
<commit_before><commit_msg>Add script to copy the files to their correct location (e.g. during testing)<commit_after>#!/usr/bin/python2 # Copyright (c) 2015 Kenneth Henderick <[email protected]> # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated document...
60125c0852780d88ec29757c8a11a5846a4e1bba
portal/migrations/versions/63262fe95b9c_.py
portal/migrations/versions/63262fe95b9c_.py
from alembic import op import sqlalchemy as sa """empty message Revision ID: 63262fe95b9c Revises: 13a45e9375d7 Create Date: 2018-02-28 13:17:47.248361 """ # revision identifiers, used by Alembic. revision = '63262fe95b9c' down_revision = '13a45e9375d7' def upgrade(): # ### commands auto generated by Alembic...
Upgrade script to add many:many relationship between orgs and rps.
Upgrade script to add many:many relationship between orgs and rps.
Python
bsd-3-clause
uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal,uwcirg/true_nth_usa_portal
Upgrade script to add many:many relationship between orgs and rps.
from alembic import op import sqlalchemy as sa """empty message Revision ID: 63262fe95b9c Revises: 13a45e9375d7 Create Date: 2018-02-28 13:17:47.248361 """ # revision identifiers, used by Alembic. revision = '63262fe95b9c' down_revision = '13a45e9375d7' def upgrade(): # ### commands auto generated by Alembic...
<commit_before><commit_msg>Upgrade script to add many:many relationship between orgs and rps.<commit_after>
from alembic import op import sqlalchemy as sa """empty message Revision ID: 63262fe95b9c Revises: 13a45e9375d7 Create Date: 2018-02-28 13:17:47.248361 """ # revision identifiers, used by Alembic. revision = '63262fe95b9c' down_revision = '13a45e9375d7' def upgrade(): # ### commands auto generated by Alembic...
Upgrade script to add many:many relationship between orgs and rps.from alembic import op import sqlalchemy as sa """empty message Revision ID: 63262fe95b9c Revises: 13a45e9375d7 Create Date: 2018-02-28 13:17:47.248361 """ # revision identifiers, used by Alembic. revision = '63262fe95b9c' down_revision = '13a45e937...
<commit_before><commit_msg>Upgrade script to add many:many relationship between orgs and rps.<commit_after>from alembic import op import sqlalchemy as sa """empty message Revision ID: 63262fe95b9c Revises: 13a45e9375d7 Create Date: 2018-02-28 13:17:47.248361 """ # revision identifiers, used by Alembic. revision = ...
d61862b138858721d6baf06ab2ad29ebb566f09b
tests/t_bad_acceptor_name.py
tests/t_bad_acceptor_name.py
#!/usr/bin/python # Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license. import os import requests from stat import ST_MODE from requests_kerberos import HTTPKerberosAuth, OPTIONAL if __name__ == '__main__': sess = requests.Session() url = 'http://%s/bad_acceptor_name/' % os.environ['N...
Add test to check when an acceptor name is bad
Add test to check when an acceptor name is bad Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <[email protected]>
Python
mit
frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi
Add test to check when an acceptor name is bad Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <[email protected]>
#!/usr/bin/python # Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license. import os import requests from stat import ST_MODE from requests_kerberos import HTTPKerberosAuth, OPTIONAL if __name__ == '__main__': sess = requests.Session() url = 'http://%s/bad_acceptor_name/' % os.environ['N...
<commit_before><commit_msg>Add test to check when an acceptor name is bad Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <[email protected]><commit_after>
#!/usr/bin/python # Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license. import os import requests from stat import ST_MODE from requests_kerberos import HTTPKerberosAuth, OPTIONAL if __name__ == '__main__': sess = requests.Session() url = 'http://%s/bad_acceptor_name/' % os.environ['N...
Add test to check when an acceptor name is bad Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <[email protected]>#!/usr/bin/python # Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING for license. import os import requests ...
<commit_before><commit_msg>Add test to check when an acceptor name is bad Had this in my tree but forgot to add to the commit. Related to #131 Signed-off-by: Simo Sorce <[email protected]><commit_after>#!/usr/bin/python # Copyright (C) 2015 - mod_auth_gssapi contributors, see COPYING...
1870cc1f25426bee9b1b4a66f2167c5cd474cd23
openstack/tests/functional/network/v2/test_dvr_router.py
openstack/tests/functional/network/v2/test_dvr_router.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add functional tests for DVR router.
Add functional tests for DVR router. Change-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f
Python
apache-2.0
stackforge/python-openstacksdk,dtroyer/python-openstacksdk,dtroyer/python-openstacksdk,briancurtin/python-openstacksdk,briancurtin/python-openstacksdk,openstack/python-openstacksdk,stackforge/python-openstacksdk,openstack/python-openstacksdk
Add functional tests for DVR router. Change-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before><commit_msg>Add functional tests for DVR router. Change-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add functional tests for DVR router. Change-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # #...
<commit_before><commit_msg>Add functional tests for DVR router. Change-Id: Iafa10dc02626a40a90c48f74c363d977ac4f512f<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http:...
f27382d63224f55998320e496a82aea32d82319b
04/test_sum_sector_ids.py
04/test_sum_sector_ids.py
import unittest from sum_sector_ids import (extract_checksum, create_checksum, is_valid_checksum, extract_sector_id, sum_sector_ids) class TestSumSectorIds(unittest.TestCase): def setUp(self): s...
Add tests for summing sector ids.
Add tests for summing sector ids.
Python
mit
machinelearningdeveloper/aoc_2016
Add tests for summing sector ids.
import unittest from sum_sector_ids import (extract_checksum, create_checksum, is_valid_checksum, extract_sector_id, sum_sector_ids) class TestSumSectorIds(unittest.TestCase): def setUp(self): s...
<commit_before><commit_msg>Add tests for summing sector ids.<commit_after>
import unittest from sum_sector_ids import (extract_checksum, create_checksum, is_valid_checksum, extract_sector_id, sum_sector_ids) class TestSumSectorIds(unittest.TestCase): def setUp(self): s...
Add tests for summing sector ids.import unittest from sum_sector_ids import (extract_checksum, create_checksum, is_valid_checksum, extract_sector_id, sum_sector_ids) class TestSumSectorIds(unittest.TestCase...
<commit_before><commit_msg>Add tests for summing sector ids.<commit_after>import unittest from sum_sector_ids import (extract_checksum, create_checksum, is_valid_checksum, extract_sector_id, sum_sector_ids) ...
238c550d8131f3b35dae437182c924191ff08b72
tools/find_scan_roots.py
tools/find_scan_roots.py
#!/usr/bin/env python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
Add tool to find scan roots.
Add tool to find scan roots. Bug: 73625480 Change-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0
Python
apache-2.0
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
Add tool to find scan roots. Bug: 73625480 Change-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0
#!/usr/bin/env python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
<commit_before><commit_msg>Add tool to find scan roots. Bug: 73625480 Change-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0<commit_after>
#!/usr/bin/env python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless requi...
Add tool to find scan roots. Bug: 73625480 Change-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0#!/usr/bin/env python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obta...
<commit_before><commit_msg>Add tool to find scan roots. Bug: 73625480 Change-Id: I93b405feb999aaed9675d2ea52712663fa83c9e0<commit_after>#!/usr/bin/env python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in co...
7eac12bb8fe31b397c8598af14973f2337ca8c53
cla_public/apps/contact/tests/test_notes.py
cla_public/apps/contact/tests/test_notes.py
import unittest from werkzeug.datastructures import MultiDict from cla_public.app import create_app from cla_public.apps.contact.forms import ContactForm def submit(**kwargs): return ContactForm(MultiDict(kwargs), csrf_enabled=False) class NotesTest(unittest.TestCase): def setUp(self): app = crea...
Add python test for notes length validation
Add python test for notes length validation
Python
mit
ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public,ministryofjustice/cla_public
Add python test for notes length validation
import unittest from werkzeug.datastructures import MultiDict from cla_public.app import create_app from cla_public.apps.contact.forms import ContactForm def submit(**kwargs): return ContactForm(MultiDict(kwargs), csrf_enabled=False) class NotesTest(unittest.TestCase): def setUp(self): app = crea...
<commit_before><commit_msg>Add python test for notes length validation<commit_after>
import unittest from werkzeug.datastructures import MultiDict from cla_public.app import create_app from cla_public.apps.contact.forms import ContactForm def submit(**kwargs): return ContactForm(MultiDict(kwargs), csrf_enabled=False) class NotesTest(unittest.TestCase): def setUp(self): app = crea...
Add python test for notes length validationimport unittest from werkzeug.datastructures import MultiDict from cla_public.app import create_app from cla_public.apps.contact.forms import ContactForm def submit(**kwargs): return ContactForm(MultiDict(kwargs), csrf_enabled=False) class NotesTest(unittest.TestCase...
<commit_before><commit_msg>Add python test for notes length validation<commit_after>import unittest from werkzeug.datastructures import MultiDict from cla_public.app import create_app from cla_public.apps.contact.forms import ContactForm def submit(**kwargs): return ContactForm(MultiDict(kwargs), csrf_enabled=F...
7f4de89928de1580dceedff3c1a581660e70f954
tests/sentry/utils/test_cursors.py
tests/sentry/utils/test_cursors.py
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
Add test exhibiting cursor failure
Add test exhibiting cursor failure
Python
bsd-3-clause
BayanGroup/sentry,kevinlondon/sentry,imankulov/sentry,fotinakis/sentry,BuildingLink/sentry,BuildingLink/sentry,mvaled/sentry,fuziontech/sentry,nicholasserra/sentry,fotinakis/sentry,jean/sentry,kevinlondon/sentry,ngonzalvez/sentry,mitsuhiko/sentry,ifduyue/sentry,fotinakis/sentry,alexm92/sentry,zenefits/sentry,alexm92/se...
Add test exhibiting cursor failure
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
<commit_before><commit_msg>Add test exhibiting cursor failure<commit_after>
from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj def test_build_cursor(): ev...
Add test exhibiting cursor failurefrom __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr__ = lambda x: repr(attrs) return obj...
<commit_before><commit_msg>Add test exhibiting cursor failure<commit_after>from __future__ import absolute_import from mock import Mock from sentry.utils.cursors import build_cursor, Cursor def build_mock(**attrs): obj = Mock() for key, value in attrs.items(): setattr(obj, key, value) obj.__repr...
dd287c4edfb29e848eaaba93c769ebfaab0db58c
tests/non_nose_tests/test_interop_client.py
tests/non_nose_tests/test_interop_client.py
from time import sleep from SUASSystem import InteropClientConverter if __name__ == '__main__': interop_client = InteropClientConverter() while True: print(interop_client.get_obstacles()) sleep(1)
Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition
Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition
Python
mit
FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition,FlintHill/SUAS-Competition
Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition
from time import sleep from SUASSystem import InteropClientConverter if __name__ == '__main__': interop_client = InteropClientConverter() while True: print(interop_client.get_obstacles()) sleep(1)
<commit_before><commit_msg>Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition<commit_after>
from time import sleep from SUASSystem import InteropClientConverter if __name__ == '__main__': interop_client = InteropClientConverter() while True: print(interop_client.get_obstacles()) sleep(1)
Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competitionfrom time import sleep from SUASSystem import InteropClientConverter if __name__ == '__main__': interop_client = InteropClientConverter() while True: p...
<commit_before><commit_msg>Add test for communicating with the interoperability server. This will allow us to verify we can make connection with the judges' server at competition<commit_after>from time import sleep from SUASSystem import InteropClientConverter if __name__ == '__main__': interop_client = InteropCli...
3592cd622e61ee689b096c99d46b6d936109e383
tests/qtcore/qstring_buffer_protocol_test.py
tests/qtcore/qstring_buffer_protocol_test.py
#!/usr/bin/python # -*- coding: utf-8 -*- '''Tests QString implementation of Python buffer protocol''' import unittest from os.path import isdir from PySide.QtCore import QString class QStringBufferProtocolTest(unittest.TestCase): '''Tests QString implementation of Python buffer protocol''' def testQStringB...
Revert "We do not support character buffer protocol on QStrings."
Revert "We do not support character buffer protocol on QStrings." This reverts commit 1a7cbb2473327abad936447c47818ee13df2992c.
Python
lgpl-2.1
M4rtinK/pyside-bb10,gbaty/pyside2,qtproject/pyside-pyside,M4rtinK/pyside-android,M4rtinK/pyside-bb10,PySide/PySide,qtproject/pyside-pyside,M4rtinK/pyside-android,IronManMark20/pyside2,pankajp/pyside,pankajp/pyside,IronManMark20/pyside2,enthought/pyside,M4rtinK/pyside-bb10,enthought/pyside,qtproject/pyside-pyside,enthou...
Revert "We do not support character buffer protocol on QStrings." This reverts commit 1a7cbb2473327abad936447c47818ee13df2992c.
#!/usr/bin/python # -*- coding: utf-8 -*- '''Tests QString implementation of Python buffer protocol''' import unittest from os.path import isdir from PySide.QtCore import QString class QStringBufferProtocolTest(unittest.TestCase): '''Tests QString implementation of Python buffer protocol''' def testQStringB...
<commit_before><commit_msg>Revert "We do not support character buffer protocol on QStrings." This reverts commit 1a7cbb2473327abad936447c47818ee13df2992c.<commit_after>
#!/usr/bin/python # -*- coding: utf-8 -*- '''Tests QString implementation of Python buffer protocol''' import unittest from os.path import isdir from PySide.QtCore import QString class QStringBufferProtocolTest(unittest.TestCase): '''Tests QString implementation of Python buffer protocol''' def testQStringB...
Revert "We do not support character buffer protocol on QStrings." This reverts commit 1a7cbb2473327abad936447c47818ee13df2992c.#!/usr/bin/python # -*- coding: utf-8 -*- '''Tests QString implementation of Python buffer protocol''' import unittest from os.path import isdir from PySide.QtCore import QString class QStr...
<commit_before><commit_msg>Revert "We do not support character buffer protocol on QStrings." This reverts commit 1a7cbb2473327abad936447c47818ee13df2992c.<commit_after>#!/usr/bin/python # -*- coding: utf-8 -*- '''Tests QString implementation of Python buffer protocol''' import unittest from os.path import isdir from...
64f13a006412112830e1d7cc2ff71ea32cb4c1b6
migrations/versions/0150_another_letter_org.py
migrations/versions/0150_another_letter_org.py
"""empty message Revision ID: 0150_another_letter_org Revises: 0149_add_crown_to_services Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0150_another_letter_org' down_revision = '0149_add_crown_to_services' from alembic import op NEW_ORGANISATIONS = [ ('006', ...
Add a new organisation for letter branding
Add a new organisation for letter branding
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add a new organisation for letter branding
"""empty message Revision ID: 0150_another_letter_org Revises: 0149_add_crown_to_services Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0150_another_letter_org' down_revision = '0149_add_crown_to_services' from alembic import op NEW_ORGANISATIONS = [ ('006', ...
<commit_before><commit_msg>Add a new organisation for letter branding<commit_after>
"""empty message Revision ID: 0150_another_letter_org Revises: 0149_add_crown_to_services Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0150_another_letter_org' down_revision = '0149_add_crown_to_services' from alembic import op NEW_ORGANISATIONS = [ ('006', ...
Add a new organisation for letter branding"""empty message Revision ID: 0150_another_letter_org Revises: 0149_add_crown_to_services Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0150_another_letter_org' down_revision = '0149_add_crown_to_services' from alembic impo...
<commit_before><commit_msg>Add a new organisation for letter branding<commit_after>"""empty message Revision ID: 0150_another_letter_org Revises: 0149_add_crown_to_services Create Date: 2017-06-29 12:44:16.815039 """ # revision identifiers, used by Alembic. revision = '0150_another_letter_org' down_revision = '0149_...
cb87c6e2c58593d5ef5710c4d7db0c18831e354c
tools/clear_zk.py
tools/clear_zk.py
#!/usr/bin/env python import contextlib import os import re import sys top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) from taskflow.utils import kazoo_utils @contextlib.contextmanager def finalize_client(client): ...
Add a helper tool which clears zookeeper test dirs
Add a helper tool which clears zookeeper test dirs Create a tool that can clear any leftover garbage left by the testing of taskflow unit tests with zookeeper for when this is needed (for example, a test does not clean up correctly on its own). Change-Id: Icfaf28273b76a6ca27683d174f111fba2858f055
Python
apache-2.0
openstack/taskflow,pombredanne/taskflow-1,junneyang/taskflow,junneyang/taskflow,jimbobhickville/taskflow,openstack/taskflow,jimbobhickville/taskflow,pombredanne/taskflow-1
Add a helper tool which clears zookeeper test dirs Create a tool that can clear any leftover garbage left by the testing of taskflow unit tests with zookeeper for when this is needed (for example, a test does not clean up correctly on its own). Change-Id: Icfaf28273b76a6ca27683d174f111fba2858f055
#!/usr/bin/env python import contextlib import os import re import sys top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) from taskflow.utils import kazoo_utils @contextlib.contextmanager def finalize_client(client): ...
<commit_before><commit_msg>Add a helper tool which clears zookeeper test dirs Create a tool that can clear any leftover garbage left by the testing of taskflow unit tests with zookeeper for when this is needed (for example, a test does not clean up correctly on its own). Change-Id: Icfaf28273b76a6ca27683d174f111fba28...
#!/usr/bin/env python import contextlib import os import re import sys top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir)) sys.path.insert(0, top_dir) from taskflow.utils import kazoo_utils @contextlib.contextmanager def finalize_client(client): ...
Add a helper tool which clears zookeeper test dirs Create a tool that can clear any leftover garbage left by the testing of taskflow unit tests with zookeeper for when this is needed (for example, a test does not clean up correctly on its own). Change-Id: Icfaf28273b76a6ca27683d174f111fba2858f055#!/usr/bin/env python...
<commit_before><commit_msg>Add a helper tool which clears zookeeper test dirs Create a tool that can clear any leftover garbage left by the testing of taskflow unit tests with zookeeper for when this is needed (for example, a test does not clean up correctly on its own). Change-Id: Icfaf28273b76a6ca27683d174f111fba28...
b1bf21e7331ef4c6191ac27a7621deb04b086ffc
tests/test_tileutils.py
tests/test_tileutils.py
import pytest import numpy as np from pytilemap.tileutils import posFromLonLat, lonLatFromPos LATITUDES = np.arange(-90, 90).astype(np.float64) LONGITUDES = np.arange(-180, 180).astype(np.float64) ZOOMS = np.arange(1, 20).astype(np.int64) def referencePosFromLonLat(lon, lat, zoom, tileSize): tx = (lon + 180.0)...
Add tests for tileutils module
Add tests for tileutils module
Python
mit
allebacco/PyTileMap
Add tests for tileutils module
import pytest import numpy as np from pytilemap.tileutils import posFromLonLat, lonLatFromPos LATITUDES = np.arange(-90, 90).astype(np.float64) LONGITUDES = np.arange(-180, 180).astype(np.float64) ZOOMS = np.arange(1, 20).astype(np.int64) def referencePosFromLonLat(lon, lat, zoom, tileSize): tx = (lon + 180.0)...
<commit_before><commit_msg>Add tests for tileutils module<commit_after>
import pytest import numpy as np from pytilemap.tileutils import posFromLonLat, lonLatFromPos LATITUDES = np.arange(-90, 90).astype(np.float64) LONGITUDES = np.arange(-180, 180).astype(np.float64) ZOOMS = np.arange(1, 20).astype(np.int64) def referencePosFromLonLat(lon, lat, zoom, tileSize): tx = (lon + 180.0)...
Add tests for tileutils moduleimport pytest import numpy as np from pytilemap.tileutils import posFromLonLat, lonLatFromPos LATITUDES = np.arange(-90, 90).astype(np.float64) LONGITUDES = np.arange(-180, 180).astype(np.float64) ZOOMS = np.arange(1, 20).astype(np.int64) def referencePosFromLonLat(lon, lat, zoom, til...
<commit_before><commit_msg>Add tests for tileutils module<commit_after>import pytest import numpy as np from pytilemap.tileutils import posFromLonLat, lonLatFromPos LATITUDES = np.arange(-90, 90).astype(np.float64) LONGITUDES = np.arange(-180, 180).astype(np.float64) ZOOMS = np.arange(1, 20).astype(np.int64) def r...
cfe5f9240c2ccbb41c1dd3e0ea7b22ffddf80a09
app/api_v1/serializers.py
app/api_v1/serializers.py
"""This module defines the format used by marshall to map the models.""" from flask_restful import fields bucketlistitem_serializer = { 'id': fields.Integer, 'item_name': fields.String, 'priority': fields.String, 'done': fields.Boolean, 'date_created': fields.DateTime, 'date_modified': fields.D...
Add marshal fields to map with models.
[Feature] Add marshal fields to map with models.
Python
mit
andela-akiura/bucketlist
[Feature] Add marshal fields to map with models.
"""This module defines the format used by marshall to map the models.""" from flask_restful import fields bucketlistitem_serializer = { 'id': fields.Integer, 'item_name': fields.String, 'priority': fields.String, 'done': fields.Boolean, 'date_created': fields.DateTime, 'date_modified': fields.D...
<commit_before><commit_msg>[Feature] Add marshal fields to map with models.<commit_after>
"""This module defines the format used by marshall to map the models.""" from flask_restful import fields bucketlistitem_serializer = { 'id': fields.Integer, 'item_name': fields.String, 'priority': fields.String, 'done': fields.Boolean, 'date_created': fields.DateTime, 'date_modified': fields.D...
[Feature] Add marshal fields to map with models."""This module defines the format used by marshall to map the models.""" from flask_restful import fields bucketlistitem_serializer = { 'id': fields.Integer, 'item_name': fields.String, 'priority': fields.String, 'done': fields.Boolean, 'date_created'...
<commit_before><commit_msg>[Feature] Add marshal fields to map with models.<commit_after>"""This module defines the format used by marshall to map the models.""" from flask_restful import fields bucketlistitem_serializer = { 'id': fields.Integer, 'item_name': fields.String, 'priority': fields.String, '...
779f4323636d2476b3e51b6e57f2c130e9d4d466
src/tools/make_dates.py
src/tools/make_dates.py
#!/usr/bin/env python # coding: utf-8 """Make dates on second Tuesday of the month for full year""" import datetime import sys def second_tuesday(year, month): """Find the second Tuesday in a month.""" date = datetime.date(year, month, 1) seen = 0 day = datetime.timedelta(days=1) while True: ...
Add tool to make dates for second Tuesday in a month
Add tool to make dates for second Tuesday in a month
Python
mit
LPUG/LPUG.github.io,LPUG/LPUG.github.io
Add tool to make dates for second Tuesday in a month
#!/usr/bin/env python # coding: utf-8 """Make dates on second Tuesday of the month for full year""" import datetime import sys def second_tuesday(year, month): """Find the second Tuesday in a month.""" date = datetime.date(year, month, 1) seen = 0 day = datetime.timedelta(days=1) while True: ...
<commit_before><commit_msg>Add tool to make dates for second Tuesday in a month<commit_after>
#!/usr/bin/env python # coding: utf-8 """Make dates on second Tuesday of the month for full year""" import datetime import sys def second_tuesday(year, month): """Find the second Tuesday in a month.""" date = datetime.date(year, month, 1) seen = 0 day = datetime.timedelta(days=1) while True: ...
Add tool to make dates for second Tuesday in a month#!/usr/bin/env python # coding: utf-8 """Make dates on second Tuesday of the month for full year""" import datetime import sys def second_tuesday(year, month): """Find the second Tuesday in a month.""" date = datetime.date(year, month, 1) seen = 0 ...
<commit_before><commit_msg>Add tool to make dates for second Tuesday in a month<commit_after>#!/usr/bin/env python # coding: utf-8 """Make dates on second Tuesday of the month for full year""" import datetime import sys def second_tuesday(year, month): """Find the second Tuesday in a month.""" date = dateti...
af9bf2a6db96b069ef62054a4ab09f66f2dd048a
plugin_manager.py
plugin_manager.py
""" Copyright 2011 Ryan Fobel This file is part of dmf_control_board. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
Add PluginManager class and IPlugin interface
Add PluginManager class and IPlugin interface This file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04 References #4
Python
bsd-3-clause
wheeler-microfluidics/microdrop
Add PluginManager class and IPlugin interface This file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04 References #4
""" Copyright 2011 Ryan Fobel This file is part of dmf_control_board. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
<commit_before><commit_msg>Add PluginManager class and IPlugin interface This file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04 References #4<commit_after>
""" Copyright 2011 Ryan Fobel This file is part of dmf_control_board. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. ...
Add PluginManager class and IPlugin interface This file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04 References #4""" Copyright 2011 Ryan Fobel This file is part of dmf_control_board. Microdrop is free software: you can redistribute it and/or modify it under the terms of the GN...
<commit_before><commit_msg>Add PluginManager class and IPlugin interface This file should have been included in commit 46c1c31a2bf3c3d953d35195667ccc1af7df3c04 References #4<commit_after>""" Copyright 2011 Ryan Fobel This file is part of dmf_control_board. Microdrop is free software: you can redistribute it an...
c3eba3d5983472da3434d4c6acb4a7ab15036ee6
python/generators/fibonacci.py
python/generators/fibonacci.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
Add a new snippet 'python/generators' (Fibonacci).
Add a new snippet 'python/generators' (Fibonacci).
Python
mit
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
Add a new snippet 'python/generators' (Fibonacci).
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
<commit_before><commit_msg>Add a new snippet 'python/generators' (Fibonacci).<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in the Software without restriction, including withou...
Add a new snippet 'python/generators' (Fibonacci).#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal # in ...
<commit_before><commit_msg>Add a new snippet 'python/generators' (Fibonacci).<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2012 Jérémie DECOCK (http://www.jdhp.org) # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentat...
50dd055975732755f2bcb9424bd2d5df9e1ae87a
kboard/core/tests/test_context_processors.py
kboard/core/tests/test_context_processors.py
from django.test import TestCase from django.http import HttpRequest from core.context_processors import navbar from board.models import Board class TestNavbarContextProcessor(TestCase): def test_return_board_list_correctly(self): test_board = Board.objects.create( slug='slug', na...
Add unit test of navbar context processor
Add unit test of navbar context processor
Python
mit
guswnsxodlf/k-board,hyesun03/k-board,darjeeling/k-board,cjh5414/kboard,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,cjh5414/kboard,kboard/kboard,guswnsxodlf/k-board,kboard/kboard,kboard/kboard,hyesun03/k-board
Add unit test of navbar context processor
from django.test import TestCase from django.http import HttpRequest from core.context_processors import navbar from board.models import Board class TestNavbarContextProcessor(TestCase): def test_return_board_list_correctly(self): test_board = Board.objects.create( slug='slug', na...
<commit_before><commit_msg>Add unit test of navbar context processor<commit_after>
from django.test import TestCase from django.http import HttpRequest from core.context_processors import navbar from board.models import Board class TestNavbarContextProcessor(TestCase): def test_return_board_list_correctly(self): test_board = Board.objects.create( slug='slug', na...
Add unit test of navbar context processorfrom django.test import TestCase from django.http import HttpRequest from core.context_processors import navbar from board.models import Board class TestNavbarContextProcessor(TestCase): def test_return_board_list_correctly(self): test_board = Board.objects.create...
<commit_before><commit_msg>Add unit test of navbar context processor<commit_after>from django.test import TestCase from django.http import HttpRequest from core.context_processors import navbar from board.models import Board class TestNavbarContextProcessor(TestCase): def test_return_board_list_correctly(self): ...
b0a4a44d7c69875dc5890a8c62a25a8ae3c7900f
openfisca_core/scripts/find_placeholders.py
openfisca_core/scripts/find_placeholders.py
# -*- coding: utf-8 -*- import os import fnmatch import sys from bs4 import BeautifulSoup def find_param_files(input_dir): param_files = [] for root, dirnames, filenames in os.walk(input_dir): for filename in fnmatch.filter(filenames, '*.xml'): param_files.append(os.path.join(root, filen...
Add a script to find placeholers in legislation
Add a script to find placeholers in legislation This script requires BeautifulSoup (bs4)
Python
agpl-3.0
openfisca/openfisca-core,openfisca/openfisca-core
Add a script to find placeholers in legislation This script requires BeautifulSoup (bs4)
# -*- coding: utf-8 -*- import os import fnmatch import sys from bs4 import BeautifulSoup def find_param_files(input_dir): param_files = [] for root, dirnames, filenames in os.walk(input_dir): for filename in fnmatch.filter(filenames, '*.xml'): param_files.append(os.path.join(root, filen...
<commit_before><commit_msg>Add a script to find placeholers in legislation This script requires BeautifulSoup (bs4)<commit_after>
# -*- coding: utf-8 -*- import os import fnmatch import sys from bs4 import BeautifulSoup def find_param_files(input_dir): param_files = [] for root, dirnames, filenames in os.walk(input_dir): for filename in fnmatch.filter(filenames, '*.xml'): param_files.append(os.path.join(root, filen...
Add a script to find placeholers in legislation This script requires BeautifulSoup (bs4)# -*- coding: utf-8 -*- import os import fnmatch import sys from bs4 import BeautifulSoup def find_param_files(input_dir): param_files = [] for root, dirnames, filenames in os.walk(input_dir): for filename in fn...
<commit_before><commit_msg>Add a script to find placeholers in legislation This script requires BeautifulSoup (bs4)<commit_after># -*- coding: utf-8 -*- import os import fnmatch import sys from bs4 import BeautifulSoup def find_param_files(input_dir): param_files = [] for root, dirnames, filenames in os.wa...
31a453c2fe3a668f4c826a2b5bced7ee50f58f2e
samples/http2/simple_server.py
samples/http2/simple_server.py
"""A simple HTTP/2 file server.""" import asyncio import logging import sys from concurrent.futures.thread import ThreadPoolExecutor import os.path import urllib.parse from http import HTTPStatus from http2 import HttpError, Protocol LOG = logging.getLogger(__name__) class Handler: def __init__(self, root_p...
Add a simple HTTP/2 file server for testing
Add a simple HTTP/2 file server for testing
Python
mit
clchiou/garage,clchiou/garage,clchiou/garage,clchiou/garage
Add a simple HTTP/2 file server for testing
"""A simple HTTP/2 file server.""" import asyncio import logging import sys from concurrent.futures.thread import ThreadPoolExecutor import os.path import urllib.parse from http import HTTPStatus from http2 import HttpError, Protocol LOG = logging.getLogger(__name__) class Handler: def __init__(self, root_p...
<commit_before><commit_msg>Add a simple HTTP/2 file server for testing<commit_after>
"""A simple HTTP/2 file server.""" import asyncio import logging import sys from concurrent.futures.thread import ThreadPoolExecutor import os.path import urllib.parse from http import HTTPStatus from http2 import HttpError, Protocol LOG = logging.getLogger(__name__) class Handler: def __init__(self, root_p...
Add a simple HTTP/2 file server for testing"""A simple HTTP/2 file server.""" import asyncio import logging import sys from concurrent.futures.thread import ThreadPoolExecutor import os.path import urllib.parse from http import HTTPStatus from http2 import HttpError, Protocol LOG = logging.getLogger(__name__) cl...
<commit_before><commit_msg>Add a simple HTTP/2 file server for testing<commit_after>"""A simple HTTP/2 file server.""" import asyncio import logging import sys from concurrent.futures.thread import ThreadPoolExecutor import os.path import urllib.parse from http import HTTPStatus from http2 import HttpError, Protocol...
bfe38efc63ead69eb57c74b882f4072dd80cd469
alert.py
alert.py
class Alert: def __init__(self, description, rule, action): self.description = description self.rule = rule self.action = action self.exchange = None def connect(self, exchange): self.exchange = exchange dependent_stocks = self.rule.depends_on() for stock...
Add Alert class as well as connect and check_rule methods.
Add Alert class as well as connect and check_rule methods.
Python
mit
bsmukasa/stock_alerter
Add Alert class as well as connect and check_rule methods.
class Alert: def __init__(self, description, rule, action): self.description = description self.rule = rule self.action = action self.exchange = None def connect(self, exchange): self.exchange = exchange dependent_stocks = self.rule.depends_on() for stock...
<commit_before><commit_msg>Add Alert class as well as connect and check_rule methods.<commit_after>
class Alert: def __init__(self, description, rule, action): self.description = description self.rule = rule self.action = action self.exchange = None def connect(self, exchange): self.exchange = exchange dependent_stocks = self.rule.depends_on() for stock...
Add Alert class as well as connect and check_rule methods.class Alert: def __init__(self, description, rule, action): self.description = description self.rule = rule self.action = action self.exchange = None def connect(self, exchange): self.exchange = exchange d...
<commit_before><commit_msg>Add Alert class as well as connect and check_rule methods.<commit_after>class Alert: def __init__(self, description, rule, action): self.description = description self.rule = rule self.action = action self.exchange = None def connect(self, exchange): ...
52467da69ebab6f2884bfd791d7e18bd4e593266
aovek.py
aovek.py
import argparse import json import tensorflow as tf from aovek.preprocess.download_dataset import download_dataset from aovek.preprocess.data_processing import DataProcessing from aovek.training.train import Train from aovek.visualization.predict import Predict from aovek.validate.eval_metrics import EvalMetrics pars...
Add file for control person detection
Add file for control person detection
Python
mit
nikolaystanishev/traffic-sign-recognition
Add file for control person detection
import argparse import json import tensorflow as tf from aovek.preprocess.download_dataset import download_dataset from aovek.preprocess.data_processing import DataProcessing from aovek.training.train import Train from aovek.visualization.predict import Predict from aovek.validate.eval_metrics import EvalMetrics pars...
<commit_before><commit_msg>Add file for control person detection<commit_after>
import argparse import json import tensorflow as tf from aovek.preprocess.download_dataset import download_dataset from aovek.preprocess.data_processing import DataProcessing from aovek.training.train import Train from aovek.visualization.predict import Predict from aovek.validate.eval_metrics import EvalMetrics pars...
Add file for control person detectionimport argparse import json import tensorflow as tf from aovek.preprocess.download_dataset import download_dataset from aovek.preprocess.data_processing import DataProcessing from aovek.training.train import Train from aovek.visualization.predict import Predict from aovek.validate....
<commit_before><commit_msg>Add file for control person detection<commit_after>import argparse import json import tensorflow as tf from aovek.preprocess.download_dataset import download_dataset from aovek.preprocess.data_processing import DataProcessing from aovek.training.train import Train from aovek.visualization.pr...
a694c8449f63cbe37ceadc98a5836cfaff8fa992
tests/RemoveEpsilonRules/Reverse/OverTwoRuleTest.py
tests/RemoveEpsilonRules/Reverse/OverTwoRuleTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
Add more complicated test of epsilon rules restoration
Add more complicated test of epsilon rules restoration
Python
mit
PatrikValkovic/grammpy
Add more complicated test of epsilon rules restoration
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
<commit_before><commit_msg>Add more complicated test of epsilon rules restoration<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import cyk class S(Nonterminal): pass class A(Nonterminal):...
Add more complicated test of epsilon rules restoration#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree, InverseContextFree from pyparsers import...
<commit_before><commit_msg>Add more complicated test of epsilon rules restoration<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 20.08.2017 16:01 :Licence GNUv3 Part of grammpy-transforms """ from unittest import TestCase, main from grammpy import * from grammpy_transforms import ContextFree,...
a6e92e2464a50a7c4159958e1b60c0aa2dea96a9
res/os_x_app_creation.py
res/os_x_app_creation.py
#! /usr/bin/env python import os import shutil import subprocess MAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py' def remove_parent_of_menubar(): with open(MAIN_WINDOW_UI_FILE, 'r+') as f: s = f.read() f.seek(0) c = s.replace('self.menubar = QtGui.QMenuBar(MainWindow)', 'sel...
Add script to automate the creation of the Neon app.
Add script to automate the creation of the Neon app.
Python
apache-2.0
alan-wu/neon
Add script to automate the creation of the Neon app.
#! /usr/bin/env python import os import shutil import subprocess MAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py' def remove_parent_of_menubar(): with open(MAIN_WINDOW_UI_FILE, 'r+') as f: s = f.read() f.seek(0) c = s.replace('self.menubar = QtGui.QMenuBar(MainWindow)', 'sel...
<commit_before><commit_msg>Add script to automate the creation of the Neon app.<commit_after>
#! /usr/bin/env python import os import shutil import subprocess MAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py' def remove_parent_of_menubar(): with open(MAIN_WINDOW_UI_FILE, 'r+') as f: s = f.read() f.seek(0) c = s.replace('self.menubar = QtGui.QMenuBar(MainWindow)', 'sel...
Add script to automate the creation of the Neon app.#! /usr/bin/env python import os import shutil import subprocess MAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py' def remove_parent_of_menubar(): with open(MAIN_WINDOW_UI_FILE, 'r+') as f: s = f.read() f.seek(0) c = s.repla...
<commit_before><commit_msg>Add script to automate the creation of the Neon app.<commit_after>#! /usr/bin/env python import os import shutil import subprocess MAIN_WINDOW_UI_FILE = 'src/opencmiss/neon/ui/ui_mainwindow.py' def remove_parent_of_menubar(): with open(MAIN_WINDOW_UI_FILE, 'r+') as f: s = f.rea...
519cb3ebf56c7841240779e170fb3bc657d87830
tempest/tests/test_list_tests.py
tempest/tests/test_list_tests.py
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
Add tempest unit test to verify the test list
Add tempest unit test to verify the test list If there is an error in a test file it could potentially not get run in the tox jobs used for gating. This commit adds a test which looks for ImportFailures in the test list to ensure that all the test files will get run in the gate. Change-Id: Ia0a5831810d04f2201bd856039...
Python
apache-2.0
FujitsuEnablingSoftwareTechnologyGmbH/tempest,hayderimran7/tempest,tonyli71/tempest,alinbalutoiu/tempest,xbezdick/tempest,danielmellado/tempest,openstack/tempest,eggmaster/tempest,FujitsuEnablingSoftwareTechnologyGmbH/tempest,xbezdick/tempest,bigswitch/tempest,afaheem88/tempest,eggmaster/tempest,pczerkas/tempest,redhat...
Add tempest unit test to verify the test list If there is an error in a test file it could potentially not get run in the tox jobs used for gating. This commit adds a test which looks for ImportFailures in the test list to ensure that all the test files will get run in the gate. Change-Id: Ia0a5831810d04f2201bd856039...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
<commit_before><commit_msg>Add tempest unit test to verify the test list If there is an error in a test file it could potentially not get run in the tox jobs used for gating. This commit adds a test which looks for ImportFailures in the test list to ensure that all the test files will get run in the gate. Change-Id: ...
# vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright 2013 IBM Corp. # # Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # ...
Add tempest unit test to verify the test list If there is an error in a test file it could potentially not get run in the tox jobs used for gating. This commit adds a test which looks for ImportFailures in the test list to ensure that all the test files will get run in the gate. Change-Id: Ia0a5831810d04f2201bd856039...
<commit_before><commit_msg>Add tempest unit test to verify the test list If there is an error in a test file it could potentially not get run in the tox jobs used for gating. This commit adds a test which looks for ImportFailures in the test list to ensure that all the test files will get run in the gate. Change-Id: ...
0aee93c8730625ea0efa5a6ff1e48b29f0161dd5
buhmm/tests/test_misc.py
buhmm/tests/test_misc.py
from nose.tools import * import numpy as np import buhmm.misc as module def test_logspace_int_smoke(): # Smoke test x = module.logspace_int(2000, 50) y = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 17, 19, 22, 25, 29, 33, 38, 43, ...
Add unit tests for logspace_int.
Add unit tests for logspace_int.
Python
mit
chebee7i/buhmm
Add unit tests for logspace_int.
from nose.tools import * import numpy as np import buhmm.misc as module def test_logspace_int_smoke(): # Smoke test x = module.logspace_int(2000, 50) y = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 17, 19, 22, 25, 29, 33, 38, 43, ...
<commit_before><commit_msg>Add unit tests for logspace_int.<commit_after>
from nose.tools import * import numpy as np import buhmm.misc as module def test_logspace_int_smoke(): # Smoke test x = module.logspace_int(2000, 50) y = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 17, 19, 22, 25, 29, 33, 38, 43, ...
Add unit tests for logspace_int.from nose.tools import * import numpy as np import buhmm.misc as module def test_logspace_int_smoke(): # Smoke test x = module.logspace_int(2000, 50) y = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 13, 14, 17, 19, 22...
<commit_before><commit_msg>Add unit tests for logspace_int.<commit_after>from nose.tools import * import numpy as np import buhmm.misc as module def test_logspace_int_smoke(): # Smoke test x = module.logspace_int(2000, 50) y = np.array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ...
9a811ffcd7bb743b4c739667187d31f32429338a
tests/test_exception_wrapping.py
tests/test_exception_wrapping.py
import safe def test_simple_exception(): class MockReponse(object): def json(self): return {'status': False, 'method': 'synchronize', 'module': 'cluster', 'error': {'message': 'Example error'}} exception = safe.library.raise_from...
Add a very simple test
Add a very simple test
Python
mpl-2.0
sangoma/safepy2,leonardolang/safepy2
Add a very simple test
import safe def test_simple_exception(): class MockReponse(object): def json(self): return {'status': False, 'method': 'synchronize', 'module': 'cluster', 'error': {'message': 'Example error'}} exception = safe.library.raise_from...
<commit_before><commit_msg>Add a very simple test<commit_after>
import safe def test_simple_exception(): class MockReponse(object): def json(self): return {'status': False, 'method': 'synchronize', 'module': 'cluster', 'error': {'message': 'Example error'}} exception = safe.library.raise_from...
Add a very simple testimport safe def test_simple_exception(): class MockReponse(object): def json(self): return {'status': False, 'method': 'synchronize', 'module': 'cluster', 'error': {'message': 'Example error'}} exception = s...
<commit_before><commit_msg>Add a very simple test<commit_after>import safe def test_simple_exception(): class MockReponse(object): def json(self): return {'status': False, 'method': 'synchronize', 'module': 'cluster', 'error': {'messa...
8ef0f8058854b2ef55d2d42bbe84487a9aadae12
.ycm_extra_conf.py
.ycm_extra_conf.py
def FlagsForFile(filename, **kwargs): return { 'flags': [ '-x', 'c', '-g', '-Wall', '-Wextra', '-D_REENTRANT', '-D__NO_MATH_INLINES', '-fsigned-char' ], }
Add build flags for YouCompleteMe.
Add build flags for YouCompleteMe. Add a .ycm_extra.conf.py script to return the same CFLAGS we pass for `make debug`. These are passed to libclang so symbol lookup works correctly. Note this doesn't pick up changes to the build config, including non-default locations for the ogg headers, but it's better than nothing...
Python
bsd-3-clause
ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis,ShiftMediaProject/vorbis
Add build flags for YouCompleteMe. Add a .ycm_extra.conf.py script to return the same CFLAGS we pass for `make debug`. These are passed to libclang so symbol lookup works correctly. Note this doesn't pick up changes to the build config, including non-default locations for the ogg headers, but it's better than nothing...
def FlagsForFile(filename, **kwargs): return { 'flags': [ '-x', 'c', '-g', '-Wall', '-Wextra', '-D_REENTRANT', '-D__NO_MATH_INLINES', '-fsigned-char' ], }
<commit_before><commit_msg>Add build flags for YouCompleteMe. Add a .ycm_extra.conf.py script to return the same CFLAGS we pass for `make debug`. These are passed to libclang so symbol lookup works correctly. Note this doesn't pick up changes to the build config, including non-default locations for the ogg headers, b...
def FlagsForFile(filename, **kwargs): return { 'flags': [ '-x', 'c', '-g', '-Wall', '-Wextra', '-D_REENTRANT', '-D__NO_MATH_INLINES', '-fsigned-char' ], }
Add build flags for YouCompleteMe. Add a .ycm_extra.conf.py script to return the same CFLAGS we pass for `make debug`. These are passed to libclang so symbol lookup works correctly. Note this doesn't pick up changes to the build config, including non-default locations for the ogg headers, but it's better than nothing...
<commit_before><commit_msg>Add build flags for YouCompleteMe. Add a .ycm_extra.conf.py script to return the same CFLAGS we pass for `make debug`. These are passed to libclang so symbol lookup works correctly. Note this doesn't pick up changes to the build config, including non-default locations for the ogg headers, b...
ae7a2a3809ebe54c13a9ced4da5bbd48cc8d0e3a
Apollonian/main.py
Apollonian/main.py
# Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm) # FB36 - 20131031 import math import random from collections import deque from PIL import Image imgx = 512 * 2 imgy = 512 * 2 image = Image.new("RGB", (imgx, imgy)) pixels = image.load() #n = random.randint(3, 6) # of main circles n = 3 a = math.pi...
Add "Circle Inversion Fractals (Apollonian Gasket)"
Add "Circle Inversion Fractals (Apollonian Gasket)"
Python
mit
leovp/graphics
Add "Circle Inversion Fractals (Apollonian Gasket)"
# Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm) # FB36 - 20131031 import math import random from collections import deque from PIL import Image imgx = 512 * 2 imgy = 512 * 2 image = Image.new("RGB", (imgx, imgy)) pixels = image.load() #n = random.randint(3, 6) # of main circles n = 3 a = math.pi...
<commit_before><commit_msg>Add "Circle Inversion Fractals (Apollonian Gasket)"<commit_after>
# Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm) # FB36 - 20131031 import math import random from collections import deque from PIL import Image imgx = 512 * 2 imgy = 512 * 2 image = Image.new("RGB", (imgx, imgy)) pixels = image.load() #n = random.randint(3, 6) # of main circles n = 3 a = math.pi...
Add "Circle Inversion Fractals (Apollonian Gasket)"# Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm) # FB36 - 20131031 import math import random from collections import deque from PIL import Image imgx = 512 * 2 imgy = 512 * 2 image = Image.new("RGB", (imgx, imgy)) pixels = image.load() #n = rando...
<commit_before><commit_msg>Add "Circle Inversion Fractals (Apollonian Gasket)"<commit_after># Circle Inversion Fractals (Apollonian Gasket) (Escape-time Algorithm) # FB36 - 20131031 import math import random from collections import deque from PIL import Image imgx = 512 * 2 imgy = 512 * 2 image = Image.new("RGB", (imgx...
59ca3b5e97e2186f439f3f2fc82259ba56a3b78f
numpy/typing/tests/data/pass/modules.py
numpy/typing/tests/data/pass/modules.py
import numpy as np np.char np.ctypeslib np.emath np.fft np.lib np.linalg np.ma np.matrixlib np.polynomial np.random np.rec np.testing np.version np.__all__ np.__path__ np.__version__ np.__git_version__ np.__NUMPY_SETUP__ np.__deprecated_attrs__ np.__expired_functions__
Add module-based tests to the `pass` tests
TST: Add module-based tests to the `pass` tests
Python
bsd-3-clause
endolith/numpy,jakirkham/numpy,anntzer/numpy,simongibbons/numpy,anntzer/numpy,numpy/numpy,numpy/numpy,seberg/numpy,mattip/numpy,charris/numpy,seberg/numpy,jakirkham/numpy,simongibbons/numpy,mhvk/numpy,mhvk/numpy,pdebuyl/numpy,pbrod/numpy,pbrod/numpy,pdebuyl/numpy,endolith/numpy,seberg/numpy,pdebuyl/numpy,charris/numpy,...
TST: Add module-based tests to the `pass` tests
import numpy as np np.char np.ctypeslib np.emath np.fft np.lib np.linalg np.ma np.matrixlib np.polynomial np.random np.rec np.testing np.version np.__all__ np.__path__ np.__version__ np.__git_version__ np.__NUMPY_SETUP__ np.__deprecated_attrs__ np.__expired_functions__
<commit_before><commit_msg>TST: Add module-based tests to the `pass` tests<commit_after>
import numpy as np np.char np.ctypeslib np.emath np.fft np.lib np.linalg np.ma np.matrixlib np.polynomial np.random np.rec np.testing np.version np.__all__ np.__path__ np.__version__ np.__git_version__ np.__NUMPY_SETUP__ np.__deprecated_attrs__ np.__expired_functions__
TST: Add module-based tests to the `pass` testsimport numpy as np np.char np.ctypeslib np.emath np.fft np.lib np.linalg np.ma np.matrixlib np.polynomial np.random np.rec np.testing np.version np.__all__ np.__path__ np.__version__ np.__git_version__ np.__NUMPY_SETUP__ np.__deprecated_attrs__ np.__expired_functions__
<commit_before><commit_msg>TST: Add module-based tests to the `pass` tests<commit_after>import numpy as np np.char np.ctypeslib np.emath np.fft np.lib np.linalg np.ma np.matrixlib np.polynomial np.random np.rec np.testing np.version np.__all__ np.__path__ np.__version__ np.__git_version__ np.__NUMPY_SETUP__ np.__depr...
8ff7becc414e2969cf89468c6af95c0356abebae
src/axe-shrink.py
src/axe-shrink.py
#!/usr/bin/env python # Given an axe trace that fails a given consistency model, try to find # the smallest subset of the trace that also fails the model. This # makes it easier to determine *why* a trace does not satisfy a model. # This simple shrinker is only really effective when each store of a # value to an add...
Add a rudimentary trace shrinker, implemented in python
Add a rudimentary trace shrinker, implemented in python
Python
apache-2.0
CTSRD-CHERI/axe,CTSRD-CHERI/axe,CTSRD-CHERI/axe,CTSRD-CHERI/axe
Add a rudimentary trace shrinker, implemented in python
#!/usr/bin/env python # Given an axe trace that fails a given consistency model, try to find # the smallest subset of the trace that also fails the model. This # makes it easier to determine *why* a trace does not satisfy a model. # This simple shrinker is only really effective when each store of a # value to an add...
<commit_before><commit_msg>Add a rudimentary trace shrinker, implemented in python<commit_after>
#!/usr/bin/env python # Given an axe trace that fails a given consistency model, try to find # the smallest subset of the trace that also fails the model. This # makes it easier to determine *why* a trace does not satisfy a model. # This simple shrinker is only really effective when each store of a # value to an add...
Add a rudimentary trace shrinker, implemented in python#!/usr/bin/env python # Given an axe trace that fails a given consistency model, try to find # the smallest subset of the trace that also fails the model. This # makes it easier to determine *why* a trace does not satisfy a model. # This simple shrinker is only ...
<commit_before><commit_msg>Add a rudimentary trace shrinker, implemented in python<commit_after>#!/usr/bin/env python # Given an axe trace that fails a given consistency model, try to find # the smallest subset of the trace that also fails the model. This # makes it easier to determine *why* a trace does not satisfy ...