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
b595e1be84159c27b9d9bb81bbd66b78e5c084ce
pyoommf/small_example.py
pyoommf/small_example.py
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
Remove separate execute mif command.
Remove separate execute mif command.
Python
bsd-2-clause
ryanpepper/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,fangohr/oommf-python,fangohr/oommf-python,ryanpepper/oommf-python,ryanpepper/oommf-python
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
<commit_before>from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 ...
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 # exchange ene...
<commit_before>from sim import Sim from mesh import Mesh from exchange import Exchange from demag import Demag from zeeman import Zeeman # Mesh specification. lx = ly = lz = 50e-9 # x, y, and z dimensions (m) dx = dy = dz = 5e-9 # x, y, and z cell dimensions (m) Ms = 8e5 # saturation magnetisation (A/m) A = 1e-11 ...
b6d1984aa264c785c31f90485ffefa88fd0149dd
takeyourmeds/reminders/migrations/0002_reminder_type.py
takeyourmeds/reminders/migrations/0002_reminder_type.py
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-16 09:44 from __future__ import unicode_literals from django.db import migrations, models def populate_type_field(apps, schema_editor): from takeyourmeds.reminders.enums import TypeEnum Reminder = apps.get_model('reminders', 'Reminder') for ...
Move to a type field
Move to a type field
Python
mit
takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web,takeyourmeds/takeyourmeds-web
Move to a type field
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-16 09:44 from __future__ import unicode_literals from django.db import migrations, models def populate_type_field(apps, schema_editor): from takeyourmeds.reminders.enums import TypeEnum Reminder = apps.get_model('reminders', 'Reminder') for ...
<commit_before><commit_msg>Move to a type field<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-16 09:44 from __future__ import unicode_literals from django.db import migrations, models def populate_type_field(apps, schema_editor): from takeyourmeds.reminders.enums import TypeEnum Reminder = apps.get_model('reminders', 'Reminder') for ...
Move to a type field# -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-16 09:44 from __future__ import unicode_literals from django.db import migrations, models def populate_type_field(apps, schema_editor): from takeyourmeds.reminders.enums import TypeEnum Reminder = apps.get_model('reminders', '...
<commit_before><commit_msg>Move to a type field<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9b1 on 2015-11-16 09:44 from __future__ import unicode_literals from django.db import migrations, models def populate_type_field(apps, schema_editor): from takeyourmeds.reminders.enums import TypeEnum ...
b9574fd59e2aba2d538fd11b172b3d14fde29b4d
Lib/test/test_readline.py
Lib/test/test_readline.py
""" Very minimal unittests for parts of the readline module. These tests were added to check that the libedit emulation on OSX and the "real" readline have the same interface for history manipulation. That's why the tests cover only a small subset of the interface. """ import unittest from test.test_support import run...
Add testcase for readline-using-libedit on OSX
Add testcase for readline-using-libedit on OSX
Python
mit
sk-/python2.7-type-annotator,sk-/python2.7-type-annotator,sk-/python2.7-type-annotator
Add testcase for readline-using-libedit on OSX
""" Very minimal unittests for parts of the readline module. These tests were added to check that the libedit emulation on OSX and the "real" readline have the same interface for history manipulation. That's why the tests cover only a small subset of the interface. """ import unittest from test.test_support import run...
<commit_before><commit_msg>Add testcase for readline-using-libedit on OSX<commit_after>
""" Very minimal unittests for parts of the readline module. These tests were added to check that the libedit emulation on OSX and the "real" readline have the same interface for history manipulation. That's why the tests cover only a small subset of the interface. """ import unittest from test.test_support import run...
Add testcase for readline-using-libedit on OSX""" Very minimal unittests for parts of the readline module. These tests were added to check that the libedit emulation on OSX and the "real" readline have the same interface for history manipulation. That's why the tests cover only a small subset of the interface. """ imp...
<commit_before><commit_msg>Add testcase for readline-using-libedit on OSX<commit_after>""" Very minimal unittests for parts of the readline module. These tests were added to check that the libedit emulation on OSX and the "real" readline have the same interface for history manipulation. That's why the tests cover only...
47f81e5336676bddb8f02d5cd240128889315d59
CodeFights/crackingPassword.py
CodeFights/crackingPassword.py
#!/usr/local/bin/python # Code Fights Cracking Password Problem from itertools import product def crackingPassword(digits, k, d): def createNumber(digs): return "".join(map(str, digs)) return sorted([s for s in [''.join(digs) for digs in product(createNumber(digits), repeat=k)] if ...
Solve Code Fights cracking password problem
Solve Code Fights cracking password problem
Python
mit
HKuz/Test_Code
Solve Code Fights cracking password problem
#!/usr/local/bin/python # Code Fights Cracking Password Problem from itertools import product def crackingPassword(digits, k, d): def createNumber(digs): return "".join(map(str, digs)) return sorted([s for s in [''.join(digs) for digs in product(createNumber(digits), repeat=k)] if ...
<commit_before><commit_msg>Solve Code Fights cracking password problem<commit_after>
#!/usr/local/bin/python # Code Fights Cracking Password Problem from itertools import product def crackingPassword(digits, k, d): def createNumber(digs): return "".join(map(str, digs)) return sorted([s for s in [''.join(digs) for digs in product(createNumber(digits), repeat=k)] if ...
Solve Code Fights cracking password problem#!/usr/local/bin/python # Code Fights Cracking Password Problem from itertools import product def crackingPassword(digits, k, d): def createNumber(digs): return "".join(map(str, digs)) return sorted([s for s in [''.join(digs) for digs in p...
<commit_before><commit_msg>Solve Code Fights cracking password problem<commit_after>#!/usr/local/bin/python # Code Fights Cracking Password Problem from itertools import product def crackingPassword(digits, k, d): def createNumber(digs): return "".join(map(str, digs)) return sorted([s for s in [''.j...
24709b6221c43ef61699b2055a83108dc2e739db
reddit_adzerk/tests/unit/test_adzerkpromote.py
reddit_adzerk/tests/unit/test_adzerkpromote.py
from mock import MagicMock, Mock, patch from random import randint from r2.tests import RedditTestCase from reddit_adzerk.adzerkpromote import flight_is_active class TestIsActive(RedditTestCase): def test_flight_is_active(self): """ Assert that `flight_is_active` returns `True` only if all kwar...
Add unit tests for flight_is_active
Add unit tests for flight_is_active
Python
bsd-3-clause
madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk,madbook/reddit-plugin-adzerk
Add unit tests for flight_is_active
from mock import MagicMock, Mock, patch from random import randint from r2.tests import RedditTestCase from reddit_adzerk.adzerkpromote import flight_is_active class TestIsActive(RedditTestCase): def test_flight_is_active(self): """ Assert that `flight_is_active` returns `True` only if all kwar...
<commit_before><commit_msg>Add unit tests for flight_is_active<commit_after>
from mock import MagicMock, Mock, patch from random import randint from r2.tests import RedditTestCase from reddit_adzerk.adzerkpromote import flight_is_active class TestIsActive(RedditTestCase): def test_flight_is_active(self): """ Assert that `flight_is_active` returns `True` only if all kwar...
Add unit tests for flight_is_activefrom mock import MagicMock, Mock, patch from random import randint from r2.tests import RedditTestCase from reddit_adzerk.adzerkpromote import flight_is_active class TestIsActive(RedditTestCase): def test_flight_is_active(self): """ Assert that `flight_is_acti...
<commit_before><commit_msg>Add unit tests for flight_is_active<commit_after>from mock import MagicMock, Mock, patch from random import randint from r2.tests import RedditTestCase from reddit_adzerk.adzerkpromote import flight_is_active class TestIsActive(RedditTestCase): def test_flight_is_active(self): ...
b10202ab7e5c79af8b0925ceed9ccbc95e52c7a0
pipeline_docs/pipeline_intervals/trackers/GeneProfile.py
pipeline_docs/pipeline_intervals/trackers/GeneProfile.py
import os, sys, re, types, itertools import matplotlib.pyplot as plt import numpy import numpy.ma import Stats import Histogram import Annotations from SphinxReport.Tracker import * from IntervalReport import * ################################################################################## ########################...
Add new tracker for by overlap status gene profile plots in pipeline_intervals
Add new tracker for by overlap status gene profile plots in pipeline_intervals
Python
mit
CGATOxford/CGATPipelines,CGATOxford/CGATPipelines,AntonioJBT/CGATPipeline_core,AntonioJBT/CGATPipeline_core,CGATOxford/CGATPipelines,AntonioJBT/CGATPipeline_core,CGATOxford/CGATPipelines,CGATOxford/CGATPipelines,AntonioJBT/CGATPipeline_core
Add new tracker for by overlap status gene profile plots in pipeline_intervals
import os, sys, re, types, itertools import matplotlib.pyplot as plt import numpy import numpy.ma import Stats import Histogram import Annotations from SphinxReport.Tracker import * from IntervalReport import * ################################################################################## ########################...
<commit_before><commit_msg>Add new tracker for by overlap status gene profile plots in pipeline_intervals<commit_after>
import os, sys, re, types, itertools import matplotlib.pyplot as plt import numpy import numpy.ma import Stats import Histogram import Annotations from SphinxReport.Tracker import * from IntervalReport import * ################################################################################## ########################...
Add new tracker for by overlap status gene profile plots in pipeline_intervalsimport os, sys, re, types, itertools import matplotlib.pyplot as plt import numpy import numpy.ma import Stats import Histogram import Annotations from SphinxReport.Tracker import * from IntervalReport import * #############################...
<commit_before><commit_msg>Add new tracker for by overlap status gene profile plots in pipeline_intervals<commit_after>import os, sys, re, types, itertools import matplotlib.pyplot as plt import numpy import numpy.ma import Stats import Histogram import Annotations from SphinxReport.Tracker import * from IntervalRepor...
887c0416b90d467a809377546a73280560af0ba9
casepro/cases/migrations/0040_case_user_assignee.py
casepro/cases/migrations/0040_case_user_assignee.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cases', ...
Add migration for user_assignee Case field
Add migration for user_assignee Case field
Python
bsd-3-clause
praekelt/casepro,praekelt/casepro,praekelt/casepro
Add migration for user_assignee Case field
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cases', ...
<commit_before><commit_msg>Add migration for user_assignee Case field<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ('cases', ...
Add migration for user_assignee Case field# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ migrations.swappable_dependency(set...
<commit_before><commit_msg>Add migration for user_assignee Case field<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import django.db.models.deletion from django.conf import settings class Migration(migrations.Migration): dependencies = [ ...
93b95bd4e902e614c4d7f67627fef8b771388152
analysis_ps_ring_simus.py
analysis_ps_ring_simus.py
import h5manager as hm import tables import matplotlib.pyplot as plt import numpy as np def main(dbfile): # Get the simulations db = tables.openFile(dbfile) simus = hm.get_first_level_groups(db.root) # Define some function to get specific result values def get_strength(simu): return hm.get...
Add a script to analyse ring topology simulations
Add a script to analyse ring topology simulations
Python
mit
neuro-lyon/multiglom-model,neuro-lyon/multiglom-model
Add a script to analyse ring topology simulations
import h5manager as hm import tables import matplotlib.pyplot as plt import numpy as np def main(dbfile): # Get the simulations db = tables.openFile(dbfile) simus = hm.get_first_level_groups(db.root) # Define some function to get specific result values def get_strength(simu): return hm.get...
<commit_before><commit_msg>Add a script to analyse ring topology simulations<commit_after>
import h5manager as hm import tables import matplotlib.pyplot as plt import numpy as np def main(dbfile): # Get the simulations db = tables.openFile(dbfile) simus = hm.get_first_level_groups(db.root) # Define some function to get specific result values def get_strength(simu): return hm.get...
Add a script to analyse ring topology simulationsimport h5manager as hm import tables import matplotlib.pyplot as plt import numpy as np def main(dbfile): # Get the simulations db = tables.openFile(dbfile) simus = hm.get_first_level_groups(db.root) # Define some function to get specific result values ...
<commit_before><commit_msg>Add a script to analyse ring topology simulations<commit_after>import h5manager as hm import tables import matplotlib.pyplot as plt import numpy as np def main(dbfile): # Get the simulations db = tables.openFile(dbfile) simus = hm.get_first_level_groups(db.root) # Define som...
5e8a7202e1eb7ecc0609d5b5fa851b3aa98cb989
ledgerblue/loadMCU.py
ledgerblue/loadMCU.py
""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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....
Add standalone MCU load support
Add standalone MCU load support
Python
apache-2.0
LedgerHQ/blue-loader-python
Add standalone MCU load support
""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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....
<commit_before><commit_msg>Add standalone MCU load support<commit_after>
""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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....
Add standalone MCU load support""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * 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 ...
<commit_before><commit_msg>Add standalone MCU load support<commit_after>""" ******************************************************************************* * Ledger Blue * (c) 2016 Ledger * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the ...
83df070adca7b1548ed314ab4fb2782f44ef31bc
museum_site/migrations/0044_auto_20210118_1801.py
museum_site/migrations/0044_auto_20210118_1801.py
# Generated by Django 3.0.7 on 2021-01-18 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0043_auto_20201022_0242'), ] operations = [ migrations.AddField( model_name='article', name='spotligh...
Add "spotlight" field to article/file models
Add "spotlight" field to article/file models
Python
mit
DrDos0016/z2,DrDos0016/z2,DrDos0016/z2
Add "spotlight" field to article/file models
# Generated by Django 3.0.7 on 2021-01-18 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0043_auto_20201022_0242'), ] operations = [ migrations.AddField( model_name='article', name='spotligh...
<commit_before><commit_msg>Add "spotlight" field to article/file models<commit_after>
# Generated by Django 3.0.7 on 2021-01-18 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0043_auto_20201022_0242'), ] operations = [ migrations.AddField( model_name='article', name='spotligh...
Add "spotlight" field to article/file models# Generated by Django 3.0.7 on 2021-01-18 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0043_auto_20201022_0242'), ] operations = [ migrations.AddField( mode...
<commit_before><commit_msg>Add "spotlight" field to article/file models<commit_after># Generated by Django 3.0.7 on 2021-01-18 18:01 from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('museum_site', '0043_auto_20201022_0242'), ] operations = [ ...
80bedcde7264c5eaddcd1e23dcbf56e41e52c21f
daemon.py
daemon.py
#!/usr/bin/env python import config import events cfg = config.Config() cfg.load(["/etc/rally-ci/", "etc/rally-ci"]) handler = events.EventHandler(cfg) handler.loop()
Add main script for running Rally CI
Add main script for running Rally CI
Python
apache-2.0
redixin/rally-ci,aarexer/rally-ci,redixin/rally-ci,aarexer/rally-ci,redixin/rally-ci
Add main script for running Rally CI
#!/usr/bin/env python import config import events cfg = config.Config() cfg.load(["/etc/rally-ci/", "etc/rally-ci"]) handler = events.EventHandler(cfg) handler.loop()
<commit_before><commit_msg>Add main script for running Rally CI<commit_after>
#!/usr/bin/env python import config import events cfg = config.Config() cfg.load(["/etc/rally-ci/", "etc/rally-ci"]) handler = events.EventHandler(cfg) handler.loop()
Add main script for running Rally CI#!/usr/bin/env python import config import events cfg = config.Config() cfg.load(["/etc/rally-ci/", "etc/rally-ci"]) handler = events.EventHandler(cfg) handler.loop()
<commit_before><commit_msg>Add main script for running Rally CI<commit_after>#!/usr/bin/env python import config import events cfg = config.Config() cfg.load(["/etc/rally-ci/", "etc/rally-ci"]) handler = events.EventHandler(cfg) handler.loop()
5b9a92a77fb2830d904e239f08c444e0c2cd2e6c
wheelcms_axle/tests/test_middleware.py
wheelcms_axle/tests/test_middleware.py
import mock from wheelcms_axle.middleware import FixMessageMiddleware class TestFixMessageMiddleware(object): def test_oldstyle(self): """ mock CookieStorage raising IndexError """ with mock.patch("django.contrib.messages.storage.cookie" ".CookieStorage._decode", side_eff...
Add middleware, if not for keeping the coverage up :)
Add middleware, if not for keeping the coverage up :)
Python
bsd-2-clause
wheelcms/wheelcms_axle,wheelcms/wheelcms_axle,wheelcms/wheelcms_axle,wheelcms/wheelcms_axle
Add middleware, if not for keeping the coverage up :)
import mock from wheelcms_axle.middleware import FixMessageMiddleware class TestFixMessageMiddleware(object): def test_oldstyle(self): """ mock CookieStorage raising IndexError """ with mock.patch("django.contrib.messages.storage.cookie" ".CookieStorage._decode", side_eff...
<commit_before><commit_msg>Add middleware, if not for keeping the coverage up :)<commit_after>
import mock from wheelcms_axle.middleware import FixMessageMiddleware class TestFixMessageMiddleware(object): def test_oldstyle(self): """ mock CookieStorage raising IndexError """ with mock.patch("django.contrib.messages.storage.cookie" ".CookieStorage._decode", side_eff...
Add middleware, if not for keeping the coverage up :)import mock from wheelcms_axle.middleware import FixMessageMiddleware class TestFixMessageMiddleware(object): def test_oldstyle(self): """ mock CookieStorage raising IndexError """ with mock.patch("django.contrib.messages.storage.cookie" ...
<commit_before><commit_msg>Add middleware, if not for keeping the coverage up :)<commit_after>import mock from wheelcms_axle.middleware import FixMessageMiddleware class TestFixMessageMiddleware(object): def test_oldstyle(self): """ mock CookieStorage raising IndexError """ with mock.patch("djan...
c9ae5f97e59b323d4172f69022eca40e4039b6f0
corehq/apps/hqcase/bulk.py
corehq/apps/hqcase/bulk.py
from xml.etree import cElementTree as ElementTree from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from .utils import CASEBLOCK_CHUNKSIZE, submit_case_blocks class CaseBulkDB: def __init__(self, domain, user_id, device_id): self.domain = domain self.user_id = user_id ...
Add iterative case update script from a while back
Add iterative case update script from a while back
Python
bsd-3-clause
dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq
Add iterative case update script from a while back
from xml.etree import cElementTree as ElementTree from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from .utils import CASEBLOCK_CHUNKSIZE, submit_case_blocks class CaseBulkDB: def __init__(self, domain, user_id, device_id): self.domain = domain self.user_id = user_id ...
<commit_before><commit_msg>Add iterative case update script from a while back<commit_after>
from xml.etree import cElementTree as ElementTree from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from .utils import CASEBLOCK_CHUNKSIZE, submit_case_blocks class CaseBulkDB: def __init__(self, domain, user_id, device_id): self.domain = domain self.user_id = user_id ...
Add iterative case update script from a while backfrom xml.etree import cElementTree as ElementTree from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from .utils import CASEBLOCK_CHUNKSIZE, submit_case_blocks class CaseBulkDB: def __init__(self, domain, user_id, device_id): self.do...
<commit_before><commit_msg>Add iterative case update script from a while back<commit_after>from xml.etree import cElementTree as ElementTree from corehq.form_processor.interfaces.dbaccessors import CaseAccessors from .utils import CASEBLOCK_CHUNKSIZE, submit_case_blocks class CaseBulkDB: def __init__(self, dom...
c4cd471b2830edbf1d2f24a4d9a79a0d669ae457
src/appengine_config.py
src/appengine_config.py
#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """App Engine config.""" __author__ = '[email protected] (Adam McGrath)' # Enabled copying data from the movieautocomplete app. remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = ( 'HTTP_X_APPENGINE_INBOUND_APPID', ['movieautocomplete']...
Add appengine config for data transfer.
Add appengine config for data transfer.
Python
mpl-2.0
adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub,adamjmcgrath/fridayfilmclub
Add appengine config for data transfer.
#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """App Engine config.""" __author__ = '[email protected] (Adam McGrath)' # Enabled copying data from the movieautocomplete app. remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = ( 'HTTP_X_APPENGINE_INBOUND_APPID', ['movieautocomplete']...
<commit_before><commit_msg>Add appengine config for data transfer.<commit_after>
#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """App Engine config.""" __author__ = '[email protected] (Adam McGrath)' # Enabled copying data from the movieautocomplete app. remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = ( 'HTTP_X_APPENGINE_INBOUND_APPID', ['movieautocomplete']...
Add appengine config for data transfer.#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """App Engine config.""" __author__ = '[email protected] (Adam McGrath)' # Enabled copying data from the movieautocomplete app. remoteapi_CUSTOM_ENVIRONMENT_AUTHENTICATION = ( 'HTTP_X_APPENGIN...
<commit_before><commit_msg>Add appengine config for data transfer.<commit_after>#!/usr/bin/python # # Copyright 2011 Friday Film Club. All Rights Reserved. """App Engine config.""" __author__ = '[email protected] (Adam McGrath)' # Enabled copying data from the movieautocomplete app. remoteapi_CUSTOM_ENVIRONMEN...
8e05f4d6e0b8c3567776c1f3799e807877bd1fa2
dev/spaces.py
dev/spaces.py
from pathlib import Path import json import sys cwd = Path(sys.argv[0]).parent cmd_files = cwd.joinpath('../data/packages').glob('*_cmd.json') all_cmds = {} for f in cmd_files: f_cmds = json.load(open(f, encoding='utf8')) all_cmds.update(f_cmds) cmds_with_spaces = {} for key in all_cmds: if key.find(' ')...
Test if some command keys have a space
Test if some command keys have a space
Python
mit
James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop,James-Yu/LaTeX-Workshop
Test if some command keys have a space
from pathlib import Path import json import sys cwd = Path(sys.argv[0]).parent cmd_files = cwd.joinpath('../data/packages').glob('*_cmd.json') all_cmds = {} for f in cmd_files: f_cmds = json.load(open(f, encoding='utf8')) all_cmds.update(f_cmds) cmds_with_spaces = {} for key in all_cmds: if key.find(' ')...
<commit_before><commit_msg>Test if some command keys have a space<commit_after>
from pathlib import Path import json import sys cwd = Path(sys.argv[0]).parent cmd_files = cwd.joinpath('../data/packages').glob('*_cmd.json') all_cmds = {} for f in cmd_files: f_cmds = json.load(open(f, encoding='utf8')) all_cmds.update(f_cmds) cmds_with_spaces = {} for key in all_cmds: if key.find(' ')...
Test if some command keys have a spacefrom pathlib import Path import json import sys cwd = Path(sys.argv[0]).parent cmd_files = cwd.joinpath('../data/packages').glob('*_cmd.json') all_cmds = {} for f in cmd_files: f_cmds = json.load(open(f, encoding='utf8')) all_cmds.update(f_cmds) cmds_with_spaces = {} for...
<commit_before><commit_msg>Test if some command keys have a space<commit_after>from pathlib import Path import json import sys cwd = Path(sys.argv[0]).parent cmd_files = cwd.joinpath('../data/packages').glob('*_cmd.json') all_cmds = {} for f in cmd_files: f_cmds = json.load(open(f, encoding='utf8')) all_cmds....
b414be299064f4f278a9bbb68c9291d9d2e3bc77
hoomd/pytest/test_dcd.py
hoomd/pytest/test_dcd.py
import hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dcd" sim = simulation_factory(two_particle_snapshot_factory()) dcd_dump = hoomd.write.DCD(filename, hoomd.t...
Test a dcd writer can be attached to a simulation and ran without errors
Test a dcd writer can be attached to a simulation and ran without errors
Python
bsd-3-clause
joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue,joaander/hoomd-blue
Test a dcd writer can be attached to a simulation and ran without errors
import hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dcd" sim = simulation_factory(two_particle_snapshot_factory()) dcd_dump = hoomd.write.DCD(filename, hoomd.t...
<commit_before><commit_msg>Test a dcd writer can be attached to a simulation and ran without errors<commit_after>
import hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dcd" sim = simulation_factory(two_particle_snapshot_factory()) dcd_dump = hoomd.write.DCD(filename, hoomd.t...
Test a dcd writer can be attached to a simulation and ran without errorsimport hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dcd" sim = simulation_factory(two_parti...
<commit_before><commit_msg>Test a dcd writer can be attached to a simulation and ran without errors<commit_after>import hoomd import pytest import numpy as np def test_attach(simulation_factory, two_particle_snapshot_factory, tmp_path): d = tmp_path / "sub" d.mkdir() filename = d / "temporary_test_file.dc...
9591e51fbbc610e0a19a0db760b4db8776f3ae6d
games/management/commands/migrate_to_proton.py
games/management/commands/migrate_to_proton.py
"""Migrates winesteam scripts to Proton""" import logging from django.core.management.base import BaseCommand from common.util import load_yaml, dump_yaml from games.models import Installer, Runner LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "Migrate WineSteam games to Proton" d...
Add command to migrate winesteam installers to Proton
Add command to migrate winesteam installers to Proton
Python
agpl-3.0
lutris/website,lutris/website,lutris/website,lutris/website
Add command to migrate winesteam installers to Proton
"""Migrates winesteam scripts to Proton""" import logging from django.core.management.base import BaseCommand from common.util import load_yaml, dump_yaml from games.models import Installer, Runner LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "Migrate WineSteam games to Proton" d...
<commit_before><commit_msg>Add command to migrate winesteam installers to Proton<commit_after>
"""Migrates winesteam scripts to Proton""" import logging from django.core.management.base import BaseCommand from common.util import load_yaml, dump_yaml from games.models import Installer, Runner LOGGER = logging.getLogger(__name__) class Command(BaseCommand): help = "Migrate WineSteam games to Proton" d...
Add command to migrate winesteam installers to Proton"""Migrates winesteam scripts to Proton""" import logging from django.core.management.base import BaseCommand from common.util import load_yaml, dump_yaml from games.models import Installer, Runner LOGGER = logging.getLogger(__name__) class Command(BaseCommand): ...
<commit_before><commit_msg>Add command to migrate winesteam installers to Proton<commit_after>"""Migrates winesteam scripts to Proton""" import logging from django.core.management.base import BaseCommand from common.util import load_yaml, dump_yaml from games.models import Installer, Runner LOGGER = logging.getLogger...
89a985433218968024fe766c26d68bc3e89b501f
kboard/functional_test/test_post_validation.py
kboard/functional_test/test_post_validation.py
from .base import FunctionalTest class PostValidationTest(FunctionalTest): def test_cannot_add_empty_title(self): self.browser.get(self.live_server_url) self.move_to_default_board() # 지훈이는 새 게시글을 작성하기 위해 글 쓰기 버튼을 누른다. self.click_create_post_button() # 빈 제목의 게시글을 실수로 등록하려고...
Add post title validation functional test
Add post title validation functional test
Python
mit
darjeeling/k-board,kboard/kboard,guswnsxodlf/k-board,hyesun03/k-board,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,kboard/kboard,kboard/kboard,hyesun03/k-board,guswnsxodlf/k-board,cjh5414/kboard,cjh5414/kboard
Add post title validation functional test
from .base import FunctionalTest class PostValidationTest(FunctionalTest): def test_cannot_add_empty_title(self): self.browser.get(self.live_server_url) self.move_to_default_board() # 지훈이는 새 게시글을 작성하기 위해 글 쓰기 버튼을 누른다. self.click_create_post_button() # 빈 제목의 게시글을 실수로 등록하려고...
<commit_before><commit_msg>Add post title validation functional test<commit_after>
from .base import FunctionalTest class PostValidationTest(FunctionalTest): def test_cannot_add_empty_title(self): self.browser.get(self.live_server_url) self.move_to_default_board() # 지훈이는 새 게시글을 작성하기 위해 글 쓰기 버튼을 누른다. self.click_create_post_button() # 빈 제목의 게시글을 실수로 등록하려고...
Add post title validation functional testfrom .base import FunctionalTest class PostValidationTest(FunctionalTest): def test_cannot_add_empty_title(self): self.browser.get(self.live_server_url) self.move_to_default_board() # 지훈이는 새 게시글을 작성하기 위해 글 쓰기 버튼을 누른다. self.click_create_post...
<commit_before><commit_msg>Add post title validation functional test<commit_after>from .base import FunctionalTest class PostValidationTest(FunctionalTest): def test_cannot_add_empty_title(self): self.browser.get(self.live_server_url) self.move_to_default_board() # 지훈이는 새 게시글을 작성하기 위해 글 쓰...
cd0c618af63fed1cd7006bb67da46eac0ddbb1c7
scripts/find_logins_for_ipaddress.py
scripts/find_logins_for_ipaddress.py
#!/usr/bin/env python """Find user login events for an IP address. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Dict, List import click from byceps.services.user.models.event import UserEvent from byceps.services.user import service as user_serv...
Add script to find user login events for IP address
Add script to find user login events for IP address
Python
bsd-3-clause
homeworkprod/byceps,m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps
Add script to find user login events for IP address
#!/usr/bin/env python """Find user login events for an IP address. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Dict, List import click from byceps.services.user.models.event import UserEvent from byceps.services.user import service as user_serv...
<commit_before><commit_msg>Add script to find user login events for IP address<commit_after>
#!/usr/bin/env python """Find user login events for an IP address. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Dict, List import click from byceps.services.user.models.event import UserEvent from byceps.services.user import service as user_serv...
Add script to find user login events for IP address#!/usr/bin/env python """Find user login events for an IP address. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Dict, List import click from byceps.services.user.models.event import UserEvent fr...
<commit_before><commit_msg>Add script to find user login events for IP address<commit_after>#!/usr/bin/env python """Find user login events for an IP address. :Copyright: 2006-2019 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from typing import Dict, List import click from byceps.servi...
ded313eaf070cf46b07ea0c67b16d00be804bbda
scripts/make_lfd_settings_package.py
scripts/make_lfd_settings_package.py
import argparse import os import lfd def make_settings_tree(src, dst): names = os.listdir(src) for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) if os.path.isdir(srcname): make_settings_tree(srcname, dstname) elif name == 'setting...
Add script to make the lfd_settings package.
Add script to make the lfd_settings package.
Python
bsd-2-clause
wjchen84/lfd,rll/lfd,wjchen84/lfd,wjchen84/lfd,rll/lfd,rll/lfd
Add script to make the lfd_settings package.
import argparse import os import lfd def make_settings_tree(src, dst): names = os.listdir(src) for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) if os.path.isdir(srcname): make_settings_tree(srcname, dstname) elif name == 'setting...
<commit_before><commit_msg>Add script to make the lfd_settings package.<commit_after>
import argparse import os import lfd def make_settings_tree(src, dst): names = os.listdir(src) for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) if os.path.isdir(srcname): make_settings_tree(srcname, dstname) elif name == 'setting...
Add script to make the lfd_settings package.import argparse import os import lfd def make_settings_tree(src, dst): names = os.listdir(src) for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) if os.path.isdir(srcname): make_settings_tree(src...
<commit_before><commit_msg>Add script to make the lfd_settings package.<commit_after>import argparse import os import lfd def make_settings_tree(src, dst): names = os.listdir(src) for name in names: srcname = os.path.join(src, name) dstname = os.path.join(dst, name) if os.path.isdir(src...
15e7de59af35c1c45a4a2be4658729a8b0eb8082
experimental/directshow.py
experimental/directshow.py
#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we need # to manually implement a filter which provides an output IPin. Lot of # work. # - Theoretically can traverse the ...
Move win32 audio experiment to trunk.
Move win32 audio experiment to trunk. --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40736
Python
bsd-3-clause
infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore,infowantstobeseen/pyglet-darwincore
Move win32 audio experiment to trunk. --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40736
#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we need # to manually implement a filter which provides an output IPin. Lot of # work. # - Theoretically can traverse the ...
<commit_before><commit_msg>Move win32 audio experiment to trunk. --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40736<commit_after>
#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we need # to manually implement a filter which provides an output IPin. Lot of # work. # - Theoretically can traverse the ...
Move win32 audio experiment to trunk. --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40736#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not from memory or stream yet). Looks like we ...
<commit_before><commit_msg>Move win32 audio experiment to trunk. --HG-- extra : convert_revision : svn%3A14d46d22-621c-0410-bb3d-6f67920f7d95/trunk%40736<commit_after>#!/usr/bin/python # $Id:$ # Play an audio file with DirectShow. Tested ok with MP3, WMA, MID, WAV, AU. # Caveats: # - Requires a filename (not fr...
401d7c80c3ea69cbb41f159d0c709fb08668c7f9
test/standalonewavetrigger.py
test/standalonewavetrigger.py
#!/usr/bin/env python # Standard library imports import argparse import collections import functools import logging import os import json import time # Additional library imports import requests # Named logger for this module _logger = logging.getLogger('wavetrigger') # Parse the command line arguments _parser = a...
Add the standalone wave trigger script.
Add the standalone wave trigger script.
Python
apache-2.0
lordjabez/light-maestro,lordjabez/light-maestro,lordjabez/light-maestro,lordjabez/light-maestro
Add the standalone wave trigger script.
#!/usr/bin/env python # Standard library imports import argparse import collections import functools import logging import os import json import time # Additional library imports import requests # Named logger for this module _logger = logging.getLogger('wavetrigger') # Parse the command line arguments _parser = a...
<commit_before><commit_msg>Add the standalone wave trigger script.<commit_after>
#!/usr/bin/env python # Standard library imports import argparse import collections import functools import logging import os import json import time # Additional library imports import requests # Named logger for this module _logger = logging.getLogger('wavetrigger') # Parse the command line arguments _parser = a...
Add the standalone wave trigger script.#!/usr/bin/env python # Standard library imports import argparse import collections import functools import logging import os import json import time # Additional library imports import requests # Named logger for this module _logger = logging.getLogger('wavetrigger') # Parse...
<commit_before><commit_msg>Add the standalone wave trigger script.<commit_after>#!/usr/bin/env python # Standard library imports import argparse import collections import functools import logging import os import json import time # Additional library imports import requests # Named logger for this module _logger = ...
6de3dddfadce6bb582adfe1e72fdd26afa974033
server/data_updates/00005_20181114-090110_vocabularies.py
server/data_updates/00005_20181114-090110_vocabularies.py
# -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license # # Creation: 2018-11-14 10:31 from superdesk.commands.data_updates import Da...
Replace single_value with selection_type (SDESK-3551)
feat(vocabularies): Replace single_value with selection_type (SDESK-3551)
Python
agpl-3.0
pavlovicnemanja/superdesk,hlmnrmr/superdesk,superdesk/superdesk,ioanpocol/superdesk,superdesk/superdesk,superdesk/superdesk,petrjasek/superdesk,petrjasek/superdesk,pavlovicnemanja92/superdesk,pavlovicnemanja/superdesk,ioanpocol/superdesk,superdesk/superdesk,petrjasek/superdesk,pavlovicnemanja/superdesk,pavlovicnemanja9...
feat(vocabularies): Replace single_value with selection_type (SDESK-3551)
# -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license # # Creation: 2018-11-14 10:31 from superdesk.commands.data_updates import Da...
<commit_before><commit_msg>feat(vocabularies): Replace single_value with selection_type (SDESK-3551)<commit_after>
# -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license # # Creation: 2018-11-14 10:31 from superdesk.commands.data_updates import Da...
feat(vocabularies): Replace single_value with selection_type (SDESK-3551)# -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www.sourcefabric.org/superdesk/license # # C...
<commit_before><commit_msg>feat(vocabularies): Replace single_value with selection_type (SDESK-3551)<commit_after># -*- coding: utf-8; -*- # This file is part of Superdesk. # For the full copyright and license information, please see the # AUTHORS and LICENSE files distributed with this source code, or # at https://www...
e68057a0d81ff0ca2722f1a3641a795c2b168b9d
generate_cf_matrix_iris.py
generate_cf_matrix_iris.py
from sklearn.datasets import load_iris import skfuzzy as fuzz import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import cosine_similarity from sklearn import metrics import warnings warnings.filterwarnings('ignore') data = load_iris() X = data.data # Adding random features to X X = np.hs...
Remove IRIS CF Matrix generation notebook
Remove IRIS CF Matrix generation notebook
Python
mit
achyudhk/Ensemble-Text-Classification
Remove IRIS CF Matrix generation notebook
from sklearn.datasets import load_iris import skfuzzy as fuzz import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import cosine_similarity from sklearn import metrics import warnings warnings.filterwarnings('ignore') data = load_iris() X = data.data # Adding random features to X X = np.hs...
<commit_before><commit_msg>Remove IRIS CF Matrix generation notebook<commit_after>
from sklearn.datasets import load_iris import skfuzzy as fuzz import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import cosine_similarity from sklearn import metrics import warnings warnings.filterwarnings('ignore') data = load_iris() X = data.data # Adding random features to X X = np.hs...
Remove IRIS CF Matrix generation notebookfrom sklearn.datasets import load_iris import skfuzzy as fuzz import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import cosine_similarity from sklearn import metrics import warnings warnings.filterwarnings('ignore') data = load_iris() X = data.data...
<commit_before><commit_msg>Remove IRIS CF Matrix generation notebook<commit_after>from sklearn.datasets import load_iris import skfuzzy as fuzz import numpy as np import matplotlib.pyplot as plt from sklearn.metrics.pairwise import cosine_similarity from sklearn import metrics import warnings warnings.filterwarnings('i...
118f42c9155b746f0fd37a2a4a4258e39d50d6ca
kitsune/kbadge/migrations/0002_auto_20181023_1319.py
kitsune/kbadge/migrations/0002_auto_20181023_1319.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('kbadge', '0001_initial'), ] operations = [ migrations.RunSQL( "UPDATE badger_badge SET image = CONCAT('uploads/', image)...
Add data migration to fix image paths on pre-existing badges.
Add data migration to fix image paths on pre-existing badges.
Python
bsd-3-clause
anushbmx/kitsune,anushbmx/kitsune,mozilla/kitsune,anushbmx/kitsune,mozilla/kitsune,mozilla/kitsune,anushbmx/kitsune,mozilla/kitsune
Add data migration to fix image paths on pre-existing badges.
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('kbadge', '0001_initial'), ] operations = [ migrations.RunSQL( "UPDATE badger_badge SET image = CONCAT('uploads/', image)...
<commit_before><commit_msg>Add data migration to fix image paths on pre-existing badges.<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('kbadge', '0001_initial'), ] operations = [ migrations.RunSQL( "UPDATE badger_badge SET image = CONCAT('uploads/', image)...
Add data migration to fix image paths on pre-existing badges.# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('kbadge', '0001_initial'), ] operations = [ migrations.RunSQL( ...
<commit_before><commit_msg>Add data migration to fix image paths on pre-existing badges.<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations class Migration(migrations.Migration): dependencies = [ ('kbadge', '0001_initial'), ] operations...
99da8c760624f88af5bf352ec29c71588501174c
testmodel/webapp/selenium/test/log-in-test.py
testmodel/webapp/selenium/test/log-in-test.py
import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class LoginTestCase(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() self.addCleanup(self.browser.quit) self.browser.get('http://localhost:8080/intermine-demo/begin.do') ...
Test ability to log in
Test ability to log in Former-commit-id: b29fa5c96fa5e0fdd2117164baace9ac8492867d
Python
lgpl-2.1
julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine,julie-sullivan/phytomine
Test ability to log in Former-commit-id: b29fa5c96fa5e0fdd2117164baace9ac8492867d
import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class LoginTestCase(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() self.addCleanup(self.browser.quit) self.browser.get('http://localhost:8080/intermine-demo/begin.do') ...
<commit_before><commit_msg>Test ability to log in Former-commit-id: b29fa5c96fa5e0fdd2117164baace9ac8492867d<commit_after>
import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class LoginTestCase(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() self.addCleanup(self.browser.quit) self.browser.get('http://localhost:8080/intermine-demo/begin.do') ...
Test ability to log in Former-commit-id: b29fa5c96fa5e0fdd2117164baace9ac8492867dimport unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class LoginTestCase(unittest.TestCase): def setUp(self): self.browser = webdriver.Firefox() self.addCleanup(self.browser...
<commit_before><commit_msg>Test ability to log in Former-commit-id: b29fa5c96fa5e0fdd2117164baace9ac8492867d<commit_after>import unittest from selenium import webdriver from selenium.webdriver.common.keys import Keys class LoginTestCase(unittest.TestCase): def setUp(self): self.browser = webdriver.Firef...
578db98c1d61dbb58f2f617951b06beff2992d2e
scripts/pydev-launch.py
scripts/pydev-launch.py
#!/usr/bin/env python2.7 ''' This module supports launching agents from Eclipse PyDev with minimal configuration. To get it working, follow these simple steps: 1. Create a new "Run Configuration" named "Launch VOLTTRON Agent" and point the "Main Module" to this script (e.g., ${project_loc}/scripts/launch.p...
Add helper script for executing agents in PyDev.
Add helper script for executing agents in PyDev.
Python
bsd-2-clause
schandrika/volttron,schandrika/volttron,schandrika/volttron,schandrika/volttron
Add helper script for executing agents in PyDev.
#!/usr/bin/env python2.7 ''' This module supports launching agents from Eclipse PyDev with minimal configuration. To get it working, follow these simple steps: 1. Create a new "Run Configuration" named "Launch VOLTTRON Agent" and point the "Main Module" to this script (e.g., ${project_loc}/scripts/launch.p...
<commit_before><commit_msg>Add helper script for executing agents in PyDev.<commit_after>
#!/usr/bin/env python2.7 ''' This module supports launching agents from Eclipse PyDev with minimal configuration. To get it working, follow these simple steps: 1. Create a new "Run Configuration" named "Launch VOLTTRON Agent" and point the "Main Module" to this script (e.g., ${project_loc}/scripts/launch.p...
Add helper script for executing agents in PyDev.#!/usr/bin/env python2.7 ''' This module supports launching agents from Eclipse PyDev with minimal configuration. To get it working, follow these simple steps: 1. Create a new "Run Configuration" named "Launch VOLTTRON Agent" and point the "Main Module" to this sc...
<commit_before><commit_msg>Add helper script for executing agents in PyDev.<commit_after>#!/usr/bin/env python2.7 ''' This module supports launching agents from Eclipse PyDev with minimal configuration. To get it working, follow these simple steps: 1. Create a new "Run Configuration" named "Launch VOLTTRON Agen...
664ad090e7b4c2922b5c89932e61d7ddef326da9
script/get_matrices.py
script/get_matrices.py
import sys from HTMLParser import HTMLParser class MyHtmlParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.state = 'NONE' def handle_starttag(self, tag, attrs): if self.state == 'FINISHED': return if tag == '<table>': self.state = 'PA...
Add a simple python to fetch matrices from UoF collection.
Add a simple python to fetch matrices from UoF collection.
Python
mit
caskorg/cask,caskorg/cask,caskorg/cask,caskorg/cask,caskorg/cask
Add a simple python to fetch matrices from UoF collection.
import sys from HTMLParser import HTMLParser class MyHtmlParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.state = 'NONE' def handle_starttag(self, tag, attrs): if self.state == 'FINISHED': return if tag == '<table>': self.state = 'PA...
<commit_before><commit_msg>Add a simple python to fetch matrices from UoF collection.<commit_after>
import sys from HTMLParser import HTMLParser class MyHtmlParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.state = 'NONE' def handle_starttag(self, tag, attrs): if self.state == 'FINISHED': return if tag == '<table>': self.state = 'PA...
Add a simple python to fetch matrices from UoF collection.import sys from HTMLParser import HTMLParser class MyHtmlParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.state = 'NONE' def handle_starttag(self, tag, attrs): if self.state == 'FINISHED': return ...
<commit_before><commit_msg>Add a simple python to fetch matrices from UoF collection.<commit_after>import sys from HTMLParser import HTMLParser class MyHtmlParser(HTMLParser): def __init__(self): HTMLParser.__init__(self) self.state = 'NONE' def handle_starttag(self, tag, attrs): if self...
4e6458bddec9758da609c681a0ea05b43c399f50
bot/multithreading/worker/pool/workers/main.py
bot/multithreading/worker/pool/workers/main.py
import queue from bot.multithreading.work import Work from bot.multithreading.worker import QueueWorker from bot.multithreading.worker.pool.name_generator import WorkerPoolNameGenerator from bot.multithreading.worker.pool.spawner import WorkerSpawner class QueueWorkerPool(QueueWorker): def __init__(self, base_na...
Create a worker pool to handle pool of workers that can grow or shrink as necessary
Create a worker pool to handle pool of workers that can grow or shrink as necessary
Python
agpl-3.0
alvarogzp/telegram-bot,alvarogzp/telegram-bot
Create a worker pool to handle pool of workers that can grow or shrink as necessary
import queue from bot.multithreading.work import Work from bot.multithreading.worker import QueueWorker from bot.multithreading.worker.pool.name_generator import WorkerPoolNameGenerator from bot.multithreading.worker.pool.spawner import WorkerSpawner class QueueWorkerPool(QueueWorker): def __init__(self, base_na...
<commit_before><commit_msg>Create a worker pool to handle pool of workers that can grow or shrink as necessary<commit_after>
import queue from bot.multithreading.work import Work from bot.multithreading.worker import QueueWorker from bot.multithreading.worker.pool.name_generator import WorkerPoolNameGenerator from bot.multithreading.worker.pool.spawner import WorkerSpawner class QueueWorkerPool(QueueWorker): def __init__(self, base_na...
Create a worker pool to handle pool of workers that can grow or shrink as necessaryimport queue from bot.multithreading.work import Work from bot.multithreading.worker import QueueWorker from bot.multithreading.worker.pool.name_generator import WorkerPoolNameGenerator from bot.multithreading.worker.pool.spawner import...
<commit_before><commit_msg>Create a worker pool to handle pool of workers that can grow or shrink as necessary<commit_after>import queue from bot.multithreading.work import Work from bot.multithreading.worker import QueueWorker from bot.multithreading.worker.pool.name_generator import WorkerPoolNameGenerator from bot....
82bc2b2cf63e61bc7282bb61e108a6815e8acd78
cyhdfs3/tests/test_cli.py
cyhdfs3/tests/test_cli.py
import click from click.testing import CliRunner from cyhdfs3 import cli from utils import * def test_create_file_list(hdfs): runner = CliRunner() result = runner.invoke(cli.ls) # assert result.exit_code == 0 # assert result.output == 'Hello Peter!\n'
Add template for cli test
Add template for cli test
Python
apache-2.0
danielfrg/libhdfs3.py,danielfrg/cyhdfs3,danielfrg/libhdfs3.py,danielfrg/cyhdfs3
Add template for cli test
import click from click.testing import CliRunner from cyhdfs3 import cli from utils import * def test_create_file_list(hdfs): runner = CliRunner() result = runner.invoke(cli.ls) # assert result.exit_code == 0 # assert result.output == 'Hello Peter!\n'
<commit_before><commit_msg>Add template for cli test<commit_after>
import click from click.testing import CliRunner from cyhdfs3 import cli from utils import * def test_create_file_list(hdfs): runner = CliRunner() result = runner.invoke(cli.ls) # assert result.exit_code == 0 # assert result.output == 'Hello Peter!\n'
Add template for cli testimport click from click.testing import CliRunner from cyhdfs3 import cli from utils import * def test_create_file_list(hdfs): runner = CliRunner() result = runner.invoke(cli.ls) # assert result.exit_code == 0 # assert result.output == 'Hello Peter!\n'
<commit_before><commit_msg>Add template for cli test<commit_after>import click from click.testing import CliRunner from cyhdfs3 import cli from utils import * def test_create_file_list(hdfs): runner = CliRunner() result = runner.invoke(cli.ls) # assert result.exit_code == 0 # assert result.output == ...
3f59199b75c2f0679ca100519ae6e95b1c5613e0
checkheaders.py
checkheaders.py
import requests #checking if the app is vulnerable to clickjacking def check_clickjacking(url): response = requests.get(url, verify=False) try: response_check_clickjacking = response.headers['x-frame-options'] if response_check_clickjacking == "DENY" or \ response_check_clickjacking == ...
Check response headers for clickjacking and HSTS headers
Check response headers for clickjacking and HSTS headers
Python
mit
satish28/security_automation
Check response headers for clickjacking and HSTS headers
import requests #checking if the app is vulnerable to clickjacking def check_clickjacking(url): response = requests.get(url, verify=False) try: response_check_clickjacking = response.headers['x-frame-options'] if response_check_clickjacking == "DENY" or \ response_check_clickjacking == ...
<commit_before><commit_msg>Check response headers for clickjacking and HSTS headers<commit_after>
import requests #checking if the app is vulnerable to clickjacking def check_clickjacking(url): response = requests.get(url, verify=False) try: response_check_clickjacking = response.headers['x-frame-options'] if response_check_clickjacking == "DENY" or \ response_check_clickjacking == ...
Check response headers for clickjacking and HSTS headersimport requests #checking if the app is vulnerable to clickjacking def check_clickjacking(url): response = requests.get(url, verify=False) try: response_check_clickjacking = response.headers['x-frame-options'] if response_check_clickjackin...
<commit_before><commit_msg>Check response headers for clickjacking and HSTS headers<commit_after>import requests #checking if the app is vulnerable to clickjacking def check_clickjacking(url): response = requests.get(url, verify=False) try: response_check_clickjacking = response.headers['x-frame-option...
407d7e5227716d80d1e90fcd7e763a112ff100d6
services/netflix.py
services/netflix.py
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
Add Netflix back in ... maybe
Add Netflix back in ... maybe
Python
bsd-3-clause
foauth/foauth.org,foauth/foauth.org,foauth/foauth.org
Add Netflix back in ... maybe
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
<commit_before><commit_msg>Add Netflix back in ... maybe<commit_after>
import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth/request_token' authorize...
Add Netflix back in ... maybeimport foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_token_url = 'http://api.netflix.com/oauth...
<commit_before><commit_msg>Add Netflix back in ... maybe<commit_after>import foauth.providers class Netflix(foauth.providers.OAuth1): # General info about the provider provider_url = 'https://www.netflix.com/' docs_url = 'http://developer.netflix.com/docs' # URLs to interact with the API request_...
c30a9b7a9d4558e66704af9892b8a8d327175a56
tools/perf/profile_creators/small_profile_creator.py
tools/perf/profile_creators/small_profile_creator.py
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
Fix profile generation after r275633.
[Telemetry] Fix profile generation after r275633. [email protected] NOTRY=True BUG= Review URL: https://codereview.chromium.org/323703003 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@275689 0039d316-1c4b-4281-b951-d872f2087c98
Python
bsd-3-clause
jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,ltilve/chromium,Just-D/chromium-1,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,mohamed...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a brows...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
# Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a browser through a se...
<commit_before># Copyright 2013 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. from telemetry.page import profile_creator import page_sets class SmallProfileCreator(profile_creator.ProfileCreator): """ Runs a brows...
92fb1bd323e69a625e38d48bb293e72787d84808
test/test_commands.py
test/test_commands.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test check the commands """ from __future__ import print_function import os import time import shlex import subprocess import copy import requests import unittest2 class TestGroups(unittest2.TestCase): """ This class test hostgroups and tree feature ...
Add test for default commands
Add test for default commands
Python
agpl-3.0
Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend,Alignak-monitoring-contrib/alignak-backend
Add test for default commands
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test check the commands """ from __future__ import print_function import os import time import shlex import subprocess import copy import requests import unittest2 class TestGroups(unittest2.TestCase): """ This class test hostgroups and tree feature ...
<commit_before><commit_msg>Add test for default commands<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test check the commands """ from __future__ import print_function import os import time import shlex import subprocess import copy import requests import unittest2 class TestGroups(unittest2.TestCase): """ This class test hostgroups and tree feature ...
Add test for default commands#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test check the commands """ from __future__ import print_function import os import time import shlex import subprocess import copy import requests import unittest2 class TestGroups(unittest2.TestCase): """ This class test hos...
<commit_before><commit_msg>Add test for default commands<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """ This test check the commands """ from __future__ import print_function import os import time import shlex import subprocess import copy import requests import unittest2 class TestGroups(unittest2.T...
eac77b1b290ec7f7fb9e90640a3bce0510f2717b
tests/test_confusion.py
tests/test_confusion.py
from test_util import * from funkyyak import grad ## See Siskind & Pearlmutter (2008), "Nesting forward-mode AD in a ## functional framework", Higher Order and Symbolic Computation ## 21(4):361-76, doi:10.1007/s10990-008-9037-1 def test_nest_hosc(): shouldBeTwo = grad (lambda x: grad (lambda y: x*y) (2.0)) (1.0) ...
Test for perturbation confusion with nesting
Test for perturbation confusion with nesting
Python
mit
barak/autograd
Test for perturbation confusion with nesting
from test_util import * from funkyyak import grad ## See Siskind & Pearlmutter (2008), "Nesting forward-mode AD in a ## functional framework", Higher Order and Symbolic Computation ## 21(4):361-76, doi:10.1007/s10990-008-9037-1 def test_nest_hosc(): shouldBeTwo = grad (lambda x: grad (lambda y: x*y) (2.0)) (1.0) ...
<commit_before><commit_msg>Test for perturbation confusion with nesting<commit_after>
from test_util import * from funkyyak import grad ## See Siskind & Pearlmutter (2008), "Nesting forward-mode AD in a ## functional framework", Higher Order and Symbolic Computation ## 21(4):361-76, doi:10.1007/s10990-008-9037-1 def test_nest_hosc(): shouldBeTwo = grad (lambda x: grad (lambda y: x*y) (2.0)) (1.0) ...
Test for perturbation confusion with nestingfrom test_util import * from funkyyak import grad ## See Siskind & Pearlmutter (2008), "Nesting forward-mode AD in a ## functional framework", Higher Order and Symbolic Computation ## 21(4):361-76, doi:10.1007/s10990-008-9037-1 def test_nest_hosc(): shouldBeTwo = grad (...
<commit_before><commit_msg>Test for perturbation confusion with nesting<commit_after>from test_util import * from funkyyak import grad ## See Siskind & Pearlmutter (2008), "Nesting forward-mode AD in a ## functional framework", Higher Order and Symbolic Computation ## 21(4):361-76, doi:10.1007/s10990-008-9037-1 def t...
48baae8e7d1abec1f3949097df3263e64b1e6c8f
tests/test_receivers.py
tests/test_receivers.py
"""Tests for the Socket Receiver""" from unittest.mock import patch from nose.tools import raises, eq_, ok_ import multilog.receivers as receivers from multilog.handlers import LogHandler @patch("socketserver.ThreadingTCPServer.__init__") def test_receiver_init_defaults(tcp_init_mock): receiver = receivers.LogR...
Add unit tests for the log receivers.
Add unit tests for the log receivers.
Python
mit
humangeo/multilog
Add unit tests for the log receivers.
"""Tests for the Socket Receiver""" from unittest.mock import patch from nose.tools import raises, eq_, ok_ import multilog.receivers as receivers from multilog.handlers import LogHandler @patch("socketserver.ThreadingTCPServer.__init__") def test_receiver_init_defaults(tcp_init_mock): receiver = receivers.LogR...
<commit_before><commit_msg>Add unit tests for the log receivers.<commit_after>
"""Tests for the Socket Receiver""" from unittest.mock import patch from nose.tools import raises, eq_, ok_ import multilog.receivers as receivers from multilog.handlers import LogHandler @patch("socketserver.ThreadingTCPServer.__init__") def test_receiver_init_defaults(tcp_init_mock): receiver = receivers.LogR...
Add unit tests for the log receivers."""Tests for the Socket Receiver""" from unittest.mock import patch from nose.tools import raises, eq_, ok_ import multilog.receivers as receivers from multilog.handlers import LogHandler @patch("socketserver.ThreadingTCPServer.__init__") def test_receiver_init_defaults(tcp_init...
<commit_before><commit_msg>Add unit tests for the log receivers.<commit_after>"""Tests for the Socket Receiver""" from unittest.mock import patch from nose.tools import raises, eq_, ok_ import multilog.receivers as receivers from multilog.handlers import LogHandler @patch("socketserver.ThreadingTCPServer.__init__")...
d97e37ed121868249c2e11a9ee31dda1c603552e
compare-miso.py
compare-miso.py
""" this script is to do all pairwise comparisons of each class of events called by MISO. It assumes MISO has already been run on each sample and there is a directory structure of: miso_dir/control-RI miso_dir/knockdown-RI where before the - is the samplename and after the - is the event type. It then calculates all ...
Add script to run all pairwise MISO comparisons for each event type.
Add script to run all pairwise MISO comparisons for each event type.
Python
mit
roryk/junkdrawer,roryk/junkdrawer
Add script to run all pairwise MISO comparisons for each event type.
""" this script is to do all pairwise comparisons of each class of events called by MISO. It assumes MISO has already been run on each sample and there is a directory structure of: miso_dir/control-RI miso_dir/knockdown-RI where before the - is the samplename and after the - is the event type. It then calculates all ...
<commit_before><commit_msg>Add script to run all pairwise MISO comparisons for each event type.<commit_after>
""" this script is to do all pairwise comparisons of each class of events called by MISO. It assumes MISO has already been run on each sample and there is a directory structure of: miso_dir/control-RI miso_dir/knockdown-RI where before the - is the samplename and after the - is the event type. It then calculates all ...
Add script to run all pairwise MISO comparisons for each event type.""" this script is to do all pairwise comparisons of each class of events called by MISO. It assumes MISO has already been run on each sample and there is a directory structure of: miso_dir/control-RI miso_dir/knockdown-RI where before the - is the s...
<commit_before><commit_msg>Add script to run all pairwise MISO comparisons for each event type.<commit_after>""" this script is to do all pairwise comparisons of each class of events called by MISO. It assumes MISO has already been run on each sample and there is a directory structure of: miso_dir/control-RI miso_dir/...
345581aa5ba2fe3b0e4288f47489b668cebfc162
tests/cli/test_repair.py
tests/cli/test_repair.py
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
from textwrap import dedent from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].ui...
Add another test for full repair command
Add another test for full repair command
Python
mit
tribut/vdirsyncer,credativUK/vdirsyncer,untitaker/vdirsyncer,hobarrera/vdirsyncer,hobarrera/vdirsyncer,tribut/vdirsyncer,untitaker/vdirsyncer,credativUK/vdirsyncer,untitaker/vdirsyncer
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
from textwrap import dedent from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].ui...
<commit_before>from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, et...
from textwrap import dedent from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].ui...
from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, etag in s.list()]...
<commit_before>from vdirsyncer.cli.utils import repair_storage from vdirsyncer.storage.memory import MemoryStorage from vdirsyncer.utils.vobject import Item def test_repair_uids(): s = MemoryStorage() s.upload(Item(u'BEGIN:VCARD\nEND:VCARD')) repair_storage(s) uid, = [s.get(href)[0].uid for href, et...
389acb1972491d4ad982e3893193aaf60b0bdc0d
tests/test_processing.py
tests/test_processing.py
import mock import pytest from scrapi import events from scrapi import settings settings.DEBUG = False settings.RAW_PROCESSING = ['storage', 'osf', 'foo', 'bar'] settings.NORMALIZED_PROCESSING = ['storage', 'osf', 'foo', 'bar'] from scrapi import processing BLACKHOLE = lambda *_, **__: None @pytest.fixture(autou...
Add tests for the processing module
Add tests for the processing module
Python
apache-2.0
mehanig/scrapi,mehanig/scrapi,fabianvf/scrapi,felliott/scrapi,fabianvf/scrapi,CenterForOpenScience/scrapi,erinspace/scrapi,felliott/scrapi,alexgarciac/scrapi,icereval/scrapi,ostwald/scrapi,erinspace/scrapi,jeffreyliu3230/scrapi,CenterForOpenScience/scrapi
Add tests for the processing module
import mock import pytest from scrapi import events from scrapi import settings settings.DEBUG = False settings.RAW_PROCESSING = ['storage', 'osf', 'foo', 'bar'] settings.NORMALIZED_PROCESSING = ['storage', 'osf', 'foo', 'bar'] from scrapi import processing BLACKHOLE = lambda *_, **__: None @pytest.fixture(autou...
<commit_before><commit_msg>Add tests for the processing module<commit_after>
import mock import pytest from scrapi import events from scrapi import settings settings.DEBUG = False settings.RAW_PROCESSING = ['storage', 'osf', 'foo', 'bar'] settings.NORMALIZED_PROCESSING = ['storage', 'osf', 'foo', 'bar'] from scrapi import processing BLACKHOLE = lambda *_, **__: None @pytest.fixture(autou...
Add tests for the processing moduleimport mock import pytest from scrapi import events from scrapi import settings settings.DEBUG = False settings.RAW_PROCESSING = ['storage', 'osf', 'foo', 'bar'] settings.NORMALIZED_PROCESSING = ['storage', 'osf', 'foo', 'bar'] from scrapi import processing BLACKHOLE = lambda *_, ...
<commit_before><commit_msg>Add tests for the processing module<commit_after>import mock import pytest from scrapi import events from scrapi import settings settings.DEBUG = False settings.RAW_PROCESSING = ['storage', 'osf', 'foo', 'bar'] settings.NORMALIZED_PROCESSING = ['storage', 'osf', 'foo', 'bar'] from scrapi i...
db7fa706fa1a5285c8fdb00de4e9661c59839035
samples/tests/forms/test_collected_sample_form.py
samples/tests/forms/test_collected_sample_form.py
import datetime from django.test import TestCase from samples.forms import CollectedSampleForm from samples.models import ( Patient, AdmissionNote, CollectedSample, CollectionType, ) class CollectedSampleFormTest(TestCase): def setUp(self): patient = Patient(name="Collected Sample Form Patient") ...
Add first test: check if both collection type selected is invalid
:hammer: Add first test: check if both collection type selected is invalid
Python
mit
gems-uff/labsys,gems-uff/labsys,gems-uff/labsys
:hammer: Add first test: check if both collection type selected is invalid
import datetime from django.test import TestCase from samples.forms import CollectedSampleForm from samples.models import ( Patient, AdmissionNote, CollectedSample, CollectionType, ) class CollectedSampleFormTest(TestCase): def setUp(self): patient = Patient(name="Collected Sample Form Patient") ...
<commit_before><commit_msg>:hammer: Add first test: check if both collection type selected is invalid<commit_after>
import datetime from django.test import TestCase from samples.forms import CollectedSampleForm from samples.models import ( Patient, AdmissionNote, CollectedSample, CollectionType, ) class CollectedSampleFormTest(TestCase): def setUp(self): patient = Patient(name="Collected Sample Form Patient") ...
:hammer: Add first test: check if both collection type selected is invalidimport datetime from django.test import TestCase from samples.forms import CollectedSampleForm from samples.models import ( Patient, AdmissionNote, CollectedSample, CollectionType, ) class CollectedSampleFormTest(TestCase): def setUp...
<commit_before><commit_msg>:hammer: Add first test: check if both collection type selected is invalid<commit_after>import datetime from django.test import TestCase from samples.forms import CollectedSampleForm from samples.models import ( Patient, AdmissionNote, CollectedSample, CollectionType, ) class Collecte...
15b219033d9c452c7e2d4f75595580b52f2d945e
deploy/flask-redirects.py
deploy/flask-redirects.py
import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/') def redirect_front(): version = 'latest' language = 'en' single_version = False SUBDOMAIN = CNAME = False if PRODUCTION_DOMAIN in request.host: ...
Add a small flask app for redirecting /.
Add a small flask app for redirecting /. This should never hit the database, and give us a nice place to make smarter redirects.
Python
mit
raven47git/readthedocs.org,nikolas/readthedocs.org,sunnyzwh/readthedocs.org,davidfischer/readthedocs.org,emawind84/readthedocs.org,takluyver/readthedocs.org,Tazer/readthedocs.org,attakei/readthedocs-oauth,Carreau/readthedocs.org,cgourlay/readthedocs.org,rtfd/readthedocs.org,Tazer/readthedocs.org,atsuyim/readthedocs.org...
Add a small flask app for redirecting /. This should never hit the database, and give us a nice place to make smarter redirects.
import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/') def redirect_front(): version = 'latest' language = 'en' single_version = False SUBDOMAIN = CNAME = False if PRODUCTION_DOMAIN in request.host: ...
<commit_before><commit_msg>Add a small flask app for redirecting /. This should never hit the database, and give us a nice place to make smarter redirects.<commit_after>
import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/') def redirect_front(): version = 'latest' language = 'en' single_version = False SUBDOMAIN = CNAME = False if PRODUCTION_DOMAIN in request.host: ...
Add a small flask app for redirecting /. This should never hit the database, and give us a nice place to make smarter redirects.import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/') def redirect_front(): version = 'lat...
<commit_before><commit_msg>Add a small flask app for redirecting /. This should never hit the database, and give us a nice place to make smarter redirects.<commit_after>import json from flask import Flask, make_response, redirect, request app = Flask(__name__) PRODUCTION_DOMAIN = 'readthedocs.org' @app.route('/')...
e7738a6c7c13a68f17b7b29d91363d93fdaaae5f
hackernews_scrapy/spiders/hackernews_spider.py
hackernews_scrapy/spiders/hackernews_spider.py
from scrapy.spiders import Spider from scrapy.http import Request from hackernews_scrapy.items import HackernewsScrapyItem from scrapy.selector import Selector class HackernewsSpider(Spider): name = 'pythonhackernews' allowed_hosts = ['news.ycombinator.com'] start_urls = ['https://news.ycombinator.com'] def par...
Add spider for Hacker News
Add spider for Hacker News
Python
mit
mdsrosa/hackernews_scrapy
Add spider for Hacker News
from scrapy.spiders import Spider from scrapy.http import Request from hackernews_scrapy.items import HackernewsScrapyItem from scrapy.selector import Selector class HackernewsSpider(Spider): name = 'pythonhackernews' allowed_hosts = ['news.ycombinator.com'] start_urls = ['https://news.ycombinator.com'] def par...
<commit_before><commit_msg>Add spider for Hacker News<commit_after>
from scrapy.spiders import Spider from scrapy.http import Request from hackernews_scrapy.items import HackernewsScrapyItem from scrapy.selector import Selector class HackernewsSpider(Spider): name = 'pythonhackernews' allowed_hosts = ['news.ycombinator.com'] start_urls = ['https://news.ycombinator.com'] def par...
Add spider for Hacker Newsfrom scrapy.spiders import Spider from scrapy.http import Request from hackernews_scrapy.items import HackernewsScrapyItem from scrapy.selector import Selector class HackernewsSpider(Spider): name = 'pythonhackernews' allowed_hosts = ['news.ycombinator.com'] start_urls = ['https://news.yc...
<commit_before><commit_msg>Add spider for Hacker News<commit_after>from scrapy.spiders import Spider from scrapy.http import Request from hackernews_scrapy.items import HackernewsScrapyItem from scrapy.selector import Selector class HackernewsSpider(Spider): name = 'pythonhackernews' allowed_hosts = ['news.ycombina...
82cc7fa29747672abe6c27d3540c272b576c1d4b
listfriendships.py
listfriendships.py
#!/usr/bin/env python # -*- coding: utf-8 -*- """This script lists all the followers of a Twitter user. Examples: You must specify the user's screen_name you want to show:: $ python listfriendships.py list-friends screen_name $ python listfriendships.py list-followers screen_name """ from secret import twi...
Add a Python script which lists the friendships of a Twitter user.
Add a Python script which lists the friendships of a Twitter user.
Python
mit
showa-yojyo/bin,showa-yojyo/bin
Add a Python script which lists the friendships of a Twitter user.
#!/usr/bin/env python # -*- coding: utf-8 -*- """This script lists all the followers of a Twitter user. Examples: You must specify the user's screen_name you want to show:: $ python listfriendships.py list-friends screen_name $ python listfriendships.py list-followers screen_name """ from secret import twi...
<commit_before><commit_msg>Add a Python script which lists the friendships of a Twitter user.<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- """This script lists all the followers of a Twitter user. Examples: You must specify the user's screen_name you want to show:: $ python listfriendships.py list-friends screen_name $ python listfriendships.py list-followers screen_name """ from secret import twi...
Add a Python script which lists the friendships of a Twitter user.#!/usr/bin/env python # -*- coding: utf-8 -*- """This script lists all the followers of a Twitter user. Examples: You must specify the user's screen_name you want to show:: $ python listfriendships.py list-friends screen_name $ python listfri...
<commit_before><commit_msg>Add a Python script which lists the friendships of a Twitter user.<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- """This script lists all the followers of a Twitter user. Examples: You must specify the user's screen_name you want to show:: $ python listfriendships.py list...
cc321636b1a755381067d18444a951c852771f21
zephyr/management/commands/bankrupt_users.py
zephyr/management/commands/bankrupt_users.py
from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.lib.actions import update_message_flags from zephyr.models import UserProfile, Message, get_user_profile_by_email class Command(BaseCommand): help = """Bankrupt one or many users. Usage: python manage.py bankr...
Add a management command to bankrupt users.
Add a management command to bankrupt users. (imported from commit 58fbd08fc31a69c9ee7fb73b9302d44eb87db1fa)
Python
apache-2.0
LAndreas/zulip,sharmaeklavya2/zulip,mahim97/zulip,jrowan/zulip,willingc/zulip,willingc/zulip,amanharitsh123/zulip,moria/zulip,johnny9/zulip,xuxiao/zulip,christi3k/zulip,stamhe/zulip,alliejones/zulip,bitemyapp/zulip,Diptanshu8/zulip,sup95/zulip,m1ssou/zulip,bowlofstew/zulip,jackrzhang/zulip,dhcrzf/zulip,thomasboyt/zulip...
Add a management command to bankrupt users. (imported from commit 58fbd08fc31a69c9ee7fb73b9302d44eb87db1fa)
from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.lib.actions import update_message_flags from zephyr.models import UserProfile, Message, get_user_profile_by_email class Command(BaseCommand): help = """Bankrupt one or many users. Usage: python manage.py bankr...
<commit_before><commit_msg>Add a management command to bankrupt users. (imported from commit 58fbd08fc31a69c9ee7fb73b9302d44eb87db1fa)<commit_after>
from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.lib.actions import update_message_flags from zephyr.models import UserProfile, Message, get_user_profile_by_email class Command(BaseCommand): help = """Bankrupt one or many users. Usage: python manage.py bankr...
Add a management command to bankrupt users. (imported from commit 58fbd08fc31a69c9ee7fb73b9302d44eb87db1fa)from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.lib.actions import update_message_flags from zephyr.models import UserProfile, Message, get_user_profile_by...
<commit_before><commit_msg>Add a management command to bankrupt users. (imported from commit 58fbd08fc31a69c9ee7fb73b9302d44eb87db1fa)<commit_after>from __future__ import absolute_import from django.core.management.base import BaseCommand from zephyr.lib.actions import update_message_flags from zephyr.models import ...
ff54c4b9e7bfb79f10cb5495f6fccb2ea5abbd75
tests/utils.py
tests/utils.py
import logging import ssl import urllib2 TRIES=3 class TimeoutError(Exception): pass def test_3times_then_fail(func, *args, **kwargs): log = logging.getLogger("tests") for i in range(TRIES): try: return func(*args, **kwargs) except urllib2.HTTPError, e: if e.code =...
Add test measurements against 500 errors and timeouts
Add test measurements against 500 errors and timeouts
Python
mit
authmillenon/pycomicvine
Add test measurements against 500 errors and timeouts
import logging import ssl import urllib2 TRIES=3 class TimeoutError(Exception): pass def test_3times_then_fail(func, *args, **kwargs): log = logging.getLogger("tests") for i in range(TRIES): try: return func(*args, **kwargs) except urllib2.HTTPError, e: if e.code =...
<commit_before><commit_msg>Add test measurements against 500 errors and timeouts<commit_after>
import logging import ssl import urllib2 TRIES=3 class TimeoutError(Exception): pass def test_3times_then_fail(func, *args, **kwargs): log = logging.getLogger("tests") for i in range(TRIES): try: return func(*args, **kwargs) except urllib2.HTTPError, e: if e.code =...
Add test measurements against 500 errors and timeoutsimport logging import ssl import urllib2 TRIES=3 class TimeoutError(Exception): pass def test_3times_then_fail(func, *args, **kwargs): log = logging.getLogger("tests") for i in range(TRIES): try: return func(*args, **kwargs) ...
<commit_before><commit_msg>Add test measurements against 500 errors and timeouts<commit_after>import logging import ssl import urllib2 TRIES=3 class TimeoutError(Exception): pass def test_3times_then_fail(func, *args, **kwargs): log = logging.getLogger("tests") for i in range(TRIES): try: ...
a9504258826e434172031adeaa400dbe4e02daa4
migrations/versions/0214_another_letter_org.py
migrations/versions/0214_another_letter_org.py
"""empty message Revision ID: 0214_another_letter_org Revises: 0213_brand_colour_domain_ """ # revision identifiers, used by Alembic. revision = '0214_another_letter_org' down_revision = '0213_brand_colour_domain_' from alembic import op NEW_ORGANISATIONS = [ ('510', 'Pension Wise'), ] def upgrade(): fo...
Add letter logo for Pension Wise
Add letter logo for Pension Wise
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add letter logo for Pension Wise
"""empty message Revision ID: 0214_another_letter_org Revises: 0213_brand_colour_domain_ """ # revision identifiers, used by Alembic. revision = '0214_another_letter_org' down_revision = '0213_brand_colour_domain_' from alembic import op NEW_ORGANISATIONS = [ ('510', 'Pension Wise'), ] def upgrade(): fo...
<commit_before><commit_msg>Add letter logo for Pension Wise<commit_after>
"""empty message Revision ID: 0214_another_letter_org Revises: 0213_brand_colour_domain_ """ # revision identifiers, used by Alembic. revision = '0214_another_letter_org' down_revision = '0213_brand_colour_domain_' from alembic import op NEW_ORGANISATIONS = [ ('510', 'Pension Wise'), ] def upgrade(): fo...
Add letter logo for Pension Wise"""empty message Revision ID: 0214_another_letter_org Revises: 0213_brand_colour_domain_ """ # revision identifiers, used by Alembic. revision = '0214_another_letter_org' down_revision = '0213_brand_colour_domain_' from alembic import op NEW_ORGANISATIONS = [ ('510', 'Pension W...
<commit_before><commit_msg>Add letter logo for Pension Wise<commit_after>"""empty message Revision ID: 0214_another_letter_org Revises: 0213_brand_colour_domain_ """ # revision identifiers, used by Alembic. revision = '0214_another_letter_org' down_revision = '0213_brand_colour_domain_' from alembic import op NEW...
cfab12182b6556a61cdd93ce715cf863abe69bbf
formidable/migrations/0005_conditions_default.py
formidable/migrations/0005_conditions_default.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0004_formidable_conditions'), ] operations = [ migrations.AlterField( model_name='...
Add missing django db migration
Add missing django db migration
Python
mit
novafloss/django-formidable
Add missing django db migration
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0004_formidable_conditions'), ] operations = [ migrations.AlterField( model_name='...
<commit_before><commit_msg>Add missing django db migration<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0004_formidable_conditions'), ] operations = [ migrations.AlterField( model_name='...
Add missing django db migration# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0004_formidable_conditions'), ] operations = [ migrations.Alter...
<commit_before><commit_msg>Add missing django db migration<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations import jsonfield.fields class Migration(migrations.Migration): dependencies = [ ('formidable', '0004_formidable_conditions'), ] ...
36a8bcf42cc262c2adbcb67fee64d20e1cdf5c4c
tests/django_settings.py
tests/django_settings.py
# This is a settings file to run Django tests with django-pickling in effect print('Installing django-pickling') import django_pickling DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, 'other': { 'ENGINE': 'django.db.backends.sqlite3', } } SECRET_KEY = "django_test...
Add settings file to run Django test suite with django-pickling in effect
Add settings file to run Django test suite with django-pickling in effect
Python
bsd-3-clause
Suor/django-pickling
Add settings file to run Django test suite with django-pickling in effect
# This is a settings file to run Django tests with django-pickling in effect print('Installing django-pickling') import django_pickling DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, 'other': { 'ENGINE': 'django.db.backends.sqlite3', } } SECRET_KEY = "django_test...
<commit_before><commit_msg>Add settings file to run Django test suite with django-pickling in effect<commit_after>
# This is a settings file to run Django tests with django-pickling in effect print('Installing django-pickling') import django_pickling DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, 'other': { 'ENGINE': 'django.db.backends.sqlite3', } } SECRET_KEY = "django_test...
Add settings file to run Django test suite with django-pickling in effect# This is a settings file to run Django tests with django-pickling in effect print('Installing django-pickling') import django_pickling DATABASES = { 'default': { 'ENGINE': 'django.db.backends.sqlite3', }, 'other': { '...
<commit_before><commit_msg>Add settings file to run Django test suite with django-pickling in effect<commit_after># This is a settings file to run Django tests with django-pickling in effect print('Installing django-pickling') import django_pickling DATABASES = { 'default': { 'ENGINE': 'django.db.backends....
bae587f2d6d9b9ea3023934ad5796ff6a15fe765
nstl/passes/nameresolve.py
nstl/passes/nameresolve.py
from .. import ast import sys from itertools import chain class Scope(dict): def __init__(self, parent=None, name=None, *args, **kwargs): assert isinstance(parent, Scope) or parent is None super().__init__(*args, **kwargs) self.name = name self.parent = parent sel...
Rewrite the name resolving pass.
Rewrite the name resolving pass. This pass takes care of resolving which object are identifiers bound to. It then stores the result by adding a 'resolved' attribute to each identifier and qualified identifier node in the tree. These 'resolved' attributes can then be accessed to refer to the object bound to the identif...
Python
bsd-3-clause
ldionne/nstl-lang,ldionne/nstl-lang
Rewrite the name resolving pass. This pass takes care of resolving which object are identifiers bound to. It then stores the result by adding a 'resolved' attribute to each identifier and qualified identifier node in the tree. These 'resolved' attributes can then be accessed to refer to the object bound to the identif...
from .. import ast import sys from itertools import chain class Scope(dict): def __init__(self, parent=None, name=None, *args, **kwargs): assert isinstance(parent, Scope) or parent is None super().__init__(*args, **kwargs) self.name = name self.parent = parent sel...
<commit_before><commit_msg>Rewrite the name resolving pass. This pass takes care of resolving which object are identifiers bound to. It then stores the result by adding a 'resolved' attribute to each identifier and qualified identifier node in the tree. These 'resolved' attributes can then be accessed to refer to the ...
from .. import ast import sys from itertools import chain class Scope(dict): def __init__(self, parent=None, name=None, *args, **kwargs): assert isinstance(parent, Scope) or parent is None super().__init__(*args, **kwargs) self.name = name self.parent = parent sel...
Rewrite the name resolving pass. This pass takes care of resolving which object are identifiers bound to. It then stores the result by adding a 'resolved' attribute to each identifier and qualified identifier node in the tree. These 'resolved' attributes can then be accessed to refer to the object bound to the identif...
<commit_before><commit_msg>Rewrite the name resolving pass. This pass takes care of resolving which object are identifiers bound to. It then stores the result by adding a 'resolved' attribute to each identifier and qualified identifier node in the tree. These 'resolved' attributes can then be accessed to refer to the ...
7a04808fa00340d23a99436db741dc7e87d0f010
tickets/wagtail_hooks.py
tickets/wagtail_hooks.py
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from tickets import models class QuestionAdmin(ModelAdmin): model = models.Question menu_icon = 'help' list_display = ("subject", "author", "status") modeladmin_register(QuestionAdmin)
Move tickets admin to wagtail
Move tickets admin to wagtail TODO: adding responses should be supported touch #162
Python
agpl-3.0
Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen,Inboxen/Inboxen
Move tickets admin to wagtail TODO: adding responses should be supported touch #162
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from tickets import models class QuestionAdmin(ModelAdmin): model = models.Question menu_icon = 'help' list_display = ("subject", "author", "status") modeladmin_register(QuestionAdmin)
<commit_before><commit_msg>Move tickets admin to wagtail TODO: adding responses should be supported touch #162<commit_after>
from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from tickets import models class QuestionAdmin(ModelAdmin): model = models.Question menu_icon = 'help' list_display = ("subject", "author", "status") modeladmin_register(QuestionAdmin)
Move tickets admin to wagtail TODO: adding responses should be supported touch #162from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from tickets import models class QuestionAdmin(ModelAdmin): model = models.Question menu_icon = 'help' list_display = ("subject", "author", "...
<commit_before><commit_msg>Move tickets admin to wagtail TODO: adding responses should be supported touch #162<commit_after>from wagtail.contrib.modeladmin.options import ModelAdmin, modeladmin_register from tickets import models class QuestionAdmin(ModelAdmin): model = models.Question menu_icon = 'help' ...
9bd57f75977655ddf6eb57729eda41832db2ba8c
scripts/add_alpha/add_alpha.py
scripts/add_alpha/add_alpha.py
#!/usr/bin/python3 # coding: utf-8 ''' Adding an alpha pixel to an image and writing as a ARGB image file Copyright (C) 2018 Zettsu Tatsuya ''' import cv2 from optparse import OptionParser import numpy as np def main(): parser = OptionParser() parser.add_option('-i', '--input', dest='in_image_f...
Add a script to make a transparent PNG file
Add a script to make a transparent PNG file
Python
mit
zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend,zettsu-t/cPlusPlusFriend
Add a script to make a transparent PNG file
#!/usr/bin/python3 # coding: utf-8 ''' Adding an alpha pixel to an image and writing as a ARGB image file Copyright (C) 2018 Zettsu Tatsuya ''' import cv2 from optparse import OptionParser import numpy as np def main(): parser = OptionParser() parser.add_option('-i', '--input', dest='in_image_f...
<commit_before><commit_msg>Add a script to make a transparent PNG file<commit_after>
#!/usr/bin/python3 # coding: utf-8 ''' Adding an alpha pixel to an image and writing as a ARGB image file Copyright (C) 2018 Zettsu Tatsuya ''' import cv2 from optparse import OptionParser import numpy as np def main(): parser = OptionParser() parser.add_option('-i', '--input', dest='in_image_f...
Add a script to make a transparent PNG file#!/usr/bin/python3 # coding: utf-8 ''' Adding an alpha pixel to an image and writing as a ARGB image file Copyright (C) 2018 Zettsu Tatsuya ''' import cv2 from optparse import OptionParser import numpy as np def main(): parser = OptionParser() parser.a...
<commit_before><commit_msg>Add a script to make a transparent PNG file<commit_after>#!/usr/bin/python3 # coding: utf-8 ''' Adding an alpha pixel to an image and writing as a ARGB image file Copyright (C) 2018 Zettsu Tatsuya ''' import cv2 from optparse import OptionParser import numpy as np def main(): ...
9141e9e859bab8999e785f796d4613d66a765ba9
mangaki/mangaki/migrations/0013_auto_20150616_0919.py
mangaki/mangaki/migrations/0013_auto_20150616_0919.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mangaki', '0012_auto_20150616_0832'), ] operations = [ migrations.AddField( model_name='anime', name...
Add attributes to Anime migration
Add attributes to Anime migration
Python
agpl-3.0
RaitoBezarius/mangaki,Elarnon/mangaki,Mako-kun/mangaki,Elarnon/mangaki,Mako-kun/mangaki,Mako-kun/mangaki,Elarnon/mangaki,RaitoBezarius/mangaki,RaitoBezarius/mangaki
Add attributes to Anime migration
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mangaki', '0012_auto_20150616_0832'), ] operations = [ migrations.AddField( model_name='anime', name...
<commit_before><commit_msg>Add attributes to Anime migration<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mangaki', '0012_auto_20150616_0832'), ] operations = [ migrations.AddField( model_name='anime', name...
Add attributes to Anime migration# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mangaki', '0012_auto_20150616_0832'), ] operations = [ migrations.AddField( mod...
<commit_before><commit_msg>Add attributes to Anime migration<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations class Migration(migrations.Migration): dependencies = [ ('mangaki', '0012_auto_20150616_0832'), ] operations = [ ...
00c0e3b1309416186123fe81f298f9422446d5fa
testfixtures/seating.py
testfixtures/seating.py
# -*- coding: utf-8 -*- """ testfixtures.seating ~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.seating.models.seat_group import SeatGroup def create_seat_group(party_id, seat_category, title, *, seat_quantity=4): return...
Add function to create a seat group test fixture
Add function to create a seat group test fixture
Python
bsd-3-clause
m-ober/byceps,homeworkprod/byceps,homeworkprod/byceps,m-ober/byceps,m-ober/byceps,homeworkprod/byceps
Add function to create a seat group test fixture
# -*- coding: utf-8 -*- """ testfixtures.seating ~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.seating.models.seat_group import SeatGroup def create_seat_group(party_id, seat_category, title, *, seat_quantity=4): return...
<commit_before><commit_msg>Add function to create a seat group test fixture<commit_after>
# -*- coding: utf-8 -*- """ testfixtures.seating ~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.seating.models.seat_group import SeatGroup def create_seat_group(party_id, seat_category, title, *, seat_quantity=4): return...
Add function to create a seat group test fixture# -*- coding: utf-8 -*- """ testfixtures.seating ~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.seating.models.seat_group import SeatGroup def create_seat_group(party_id, seat_...
<commit_before><commit_msg>Add function to create a seat group test fixture<commit_after># -*- coding: utf-8 -*- """ testfixtures.seating ~~~~~~~~~~~~~~~~~~~~ :Copyright: 2006-2016 Jochen Kupperschmidt :License: Modified BSD, see LICENSE for details. """ from byceps.services.seating.models.seat_group import SeatGrou...
b77af260bfdfbb7d93a488d9bc78d343a9d0b0ea
pipeline/writer.py
pipeline/writer.py
from pipeline import * import json import os class JsonWriter(BasePipeline): def __init__(self, outputfolder, basefilename=None, filesize=10000): """ when attached to the pipeline this file log all json :param outputfolder: folder to save output files in :param basefilename: filena...
Implement JSONWriter Class for Saving into files
Implement JSONWriter Class for Saving into files - base file name - save every - output folder - buffer documents and save when reach maximum file size
Python
mit
hadyelsahar/RE-NLG-Dataset,hadyelsahar/RE-NLG-Dataset
Implement JSONWriter Class for Saving into files - base file name - save every - output folder - buffer documents and save when reach maximum file size
from pipeline import * import json import os class JsonWriter(BasePipeline): def __init__(self, outputfolder, basefilename=None, filesize=10000): """ when attached to the pipeline this file log all json :param outputfolder: folder to save output files in :param basefilename: filena...
<commit_before><commit_msg>Implement JSONWriter Class for Saving into files - base file name - save every - output folder - buffer documents and save when reach maximum file size<commit_after>
from pipeline import * import json import os class JsonWriter(BasePipeline): def __init__(self, outputfolder, basefilename=None, filesize=10000): """ when attached to the pipeline this file log all json :param outputfolder: folder to save output files in :param basefilename: filena...
Implement JSONWriter Class for Saving into files - base file name - save every - output folder - buffer documents and save when reach maximum file sizefrom pipeline import * import json import os class JsonWriter(BasePipeline): def __init__(self, outputfolder, basefilename=None, filesize=10000): """ ...
<commit_before><commit_msg>Implement JSONWriter Class for Saving into files - base file name - save every - output folder - buffer documents and save when reach maximum file size<commit_after>from pipeline import * import json import os class JsonWriter(BasePipeline): def __init__(self, outputfolder, basefilenam...
719b2ac28e27f8e8b0d0acea315c355e7a34cd25
cerbero/commands/genvsprops.py
cerbero/commands/genvsprops.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
Add command to create VS property sheets for all pkgconfig pacakges
Add command to create VS property sheets for all pkgconfig pacakges
Python
lgpl-2.1
nzjrs/cerbero,centricular/cerbero,justinjoy/cerbero,multipath-rtp/cerbero,superdump/cerbero,cee1/cerbero-mac,ylatuya/cerbero,lubosz/cerbero,ford-prefect/cerbero,nzjrs/cerbero,fluendo/cerbero,brion/cerbero,freedesktop-unofficial-mirror/gstreamer__sdk__cerbero,GStreamer/cerbero,AlertMe/cerbero,ylatuya/cerbero,sdroege/cer...
Add command to create VS property sheets for all pkgconfig pacakges
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
<commit_before><commit_msg>Add command to create VS property sheets for all pkgconfig pacakges<commit_after>
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; eit...
Add command to create VS property sheets for all pkgconfig pacakges# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General...
<commit_before><commit_msg>Add command to create VS property sheets for all pkgconfig pacakges<commit_after># cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <[email protected]> # # This library is free software; you can redistribute it and/or # modify it u...
13b351616719ca3a6ba2fa08f1c8446b38aeb755
hooks/hook-PyQt5.QtGui.py
hooks/hook-PyQt5.QtGui.py
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
Add hook for missing platformthemes on linux
Add hook for missing platformthemes on linux
Python
mit
ucoin-io/cutecoin,ucoin-io/cutecoin,ucoin-io/cutecoin
Add hook for missing platformthemes on linux
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
<commit_before><commit_msg>Add hook for missing platformthemes on linux<commit_after>
#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in the file COPYING.txt, distributed with this s...
Add hook for missing platformthemes on linux#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing bootloader. # # The full license is in t...
<commit_before><commit_msg>Add hook for missing platformthemes on linux<commit_after>#----------------------------------------------------------------------------- # Copyright (c) 2013-2016, PyInstaller Development Team. # # Distributed under the terms of the GNU General Public License with exception # for distributing...
95007220fbe4c5554a92b2b688fb9724ec949ebd
tests/rules/test_dry.py
tests/rules/test_dry.py
import pytest from thefuck.rules.dry import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command(script='cd cd foo'), Command(script='git git push origin/master')]) def test_match(command): assert match(command, None) @pytest.mark.parametrize('command, new...
Add a test for the DRY rule
Add a test for the DRY rule
Python
mit
mlk/thefuck,PLNech/thefuck,qrqiuren/thefuck,barneyElDinosaurio/thefuck,Clpsplug/thefuck,SimenB/thefuck,ostree/thefuck,PLNech/thefuck,BertieJim/thefuck,mcarton/thefuck,roth1002/thefuck,nvbn/thefuck,ytjiang/thefuck,Aeron/thefuck,scorphus/thefuck,hxddh/thefuck,thesoulkiller/thefuck,SimenB/thefuck,subajat1/thefuck,vanita5/...
Add a test for the DRY rule
import pytest from thefuck.rules.dry import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command(script='cd cd foo'), Command(script='git git push origin/master')]) def test_match(command): assert match(command, None) @pytest.mark.parametrize('command, new...
<commit_before><commit_msg>Add a test for the DRY rule<commit_after>
import pytest from thefuck.rules.dry import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command(script='cd cd foo'), Command(script='git git push origin/master')]) def test_match(command): assert match(command, None) @pytest.mark.parametrize('command, new...
Add a test for the DRY ruleimport pytest from thefuck.rules.dry import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command(script='cd cd foo'), Command(script='git git push origin/master')]) def test_match(command): assert match(command, None) @pytest.mar...
<commit_before><commit_msg>Add a test for the DRY rule<commit_after>import pytest from thefuck.rules.dry import match, get_new_command from tests.utils import Command @pytest.mark.parametrize('command', [ Command(script='cd cd foo'), Command(script='git git push origin/master')]) def test_match(command): ...
a6e48f4c27fd934e22833b3823d1a049a85bbd8d
comics/comics/abstrusegoose.py
comics/comics/abstrusegoose.py
from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'Abstruse Goose' language = 'en' url = 'http://www.abstrusegoose.com/' start_date = '2008-02-01' rights = 'lcfr, CC BY-NC 3.0 US' class Crawler(CrawlerBase): hist...
Add crawler for Abstruse Goose
Add crawler for Abstruse Goose
Python
agpl-3.0
datagutten/comics,jodal/comics,klette/comics,datagutten/comics,datagutten/comics,jodal/comics,klette/comics,datagutten/comics,jodal/comics,jodal/comics,klette/comics
Add crawler for Abstruse Goose
from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'Abstruse Goose' language = 'en' url = 'http://www.abstrusegoose.com/' start_date = '2008-02-01' rights = 'lcfr, CC BY-NC 3.0 US' class Crawler(CrawlerBase): hist...
<commit_before><commit_msg>Add crawler for Abstruse Goose<commit_after>
from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'Abstruse Goose' language = 'en' url = 'http://www.abstrusegoose.com/' start_date = '2008-02-01' rights = 'lcfr, CC BY-NC 3.0 US' class Crawler(CrawlerBase): hist...
Add crawler for Abstruse Goosefrom comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'Abstruse Goose' language = 'en' url = 'http://www.abstrusegoose.com/' start_date = '2008-02-01' rights = 'lcfr, CC BY-NC 3.0 US' class ...
<commit_before><commit_msg>Add crawler for Abstruse Goose<commit_after>from comics.aggregator.crawler import CrawlerBase, CrawlerResult from comics.meta.base import MetaBase class Meta(MetaBase): name = 'Abstruse Goose' language = 'en' url = 'http://www.abstrusegoose.com/' start_date = '2008-02-01' ...
5c64cd356aeff7c8996222143fc53e7e9b442134
cpm_data/migrations/0014_remove_jury_duplicates.py
cpm_data/migrations/0014_remove_jury_duplicates.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_duplicate_jury_members(apps, schema_editor): jury_names = [ "Irina Demyanova", "Carin Bräck", "Pierre-Luc Vaillancourt", ] JuryMember = apps.get_model('cpm_data.JuryMember'...
Add cpm_data migration getting rid of known jury duplicates
Add cpm_data migration getting rid of known jury duplicates
Python
unlicense
kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by,kinaklub/next.filmfest.by
Add cpm_data migration getting rid of known jury duplicates
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_duplicate_jury_members(apps, schema_editor): jury_names = [ "Irina Demyanova", "Carin Bräck", "Pierre-Luc Vaillancourt", ] JuryMember = apps.get_model('cpm_data.JuryMember'...
<commit_before><commit_msg>Add cpm_data migration getting rid of known jury duplicates<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_duplicate_jury_members(apps, schema_editor): jury_names = [ "Irina Demyanova", "Carin Bräck", "Pierre-Luc Vaillancourt", ] JuryMember = apps.get_model('cpm_data.JuryMember'...
Add cpm_data migration getting rid of known jury duplicates# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_duplicate_jury_members(apps, schema_editor): jury_names = [ "Irina Demyanova", "Carin Bräck", "Pierre-Luc Vaillancourt", ...
<commit_before><commit_msg>Add cpm_data migration getting rid of known jury duplicates<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations def remove_duplicate_jury_members(apps, schema_editor): jury_names = [ "Irina Demyanova", "Carin Brä...
20ed558baf9f28a96e6f3c1e58b30e5af4705018
viewer.py
viewer.py
import models from optparse import OptionParser def show_topicmodel_topic(): modelfile = "./../mvtwe/Dataset/model-final.tassign" wordmapfile = "./../mvtwe/Dataset/wordmap.txt" m = models.TopicModel(wordmapfile, modelfile) while True: number = raw_input("Please Input the number : ") tr...
Add the Knn Viewer of Topic Model
Add the Knn Viewer of Topic Model
Python
mit
largelymfs/w2vtools,largelymfs/w2vtools,largelymfs/w2vtools,largelymfs/w2vtools,largelymfs/w2vtools
Add the Knn Viewer of Topic Model
import models from optparse import OptionParser def show_topicmodel_topic(): modelfile = "./../mvtwe/Dataset/model-final.tassign" wordmapfile = "./../mvtwe/Dataset/wordmap.txt" m = models.TopicModel(wordmapfile, modelfile) while True: number = raw_input("Please Input the number : ") tr...
<commit_before><commit_msg>Add the Knn Viewer of Topic Model<commit_after>
import models from optparse import OptionParser def show_topicmodel_topic(): modelfile = "./../mvtwe/Dataset/model-final.tassign" wordmapfile = "./../mvtwe/Dataset/wordmap.txt" m = models.TopicModel(wordmapfile, modelfile) while True: number = raw_input("Please Input the number : ") tr...
Add the Knn Viewer of Topic Modelimport models from optparse import OptionParser def show_topicmodel_topic(): modelfile = "./../mvtwe/Dataset/model-final.tassign" wordmapfile = "./../mvtwe/Dataset/wordmap.txt" m = models.TopicModel(wordmapfile, modelfile) while True: number = raw_input("Please...
<commit_before><commit_msg>Add the Knn Viewer of Topic Model<commit_after>import models from optparse import OptionParser def show_topicmodel_topic(): modelfile = "./../mvtwe/Dataset/model-final.tassign" wordmapfile = "./../mvtwe/Dataset/wordmap.txt" m = models.TopicModel(wordmapfile, modelfile) while...
142f14dd5cdf68d56216a44f4687f2f61d26a05a
erpnext/patches/v7_0/update_missing_employee_in_timesheet.py
erpnext/patches/v7_0/update_missing_employee_in_timesheet.py
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner from `tabTimesheet`...
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log") and "employee" in frappe.db.get_table_columns("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation ...
Migrate employee field to timesheet only if it exists in time log
Migrate employee field to timesheet only if it exists in time log
Python
agpl-3.0
indictranstech/erpnext,njmube/erpnext,indictranstech/erpnext,indictranstech/erpnext,Aptitudetech/ERPNext,gsnbng/erpnext,indictranstech/erpnext,njmube/erpnext,geekroot/erpnext,gsnbng/erpnext,gsnbng/erpnext,geekroot/erpnext,njmube/erpnext,geekroot/erpnext,gsnbng/erpnext,njmube/erpnext,geekroot/erpnext
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner from `tabTimesheet`...
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log") and "employee" in frappe.db.get_table_columns("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation ...
<commit_before>from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner from ...
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log") and "employee" in frappe.db.get_table_columns("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation ...
from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner from `tabTimesheet`...
<commit_before>from __future__ import unicode_literals import frappe def execute(): if frappe.db.table_exists("Time Log"): timesheet = frappe.db.sql("""select tl.employee as employee, ts.name as name, tl.modified as modified, tl.modified_by as modified_by, tl.creation as creation, tl.owner as owner from ...
9b7108cea9179adfc13f1eccebf716a3ce3275ba
map_reader.py
map_reader.py
from math import floor, cos, sin map_file = open("map.txt", 'r') map_array = [[0 for x in range(800)] for x in range(533)] linenum = 0 for line in map_file: processed_line = line.split() processed_line = [int(x) for x in processed_line] map_array[linenum] = processed_line linenum = linenum + 1 def ...
Read map and detect walls based on distance
Read map and detect walls based on distance
Python
bsd-3-clause
XapaJIaMnu/iar,XapaJIaMnu/iar
Read map and detect walls based on distance
from math import floor, cos, sin map_file = open("map.txt", 'r') map_array = [[0 for x in range(800)] for x in range(533)] linenum = 0 for line in map_file: processed_line = line.split() processed_line = [int(x) for x in processed_line] map_array[linenum] = processed_line linenum = linenum + 1 def ...
<commit_before><commit_msg>Read map and detect walls based on distance<commit_after>
from math import floor, cos, sin map_file = open("map.txt", 'r') map_array = [[0 for x in range(800)] for x in range(533)] linenum = 0 for line in map_file: processed_line = line.split() processed_line = [int(x) for x in processed_line] map_array[linenum] = processed_line linenum = linenum + 1 def ...
Read map and detect walls based on distancefrom math import floor, cos, sin map_file = open("map.txt", 'r') map_array = [[0 for x in range(800)] for x in range(533)] linenum = 0 for line in map_file: processed_line = line.split() processed_line = [int(x) for x in processed_line] map_array[linenum] = proc...
<commit_before><commit_msg>Read map and detect walls based on distance<commit_after>from math import floor, cos, sin map_file = open("map.txt", 'r') map_array = [[0 for x in range(800)] for x in range(533)] linenum = 0 for line in map_file: processed_line = line.split() processed_line = [int(x) for x in proc...
1a070f16c1649c1bc332101098b35ab7322c7827
problem_31.py
problem_31.py
from time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: if (point, str(coinset)) in DYNAMIC_TABLE: return DYNAMIC_TABL...
Add problem 31, coin dynamic programming
Add problem 31, coin dynamic programming
Python
mit
dimkarakostas/project-euler
Add problem 31, coin dynamic programming
from time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: if (point, str(coinset)) in DYNAMIC_TABLE: return DYNAMIC_TABL...
<commit_before><commit_msg>Add problem 31, coin dynamic programming<commit_after>
from time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: if (point, str(coinset)) in DYNAMIC_TABLE: return DYNAMIC_TABL...
Add problem 31, coin dynamic programmingfrom time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: if (point, str(coinset)) in DYNAMI...
<commit_before><commit_msg>Add problem 31, coin dynamic programming<commit_after>from time import time TARGET_SUM = 200 COINS = [1, 2, 5, 10, 20, 50, 100, 200] DYNAMIC_TABLE = {} def calculate(point, coinset): if point - coinset[0] < 0: return 0 elif point == coinset[0]: return 1 else: ...
73c9180d39dd4f8204c4f8df4a825776b0dcb9e5
radix_sort.py
radix_sort.py
def int_radix(mylist): ''' Sorts a list of ints by looking at the 1's place, the 10's, 100's, etc. ''' for i in mylist: if (type(i) != int) or (i < 0): return 'Please input a valid list' if len(mylist) > 0: max_list = max(mylist) tens = 1 num_buckets =...
Add sort method for ints
Add sort method for ints
Python
mit
nbeck90/data_structures_2
Add sort method for ints
def int_radix(mylist): ''' Sorts a list of ints by looking at the 1's place, the 10's, 100's, etc. ''' for i in mylist: if (type(i) != int) or (i < 0): return 'Please input a valid list' if len(mylist) > 0: max_list = max(mylist) tens = 1 num_buckets =...
<commit_before><commit_msg>Add sort method for ints<commit_after>
def int_radix(mylist): ''' Sorts a list of ints by looking at the 1's place, the 10's, 100's, etc. ''' for i in mylist: if (type(i) != int) or (i < 0): return 'Please input a valid list' if len(mylist) > 0: max_list = max(mylist) tens = 1 num_buckets =...
Add sort method for intsdef int_radix(mylist): ''' Sorts a list of ints by looking at the 1's place, the 10's, 100's, etc. ''' for i in mylist: if (type(i) != int) or (i < 0): return 'Please input a valid list' if len(mylist) > 0: max_list = max(mylist) tens =...
<commit_before><commit_msg>Add sort method for ints<commit_after>def int_radix(mylist): ''' Sorts a list of ints by looking at the 1's place, the 10's, 100's, etc. ''' for i in mylist: if (type(i) != int) or (i < 0): return 'Please input a valid list' if len(mylist) > 0: ...
a252cec4cf977d5c27509e9b282c5901ad89a522
tensorflow_io/hadoop/python/ops/hadoop_dataset_ops.py
tensorflow_io/hadoop/python/ops/hadoop_dataset_ops.py
# Copyright 2018 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 python wrapper for tf.contrib.hadoop.SequenceFileDataset
Add python wrapper for tf.contrib.hadoop.SequenceFileDataset Signed-off-by: Yong Tang <[email protected]>
Python
apache-2.0
tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io,tensorflow/io
Add python wrapper for tf.contrib.hadoop.SequenceFileDataset Signed-off-by: Yong Tang <[email protected]>
# Copyright 2018 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 python wrapper for tf.contrib.hadoop.SequenceFileDataset Signed-off-by: Yong Tang <[email protected]><commit_after>
# Copyright 2018 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 python wrapper for tf.contrib.hadoop.SequenceFileDataset Signed-off-by: Yong Tang <[email protected]># Copyright 2018 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 ...
<commit_before><commit_msg>Add python wrapper for tf.contrib.hadoop.SequenceFileDataset Signed-off-by: Yong Tang <[email protected]><commit_after># Copyright 2018 The TensorFlow Authors. All Rights Reserved. # # Licensed under the Apache License, Version 2.0 (the "License"); # you ma...
e14a53e0a3942ab021977301a5e08a016a2218cf
adminrestrict/signals.py
adminrestrict/signals.py
""" adminrestrict signals """ __author__ = "Robert Romano" __copyright__ = "Copyright 2020 Robert C. Romano" from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from adminrestrict.models import AllowedIP from adminrestrict.middleware import AdminPagesRestrictMiddleware @...
Add signal receivers for post-save and delete
Add signal receivers for post-save and delete
Python
mit
robromano/django-adminrestrict
Add signal receivers for post-save and delete
""" adminrestrict signals """ __author__ = "Robert Romano" __copyright__ = "Copyright 2020 Robert C. Romano" from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from adminrestrict.models import AllowedIP from adminrestrict.middleware import AdminPagesRestrictMiddleware @...
<commit_before><commit_msg>Add signal receivers for post-save and delete<commit_after>
""" adminrestrict signals """ __author__ = "Robert Romano" __copyright__ = "Copyright 2020 Robert C. Romano" from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from adminrestrict.models import AllowedIP from adminrestrict.middleware import AdminPagesRestrictMiddleware @...
Add signal receivers for post-save and delete""" adminrestrict signals """ __author__ = "Robert Romano" __copyright__ = "Copyright 2020 Robert C. Romano" from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from adminrestrict.models import AllowedIP from adminrestrict.midd...
<commit_before><commit_msg>Add signal receivers for post-save and delete<commit_after>""" adminrestrict signals """ __author__ = "Robert Romano" __copyright__ = "Copyright 2020 Robert C. Romano" from django.db.models.signals import post_save, post_delete from django.dispatch import receiver from adminrestrict.models...
22156f488fba737a230eae876817afb497347c4c
bamova/predict_loci.py
bamova/predict_loci.py
import sys import numpy as np def predict_loci(phi_values, cutoff_percent): average_phi_values = np.mean(axis=1) sortable = [] for loci, phi in enumerate(average_phi_values) sortable.append((phi, loci)) sortable.sort() sortable.reverse() cutoff_idx = int(len(sortable) * cutoff_percent) return sortable[:cu...
Add script for predicing loci from bamova
Add script for predicing loci from bamova
Python
apache-2.0
rnowling/pop-gen-models
Add script for predicing loci from bamova
import sys import numpy as np def predict_loci(phi_values, cutoff_percent): average_phi_values = np.mean(axis=1) sortable = [] for loci, phi in enumerate(average_phi_values) sortable.append((phi, loci)) sortable.sort() sortable.reverse() cutoff_idx = int(len(sortable) * cutoff_percent) return sortable[:cu...
<commit_before><commit_msg>Add script for predicing loci from bamova<commit_after>
import sys import numpy as np def predict_loci(phi_values, cutoff_percent): average_phi_values = np.mean(axis=1) sortable = [] for loci, phi in enumerate(average_phi_values) sortable.append((phi, loci)) sortable.sort() sortable.reverse() cutoff_idx = int(len(sortable) * cutoff_percent) return sortable[:cu...
Add script for predicing loci from bamovaimport sys import numpy as np def predict_loci(phi_values, cutoff_percent): average_phi_values = np.mean(axis=1) sortable = [] for loci, phi in enumerate(average_phi_values) sortable.append((phi, loci)) sortable.sort() sortable.reverse() cutoff_idx = int(len(sortable...
<commit_before><commit_msg>Add script for predicing loci from bamova<commit_after>import sys import numpy as np def predict_loci(phi_values, cutoff_percent): average_phi_values = np.mean(axis=1) sortable = [] for loci, phi in enumerate(average_phi_values) sortable.append((phi, loci)) sortable.sort() sortable....
2d421abd4987ec9d0d4c5e55805aab2d7fc84359
packages/adminrouter/extra/src/test-harness/tests/test_metrics.py
packages/adminrouter/extra/src/test-harness/tests/test_metrics.py
import requests import urllib.parse class TestMetrics: def test_metrics_html(self, master_ar_process_pertest, valid_user_header): """ /nginx/status returns metrics in HTML format """ url = master_ar_process_pertest.make_url_from_path('/nginx/status') resp = requests.get( ...
Add some tests for metrics
Add some tests for metrics
Python
apache-2.0
dcos/dcos,mesosphere-mergebot/dcos,mesosphere-mergebot/dcos,mesosphere-mergebot/mergebot-test-dcos,mesosphere-mergebot/dcos,mesosphere-mergebot/dcos,dcos/dcos,GoelDeepak/dcos,mesosphere-mergebot/mergebot-test-dcos,dcos/dcos,kensipe/dcos,kensipe/dcos,kensipe/dcos,GoelDeepak/dcos,GoelDeepak/dcos,dcos/dcos,dcos/dcos,kensi...
Add some tests for metrics
import requests import urllib.parse class TestMetrics: def test_metrics_html(self, master_ar_process_pertest, valid_user_header): """ /nginx/status returns metrics in HTML format """ url = master_ar_process_pertest.make_url_from_path('/nginx/status') resp = requests.get( ...
<commit_before><commit_msg>Add some tests for metrics<commit_after>
import requests import urllib.parse class TestMetrics: def test_metrics_html(self, master_ar_process_pertest, valid_user_header): """ /nginx/status returns metrics in HTML format """ url = master_ar_process_pertest.make_url_from_path('/nginx/status') resp = requests.get( ...
Add some tests for metricsimport requests import urllib.parse class TestMetrics: def test_metrics_html(self, master_ar_process_pertest, valid_user_header): """ /nginx/status returns metrics in HTML format """ url = master_ar_process_pertest.make_url_from_path('/nginx/status') ...
<commit_before><commit_msg>Add some tests for metrics<commit_after>import requests import urllib.parse class TestMetrics: def test_metrics_html(self, master_ar_process_pertest, valid_user_header): """ /nginx/status returns metrics in HTML format """ url = master_ar_process_pertest....
df43706b287dd7559bf5abc249cc83028f3ba6b1
paramsweep.py
paramsweep.py
#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import numpy as np from subprocess import call import os import pandas as pd import argparse def read_force_coeffs(): """Read force coefficients from `postProcessing/actuatorLines`.""" df = pd.read_csv("postProcessing/actuator...
Add script for running parameter sweep
Add script for running parameter sweep
Python
mit
petebachant/actuatorLine-2D-turbinesFoam,petebachant/actuatorLine-2D-turbinesFoam,petebachant/actuatorLine-2D-turbinesFoam
Add script for running parameter sweep
#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import numpy as np from subprocess import call import os import pandas as pd import argparse def read_force_coeffs(): """Read force coefficients from `postProcessing/actuatorLines`.""" df = pd.read_csv("postProcessing/actuator...
<commit_before><commit_msg>Add script for running parameter sweep<commit_after>
#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import numpy as np from subprocess import call import os import pandas as pd import argparse def read_force_coeffs(): """Read force coefficients from `postProcessing/actuatorLines`.""" df = pd.read_csv("postProcessing/actuator...
Add script for running parameter sweep#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import numpy as np from subprocess import call import os import pandas as pd import argparse def read_force_coeffs(): """Read force coefficients from `postProcessing/actuatorLines`.""" df ...
<commit_before><commit_msg>Add script for running parameter sweep<commit_after>#!/usr/bin/env python """ Run multiple simulations varying a single parameter. """ import numpy as np from subprocess import call import os import pandas as pd import argparse def read_force_coeffs(): """Read force coefficients from `...
a8736df223cefbccd97d392b011fbb511c190569
tests/test_create_elb.py
tests/test_create_elb.py
"""Test ELB creation functions.""" from foremast.elb.create_elb import SpinnakerELB def test_splay(): """Splay should split Health Checks properly.""" health = SpinnakerELB.splay_health('HTTP:80/test') assert health.path == '/test' assert health.port == '80' assert health.proto == 'HTTP' asser...
Verify Health Check splaying works
tests: Verify Health Check splaying works See also: PSOBAT-1399
Python
apache-2.0
gogoair/foremast,gogoair/foremast
tests: Verify Health Check splaying works See also: PSOBAT-1399
"""Test ELB creation functions.""" from foremast.elb.create_elb import SpinnakerELB def test_splay(): """Splay should split Health Checks properly.""" health = SpinnakerELB.splay_health('HTTP:80/test') assert health.path == '/test' assert health.port == '80' assert health.proto == 'HTTP' asser...
<commit_before><commit_msg>tests: Verify Health Check splaying works See also: PSOBAT-1399<commit_after>
"""Test ELB creation functions.""" from foremast.elb.create_elb import SpinnakerELB def test_splay(): """Splay should split Health Checks properly.""" health = SpinnakerELB.splay_health('HTTP:80/test') assert health.path == '/test' assert health.port == '80' assert health.proto == 'HTTP' asser...
tests: Verify Health Check splaying works See also: PSOBAT-1399"""Test ELB creation functions.""" from foremast.elb.create_elb import SpinnakerELB def test_splay(): """Splay should split Health Checks properly.""" health = SpinnakerELB.splay_health('HTTP:80/test') assert health.path == '/test' assert...
<commit_before><commit_msg>tests: Verify Health Check splaying works See also: PSOBAT-1399<commit_after>"""Test ELB creation functions.""" from foremast.elb.create_elb import SpinnakerELB def test_splay(): """Splay should split Health Checks properly.""" health = SpinnakerELB.splay_health('HTTP:80/test') ...
0e4a97d5bc3e13e2249437c9216b1eae111a480e
django_images/migrations/0002_auto_20180826_0814.py
django_images/migrations/0002_auto_20180826_0814.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import core.utils class Migration(migrations.Migration): dependencies = [ ('django_images', '0001_initial'), ] operations = [ migrations.AlterField( model_name='image', ...
Add migration file for lastest version of django_images
Fix: Add migration file for lastest version of django_images
Python
bsd-2-clause
pinry/pinry,pinry/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry,pinry/pinry,lapo-luchini/pinry,lapo-luchini/pinry
Fix: Add migration file for lastest version of django_images
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import core.utils class Migration(migrations.Migration): dependencies = [ ('django_images', '0001_initial'), ] operations = [ migrations.AlterField( model_name='image', ...
<commit_before><commit_msg>Fix: Add migration file for lastest version of django_images<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import core.utils class Migration(migrations.Migration): dependencies = [ ('django_images', '0001_initial'), ] operations = [ migrations.AlterField( model_name='image', ...
Fix: Add migration file for lastest version of django_images# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import core.utils class Migration(migrations.Migration): dependencies = [ ('django_images', '0001_initial'), ] operations = [ ...
<commit_before><commit_msg>Fix: Add migration file for lastest version of django_images<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import core.utils class Migration(migrations.Migration): dependencies = [ ('django_images', '0001_...
86b8ca811f4d582e7820b16e689fd8c28eac656f
djconnectwise/migrations/0040_auto_20170926_2145.py
djconnectwise/migrations/0040_auto_20170926_2145.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0039_auto_20170925_1418'), ] operations = [ migrations.AlterModelOptions( name='opportunity', ...
Change minor meta options on models
Change minor meta options on models
Python
mit
KerkhoffTechnologies/django-connectwise,KerkhoffTechnologies/django-connectwise
Change minor meta options on models
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0039_auto_20170925_1418'), ] operations = [ migrations.AlterModelOptions( name='opportunity', ...
<commit_before><commit_msg>Change minor meta options on models<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0039_auto_20170925_1418'), ] operations = [ migrations.AlterModelOptions( name='opportunity', ...
Change minor meta options on models# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0039_auto_20170925_1418'), ] operations = [ migrations.AlterModelOptions...
<commit_before><commit_msg>Change minor meta options on models<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('djconnectwise', '0039_auto_20170925_1418'), ] operations...
5f5f26a9d31c5c647d69e0400e381abd0ec103b0
lwr/managers/util/env.py
lwr/managers/util/env.py
RAW_VALUE_BY_DEFAULT = False def env_to_statement(env): ''' Return the abstraction description of an environment variable definition into a statement for shell script. >>> env_to_statement(dict(name='X', value='Y')) 'X="Y"; export X' >>> env_to_statement(dict(name='X', value='Y', raw=True)) ...
Add missing file from previous commit (thanks Izzet Fatih).
Add missing file from previous commit (thanks Izzet Fatih).
Python
apache-2.0
jmchilton/pulsar,ssorgatem/pulsar,ssorgatem/pulsar,natefoo/pulsar,jmchilton/pulsar,galaxyproject/pulsar,jmchilton/lwr,natefoo/pulsar,jmchilton/lwr,galaxyproject/pulsar
Add missing file from previous commit (thanks Izzet Fatih).
RAW_VALUE_BY_DEFAULT = False def env_to_statement(env): ''' Return the abstraction description of an environment variable definition into a statement for shell script. >>> env_to_statement(dict(name='X', value='Y')) 'X="Y"; export X' >>> env_to_statement(dict(name='X', value='Y', raw=True)) ...
<commit_before><commit_msg>Add missing file from previous commit (thanks Izzet Fatih).<commit_after>
RAW_VALUE_BY_DEFAULT = False def env_to_statement(env): ''' Return the abstraction description of an environment variable definition into a statement for shell script. >>> env_to_statement(dict(name='X', value='Y')) 'X="Y"; export X' >>> env_to_statement(dict(name='X', value='Y', raw=True)) ...
Add missing file from previous commit (thanks Izzet Fatih). RAW_VALUE_BY_DEFAULT = False def env_to_statement(env): ''' Return the abstraction description of an environment variable definition into a statement for shell script. >>> env_to_statement(dict(name='X', value='Y')) 'X="Y"; export X' >>>...
<commit_before><commit_msg>Add missing file from previous commit (thanks Izzet Fatih).<commit_after> RAW_VALUE_BY_DEFAULT = False def env_to_statement(env): ''' Return the abstraction description of an environment variable definition into a statement for shell script. >>> env_to_statement(dict(name='X', ...
0ed4c7a502db204a6503dfa43e384d58632f44ab
biobox_cli/biobox_file.py
biobox_cli/biobox_file.py
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
Fix type in creation of fasta_dir biobox entry
Fix type in creation of fasta_dir biobox entry
Python
mit
michaelbarton/command-line-interface,bioboxes/command-line-interface,michaelbarton/command-line-interface,bioboxes/command-line-interface
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
<commit_before>import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): return files_va...
<commit_before>import os import yaml def generate(args): output = {"version" : "0.9.0", "arguments" : args} return yaml.safe_dump(output, default_flow_style = False) def parse(dir_): with open(os.path.join(dir_, 'biobox.yaml'), 'r') as f: return yaml.load(f.read()) def fastq_arguments(args): ...
503944776a5cf0a97355989b255c7beb1e7ce059
kaggle/titanic/categorical_and_scaler_prediction.py
kaggle/titanic/categorical_and_scaler_prediction.py
import pandas def main(): train_all = pandas.DataFrame.from_csv('train.csv') train = train_all[['Survived', 'Sex', 'Fare']] print(train) if __name__ == '__main__': main()
Read in train data to dataframe
Read in train data to dataframe
Python
mit
noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit,noelevans/sandpit
Read in train data to dataframe
import pandas def main(): train_all = pandas.DataFrame.from_csv('train.csv') train = train_all[['Survived', 'Sex', 'Fare']] print(train) if __name__ == '__main__': main()
<commit_before><commit_msg>Read in train data to dataframe<commit_after>
import pandas def main(): train_all = pandas.DataFrame.from_csv('train.csv') train = train_all[['Survived', 'Sex', 'Fare']] print(train) if __name__ == '__main__': main()
Read in train data to dataframeimport pandas def main(): train_all = pandas.DataFrame.from_csv('train.csv') train = train_all[['Survived', 'Sex', 'Fare']] print(train) if __name__ == '__main__': main()
<commit_before><commit_msg>Read in train data to dataframe<commit_after>import pandas def main(): train_all = pandas.DataFrame.from_csv('train.csv') train = train_all[['Survived', 'Sex', 'Fare']] print(train) if __name__ == '__main__': main()
81db70aaab1dc2cd481dd2b5a616fdc251ca21d5
src/member/migrations/0033_auto_20170801_1607.py
src/member/migrations/0033_auto_20170801_1607.py
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 20:07 from __future__ import unicode_literals import annoying.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('member', '0032_relationship'), ] operations = [ migr...
Add the missing migration in the members app.
Add the missing migration in the members app. Ref: issue #791
Python
agpl-3.0
savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast,savoirfairelinux/santropol-feast,savoirfairelinux/sous-chef,savoirfairelinux/sous-chef,savoirfairelinux/santropol-feast
Add the missing migration in the members app. Ref: issue #791
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 20:07 from __future__ import unicode_literals import annoying.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('member', '0032_relationship'), ] operations = [ migr...
<commit_before><commit_msg>Add the missing migration in the members app. Ref: issue #791<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 20:07 from __future__ import unicode_literals import annoying.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('member', '0032_relationship'), ] operations = [ migr...
Add the missing migration in the members app. Ref: issue #791# -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 20:07 from __future__ import unicode_literals import annoying.fields from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('member'...
<commit_before><commit_msg>Add the missing migration in the members app. Ref: issue #791<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.11.3 on 2017-08-01 20:07 from __future__ import unicode_literals import annoying.fields from django.db import migrations, models class Migration(migrations.Migration)...
12939515450702b511ee01c4806f6c97a4c5ae9b
orchard/bot_changelog.py
orchard/bot_changelog.py
"""Command to get the bot's changelog by running git log on the current working directory.""" import asyncio from asyncio.subprocess import PIPE from plumeria.command import commands from plumeria.perms import owners_only async def get_git_log(): proc = await asyncio.create_subprocess_exec('git', 'log', '--onel...
Add changelog plugin and command.
Add changelog plugin and command.
Python
mit
sk89q/Plumeria,sk89q/Plumeria,sk89q/Plumeria
Add changelog plugin and command.
"""Command to get the bot's changelog by running git log on the current working directory.""" import asyncio from asyncio.subprocess import PIPE from plumeria.command import commands from plumeria.perms import owners_only async def get_git_log(): proc = await asyncio.create_subprocess_exec('git', 'log', '--onel...
<commit_before><commit_msg>Add changelog plugin and command.<commit_after>
"""Command to get the bot's changelog by running git log on the current working directory.""" import asyncio from asyncio.subprocess import PIPE from plumeria.command import commands from plumeria.perms import owners_only async def get_git_log(): proc = await asyncio.create_subprocess_exec('git', 'log', '--onel...
Add changelog plugin and command."""Command to get the bot's changelog by running git log on the current working directory.""" import asyncio from asyncio.subprocess import PIPE from plumeria.command import commands from plumeria.perms import owners_only async def get_git_log(): proc = await asyncio.create_subp...
<commit_before><commit_msg>Add changelog plugin and command.<commit_after>"""Command to get the bot's changelog by running git log on the current working directory.""" import asyncio from asyncio.subprocess import PIPE from plumeria.command import commands from plumeria.perms import owners_only async def get_git_lo...
63eec63e79b9eb21d4f2c23d683c85212beb49f0
usr/examples/04-Image-Filters/kernel_filters.py
usr/examples/04-Image-Filters/kernel_filters.py
# Kernel Filtering Example # # This example shows off how to use a generic kernel filter. import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.RGB565 sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(time = 2000) ...
Add in a demo for embossing.
Add in a demo for embossing.
Python
mit
iabdalkader/openmv,iabdalkader/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv,openmv/openmv,openmv/openmv,kwagyeman/openmv,kwagyeman/openmv,openmv/openmv,iabdalkader/openmv,kwagyeman/openmv
Add in a demo for embossing.
# Kernel Filtering Example # # This example shows off how to use a generic kernel filter. import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.RGB565 sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(time = 2000) ...
<commit_before><commit_msg>Add in a demo for embossing.<commit_after>
# Kernel Filtering Example # # This example shows off how to use a generic kernel filter. import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.RGB565 sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sensor.skip_frames(time = 2000) ...
Add in a demo for embossing.# Kernel Filtering Example # # This example shows off how to use a generic kernel filter. import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.RGB565 sensor.set_framesize(sensor.QVGA) # or sensor.QQVGA (or others) sens...
<commit_before><commit_msg>Add in a demo for embossing.<commit_after># Kernel Filtering Example # # This example shows off how to use a generic kernel filter. import sensor, image, time sensor.reset() # Initialize the camera sensor. sensor.set_pixformat(sensor.GRAYSCALE) # or sensor.RGB565 sensor.set_framesize(sensor...
3a2bac74716b6e15ee04322839f342a4609356f0
enthought/pyface/ipython_widget.py
enthought/pyface/ipython_widget.py
#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
Add an ipython pyface widget.
Add an ipython pyface widget.
Python
bsd-3-clause
brett-patterson/pyface,geggo/pyface,geggo/pyface,enthought/traitsgui,pankajp/pyface
Add an ipython pyface widget.
#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
<commit_before><commit_msg>Add an ipython pyface widget.<commit_after>
#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # under the conditions describe...
Add an ipython pyface widget.#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LICENSE.txt and may be redistributed only # ...
<commit_before><commit_msg>Add an ipython pyface widget.<commit_after>#------------------------------------------------------------------------------ # Copyright (c) 2008, Enthought, Inc. # All rights reserved. # # This software is provided without warranty under the terms of the BSD # license included in enthought/LIC...
59200b241ed46f2427e0f10ff3f57fed4f919d02
migrations/versions/0328_international_letters_perm.py
migrations/versions/0328_international_letters_perm.py
""" Revision ID: 0328_international_letters_perm Revises: 0327_idx_notification_history Create Date: 2020-08-10 14:12:02.870838 """ from alembic import op from sqlalchemy import text revision = '0328_international_letters_perm' down_revision = '0327_idx_notification_history' def upgrade(): sql = """ SE...
Add international_letters service permission for all services.
Add international_letters service permission for all services.
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add international_letters service permission for all services.
""" Revision ID: 0328_international_letters_perm Revises: 0327_idx_notification_history Create Date: 2020-08-10 14:12:02.870838 """ from alembic import op from sqlalchemy import text revision = '0328_international_letters_perm' down_revision = '0327_idx_notification_history' def upgrade(): sql = """ SE...
<commit_before><commit_msg>Add international_letters service permission for all services.<commit_after>
""" Revision ID: 0328_international_letters_perm Revises: 0327_idx_notification_history Create Date: 2020-08-10 14:12:02.870838 """ from alembic import op from sqlalchemy import text revision = '0328_international_letters_perm' down_revision = '0327_idx_notification_history' def upgrade(): sql = """ SE...
Add international_letters service permission for all services.""" Revision ID: 0328_international_letters_perm Revises: 0327_idx_notification_history Create Date: 2020-08-10 14:12:02.870838 """ from alembic import op from sqlalchemy import text revision = '0328_international_letters_perm' down_revision = '0327_idx_n...
<commit_before><commit_msg>Add international_letters service permission for all services.<commit_after>""" Revision ID: 0328_international_letters_perm Revises: 0327_idx_notification_history Create Date: 2020-08-10 14:12:02.870838 """ from alembic import op from sqlalchemy import text revision = '0328_international_...
de438b1548fcfd995a65fd5937de5b86dccc5eff
tools/del_stage.py
tools/del_stage.py
import argparse import os import sys import sqlitedict def main(): parser = argparse.ArgumentParser() parser.add_argument("--state", help="file to read/write action state" " information into/from (default=%(default)s)", default=os.p...
Add tool to drop a specific stage (for rerunning)
Add tool to drop a specific stage (for rerunning)
Python
apache-2.0
harlowja/multi-devstack,harlowja/multi-devstack
Add tool to drop a specific stage (for rerunning)
import argparse import os import sys import sqlitedict def main(): parser = argparse.ArgumentParser() parser.add_argument("--state", help="file to read/write action state" " information into/from (default=%(default)s)", default=os.p...
<commit_before><commit_msg>Add tool to drop a specific stage (for rerunning)<commit_after>
import argparse import os import sys import sqlitedict def main(): parser = argparse.ArgumentParser() parser.add_argument("--state", help="file to read/write action state" " information into/from (default=%(default)s)", default=os.p...
Add tool to drop a specific stage (for rerunning)import argparse import os import sys import sqlitedict def main(): parser = argparse.ArgumentParser() parser.add_argument("--state", help="file to read/write action state" " information into/from (default=%(...
<commit_before><commit_msg>Add tool to drop a specific stage (for rerunning)<commit_after>import argparse import os import sys import sqlitedict def main(): parser = argparse.ArgumentParser() parser.add_argument("--state", help="file to read/write action state" ...
32995e41cf8e465cf7c2e6ec2ec7c17c36b6d031
letsmeet/events/migrations/0010_event_max_attendees.py
letsmeet/events/migrations/0010_event_max_attendees.py
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-18 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0009_auto_20160107_2144'), ] operations = [ migrations.AddField( ...
Add migration for new model field.
Add migration for new model field.
Python
mit
letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click,letsmeet-click/letsmeet.click
Add migration for new model field.
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-18 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0009_auto_20160107_2144'), ] operations = [ migrations.AddField( ...
<commit_before><commit_msg>Add migration for new model field.<commit_after>
# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-18 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0009_auto_20160107_2144'), ] operations = [ migrations.AddField( ...
Add migration for new model field.# -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-18 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0009_auto_20160107_2144'), ] operations = [...
<commit_before><commit_msg>Add migration for new model field.<commit_after># -*- coding: utf-8 -*- # Generated by Django 1.9 on 2016-03-18 21:40 from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('events', '0009_auto_2...
3460a627b535a55eedefb7ec5a37fe068f3d7abd
tests/fixtures/postgres.py
tests/fixtures/postgres.py
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.models import Base @pytest.fixture(scope="function") async def engine(): engine = create_async_en...
Add fixtures for connecting to Postgres test database
Add fixtures for connecting to Postgres test database
Python
mit
igboyes/virtool,igboyes/virtool,virtool/virtool,virtool/virtool
Add fixtures for connecting to Postgres test database
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.models import Base @pytest.fixture(scope="function") async def engine(): engine = create_async_en...
<commit_before><commit_msg>Add fixtures for connecting to Postgres test database<commit_after>
import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.models import Base @pytest.fixture(scope="function") async def engine(): engine = create_async_en...
Add fixtures for connecting to Postgres test databaseimport pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.models import Base @pytest.fixture(scope="functi...
<commit_before><commit_msg>Add fixtures for connecting to Postgres test database<commit_after>import pytest from sqlalchemy import text from sqlalchemy.exc import ProgrammingError from sqlalchemy.ext.asyncio import AsyncEngine, create_async_engine from sqlalchemy.ext.asyncio import AsyncSession from virtool.models im...
8d7b83f93818779225681746cf06f6f1b0164330
raiden/tests/unit/transfer/test_state_diff.py
raiden/tests/unit/transfer/test_state_diff.py
import random from copy import deepcopy from raiden.transfer.state import ( ChainState, NettingChannelEndState, NettingChannelState, PaymentNetworkState, TokenNetworkState, TransactionExecutionStatus, ) from raiden.transfer.views import detect_balance_proof_change def test_detect_balance_proo...
Add unit test for state diff method
Add unit test for state diff method
Python
mit
hackaugusto/raiden,hackaugusto/raiden
Add unit test for state diff method
import random from copy import deepcopy from raiden.transfer.state import ( ChainState, NettingChannelEndState, NettingChannelState, PaymentNetworkState, TokenNetworkState, TransactionExecutionStatus, ) from raiden.transfer.views import detect_balance_proof_change def test_detect_balance_proo...
<commit_before><commit_msg>Add unit test for state diff method<commit_after>
import random from copy import deepcopy from raiden.transfer.state import ( ChainState, NettingChannelEndState, NettingChannelState, PaymentNetworkState, TokenNetworkState, TransactionExecutionStatus, ) from raiden.transfer.views import detect_balance_proof_change def test_detect_balance_proo...
Add unit test for state diff methodimport random from copy import deepcopy from raiden.transfer.state import ( ChainState, NettingChannelEndState, NettingChannelState, PaymentNetworkState, TokenNetworkState, TransactionExecutionStatus, ) from raiden.transfer.views import detect_balance_proof_ch...
<commit_before><commit_msg>Add unit test for state diff method<commit_after>import random from copy import deepcopy from raiden.transfer.state import ( ChainState, NettingChannelEndState, NettingChannelState, PaymentNetworkState, TokenNetworkState, TransactionExecutionStatus, ) from raiden.tran...
1cdb85e1b9ae941602731c7799a60282d6e44e97
tools/analyze_pipestats.py
tools/analyze_pipestats.py
#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
Add script to visualize pipestats.
Add script to visualize pipestats. Bug: 78765090 Change-Id: If95a59a7020a835968aa9fdf1660b97b4ed6bb4e
Python
apache-2.0
google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto,google/perfetto
Add script to visualize pipestats. Bug: 78765090 Change-Id: If95a59a7020a835968aa9fdf1660b97b4ed6bb4e
#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
<commit_before><commit_msg>Add script to visualize pipestats. Bug: 78765090 Change-Id: If95a59a7020a835968aa9fdf1660b97b4ed6bb4e<commit_after>
#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required...
Add script to visualize pipestats. Bug: 78765090 Change-Id: If95a59a7020a835968aa9fdf1660b97b4ed6bb4e#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may o...
<commit_before><commit_msg>Add script to visualize pipestats. Bug: 78765090 Change-Id: If95a59a7020a835968aa9fdf1660b97b4ed6bb4e<commit_after>#!/usr/bin/python # Copyright (C) 2018 The Android Open Source Project # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in...
dda447ce46e5140a8cf39d2615424a9c5655f798
senlin/tests/tempest/api/profiles/test_profile_list.py
senlin/tests/tempest/api/profiles/test_profile_list.py
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile list
Add API test for profile list Add API test for profile list Change-Id: Ia317e86f253d84e3e00c68c5e9db6afbed6cf604
Python
apache-2.0
openstack/senlin,openstack/senlin,stackforge/senlin,stackforge/senlin,openstack/senlin
Add API test for profile list Add API test for profile list Change-Id: Ia317e86f253d84e3e00c68c5e9db6afbed6cf604
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
<commit_before><commit_msg>Add API test for profile list Add API test for profile list Change-Id: Ia317e86f253d84e3e00c68c5e9db6afbed6cf604<commit_after>
# Licensed under the Apache License, Version 2.0 (the "License"); you may # not use this file except in compliance with the License. You may obtain # a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under t...
Add API test for profile list Add API test for profile list Change-Id: Ia317e86f253d84e3e00c68c5e9db6afbed6cf604# 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/...
<commit_before><commit_msg>Add API test for profile list Add API test for profile list Change-Id: Ia317e86f253d84e3e00c68c5e9db6afbed6cf604<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 L...
1f31e28ec1abb40dc25a8ff0c7e872d404483881
app/ashlar/migrations/0002_auto_20150421_1724.py
app/ashlar/migrations/0002_auto_20150421_1724.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ashlar.models import RecordSchema, Record, ItemSchema class Migration(migrations.Migration): dependencies = [ ('ashlar', '0001_initial'), ] create_gin_index_sql = 'CREATE INDEX {index_n...
Add GIN index to JSONB fields via migration
Add GIN index to JSONB fields via migration
Python
mit
flibbertigibbet/ashlar,flibbertigibbet/ashlar,azavea/ashlar,azavea/ashlar
Add GIN index to JSONB fields via migration
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ashlar.models import RecordSchema, Record, ItemSchema class Migration(migrations.Migration): dependencies = [ ('ashlar', '0001_initial'), ] create_gin_index_sql = 'CREATE INDEX {index_n...
<commit_before><commit_msg>Add GIN index to JSONB fields via migration<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ashlar.models import RecordSchema, Record, ItemSchema class Migration(migrations.Migration): dependencies = [ ('ashlar', '0001_initial'), ] create_gin_index_sql = 'CREATE INDEX {index_n...
Add GIN index to JSONB fields via migration# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ashlar.models import RecordSchema, Record, ItemSchema class Migration(migrations.Migration): dependencies = [ ('ashlar', '0001_initial'), ] cr...
<commit_before><commit_msg>Add GIN index to JSONB fields via migration<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import models, migrations from ashlar.models import RecordSchema, Record, ItemSchema class Migration(migrations.Migration): dependencies = [ ...
211c1e11e73e9ca8dfd485098f18a68b52869308
CalendarApi.py
CalendarApi.py
from apiclient.discovery import build from httplib2 import Http from oauth2client import file,client,tools try: import argparse flags=argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags=none def create_remainder(name,date): #REFERENCE:https://developers.google.com/google-app...
Create event in google calendar
Create event in google calendar
Python
mit
Ajithkumarsekar/KCT-Academic-calendar-Converter
Create event in google calendar
from apiclient.discovery import build from httplib2 import Http from oauth2client import file,client,tools try: import argparse flags=argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags=none def create_remainder(name,date): #REFERENCE:https://developers.google.com/google-app...
<commit_before><commit_msg>Create event in google calendar<commit_after>
from apiclient.discovery import build from httplib2 import Http from oauth2client import file,client,tools try: import argparse flags=argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags=none def create_remainder(name,date): #REFERENCE:https://developers.google.com/google-app...
Create event in google calendarfrom apiclient.discovery import build from httplib2 import Http from oauth2client import file,client,tools try: import argparse flags=argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags=none def create_remainder(name,date): #REFERENCE:https://d...
<commit_before><commit_msg>Create event in google calendar<commit_after>from apiclient.discovery import build from httplib2 import Http from oauth2client import file,client,tools try: import argparse flags=argparse.ArgumentParser(parents=[tools.argparser]).parse_args() except ImportError: flags=none def create_rema...
48bd26f2ec9cfb512aad55fb3f11ed7b7713b0dd
self_convert_tf_to_csv.py
self_convert_tf_to_csv.py
from subprocess import check_output import tensorflow as tf import csv VIDEO_LEVEL_DATA_FODLER = "/Users/Sophie/Documents/youtube-8m-data/train/" CSV_FILE_PATH = 'train.csv' with open(CSV_FILE_PATH, 'w') as f: fieldnames = ['video_id', 'mean_rgb', 'mean_audio', 'labels'] csv_writer = csv.DictWriter(f, fieldna...
Convert tfrecords to csv to be used in Spark.
Convert tfrecords to csv to be used in Spark.
Python
apache-2.0
lidalei/youtube-8m
Convert tfrecords to csv to be used in Spark.
from subprocess import check_output import tensorflow as tf import csv VIDEO_LEVEL_DATA_FODLER = "/Users/Sophie/Documents/youtube-8m-data/train/" CSV_FILE_PATH = 'train.csv' with open(CSV_FILE_PATH, 'w') as f: fieldnames = ['video_id', 'mean_rgb', 'mean_audio', 'labels'] csv_writer = csv.DictWriter(f, fieldna...
<commit_before><commit_msg>Convert tfrecords to csv to be used in Spark.<commit_after>
from subprocess import check_output import tensorflow as tf import csv VIDEO_LEVEL_DATA_FODLER = "/Users/Sophie/Documents/youtube-8m-data/train/" CSV_FILE_PATH = 'train.csv' with open(CSV_FILE_PATH, 'w') as f: fieldnames = ['video_id', 'mean_rgb', 'mean_audio', 'labels'] csv_writer = csv.DictWriter(f, fieldna...
Convert tfrecords to csv to be used in Spark.from subprocess import check_output import tensorflow as tf import csv VIDEO_LEVEL_DATA_FODLER = "/Users/Sophie/Documents/youtube-8m-data/train/" CSV_FILE_PATH = 'train.csv' with open(CSV_FILE_PATH, 'w') as f: fieldnames = ['video_id', 'mean_rgb', 'mean_audio', 'labels...
<commit_before><commit_msg>Convert tfrecords to csv to be used in Spark.<commit_after>from subprocess import check_output import tensorflow as tf import csv VIDEO_LEVEL_DATA_FODLER = "/Users/Sophie/Documents/youtube-8m-data/train/" CSV_FILE_PATH = 'train.csv' with open(CSV_FILE_PATH, 'w') as f: fieldnames = ['vid...
26574a6de1966bc0a0bb5d3625469c43ad83e1ff
redis-mass.py
redis-mass.py
#!/usr/bin/env python """ redis-mass.py ~~~~~~~~~~~~~ Prepares a newline-separated file of Redis commands for mass insertion. :copyright: (c) 2015 by Tim Simmons. :license: BSD, see LICENSE for more details. """ import sys def proto(line): result = "*%s\r\n$%s\r\n%s\r\n" % (str(len(line)), str...
Add Redis commands to Redis Mass Insertion script
Add Redis commands to Redis Mass Insertion script
Python
isc
Squab/redis-mass-insertion
Add Redis commands to Redis Mass Insertion script
#!/usr/bin/env python """ redis-mass.py ~~~~~~~~~~~~~ Prepares a newline-separated file of Redis commands for mass insertion. :copyright: (c) 2015 by Tim Simmons. :license: BSD, see LICENSE for more details. """ import sys def proto(line): result = "*%s\r\n$%s\r\n%s\r\n" % (str(len(line)), str...
<commit_before><commit_msg>Add Redis commands to Redis Mass Insertion script<commit_after>
#!/usr/bin/env python """ redis-mass.py ~~~~~~~~~~~~~ Prepares a newline-separated file of Redis commands for mass insertion. :copyright: (c) 2015 by Tim Simmons. :license: BSD, see LICENSE for more details. """ import sys def proto(line): result = "*%s\r\n$%s\r\n%s\r\n" % (str(len(line)), str...
Add Redis commands to Redis Mass Insertion script#!/usr/bin/env python """ redis-mass.py ~~~~~~~~~~~~~ Prepares a newline-separated file of Redis commands for mass insertion. :copyright: (c) 2015 by Tim Simmons. :license: BSD, see LICENSE for more details. """ import sys def proto(line): resul...
<commit_before><commit_msg>Add Redis commands to Redis Mass Insertion script<commit_after>#!/usr/bin/env python """ redis-mass.py ~~~~~~~~~~~~~ Prepares a newline-separated file of Redis commands for mass insertion. :copyright: (c) 2015 by Tim Simmons. :license: BSD, see LICENSE for more details. "...
fdab70f014e1afc3c387265689256bfce84437de
tests/functional_tests/test_errors/test_error_in_workflow.py
tests/functional_tests/test_errors/test_error_in_workflow.py
# -*- coding: utf-8 -*- from tests.functional_tests import FunctionalTestBase, isolate class TestErrorInWorkflow(FunctionalTestBase): @isolate def test_missing_primary_resource(self): """ Should fail if a primary resource is missing""" project = """file://B <- file://A echo A produces B ...
Test for missing primary input in the workflow
Test for missing primary input in the workflow
Python
mit
lexman/tuttle,lexman/tuttle,lexman/tuttle
Test for missing primary input in the workflow
# -*- coding: utf-8 -*- from tests.functional_tests import FunctionalTestBase, isolate class TestErrorInWorkflow(FunctionalTestBase): @isolate def test_missing_primary_resource(self): """ Should fail if a primary resource is missing""" project = """file://B <- file://A echo A produces B ...
<commit_before><commit_msg>Test for missing primary input in the workflow<commit_after>
# -*- coding: utf-8 -*- from tests.functional_tests import FunctionalTestBase, isolate class TestErrorInWorkflow(FunctionalTestBase): @isolate def test_missing_primary_resource(self): """ Should fail if a primary resource is missing""" project = """file://B <- file://A echo A produces B ...
Test for missing primary input in the workflow# -*- coding: utf-8 -*- from tests.functional_tests import FunctionalTestBase, isolate class TestErrorInWorkflow(FunctionalTestBase): @isolate def test_missing_primary_resource(self): """ Should fail if a primary resource is missing""" project = "...
<commit_before><commit_msg>Test for missing primary input in the workflow<commit_after># -*- coding: utf-8 -*- from tests.functional_tests import FunctionalTestBase, isolate class TestErrorInWorkflow(FunctionalTestBase): @isolate def test_missing_primary_resource(self): """ Should fail if a primary r...
8e2c8d669aa547cf8749fa774160f4d05fff121a
database/view-table.py
database/view-table.py
import os import sqlite3 import sys try: BASE_DIR = directory_name=sys.argv[1] except: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_location = os.path.join(BASE_DIR, 'opendc.db') conn = sqlite3.connect(db_location) c = conn.cursor() rows = c.execute('SELECT * FROM ' + sys.argv[2]) for row in row...
Add Python script to view a table in the db
Add Python script to view a table in the db
Python
mit
tudelft-atlarge/opendc,tudelft-atlarge/opendc
Add Python script to view a table in the db
import os import sqlite3 import sys try: BASE_DIR = directory_name=sys.argv[1] except: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_location = os.path.join(BASE_DIR, 'opendc.db') conn = sqlite3.connect(db_location) c = conn.cursor() rows = c.execute('SELECT * FROM ' + sys.argv[2]) for row in row...
<commit_before><commit_msg>Add Python script to view a table in the db<commit_after>
import os import sqlite3 import sys try: BASE_DIR = directory_name=sys.argv[1] except: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_location = os.path.join(BASE_DIR, 'opendc.db') conn = sqlite3.connect(db_location) c = conn.cursor() rows = c.execute('SELECT * FROM ' + sys.argv[2]) for row in row...
Add Python script to view a table in the dbimport os import sqlite3 import sys try: BASE_DIR = directory_name=sys.argv[1] except: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_location = os.path.join(BASE_DIR, 'opendc.db') conn = sqlite3.connect(db_location) c = conn.cursor() rows = c.execute('SEL...
<commit_before><commit_msg>Add Python script to view a table in the db<commit_after>import os import sqlite3 import sys try: BASE_DIR = directory_name=sys.argv[1] except: BASE_DIR = os.path.dirname(os.path.abspath(__file__)) db_location = os.path.join(BASE_DIR, 'opendc.db') conn = sqlite3.connect(db_location)...
c58366a84f8a26051ad92d2cfbdab3480d01ad65
elpiwear/tag_screen.py
elpiwear/tag_screen.py
import Image import ImageDraw import ImageFont import screen def draw_rotated_text(image, text, position, angle, font, fill=(255,255,255)): # Get rendered font width and height. draw = ImageDraw.Draw(image) width, height = draw.textsize(text, font=font) # Create a new image with transparent background ...
Add the tag screen to display my personal information
Add the tag screen to display my personal information
Python
mit
fjacob21/pycon2015
Add the tag screen to display my personal information
import Image import ImageDraw import ImageFont import screen def draw_rotated_text(image, text, position, angle, font, fill=(255,255,255)): # Get rendered font width and height. draw = ImageDraw.Draw(image) width, height = draw.textsize(text, font=font) # Create a new image with transparent background ...
<commit_before><commit_msg>Add the tag screen to display my personal information<commit_after>
import Image import ImageDraw import ImageFont import screen def draw_rotated_text(image, text, position, angle, font, fill=(255,255,255)): # Get rendered font width and height. draw = ImageDraw.Draw(image) width, height = draw.textsize(text, font=font) # Create a new image with transparent background ...
Add the tag screen to display my personal informationimport Image import ImageDraw import ImageFont import screen def draw_rotated_text(image, text, position, angle, font, fill=(255,255,255)): # Get rendered font width and height. draw = ImageDraw.Draw(image) width, height = draw.textsize(text, font=font) ...
<commit_before><commit_msg>Add the tag screen to display my personal information<commit_after>import Image import ImageDraw import ImageFont import screen def draw_rotated_text(image, text, position, angle, font, fill=(255,255,255)): # Get rendered font width and height. draw = ImageDraw.Draw(image) width,...
5121069e8a8d3047f2f8212bfc7058bf5c8731d3
tracpro/contacts/migrations/0012_auto_20170209_2022.py
tracpro/contacts/migrations/0012_auto_20170209_2022.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0011_uuid_is_unique_to_org'), ] operations = [ migrations.AlterField( model_name='datafield', ...
Add migration for previous commit
Add migration for previous commit
Python
bsd-3-clause
rapidpro/tracpro,rapidpro/tracpro,rapidpro/tracpro
Add migration for previous commit
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0011_uuid_is_unique_to_org'), ] operations = [ migrations.AlterField( model_name='datafield', ...
<commit_before><commit_msg>Add migration for previous commit<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0011_uuid_is_unique_to_org'), ] operations = [ migrations.AlterField( model_name='datafield', ...
Add migration for previous commit# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0011_uuid_is_unique_to_org'), ] operations = [ migrations.AlterField( ...
<commit_before><commit_msg>Add migration for previous commit<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models class Migration(migrations.Migration): dependencies = [ ('contacts', '0011_uuid_is_unique_to_org'), ] operations = [...
f6cba028766b1b12686c515c8ffa05ffb23992d4
opps/views/tests/test_generic_list.py
opps/views/tests/test_generic_list.py
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from django.utils import timezone from opps.articles.models import Post, Link from opps.channels.models import Channel class TestTemplateName(TestCase): def setUp(self): sel...
Write basic test on generic list views
Write basic test on generic list views
Python
mit
williamroot/opps,opps/opps,jeanmask/opps,opps/opps,williamroot/opps,jeanmask/opps,YACOWS/opps,opps/opps,YACOWS/opps,YACOWS/opps,YACOWS/opps,opps/opps,jeanmask/opps,williamroot/opps,williamroot/opps,jeanmask/opps
Write basic test on generic list views
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from django.utils import timezone from opps.articles.models import Post, Link from opps.channels.models import Channel class TestTemplateName(TestCase): def setUp(self): sel...
<commit_before><commit_msg>Write basic test on generic list views<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from django.utils import timezone from opps.articles.models import Post, Link from opps.channels.models import Channel class TestTemplateName(TestCase): def setUp(self): sel...
Write basic test on generic list views#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from django.utils import timezone from opps.articles.models import Post, Link from opps.channels.models import Channel class TestTemplateName(TestCa...
<commit_before><commit_msg>Write basic test on generic list views<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- from django.test import TestCase, Client from django.contrib.auth.models import User from django.utils import timezone from opps.articles.models import Post, Link from opps.channels.models impor...
06e3e6642cfae2d7b4616609cad1944797586263
dev_tools/src/d1_dev/update-requirements-txt.py
dev_tools/src/d1_dev/update-requirements-txt.py
#!/usr/bin/env python import shutil import d1_dev.util import os import pip._internal.utils.misc import re REQUIREMENTS_FILENAME = 'requirements.txt' # Modules in my dev environment that are not required by the stack MODULE_FILTER_REGEX_LIST = { 'beautifulsoup', 'black', 'bs4', 'dataone.*', 'e...
Add script that creates a filtered list of required packages
Add script that creates a filtered list of required packages
Python
apache-2.0
DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python
Add script that creates a filtered list of required packages
#!/usr/bin/env python import shutil import d1_dev.util import os import pip._internal.utils.misc import re REQUIREMENTS_FILENAME = 'requirements.txt' # Modules in my dev environment that are not required by the stack MODULE_FILTER_REGEX_LIST = { 'beautifulsoup', 'black', 'bs4', 'dataone.*', 'e...
<commit_before><commit_msg>Add script that creates a filtered list of required packages<commit_after>
#!/usr/bin/env python import shutil import d1_dev.util import os import pip._internal.utils.misc import re REQUIREMENTS_FILENAME = 'requirements.txt' # Modules in my dev environment that are not required by the stack MODULE_FILTER_REGEX_LIST = { 'beautifulsoup', 'black', 'bs4', 'dataone.*', 'e...
Add script that creates a filtered list of required packages#!/usr/bin/env python import shutil import d1_dev.util import os import pip._internal.utils.misc import re REQUIREMENTS_FILENAME = 'requirements.txt' # Modules in my dev environment that are not required by the stack MODULE_FILTER_REGEX_LIST = { 'bea...
<commit_before><commit_msg>Add script that creates a filtered list of required packages<commit_after>#!/usr/bin/env python import shutil import d1_dev.util import os import pip._internal.utils.misc import re REQUIREMENTS_FILENAME = 'requirements.txt' # Modules in my dev environment that are not required by the sta...
936cdf5d4115026a357ae4f8cd93479e98a46414
catkin/src/appctl/scripts/evdev_teleport_switcher.py
catkin/src/appctl/scripts/evdev_teleport_switcher.py
#!/usr/bin/env python """ This node listens for appctl/Mode changes and toggles an evdev_teleport receiver accordingly. """ import rospy from appctl.msg import Mode from std_msgs.msg import Bool class ModeHandler: def __init__(self, modes, activation_pub): self.modes = modes self.activation_pub ...
Add appctl/Mode to evdev_teleport receiver bridge
Add appctl/Mode to evdev_teleport receiver bridge
Python
apache-2.0
EndPointCorp/appctl,EndPointCorp/appctl
Add appctl/Mode to evdev_teleport receiver bridge
#!/usr/bin/env python """ This node listens for appctl/Mode changes and toggles an evdev_teleport receiver accordingly. """ import rospy from appctl.msg import Mode from std_msgs.msg import Bool class ModeHandler: def __init__(self, modes, activation_pub): self.modes = modes self.activation_pub ...
<commit_before><commit_msg>Add appctl/Mode to evdev_teleport receiver bridge<commit_after>
#!/usr/bin/env python """ This node listens for appctl/Mode changes and toggles an evdev_teleport receiver accordingly. """ import rospy from appctl.msg import Mode from std_msgs.msg import Bool class ModeHandler: def __init__(self, modes, activation_pub): self.modes = modes self.activation_pub ...
Add appctl/Mode to evdev_teleport receiver bridge#!/usr/bin/env python """ This node listens for appctl/Mode changes and toggles an evdev_teleport receiver accordingly. """ import rospy from appctl.msg import Mode from std_msgs.msg import Bool class ModeHandler: def __init__(self, modes, activation_pub): ...
<commit_before><commit_msg>Add appctl/Mode to evdev_teleport receiver bridge<commit_after>#!/usr/bin/env python """ This node listens for appctl/Mode changes and toggles an evdev_teleport receiver accordingly. """ import rospy from appctl.msg import Mode from std_msgs.msg import Bool class ModeHandler: def __in...
b4df967c39558dfc86e01aae9b84e3df25464d98
locationhash/tests/test_mongodb.py
locationhash/tests/test_mongodb.py
# encoding: utf-8 """ Copyright 2011 Elliot Murphy 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 ...
Write some locations to MongoDb
Write some locations to MongoDb
Python
apache-2.0
statik/locationhash,statik/locationhash
Write some locations to MongoDb
# encoding: utf-8 """ Copyright 2011 Elliot Murphy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable ...
<commit_before><commit_msg>Write some locations to MongoDb<commit_after>
# encoding: utf-8 """ Copyright 2011 Elliot Murphy 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 ...
Write some locations to MongoDb# encoding: utf-8 """ Copyright 2011 Elliot Murphy Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 ...
<commit_before><commit_msg>Write some locations to MongoDb<commit_after># encoding: utf-8 """ Copyright 2011 Elliot Murphy 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:/...
be4dcfab3c07e599539209ff2656c09d551dd0eb
CLI/str2hex.py
CLI/str2hex.py
#!/usr/bin/python import sys if len(sys.argv) < 2: print('Incorrect usage') exit(1) for char in sys.argv[1]: sys.stdout.write('\\x' + char.encode('hex'))
Add str to hex utility
Add str to hex utility
Python
mit
reykjalin/tools,reykjalin/tools
Add str to hex utility
#!/usr/bin/python import sys if len(sys.argv) < 2: print('Incorrect usage') exit(1) for char in sys.argv[1]: sys.stdout.write('\\x' + char.encode('hex'))
<commit_before><commit_msg>Add str to hex utility<commit_after>
#!/usr/bin/python import sys if len(sys.argv) < 2: print('Incorrect usage') exit(1) for char in sys.argv[1]: sys.stdout.write('\\x' + char.encode('hex'))
Add str to hex utility#!/usr/bin/python import sys if len(sys.argv) < 2: print('Incorrect usage') exit(1) for char in sys.argv[1]: sys.stdout.write('\\x' + char.encode('hex'))
<commit_before><commit_msg>Add str to hex utility<commit_after>#!/usr/bin/python import sys if len(sys.argv) < 2: print('Incorrect usage') exit(1) for char in sys.argv[1]: sys.stdout.write('\\x' + char.encode('hex'))
4d837b2e6e183ad34917248bbe36b0c39281be9c
tests/settler_unit_test.py
tests/settler_unit_test.py
__author__ = 'QSG' import unittest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.common.by import By class SettlerTutorial(unittest.TestCase): def setUp(self): self.drive...
Add a manul python test file.
Add a manul python test file.
Python
mpl-2.0
159356-1702-Extramural/capstone,159356-1702-Extramural/capstone,159356-1702-Extramural/capstone,159356-1702-Extramural/capstone
Add a manul python test file.
__author__ = 'QSG' import unittest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.common.by import By class SettlerTutorial(unittest.TestCase): def setUp(self): self.drive...
<commit_before><commit_msg>Add a manul python test file.<commit_after>
__author__ = 'QSG' import unittest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.common.by import By class SettlerTutorial(unittest.TestCase): def setUp(self): self.drive...
Add a manul python test file.__author__ = 'QSG' import unittest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.common.by import By class SettlerTutorial(unittest.TestCase): def se...
<commit_before><commit_msg>Add a manul python test file.<commit_after>__author__ = 'QSG' import unittest from selenium import webdriver from selenium.webdriver.support.wait import WebDriverWait # from selenium.webdriver.support import expected_conditions as EC # from selenium.webdriver.common.by import By class Settle...