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
fbae1c6af008b8ac48a06f98ee61a8d06bf45736
reduce_versions.py
reduce_versions.py
#!/usr/bin/env python import os import argparse def _important_revisions(dependency_file): old_version = None for line in dependency_file: # 18438 1.1.2 Biobase,multtest (rev, version, deps) = line.strip().split('\t') if version != old_version: old_version = version ...
Reduce versions to easier requirements.txt style
Reduce versions to easier requirements.txt style Given an `aRchive_output_path/PACKAGE_versions_full.txt` file, this reduces it into the component `aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which look like: Biobase 2.26.0 Biobase_2.26.0_dependencies.txt Biobase_2.26.0.tar.gz # Could n...
Python
mit
bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code,bioarchive/aRchive_source_code
Reduce versions to easier requirements.txt style Given an `aRchive_output_path/PACKAGE_versions_full.txt` file, this reduces it into the component `aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which look like: Biobase 2.26.0 Biobase_2.26.0_dependencies.txt Biobase_2.26.0.tar.gz # Could n...
#!/usr/bin/env python import os import argparse def _important_revisions(dependency_file): old_version = None for line in dependency_file: # 18438 1.1.2 Biobase,multtest (rev, version, deps) = line.strip().split('\t') if version != old_version: old_version = version ...
<commit_before><commit_msg>Reduce versions to easier requirements.txt style Given an `aRchive_output_path/PACKAGE_versions_full.txt` file, this reduces it into the component `aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which look like: Biobase 2.26.0 Biobase_2.26.0_dependencies.txt Biobase_...
#!/usr/bin/env python import os import argparse def _important_revisions(dependency_file): old_version = None for line in dependency_file: # 18438 1.1.2 Biobase,multtest (rev, version, deps) = line.strip().split('\t') if version != old_version: old_version = version ...
Reduce versions to easier requirements.txt style Given an `aRchive_output_path/PACKAGE_versions_full.txt` file, this reduces it into the component `aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which look like: Biobase 2.26.0 Biobase_2.26.0_dependencies.txt Biobase_2.26.0.tar.gz # Could n...
<commit_before><commit_msg>Reduce versions to easier requirements.txt style Given an `aRchive_output_path/PACKAGE_versions_full.txt` file, this reduces it into the component `aRchive_output_path/PACKAGE_VERSION_dependencies.txt` files, each which look like: Biobase 2.26.0 Biobase_2.26.0_dependencies.txt Biobase_...
2c73a41ab78b41da7b6f2ccbd16140fa701d74f2
gunicorn/app/wsgiapp.py
gunicorn/app/wsgiapp.py
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
Load wsgi apps after reading the configuration.
Load wsgi apps after reading the configuration.
Python
mit
WSDC-NITWarangal/gunicorn,wong2/gunicorn,ccl0326/gunicorn,ephes/gunicorn,tempbottle/gunicorn,zhoucen/gunicorn,prezi/gunicorn,urbaniak/gunicorn,wong2/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,alex/gunicorn,keakon/gunicorn,jamesblunt/gunicorn,jamesblunt/gunicorn,gtrdotmcs/gunicorn,1stvamp/gunicorn,elelianghh/gunico...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
<commit_before># -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
# -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, opts, args): ...
<commit_before># -*- coding: utf-8 - # # This file is part of gunicorn released under the MIT license. # See the NOTICE for more information. import os import sys import traceback from gunicorn import util from gunicorn.app.base import Application class WSGIApplication(Application): def init(self, parser, ...
d44f3ca6cecab959aeefe20b32df7e47c84f3828
molo/core/tests/test_commands.py
molo/core/tests/test_commands.py
from django.test import TestCase from molo.core.tests.base import MoloTestCaseMixin from molo.core.management.commands.move_page_links_to_recomended_articles import convert_articles # noqa body = [ { "type": "paragraph", "value": "paragraph 1" }, { "type": "page", "value":...
Create test scaffold for command functions
Create test scaffold for command functions
Python
bsd-2-clause
praekelt/molo,praekelt/molo,praekelt/molo,praekelt/molo
Create test scaffold for command functions
from django.test import TestCase from molo.core.tests.base import MoloTestCaseMixin from molo.core.management.commands.move_page_links_to_recomended_articles import convert_articles # noqa body = [ { "type": "paragraph", "value": "paragraph 1" }, { "type": "page", "value":...
<commit_before><commit_msg>Create test scaffold for command functions<commit_after>
from django.test import TestCase from molo.core.tests.base import MoloTestCaseMixin from molo.core.management.commands.move_page_links_to_recomended_articles import convert_articles # noqa body = [ { "type": "paragraph", "value": "paragraph 1" }, { "type": "page", "value":...
Create test scaffold for command functionsfrom django.test import TestCase from molo.core.tests.base import MoloTestCaseMixin from molo.core.management.commands.move_page_links_to_recomended_articles import convert_articles # noqa body = [ { "type": "paragraph", "value": "paragraph 1" }, ...
<commit_before><commit_msg>Create test scaffold for command functions<commit_after>from django.test import TestCase from molo.core.tests.base import MoloTestCaseMixin from molo.core.management.commands.move_page_links_to_recomended_articles import convert_articles # noqa body = [ { "type": "paragraph", ...
a5d07496162d40e23c966f1cb3f340845f638c07
one_offs/pdf_repair/fix_pdfs.py
one_offs/pdf_repair/fix_pdfs.py
GEVENT = False from regs_models import Doc import json import itertools def split_seq(iterable, size): it = iter(iterable) item = list(itertools.islice(it, size)) while item: yield item item = list(itertools.islice(it, size)) all_ids = json.load(open("/tmp/problems.json")) for ids in spli...
Reset script for incorrectly-extracted PDFs.
Reset script for incorrectly-extracted PDFs.
Python
bsd-3-clause
sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper,sunlightlabs/regulations-scraper
Reset script for incorrectly-extracted PDFs.
GEVENT = False from regs_models import Doc import json import itertools def split_seq(iterable, size): it = iter(iterable) item = list(itertools.islice(it, size)) while item: yield item item = list(itertools.islice(it, size)) all_ids = json.load(open("/tmp/problems.json")) for ids in spli...
<commit_before><commit_msg>Reset script for incorrectly-extracted PDFs.<commit_after>
GEVENT = False from regs_models import Doc import json import itertools def split_seq(iterable, size): it = iter(iterable) item = list(itertools.islice(it, size)) while item: yield item item = list(itertools.islice(it, size)) all_ids = json.load(open("/tmp/problems.json")) for ids in spli...
Reset script for incorrectly-extracted PDFs.GEVENT = False from regs_models import Doc import json import itertools def split_seq(iterable, size): it = iter(iterable) item = list(itertools.islice(it, size)) while item: yield item item = list(itertools.islice(it, size)) all_ids = json.load...
<commit_before><commit_msg>Reset script for incorrectly-extracted PDFs.<commit_after>GEVENT = False from regs_models import Doc import json import itertools def split_seq(iterable, size): it = iter(iterable) item = list(itertools.islice(it, size)) while item: yield item item = list(itertoo...
c269f2e7a161ee0fdcafed2beb0883cabe1a960f
scripts/fix_system_tags.py
scripts/fix_system_tags.py
# -*- coding: utf-8 -*- """Add system tags that weren't added during the Toku->Postgres migration. Pass a path to a JSON file that has node IDs as keys and lists of system tag names as values. """ import sys import logging import json from website.app import setup_django setup_django() from osf.models import AbstractNo...
Add script to add missing system tags
Add script to add missing system tags
Python
apache-2.0
CenterForOpenScience/osf.io,caneruguz/osf.io,pattisdr/osf.io,adlius/osf.io,aaxelb/osf.io,laurenrevere/osf.io,baylee-d/osf.io,Johnetordoff/osf.io,caseyrollins/osf.io,felliott/osf.io,chrisseto/osf.io,adlius/osf.io,Nesiehr/osf.io,HalcyonChimera/osf.io,crcresearch/osf.io,mfraezz/osf.io,mfraezz/osf.io,erinspace/osf.io,casey...
Add script to add missing system tags
# -*- coding: utf-8 -*- """Add system tags that weren't added during the Toku->Postgres migration. Pass a path to a JSON file that has node IDs as keys and lists of system tag names as values. """ import sys import logging import json from website.app import setup_django setup_django() from osf.models import AbstractNo...
<commit_before><commit_msg>Add script to add missing system tags<commit_after>
# -*- coding: utf-8 -*- """Add system tags that weren't added during the Toku->Postgres migration. Pass a path to a JSON file that has node IDs as keys and lists of system tag names as values. """ import sys import logging import json from website.app import setup_django setup_django() from osf.models import AbstractNo...
Add script to add missing system tags# -*- coding: utf-8 -*- """Add system tags that weren't added during the Toku->Postgres migration. Pass a path to a JSON file that has node IDs as keys and lists of system tag names as values. """ import sys import logging import json from website.app import setup_django setup_djang...
<commit_before><commit_msg>Add script to add missing system tags<commit_after># -*- coding: utf-8 -*- """Add system tags that weren't added during the Toku->Postgres migration. Pass a path to a JSON file that has node IDs as keys and lists of system tag names as values. """ import sys import logging import json from we...
d94398d6ce3c6e40735ae3b3b82a3d31a5718d78
analytics/app.py
analytics/app.py
from flask import Flask from flask.ext.pymongo import PyMongo from bson.json_util import dumps app = Flask('test') mongo = PyMongo(app) @app.route('/') def home_page(): test = mongo.db.events.find({}) view_this_suka = dumps(test) return str(view_this_suka)
Set up with mongo: working
Set up with mongo: working
Python
mit
liakhandrii/genetic_cars,liakhandrii/genetic_cars
Set up with mongo: working
from flask import Flask from flask.ext.pymongo import PyMongo from bson.json_util import dumps app = Flask('test') mongo = PyMongo(app) @app.route('/') def home_page(): test = mongo.db.events.find({}) view_this_suka = dumps(test) return str(view_this_suka)
<commit_before><commit_msg>Set up with mongo: working<commit_after>
from flask import Flask from flask.ext.pymongo import PyMongo from bson.json_util import dumps app = Flask('test') mongo = PyMongo(app) @app.route('/') def home_page(): test = mongo.db.events.find({}) view_this_suka = dumps(test) return str(view_this_suka)
Set up with mongo: workingfrom flask import Flask from flask.ext.pymongo import PyMongo from bson.json_util import dumps app = Flask('test') mongo = PyMongo(app) @app.route('/') def home_page(): test = mongo.db.events.find({}) view_this_suka = dumps(test) return str(view_this_suka)
<commit_before><commit_msg>Set up with mongo: working<commit_after>from flask import Flask from flask.ext.pymongo import PyMongo from bson.json_util import dumps app = Flask('test') mongo = PyMongo(app) @app.route('/') def home_page(): test = mongo.db.events.find({}) view_this_suka = dumps(test) return str(view_th...
95548af426e823687e03fdb3abcd5fb714c96cbe
watcher/db/sqlalchemy/alembic/versions/a86240e89a29_.py
watcher/db/sqlalchemy/alembic/versions/a86240e89a29_.py
"""Set name for Audit as part of backward compatibility Revision ID: a86240e89a29 Revises: 3cfc94cecf4e Create Date: 2017-12-21 13:00:09.278587 """ # revision identifiers, used by Alembic. revision = 'a86240e89a29' down_revision = '3cfc94cecf4e' from alembic import op from sqlalchemy.orm import sessionmaker from wa...
Fix watcher audit list command
Fix watcher audit list command This patch set adds data migration version that fills noname audits with name like strategy.name + '-' + audit.created_at. Closes-Bug: #1738758 Change-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d
Python
apache-2.0
openstack/watcher,stackforge/watcher,stackforge/watcher,openstack/watcher
Fix watcher audit list command This patch set adds data migration version that fills noname audits with name like strategy.name + '-' + audit.created_at. Closes-Bug: #1738758 Change-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d
"""Set name for Audit as part of backward compatibility Revision ID: a86240e89a29 Revises: 3cfc94cecf4e Create Date: 2017-12-21 13:00:09.278587 """ # revision identifiers, used by Alembic. revision = 'a86240e89a29' down_revision = '3cfc94cecf4e' from alembic import op from sqlalchemy.orm import sessionmaker from wa...
<commit_before><commit_msg>Fix watcher audit list command This patch set adds data migration version that fills noname audits with name like strategy.name + '-' + audit.created_at. Closes-Bug: #1738758 Change-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d<commit_after>
"""Set name for Audit as part of backward compatibility Revision ID: a86240e89a29 Revises: 3cfc94cecf4e Create Date: 2017-12-21 13:00:09.278587 """ # revision identifiers, used by Alembic. revision = 'a86240e89a29' down_revision = '3cfc94cecf4e' from alembic import op from sqlalchemy.orm import sessionmaker from wa...
Fix watcher audit list command This patch set adds data migration version that fills noname audits with name like strategy.name + '-' + audit.created_at. Closes-Bug: #1738758 Change-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d"""Set name for Audit as part of backward compatibility Revision ID: a86240e89a29 Revises:...
<commit_before><commit_msg>Fix watcher audit list command This patch set adds data migration version that fills noname audits with name like strategy.name + '-' + audit.created_at. Closes-Bug: #1738758 Change-Id: I1d65b3110166e9f64ce5b80a34672d24d629807d<commit_after>"""Set name for Audit as part of backward compatib...
b6ec51bbf0a6d7ccb17e66d78f041594f5a9030d
tests/basics/dict-del.py
tests/basics/dict-del.py
for i in range(100): d = dict() for j in range(100): d[j] = j del d[i] for j in range(100): if j not in d: print(j, 'not in d')
Add test for dict delete. It fails.
tests: Add test for dict delete. It fails.
Python
mit
tralamazza/micropython,mgyenik/micropython,martinribelotta/micropython,adafruit/micropython,tuc-osg/micropython,jmarcelino/pycom-micropython,MrSurly/micropython,puuu/micropython,heisewangluo/micropython,heisewangluo/micropython,feilongfl/micropython,turbinenreiter/micropython,torwag/micropython,MrSurly/micropython,TDAb...
tests: Add test for dict delete. It fails.
for i in range(100): d = dict() for j in range(100): d[j] = j del d[i] for j in range(100): if j not in d: print(j, 'not in d')
<commit_before><commit_msg>tests: Add test for dict delete. It fails.<commit_after>
for i in range(100): d = dict() for j in range(100): d[j] = j del d[i] for j in range(100): if j not in d: print(j, 'not in d')
tests: Add test for dict delete. It fails.for i in range(100): d = dict() for j in range(100): d[j] = j del d[i] for j in range(100): if j not in d: print(j, 'not in d')
<commit_before><commit_msg>tests: Add test for dict delete. It fails.<commit_after>for i in range(100): d = dict() for j in range(100): d[j] = j del d[i] for j in range(100): if j not in d: print(j, 'not in d')
d4c432f8652b6884fcd02e3b532036a152f58b84
tests/test_exceptions.py
tests/test_exceptions.py
"""tests/test_exceptions.py. Tests to ensure custom exceptions work and are formatted as expected Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software withou...
Add test to define how new exceptions module should work
Add test to define how new exceptions module should work
Python
mit
MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,MuhammadAlkarouri/hug,timothycrosley/hug,timothycrosley/hug,timothycrosley/hug
Add test to define how new exceptions module should work
"""tests/test_exceptions.py. Tests to ensure custom exceptions work and are formatted as expected Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software withou...
<commit_before><commit_msg>Add test to define how new exceptions module should work<commit_after>
"""tests/test_exceptions.py. Tests to ensure custom exceptions work and are formatted as expected Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software withou...
Add test to define how new exceptions module should work"""tests/test_exceptions.py. Tests to ensure custom exceptions work and are formatted as expected Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentatio...
<commit_before><commit_msg>Add test to define how new exceptions module should work<commit_after>"""tests/test_exceptions.py. Tests to ensure custom exceptions work and are formatted as expected Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of ...
e54232b9cdd9c845f2d9386ed58cd3d4d25db701
auc_pr.py
auc_pr.py
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- '''使用real.csv和result.csv表格数据,计算PR曲线的AUC值''' import sys import pandas from pandas import DataFrame from sklearn.metrics import auc, precision_recall_curve #average_precision_score REAL_HEADERS = ['Flightno', 'FlightDepcode', 'FlightArrcode...
Add calculate AUC value of PR curve by sklearn
Add calculate AUC value of PR curve by sklearn
Python
mit
9468305/script
Add calculate AUC value of PR curve by sklearn
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- '''使用real.csv和result.csv表格数据,计算PR曲线的AUC值''' import sys import pandas from pandas import DataFrame from sklearn.metrics import auc, precision_recall_curve #average_precision_score REAL_HEADERS = ['Flightno', 'FlightDepcode', 'FlightArrcode...
<commit_before><commit_msg>Add calculate AUC value of PR curve by sklearn<commit_after>
#!/usr/local/bin/python3 # -*- coding: utf-8 -*- '''使用real.csv和result.csv表格数据,计算PR曲线的AUC值''' import sys import pandas from pandas import DataFrame from sklearn.metrics import auc, precision_recall_curve #average_precision_score REAL_HEADERS = ['Flightno', 'FlightDepcode', 'FlightArrcode...
Add calculate AUC value of PR curve by sklearn#!/usr/local/bin/python3 # -*- coding: utf-8 -*- '''使用real.csv和result.csv表格数据,计算PR曲线的AUC值''' import sys import pandas from pandas import DataFrame from sklearn.metrics import auc, precision_recall_curve #average_precision_score REAL_HEADERS = ['Flightno', '...
<commit_before><commit_msg>Add calculate AUC value of PR curve by sklearn<commit_after>#!/usr/local/bin/python3 # -*- coding: utf-8 -*- '''使用real.csv和result.csv表格数据,计算PR曲线的AUC值''' import sys import pandas from pandas import DataFrame from sklearn.metrics import auc, precision_recall_curve #average_precision_score REAL...
70d6a5c67730e17d8d766eb1e8e6f21eeeda7c04
cptm/folia_party_names.py
cptm/folia_party_names.py
import gzip from lxml import etree import logging import argparse import glob from collections import Counter if __name__ == '__main__': logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logger.setLevel(logging.DEBUG) ...
Add script to check party/speeches data
Add script to check party/speeches data Added a quick and dirty script to determine additional corpus statistics, such as - party names - number of speeches found - number of speeches without party - number of speeches per party because it seems that the folia data is far from complete.
Python
apache-2.0
NLeSC/cptm,NLeSC/cptm
Add script to check party/speeches data Added a quick and dirty script to determine additional corpus statistics, such as - party names - number of speeches found - number of speeches without party - number of speeches per party because it seems that the folia data is far from complete.
import gzip from lxml import etree import logging import argparse import glob from collections import Counter if __name__ == '__main__': logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logger.setLevel(logging.DEBUG) ...
<commit_before><commit_msg>Add script to check party/speeches data Added a quick and dirty script to determine additional corpus statistics, such as - party names - number of speeches found - number of speeches without party - number of speeches per party because it seems that the folia data is far from complete.<com...
import gzip from lxml import etree import logging import argparse import glob from collections import Counter if __name__ == '__main__': logger = logging.getLogger(__name__) logging.basicConfig(format='%(levelname)s : %(message)s', level=logging.INFO) logger.setLevel(logging.DEBUG) ...
Add script to check party/speeches data Added a quick and dirty script to determine additional corpus statistics, such as - party names - number of speeches found - number of speeches without party - number of speeches per party because it seems that the folia data is far from complete.import gzip from lxml import et...
<commit_before><commit_msg>Add script to check party/speeches data Added a quick and dirty script to determine additional corpus statistics, such as - party names - number of speeches found - number of speeches without party - number of speeches per party because it seems that the folia data is far from complete.<com...
a9efa21d153faea171c7e916de91ee787e877a69
pyfibot/util/find_config_opts.py
pyfibot/util/find_config_opts.py
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Small script to find variables that can be declared in config... import os import re from pprint import pprint get_rg = re.compile(r'[^\.](config|settings|network_conf)\.get\((.*?),(.*?)\)') def clean_string(string): return string.strip().strip('\'"') def find_...
Add util to find config options
Add util to find config options
Python
bsd-3-clause
aapa/pyfibot,huqa/pyfibot,lepinkainen/pyfibot,lepinkainen/pyfibot,EArmour/pyfibot,EArmour/pyfibot,aapa/pyfibot,huqa/pyfibot
Add util to find config options
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Small script to find variables that can be declared in config... import os import re from pprint import pprint get_rg = re.compile(r'[^\.](config|settings|network_conf)\.get\((.*?),(.*?)\)') def clean_string(string): return string.strip().strip('\'"') def find_...
<commit_before><commit_msg>Add util to find config options<commit_after>
#!/usr/bin/env python # -*- encoding: utf-8 -*- # Small script to find variables that can be declared in config... import os import re from pprint import pprint get_rg = re.compile(r'[^\.](config|settings|network_conf)\.get\((.*?),(.*?)\)') def clean_string(string): return string.strip().strip('\'"') def find_...
Add util to find config options#!/usr/bin/env python # -*- encoding: utf-8 -*- # Small script to find variables that can be declared in config... import os import re from pprint import pprint get_rg = re.compile(r'[^\.](config|settings|network_conf)\.get\((.*?),(.*?)\)') def clean_string(string): return string.s...
<commit_before><commit_msg>Add util to find config options<commit_after>#!/usr/bin/env python # -*- encoding: utf-8 -*- # Small script to find variables that can be declared in config... import os import re from pprint import pprint get_rg = re.compile(r'[^\.](config|settings|network_conf)\.get\((.*?),(.*?)\)') def ...
b4421d0fa5a4c8dd509513553939958ee616d46a
msibi/utils/plot_fit.py
msibi/utils/plot_fit.py
import os.path def plot_pair_fits(pair, fits, use_agg=False): if use_agg: import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt fig, ax = plt.subplots() for state, fit in fits[pair].iteritems(): ax.plot(fit, label=state) ax.set_xlabel('step') ax.set_yl...
Add function for plotting fit vs step
Add function for plotting fit vs step A simple function to plot the fitness function vs. iteration from the logfile generated by MSIBI.optimize(). This may belong in a different location, but putting it here for now.
Python
mit
ctk3b/msibi,mosdef-hub/msibi,mosdef-hub/msibi
Add function for plotting fit vs step A simple function to plot the fitness function vs. iteration from the logfile generated by MSIBI.optimize(). This may belong in a different location, but putting it here for now.
import os.path def plot_pair_fits(pair, fits, use_agg=False): if use_agg: import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt fig, ax = plt.subplots() for state, fit in fits[pair].iteritems(): ax.plot(fit, label=state) ax.set_xlabel('step') ax.set_yl...
<commit_before><commit_msg>Add function for plotting fit vs step A simple function to plot the fitness function vs. iteration from the logfile generated by MSIBI.optimize(). This may belong in a different location, but putting it here for now.<commit_after>
import os.path def plot_pair_fits(pair, fits, use_agg=False): if use_agg: import matplotlib as mpl mpl.use('Agg') import matplotlib.pyplot as plt fig, ax = plt.subplots() for state, fit in fits[pair].iteritems(): ax.plot(fit, label=state) ax.set_xlabel('step') ax.set_yl...
Add function for plotting fit vs step A simple function to plot the fitness function vs. iteration from the logfile generated by MSIBI.optimize(). This may belong in a different location, but putting it here for now.import os.path def plot_pair_fits(pair, fits, use_agg=False): if use_agg: import matplotl...
<commit_before><commit_msg>Add function for plotting fit vs step A simple function to plot the fitness function vs. iteration from the logfile generated by MSIBI.optimize(). This may belong in a different location, but putting it here for now.<commit_after>import os.path def plot_pair_fits(pair, fits, use_agg=False)...
efc5fc4c5da18906efb8914364de0ee72fc85a5e
scripts/set-artist-streamable.py
scripts/set-artist-streamable.py
#!/usr/bin/env python import psycopg2 as ordbms import urllib, urllib2 import xml.etree.cElementTree as ElementTree class SetArtistStreamable: def __init__(self): self.conn = ordbms.connect ("dbname='librefm'") self.cursor = self.conn.cursor() def updateAll(self): """Sets artists streamable ...
Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)
Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)
Python
agpl-3.0
foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm,foocorp/gnu-fm
Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)
#!/usr/bin/env python import psycopg2 as ordbms import urllib, urllib2 import xml.etree.cElementTree as ElementTree class SetArtistStreamable: def __init__(self): self.conn = ordbms.connect ("dbname='librefm'") self.cursor = self.conn.cursor() def updateAll(self): """Sets artists streamable ...
<commit_before><commit_msg>Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)<commit_after>
#!/usr/bin/env python import psycopg2 as ordbms import urllib, urllib2 import xml.etree.cElementTree as ElementTree class SetArtistStreamable: def __init__(self): self.conn = ordbms.connect ("dbname='librefm'") self.cursor = self.conn.cursor() def updateAll(self): """Sets artists streamable ...
Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)#!/usr/bin/env python import psycopg2 as ordbms import urllib, urllib2 import xml.etree.cElementTree as ElementTree class SetArtistStreamable: def __init__(self): self.c...
<commit_before><commit_msg>Add script for updating previously imported artists with the streamable property (so we don't have to query tracks to find out who's streamable)<commit_after>#!/usr/bin/env python import psycopg2 as ordbms import urllib, urllib2 import xml.etree.cElementTree as ElementTree class SetArtistSt...
0899c6516bd9bf8fdd4bd973106eaa1ffcf67667
pirate_add_shift_recurrence.py
pirate_add_shift_recurrence.py
#!/usr/bin/python import sys import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actua...
Add pirate-enabled version of the hook
Add pirate-enabled version of the hook
Python
mit
tbabej/task.shift-recurrence
Add pirate-enabled version of the hook
#!/usr/bin/python import sys import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actua...
<commit_before><commit_msg>Add pirate-enabled version of the hook<commit_after>
#!/usr/bin/python import sys import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False # Newly created recurrence tasks actua...
Add pirate-enabled version of the hook#!/usr/bin/python import sys import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not task['parent']: return False ...
<commit_before><commit_msg>Add pirate-enabled version of the hook<commit_after>#!/usr/bin/python import sys import os from tasklib.task import Task, TaskWarrior time_attributes = ('wait', 'until', 'scheduled') def is_new_local_recurrence_child_task(task): # Do not affect tasks not spun by recurrence if not t...
71cdf03644215ec3032605e6772dc897d0d78b05
Sensors/testMouse.py
Sensors/testMouse.py
from pymouse import PyMouse import time # This script demonstrates the possibility to use a mouse as an unbound sensor. # To do that the cursor position is brought back to the middle of the screen at each step, and the distance moved by the mouse are integrated # This script is intended to be used with a second externa...
Add a test to check if an optical mouse can be used as a course sensor
Add a test to check if an optical mouse can be used as a course sensor
Python
mit
baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite,baptistelabat/robokite
Add a test to check if an optical mouse can be used as a course sensor
from pymouse import PyMouse import time # This script demonstrates the possibility to use a mouse as an unbound sensor. # To do that the cursor position is brought back to the middle of the screen at each step, and the distance moved by the mouse are integrated # This script is intended to be used with a second externa...
<commit_before><commit_msg>Add a test to check if an optical mouse can be used as a course sensor<commit_after>
from pymouse import PyMouse import time # This script demonstrates the possibility to use a mouse as an unbound sensor. # To do that the cursor position is brought back to the middle of the screen at each step, and the distance moved by the mouse are integrated # This script is intended to be used with a second externa...
Add a test to check if an optical mouse can be used as a course sensorfrom pymouse import PyMouse import time # This script demonstrates the possibility to use a mouse as an unbound sensor. # To do that the cursor position is brought back to the middle of the screen at each step, and the distance moved by the mouse are...
<commit_before><commit_msg>Add a test to check if an optical mouse can be used as a course sensor<commit_after>from pymouse import PyMouse import time # This script demonstrates the possibility to use a mouse as an unbound sensor. # To do that the cursor position is brought back to the middle of the screen at each step...
5582e074cc68dc7b97d4b33211b74fb4813e2f17
Sorting.py
Sorting.py
# Sorting of numbers # we will stick to acending - read it backwards otherwise :P def InsertionSort(A): # As A[0] is sorted by itself we need to take the number to be sorted from 1 to n-1 for i in range(1,len(A)): key = A[i] # Take the next number in unsorted section for j in range(0,i): # g...
Add Insertion Sort for float numbers
Add Insertion Sort for float numbers I am planning to implement all sorting techniques I learn in this script Also I will try to incoporate time comparison at a later stage. Signed-off-by: Aditya Prasad <5c5d1de3672d25c1ad997cc5b3c40a32c347e962@gmail.com>
Python
mit
Aditya8795/Python-Scripts
Add Insertion Sort for float numbers I am planning to implement all sorting techniques I learn in this script Also I will try to incoporate time comparison at a later stage. Signed-off-by: Aditya Prasad <5c5d1de3672d25c1ad997cc5b3c40a32c347e962@gmail.com>
# Sorting of numbers # we will stick to acending - read it backwards otherwise :P def InsertionSort(A): # As A[0] is sorted by itself we need to take the number to be sorted from 1 to n-1 for i in range(1,len(A)): key = A[i] # Take the next number in unsorted section for j in range(0,i): # g...
<commit_before><commit_msg>Add Insertion Sort for float numbers I am planning to implement all sorting techniques I learn in this script Also I will try to incoporate time comparison at a later stage. Signed-off-by: Aditya Prasad <5c5d1de3672d25c1ad997cc5b3c40a32c347e962@gmail.com><commit_after>
# Sorting of numbers # we will stick to acending - read it backwards otherwise :P def InsertionSort(A): # As A[0] is sorted by itself we need to take the number to be sorted from 1 to n-1 for i in range(1,len(A)): key = A[i] # Take the next number in unsorted section for j in range(0,i): # g...
Add Insertion Sort for float numbers I am planning to implement all sorting techniques I learn in this script Also I will try to incoporate time comparison at a later stage. Signed-off-by: Aditya Prasad <5c5d1de3672d25c1ad997cc5b3c40a32c347e962@gmail.com># Sorting of numbers # we will stick to acending - read it bac...
<commit_before><commit_msg>Add Insertion Sort for float numbers I am planning to implement all sorting techniques I learn in this script Also I will try to incoporate time comparison at a later stage. Signed-off-by: Aditya Prasad <5c5d1de3672d25c1ad997cc5b3c40a32c347e962@gmail.com><commit_after># Sorting of numbers ...
fcab7caa8bfd8a7bb3735aa6b61c226a9ad6426e
exp/alto/tools/filter_width.py
exp/alto/tools/filter_width.py
#!/usr/bin/env python3 import sys from nltk.tree import Tree def sort_nps(): with open(sys.argv[1]) as np_doc: for line in np_doc: t = Tree.fromstring(line) width = len(t) if width <= 3: print(line, end = "") sort_nps()
Add script for getting rid of too wide NPs
Add script for getting rid of too wide NPs
Python
mit
kornai/4lang,kornai/4lang,kornai/4lang,kornai/4lang
Add script for getting rid of too wide NPs
#!/usr/bin/env python3 import sys from nltk.tree import Tree def sort_nps(): with open(sys.argv[1]) as np_doc: for line in np_doc: t = Tree.fromstring(line) width = len(t) if width <= 3: print(line, end = "") sort_nps()
<commit_before><commit_msg>Add script for getting rid of too wide NPs<commit_after>
#!/usr/bin/env python3 import sys from nltk.tree import Tree def sort_nps(): with open(sys.argv[1]) as np_doc: for line in np_doc: t = Tree.fromstring(line) width = len(t) if width <= 3: print(line, end = "") sort_nps()
Add script for getting rid of too wide NPs#!/usr/bin/env python3 import sys from nltk.tree import Tree def sort_nps(): with open(sys.argv[1]) as np_doc: for line in np_doc: t = Tree.fromstring(line) width = len(t) if width <= 3: print(line, end = "") so...
<commit_before><commit_msg>Add script for getting rid of too wide NPs<commit_after>#!/usr/bin/env python3 import sys from nltk.tree import Tree def sort_nps(): with open(sys.argv[1]) as np_doc: for line in np_doc: t = Tree.fromstring(line) width = len(t) if width <= 3: ...
9ddd96bbe727f61c41f73d786b5beea9a85482a9
project/velkoja/management/commands/check_nordea_overdue.py
project/velkoja/management/commands/check_nordea_overdue.py
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from velkoja.nordeachecker import NordeaOverdueInvoicesHandler class Command(BaseCommand): help = 'Check overdue Nordea payments and send emails about them' def add_arguments(self, parser): pass def handle(...
Add management command to run the checks
Add management command to run the checks
Python
mit
HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum,HelsinkiHacklab/asylum
Add management command to run the checks
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from velkoja.nordeachecker import NordeaOverdueInvoicesHandler class Command(BaseCommand): help = 'Check overdue Nordea payments and send emails about them' def add_arguments(self, parser): pass def handle(...
<commit_before><commit_msg>Add management command to run the checks<commit_after>
# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from velkoja.nordeachecker import NordeaOverdueInvoicesHandler class Command(BaseCommand): help = 'Check overdue Nordea payments and send emails about them' def add_arguments(self, parser): pass def handle(...
Add management command to run the checks# -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from velkoja.nordeachecker import NordeaOverdueInvoicesHandler class Command(BaseCommand): help = 'Check overdue Nordea payments and send emails about them' def add_arguments(self...
<commit_before><commit_msg>Add management command to run the checks<commit_after># -*- coding: utf-8 -*- from django.core.management.base import BaseCommand, CommandError from velkoja.nordeachecker import NordeaOverdueInvoicesHandler class Command(BaseCommand): help = 'Check overdue Nordea payments and send email...
20c6e2d41e0848fddb3ff3829720ab43a71f41a9
ideascube/conf/kb_babylab_civ.py
ideascube/conf/kb_babylab_civ.py
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa from django.utils.translation import ugettext_lazy as _ LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'BabyLab' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'mediacenter', }, { 'id': 'bsfcampus', ...
Add conf file for BabyLab KoomBook
Add conf file for BabyLab KoomBook
Python
agpl-3.0
ideascube/ideascube,ideascube/ideascube,ideascube/ideascube,ideascube/ideascube
Add conf file for BabyLab KoomBook
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa from django.utils.translation import ugettext_lazy as _ LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'BabyLab' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'mediacenter', }, { 'id': 'bsfcampus', ...
<commit_before><commit_msg>Add conf file for BabyLab KoomBook<commit_after>
# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa from django.utils.translation import ugettext_lazy as _ LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'BabyLab' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'mediacenter', }, { 'id': 'bsfcampus', ...
Add conf file for BabyLab KoomBook# -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa from django.utils.translation import ugettext_lazy as _ LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'BabyLab' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, { 'id': 'mediacenter', }, ...
<commit_before><commit_msg>Add conf file for BabyLab KoomBook<commit_after># -*- coding: utf-8 -*- """KoomBook conf""" from .kb import * # noqa from django.utils.translation import ugettext_lazy as _ LANGUAGE_CODE = 'fr' IDEASCUBE_NAME = 'BabyLab' HOME_CARDS = STAFF_HOME_CARDS + [ { 'id': 'blog', }, ...
8840e38e5d3107564338de4e47bfd65aae5723ee
scripts/git-pre-cloner.py
scripts/git-pre-cloner.py
#!/usr/bin/python import argparse import os import sys import string import subprocess import escapism safe_chars = set(string.ascii_lowercase + string.digits) repo = 'https://github.com/data-8/materials-fa17.git' local_repo = '/export/pool0/homes/_repo' cwd_tmpl = '/export/pool0/homes/{}' def safe_username(usernam...
Rename pre-pull and move to scripts/.
Rename pre-pull and move to scripts/.
Python
bsd-3-clause
berkeley-dsep-infra/datahub,gunjanbaid/datahub,ryanlovett/datahub,ryanlovett/datahub,ryanlovett/datahub,berkeley-dsep-infra/datahub,berkeley-dsep-infra/datahub,gunjanbaid/datahub
Rename pre-pull and move to scripts/.
#!/usr/bin/python import argparse import os import sys import string import subprocess import escapism safe_chars = set(string.ascii_lowercase + string.digits) repo = 'https://github.com/data-8/materials-fa17.git' local_repo = '/export/pool0/homes/_repo' cwd_tmpl = '/export/pool0/homes/{}' def safe_username(usernam...
<commit_before><commit_msg>Rename pre-pull and move to scripts/.<commit_after>
#!/usr/bin/python import argparse import os import sys import string import subprocess import escapism safe_chars = set(string.ascii_lowercase + string.digits) repo = 'https://github.com/data-8/materials-fa17.git' local_repo = '/export/pool0/homes/_repo' cwd_tmpl = '/export/pool0/homes/{}' def safe_username(usernam...
Rename pre-pull and move to scripts/.#!/usr/bin/python import argparse import os import sys import string import subprocess import escapism safe_chars = set(string.ascii_lowercase + string.digits) repo = 'https://github.com/data-8/materials-fa17.git' local_repo = '/export/pool0/homes/_repo' cwd_tmpl = '/export/pool0...
<commit_before><commit_msg>Rename pre-pull and move to scripts/.<commit_after>#!/usr/bin/python import argparse import os import sys import string import subprocess import escapism safe_chars = set(string.ascii_lowercase + string.digits) repo = 'https://github.com/data-8/materials-fa17.git' local_repo = '/export/poo...
27b6b0b62624ccd80345768f664ae2f421f85368
h2o-py/tests/testdir_misc/pyunit_mean_per_class_error.py
h2o-py/tests/testdir_misc/pyunit_mean_per_class_error.py
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def pyunit_mean_per_class_error(): gbm = H2OGradientBoostingEstimator(nfolds=3, fold_assignment="Random", seed=1234) ## Binomial cars = h2o.import_file("/users/arno...
Add extra Python test for mean-per-class error.
PUBDEV-2979: Add extra Python test for mean-per-class error.
Python
apache-2.0
spennihana/h2o-3,spennihana/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,spennihana/h2o-3,michalkurka/h2o-3,michalkurka/h2o-3,jangorecki/h2o-3,h2oai/h2o-dev,h2oai/h2o-3,h2oai/h2o-3,h2oai/h2o-3,mathemage/h2o-3,mathemage/h2o-3,michalkurka/h2o-3,h2oai/h2o-3,mathemage/h2o-3,h2oai/h2o-3,h2oai/h2o-3,spennihana/h2o-3,jangorecki/h2o-3...
PUBDEV-2979: Add extra Python test for mean-per-class error.
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def pyunit_mean_per_class_error(): gbm = H2OGradientBoostingEstimator(nfolds=3, fold_assignment="Random", seed=1234) ## Binomial cars = h2o.import_file("/users/arno...
<commit_before><commit_msg>PUBDEV-2979: Add extra Python test for mean-per-class error.<commit_after>
import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def pyunit_mean_per_class_error(): gbm = H2OGradientBoostingEstimator(nfolds=3, fold_assignment="Random", seed=1234) ## Binomial cars = h2o.import_file("/users/arno...
PUBDEV-2979: Add extra Python test for mean-per-class error.import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def pyunit_mean_per_class_error(): gbm = H2OGradientBoostingEstimator(nfolds=3, fold_assignment="Random", seed=12...
<commit_before><commit_msg>PUBDEV-2979: Add extra Python test for mean-per-class error.<commit_after>import sys sys.path.insert(1,"../../") import h2o from tests import pyunit_utils from h2o.estimators.gbm import H2OGradientBoostingEstimator def pyunit_mean_per_class_error(): gbm = H2OGradientBoostingEstimator(nf...
bcd45f883b6442f7a1205979bdc79c69ccd2a623
migrations/versions/4d5d239d53b4_set_on_delete_cascad.py
migrations/versions/4d5d239d53b4_set_on_delete_cascad.py
"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c94' from alembic import op def upgrade(): op.drop_constraint('testsuite_project_id_f...
Add missing TestSuite ON DELETE UPDATE constraints
Add missing TestSuite ON DELETE UPDATE constraints
Python
apache-2.0
wfxiang08/changes,wfxiang08/changes,bowlofstew/changes,wfxiang08/changes,bowlofstew/changes,dropbox/changes,dropbox/changes,dropbox/changes,dropbox/changes,bowlofstew/changes,bowlofstew/changes,wfxiang08/changes
Add missing TestSuite ON DELETE UPDATE constraints
"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c94' from alembic import op def upgrade(): op.drop_constraint('testsuite_project_id_f...
<commit_before><commit_msg>Add missing TestSuite ON DELETE UPDATE constraints<commit_after>
"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c94' from alembic import op def upgrade(): op.drop_constraint('testsuite_project_id_f...
Add missing TestSuite ON DELETE UPDATE constraints"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c94' from alembic import op def upgrade...
<commit_before><commit_msg>Add missing TestSuite ON DELETE UPDATE constraints<commit_after>"""Set ON DELETE CASCADE on TestSuite.* Revision ID: 4d5d239d53b4 Revises: 501983249c94 Create Date: 2013-12-23 16:14:08.812850 """ # revision identifiers, used by Alembic. revision = '4d5d239d53b4' down_revision = '501983249c...
82f72fe184ecb37049ec7b7b13a8e9c05936ee7a
migrations/versions/5981b26ae993_drop_trackman_tables.py
migrations/versions/5981b26ae993_drop_trackman_tables.py
"""Drop Trackman tables Revision ID: 5981b26ae993 Revises: 804fb3dc434f Create Date: 2018-05-19 23:57:42.897891 """ # revision identifiers, used by Alembic. revision = '5981b26ae993' down_revision = '804fb3dc434f' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_table('air_log') op.dr...
Add migration to drop Trackman tables
Add migration to drop Trackman tables
Python
agpl-3.0
wuvt/wuvt-site,wuvt/wuvt-site,wuvt/wuvt-site,wuvt/wuvt-site
Add migration to drop Trackman tables
"""Drop Trackman tables Revision ID: 5981b26ae993 Revises: 804fb3dc434f Create Date: 2018-05-19 23:57:42.897891 """ # revision identifiers, used by Alembic. revision = '5981b26ae993' down_revision = '804fb3dc434f' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_table('air_log') op.dr...
<commit_before><commit_msg>Add migration to drop Trackman tables<commit_after>
"""Drop Trackman tables Revision ID: 5981b26ae993 Revises: 804fb3dc434f Create Date: 2018-05-19 23:57:42.897891 """ # revision identifiers, used by Alembic. revision = '5981b26ae993' down_revision = '804fb3dc434f' from alembic import op import sqlalchemy as sa def upgrade(): op.drop_table('air_log') op.dr...
Add migration to drop Trackman tables"""Drop Trackman tables Revision ID: 5981b26ae993 Revises: 804fb3dc434f Create Date: 2018-05-19 23:57:42.897891 """ # revision identifiers, used by Alembic. revision = '5981b26ae993' down_revision = '804fb3dc434f' from alembic import op import sqlalchemy as sa def upgrade(): ...
<commit_before><commit_msg>Add migration to drop Trackman tables<commit_after>"""Drop Trackman tables Revision ID: 5981b26ae993 Revises: 804fb3dc434f Create Date: 2018-05-19 23:57:42.897891 """ # revision identifiers, used by Alembic. revision = '5981b26ae993' down_revision = '804fb3dc434f' from alembic import op i...
32a9a608a6489528089b68857965afdc4b7c76cc
tests/test_sql_copy.py
tests/test_sql_copy.py
import os import pytest import time from carto.exceptions import CartoException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient SETUP_QUERIES = [ 'DROP TABLE IF EXISTS carto_python_sdk_copy_test', """ CREATE TABLE carto_python_sdk_copy_test ( the_geom geometry(Geometry,4326), n...
Add test file for COPY client
Add test file for COPY client
Python
bsd-3-clause
CartoDB/cartodb-python,CartoDB/carto-python
Add test file for COPY client
import os import pytest import time from carto.exceptions import CartoException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient SETUP_QUERIES = [ 'DROP TABLE IF EXISTS carto_python_sdk_copy_test', """ CREATE TABLE carto_python_sdk_copy_test ( the_geom geometry(Geometry,4326), n...
<commit_before><commit_msg>Add test file for COPY client<commit_after>
import os import pytest import time from carto.exceptions import CartoException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient SETUP_QUERIES = [ 'DROP TABLE IF EXISTS carto_python_sdk_copy_test', """ CREATE TABLE carto_python_sdk_copy_test ( the_geom geometry(Geometry,4326), n...
Add test file for COPY clientimport os import pytest import time from carto.exceptions import CartoException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient SETUP_QUERIES = [ 'DROP TABLE IF EXISTS carto_python_sdk_copy_test', """ CREATE TABLE carto_python_sdk_copy_test ( the_geom geo...
<commit_before><commit_msg>Add test file for COPY client<commit_after>import os import pytest import time from carto.exceptions import CartoException from carto.sql import SQLClient, BatchSQLClient, CopySQLClient SETUP_QUERIES = [ 'DROP TABLE IF EXISTS carto_python_sdk_copy_test', """ CREATE TABLE carto_...
801ea808caa4cde2b1cb84f52d5d516d39b30e88
tester_alex_10q.py
tester_alex_10q.py
from __future__ import print_function import pandas as pd from bs4 import BeautifulSoup as BSoup from SecFiling10Q import SecFiling10Q def areEqual(expect, val, eps = 0.01): try: diff = abs(float(val) / float(expect) - 1.0) assert diff < eps, "Values don't match, expected= {:.12f}, found= {:.12f},...
Test the SecFiling10Q for an ALEX 10-q filing.
Test the SecFiling10Q for an ALEX 10-q filing.
Python
agpl-3.0
cielling/jupyternbs
Test the SecFiling10Q for an ALEX 10-q filing.
from __future__ import print_function import pandas as pd from bs4 import BeautifulSoup as BSoup from SecFiling10Q import SecFiling10Q def areEqual(expect, val, eps = 0.01): try: diff = abs(float(val) / float(expect) - 1.0) assert diff < eps, "Values don't match, expected= {:.12f}, found= {:.12f},...
<commit_before><commit_msg>Test the SecFiling10Q for an ALEX 10-q filing.<commit_after>
from __future__ import print_function import pandas as pd from bs4 import BeautifulSoup as BSoup from SecFiling10Q import SecFiling10Q def areEqual(expect, val, eps = 0.01): try: diff = abs(float(val) / float(expect) - 1.0) assert diff < eps, "Values don't match, expected= {:.12f}, found= {:.12f},...
Test the SecFiling10Q for an ALEX 10-q filing.from __future__ import print_function import pandas as pd from bs4 import BeautifulSoup as BSoup from SecFiling10Q import SecFiling10Q def areEqual(expect, val, eps = 0.01): try: diff = abs(float(val) / float(expect) - 1.0) assert diff < eps, "Values d...
<commit_before><commit_msg>Test the SecFiling10Q for an ALEX 10-q filing.<commit_after>from __future__ import print_function import pandas as pd from bs4 import BeautifulSoup as BSoup from SecFiling10Q import SecFiling10Q def areEqual(expect, val, eps = 0.01): try: diff = abs(float(val) / float(expect) - ...
244e91021d87a52dc985eedc8f974653f290c4bd
migrations/versions/0225_another_letter_org.py
migrations/versions/0225_another_letter_org.py
"""empty message Revision ID: 0225_another_letter_org Revises: 0224_returned_letter_status """ # revision identifiers, used by Alembic. revision = '0225_another_letter_org' down_revision = '0224_returned_letter_status' from alembic import op NEW_ORGANISATIONS = [ ('512', 'Vale of Glamorgan'), ('513', 'Rot...
Add two new letter logos
Add two new letter logos
Python
mit
alphagov/notifications-api,alphagov/notifications-api
Add two new letter logos
"""empty message Revision ID: 0225_another_letter_org Revises: 0224_returned_letter_status """ # revision identifiers, used by Alembic. revision = '0225_another_letter_org' down_revision = '0224_returned_letter_status' from alembic import op NEW_ORGANISATIONS = [ ('512', 'Vale of Glamorgan'), ('513', 'Rot...
<commit_before><commit_msg>Add two new letter logos<commit_after>
"""empty message Revision ID: 0225_another_letter_org Revises: 0224_returned_letter_status """ # revision identifiers, used by Alembic. revision = '0225_another_letter_org' down_revision = '0224_returned_letter_status' from alembic import op NEW_ORGANISATIONS = [ ('512', 'Vale of Glamorgan'), ('513', 'Rot...
Add two new letter logos"""empty message Revision ID: 0225_another_letter_org Revises: 0224_returned_letter_status """ # revision identifiers, used by Alembic. revision = '0225_another_letter_org' down_revision = '0224_returned_letter_status' from alembic import op NEW_ORGANISATIONS = [ ('512', 'Vale of Glamo...
<commit_before><commit_msg>Add two new letter logos<commit_after>"""empty message Revision ID: 0225_another_letter_org Revises: 0224_returned_letter_status """ # revision identifiers, used by Alembic. revision = '0225_another_letter_org' down_revision = '0224_returned_letter_status' from alembic import op NEW_ORG...
730e8b79a8c5c27751cc429f348932bd3638bd85
tests/test_base.py
tests/test_base.py
"""tests/test_base.py. Tests the base blox to ensure they provide solid functionality for a Python dom representation Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in ...
Add initial test for base block elements
Add initial test for base block elements
Python
mit
timothycrosley/blox,timothycrosley/blox,timothycrosley/blox
Add initial test for base block elements
"""tests/test_base.py. Tests the base blox to ensure they provide solid functionality for a Python dom representation Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in ...
<commit_before><commit_msg>Add initial test for base block elements<commit_after>
"""tests/test_base.py. Tests the base blox to ensure they provide solid functionality for a Python dom representation Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in ...
Add initial test for base block elements"""tests/test_base.py. Tests the base blox to ensure they provide solid functionality for a Python dom representation Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documenta...
<commit_before><commit_msg>Add initial test for base block elements<commit_after>"""tests/test_base.py. Tests the base blox to ensure they provide solid functionality for a Python dom representation Copyright (C) 2015 Timothy Edmund Crosley Permission is hereby granted, free of charge, to any person obtaining a copy ...
d2d4e057b3a1de8f2be917aa5b8b3a4c0f5e1dc5
tests/unit/test_execeptions.py
tests/unit/test_execeptions.py
#!/usr/bin/env python from butter import eventfd, _eventfd from pytest import raises import pytest import errno @pytest.mark.parametrize('path,module,func,errno,exception', [ ('butter._eventfd.C.eventfd', _eventfd, _eventfd.eventfd, errno.EINVAL, ValueError), ('butter...
Add testing of behavior when syscall fails
Add testing of behavior when syscall fails
Python
bsd-3-clause
dasSOZO/python-butter,wdv4758h/butter
Add testing of behavior when syscall fails
#!/usr/bin/env python from butter import eventfd, _eventfd from pytest import raises import pytest import errno @pytest.mark.parametrize('path,module,func,errno,exception', [ ('butter._eventfd.C.eventfd', _eventfd, _eventfd.eventfd, errno.EINVAL, ValueError), ('butter...
<commit_before><commit_msg>Add testing of behavior when syscall fails<commit_after>
#!/usr/bin/env python from butter import eventfd, _eventfd from pytest import raises import pytest import errno @pytest.mark.parametrize('path,module,func,errno,exception', [ ('butter._eventfd.C.eventfd', _eventfd, _eventfd.eventfd, errno.EINVAL, ValueError), ('butter...
Add testing of behavior when syscall fails#!/usr/bin/env python from butter import eventfd, _eventfd from pytest import raises import pytest import errno @pytest.mark.parametrize('path,module,func,errno,exception', [ ('butter._eventfd.C.eventfd', _eventfd, _eventfd.eventfd, errno.EINVAL, Valu...
<commit_before><commit_msg>Add testing of behavior when syscall fails<commit_after>#!/usr/bin/env python from butter import eventfd, _eventfd from pytest import raises import pytest import errno @pytest.mark.parametrize('path,module,func,errno,exception', [ ('butter._eventfd.C.eventfd', _even...
612d2e3f749244c00404d97d93982c88538ce8aa
mk_json_query.py
mk_json_query.py
#python mk_json_quert.py & excute it in backgroud # excute ES query and export it to apache directory for data visulization import datetime from elasticsearch import Elasticsearch from elasticsearch import helpers import os.path import time import json #JSON export for further data visulization FILE_PATH_JSON1 = "/var...
Add export data into apache folder script
Add export data into apache folder script
Python
mit
yuecong/tools,yuecong/tools,yuecong/tools,yuecong/tools
Add export data into apache folder script
#python mk_json_quert.py & excute it in backgroud # excute ES query and export it to apache directory for data visulization import datetime from elasticsearch import Elasticsearch from elasticsearch import helpers import os.path import time import json #JSON export for further data visulization FILE_PATH_JSON1 = "/var...
<commit_before><commit_msg>Add export data into apache folder script<commit_after>
#python mk_json_quert.py & excute it in backgroud # excute ES query and export it to apache directory for data visulization import datetime from elasticsearch import Elasticsearch from elasticsearch import helpers import os.path import time import json #JSON export for further data visulization FILE_PATH_JSON1 = "/var...
Add export data into apache folder script#python mk_json_quert.py & excute it in backgroud # excute ES query and export it to apache directory for data visulization import datetime from elasticsearch import Elasticsearch from elasticsearch import helpers import os.path import time import json #JSON export for further ...
<commit_before><commit_msg>Add export data into apache folder script<commit_after>#python mk_json_quert.py & excute it in backgroud # excute ES query and export it to apache directory for data visulization import datetime from elasticsearch import Elasticsearch from elasticsearch import helpers import os.path import ti...
637b95a59f740314ea82d8dcced67656d150d8a8
concept.py
concept.py
import docker import dronekit # connect to the Docker daemon client = docker.client.from_env() print("AAA") # provision a container from an ArduPilot image image_name = "squareslab/ardubugs:base" container = client.containers.create(image_name, "/bin/bash", stdin_open=True, detach=True, working_dir="/experiment/sourc...
Create container, build the spurce and run ardurover
Create container, build the spurce and run ardurover
Python
mit
squaresLab/Houston,squaresLab/Houston,squaresLab/Houston
Create container, build the spurce and run ardurover
import docker import dronekit # connect to the Docker daemon client = docker.client.from_env() print("AAA") # provision a container from an ArduPilot image image_name = "squareslab/ardubugs:base" container = client.containers.create(image_name, "/bin/bash", stdin_open=True, detach=True, working_dir="/experiment/sourc...
<commit_before><commit_msg>Create container, build the spurce and run ardurover<commit_after>
import docker import dronekit # connect to the Docker daemon client = docker.client.from_env() print("AAA") # provision a container from an ArduPilot image image_name = "squareslab/ardubugs:base" container = client.containers.create(image_name, "/bin/bash", stdin_open=True, detach=True, working_dir="/experiment/sourc...
Create container, build the spurce and run arduroverimport docker import dronekit # connect to the Docker daemon client = docker.client.from_env() print("AAA") # provision a container from an ArduPilot image image_name = "squareslab/ardubugs:base" container = client.containers.create(image_name, "/bin/bash", stdin_op...
<commit_before><commit_msg>Create container, build the spurce and run ardurover<commit_after>import docker import dronekit # connect to the Docker daemon client = docker.client.from_env() print("AAA") # provision a container from an ArduPilot image image_name = "squareslab/ardubugs:base" container = client.containers...
b63dd66a96b503eb10d2eb49162ed4ed99a9e8f2
apps/domain/tests/test_core/test_manager/test_env_manager.py
apps/domain/tests/test_core/test_manager/test_env_manager.py
from src.main.core.database import * from src.main.core.database.environment.environment import Environment from src.main.core.database.environment.user_environment import UserEnvironment from src.main.core.manager import EnvironmentManager, UserManager from src.main.core.exceptions import InvalidCredentialsError impor...
ADD initial environment unit tests
ADD initial environment unit tests
Python
apache-2.0
OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft,OpenMined/PySyft
ADD initial environment unit tests
from src.main.core.database import * from src.main.core.database.environment.environment import Environment from src.main.core.database.environment.user_environment import UserEnvironment from src.main.core.manager import EnvironmentManager, UserManager from src.main.core.exceptions import InvalidCredentialsError impor...
<commit_before><commit_msg>ADD initial environment unit tests<commit_after>
from src.main.core.database import * from src.main.core.database.environment.environment import Environment from src.main.core.database.environment.user_environment import UserEnvironment from src.main.core.manager import EnvironmentManager, UserManager from src.main.core.exceptions import InvalidCredentialsError impor...
ADD initial environment unit testsfrom src.main.core.database import * from src.main.core.database.environment.environment import Environment from src.main.core.database.environment.user_environment import UserEnvironment from src.main.core.manager import EnvironmentManager, UserManager from src.main.core.exceptions im...
<commit_before><commit_msg>ADD initial environment unit tests<commit_after>from src.main.core.database import * from src.main.core.database.environment.environment import Environment from src.main.core.database.environment.user_environment import UserEnvironment from src.main.core.manager import EnvironmentManager, Use...
0a29c11ca7b2769f993a131b6d9df35b33f3538c
pyrobus/utils.py
pyrobus/utils.py
from __future__ import division from threading import Thread from time import time, sleep from math import sin, pi class Sinus(object): update_frequency = 25.0 def __init__(self, motor, frequency, amplitude, offset, phase): self.motor = motor self.frequency = frequency self.amplitud...
Add a sinus utilities for the servo module.
Add a sinus utilities for the servo module.
Python
mit
pollen/pyrobus
Add a sinus utilities for the servo module.
from __future__ import division from threading import Thread from time import time, sleep from math import sin, pi class Sinus(object): update_frequency = 25.0 def __init__(self, motor, frequency, amplitude, offset, phase): self.motor = motor self.frequency = frequency self.amplitud...
<commit_before><commit_msg>Add a sinus utilities for the servo module.<commit_after>
from __future__ import division from threading import Thread from time import time, sleep from math import sin, pi class Sinus(object): update_frequency = 25.0 def __init__(self, motor, frequency, amplitude, offset, phase): self.motor = motor self.frequency = frequency self.amplitud...
Add a sinus utilities for the servo module.from __future__ import division from threading import Thread from time import time, sleep from math import sin, pi class Sinus(object): update_frequency = 25.0 def __init__(self, motor, frequency, amplitude, offset, phase): self.motor = motor self....
<commit_before><commit_msg>Add a sinus utilities for the servo module.<commit_after>from __future__ import division from threading import Thread from time import time, sleep from math import sin, pi class Sinus(object): update_frequency = 25.0 def __init__(self, motor, frequency, amplitude, offset, phase): ...
afc9ac087d4d5e31f25542579e5e0ade4d29a3c2
day-1-2.py
day-1-2.py
with open('day-1-input.txt', 'r') as f: puzzle_input = f.read() current_floor = 0 current_position = 0 for paren in puzzle_input: current_position += 1 if paren == '(': current_floor += 1 elif paren == ')': current_floor -= 1 if current_floor < 0: break print(current_po...
Complete day 1 part 2
Complete day 1 part 2
Python
mit
foxscotch/advent-of-code,foxscotch/advent-of-code
Complete day 1 part 2
with open('day-1-input.txt', 'r') as f: puzzle_input = f.read() current_floor = 0 current_position = 0 for paren in puzzle_input: current_position += 1 if paren == '(': current_floor += 1 elif paren == ')': current_floor -= 1 if current_floor < 0: break print(current_po...
<commit_before><commit_msg>Complete day 1 part 2<commit_after>
with open('day-1-input.txt', 'r') as f: puzzle_input = f.read() current_floor = 0 current_position = 0 for paren in puzzle_input: current_position += 1 if paren == '(': current_floor += 1 elif paren == ')': current_floor -= 1 if current_floor < 0: break print(current_po...
Complete day 1 part 2with open('day-1-input.txt', 'r') as f: puzzle_input = f.read() current_floor = 0 current_position = 0 for paren in puzzle_input: current_position += 1 if paren == '(': current_floor += 1 elif paren == ')': current_floor -= 1 if current_floor < 0: br...
<commit_before><commit_msg>Complete day 1 part 2<commit_after>with open('day-1-input.txt', 'r') as f: puzzle_input = f.read() current_floor = 0 current_position = 0 for paren in puzzle_input: current_position += 1 if paren == '(': current_floor += 1 elif paren == ')': current_floor -...
a455c8f667af831b53b10abf998cbcaef2e2e1dd
shuup/testing/migrations/0005_supplierprice.py
shuup/testing/migrations/0005_supplierprice.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shuup.utils.properties import shuup.core.fields class Migration(migrations.Migration): dependencies = [ ('shuup', '0051_supplier_enabled'), ('shuup_testing', '0004_fieldsmodel'), ]...
Add missing migration for unit tests
Add missing migration for unit tests
Python
agpl-3.0
shoopio/shoop,shoopio/shoop,shoopio/shoop
Add missing migration for unit tests
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shuup.utils.properties import shuup.core.fields class Migration(migrations.Migration): dependencies = [ ('shuup', '0051_supplier_enabled'), ('shuup_testing', '0004_fieldsmodel'), ]...
<commit_before><commit_msg>Add missing migration for unit tests<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shuup.utils.properties import shuup.core.fields class Migration(migrations.Migration): dependencies = [ ('shuup', '0051_supplier_enabled'), ('shuup_testing', '0004_fieldsmodel'), ]...
Add missing migration for unit tests# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shuup.utils.properties import shuup.core.fields class Migration(migrations.Migration): dependencies = [ ('shuup', '0051_supplier_enabled'), ('shuup_...
<commit_before><commit_msg>Add missing migration for unit tests<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models import shuup.utils.properties import shuup.core.fields class Migration(migrations.Migration): dependencies = [ ('shuup', '...
769d8b85ba9591d5640008dd2812c1db96cd3cef
cube_analysis/cube_utils.py
cube_analysis/cube_utils.py
from spectral_cube import SpectralCube, VaryingResolutionSpectralCube from astropy.io import fits import astropy.units as u import os from .io_utils import create_huge_fits from .progressbar import ProgressBar def convert_K(cube_name, output_folder, is_huge=True, verbose=False): ''' Convert a larger-than-me...
Add per channel K conversion function
Add per channel K conversion function
Python
mit
e-koch/CubeAnalysis
Add per channel K conversion function
from spectral_cube import SpectralCube, VaryingResolutionSpectralCube from astropy.io import fits import astropy.units as u import os from .io_utils import create_huge_fits from .progressbar import ProgressBar def convert_K(cube_name, output_folder, is_huge=True, verbose=False): ''' Convert a larger-than-me...
<commit_before><commit_msg>Add per channel K conversion function<commit_after>
from spectral_cube import SpectralCube, VaryingResolutionSpectralCube from astropy.io import fits import astropy.units as u import os from .io_utils import create_huge_fits from .progressbar import ProgressBar def convert_K(cube_name, output_folder, is_huge=True, verbose=False): ''' Convert a larger-than-me...
Add per channel K conversion function from spectral_cube import SpectralCube, VaryingResolutionSpectralCube from astropy.io import fits import astropy.units as u import os from .io_utils import create_huge_fits from .progressbar import ProgressBar def convert_K(cube_name, output_folder, is_huge=True, verbose=False):...
<commit_before><commit_msg>Add per channel K conversion function<commit_after> from spectral_cube import SpectralCube, VaryingResolutionSpectralCube from astropy.io import fits import astropy.units as u import os from .io_utils import create_huge_fits from .progressbar import ProgressBar def convert_K(cube_name, out...
9ea0dcb8a749461770dfeb7a77c6e3d210afa94e
clipped_loss.py
clipped_loss.py
from chainer import functions as F def clipped_loss(x, t): diff = x - t abs_loss = abs(diff) squared_loss = diff ** 2 abs_loss = F.expand_dims(abs_loss, 1) squared_loss = F.expand_dims(squared_loss, 1) return F.sum(F.min(F.concat((abs_loss, squared_loss), axis=1), axis=1))
Move clippped_loss into a separate file
Move clippped_loss into a separate file
Python
mit
toslunar/chainerrl,toslunar/chainerrl
Move clippped_loss into a separate file
from chainer import functions as F def clipped_loss(x, t): diff = x - t abs_loss = abs(diff) squared_loss = diff ** 2 abs_loss = F.expand_dims(abs_loss, 1) squared_loss = F.expand_dims(squared_loss, 1) return F.sum(F.min(F.concat((abs_loss, squared_loss), axis=1), axis=1))
<commit_before><commit_msg>Move clippped_loss into a separate file<commit_after>
from chainer import functions as F def clipped_loss(x, t): diff = x - t abs_loss = abs(diff) squared_loss = diff ** 2 abs_loss = F.expand_dims(abs_loss, 1) squared_loss = F.expand_dims(squared_loss, 1) return F.sum(F.min(F.concat((abs_loss, squared_loss), axis=1), axis=1))
Move clippped_loss into a separate filefrom chainer import functions as F def clipped_loss(x, t): diff = x - t abs_loss = abs(diff) squared_loss = diff ** 2 abs_loss = F.expand_dims(abs_loss, 1) squared_loss = F.expand_dims(squared_loss, 1) return F.sum(F.min(F.concat((abs_loss, squared_loss), ...
<commit_before><commit_msg>Move clippped_loss into a separate file<commit_after>from chainer import functions as F def clipped_loss(x, t): diff = x - t abs_loss = abs(diff) squared_loss = diff ** 2 abs_loss = F.expand_dims(abs_loss, 1) squared_loss = F.expand_dims(squared_loss, 1) return F.sum(...
ac19575d72a78b0c7a6e51a51738209ac7caf26e
extract.py
extract.py
#!/usr/bin/python3 import sys import os import subprocess if len(sys.argv) < 3: print("Provide reference image and output file.") exit(1) reference = sys.argv[1] output = sys.argv[2] path = os.getcwd() if len(sys.argv) == 3 else sys.argv[3] def get_time(path): result = subprocess.run(["master", "time", path], st...
Add pythons script to make charts.
Add pythons script to make charts.
Python
mit
ciechowoj/master,ciechowoj/master,ciechowoj/master
Add pythons script to make charts.
#!/usr/bin/python3 import sys import os import subprocess if len(sys.argv) < 3: print("Provide reference image and output file.") exit(1) reference = sys.argv[1] output = sys.argv[2] path = os.getcwd() if len(sys.argv) == 3 else sys.argv[3] def get_time(path): result = subprocess.run(["master", "time", path], st...
<commit_before><commit_msg>Add pythons script to make charts.<commit_after>
#!/usr/bin/python3 import sys import os import subprocess if len(sys.argv) < 3: print("Provide reference image and output file.") exit(1) reference = sys.argv[1] output = sys.argv[2] path = os.getcwd() if len(sys.argv) == 3 else sys.argv[3] def get_time(path): result = subprocess.run(["master", "time", path], st...
Add pythons script to make charts.#!/usr/bin/python3 import sys import os import subprocess if len(sys.argv) < 3: print("Provide reference image and output file.") exit(1) reference = sys.argv[1] output = sys.argv[2] path = os.getcwd() if len(sys.argv) == 3 else sys.argv[3] def get_time(path): result = subproces...
<commit_before><commit_msg>Add pythons script to make charts.<commit_after>#!/usr/bin/python3 import sys import os import subprocess if len(sys.argv) < 3: print("Provide reference image and output file.") exit(1) reference = sys.argv[1] output = sys.argv[2] path = os.getcwd() if len(sys.argv) == 3 else sys.argv[3]...
a1d2ec80dff63c7e208305207c697e5d3604a8f5
photutils/aperture/attributes.py
photutils/aperture/attributes.py
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Descriptor class(es) for aperture attribute validation. """ import weakref from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class ApertureAttribute: """ Base descriptor class for aperture attribute valid...
Add initial aperture descriptor classes
Add initial aperture descriptor classes
Python
bsd-3-clause
larrybradley/photutils,astropy/photutils
Add initial aperture descriptor classes
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Descriptor class(es) for aperture attribute validation. """ import weakref from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class ApertureAttribute: """ Base descriptor class for aperture attribute valid...
<commit_before><commit_msg>Add initial aperture descriptor classes<commit_after>
# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Descriptor class(es) for aperture attribute validation. """ import weakref from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class ApertureAttribute: """ Base descriptor class for aperture attribute valid...
Add initial aperture descriptor classes# Licensed under a 3-clause BSD style license - see LICENSE.rst """ Descriptor class(es) for aperture attribute validation. """ import weakref from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class ApertureAttribute: """ Base descri...
<commit_before><commit_msg>Add initial aperture descriptor classes<commit_after># Licensed under a 3-clause BSD style license - see LICENSE.rst """ Descriptor class(es) for aperture attribute validation. """ import weakref from astropy.coordinates import SkyCoord import astropy.units as u import numpy as np class A...
8d6c7623539a7109893c10aca0e116bf41b51634
web/migrations/versions/ad456cec28f4_add_user_name_column.py
web/migrations/versions/ad456cec28f4_add_user_name_column.py
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
Add column default for User.name column
Add column default for User.name column
Python
mit
usgo/online-ratings,usgo/online-ratings,usgo/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings,Kashomon/online-ratings
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
<commit_before>"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto g...
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto generated by Ale...
<commit_before>"""Add User.name column Revision ID: ad456cec28f4 Revises: d767d9266a19 Create Date: 2016-11-21 03:03:08.967762 """ # revision identifiers, used by Alembic. revision = 'ad456cec28f4' down_revision = 'd767d9266a19' from alembic import op import sqlalchemy as sa def upgrade(): ### commands auto g...
b07fcb6cc416c1b8c2a872e054069de218b7f3a5
accelerator/migrations/0077_update_sitetree_judging_commitment_view_url.py
accelerator/migrations/0077_update_sitetree_judging_commitment_view_url.py
# Generated by Django 2.2.24 on 2021-11-29 12:36 from django.db import migrations def update_judging_commitment_view_url(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTreeItem.objects.filter( url='/expert/commitments/').update(url='/judging/commitments/') class...
Merge remote-tracking branch 'origin' into AC-9265
[AC-9265] Merge remote-tracking branch 'origin' into AC-9265
Python
mit
masschallenge/django-accelerator,masschallenge/django-accelerator
[AC-9265] Merge remote-tracking branch 'origin' into AC-9265
# Generated by Django 2.2.24 on 2021-11-29 12:36 from django.db import migrations def update_judging_commitment_view_url(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTreeItem.objects.filter( url='/expert/commitments/').update(url='/judging/commitments/') class...
<commit_before><commit_msg>[AC-9265] Merge remote-tracking branch 'origin' into AC-9265<commit_after>
# Generated by Django 2.2.24 on 2021-11-29 12:36 from django.db import migrations def update_judging_commitment_view_url(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTreeItem.objects.filter( url='/expert/commitments/').update(url='/judging/commitments/') class...
[AC-9265] Merge remote-tracking branch 'origin' into AC-9265# Generated by Django 2.2.24 on 2021-11-29 12:36 from django.db import migrations def update_judging_commitment_view_url(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTreeItem.objects.filter( url='/exper...
<commit_before><commit_msg>[AC-9265] Merge remote-tracking branch 'origin' into AC-9265<commit_after># Generated by Django 2.2.24 on 2021-11-29 12:36 from django.db import migrations def update_judging_commitment_view_url(apps, schema_editor): NavTreeItem = apps.get_model('accelerator', 'NavTreeItem') NavTre...
b0cafcf2b4ca61f5d2581c833851f9ac24968a98
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/Numpy.py
Sketches/JT/Jam/library/trunk/Kamaelia/Apps/Jam/Util/Numpy.py
import Axon class TypeConverter(Axon.Component.component): type = None def main(self): while 1: if self.dataReady("inbox"): data = self.recv("inbox") if self.type != None: self.send(data.astype(self.type), "outbox") if not self...
Add component for converting between numpy types
Add component for converting between numpy types
Python
apache-2.0
sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia,sparkslabs/kamaelia
Add component for converting between numpy types
import Axon class TypeConverter(Axon.Component.component): type = None def main(self): while 1: if self.dataReady("inbox"): data = self.recv("inbox") if self.type != None: self.send(data.astype(self.type), "outbox") if not self...
<commit_before><commit_msg>Add component for converting between numpy types<commit_after>
import Axon class TypeConverter(Axon.Component.component): type = None def main(self): while 1: if self.dataReady("inbox"): data = self.recv("inbox") if self.type != None: self.send(data.astype(self.type), "outbox") if not self...
Add component for converting between numpy typesimport Axon class TypeConverter(Axon.Component.component): type = None def main(self): while 1: if self.dataReady("inbox"): data = self.recv("inbox") if self.type != None: self.send(data.asty...
<commit_before><commit_msg>Add component for converting between numpy types<commit_after>import Axon class TypeConverter(Axon.Component.component): type = None def main(self): while 1: if self.dataReady("inbox"): data = self.recv("inbox") if self.type != None...
3e8a16b270c28fb955e1ab3e38da0aae2d0d6128
src/tmlib/workflow/metaconfig/niselements.py
src/tmlib/workflow/metaconfig/niselements.py
'''Implementation of classes for reading microscope image and metadata files provided in a format specific to microscopes equipped with `Nikon NISElements <https://www.nikoninstruments.com/Products/Software>`_ software. ''' import os import re import logging import bioformats from collections import defaultdict from ...
Implement new microscope type for nikon NISElements
Implement new microscope type for nikon NISElements
Python
agpl-3.0
TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary,TissueMAPS/TmLibrary
Implement new microscope type for nikon NISElements
'''Implementation of classes for reading microscope image and metadata files provided in a format specific to microscopes equipped with `Nikon NISElements <https://www.nikoninstruments.com/Products/Software>`_ software. ''' import os import re import logging import bioformats from collections import defaultdict from ...
<commit_before><commit_msg>Implement new microscope type for nikon NISElements<commit_after>
'''Implementation of classes for reading microscope image and metadata files provided in a format specific to microscopes equipped with `Nikon NISElements <https://www.nikoninstruments.com/Products/Software>`_ software. ''' import os import re import logging import bioformats from collections import defaultdict from ...
Implement new microscope type for nikon NISElements'''Implementation of classes for reading microscope image and metadata files provided in a format specific to microscopes equipped with `Nikon NISElements <https://www.nikoninstruments.com/Products/Software>`_ software. ''' import os import re import logging import bi...
<commit_before><commit_msg>Implement new microscope type for nikon NISElements<commit_after>'''Implementation of classes for reading microscope image and metadata files provided in a format specific to microscopes equipped with `Nikon NISElements <https://www.nikoninstruments.com/Products/Software>`_ software. ''' imp...
95009e638dfa5a20a7277a326607ba7090162fc0
seleniumbase/common/obfuscate.py
seleniumbase/common/obfuscate.py
""" Obfuscates a string/password into a string that can be decrypted later on. Usage: python obfuscate.py Then enter the password. The result is an encrypted password. """ from seleniumbase.common import encryption import getpass import time def main(): try: while(1): print("\nEnter password...
Add the user interface for string/password obfuscation
Add the user interface for string/password obfuscation
Python
mit
seleniumbase/SeleniumBase,mdmintz/SeleniumBase,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase,seleniumbase/SeleniumBase,seleniumbase/SeleniumBase,mdmintz/seleniumspot,mdmintz/SeleniumBase
Add the user interface for string/password obfuscation
""" Obfuscates a string/password into a string that can be decrypted later on. Usage: python obfuscate.py Then enter the password. The result is an encrypted password. """ from seleniumbase.common import encryption import getpass import time def main(): try: while(1): print("\nEnter password...
<commit_before><commit_msg>Add the user interface for string/password obfuscation<commit_after>
""" Obfuscates a string/password into a string that can be decrypted later on. Usage: python obfuscate.py Then enter the password. The result is an encrypted password. """ from seleniumbase.common import encryption import getpass import time def main(): try: while(1): print("\nEnter password...
Add the user interface for string/password obfuscation""" Obfuscates a string/password into a string that can be decrypted later on. Usage: python obfuscate.py Then enter the password. The result is an encrypted password. """ from seleniumbase.common import encryption import getpass import time def main(): try:...
<commit_before><commit_msg>Add the user interface for string/password obfuscation<commit_after>""" Obfuscates a string/password into a string that can be decrypted later on. Usage: python obfuscate.py Then enter the password. The result is an encrypted password. """ from seleniumbase.common import encryption import g...
4cc7d842afbb9ca2f324886de1974e7dacb600dd
dlexperiment.py
dlexperiment.py
class Experiment(object): def __init__(self, epochs=1): self.epochs = epochs def get_epochs(self): return self.epochs def train(self): raise NotImplementedError def test(self): raise NotImplementedError def set_loss(self): raise NotImplementedError de...
Add outline parent class for defining experiments
Add outline parent class for defining experiments
Python
apache-2.0
sagelywizard/dlex
Add outline parent class for defining experiments
class Experiment(object): def __init__(self, epochs=1): self.epochs = epochs def get_epochs(self): return self.epochs def train(self): raise NotImplementedError def test(self): raise NotImplementedError def set_loss(self): raise NotImplementedError de...
<commit_before><commit_msg>Add outline parent class for defining experiments<commit_after>
class Experiment(object): def __init__(self, epochs=1): self.epochs = epochs def get_epochs(self): return self.epochs def train(self): raise NotImplementedError def test(self): raise NotImplementedError def set_loss(self): raise NotImplementedError de...
Add outline parent class for defining experimentsclass Experiment(object): def __init__(self, epochs=1): self.epochs = epochs def get_epochs(self): return self.epochs def train(self): raise NotImplementedError def test(self): raise NotImplementedError def set_loss...
<commit_before><commit_msg>Add outline parent class for defining experiments<commit_after>class Experiment(object): def __init__(self, epochs=1): self.epochs = epochs def get_epochs(self): return self.epochs def train(self): raise NotImplementedError def test(self): ra...
143500bc7064b05d0ce4a132cce1f48ddb1ecee7
rwt/tests/test_scripts.py
rwt/tests/test_scripts.py
import textwrap import sys import subprocess def test_pkg_imported(tmpdir): """ Create a script that loads cython and ensure it runs. """ body = textwrap.dedent(""" import cython print("Successfully imported cython") """).lstrip() script_file = tmpdir / 'script' script_file.write_text(body, 'utf-8') pip_...
Add test for basic functionality
Add test for basic functionality
Python
mit
jaraco/rwt
Add test for basic functionality
import textwrap import sys import subprocess def test_pkg_imported(tmpdir): """ Create a script that loads cython and ensure it runs. """ body = textwrap.dedent(""" import cython print("Successfully imported cython") """).lstrip() script_file = tmpdir / 'script' script_file.write_text(body, 'utf-8') pip_...
<commit_before><commit_msg>Add test for basic functionality<commit_after>
import textwrap import sys import subprocess def test_pkg_imported(tmpdir): """ Create a script that loads cython and ensure it runs. """ body = textwrap.dedent(""" import cython print("Successfully imported cython") """).lstrip() script_file = tmpdir / 'script' script_file.write_text(body, 'utf-8') pip_...
Add test for basic functionalityimport textwrap import sys import subprocess def test_pkg_imported(tmpdir): """ Create a script that loads cython and ensure it runs. """ body = textwrap.dedent(""" import cython print("Successfully imported cython") """).lstrip() script_file = tmpdir / 'script' script_file...
<commit_before><commit_msg>Add test for basic functionality<commit_after>import textwrap import sys import subprocess def test_pkg_imported(tmpdir): """ Create a script that loads cython and ensure it runs. """ body = textwrap.dedent(""" import cython print("Successfully imported cython") """).lstrip() scr...
83863814795bf2fc6ddf12c1a45aa531afb1662c
tests/backends/events_test.py
tests/backends/events_test.py
import threading import unittest from pykka.actor import ThreadingActor from pykka.registry import ActorRegistry from mopidy.backends.dummy import DummyBackend from mopidy.listeners import BackendListener from mopidy.models import Track class BackendEventsTest(unittest.TestCase): def setUp(self): self.ev...
Test that backend actually sends the events
Test that backend actually sends the events
Python
apache-2.0
kingosticks/mopidy,diandiankan/mopidy,glogiotatidis/mopidy,vrs01/mopidy,dbrgn/mopidy,liamw9534/mopidy,SuperStarPL/mopidy,quartz55/mopidy,ZenithDK/mopidy,diandiankan/mopidy,ali/mopidy,kingosticks/mopidy,vrs01/mopidy,pacificIT/mopidy,ali/mopidy,diandiankan/mopidy,rawdlite/mopidy,vrs01/mopidy,bencevans/mopidy,tkem/mopidy,...
Test that backend actually sends the events
import threading import unittest from pykka.actor import ThreadingActor from pykka.registry import ActorRegistry from mopidy.backends.dummy import DummyBackend from mopidy.listeners import BackendListener from mopidy.models import Track class BackendEventsTest(unittest.TestCase): def setUp(self): self.ev...
<commit_before><commit_msg>Test that backend actually sends the events<commit_after>
import threading import unittest from pykka.actor import ThreadingActor from pykka.registry import ActorRegistry from mopidy.backends.dummy import DummyBackend from mopidy.listeners import BackendListener from mopidy.models import Track class BackendEventsTest(unittest.TestCase): def setUp(self): self.ev...
Test that backend actually sends the eventsimport threading import unittest from pykka.actor import ThreadingActor from pykka.registry import ActorRegistry from mopidy.backends.dummy import DummyBackend from mopidy.listeners import BackendListener from mopidy.models import Track class BackendEventsTest(unittest.Test...
<commit_before><commit_msg>Test that backend actually sends the events<commit_after>import threading import unittest from pykka.actor import ThreadingActor from pykka.registry import ActorRegistry from mopidy.backends.dummy import DummyBackend from mopidy.listeners import BackendListener from mopidy.models import Tra...
48c5e7ce3029ab67c755b6fa0c08412525bd0a0a
mapApp/utils/weather4all.py
mapApp/utils/weather4all.py
from mapApp.models import Incident, Weather from mapApp.utils.weather import get_weather import threading import time maxconnections = 5 semaphore = threading.Semaphore(maxconnections) def run(): """ Create Weather instances for all Incidents in the application database if they do not already exist """ st...
Write multithreaded script to get all weather for existing incidents in the database
Write multithreaded script to get all weather for existing incidents in the database
Python
mit
SPARLab/BikeMaps,SPARLab/BikeMaps,SPARLab/BikeMaps
Write multithreaded script to get all weather for existing incidents in the database
from mapApp.models import Incident, Weather from mapApp.utils.weather import get_weather import threading import time maxconnections = 5 semaphore = threading.Semaphore(maxconnections) def run(): """ Create Weather instances for all Incidents in the application database if they do not already exist """ st...
<commit_before><commit_msg>Write multithreaded script to get all weather for existing incidents in the database<commit_after>
from mapApp.models import Incident, Weather from mapApp.utils.weather import get_weather import threading import time maxconnections = 5 semaphore = threading.Semaphore(maxconnections) def run(): """ Create Weather instances for all Incidents in the application database if they do not already exist """ st...
Write multithreaded script to get all weather for existing incidents in the databasefrom mapApp.models import Incident, Weather from mapApp.utils.weather import get_weather import threading import time maxconnections = 5 semaphore = threading.Semaphore(maxconnections) def run(): """ Create Weather instances for a...
<commit_before><commit_msg>Write multithreaded script to get all weather for existing incidents in the database<commit_after>from mapApp.models import Incident, Weather from mapApp.utils.weather import get_weather import threading import time maxconnections = 5 semaphore = threading.Semaphore(maxconnections) def run(...
c5631d19baecb2884d4dbc98ecaa333c615efbab
fabix/aws/s3.py
fabix/aws/s3.py
import os import boto from boto.utils import compute_md5 from fabric.decorators import task from fabric.utils import puts def upload_file(bucket, key_name, file_path, policy='public-read'): key = bucket.new_key(key_name) fd = open(file_path) md5 = compute_md5(fd) fd.close() key.set_metadata('fabi...
Add task to upload a dir to S3
Add task to upload a dir to S3
Python
mit
vmalavolta/fabix
Add task to upload a dir to S3
import os import boto from boto.utils import compute_md5 from fabric.decorators import task from fabric.utils import puts def upload_file(bucket, key_name, file_path, policy='public-read'): key = bucket.new_key(key_name) fd = open(file_path) md5 = compute_md5(fd) fd.close() key.set_metadata('fabi...
<commit_before><commit_msg>Add task to upload a dir to S3<commit_after>
import os import boto from boto.utils import compute_md5 from fabric.decorators import task from fabric.utils import puts def upload_file(bucket, key_name, file_path, policy='public-read'): key = bucket.new_key(key_name) fd = open(file_path) md5 = compute_md5(fd) fd.close() key.set_metadata('fabi...
Add task to upload a dir to S3import os import boto from boto.utils import compute_md5 from fabric.decorators import task from fabric.utils import puts def upload_file(bucket, key_name, file_path, policy='public-read'): key = bucket.new_key(key_name) fd = open(file_path) md5 = compute_md5(fd) fd.clos...
<commit_before><commit_msg>Add task to upload a dir to S3<commit_after>import os import boto from boto.utils import compute_md5 from fabric.decorators import task from fabric.utils import puts def upload_file(bucket, key_name, file_path, policy='public-read'): key = bucket.new_key(key_name) fd = open(file_pa...
4a2be1f9526f66ee9c909bcfa1f987d696dafeac
oneflow/settings/snippets/common_development.py
oneflow/settings/snippets/common_development.py
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
Fix the devserver default address setting name.
Fix the devserver default address setting name.
Python
agpl-3.0
WillianPaiva/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
<commit_before># # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000...
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
# # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000/, everything i...
<commit_before># # Include your development machines hostnames here. # # NOTE: this is not strictly needed, as Django doesn't enforce # the check if DEBUG==True. But Just in case you wanted to disable # it temporarily, this could be a good thing to have your hostname # here. # # If you connect via http://localhost:8000...
6c885eb92d7e150e39297d32c45fc8d69aae099f
tools/update-qibuild-cmake.py
tools/update-qibuild-cmake.py
## Copyright (C) 2011 Aldebaran Robotics # Update all the qibuild.cmake files in a git repo # (this will be done automatically by `qibuild configure`, # but this tool can still be handy) import os import argparse import subprocess import shutil def update_qibuild_cmake(template_path, git_repo): """ Update qibuil...
Add a small too to update qibuild.cmake inside git repos
Add a small too to update qibuild.cmake inside git repos
Python
bsd-3-clause
dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,dmerejkowsky/qibuild,aldebaran/qibuild,aldebaran/qibuild
Add a small too to update qibuild.cmake inside git repos
## Copyright (C) 2011 Aldebaran Robotics # Update all the qibuild.cmake files in a git repo # (this will be done automatically by `qibuild configure`, # but this tool can still be handy) import os import argparse import subprocess import shutil def update_qibuild_cmake(template_path, git_repo): """ Update qibuil...
<commit_before><commit_msg>Add a small too to update qibuild.cmake inside git repos<commit_after>
## Copyright (C) 2011 Aldebaran Robotics # Update all the qibuild.cmake files in a git repo # (this will be done automatically by `qibuild configure`, # but this tool can still be handy) import os import argparse import subprocess import shutil def update_qibuild_cmake(template_path, git_repo): """ Update qibuil...
Add a small too to update qibuild.cmake inside git repos## Copyright (C) 2011 Aldebaran Robotics # Update all the qibuild.cmake files in a git repo # (this will be done automatically by `qibuild configure`, # but this tool can still be handy) import os import argparse import subprocess import shutil def update_qibui...
<commit_before><commit_msg>Add a small too to update qibuild.cmake inside git repos<commit_after>## Copyright (C) 2011 Aldebaran Robotics # Update all the qibuild.cmake files in a git repo # (this will be done automatically by `qibuild configure`, # but this tool can still be handy) import os import argparse import s...
3bf027eaf2c62ec6fcb3192cfddc5a2aa8b73895
oneflow/settings/chani.py
oneflow/settings/chani.py
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
Make mail working on my dev machine.
Make mail working on my dev machine.
Python
agpl-3.0
1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow,WillianPaiva/1flow,1flow/1flow,1flow/1flow,1flow/1flow,WillianPaiva/1flow,WillianPaiva/1flow
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
<commit_before># -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', ...
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
# -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', 'common', ...
<commit_before># -*- coding: utf-8 -*- # Settings for 1flow.net (local development) import os from sparks.django.settings import include_snippets include_snippets( os.path.dirname(__file__), ( '00_development', # Activate this to test 404/500… #'00_production', '1flow_io', ...
76c2be209e04e38b4730a07a5155e3e22501027a
som_generationkwh/migrations/0.0.1.1/pre-0001_delete_inactive_investments.py
som_generationkwh/migrations/0.0.1.1/pre-0001_delete_inactive_investments.py
# coding=utf-8 from oopgrade import oopgrade import netsvc def up(cursor, installed_version): logger= netsvc.Logger() print "somenergia-generationkwh_0.0.1.1: Hem entrat al UP" if not installed_version: return logger.notifyChannel('migration', netsvc.LOG_INFO, 'Changing ir_model_data from gis...
Change version terp and move migration folder
Change version terp and move migration folder
Python
agpl-3.0
Som-Energia/somenergia-generationkwh,Som-Energia/somenergia-generationkwh
Change version terp and move migration folder
# coding=utf-8 from oopgrade import oopgrade import netsvc def up(cursor, installed_version): logger= netsvc.Logger() print "somenergia-generationkwh_0.0.1.1: Hem entrat al UP" if not installed_version: return logger.notifyChannel('migration', netsvc.LOG_INFO, 'Changing ir_model_data from gis...
<commit_before><commit_msg>Change version terp and move migration folder<commit_after>
# coding=utf-8 from oopgrade import oopgrade import netsvc def up(cursor, installed_version): logger= netsvc.Logger() print "somenergia-generationkwh_0.0.1.1: Hem entrat al UP" if not installed_version: return logger.notifyChannel('migration', netsvc.LOG_INFO, 'Changing ir_model_data from gis...
Change version terp and move migration folder# coding=utf-8 from oopgrade import oopgrade import netsvc def up(cursor, installed_version): logger= netsvc.Logger() print "somenergia-generationkwh_0.0.1.1: Hem entrat al UP" if not installed_version: return logger.notifyChannel('migration', nets...
<commit_before><commit_msg>Change version terp and move migration folder<commit_after># coding=utf-8 from oopgrade import oopgrade import netsvc def up(cursor, installed_version): logger= netsvc.Logger() print "somenergia-generationkwh_0.0.1.1: Hem entrat al UP" if not installed_version: return ...
977fb316f3a27f6516fac2a6323545381fdd7cc0
sparts/tasks/periodic.py
sparts/tasks/periodic.py
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
Fix time calculation for TryLater in PeriodicTasks
Fix time calculation for TryLater in PeriodicTasks
Python
bsd-3-clause
djipko/sparts,pshuff/sparts,fmoo/sparts,bboozzoo/sparts,djipko/sparts,pshuff/sparts,bboozzoo/sparts,facebook/sparts,facebook/sparts,fmoo/sparts
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
<commit_before>from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_it...
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_iterations = coun...
<commit_before>from ..vtask import VTask, TryLater import time from ..sparts import option, counter, samples, SampleType from threading import Event class PeriodicTask(VTask): INTERVAL = None execute_duration = samples(windows=[60, 240], types=[SampleType.AVG, SampleType.MAX, SampleType.MIN]) n_it...
5cabd890b65102e3a28fa864af45bec19ee0e601
index_converter.py
index_converter.py
# -*- coding: utf-8 -*- """Converting the index from the Archives in a suitable format.""" __authors__ = 'User:Jean-Frédéric' import codecs from uploadlibrary import UnicodeCSV import sys import re reload(sys) sys.setdefaultencoding('utf-8') def read_csv(csv_file, delimiter): """Read the CSV file and return ea...
Add script to convert the archives index
Add script to convert the archives index The Archives provided us with an index mapping a place to a range of identifier. This needs some work to be useful.
Python
mit
JeanFred/TrutatBis
Add script to convert the archives index The Archives provided us with an index mapping a place to a range of identifier. This needs some work to be useful.
# -*- coding: utf-8 -*- """Converting the index from the Archives in a suitable format.""" __authors__ = 'User:Jean-Frédéric' import codecs from uploadlibrary import UnicodeCSV import sys import re reload(sys) sys.setdefaultencoding('utf-8') def read_csv(csv_file, delimiter): """Read the CSV file and return ea...
<commit_before><commit_msg>Add script to convert the archives index The Archives provided us with an index mapping a place to a range of identifier. This needs some work to be useful.<commit_after>
# -*- coding: utf-8 -*- """Converting the index from the Archives in a suitable format.""" __authors__ = 'User:Jean-Frédéric' import codecs from uploadlibrary import UnicodeCSV import sys import re reload(sys) sys.setdefaultencoding('utf-8') def read_csv(csv_file, delimiter): """Read the CSV file and return ea...
Add script to convert the archives index The Archives provided us with an index mapping a place to a range of identifier. This needs some work to be useful.# -*- coding: utf-8 -*- """Converting the index from the Archives in a suitable format.""" __authors__ = 'User:Jean-Frédéric' import codecs from uploadlibrary i...
<commit_before><commit_msg>Add script to convert the archives index The Archives provided us with an index mapping a place to a range of identifier. This needs some work to be useful.<commit_after># -*- coding: utf-8 -*- """Converting the index from the Archives in a suitable format.""" __authors__ = 'User:Jean-Fréd...
bb3502e96cd4c3636a75dbf5c3156c2b54e54577
timeside/server/management/commands/timeside-celery-worker.py
timeside/server/management/commands/timeside-celery-worker.py
import shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload # thanks to https://medium.com/aubergine-solutions/auto-reload-development-mode-for-celery-worker-using-docker-compose-and-django-management-2ba8e313eb37 def restart_celery(*args, **kwargs): ki...
Add worker celery reload command prototype
Add worker celery reload command prototype
Python
agpl-3.0
Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide,Parisson/TimeSide
Add worker celery reload command prototype
import shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload # thanks to https://medium.com/aubergine-solutions/auto-reload-development-mode-for-celery-worker-using-docker-compose-and-django-management-2ba8e313eb37 def restart_celery(*args, **kwargs): ki...
<commit_before><commit_msg>Add worker celery reload command prototype<commit_after>
import shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload # thanks to https://medium.com/aubergine-solutions/auto-reload-development-mode-for-celery-worker-using-docker-compose-and-django-management-2ba8e313eb37 def restart_celery(*args, **kwargs): ki...
Add worker celery reload command prototypeimport shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload # thanks to https://medium.com/aubergine-solutions/auto-reload-development-mode-for-celery-worker-using-docker-compose-and-django-management-2ba8e313eb37 d...
<commit_before><commit_msg>Add worker celery reload command prototype<commit_after>import shlex import subprocess from django.core.management.base import BaseCommand from django.utils import autoreload # thanks to https://medium.com/aubergine-solutions/auto-reload-development-mode-for-celery-worker-using-docker-compo...
953bc05e048cb7e00db540254103ec86664ad1d6
analysis/11-compress-jacobians.py
analysis/11-compress-jacobians.py
import climate import logging import numpy as np import os from sklearn.decomposition import PCA def compress(source, k='mle', key='jac'): filenames = sorted(fn for fn in os.listdir(source) if key in fn and fn.endswith('.npy')) logging.info('%s: found %d jacobians matching %s', ...
Add script for PCA compressing jacobian arrays.
Add script for PCA compressing jacobian arrays.
Python
mit
lmjohns3/cube-experiment,lmjohns3/cube-experiment,lmjohns3/cube-experiment
Add script for PCA compressing jacobian arrays.
import climate import logging import numpy as np import os from sklearn.decomposition import PCA def compress(source, k='mle', key='jac'): filenames = sorted(fn for fn in os.listdir(source) if key in fn and fn.endswith('.npy')) logging.info('%s: found %d jacobians matching %s', ...
<commit_before><commit_msg>Add script for PCA compressing jacobian arrays.<commit_after>
import climate import logging import numpy as np import os from sklearn.decomposition import PCA def compress(source, k='mle', key='jac'): filenames = sorted(fn for fn in os.listdir(source) if key in fn and fn.endswith('.npy')) logging.info('%s: found %d jacobians matching %s', ...
Add script for PCA compressing jacobian arrays.import climate import logging import numpy as np import os from sklearn.decomposition import PCA def compress(source, k='mle', key='jac'): filenames = sorted(fn for fn in os.listdir(source) if key in fn and fn.endswith('.npy')) logging.inf...
<commit_before><commit_msg>Add script for PCA compressing jacobian arrays.<commit_after>import climate import logging import numpy as np import os from sklearn.decomposition import PCA def compress(source, k='mle', key='jac'): filenames = sorted(fn for fn in os.listdir(source) if key in fn...
7b2c082f117a5481823c806af926b812045933e7
recipy/PatchMultipleWrappers.py
recipy/PatchMultipleWrappers.py
import six from .PatchImporter import PatchImporter from recipyCommon.utils import patch_function, create_wrapper from recipyCommon.config import option_set class PatchMultipleWrappers(PatchImporter): """Sublass of PatchImporter that allows patching input and output functions using more than two wrappers. ...
Add new patch type that allows for multiple wrappers
Add new patch type that allows for multiple wrappers PatchSimple allows for exactly one wrapper for input and output functions respectively. For xarray output function save_mfdataset, the default wrapper which logs argument 0 does not work, because it should be argument 1 that is logged. So, a second wrapper is requir...
Python
apache-2.0
recipy/recipy,recipy/recipy
Add new patch type that allows for multiple wrappers PatchSimple allows for exactly one wrapper for input and output functions respectively. For xarray output function save_mfdataset, the default wrapper which logs argument 0 does not work, because it should be argument 1 that is logged. So, a second wrapper is requir...
import six from .PatchImporter import PatchImporter from recipyCommon.utils import patch_function, create_wrapper from recipyCommon.config import option_set class PatchMultipleWrappers(PatchImporter): """Sublass of PatchImporter that allows patching input and output functions using more than two wrappers. ...
<commit_before><commit_msg>Add new patch type that allows for multiple wrappers PatchSimple allows for exactly one wrapper for input and output functions respectively. For xarray output function save_mfdataset, the default wrapper which logs argument 0 does not work, because it should be argument 1 that is logged. So,...
import six from .PatchImporter import PatchImporter from recipyCommon.utils import patch_function, create_wrapper from recipyCommon.config import option_set class PatchMultipleWrappers(PatchImporter): """Sublass of PatchImporter that allows patching input and output functions using more than two wrappers. ...
Add new patch type that allows for multiple wrappers PatchSimple allows for exactly one wrapper for input and output functions respectively. For xarray output function save_mfdataset, the default wrapper which logs argument 0 does not work, because it should be argument 1 that is logged. So, a second wrapper is requir...
<commit_before><commit_msg>Add new patch type that allows for multiple wrappers PatchSimple allows for exactly one wrapper for input and output functions respectively. For xarray output function save_mfdataset, the default wrapper which logs argument 0 does not work, because it should be argument 1 that is logged. So,...
25cf11421fc3f123e4d623f9736867b3800412ba
python3_tools/get_edx_webservices.py
python3_tools/get_edx_webservices.py
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
Add tooling to get all of edx's web services.
Add tooling to get all of edx's web services.
Python
apache-2.0
edx/repo-tools,edx/repo-tools
Add tooling to get all of edx's web services.
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
<commit_before><commit_msg>Add tooling to get all of edx's web services.<commit_after>
import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags']: print("{}".format(repo.html_url))...
Add tooling to get all of edx's web services.import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in metadata and 'webservice' in metadata['tags...
<commit_before><commit_msg>Add tooling to get all of edx's web services.<commit_after>import github from get_repos import * webservices = [] for repo in expanded_repos_list(orgs): try: metadata = get_remote_yaml(repo, 'openedx.yaml') except github.GithubException: continue if 'tags' in me...
1ced12173272a670b001cf17aa0beb08bae2eb8a
scipy/fftpack/realtransforms.py
scipy/fftpack/realtransforms.py
""" Real spectrum tranforms (DCT, DST, MDCT) """ __all__ = ['dct1', 'dct2'] import numpy as np from scipy.fftpack import _fftpack import atexit atexit.register(_fftpack.destroy_dct1_cache) atexit.register(_fftpack.destroy_dct2_cache) def dct1(x, n=None): """ Return Discrete Cosine Transform (type I) of arbi...
Add python wrapper around fftpack dct.
Add python wrapper around fftpack dct.
Python
bsd-3-clause
ilayn/scipy,ortylp/scipy,kalvdans/scipy,perimosocordiae/scipy,surhudm/scipy,witcxc/scipy,befelix/scipy,pbrod/scipy,minhlongdo/scipy,efiring/scipy,sauliusl/scipy,vanpact/scipy,cpaulik/scipy,sriki18/scipy,endolith/scipy,jjhelmus/scipy,giorgiop/scipy,vigna/scipy,apbard/scipy,WarrenWeckesser/scipy,larsmans/scipy,woodscn/sc...
Add python wrapper around fftpack dct.
""" Real spectrum tranforms (DCT, DST, MDCT) """ __all__ = ['dct1', 'dct2'] import numpy as np from scipy.fftpack import _fftpack import atexit atexit.register(_fftpack.destroy_dct1_cache) atexit.register(_fftpack.destroy_dct2_cache) def dct1(x, n=None): """ Return Discrete Cosine Transform (type I) of arbi...
<commit_before><commit_msg>Add python wrapper around fftpack dct.<commit_after>
""" Real spectrum tranforms (DCT, DST, MDCT) """ __all__ = ['dct1', 'dct2'] import numpy as np from scipy.fftpack import _fftpack import atexit atexit.register(_fftpack.destroy_dct1_cache) atexit.register(_fftpack.destroy_dct2_cache) def dct1(x, n=None): """ Return Discrete Cosine Transform (type I) of arbi...
Add python wrapper around fftpack dct.""" Real spectrum tranforms (DCT, DST, MDCT) """ __all__ = ['dct1', 'dct2'] import numpy as np from scipy.fftpack import _fftpack import atexit atexit.register(_fftpack.destroy_dct1_cache) atexit.register(_fftpack.destroy_dct2_cache) def dct1(x, n=None): """ Return Disc...
<commit_before><commit_msg>Add python wrapper around fftpack dct.<commit_after>""" Real spectrum tranforms (DCT, DST, MDCT) """ __all__ = ['dct1', 'dct2'] import numpy as np from scipy.fftpack import _fftpack import atexit atexit.register(_fftpack.destroy_dct1_cache) atexit.register(_fftpack.destroy_dct2_cache) def...
d215b6d00d06ffa9917b7bdf8323f33d83e35cf7
src/waldur_mastermind/support/management/commands/switching_backend_server.py
src/waldur_mastermind/support/management/commands/switching_backend_server.py
from django.core.management.base import BaseCommand from waldur_mastermind.support import backend as support_backend from ... import models class Command(BaseCommand): help = ("Backend data update if a server was switched.") def handle(self, *args, **options): models.RequestType.objects.all().delet...
Implement management command to switch backend server in JIRA Service Desk plugin.
Implement management command to switch backend server in JIRA Service Desk plugin.
Python
mit
opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur
Implement management command to switch backend server in JIRA Service Desk plugin.
from django.core.management.base import BaseCommand from waldur_mastermind.support import backend as support_backend from ... import models class Command(BaseCommand): help = ("Backend data update if a server was switched.") def handle(self, *args, **options): models.RequestType.objects.all().delet...
<commit_before><commit_msg>Implement management command to switch backend server in JIRA Service Desk plugin.<commit_after>
from django.core.management.base import BaseCommand from waldur_mastermind.support import backend as support_backend from ... import models class Command(BaseCommand): help = ("Backend data update if a server was switched.") def handle(self, *args, **options): models.RequestType.objects.all().delet...
Implement management command to switch backend server in JIRA Service Desk plugin.from django.core.management.base import BaseCommand from waldur_mastermind.support import backend as support_backend from ... import models class Command(BaseCommand): help = ("Backend data update if a server was switched.") ...
<commit_before><commit_msg>Implement management command to switch backend server in JIRA Service Desk plugin.<commit_after>from django.core.management.base import BaseCommand from waldur_mastermind.support import backend as support_backend from ... import models class Command(BaseCommand): help = ("Backend data...
4374eb9cf20350f1d5610bfbae358dbb733bb044
python/subnets-in-cidr.py
python/subnets-in-cidr.py
#!/usr/bin/python import argparse import netaddr import os import infoblox_netmri parser = argparse.ArgumentParser() parser.add_argument("cidr") args = parser.parse_args() print("Searching for subnets in %s." % args.cidr) url = os.environ['NETMRI_API_URL'] user = os.environ['NETMRI_USER'] password = os.environ['N...
Add a sample script for searching subnets in a CIDR
Add a sample script for searching subnets in a CIDR See request in community: https://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha ve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430
Python
mit
infobloxopen/netmri-toolkit,infobloxopen/netmri-toolkit,infobloxopen/netmri-toolkit
Add a sample script for searching subnets in a CIDR See request in community: https://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha ve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430
#!/usr/bin/python import argparse import netaddr import os import infoblox_netmri parser = argparse.ArgumentParser() parser.add_argument("cidr") args = parser.parse_args() print("Searching for subnets in %s." % args.cidr) url = os.environ['NETMRI_API_URL'] user = os.environ['NETMRI_USER'] password = os.environ['N...
<commit_before><commit_msg>Add a sample script for searching subnets in a CIDR See request in community: https://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha ve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430<commit_after>
#!/usr/bin/python import argparse import netaddr import os import infoblox_netmri parser = argparse.ArgumentParser() parser.add_argument("cidr") args = parser.parse_args() print("Searching for subnets in %s." % args.cidr) url = os.environ['NETMRI_API_URL'] user = os.environ['NETMRI_USER'] password = os.environ['N...
Add a sample script for searching subnets in a CIDR See request in community: https://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha ve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430#!/usr/bin/python import argparse import netaddr import os import infoblox_netmri parser = arg...
<commit_before><commit_msg>Add a sample script for searching subnets in a CIDR See request in community: https://community.infoblox.com/t5/Network-Change-Configuration/Anyone-ha ve-an-Example-NetMRI-REST-call-using-filters-in-Python/m-p/5021#M1430<commit_after>#!/usr/bin/python import argparse import netaddr import...
5df6e6b3ec523376906abeb8a52eb6c5dc5d46ec
openquake/commands/webui.py
openquake/commands/webui.py
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Add a command to start the WebUI using oq
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: bbfc5549fb632d535ed1934e0d2bd1226ccd4507
Python
agpl-3.0
gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine,gem/oq-engine
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: bbfc5549fb632d535ed1934e0d2bd1226ccd4507
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
<commit_before><commit_msg>Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: bbfc5549fb632d535ed1934e0d2bd1226ccd4507<commit_after>
# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copyright (c) 2016, GEM Foundation # OpenQuake is free software: you can redistribute it and/or modify it # under the terms of the GNU Affero General Public License as published # by the Free Software Foundation, either version 3 of the Licen...
Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: bbfc5549fb632d535ed1934e0d2bd1226ccd4507# -*- coding: utf-8 -*- # vim: tabstop=4 shiftwidth=4 softtabstop=4 # Copy...
<commit_before><commit_msg>Add a command to start the WebUI using oq The django development server is started in foreground on localhost:8800. Meant to be used with multi_user = false but works also if true. Former-commit-id: bbfc5549fb632d535ed1934e0d2bd1226ccd4507<commit_after># -*- coding: utf-8 -*- # vim: tabs...
24478a92ef1218ade7867ba5a2f2d8172aea8c64
tests/test_load_data.py
tests/test_load_data.py
import unittest import sys sys.path.append('soccer') import leagueproperties import leagueids import main class TestLoadData(unittest.TestCase): TEAMS_INFO_FILENAME = "teams.json" def set_up(self): pass def tear_down(self): pass def test_load_team_data(self): raised = False ...
Implement simple unit tests for loading data at startup
Implement simple unit tests for loading data at startup
Python
mit
Saturn/soccer-cli,architv/soccer-cli
Implement simple unit tests for loading data at startup
import unittest import sys sys.path.append('soccer') import leagueproperties import leagueids import main class TestLoadData(unittest.TestCase): TEAMS_INFO_FILENAME = "teams.json" def set_up(self): pass def tear_down(self): pass def test_load_team_data(self): raised = False ...
<commit_before><commit_msg>Implement simple unit tests for loading data at startup<commit_after>
import unittest import sys sys.path.append('soccer') import leagueproperties import leagueids import main class TestLoadData(unittest.TestCase): TEAMS_INFO_FILENAME = "teams.json" def set_up(self): pass def tear_down(self): pass def test_load_team_data(self): raised = False ...
Implement simple unit tests for loading data at startupimport unittest import sys sys.path.append('soccer') import leagueproperties import leagueids import main class TestLoadData(unittest.TestCase): TEAMS_INFO_FILENAME = "teams.json" def set_up(self): pass def tear_down(self): pass ...
<commit_before><commit_msg>Implement simple unit tests for loading data at startup<commit_after>import unittest import sys sys.path.append('soccer') import leagueproperties import leagueids import main class TestLoadData(unittest.TestCase): TEAMS_INFO_FILENAME = "teams.json" def set_up(self): pass ...
f72f7252808266b8ee9e3f5f46b3c617a4b1f787
app/tests/model_helpers.py
app/tests/model_helpers.py
import pytest def test_factory(factory): try: factory() except Exception as e: pytest.fail( f"Failed factory initialization for {str(factory)} with exception: {e}" )
Refactor factory testing even more
Refactor factory testing even more
Python
apache-2.0
comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django,comic/comic-django
Refactor factory testing even more
import pytest def test_factory(factory): try: factory() except Exception as e: pytest.fail( f"Failed factory initialization for {str(factory)} with exception: {e}" )
<commit_before><commit_msg>Refactor factory testing even more<commit_after>
import pytest def test_factory(factory): try: factory() except Exception as e: pytest.fail( f"Failed factory initialization for {str(factory)} with exception: {e}" )
Refactor factory testing even moreimport pytest def test_factory(factory): try: factory() except Exception as e: pytest.fail( f"Failed factory initialization for {str(factory)} with exception: {e}" )
<commit_before><commit_msg>Refactor factory testing even more<commit_after>import pytest def test_factory(factory): try: factory() except Exception as e: pytest.fail( f"Failed factory initialization for {str(factory)} with exception: {e}" )
ff9519261e73a77733e6b4566dd1666d05bacf3d
display.py
display.py
import Tkinter import flaggen class FlagFrame(Tkinter.Frame): def __init__(self, master, flag, *args, **kwargs): Tkinter.Frame.__init__(self, master, *args, **kwargs) self.flag = flag self.canvas_height = 250 self.canvas_width = 500 self.canvas = Tkinter.Canvas(self, heig...
Add Module for Displaying Flags in Tkinter Window
Add Module for Displaying Flags in Tkinter Window
Python
mit
Eylrid/flaggen
Add Module for Displaying Flags in Tkinter Window
import Tkinter import flaggen class FlagFrame(Tkinter.Frame): def __init__(self, master, flag, *args, **kwargs): Tkinter.Frame.__init__(self, master, *args, **kwargs) self.flag = flag self.canvas_height = 250 self.canvas_width = 500 self.canvas = Tkinter.Canvas(self, heig...
<commit_before><commit_msg>Add Module for Displaying Flags in Tkinter Window<commit_after>
import Tkinter import flaggen class FlagFrame(Tkinter.Frame): def __init__(self, master, flag, *args, **kwargs): Tkinter.Frame.__init__(self, master, *args, **kwargs) self.flag = flag self.canvas_height = 250 self.canvas_width = 500 self.canvas = Tkinter.Canvas(self, heig...
Add Module for Displaying Flags in Tkinter Windowimport Tkinter import flaggen class FlagFrame(Tkinter.Frame): def __init__(self, master, flag, *args, **kwargs): Tkinter.Frame.__init__(self, master, *args, **kwargs) self.flag = flag self.canvas_height = 250 self.canvas_width = 500...
<commit_before><commit_msg>Add Module for Displaying Flags in Tkinter Window<commit_after>import Tkinter import flaggen class FlagFrame(Tkinter.Frame): def __init__(self, master, flag, *args, **kwargs): Tkinter.Frame.__init__(self, master, *args, **kwargs) self.flag = flag self.canvas_hei...
5d609b104ea892ab96bd72ec6b67148c0b6eb970
temba/flows/migrations/0068_fix_empty_flow_starts.py
temba/flows/migrations/0068_fix_empty_flow_starts.py
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.db.models import Q import json def fix_empty_starts(apps, schema): empty_actions = ('[{"msg": {"eng": ""}, "type": "reply"}]', '[{"msg": {"base": ""}, "type": "reply"}]') from temba.flows.mod...
Add migration to remove empty actionsets
Add migration to remove empty actionsets
Python
agpl-3.0
tsotetsi/textily-web,pulilab/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro,tsotetsi/textily-web,pulilab/rapidpro,pulilab/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web
Add migration to remove empty actionsets
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.db.models import Q import json def fix_empty_starts(apps, schema): empty_actions = ('[{"msg": {"eng": ""}, "type": "reply"}]', '[{"msg": {"base": ""}, "type": "reply"}]') from temba.flows.mod...
<commit_before><commit_msg>Add migration to remove empty actionsets<commit_after>
# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.db.models import Q import json def fix_empty_starts(apps, schema): empty_actions = ('[{"msg": {"eng": ""}, "type": "reply"}]', '[{"msg": {"base": ""}, "type": "reply"}]') from temba.flows.mod...
Add migration to remove empty actionsets# -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.db.models import Q import json def fix_empty_starts(apps, schema): empty_actions = ('[{"msg": {"eng": ""}, "type": "reply"}]', '[{"msg": {"base": ""}, "type...
<commit_before><commit_msg>Add migration to remove empty actionsets<commit_after># -*- coding: utf-8 -*- from __future__ import unicode_literals from django.db import migrations, models from django.db.models import Q import json def fix_empty_starts(apps, schema): empty_actions = ('[{"msg": {"eng": ""}, "type": ...
46852d7ed9a4e03084cbd2c3d296d10946e5190f
ceph_deploy/tests/test_cli_rgw.py
ceph_deploy/tests/test_cli_rgw.py
import pytest import subprocess import ceph_deploy.rgw as rgw def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'rgw', '--help'], stdout=subprocess.PIPE, ) as p: result = p.stdout.read() assert 'usage: ceph-deploy rgw' in result assert 'positional arguments' in re...
Add tests for RGW daemon naming
Add tests for RGW daemon naming Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com>
Python
mit
ddiss/ceph-deploy,trhoden/ceph-deploy,shenhequnying/ceph-deploy,ceph/ceph-deploy,imzhulei/ceph-deploy,SUSE/ceph-deploy-to-be-deleted,ceph/ceph-deploy,ghxandsky/ceph-deploy,isyippee/ceph-deploy,isyippee/ceph-deploy,imzhulei/ceph-deploy,ddiss/ceph-deploy,alfredodeza/ceph-deploy,branto1/ceph-deploy,branto1/ceph-deploy,Vic...
Add tests for RGW daemon naming Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com>
import pytest import subprocess import ceph_deploy.rgw as rgw def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'rgw', '--help'], stdout=subprocess.PIPE, ) as p: result = p.stdout.read() assert 'usage: ceph-deploy rgw' in result assert 'positional arguments' in re...
<commit_before><commit_msg>Add tests for RGW daemon naming Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com><commit_after>
import pytest import subprocess import ceph_deploy.rgw as rgw def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'rgw', '--help'], stdout=subprocess.PIPE, ) as p: result = p.stdout.read() assert 'usage: ceph-deploy rgw' in result assert 'positional arguments' in re...
Add tests for RGW daemon naming Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com>import pytest import subprocess import ceph_deploy.rgw as rgw def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'rgw', '--help'], stdout=subprocess.PIPE, ) as p: ...
<commit_before><commit_msg>Add tests for RGW daemon naming Signed-off-by: Travis Rhoden <e5e44d6dbac12e32e01c3bb8b67940d8b42e225b@redhat.com><commit_after>import pytest import subprocess import ceph_deploy.rgw as rgw def test_help(tmpdir, cli): with cli( args=['ceph-deploy', 'rgw', '--help'], st...
eee6b64a46b24f5297940d5b93201ebd5bd71959
cerbero/commands/debugpackages.py
cerbero/commands/debugpackages.py
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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 debug packages
Add command to debug packages
Python
lgpl-2.1
jackjansen/cerbero-2013,sdroege/cerbero,freedesktop-unofficial-mirror/gstreamer-sdk__cerbero,flexVDI/cerbero,nzjrs/cerbero,ylatuya/cerbero,brion/cerbero,ikonst/cerbero,ramaxlo/cerbero,EricssonResearch/cerbero,shoreflyer/cerbero,ikonst/cerbero,ylatuya/cerbero,shoreflyer/cerbero,ramaxlo/cerbero,freedesktop-unofficial-mir...
Add command to debug packages
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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 debug packages<commit_after>
# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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 debug packages# cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # 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 ...
<commit_before><commit_msg>Add command to debug packages<commit_after># cerbero - a multi-platform build system for Open Source software # Copyright (C) 2012 Andoni Morales Alastruey <ylatuya@gmail.com> # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library Gene...
96e782563564af0291d8e536a5adc0b20caf1648
tests/test_dbgp_eval_property.py
tests/test_dbgp_eval_property.py
if __name__ == "__main__": import sys sys.path.append('../plugin/python/') import unittest2 as unittest import vdebug.dbgp import xml.etree.ElementTree as ET class EvalPropertyTest(unittest.TestCase): def __get_eval_property(self,xml_string,code,lang): xml = ET.fromstring(xml_string) firstn...
Add failing test for eval'd numeric array keys
Add failing test for eval'd numeric array keys
Python
mit
paprykarz/vdebug,joonty/vdebug,joonty/vdebug,Taluu/vdebug,paprykarz/vdebug,joonty/vdebug,Taluu/vdebug,Taluu/vdebug,paprykarz/vdebug
Add failing test for eval'd numeric array keys
if __name__ == "__main__": import sys sys.path.append('../plugin/python/') import unittest2 as unittest import vdebug.dbgp import xml.etree.ElementTree as ET class EvalPropertyTest(unittest.TestCase): def __get_eval_property(self,xml_string,code,lang): xml = ET.fromstring(xml_string) firstn...
<commit_before><commit_msg>Add failing test for eval'd numeric array keys<commit_after>
if __name__ == "__main__": import sys sys.path.append('../plugin/python/') import unittest2 as unittest import vdebug.dbgp import xml.etree.ElementTree as ET class EvalPropertyTest(unittest.TestCase): def __get_eval_property(self,xml_string,code,lang): xml = ET.fromstring(xml_string) firstn...
Add failing test for eval'd numeric array keysif __name__ == "__main__": import sys sys.path.append('../plugin/python/') import unittest2 as unittest import vdebug.dbgp import xml.etree.ElementTree as ET class EvalPropertyTest(unittest.TestCase): def __get_eval_property(self,xml_string,code,lang): ...
<commit_before><commit_msg>Add failing test for eval'd numeric array keys<commit_after>if __name__ == "__main__": import sys sys.path.append('../plugin/python/') import unittest2 as unittest import vdebug.dbgp import xml.etree.ElementTree as ET class EvalPropertyTest(unittest.TestCase): def __get_eval_prop...
8bc64c7e0d461ba51459f927f54822cbacf8404f
Surface/rotate.py
Surface/rotate.py
import sys import os import subprocess import re status = subprocess.check_output(["xrandr", "-q"]) print (status) lines = status.split("\n") print (lines) stat = "" for line in lines: if "eDP-1" in line: stat = line orientation = stat.split(" ")[4] if len(sys.argv) < 2: exit() elif (sys.argv[1] == ...
Add screen rotation script for surface
Add screen rotation script for surface
Python
apache-2.0
NickTGraham/PythonPack,NickTGraham/PythonPack
Add screen rotation script for surface
import sys import os import subprocess import re status = subprocess.check_output(["xrandr", "-q"]) print (status) lines = status.split("\n") print (lines) stat = "" for line in lines: if "eDP-1" in line: stat = line orientation = stat.split(" ")[4] if len(sys.argv) < 2: exit() elif (sys.argv[1] == ...
<commit_before><commit_msg>Add screen rotation script for surface<commit_after>
import sys import os import subprocess import re status = subprocess.check_output(["xrandr", "-q"]) print (status) lines = status.split("\n") print (lines) stat = "" for line in lines: if "eDP-1" in line: stat = line orientation = stat.split(" ")[4] if len(sys.argv) < 2: exit() elif (sys.argv[1] == ...
Add screen rotation script for surfaceimport sys import os import subprocess import re status = subprocess.check_output(["xrandr", "-q"]) print (status) lines = status.split("\n") print (lines) stat = "" for line in lines: if "eDP-1" in line: stat = line orientation = stat.split(" ")[4] if len(sys.argv)...
<commit_before><commit_msg>Add screen rotation script for surface<commit_after>import sys import os import subprocess import re status = subprocess.check_output(["xrandr", "-q"]) print (status) lines = status.split("\n") print (lines) stat = "" for line in lines: if "eDP-1" in line: stat = line orientati...
cfe18ca2fb113379af33f7172c8bb67787c82a1d
test_valid_object_file.py
test_valid_object_file.py
from astropy.table import Table TABLE_NAME = 'feder_object_list.csv' def test_table_can_be_read(): objs = Table.read(TABLE_NAME, format='ascii', delimiter=',') columns = ['object', 'ra', 'dec'] for col in columns: assert col in objs.colnames
Add simple test that table is readable
Add simple test that table is readable
Python
bsd-2-clause
mwcraig/feder-object-list
Add simple test that table is readable
from astropy.table import Table TABLE_NAME = 'feder_object_list.csv' def test_table_can_be_read(): objs = Table.read(TABLE_NAME, format='ascii', delimiter=',') columns = ['object', 'ra', 'dec'] for col in columns: assert col in objs.colnames
<commit_before><commit_msg>Add simple test that table is readable<commit_after>
from astropy.table import Table TABLE_NAME = 'feder_object_list.csv' def test_table_can_be_read(): objs = Table.read(TABLE_NAME, format='ascii', delimiter=',') columns = ['object', 'ra', 'dec'] for col in columns: assert col in objs.colnames
Add simple test that table is readablefrom astropy.table import Table TABLE_NAME = 'feder_object_list.csv' def test_table_can_be_read(): objs = Table.read(TABLE_NAME, format='ascii', delimiter=',') columns = ['object', 'ra', 'dec'] for col in columns: assert col in objs.colnames
<commit_before><commit_msg>Add simple test that table is readable<commit_after>from astropy.table import Table TABLE_NAME = 'feder_object_list.csv' def test_table_can_be_read(): objs = Table.read(TABLE_NAME, format='ascii', delimiter=',') columns = ['object', 'ra', 'dec'] for col in columns: asse...
1b42dc4d49ccbef9b2ed4bd31e8bb32b597a3575
oscar/agent/scripted/minigame/nicolas_mineralshard.py
oscar/agent/scripted/minigame/nicolas_mineralshard.py
import numpy from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _PLAYER_RELATIVE = features.SCREEN_FEATURES.player_relative.index _PLAYER_FRIENDLY = 1 _PLAYER_NEUTRAL = 3 # beacon/minerals _PLAYER_HOSTILE = 4 _NO_OP = actions.FUNCTIONS.no_op.id _MOVE_SCREEN = actions.FUN...
Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one
Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one
Python
apache-2.0
Xaxetrov/OSCAR,Xaxetrov/OSCAR
Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one
import numpy from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _PLAYER_RELATIVE = features.SCREEN_FEATURES.player_relative.index _PLAYER_FRIENDLY = 1 _PLAYER_NEUTRAL = 3 # beacon/minerals _PLAYER_HOSTILE = 4 _NO_OP = actions.FUNCTIONS.no_op.id _MOVE_SCREEN = actions.FUN...
<commit_before><commit_msg>Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one<commit_after>
import numpy from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _PLAYER_RELATIVE = features.SCREEN_FEATURES.player_relative.index _PLAYER_FRIENDLY = 1 _PLAYER_NEUTRAL = 3 # beacon/minerals _PLAYER_HOSTILE = 4 _NO_OP = actions.FUNCTIONS.no_op.id _MOVE_SCREEN = actions.FUN...
Create a new scripted agent: copy from the deepmind one but do not select the two marins, only oneimport numpy from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _PLAYER_RELATIVE = features.SCREEN_FEATURES.player_relative.index _PLAYER_FRIENDLY = 1 _PLAYER_NEUTRAL = 3 # ...
<commit_before><commit_msg>Create a new scripted agent: copy from the deepmind one but do not select the two marins, only one<commit_after>import numpy from pysc2.agents import base_agent from pysc2.lib import actions from pysc2.lib import features _PLAYER_RELATIVE = features.SCREEN_FEATURES.player_relative.index _PL...
89d6ce60906bf619bea8cb5c8d0d51c9269fc781
tools/stats/box_recall.py
tools/stats/box_recall.py
#!/usr/bin/env python from vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame from vdetlib.utils.common import iou import argparse import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('vid_file') parser.add_argument('ann...
Add script to calculate box proto recall.
Add script to calculate box proto recall.
Python
mit
myfavouritekk/TPN
Add script to calculate box proto recall.
#!/usr/bin/env python from vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame from vdetlib.utils.common import iou import argparse import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('vid_file') parser.add_argument('ann...
<commit_before><commit_msg>Add script to calculate box proto recall.<commit_after>
#!/usr/bin/env python from vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame from vdetlib.utils.common import iou import argparse import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('vid_file') parser.add_argument('ann...
Add script to calculate box proto recall.#!/usr/bin/env python from vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame from vdetlib.utils.common import iou import argparse import numpy as np if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument...
<commit_before><commit_msg>Add script to calculate box proto recall.<commit_after>#!/usr/bin/env python from vdetlib.utils.protocol import proto_load, proto_dump, track_box_at_frame, boxes_at_frame from vdetlib.utils.common import iou import argparse import numpy as np if __name__ == '__main__': parser = argparse...
46a0acede9dbbb1e751f5197a22be545e291d042
src/ggrc/migrations/versions/20170219221807_4e7fda17abc7_fix_assessment_contexts.py
src/ggrc/migrations/versions/20170219221807_4e7fda17abc7_fix_assessment_contexts.py
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Fix Assessment contexts Create Date: 2017-02-19 22:18:07.518997 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic import op...
Fix missing contexts for assessment evidence
Fix missing contexts for assessment evidence
Python
apache-2.0
AleksNeStu/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,VinnieJohns/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,plamut/ggrc-core
Fix missing contexts for assessment evidence
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Fix Assessment contexts Create Date: 2017-02-19 22:18:07.518997 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic import op...
<commit_before><commit_msg>Fix missing contexts for assessment evidence<commit_after>
# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Fix Assessment contexts Create Date: 2017-02-19 22:18:07.518997 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: disable=invalid-name from alembic import op...
Fix missing contexts for assessment evidence# Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Fix Assessment contexts Create Date: 2017-02-19 22:18:07.518997 """ # disable Invalid constant name pylint warning for mandatory Alembic variables. # pylint: ...
<commit_before><commit_msg>Fix missing contexts for assessment evidence<commit_after># Copyright (C) 2017 Google Inc. # Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file> """ Fix Assessment contexts Create Date: 2017-02-19 22:18:07.518997 """ # disable Invalid constant name pylint warning fo...
fcddd7145bf7ab33cf90f8d4d39cfc9bb927e26d
ws-tests/test_invalid_merge.py
ws-tests/test_invalid_merge.py
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
Add a test for an invalid merge
Add a test for an invalid merge
Python
bsd-2-clause
leto/new_opentree_api,leto/new_opentree_api
Add a test for an invalid merge
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
<commit_before><commit_msg>Add a test for an invalid merge<commit_after>
#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', data=dat...
Add a test for an invalid merge#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMIT_URI, 'PUT', ...
<commit_before><commit_msg>Add a test for an invalid merge<commit_after>#!/usr/bin/env python from opentreetesting import test_http_json_method, config import sys DOMAIN = config('host', 'apihost') SUBMIT_URI = DOMAIN + '/merge/v1/master/master' data = { 'auth_token': 'bogus' } if test_http_json_method(SUBMI...
e17e436b7671b3c6834d286c91f541ee768fadac
script/gen-iana-rclasses.py
script/gen-iana-rclasses.py
import enumgen from pprint import pprint import os import os.path data = enumgen.fetch_csv( "http://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") data_dict = [] for row in data: if '-' in row[0]: continue if ' ' in row[2]: row[2] = row[2].split(' ')[-1].strip('()') if row[2] in [i['name'] for i...
Add RRClass generation script to git
Add RRClass generation script to git
Python
bsd-2-clause
oko/rust-dns
Add RRClass generation script to git
import enumgen from pprint import pprint import os import os.path data = enumgen.fetch_csv( "http://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") data_dict = [] for row in data: if '-' in row[0]: continue if ' ' in row[2]: row[2] = row[2].split(' ')[-1].strip('()') if row[2] in [i['name'] for i...
<commit_before><commit_msg>Add RRClass generation script to git<commit_after>
import enumgen from pprint import pprint import os import os.path data = enumgen.fetch_csv( "http://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") data_dict = [] for row in data: if '-' in row[0]: continue if ' ' in row[2]: row[2] = row[2].split(' ')[-1].strip('()') if row[2] in [i['name'] for i...
Add RRClass generation script to gitimport enumgen from pprint import pprint import os import os.path data = enumgen.fetch_csv( "http://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") data_dict = [] for row in data: if '-' in row[0]: continue if ' ' in row[2]: row[2] = row[2].split(' ')[-1].strip(...
<commit_before><commit_msg>Add RRClass generation script to git<commit_after>import enumgen from pprint import pprint import os import os.path data = enumgen.fetch_csv( "http://www.iana.org/assignments/dns-parameters/dns-parameters-2.csv") data_dict = [] for row in data: if '-' in row[0]: continue if ' ' in row[2]...
919f8bb14ae91e37e42ff08192df24b60135596f
python_programming/what_is_my_name.py
python_programming/what_is_my_name.py
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@gmail.com # Created Time: 2016-06-21 23:25:24 ############################################################################### name = 'roger' x = 0 wh...
Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.
Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.
Python
mit
zeroonegit/python,QuinceySun/Python,QuinceySun/Python,zeroonegit/python
Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@gmail.com # Created Time: 2016-06-21 23:25:24 ############################################################################### name = 'roger' x = 0 wh...
<commit_before><commit_msg>Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.<commit_after>
#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@gmail.com # Created Time: 2016-06-21 23:25:24 ############################################################################### name = 'roger' x = 0 wh...
Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@gmail.com # Created Time: 2016-06-21 23:25...
<commit_before><commit_msg>Write a program that has a user guess your name, but they only get 3 chances to do so until the program quits.<commit_after>#!/usr/bin/env python3 # -*- coding: utf-8 -*- ############################################################################### # Author: Quincey Sun # Mail: zeroonegit@g...
5ef92912ca5d4a3bd3469aae7cfd5f4eca1055f7
cibopath/templates.py
cibopath/templates.py
# -*- coding: utf-8 -*- import json import logging import pathlib GITHUB_URL = 'https://github.com/{user}/{repo}' TEMPLATE_DIR = pathlib.Path.home() / '.cibopath' TEMPLATE_DIR.mkdir(exist_ok=True) JSON_STORE = TEMPLATE_DIR / 'templates.json' logger = logging.getLogger('cibopath') class Template: def __init__...
Create Template class and implement json handler
Create Template class and implement json handler
Python
bsd-3-clause
hackebrot/cibopath
Create Template class and implement json handler
# -*- coding: utf-8 -*- import json import logging import pathlib GITHUB_URL = 'https://github.com/{user}/{repo}' TEMPLATE_DIR = pathlib.Path.home() / '.cibopath' TEMPLATE_DIR.mkdir(exist_ok=True) JSON_STORE = TEMPLATE_DIR / 'templates.json' logger = logging.getLogger('cibopath') class Template: def __init__...
<commit_before><commit_msg>Create Template class and implement json handler<commit_after>
# -*- coding: utf-8 -*- import json import logging import pathlib GITHUB_URL = 'https://github.com/{user}/{repo}' TEMPLATE_DIR = pathlib.Path.home() / '.cibopath' TEMPLATE_DIR.mkdir(exist_ok=True) JSON_STORE = TEMPLATE_DIR / 'templates.json' logger = logging.getLogger('cibopath') class Template: def __init__...
Create Template class and implement json handler# -*- coding: utf-8 -*- import json import logging import pathlib GITHUB_URL = 'https://github.com/{user}/{repo}' TEMPLATE_DIR = pathlib.Path.home() / '.cibopath' TEMPLATE_DIR.mkdir(exist_ok=True) JSON_STORE = TEMPLATE_DIR / 'templates.json' logger = logging.getLogge...
<commit_before><commit_msg>Create Template class and implement json handler<commit_after># -*- coding: utf-8 -*- import json import logging import pathlib GITHUB_URL = 'https://github.com/{user}/{repo}' TEMPLATE_DIR = pathlib.Path.home() / '.cibopath' TEMPLATE_DIR.mkdir(exist_ok=True) JSON_STORE = TEMPLATE_DIR / 't...
d9302fab69d16f556adf27248c0fa7f7d12dc2ec
python/opencv/opencv_2/videos/play_video_from_file.py
python/opencv/opencv_2/videos/play_video_from_file.py
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Play video: play videos from files Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_video_display...
Add a snippet (Python OpenCV).
Add a snippet (Python OpenCV).
Python
mit
jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets,jeremiedecock/snippets
Add a snippet (Python OpenCV).
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Play video: play videos from files Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_video_display...
<commit_before><commit_msg>Add a snippet (Python OpenCV).<commit_after>
#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Play video: play videos from files Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tutorials/py_gui/py_video_display...
Add a snippet (Python OpenCV).#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Play video: play videos from files Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-tutroals.readthedocs.org/en/latest/py_tut...
<commit_before><commit_msg>Add a snippet (Python OpenCV).<commit_after>#!/usr/bin/env python # -*- coding: utf-8 -*- # Copyright (c) 2015 Jérémie DECOCK (http://www.jdhp.org) """ OpenCV - Play video: play videos from files Required: opencv library (Debian: aptitude install python-opencv) See: https://opencv-python-...
a5c723b589699fdf80c42a4186c2fdc0c8d84bb4
tests/sentry/app/tests.py
tests/sentry/app/tests.py
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) class GetBuffer...
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer)
Remove test that is probably more trouble than it's worth.
Remove test that is probably more trouble than it's worth.
Python
bsd-3-clause
JackDanger/sentry,mvaled/sentry,BuildingLink/sentry,alexm92/sentry,alexm92/sentry,mvaled/sentry,gencer/sentry,JamesMura/sentry,ifduyue/sentry,zenefits/sentry,jean/sentry,fotinakis/sentry,gencer/sentry,zenefits/sentry,gencer/sentry,JamesMura/sentry,zenefits/sentry,mvaled/sentry,mvaled/sentry,BuildingLink/sentry,gencer/s...
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) class GetBuffer...
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer)
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) ...
# -*- coding: utf-8 -*- from __future__ import absolute_import from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer)
# -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) class GetBuffer...
<commit_before># -*- coding: utf-8 -*- from __future__ import absolute_import import mock from sentry import app from sentry.testutils import TestCase class AppTest(TestCase): def test_buffer_is_a_buffer(self): from sentry.buffer.base import Buffer self.assertEquals(type(app.buffer), Buffer) ...
eef6bac6cf333b1df874381b6140c5737d5f8c57
pycon/dev-settings.py
pycon/dev-settings.py
from pycon.settings import * DEFAULT_URL_PREFIX='http://localhost:8000' DEBUG=True PAYPAL_TEST = True TEMPLATES[0]['OPTIONS']['debug'] = True
Add a basic dev config
Add a basic dev config
Python
bsd-2-clause
artcz/epcon,EuroPython/epcon,artcz/epcon,artcz/epcon,artcz/epcon,artcz/epcon,artcz/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
Add a basic dev config
from pycon.settings import * DEFAULT_URL_PREFIX='http://localhost:8000' DEBUG=True PAYPAL_TEST = True TEMPLATES[0]['OPTIONS']['debug'] = True
<commit_before><commit_msg>Add a basic dev config<commit_after>
from pycon.settings import * DEFAULT_URL_PREFIX='http://localhost:8000' DEBUG=True PAYPAL_TEST = True TEMPLATES[0]['OPTIONS']['debug'] = True
Add a basic dev configfrom pycon.settings import * DEFAULT_URL_PREFIX='http://localhost:8000' DEBUG=True PAYPAL_TEST = True TEMPLATES[0]['OPTIONS']['debug'] = True
<commit_before><commit_msg>Add a basic dev config<commit_after>from pycon.settings import * DEFAULT_URL_PREFIX='http://localhost:8000' DEBUG=True PAYPAL_TEST = True TEMPLATES[0]['OPTIONS']['debug'] = True
6fc5e78136285370d7606f31816b0fdf3a58606e
print_bot_id.py
print_bot_id.py
import os from slackclient import SlackClient # Update with your bot's name BOT_NAME = 'watsonbot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) if __name__ == "__main__": api_call = slack_client.api_call("users.list") if api_call.get('ok'): # retrieve all users so we can find our bo...
Add script to print bot id
Add script to print bot id
Python
apache-2.0
kostickm/watsonbot
Add script to print bot id
import os from slackclient import SlackClient # Update with your bot's name BOT_NAME = 'watsonbot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) if __name__ == "__main__": api_call = slack_client.api_call("users.list") if api_call.get('ok'): # retrieve all users so we can find our bo...
<commit_before><commit_msg>Add script to print bot id<commit_after>
import os from slackclient import SlackClient # Update with your bot's name BOT_NAME = 'watsonbot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) if __name__ == "__main__": api_call = slack_client.api_call("users.list") if api_call.get('ok'): # retrieve all users so we can find our bo...
Add script to print bot idimport os from slackclient import SlackClient # Update with your bot's name BOT_NAME = 'watsonbot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) if __name__ == "__main__": api_call = slack_client.api_call("users.list") if api_call.get('ok'): # retrieve all u...
<commit_before><commit_msg>Add script to print bot id<commit_after>import os from slackclient import SlackClient # Update with your bot's name BOT_NAME = 'watsonbot' slack_client = SlackClient(os.environ.get('SLACK_BOT_TOKEN')) if __name__ == "__main__": api_call = slack_client.api_call("users.list") if api...
44de127d69cd00dfc636e2f8f2cdf42f0e85b7d4
remoting/PRESUBMIT.py
remoting/PRESUBMIT.py
# Copyright 2015 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. """Presubmit script for remoting. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting.
Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting. BUG= Review URL: https://codereview.chromium.org/1166123004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#333390}
Python
bsd-3-clause
axinging/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-cross...
Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting. BUG= Review URL: https://codereview.chromium.org/1166123004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#333390}
# Copyright 2015 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. """Presubmit script for remoting. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
<commit_before><commit_msg>Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting. BUG= Review URL: https://codereview.chromium.org/1166123004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#333390}<commit_after>
# Copyright 2015 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. """Presubmit script for remoting. See http://dev.chromium.org/developers/how-tos/depottools/presubmit-scripts for more details about the presubmit API built...
Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting. BUG= Review URL: https://codereview.chromium.org/1166123004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#333390}# Copyright 2015 The Chromium Authors. All rights reserved. # Use o...
<commit_before><commit_msg>Print out a note, during change upload, on running Remoting browser-tests before commiting changes under $src/remoting. BUG= Review URL: https://codereview.chromium.org/1166123004 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#333390}<commit_after># Copyright 2015 The Chrom...
89f6654f921d2a373a3cbb0f521f2dbbb31f3de8
research/test_diff.py
research/test_diff.py
# use time() instead on unix import sys if sys.platform=='win32': from time import clock else: from time import time as clock from sympycore import profile_expr def time1(n=5): from sympycore import Symbol, sin x,y,z = map(Symbol,'xyz') f = (x / (1+sin(x**(y+x**2)))**2) t1 = clock() while...
Add diff bench test script.
Add diff bench test script.
Python
bsd-3-clause
pearu/sympycore,pearu/sympycore
Add diff bench test script.
# use time() instead on unix import sys if sys.platform=='win32': from time import clock else: from time import time as clock from sympycore import profile_expr def time1(n=5): from sympycore import Symbol, sin x,y,z = map(Symbol,'xyz') f = (x / (1+sin(x**(y+x**2)))**2) t1 = clock() while...
<commit_before><commit_msg>Add diff bench test script.<commit_after>
# use time() instead on unix import sys if sys.platform=='win32': from time import clock else: from time import time as clock from sympycore import profile_expr def time1(n=5): from sympycore import Symbol, sin x,y,z = map(Symbol,'xyz') f = (x / (1+sin(x**(y+x**2)))**2) t1 = clock() while...
Add diff bench test script. # use time() instead on unix import sys if sys.platform=='win32': from time import clock else: from time import time as clock from sympycore import profile_expr def time1(n=5): from sympycore import Symbol, sin x,y,z = map(Symbol,'xyz') f = (x / (1+sin(x**(y+x**2)))**2)...
<commit_before><commit_msg>Add diff bench test script.<commit_after> # use time() instead on unix import sys if sys.platform=='win32': from time import clock else: from time import time as clock from sympycore import profile_expr def time1(n=5): from sympycore import Symbol, sin x,y,z = map(Symbol,'xy...
7794500c352b0a2f536bbac7be07837d8fa0efef
tests/test_Projection.py
tests/test_Projection.py
import unittest import numpy import dadi class ProjectionTestCase(unittest.TestCase): def test_project_up(self): """ Saving spectrum to file. """ fixed_params = [0.1,None,None] params_up = dadi.Inference._project_params_up([0.2,0.3], fixed_params) self.assertTrue(num...
Add test for projecting parameters upward.
Add test for projecting parameters upward. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345
Python
bsd-3-clause
RyanGutenkunst/dadi,niuhuifei/dadi,beni55/dadi,beni55/dadi,yangjl/dadi,cheese1213/dadi,ChenHsiang/dadi,cheese1213/dadi,paulirish/dadi,niuhuifei/dadi,paulirish/dadi,ChenHsiang/dadi,yangjl/dadi,RyanGutenkunst/dadi
Add test for projecting parameters upward. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345
import unittest import numpy import dadi class ProjectionTestCase(unittest.TestCase): def test_project_up(self): """ Saving spectrum to file. """ fixed_params = [0.1,None,None] params_up = dadi.Inference._project_params_up([0.2,0.3], fixed_params) self.assertTrue(num...
<commit_before><commit_msg>Add test for projecting parameters upward. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345<commit_after>
import unittest import numpy import dadi class ProjectionTestCase(unittest.TestCase): def test_project_up(self): """ Saving spectrum to file. """ fixed_params = [0.1,None,None] params_up = dadi.Inference._project_params_up([0.2,0.3], fixed_params) self.assertTrue(num...
Add test for projecting parameters upward. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345import unittest import numpy import dadi class ProjectionTestCase(unittest.TestCase): def test_project_up(self): """ Saving spectrum to file. """ ...
<commit_before><commit_msg>Add test for projecting parameters upward. git-svn-id: 4c7b13231a96299fde701bb5dec4bd2aaf383fc6@489 979d6bd5-6d4d-0410-bece-f567c23bd345<commit_after>import unittest import numpy import dadi class ProjectionTestCase(unittest.TestCase): def test_project_up(self): """ Sa...
c95d352e16a7638d037a831fcc55a9145f6c9162
tests/test_twr_search.py
tests/test_twr_search.py
#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the righ...
Add TwrSearch class basic test
Add TwrSearch class basic test
Python
lgpl-2.1
tchx84/twitter-gobject
Add TwrSearch class basic test
#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the righ...
<commit_before><commit_msg>Add TwrSearch class basic test<commit_after>
#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, including without limitation the righ...
Add TwrSearch class basic test#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in the Software without restriction, includi...
<commit_before><commit_msg>Add TwrSearch class basic test<commit_after>#!/usr/bin/env python # # Copyright (c) 2013 Martin Abente Lahaye. - tch@sugarlabs.org #Permission is hereby granted, free of charge, to any person obtaining a copy #of this software and associated documentation files (the "Software"), to deal #in ...
934a7d166eb74fcd2ee3eaef79b63fabd61dc45c
buildscripts/run_benchmarks.py
buildscripts/run_benchmarks.py
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
Add simple script for benchmark execution
Add simple script for benchmark execution
Python
bsd-2-clause
IntelLabs/hpat,IntelLabs/hpat,IntelLabs/hpat,IntelLabs/hpat
Add simple script for benchmark execution
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
<commit_before><commit_msg>Add simple script for benchmark execution<commit_after>
# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions are met: # # Redistributions of sou...
Add simple script for benchmark execution# ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following condition...
<commit_before><commit_msg>Add simple script for benchmark execution<commit_after># ***************************************************************************** # Copyright (c) 2020, Intel Corporation All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permit...
c0ba8348f614f2ef6c14db9335ba3d1a6f3d29af
p3/management/commands/create_bulk_coupons.py
p3/management/commands/create_bulk_coupons.py
""" Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number of uses items_per_usage - max number of items per use value - value of the coupon in percent de...
Add new coupon script to generate coupons using a CSV file.
Add new coupon script to generate coupons using a CSV file.
Python
bsd-2-clause
EuroPython/epcon,EuroPython/epcon,EuroPython/epcon,EuroPython/epcon
Add new coupon script to generate coupons using a CSV file.
""" Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number of uses items_per_usage - max number of items per use value - value of the coupon in percent de...
<commit_before><commit_msg>Add new coupon script to generate coupons using a CSV file.<commit_after>
""" Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number of uses items_per_usage - max number of items per use value - value of the coupon in percent de...
Add new coupon script to generate coupons using a CSV file. """ Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number of uses items_per_usage - max number of...
<commit_before><commit_msg>Add new coupon script to generate coupons using a CSV file.<commit_after> """ Create a batch of single use discount coupons from a CSV file. Parameters: <conference> <csv-file> Creates coupons based on the CSV file contents: code - coupon code max_usage - max. number...
d4840c794f9d9de252028a7899d470753615d3d5
eve_neo4j/structures.py
eve_neo4j/structures.py
# -*- coding: utf-8 -*- from eve_neo4j.utils import node_to_dict, count_selection class Neo4jResultCollection(object): """ Collection of results. The object holds onto a py2neo-NodeSelection object and serves a generator off it. :param selection: NodeSelection object for the requested resource. "...
Create Node holder for Eve.
Create Node holder for Eve.
Python
mit
Grupo-Abraxas/eve-neo4j,Abraxas-Biosystems/eve-neo4j
Create Node holder for Eve.
# -*- coding: utf-8 -*- from eve_neo4j.utils import node_to_dict, count_selection class Neo4jResultCollection(object): """ Collection of results. The object holds onto a py2neo-NodeSelection object and serves a generator off it. :param selection: NodeSelection object for the requested resource. "...
<commit_before><commit_msg>Create Node holder for Eve.<commit_after>
# -*- coding: utf-8 -*- from eve_neo4j.utils import node_to_dict, count_selection class Neo4jResultCollection(object): """ Collection of results. The object holds onto a py2neo-NodeSelection object and serves a generator off it. :param selection: NodeSelection object for the requested resource. "...
Create Node holder for Eve.# -*- coding: utf-8 -*- from eve_neo4j.utils import node_to_dict, count_selection class Neo4jResultCollection(object): """ Collection of results. The object holds onto a py2neo-NodeSelection object and serves a generator off it. :param selection: NodeSelection object for th...
<commit_before><commit_msg>Create Node holder for Eve.<commit_after># -*- coding: utf-8 -*- from eve_neo4j.utils import node_to_dict, count_selection class Neo4jResultCollection(object): """ Collection of results. The object holds onto a py2neo-NodeSelection object and serves a generator off it. :par...
d9bcab7e07ef4d9c44e0dfa0bcf49510b954ae71
examples/test_mirror.py
examples/test_mirror.py
import pypiv import numpy as np import matplotlib.pyplot as plt from glob import glob def main(): imgs = ['images/finger1.png', 'images/finger2.png'] frames = [plt.imread(x) for x in imgs] frame_a, frame_b = frames[0], frames[1] frame_a_inv = np.copy(frame_a[::-1,::-1]) frame_b_inv = np.copy(frame...
Add example for inverted image comparison.
Add example for inverted image comparison. An additional example which tests if a rotation of the testimages along both axis still yields the same results after a PIV evaluation. Please note that this works, except for the outlier detection which is probably due to an asymmetry in the CloughTocherInterpolator function...
Python
bsd-3-clause
jr7/pypiv
Add example for inverted image comparison. An additional example which tests if a rotation of the testimages along both axis still yields the same results after a PIV evaluation. Please note that this works, except for the outlier detection which is probably due to an asymmetry in the CloughTocherInterpolator function...
import pypiv import numpy as np import matplotlib.pyplot as plt from glob import glob def main(): imgs = ['images/finger1.png', 'images/finger2.png'] frames = [plt.imread(x) for x in imgs] frame_a, frame_b = frames[0], frames[1] frame_a_inv = np.copy(frame_a[::-1,::-1]) frame_b_inv = np.copy(frame...
<commit_before><commit_msg>Add example for inverted image comparison. An additional example which tests if a rotation of the testimages along both axis still yields the same results after a PIV evaluation. Please note that this works, except for the outlier detection which is probably due to an asymmetry in the Clough...
import pypiv import numpy as np import matplotlib.pyplot as plt from glob import glob def main(): imgs = ['images/finger1.png', 'images/finger2.png'] frames = [plt.imread(x) for x in imgs] frame_a, frame_b = frames[0], frames[1] frame_a_inv = np.copy(frame_a[::-1,::-1]) frame_b_inv = np.copy(frame...
Add example for inverted image comparison. An additional example which tests if a rotation of the testimages along both axis still yields the same results after a PIV evaluation. Please note that this works, except for the outlier detection which is probably due to an asymmetry in the CloughTocherInterpolator function...
<commit_before><commit_msg>Add example for inverted image comparison. An additional example which tests if a rotation of the testimages along both axis still yields the same results after a PIV evaluation. Please note that this works, except for the outlier detection which is probably due to an asymmetry in the Clough...
f8b2760d1bd218a7be5abfdb489f6afe53d85277
tools/setup_server_binding.py
tools/setup_server_binding.py
# Useful to launch an interactive debugging session in ipython with %ed or %run from nxdrive.controller import Controller from nxdrive.model import ServerBinding c = Controller('~/.nuxeo-drive') s = c.get_session() sb = s.query(ServerBinding).one()
Add useful python script to launch an interactive debugging session in ipython
Add useful python script to launch an interactive debugging session in ipython
Python
lgpl-2.1
arameshkumar/nuxeo-drive,IsaacYangSLA/nuxeo-drive,IsaacYangSLA/nuxeo-drive,rsoumyassdi/nuxeo-drive,rsoumyassdi/nuxeo-drive,loopingz/nuxeo-drive,loopingz/nuxeo-drive,loopingz/nuxeo-drive,loopingz/nuxeo-drive,rsoumyassdi/nuxeo-drive,rsoumyassdi/nuxeo-drive,IsaacYangSLA/nuxeo-drive,DirkHoffmann/nuxeo-drive,ssdi-drive/nuxe...
Add useful python script to launch an interactive debugging session in ipython
# Useful to launch an interactive debugging session in ipython with %ed or %run from nxdrive.controller import Controller from nxdrive.model import ServerBinding c = Controller('~/.nuxeo-drive') s = c.get_session() sb = s.query(ServerBinding).one()
<commit_before><commit_msg>Add useful python script to launch an interactive debugging session in ipython<commit_after>
# Useful to launch an interactive debugging session in ipython with %ed or %run from nxdrive.controller import Controller from nxdrive.model import ServerBinding c = Controller('~/.nuxeo-drive') s = c.get_session() sb = s.query(ServerBinding).one()
Add useful python script to launch an interactive debugging session in ipython# Useful to launch an interactive debugging session in ipython with %ed or %run from nxdrive.controller import Controller from nxdrive.model import ServerBinding c = Controller('~/.nuxeo-drive') s = c.get_session() sb = s.query(ServerBinding)...
<commit_before><commit_msg>Add useful python script to launch an interactive debugging session in ipython<commit_after># Useful to launch an interactive debugging session in ipython with %ed or %run from nxdrive.controller import Controller from nxdrive.model import ServerBinding c = Controller('~/.nuxeo-drive') s = c....
1ff3735aec0473009c82444d024804fd1579a98f
solutions/p7.py
solutions/p7.py
# 10001st prime # Find the 10001st prime number # import math def generate_primes(n): p = 2 primes = [p] p += 1 primes.append(p) while len(primes) != n: p += 2 test_prime = True # Limit should only be up to the square root of current p, because nothing will exceed that. sqrt_limit = math.sqrt(p) fo...
Add Solution to Problem 7.
Add Solution to Problem 7.
Python
unlicense
iheanyi/ProjectEuler
Add Solution to Problem 7.
# 10001st prime # Find the 10001st prime number # import math def generate_primes(n): p = 2 primes = [p] p += 1 primes.append(p) while len(primes) != n: p += 2 test_prime = True # Limit should only be up to the square root of current p, because nothing will exceed that. sqrt_limit = math.sqrt(p) fo...
<commit_before><commit_msg>Add Solution to Problem 7.<commit_after>
# 10001st prime # Find the 10001st prime number # import math def generate_primes(n): p = 2 primes = [p] p += 1 primes.append(p) while len(primes) != n: p += 2 test_prime = True # Limit should only be up to the square root of current p, because nothing will exceed that. sqrt_limit = math.sqrt(p) fo...
Add Solution to Problem 7.# 10001st prime # Find the 10001st prime number # import math def generate_primes(n): p = 2 primes = [p] p += 1 primes.append(p) while len(primes) != n: p += 2 test_prime = True # Limit should only be up to the square root of current p, because nothing will exceed that. sqrt...
<commit_before><commit_msg>Add Solution to Problem 7.<commit_after># 10001st prime # Find the 10001st prime number # import math def generate_primes(n): p = 2 primes = [p] p += 1 primes.append(p) while len(primes) != n: p += 2 test_prime = True # Limit should only be up to the square root of current p,...
a3352bb43c0c9b696e09fbb3dfed2c70e9bb5f12
replace_imports.py
replace_imports.py
from __future__ import with_statement import os file_contents = {} file_imports = {} def get_file(file_name): if file_name[-2:] != '.v': file_name += '.v' if file_name not in file_contents.keys(): print(file_name) try: with open(file_name, 'r', encoding='UTF-8') as f: ...
Add a python script for combining imports
Add a python script for combining imports
Python
mit
JasonGross/coq-tools,JasonGross/coq-tools
Add a python script for combining imports
from __future__ import with_statement import os file_contents = {} file_imports = {} def get_file(file_name): if file_name[-2:] != '.v': file_name += '.v' if file_name not in file_contents.keys(): print(file_name) try: with open(file_name, 'r', encoding='UTF-8') as f: ...
<commit_before><commit_msg>Add a python script for combining imports<commit_after>
from __future__ import with_statement import os file_contents = {} file_imports = {} def get_file(file_name): if file_name[-2:] != '.v': file_name += '.v' if file_name not in file_contents.keys(): print(file_name) try: with open(file_name, 'r', encoding='UTF-8') as f: ...
Add a python script for combining importsfrom __future__ import with_statement import os file_contents = {} file_imports = {} def get_file(file_name): if file_name[-2:] != '.v': file_name += '.v' if file_name not in file_contents.keys(): print(file_name) try: with open(file_name, '...
<commit_before><commit_msg>Add a python script for combining imports<commit_after>from __future__ import with_statement import os file_contents = {} file_imports = {} def get_file(file_name): if file_name[-2:] != '.v': file_name += '.v' if file_name not in file_contents.keys(): print(file_name) ...
3ea10a12026341f692e0bb6abfebdb1b96aa41b2
examples/list-public-addresses.py
examples/list-public-addresses.py
import openshift3.endpoints as endpoints import openshift3.resources as resources client = endpoints.Client() projects = client.oapi.v1.projects.get() #print(projects) #print(resources.dumps(projects, indent=4, sort_keys=True)) #print() def public_address(route): host = route.spec.host path = route.spec.pat...
Add example of listing exposed URLs for services.
Add example of listing exposed URLs for services.
Python
bsd-2-clause
getwarped/powershift
Add example of listing exposed URLs for services.
import openshift3.endpoints as endpoints import openshift3.resources as resources client = endpoints.Client() projects = client.oapi.v1.projects.get() #print(projects) #print(resources.dumps(projects, indent=4, sort_keys=True)) #print() def public_address(route): host = route.spec.host path = route.spec.pat...
<commit_before><commit_msg>Add example of listing exposed URLs for services.<commit_after>
import openshift3.endpoints as endpoints import openshift3.resources as resources client = endpoints.Client() projects = client.oapi.v1.projects.get() #print(projects) #print(resources.dumps(projects, indent=4, sort_keys=True)) #print() def public_address(route): host = route.spec.host path = route.spec.pat...
Add example of listing exposed URLs for services.import openshift3.endpoints as endpoints import openshift3.resources as resources client = endpoints.Client() projects = client.oapi.v1.projects.get() #print(projects) #print(resources.dumps(projects, indent=4, sort_keys=True)) #print() def public_address(route): ...
<commit_before><commit_msg>Add example of listing exposed URLs for services.<commit_after>import openshift3.endpoints as endpoints import openshift3.resources as resources client = endpoints.Client() projects = client.oapi.v1.projects.get() #print(projects) #print(resources.dumps(projects, indent=4, sort_keys=True))...
600432490f78e1ed74ea334a5a46a30edd384a11
process_test.py
process_test.py
import argparse, time from pycompss.api.task import task from pycompss.api.parameter import * #class process_test: # # def __init__(self): # self.ready = True @task(x = IN) def main(x): print time.time(), x y = range(1) #pt = process_test() map(main, y)
Test process for running on COMPSs
Test process for running on COMPSs
Python
apache-2.0
Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq
Test process for running on COMPSs
import argparse, time from pycompss.api.task import task from pycompss.api.parameter import * #class process_test: # # def __init__(self): # self.ready = True @task(x = IN) def main(x): print time.time(), x y = range(1) #pt = process_test() map(main, y)
<commit_before><commit_msg>Test process for running on COMPSs<commit_after>
import argparse, time from pycompss.api.task import task from pycompss.api.parameter import * #class process_test: # # def __init__(self): # self.ready = True @task(x = IN) def main(x): print time.time(), x y = range(1) #pt = process_test() map(main, y)
Test process for running on COMPSsimport argparse, time from pycompss.api.task import task from pycompss.api.parameter import * #class process_test: # # def __init__(self): # self.ready = True @task(x = IN) def main(x): print time.time(), x y = range(1) #pt = process_test() map(main, y)
<commit_before><commit_msg>Test process for running on COMPSs<commit_after>import argparse, time from pycompss.api.task import task from pycompss.api.parameter import * #class process_test: # # def __init__(self): # self.ready = True @task(x = IN) def main(x): print time.time(), x y = range(1) ...
af566e0cd0958dadd0de55d51b50ad026a8f2b99
build_android_prepare.py
build_android_prepare.py
"""Configuration for the Caffe2 installation. """ from build import Config import sys Config.USE_SYSTEM_PROTOBUF = False Config.PROTOC_BINARY = 'gen/third_party/google/protoc' Config.USE_OPENMP = False if __name__ == '__main__': from brewtool.brewery import Brewery Brewery.Run( Config, ['buil...
Add a simple script to help build android.
Add a simple script to help build android.
Python
apache-2.0
davinwang/caffe2,sf-wind/caffe2,davinwang/caffe2,bwasti/caffe2,pietern/caffe2,xzturn/caffe2,davinwang/caffe2,sf-wind/caffe2,bwasti/caffe2,davinwang/caffe2,bwasti/caffe2,bwasti/caffe2,sf-wind/caffe2,caffe2/caffe2,pietern/caffe2,pietern/caffe2,Yangqing/caffe2,xzturn/caffe2,Yangqing/caffe2,davinwang/caffe2,Yangqing/caffe2...
Add a simple script to help build android.
"""Configuration for the Caffe2 installation. """ from build import Config import sys Config.USE_SYSTEM_PROTOBUF = False Config.PROTOC_BINARY = 'gen/third_party/google/protoc' Config.USE_OPENMP = False if __name__ == '__main__': from brewtool.brewery import Brewery Brewery.Run( Config, ['buil...
<commit_before><commit_msg>Add a simple script to help build android.<commit_after>
"""Configuration for the Caffe2 installation. """ from build import Config import sys Config.USE_SYSTEM_PROTOBUF = False Config.PROTOC_BINARY = 'gen/third_party/google/protoc' Config.USE_OPENMP = False if __name__ == '__main__': from brewtool.brewery import Brewery Brewery.Run( Config, ['buil...
Add a simple script to help build android."""Configuration for the Caffe2 installation. """ from build import Config import sys Config.USE_SYSTEM_PROTOBUF = False Config.PROTOC_BINARY = 'gen/third_party/google/protoc' Config.USE_OPENMP = False if __name__ == '__main__': from brewtool.brewery import Brewery B...
<commit_before><commit_msg>Add a simple script to help build android.<commit_after>"""Configuration for the Caffe2 installation. """ from build import Config import sys Config.USE_SYSTEM_PROTOBUF = False Config.PROTOC_BINARY = 'gen/third_party/google/protoc' Config.USE_OPENMP = False if __name__ == '__main__': f...
153fe45973f2299f14d6c444f93a34ca82ea7aa4
tensorflow/examples/speech_commands/conv_only.py
tensorflow/examples/speech_commands/conv_only.py
# Copyright 2017 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 conv to tflite script for conv_actions.
Add conv to tflite script for conv_actions.
Python
apache-2.0
aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow,aselle/tensorflow
Add conv to tflite script for conv_actions.
# Copyright 2017 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 conv to tflite script for conv_actions.<commit_after>
# Copyright 2017 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 conv to tflite script for conv_actions.# Copyright 2017 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...
<commit_before><commit_msg>Add conv to tflite script for conv_actions.<commit_after># Copyright 2017 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 ...
86241da03ecab6b540944004b8bcbb4f3c577bdc
numba/cuda/tests/cudapy/test_dispatcher.py
numba/cuda/tests/cudapy/test_dispatcher.py
from numba import cuda, float32, int32 from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase @skip_on_cudasim('Dispatcher objects not used in the simulator') class TestDispatcher(CUDATestCase): def _test_no_double_specialize(self, dispatcher): with self.assertRaises(RuntimeError) as e: ...
Add Dispatcher specialization cache tests
CUDA: Add Dispatcher specialization cache tests
Python
bsd-2-clause
stonebig/numba,stuartarchibald/numba,seibert/numba,seibert/numba,IntelLabs/numba,sklam/numba,gmarkall/numba,gmarkall/numba,cpcloud/numba,sklam/numba,stonebig/numba,numba/numba,IntelLabs/numba,gmarkall/numba,stuartarchibald/numba,numba/numba,seibert/numba,seibert/numba,stuartarchibald/numba,stonebig/numba,gmarkall/numba...
CUDA: Add Dispatcher specialization cache tests
from numba import cuda, float32, int32 from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase @skip_on_cudasim('Dispatcher objects not used in the simulator') class TestDispatcher(CUDATestCase): def _test_no_double_specialize(self, dispatcher): with self.assertRaises(RuntimeError) as e: ...
<commit_before><commit_msg>CUDA: Add Dispatcher specialization cache tests<commit_after>
from numba import cuda, float32, int32 from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase @skip_on_cudasim('Dispatcher objects not used in the simulator') class TestDispatcher(CUDATestCase): def _test_no_double_specialize(self, dispatcher): with self.assertRaises(RuntimeError) as e: ...
CUDA: Add Dispatcher specialization cache testsfrom numba import cuda, float32, int32 from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase @skip_on_cudasim('Dispatcher objects not used in the simulator') class TestDispatcher(CUDATestCase): def _test_no_double_specialize(self, dispatcher): ...
<commit_before><commit_msg>CUDA: Add Dispatcher specialization cache tests<commit_after>from numba import cuda, float32, int32 from numba.cuda.testing import skip_on_cudasim, unittest, CUDATestCase @skip_on_cudasim('Dispatcher objects not used in the simulator') class TestDispatcher(CUDATestCase): def _test_no_do...
277ec688d7f92c415446e700db42386620d9b418
satnogsclient/settings.py
satnogsclient/settings.py
from os import environ DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None) ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None) DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
Add configuration file for client
Add configuration file for client
Python
agpl-3.0
adamkalis/satnogs-client,cshields/satnogs-client,adamkalis/satnogs-client,cshields/satnogs-client
Add configuration file for client
from os import environ DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None) ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None) DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
<commit_before><commit_msg>Add configuration file for client<commit_after>
from os import environ DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None) ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None) DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
Add configuration file for clientfrom os import environ DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None) ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None) DECODING_COMMAND = environ.get('DECODING_COMMAND', None)
<commit_before><commit_msg>Add configuration file for client<commit_after>from os import environ DEMODULATION_COMMAND = environ.get('DEMODULATION_COMMAND', None) ENCODING_COMMAND = environ.get('ENCODING_COMMAND', None) DECODING_COMMAND = environ.get('DECODING_COMMAND', None)