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
6182f07a82733c0c3d22aee40abbc392da67ce4d
spraakbanken/s5/spr_local/inword_backoff_node.py
spraakbanken/s5/spr_local/inword_backoff_node.py
#!/usr/bin/env python3 import argparse import sys def main(inf, outf, word_map): iw_backoff_outgoing = [] iw_backoff_incoming = [] iw_ending_nodes = set() max_node = 0 for line in inf: parts = line.strip("\n").split("\t") if len(parts) < 3: print("\t".join(parts...
Add tool for creating a separate backoff node for inword positions
Add tool for creating a separate backoff node for inword positions
Python
apache-2.0
psmit/kaldi-recipes,psmit/kaldi-recipes,psmit/kaldi-recipes,phsmit/kaldi-recipes,phsmit/kaldi-recipes
Add tool for creating a separate backoff node for inword positions
#!/usr/bin/env python3 import argparse import sys def main(inf, outf, word_map): iw_backoff_outgoing = [] iw_backoff_incoming = [] iw_ending_nodes = set() max_node = 0 for line in inf: parts = line.strip("\n").split("\t") if len(parts) < 3: print("\t".join(parts...
<commit_before><commit_msg>Add tool for creating a separate backoff node for inword positions<commit_after>
#!/usr/bin/env python3 import argparse import sys def main(inf, outf, word_map): iw_backoff_outgoing = [] iw_backoff_incoming = [] iw_ending_nodes = set() max_node = 0 for line in inf: parts = line.strip("\n").split("\t") if len(parts) < 3: print("\t".join(parts...
Add tool for creating a separate backoff node for inword positions#!/usr/bin/env python3 import argparse import sys def main(inf, outf, word_map): iw_backoff_outgoing = [] iw_backoff_incoming = [] iw_ending_nodes = set() max_node = 0 for line in inf: parts = line.strip("\n").split(...
<commit_before><commit_msg>Add tool for creating a separate backoff node for inword positions<commit_after>#!/usr/bin/env python3 import argparse import sys def main(inf, outf, word_map): iw_backoff_outgoing = [] iw_backoff_incoming = [] iw_ending_nodes = set() max_node = 0 for line in inf...
ee87aecbd08abaac4b5fa7b50ac120fdf17553c2
ci/new_tsqa/tests/test_hostdb.py
ci/new_tsqa/tests/test_hostdb.py
''' Test hostdb ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
Add some initial teests for hostdb
Add some initial teests for hostdb
Python
apache-2.0
persiaAziz/trafficserver,PSUdaemon/trafficserver,rpufky/trafficserver,davidbz/trafficserver,SolidWallOfCode/trafficserver,rahmalik/trafficserver,rahmalik/trafficserver,vmamidi/trafficserver,chitianhao/trafficserver,reveller/trafficserver,duke8253/trafficserver,duke8253/trafficserver,chitianhao/trafficserver,pbchou/traf...
Add some initial teests for hostdb
''' Test hostdb ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
<commit_before><commit_msg>Add some initial teests for hostdb<commit_after>
''' Test hostdb ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the Apache License, Version 2.0 (the #...
Add some initial teests for hostdb''' Test hostdb ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The ASF licenses this file # to you under the ...
<commit_before><commit_msg>Add some initial teests for hostdb<commit_after>''' Test hostdb ''' # Licensed to the Apache Software Foundation (ASF) under one # or more contributor license agreements. See the NOTICE file # distributed with this work for additional information # regarding copyright ownership. The AS...
21f2571a0e5b7100db8c2ddf3c49d32992d20e3e
db_queries.py
db_queries.py
import os import sqlite3 import pandas as pd DB_PATH = os.path.dirname(__file__)+"/Tables/Pyranitar.db" def query_level(group, experience): cnx = sqlite3.connect(DB_PATH) sql = "" \ "SELECT level " \ "FROM Experience " \ "WHERE exp_group = {} " \ "AND total_exp <= {} " \ "ORDER BY total_ex...
Add query_level and query_nature functions
Add query_level and query_nature functions
Python
mit
Ditoeight/Pyranitar
Add query_level and query_nature functions
import os import sqlite3 import pandas as pd DB_PATH = os.path.dirname(__file__)+"/Tables/Pyranitar.db" def query_level(group, experience): cnx = sqlite3.connect(DB_PATH) sql = "" \ "SELECT level " \ "FROM Experience " \ "WHERE exp_group = {} " \ "AND total_exp <= {} " \ "ORDER BY total_ex...
<commit_before><commit_msg>Add query_level and query_nature functions<commit_after>
import os import sqlite3 import pandas as pd DB_PATH = os.path.dirname(__file__)+"/Tables/Pyranitar.db" def query_level(group, experience): cnx = sqlite3.connect(DB_PATH) sql = "" \ "SELECT level " \ "FROM Experience " \ "WHERE exp_group = {} " \ "AND total_exp <= {} " \ "ORDER BY total_ex...
Add query_level and query_nature functionsimport os import sqlite3 import pandas as pd DB_PATH = os.path.dirname(__file__)+"/Tables/Pyranitar.db" def query_level(group, experience): cnx = sqlite3.connect(DB_PATH) sql = "" \ "SELECT level " \ "FROM Experience " \ "WHERE exp_group = {} " \ "AND ...
<commit_before><commit_msg>Add query_level and query_nature functions<commit_after>import os import sqlite3 import pandas as pd DB_PATH = os.path.dirname(__file__)+"/Tables/Pyranitar.db" def query_level(group, experience): cnx = sqlite3.connect(DB_PATH) sql = "" \ "SELECT level " \ "FROM Experience " ...
dfa99a462487fe728c29a8663a223c129ed17355
examples/translations/russian_test_1.py
examples/translations/russian_test_1.py
# Russian Language Test from seleniumbase.translate.russian import ТестНаСелен # noqa class МойТестовыйКласс(ТестНаСелен): def test_пример_1(self): self.открытый("https://ru.wikipedia.org/wiki/") self.проверить_элемент('[title="Русский язык"]') self.проверить_текст("Википедия", "h2.main-...
Add the Russian example test
Add the Russian example test
Python
mit
mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase
Add the Russian example test
# Russian Language Test from seleniumbase.translate.russian import ТестНаСелен # noqa class МойТестовыйКласс(ТестНаСелен): def test_пример_1(self): self.открытый("https://ru.wikipedia.org/wiki/") self.проверить_элемент('[title="Русский язык"]') self.проверить_текст("Википедия", "h2.main-...
<commit_before><commit_msg>Add the Russian example test<commit_after>
# Russian Language Test from seleniumbase.translate.russian import ТестНаСелен # noqa class МойТестовыйКласс(ТестНаСелен): def test_пример_1(self): self.открытый("https://ru.wikipedia.org/wiki/") self.проверить_элемент('[title="Русский язык"]') self.проверить_текст("Википедия", "h2.main-...
Add the Russian example test# Russian Language Test from seleniumbase.translate.russian import ТестНаСелен # noqa class МойТестовыйКласс(ТестНаСелен): def test_пример_1(self): self.открытый("https://ru.wikipedia.org/wiki/") self.проверить_элемент('[title="Русский язык"]') self.проверить_...
<commit_before><commit_msg>Add the Russian example test<commit_after># Russian Language Test from seleniumbase.translate.russian import ТестНаСелен # noqa class МойТестовыйКласс(ТестНаСелен): def test_пример_1(self): self.открытый("https://ru.wikipedia.org/wiki/") self.проверить_элемент('[title=...
c7d32d2ed2483ce34c7a901c84d128c50f03c472
golddust/__init__.py
golddust/__init__.py
# Copyright 2015-2016 John "LuaMilkshake" Marion # # 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 ag...
Add current state of golddust package
Add current state of golddust package
Python
apache-2.0
Packeteers/GoldDust
Add current state of golddust package
# Copyright 2015-2016 John "LuaMilkshake" Marion # # 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 ag...
<commit_before><commit_msg>Add current state of golddust package<commit_after>
# Copyright 2015-2016 John "LuaMilkshake" Marion # # 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 ag...
Add current state of golddust package# Copyright 2015-2016 John "LuaMilkshake" Marion # # 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 # # Un...
<commit_before><commit_msg>Add current state of golddust package<commit_after># Copyright 2015-2016 John "LuaMilkshake" Marion # # 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://w...
0ad93dfef152aae325b99274ac6a6789b1d46a32
wk2/loading_catalogues.py
wk2/loading_catalogues.py
import numpy as np def hms2dec(h, m, s): return 15*(h + m/60 + s/3600) def dms2dec(d, m, s): if (d >= 0): return d + m/60 + s/3600 else: return d - m/60 - s/3600 def import_bss(): file = 'bss.dat' lines = np.loadtxt(file, usecols=range(1, 7)) count=1 result = [ ] for line in lines: result...
Load data from AT20G BSS and SUperCOSMOS catalogues
Load data from AT20G BSS and SUperCOSMOS catalogues
Python
mit
lokijota/datadrivenastronomymooc
Load data from AT20G BSS and SUperCOSMOS catalogues
import numpy as np def hms2dec(h, m, s): return 15*(h + m/60 + s/3600) def dms2dec(d, m, s): if (d >= 0): return d + m/60 + s/3600 else: return d - m/60 - s/3600 def import_bss(): file = 'bss.dat' lines = np.loadtxt(file, usecols=range(1, 7)) count=1 result = [ ] for line in lines: result...
<commit_before><commit_msg>Load data from AT20G BSS and SUperCOSMOS catalogues<commit_after>
import numpy as np def hms2dec(h, m, s): return 15*(h + m/60 + s/3600) def dms2dec(d, m, s): if (d >= 0): return d + m/60 + s/3600 else: return d - m/60 - s/3600 def import_bss(): file = 'bss.dat' lines = np.loadtxt(file, usecols=range(1, 7)) count=1 result = [ ] for line in lines: result...
Load data from AT20G BSS and SUperCOSMOS cataloguesimport numpy as np def hms2dec(h, m, s): return 15*(h + m/60 + s/3600) def dms2dec(d, m, s): if (d >= 0): return d + m/60 + s/3600 else: return d - m/60 - s/3600 def import_bss(): file = 'bss.dat' lines = np.loadtxt(file, usecols=range(1, 7)) cou...
<commit_before><commit_msg>Load data from AT20G BSS and SUperCOSMOS catalogues<commit_after>import numpy as np def hms2dec(h, m, s): return 15*(h + m/60 + s/3600) def dms2dec(d, m, s): if (d >= 0): return d + m/60 + s/3600 else: return d - m/60 - s/3600 def import_bss(): file = 'bss.dat' lines = np...
5b5027a6e84324bc09ad3ba29d84e54c51d33b45
tests/conftest.py
tests/conftest.py
import pytest def pytest_addoption(parser): parser.addoption("--runslow", action="store_true", help="run slow tests") def pytest_runtest_setup(item): if 'slow' in item.keywords and not item.config.getoption("--runslow"): pytest.skip("need --runslow option to run")
Add pytest config file for slow tests.
Add pytest config file for slow tests. Added a pytest config file in the tests folder, so that I could define a --runslow option to some tests. This way, I don't have to run them all the time if not necessary.
Python
bsd-3-clause
achabotl/pambox
Add pytest config file for slow tests. Added a pytest config file in the tests folder, so that I could define a --runslow option to some tests. This way, I don't have to run them all the time if not necessary.
import pytest def pytest_addoption(parser): parser.addoption("--runslow", action="store_true", help="run slow tests") def pytest_runtest_setup(item): if 'slow' in item.keywords and not item.config.getoption("--runslow"): pytest.skip("need --runslow option to run")
<commit_before><commit_msg>Add pytest config file for slow tests. Added a pytest config file in the tests folder, so that I could define a --runslow option to some tests. This way, I don't have to run them all the time if not necessary.<commit_after>
import pytest def pytest_addoption(parser): parser.addoption("--runslow", action="store_true", help="run slow tests") def pytest_runtest_setup(item): if 'slow' in item.keywords and not item.config.getoption("--runslow"): pytest.skip("need --runslow option to run")
Add pytest config file for slow tests. Added a pytest config file in the tests folder, so that I could define a --runslow option to some tests. This way, I don't have to run them all the time if not necessary.import pytest def pytest_addoption(parser): parser.addoption("--runslow", action="store_true", h...
<commit_before><commit_msg>Add pytest config file for slow tests. Added a pytest config file in the tests folder, so that I could define a --runslow option to some tests. This way, I don't have to run them all the time if not necessary.<commit_after>import pytest def pytest_addoption(parser): parser.addoption("-...
d4aab57bf6173334fa2dbd82eef74b786473ef3d
djangosaml2/templatetags/idplist.py
djangosaml2/templatetags/idplist.py
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
Load the config as late as possible to avoid crashing when the configuration is not ready yet. Also this code is more reentrant
Load the config as late as possible to avoid crashing when the configuration is not ready yet. Also this code is more reentrant
Python
apache-2.0
WebSpider/djangosaml2,writepython/djangosaml2,BetterWorks/djangosaml2,damienmarie-alation/djangosaml2,BetterWorks/djangosaml2,MiguelSR/djangosaml2,bernii/djangosaml2,damienmarie-alation/djangosaml2,knaperek/djangosaml2,WebSpider/djangosaml2,writepython/djangosaml2,MiguelSR/djangosaml2,knaperek/djangosaml2,azavea/django...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before># Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # 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 req...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
# Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applic...
<commit_before># Copyright (C) 2011 Yaco Sistemas (http://www.yaco.es) # # 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 req...
9e8b32928c068237e34a7c319564333bbed59cb7
pox/messenger/test_client.py
pox/messenger/test_client.py
#!/usr/bin/env python # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
Add a small test client program
messenger: Add a small test client program
Python
apache-2.0
waltznetworks/pox,waltznetworks/pox,PrincetonUniversity/pox,andiwundsam/_of_normalize,VamsikrishnaNallabothu/pox,jacobq/csci5221-viro-project,chenyuntc/pox,diogommartins/pox,carlye566/IoT-POX,pthien92/sdn,adusia/pox,pthien92/sdn,pthien92/sdn,carlye566/IoT-POX,pthien92/sdn,waltznetworks/pox,kulawczukmarcin/mypox,Princet...
messenger: Add a small test client program
#!/usr/bin/env python # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
<commit_before><commit_msg>messenger: Add a small test client program<commit_after>
#!/usr/bin/env python # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later ver...
messenger: Add a small test client program#!/usr/bin/env python # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the Li...
<commit_before><commit_msg>messenger: Add a small test client program<commit_after>#!/usr/bin/env python # Copyright 2012 James McCauley # # This file is part of POX. # # POX is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Softwa...
1210f01eddf1979f9a8a4c9eed429d43e3fd7d53
i3pystatus/online.py
i3pystatus/online.py
from i3pystatus import IntervalModule from i3pystatus.core.util import internet class Online(IntervalModule): """Show internet connection status.""" settings = ( ("color", "Text color when online"), ('color_offline', 'Text color when offline'), ('format_online', 'Status text when onl...
Add simple module to show internet connection
Add simple module to show internet connection
Python
mit
schroeji/i3pystatus,richese/i3pystatus,yang-ling/i3pystatus,fmarchenko/i3pystatus,facetoe/i3pystatus,ncoop/i3pystatus,juliushaertl/i3pystatus,Arvedui/i3pystatus,juliushaertl/i3pystatus,m45t3r/i3pystatus,facetoe/i3pystatus,enkore/i3pystatus,eBrnd/i3pystatus,enkore/i3pystatus,drwahl/i3pystatus,teto/i3pystatus,asmikhailov...
Add simple module to show internet connection
from i3pystatus import IntervalModule from i3pystatus.core.util import internet class Online(IntervalModule): """Show internet connection status.""" settings = ( ("color", "Text color when online"), ('color_offline', 'Text color when offline'), ('format_online', 'Status text when onl...
<commit_before><commit_msg>Add simple module to show internet connection<commit_after>
from i3pystatus import IntervalModule from i3pystatus.core.util import internet class Online(IntervalModule): """Show internet connection status.""" settings = ( ("color", "Text color when online"), ('color_offline', 'Text color when offline'), ('format_online', 'Status text when onl...
Add simple module to show internet connectionfrom i3pystatus import IntervalModule from i3pystatus.core.util import internet class Online(IntervalModule): """Show internet connection status.""" settings = ( ("color", "Text color when online"), ('color_offline', 'Text color when offline'), ...
<commit_before><commit_msg>Add simple module to show internet connection<commit_after>from i3pystatus import IntervalModule from i3pystatus.core.util import internet class Online(IntervalModule): """Show internet connection status.""" settings = ( ("color", "Text color when online"), ('color...
a6f1d1e7ca63a4d204aade3b0f67b53c1e867609
scripts/feature/stage4_24h_heavy.py
scripts/feature/stage4_24h_heavy.py
""" Create a plot of today's total precipitation from the Stage4 estimates """ import pygrib import mx.DateTime import iemplot import numpy import os, sys def doday(): """ Create a plot of precipitation stage4 estimates for some day """ sts = mx.DateTime.DateTime(2010,4,1,12) ets = mx.DateTime.Dat...
Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr
Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr
Python
mit
akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem,akrherz/iem
Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr
""" Create a plot of today's total precipitation from the Stage4 estimates """ import pygrib import mx.DateTime import iemplot import numpy import os, sys def doday(): """ Create a plot of precipitation stage4 estimates for some day """ sts = mx.DateTime.DateTime(2010,4,1,12) ets = mx.DateTime.Dat...
<commit_before><commit_msg>Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr<commit_after>
""" Create a plot of today's total precipitation from the Stage4 estimates """ import pygrib import mx.DateTime import iemplot import numpy import os, sys def doday(): """ Create a plot of precipitation stage4 estimates for some day """ sts = mx.DateTime.DateTime(2010,4,1,12) ets = mx.DateTime.Dat...
Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr""" Create a plot of today's total precipitation from the Stage4 estimates """ import pygrib import mx.DateTime import iemplot import numpy import os, sys def doday(): """ Create a plot of precipitation stage4 estimates for some day "...
<commit_before><commit_msg>Add script to run on IEM to compute days of 1+ inch rainfall since 1 Apr<commit_after>""" Create a plot of today's total precipitation from the Stage4 estimates """ import pygrib import mx.DateTime import iemplot import numpy import os, sys def doday(): """ Create a plot of precipit...
c20e83fc946c8898d40b0210f71286575891ae94
debug_toolbar/panels/__init__.py
debug_toolbar/panels/__init__.py
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
Correct some issues with the stats methods
Correct some issues with the stats methods
Python
bsd-3-clause
megcunningham/django-debug-toolbar,spookylukey/django-debug-toolbar,megcunningham/django-debug-toolbar,tim-schilling/django-debug-toolbar,calvinpy/django-debug-toolbar,barseghyanartur/django-debug-toolbar,Endika/django-debug-toolbar,spookylukey/django-debug-toolbar,megcunningham/django-debug-toolbar,ChristosChristofidi...
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
<commit_before>from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll ma...
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll maintain a local ...
<commit_before>from django.template.defaultfilters import slugify from debug_toolbar.middleware import DebugToolbarMiddleware class DebugPanel(object): """ Base class for debug panels. """ # name = Base has_content = False # If content returns something, set to true in subclass # We'll ma...
e6318e03697034ba40ebd33666c1cf3d2f9a7bc5
02_task/sample_tests_v2.py
02_task/sample_tests_v2.py
import unittest import solution as s class SampleTest(unittest.TestCase): def test_five_plus_three(self): plus = s.create_operator('+', lambda lhs, rhs: lhs + rhs) x = s.create_variable('x') y = s.create_variable('y') added_expression = s.create_expression((x, plus, y)) sel...
Add 02-task sample test v2.
Add 02-task sample test v2.
Python
mit
pepincho/Python-Course-FMI
Add 02-task sample test v2.
import unittest import solution as s class SampleTest(unittest.TestCase): def test_five_plus_three(self): plus = s.create_operator('+', lambda lhs, rhs: lhs + rhs) x = s.create_variable('x') y = s.create_variable('y') added_expression = s.create_expression((x, plus, y)) sel...
<commit_before><commit_msg>Add 02-task sample test v2.<commit_after>
import unittest import solution as s class SampleTest(unittest.TestCase): def test_five_plus_three(self): plus = s.create_operator('+', lambda lhs, rhs: lhs + rhs) x = s.create_variable('x') y = s.create_variable('y') added_expression = s.create_expression((x, plus, y)) sel...
Add 02-task sample test v2.import unittest import solution as s class SampleTest(unittest.TestCase): def test_five_plus_three(self): plus = s.create_operator('+', lambda lhs, rhs: lhs + rhs) x = s.create_variable('x') y = s.create_variable('y') added_expression = s.create_expressio...
<commit_before><commit_msg>Add 02-task sample test v2.<commit_after>import unittest import solution as s class SampleTest(unittest.TestCase): def test_five_plus_three(self): plus = s.create_operator('+', lambda lhs, rhs: lhs + rhs) x = s.create_variable('x') y = s.create_variable('y') ...
ce5a657c4a8205879de8d46fe1c4ea2966808879
tests/test_api.py
tests/test_api.py
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
Add first unit test for api
Add first unit test for api
Python
mpl-2.0
jmlong1027/multiscanner,jmlong1027/multiscanner,MITRECND/multiscanner,MITRECND/multiscanner,jmlong1027/multiscanner,mitre/multiscanner,jmlong1027/multiscanner,awest1339/multiscanner,awest1339/multiscanner,mitre/multiscanner,awest1339/multiscanner,awest1339/multiscanner,mitre/multiscanner
Add first unit test for api
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
<commit_before><commit_msg>Add first unit test for api<commit_after>
import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.join(MS_WD, 'utils')) # Use mu...
Add first unit test for apiimport os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys.path: sys.path.insert(0, os.path.joi...
<commit_before><commit_msg>Add first unit test for api<commit_after>import os import sys import json import responses import unittest CWD = os.path.dirname(os.path.abspath(__file__)) MS_WD = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Allow import of api.py if os.path.join(MS_WD, 'utils') not in sys...
77274f00cf1f4c3b99289fa0c21461e207cdfcb8
tests/test_zip.py
tests/test_zip.py
# -*- coding:utf-8 -*- import os import glob import zipfile from sigal.gallery import Gallery from sigal.settings import read_settings CURRENT_DIR = os.path.dirname(__file__) SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample') SAMPLE_SOURCE = os.path.join(SAMPLE_DIR, 'pictures', 'dir1') def make_gallery(**kwargs): ...
Add test cases for zipping galleries
Add test cases for zipping galleries
Python
mit
Ferada/sigal,cbosdo/sigal,xouillet/sigal,elaOnMars/sigal,kontza/sigal,jdn06/sigal,xouillet/sigal,saimn/sigal,cbosdo/sigal,kontza/sigal,jdn06/sigal,jasuarez/sigal,franek/sigal,Ferada/sigal,jdn06/sigal,saimn/sigal,muggenhor/sigal,elaOnMars/sigal,t-animal/sigal,franek/sigal,kontza/sigal,t-animal/sigal,jasuarez/sigal,Ferad...
Add test cases for zipping galleries
# -*- coding:utf-8 -*- import os import glob import zipfile from sigal.gallery import Gallery from sigal.settings import read_settings CURRENT_DIR = os.path.dirname(__file__) SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample') SAMPLE_SOURCE = os.path.join(SAMPLE_DIR, 'pictures', 'dir1') def make_gallery(**kwargs): ...
<commit_before><commit_msg>Add test cases for zipping galleries<commit_after>
# -*- coding:utf-8 -*- import os import glob import zipfile from sigal.gallery import Gallery from sigal.settings import read_settings CURRENT_DIR = os.path.dirname(__file__) SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample') SAMPLE_SOURCE = os.path.join(SAMPLE_DIR, 'pictures', 'dir1') def make_gallery(**kwargs): ...
Add test cases for zipping galleries# -*- coding:utf-8 -*- import os import glob import zipfile from sigal.gallery import Gallery from sigal.settings import read_settings CURRENT_DIR = os.path.dirname(__file__) SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample') SAMPLE_SOURCE = os.path.join(SAMPLE_DIR, 'pictures', 'dir...
<commit_before><commit_msg>Add test cases for zipping galleries<commit_after># -*- coding:utf-8 -*- import os import glob import zipfile from sigal.gallery import Gallery from sigal.settings import read_settings CURRENT_DIR = os.path.dirname(__file__) SAMPLE_DIR = os.path.join(CURRENT_DIR, 'sample') SAMPLE_SOURCE = ...
c3c5128726e86436a7c7413c60c578410750d2c1
oscar/apps/customer/auth_backends.py
oscar/apps/customer/auth_backends.py
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
Fix bug with updated auth backend
Fix bug with updated auth backend Now it checks to see if an email is being submitted.
Python
bsd-3-clause
Jannes123/django-oscar,amirrpp/django-oscar,Bogh/django-oscar,michaelkuty/django-oscar,jinnykoo/christmas,pasqualguerrero/django-oscar,rocopartners/django-oscar,pdonadeo/django-oscar,eddiep1101/django-oscar,adamend/django-oscar,jinnykoo/wuyisj,jmt4/django-oscar,jlmadurga/django-oscar,itbabu/django-oscar,jinnykoo/wuyisj...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
<commit_before>from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
<commit_before>from django.contrib.auth.models import User from django.contrib.auth.backends import ModelBackend class Emailbackend(ModelBackend): def authenticate(self, email=None, password=None, *args, **kwargs): if email is None: if not 'username' in kwargs or kwargs['username'] is None: ...
63d2d3cd16cd4f7f2bedb748f84fefa4e6c32661
ET_Utils/WATERS_Utils/event_indexing_client.py
ET_Utils/WATERS_Utils/event_indexing_client.py
"""Wrapper with convenience functions for EPA WATERS Event Indexing Service.""" import json try: from urllib2 import urlopen # Python 2 except: from urllib.request import urlopen # Python 3 _base_url = 'http://ofmpub.epa.gov/waters10/EventIndexing.Service?' def trace_downstream(start_latitude, start_longi...
Add event indexing service client
Add event indexing service client Add script that serves as client to EPA Event Indexing Service. The script has a convenience function for querying EPA with minimal arguments and returns GeoJSON.
Python
mit
Harefoot/TurboQUALTX
Add event indexing service client Add script that serves as client to EPA Event Indexing Service. The script has a convenience function for querying EPA with minimal arguments and returns GeoJSON.
"""Wrapper with convenience functions for EPA WATERS Event Indexing Service.""" import json try: from urllib2 import urlopen # Python 2 except: from urllib.request import urlopen # Python 3 _base_url = 'http://ofmpub.epa.gov/waters10/EventIndexing.Service?' def trace_downstream(start_latitude, start_longi...
<commit_before><commit_msg>Add event indexing service client Add script that serves as client to EPA Event Indexing Service. The script has a convenience function for querying EPA with minimal arguments and returns GeoJSON.<commit_after>
"""Wrapper with convenience functions for EPA WATERS Event Indexing Service.""" import json try: from urllib2 import urlopen # Python 2 except: from urllib.request import urlopen # Python 3 _base_url = 'http://ofmpub.epa.gov/waters10/EventIndexing.Service?' def trace_downstream(start_latitude, start_longi...
Add event indexing service client Add script that serves as client to EPA Event Indexing Service. The script has a convenience function for querying EPA with minimal arguments and returns GeoJSON."""Wrapper with convenience functions for EPA WATERS Event Indexing Service.""" import json try: from urllib2 import u...
<commit_before><commit_msg>Add event indexing service client Add script that serves as client to EPA Event Indexing Service. The script has a convenience function for querying EPA with minimal arguments and returns GeoJSON.<commit_after>"""Wrapper with convenience functions for EPA WATERS Event Indexing Service.""" i...
1dc07f52ea90a50e40d550193f8ac19b5086f208
angr/procedures/java_util/random.py
angr/procedures/java_util/random.py
from ..java import JavaSimProcedure from angr.engines.soot.values.thisref import SimSootValue_ThisRef from angr.engines.soot.values.instancefieldref import SimSootValue_InstanceFieldRef import logging import claripy class NextInt(JavaSimProcedure): __provides__ = ( ("java.util.Random", "nextInt(int)"), ...
Add sim procedure for Random.nextInt
Add sim procedure for Random.nextInt
Python
bsd-2-clause
iamahuman/angr,iamahuman/angr,angr/angr,angr/angr,iamahuman/angr,schieb/angr,angr/angr,schieb/angr,schieb/angr
Add sim procedure for Random.nextInt
from ..java import JavaSimProcedure from angr.engines.soot.values.thisref import SimSootValue_ThisRef from angr.engines.soot.values.instancefieldref import SimSootValue_InstanceFieldRef import logging import claripy class NextInt(JavaSimProcedure): __provides__ = ( ("java.util.Random", "nextInt(int)"), ...
<commit_before><commit_msg>Add sim procedure for Random.nextInt<commit_after>
from ..java import JavaSimProcedure from angr.engines.soot.values.thisref import SimSootValue_ThisRef from angr.engines.soot.values.instancefieldref import SimSootValue_InstanceFieldRef import logging import claripy class NextInt(JavaSimProcedure): __provides__ = ( ("java.util.Random", "nextInt(int)"), ...
Add sim procedure for Random.nextIntfrom ..java import JavaSimProcedure from angr.engines.soot.values.thisref import SimSootValue_ThisRef from angr.engines.soot.values.instancefieldref import SimSootValue_InstanceFieldRef import logging import claripy class NextInt(JavaSimProcedure): __provides__ = ( ("j...
<commit_before><commit_msg>Add sim procedure for Random.nextInt<commit_after>from ..java import JavaSimProcedure from angr.engines.soot.values.thisref import SimSootValue_ThisRef from angr.engines.soot.values.instancefieldref import SimSootValue_InstanceFieldRef import logging import claripy class NextInt(JavaSimProc...
8d1b233c336298f2929a176d0bc6c7279dc07853
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/PeerSelector.py
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/PeerSelector.py
import sets import Axon class PeerSelector(Axon.Component.component): Inboxes = {"inbox" : "", "control" : "", "addPeer" : "", "peerSet" : "" } def __init__(self, localport, localaddress=None): super(PeerSelector, self).__init__() self....
Add a simple peer selector which automatically connects to any new jam instance it hears about
Add a simple peer selector which automatically connects to any new jam instance it hears about
Python
apache-2.0
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Add a simple peer selector which automatically connects to any new jam instance it hears about
import sets import Axon class PeerSelector(Axon.Component.component): Inboxes = {"inbox" : "", "control" : "", "addPeer" : "", "peerSet" : "" } def __init__(self, localport, localaddress=None): super(PeerSelector, self).__init__() self....
<commit_before><commit_msg>Add a simple peer selector which automatically connects to any new jam instance it hears about<commit_after>
import sets import Axon class PeerSelector(Axon.Component.component): Inboxes = {"inbox" : "", "control" : "", "addPeer" : "", "peerSet" : "" } def __init__(self, localport, localaddress=None): super(PeerSelector, self).__init__() self....
Add a simple peer selector which automatically connects to any new jam instance it hears aboutimport sets import Axon class PeerSelector(Axon.Component.component): Inboxes = {"inbox" : "", "control" : "", "addPeer" : "", "peerSet" : "" } def __init__(s...
<commit_before><commit_msg>Add a simple peer selector which automatically connects to any new jam instance it hears about<commit_after>import sets import Axon class PeerSelector(Axon.Component.component): Inboxes = {"inbox" : "", "control" : "", "addPeer" : "", "peerSet...
bf15370e98a015fd0a989f7df2be6ba0383fbd78
submissions/McLean/myLogic.py
submissions/McLean/myLogic.py
cats = { 'kb': ''' Name(Felis, Catus) Name2(Catus, Cat) Name(Felis, Chaus) Name2(Chaus, JungleCat) Name(Panthera, Tigris) Name2(Tigris, Tiger) Name(Panthera, Onca) Name2(Onca, Jaguar) Name(Panthera, Pardus) Name2(Pardus, Leopared) Name(Panthera, Leo) Name2(Leo, Lion) Name(Felinae, Lynx) Name2(Lynx, Lynx) Name(Ac...
Bring my Github up to date, with latest CSP.
Bring my Github up to date, with latest CSP.
Python
mit
JoeLaMartina/AlphametricProject,NolanBecker/aima-python,AmberJBlue/aima-python,JamesDickenson/aima-python,AmberJBlue/aima-python,SimeonFritz/aima-python,jottenlips/aima-python,chandlercr/aima-python,WmHHooper/aima-python,AmberJBlue/aima-python,abbeymiles/aima-python,WhittKinley/aima-python,WmHHooper/aima-python,grantvk...
Bring my Github up to date, with latest CSP.
cats = { 'kb': ''' Name(Felis, Catus) Name2(Catus, Cat) Name(Felis, Chaus) Name2(Chaus, JungleCat) Name(Panthera, Tigris) Name2(Tigris, Tiger) Name(Panthera, Onca) Name2(Onca, Jaguar) Name(Panthera, Pardus) Name2(Pardus, Leopared) Name(Panthera, Leo) Name2(Leo, Lion) Name(Felinae, Lynx) Name2(Lynx, Lynx) Name(Ac...
<commit_before><commit_msg>Bring my Github up to date, with latest CSP.<commit_after>
cats = { 'kb': ''' Name(Felis, Catus) Name2(Catus, Cat) Name(Felis, Chaus) Name2(Chaus, JungleCat) Name(Panthera, Tigris) Name2(Tigris, Tiger) Name(Panthera, Onca) Name2(Onca, Jaguar) Name(Panthera, Pardus) Name2(Pardus, Leopared) Name(Panthera, Leo) Name2(Leo, Lion) Name(Felinae, Lynx) Name2(Lynx, Lynx) Name(Ac...
Bring my Github up to date, with latest CSP.cats = { 'kb': ''' Name(Felis, Catus) Name2(Catus, Cat) Name(Felis, Chaus) Name2(Chaus, JungleCat) Name(Panthera, Tigris) Name2(Tigris, Tiger) Name(Panthera, Onca) Name2(Onca, Jaguar) Name(Panthera, Pardus) Name2(Pardus, Leopared) Name(Panthera, Leo) Name2(Leo, Lion) N...
<commit_before><commit_msg>Bring my Github up to date, with latest CSP.<commit_after>cats = { 'kb': ''' Name(Felis, Catus) Name2(Catus, Cat) Name(Felis, Chaus) Name2(Chaus, JungleCat) Name(Panthera, Tigris) Name2(Tigris, Tiger) Name(Panthera, Onca) Name2(Onca, Jaguar) Name(Panthera, Pardus) Name2(Pardus, Leopare...
b27ae2b78d5d21e4a1f5e9fbeba5433e62cd4057
source/create_prophage_tbl.py
source/create_prophage_tbl.py
""" Create a prophage.tbl file from a phispy directory that does not contain one. """ import os import sys import argparse from evaluation import make_prophage_tbl def make_new_prophage_tbl(phispydir): """ Make a new prophage table :param phispydir: the directory to read the input and create the output ...
Make a new prophage dir
Make a new prophage dir
Python
mit
linsalrob/PhiSpy,linsalrob/PhiSpy,linsalrob/PhiSpy,linsalrob/PhiSpy
Make a new prophage dir
""" Create a prophage.tbl file from a phispy directory that does not contain one. """ import os import sys import argparse from evaluation import make_prophage_tbl def make_new_prophage_tbl(phispydir): """ Make a new prophage table :param phispydir: the directory to read the input and create the output ...
<commit_before><commit_msg>Make a new prophage dir<commit_after>
""" Create a prophage.tbl file from a phispy directory that does not contain one. """ import os import sys import argparse from evaluation import make_prophage_tbl def make_new_prophage_tbl(phispydir): """ Make a new prophage table :param phispydir: the directory to read the input and create the output ...
Make a new prophage dir""" Create a prophage.tbl file from a phispy directory that does not contain one. """ import os import sys import argparse from evaluation import make_prophage_tbl def make_new_prophage_tbl(phispydir): """ Make a new prophage table :param phispydir: the directory to read the input ...
<commit_before><commit_msg>Make a new prophage dir<commit_after>""" Create a prophage.tbl file from a phispy directory that does not contain one. """ import os import sys import argparse from evaluation import make_prophage_tbl def make_new_prophage_tbl(phispydir): """ Make a new prophage table :param ph...
60a27341bb469943271047781a4be8a38b39825a
sara_flexbe_states/src/sara_flexbe_states/WonderlandGetPersonById.py
sara_flexbe_states/src/sara_flexbe_states/WonderlandGetPersonById.py
#!/usr/bin/env python # encoding=utf8 import json import requests from flexbe_core import EventState from rospy import logerr, loginfo from sara_msgs.msg import Entity """ Created on 15/05/2018 @author: Lucas Maurice """ class WonderlandGetPersonById(EventState): ''' Find a person by ID. ># id ...
Create the state for get a person from database.
Create the state for get a person from database.
Python
bsd-3-clause
WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors
Create the state for get a person from database.
#!/usr/bin/env python # encoding=utf8 import json import requests from flexbe_core import EventState from rospy import logerr, loginfo from sara_msgs.msg import Entity """ Created on 15/05/2018 @author: Lucas Maurice """ class WonderlandGetPersonById(EventState): ''' Find a person by ID. ># id ...
<commit_before><commit_msg>Create the state for get a person from database.<commit_after>
#!/usr/bin/env python # encoding=utf8 import json import requests from flexbe_core import EventState from rospy import logerr, loginfo from sara_msgs.msg import Entity """ Created on 15/05/2018 @author: Lucas Maurice """ class WonderlandGetPersonById(EventState): ''' Find a person by ID. ># id ...
Create the state for get a person from database.#!/usr/bin/env python # encoding=utf8 import json import requests from flexbe_core import EventState from rospy import logerr, loginfo from sara_msgs.msg import Entity """ Created on 15/05/2018 @author: Lucas Maurice """ class WonderlandGetPersonById(EventState): ...
<commit_before><commit_msg>Create the state for get a person from database.<commit_after>#!/usr/bin/env python # encoding=utf8 import json import requests from flexbe_core import EventState from rospy import logerr, loginfo from sara_msgs.msg import Entity """ Created on 15/05/2018 @author: Lucas Maurice """ clas...
99d6a8d2c1c59dcac90ddd9b3958ed5d74d66a2a
tests/integration/test_sns.py
tests/integration/test_sns.py
import os from asyncaws import SNS from tornado.testing import AsyncTestCase, gen_test from random import randint aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] aws_region = os.environ['AWS_REGION'] class TestSQS(AsyncTestCase): @classmethod def setUpClass(c...
Add integration test for sns
Add integration test for sns
Python
mit
MA3STR0/AsyncAWS
Add integration test for sns
import os from asyncaws import SNS from tornado.testing import AsyncTestCase, gen_test from random import randint aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] aws_region = os.environ['AWS_REGION'] class TestSQS(AsyncTestCase): @classmethod def setUpClass(c...
<commit_before><commit_msg>Add integration test for sns<commit_after>
import os from asyncaws import SNS from tornado.testing import AsyncTestCase, gen_test from random import randint aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] aws_region = os.environ['AWS_REGION'] class TestSQS(AsyncTestCase): @classmethod def setUpClass(c...
Add integration test for snsimport os from asyncaws import SNS from tornado.testing import AsyncTestCase, gen_test from random import randint aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] aws_region = os.environ['AWS_REGION'] class TestSQS(AsyncTestCase): @clas...
<commit_before><commit_msg>Add integration test for sns<commit_after>import os from asyncaws import SNS from tornado.testing import AsyncTestCase, gen_test from random import randint aws_key_id = os.environ['AWS_ACCESS_KEY_ID'] aws_key_secret = os.environ['AWS_SECRET_ACCESS_KEY'] aws_region = os.environ['AWS_REGION'] ...
45685a739efdd215623ca1364f979ed3b5444367
tests/test_deploy.py
tests/test_deploy.py
#!/usr/bin/env python # coding=utf-8 import unittest from shub import deploy from click.testing import CliRunner from mock import Mock class DeployTest(unittest.TestCase): def setUp(self): self.runner = CliRunner() def test_fails_when_deploy_is_invoked_outside_of_a_scrapy_project(self): # g...
Add simple tests for shub deploy
Add simple tests for shub deploy
Python
bsd-3-clause
scrapinghub/shub
Add simple tests for shub deploy
#!/usr/bin/env python # coding=utf-8 import unittest from shub import deploy from click.testing import CliRunner from mock import Mock class DeployTest(unittest.TestCase): def setUp(self): self.runner = CliRunner() def test_fails_when_deploy_is_invoked_outside_of_a_scrapy_project(self): # g...
<commit_before><commit_msg>Add simple tests for shub deploy<commit_after>
#!/usr/bin/env python # coding=utf-8 import unittest from shub import deploy from click.testing import CliRunner from mock import Mock class DeployTest(unittest.TestCase): def setUp(self): self.runner = CliRunner() def test_fails_when_deploy_is_invoked_outside_of_a_scrapy_project(self): # g...
Add simple tests for shub deploy#!/usr/bin/env python # coding=utf-8 import unittest from shub import deploy from click.testing import CliRunner from mock import Mock class DeployTest(unittest.TestCase): def setUp(self): self.runner = CliRunner() def test_fails_when_deploy_is_invoked_outside_of_a_s...
<commit_before><commit_msg>Add simple tests for shub deploy<commit_after>#!/usr/bin/env python # coding=utf-8 import unittest from shub import deploy from click.testing import CliRunner from mock import Mock class DeployTest(unittest.TestCase): def setUp(self): self.runner = CliRunner() def test_fa...
b90ef0acfec29aaf317dadce7122e97c8cc103c4
tests/test_orbits.py
tests/test_orbits.py
##########################TESTS ON MULTIPLE ORBITS############################# import numpy from galpy import potential # Test that integrating Orbits agrees with integrating multiple Orbit instances def test_integration_1d(): from galpy.orbit import Orbit, Orbits times= numpy.linspace(0.,10.,1001) orbits...
Test that 1D orbit integration agrees between Orbit and Orbits
Test that 1D orbit integration agrees between Orbit and Orbits
Python
bsd-3-clause
jobovy/galpy,jobovy/galpy,jobovy/galpy,jobovy/galpy
Test that 1D orbit integration agrees between Orbit and Orbits
##########################TESTS ON MULTIPLE ORBITS############################# import numpy from galpy import potential # Test that integrating Orbits agrees with integrating multiple Orbit instances def test_integration_1d(): from galpy.orbit import Orbit, Orbits times= numpy.linspace(0.,10.,1001) orbits...
<commit_before><commit_msg>Test that 1D orbit integration agrees between Orbit and Orbits<commit_after>
##########################TESTS ON MULTIPLE ORBITS############################# import numpy from galpy import potential # Test that integrating Orbits agrees with integrating multiple Orbit instances def test_integration_1d(): from galpy.orbit import Orbit, Orbits times= numpy.linspace(0.,10.,1001) orbits...
Test that 1D orbit integration agrees between Orbit and Orbits##########################TESTS ON MULTIPLE ORBITS############################# import numpy from galpy import potential # Test that integrating Orbits agrees with integrating multiple Orbit instances def test_integration_1d(): from galpy.orbit import O...
<commit_before><commit_msg>Test that 1D orbit integration agrees between Orbit and Orbits<commit_after>##########################TESTS ON MULTIPLE ORBITS############################# import numpy from galpy import potential # Test that integrating Orbits agrees with integrating multiple Orbit instances def test_integr...
876a182de54b2f1fc54cc051646fc04cd400a81c
migrations/versions/3be107806e62_make_testartifact_cascade_on_test_delete.py
migrations/versions/3be107806e62_make_testartifact_cascade_on_test_delete.py
"""Make testartifact cascade on test delete Revision ID: 3be107806e62 Revises: 3bf1066f4935 Create Date: 2016-07-06 18:42:33.893405 """ # revision identifiers, used by Alembic. revision = '3be107806e62' down_revision = '3bf1066f4935' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_constr...
Add migration to make testartifact actually CASCADE on delete.
Add migration to make testartifact actually CASCADE on delete. Summary: This is alright if we don't care much about having dangling references on S3/ArtifactStore (such as if we clean them separately). Reviewers: paulruan Reviewed By: paulruan Subscribers: changesbot, kylec Differential Revision: https://tails.cor...
Python
apache-2.0
dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes
Add migration to make testartifact actually CASCADE on delete. Summary: This is alright if we don't care much about having dangling references on S3/ArtifactStore (such as if we clean them separately). Reviewers: paulruan Reviewed By: paulruan Subscribers: changesbot, kylec Differential Revision: https://tails.cor...
"""Make testartifact cascade on test delete Revision ID: 3be107806e62 Revises: 3bf1066f4935 Create Date: 2016-07-06 18:42:33.893405 """ # revision identifiers, used by Alembic. revision = '3be107806e62' down_revision = '3bf1066f4935' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_constr...
<commit_before><commit_msg>Add migration to make testartifact actually CASCADE on delete. Summary: This is alright if we don't care much about having dangling references on S3/ArtifactStore (such as if we clean them separately). Reviewers: paulruan Reviewed By: paulruan Subscribers: changesbot, kylec Differential ...
"""Make testartifact cascade on test delete Revision ID: 3be107806e62 Revises: 3bf1066f4935 Create Date: 2016-07-06 18:42:33.893405 """ # revision identifiers, used by Alembic. revision = '3be107806e62' down_revision = '3bf1066f4935' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_constr...
Add migration to make testartifact actually CASCADE on delete. Summary: This is alright if we don't care much about having dangling references on S3/ArtifactStore (such as if we clean them separately). Reviewers: paulruan Reviewed By: paulruan Subscribers: changesbot, kylec Differential Revision: https://tails.cor...
<commit_before><commit_msg>Add migration to make testartifact actually CASCADE on delete. Summary: This is alright if we don't care much about having dangling references on S3/ArtifactStore (such as if we clean them separately). Reviewers: paulruan Reviewed By: paulruan Subscribers: changesbot, kylec Differential ...
737000499967a9c910e60868227de9a923f0555e
FibonacciSeries.py
FibonacciSeries.py
import sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) input_file = sys.argv[1] with open(input_file, 'r') as test_cases: for case in test_cases: number = int(case.rstrip()) print(fibonacci(number)) sy...
Solve the Fibonacci Series challenge
Solve the Fibonacci Series challenge
Python
mit
TommyN94/CodeEvalSolutions,TommyN94/CodeEvalSolutions
Solve the Fibonacci Series challenge
import sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) input_file = sys.argv[1] with open(input_file, 'r') as test_cases: for case in test_cases: number = int(case.rstrip()) print(fibonacci(number)) sy...
<commit_before><commit_msg>Solve the Fibonacci Series challenge<commit_after>
import sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) input_file = sys.argv[1] with open(input_file, 'r') as test_cases: for case in test_cases: number = int(case.rstrip()) print(fibonacci(number)) sy...
Solve the Fibonacci Series challengeimport sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) input_file = sys.argv[1] with open(input_file, 'r') as test_cases: for case in test_cases: number = int(case.rstrip())...
<commit_before><commit_msg>Solve the Fibonacci Series challenge<commit_after>import sys def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n-1) + fibonacci(n-2) input_file = sys.argv[1] with open(input_file, 'r') as test_cases: for case in test_c...
2b2b7101dfe6953da2a482dfcf16f94eba3c08aa
master_data/tests/test_models.py
master_data/tests/test_models.py
from django.test import TestCase from django.core.exceptions import ValidationError from master_data.models import Nationality class NationalityModeTestCases(TestCase): def setUp(self): self.nationality, created = Nationality(name='Egyptian') def test_create_new_nationality(self): new_nation...
Add test for nationality model
Add test for nationality model
Python
mit
EmadMokhtar/halaqat,EmadMokhtar/halaqat,EmadMokhtar/halaqat
Add test for nationality model
from django.test import TestCase from django.core.exceptions import ValidationError from master_data.models import Nationality class NationalityModeTestCases(TestCase): def setUp(self): self.nationality, created = Nationality(name='Egyptian') def test_create_new_nationality(self): new_nation...
<commit_before><commit_msg>Add test for nationality model<commit_after>
from django.test import TestCase from django.core.exceptions import ValidationError from master_data.models import Nationality class NationalityModeTestCases(TestCase): def setUp(self): self.nationality, created = Nationality(name='Egyptian') def test_create_new_nationality(self): new_nation...
Add test for nationality modelfrom django.test import TestCase from django.core.exceptions import ValidationError from master_data.models import Nationality class NationalityModeTestCases(TestCase): def setUp(self): self.nationality, created = Nationality(name='Egyptian') def test_create_new_nationa...
<commit_before><commit_msg>Add test for nationality model<commit_after>from django.test import TestCase from django.core.exceptions import ValidationError from master_data.models import Nationality class NationalityModeTestCases(TestCase): def setUp(self): self.nationality, created = Nationality(name='Eg...
27ee10a1a44dee6e4efce6b8187d4cb6dd448e7b
tests/compiler/method_definition.py
tests/compiler/method_definition.py
import pytest from tests.compiler import compile_base, internal_call from thinglang.compiler.errors import SelfInStaticMethod from thinglang.compiler.opcodes import OpcodePushStatic, OpcodePushLocal SELF_USE_IN_STATIC_METHOD = ''' thing Program has number n1 static does something {} '''...
Add test for self usage in static methods
Add test for self usage in static methods
Python
mit
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
Add test for self usage in static methods
import pytest from tests.compiler import compile_base, internal_call from thinglang.compiler.errors import SelfInStaticMethod from thinglang.compiler.opcodes import OpcodePushStatic, OpcodePushLocal SELF_USE_IN_STATIC_METHOD = ''' thing Program has number n1 static does something {} '''...
<commit_before><commit_msg>Add test for self usage in static methods<commit_after>
import pytest from tests.compiler import compile_base, internal_call from thinglang.compiler.errors import SelfInStaticMethod from thinglang.compiler.opcodes import OpcodePushStatic, OpcodePushLocal SELF_USE_IN_STATIC_METHOD = ''' thing Program has number n1 static does something {} '''...
Add test for self usage in static methodsimport pytest from tests.compiler import compile_base, internal_call from thinglang.compiler.errors import SelfInStaticMethod from thinglang.compiler.opcodes import OpcodePushStatic, OpcodePushLocal SELF_USE_IN_STATIC_METHOD = ''' thing Program has number n1 stat...
<commit_before><commit_msg>Add test for self usage in static methods<commit_after>import pytest from tests.compiler import compile_base, internal_call from thinglang.compiler.errors import SelfInStaticMethod from thinglang.compiler.opcodes import OpcodePushStatic, OpcodePushLocal SELF_USE_IN_STATIC_METHOD = ''' thing...
ca346df368c7c798495243199c8693d1b44a5e7f
tests/py/test_www_team_receiving.py
tests/py/test_www_team_receiving.py
from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness class Tests(Harness): def test_receiving_returns_404_for_unapproved_teams(self): self.make_team(is_approved=False) assert self.client.GxT('/TheEnterprise/receiving/').code == ...
Add failing test for anon viewing receiving page
Add failing test for anon viewing receiving page
Python
mit
gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com,gratipay/gratipay.com
Add failing test for anon viewing receiving page
from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness class Tests(Harness): def test_receiving_returns_404_for_unapproved_teams(self): self.make_team(is_approved=False) assert self.client.GxT('/TheEnterprise/receiving/').code == ...
<commit_before><commit_msg>Add failing test for anon viewing receiving page<commit_after>
from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness class Tests(Harness): def test_receiving_returns_404_for_unapproved_teams(self): self.make_team(is_approved=False) assert self.client.GxT('/TheEnterprise/receiving/').code == ...
Add failing test for anon viewing receiving pagefrom __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness class Tests(Harness): def test_receiving_returns_404_for_unapproved_teams(self): self.make_team(is_approved=False) assert self....
<commit_before><commit_msg>Add failing test for anon viewing receiving page<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals from gratipay.testing import Harness class Tests(Harness): def test_receiving_returns_404_for_unapproved_teams(self): self.make_team...
0476e30119c02d715c8674d1e362207bd9a464c9
tests/startsymbol_tests/__init__.py
tests/startsymbol_tests/__init__.py
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
Add directory for start symbol tests
Add directory for start symbol tests
Python
mit
PatrikValkovic/grammpy
Add directory for start symbol tests
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
<commit_before><commit_msg>Add directory for start symbol tests<commit_after>
#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
Add directory for start symbol tests#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
<commit_before><commit_msg>Add directory for start symbol tests<commit_after>#!/usr/bin/env python """ :Author Patrik Valkovic :Created 23.06.2017 16:39 :Licence GNUv3 Part of grammpy """
4ff445748a0d1187cc1a6ad799564c05240a6a17
common/djangoapps/student/management/commands/anonymized_id_mapping.py
common/djangoapps/student/management/commands/anonymized_id_mapping.py
import csv import sys from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from student.models import unique_id_for_user class Command(BaseCommand): # It appears that with the way Rake invokes these commands, we can't # have more than one arg passed th...
Add mgmt cmd to generate anonymized ID mapping
Add mgmt cmd to generate anonymized ID mapping So that instructors have easy access to the mapping from anonymized IDs (a simple MD5 hash of the user ID that's used when integrating with third-party services like Qualtrics) to user IDs, we have a simple Django management command to generate a CSV mapping. To run, use ...
Python
agpl-3.0
caesar2164/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,jbassen/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,caesar2164/edx-platform,jbassen/edx-platform,Stanford-Online/edx-platform,jbassen/edx-platform,caesar2164/edx-platform,caesar2164/edx-platform,Stanford-Online/edx-platform
Add mgmt cmd to generate anonymized ID mapping So that instructors have easy access to the mapping from anonymized IDs (a simple MD5 hash of the user ID that's used when integrating with third-party services like Qualtrics) to user IDs, we have a simple Django management command to generate a CSV mapping. To run, use ...
import csv import sys from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from student.models import unique_id_for_user class Command(BaseCommand): # It appears that with the way Rake invokes these commands, we can't # have more than one arg passed th...
<commit_before><commit_msg>Add mgmt cmd to generate anonymized ID mapping So that instructors have easy access to the mapping from anonymized IDs (a simple MD5 hash of the user ID that's used when integrating with third-party services like Qualtrics) to user IDs, we have a simple Django management command to generate ...
import csv import sys from django.contrib.auth.models import User from django.core.management.base import BaseCommand, CommandError from student.models import unique_id_for_user class Command(BaseCommand): # It appears that with the way Rake invokes these commands, we can't # have more than one arg passed th...
Add mgmt cmd to generate anonymized ID mapping So that instructors have easy access to the mapping from anonymized IDs (a simple MD5 hash of the user ID that's used when integrating with third-party services like Qualtrics) to user IDs, we have a simple Django management command to generate a CSV mapping. To run, use ...
<commit_before><commit_msg>Add mgmt cmd to generate anonymized ID mapping So that instructors have easy access to the mapping from anonymized IDs (a simple MD5 hash of the user ID that's used when integrating with third-party services like Qualtrics) to user IDs, we have a simple Django management command to generate ...
318ebb141ebb50010964821145811aa36e46877f
temba/flows/migrations/0030_auto_20150825_1406.py
temba/flows/migrations/0030_auto_20150825_1406.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flows', '0029_populate_run_modified_on'), ] operations = [ migrations.AlterField( model_name='flowrun', ...
Make modified_on and org no longer be nullable
Make modified_on and org no longer be nullable
Python
agpl-3.0
tsotetsi/textily-web,reyrodrigues/EU-SMS,praekelt/rapidpro,pulilab/rapidpro,ewheeler/rapidpro,ewheeler/rapidpro,ewheeler/rapidpro,ewheeler/rapidpro,reyrodrigues/EU-SMS,reyrodrigues/EU-SMS,tsotetsi/textily-web,tsotetsi/textily-web,pulilab/rapidpro,praekelt/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro,...
Make modified_on and org no longer be nullable
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flows', '0029_populate_run_modified_on'), ] operations = [ migrations.AlterField( model_name='flowrun', ...
<commit_before><commit_msg>Make modified_on and org no longer be nullable<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flows', '0029_populate_run_modified_on'), ] operations = [ migrations.AlterField( model_name='flowrun', ...
Make modified_on and org no longer be nullable# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flows', '0029_populate_run_modified_on'), ] operations = [ migrations.AlterFie...
<commit_before><commit_msg>Make modified_on and org no longer be nullable<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('flows', '0029_populate_run_modified_on'), ] o...
fa6e1b638f7d8832498ddb75b94420607ffc109c
Python_Data/Fraction.py
Python_Data/Fraction.py
#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only def gcd(m,n): while(m%n != 0): aux = m aux2 = n m = aux2 n = aux%aux2 return n class Fraction(object): """ Represents a fraction, which consists of two integer numbers: The first one is called the numerator, and the ...
Add a class to implement a fraction in python, to deal with method overriding
Add a class to implement a fraction in python, to deal with method overriding
Python
unlicense
robotenique/RandomAccessMemory,robotenique/RandomAccessMemory,robotenique/RandomAccessMemory
Add a class to implement a fraction in python, to deal with method overriding
#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only def gcd(m,n): while(m%n != 0): aux = m aux2 = n m = aux2 n = aux%aux2 return n class Fraction(object): """ Represents a fraction, which consists of two integer numbers: The first one is called the numerator, and the ...
<commit_before><commit_msg>Add a class to implement a fraction in python, to deal with method overriding<commit_after>
#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only def gcd(m,n): while(m%n != 0): aux = m aux2 = n m = aux2 n = aux%aux2 return n class Fraction(object): """ Represents a fraction, which consists of two integer numbers: The first one is called the numerator, and the ...
Add a class to implement a fraction in python, to deal with method overriding#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only def gcd(m,n): while(m%n != 0): aux = m aux2 = n m = aux2 n = aux%aux2 return n class Fraction(object): """ Represents a fraction, which consists of...
<commit_before><commit_msg>Add a class to implement a fraction in python, to deal with method overriding<commit_after>#gdc(a,b) = gcd(b, a%b) OBS: Positive integer only def gcd(m,n): while(m%n != 0): aux = m aux2 = n m = aux2 n = aux%aux2 return n class Fraction(object): """...
1bae1bc94fea8fd9b8fe25d832ebfce07ad08a1c
utilities/build/update_xform_translate_path.py
utilities/build/update_xform_translate_path.py
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in the file identi...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that xform_translate_path gets updated to point to the folder {project.dir}/lib """ JAR_PATH_SETTING = 'xform_translate_path' impo...
Fix up local.ini updater code to look specifically for 'xform_translate_path'
Fix up local.ini updater code to look specifically for 'xform_translate_path'
Python
bsd-3-clause
puttarajubr/commcare-hq,dimagi/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,gmimano/commcaretest,dimagi/commcare-hq,puttarajubr/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,puttaraju...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in the file identi...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that xform_translate_path gets updated to point to the folder {project.dir}/lib """ JAR_PATH_SETTING = 'xform_translate_path' impo...
<commit_before>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in ...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that xform_translate_path gets updated to point to the folder {project.dir}/lib """ JAR_PATH_SETTING = 'xform_translate_path' impo...
#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in the file identi...
<commit_before>#!/usr/bin/env python # vim: ai ts=4 sts=4 et sw=4 encoding=utf-8 """ The sole purpose of the following script is to update the local.ini file used by the dimagi teamcity buildserver so that the path to xform_translate.jar is updated dynamically. It does this by identifying the jar_path_placeholder in ...
c91ab4c38fabb78842b97584356e816903f4ec0e
profile_benchmark.py
profile_benchmark.py
# Profile the basic test execution from pyresttest import resttest from pyresttest.benchmarks import Benchmark import cProfile test = Benchmark() test.warmup_runs = 0 test.benchmark_runs = 1000 test.raw_metrics = set() test.metrics = {'total_time'} test.aggregated_metrics = {'total_time': ['total','mean']} test.url =...
Add script to profile benchmarking time
Add script to profile benchmarking time
Python
apache-2.0
satish-suradkar/pyresttest,TimYi/pyresttest,janusnic/pyresttest,netjunki/pyresttest,janusnic/pyresttest,svanoort/pyresttest,sunyanhui/pyresttest,suvarnaraju/pyresttest,satish-suradkar/pyresttest,TimYi/pyresttest,sunyanhui/pyresttest,holdenweb/pyresttest,netjunki/pyresttest,MorrisJobke/pyresttest,holdenweb/pyresttest,sv...
Add script to profile benchmarking time
# Profile the basic test execution from pyresttest import resttest from pyresttest.benchmarks import Benchmark import cProfile test = Benchmark() test.warmup_runs = 0 test.benchmark_runs = 1000 test.raw_metrics = set() test.metrics = {'total_time'} test.aggregated_metrics = {'total_time': ['total','mean']} test.url =...
<commit_before><commit_msg>Add script to profile benchmarking time<commit_after>
# Profile the basic test execution from pyresttest import resttest from pyresttest.benchmarks import Benchmark import cProfile test = Benchmark() test.warmup_runs = 0 test.benchmark_runs = 1000 test.raw_metrics = set() test.metrics = {'total_time'} test.aggregated_metrics = {'total_time': ['total','mean']} test.url =...
Add script to profile benchmarking time# Profile the basic test execution from pyresttest import resttest from pyresttest.benchmarks import Benchmark import cProfile test = Benchmark() test.warmup_runs = 0 test.benchmark_runs = 1000 test.raw_metrics = set() test.metrics = {'total_time'} test.aggregated_metrics = {'to...
<commit_before><commit_msg>Add script to profile benchmarking time<commit_after># Profile the basic test execution from pyresttest import resttest from pyresttest.benchmarks import Benchmark import cProfile test = Benchmark() test.warmup_runs = 0 test.benchmark_runs = 1000 test.raw_metrics = set() test.metrics = {'to...
5eaf915f7fe6ed590e58b5cc554b4477568dda85
tests/test_processing_invariant.py
tests/test_processing_invariant.py
"""Test that we can read and write bib entries with postprocessing.""" import bibpy import pytest @pytest.fixture def test_string(): return """@article{key, author = {James Conway and Archer Sterling and}, xdata = {key1, key2,key3, key4, key5 ,}, urldate = {2017-01-14}, ...
Add test for processing invariant
Add test for processing invariant
Python
mit
MisanthropicBit/bibpy,MisanthropicBit/bibpy
Add test for processing invariant
"""Test that we can read and write bib entries with postprocessing.""" import bibpy import pytest @pytest.fixture def test_string(): return """@article{key, author = {James Conway and Archer Sterling and}, xdata = {key1, key2,key3, key4, key5 ,}, urldate = {2017-01-14}, ...
<commit_before><commit_msg>Add test for processing invariant<commit_after>
"""Test that we can read and write bib entries with postprocessing.""" import bibpy import pytest @pytest.fixture def test_string(): return """@article{key, author = {James Conway and Archer Sterling and}, xdata = {key1, key2,key3, key4, key5 ,}, urldate = {2017-01-14}, ...
Add test for processing invariant"""Test that we can read and write bib entries with postprocessing.""" import bibpy import pytest @pytest.fixture def test_string(): return """@article{key, author = {James Conway and Archer Sterling and}, xdata = {key1, key2,key3, key4, key5 ,}, ...
<commit_before><commit_msg>Add test for processing invariant<commit_after>"""Test that we can read and write bib entries with postprocessing.""" import bibpy import pytest @pytest.fixture def test_string(): return """@article{key, author = {James Conway and Archer Sterling and}, xdata = {key...
33e88fa6d68172f49e3e23d38f3dc58044cf92a0
python/ctci_fibonacci_numbers.py
python/ctci_fibonacci_numbers.py
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) n = int(input()) print(fibonacci(n))
Solve all but first test case
Solve all but first test case
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
Solve all but first test case
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) n = int(input()) print(fibonacci(n))
<commit_before><commit_msg>Solve all but first test case<commit_after>
def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) n = int(input()) print(fibonacci(n))
Solve all but first test casedef fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) n = int(input()) print(fibonacci(n))
<commit_before><commit_msg>Solve all but first test case<commit_after>def fibonacci(n): if n == 0: return 0 elif n == 1: return 1 else: return fibonacci(n - 1) + fibonacci(n - 2) n = int(input()) print(fibonacci(n))
8e833781bc121e07e49331c277179d9b587dd5e7
tests/test_task_processing.py
tests/test_task_processing.py
# Copyright 2015-2017 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
Add basic smoke test that task_processing is available
Add basic smoke test that task_processing is available
Python
apache-2.0
somic/paasta,somic/paasta,Yelp/paasta,Yelp/paasta
Add basic smoke test that task_processing is available
# Copyright 2015-2017 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
<commit_before><commit_msg>Add basic smoke test that task_processing is available<commit_after>
# Copyright 2015-2017 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writin...
Add basic smoke test that task_processing is available# Copyright 2015-2017 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Un...
<commit_before><commit_msg>Add basic smoke test that task_processing is available<commit_after># Copyright 2015-2017 Yelp Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://w...
d5442c89c27b672496ab5aa71e68b38aa8166f73
tests/unit/test_gcs_client.py
tests/unit/test_gcs_client.py
import uuid import pytest from globus_cli.services.gcs import get_gcs_client def test_get_gcs_client_missing_required_auth(): gcsid = str(uuid.uuid1()) with pytest.raises(ValueError) as excinfo: get_gcs_client(gcsid) assert f"--gcs {gcsid}" in str(excinfo.value)
Add test for get_gcs_client with un-authed ID
Add test for get_gcs_client with un-authed ID
Python
apache-2.0
globus/globus-cli,globus/globus-cli
Add test for get_gcs_client with un-authed ID
import uuid import pytest from globus_cli.services.gcs import get_gcs_client def test_get_gcs_client_missing_required_auth(): gcsid = str(uuid.uuid1()) with pytest.raises(ValueError) as excinfo: get_gcs_client(gcsid) assert f"--gcs {gcsid}" in str(excinfo.value)
<commit_before><commit_msg>Add test for get_gcs_client with un-authed ID<commit_after>
import uuid import pytest from globus_cli.services.gcs import get_gcs_client def test_get_gcs_client_missing_required_auth(): gcsid = str(uuid.uuid1()) with pytest.raises(ValueError) as excinfo: get_gcs_client(gcsid) assert f"--gcs {gcsid}" in str(excinfo.value)
Add test for get_gcs_client with un-authed IDimport uuid import pytest from globus_cli.services.gcs import get_gcs_client def test_get_gcs_client_missing_required_auth(): gcsid = str(uuid.uuid1()) with pytest.raises(ValueError) as excinfo: get_gcs_client(gcsid) assert f"--gcs {gcsid}" in str(e...
<commit_before><commit_msg>Add test for get_gcs_client with un-authed ID<commit_after>import uuid import pytest from globus_cli.services.gcs import get_gcs_client def test_get_gcs_client_missing_required_auth(): gcsid = str(uuid.uuid1()) with pytest.raises(ValueError) as excinfo: get_gcs_client(gcs...
88409bd0d71138d02729d03bf66aebc65e98acf8
python/test/test_site_tensors.py
python/test/test_site_tensors.py
import unittest import numpy as np from spglib import get_symmetry class TestGetOperationsWithSiteTensors(unittest.TestCase): def setUp(self): lattice = [[0, 2, 2], [2, 0, 2], [2, 2, 0]] positions = [[0, 0, 0]] numbers = [1] magmoms = [[0, 0, 1]] self._cell_Ni = (lattice, ...
Add new test for symmetry with site tensors
Add new test for symmetry with site tensors
Python
bsd-3-clause
atztogo/spglib,atztogo/spglib,atztogo/spglib,atztogo/spglib,atztogo/spglib
Add new test for symmetry with site tensors
import unittest import numpy as np from spglib import get_symmetry class TestGetOperationsWithSiteTensors(unittest.TestCase): def setUp(self): lattice = [[0, 2, 2], [2, 0, 2], [2, 2, 0]] positions = [[0, 0, 0]] numbers = [1] magmoms = [[0, 0, 1]] self._cell_Ni = (lattice, ...
<commit_before><commit_msg>Add new test for symmetry with site tensors<commit_after>
import unittest import numpy as np from spglib import get_symmetry class TestGetOperationsWithSiteTensors(unittest.TestCase): def setUp(self): lattice = [[0, 2, 2], [2, 0, 2], [2, 2, 0]] positions = [[0, 0, 0]] numbers = [1] magmoms = [[0, 0, 1]] self._cell_Ni = (lattice, ...
Add new test for symmetry with site tensorsimport unittest import numpy as np from spglib import get_symmetry class TestGetOperationsWithSiteTensors(unittest.TestCase): def setUp(self): lattice = [[0, 2, 2], [2, 0, 2], [2, 2, 0]] positions = [[0, 0, 0]] numbers = [1] magmoms = [[0...
<commit_before><commit_msg>Add new test for symmetry with site tensors<commit_after>import unittest import numpy as np from spglib import get_symmetry class TestGetOperationsWithSiteTensors(unittest.TestCase): def setUp(self): lattice = [[0, 2, 2], [2, 0, 2], [2, 2, 0]] positions = [[0, 0, 0]] ...
f47f30d9f6e19c99c0beff94aa5d7a8d276b78b2
branchandcommit.py
branchandcommit.py
import tempfile import pygit2 tmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-') print('Creating bare repository: {}'.format(tmpdir.name)) repo = pygit2.init_repository(tmpdir.name, True)
Add initial bare repository generation.
Add initial bare repository generation.
Python
mit
davidstrauss/branch-and-commit-to-bare-repo
Add initial bare repository generation.
import tempfile import pygit2 tmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-') print('Creating bare repository: {}'.format(tmpdir.name)) repo = pygit2.init_repository(tmpdir.name, True)
<commit_before><commit_msg>Add initial bare repository generation.<commit_after>
import tempfile import pygit2 tmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-') print('Creating bare repository: {}'.format(tmpdir.name)) repo = pygit2.init_repository(tmpdir.name, True)
Add initial bare repository generation.import tempfile import pygit2 tmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-') print('Creating bare repository: {}'.format(tmpdir.name)) repo = pygit2.init_repository(tmpdir.name, True)
<commit_before><commit_msg>Add initial bare repository generation.<commit_after>import tempfile import pygit2 tmpdir = tempfile.TemporaryDirectory(suffix='.git', prefix='branchandcommit-') print('Creating bare repository: {}'.format(tmpdir.name)) repo = pygit2.init_repository(tmpdir.name, True)
88102b625d239d3c35187d6b398cf0f1a8171015
pajbot/migration_revisions/db/0006_create_user_rank_materialized_view.py
pajbot/migration_revisions/db/0006_create_user_rank_materialized_view.py
def up(cursor, bot): cursor.execute( """ CREATE MATERIALIZED VIEW user_rank AS ( SELECT id as user_id, RANK() OVER (ORDER BY points DESC) points_rank, RANK() OVER (ORDER BY num_lines DESC) num_lines_rank FROM "user" ) """ ) cursor.execu...
Add migration to create user_rank materialized view
Add migration to create user_rank materialized view
Python
mit
pajlada/tyggbot,pajlada/pajbot,pajlada/pajbot,pajlada/tyggbot,pajlada/tyggbot,pajlada/pajbot,pajlada/tyggbot,pajlada/pajbot
Add migration to create user_rank materialized view
def up(cursor, bot): cursor.execute( """ CREATE MATERIALIZED VIEW user_rank AS ( SELECT id as user_id, RANK() OVER (ORDER BY points DESC) points_rank, RANK() OVER (ORDER BY num_lines DESC) num_lines_rank FROM "user" ) """ ) cursor.execu...
<commit_before><commit_msg>Add migration to create user_rank materialized view<commit_after>
def up(cursor, bot): cursor.execute( """ CREATE MATERIALIZED VIEW user_rank AS ( SELECT id as user_id, RANK() OVER (ORDER BY points DESC) points_rank, RANK() OVER (ORDER BY num_lines DESC) num_lines_rank FROM "user" ) """ ) cursor.execu...
Add migration to create user_rank materialized viewdef up(cursor, bot): cursor.execute( """ CREATE MATERIALIZED VIEW user_rank AS ( SELECT id as user_id, RANK() OVER (ORDER BY points DESC) points_rank, RANK() OVER (ORDER BY num_lines DESC) num_lines_rank ...
<commit_before><commit_msg>Add migration to create user_rank materialized view<commit_after>def up(cursor, bot): cursor.execute( """ CREATE MATERIALIZED VIEW user_rank AS ( SELECT id as user_id, RANK() OVER (ORDER BY points DESC) points_rank, RANK() OVER (ORDE...
2cc2a1318da0980911dd0cd0868efb8fad4dd1d8
python/ctci-is-binary-search-tree.py
python/ctci-is-binary-search-tree.py
""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ import sys def checkBST(root): return validBST(root) def validBST(node): if emptyNode(node): return True if not validNode(node): return False ...
Solve is binary search tree
Solve is binary search tree
Python
mit
rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank,rootulp/hackerrank
Solve is binary search tree
""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ import sys def checkBST(root): return validBST(root) def validBST(node): if emptyNode(node): return True if not validNode(node): return False ...
<commit_before><commit_msg>Solve is binary search tree<commit_after>
""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ import sys def checkBST(root): return validBST(root) def validBST(node): if emptyNode(node): return True if not validNode(node): return False ...
Solve is binary search tree""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ import sys def checkBST(root): return validBST(root) def validBST(node): if emptyNode(node): return True if not validNode(n...
<commit_before><commit_msg>Solve is binary search tree<commit_after>""" Node is defined as class node: def __init__(self, data): self.data = data self.left = None self.right = None """ import sys def checkBST(root): return validBST(root) def validBST(node): if emptyNode(node): ...
41055e52ee2f626c82dafa10c5df1cd90adf288a
python/qisrc/test/test_qisrc_diff.py
python/qisrc/test/test_qisrc_diff.py
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import qisrc.git def test_simple(git_server, qisrc_action, record_messages): git_server.create_repo("foo.git") git_server.switch_manifest_...
Add a test for `qisrc diff`
Add a test for `qisrc diff` Change-Id: I32fe0d298dd8bced991c3b314ed543614266cc24 Reviewed-on: http://gerrit.aldebaran.lan/60721 Tested-by: gerrit Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>
Python
bsd-3-clause
aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild,aldebaran/qibuild
Add a test for `qisrc diff` Change-Id: I32fe0d298dd8bced991c3b314ed543614266cc24 Reviewed-on: http://gerrit.aldebaran.lan/60721 Tested-by: gerrit Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import qisrc.git def test_simple(git_server, qisrc_action, record_messages): git_server.create_repo("foo.git") git_server.switch_manifest_...
<commit_before><commit_msg>Add a test for `qisrc diff` Change-Id: I32fe0d298dd8bced991c3b314ed543614266cc24 Reviewed-on: http://gerrit.aldebaran.lan/60721 Tested-by: gerrit Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com><commit_after>
## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this source code is governed by a BSD-style license that can be ## found in the COPYING file. import qisrc.git def test_simple(git_server, qisrc_action, record_messages): git_server.create_repo("foo.git") git_server.switch_manifest_...
Add a test for `qisrc diff` Change-Id: I32fe0d298dd8bced991c3b314ed543614266cc24 Reviewed-on: http://gerrit.aldebaran.lan/60721 Tested-by: gerrit Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com>## Copyright (c) 2012-2015 Aldebaran Robotics. All rights reserved. ## Use of this s...
<commit_before><commit_msg>Add a test for `qisrc diff` Change-Id: I32fe0d298dd8bced991c3b314ed543614266cc24 Reviewed-on: http://gerrit.aldebaran.lan/60721 Tested-by: gerrit Reviewed-by: vbarbaresi <371b46c96c99af52f4f920034e4fcb63ece5bdb5@aldebaran-robotics.com><commit_after>## Copyright (c) 2012-2015 Aldebaran Roboti...
96b902865cd06f578d7dc3f23f90168b7e8ba7c8
txircd/modules/rfc/umode_s.py
txircd/modules/rfc/umode_s.py
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements from weakref import WeakSet irc.RPL_LISTMODE = "728" # Made up, based on freen...
Implement the server notice mechanism
Implement the server notice mechanism
Python
bsd-3-clause
ElementalAlchemist/txircd,Heufneutje/txircd
Implement the server notice mechanism
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements from weakref import WeakSet irc.RPL_LISTMODE = "728" # Made up, based on freen...
<commit_before><commit_msg>Implement the server notice mechanism<commit_after>
from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements from weakref import WeakSet irc.RPL_LISTMODE = "728" # Made up, based on freen...
Implement the server notice mechanismfrom twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements from weakref import WeakSet irc.RPL_LISTM...
<commit_before><commit_msg>Implement the server notice mechanism<commit_after>from twisted.plugin import IPlugin from twisted.words.protocols import irc from txircd.module_interface import IMode, IModuleData, Mode, ModuleData from txircd.utils import ircLower, ModeType, timestamp from zope.interface import implements f...
af4fe82552b894073e3f4c7fae814deb80487b3c
api_v3/migrations/0010_drop_profile_not_null.py
api_v3/migrations/0010_drop_profile_not_null.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 6:12 from __future__ import unicode_literals from django.db import migrations, connection class Migration(migrations.Migration): dependencies = [ ('api_v3', '0009_added_subscriber'), ] COLUMNS_SQL = """ SELECT column_na...
Reset `not null` on some legacy fields.
Reset `not null` on some legacy fields.
Python
mit
occrp/id-backend
Reset `not null` on some legacy fields.
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 6:12 from __future__ import unicode_literals from django.db import migrations, connection class Migration(migrations.Migration): dependencies = [ ('api_v3', '0009_added_subscriber'), ] COLUMNS_SQL = """ SELECT column_na...
<commit_before><commit_msg>Reset `not null` on some legacy fields.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 6:12 from __future__ import unicode_literals from django.db import migrations, connection class Migration(migrations.Migration): dependencies = [ ('api_v3', '0009_added_subscriber'), ] COLUMNS_SQL = """ SELECT column_na...
Reset `not null` on some legacy fields.# -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 6:12 from __future__ import unicode_literals from django.db import migrations, connection class Migration(migrations.Migration): dependencies = [ ('api_v3', '0009_added_subscriber'), ] COL...
<commit_before><commit_msg>Reset `not null` on some legacy fields.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.13 on 2018-06-15 6:12 from __future__ import unicode_literals from django.db import migrations, connection class Migration(migrations.Migration): dependencies = [ ('api_v3',...
b077a5dba84cbc7b3fd37e276be1635301c79d99
website/core/settings/loc.py
website/core/settings/loc.py
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets (%s). You wil...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets (no project-specific secrets) #sys.path.append( # abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) #) #try: # from secrets import * #except ImportError, e: # print 'WARNING: Could not i...
Comment out project-specific secrets import warning (not needed)
Comment out project-specific secrets import warning (not needed)
Python
mpl-2.0
cr3ative/StoryMapJS,wangjun/StoryMapJS,BenHeubl/StoryMapJS,BenHeubl/StoryMapJS,wangjun/StoryMapJS,cr3ative/StoryMapJS,miguelpaz/StoryMapJS,jorol/StoryMapJS,miguelpaz/StoryMapJS,jorol/StoryMapJS,1modm/StoryMapJS,cr3ative/StoryMapJS,makinacorpus/StoryMapJS,wangjun/StoryMapJS,miguelpaz/StoryMapJS,1modm/StoryMapJS,cr3ative...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets (%s). You wil...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets (no project-specific secrets) #sys.path.append( # abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) #) #try: # from secrets import * #except ImportError, e: # print 'WARNING: Could not i...
<commit_before>"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets (no project-specific secrets) #sys.path.append( # abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) #) #try: # from secrets import * #except ImportError, e: # print 'WARNING: Could not i...
"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets (%s). You wil...
<commit_before>"""Local settings and globals.""" import sys from os.path import normpath, join from .base import * # Import secrets sys.path.append( abspath(join(PROJECT_ROOT, '../secrets/storymapjs/stg')) ) try: from secrets import * except ImportError, e: print 'WARNING: Could not import project secrets...
b810e2b7cdd612b1dba522e36241a472d59376ca
scripts/convert_landmarks_example.py
scripts/convert_landmarks_example.py
#!/usr/bin/env python3 class Landmarks: args = 'name', 'shortname', 'points', 'query', 'hashtags', 'phrase', 'is_area', 'query_suffix' def __init__(self, query_suffix=None): self.query_suffix = query_suffix self.landmarks = [] def add(self, *args, **kwargs): dictionary = {self.a...
Add a script for converting landmarks config
Add a script for converting landmarks config Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).
Python
mit
sebast1219/Monocle,sebast1219/Monocle,sebast1219/Monocle
Add a script for converting landmarks config Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).
#!/usr/bin/env python3 class Landmarks: args = 'name', 'shortname', 'points', 'query', 'hashtags', 'phrase', 'is_area', 'query_suffix' def __init__(self, query_suffix=None): self.query_suffix = query_suffix self.landmarks = [] def add(self, *args, **kwargs): dictionary = {self.a...
<commit_before><commit_msg>Add a script for converting landmarks config Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).<commit_after>
#!/usr/bin/env python3 class Landmarks: args = 'name', 'shortname', 'points', 'query', 'hashtags', 'phrase', 'is_area', 'query_suffix' def __init__(self, query_suffix=None): self.query_suffix = query_suffix self.landmarks = [] def add(self, *args, **kwargs): dictionary = {self.a...
Add a script for converting landmarks config Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).#!/usr/bin/env python3 class Landmarks: args = 'name', 'shor...
<commit_before><commit_msg>Add a script for converting landmarks config Add an example script for converting old-style landmarks configurations (constructing an actual Landmarks instance in config.py) with the new-style of using standard Python data-types (a tuple/list of dicts).<commit_after>#!/usr/bin/env python3 ...
6717e73d1dfb5b7b7a6d1e2cd24e1983d41c0fc3
tests/validation/tests/v3_api/test_node.py
tests/validation/tests/v3_api/test_node.py
import pytest from .common import * # NOQA def test_add_node_label(): client, cluster = get_global_admin_client_and_cluster() test_label = "foo" nodes = client.list_node(clusterId=cluster.id) assert len(nodes.data) > 0 node_id = nodes.data[0].id node = client.by_id_node(node_id) # Make s...
Add validation test for adding node label
Add validation test for adding node label https://github.com/rancher/rancher/issues/24123
Python
apache-2.0
rancher/rancher,cjellick/rancher,rancher/rancher,rancherio/rancher,rancher/rancher,rancher/rancher,cjellick/rancher,cjellick/rancher,rancherio/rancher
Add validation test for adding node label https://github.com/rancher/rancher/issues/24123
import pytest from .common import * # NOQA def test_add_node_label(): client, cluster = get_global_admin_client_and_cluster() test_label = "foo" nodes = client.list_node(clusterId=cluster.id) assert len(nodes.data) > 0 node_id = nodes.data[0].id node = client.by_id_node(node_id) # Make s...
<commit_before><commit_msg>Add validation test for adding node label https://github.com/rancher/rancher/issues/24123<commit_after>
import pytest from .common import * # NOQA def test_add_node_label(): client, cluster = get_global_admin_client_and_cluster() test_label = "foo" nodes = client.list_node(clusterId=cluster.id) assert len(nodes.data) > 0 node_id = nodes.data[0].id node = client.by_id_node(node_id) # Make s...
Add validation test for adding node label https://github.com/rancher/rancher/issues/24123import pytest from .common import * # NOQA def test_add_node_label(): client, cluster = get_global_admin_client_and_cluster() test_label = "foo" nodes = client.list_node(clusterId=cluster.id) assert len(nodes.da...
<commit_before><commit_msg>Add validation test for adding node label https://github.com/rancher/rancher/issues/24123<commit_after>import pytest from .common import * # NOQA def test_add_node_label(): client, cluster = get_global_admin_client_and_cluster() test_label = "foo" nodes = client.list_node(clus...
00cf923625d6327b0d0790bf011b2135bb41b239
ideascube/conf/idb_fra_jeancarre.py
ideascube/conf/idb_fra_jeancarre.py
# -*- coding: utf-8 -*- """Ideaxbox for Emmaus, France""" from .idb import * # noqa from django.utils.translation import ugettext_lazy as _ IDEASCUBE_NAME = u"Jean Carré" IDEASCUBE_PLACE_NAME = _("city") COUNTRIES_FIRST = ['FR'] TIME_ZONE = None LANGUAGE_CODE = 'fr' LOAN_DURATION = 14 MONITORING_ENTRY_EXPORT_FIELDS =...
Remove card wikiversity and rename project name
Remove card wikiversity and rename project name
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
Remove card wikiversity and rename project name
# -*- coding: utf-8 -*- """Ideaxbox for Emmaus, France""" from .idb import * # noqa from django.utils.translation import ugettext_lazy as _ IDEASCUBE_NAME = u"Jean Carré" IDEASCUBE_PLACE_NAME = _("city") COUNTRIES_FIRST = ['FR'] TIME_ZONE = None LANGUAGE_CODE = 'fr' LOAN_DURATION = 14 MONITORING_ENTRY_EXPORT_FIELDS =...
<commit_before><commit_msg>Remove card wikiversity and rename project name<commit_after>
# -*- coding: utf-8 -*- """Ideaxbox for Emmaus, France""" from .idb import * # noqa from django.utils.translation import ugettext_lazy as _ IDEASCUBE_NAME = u"Jean Carré" IDEASCUBE_PLACE_NAME = _("city") COUNTRIES_FIRST = ['FR'] TIME_ZONE = None LANGUAGE_CODE = 'fr' LOAN_DURATION = 14 MONITORING_ENTRY_EXPORT_FIELDS =...
Remove card wikiversity and rename project name# -*- coding: utf-8 -*- """Ideaxbox for Emmaus, France""" from .idb import * # noqa from django.utils.translation import ugettext_lazy as _ IDEASCUBE_NAME = u"Jean Carré" IDEASCUBE_PLACE_NAME = _("city") COUNTRIES_FIRST = ['FR'] TIME_ZONE = None LANGUAGE_CODE = 'fr' LOAN...
<commit_before><commit_msg>Remove card wikiversity and rename project name<commit_after># -*- coding: utf-8 -*- """Ideaxbox for Emmaus, France""" from .idb import * # noqa from django.utils.translation import ugettext_lazy as _ IDEASCUBE_NAME = u"Jean Carré" IDEASCUBE_PLACE_NAME = _("city") COUNTRIES_FIRST = ['FR'] T...
b6d0ff750bb48c8be514a8a36f1b7ab30efb460a
tests/scoring_engine/test_config.py
tests/scoring_engine/test_config.py
from scoring_engine.config_loader import ConfigLoader class MockConfigLoader(): pass ConfigLoader = MockConfigLoader from scoring_engine.config import config class TestConfig(object): def setup(self): import pdb; pdb.set_trace() # self.config = ConfigLoader(location="../tests/scoring_engine...
Add test for scoring engine config
Add test for scoring engine config
Python
mit
pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine,pwnbus/scoring_engine
Add test for scoring engine config
from scoring_engine.config_loader import ConfigLoader class MockConfigLoader(): pass ConfigLoader = MockConfigLoader from scoring_engine.config import config class TestConfig(object): def setup(self): import pdb; pdb.set_trace() # self.config = ConfigLoader(location="../tests/scoring_engine...
<commit_before><commit_msg>Add test for scoring engine config<commit_after>
from scoring_engine.config_loader import ConfigLoader class MockConfigLoader(): pass ConfigLoader = MockConfigLoader from scoring_engine.config import config class TestConfig(object): def setup(self): import pdb; pdb.set_trace() # self.config = ConfigLoader(location="../tests/scoring_engine...
Add test for scoring engine config from scoring_engine.config_loader import ConfigLoader class MockConfigLoader(): pass ConfigLoader = MockConfigLoader from scoring_engine.config import config class TestConfig(object): def setup(self): import pdb; pdb.set_trace() # self.config = ConfigLoader...
<commit_before><commit_msg>Add test for scoring engine config<commit_after> from scoring_engine.config_loader import ConfigLoader class MockConfigLoader(): pass ConfigLoader = MockConfigLoader from scoring_engine.config import config class TestConfig(object): def setup(self): import pdb; pdb.set_tra...
f44faa9a029b57c96cdb7d1b38a4e3760ac19f94
indra/tests/test_elsevier_client.py
indra/tests/test_elsevier_client.py
from indra.literature import elsevier_client as ec def test_get_fulltext_article(): # This article is not open access so in order to get a full text response # with a body element requires full text access keys to be correctly # set up. doi = '10.1016/j.cell.2016.02.059' text = ec.get_article(doi) ...
Add two smoke tests for Elsevier client
Add two smoke tests for Elsevier client
Python
bsd-2-clause
pvtodorov/indra,jmuhlich/indra,sorgerlab/belpy,sorgerlab/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,sorgerlab/belpy,sorgerlab/indra,pvtodorov/indra,johnbachman/indra,johnbachman/belpy,bgyori/indra,jmuhlich/indra,sorgerlab/indra,johnbachman/indra,sorgerlab/belpy,jmuhlich/indra,pvtodorov/indra,bgyori/indra,pv...
Add two smoke tests for Elsevier client
from indra.literature import elsevier_client as ec def test_get_fulltext_article(): # This article is not open access so in order to get a full text response # with a body element requires full text access keys to be correctly # set up. doi = '10.1016/j.cell.2016.02.059' text = ec.get_article(doi) ...
<commit_before><commit_msg>Add two smoke tests for Elsevier client<commit_after>
from indra.literature import elsevier_client as ec def test_get_fulltext_article(): # This article is not open access so in order to get a full text response # with a body element requires full text access keys to be correctly # set up. doi = '10.1016/j.cell.2016.02.059' text = ec.get_article(doi) ...
Add two smoke tests for Elsevier clientfrom indra.literature import elsevier_client as ec def test_get_fulltext_article(): # This article is not open access so in order to get a full text response # with a body element requires full text access keys to be correctly # set up. doi = '10.1016/j.cell.2016....
<commit_before><commit_msg>Add two smoke tests for Elsevier client<commit_after>from indra.literature import elsevier_client as ec def test_get_fulltext_article(): # This article is not open access so in order to get a full text response # with a body element requires full text access keys to be correctly ...
d7d916c196001ca2d23e4a3477145c5383ee99bf
tests/v6/test_derived_generators.py
tests/v6/test_derived_generators.py
import pytest from .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_DERIVED_GENERATORS) def test_derived_generator_is_owner_of_its_constituent_generators(g): """ """ # Sanity check that list of constituent generators is not empty assert g.constituent_gener...
Add test that derived generator is the owner of its constituent generators
Add test that derived generator is the owner of its constituent generators
Python
mit
maxalbert/tohu
Add test that derived generator is the owner of its constituent generators
import pytest from .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_DERIVED_GENERATORS) def test_derived_generator_is_owner_of_its_constituent_generators(g): """ """ # Sanity check that list of constituent generators is not empty assert g.constituent_gener...
<commit_before><commit_msg>Add test that derived generator is the owner of its constituent generators<commit_after>
import pytest from .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_DERIVED_GENERATORS) def test_derived_generator_is_owner_of_its_constituent_generators(g): """ """ # Sanity check that list of constituent generators is not empty assert g.constituent_gener...
Add test that derived generator is the owner of its constituent generatorsimport pytest from .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_DERIVED_GENERATORS) def test_derived_generator_is_owner_of_its_constituent_generators(g): """ """ # Sanity check that ...
<commit_before><commit_msg>Add test that derived generator is the owner of its constituent generators<commit_after>import pytest from .exemplar_generators import EXEMPLAR_DERIVED_GENERATORS @pytest.mark.parametrize("g", EXEMPLAR_DERIVED_GENERATORS) def test_derived_generator_is_owner_of_its_constituent_generators(g):...
3f9032dd250434f45db97e106da7ff97eb5d39d1
tests/test_irc_bot.py
tests/test_irc_bot.py
""" :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from irc.client import Event, NickMask, ServerConnection import pytest from syslog2irc.irc import create_bot, IrcChannel, IrcConfig, IrcServer from syslog2irc.signals import irc_channel_joined @pytest.fixture def config(): ...
Test channel joins of real bot
Test channel joins of real bot
Python
mit
homeworkprod/syslog2irc
Test channel joins of real bot
""" :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from irc.client import Event, NickMask, ServerConnection import pytest from syslog2irc.irc import create_bot, IrcChannel, IrcConfig, IrcServer from syslog2irc.signals import irc_channel_joined @pytest.fixture def config(): ...
<commit_before><commit_msg>Test channel joins of real bot<commit_after>
""" :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from irc.client import Event, NickMask, ServerConnection import pytest from syslog2irc.irc import create_bot, IrcChannel, IrcConfig, IrcServer from syslog2irc.signals import irc_channel_joined @pytest.fixture def config(): ...
Test channel joins of real bot""" :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from irc.client import Event, NickMask, ServerConnection import pytest from syslog2irc.irc import create_bot, IrcChannel, IrcConfig, IrcServer from syslog2irc.signals import irc_channel_joined @p...
<commit_before><commit_msg>Test channel joins of real bot<commit_after>""" :Copyright: 2007-2021 Jochen Kupperschmidt :License: MIT, see LICENSE for details. """ from irc.client import Event, NickMask, ServerConnection import pytest from syslog2irc.irc import create_bot, IrcChannel, IrcConfig, IrcServer from syslog2i...
cde1be5f4f8b3effe2d6802db368167a35495878
tools/load_pcap.py
tools/load_pcap.py
#!/usr/bin/env python # Installed from: http://dirtbags.net/py-pcap.html import pcap import argparse import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pox")) from pox.lib.packet.ethernet import * parser = argparse.ArgumentParser() parser.add_argument('-i', '--input') parser.add_argum...
Add a tool to convert pcap to Murphy's python classes.
Add a tool to convert pcap to Murphy's python classes. Not quite useful yet
Python
apache-2.0
ucb-sts/sts,ucb-sts/sts,jmiserez/sts,jmiserez/sts
Add a tool to convert pcap to Murphy's python classes. Not quite useful yet
#!/usr/bin/env python # Installed from: http://dirtbags.net/py-pcap.html import pcap import argparse import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pox")) from pox.lib.packet.ethernet import * parser = argparse.ArgumentParser() parser.add_argument('-i', '--input') parser.add_argum...
<commit_before><commit_msg>Add a tool to convert pcap to Murphy's python classes. Not quite useful yet<commit_after>
#!/usr/bin/env python # Installed from: http://dirtbags.net/py-pcap.html import pcap import argparse import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pox")) from pox.lib.packet.ethernet import * parser = argparse.ArgumentParser() parser.add_argument('-i', '--input') parser.add_argum...
Add a tool to convert pcap to Murphy's python classes. Not quite useful yet#!/usr/bin/env python # Installed from: http://dirtbags.net/py-pcap.html import pcap import argparse import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pox")) from pox.lib.packet.ethernet import * parser = arg...
<commit_before><commit_msg>Add a tool to convert pcap to Murphy's python classes. Not quite useful yet<commit_after>#!/usr/bin/env python # Installed from: http://dirtbags.net/py-pcap.html import pcap import argparse import sys import os sys.path.append(os.path.join(os.path.dirname(__file__), "..", "pox")) from pox.l...
b7b0159e462efb7abfd63c0e3066704637fa4df2
txircd/modules/extra/stats_ports.py
txircd/modules/extra/stats_ports.py
from twisted.plugin import IPlugin from txircd.factory import UserFactory from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class StatsPorts(ModuleData): implements(IPlugin, IModuleData) name = "StatsPorts" def actions(self): return [ ("statsruntype-ports", 10, se...
Add STATS type to display the ports that the server is listening on
Add STATS type to display the ports that the server is listening on
Python
bsd-3-clause
Heufneutje/txircd
Add STATS type to display the ports that the server is listening on
from twisted.plugin import IPlugin from txircd.factory import UserFactory from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class StatsPorts(ModuleData): implements(IPlugin, IModuleData) name = "StatsPorts" def actions(self): return [ ("statsruntype-ports", 10, se...
<commit_before><commit_msg>Add STATS type to display the ports that the server is listening on<commit_after>
from twisted.plugin import IPlugin from txircd.factory import UserFactory from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class StatsPorts(ModuleData): implements(IPlugin, IModuleData) name = "StatsPorts" def actions(self): return [ ("statsruntype-ports", 10, se...
Add STATS type to display the ports that the server is listening onfrom twisted.plugin import IPlugin from txircd.factory import UserFactory from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class StatsPorts(ModuleData): implements(IPlugin, IModuleData) name = "StatsP...
<commit_before><commit_msg>Add STATS type to display the ports that the server is listening on<commit_after>from twisted.plugin import IPlugin from txircd.factory import UserFactory from txircd.module_interface import IModuleData, ModuleData from zope.interface import implements class StatsPorts(ModuleData): implemen...
1c84604b28ffcbfc3b32d401a29e87927aba282e
observations/migrations/0002_auto_20151217_1759.py
observations/migrations/0002_auto_20151217_1759.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='observation', o...
Add migration for Observation model options change.
Add migration for Observation model options change.
Python
mit
zsiciarz/variablestars.net,zsiciarz/variablestars.net,zsiciarz/variablestars.net
Add migration for Observation model options change.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='observation', o...
<commit_before><commit_msg>Add migration for Observation model options change.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0001_initial'), ] operations = [ migrations.AlterModelOptions( name='observation', o...
Add migration for Observation model options change.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0001_initial'), ] operations = [ migrations.AlterModelOpt...
<commit_before><commit_msg>Add migration for Observation model options change.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('observations', '0001_initial'), ] operat...
8f69b07e80198c1af0d5bd368d8ad8ced968884a
experimental/csm/ct_csv_to_traces.py
experimental/csm/ct_csv_to_traces.py
import csv import sys def csv_to_traces(infile, outfile): traces = [] with open(infile) as inf: results = csv.DictReader(inf) for r in results: for t in r['trace'].split(','): traces.append(t) with open(outfile, 'w') as outf: for trace in traces: outf.write(trace + '\n') def mai...
Add script to transform CT result to trace list
Add script to transform CT result to trace list
Python
bsd-3-clause
catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm,catapult-project/catapult-csm
Add script to transform CT result to trace list
import csv import sys def csv_to_traces(infile, outfile): traces = [] with open(infile) as inf: results = csv.DictReader(inf) for r in results: for t in r['trace'].split(','): traces.append(t) with open(outfile, 'w') as outf: for trace in traces: outf.write(trace + '\n') def mai...
<commit_before><commit_msg>Add script to transform CT result to trace list<commit_after>
import csv import sys def csv_to_traces(infile, outfile): traces = [] with open(infile) as inf: results = csv.DictReader(inf) for r in results: for t in r['trace'].split(','): traces.append(t) with open(outfile, 'w') as outf: for trace in traces: outf.write(trace + '\n') def mai...
Add script to transform CT result to trace listimport csv import sys def csv_to_traces(infile, outfile): traces = [] with open(infile) as inf: results = csv.DictReader(inf) for r in results: for t in r['trace'].split(','): traces.append(t) with open(outfile, 'w') as outf: for trace in ...
<commit_before><commit_msg>Add script to transform CT result to trace list<commit_after>import csv import sys def csv_to_traces(infile, outfile): traces = [] with open(infile) as inf: results = csv.DictReader(inf) for r in results: for t in r['trace'].split(','): traces.append(t) with open...
37a6261897b413f3aa5be310c4cd1e7abcb1a55f
examples/zorder.py
examples/zorder.py
""" Eventually this will be an example showing how we support z-ordering. """ import arcade SCALE = 0.75 SCREEN_HEIGHT = 320 SCREEN_WIDTH = 512 class MyApplication(arcade.Window): """ Main application class. """ def __init__(self, width, height): """ Set up the game and initialize the variables. ""...
Add start of z-order example.
Add start of z-order example.
Python
mit
mikemhenry/arcade,mikemhenry/arcade
Add start of z-order example.
""" Eventually this will be an example showing how we support z-ordering. """ import arcade SCALE = 0.75 SCREEN_HEIGHT = 320 SCREEN_WIDTH = 512 class MyApplication(arcade.Window): """ Main application class. """ def __init__(self, width, height): """ Set up the game and initialize the variables. ""...
<commit_before><commit_msg>Add start of z-order example.<commit_after>
""" Eventually this will be an example showing how we support z-ordering. """ import arcade SCALE = 0.75 SCREEN_HEIGHT = 320 SCREEN_WIDTH = 512 class MyApplication(arcade.Window): """ Main application class. """ def __init__(self, width, height): """ Set up the game and initialize the variables. ""...
Add start of z-order example.""" Eventually this will be an example showing how we support z-ordering. """ import arcade SCALE = 0.75 SCREEN_HEIGHT = 320 SCREEN_WIDTH = 512 class MyApplication(arcade.Window): """ Main application class. """ def __init__(self, width, height): """ Set up the game and...
<commit_before><commit_msg>Add start of z-order example.<commit_after>""" Eventually this will be an example showing how we support z-ordering. """ import arcade SCALE = 0.75 SCREEN_HEIGHT = 320 SCREEN_WIDTH = 512 class MyApplication(arcade.Window): """ Main application class. """ def __init__(self, width,...
71dcd5198944b59f8f69e4027032f8ef0346eabf
examples/asmled.py
examples/asmled.py
# flash LED #1 using inline assembler @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xffff) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7fff) movw(r2, 1 << 13) movt(r2, 0) movw(r3, 0) movt(r3, 1 << 13) b(loop_entry) label(loop1) # turn LED...
Add example script to flash an LED using inline assembler.
examples: Add example script to flash an LED using inline assembler.
Python
mit
utopiaprince/micropython,alex-robbins/micropython,ruffy91/micropython,drrk/micropython,mgyenik/micropython,martinribelotta/micropython,trezor/micropython,misterdanb/micropython,torwag/micropython,adafruit/circuitpython,Timmenem/micropython,ernesto-g/micropython,kostyll/micropython,hosaka/micropython,lbattraw/micropytho...
examples: Add example script to flash an LED using inline assembler.
# flash LED #1 using inline assembler @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xffff) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7fff) movw(r2, 1 << 13) movt(r2, 0) movw(r3, 0) movt(r3, 1 << 13) b(loop_entry) label(loop1) # turn LED...
<commit_before><commit_msg>examples: Add example script to flash an LED using inline assembler.<commit_after>
# flash LED #1 using inline assembler @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xffff) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7fff) movw(r2, 1 << 13) movt(r2, 0) movw(r3, 0) movt(r3, 1 << 13) b(loop_entry) label(loop1) # turn LED...
examples: Add example script to flash an LED using inline assembler.# flash LED #1 using inline assembler @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xffff) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7fff) movw(r2, 1 << 13) movt(r2, 0) movw(r3, 0) mo...
<commit_before><commit_msg>examples: Add example script to flash an LED using inline assembler.<commit_after># flash LED #1 using inline assembler @micropython.asm_thumb def flash_led(r0): movw(r1, (stm.GPIOA + stm.GPIO_BSRRL) & 0xffff) movt(r1, ((stm.GPIOA + stm.GPIO_BSRRL) >> 16) & 0x7fff) movw(r2, 1 << 1...
934367c972d99c034ee69fcec7930c4bd7d42dcc
tests/syntax/IndentationError.py
tests/syntax/IndentationError.py
# # Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts from me are in the public domain. It is at least Free Software # where it's copied from other people. In these cases, it will normally be # indicated. # # If you submit Kay ...
Cover the syntax error from wrong indentation as well.
Cover the syntax error from wrong indentation as well.
Python
apache-2.0
tempbottle/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,kayhayen/Nuitka,tempbottle/Nuitka,wfxiang08/Nuitka,wfxiang08/Nuitka,tempbottle/Nuitka,kayhayen/Nuitka
Cover the syntax error from wrong indentation as well.
# # Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts from me are in the public domain. It is at least Free Software # where it's copied from other people. In these cases, it will normally be # indicated. # # If you submit Kay ...
<commit_before><commit_msg>Cover the syntax error from wrong indentation as well.<commit_after>
# # Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts from me are in the public domain. It is at least Free Software # where it's copied from other people. In these cases, it will normally be # indicated. # # If you submit Kay ...
Cover the syntax error from wrong indentation as well.# # Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts from me are in the public domain. It is at least Free Software # where it's copied from other people. In these cases, it will n...
<commit_before><commit_msg>Cover the syntax error from wrong indentation as well.<commit_after># # Kay Hayen, mailto:kayhayen@gmx.de # # Python test originally created or extracted from other peoples work. The # parts from me are in the public domain. It is at least Free Software # where it's copied fro...
23fd59feb2576ec5837bbb2233f6b20befed5866
plumeria/plugins/google_translate.py
plumeria/plugins/google_translate.py
import json import re import pycountry from titlecase import titlecase from plumeria.command import commands, CommandError from plumeria.message import Message from plumeria.message.lists import parse_list from plumeria.util import http from plumeria.util.ratelimit import rate_limit def find_language(code): try:...
Add a Google Translate plugin.
Add a Google Translate plugin.
Python
mit
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
Add a Google Translate plugin.
import json import re import pycountry from titlecase import titlecase from plumeria.command import commands, CommandError from plumeria.message import Message from plumeria.message.lists import parse_list from plumeria.util import http from plumeria.util.ratelimit import rate_limit def find_language(code): try:...
<commit_before><commit_msg>Add a Google Translate plugin.<commit_after>
import json import re import pycountry from titlecase import titlecase from plumeria.command import commands, CommandError from plumeria.message import Message from plumeria.message.lists import parse_list from plumeria.util import http from plumeria.util.ratelimit import rate_limit def find_language(code): try:...
Add a Google Translate plugin.import json import re import pycountry from titlecase import titlecase from plumeria.command import commands, CommandError from plumeria.message import Message from plumeria.message.lists import parse_list from plumeria.util import http from plumeria.util.ratelimit import rate_limit def...
<commit_before><commit_msg>Add a Google Translate plugin.<commit_after>import json import re import pycountry from titlecase import titlecase from plumeria.command import commands, CommandError from plumeria.message import Message from plumeria.message.lists import parse_list from plumeria.util import http from plume...
132c32076affebe1dd22b833befebe4e57dbb30e
var/spack/packages/muster/package.py
var/spack/packages/muster/package.py
from spack import * class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a general framework for parallel cluster analysis, particularly for performance data analysis on systems with very large ...
Add Muster parallel clustering library.
Add Muster parallel clustering library.
Python
lgpl-2.1
lgarren/spack,TheTimmy/spack,EmreAtes/spack,skosukhin/spack,lgarren/spack,LLNL/spack,matthiasdiener/spack,tmerrick1/spack,LLNL/spack,matthiasdiener/spack,TheTimmy/spack,tmerrick1/spack,mfherbst/spack,skosukhin/spack,iulian787/spack,lgarren/spack,iulian787/spack,iulian787/spack,lgarren/spack,tmerrick1/spack,krafczyk/spa...
Add Muster parallel clustering library.
from spack import * class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a general framework for parallel cluster analysis, particularly for performance data analysis on systems with very large ...
<commit_before><commit_msg>Add Muster parallel clustering library.<commit_after>
from spack import * class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a general framework for parallel cluster analysis, particularly for performance data analysis on systems with very large ...
Add Muster parallel clustering library.from spack import * class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a general framework for parallel cluster analysis, particularly for performance data an...
<commit_before><commit_msg>Add Muster parallel clustering library.<commit_after>from spack import * class Muster(Package): """The Muster library provides implementations of sequential and parallel K-Medoids clustering algorithms. It is intended as a general framework for parallel cluster analysis, pa...
ccf3ea0a1b89815710460a40eefc3f230b9660a3
get_credentials.py
get_credentials.py
""" Program: Get Credentials Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Gets OAuth2 credentials to allow interacting with Google Sheets via API. """ from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import c...
Add script to get OAuth2 credentials for Google Sheets API
Add script to get OAuth2 credentials for Google Sheets API
Python
mit
mefryar/epodx-dashboards,mefryar/epodx-dashboards
Add script to get OAuth2 credentials for Google Sheets API
""" Program: Get Credentials Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Gets OAuth2 credentials to allow interacting with Google Sheets via API. """ from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import c...
<commit_before><commit_msg>Add script to get OAuth2 credentials for Google Sheets API<commit_after>
""" Program: Get Credentials Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Gets OAuth2 credentials to allow interacting with Google Sheets via API. """ from __future__ import print_function import httplib2 import os from apiclient import discovery from oauth2client import c...
Add script to get OAuth2 credentials for Google Sheets API""" Program: Get Credentials Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Gets OAuth2 credentials to allow interacting with Google Sheets via API. """ from __future__ import print_function import httplib2 import os ...
<commit_before><commit_msg>Add script to get OAuth2 credentials for Google Sheets API<commit_after>""" Program: Get Credentials Programmer: Michael Fryar, Research Fellow, EPoD Date created: January 5, 2017 Purpose: Gets OAuth2 credentials to allow interacting with Google Sheets via API. """ from __future__ import p...
755c192a9299888475606a9e60c8c8c5105b6cd2
bed_utils/bed_from_basecall.py
bed_utils/bed_from_basecall.py
#!/usr/bin/env python ''' Converts a file in basecall format to BED3 format. ''' import sys,os def basecall_to_bed(fname): with open(fname) as f: for line in f: if line[0] == '#': continue cols = line.strip('\n').split('\t') chrom = cols[0] po...
Convert basecall files to BED3 files
Convert basecall files to BED3 files
Python
bsd-3-clause
ngsutils/ngsutils,ngsutils/ngsutils,ngsutils/ngsutils
Convert basecall files to BED3 files
#!/usr/bin/env python ''' Converts a file in basecall format to BED3 format. ''' import sys,os def basecall_to_bed(fname): with open(fname) as f: for line in f: if line[0] == '#': continue cols = line.strip('\n').split('\t') chrom = cols[0] po...
<commit_before><commit_msg>Convert basecall files to BED3 files<commit_after>
#!/usr/bin/env python ''' Converts a file in basecall format to BED3 format. ''' import sys,os def basecall_to_bed(fname): with open(fname) as f: for line in f: if line[0] == '#': continue cols = line.strip('\n').split('\t') chrom = cols[0] po...
Convert basecall files to BED3 files#!/usr/bin/env python ''' Converts a file in basecall format to BED3 format. ''' import sys,os def basecall_to_bed(fname): with open(fname) as f: for line in f: if line[0] == '#': continue cols = line.strip('\n').split('\t') ...
<commit_before><commit_msg>Convert basecall files to BED3 files<commit_after>#!/usr/bin/env python ''' Converts a file in basecall format to BED3 format. ''' import sys,os def basecall_to_bed(fname): with open(fname) as f: for line in f: if line[0] == '#': continue c...
8eda98d75d2fb502b447deb2ab28e71611b021c3
joommf/tests/test_min_dyn_example.py
joommf/tests/test_min_dyn_example.py
def test_min_dyn(): import glob import matplotlib.pyplot as plt %matplotlib inline from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.drivers import evolver from joommf.energies.zee...
Add minimisation & then dynamics example test
Add minimisation & then dynamics example test
Python
bsd-2-clause
fangohr/oommf-python,fangohr/oommf-python,fangohr/oommf-python
Add minimisation & then dynamics example test
def test_min_dyn(): import glob import matplotlib.pyplot as plt %matplotlib inline from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.drivers import evolver from joommf.energies.zee...
<commit_before><commit_msg>Add minimisation & then dynamics example test<commit_after>
def test_min_dyn(): import glob import matplotlib.pyplot as plt %matplotlib inline from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.drivers import evolver from joommf.energies.zee...
Add minimisation & then dynamics example testdef test_min_dyn(): import glob import matplotlib.pyplot as plt %matplotlib inline from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies.demag import Demag from joommf.driver...
<commit_before><commit_msg>Add minimisation & then dynamics example test<commit_after>def test_min_dyn(): import glob import matplotlib.pyplot as plt %matplotlib inline from joommf.sim import Sim from joommf.mesh import Mesh from joommf.energies.exchange import Exchange from joommf.energies....
2e8b74b7b7067ab3bb0345247c4d16521234822f
tests/test_line_number_regression.py
tests/test_line_number_regression.py
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2017 Eddie Antonio Santos <easantos@ualberta.ca> # # 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/licens...
Add failing line number test.
Add failing line number test.
Python
apache-2.0
naturalness/sensibility,naturalness/sensibility,naturalness/sensibility,naturalness/sensibility
Add failing line number test.
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2017 Eddie Antonio Santos <easantos@ualberta.ca> # # 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/licens...
<commit_before><commit_msg>Add failing line number test.<commit_after>
#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2017 Eddie Antonio Santos <easantos@ualberta.ca> # # 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/licens...
Add failing line number test.#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2017 Eddie Antonio Santos <easantos@ualberta.ca> # # 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 # # ...
<commit_before><commit_msg>Add failing line number test.<commit_after>#!/usr/bin/env python3 # -*- coding: UTF-8 -*- # Copyright 2017 Eddie Antonio Santos <easantos@ualberta.ca> # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You ...
7d2f454eb5302b62a9c22c69c319f6c9f8bab7fe
rst2pdf/tests/input/test_issue_65.py
rst2pdf/tests/input/test_issue_65.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.platypus.tables import * def go(): Story=[] doc = SimpleDocTemplate("phello.pdf") cell=[Paragraph('A',ParagraphStyle(name='Normal', ...
Test case showing the RL bug
Test case showing the RL bug
Python
mit
rafaelmartins/rst2pdf,rafaelmartins/rst2pdf
Test case showing the RL bug
#!/usr/bin/env python # -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.platypus.tables import * def go(): Story=[] doc = SimpleDocTemplate("phello.pdf") cell=[Paragraph('A',ParagraphStyle(name='Normal', ...
<commit_before><commit_msg>Test case showing the RL bug<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.platypus.tables import * def go(): Story=[] doc = SimpleDocTemplate("phello.pdf") cell=[Paragraph('A',ParagraphStyle(name='Normal', ...
Test case showing the RL bug#!/usr/bin/env python # -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.platypus.tables import * def go(): Story=[] doc = SimpleDocTemplate("phello.pdf") cell=[Paragraph('A',ParagraphStyle(name='Normal', ...
<commit_before><commit_msg>Test case showing the RL bug<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from reportlab.platypus import SimpleDocTemplate, Paragraph from reportlab.platypus.tables import * def go(): Story=[] doc = SimpleDocTemplate("phello.pdf") cell=[Paragra...
7ffb2c2e56f80d12f5e7dccfe8555a741d67e335
megalist_dataflow/utils/execution.py
megalist_dataflow/utils/execution.py
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Create Execution class to represent data read from configuration Sheet
Create Execution class to represent data read from configuration Sheet
Python
apache-2.0
google/megalista,google/megalista
Create Execution class to represent data read from configuration Sheet
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
<commit_before><commit_msg>Create Execution class to represent data read from configuration Sheet<commit_after>
# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, ...
Create Execution class to represent data read from configuration Sheet# Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICEN...
<commit_before><commit_msg>Create Execution class to represent data read from configuration Sheet<commit_after># Copyright 2020 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # ...
d27920e11b1cc528f6707cf34ec9650acf02b983
datasets/management/commands/transfer_user_votes.py
datasets/management/commands/transfer_user_votes.py
from django.core.management.base import BaseCommand from datasets.models import User class Command(BaseCommand): help = 'Transfer the votes of an user to another' \ 'Usage: python manage.py transfer_user_votes <from_username> <to_username>' def add_arguments(self, parser): parser.add_argum...
Add command transfer user votes
Add command transfer user votes
Python
agpl-3.0
MTG/freesound-datasets,MTG/freesound-datasets,MTG/freesound-datasets,MTG/freesound-datasets
Add command transfer user votes
from django.core.management.base import BaseCommand from datasets.models import User class Command(BaseCommand): help = 'Transfer the votes of an user to another' \ 'Usage: python manage.py transfer_user_votes <from_username> <to_username>' def add_arguments(self, parser): parser.add_argum...
<commit_before><commit_msg>Add command transfer user votes<commit_after>
from django.core.management.base import BaseCommand from datasets.models import User class Command(BaseCommand): help = 'Transfer the votes of an user to another' \ 'Usage: python manage.py transfer_user_votes <from_username> <to_username>' def add_arguments(self, parser): parser.add_argum...
Add command transfer user votesfrom django.core.management.base import BaseCommand from datasets.models import User class Command(BaseCommand): help = 'Transfer the votes of an user to another' \ 'Usage: python manage.py transfer_user_votes <from_username> <to_username>' def add_arguments(self, pa...
<commit_before><commit_msg>Add command transfer user votes<commit_after>from django.core.management.base import BaseCommand from datasets.models import User class Command(BaseCommand): help = 'Transfer the votes of an user to another' \ 'Usage: python manage.py transfer_user_votes <from_username> <to_u...
bc1e78ac1caf18e0dfaa6479388cb8496e406419
packages/python/plotly/plotly/tests/test_core/test_subplots/test_find_nonempty_subplots.py
packages/python/plotly/plotly/tests/test_core/test_subplots/test_find_nonempty_subplots.py
import pytest import plotly.graph_objects as go from plotly.subplots import make_subplots from itertools import combinations, product from functools import reduce def all_combos(it): return list( reduce( lambda a, b: a + b, [list(combinations(it, r)) for r in range(1, len(it))], ...
Test finding empty subplots for all selector combinations
Test finding empty subplots for all selector combinations This tests go.Figure._subplot_not_empty
Python
mit
plotly/plotly.py,plotly/plotly.py,plotly/plotly.py
Test finding empty subplots for all selector combinations This tests go.Figure._subplot_not_empty
import pytest import plotly.graph_objects as go from plotly.subplots import make_subplots from itertools import combinations, product from functools import reduce def all_combos(it): return list( reduce( lambda a, b: a + b, [list(combinations(it, r)) for r in range(1, len(it))], ...
<commit_before><commit_msg>Test finding empty subplots for all selector combinations This tests go.Figure._subplot_not_empty<commit_after>
import pytest import plotly.graph_objects as go from plotly.subplots import make_subplots from itertools import combinations, product from functools import reduce def all_combos(it): return list( reduce( lambda a, b: a + b, [list(combinations(it, r)) for r in range(1, len(it))], ...
Test finding empty subplots for all selector combinations This tests go.Figure._subplot_not_emptyimport pytest import plotly.graph_objects as go from plotly.subplots import make_subplots from itertools import combinations, product from functools import reduce def all_combos(it): return list( reduce( ...
<commit_before><commit_msg>Test finding empty subplots for all selector combinations This tests go.Figure._subplot_not_empty<commit_after>import pytest import plotly.graph_objects as go from plotly.subplots import make_subplots from itertools import combinations, product from functools import reduce def all_combos(i...
04c692ca4b6045a49b76dab46847bc058adbdacd
dmrs_preprocess/handle_ltop.py
dmrs_preprocess/handle_ltop.py
def handle_ltop_links(dmrs_xml): ''' Remove LTOP links from DMRS and add LTOP attribute to the DMRS entity :param dmrs_xml: Input DMRS XML :return: Modified DMRS XML ''' ltop = '-1' links_to_remove = list() for entity in dmrs_xml: if entity.tag == 'link': link = en...
Attach LTOP as the attribute and remove index
Attach LTOP as the attribute and remove index
Python
mit
matichorvat/pydmrs
Attach LTOP as the attribute and remove index
def handle_ltop_links(dmrs_xml): ''' Remove LTOP links from DMRS and add LTOP attribute to the DMRS entity :param dmrs_xml: Input DMRS XML :return: Modified DMRS XML ''' ltop = '-1' links_to_remove = list() for entity in dmrs_xml: if entity.tag == 'link': link = en...
<commit_before><commit_msg>Attach LTOP as the attribute and remove index<commit_after>
def handle_ltop_links(dmrs_xml): ''' Remove LTOP links from DMRS and add LTOP attribute to the DMRS entity :param dmrs_xml: Input DMRS XML :return: Modified DMRS XML ''' ltop = '-1' links_to_remove = list() for entity in dmrs_xml: if entity.tag == 'link': link = en...
Attach LTOP as the attribute and remove index def handle_ltop_links(dmrs_xml): ''' Remove LTOP links from DMRS and add LTOP attribute to the DMRS entity :param dmrs_xml: Input DMRS XML :return: Modified DMRS XML ''' ltop = '-1' links_to_remove = list() for entity in dmrs_xml: i...
<commit_before><commit_msg>Attach LTOP as the attribute and remove index<commit_after> def handle_ltop_links(dmrs_xml): ''' Remove LTOP links from DMRS and add LTOP attribute to the DMRS entity :param dmrs_xml: Input DMRS XML :return: Modified DMRS XML ''' ltop = '-1' links_to_remove = list...
23f8cee3b11c839216f9ef7621fbcc039a4e57be
py/longest-harmonious-subsequence.py
py/longest-harmonious-subsequence.py
from collections import Counter class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ c = Counter(nums) m = 0 for k in c: if k + 1 in c: m = max(m, c[k] + c[k + 1]) return m
Add py solution for 594. Longest Harmonious Subsequence
Add py solution for 594. Longest Harmonious Subsequence 594. Longest Harmonious Subsequence: https://leetcode.com/problems/longest-harmonious-subsequence/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 594. Longest Harmonious Subsequence 594. Longest Harmonious Subsequence: https://leetcode.com/problems/longest-harmonious-subsequence/
from collections import Counter class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ c = Counter(nums) m = 0 for k in c: if k + 1 in c: m = max(m, c[k] + c[k + 1]) return m
<commit_before><commit_msg>Add py solution for 594. Longest Harmonious Subsequence 594. Longest Harmonious Subsequence: https://leetcode.com/problems/longest-harmonious-subsequence/<commit_after>
from collections import Counter class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ c = Counter(nums) m = 0 for k in c: if k + 1 in c: m = max(m, c[k] + c[k + 1]) return m
Add py solution for 594. Longest Harmonious Subsequence 594. Longest Harmonious Subsequence: https://leetcode.com/problems/longest-harmonious-subsequence/from collections import Counter class Solution(object): def findLHS(self, nums): """ :type nums: List[int] :rtype: int """ ...
<commit_before><commit_msg>Add py solution for 594. Longest Harmonious Subsequence 594. Longest Harmonious Subsequence: https://leetcode.com/problems/longest-harmonious-subsequence/<commit_after>from collections import Counter class Solution(object): def findLHS(self, nums): """ :type nums: List[in...
555c5ce53f454d538701c56628749b3e9f363034
py/longest-uncommon-subsequence-i.py
py/longest-uncommon-subsequence-i.py
class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rtype: int """ if a == b: return -1 else: return max(len(a), len(b))
Add py solution for 521. Longest Uncommon Subsequence I
Add py solution for 521. Longest Uncommon Subsequence I 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/
Python
apache-2.0
ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode
Add py solution for 521. Longest Uncommon Subsequence I 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/
class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rtype: int """ if a == b: return -1 else: return max(len(a), len(b))
<commit_before><commit_msg>Add py solution for 521. Longest Uncommon Subsequence I 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/<commit_after>
class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rtype: int """ if a == b: return -1 else: return max(len(a), len(b))
Add py solution for 521. Longest Uncommon Subsequence I 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rtype: int """ if a == b: ...
<commit_before><commit_msg>Add py solution for 521. Longest Uncommon Subsequence I 521. Longest Uncommon Subsequence I: https://leetcode.com/problems/longest-uncommon-subsequence-i/<commit_after>class Solution(object): def findLUSlength(self, a, b): """ :type a: str :type b: str :rt...
b8bb7aef7371f52f53f5871b9e27375c39aced97
tests/unit/docs/test_subresource.py
tests/unit/docs/test_subresource.py
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Add test for subresource documentation
Add test for subresource documentation
Python
apache-2.0
boto/boto3
Add test for subresource documentation
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
<commit_before><commit_msg>Add test for subresource documentation<commit_after>
# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file accompa...
Add test for subresource documentation# Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0...
<commit_before><commit_msg>Add test for subresource documentation<commit_after># Copyright 2015 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is locat...
c29ec289d8fe252aa8fd8d913abb3f1bd263eab1
scripts/web-server/alexa-pi.py
scripts/web-server/alexa-pi.py
from flask import Flask from flask_ask import Ask, statement, convert_errors import logging from rfsend import rf_send GPIO.setmode(GPIO.BCM) app = Flask(__name__) ask = Ask(app, '/') logging.getLogger("flask_ask").setLevel(logging.DEBUG) @ask.intent('LocationControlIntent', mapping={'status': 'status', 'location':...
Add Raspberry PI Alexa control server
Add Raspberry PI Alexa control server
Python
bsd-3-clause
kbsezginel/raspberry-pi,kbsezginel/raspberry-pi,kbsezginel/raspberry-pi,kbsezginel/raspberry-pi
Add Raspberry PI Alexa control server
from flask import Flask from flask_ask import Ask, statement, convert_errors import logging from rfsend import rf_send GPIO.setmode(GPIO.BCM) app = Flask(__name__) ask = Ask(app, '/') logging.getLogger("flask_ask").setLevel(logging.DEBUG) @ask.intent('LocationControlIntent', mapping={'status': 'status', 'location':...
<commit_before><commit_msg>Add Raspberry PI Alexa control server<commit_after>
from flask import Flask from flask_ask import Ask, statement, convert_errors import logging from rfsend import rf_send GPIO.setmode(GPIO.BCM) app = Flask(__name__) ask = Ask(app, '/') logging.getLogger("flask_ask").setLevel(logging.DEBUG) @ask.intent('LocationControlIntent', mapping={'status': 'status', 'location':...
Add Raspberry PI Alexa control serverfrom flask import Flask from flask_ask import Ask, statement, convert_errors import logging from rfsend import rf_send GPIO.setmode(GPIO.BCM) app = Flask(__name__) ask = Ask(app, '/') logging.getLogger("flask_ask").setLevel(logging.DEBUG) @ask.intent('LocationControlIntent', map...
<commit_before><commit_msg>Add Raspberry PI Alexa control server<commit_after>from flask import Flask from flask_ask import Ask, statement, convert_errors import logging from rfsend import rf_send GPIO.setmode(GPIO.BCM) app = Flask(__name__) ask = Ask(app, '/') logging.getLogger("flask_ask").setLevel(logging.DEBUG) ...
29ad205b01a45b87d939c8bebb3c2d92ef98f6cb
zephyr/management/commands/send_stats.py
zephyr/management/commands/send_stats.py
from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): help = """Send some stats to statsd. Usage: python manage.py send_stats [incr|decr|timing|timer|gauge] name val""" def handle(self, *args, **options): if len(args) != 3: print ...
Add a management command to send a statsd message
Add a management command to send a statsd message (imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)
Python
apache-2.0
hayderimran7/zulip,Drooids/zulip,Gabriel0402/zulip,levixie/zulip,dxq-git/zulip,PhilSk/zulip,yocome/zulip,esander91/zulip,aliceriot/zulip,eeshangarg/zulip,codeKonami/zulip,tommyip/zulip,jeffcao/zulip,mohsenSy/zulip,hafeez3000/zulip,jonesgithub/zulip,hengqujushi/zulip,JPJPJPOPOP/zulip,synicalsyntax/zulip,adnanh/zulip,tom...
Add a management command to send a statsd message (imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)
from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): help = """Send some stats to statsd. Usage: python manage.py send_stats [incr|decr|timing|timer|gauge] name val""" def handle(self, *args, **options): if len(args) != 3: print ...
<commit_before><commit_msg>Add a management command to send a statsd message (imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)<commit_after>
from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): help = """Send some stats to statsd. Usage: python manage.py send_stats [incr|decr|timing|timer|gauge] name val""" def handle(self, *args, **options): if len(args) != 3: print ...
Add a management command to send a statsd message (imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): help = """Send some stats to statsd. Usage: python manage.py send_stats [incr|decr|timi...
<commit_before><commit_msg>Add a management command to send a statsd message (imported from commit 25ead4a0dee185a139eb5401e109c9cbe937c7bf)<commit_after>from django.core.management.base import BaseCommand from django.conf import settings class Command(BaseCommand): help = """Send some stats to statsd. Usage: py...
0f855b84ccd7e0c1b068b56540f36ac02dca4b66
zerver/migrations/0074_fix_duplicate_attachments.py
zerver/migrations/0074_fix_duplicate_attachments.py
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-13 22:12 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import Count def fix_d...
Add migration to fix duplicate attachment objects.
attachment: Add migration to fix duplicate attachment objects. The comment in the migration explains this change in detail.
Python
apache-2.0
eeshangarg/zulip,ryanbackman/zulip,synicalsyntax/zulip,SmartPeople/zulip,dhcrzf/zulip,shubhamdhama/zulip,zulip/zulip,rishig/zulip,shubhamdhama/zulip,rht/zulip,punchagan/zulip,jrowan/zulip,timabbott/zulip,brainwane/zulip,jackrzhang/zulip,vaidap/zulip,rishig/zulip,rishig/zulip,rht/zulip,jackrzhang/zulip,rishig/zulip,punc...
attachment: Add migration to fix duplicate attachment objects. The comment in the migration explains this change in detail.
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-13 22:12 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import Count def fix_d...
<commit_before><commit_msg>attachment: Add migration to fix duplicate attachment objects. The comment in the migration explains this change in detail.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-13 22:12 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schema import DatabaseSchemaEditor from django.db.migrations.state import StateApps from django.db.models import Count def fix_d...
attachment: Add migration to fix duplicate attachment objects. The comment in the migration explains this change in detail.# -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-13 22:12 from __future__ import unicode_literals from django.db import migrations from django.db.backends.postgresql_psycopg2.schem...
<commit_before><commit_msg>attachment: Add migration to fix duplicate attachment objects. The comment in the migration explains this change in detail.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.10.5 on 2017-04-13 22:12 from __future__ import unicode_literals from django.db import migrations from dja...
086351fb56e2c777bcd6b332c1550acb46fc6fa6
src/ggrc_basic_permissions/roles/Auditor.py
src/ggrc_basic_permissions/roles/Auditor.py
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
Allow auditors to CR comments in context
Allow auditors to CR comments in context
Python
apache-2.0
edofic/ggrc-core,josthkko/ggrc-core,selahssea/ggrc-core,selahssea/ggrc-core,andrei-karalionak/ggrc-core,jmakov/ggrc-core,andrei-karalionak/ggrc-core,j0gurt/ggrc-core,kr41/ggrc-core,edofic/ggrc-core,josthkko/ggrc-core,prasannav7/ggrc-core,AleksNeStu/ggrc-core,NejcZupec/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,edofic/...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by a...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by an auditor to ac...
<commit_before># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file> # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> # Created By: anze@reciprocitylabs.com # Maintained By: anze@reciprocitylabs.com scope = "Audit" description = """ The permissions required by a...
244068d0689973ff462b455ac8db849b0839e694
democracy/tests/test_hearing_admin.py
democracy/tests/test_hearing_admin.py
# -*- coding: utf-8 -*- import pytest from django.contrib import admin from django.core.urlresolvers import reverse @pytest.mark.django_db def test_hearing_admin_renders(admin_client): url = reverse('admin:democracy_hearing_add') response = admin_client.get(url)
Add rudimentary smoke test for hearing admin
Add rudimentary smoke test for hearing admin
Python
mit
vikoivun/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,stephawe/kerrokantasi,stephawe/kerrokantasi,vikoivun/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi,City-of-Helsinki/kerrokantasi
Add rudimentary smoke test for hearing admin
# -*- coding: utf-8 -*- import pytest from django.contrib import admin from django.core.urlresolvers import reverse @pytest.mark.django_db def test_hearing_admin_renders(admin_client): url = reverse('admin:democracy_hearing_add') response = admin_client.get(url)
<commit_before><commit_msg>Add rudimentary smoke test for hearing admin<commit_after>
# -*- coding: utf-8 -*- import pytest from django.contrib import admin from django.core.urlresolvers import reverse @pytest.mark.django_db def test_hearing_admin_renders(admin_client): url = reverse('admin:democracy_hearing_add') response = admin_client.get(url)
Add rudimentary smoke test for hearing admin# -*- coding: utf-8 -*- import pytest from django.contrib import admin from django.core.urlresolvers import reverse @pytest.mark.django_db def test_hearing_admin_renders(admin_client): url = reverse('admin:democracy_hearing_add') response = admin_client.get(url)
<commit_before><commit_msg>Add rudimentary smoke test for hearing admin<commit_after># -*- coding: utf-8 -*- import pytest from django.contrib import admin from django.core.urlresolvers import reverse @pytest.mark.django_db def test_hearing_admin_renders(admin_client): url = reverse('admin:democracy_hearing_add')...
6a767b028647220199bd90c1b26226802a089a6f
models/official/detection/export_tflite_model.py
models/official/detection/export_tflite_model.py
# Copyright 2019 The TensorFlow Authors. 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 applica...
Add a binary to convert model to tflite supported foramt.
Add a binary to convert model to tflite supported foramt. PiperOrigin-RevId: 302497553
Python
apache-2.0
tensorflow/tpu,tensorflow/tpu,tensorflow/tpu,tensorflow/tpu
Add a binary to convert model to tflite supported foramt. PiperOrigin-RevId: 302497553
# Copyright 2019 The TensorFlow Authors. 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 applica...
<commit_before><commit_msg>Add a binary to convert model to tflite supported foramt. PiperOrigin-RevId: 302497553<commit_after>
# Copyright 2019 The TensorFlow Authors. 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 applica...
Add a binary to convert model to tflite supported foramt. PiperOrigin-RevId: 302497553# Copyright 2019 The TensorFlow Authors. 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 Licen...
<commit_before><commit_msg>Add a binary to convert model to tflite supported foramt. PiperOrigin-RevId: 302497553<commit_after># Copyright 2019 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the Lice...
739cca47c700a3a5965465c958297eee2de8f8b6
lib/bridgedb/test/test_util.py
lib/bridgedb/test/test_util.py
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2014, Isis Lovecruft # (c) 2007-2014, The Tor Project, Inc. # (c) 2007-201...
Add unittests for bridgedb.util module.
Add unittests for bridgedb.util module.
Python
bsd-3-clause
mmaker/bridgedb,pagea/bridgedb,mmaker/bridgedb,pagea/bridgedb
Add unittests for bridgedb.util module.
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2014, Isis Lovecruft # (c) 2007-2014, The Tor Project, Inc. # (c) 2007-201...
<commit_before><commit_msg>Add unittests for bridgedb.util module.<commit_after>
# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2014, Isis Lovecruft # (c) 2007-2014, The Tor Project, Inc. # (c) 2007-201...
Add unittests for bridgedb.util module.# -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2014, Isis Lovecruft # (c) 2007-2014, The Tor P...
<commit_before><commit_msg>Add unittests for bridgedb.util module.<commit_after># -*- coding: utf-8 -*- # # This file is part of BridgeDB, a Tor bridge distribution system. # # :authors: Isis Lovecruft 0xA3ADB67A2CDB8B35 <isis@torproject.org> # please also see AUTHORS file # :copyright: (c) 2014, Isis Lovecru...
f6572a125d8129cdf22ea8a1f5e60416d10b3f5b
lintcode/Medium/182_Delete_Digits.py
lintcode/Medium/182_Delete_Digits.py
class Solution: """ @param A: A positive integer which has N digits, A is a string. @param k: Remove k digits. @return: A string """ def DeleteDigits(self, A, k): # write you code here c = 0 res = A while (c < k): init = res[0] break_out = ...
Add solution to lintcode question 182
Add solution to lintcode question 182
Python
mit
Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode,Rhadow/leetcode
Add solution to lintcode question 182
class Solution: """ @param A: A positive integer which has N digits, A is a string. @param k: Remove k digits. @return: A string """ def DeleteDigits(self, A, k): # write you code here c = 0 res = A while (c < k): init = res[0] break_out = ...
<commit_before><commit_msg>Add solution to lintcode question 182<commit_after>
class Solution: """ @param A: A positive integer which has N digits, A is a string. @param k: Remove k digits. @return: A string """ def DeleteDigits(self, A, k): # write you code here c = 0 res = A while (c < k): init = res[0] break_out = ...
Add solution to lintcode question 182class Solution: """ @param A: A positive integer which has N digits, A is a string. @param k: Remove k digits. @return: A string """ def DeleteDigits(self, A, k): # write you code here c = 0 res = A while (c < k): i...
<commit_before><commit_msg>Add solution to lintcode question 182<commit_after>class Solution: """ @param A: A positive integer which has N digits, A is a string. @param k: Remove k digits. @return: A string """ def DeleteDigits(self, A, k): # write you code here c = 0 res...
e875b89f9370da901d72d4bb7b0cc581cde541de
teuthology/task/rbd_fsx.py
teuthology/task/rbd_fsx.py
import contextlib import logging from ..orchestra import run from teuthology.parallel import parallel log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Run fsx on an rbd image. Currently this requires running as client.admin to create a pool. Specify which ...
Add task for running fsx on an rbd image.
Add task for running fsx on an rbd image.
Python
mit
robbat2/teuthology,zhouyuan/teuthology,dreamhost/teuthology,SUSE/teuthology,SUSE/teuthology,ivotron/teuthology,tchaikov/teuthology,tchaikov/teuthology,t-miyamae/teuthology,ceph/teuthology,ceph/teuthology,zhouyuan/teuthology,ktdreyer/teuthology,yghannam/teuthology,ktdreyer/teuthology,robbat2/teuthology,dmick/teuthology,...
Add task for running fsx on an rbd image.
import contextlib import logging from ..orchestra import run from teuthology.parallel import parallel log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Run fsx on an rbd image. Currently this requires running as client.admin to create a pool. Specify which ...
<commit_before><commit_msg>Add task for running fsx on an rbd image.<commit_after>
import contextlib import logging from ..orchestra import run from teuthology.parallel import parallel log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Run fsx on an rbd image. Currently this requires running as client.admin to create a pool. Specify which ...
Add task for running fsx on an rbd image.import contextlib import logging from ..orchestra import run from teuthology.parallel import parallel log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Run fsx on an rbd image. Currently this requires running as client.admin ...
<commit_before><commit_msg>Add task for running fsx on an rbd image.<commit_after>import contextlib import logging from ..orchestra import run from teuthology.parallel import parallel log = logging.getLogger(__name__) @contextlib.contextmanager def task(ctx, config): """ Run fsx on an rbd image. Current...
b732ea4bd64a05c7d75ddbce0925d5402142c67d
scripts/add_pos.py
scripts/add_pos.py
#!/usr/bin/env python import csv from itertools import tee import nltk MATCH_FILE = 'data/6705bigrams-PopewDryden.txt' OUTPUT_FILE = 'data/6705bigrams-Output.txt' def tokenize(text): """This handles tokenizing and normalizing everything.""" return [ token.lower() for token in nltk.wordpun...
Add line position to TSV file.
Add line position to TSV file.
Python
apache-2.0
erochest/c18sgml
Add line position to TSV file.
#!/usr/bin/env python import csv from itertools import tee import nltk MATCH_FILE = 'data/6705bigrams-PopewDryden.txt' OUTPUT_FILE = 'data/6705bigrams-Output.txt' def tokenize(text): """This handles tokenizing and normalizing everything.""" return [ token.lower() for token in nltk.wordpun...
<commit_before><commit_msg>Add line position to TSV file.<commit_after>
#!/usr/bin/env python import csv from itertools import tee import nltk MATCH_FILE = 'data/6705bigrams-PopewDryden.txt' OUTPUT_FILE = 'data/6705bigrams-Output.txt' def tokenize(text): """This handles tokenizing and normalizing everything.""" return [ token.lower() for token in nltk.wordpun...
Add line position to TSV file.#!/usr/bin/env python import csv from itertools import tee import nltk MATCH_FILE = 'data/6705bigrams-PopewDryden.txt' OUTPUT_FILE = 'data/6705bigrams-Output.txt' def tokenize(text): """This handles tokenizing and normalizing everything.""" return [ token.lower() ...
<commit_before><commit_msg>Add line position to TSV file.<commit_after>#!/usr/bin/env python import csv from itertools import tee import nltk MATCH_FILE = 'data/6705bigrams-PopewDryden.txt' OUTPUT_FILE = 'data/6705bigrams-Output.txt' def tokenize(text): """This handles tokenizing and normalizing everything."...
429cf2018a5480e7a2ab083b95bfe74d3cc8bfcb
scripts/exports.py
scripts/exports.py
""" Some really simple export scripts. """ from __future__ import unicode_literals import io import iterutils import pymongo import twitterproj def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" args = [iter(iterable)] * n return iterutils.izip_longest(fillvalue=fillv...
Add script to export hashtags counts, user tweet counts, etc.
Add script to export hashtags counts, user tweet counts, etc.
Python
unlicense
chebee7i/twitter,chebee7i/twitter,chebee7i/twitter
Add script to export hashtags counts, user tweet counts, etc.
""" Some really simple export scripts. """ from __future__ import unicode_literals import io import iterutils import pymongo import twitterproj def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" args = [iter(iterable)] * n return iterutils.izip_longest(fillvalue=fillv...
<commit_before><commit_msg>Add script to export hashtags counts, user tweet counts, etc.<commit_after>
""" Some really simple export scripts. """ from __future__ import unicode_literals import io import iterutils import pymongo import twitterproj def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" args = [iter(iterable)] * n return iterutils.izip_longest(fillvalue=fillv...
Add script to export hashtags counts, user tweet counts, etc.""" Some really simple export scripts. """ from __future__ import unicode_literals import io import iterutils import pymongo import twitterproj def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', 'x') --> ABC DEF Gxx" args = [iter(ite...
<commit_before><commit_msg>Add script to export hashtags counts, user tweet counts, etc.<commit_after>""" Some really simple export scripts. """ from __future__ import unicode_literals import io import iterutils import pymongo import twitterproj def grouper(n, iterable, fillvalue=None): "grouper(3, 'ABCDEFG', '...
5babccca12e1cbef655957b038594eadb1fe63bc
nose2/tests/unit/test_prof_plugin.py
nose2/tests/unit/test_prof_plugin.py
import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotshot = Stub() ...
from nose2.plugins import prof from nose2.events import StartTestRunEvent from nose2.tests._common import Stub, TestCase class TestProfPlugin(TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hots...
Use real events and proper TestCase
Use real events and proper TestCase
Python
bsd-2-clause
ojengwa/nose2,ezigman/nose2,leth/nose2,ptthiem/nose2,leth/nose2,little-dude/nose2,ptthiem/nose2,ezigman/nose2,little-dude/nose2,ojengwa/nose2
import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotshot = Stub() ...
from nose2.plugins import prof from nose2.events import StartTestRunEvent from nose2.tests._common import Stub, TestCase class TestProfPlugin(TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hots...
<commit_before>import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotsho...
from nose2.plugins import prof from nose2.events import StartTestRunEvent from nose2.tests._common import Stub, TestCase class TestProfPlugin(TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hots...
import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotshot = Stub() ...
<commit_before>import unittest2 from ..plugins import prof from ._common import Stub, FakeStartTestRunEvent class TestProfPlugin(unittest2.TestCase): tags = ['unit'] def setUp(self): self.plugin = prof.Profiler() self.hotshot = prof.hotshot self.stats = prof.stats prof.hotsho...
55a17865393f8c4d489f41dccbcc656670c81f2b
bika/lims/fields.py
bika/lims/fields.py
"""Generic field extensions """ from Acquisition import aq_inner from Acquisition import aq_parent from Acquisition import Implicit from Acquisition import ImplicitAcquisitionWrapper from archetypes.schemaextender.field import ExtensionField from archetypes.schemaextender.field import ExtensionField from archetypes.sch...
Move schemaextender automatic getter and setter methods
Move schemaextender automatic getter and setter methods
Python
agpl-3.0
anneline/Bika-LIMS,labsanmartin/Bika-LIMS,rockfruit/bika.lims,labsanmartin/Bika-LIMS,DeBortoliWines/Bika-LIMS,DeBortoliWines/Bika-LIMS,rockfruit/bika.lims,veroc/Bika-LIMS,veroc/Bika-LIMS,labsanmartin/Bika-LIMS,anneline/Bika-LIMS,DeBortoliWines/Bika-LIMS,anneline/Bika-LIMS,veroc/Bika-LIMS
Move schemaextender automatic getter and setter methods
"""Generic field extensions """ from Acquisition import aq_inner from Acquisition import aq_parent from Acquisition import Implicit from Acquisition import ImplicitAcquisitionWrapper from archetypes.schemaextender.field import ExtensionField from archetypes.schemaextender.field import ExtensionField from archetypes.sch...
<commit_before><commit_msg>Move schemaextender automatic getter and setter methods<commit_after>
"""Generic field extensions """ from Acquisition import aq_inner from Acquisition import aq_parent from Acquisition import Implicit from Acquisition import ImplicitAcquisitionWrapper from archetypes.schemaextender.field import ExtensionField from archetypes.schemaextender.field import ExtensionField from archetypes.sch...
Move schemaextender automatic getter and setter methods"""Generic field extensions """ from Acquisition import aq_inner from Acquisition import aq_parent from Acquisition import Implicit from Acquisition import ImplicitAcquisitionWrapper from archetypes.schemaextender.field import ExtensionField from archetypes.schemae...
<commit_before><commit_msg>Move schemaextender automatic getter and setter methods<commit_after>"""Generic field extensions """ from Acquisition import aq_inner from Acquisition import aq_parent from Acquisition import Implicit from Acquisition import ImplicitAcquisitionWrapper from archetypes.schemaextender.field impo...
a1531197784cce0222720581a3bc47cd7b83e0ca
bluebottle/utils/template_loaders.py
bluebottle/utils/template_loaders.py
from django.template.loader import BaseLoader from django.db import connection from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils._os import safe_join from django.template.base import TemplateDoesNotExist class TenantTemplateLoader(BaseLoader): is_usable = T...
Add template loader for clients
Add template loader for clients
Python
bsd-3-clause
jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,jfterpstra/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle,onepercentclub/bluebottle
Add template loader for clients
from django.template.loader import BaseLoader from django.db import connection from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils._os import safe_join from django.template.base import TemplateDoesNotExist class TenantTemplateLoader(BaseLoader): is_usable = T...
<commit_before><commit_msg>Add template loader for clients<commit_after>
from django.template.loader import BaseLoader from django.db import connection from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils._os import safe_join from django.template.base import TemplateDoesNotExist class TenantTemplateLoader(BaseLoader): is_usable = T...
Add template loader for clientsfrom django.template.loader import BaseLoader from django.db import connection from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils._os import safe_join from django.template.base import TemplateDoesNotExist class TenantTemplateLoader...
<commit_before><commit_msg>Add template loader for clients<commit_after>from django.template.loader import BaseLoader from django.db import connection from django.conf import settings from django.core.exceptions import ImproperlyConfigured from django.utils._os import safe_join from django.template.base import Template...
6d42f4c26550486af6caa1ee74475d051af18940
python/qisrc/test/test_qisrc_reset.py
python/qisrc/test/test_qisrc_reset.py
# this is only used on buildfarm, so only test this import pytest import qisrc.snapshot def test_reset_dash_f(qisrc_action, git_server): git_server.create_repo("foo") manifest_url = git_server.manifest_url git_worktree = qisrc_action.git_worktree tmpdir = qisrc_action.tmpdir git_worktree.configure...
Add a test for qisrc reset
Add a test for qisrc reset Change-Id: I6d009b46aefc53c7eca18d77225796614d200d10
Python
bsd-3-clause
dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild
Add a test for qisrc reset Change-Id: I6d009b46aefc53c7eca18d77225796614d200d10
# this is only used on buildfarm, so only test this import pytest import qisrc.snapshot def test_reset_dash_f(qisrc_action, git_server): git_server.create_repo("foo") manifest_url = git_server.manifest_url git_worktree = qisrc_action.git_worktree tmpdir = qisrc_action.tmpdir git_worktree.configure...
<commit_before><commit_msg>Add a test for qisrc reset Change-Id: I6d009b46aefc53c7eca18d77225796614d200d10<commit_after>
# this is only used on buildfarm, so only test this import pytest import qisrc.snapshot def test_reset_dash_f(qisrc_action, git_server): git_server.create_repo("foo") manifest_url = git_server.manifest_url git_worktree = qisrc_action.git_worktree tmpdir = qisrc_action.tmpdir git_worktree.configure...
Add a test for qisrc reset Change-Id: I6d009b46aefc53c7eca18d77225796614d200d10# this is only used on buildfarm, so only test this import pytest import qisrc.snapshot def test_reset_dash_f(qisrc_action, git_server): git_server.create_repo("foo") manifest_url = git_server.manifest_url git_worktree = qisrc...
<commit_before><commit_msg>Add a test for qisrc reset Change-Id: I6d009b46aefc53c7eca18d77225796614d200d10<commit_after># this is only used on buildfarm, so only test this import pytest import qisrc.snapshot def test_reset_dash_f(qisrc_action, git_server): git_server.create_repo("foo") manifest_url = git_ser...
7847b0dab326110ffa834fc35e98f8b9e3fef3e3
PID_determine_coef.py
PID_determine_coef.py
from LLD import * import csv SAMPLING_PERIOD = 15 MAX_DUTY = 1800/3200 lld = LLD() class Fake_Tank(object): def __init__(self, name): self.resistor_duty = 0 self.tank_name = name hot = Fake_Tank("Hot") mash = Fake_Tank("Mash") boil = Fake_Tank("Boil") tanks = (mash, boil, hot) tut = boil # f...
Add a script to calibrate PID
Add a script to calibrate PID
Python
mit
flagos/pico-brewUI,flagos/pico-brewUI,flagos/pico-brewUI,flagos/pico-brewUI,flagos/pico-brewUI
Add a script to calibrate PID
from LLD import * import csv SAMPLING_PERIOD = 15 MAX_DUTY = 1800/3200 lld = LLD() class Fake_Tank(object): def __init__(self, name): self.resistor_duty = 0 self.tank_name = name hot = Fake_Tank("Hot") mash = Fake_Tank("Mash") boil = Fake_Tank("Boil") tanks = (mash, boil, hot) tut = boil # f...
<commit_before><commit_msg>Add a script to calibrate PID<commit_after>
from LLD import * import csv SAMPLING_PERIOD = 15 MAX_DUTY = 1800/3200 lld = LLD() class Fake_Tank(object): def __init__(self, name): self.resistor_duty = 0 self.tank_name = name hot = Fake_Tank("Hot") mash = Fake_Tank("Mash") boil = Fake_Tank("Boil") tanks = (mash, boil, hot) tut = boil # f...
Add a script to calibrate PIDfrom LLD import * import csv SAMPLING_PERIOD = 15 MAX_DUTY = 1800/3200 lld = LLD() class Fake_Tank(object): def __init__(self, name): self.resistor_duty = 0 self.tank_name = name hot = Fake_Tank("Hot") mash = Fake_Tank("Mash") boil = Fake_Tank("Boil") tanks = (mas...
<commit_before><commit_msg>Add a script to calibrate PID<commit_after>from LLD import * import csv SAMPLING_PERIOD = 15 MAX_DUTY = 1800/3200 lld = LLD() class Fake_Tank(object): def __init__(self, name): self.resistor_duty = 0 self.tank_name = name hot = Fake_Tank("Hot") mash = Fake_Tank("Mas...
08e892ce9ee62518a5a79890e7af4bbdcdb41aed
lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py
lms/djangoapps/django_comment_client/management/commands/create_roles_for_existing.py
""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment from django_comment_client.permissions import assig...
Add command to seed forum permissions to existing users
Add command to seed forum permissions to existing users
Python
agpl-3.0
IITBinterns13/edx-platform-dev,cpennington/edx-platform,nagyistoce/edx-platform,halvertoluke/edx-platform,kmoocdev2/edx-platform,ovnicraft/edx-platform,ampax/edx-platform,arifsetiawan/edx-platform,edx-solutions/edx-platform,andyzsf/edx,mcgachey/edx-platform,xingyepei/edx-platform,vasyarv/edx-platform,Edraak/circleci-ed...
Add command to seed forum permissions to existing users
""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment from django_comment_client.permissions import assig...
<commit_before><commit_msg>Add command to seed forum permissions to existing users<commit_after>
""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollment from django_comment_client.permissions import assig...
Add command to seed forum permissions to existing users""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError from student.models import CourseEnrollm...
<commit_before><commit_msg>Add command to seed forum permissions to existing users<commit_after>""" This must be run only after seed_permissions_roles.py! Creates default roles for all users currently in the database. Just runs through Enrollments. """ from django.core.management.base import BaseCommand, CommandError ...
7b4b07dddccfe11dd42aa3613c68acc2939bef41
src/screenquota.py
src/screenquota.py
#!/usr/bin/env python import cec # from python-cec import os.path import time cec.init() for adress, device in cec.list_devices().items(): print device.address, device.vendor, device.osd_string tv = cec.Device(0) while True: if os.path.exists('/var/opt/screendisable/disable'): try: ...
Disable tv through raspberry pi's cec interface.
Disable tv through raspberry pi's cec interface.
Python
mit
vlimit/screenquota,vlimit/screenquota
Disable tv through raspberry pi's cec interface.
#!/usr/bin/env python import cec # from python-cec import os.path import time cec.init() for adress, device in cec.list_devices().items(): print device.address, device.vendor, device.osd_string tv = cec.Device(0) while True: if os.path.exists('/var/opt/screendisable/disable'): try: ...
<commit_before><commit_msg>Disable tv through raspberry pi's cec interface.<commit_after>
#!/usr/bin/env python import cec # from python-cec import os.path import time cec.init() for adress, device in cec.list_devices().items(): print device.address, device.vendor, device.osd_string tv = cec.Device(0) while True: if os.path.exists('/var/opt/screendisable/disable'): try: ...
Disable tv through raspberry pi's cec interface.#!/usr/bin/env python import cec # from python-cec import os.path import time cec.init() for adress, device in cec.list_devices().items(): print device.address, device.vendor, device.osd_string tv = cec.Device(0) while True: if os.path.exists('/var/opt/s...
<commit_before><commit_msg>Disable tv through raspberry pi's cec interface.<commit_after>#!/usr/bin/env python import cec # from python-cec import os.path import time cec.init() for adress, device in cec.list_devices().items(): print device.address, device.vendor, device.osd_string tv = cec.Device(0) while...
d3ab1bb80945f8ebf6c16620e5629f497bdc5a17
violations/tests/test_dummy.py
violations/tests/test_dummy.py
from django.test import TestCase from tasks.const import STATUS_SUCCESS from ..dummy import dummy_violation class DummyViolationCase(TestCase): """Dummy violation case""" def test_result(self): """Test dummy violation result""" data = {'raw': ''} result = dummy_violation(data) ...
Add test for dummy violation
Add test for dummy violation
Python
mit
nvbn/coviolations_web,nvbn/coviolations_web
Add test for dummy violation
from django.test import TestCase from tasks.const import STATUS_SUCCESS from ..dummy import dummy_violation class DummyViolationCase(TestCase): """Dummy violation case""" def test_result(self): """Test dummy violation result""" data = {'raw': ''} result = dummy_violation(data) ...
<commit_before><commit_msg>Add test for dummy violation<commit_after>
from django.test import TestCase from tasks.const import STATUS_SUCCESS from ..dummy import dummy_violation class DummyViolationCase(TestCase): """Dummy violation case""" def test_result(self): """Test dummy violation result""" data = {'raw': ''} result = dummy_violation(data) ...
Add test for dummy violationfrom django.test import TestCase from tasks.const import STATUS_SUCCESS from ..dummy import dummy_violation class DummyViolationCase(TestCase): """Dummy violation case""" def test_result(self): """Test dummy violation result""" data = {'raw': ''} result = d...
<commit_before><commit_msg>Add test for dummy violation<commit_after>from django.test import TestCase from tasks.const import STATUS_SUCCESS from ..dummy import dummy_violation class DummyViolationCase(TestCase): """Dummy violation case""" def test_result(self): """Test dummy violation result""" ...
21c60fdd99e37436228cfe8e59f1b8788ea2b58b
platformio/builder/tools/pioar.py
platformio/builder/tools/pioar.py
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: pass d...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: # pylint: disab...
Hide PyLint warning with undefined WindowsError exception
Hide PyLint warning with undefined WindowsError exception
Python
apache-2.0
dkuku/platformio,mseroczynski/platformio,jrobeson/platformio,bkudria/platformio,awong1900/platformio,TimJay/platformio,TimJay/platformio,jrobeson/platformio,awong1900/platformio,awong1900/platformio,mcanthony/platformio,TimJay/platformio,ZachMassia/platformio,platformio/platformio-core,TimJay/platformio,platformio/plat...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: pass d...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: # pylint: disab...
<commit_before># Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: ...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: # pylint: disab...
# Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: pass d...
<commit_before># Copyright (C) Ivan Kravets <me@ikravets.com> # See LICENSE for details. import atexit from os import remove from tempfile import mkstemp MAX_SOURCES_LENGTH = 8000 # Windows CLI has limit with command length to 8192 def _remove_tmpfile(path): try: remove(path) except WindowsError: ...
8e59e994370749db03ffda32bc449049c49a3f22
python/example_code/sqs/change_visibility.py
python/example_code/sqs/change_visibility.py
# Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
Add SQS visibility timeout message example
Add SQS visibility timeout message example
Python
apache-2.0
awsdocs/aws-doc-sdk-examples,imshashank/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,awsdocs/aws-doc-sdk-examples,imshashank/aws-doc-sdk-exam...
Add SQS visibility timeout message example
# Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
<commit_before><commit_msg>Add SQS visibility timeout message example<commit_after>
# Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/apache2.0/ # # or in the "license" file ac...
Add SQS visibility timeout message example# Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License is located at # # http://aws.amazon.com/...
<commit_before><commit_msg>Add SQS visibility timeout message example<commit_after># Copyright 2010-2016 Amazon.com, Inc. or its affiliates. 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. A copy of # the License...
a88d9181497ac18a3905e33664e1642e68b192f8
reports/migrations/0003_indonesia-weights.py
reports/migrations/0003_indonesia-weights.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django_countries import countries def populate_weights(apps, schema_editor): Weights = apps.get_model("reports", "Weights") db_alias = schema_editor.connection.alias for item in COUNTRY_WEIGHTS: ...
Add Indonesia weights as migration
Add Indonesia weights as migration
Python
apache-2.0
Code4SA/gmmp,Code4SA/gmmp,Code4SA/gmmp
Add Indonesia weights as migration
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django_countries import countries def populate_weights(apps, schema_editor): Weights = apps.get_model("reports", "Weights") db_alias = schema_editor.connection.alias for item in COUNTRY_WEIGHTS: ...
<commit_before><commit_msg>Add Indonesia weights as migration<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django_countries import countries def populate_weights(apps, schema_editor): Weights = apps.get_model("reports", "Weights") db_alias = schema_editor.connection.alias for item in COUNTRY_WEIGHTS: ...
Add Indonesia weights as migration# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django_countries import countries def populate_weights(apps, schema_editor): Weights = apps.get_model("reports", "Weights") db_alias = schema_editor.connection.alias for...
<commit_before><commit_msg>Add Indonesia weights as migration<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations from django_countries import countries def populate_weights(apps, schema_editor): Weights = apps.get_model("reports", "Weights") db_alias ...
903b448a5a6e8eb882fbfa7cb48fa9e17d7c21af
tests/test_main.py
tests/test_main.py
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Add tests around our new handling of exceptions
Add tests around our new handling of exceptions
Python
apache-2.0
pypa/twine
Add tests around our new handling of exceptions
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
<commit_before><commit_msg>Add tests around our new handling of exceptions<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the Li...
Add tests around our new handling of exceptions# 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 ...
<commit_before><commit_msg>Add tests around our new handling of exceptions<commit_after># Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless...
3b684eeadb0c8b39593b14c15233a314bbab0895
troposphere/sns.py
troposphere/sns.py
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
Update SNS per 2019-11-21 changes
Update SNS per 2019-11-21 changes
Python
bsd-2-clause
cloudtools/troposphere,ikben/troposphere,ikben/troposphere,cloudtools/troposphere
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
<commit_before># Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, ...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
# Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, True), ...
<commit_before># Copyright (c) 2012-2013, Mark Peek <mark@peek.org> # All rights reserved. # # See LICENSE file for full license. from . import AWSObject, AWSProperty, Tags from .compat import policytypes from .validators import boolean class Subscription(AWSProperty): props = { 'Endpoint': (basestring, ...