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
b72a4bb06fda18ebca91649808cd2f2c531b392e
migrations/versions/0060.py
migrations/versions/0060.py
"""empty message Revision ID: 0060 set all show_banner_text Revises: 0059 add show_banner_text Create Date: 2021-10-03 00:31:22.285217 """ # revision identifiers, used by Alembic. revision = '0060 set all show_banner_text' down_revision = '0059 add show_banner_text' from alembic import op def upgrade(): op.ex...
Set all events to show banner text
Set all events to show banner text
Python
mit
NewAcropolis/api,NewAcropolis/api,NewAcropolis/api
Set all events to show banner text
"""empty message Revision ID: 0060 set all show_banner_text Revises: 0059 add show_banner_text Create Date: 2021-10-03 00:31:22.285217 """ # revision identifiers, used by Alembic. revision = '0060 set all show_banner_text' down_revision = '0059 add show_banner_text' from alembic import op def upgrade(): op.ex...
<commit_before><commit_msg>Set all events to show banner text<commit_after>
"""empty message Revision ID: 0060 set all show_banner_text Revises: 0059 add show_banner_text Create Date: 2021-10-03 00:31:22.285217 """ # revision identifiers, used by Alembic. revision = '0060 set all show_banner_text' down_revision = '0059 add show_banner_text' from alembic import op def upgrade(): op.ex...
Set all events to show banner text"""empty message Revision ID: 0060 set all show_banner_text Revises: 0059 add show_banner_text Create Date: 2021-10-03 00:31:22.285217 """ # revision identifiers, used by Alembic. revision = '0060 set all show_banner_text' down_revision = '0059 add show_banner_text' from alembic im...
<commit_before><commit_msg>Set all events to show banner text<commit_after>"""empty message Revision ID: 0060 set all show_banner_text Revises: 0059 add show_banner_text Create Date: 2021-10-03 00:31:22.285217 """ # revision identifiers, used by Alembic. revision = '0060 set all show_banner_text' down_revision = '00...
79637efbdda03cea88fa6a59b24a27f1d393c79f
corehq/util/tests/test_es_interface.py
corehq/util/tests/test_es_interface.py
from django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInterface @es_test class TestESInterface(SimpleTestCase): @classmethod def setUpClass(...
Add tests for previous commit
Add tests for previous commit inb4 this is backwards
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add tests for previous commit inb4 this is backwards
from django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInterface @es_test class TestESInterface(SimpleTestCase): @classmethod def setUpClass(...
<commit_before><commit_msg>Add tests for previous commit inb4 this is backwards<commit_after>
from django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInterface @es_test class TestESInterface(SimpleTestCase): @classmethod def setUpClass(...
Add tests for previous commit inb4 this is backwardsfrom django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInterface @es_test class TestESInterface(S...
<commit_before><commit_msg>Add tests for previous commit inb4 this is backwards<commit_after>from django.test import SimpleTestCase from mock import ANY, patch from corehq.apps.es.tests.utils import es_test from corehq.elastic import SerializationError, get_es_new from corehq.util.es.interface import ElasticsearchInt...
fd3eaa3810ce82db864b3fcafe61d16ab53d85e5
perftest/scripts/webserver.py
perftest/scripts/webserver.py
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class Handler(BaseHTTPRequestHandler): def do(self): self.send_response(200) self.wfile.write('{"headers":{"type":"type"},"content":{"b":2}}') def do_GET(self): self.do() def do_POST(self): self.do() def main(): try: server = ...
Add simple Python web server for performance testing
perftest: Add simple Python web server for performance testing In order to profile bottlenecks in CCF's HTTP communication, a simple Python webserver comes very handy. One can reason that the existing HTTP server in CCF does not meet the performance requirements, if the perftest client is clearly faster against the Py...
Python
apache-2.0
akisaarinen/ccf,akisaarinen/ccf
perftest: Add simple Python web server for performance testing In order to profile bottlenecks in CCF's HTTP communication, a simple Python webserver comes very handy. One can reason that the existing HTTP server in CCF does not meet the performance requirements, if the perftest client is clearly faster against the Py...
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class Handler(BaseHTTPRequestHandler): def do(self): self.send_response(200) self.wfile.write('{"headers":{"type":"type"},"content":{"b":2}}') def do_GET(self): self.do() def do_POST(self): self.do() def main(): try: server = ...
<commit_before><commit_msg>perftest: Add simple Python web server for performance testing In order to profile bottlenecks in CCF's HTTP communication, a simple Python webserver comes very handy. One can reason that the existing HTTP server in CCF does not meet the performance requirements, if the perftest client is cl...
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer class Handler(BaseHTTPRequestHandler): def do(self): self.send_response(200) self.wfile.write('{"headers":{"type":"type"},"content":{"b":2}}') def do_GET(self): self.do() def do_POST(self): self.do() def main(): try: server = ...
perftest: Add simple Python web server for performance testing In order to profile bottlenecks in CCF's HTTP communication, a simple Python webserver comes very handy. One can reason that the existing HTTP server in CCF does not meet the performance requirements, if the perftest client is clearly faster against the Py...
<commit_before><commit_msg>perftest: Add simple Python web server for performance testing In order to profile bottlenecks in CCF's HTTP communication, a simple Python webserver comes very handy. One can reason that the existing HTTP server in CCF does not meet the performance requirements, if the perftest client is cl...
72be8a8fd8345542096ba31e3f1428ea25ea9498
ex6.py
ex6.py
end1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 + end12 # Printing with a comma print end1 + end2 + end3 + end4 + end5 ...
Print with vs without a comma
Print with vs without a comma
Python
mit
nguyennam9696/Learn_Python_The_Hard_Way
Print with vs without a comma
end1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 + end12 # Printing with a comma print end1 + end2 + end3 + end4 + end5 ...
<commit_before><commit_msg>Print with vs without a comma<commit_after>
end1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 + end12 # Printing with a comma print end1 + end2 + end3 + end4 + end5 ...
Print with vs without a commaend1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 + end12 # Printing with a comma print end1...
<commit_before><commit_msg>Print with vs without a comma<commit_after>end1 = "C" end2 = "H" end3 = "E" end4 = "E" end5 = "S" end6 = "E" end7 = "B" end8 = "U" end9 = "R" end10 = "G" end11 = "E" end12 = "R" # Printing without a comma print end1 + end2 + end3 + end4 + end5 + end6 print end7 + end8 + end9 + end10 + end11 +...
96035f6bb2a298cea859b1e5e9812e2dd83982d2
dnanexus/shell/resources/home/dnanexus/upload_file.py
dnanexus/shell/resources/home/dnanexus/upload_file.py
#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/' ENCODED_KEY = '...' ENCODED_SECRET_KEY = '...' respo...
Add script to upload files to shell applet
Add script to upload files to shell applet
Python
mit
ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline,ENCODE-DCC/chip-seq-pipeline
Add script to upload files to shell applet
#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/' ENCODED_KEY = '...' ENCODED_SECRET_KEY = '...' respo...
<commit_before><commit_msg>Add script to upload files to shell applet<commit_after>
#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/' ENCODED_KEY = '...' ENCODED_SECRET_KEY = '...' respo...
Add script to upload files to shell applet#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encodedcc.org/TSTFF867178/upload/' ENCODED_KEY...
<commit_before><commit_msg>Add script to upload files to shell applet<commit_after>#!/usr/bin/env python # -*- coding: latin-1 -*- import os, sys, time, subprocess, json, requests HEADERS = { 'Content-type': 'application/json', 'Accept': 'application/json', } path = 'test.fastq' FILE_URL = 'http://test.encod...
85f6b2437b57c6e33ff56422b15aaab690704218
ckanext/doi/tests/test_schema.py
ckanext/doi/tests/test_schema.py
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.factories import DataConstants from ckantest.models import TestBase from lxml ...
Add test to validate against schema
Add test to validate against schema
Python
mit
NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi,NaturalHistoryMuseum/ckanext-doi
Add test to validate against schema
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.factories import DataConstants from ckantest.models import TestBase from lxml ...
<commit_before><commit_msg>Add test to validate against schema<commit_after>
#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.factories import DataConstants from ckantest.models import TestBase from lxml ...
Add test to validate against schema#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.factories import DataConstants from ckantes...
<commit_before><commit_msg>Add test to validate against schema<commit_after>#!/usr/bin/env python # encoding: utf-8 # # This file is part of ckanext-doi # Created by the Natural History Museum in London, UK import ckanext.doi.api as doi_api import ckanext.doi.lib as doi_lib import mock import requests from ckantest.fa...
a7629ef3acedaa688a455c01afb65c40a53c14b0
tests/test_draw.py
tests/test_draw.py
import batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @timer def initialize(ngrid=25, theta_x=1.):...
Add unit test for drawing routines
Add unit test for drawing routines
Python
bsd-2-clause
jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace,jmeyers314/batoid,jmeyers314/jtrace
Add unit test for drawing routines
import batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @timer def initialize(ngrid=25, theta_x=1.):...
<commit_before><commit_msg>Add unit test for drawing routines<commit_after>
import batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @timer def initialize(ngrid=25, theta_x=1.):...
Add unit test for drawing routinesimport batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_toolkits.mplot3d import Axes3D @timer def...
<commit_before><commit_msg>Add unit test for drawing routines<commit_after>import batoid import time import os import yaml import numpy as np import pytest from test_helpers import timer # Use matplotlib with a non-interactive backend. import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt from mpl_to...
41f0533edc9ebe788722711af95e040d4f06abb9
lglass/bird.py
lglass/bird.py
# coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: argv.append("-v") if isinstance(command, str): argv.extend(comman...
Add simple BIRD client class
Add simple BIRD client class
Python
mit
fritz0705/lglass
Add simple BIRD client class
# coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: argv.append("-v") if isinstance(command, str): argv.extend(comman...
<commit_before><commit_msg>Add simple BIRD client class<commit_after>
# coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: argv.append("-v") if isinstance(command, str): argv.extend(comman...
Add simple BIRD client class# coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: argv.append("-v") if isinstance(command,...
<commit_before><commit_msg>Add simple BIRD client class<commit_after># coding: utf-8 import subprocess import netaddr import lglass.route class BirdClient(object): def __init__(self, executable="birdc"): self.executable = executable def send(self, command, raw=False): argv = [self.executable] if raw: a...
064386acbe509f872e40f3f577e7b6189ed91434
src/test/ed/lang/python/thread2_test.py
src/test/ed/lang/python/thread2_test.py
import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io.File('.'))) import test.test_thread import test.test_threading
Test threading in app server rather than in serverTest.
Test threading in app server rather than in serverTest.
Python
apache-2.0
babble/babble,babble/babble,babble/babble,babble/babble,babble/babble,babble/babble
Test threading in app server rather than in serverTest.
import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io.File('.'))) import test.test_thread import test.test_threading
<commit_before><commit_msg>Test threading in app server rather than in serverTest.<commit_after>
import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io.File('.'))) import test.test_thread import test.test_threading
Test threading in app server rather than in serverTest.import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io.File('.'))) import test.test_thread impo...
<commit_before><commit_msg>Test threading in app server rather than in serverTest.<commit_after>import _10gen import ed.appserver.AppContext import ed.lang.python.Python import java.io.File # FIXME: this test produces a lot of output _10gen.__instance__ = ed.lang.python.Python.toPython(ed.appserver.AppContext(java.io....
3b5234a370db18fc51d8ad8573981c85544abb47
test/frameworks/lib/fix_auth_failure.py
test/frameworks/lib/fix_auth_failure.py
#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # all rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
Add code to fix the python 2.6.6 auth failure issue.
Add code to fix the python 2.6.6 auth failure issue. git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4
Python
bsd-3-clause
edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,edina/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon,lockss/lockss-daemon
Add code to fix the python 2.6.6 auth failure issue. git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4
#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # all rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
<commit_before><commit_msg>Add code to fix the python 2.6.6 auth failure issue. git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4<commit_after>
#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # all rights reserved. # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation fi...
Add code to fix the python 2.6.6 auth failure issue. git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustees of Leland Stanford Jr. University, # al...
<commit_before><commit_msg>Add code to fix the python 2.6.6 auth failure issue. git-svn-id: 293778eaa97c8c94097d610b1bd5133a8f478f36@10708 4f837ed2-42f5-46e7-a7a5-fa17313484d4<commit_after>#!/usr/bin/env python # $Id: fix_auth_failure.py,v 1.1 2011-02-15 20:28:38 barry409 Exp $ # Copyright (c) 2011 Board of Trustee...
a8bd9defcf3359296acf7633041b036213868075
install.py
install.py
#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -y install {0}".format(package_name) sudo(command_text) def main(): # Install s...
Make getting started easier with a handy script
Make getting started easier with a handy script
Python
mit
projectweekend/Pi-Camera-Time-Lapse,projectweekend/Pi-Camera-Time-Lapse
Make getting started easier with a handy script
#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -y install {0}".format(package_name) sudo(command_text) def main(): # Install s...
<commit_before><commit_msg>Make getting started easier with a handy script<commit_after>
#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -y install {0}".format(package_name) sudo(command_text) def main(): # Install s...
Make getting started easier with a handy script#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -y install {0}".format(package_name) s...
<commit_before><commit_msg>Make getting started easier with a handy script<commit_after>#!/usr/bin/env python import subprocess def sudo(command_text): parts = ['sudo'] parts.extend(command_text.split(command_text)) subprocess.call(parts) def apt_get_install(package_name): command_text = "apt-get -...
6f3579e6ac32211779481307f8e508469dde7605
externalNMEA.py
externalNMEA.py
from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def set_position_master(url, latitude, longitude, orientation): payload = di...
Add example of how to read from a external GPS outputting NMEA messages.
Add example of how to read from a external GPS outputting NMEA messages. Parsing using pynmea2
Python
mit
waterlinked/examples
Add example of how to read from a external GPS outputting NMEA messages. Parsing using pynmea2
from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def set_position_master(url, latitude, longitude, orientation): payload = di...
<commit_before><commit_msg>Add example of how to read from a external GPS outputting NMEA messages. Parsing using pynmea2<commit_after>
from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig(format='%(asctime)s %(message)s', level=logging.INFO) def set_position_master(url, latitude, longitude, orientation): payload = di...
Add example of how to read from a external GPS outputting NMEA messages. Parsing using pynmea2from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig(format='%(asctime)s %(message)s', level=...
<commit_before><commit_msg>Add example of how to read from a external GPS outputting NMEA messages. Parsing using pynmea2<commit_after>from __future__ import print_function import requests import argparse import time import logging import sys import serial import pynmea2 log = logging.getLogger() logging.basicConfig...
ac0d0b78b7b4eef913460894fca3af1ace222c7f
tests/test_damage.py
tests/test_damage.py
import unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absorbed = 0 # it should round the magic/phys dmg to 1 point after the ...
Test template for the Damage class
Test template for the Damage class
Python
mit
Enether/python_wow
Test template for the Damage class
import unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absorbed = 0 # it should round the magic/phys dmg to 1 point after the ...
<commit_before><commit_msg>Test template for the Damage class<commit_after>
import unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absorbed = 0 # it should round the magic/phys dmg to 1 point after the ...
Test template for the Damage classimport unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absorbed = 0 # it should round the ma...
<commit_before><commit_msg>Test template for the Damage class<commit_after>import unittest from damage import Damage class DamageTests(unittest.TestCase): def test_init(self): dmg = Damage(phys_dmg=1.34, magic_dmg=1.49391) expected_phys_dmg = 1.3 expected_m_dmg = 1.5 expected_absor...
9349adb2efa5f0242cf9250d74d714a7e6aea1e9
ordination/__init__.py
ordination/__init__.py
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test __version__ = '0.1-dev'
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test # Compatible with PEP386 __version__ = '0.1.dev'
Make version compatible with PEP386
MAINT: Make version compatible with PEP386
Python
bsd-3-clause
xguse/scikit-bio,wdwvt1/scikit-bio,johnchase/scikit-bio,xguse/scikit-bio,colinbrislawn/scikit-bio,Achuth17/scikit-bio,Achuth17/scikit-bio,jdrudolph/scikit-bio,Kleptobismol/scikit-bio,jensreeder/scikit-bio,Jorge-C/bipy,jairideout/scikit-bio,kdmurray91/scikit-bio,averagehat/scikit-bio,wdwvt1/scikit-bio,Kleptobismol/sciki...
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test __version__ = '0.1-dev' MAINT: Make version compatible with PEP386
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test # Compatible with PEP386 __version__ = '0.1.dev'
<commit_before>from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test __version__ = '0.1-dev' <commit_msg>MAINT: Make version compatible with PEP386<commit_after>
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test # Compatible with PEP386 __version__ = '0.1.dev'
from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test __version__ = '0.1-dev' MAINT: Make version compatible with PEP386from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test # Compat...
<commit_before>from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing import Tester #test = Tester().test __version__ = '0.1-dev' <commit_msg>MAINT: Make version compatible with PEP386<commit_after>from .base import CA, RDA, CCA __all__ = ['CA', 'RDA', 'CCA'] # #from numpy.testing impo...
c5e047ff0e1cfe35692838365b907db8c3746c4b
doc/examples/plot_join_segmentations.py
doc/examples/plot_join_segmentations.py
""" ========================================== Find the intersection of two segmentations ========================================== When segmenting an image, you may want to combine multiple alternative segmentations. The `skimage.segmentation.join_segmentations` function computes the join of two segmentations, in wh...
Add join_segmentations example to the gallery
Add join_segmentations example to the gallery
Python
bsd-3-clause
Midafi/scikit-image,rjeli/scikit-image,youprofit/scikit-image,GaZ3ll3/scikit-image,keflavich/scikit-image,michaelaye/scikit-image,chintak/scikit-image,rjeli/scikit-image,youprofit/scikit-image,vighneshbirodkar/scikit-image,newville/scikit-image,almarklein/scikit-image,ClinicalGraphics/scikit-image,Britefury/scikit-imag...
Add join_segmentations example to the gallery
""" ========================================== Find the intersection of two segmentations ========================================== When segmenting an image, you may want to combine multiple alternative segmentations. The `skimage.segmentation.join_segmentations` function computes the join of two segmentations, in wh...
<commit_before><commit_msg>Add join_segmentations example to the gallery<commit_after>
""" ========================================== Find the intersection of two segmentations ========================================== When segmenting an image, you may want to combine multiple alternative segmentations. The `skimage.segmentation.join_segmentations` function computes the join of two segmentations, in wh...
Add join_segmentations example to the gallery""" ========================================== Find the intersection of two segmentations ========================================== When segmenting an image, you may want to combine multiple alternative segmentations. The `skimage.segmentation.join_segmentations` function ...
<commit_before><commit_msg>Add join_segmentations example to the gallery<commit_after>""" ========================================== Find the intersection of two segmentations ========================================== When segmenting an image, you may want to combine multiple alternative segmentations. The `skimage.s...
2b146388d1804ca4cb069fa07ea5e614a8ee1d14
tools/send_to_fcm.py
tools/send_to_fcm.py
import requests url = 'https://fcm.googleapis.com/fcm/send' headers = {'Content-Type': 'application/json', 'Authorization': 'key=AIza...(copy code here)...'} payload = """ { "to": "/topics/all", "notification": { "title": "Hello world", "body": "You are beautiful" } } """ resp = requests.po...
Add example of sending push notification via Firebase Cloud Messaging
Add example of sending push notification via Firebase Cloud Messaging
Python
apache-2.0
sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile,sth-larp/deus-mobile
Add example of sending push notification via Firebase Cloud Messaging
import requests url = 'https://fcm.googleapis.com/fcm/send' headers = {'Content-Type': 'application/json', 'Authorization': 'key=AIza...(copy code here)...'} payload = """ { "to": "/topics/all", "notification": { "title": "Hello world", "body": "You are beautiful" } } """ resp = requests.po...
<commit_before><commit_msg>Add example of sending push notification via Firebase Cloud Messaging<commit_after>
import requests url = 'https://fcm.googleapis.com/fcm/send' headers = {'Content-Type': 'application/json', 'Authorization': 'key=AIza...(copy code here)...'} payload = """ { "to": "/topics/all", "notification": { "title": "Hello world", "body": "You are beautiful" } } """ resp = requests.po...
Add example of sending push notification via Firebase Cloud Messagingimport requests url = 'https://fcm.googleapis.com/fcm/send' headers = {'Content-Type': 'application/json', 'Authorization': 'key=AIza...(copy code here)...'} payload = """ { "to": "/topics/all", "notification": { "title": "Hello ...
<commit_before><commit_msg>Add example of sending push notification via Firebase Cloud Messaging<commit_after>import requests url = 'https://fcm.googleapis.com/fcm/send' headers = {'Content-Type': 'application/json', 'Authorization': 'key=AIza...(copy code here)...'} payload = """ { "to": "/topics/all",...
a3e9097247f4abe660696e5bd19f06e7e5756249
python/day9.py
python/day9.py
#!/usr/local/bin/python3 def parse_input(text): """Parse a list of destinations and weights Returns a list of tuples (source, dest, weight). Edges in this graph and undirected. The input contains multiple rows appearing like so: A to B = W Where A and B are strings and W is the weight t...
Add start of Python solution for day 9 (parsing only)
Add start of Python solution for day 9 (parsing only)
Python
mit
robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions,robjwells/adventofcode-solutions
Add start of Python solution for day 9 (parsing only)
#!/usr/local/bin/python3 def parse_input(text): """Parse a list of destinations and weights Returns a list of tuples (source, dest, weight). Edges in this graph and undirected. The input contains multiple rows appearing like so: A to B = W Where A and B are strings and W is the weight t...
<commit_before><commit_msg>Add start of Python solution for day 9 (parsing only)<commit_after>
#!/usr/local/bin/python3 def parse_input(text): """Parse a list of destinations and weights Returns a list of tuples (source, dest, weight). Edges in this graph and undirected. The input contains multiple rows appearing like so: A to B = W Where A and B are strings and W is the weight t...
Add start of Python solution for day 9 (parsing only)#!/usr/local/bin/python3 def parse_input(text): """Parse a list of destinations and weights Returns a list of tuples (source, dest, weight). Edges in this graph and undirected. The input contains multiple rows appearing like so: A to B = ...
<commit_before><commit_msg>Add start of Python solution for day 9 (parsing only)<commit_after>#!/usr/local/bin/python3 def parse_input(text): """Parse a list of destinations and weights Returns a list of tuples (source, dest, weight). Edges in this graph and undirected. The input contains multiple ...
b95e5cd706a1cf81e41debae30422345cef3a1ee
tests/committerparser.py
tests/committerparser.py
#!/usr/bin/python import sys import getopt import re import email.utils import datetime class Usage(Exception): def __init__(self, msg): self.msg = msg def parse_date(datestr): d = email.utils.parsedate(datestr) return datetime.datetime(d[0],d[1],d[2],d[3],d[4],d[5],d[6]) def parse_gitlog(filena...
Add simple parser to return some activity numbers from our git log.
Add simple parser to return some activity numbers from our git log.
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add simple parser to return some activity numbers from our git log.
#!/usr/bin/python import sys import getopt import re import email.utils import datetime class Usage(Exception): def __init__(self, msg): self.msg = msg def parse_date(datestr): d = email.utils.parsedate(datestr) return datetime.datetime(d[0],d[1],d[2],d[3],d[4],d[5],d[6]) def parse_gitlog(filena...
<commit_before><commit_msg>Add simple parser to return some activity numbers from our git log.<commit_after>
#!/usr/bin/python import sys import getopt import re import email.utils import datetime class Usage(Exception): def __init__(self, msg): self.msg = msg def parse_date(datestr): d = email.utils.parsedate(datestr) return datetime.datetime(d[0],d[1],d[2],d[3],d[4],d[5],d[6]) def parse_gitlog(filena...
Add simple parser to return some activity numbers from our git log.#!/usr/bin/python import sys import getopt import re import email.utils import datetime class Usage(Exception): def __init__(self, msg): self.msg = msg def parse_date(datestr): d = email.utils.parsedate(datestr) return datetime.da...
<commit_before><commit_msg>Add simple parser to return some activity numbers from our git log.<commit_after>#!/usr/bin/python import sys import getopt import re import email.utils import datetime class Usage(Exception): def __init__(self, msg): self.msg = msg def parse_date(datestr): d = email.utils.p...
3020b2084b24f1e00f0b9fc1d06186b1e697647e
tests/unit/utils/args.py
tests/unit/utils/args.py
# -*- coding: utf-8 -*- # Import Salt Libs from salt.utils import args # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import NO_MOCK, NO_MOCK_REASON from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') @skipIf(NO_MOCK, NO_MOCK_REASON) class ArgsTes...
Test long jid passed on CLI
Test long jid passed on CLI
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Test long jid passed on CLI
# -*- coding: utf-8 -*- # Import Salt Libs from salt.utils import args # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import NO_MOCK, NO_MOCK_REASON from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') @skipIf(NO_MOCK, NO_MOCK_REASON) class ArgsTes...
<commit_before><commit_msg>Test long jid passed on CLI<commit_after>
# -*- coding: utf-8 -*- # Import Salt Libs from salt.utils import args # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import NO_MOCK, NO_MOCK_REASON from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') @skipIf(NO_MOCK, NO_MOCK_REASON) class ArgsTes...
Test long jid passed on CLI# -*- coding: utf-8 -*- # Import Salt Libs from salt.utils import args # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import NO_MOCK, NO_MOCK_REASON from salttesting.helpers import ensure_in_syspath ensure_in_syspath('../../') @skipIf(NO_MOCK, NO...
<commit_before><commit_msg>Test long jid passed on CLI<commit_after># -*- coding: utf-8 -*- # Import Salt Libs from salt.utils import args # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import NO_MOCK, NO_MOCK_REASON from salttesting.helpers import ensure_in_syspath ensure_...
8f597e766e9ef8014da4391a7109d9b77daf127e
tests/user_utils_test.py
tests/user_utils_test.py
"""Tests for user utility functions.""" from drudge import Vec, sum_, prod_ from drudge.term import parse_terms def test_sum_prod_utility(): """Test the summation and product utility.""" v = Vec('v') vecs = [v[i] for i in range(3)] v0, v1, v2 = vecs # The proxy object cannot be directly compare...
Add tests for user utilities sum_ and prod_
Add tests for user utilities sum_ and prod_
Python
mit
tschijnmo/drudge,tschijnmo/drudge,tschijnmo/drudge
Add tests for user utilities sum_ and prod_
"""Tests for user utility functions.""" from drudge import Vec, sum_, prod_ from drudge.term import parse_terms def test_sum_prod_utility(): """Test the summation and product utility.""" v = Vec('v') vecs = [v[i] for i in range(3)] v0, v1, v2 = vecs # The proxy object cannot be directly compare...
<commit_before><commit_msg>Add tests for user utilities sum_ and prod_<commit_after>
"""Tests for user utility functions.""" from drudge import Vec, sum_, prod_ from drudge.term import parse_terms def test_sum_prod_utility(): """Test the summation and product utility.""" v = Vec('v') vecs = [v[i] for i in range(3)] v0, v1, v2 = vecs # The proxy object cannot be directly compare...
Add tests for user utilities sum_ and prod_"""Tests for user utility functions.""" from drudge import Vec, sum_, prod_ from drudge.term import parse_terms def test_sum_prod_utility(): """Test the summation and product utility.""" v = Vec('v') vecs = [v[i] for i in range(3)] v0, v1, v2 = vecs # ...
<commit_before><commit_msg>Add tests for user utilities sum_ and prod_<commit_after>"""Tests for user utility functions.""" from drudge import Vec, sum_, prod_ from drudge.term import parse_terms def test_sum_prod_utility(): """Test the summation and product utility.""" v = Vec('v') vecs = [v[i] for i i...
06c3a417f0270d76a7fcc9e94fdb40f9952b9d12
src/wirecloud/fiware/views.py
src/wirecloud/fiware/views.py
# -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server
Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server
Python
agpl-3.0
jpajuelo/wirecloud,rockneurotiko/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud,jpajuelo/wirecloud,jpajuelo/wirecloud,rockneurotiko/wirecloud
Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server
# -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
<commit_before><commit_msg>Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server<commit_after>
# -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either v...
Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server# -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistribute it and/or modify # it under the terms...
<commit_before><commit_msg>Add a login view that automatically starts the oauth2 flow for authenticating using the IdM server<commit_after># -*- coding: utf-8 -*- # Copyright (c) 2012-2013 CoNWeT Lab., Universidad Politécnica de Madrid # This file is part of Wirecloud. # Wirecloud is free software: you can redistrib...
c51bb87714ade403aeabc9b4b4c62b4ee3a7a8c5
scripts/test-scrobble.py
scripts/test-scrobble.py
#!/usr/bin/env python ##### CONFIG ##### SERVER = "turtle.libre.fm" USER = "testuser" PASSWORD = "password" ################## import gobble, datetime print "Handshaking..." gs = gobble.GobbleServer(SERVER, USER, PASSWORD, 'tst') time = datetime.datetime.now() - datetime.timedelta(days=1) # Yesterday track = gobb...
Add test script for checking to see if scrobbling works on new installs
Add test script for checking to see if scrobbling works on new installs
Python
agpl-3.0
foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm
Add test script for checking to see if scrobbling works on new installs
#!/usr/bin/env python ##### CONFIG ##### SERVER = "turtle.libre.fm" USER = "testuser" PASSWORD = "password" ################## import gobble, datetime print "Handshaking..." gs = gobble.GobbleServer(SERVER, USER, PASSWORD, 'tst') time = datetime.datetime.now() - datetime.timedelta(days=1) # Yesterday track = gobb...
<commit_before><commit_msg>Add test script for checking to see if scrobbling works on new installs<commit_after>
#!/usr/bin/env python ##### CONFIG ##### SERVER = "turtle.libre.fm" USER = "testuser" PASSWORD = "password" ################## import gobble, datetime print "Handshaking..." gs = gobble.GobbleServer(SERVER, USER, PASSWORD, 'tst') time = datetime.datetime.now() - datetime.timedelta(days=1) # Yesterday track = gobb...
Add test script for checking to see if scrobbling works on new installs#!/usr/bin/env python ##### CONFIG ##### SERVER = "turtle.libre.fm" USER = "testuser" PASSWORD = "password" ################## import gobble, datetime print "Handshaking..." gs = gobble.GobbleServer(SERVER, USER, PASSWORD, 'tst') time = dateti...
<commit_before><commit_msg>Add test script for checking to see if scrobbling works on new installs<commit_after>#!/usr/bin/env python ##### CONFIG ##### SERVER = "turtle.libre.fm" USER = "testuser" PASSWORD = "password" ################## import gobble, datetime print "Handshaking..." gs = gobble.GobbleServer(SER...
97b9ee00277fa35c92886b1ed39864eba3707dce
bluebottle/activities/migrations/0020_auto_20200224_1005.py
bluebottle/activities/migrations/0020_auto_20200224_1005.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-11 12:19 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
Add organizer permissions to staff group
Add organizer permissions to staff group BB-16555 #resolve
Python
bsd-3-clause
onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add organizer permissions to staff group BB-16555 #resolve
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-11 12:19 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
<commit_before><commit_msg>Add organizer permissions to staff group BB-16555 #resolve<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-11 12:19 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): group_perms = { 'Staff': { 'perms': ( ...
Add organizer permissions to staff group BB-16555 #resolve# -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-11 12:19 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_group_permissions(apps, schema_editor): ...
<commit_before><commit_msg>Add organizer permissions to staff group BB-16555 #resolve<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.15 on 2019-11-11 12:19 from __future__ import unicode_literals from django.db import migrations from bluebottle.utils.utils import update_group_permissions def add_gr...
efbf98235b82c954364f35cb09f63006e23346e2
tests/test_lang_javascript.py
tests/test_lang_javascript.py
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import pytest # type: ignore from sensibility.language import Language from sensibility.language.javascript import javascript from sensibility.token_utils import Position from location_factory import LocationFactory test_file = r"""#!/usr/bin/env node /*! * This is a...
Create tests for JavaScript parser.
Create tests for JavaScript parser.
Python
apache-2.0
eddieantonio/ad-hoc-miner,naturalness/sensibility,naturalness/sensibility,eddieantonio/ad-hoc-miner,naturalness/sensibility,eddieantonio/ad-hoc-miner,eddieantonio/ad-hoc-miner,naturalness/sensibility
Create tests for JavaScript parser.
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import pytest # type: ignore from sensibility.language import Language from sensibility.language.javascript import javascript from sensibility.token_utils import Position from location_factory import LocationFactory test_file = r"""#!/usr/bin/env node /*! * This is a...
<commit_before><commit_msg>Create tests for JavaScript parser.<commit_after>
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import pytest # type: ignore from sensibility.language import Language from sensibility.language.javascript import javascript from sensibility.token_utils import Position from location_factory import LocationFactory test_file = r"""#!/usr/bin/env node /*! * This is a...
Create tests for JavaScript parser.#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import pytest # type: ignore from sensibility.language import Language from sensibility.language.javascript import javascript from sensibility.token_utils import Position from location_factory import LocationFactory test_file = r"""#...
<commit_before><commit_msg>Create tests for JavaScript parser.<commit_after>#!/usr/bin/env python3 # -*- coding: UTF-8 -*- import pytest # type: ignore from sensibility.language import Language from sensibility.language.javascript import javascript from sensibility.token_utils import Position from location_factory ...
09ee7c5972f3a508355f6dfd49ff05d8de482cd9
shs_example.py
shs_example.py
import numpy as np import matplotlib.pyplot as plt import rsf model = rsf.RateState() # Set model initial conditions model.mu0 = 0.6 # Friction initial (at the reference velocity) model.a = 0.005 # Empirical coefficient for the direct effect model.b = 0.01 # Empirical coefficient for the evolution effect model.dc = 1...
Add example of slide-hold-slide test
Add example of slide-hold-slide test
Python
mit
jrleeman/rsfmodel
Add example of slide-hold-slide test
import numpy as np import matplotlib.pyplot as plt import rsf model = rsf.RateState() # Set model initial conditions model.mu0 = 0.6 # Friction initial (at the reference velocity) model.a = 0.005 # Empirical coefficient for the direct effect model.b = 0.01 # Empirical coefficient for the evolution effect model.dc = 1...
<commit_before><commit_msg>Add example of slide-hold-slide test<commit_after>
import numpy as np import matplotlib.pyplot as plt import rsf model = rsf.RateState() # Set model initial conditions model.mu0 = 0.6 # Friction initial (at the reference velocity) model.a = 0.005 # Empirical coefficient for the direct effect model.b = 0.01 # Empirical coefficient for the evolution effect model.dc = 1...
Add example of slide-hold-slide testimport numpy as np import matplotlib.pyplot as plt import rsf model = rsf.RateState() # Set model initial conditions model.mu0 = 0.6 # Friction initial (at the reference velocity) model.a = 0.005 # Empirical coefficient for the direct effect model.b = 0.01 # Empirical coefficient f...
<commit_before><commit_msg>Add example of slide-hold-slide test<commit_after>import numpy as np import matplotlib.pyplot as plt import rsf model = rsf.RateState() # Set model initial conditions model.mu0 = 0.6 # Friction initial (at the reference velocity) model.a = 0.005 # Empirical coefficient for the direct effect...
4f7b103d6c5fa3b07abb23e346caa995a7f803ef
tests/completion.py
tests/completion.py
from _utils import _output_eq, IntegrationSpec class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\na.b.subtask\n") def no_input_with_no_tasks_yields_empty_response(...
import sys from nose.tools import ok_ from _utils import _output_eq, IntegrationSpec, _dispatch, trap, expect_exit class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\n...
Make new test fail correctlyish
Make new test fail correctlyish
Python
bsd-2-clause
mkusz/invoke,kejbaly2/invoke,mkusz/invoke,pyinvoke/invoke,mattrobenolt/invoke,kejbaly2/invoke,tyewang/invoke,frol/invoke,singingwolfboy/invoke,pyinvoke/invoke,frol/invoke,pfmoore/invoke,pfmoore/invoke,mattrobenolt/invoke
from _utils import _output_eq, IntegrationSpec class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\na.b.subtask\n") def no_input_with_no_tasks_yields_empty_response(...
import sys from nose.tools import ok_ from _utils import _output_eq, IntegrationSpec, _dispatch, trap, expect_exit class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\n...
<commit_before>from _utils import _output_eq, IntegrationSpec class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\na.b.subtask\n") def no_input_with_no_tasks_yields_...
import sys from nose.tools import ok_ from _utils import _output_eq, IntegrationSpec, _dispatch, trap, expect_exit class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\n...
from _utils import _output_eq, IntegrationSpec class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\na.b.subtask\n") def no_input_with_no_tasks_yields_empty_response(...
<commit_before>from _utils import _output_eq, IntegrationSpec class ShellCompletion(IntegrationSpec): """ Shell tab-completion behavior """ def no_input_means_just_task_names(self): _output_eq('-c simple_ns_list --complete', "z_toplevel\na.b.subtask\n") def no_input_with_no_tasks_yields_...
661943403b9a4b7c28bf9e0a59ba937dc2298fef
netmiko/ssh_autodetect.py
netmiko/ssh_autodetect.py
""" This module is used to auto-detect the type of a device in order to automatically create a Netmiko connection. The will avoid to hard coding the 'device_type' when using the ConnectHandler factory function from Netmiko. """ from netmiko.ssh_dispatcher import CLASS_MAPPER_BASE, ConnectHandler SSH_MAPPER_BASE = {}...
Add SSH auto detect feature
Add SSH auto detect feature
Python
mit
isidroamv/netmiko,ktbyers/netmiko,fooelisa/netmiko,ktbyers/netmiko,isidroamv/netmiko,fooelisa/netmiko
Add SSH auto detect feature
""" This module is used to auto-detect the type of a device in order to automatically create a Netmiko connection. The will avoid to hard coding the 'device_type' when using the ConnectHandler factory function from Netmiko. """ from netmiko.ssh_dispatcher import CLASS_MAPPER_BASE, ConnectHandler SSH_MAPPER_BASE = {}...
<commit_before><commit_msg>Add SSH auto detect feature<commit_after>
""" This module is used to auto-detect the type of a device in order to automatically create a Netmiko connection. The will avoid to hard coding the 'device_type' when using the ConnectHandler factory function from Netmiko. """ from netmiko.ssh_dispatcher import CLASS_MAPPER_BASE, ConnectHandler SSH_MAPPER_BASE = {}...
Add SSH auto detect feature""" This module is used to auto-detect the type of a device in order to automatically create a Netmiko connection. The will avoid to hard coding the 'device_type' when using the ConnectHandler factory function from Netmiko. """ from netmiko.ssh_dispatcher import CLASS_MAPPER_BASE, ConnectHa...
<commit_before><commit_msg>Add SSH auto detect feature<commit_after>""" This module is used to auto-detect the type of a device in order to automatically create a Netmiko connection. The will avoid to hard coding the 'device_type' when using the ConnectHandler factory function from Netmiko. """ from netmiko.ssh_dispa...
0d32800fec1419eac39711fd8c94ce07896cddaf
sknn/tests/test_gaussian.py
sknn/tests/test_gaussian.py
import unittest from nose.tools import (assert_is_not_none, assert_raises, assert_equal) from sknn.mlp import MultiLayerPerceptronRegressor as MLPR from . import test_linear class TestGaussianOutput(test_linear.TestLinearNetwork): def setUp(self): self.nn = MLPR(layers=[("LinearGaussian",)])
Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.
Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.
Python
bsd-3-clause
gticket/scikit-neuralnetwork,IndraVikas/scikit-neuralnetwork,capitancambio/scikit-neuralnetwork,agomariz/scikit-neuralnetwork,freakynit/scikit-neuralnetwork,KhanSuleyman/scikit-neuralnetwork,aigamedev/scikit-neuralnetwork
Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.
import unittest from nose.tools import (assert_is_not_none, assert_raises, assert_equal) from sknn.mlp import MultiLayerPerceptronRegressor as MLPR from . import test_linear class TestGaussianOutput(test_linear.TestLinearNetwork): def setUp(self): self.nn = MLPR(layers=[("LinearGaussian",)])
<commit_before><commit_msg>Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.<commit_after>
import unittest from nose.tools import (assert_is_not_none, assert_raises, assert_equal) from sknn.mlp import MultiLayerPerceptronRegressor as MLPR from . import test_linear class TestGaussianOutput(test_linear.TestLinearNetwork): def setUp(self): self.nn = MLPR(layers=[("LinearGaussian",)])
Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.import unittest from nose.tools import (assert_is_not_none, assert_raises, assert_equal) from sknn.mlp import MultiLayerPerceptronRegressor as MLPR from . import test_linear class TestGaussianOutput(test_linear...
<commit_before><commit_msg>Test for the gaussian output layer, going through all same fit() and predict() tests as the linear output.<commit_after>import unittest from nose.tools import (assert_is_not_none, assert_raises, assert_equal) from sknn.mlp import MultiLayerPerceptronRegressor as MLPR from . import test_line...
74ffdab0c54f332b8787aea04582ee7312a34b4c
src/ggrc/migrations/versions/20161123124848_1f5c3e0025da_remove_control_id_column_from_.py
src/ggrc/migrations/versions/20161123124848_1f5c3e0025da_remove_control_id_column_from_.py
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Remove control_id column from assessments table Create Date: 2016-11-23 12:48:48.942528 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name...
Remove control_id column from assessments table
Remove control_id column from assessments table
Python
apache-2.0
selahssea/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,andrei-karalionak/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,andrei-karalionak/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,se...
Remove control_id column from assessments table
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Remove control_id column from assessments table Create Date: 2016-11-23 12:48:48.942528 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name...
<commit_before><commit_msg>Remove control_id column from assessments table<commit_after>
# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Remove control_id column from assessments table Create Date: 2016-11-23 12:48:48.942528 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name...
Remove control_id column from assessments table# Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Remove control_id column from assessments table Create Date: 2016-11-23 12:48:48.942528 """ # disable Invalid constant name pylint warning for mandatory Al...
<commit_before><commit_msg>Remove control_id column from assessments table<commit_after># Copyright (C) 2016 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Remove control_id column from assessments table Create Date: 2016-11-23 12:48:48.942528 """ # disable Invalid cons...
372bd768acae6fbf425271b193d1734e5001c71a
4/Solution.py
4/Solution.py
class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ nums1.extend(nums2) merged = sorted(nums1) length = len(merged) if length % 2 != 0: return ...
Add initial working solution 4
Add initial working solution 4
Python
mit
xliiauo/leetcode,xliiauo/leetcode,xiao0720/leetcode,xliiauo/leetcode,xiao0720/leetcode
Add initial working solution 4
class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ nums1.extend(nums2) merged = sorted(nums1) length = len(merged) if length % 2 != 0: return ...
<commit_before><commit_msg>Add initial working solution 4<commit_after>
class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ nums1.extend(nums2) merged = sorted(nums1) length = len(merged) if length % 2 != 0: return ...
Add initial working solution 4class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ nums1.extend(nums2) merged = sorted(nums1) length = len(merged) if length...
<commit_before><commit_msg>Add initial working solution 4<commit_after>class Solution(object): def findMedianSortedArrays(self, nums1, nums2): """ :type nums1: List[int] :type nums2: List[int] :rtype: float """ nums1.extend(nums2) merged = sorted(nums1) ...
b66ad576230fb7c96a8f5c6c7b6af8a8e4c8d0b5
vmf/games/source.py
vmf/games/source.py
""" Helper classes for creating maps in any Source Engine game. """ from vmf.vmf import Entity from vmf.types import Origin class LogicAuto(Entity): """Sets up certain game logic. Fires some useful map events. https://developer.valvesoftware.com/wiki/Logic_auto """ def __init__(self): ...
Add module for Source Engine game logic entities
Add module for Source Engine game logic entities
Python
bsd-2-clause
BHSPitMonkey/vmflib
Add module for Source Engine game logic entities
""" Helper classes for creating maps in any Source Engine game. """ from vmf.vmf import Entity from vmf.types import Origin class LogicAuto(Entity): """Sets up certain game logic. Fires some useful map events. https://developer.valvesoftware.com/wiki/Logic_auto """ def __init__(self): ...
<commit_before><commit_msg>Add module for Source Engine game logic entities<commit_after>
""" Helper classes for creating maps in any Source Engine game. """ from vmf.vmf import Entity from vmf.types import Origin class LogicAuto(Entity): """Sets up certain game logic. Fires some useful map events. https://developer.valvesoftware.com/wiki/Logic_auto """ def __init__(self): ...
Add module for Source Engine game logic entities""" Helper classes for creating maps in any Source Engine game. """ from vmf.vmf import Entity from vmf.types import Origin class LogicAuto(Entity): """Sets up certain game logic. Fires some useful map events. https://developer.valvesoftware.com/wiki/Log...
<commit_before><commit_msg>Add module for Source Engine game logic entities<commit_after>""" Helper classes for creating maps in any Source Engine game. """ from vmf.vmf import Entity from vmf.types import Origin class LogicAuto(Entity): """Sets up certain game logic. Fires some useful map events. htt...
a9388f7d4c4747e6710d20d618b57f19360cb69c
tests/adapters/compliance_tests/remove_vlan_test.py
tests/adapters/compliance_tests/remove_vlan_test.py
# Copyright 2019 Internap. # # 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, so...
Add remove vlan compliance test
Add remove vlan compliance test
Python
apache-2.0
lindycoder/netman,internaphosting/netman,internap/netman
Add remove vlan compliance test
# Copyright 2019 Internap. # # 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, so...
<commit_before><commit_msg>Add remove vlan compliance test<commit_after>
# Copyright 2019 Internap. # # 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, so...
Add remove vlan compliance test# Copyright 2019 Internap. # # 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 ...
<commit_before><commit_msg>Add remove vlan compliance test<commit_after># Copyright 2019 Internap. # # 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/LICEN...
9ffe40aaf5ece521020258c4b31fbdb514e02b69
manager/utilities.py
manager/utilities.py
from typing import Optional from manager.models import Package, Build def get_latest_build(package: Package) -> Optional[Build]: try: return Build.objects.filter(package=package, status=Build.SUCCESS).order_by('-id')[0] except IndexError: return None
Add utility function for get latest Build
Add utility function for get latest Build
Python
mit
colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager,colajam93/aurpackager
Add utility function for get latest Build
from typing import Optional from manager.models import Package, Build def get_latest_build(package: Package) -> Optional[Build]: try: return Build.objects.filter(package=package, status=Build.SUCCESS).order_by('-id')[0] except IndexError: return None
<commit_before><commit_msg>Add utility function for get latest Build<commit_after>
from typing import Optional from manager.models import Package, Build def get_latest_build(package: Package) -> Optional[Build]: try: return Build.objects.filter(package=package, status=Build.SUCCESS).order_by('-id')[0] except IndexError: return None
Add utility function for get latest Buildfrom typing import Optional from manager.models import Package, Build def get_latest_build(package: Package) -> Optional[Build]: try: return Build.objects.filter(package=package, status=Build.SUCCESS).order_by('-id')[0] except IndexError: return None
<commit_before><commit_msg>Add utility function for get latest Build<commit_after>from typing import Optional from manager.models import Package, Build def get_latest_build(package: Package) -> Optional[Build]: try: return Build.objects.filter(package=package, status=Build.SUCCESS).order_by('-id')[0] ...
0b55d97573fcd196a318b3c901f6dcac1b0a4eef
chrome/test/functional/test_basic.py
chrome/test/functional/test_basic.py
#!/usr/bin/python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from pyauto import PyUITest class SimpleTest(PyUITest): def testCanOpenGoogle(self): self.NavigateToURL("http...
Create a placeholder for pyauto test scripts.
Create a placeholder for pyauto test scripts. Including a hello world script. Review URL: http://codereview.chromium.org/668004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
ropik/chromium,adobe/chromium,ropik/chromium,gavinp/chromium,yitian134/chromium,adobe/chromium,adobe/chromium,ropik/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,gavinp/chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromium,Crystalnix/house-of-life-chromi...
Create a placeholder for pyauto test scripts. Including a hello world script. Review URL: http://codereview.chromium.org/668004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98
#!/usr/bin/python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from pyauto import PyUITest class SimpleTest(PyUITest): def testCanOpenGoogle(self): self.NavigateToURL("http...
<commit_before><commit_msg>Create a placeholder for pyauto test scripts. Including a hello world script. Review URL: http://codereview.chromium.org/668004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>
#!/usr/bin/python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. import unittest from pyauto import PyUITest class SimpleTest(PyUITest): def testCanOpenGoogle(self): self.NavigateToURL("http...
Create a placeholder for pyauto test scripts. Including a hello world script. Review URL: http://codereview.chromium.org/668004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98#!/usr/bin/python # Copyright (c) 2010 The Chromium Authors. All rights reserved. # Use of thi...
<commit_before><commit_msg>Create a placeholder for pyauto test scripts. Including a hello world script. Review URL: http://codereview.chromium.org/668004 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@40579 0039d316-1c4b-4281-b951-d872f2087c98<commit_after>#!/usr/bin/python # Copyright (c) 2010 The Chromium A...
6906f574fad033f0b68fe7a5a35f4fcef1207ee0
Get_Webpage_Source.py
Get_Webpage_Source.py
import sublime import sublime_plugin import urllib class GetWebpageSourceCommand(sublime_plugin.TextCommand): def run(self, edit): url = self.view.substr(self.view.sel()[0]) if len(url) == 0: return output = "" r = urllib.request.urlopen(url) output = str(r.read(), encoding='utf8') ...
Load the source from a highlighted URL into a new window
Load the source from a highlighted URL into a new window
Python
mit
RichardHyde/SublimeText.Packages
Load the source from a highlighted URL into a new window
import sublime import sublime_plugin import urllib class GetWebpageSourceCommand(sublime_plugin.TextCommand): def run(self, edit): url = self.view.substr(self.view.sel()[0]) if len(url) == 0: return output = "" r = urllib.request.urlopen(url) output = str(r.read(), encoding='utf8') ...
<commit_before><commit_msg>Load the source from a highlighted URL into a new window<commit_after>
import sublime import sublime_plugin import urllib class GetWebpageSourceCommand(sublime_plugin.TextCommand): def run(self, edit): url = self.view.substr(self.view.sel()[0]) if len(url) == 0: return output = "" r = urllib.request.urlopen(url) output = str(r.read(), encoding='utf8') ...
Load the source from a highlighted URL into a new windowimport sublime import sublime_plugin import urllib class GetWebpageSourceCommand(sublime_plugin.TextCommand): def run(self, edit): url = self.view.substr(self.view.sel()[0]) if len(url) == 0: return output = "" r = urllib.request.urlope...
<commit_before><commit_msg>Load the source from a highlighted URL into a new window<commit_after>import sublime import sublime_plugin import urllib class GetWebpageSourceCommand(sublime_plugin.TextCommand): def run(self, edit): url = self.view.substr(self.view.sel()[0]) if len(url) == 0: return o...
93d80604003e1b3b21498df01f7647e7cea69a5f
cybox/test/objects/win_event_test.py
cybox/test/objects/win_event_test.py
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_event_object import WinEvent from cybox.test.objects import ObjectTestCase class TestWinThread(ObjectTestCase, unittest.TestCase): object_type = "WindowsEventObjectType"...
Add basic WinEvent object tests.
Add basic WinEvent object tests.
Python
bsd-3-clause
CybOXProject/python-cybox
Add basic WinEvent object tests.
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_event_object import WinEvent from cybox.test.objects import ObjectTestCase class TestWinThread(ObjectTestCase, unittest.TestCase): object_type = "WindowsEventObjectType"...
<commit_before><commit_msg>Add basic WinEvent object tests.<commit_after>
# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_event_object import WinEvent from cybox.test.objects import ObjectTestCase class TestWinThread(ObjectTestCase, unittest.TestCase): object_type = "WindowsEventObjectType"...
Add basic WinEvent object tests.# Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_event_object import WinEvent from cybox.test.objects import ObjectTestCase class TestWinThread(ObjectTestCase, unittest.TestCase): object...
<commit_before><commit_msg>Add basic WinEvent object tests.<commit_after># Copyright (c) 2015, The MITRE Corporation. All rights reserved. # See LICENSE.txt for complete terms. import unittest from cybox.objects.win_event_object import WinEvent from cybox.test.objects import ObjectTestCase class TestWinThread(Objec...
89d4c1420805a6f2e491f1ab250722cdcf950bd8
ndtable/engine/mv.py
ndtable/engine/mv.py
import sys import time import numpy as np from minivect import miniast from minivect import specializers from minivect import minitypes from minivect.ctypes_conversion import get_data_pointer, \ get_pointer, convert_to_ctypes from ndtable.datashape.coretypes import var_generator from ndtable.expr.visitor import ...
Work towards integration NDTable <-> Minivect
Work towards integration NDTable <-> Minivect
Python
bsd-2-clause
seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core,seibert/blaze-core
Work towards integration NDTable <-> Minivect
import sys import time import numpy as np from minivect import miniast from minivect import specializers from minivect import minitypes from minivect.ctypes_conversion import get_data_pointer, \ get_pointer, convert_to_ctypes from ndtable.datashape.coretypes import var_generator from ndtable.expr.visitor import ...
<commit_before><commit_msg>Work towards integration NDTable <-> Minivect<commit_after>
import sys import time import numpy as np from minivect import miniast from minivect import specializers from minivect import minitypes from minivect.ctypes_conversion import get_data_pointer, \ get_pointer, convert_to_ctypes from ndtable.datashape.coretypes import var_generator from ndtable.expr.visitor import ...
Work towards integration NDTable <-> Minivectimport sys import time import numpy as np from minivect import miniast from minivect import specializers from minivect import minitypes from minivect.ctypes_conversion import get_data_pointer, \ get_pointer, convert_to_ctypes from ndtable.datashape.coretypes import var...
<commit_before><commit_msg>Work towards integration NDTable <-> Minivect<commit_after>import sys import time import numpy as np from minivect import miniast from minivect import specializers from minivect import minitypes from minivect.ctypes_conversion import get_data_pointer, \ get_pointer, convert_to_ctypes fr...
1146ab654c8b0d6f982f19bafed91f18edb877f3
tests/rules/test_dirty_unzip.py
tests/rules/test_dirty_unzip.py
import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command @pytest.fixture def zip_error(tmpdir): path = os.path.join(str(tmpdir), 'foo.zip') def reset(path): with zipfile.ZipFile(path, 'w') as archive: ...
Add tests for the `dirty_unzip` rule
Add tests for the `dirty_unzip` rule
Python
mit
gogobebe2/thefuck,bigplus/thefuck,Aeron/thefuck,manashmndl/thefuck,subajat1/thefuck,PLNech/thefuck,princeofdarkness76/thefuck,mcarton/thefuck,lawrencebenson/thefuck,thinkerchan/thefuck,Clpsplug/thefuck,vanita5/thefuck,levythu/thefuck,BertieJim/thefuck,hxddh/thefuck,Clpsplug/thefuck,zhangzhishan/thefuck,barneyElDinosaur...
Add tests for the `dirty_unzip` rule
import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command @pytest.fixture def zip_error(tmpdir): path = os.path.join(str(tmpdir), 'foo.zip') def reset(path): with zipfile.ZipFile(path, 'w') as archive: ...
<commit_before><commit_msg>Add tests for the `dirty_unzip` rule<commit_after>
import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command @pytest.fixture def zip_error(tmpdir): path = os.path.join(str(tmpdir), 'foo.zip') def reset(path): with zipfile.ZipFile(path, 'w') as archive: ...
Add tests for the `dirty_unzip` ruleimport os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command @pytest.fixture def zip_error(tmpdir): path = os.path.join(str(tmpdir), 'foo.zip') def reset(path): with zipfile.ZipFile...
<commit_before><commit_msg>Add tests for the `dirty_unzip` rule<commit_after>import os import pytest import zipfile from thefuck.rules.dirty_unzip import match, get_new_command, side_effect from tests.utils import Command @pytest.fixture def zip_error(tmpdir): path = os.path.join(str(tmpdir), 'foo.zip') def ...
0749111442c638569b6e42a11adee70e71e50813
test/lldbpexpect.py
test/lldbpexpect.py
import lldb from lldbtest import * import lldbutil import os import unittest2 import sys import pexpect class PExpectTest(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) def doTest(self): # put your commands he...
Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this
Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-96231b3b80d8
Python
apache-2.0
llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb
Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-96231b3b80d8
import lldb from lldbtest import * import lldbutil import os import unittest2 import sys import pexpect class PExpectTest(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) def doTest(self): # put your commands he...
<commit_before><commit_msg>Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after>
import lldb from lldbtest import * import lldbutil import os import unittest2 import sys import pexpect class PExpectTest(TestBase): mydir = TestBase.compute_mydir(__file__) def setUp(self): # Call super's setUp(). TestBase.setUp(self) def doTest(self): # put your commands he...
Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-96231b3b80d8import lldb from lldbtest import * import lldbutil import os import unitt...
<commit_before><commit_msg>Add an helper class to write pexpect-based test cases Over time, we should improve this class and port all pexpect based testing over to using this git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@227875 91177308-0d34-0410-b5e6-96231b3b80d8<commit_after>import lldb from lldbtest import...
305c3e0ce2705dd23e00ec801f5588ec1dbcc3a8
py/two-sum-ii-input-array-is-sorted.py
py/two-sum-ii-input-array-is-sorted.py
class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ head, tail = 0, len(numbers) - 1 while head < tail: s = numbers[head] + numbers[tail] if s == target: ...
Add py solution for 167. Two Sum II - Input array is sorted
Add py solution for 167. Two Sum II - Input array is sorted 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 167. Two Sum II - Input array is sorted 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/
class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ head, tail = 0, len(numbers) - 1 while head < tail: s = numbers[head] + numbers[tail] if s == target: ...
<commit_before><commit_msg>Add py solution for 167. Two Sum II - Input array is sorted 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/<commit_after>
class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[int] """ head, tail = 0, len(numbers) - 1 while head < tail: s = numbers[head] + numbers[tail] if s == target: ...
Add py solution for 167. Two Sum II - Input array is sorted 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] :type target: int :rtype: List[...
<commit_before><commit_msg>Add py solution for 167. Two Sum II - Input array is sorted 167. Two Sum II - Input array is sorted: https://leetcode.com/problems/two-sum-ii-input-array-is-sorted/<commit_after>class Solution(object): def twoSum(self, numbers, target): """ :type numbers: List[int] ...
f8e24bf955eb70535b989aad6ab8666ddd013da1
tests/test_basic.py
tests/test_basic.py
import pytest import subprocess import os import sys prefix = '.' for i in range(0,3): if os.path.exists(os.path.join(prefix, 'pyiso.py')): sys.path.insert(0, prefix) break else: prefix = '../' + prefix import pyiso def test_nofiles(tmpdir): # First set things up, and generate the...
Add in first py.test tests.
Add in first py.test tests. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>
Python
lgpl-2.1
clalancette/pycdlib,clalancette/pyiso
Add in first py.test tests. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>
import pytest import subprocess import os import sys prefix = '.' for i in range(0,3): if os.path.exists(os.path.join(prefix, 'pyiso.py')): sys.path.insert(0, prefix) break else: prefix = '../' + prefix import pyiso def test_nofiles(tmpdir): # First set things up, and generate the...
<commit_before><commit_msg>Add in first py.test tests. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com><commit_after>
import pytest import subprocess import os import sys prefix = '.' for i in range(0,3): if os.path.exists(os.path.join(prefix, 'pyiso.py')): sys.path.insert(0, prefix) break else: prefix = '../' + prefix import pyiso def test_nofiles(tmpdir): # First set things up, and generate the...
Add in first py.test tests. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com>import pytest import subprocess import os import sys prefix = '.' for i in range(0,3): if os.path.exists(os.path.join(prefix, 'pyiso.py')): sys.path.insert(0, prefix) break else: ...
<commit_before><commit_msg>Add in first py.test tests. Signed-off-by: Chris Lalancette <281cd07d7578d97c83271fbbf2faddb83ab3791c@gmail.com><commit_after>import pytest import subprocess import os import sys prefix = '.' for i in range(0,3): if os.path.exists(os.path.join(prefix, 'pyiso.py')): sys.path.inse...
9c6f0cf829f4f0c7ff71ad65bed36269425dae13
social_core/tests/backends/test_zoom.py
social_core/tests/backends/test_zoom.py
import json from .oauth import OAuth2Test class ZoomOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.zoom.ZoomOAuth2' user_data_url = 'https://api.zoom.us/v2/users/me' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token': 'foobar-token', 'token_type...
Add test for zoom backend
Add test for zoom backend
Python
bsd-3-clause
python-social-auth/social-core,python-social-auth/social-core
Add test for zoom backend
import json from .oauth import OAuth2Test class ZoomOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.zoom.ZoomOAuth2' user_data_url = 'https://api.zoom.us/v2/users/me' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token': 'foobar-token', 'token_type...
<commit_before><commit_msg>Add test for zoom backend<commit_after>
import json from .oauth import OAuth2Test class ZoomOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.zoom.ZoomOAuth2' user_data_url = 'https://api.zoom.us/v2/users/me' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token': 'foobar-token', 'token_type...
Add test for zoom backendimport json from .oauth import OAuth2Test class ZoomOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.zoom.ZoomOAuth2' user_data_url = 'https://api.zoom.us/v2/users/me' expected_username = 'foobar' access_token_body = json.dumps({ 'access_token': 'foobar-to...
<commit_before><commit_msg>Add test for zoom backend<commit_after>import json from .oauth import OAuth2Test class ZoomOAuth2Test(OAuth2Test): backend_path = 'social_core.backends.zoom.ZoomOAuth2' user_data_url = 'https://api.zoom.us/v2/users/me' expected_username = 'foobar' access_token_body = json.d...
6824c741c455339eaaff5481f6e84c42fe1e26cf
susanplay/mainSusan.py
susanplay/mainSusan.py
""" This is a template top level script. Please don't edit this file. Instead, copy it to youname_main.py, then run and edit that file. """ import dave.pipeline.pipeline as dpp import dave.pipeline.clipboard as clipboard def main(): """A bare bones main program""" cfg = loadMyConfiguration() epicList ...
Copy of main.py from fergal, reworked
Copy of main.py from fergal, reworked
Python
mit
barentsen/dave,barentsen/dave,barentsen/dave,barentsen/dave
Copy of main.py from fergal, reworked
""" This is a template top level script. Please don't edit this file. Instead, copy it to youname_main.py, then run and edit that file. """ import dave.pipeline.pipeline as dpp import dave.pipeline.clipboard as clipboard def main(): """A bare bones main program""" cfg = loadMyConfiguration() epicList ...
<commit_before><commit_msg>Copy of main.py from fergal, reworked<commit_after>
""" This is a template top level script. Please don't edit this file. Instead, copy it to youname_main.py, then run and edit that file. """ import dave.pipeline.pipeline as dpp import dave.pipeline.clipboard as clipboard def main(): """A bare bones main program""" cfg = loadMyConfiguration() epicList ...
Copy of main.py from fergal, reworked """ This is a template top level script. Please don't edit this file. Instead, copy it to youname_main.py, then run and edit that file. """ import dave.pipeline.pipeline as dpp import dave.pipeline.clipboard as clipboard def main(): """A bare bones main program""" cfg =...
<commit_before><commit_msg>Copy of main.py from fergal, reworked<commit_after> """ This is a template top level script. Please don't edit this file. Instead, copy it to youname_main.py, then run and edit that file. """ import dave.pipeline.pipeline as dpp import dave.pipeline.clipboard as clipboard def main(): ...
a4a956899008102b993d2268fbf6ae92d191ee6a
ifttt/ifttt-tests.py
ifttt/ifttt-tests.py
# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 Ori Livneh <ori@wikimedia.org> Stephen LaPorte <stephen.laporte@gmail.com> Alangi Derick <alangiderick@gmail.com> Licensed under the Apache License, Version 2.0 (the "License");...
Test suite for Wikipedia triggers
Test suite for Wikipedia triggers * This marks the start of the test cases for Wikipedia IFTTT triggers.
Python
apache-2.0
ch3nkula/ifttt,ch3nkula/ifttt,ch3nkula/ifttt
Test suite for Wikipedia triggers * This marks the start of the test cases for Wikipedia IFTTT triggers.
# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 Ori Livneh <ori@wikimedia.org> Stephen LaPorte <stephen.laporte@gmail.com> Alangi Derick <alangiderick@gmail.com> Licensed under the Apache License, Version 2.0 (the "License");...
<commit_before><commit_msg>Test suite for Wikipedia triggers * This marks the start of the test cases for Wikipedia IFTTT triggers.<commit_after>
# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 Ori Livneh <ori@wikimedia.org> Stephen LaPorte <stephen.laporte@gmail.com> Alangi Derick <alangiderick@gmail.com> Licensed under the Apache License, Version 2.0 (the "License");...
Test suite for Wikipedia triggers * This marks the start of the test cases for Wikipedia IFTTT triggers.# -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 Ori Livneh <ori@wikimedia.org> Stephen LaPorte <stephen.laporte@gmail.com> ...
<commit_before><commit_msg>Test suite for Wikipedia triggers * This marks the start of the test cases for Wikipedia IFTTT triggers.<commit_after># -*- coding: utf-8 -*- """ Wikipedia channel for IFTTT ~~~~~~~~~~~~~~~~~~~~~~~~~~~ Copyright 2015 Ori Livneh <ori@wikimedia.org> Stephen LaPorte <s...
4a8c3043962efa7e2a443a10a0ad13d025699730
support/get_lsf_job_info.py
support/get_lsf_job_info.py
import os import sys from subprocess import Popen, PIPE # -------------------------------------------------------------------------------------------------- def get_job_run_time(lsf_output_file, time='s'): """ """ fp = open(lsf_output_file, 'r') process = Popen(['grep', 'Run time', lsf_output_file], stdin=PIPE, ...
Add script to extract useful lsf job information
Add script to extract useful lsf job information
Python
apache-2.0
Rfam/rfam-production,Rfam/rfam-production,Rfam/rfam-production
Add script to extract useful lsf job information
import os import sys from subprocess import Popen, PIPE # -------------------------------------------------------------------------------------------------- def get_job_run_time(lsf_output_file, time='s'): """ """ fp = open(lsf_output_file, 'r') process = Popen(['grep', 'Run time', lsf_output_file], stdin=PIPE, ...
<commit_before><commit_msg>Add script to extract useful lsf job information<commit_after>
import os import sys from subprocess import Popen, PIPE # -------------------------------------------------------------------------------------------------- def get_job_run_time(lsf_output_file, time='s'): """ """ fp = open(lsf_output_file, 'r') process = Popen(['grep', 'Run time', lsf_output_file], stdin=PIPE, ...
Add script to extract useful lsf job informationimport os import sys from subprocess import Popen, PIPE # -------------------------------------------------------------------------------------------------- def get_job_run_time(lsf_output_file, time='s'): """ """ fp = open(lsf_output_file, 'r') process = Popen(['g...
<commit_before><commit_msg>Add script to extract useful lsf job information<commit_after>import os import sys from subprocess import Popen, PIPE # -------------------------------------------------------------------------------------------------- def get_job_run_time(lsf_output_file, time='s'): """ """ fp = open(l...
52d947daa8ea6642472660d0c16c2b05e34bea41
src/users/migrations/0010_cocrecord.py
src/users/migrations/0010_cocrecord.py
# Generated by Django 3.0.2 on 2020-02-23 11:12 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0009_auto_20160227_1656'), ] operations = [...
Add migration file for the model of CoC record
Add migration file for the model of CoC record
Python
mit
pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016,pycontw/pycontw2016
Add migration file for the model of CoC record
# Generated by Django 3.0.2 on 2020-02-23 11:12 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0009_auto_20160227_1656'), ] operations = [...
<commit_before><commit_msg>Add migration file for the model of CoC record<commit_after>
# Generated by Django 3.0.2 on 2020-02-23 11:12 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0009_auto_20160227_1656'), ] operations = [...
Add migration file for the model of CoC record# Generated by Django 3.0.2 on 2020-02-23 11:12 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): dependencies = [ ('users', '0009_a...
<commit_before><commit_msg>Add migration file for the model of CoC record<commit_after># Generated by Django 3.0.2 on 2020-02-23 11:12 from django.conf import settings import django.core.validators from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): d...
b7bc68872a45396358ce20a215e3a3a2c3734b8a
py3status/modules/pretend_ram.py
py3status/modules/pretend_ram.py
# -*- coding: utf-8 -*- from __future__ import division import random class Py3status: """ """ format = "{bar}" thresholds = [(0, "good"), (40, "degraded"), (75, "bad")] cache_timeout = 1 middle_char = '|' middle_color = None left_char = '|' left_color = None right_char = '|' ...
Add pretend ram module to try out the progress bar
Add pretend ram module to try out the progress bar
Python
bsd-3-clause
guiniol/py3status,guiniol/py3status
Add pretend ram module to try out the progress bar
# -*- coding: utf-8 -*- from __future__ import division import random class Py3status: """ """ format = "{bar}" thresholds = [(0, "good"), (40, "degraded"), (75, "bad")] cache_timeout = 1 middle_char = '|' middle_color = None left_char = '|' left_color = None right_char = '|' ...
<commit_before><commit_msg>Add pretend ram module to try out the progress bar<commit_after>
# -*- coding: utf-8 -*- from __future__ import division import random class Py3status: """ """ format = "{bar}" thresholds = [(0, "good"), (40, "degraded"), (75, "bad")] cache_timeout = 1 middle_char = '|' middle_color = None left_char = '|' left_color = None right_char = '|' ...
Add pretend ram module to try out the progress bar# -*- coding: utf-8 -*- from __future__ import division import random class Py3status: """ """ format = "{bar}" thresholds = [(0, "good"), (40, "degraded"), (75, "bad")] cache_timeout = 1 middle_char = '|' middle_color = None left_char...
<commit_before><commit_msg>Add pretend ram module to try out the progress bar<commit_after># -*- coding: utf-8 -*- from __future__ import division import random class Py3status: """ """ format = "{bar}" thresholds = [(0, "good"), (40, "degraded"), (75, "bad")] cache_timeout = 1 middle_char = ...
abc155280052ab2f216342acd7933db3e090d94e
test/test_export_flow.py
test/test_export_flow.py
import netlib.tutils from libmproxy import flow_export from . import tutils req_get = netlib.tutils.treq( method='GET', headers=None, content=None, ) req_post = netlib.tutils.treq( method='POST', headers=None, ) def test_request_simple(): flow = tutils.tflow(req=req_get) assert flow_expo...
Add some basic tests for flow_exports
Add some basic tests for flow_exports
Python
mit
mitmproxy/mitmproxy,StevenVanAcker/mitmproxy,mitmproxy/mitmproxy,xaxa89/mitmproxy,zlorb/mitmproxy,dwfreed/mitmproxy,dwfreed/mitmproxy,ddworken/mitmproxy,jvillacorta/mitmproxy,ddworken/mitmproxy,mhils/mitmproxy,mhils/mitmproxy,mitmproxy/mitmproxy,gzzhanghao/mitmproxy,laurmurclar/mitmproxy,ddworken/mitmproxy,mosajjal/mit...
Add some basic tests for flow_exports
import netlib.tutils from libmproxy import flow_export from . import tutils req_get = netlib.tutils.treq( method='GET', headers=None, content=None, ) req_post = netlib.tutils.treq( method='POST', headers=None, ) def test_request_simple(): flow = tutils.tflow(req=req_get) assert flow_expo...
<commit_before><commit_msg>Add some basic tests for flow_exports<commit_after>
import netlib.tutils from libmproxy import flow_export from . import tutils req_get = netlib.tutils.treq( method='GET', headers=None, content=None, ) req_post = netlib.tutils.treq( method='POST', headers=None, ) def test_request_simple(): flow = tutils.tflow(req=req_get) assert flow_expo...
Add some basic tests for flow_exportsimport netlib.tutils from libmproxy import flow_export from . import tutils req_get = netlib.tutils.treq( method='GET', headers=None, content=None, ) req_post = netlib.tutils.treq( method='POST', headers=None, ) def test_request_simple(): flow = tutils.tf...
<commit_before><commit_msg>Add some basic tests for flow_exports<commit_after>import netlib.tutils from libmproxy import flow_export from . import tutils req_get = netlib.tutils.treq( method='GET', headers=None, content=None, ) req_post = netlib.tutils.treq( method='POST', headers=None, ) def te...
5c0ef34788202abefbc36f80899f9b9b54ba17be
fabfile.py
fabfile.py
# -*- coding: utf-8 -* """ Simple fabric file to test oinspect output """ from __future__ import print_function import webbrowser import oinspect.sphinxify as oi def test_basic(): """Test with an empty context""" docstring = 'A test' content = oi.sphinxify(docstring, oi.generate_context()) page_nam...
Add a fabric file to test the generated output
Add a fabric file to test the generated output
Python
bsd-3-clause
spyder-ide/docrepr,spyder-ide/docrepr,techtonik/docrepr,spyder-ide/docrepr,techtonik/docrepr,techtonik/docrepr
Add a fabric file to test the generated output
# -*- coding: utf-8 -* """ Simple fabric file to test oinspect output """ from __future__ import print_function import webbrowser import oinspect.sphinxify as oi def test_basic(): """Test with an empty context""" docstring = 'A test' content = oi.sphinxify(docstring, oi.generate_context()) page_nam...
<commit_before><commit_msg>Add a fabric file to test the generated output<commit_after>
# -*- coding: utf-8 -* """ Simple fabric file to test oinspect output """ from __future__ import print_function import webbrowser import oinspect.sphinxify as oi def test_basic(): """Test with an empty context""" docstring = 'A test' content = oi.sphinxify(docstring, oi.generate_context()) page_nam...
Add a fabric file to test the generated output# -*- coding: utf-8 -* """ Simple fabric file to test oinspect output """ from __future__ import print_function import webbrowser import oinspect.sphinxify as oi def test_basic(): """Test with an empty context""" docstring = 'A test' content = oi.sphinxify(...
<commit_before><commit_msg>Add a fabric file to test the generated output<commit_after># -*- coding: utf-8 -* """ Simple fabric file to test oinspect output """ from __future__ import print_function import webbrowser import oinspect.sphinxify as oi def test_basic(): """Test with an empty context""" docstri...
c5da3ee962a05c05d55fd98149c1095a57f03e36
test/shots/test_task_types_for_shot.py
test/shots/test_task_types_for_shot.py
from test.base import ApiDBTestCase class ShotTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(ShotTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_type() self.generate_fixture_sequ...
Add tests for task types for shot route
Add tests for task types for shot route
Python
agpl-3.0
cgwire/zou
Add tests for task types for shot route
from test.base import ApiDBTestCase class ShotTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(ShotTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_type() self.generate_fixture_sequ...
<commit_before><commit_msg>Add tests for task types for shot route<commit_after>
from test.base import ApiDBTestCase class ShotTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(ShotTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_type() self.generate_fixture_sequ...
Add tests for task types for shot routefrom test.base import ApiDBTestCase class ShotTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(ShotTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project() self.generate_fixture_entity_ty...
<commit_before><commit_msg>Add tests for task types for shot route<commit_after>from test.base import ApiDBTestCase class ShotTaskTypesTestCase(ApiDBTestCase): def setUp(self): super(ShotTaskTypesTestCase, self).setUp() self.generate_fixture_project_status() self.generate_fixture_project(...
0942d2ccf68b88db2616f9839c1ca1ebfacb8ad9
migration/versions/013_dataset_serp.py
migration/versions/013_dataset_serp.py
from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine dataset = Table('dataset', meta, autoload=True) serp_title = Column('serp_title', Unicode()) serp_title.create(dataset) serp_teaser = Column('serp_teaser', Unicode()) serp...
Migrate in domain model changes
Migrate in domain model changes
Python
agpl-3.0
johnjohndoe/spendb,CivicVision/datahub,USStateDept/FPA_Core,USStateDept/FPA_Core,spendb/spendb,openspending/spendb,pudo/spendb,johnjohndoe/spendb,nathanhilbert/FPA_Core,spendb/spendb,nathanhilbert/FPA_Core,CivicVision/datahub,spendb/spendb,nathanhilbert/FPA_Core,CivicVision/datahub,openspending/spendb,openspending/spen...
Migrate in domain model changes
from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine dataset = Table('dataset', meta, autoload=True) serp_title = Column('serp_title', Unicode()) serp_title.create(dataset) serp_teaser = Column('serp_teaser', Unicode()) serp...
<commit_before><commit_msg>Migrate in domain model changes <commit_after>
from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine dataset = Table('dataset', meta, autoload=True) serp_title = Column('serp_title', Unicode()) serp_title.create(dataset) serp_teaser = Column('serp_teaser', Unicode()) serp...
Migrate in domain model changes from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine dataset = Table('dataset', meta, autoload=True) serp_title = Column('serp_title', Unicode()) serp_title.create(dataset) serp_teaser = Column('s...
<commit_before><commit_msg>Migrate in domain model changes <commit_after>from sqlalchemy import * from migrate import * meta = MetaData() def upgrade(migrate_engine): meta.bind = migrate_engine dataset = Table('dataset', meta, autoload=True) serp_title = Column('serp_title', Unicode()) serp_title.cre...
51faed84f4d56fe3455a6568bdadbc9b16196175
day5-1.py
day5-1.py
"""Module to find the passowrd on a bunny door.""" import hashlib def main(): """Run the main function.""" id = 'cxdnnyjw' password = [] begin = '00000' index = 0 while len(password) < 8: test = id + str(index) if begin == hashlib.md5(test).hexdigest()[0:5]: pass...
Add day 5 part 1.
Add day 5 part 1.
Python
mit
SayWhat1/adventofcode2016
Add day 5 part 1.
"""Module to find the passowrd on a bunny door.""" import hashlib def main(): """Run the main function.""" id = 'cxdnnyjw' password = [] begin = '00000' index = 0 while len(password) < 8: test = id + str(index) if begin == hashlib.md5(test).hexdigest()[0:5]: pass...
<commit_before><commit_msg>Add day 5 part 1.<commit_after>
"""Module to find the passowrd on a bunny door.""" import hashlib def main(): """Run the main function.""" id = 'cxdnnyjw' password = [] begin = '00000' index = 0 while len(password) < 8: test = id + str(index) if begin == hashlib.md5(test).hexdigest()[0:5]: pass...
Add day 5 part 1."""Module to find the passowrd on a bunny door.""" import hashlib def main(): """Run the main function.""" id = 'cxdnnyjw' password = [] begin = '00000' index = 0 while len(password) < 8: test = id + str(index) if begin == hashlib.md5(test).hexdigest()[0:5]:...
<commit_before><commit_msg>Add day 5 part 1.<commit_after>"""Module to find the passowrd on a bunny door.""" import hashlib def main(): """Run the main function.""" id = 'cxdnnyjw' password = [] begin = '00000' index = 0 while len(password) < 8: test = id + str(index) if beg...
76ccb3e14da170000c8071203e931eeb8bc7c642
tests/test_deepcopy.py
tests/test_deepcopy.py
from tests.models import ( Cat, Location, ) import copy from rest_framework.test import APITestCase class DeepcopyTestCase(APITestCase): def test_cat(self): home = Location(name='Home', blob='ILUVU') papa = Cat(name='Papa') kitkat = Cat(name='KitKat', home=home, parent=papa) ...
Add a test case for deepcopy
Add a test case for deepcopy
Python
mit
AltSchool/dynamic-rest-client
Add a test case for deepcopy
from tests.models import ( Cat, Location, ) import copy from rest_framework.test import APITestCase class DeepcopyTestCase(APITestCase): def test_cat(self): home = Location(name='Home', blob='ILUVU') papa = Cat(name='Papa') kitkat = Cat(name='KitKat', home=home, parent=papa) ...
<commit_before><commit_msg>Add a test case for deepcopy<commit_after>
from tests.models import ( Cat, Location, ) import copy from rest_framework.test import APITestCase class DeepcopyTestCase(APITestCase): def test_cat(self): home = Location(name='Home', blob='ILUVU') papa = Cat(name='Papa') kitkat = Cat(name='KitKat', home=home, parent=papa) ...
Add a test case for deepcopyfrom tests.models import ( Cat, Location, ) import copy from rest_framework.test import APITestCase class DeepcopyTestCase(APITestCase): def test_cat(self): home = Location(name='Home', blob='ILUVU') papa = Cat(name='Papa') kitkat = Cat(name='KitKat', h...
<commit_before><commit_msg>Add a test case for deepcopy<commit_after>from tests.models import ( Cat, Location, ) import copy from rest_framework.test import APITestCase class DeepcopyTestCase(APITestCase): def test_cat(self): home = Location(name='Home', blob='ILUVU') papa = Cat(name='Pap...
47d770c6008116dd72c6c6b4572a0a92faa39e66
test/test_update.py
test/test_update.py
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import logging basedir = os.path.realpath('..') if basedir not in sys.path: sys.path.append(basedir) import update as up # logging LOGFORMAT_STDOUT = { logging.DEBUG: '%(module)s:%(funcName)s:%(lineno)s - ' '%(levelname)-...
Add test file for update.py
Add test file for update.py
Python
mit
CristianCantoro/sbntoolkit,CristianCantoro/sbntoolkit
Add test file for update.py
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import logging basedir = os.path.realpath('..') if basedir not in sys.path: sys.path.append(basedir) import update as up # logging LOGFORMAT_STDOUT = { logging.DEBUG: '%(module)s:%(funcName)s:%(lineno)s - ' '%(levelname)-...
<commit_before><commit_msg>Add test file for update.py<commit_after>
#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import logging basedir = os.path.realpath('..') if basedir not in sys.path: sys.path.append(basedir) import update as up # logging LOGFORMAT_STDOUT = { logging.DEBUG: '%(module)s:%(funcName)s:%(lineno)s - ' '%(levelname)-...
Add test file for update.py#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import logging basedir = os.path.realpath('..') if basedir not in sys.path: sys.path.append(basedir) import update as up # logging LOGFORMAT_STDOUT = { logging.DEBUG: '%(module)s:%(funcName)s:%(lineno)s - ' ...
<commit_before><commit_msg>Add test file for update.py<commit_after>#! /usr/bin/env python # -*- coding: utf-8 -*- import os import sys import logging basedir = os.path.realpath('..') if basedir not in sys.path: sys.path.append(basedir) import update as up # logging LOGFORMAT_STDOUT = { logging.DEBUG: '%(mo...
97b933815dcbc179e25bc9c1c16cfa1153036ae1
performance_tests/epsilon_convolution.py
performance_tests/epsilon_convolution.py
#!/usr/bin/python3 ''' Convolution ''' from __future__ import print_function import numpy as np import cProfile import random import matplotlib.pyplot as plt def eps(s, t_membran): return np.exp(-s / t_membran) def small_spiketrain(): # 1000 timesteps # With 10 random spikes s = np.array([0]*1000) ...
Add performance test for epsilon convolution
Add performance test for epsilon convolution
Python
bsd-2-clause
timqian/neurons,johannesmik/neurons
Add performance test for epsilon convolution
#!/usr/bin/python3 ''' Convolution ''' from __future__ import print_function import numpy as np import cProfile import random import matplotlib.pyplot as plt def eps(s, t_membran): return np.exp(-s / t_membran) def small_spiketrain(): # 1000 timesteps # With 10 random spikes s = np.array([0]*1000) ...
<commit_before><commit_msg>Add performance test for epsilon convolution<commit_after>
#!/usr/bin/python3 ''' Convolution ''' from __future__ import print_function import numpy as np import cProfile import random import matplotlib.pyplot as plt def eps(s, t_membran): return np.exp(-s / t_membran) def small_spiketrain(): # 1000 timesteps # With 10 random spikes s = np.array([0]*1000) ...
Add performance test for epsilon convolution#!/usr/bin/python3 ''' Convolution ''' from __future__ import print_function import numpy as np import cProfile import random import matplotlib.pyplot as plt def eps(s, t_membran): return np.exp(-s / t_membran) def small_spiketrain(): # 1000 timesteps # With ...
<commit_before><commit_msg>Add performance test for epsilon convolution<commit_after>#!/usr/bin/python3 ''' Convolution ''' from __future__ import print_function import numpy as np import cProfile import random import matplotlib.pyplot as plt def eps(s, t_membran): return np.exp(-s / t_membran) def small_spike...
2e7252fab4667047c04b540040d5ad2287a73299
parrainage/app/management/commands/import_geoloc.py
parrainage/app/management/commands/import_geoloc.py
# Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging import sys from django.core.management.base import BaseCommand from django.db import trans...
Add management command to import geolocation data
Add management command to import geolocation data
Python
mit
rhertzog/parrainage,rhertzog/parrainage,rhertzog/parrainage
Add management command to import geolocation data
# Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging import sys from django.core.management.base import BaseCommand from django.db import trans...
<commit_before><commit_msg>Add management command to import geolocation data<commit_after>
# Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging import sys from django.core.management.base import BaseCommand from django.db import trans...
Add management command to import geolocation data# Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging import sys from django.core.management.ba...
<commit_before><commit_msg>Add management command to import geolocation data<commit_after># Copyright 2017 Raphaël Hertzog # # This file is subject to the license terms in the LICENSE file found in # the top-level directory of this distribution. import argparse from datetime import datetime import csv import logging i...
be4abd8d3b54ab66f89c88e56cb948d5bf5f5725
stoneridge_info_gatherer.py
stoneridge_info_gatherer.py
#!/usr/bin/env python try: import configparser except ImportError: import ConfigParser as configparser import json import os import platform import stoneridge class StoneRidgeInfoGatherer(object): def run(self): info_file = os.path.join(stoneridge.bindir, 'application.ini') cp = configpa...
Add the static info gatherer
Add the static info gatherer
Python
mpl-2.0
mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge,mozilla/stoneridge
Add the static info gatherer
#!/usr/bin/env python try: import configparser except ImportError: import ConfigParser as configparser import json import os import platform import stoneridge class StoneRidgeInfoGatherer(object): def run(self): info_file = os.path.join(stoneridge.bindir, 'application.ini') cp = configpa...
<commit_before><commit_msg>Add the static info gatherer<commit_after>
#!/usr/bin/env python try: import configparser except ImportError: import ConfigParser as configparser import json import os import platform import stoneridge class StoneRidgeInfoGatherer(object): def run(self): info_file = os.path.join(stoneridge.bindir, 'application.ini') cp = configpa...
Add the static info gatherer#!/usr/bin/env python try: import configparser except ImportError: import ConfigParser as configparser import json import os import platform import stoneridge class StoneRidgeInfoGatherer(object): def run(self): info_file = os.path.join(stoneridge.bindir, 'application...
<commit_before><commit_msg>Add the static info gatherer<commit_after>#!/usr/bin/env python try: import configparser except ImportError: import ConfigParser as configparser import json import os import platform import stoneridge class StoneRidgeInfoGatherer(object): def run(self): info_file = os....
5a2394f8445350387adc30dd5bc818971aefc91d
lpthw/ex25.py
lpthw/ex25.py
def break_words(stuff): """This function will brea up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first word after popping it off.""" word = words.pop(0) print word ...
Add work for Exercise 25.
Add work for Exercise 25.
Python
mit
jaredmanning/learning,jaredmanning/learning
Add work for Exercise 25.
def break_words(stuff): """This function will brea up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first word after popping it off.""" word = words.pop(0) print word ...
<commit_before><commit_msg>Add work for Exercise 25.<commit_after>
def break_words(stuff): """This function will brea up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first word after popping it off.""" word = words.pop(0) print word ...
Add work for Exercise 25.def break_words(stuff): """This function will brea up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first word after popping it off.""" word = wor...
<commit_before><commit_msg>Add work for Exercise 25.<commit_after>def break_words(stuff): """This function will brea up words for us.""" words = stuff.split(' ') return words def sort_words(words): """Sorts the words.""" return sorted(words) def print_first_word(words): """Prints the first wor...
bdd532cccf504dc9fbf21a9e72b8185dc910ec94
thezombies/management/commands/validate_all_data_catalogs.py
thezombies/management/commands/validate_all_data_catalogs.py
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
Add management command for running the task for validating all data catalogs.
Add management command for running the task for validating all data catalogs.
Python
bsd-3-clause
sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies,sunlightlabs/thezombies
Add management command for running the task for validating all data catalogs.
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
<commit_before><commit_msg>Add management command for running the task for validating all data catalogs.<commit_after>
from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_group = validate_data_catalogs.delay() self.stdout.write(u"\nSpawned d...
Add management command for running the task for validating all data catalogs.from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def handle_noargs(self): validator_g...
<commit_before><commit_msg>Add management command for running the task for validating all data catalogs.<commit_after>from django.core.management.base import NoArgsCommand from thezombies.tasks.main import validate_data_catalogs class Command(NoArgsCommand): """Validate all of the agency data catalogs""" def...
24e14b7d53e43f1574971ff5b6eee6d0185df23a
rest_framework/tests/nested_relations.py
rest_framework/tests/nested_relations.py
from copy import deepcopy from django.db import models from django.test import TestCase from rest_framework import serializers # ForeignKey class ForeignKeyTarget(models.Model): name = models.CharField(max_length=100) class ForeignKeySource(models.Model): name = models.CharField(max_length=100) target ...
Add tests for retrieving/updating reverse fks
Add tests for retrieving/updating reverse fks
Python
bsd-2-clause
sehmaschine/django-rest-framework,qsorix/django-rest-framework,lubomir/django-rest-framework,nhorelik/django-rest-framework,James1345/django-rest-framework,canassa/django-rest-framework,yiyocx/django-rest-framework,thedrow/django-rest-framework-1,vstoykov/django-rest-framework,qsorix/django-rest-framework,jpulec/django...
Add tests for retrieving/updating reverse fks
from copy import deepcopy from django.db import models from django.test import TestCase from rest_framework import serializers # ForeignKey class ForeignKeyTarget(models.Model): name = models.CharField(max_length=100) class ForeignKeySource(models.Model): name = models.CharField(max_length=100) target ...
<commit_before><commit_msg>Add tests for retrieving/updating reverse fks<commit_after>
from copy import deepcopy from django.db import models from django.test import TestCase from rest_framework import serializers # ForeignKey class ForeignKeyTarget(models.Model): name = models.CharField(max_length=100) class ForeignKeySource(models.Model): name = models.CharField(max_length=100) target ...
Add tests for retrieving/updating reverse fksfrom copy import deepcopy from django.db import models from django.test import TestCase from rest_framework import serializers # ForeignKey class ForeignKeyTarget(models.Model): name = models.CharField(max_length=100) class ForeignKeySource(models.Model): name =...
<commit_before><commit_msg>Add tests for retrieving/updating reverse fks<commit_after>from copy import deepcopy from django.db import models from django.test import TestCase from rest_framework import serializers # ForeignKey class ForeignKeyTarget(models.Model): name = models.CharField(max_length=100) class F...
13fd2335eb8b8b93e5330fe9bcc125557bffb198
ecommerce/extensions/payment/migrations/0012_auto_20161109_1456.py
ecommerce/extensions/payment/migrations/0012_auto_20161109_1456.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] operations = [ migrations.AlterField( model_name='paypalproces...
Add missing migration for verbose_name alter
Add missing migration for verbose_name alter
Python
agpl-3.0
edx/ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,eduNEXT/edunext-ecommerce,edx/ecommerce,edx/ecommerce,eduNEXT/edunext-ecommerce
Add missing migration for verbose_name alter
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] operations = [ migrations.AlterField( model_name='paypalproces...
<commit_before><commit_msg>Add missing migration for verbose_name alter<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] operations = [ migrations.AlterField( model_name='paypalproces...
Add missing migration for verbose_name alter# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] operations = [ migrations.Alte...
<commit_before><commit_msg>Add missing migration for verbose_name alter<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('payment', '0011_paypalprocessorconfiguration'), ] ...
0d7706db887bb5d1522f3de39b9fe1533f80fd8d
dota2parser.py
dota2parser.py
from bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_id, hero_name in heroes: hero_url = 'https://www.dota2.com/hero/'+str(hero_name).replace(' ', '_')....
Add original script version, still not fit for general use
Add original script version, still not fit for general use
Python
mit
Vilkku/Dota-2-Hero-Parser
Add original script version, still not fit for general use
from bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_id, hero_name in heroes: hero_url = 'https://www.dota2.com/hero/'+str(hero_name).replace(' ', '_')....
<commit_before><commit_msg>Add original script version, still not fit for general use<commit_after>
from bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_id, hero_name in heroes: hero_url = 'https://www.dota2.com/hero/'+str(hero_name).replace(' ', '_')....
Add original script version, still not fit for general usefrom bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_id, hero_name in heroes: hero_url = 'http...
<commit_before><commit_msg>Add original script version, still not fit for general use<commit_after>from bs4 import BeautifulSoup import urllib.request import MySQLdb db = MySQLdb.connect(user="", passwd="", db="") c = db.cursor() c.execute("SELECT id, name FROM heroes WHERE active=1") heroes = c.fetchall() for hero_i...
0f84eb57024bb856c10a6326a3827cb91e4d20c2
pyui_to_clipboard.py
pyui_to_clipboard.py
import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the clipboard.'.format(filename))
Put the contents of a pyui file onto the clipboard
Put the contents of a pyui file onto the clipboard For pasting up to GitHub, etc.
Python
apache-2.0
cclauss/Ten-lines-or-less
Put the contents of a pyui file onto the clipboard For pasting up to GitHub, etc.
import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the clipboard.'.format(filename))
<commit_before><commit_msg>Put the contents of a pyui file onto the clipboard For pasting up to GitHub, etc.<commit_after>
import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the clipboard.'.format(filename))
Put the contents of a pyui file onto the clipboard For pasting up to GitHub, etc.import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the clipboard.'.format(filename))
<commit_before><commit_msg>Put the contents of a pyui file onto the clipboard For pasting up to GitHub, etc.<commit_after>import clipboard filename = 'put_your_filename_here.pyui' # edit this line before running with open(filename) as in_file: clipboard.set(in_file.read()) print('The contents of {} are now on the...
a3706e1c743ef7ec7f38375b116538a71ccb8455
rasterfairy/utils.py
rasterfairy/utils.py
def cmp_to_key(mycmp): """ Convert `sorted` function from python2 to python3. This function is used to convert `cmp` parameter of python2 sorted function into `key` parameter of python3 sorted function. This code is taken from here: https://docs.python.org/2/howto/sorting.html#the-old-way-usin...
Add utilities to convert from python2 to python3.
Add utilities to convert from python2 to python3. This commit only has one utility that allows to convert sorted() function with custom elements comparison from parameter cmp (python2) to parameter key (python3).
Python
bsd-3-clause
Quasimondo/RasterFairy
Add utilities to convert from python2 to python3. This commit only has one utility that allows to convert sorted() function with custom elements comparison from parameter cmp (python2) to parameter key (python3).
def cmp_to_key(mycmp): """ Convert `sorted` function from python2 to python3. This function is used to convert `cmp` parameter of python2 sorted function into `key` parameter of python3 sorted function. This code is taken from here: https://docs.python.org/2/howto/sorting.html#the-old-way-usin...
<commit_before><commit_msg>Add utilities to convert from python2 to python3. This commit only has one utility that allows to convert sorted() function with custom elements comparison from parameter cmp (python2) to parameter key (python3).<commit_after>
def cmp_to_key(mycmp): """ Convert `sorted` function from python2 to python3. This function is used to convert `cmp` parameter of python2 sorted function into `key` parameter of python3 sorted function. This code is taken from here: https://docs.python.org/2/howto/sorting.html#the-old-way-usin...
Add utilities to convert from python2 to python3. This commit only has one utility that allows to convert sorted() function with custom elements comparison from parameter cmp (python2) to parameter key (python3).def cmp_to_key(mycmp): """ Convert `sorted` function from python2 to python3. This function is...
<commit_before><commit_msg>Add utilities to convert from python2 to python3. This commit only has one utility that allows to convert sorted() function with custom elements comparison from parameter cmp (python2) to parameter key (python3).<commit_after>def cmp_to_key(mycmp): """ Convert `sorted` function from ...
d26034963c0332346ea1b6b50b9ad3d637da7e36
spiff/payment/management/commands/attempt_payment.py
spiff/payment/management/commands/attempt_payment.py
from django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **options): for invoice in Invoice.objects.unpaid().all(): print invoice try: unpaid ...
Add script to try and push stripe payment of unpaid invoices
Add script to try and push stripe payment of unpaid invoices
Python
agpl-3.0
SYNHAK/spiff,SYNHAK/spiff,SYNHAK/spiff
Add script to try and push stripe payment of unpaid invoices
from django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **options): for invoice in Invoice.objects.unpaid().all(): print invoice try: unpaid ...
<commit_before><commit_msg>Add script to try and push stripe payment of unpaid invoices<commit_after>
from django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **options): for invoice in Invoice.objects.unpaid().all(): print invoice try: unpaid ...
Add script to try and push stripe payment of unpaid invoicesfrom django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **options): for invoice in Invoice.objects.un...
<commit_before><commit_msg>Add script to try and push stripe payment of unpaid invoices<commit_after>from django.core.management import BaseCommand from spiff.payment.models import Invoice import stripe class Command(BaseCommand): help = 'Attempts to process an invoice via stripe' def handle(self, *args, **option...
c5ed01ce81b1c0e459d93bf26bf96cdeb80a0344
Lib/defconAppKit/representationFactories/__init__.py
Lib/defconAppKit/representationFactories/__init__.py
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
Use specific notifications when possible.
Use specific notifications when possible.
Python
mit
typesupply/defconAppKit,typemytype/defconAppKit
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
<commit_before>from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory impor...
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory import GlyphCellDeta...
<commit_before>from defcon import Glyph, Image, registerRepresentationFactory from defconAppKit.representationFactories.nsBezierPathFactory import NSBezierPathFactory from defconAppKit.representationFactories.glyphCellFactory import GlyphCellFactory from defconAppKit.representationFactories.glyphCellDetailFactory impor...
b68244965b4f69711f0c4d9d42f24e6b3f5742f4
update-images.py
update-images.py
#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data = open('bootstrap.js') output = [] for line in data.readlines(): if line.starts...
Add script to update images in the js code
Add script to update images in the js code
Python
bsd-2-clause
richq/toggle-js-addon
Add script to update images in the js code
#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data = open('bootstrap.js') output = [] for line in data.readlines(): if line.starts...
<commit_before><commit_msg>Add script to update images in the js code<commit_after>
#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data = open('bootstrap.js') output = [] for line in data.readlines(): if line.starts...
Add script to update images in the js code#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data = open('bootstrap.js') output = [] for li...
<commit_before><commit_msg>Add script to update images in the js code<commit_after>#!/usr/bin/env python import urllib def img2base64(img): return open(img, "rb").read().encode("base64").replace('\n', '') disabled_base64 = img2base64("assets/no-js.png") enabled_base64 = img2base64("assets/jsenabled.png") data ...
c168efd883bcc1fc5ed8fe3c80de95db905bb468
tests/grammar_creation_test/NonterminalAddingTest.py
tests/grammar_creation_test/NonterminalAddingTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
Add file for nontermianl adding when grammar is create
Add file for nontermianl adding when grammar is create
Python
mit
PatrikValkovic/grammpy
Add file for nontermianl adding when grammar is create
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add file for nontermianl adding when grammar is create<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
Add file for nontermianl adding when grammar is create#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add file for nontermianl adding when grammar is create<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import TestCase, main from grammpy import * class NonterminalAddingTest(TestCase): pass if...
307e4fda61f92e344bfd90c1a43f5a9076e7b832
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
tests/rules_tests/isValid_tests/InvalidSyntaxTest.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
Add files for rule's invalid syntax validation
Add files for rule's invalid syntax validation
Python
mit
PatrikValkovic/grammpy
Add files for rule's invalid syntax validation
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add files for rule's invalid syntax validation<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
Add files for rule's invalid syntax validation#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__ == '__main__': main()
<commit_before><commit_msg>Add files for rule's invalid syntax validation<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """ from unittest import main, TestCase from grammpy import Rule class InvalidSyntaxTest(TestCase): pass if __name__...
01710f18efbe29dc5cf187726d5c686beec7e6e7
utils/add_plaso_timeline.py
utils/add_plaso_timeline.py
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Add helper script for getting plaso timeline in to timesketch
Add helper script for getting plaso timeline in to timesketch
Python
apache-2.0
armuk/timesketch,armuk/timesketch,google/timesketch,armuk/timesketch,google/timesketch,armuk/timesketch,google/timesketch,lockhy/timesketch,google/timesketch,lockhy/timesketch,lockhy/timesketch,lockhy/timesketch
Add helper script for getting plaso timeline in to timesketch
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
<commit_before><commit_msg>Add helper script for getting plaso timeline in to timesketch<commit_after>
# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or a...
Add helper script for getting plaso timeline in to timesketch# Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/li...
<commit_before><commit_msg>Add helper script for getting plaso timeline in to timesketch<commit_after># Copyright 2014 Google Inc. All rights reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the Li...
2c0fc3387a6dbd54bbcd4c47952ce8739d0b2152
dedup_worker.py
dedup_worker.py
# Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scrape = client.queue('scrape') while True: claimed = ingest.claim(ttl=180, grace=60) ...
Add super-simple deduplication filter that uses a dictionary
Add super-simple deduplication filter that uses a dictionary
Python
mit
ryansb/zaqar-webscraper-demo
Add super-simple deduplication filter that uses a dictionary
# Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scrape = client.queue('scrape') while True: claimed = ingest.claim(ttl=180, grace=60) ...
<commit_before><commit_msg>Add super-simple deduplication filter that uses a dictionary<commit_after>
# Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scrape = client.queue('scrape') while True: claimed = ingest.claim(ttl=180, grace=60) ...
Add super-simple deduplication filter that uses a dictionary# Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scrape = client.queue('scrape') while Tr...
<commit_before><commit_msg>Add super-simple deduplication filter that uses a dictionary<commit_after># Pull URL # Strip query string # Query exists # IFN save to sqlite # IFN push to queue # IFY do nothing seen = {} if __name__ == '__main__': from helpers import client ingest = client.queue('ingest') scra...
9d30c51aac7ca00b4f191270a82f24372687163c
svg2pdf.py
svg2pdf.py
#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import os import sys from pandocfilters import toJSONFilter, Image fmt_to_option = { "sile": ("--...
Add Pandoc filter to convert SVG illustrations to PDF
Add Pandoc filter to convert SVG illustrations to PDF
Python
agpl-3.0
alerque/casile,alerque/casile,alerque/casile,alerque/casile,alerque/casile
Add Pandoc filter to convert SVG illustrations to PDF
#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import os import sys from pandocfilters import toJSONFilter, Image fmt_to_option = { "sile": ("--...
<commit_before><commit_msg>Add Pandoc filter to convert SVG illustrations to PDF<commit_after>
#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import os import sys from pandocfilters import toJSONFilter, Image fmt_to_option = { "sile": ("--...
Add Pandoc filter to convert SVG illustrations to PDF#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import os import sys from pandocfilters import to...
<commit_before><commit_msg>Add Pandoc filter to convert SVG illustrations to PDF<commit_after>#!/usr/bin/env python """ Pandoc filter to convert svg files to pdf as suggested at: https://github.com/jgm/pandoc/issues/265#issuecomment-27317316 """ __author__ = "Jerome Robert" import mimetypes import subprocess import o...
b7c6b5115ce5aec129af64d6b85c672901a435d3
gpmcc/experiments/particle_engine.py
gpmcc/experiments/particle_engine.py
# -*- coding: utf-8 -*- # 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 writi...
Add a multiprocessor for particle learning.
Add a multiprocessor for particle learning.
Python
apache-2.0
probcomp/cgpm,probcomp/cgpm
Add a multiprocessor for particle learning.
# -*- coding: utf-8 -*- # 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 writi...
<commit_before><commit_msg>Add a multiprocessor for particle learning.<commit_after>
# -*- coding: utf-8 -*- # 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 writi...
Add a multiprocessor for particle learning.# -*- coding: utf-8 -*- # 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 a multiprocessor for particle learning.<commit_after># -*- coding: utf-8 -*- # 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.or...
3a9807fd14257c49490ec429d7365c902209508c
gumbo_stats.py
gumbo_stats.py
import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.argv[1] if filename.endswith('.warc.gz'): parse_warc(filename) else: parse_file(filename)
Add beginnings of a Python driver. Currently just prints out input file.
Add beginnings of a Python driver. Currently just prints out input file.
Python
apache-2.0
nostrademons/GumboStats,nostrademons/GumboStats
Add beginnings of a Python driver. Currently just prints out input file.
import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.argv[1] if filename.endswith('.warc.gz'): parse_warc(filename) else: parse_file(filename)
<commit_before><commit_msg>Add beginnings of a Python driver. Currently just prints out input file.<commit_after>
import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.argv[1] if filename.endswith('.warc.gz'): parse_warc(filename) else: parse_file(filename)
Add beginnings of a Python driver. Currently just prints out input file.import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.argv[1] if filename.endswith('.warc.gz')...
<commit_before><commit_msg>Add beginnings of a Python driver. Currently just prints out input file.<commit_after>import ctypes import sys def parse_warc(filename): pass def parse_file(filename): with open(filename) as infile: text = infile.read() print(text) if __name__ == '__main__': filename = sys.a...
36d7bc4719490b046d8782465ddeba6e8240233e
tools/xml_split_images_locale.py
tools/xml_split_images_locale.py
#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##------------------------------------------------------------ ## can be called with: ## ## write bc and bf face images to separate files ##--------...
Split images into bf and bc bears. Defaults to images.
Split images into bf and bc bears. Defaults to images.
Python
mit
hypraptive/bearid,hypraptive/bearid,hypraptive/bearid
Split images into bf and bc bears. Defaults to images.
#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##------------------------------------------------------------ ## can be called with: ## ## write bc and bf face images to separate files ##--------...
<commit_before><commit_msg>Split images into bf and bc bears. Defaults to images.<commit_after>
#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##------------------------------------------------------------ ## can be called with: ## ## write bc and bf face images to separate files ##--------...
Split images into bf and bc bears. Defaults to images.#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##------------------------------------------------------------ ## can be called with: ## ## w...
<commit_before><commit_msg>Split images into bf and bc bears. Defaults to images.<commit_after>#! /usr/bin/python3 import sys import argparse import xml_utils as u import datetime from argparse import RawTextHelpFormatter from collections import defaultdict ##---------------------------------------------------------...
1dbfcfd6558a3148ea2726898d65e1e8ef9115fc
mysite/customs/management/commands/import_bugimporter_data.py
mysite/customs/management/commands/import_bugimporter_data.py
# This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
Add a management command that imports bug data from YAML files
Add a management command that imports bug data from YAML files
Python
agpl-3.0
vipul-sharma20/oh-mainline,Changaco/oh-mainline,openhatch/oh-mainline,SnappleCap/oh-mainline,nirmeshk/oh-mainline,heeraj123/oh-mainline,SnappleCap/oh-mainline,campbe13/openhatch,heeraj123/oh-mainline,eeshangarg/oh-mainline,ehashman/oh-mainline,Changaco/oh-mainline,SnappleCap/oh-mainline,willingc/oh-mainline,sudheesh001...
Add a management command that imports bug data from YAML files
# This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
<commit_before><commit_msg>Add a management command that imports bug data from YAML files<commit_after>
# This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later v...
Add a management command that imports bug data from YAML files# This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as published by # the Free Software Foundation, eith...
<commit_before><commit_msg>Add a management command that imports bug data from YAML files<commit_after># This file is part of OpenHatch. # Copyright (C) 2012 OpenHatch, Inc. # # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU Affero General Public License as publishe...
1314da3ffbaa42aca4a917aef8a230478a22be68
scripts/order-symlinks.py
scripts/order-symlinks.py
#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It created those in a subdirectory called 'inorder'. """ from __future__ import print_function import sys import...
Add a script that uses the JSON metadata to create ordered symlinks.
Add a script that uses the JSON metadata to create ordered symlinks.
Python
mit
webcomics/dosage,mbrandis/dosage,peterjanes/dosage,Freestila/dosage,wummel/dosage,wummel/dosage,blade2005/dosage,Freestila/dosage,mbrandis/dosage,peterjanes/dosage,webcomics/dosage,blade2005/dosage
Add a script that uses the JSON metadata to create ordered symlinks.
#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It created those in a subdirectory called 'inorder'. """ from __future__ import print_function import sys import...
<commit_before><commit_msg>Add a script that uses the JSON metadata to create ordered symlinks.<commit_after>
#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It created those in a subdirectory called 'inorder'. """ from __future__ import print_function import sys import...
Add a script that uses the JSON metadata to create ordered symlinks.#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It created those in a subdirectory called 'i...
<commit_before><commit_msg>Add a script that uses the JSON metadata to create ordered symlinks.<commit_after>#!/usr/bin/env python # Copyright (C) 2013 Tobias Gruetzmacher """ This script takes the JSON file created by 'dosage -o json' and uses the metadata to build a symlink farm in the deduced order of the comic. It ...
8180c84a98bec11308afca884a4d7fed4738403b
spacy/tests/test_align.py
spacy/tests/test_align.py
import pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_align_costs(string1, string2, cost): output_cost, i2j, j2i, matrix = align(str...
Add tests for new Levenshtein alignment
Add tests for new Levenshtein alignment
Python
mit
explosion/spaCy,spacy-io/spaCy,spacy-io/spaCy,explosion/spaCy,explosion/spaCy,recognai/spaCy,recognai/spaCy,honnibal/spaCy,recognai/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,explosion/spaCy,explosion/spaCy,explosion/spaCy,spacy-io/spaCy,recognai/spaCy,honnibal/spaCy,aikramer2/spaCy,spacy-io/spaCy,spacy-io/spaC...
Add tests for new Levenshtein alignment
import pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_align_costs(string1, string2, cost): output_cost, i2j, j2i, matrix = align(str...
<commit_before><commit_msg>Add tests for new Levenshtein alignment<commit_after>
import pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_align_costs(string1, string2, cost): output_cost, i2j, j2i, matrix = align(str...
Add tests for new Levenshtein alignmentimport pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_align_costs(string1, string2, cost): ou...
<commit_before><commit_msg>Add tests for new Levenshtein alignment<commit_after>import pytest from .._align import align @pytest.mark.parametrize('string1,string2,cost', [ (b'hello', b'hell', 1), (b'rat', b'cat', 1), (b'rat', b'rat', 0), (b'rat', b'catsie', 4), (b't', b'catsie', 5), ]) def test_al...
1a6818d4829c3da42750f6d0f042df203434595c
Carkinos/probes/migrations/0002_auto_20160106_2307.py
Carkinos/probes/migrations/0002_auto_20160106_2307.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-06 15:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0001_initial'), ] operations = [ migrations.CreateModel( ...
Add a little to models
Add a little to models Add a little to models (Should I upload migrations?)
Python
mit
LeeYiFang/Carkinos,LeeYiFang/Carkinos,LeeYiFang/Carkinos,LeeYiFang/Carkinos
Add a little to models Add a little to models (Should I upload migrations?)
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-06 15:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0001_initial'), ] operations = [ migrations.CreateModel( ...
<commit_before><commit_msg>Add a little to models Add a little to models (Should I upload migrations?)<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-06 15:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0001_initial'), ] operations = [ migrations.CreateModel( ...
Add a little to models Add a little to models (Should I upload migrations?)# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-06 15:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('probes', '0001_init...
<commit_before><commit_msg>Add a little to models Add a little to models (Should I upload migrations?)<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-01-06 15:07 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): depen...
4fe62ac1211e68f1d9c656453bdf71d6849c3daf
migrations/versions/0101_een_logo.py
migrations/versions/0101_een_logo.py
"""empty message Revision ID: 0101_een_logo Revises: 0100_notification_created_by Create Date: 2017-06-26 11:43:30.374723 """ from alembic import op revision = '0101_een_logo' down_revision = '0100_notification_created_by' ENTERPRISE_EUROPE_NETWORK_ID = '89ce468b-fb29-4d5d-bd3f-d468fb6f7c36' def upgrade(): ...
Add organisation values for the Enterprise Europe Network.
Add organisation values for the Enterprise Europe Network.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add organisation values for the Enterprise Europe Network.
"""empty message Revision ID: 0101_een_logo Revises: 0100_notification_created_by Create Date: 2017-06-26 11:43:30.374723 """ from alembic import op revision = '0101_een_logo' down_revision = '0100_notification_created_by' ENTERPRISE_EUROPE_NETWORK_ID = '89ce468b-fb29-4d5d-bd3f-d468fb6f7c36' def upgrade(): ...
<commit_before><commit_msg>Add organisation values for the Enterprise Europe Network.<commit_after>
"""empty message Revision ID: 0101_een_logo Revises: 0100_notification_created_by Create Date: 2017-06-26 11:43:30.374723 """ from alembic import op revision = '0101_een_logo' down_revision = '0100_notification_created_by' ENTERPRISE_EUROPE_NETWORK_ID = '89ce468b-fb29-4d5d-bd3f-d468fb6f7c36' def upgrade(): ...
Add organisation values for the Enterprise Europe Network."""empty message Revision ID: 0101_een_logo Revises: 0100_notification_created_by Create Date: 2017-06-26 11:43:30.374723 """ from alembic import op revision = '0101_een_logo' down_revision = '0100_notification_created_by' ENTERPRISE_EUROPE_NETWORK_ID = '8...
<commit_before><commit_msg>Add organisation values for the Enterprise Europe Network.<commit_after>"""empty message Revision ID: 0101_een_logo Revises: 0100_notification_created_by Create Date: 2017-06-26 11:43:30.374723 """ from alembic import op revision = '0101_een_logo' down_revision = '0100_notification_create...
845615f2a34c5680ed22a2f4eafa5febe7cd7246
alembic/versions/20087beff9ea_added_date_updated_t.py
alembic/versions/20087beff9ea_added_date_updated_t.py
"""Added date updated to Owner Revision ID: 20087beff9ea Revises: 2dc72d16c188 Create Date: 2014-03-09 01:43:00.648013 """ # revision identifiers, used by Alembic. revision = '20087beff9ea' down_revision = '2dc72d16c188' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated ...
Add date updated to Owner
Add date updated to Owner
Python
apache-2.0
CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords,CityOfNewYork/NYCOpenRecords
Add date updated to Owner
"""Added date updated to Owner Revision ID: 20087beff9ea Revises: 2dc72d16c188 Create Date: 2014-03-09 01:43:00.648013 """ # revision identifiers, used by Alembic. revision = '20087beff9ea' down_revision = '2dc72d16c188' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated ...
<commit_before><commit_msg>Add date updated to Owner<commit_after>
"""Added date updated to Owner Revision ID: 20087beff9ea Revises: 2dc72d16c188 Create Date: 2014-03-09 01:43:00.648013 """ # revision identifiers, used by Alembic. revision = '20087beff9ea' down_revision = '2dc72d16c188' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated ...
Add date updated to Owner"""Added date updated to Owner Revision ID: 20087beff9ea Revises: 2dc72d16c188 Create Date: 2014-03-09 01:43:00.648013 """ # revision identifiers, used by Alembic. revision = '20087beff9ea' down_revision = '2dc72d16c188' from alembic import op import sqlalchemy as sa def upgrade(): ###...
<commit_before><commit_msg>Add date updated to Owner<commit_after>"""Added date updated to Owner Revision ID: 20087beff9ea Revises: 2dc72d16c188 Create Date: 2014-03-09 01:43:00.648013 """ # revision identifiers, used by Alembic. revision = '20087beff9ea' down_revision = '2dc72d16c188' from alembic import op import...
0781d105e4182bdd8abf1a8c7185311a48273c28
salt/beacons/smartos_imgadm.py
salt/beacons/smartos_imgadm.py
# -*- coding: utf-8 -*- ''' Beacon that fires events on image import/delete. .. code-block:: yaml ## minimal # - check for new images every 1 second (salt default) # - does not send events at startup beacons: imgadm: [] ## standard # - check for new images every 60 seconds # - send ...
Add imgadm beacons for SmartOS
Add imgadm beacons for SmartOS
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add imgadm beacons for SmartOS
# -*- coding: utf-8 -*- ''' Beacon that fires events on image import/delete. .. code-block:: yaml ## minimal # - check for new images every 1 second (salt default) # - does not send events at startup beacons: imgadm: [] ## standard # - check for new images every 60 seconds # - send ...
<commit_before><commit_msg>Add imgadm beacons for SmartOS<commit_after>
# -*- coding: utf-8 -*- ''' Beacon that fires events on image import/delete. .. code-block:: yaml ## minimal # - check for new images every 1 second (salt default) # - does not send events at startup beacons: imgadm: [] ## standard # - check for new images every 60 seconds # - send ...
Add imgadm beacons for SmartOS# -*- coding: utf-8 -*- ''' Beacon that fires events on image import/delete. .. code-block:: yaml ## minimal # - check for new images every 1 second (salt default) # - does not send events at startup beacons: imgadm: [] ## standard # - check for new images ...
<commit_before><commit_msg>Add imgadm beacons for SmartOS<commit_after># -*- coding: utf-8 -*- ''' Beacon that fires events on image import/delete. .. code-block:: yaml ## minimal # - check for new images every 1 second (salt default) # - does not send events at startup beacons: imgadm: [] ...
8b63dc73b4e3303d1b86faf42f635f3ce01e9da4
run.py
run.py
#!/usr/bin/env python # encoding: utf-8 import argparse import subprocess as sub ### Parse command line arguments parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Helper script") parser.add_argument('reps', metavar='repetitions', type=int, help='number of repetitions') pars...
Create helper script providing multiprocessing support.
Create helper script providing multiprocessing support.
Python
mit
kubkon/des-in-python
Create helper script providing multiprocessing support.
#!/usr/bin/env python # encoding: utf-8 import argparse import subprocess as sub ### Parse command line arguments parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Helper script") parser.add_argument('reps', metavar='repetitions', type=int, help='number of repetitions') pars...
<commit_before><commit_msg>Create helper script providing multiprocessing support.<commit_after>
#!/usr/bin/env python # encoding: utf-8 import argparse import subprocess as sub ### Parse command line arguments parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Helper script") parser.add_argument('reps', metavar='repetitions', type=int, help='number of repetitions') pars...
Create helper script providing multiprocessing support.#!/usr/bin/env python # encoding: utf-8 import argparse import subprocess as sub ### Parse command line arguments parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Helper script") parser.add_argument('reps', metavar='repetitions', ...
<commit_before><commit_msg>Create helper script providing multiprocessing support.<commit_after>#!/usr/bin/env python # encoding: utf-8 import argparse import subprocess as sub ### Parse command line arguments parser = argparse.ArgumentParser(description="M/M/1 queue simulation -- Helper script") parser.add_argument...
e0c82bec30568eb845c71fb0335d6ac5edef18e9
corehq/apps/translations/migrations/0002_transifexblacklist.py
corehq/apps/translations/migrations/0002_transifexblacklist.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-09 19:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translations', '0001_initial'), ] operations = [ migrations.CreateModel( ...
Add migration that had conflict from merge with master
Add migration that had conflict from merge with master
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add migration that had conflict from merge with master
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-09 19:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translations', '0001_initial'), ] operations = [ migrations.CreateModel( ...
<commit_before><commit_msg>Add migration that had conflict from merge with master<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-09 19:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translations', '0001_initial'), ] operations = [ migrations.CreateModel( ...
Add migration that had conflict from merge with master# -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-09 19:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('translations', '0001_initial'), ]...
<commit_before><commit_msg>Add migration that had conflict from merge with master<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.18 on 2019-01-09 19:35 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ...
5be91f4e7b3607090e94fbf221628a359063823d
data/bag-brk/create_db.py
data/bag-brk/create_db.py
import csv import sqlite3 conn = sqlite3.connect('processed-lines.db') c = conn.cursor() # c.execute('CREATE TABLE processed (cadastral_designation text, bag_pand_id text, match_type text, parcel_uri text, ' # 'dummy text, mother_parcel_match text, parcel_error text, timestamp timestamp default CURRENT_TIMES...
Use indexed text with sqlite
Use indexed text with sqlite
Python
mit
PDOK/data.labs.pdok.nl,PDOK/data.labs.pdok.nl,PDOK/data.labs.pdok.nl,PDOK/data.labs.pdok.nl,PDOK/data.labs.pdok.nl
Use indexed text with sqlite
import csv import sqlite3 conn = sqlite3.connect('processed-lines.db') c = conn.cursor() # c.execute('CREATE TABLE processed (cadastral_designation text, bag_pand_id text, match_type text, parcel_uri text, ' # 'dummy text, mother_parcel_match text, parcel_error text, timestamp timestamp default CURRENT_TIMES...
<commit_before><commit_msg>Use indexed text with sqlite<commit_after>
import csv import sqlite3 conn = sqlite3.connect('processed-lines.db') c = conn.cursor() # c.execute('CREATE TABLE processed (cadastral_designation text, bag_pand_id text, match_type text, parcel_uri text, ' # 'dummy text, mother_parcel_match text, parcel_error text, timestamp timestamp default CURRENT_TIMES...
Use indexed text with sqliteimport csv import sqlite3 conn = sqlite3.connect('processed-lines.db') c = conn.cursor() # c.execute('CREATE TABLE processed (cadastral_designation text, bag_pand_id text, match_type text, parcel_uri text, ' # 'dummy text, mother_parcel_match text, parcel_error text, timestamp tim...
<commit_before><commit_msg>Use indexed text with sqlite<commit_after>import csv import sqlite3 conn = sqlite3.connect('processed-lines.db') c = conn.cursor() # c.execute('CREATE TABLE processed (cadastral_designation text, bag_pand_id text, match_type text, parcel_uri text, ' # 'dummy text, mother_parcel_mat...
134dbd68cc4630442f1dddb9426207de93c1498b
web/courses/migrations/0005_update_solution_visibility_text.py
web/courses/migrations/0005_update_solution_visibility_text.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_institution'), ] operations = [ migrations.AlterField( model_name='problemset', ...
Add a missing migration for Course.solution_visibility description
Add a missing migration for Course.solution_visibility description
Python
agpl-3.0
matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,matijapretnar/projekt-tomo,ul-fmf/projekt-tomo,ul-fmf/projekt-tomo
Add a missing migration for Course.solution_visibility description
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_institution'), ] operations = [ migrations.AlterField( model_name='problemset', ...
<commit_before><commit_msg>Add a missing migration for Course.solution_visibility description<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_institution'), ] operations = [ migrations.AlterField( model_name='problemset', ...
Add a missing migration for Course.solution_visibility description# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_institution'), ] operations = [ mig...
<commit_before><commit_msg>Add a missing migration for Course.solution_visibility description<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('courses', '0004_course_institution...
64fce7c67849f44492d55ccf8a745b252bf1368b
numpy/polynomial/tests/test_printing.py
numpy/polynomial/tests/test_printing.py
import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0,1])) tgt = 'poly([0., 1.])' assert_(res, tgt) def test_chebyshev_str(self): res = str(poly.Chebys...
Add some tests for polynomial printing.
ENH: Add some tests for polynomial printing.
Python
bsd-3-clause
jakirkham/numpy,bertrand-l/numpy,githubmlai/numpy,SiccarPoint/numpy,jorisvandenbossche/numpy,ChristopherHogan/numpy,GrimDerp/numpy,simongibbons/numpy,pizzathief/numpy,ahaldane/numpy,argriffing/numpy,sigma-random/numpy,kirillzhuravlev/numpy,MSeifert04/numpy,NextThought/pypy-numpy,matthew-brett/numpy,astrofrog/numpy,ogri...
ENH: Add some tests for polynomial printing.
import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0,1])) tgt = 'poly([0., 1.])' assert_(res, tgt) def test_chebyshev_str(self): res = str(poly.Chebys...
<commit_before><commit_msg>ENH: Add some tests for polynomial printing.<commit_after>
import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0,1])) tgt = 'poly([0., 1.])' assert_(res, tgt) def test_chebyshev_str(self): res = str(poly.Chebys...
ENH: Add some tests for polynomial printing.import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0,1])) tgt = 'poly([0., 1.])' assert_(res, tgt) def test_chebys...
<commit_before><commit_msg>ENH: Add some tests for polynomial printing.<commit_after>import numpy.polynomial as poly from numpy.testing import TestCase, run_module_suite, assert_ class test_str(TestCase): def test_polynomial_str(self): res = str(poly.Polynomial([0,1])) tgt = 'poly([0., 1.])' ...
d251a2b2cd449ed5078b41b09f50003786f3bbde
seq_pad.py
seq_pad.py
#!/usr/bin/python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __author__= 'Allison MacLeay' import sys import os import argparse import glob import gzip #----------------------------------------- # MAIN # run umitag.py for all files in a directo...
Create script to pad and trim fastq reads to one length
Create script to pad and trim fastq reads to one length
Python
mit
alliemacleay/misc
Create script to pad and trim fastq reads to one length
#!/usr/bin/python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __author__= 'Allison MacLeay' import sys import os import argparse import glob import gzip #----------------------------------------- # MAIN # run umitag.py for all files in a directo...
<commit_before><commit_msg>Create script to pad and trim fastq reads to one length<commit_after>
#!/usr/bin/python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __author__= 'Allison MacLeay' import sys import os import argparse import glob import gzip #----------------------------------------- # MAIN # run umitag.py for all files in a directo...
Create script to pad and trim fastq reads to one length#!/usr/bin/python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __author__= 'Allison MacLeay' import sys import os import argparse import glob import gzip #------------------------------------...
<commit_before><commit_msg>Create script to pad and trim fastq reads to one length<commit_after>#!/usr/bin/python #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ __author__= 'Allison MacLeay' import sys import os import argparse import glob import gz...
d25af87006ac21f55706c3a5579aec3c961b88e8
download_mdcs_data.py
download_mdcs_data.py
"""Fetch images from MDCS. """ import json import requests import xmltodict def download_mdcs_data(): user = "dwheeler" password = "12345" mdcs_url = "http://129.6.153.123:8000" schema_title = 'SemImage' url = mdcs_url + "/rest/templates/select/all" allSchemas = json.loads(requests.get(url, ...
Add script to download data from MDCS
Add script to download data from MDCS
Python
mit
wd15/sem-image-stats
Add script to download data from MDCS
"""Fetch images from MDCS. """ import json import requests import xmltodict def download_mdcs_data(): user = "dwheeler" password = "12345" mdcs_url = "http://129.6.153.123:8000" schema_title = 'SemImage' url = mdcs_url + "/rest/templates/select/all" allSchemas = json.loads(requests.get(url, ...
<commit_before><commit_msg>Add script to download data from MDCS<commit_after>
"""Fetch images from MDCS. """ import json import requests import xmltodict def download_mdcs_data(): user = "dwheeler" password = "12345" mdcs_url = "http://129.6.153.123:8000" schema_title = 'SemImage' url = mdcs_url + "/rest/templates/select/all" allSchemas = json.loads(requests.get(url, ...
Add script to download data from MDCS"""Fetch images from MDCS. """ import json import requests import xmltodict def download_mdcs_data(): user = "dwheeler" password = "12345" mdcs_url = "http://129.6.153.123:8000" schema_title = 'SemImage' url = mdcs_url + "/rest/templates/select/all" allSc...
<commit_before><commit_msg>Add script to download data from MDCS<commit_after>"""Fetch images from MDCS. """ import json import requests import xmltodict def download_mdcs_data(): user = "dwheeler" password = "12345" mdcs_url = "http://129.6.153.123:8000" schema_title = 'SemImage' url = mdcs_url ...
b35e780364ca2d06902302b165ce2261ec6795a1
ona_migration_script/test_migrate_toilet_codes.py
ona_migration_script/test_migrate_toilet_codes.py
import json import requests from requests_testadapter import TestAdapter import unittest import migrate_toilet_codes class TestCreateSession(unittest.TestCase): def test_create_session(self): username = 'testuser' password = 'testpass' s = migrate_toilet_codes.create_session(username, pas...
Add tests for getting all toilets
Add tests for getting all toilets
Python
bsd-3-clause
praekelt/go-imali-yethu-js,praekelt/go-imali-yethu-js,praekelt/go-imali-yethu-js
Add tests for getting all toilets
import json import requests from requests_testadapter import TestAdapter import unittest import migrate_toilet_codes class TestCreateSession(unittest.TestCase): def test_create_session(self): username = 'testuser' password = 'testpass' s = migrate_toilet_codes.create_session(username, pas...
<commit_before><commit_msg>Add tests for getting all toilets<commit_after>
import json import requests from requests_testadapter import TestAdapter import unittest import migrate_toilet_codes class TestCreateSession(unittest.TestCase): def test_create_session(self): username = 'testuser' password = 'testpass' s = migrate_toilet_codes.create_session(username, pas...
Add tests for getting all toiletsimport json import requests from requests_testadapter import TestAdapter import unittest import migrate_toilet_codes class TestCreateSession(unittest.TestCase): def test_create_session(self): username = 'testuser' password = 'testpass' s = migrate_toilet_c...
<commit_before><commit_msg>Add tests for getting all toilets<commit_after>import json import requests from requests_testadapter import TestAdapter import unittest import migrate_toilet_codes class TestCreateSession(unittest.TestCase): def test_create_session(self): username = 'testuser' password ...
d782809746cfb403358bdfb10215b70c96498264
QtViewer.py
QtViewer.py
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Qt interface to display AVT cameras # # # External dependencies # from PyQt4 import QtGui, QtCore # # Window to display a camera # class QtViewer( QtGui.QWidget ) : # # Initialisation # def __init__( self, camera ) : # Initialize parent class QtGui.QWid...
Introduce a live camera viewer with Qt.
Introduce a live camera viewer with Qt.
Python
mit
microy/PyStereoVisionToolkit,microy/VisionToolkit,microy/VisionToolkit,microy/StereoVision,microy/StereoVision,microy/PyStereoVisionToolkit
Introduce a live camera viewer with Qt.
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Qt interface to display AVT cameras # # # External dependencies # from PyQt4 import QtGui, QtCore # # Window to display a camera # class QtViewer( QtGui.QWidget ) : # # Initialisation # def __init__( self, camera ) : # Initialize parent class QtGui.QWid...
<commit_before><commit_msg>Introduce a live camera viewer with Qt.<commit_after>
#! /usr/bin/env python # -*- coding:utf-8 -*- # # Qt interface to display AVT cameras # # # External dependencies # from PyQt4 import QtGui, QtCore # # Window to display a camera # class QtViewer( QtGui.QWidget ) : # # Initialisation # def __init__( self, camera ) : # Initialize parent class QtGui.QWid...
Introduce a live camera viewer with Qt.#! /usr/bin/env python # -*- coding:utf-8 -*- # # Qt interface to display AVT cameras # # # External dependencies # from PyQt4 import QtGui, QtCore # # Window to display a camera # class QtViewer( QtGui.QWidget ) : # # Initialisation # def __init__( self, camera ) : ...
<commit_before><commit_msg>Introduce a live camera viewer with Qt.<commit_after>#! /usr/bin/env python # -*- coding:utf-8 -*- # # Qt interface to display AVT cameras # # # External dependencies # from PyQt4 import QtGui, QtCore # # Window to display a camera # class QtViewer( QtGui.QWidget ) : # # Initialisat...
02d7e423416ab90bdc4db6428c51efaf6f33a4c6
dbaas/dbaas/templatetags/settings_tags.py
dbaas/dbaas/templatetags/settings_tags.py
from django import template from django.conf import settings register = template.Library() @register.assignment_tag() def setting(var_name): """ Get a var from settings """ return getattr(settings, var_name)
Create templatetag for put a settings var into context
Create templatetag for put a settings var into context
Python
bsd-3-clause
globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service,globocom/database-as-a-service
Create templatetag for put a settings var into context
from django import template from django.conf import settings register = template.Library() @register.assignment_tag() def setting(var_name): """ Get a var from settings """ return getattr(settings, var_name)
<commit_before><commit_msg>Create templatetag for put a settings var into context<commit_after>
from django import template from django.conf import settings register = template.Library() @register.assignment_tag() def setting(var_name): """ Get a var from settings """ return getattr(settings, var_name)
Create templatetag for put a settings var into contextfrom django import template from django.conf import settings register = template.Library() @register.assignment_tag() def setting(var_name): """ Get a var from settings """ return getattr(settings, var_name)
<commit_before><commit_msg>Create templatetag for put a settings var into context<commit_after>from django import template from django.conf import settings register = template.Library() @register.assignment_tag() def setting(var_name): """ Get a var from settings """ return getattr(settings, var_...
2c651b7083ec368ebf226364a1a1aba5f5ec147e
fjord/feedback/migrations/0003_auto__chg_field_simple_created.py
fjord/feedback/migrations/0003_auto__chg_field_simple_created.py
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Simple.created' db.alter_column('feedback_simple', 'created', self.gf('django.db.models.f...
Add migration for datetime change.
Add migration for datetime change. This should have been done when we changed this in the model, but it wasn't.
Python
bsd-3-clause
hoosteeno/fjord,DESHRAJ/fjord,staranjeet/fjord,hoosteeno/fjord,lgp171188/fjord,DESHRAJ/fjord,hoosteeno/fjord,Ritsyy/fjord,staranjeet/fjord,lgp171188/fjord,rlr/fjord,rlr/fjord,staranjeet/fjord,hoosteeno/fjord,lgp171188/fjord,staranjeet/fjord,rlr/fjord,mozilla/fjord,mozilla/fjord,lgp171188/fjord,Ritsyy/fjord,Ritsyy/fjord...
Add migration for datetime change. This should have been done when we changed this in the model, but it wasn't.
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Simple.created' db.alter_column('feedback_simple', 'created', self.gf('django.db.models.f...
<commit_before><commit_msg>Add migration for datetime change. This should have been done when we changed this in the model, but it wasn't.<commit_after>
# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # Changing field 'Simple.created' db.alter_column('feedback_simple', 'created', self.gf('django.db.models.f...
Add migration for datetime change. This should have been done when we changed this in the model, but it wasn't.# -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): def forwards(self, orm): # C...
<commit_before><commit_msg>Add migration for datetime change. This should have been done when we changed this in the model, but it wasn't.<commit_after># -*- coding: utf-8 -*- import datetime from south.db import db from south.v2 import SchemaMigration from django.db import models class Migration(SchemaMigration): ...
635ed78543b3e3e8fe7c52fa91ee8516d617249d
data-travel/test_client.py
data-travel/test_client.py
from socket import * host = '127.0.0.1' port = 1234 bufsize = 1024 addr = (host, port) client = socket(AF_INET, SOCK_STREAM) client.connect(addr) while True: data = client.recv(bufsize) if not data: break print data.strip() client.close()
Add client sample for test - Connect to server - Receive data from server - Strip the data and print
Add client sample for test - Connect to server - Receive data from server - Strip the data and print
Python
apache-2.0
peitaosu/motion-tools
Add client sample for test - Connect to server - Receive data from server - Strip the data and print
from socket import * host = '127.0.0.1' port = 1234 bufsize = 1024 addr = (host, port) client = socket(AF_INET, SOCK_STREAM) client.connect(addr) while True: data = client.recv(bufsize) if not data: break print data.strip() client.close()
<commit_before><commit_msg>Add client sample for test - Connect to server - Receive data from server - Strip the data and print<commit_after>
from socket import * host = '127.0.0.1' port = 1234 bufsize = 1024 addr = (host, port) client = socket(AF_INET, SOCK_STREAM) client.connect(addr) while True: data = client.recv(bufsize) if not data: break print data.strip() client.close()
Add client sample for test - Connect to server - Receive data from server - Strip the data and printfrom socket import * host = '127.0.0.1' port = 1234 bufsize = 1024 addr = (host, port) client = socket(AF_INET, SOCK_STREAM) client.connect(addr) while True: data = client.recv(bufsize) if not data: br...
<commit_before><commit_msg>Add client sample for test - Connect to server - Receive data from server - Strip the data and print<commit_after>from socket import * host = '127.0.0.1' port = 1234 bufsize = 1024 addr = (host, port) client = socket(AF_INET, SOCK_STREAM) client.connect(addr) while True: data = client....
313e9cae068192fe11ad10ea0b5c05061b0e5c60
tests/unit/cloud/clouds/ec2_test.py
tests/unit/cloud/clouds/ec2_test.py
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import import os import tempfile # Import Salt Libs from salt.cloud.clouds import ec2 from salt.exceptions import SaltCloudSystemExit # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import MagicMock...
Add unit test for _validate_key_file_permissions in ec2 module
Add unit test for _validate_key_file_permissions in ec2 module
Python
apache-2.0
saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt
Add unit test for _validate_key_file_permissions in ec2 module
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import import os import tempfile # Import Salt Libs from salt.cloud.clouds import ec2 from salt.exceptions import SaltCloudSystemExit # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import MagicMock...
<commit_before><commit_msg>Add unit test for _validate_key_file_permissions in ec2 module<commit_after>
# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import import os import tempfile # Import Salt Libs from salt.cloud.clouds import ec2 from salt.exceptions import SaltCloudSystemExit # Import Salt Testing Libs from salttesting import TestCase, skipIf from salttesting.mock import MagicMock...
Add unit test for _validate_key_file_permissions in ec2 module# -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import import os import tempfile # Import Salt Libs from salt.cloud.clouds import ec2 from salt.exceptions import SaltCloudSystemExit # Import Salt Testing Libs from salttesting ...
<commit_before><commit_msg>Add unit test for _validate_key_file_permissions in ec2 module<commit_after># -*- coding: utf-8 -*- # Import Python libs from __future__ import absolute_import import os import tempfile # Import Salt Libs from salt.cloud.clouds import ec2 from salt.exceptions import SaltCloudSystemExit # I...
0202f0bd4358d68917af19910bb4e1f0a3dda602
scripts/avalon-usb2iic-test.py
scripts/avalon-usb2iic-test.py
#!/usr/bin/env python2.7 # This script aim to make a loopback test on cdc or hid. # The statics is used for comparison, it is not accurate. from serial import Serial from optparse import OptionParser import time import binascii import usb.core import usb.util import sys parser = OptionParser() parser.add_option("-M"...
Add usb bridge test(CDC & HID)
Add usb bridge test(CDC & HID)
Python
unlicense
archangdcc/avalon-extras,archangdcc/avalon-extras,Canaan-Creative/Avalon-extras,archangdcc/avalon-extras,Canaan-Creative/Avalon-extras,qinfengling/Avalon-extras,qinfengling/Avalon-extras,qinfengling/Avalon-extras,Canaan-Creative/Avalon-extras,archangdcc/avalon-extras,Canaan-Creative/Avalon-extras,qinfengling/Avalon-ext...
Add usb bridge test(CDC & HID)
#!/usr/bin/env python2.7 # This script aim to make a loopback test on cdc or hid. # The statics is used for comparison, it is not accurate. from serial import Serial from optparse import OptionParser import time import binascii import usb.core import usb.util import sys parser = OptionParser() parser.add_option("-M"...
<commit_before><commit_msg>Add usb bridge test(CDC & HID)<commit_after>
#!/usr/bin/env python2.7 # This script aim to make a loopback test on cdc or hid. # The statics is used for comparison, it is not accurate. from serial import Serial from optparse import OptionParser import time import binascii import usb.core import usb.util import sys parser = OptionParser() parser.add_option("-M"...
Add usb bridge test(CDC & HID)#!/usr/bin/env python2.7 # This script aim to make a loopback test on cdc or hid. # The statics is used for comparison, it is not accurate. from serial import Serial from optparse import OptionParser import time import binascii import usb.core import usb.util import sys parser = OptionP...
<commit_before><commit_msg>Add usb bridge test(CDC & HID)<commit_after>#!/usr/bin/env python2.7 # This script aim to make a loopback test on cdc or hid. # The statics is used for comparison, it is not accurate. from serial import Serial from optparse import OptionParser import time import binascii import usb.core imp...
162e7dd6595b0d9303ecb1da66893ee353ba413b
tracker.py
tracker.py
import os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEvent class GamificationHandler(FileSystemEventHandler): def __init__(self, filename): FileSystemEventHandler.__init__(self) self.fi...
Add a first small file watcher that counts words
Add a first small file watcher that counts words - Requires installing python watchdog framework
Python
mit
Kadrian/paper-gamification
Add a first small file watcher that counts words - Requires installing python watchdog framework
import os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEvent class GamificationHandler(FileSystemEventHandler): def __init__(self, filename): FileSystemEventHandler.__init__(self) self.fi...
<commit_before><commit_msg>Add a first small file watcher that counts words - Requires installing python watchdog framework<commit_after>
import os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEvent class GamificationHandler(FileSystemEventHandler): def __init__(self, filename): FileSystemEventHandler.__init__(self) self.fi...
Add a first small file watcher that counts words - Requires installing python watchdog frameworkimport os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEvent class GamificationHandler(FileSystemE...
<commit_before><commit_msg>Add a first small file watcher that counts words - Requires installing python watchdog framework<commit_after>import os import sys import time import logging from watchdog.observers import Observer from watchdog.events import FileSystemEventHandler from watchdog.events import FileModifiedEve...
c4c52c98f4c8596b4f19c88fb64e1b0af4f9c4cd
tests/test_monitor_progress.py
tests/test_monitor_progress.py
pytest_plugins = "pytester" def test_simple_example(testdir): """ Run the simple example code in a python subprocess and then compare its stderr to what we expect to see from it. We run it in a subprocess to best capture its stderr. We expect to see match_lines in order in the output. Th...
Add New Test Which Monitors Output
Add New Test Which Monitors Output This test monitors STDERR to detect progress of the progressbar
Python
bsd-3-clause
WoLpH/python-progressbar
Add New Test Which Monitors Output This test monitors STDERR to detect progress of the progressbar
pytest_plugins = "pytester" def test_simple_example(testdir): """ Run the simple example code in a python subprocess and then compare its stderr to what we expect to see from it. We run it in a subprocess to best capture its stderr. We expect to see match_lines in order in the output. Th...
<commit_before><commit_msg>Add New Test Which Monitors Output This test monitors STDERR to detect progress of the progressbar<commit_after>
pytest_plugins = "pytester" def test_simple_example(testdir): """ Run the simple example code in a python subprocess and then compare its stderr to what we expect to see from it. We run it in a subprocess to best capture its stderr. We expect to see match_lines in order in the output. Th...
Add New Test Which Monitors Output This test monitors STDERR to detect progress of the progressbarpytest_plugins = "pytester" def test_simple_example(testdir): """ Run the simple example code in a python subprocess and then compare its stderr to what we expect to see from it. We run it in a subprocess t...
<commit_before><commit_msg>Add New Test Which Monitors Output This test monitors STDERR to detect progress of the progressbar<commit_after>pytest_plugins = "pytester" def test_simple_example(testdir): """ Run the simple example code in a python subprocess and then compare its stderr to what we expect to ...
d680d6a20890d3bbce96792fa1e86df28956a859
helpers/threading.py
helpers/threading.py
from threading import Thread, Lock list_lock = Lock() def run_in_thread(app): def wrapper(fn): def run(*args, **kwargs): app.logger.info('Starting thread: {}'.format(fn.__name__)) t = Thread(target=fn, args=args, kwargs=kwargs) t.start() return t r...
Add a thread helper module
Add a thread helper module
Python
mit
finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is,finnurtorfa/aflafrettir.is
Add a thread helper module
from threading import Thread, Lock list_lock = Lock() def run_in_thread(app): def wrapper(fn): def run(*args, **kwargs): app.logger.info('Starting thread: {}'.format(fn.__name__)) t = Thread(target=fn, args=args, kwargs=kwargs) t.start() return t r...
<commit_before><commit_msg>Add a thread helper module<commit_after>
from threading import Thread, Lock list_lock = Lock() def run_in_thread(app): def wrapper(fn): def run(*args, **kwargs): app.logger.info('Starting thread: {}'.format(fn.__name__)) t = Thread(target=fn, args=args, kwargs=kwargs) t.start() return t r...
Add a thread helper modulefrom threading import Thread, Lock list_lock = Lock() def run_in_thread(app): def wrapper(fn): def run(*args, **kwargs): app.logger.info('Starting thread: {}'.format(fn.__name__)) t = Thread(target=fn, args=args, kwargs=kwargs) t.star...
<commit_before><commit_msg>Add a thread helper module<commit_after>from threading import Thread, Lock list_lock = Lock() def run_in_thread(app): def wrapper(fn): def run(*args, **kwargs): app.logger.info('Starting thread: {}'.format(fn.__name__)) t = Thread(target=fn, args=args, ...
0cf2ce2331120c20de0cab384c5fdec763c25c68
min-char-rnn/markov-model.py
min-char-rnn/markov-model.py
# Simple Markov chain model for character-based text generation. # # Only tested with Python 3.6+ # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function from collections import defaultdict, Counter import random import sys STATE_LEN = 4 def weight...
Add a simple markov chain to compare output with RNN
Add a simple markov chain to compare output with RNN
Python
unlicense
eliben/deep-learning-samples,eliben/deep-learning-samples
Add a simple markov chain to compare output with RNN
# Simple Markov chain model for character-based text generation. # # Only tested with Python 3.6+ # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function from collections import defaultdict, Counter import random import sys STATE_LEN = 4 def weight...
<commit_before><commit_msg>Add a simple markov chain to compare output with RNN<commit_after>
# Simple Markov chain model for character-based text generation. # # Only tested with Python 3.6+ # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function from collections import defaultdict, Counter import random import sys STATE_LEN = 4 def weight...
Add a simple markov chain to compare output with RNN# Simple Markov chain model for character-based text generation. # # Only tested with Python 3.6+ # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function from collections import defaultdict, Counter i...
<commit_before><commit_msg>Add a simple markov chain to compare output with RNN<commit_after># Simple Markov chain model for character-based text generation. # # Only tested with Python 3.6+ # # Eli Bendersky (http://eli.thegreenplace.net) # This code is in the public domain from __future__ import print_function from ...