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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
57c4bcff678d65262463f94ea7996367a1c1ec35 | analytics/tshirt_size_distribution.py | analytics/tshirt_size_distribution.py | import csv
import plotly.plotly as py
import sys
from collections import defaultdict
from plotly.graph_objs import *
city = sys.argv[1].lower()
path_to_csv_file = sys.argv[2]
column_number = int(sys.argv[3])
with open(path_to_csv_file) as csv_file:
csv_data = csv.reader(csv_file)
next(csv_data, None)
tsh... | Add script to determine and plot tshirt size distribution | Add script to determine and plot tshirt size distribution
| Python | mit | wearhacks/wearhacks_analytics | Add script to determine and plot tshirt size distribution | import csv
import plotly.plotly as py
import sys
from collections import defaultdict
from plotly.graph_objs import *
city = sys.argv[1].lower()
path_to_csv_file = sys.argv[2]
column_number = int(sys.argv[3])
with open(path_to_csv_file) as csv_file:
csv_data = csv.reader(csv_file)
next(csv_data, None)
tsh... | <commit_before><commit_msg>Add script to determine and plot tshirt size distribution<commit_after> | import csv
import plotly.plotly as py
import sys
from collections import defaultdict
from plotly.graph_objs import *
city = sys.argv[1].lower()
path_to_csv_file = sys.argv[2]
column_number = int(sys.argv[3])
with open(path_to_csv_file) as csv_file:
csv_data = csv.reader(csv_file)
next(csv_data, None)
tsh... | Add script to determine and plot tshirt size distributionimport csv
import plotly.plotly as py
import sys
from collections import defaultdict
from plotly.graph_objs import *
city = sys.argv[1].lower()
path_to_csv_file = sys.argv[2]
column_number = int(sys.argv[3])
with open(path_to_csv_file) as csv_file:
csv_dat... | <commit_before><commit_msg>Add script to determine and plot tshirt size distribution<commit_after>import csv
import plotly.plotly as py
import sys
from collections import defaultdict
from plotly.graph_objs import *
city = sys.argv[1].lower()
path_to_csv_file = sys.argv[2]
column_number = int(sys.argv[3])
with open(p... | |
9b17918bc992481efb51d8df972b879499424e79 | lib/ansible/utils/module_docs_fragments/openstack.py | lib/ansible/utils/module_docs_fragments/openstack.py | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | Add doc fragment for new OpenStack modules | Add doc fragment for new OpenStack modules
| Python | mit | thaim/ansible,thaim/ansible | Add doc fragment for new OpenStack modules | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | <commit_before><commit_msg>Add doc fragment for new OpenStack modules<commit_after> | # Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option... | Add doc fragment for new OpenStack modules# Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either vers... | <commit_before><commit_msg>Add doc fragment for new OpenStack modules<commit_after># Copyright (c) 2014 Hewlett-Packard Development Company, L.P.
#
# This file is part of Ansible
#
# Ansible is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# ... | |
dc0a1b2777acc4b9b97de6c471eb8e35dcac2254 | tools/telemetry/telemetry/page/actions/action_runner_unittest.py | tools/telemetry/telemetry/page/actions/action_runner_unittest.py | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core.backends.chrome import tracing_backend
from telemetry.core.timeline import model
from telemetry.page.actions import action_runner as actio... | Add test for action_runner.BeginInteraction and action_runner.EndInteraction. | Add test for action_runner.BeginInteraction and action_runner.EndInteraction.
BUG=368767
Review URL: https://codereview.chromium.org/294943006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f2087c98
| Python | bsd-3-clause | PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,ltilve/chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chrom... | Add test for action_runner.BeginInteraction and action_runner.EndInteraction.
BUG=368767
Review URL: https://codereview.chromium.org/294943006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f2087c98 | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core.backends.chrome import tracing_backend
from telemetry.core.timeline import model
from telemetry.page.actions import action_runner as actio... | <commit_before><commit_msg>Add test for action_runner.BeginInteraction and action_runner.EndInteraction.
BUG=368767
Review URL: https://codereview.chromium.org/294943006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f2087c98<commit_after> | # Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from telemetry.core.backends.chrome import tracing_backend
from telemetry.core.timeline import model
from telemetry.page.actions import action_runner as actio... | Add test for action_runner.BeginInteraction and action_runner.EndInteraction.
BUG=368767
Review URL: https://codereview.chromium.org/294943006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f2087c98# Copyright 2014 The Chromium Authors. All rights reserved.
# Use of this sour... | <commit_before><commit_msg>Add test for action_runner.BeginInteraction and action_runner.EndInteraction.
BUG=368767
Review URL: https://codereview.chromium.org/294943006
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@272549 0039d316-1c4b-4281-b951-d872f2087c98<commit_after># Copyright 2014 The Chromium Authors... | |
bec07279b0e14a9a0e3f11efc7ecbc6e908aa1ef | latex_utils.py | latex_utils.py | """
Utilities to work with LaTeX files.
"""
import argparse
import re
def read_tex_file(tex_file, encoding="utf-8"):
with open(tex_file, 'r', encoding=encoding) as data:
tex_source = data.read()
return tex_source
def write_tex_file(tex_file, tex_source):
with open(tex_file, 'w') as open_file:
... | Add utilities to work with LaTeX files | Add utilities to work with LaTeX files
| Python | mit | teunzwart/latex-production-tools | Add utilities to work with LaTeX files | """
Utilities to work with LaTeX files.
"""
import argparse
import re
def read_tex_file(tex_file, encoding="utf-8"):
with open(tex_file, 'r', encoding=encoding) as data:
tex_source = data.read()
return tex_source
def write_tex_file(tex_file, tex_source):
with open(tex_file, 'w') as open_file:
... | <commit_before><commit_msg>Add utilities to work with LaTeX files<commit_after> | """
Utilities to work with LaTeX files.
"""
import argparse
import re
def read_tex_file(tex_file, encoding="utf-8"):
with open(tex_file, 'r', encoding=encoding) as data:
tex_source = data.read()
return tex_source
def write_tex_file(tex_file, tex_source):
with open(tex_file, 'w') as open_file:
... | Add utilities to work with LaTeX files"""
Utilities to work with LaTeX files.
"""
import argparse
import re
def read_tex_file(tex_file, encoding="utf-8"):
with open(tex_file, 'r', encoding=encoding) as data:
tex_source = data.read()
return tex_source
def write_tex_file(tex_file, tex_source):
wit... | <commit_before><commit_msg>Add utilities to work with LaTeX files<commit_after>"""
Utilities to work with LaTeX files.
"""
import argparse
import re
def read_tex_file(tex_file, encoding="utf-8"):
with open(tex_file, 'r', encoding=encoding) as data:
tex_source = data.read()
return tex_source
def writ... | |
334695484d61693c41c8a30aea6cf753b9ed8267 | lstm.py | lstm.py | import tensorflow as tf
import numpy as np
tf.set_random_seed(5)
n_inputs = 28
n_neurons = 150
n_layers = 3
n_steps = 28
n_outputs = 10
learning_rate = 0.001
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/")
X_test = mnist.test.images.reshape((-1, n_steps, n_... | Add code for LSTM based MNIST | Add code for LSTM based MNIST
Training takes time but accuracy is great after few
iterations.
| Python | mit | KT12/hands_on_machine_learning | Add code for LSTM based MNIST
Training takes time but accuracy is great after few
iterations. | import tensorflow as tf
import numpy as np
tf.set_random_seed(5)
n_inputs = 28
n_neurons = 150
n_layers = 3
n_steps = 28
n_outputs = 10
learning_rate = 0.001
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/")
X_test = mnist.test.images.reshape((-1, n_steps, n_... | <commit_before><commit_msg>Add code for LSTM based MNIST
Training takes time but accuracy is great after few
iterations.<commit_after> | import tensorflow as tf
import numpy as np
tf.set_random_seed(5)
n_inputs = 28
n_neurons = 150
n_layers = 3
n_steps = 28
n_outputs = 10
learning_rate = 0.001
from tensorflow.examples.tutorials.mnist import input_data
mnist = input_data.read_data_sets("/tmp/data/")
X_test = mnist.test.images.reshape((-1, n_steps, n_... | Add code for LSTM based MNIST
Training takes time but accuracy is great after few
iterations.import tensorflow as tf
import numpy as np
tf.set_random_seed(5)
n_inputs = 28
n_neurons = 150
n_layers = 3
n_steps = 28
n_outputs = 10
learning_rate = 0.001
from tensorflow.examples.tutorials.mnist import input_data
mnist... | <commit_before><commit_msg>Add code for LSTM based MNIST
Training takes time but accuracy is great after few
iterations.<commit_after>import tensorflow as tf
import numpy as np
tf.set_random_seed(5)
n_inputs = 28
n_neurons = 150
n_layers = 3
n_steps = 28
n_outputs = 10
learning_rate = 0.001
from tensorflow.example... | |
0da81aee8d1d1c1badee561c594e191dbbffdc9c | pyres/failure/base.py | pyres/failure/base.py | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queu... | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queue`` -- The queue... | Save our backtraces in a compatible manner with resque. | Save our backtraces in a compatible manner with resque.
| Python | mit | binarydud/pyres,guaijiao/pyres,TylerLubeck/pyres,Affectiva/pyres | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queu... | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queue`` -- The queue... | <commit_before>import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
... | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queue`` -- The queue... | import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
``queu... | <commit_before>import sys
import traceback
class BaseBackend(object):
"""Provides a base class that custom backends can subclass. Also provides basic
traceback and message parsing.
The ``__init__`` takes these keyword arguments:
``exp`` -- The exception generated by your failure.
... |
a4845aff79b1efb89a210b3b2cc57739cc27bebf | chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py | chatterbot/ext/django_chatterbot/migrations/0018_text_max_length.py | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_chatterbot', '0017_tags_unique'),
]
operations = [
migrations.AlterField(
model_name='statement',
name='in_response_to',
field=models.CharField(ma... | Create Django migrations for statement text max length | Create Django migrations for statement text max length
| Python | bsd-3-clause | gunthercox/ChatterBot,vkosuri/ChatterBot | Create Django migrations for statement text max length | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_chatterbot', '0017_tags_unique'),
]
operations = [
migrations.AlterField(
model_name='statement',
name='in_response_to',
field=models.CharField(ma... | <commit_before><commit_msg>Create Django migrations for statement text max length<commit_after> | from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_chatterbot', '0017_tags_unique'),
]
operations = [
migrations.AlterField(
model_name='statement',
name='in_response_to',
field=models.CharField(ma... | Create Django migrations for statement text max lengthfrom django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_chatterbot', '0017_tags_unique'),
]
operations = [
migrations.AlterField(
model_name='statement',
name='... | <commit_before><commit_msg>Create Django migrations for statement text max length<commit_after>from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('django_chatterbot', '0017_tags_unique'),
]
operations = [
migrations.AlterField(
m... | |
5c3a54a79a763b3b761f053f7360ad2d670ae5cb | bssrdf_estimate/interface/bssrdf_redner_widget.py | bssrdf_estimate/interface/bssrdf_redner_widget.py | # -*- coding: utf-8 -*-
from .image_widget import ImageWidget
class BSSRDFRenderWidget(ImageWidget):
def __init__(self, parent=None):
super(BSSRDFRenderWidget, self).__init__(parent)
| Add BSSRDF render widget file. | Add BSSRDF render widget file.
| Python | mit | tatsy/bssrdf-estimate,tatsy/bssrdf-estimate | Add BSSRDF render widget file. | # -*- coding: utf-8 -*-
from .image_widget import ImageWidget
class BSSRDFRenderWidget(ImageWidget):
def __init__(self, parent=None):
super(BSSRDFRenderWidget, self).__init__(parent)
| <commit_before><commit_msg>Add BSSRDF render widget file.<commit_after> | # -*- coding: utf-8 -*-
from .image_widget import ImageWidget
class BSSRDFRenderWidget(ImageWidget):
def __init__(self, parent=None):
super(BSSRDFRenderWidget, self).__init__(parent)
| Add BSSRDF render widget file.# -*- coding: utf-8 -*-
from .image_widget import ImageWidget
class BSSRDFRenderWidget(ImageWidget):
def __init__(self, parent=None):
super(BSSRDFRenderWidget, self).__init__(parent)
| <commit_before><commit_msg>Add BSSRDF render widget file.<commit_after># -*- coding: utf-8 -*-
from .image_widget import ImageWidget
class BSSRDFRenderWidget(ImageWidget):
def __init__(self, parent=None):
super(BSSRDFRenderWidget, self).__init__(parent)
| |
6a3d0ae17efd09bbfc184a4c28115cb61b2006e7 | bjcp/style_parser.py | bjcp/style_parser.py | #! /usr/bin/env python
import csv
import pprint
import string
"""
Parse the BJCP 2015 Styles CSV file
"""
def main():
styles = {}
filename = '2015_Styles.csv'
with open(filename, 'rb') as f:
reader = csv.reader(f)
stylename = ''
for row in reader:
if row[0] and row[1... | Add a utility to parse the BJCP 2015 Styles csv | Add a utility to parse the BJCP 2015 Styles csv
| Python | mit | chrisgilmerproj/brewdata,chrisgilmerproj/brewdata | Add a utility to parse the BJCP 2015 Styles csv | #! /usr/bin/env python
import csv
import pprint
import string
"""
Parse the BJCP 2015 Styles CSV file
"""
def main():
styles = {}
filename = '2015_Styles.csv'
with open(filename, 'rb') as f:
reader = csv.reader(f)
stylename = ''
for row in reader:
if row[0] and row[1... | <commit_before><commit_msg>Add a utility to parse the BJCP 2015 Styles csv<commit_after> | #! /usr/bin/env python
import csv
import pprint
import string
"""
Parse the BJCP 2015 Styles CSV file
"""
def main():
styles = {}
filename = '2015_Styles.csv'
with open(filename, 'rb') as f:
reader = csv.reader(f)
stylename = ''
for row in reader:
if row[0] and row[1... | Add a utility to parse the BJCP 2015 Styles csv#! /usr/bin/env python
import csv
import pprint
import string
"""
Parse the BJCP 2015 Styles CSV file
"""
def main():
styles = {}
filename = '2015_Styles.csv'
with open(filename, 'rb') as f:
reader = csv.reader(f)
stylename = ''
for... | <commit_before><commit_msg>Add a utility to parse the BJCP 2015 Styles csv<commit_after>#! /usr/bin/env python
import csv
import pprint
import string
"""
Parse the BJCP 2015 Styles CSV file
"""
def main():
styles = {}
filename = '2015_Styles.csv'
with open(filename, 'rb') as f:
reader = csv.rea... | |
3763078a5a9a1973b17fd1c11411c29e176a034f | py/baseball-game.py | py/baseball-game.py | class Solution(object):
def calPoints(self, ops):
"""
:type ops: List[str]
:rtype: int
"""
s = 0
stack = []
for c in ops:
try:
v = int(c)
stack.append(v)
except ValueError:
if c == 'C':
... | Add py solution for 682. Baseball Game | Add py solution for 682. Baseball Game
682. Baseball Game: https://leetcode.com/problems/baseball-game/
| Python | apache-2.0 | ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode,ckclark/leetcode | Add py solution for 682. Baseball Game
682. Baseball Game: https://leetcode.com/problems/baseball-game/ | class Solution(object):
def calPoints(self, ops):
"""
:type ops: List[str]
:rtype: int
"""
s = 0
stack = []
for c in ops:
try:
v = int(c)
stack.append(v)
except ValueError:
if c == 'C':
... | <commit_before><commit_msg>Add py solution for 682. Baseball Game
682. Baseball Game: https://leetcode.com/problems/baseball-game/<commit_after> | class Solution(object):
def calPoints(self, ops):
"""
:type ops: List[str]
:rtype: int
"""
s = 0
stack = []
for c in ops:
try:
v = int(c)
stack.append(v)
except ValueError:
if c == 'C':
... | Add py solution for 682. Baseball Game
682. Baseball Game: https://leetcode.com/problems/baseball-game/class Solution(object):
def calPoints(self, ops):
"""
:type ops: List[str]
:rtype: int
"""
s = 0
stack = []
for c in ops:
try:
v... | <commit_before><commit_msg>Add py solution for 682. Baseball Game
682. Baseball Game: https://leetcode.com/problems/baseball-game/<commit_after>class Solution(object):
def calPoints(self, ops):
"""
:type ops: List[str]
:rtype: int
"""
s = 0
stack = []
for c i... | |
f25364ba8dbbd7924e068146599f56e5bd797c4e | test/python_api/lldbutil/TestLLDBIterator.py | test/python_api/lldbutil/TestLLDBIterator.py | """
Test lldbutil.lldb_iter() which returns an iterator object for lldb's aggregate
data structures.
"""
import os, time
import re
import unittest2
import lldb
from lldbtest import *
class LLDBIteratorTestCase(TestBase):
mydir = "python_api/lldbutil"
def setUp(self):
# Call super's setUp().
... | Add a test case for lldbutil.lldb_iter() which returns an iterator object for lldb objects which can contain other lldb objects. Examples are: SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains SBThread, SBThread contains SBFrame, etc. | Add a test case for lldbutil.lldb_iter() which returns an iterator object
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@130... | Python | apache-2.0 | apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb | Add a test case for lldbutil.lldb_iter() which returns an iterator object
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@130... | """
Test lldbutil.lldb_iter() which returns an iterator object for lldb's aggregate
data structures.
"""
import os, time
import re
import unittest2
import lldb
from lldbtest import *
class LLDBIteratorTestCase(TestBase):
mydir = "python_api/lldbutil"
def setUp(self):
# Call super's setUp().
... | <commit_before><commit_msg>Add a test case for lldbutil.lldb_iter() which returns an iterator object
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
git-svn-id: b33bab8abb5b18c12... | """
Test lldbutil.lldb_iter() which returns an iterator object for lldb's aggregate
data structures.
"""
import os, time
import re
import unittest2
import lldb
from lldbtest import *
class LLDBIteratorTestCase(TestBase):
mydir = "python_api/lldbutil"
def setUp(self):
# Call super's setUp().
... | Add a test case for lldbutil.lldb_iter() which returns an iterator object
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
git-svn-id: b33bab8abb5b18c12ee100cd7761ab452d00b2b0@130... | <commit_before><commit_msg>Add a test case for lldbutil.lldb_iter() which returns an iterator object
for lldb objects which can contain other lldb objects. Examples are:
SBTarget contains SBModule, SBModule contains SBSymbols, SBProcess contains
SBThread, SBThread contains SBFrame, etc.
git-svn-id: b33bab8abb5b18c12... | |
aa837386f4cce1ff23fbdf58a633d0e4bf1cc846 | setup-utils/passhash_pbkdf2.py | setup-utils/passhash_pbkdf2.py | import sys
sys.path.append("..") # This needs to work from the setup-utils subdirectory
from txircd.modules.hash_pbkdf2 import HashPBKDF2
if len(sys.argv) < 2:
print("Usage: {} password".format(__file__))
else:
hasher = HashPBKDF2()
hashedPass = hasher.hash(sys.argv[1])
print(hashedPass) | Add a password hasher for opers | Add a password hasher for opers
| Python | bsd-3-clause | ElementalAlchemist/txircd,Heufneutje/txircd | Add a password hasher for opers | import sys
sys.path.append("..") # This needs to work from the setup-utils subdirectory
from txircd.modules.hash_pbkdf2 import HashPBKDF2
if len(sys.argv) < 2:
print("Usage: {} password".format(__file__))
else:
hasher = HashPBKDF2()
hashedPass = hasher.hash(sys.argv[1])
print(hashedPass) | <commit_before><commit_msg>Add a password hasher for opers<commit_after> | import sys
sys.path.append("..") # This needs to work from the setup-utils subdirectory
from txircd.modules.hash_pbkdf2 import HashPBKDF2
if len(sys.argv) < 2:
print("Usage: {} password".format(__file__))
else:
hasher = HashPBKDF2()
hashedPass = hasher.hash(sys.argv[1])
print(hashedPass) | Add a password hasher for opersimport sys
sys.path.append("..") # This needs to work from the setup-utils subdirectory
from txircd.modules.hash_pbkdf2 import HashPBKDF2
if len(sys.argv) < 2:
print("Usage: {} password".format(__file__))
else:
hasher = HashPBKDF2()
hashedPass = hasher.hash(sys.argv[1])
print(hashedP... | <commit_before><commit_msg>Add a password hasher for opers<commit_after>import sys
sys.path.append("..") # This needs to work from the setup-utils subdirectory
from txircd.modules.hash_pbkdf2 import HashPBKDF2
if len(sys.argv) < 2:
print("Usage: {} password".format(__file__))
else:
hasher = HashPBKDF2()
hashedPass ... | |
bee9396a4a8bdef3a22b2010cf873637d5bf56db | numberutils.py | numberutils.py | ##-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Number to Hangul string util.
'''
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ = '0.0.1'
__maintainer__ = 'SeomGi, Han'
__email__ = 'iandmyhand@gmail.com'
__status__ = 'Pro... | Add a function can convert number to Hangul string. | Add a function can convert number to Hangul string.
| Python | mit | iandmyhand/python-utils | Add a function can convert number to Hangul string. | ##-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Number to Hangul string util.
'''
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ = '0.0.1'
__maintainer__ = 'SeomGi, Han'
__email__ = 'iandmyhand@gmail.com'
__status__ = 'Pro... | <commit_before><commit_msg>Add a function can convert number to Hangul string.<commit_after> | ##-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Number to Hangul string util.
'''
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ = '0.0.1'
__maintainer__ = 'SeomGi, Han'
__email__ = 'iandmyhand@gmail.com'
__status__ = 'Pro... | Add a function can convert number to Hangul string.##-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Number to Hangul string util.
'''
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ = '0.0.1'
__maintainer__ = 'SeomGi, Han'
_... | <commit_before><commit_msg>Add a function can convert number to Hangul string.<commit_after>##-*- coding: utf-8 -*-
#!/usr/bin/python
'''
Number to Hangul string util.
'''
__author__ = 'SeomGi, Han'
__credits__ = ['SeomGi, Han']
__copyright__ = 'Copyright 2015, Python Utils Project'
__license__ = 'MIT'
__version__ =... | |
d116c4013ebf8b5831d450ae12932446056e7a84 | dump_model.py | dump_model.py |
import pickle
import numpy as np
import random
import os
import struct
from config import *
def binary(num):
"""
Float to IEEE-754 single precision binary string.
"""
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0') for c in struct.pack('!f', num))
def test_manual_classification(model)... | Add means to dump model for manual classification | Add means to dump model for manual classification
| Python | mit | hptruong93/MouseGestureRecognition,hptruong93/MouseGestureRecognition | Add means to dump model for manual classification |
import pickle
import numpy as np
import random
import os
import struct
from config import *
def binary(num):
"""
Float to IEEE-754 single precision binary string.
"""
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0') for c in struct.pack('!f', num))
def test_manual_classification(model)... | <commit_before><commit_msg>Add means to dump model for manual classification<commit_after> |
import pickle
import numpy as np
import random
import os
import struct
from config import *
def binary(num):
"""
Float to IEEE-754 single precision binary string.
"""
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0') for c in struct.pack('!f', num))
def test_manual_classification(model)... | Add means to dump model for manual classification
import pickle
import numpy as np
import random
import os
import struct
from config import *
def binary(num):
"""
Float to IEEE-754 single precision binary string.
"""
return ''.join(bin(ord(c)).replace('0b', '').rjust(8, '0') for c in struct.pack('... | <commit_before><commit_msg>Add means to dump model for manual classification<commit_after>
import pickle
import numpy as np
import random
import os
import struct
from config import *
def binary(num):
"""
Float to IEEE-754 single precision binary string.
"""
return ''.join(bin(ord(c)).replace('0b',... | |
a49adce8b7822d972bfef5046d69366a4b26e0bb | jjvm.py | jjvm.py | #!/usr/bin/python
import argparse
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = MyParser('Run bytecode in jjvm')
parser.add_argument('path', help='path to class')
args = parser... | Print sequence of bytes that comprise the class file | Print sequence of bytes that comprise the class file
| Python | apache-2.0 | justinccdev/jjvm | Print sequence of bytes that comprise the class file | #!/usr/bin/python
import argparse
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = MyParser('Run bytecode in jjvm')
parser.add_argument('path', help='path to class')
args = parser... | <commit_before><commit_msg>Print sequence of bytes that comprise the class file<commit_after> | #!/usr/bin/python
import argparse
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = MyParser('Run bytecode in jjvm')
parser.add_argument('path', help='path to class')
args = parser... | Print sequence of bytes that comprise the class file#!/usr/bin/python
import argparse
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = MyParser('Run bytecode in jjvm')
parser.add_... | <commit_before><commit_msg>Print sequence of bytes that comprise the class file<commit_after>#!/usr/bin/python
import argparse
import sys
class MyParser(argparse.ArgumentParser):
def error(self, message):
sys.stderr.write('error: %s\n' % message)
self.print_help()
sys.exit(2)
parser = MyP... | |
0c4d113b7379ac4eea6a51f1c510881095caf9e8 | contrib/session_generator.py | contrib/session_generator.py | #!/usr/bin/env python
# Works with both python2 and python3; please preserve this property
# Copyright (C) 2016 mod_auth_gssapi contributors - See COPYING for (C) terms
# Simple script to generate GssapiSessionKey values
import base64
import os
bits = base64.b64encode(os.urandom(32))
print("GssapiSessionKey key:" +... | Add simple script for generating session keys | Add simple script for generating session keys
Signed-off-by: Robbie Harwood <3f8631879978f4cea53bf1163760f1ac18f9cb08@redhat.com>
Reviewed-by: Simo Sorce <65f99581a93cf30dafc32b5c178edc6b0294a07f@redhat.com>
Closes #105
| Python | mit | frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi,frenche/mod_auth_gssapi | Add simple script for generating session keys
Signed-off-by: Robbie Harwood <3f8631879978f4cea53bf1163760f1ac18f9cb08@redhat.com>
Reviewed-by: Simo Sorce <65f99581a93cf30dafc32b5c178edc6b0294a07f@redhat.com>
Closes #105 | #!/usr/bin/env python
# Works with both python2 and python3; please preserve this property
# Copyright (C) 2016 mod_auth_gssapi contributors - See COPYING for (C) terms
# Simple script to generate GssapiSessionKey values
import base64
import os
bits = base64.b64encode(os.urandom(32))
print("GssapiSessionKey key:" +... | <commit_before><commit_msg>Add simple script for generating session keys
Signed-off-by: Robbie Harwood <3f8631879978f4cea53bf1163760f1ac18f9cb08@redhat.com>
Reviewed-by: Simo Sorce <65f99581a93cf30dafc32b5c178edc6b0294a07f@redhat.com>
Closes #105<commit_after> | #!/usr/bin/env python
# Works with both python2 and python3; please preserve this property
# Copyright (C) 2016 mod_auth_gssapi contributors - See COPYING for (C) terms
# Simple script to generate GssapiSessionKey values
import base64
import os
bits = base64.b64encode(os.urandom(32))
print("GssapiSessionKey key:" +... | Add simple script for generating session keys
Signed-off-by: Robbie Harwood <3f8631879978f4cea53bf1163760f1ac18f9cb08@redhat.com>
Reviewed-by: Simo Sorce <65f99581a93cf30dafc32b5c178edc6b0294a07f@redhat.com>
Closes #105#!/usr/bin/env python
# Works with both python2 and python3; please preserve this property
# Copyri... | <commit_before><commit_msg>Add simple script for generating session keys
Signed-off-by: Robbie Harwood <3f8631879978f4cea53bf1163760f1ac18f9cb08@redhat.com>
Reviewed-by: Simo Sorce <65f99581a93cf30dafc32b5c178edc6b0294a07f@redhat.com>
Closes #105<commit_after>#!/usr/bin/env python
# Works with both python2 and python3... | |
7e0f1552ebdadb8f2023167afcd557bdc09b06f9 | scripts/analysis/plot_velocity_based_position_controller_data.py | scripts/analysis/plot_velocity_based_position_controller_data.py | import numpy as np
import matplotlib.pyplot as plt
import sys
if sys.argc < 2:
print "Usage ./plot_velocity_based_position_controller.py [File_name]"
sys.exit(-1)
data = np.genfromtxt(sys.argv[-1], delimiter=',')
# 0 for x, 1 for y 2 for z and 3 for yaw
plot_axis = 3;
ts = (data[:,0] - data[0, 0])/1e9
plt.fi... | Add plotting script for analyzing velocity based position controller | Add plotting script for analyzing velocity based position controller
| Python | mpl-2.0 | jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy,jhu-asco/aerial_autonomy | Add plotting script for analyzing velocity based position controller | import numpy as np
import matplotlib.pyplot as plt
import sys
if sys.argc < 2:
print "Usage ./plot_velocity_based_position_controller.py [File_name]"
sys.exit(-1)
data = np.genfromtxt(sys.argv[-1], delimiter=',')
# 0 for x, 1 for y 2 for z and 3 for yaw
plot_axis = 3;
ts = (data[:,0] - data[0, 0])/1e9
plt.fi... | <commit_before><commit_msg>Add plotting script for analyzing velocity based position controller<commit_after> | import numpy as np
import matplotlib.pyplot as plt
import sys
if sys.argc < 2:
print "Usage ./plot_velocity_based_position_controller.py [File_name]"
sys.exit(-1)
data = np.genfromtxt(sys.argv[-1], delimiter=',')
# 0 for x, 1 for y 2 for z and 3 for yaw
plot_axis = 3;
ts = (data[:,0] - data[0, 0])/1e9
plt.fi... | Add plotting script for analyzing velocity based position controllerimport numpy as np
import matplotlib.pyplot as plt
import sys
if sys.argc < 2:
print "Usage ./plot_velocity_based_position_controller.py [File_name]"
sys.exit(-1)
data = np.genfromtxt(sys.argv[-1], delimiter=',')
# 0 for x, 1 for y 2 for z a... | <commit_before><commit_msg>Add plotting script for analyzing velocity based position controller<commit_after>import numpy as np
import matplotlib.pyplot as plt
import sys
if sys.argc < 2:
print "Usage ./plot_velocity_based_position_controller.py [File_name]"
sys.exit(-1)
data = np.genfromtxt(sys.argv[-1], del... | |
26c413ca10550454c773829d4fa7fceafe2e9504 | tests/test_data_checksums.py | tests/test_data_checksums.py | """ test data_checksums"""
from nose.tools import assert_equal
def test_data_checksums():
from pyne.data import data_checksums
assert_equal(len(data_checksums), 6)
assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be') | Add basic test of data_checksums | Add basic test of data_checksums
| Python | bsd-3-clause | pyne/simplesim | Add basic test of data_checksums | """ test data_checksums"""
from nose.tools import assert_equal
def test_data_checksums():
from pyne.data import data_checksums
assert_equal(len(data_checksums), 6)
assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be') | <commit_before><commit_msg>Add basic test of data_checksums<commit_after> | """ test data_checksums"""
from nose.tools import assert_equal
def test_data_checksums():
from pyne.data import data_checksums
assert_equal(len(data_checksums), 6)
assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be') | Add basic test of data_checksums""" test data_checksums"""
from nose.tools import assert_equal
def test_data_checksums():
from pyne.data import data_checksums
assert_equal(len(data_checksums), 6)
assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf07e5c6b0c2416be') | <commit_before><commit_msg>Add basic test of data_checksums<commit_after>""" test data_checksums"""
from nose.tools import assert_equal
def test_data_checksums():
from pyne.data import data_checksums
assert_equal(len(data_checksums), 6)
assert_equal(data_checksums['/neutron/simple_xs'], '3d6e086977783dcdf... | |
4eb18bb737cd878fb684d7ce4a0718ff88a1238d | chrome/installer/tools/shortcut_properties.py | chrome/installer/tools/shortcut_properties.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.
"""Dumps a Windows shortcut's property bag to stdout.
This is required to confirm correctness of properties that aren't readily
available in Windows UI.
"""... | Add a script to installer/tools to dump a shortcut's property bag. | Add a script to installer/tools to dump a shortcut's property bag.
This is required to verify DualMode and AppUserModelId properties which
are not otherwise visible in Windows shortcut properties UI.
BUG=501166
Review URL: https://codereview.chromium.org/1259213005
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e0... | Python | bsd-3-clause | ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,ltilve/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/ChromiumGStreamerBackend,CapOM/... | Add a script to installer/tools to dump a shortcut's property bag.
This is required to verify DualMode and AppUserModelId properties which
are not otherwise visible in Windows shortcut properties UI.
BUG=501166
Review URL: https://codereview.chromium.org/1259213005
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e0... | # 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.
"""Dumps a Windows shortcut's property bag to stdout.
This is required to confirm correctness of properties that aren't readily
available in Windows UI.
"""... | <commit_before><commit_msg>Add a script to installer/tools to dump a shortcut's property bag.
This is required to verify DualMode and AppUserModelId properties which
are not otherwise visible in Windows shortcut properties UI.
BUG=501166
Review URL: https://codereview.chromium.org/1259213005
Cr-Commit-Position: 972... | # 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.
"""Dumps a Windows shortcut's property bag to stdout.
This is required to confirm correctness of properties that aren't readily
available in Windows UI.
"""... | Add a script to installer/tools to dump a shortcut's property bag.
This is required to verify DualMode and AppUserModelId properties which
are not otherwise visible in Windows shortcut properties UI.
BUG=501166
Review URL: https://codereview.chromium.org/1259213005
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e0... | <commit_before><commit_msg>Add a script to installer/tools to dump a shortcut's property bag.
This is required to verify DualMode and AppUserModelId properties which
are not otherwise visible in Windows shortcut properties UI.
BUG=501166
Review URL: https://codereview.chromium.org/1259213005
Cr-Commit-Position: 972... | |
4ed4baae070cd6be5164e03369aa28c75e7684f2 | spec/bottling_specs/factory_specs/BottleSingletonAppLoader_specs.py | spec/bottling_specs/factory_specs/BottleSingletonAppLoader_specs.py | import fudge
from bottling.factory import BottleSingletonAppLoader
class describe_init:
def it_initializes_with_given_options(self):
ref = 'my_module:app'
kind = None
loader = BottleSingletonAppLoader(ref, kind)
assert loader.ref == ref
assert loader.kind == None... | Add loader for singleton apps | Add loader for singleton apps
| Python | mit | datamora/datamora,datamora/datamora | Add loader for singleton apps | import fudge
from bottling.factory import BottleSingletonAppLoader
class describe_init:
def it_initializes_with_given_options(self):
ref = 'my_module:app'
kind = None
loader = BottleSingletonAppLoader(ref, kind)
assert loader.ref == ref
assert loader.kind == None... | <commit_before><commit_msg>Add loader for singleton apps<commit_after> | import fudge
from bottling.factory import BottleSingletonAppLoader
class describe_init:
def it_initializes_with_given_options(self):
ref = 'my_module:app'
kind = None
loader = BottleSingletonAppLoader(ref, kind)
assert loader.ref == ref
assert loader.kind == None... | Add loader for singleton appsimport fudge
from bottling.factory import BottleSingletonAppLoader
class describe_init:
def it_initializes_with_given_options(self):
ref = 'my_module:app'
kind = None
loader = BottleSingletonAppLoader(ref, kind)
assert loader.ref == ref
... | <commit_before><commit_msg>Add loader for singleton apps<commit_after>import fudge
from bottling.factory import BottleSingletonAppLoader
class describe_init:
def it_initializes_with_given_options(self):
ref = 'my_module:app'
kind = None
loader = BottleSingletonAppLoader(ref, kind... | |
5496ccfc164a235521d2b6412b836c3ad84eebc1 | alembic/versions/4fe474604dbb_add_stores_managers_.py | alembic/versions/4fe474604dbb_add_stores_managers_.py | """Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""
# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated... | Add database revision which adds `stores_managers` table | Add database revision which adds `stores_managers` table
| Python | mit | beni55/overholt,mattupstate/overholt,RohithKP/overholt,beni55/overholt,jstacoder/overholt,alexmerser/overholt,jstacoder/overholt,bbuneci/overholt,jstacoder/overholt,qpxu007/overholt,mattupstate/overholt,qpxu007/overholt,qpxu007/overholt,alexmerser/overholt,RohithKP/overholt,jamesblunt/overholt,manhtuhtk/overholt,Rohith... | Add database revision which adds `stores_managers` table | """Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""
# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated... | <commit_before><commit_msg>Add database revision which adds `stores_managers` table<commit_after> | """Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""
# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'
from alembic import op
import sqlalchemy as sa
def upgrade():
### commands auto generated... | Add database revision which adds `stores_managers` table"""Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""
# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'
from alembic import op
import sqlalchem... | <commit_before><commit_msg>Add database revision which adds `stores_managers` table<commit_after>"""Add `stores_managers` table
Revision ID: 4fe474604dbb
Revises: 5a0e003fafb2
Create Date: 2013-06-28 22:18:42.292040
"""
# revision identifiers, used by Alembic.
revision = '4fe474604dbb'
down_revision = '5a0e003fafb2'... | |
b096b3aee871596a535b05266a63fe2655883e91 | compare_rankings.py | compare_rankings.py | """
Copyright 2017 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | Add script for comparing rankings | Add script for comparing rankings
| Python | apache-2.0 | rnowling/asaph,rnowling/asaph,rnowling/aranyani | Add script for comparing rankings | """
Copyright 2017 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | <commit_before><commit_msg>Add script for comparing rankings<commit_after> | """
Copyright 2017 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, softw... | Add script for comparing rankings"""
Copyright 2017 Ronald J. Nowling
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable l... | <commit_before><commit_msg>Add script for comparing rankings<commit_after>"""
Copyright 2017 Ronald J. Nowling
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/LIC... | |
bc2a6a9bc692c48efd894eaa4dce87a1dbb1b712 | journal/migrations/0009_auto_20190211_1515.py | journal/migrations/0009_auto_20190211_1515.py | # Generated by Django 2.1.6 on 2019-02-11 15:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journal', '0008_remove_userinfo_deleted'),
]
operations = [
migrations.AlterField(
model_name='entry',
name='content... | Add a migration for django 2.1. | Add a migration for django 2.1.
Before this version django itself ignored the editale directive,
so it now created a migration for it. Though it doesn't really
matter as we marked it as such for drf.
| Python | agpl-3.0 | etesync/journal-manager | Add a migration for django 2.1.
Before this version django itself ignored the editale directive,
so it now created a migration for it. Though it doesn't really
matter as we marked it as such for drf. | # Generated by Django 2.1.6 on 2019-02-11 15:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journal', '0008_remove_userinfo_deleted'),
]
operations = [
migrations.AlterField(
model_name='entry',
name='content... | <commit_before><commit_msg>Add a migration for django 2.1.
Before this version django itself ignored the editale directive,
so it now created a migration for it. Though it doesn't really
matter as we marked it as such for drf.<commit_after> | # Generated by Django 2.1.6 on 2019-02-11 15:15
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('journal', '0008_remove_userinfo_deleted'),
]
operations = [
migrations.AlterField(
model_name='entry',
name='content... | Add a migration for django 2.1.
Before this version django itself ignored the editale directive,
so it now created a migration for it. Though it doesn't really
matter as we marked it as such for drf.# Generated by Django 2.1.6 on 2019-02-11 15:15
from django.db import migrations, models
class Migration(migrations.M... | <commit_before><commit_msg>Add a migration for django 2.1.
Before this version django itself ignored the editale directive,
so it now created a migration for it. Though it doesn't really
matter as we marked it as such for drf.<commit_after># Generated by Django 2.1.6 on 2019-02-11 15:15
from django.db import migratio... | |
4f2f5c5e8bfda8a2ca383843e604c2faf6fcb817 | tests/chainer_tests/dataset_tests/test_download.py | tests/chainer_tests/dataset_tests/test_download.py | import os
import unittest
from chainer import dataset
from chainer import testing
class TestGetSetDatasetRoot(unittest.TestCase):
def test_set_dataset_root(self):
orig_root = dataset.get_dataset_root()
new_root = '/tmp/dataset_root'
try:
dataset.set_dataset_root(new_root)
... | Add some tests on download.py | Add some tests on download.py
| Python | mit | wkentaro/chainer,niboshi/chainer,jnishi/chainer,okuta/chainer,cupy/cupy,niboshi/chainer,ysekky/chainer,cupy/cupy,pfnet/chainer,kashif/chainer,cupy/cupy,delta2323/chainer,chainer/chainer,anaruse/chainer,chainer/chainer,cupy/cupy,keisuke-umezawa/chainer,wkentaro/chainer,kikusu/chainer,ktnyt/chainer,chainer/chainer,keisuk... | Add some tests on download.py | import os
import unittest
from chainer import dataset
from chainer import testing
class TestGetSetDatasetRoot(unittest.TestCase):
def test_set_dataset_root(self):
orig_root = dataset.get_dataset_root()
new_root = '/tmp/dataset_root'
try:
dataset.set_dataset_root(new_root)
... | <commit_before><commit_msg>Add some tests on download.py<commit_after> | import os
import unittest
from chainer import dataset
from chainer import testing
class TestGetSetDatasetRoot(unittest.TestCase):
def test_set_dataset_root(self):
orig_root = dataset.get_dataset_root()
new_root = '/tmp/dataset_root'
try:
dataset.set_dataset_root(new_root)
... | Add some tests on download.pyimport os
import unittest
from chainer import dataset
from chainer import testing
class TestGetSetDatasetRoot(unittest.TestCase):
def test_set_dataset_root(self):
orig_root = dataset.get_dataset_root()
new_root = '/tmp/dataset_root'
try:
dataset.s... | <commit_before><commit_msg>Add some tests on download.py<commit_after>import os
import unittest
from chainer import dataset
from chainer import testing
class TestGetSetDatasetRoot(unittest.TestCase):
def test_set_dataset_root(self):
orig_root = dataset.get_dataset_root()
new_root = '/tmp/dataset... | |
717dc2de1c605190127067263bd8fb1581d7d57d | lib/python2.6/aquilon/server/locks.py | lib/python2.6/aquilon/server/locks.py | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
import logging
from threading import Condition, Lock
from aquilon.locks import LockQueue, LockKey
from aquilon.exceptions_ import InternalError
from aquilon.server.logger import CLIENT_INFO
LOGGER = logging.getLogger(... | Introduce the LockQueue into the broker. | Introduce the LockQueue into the broker.
The aquilon.server.locks module instantiates a lock_queue for use
by the broker.
It also defines a number of keys that can be used by the broker.
Each of these keys carve out a swath of the namespace available
and define the layers of the key.
| Python | apache-2.0 | quattor/aquilon,quattor/aquilon,guillaume-philippon/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,guillaume-philippon/aquilon,stdweird/aquilon,stdweird/aquilon,quattor/aquilon | Introduce the LockQueue into the broker.
The aquilon.server.locks module instantiates a lock_queue for use
by the broker.
It also defines a number of keys that can be used by the broker.
Each of these keys carve out a swath of the namespace available
and define the layers of the key. | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
import logging
from threading import Condition, Lock
from aquilon.locks import LockQueue, LockKey
from aquilon.exceptions_ import InternalError
from aquilon.server.logger import CLIENT_INFO
LOGGER = logging.getLogger(... | <commit_before><commit_msg>Introduce the LockQueue into the broker.
The aquilon.server.locks module instantiates a lock_queue for use
by the broker.
It also defines a number of keys that can be used by the broker.
Each of these keys carve out a swath of the namespace available
and define the layers of the key.<commit... | # ex: set expandtab softtabstop=4 shiftwidth=4: -*- cpy-indent-level: 4; indent-tabs-mode: nil -*-
import logging
from threading import Condition, Lock
from aquilon.locks import LockQueue, LockKey
from aquilon.exceptions_ import InternalError
from aquilon.server.logger import CLIENT_INFO
LOGGER = logging.getLogger(... | Introduce the LockQueue into the broker.
The aquilon.server.locks module instantiates a lock_queue for use
by the broker.
It also defines a number of keys that can be used by the broker.
Each of these keys carve out a swath of the namespace available
and define the layers of the key.# ex: set expandtab softtabstop=4 ... | <commit_before><commit_msg>Introduce the LockQueue into the broker.
The aquilon.server.locks module instantiates a lock_queue for use
by the broker.
It also defines a number of keys that can be used by the broker.
Each of these keys carve out a swath of the namespace available
and define the layers of the key.<commit... | |
5ca2e6cbb7056d0bc25ee52815e0742b4f13a703 | tests/functional/test_six_imports.py | tests/functional/test_six_imports.py | import os
import botocore
import ast
ROOTDIR = os.path.dirname(botocore.__file__)
def test_no_bare_six_imports():
for rootdir, dirnames, filenames in os.walk(ROOTDIR):
if 'vendored' in dirnames:
# We don't need to lint our vendored packages.
dirnames.remove('vendored')
fo... | Add linting for bare six imports | Add linting for bare six imports
| Python | apache-2.0 | pplu/botocore,boto/botocore | Add linting for bare six imports | import os
import botocore
import ast
ROOTDIR = os.path.dirname(botocore.__file__)
def test_no_bare_six_imports():
for rootdir, dirnames, filenames in os.walk(ROOTDIR):
if 'vendored' in dirnames:
# We don't need to lint our vendored packages.
dirnames.remove('vendored')
fo... | <commit_before><commit_msg>Add linting for bare six imports<commit_after> | import os
import botocore
import ast
ROOTDIR = os.path.dirname(botocore.__file__)
def test_no_bare_six_imports():
for rootdir, dirnames, filenames in os.walk(ROOTDIR):
if 'vendored' in dirnames:
# We don't need to lint our vendored packages.
dirnames.remove('vendored')
fo... | Add linting for bare six importsimport os
import botocore
import ast
ROOTDIR = os.path.dirname(botocore.__file__)
def test_no_bare_six_imports():
for rootdir, dirnames, filenames in os.walk(ROOTDIR):
if 'vendored' in dirnames:
# We don't need to lint our vendored packages.
dirnam... | <commit_before><commit_msg>Add linting for bare six imports<commit_after>import os
import botocore
import ast
ROOTDIR = os.path.dirname(botocore.__file__)
def test_no_bare_six_imports():
for rootdir, dirnames, filenames in os.walk(ROOTDIR):
if 'vendored' in dirnames:
# We don't need to lint ... | |
c172d9a13e3abde902f743b2179bc396248d9fa9 | magpy/server/_ejdb.py | magpy/server/_ejdb.py | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
se... | Add a little support for ejdb. | Add a little support for ejdb.
| Python | bsd-3-clause | zeth/magpy,catsmith/magpy,zeth/magpy,catsmith/magpy | Add a little support for ejdb. | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
se... | <commit_before><commit_msg>Add a little support for ejdb.<commit_after> | """EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
config_file=None):
se... | Add a little support for ejdb."""EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
database_name=None,
... | <commit_before><commit_msg>Add a little support for ejdb.<commit_after>"""EJDB driver for Magpy.
Currently does not do much except support certain command line scripts.
"""
import pyejdb
class Database(object):
"""Simple database connection for use in serverside scripts etc."""
def __init__(self,
... | |
70c69291358a606a21d77d7ae9a9270e98438ddc | mapnik/conversions.py | mapnik/conversions.py | """Unit conversion helpers."""
def m2pt(x, pt_size=0.0254/72.0):
"""Converts distance from meters to points. Default value is PDF point size."""
return x / pt_size
def pt2m(x, pt_size=0.0254/72.0):
"""Converts distance from points to meters. Default value is PDF point size."""
return x * pt_size
def ... | Move the conversion helpers into a separate module | Move the conversion helpers into a separate module
No change in behaviour except more flexibility for m2pt pt_size
| Python | lgpl-2.1 | tomhughes/python-mapnik,mapnik/python-mapnik,tomhughes/python-mapnik,tomhughes/python-mapnik,mapnik/python-mapnik,mapnik/python-mapnik | Move the conversion helpers into a separate module
No change in behaviour except more flexibility for m2pt pt_size | """Unit conversion helpers."""
def m2pt(x, pt_size=0.0254/72.0):
"""Converts distance from meters to points. Default value is PDF point size."""
return x / pt_size
def pt2m(x, pt_size=0.0254/72.0):
"""Converts distance from points to meters. Default value is PDF point size."""
return x * pt_size
def ... | <commit_before><commit_msg>Move the conversion helpers into a separate module
No change in behaviour except more flexibility for m2pt pt_size<commit_after> | """Unit conversion helpers."""
def m2pt(x, pt_size=0.0254/72.0):
"""Converts distance from meters to points. Default value is PDF point size."""
return x / pt_size
def pt2m(x, pt_size=0.0254/72.0):
"""Converts distance from points to meters. Default value is PDF point size."""
return x * pt_size
def ... | Move the conversion helpers into a separate module
No change in behaviour except more flexibility for m2pt pt_size"""Unit conversion helpers."""
def m2pt(x, pt_size=0.0254/72.0):
"""Converts distance from meters to points. Default value is PDF point size."""
return x / pt_size
def pt2m(x, pt_size=0.0254/72.0... | <commit_before><commit_msg>Move the conversion helpers into a separate module
No change in behaviour except more flexibility for m2pt pt_size<commit_after>"""Unit conversion helpers."""
def m2pt(x, pt_size=0.0254/72.0):
"""Converts distance from meters to points. Default value is PDF point size."""
return x /... | |
1757b2fef3d617338bfc07802eaa8ac6e75c14e9 | raiden/tests/integration/cli/conftest.py | raiden/tests/integration/cli/conftest.py | import os
import pytest
from raiden.tests.utils.smoketest import (
load_smoketest_config,
start_ethereum
)
@pytest.fixture(scope='session')
def blockchain_provider():
print("fixture init")
smoketest_config = load_smoketest_config()
ethereum, ethereum_config = start_ethereum(smoketest_config['gene... | Add CLI tests session scoped fixture. | tests/integration/cli: Add CLI tests session scoped fixture.
The test fixture starts the blockchain with preconfigured
smoketest network, retrieves contract addresses and returns
an object to be accessed by test cases.
Refs: #1408
| Python | mit | hackaugusto/raiden,hackaugusto/raiden | tests/integration/cli: Add CLI tests session scoped fixture.
The test fixture starts the blockchain with preconfigured
smoketest network, retrieves contract addresses and returns
an object to be accessed by test cases.
Refs: #1408 | import os
import pytest
from raiden.tests.utils.smoketest import (
load_smoketest_config,
start_ethereum
)
@pytest.fixture(scope='session')
def blockchain_provider():
print("fixture init")
smoketest_config = load_smoketest_config()
ethereum, ethereum_config = start_ethereum(smoketest_config['gene... | <commit_before><commit_msg>tests/integration/cli: Add CLI tests session scoped fixture.
The test fixture starts the blockchain with preconfigured
smoketest network, retrieves contract addresses and returns
an object to be accessed by test cases.
Refs: #1408<commit_after> | import os
import pytest
from raiden.tests.utils.smoketest import (
load_smoketest_config,
start_ethereum
)
@pytest.fixture(scope='session')
def blockchain_provider():
print("fixture init")
smoketest_config = load_smoketest_config()
ethereum, ethereum_config = start_ethereum(smoketest_config['gene... | tests/integration/cli: Add CLI tests session scoped fixture.
The test fixture starts the blockchain with preconfigured
smoketest network, retrieves contract addresses and returns
an object to be accessed by test cases.
Refs: #1408import os
import pytest
from raiden.tests.utils.smoketest import (
load_smoketest_c... | <commit_before><commit_msg>tests/integration/cli: Add CLI tests session scoped fixture.
The test fixture starts the blockchain with preconfigured
smoketest network, retrieves contract addresses and returns
an object to be accessed by test cases.
Refs: #1408<commit_after>import os
import pytest
from raiden.tests.util... | |
0eb9964f42f74596b38d9031b329f8ce2e0c1e9f | directory_lister.py | directory_lister.py | #Test to see recursive directory lister
import os
def lister(dir_name):
os.chdir(dir_name)
dirs = os.listdir(os.getcwd())
for file in dirs:
if not os.path.isdir(file):
print(file + "Location: "+os.getcwd())
else:
lister(file)
all_files = []
dir_name = input("Directory... | Test for a recursive directory lister. | Test for a recursive directory lister.
| Python | mit | cvhariharan/Offline,cvhariharan/Offline,cvhariharan/Offline | Test for a recursive directory lister. | #Test to see recursive directory lister
import os
def lister(dir_name):
os.chdir(dir_name)
dirs = os.listdir(os.getcwd())
for file in dirs:
if not os.path.isdir(file):
print(file + "Location: "+os.getcwd())
else:
lister(file)
all_files = []
dir_name = input("Directory... | <commit_before><commit_msg>Test for a recursive directory lister.<commit_after> | #Test to see recursive directory lister
import os
def lister(dir_name):
os.chdir(dir_name)
dirs = os.listdir(os.getcwd())
for file in dirs:
if not os.path.isdir(file):
print(file + "Location: "+os.getcwd())
else:
lister(file)
all_files = []
dir_name = input("Directory... | Test for a recursive directory lister.#Test to see recursive directory lister
import os
def lister(dir_name):
os.chdir(dir_name)
dirs = os.listdir(os.getcwd())
for file in dirs:
if not os.path.isdir(file):
print(file + "Location: "+os.getcwd())
else:
lister(file)
all_... | <commit_before><commit_msg>Test for a recursive directory lister.<commit_after>#Test to see recursive directory lister
import os
def lister(dir_name):
os.chdir(dir_name)
dirs = os.listdir(os.getcwd())
for file in dirs:
if not os.path.isdir(file):
print(file + "Location: "+os.getcwd())
... | |
7598bb04c2826f5f6bbcf8ff26f9a799ded7cbe3 | tests/nose_plugins.py | tests/nose_plugins.py | # -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | Add a nose plugin to clear the database after every test. | Add a nose plugin to clear the database after every test.
| Python | apache-2.0 | cidadania/e-cidadania,cidadania/e-cidadania | Add a nose plugin to clear the database after every test. | # -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | <commit_before><commit_msg>Add a nose plugin to clear the database after every test.<commit_after> | # -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the Licen... | Add a nose plugin to clear the database after every test.# -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# th... | <commit_before><commit_msg>Add a nose plugin to clear the database after every test.<commit_after># -*- coding: utf-8 -*-
#
# Copyright (c) 2010-2012 Cidadania S. Coop. Galega
#
# This file is part of e-cidadania.
#
# e-cidadania is free software: you can redistribute it and/or modify
# it under the terms of the GNU Ge... | |
b45b6256b442942564ba447913ad4a1bec77db19 | Problem063/Python/solution_1.py | Problem063/Python/solution_1.py | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © Manoel Vilela 2017
#
# @team: DestructHub
# @project: ProjectEuler
# @author: Manoel Vilela
# @email: manoel_vilela@engineer.com
#
print(len([a ** n
for a in range(1, 10)
for n in range(1, 22)
if len(s... | Add solution for Problem063 written in Python | Add solution for Problem063 written in Python
| Python | mit | DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectEuler,DestructHub/ProjectE... | Add solution for Problem063 written in Python | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © Manoel Vilela 2017
#
# @team: DestructHub
# @project: ProjectEuler
# @author: Manoel Vilela
# @email: manoel_vilela@engineer.com
#
print(len([a ** n
for a in range(1, 10)
for n in range(1, 22)
if len(s... | <commit_before><commit_msg>Add solution for Problem063 written in Python<commit_after> | #!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © Manoel Vilela 2017
#
# @team: DestructHub
# @project: ProjectEuler
# @author: Manoel Vilela
# @email: manoel_vilela@engineer.com
#
print(len([a ** n
for a in range(1, 10)
for n in range(1, 22)
if len(s... | Add solution for Problem063 written in Python#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © Manoel Vilela 2017
#
# @team: DestructHub
# @project: ProjectEuler
# @author: Manoel Vilela
# @email: manoel_vilela@engineer.com
#
print(len([a ** n
for a in range(1, 10)
... | <commit_before><commit_msg>Add solution for Problem063 written in Python<commit_after>#!/usr/bin/env python3
# -*- coding: utf-8 -*-
#
# Copyright © Manoel Vilela 2017
#
# @team: DestructHub
# @project: ProjectEuler
# @author: Manoel Vilela
# @email: manoel_vilela@engineer.com
#
print(len([a ** n... | |
5c91a2c8dda69d37fd3cd0989ff6c3883851eaef | saleor/product/templatetags/product_images.py | saleor/product/templatetags/product_images.py | import logging
import warnings
from django.template.context_processors import static
from django import template
from django.conf import settings
logger = logging.getLogger(__name__)
register = template.Library()
# cache available sizes at module level
def get_available_sizes():
all_sizes = set()
keys = set... | Introduce templatetag for fetching image thumbnails | Introduce templatetag for fetching image thumbnails
| Python | bsd-3-clause | tfroehlich82/saleor,itbabu/saleor,UITools/saleor,maferelo/saleor,tfroehlich82/saleor,tfroehlich82/saleor,car3oon/saleor,KenMutemi/saleor,KenMutemi/saleor,jreigel/saleor,maferelo/saleor,car3oon/saleor,KenMutemi/saleor,mociepka/saleor,car3oon/saleor,HyperManTT/ECommerceSaleor,HyperManTT/ECommerceSaleor,maferelo/saleor,UI... | Introduce templatetag for fetching image thumbnails | import logging
import warnings
from django.template.context_processors import static
from django import template
from django.conf import settings
logger = logging.getLogger(__name__)
register = template.Library()
# cache available sizes at module level
def get_available_sizes():
all_sizes = set()
keys = set... | <commit_before><commit_msg>Introduce templatetag for fetching image thumbnails<commit_after> | import logging
import warnings
from django.template.context_processors import static
from django import template
from django.conf import settings
logger = logging.getLogger(__name__)
register = template.Library()
# cache available sizes at module level
def get_available_sizes():
all_sizes = set()
keys = set... | Introduce templatetag for fetching image thumbnailsimport logging
import warnings
from django.template.context_processors import static
from django import template
from django.conf import settings
logger = logging.getLogger(__name__)
register = template.Library()
# cache available sizes at module level
def get_avai... | <commit_before><commit_msg>Introduce templatetag for fetching image thumbnails<commit_after>import logging
import warnings
from django.template.context_processors import static
from django import template
from django.conf import settings
logger = logging.getLogger(__name__)
register = template.Library()
# cache ava... | |
761ec2bd6492b041eb658ee836a63ffb877469d5 | cbv/management/commands/load_all_django_versions.py | cbv/management/commands/load_all_django_versions.py | import os
import re
from django.conf import settings
from django.core.management import call_command, BaseCommand
class Command(BaseCommand):
"""Load the Django project fixtures and all version fixtures"""
def handle(self, **options):
fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures')
... | Add management command to load all version fixtures | Add management command to load all version fixtures
Because life's too short
| Python | bsd-2-clause | refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector,refreshoxford/django-cbv-inspector | Add management command to load all version fixtures
Because life's too short | import os
import re
from django.conf import settings
from django.core.management import call_command, BaseCommand
class Command(BaseCommand):
"""Load the Django project fixtures and all version fixtures"""
def handle(self, **options):
fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures')
... | <commit_before><commit_msg>Add management command to load all version fixtures
Because life's too short<commit_after> | import os
import re
from django.conf import settings
from django.core.management import call_command, BaseCommand
class Command(BaseCommand):
"""Load the Django project fixtures and all version fixtures"""
def handle(self, **options):
fixtures_dir = os.path.join(settings.DIRNAME, 'cbv', 'fixtures')
... | Add management command to load all version fixtures
Because life's too shortimport os
import re
from django.conf import settings
from django.core.management import call_command, BaseCommand
class Command(BaseCommand):
"""Load the Django project fixtures and all version fixtures"""
def handle(self, **option... | <commit_before><commit_msg>Add management command to load all version fixtures
Because life's too short<commit_after>import os
import re
from django.conf import settings
from django.core.management import call_command, BaseCommand
class Command(BaseCommand):
"""Load the Django project fixtures and all version f... | |
eb429be1fdc7335bec5ba036fcece309778b23f0 | examples/rmg/heptane-filterReactions/input.py | examples/rmg/heptane-filterReactions/input.py | # Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# Constraints on generated species
generatedSpeciesConstraints(
maximumCa... | Add an example that uses filterReactions AND pdep at the same time | Add an example that uses filterReactions AND pdep at the same time
| Python | mit | pierrelb/RMG-Py,nyee/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,chatelak/RMG-Py,chatelak/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py | Add an example that uses filterReactions AND pdep at the same time | # Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# Constraints on generated species
generatedSpeciesConstraints(
maximumCa... | <commit_before><commit_msg>Add an example that uses filterReactions AND pdep at the same time<commit_after> | # Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# Constraints on generated species
generatedSpeciesConstraints(
maximumCa... | Add an example that uses filterReactions AND pdep at the same time# Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kineticsEstimator = 'rate rules',
)
# Constrain... | <commit_before><commit_msg>Add an example that uses filterReactions AND pdep at the same time<commit_after># Data sources
database(
thermoLibraries = ['primaryThermoLibrary'],
reactionLibraries = [],
seedMechanisms = [],
kineticsDepositories = ['training'],
kineticsFamilies = 'default',
kinetic... | |
3a240005142da25aa49938a15d39ddf68dd7cead | nova/tests/functional/api/openstack/placement/test_verify_policy.py | nova/tests/functional/api/openstack/placement/test_verify_policy.py | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | Add functional test to verify presence of policy | [placement] Add functional test to verify presence of policy
Add a test that traverses all available placement URLs at the latest
microversion and tries to access them as non-admin. If something other
than a 403 response is given a failed test with a message like
method POST on route /resource_providers/{uuid}/in... | Python | apache-2.0 | mahak/nova,rahulunair/nova,klmitch/nova,openstack/nova,mikalstill/nova,rahulunair/nova,gooddata/openstack-nova,mikalstill/nova,gooddata/openstack-nova,rahulunair/nova,klmitch/nova,mikalstill/nova,klmitch/nova,mahak/nova,openstack/nova,klmitch/nova,openstack/nova,mahak/nova,gooddata/openstack-nova,gooddata/openstack-nov... | [placement] Add functional test to verify presence of policy
Add a test that traverses all available placement URLs at the latest
microversion and tries to access them as non-admin. If something other
than a 403 response is given a failed test with a message like
method POST on route /resource_providers/{uuid}/in... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | <commit_before><commit_msg>[placement] Add functional test to verify presence of policy
Add a test that traverses all available placement URLs at the latest
microversion and tries to access them as non-admin. If something other
than a 403 response is given a failed test with a message like
method POST on route /r... | # Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# d... | [placement] Add functional test to verify presence of policy
Add a test that traverses all available placement URLs at the latest
microversion and tries to access them as non-admin. If something other
than a 403 response is given a failed test with a message like
method POST on route /resource_providers/{uuid}/in... | <commit_before><commit_msg>[placement] Add functional test to verify presence of policy
Add a test that traverses all available placement URLs at the latest
microversion and tries to access them as non-admin. If something other
than a 403 response is given a failed test with a message like
method POST on route /r... | |
8f6db5945348879a7340f8a4c7da6111a06cd062 | python/smqtk/web/search_app/modules/static_host.py | python/smqtk/web/search_app/modules/static_host.py | import flask
__author__ = 'paul.tunison@kitware.com'
class StaticDirectoryHost (flask.Blueprint):
"""
Module that will host a given directory to the given URL prefix (relative to
the parent module's prefix).
Instances of this class will have nothing set to their static URL path, as a
blank stri... | Add new module to statically host an arbitrary directory | Add new module to statically host an arbitrary directory
| Python | bsd-3-clause | Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,Purg/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK,kfieldho/SMQTK | Add new module to statically host an arbitrary directory | import flask
__author__ = 'paul.tunison@kitware.com'
class StaticDirectoryHost (flask.Blueprint):
"""
Module that will host a given directory to the given URL prefix (relative to
the parent module's prefix).
Instances of this class will have nothing set to their static URL path, as a
blank stri... | <commit_before><commit_msg>Add new module to statically host an arbitrary directory<commit_after> | import flask
__author__ = 'paul.tunison@kitware.com'
class StaticDirectoryHost (flask.Blueprint):
"""
Module that will host a given directory to the given URL prefix (relative to
the parent module's prefix).
Instances of this class will have nothing set to their static URL path, as a
blank stri... | Add new module to statically host an arbitrary directoryimport flask
__author__ = 'paul.tunison@kitware.com'
class StaticDirectoryHost (flask.Blueprint):
"""
Module that will host a given directory to the given URL prefix (relative to
the parent module's prefix).
Instances of this class will have n... | <commit_before><commit_msg>Add new module to statically host an arbitrary directory<commit_after>import flask
__author__ = 'paul.tunison@kitware.com'
class StaticDirectoryHost (flask.Blueprint):
"""
Module that will host a given directory to the given URL prefix (relative to
the parent module's prefix).... | |
fdb8f36fd4eed11d5d757d8477b3c2b8619aae8a | corehq/apps/commtrack/management/commands/product_program_last_modified.py | corehq/apps/commtrack/management/commands/product_program_last_modified.py | from django.core.management.base import BaseCommand
from corehq.apps.commtrack.models import Product, Program
from dimagi.utils.couch.database import iter_docs
from datetime import datetime
import json
class Command(BaseCommand):
help = 'Populate last_modified field for products and programs'
def handle(self,... | Add management command to populate last_modified fields | Add management command to populate last_modified fields
| Python | bsd-3-clause | qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,SEL-Columbia/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttarajubr/commcare-hq,puttarajubr/commcare-hq,dimagi/commcare-hq,puttara... | Add management command to populate last_modified fields | from django.core.management.base import BaseCommand
from corehq.apps.commtrack.models import Product, Program
from dimagi.utils.couch.database import iter_docs
from datetime import datetime
import json
class Command(BaseCommand):
help = 'Populate last_modified field for products and programs'
def handle(self,... | <commit_before><commit_msg>Add management command to populate last_modified fields<commit_after> | from django.core.management.base import BaseCommand
from corehq.apps.commtrack.models import Product, Program
from dimagi.utils.couch.database import iter_docs
from datetime import datetime
import json
class Command(BaseCommand):
help = 'Populate last_modified field for products and programs'
def handle(self,... | Add management command to populate last_modified fieldsfrom django.core.management.base import BaseCommand
from corehq.apps.commtrack.models import Product, Program
from dimagi.utils.couch.database import iter_docs
from datetime import datetime
import json
class Command(BaseCommand):
help = 'Populate last_modified... | <commit_before><commit_msg>Add management command to populate last_modified fields<commit_after>from django.core.management.base import BaseCommand
from corehq.apps.commtrack.models import Product, Program
from dimagi.utils.couch.database import iter_docs
from datetime import datetime
import json
class Command(BaseCom... | |
bbc4351a5611a035bbee1f18cb55b74d9583cdcd | sara_flexbe_states/src/sara_flexbe_states/Wonderland_Add_Object.py | sara_flexbe_states/src/sara_flexbe_states/Wonderland_Add_Object.py | #!/usr/bin/env python
# encoding=utf8
import json
import requests
from flexbe_core import EventState, Logger
class Wonderland_Add_Object(EventState):
'''
Add an object to Wonderland.
For the room, enter only ID or Name, not both.
Return the ID of the added human.
># name string name of the human
... | Create a state for add an object | Create a state for add an object
| Python | bsd-3-clause | WalkingMachine/sara_behaviors,WalkingMachine/sara_behaviors | Create a state for add an object | #!/usr/bin/env python
# encoding=utf8
import json
import requests
from flexbe_core import EventState, Logger
class Wonderland_Add_Object(EventState):
'''
Add an object to Wonderland.
For the room, enter only ID or Name, not both.
Return the ID of the added human.
># name string name of the human
... | <commit_before><commit_msg>Create a state for add an object<commit_after> | #!/usr/bin/env python
# encoding=utf8
import json
import requests
from flexbe_core import EventState, Logger
class Wonderland_Add_Object(EventState):
'''
Add an object to Wonderland.
For the room, enter only ID or Name, not both.
Return the ID of the added human.
># name string name of the human
... | Create a state for add an object#!/usr/bin/env python
# encoding=utf8
import json
import requests
from flexbe_core import EventState, Logger
class Wonderland_Add_Object(EventState):
'''
Add an object to Wonderland.
For the room, enter only ID or Name, not both.
Return the ID of the added human.
># name ... | <commit_before><commit_msg>Create a state for add an object<commit_after>#!/usr/bin/env python
# encoding=utf8
import json
import requests
from flexbe_core import EventState, Logger
class Wonderland_Add_Object(EventState):
'''
Add an object to Wonderland.
For the room, enter only ID or Name, not both.
Return the... | |
78bc96307fb52d95e36eab1da6fa57a66af736e8 | corehq/apps/sms/management/commands/delete_messaging_couch_phone_numbers.py | corehq/apps/sms/management/commands/delete_messaging_couch_phone_numbers.py | from corehq.apps.sms.mixin import VerifiedNumber
from corehq.apps.sms.models import PhoneNumber
from dimagi.utils.couch.database import iter_docs_with_retry, iter_bulk_delete_with_doc_type_verification
from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
... | Add script to delete couch phone numbers | Add script to delete couch phone numbers
| Python | bsd-3-clause | qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | Add script to delete couch phone numbers | from corehq.apps.sms.mixin import VerifiedNumber
from corehq.apps.sms.models import PhoneNumber
from dimagi.utils.couch.database import iter_docs_with_retry, iter_bulk_delete_with_doc_type_verification
from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
... | <commit_before><commit_msg>Add script to delete couch phone numbers<commit_after> | from corehq.apps.sms.mixin import VerifiedNumber
from corehq.apps.sms.models import PhoneNumber
from dimagi.utils.couch.database import iter_docs_with_retry, iter_bulk_delete_with_doc_type_verification
from django.core.management.base import BaseCommand
from optparse import make_option
class Command(BaseCommand):
... | Add script to delete couch phone numbersfrom corehq.apps.sms.mixin import VerifiedNumber
from corehq.apps.sms.models import PhoneNumber
from dimagi.utils.couch.database import iter_docs_with_retry, iter_bulk_delete_with_doc_type_verification
from django.core.management.base import BaseCommand
from optparse import make_... | <commit_before><commit_msg>Add script to delete couch phone numbers<commit_after>from corehq.apps.sms.mixin import VerifiedNumber
from corehq.apps.sms.models import PhoneNumber
from dimagi.utils.couch.database import iter_docs_with_retry, iter_bulk_delete_with_doc_type_verification
from django.core.management.base impo... | |
e0770c4a671c650f4569036350b4047fcf925506 | AnalysisDemo.py | AnalysisDemo.py | import wx
#import matplotlib
class AnalysisDemo(wx.Frame):
def __init__(self, *args, **kw):
super(AnalysisDemo, self).__init__(*args, **kw)
self.initMain()
def initMain(self):
pn = wx.Panel(self)
self.showPackage = wx.RadioButton(pn, label='Organize in package')
self.s... | Add a demo app to illustrate the result | Add a demo app to illustrate the result
| Python | mit | plumer/codana,plumer/codana | Add a demo app to illustrate the result | import wx
#import matplotlib
class AnalysisDemo(wx.Frame):
def __init__(self, *args, **kw):
super(AnalysisDemo, self).__init__(*args, **kw)
self.initMain()
def initMain(self):
pn = wx.Panel(self)
self.showPackage = wx.RadioButton(pn, label='Organize in package')
self.s... | <commit_before><commit_msg>Add a demo app to illustrate the result<commit_after> | import wx
#import matplotlib
class AnalysisDemo(wx.Frame):
def __init__(self, *args, **kw):
super(AnalysisDemo, self).__init__(*args, **kw)
self.initMain()
def initMain(self):
pn = wx.Panel(self)
self.showPackage = wx.RadioButton(pn, label='Organize in package')
self.s... | Add a demo app to illustrate the resultimport wx
#import matplotlib
class AnalysisDemo(wx.Frame):
def __init__(self, *args, **kw):
super(AnalysisDemo, self).__init__(*args, **kw)
self.initMain()
def initMain(self):
pn = wx.Panel(self)
self.showPackage = wx.RadioButton(pn, labe... | <commit_before><commit_msg>Add a demo app to illustrate the result<commit_after>import wx
#import matplotlib
class AnalysisDemo(wx.Frame):
def __init__(self, *args, **kw):
super(AnalysisDemo, self).__init__(*args, **kw)
self.initMain()
def initMain(self):
pn = wx.Panel(self)
s... | |
c3a83ed6158fcd9335f9253417ca4b24e9ab7934 | tests/pytests/unit/modules/test_network.py | tests/pytests/unit/modules/test_network.py | import threading
import pytest
import salt.modules.network as networkmod
from tests.support.mock import patch
@pytest.fixture
def configure_loader_modules():
return {networkmod: {}}
@pytest.fixture
def socket_errors():
# Not sure what kind of errors could be returned by getfqdn or
# gethostbyaddr, but ... | Add test for fqdn thread leak | Add test for fqdn thread leak
I wasn't positive what other errors could be raised here, but we did
have a user reporting thread leaks, and the existing code *could* have
thread leaks if unhandled exceptions are raised on the ThreadPool.
This test *should* work - there might be some weird circumstances where
other thr... | Python | apache-2.0 | saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt,saltstack/salt | Add test for fqdn thread leak
I wasn't positive what other errors could be raised here, but we did
have a user reporting thread leaks, and the existing code *could* have
thread leaks if unhandled exceptions are raised on the ThreadPool.
This test *should* work - there might be some weird circumstances where
other thr... | import threading
import pytest
import salt.modules.network as networkmod
from tests.support.mock import patch
@pytest.fixture
def configure_loader_modules():
return {networkmod: {}}
@pytest.fixture
def socket_errors():
# Not sure what kind of errors could be returned by getfqdn or
# gethostbyaddr, but ... | <commit_before><commit_msg>Add test for fqdn thread leak
I wasn't positive what other errors could be raised here, but we did
have a user reporting thread leaks, and the existing code *could* have
thread leaks if unhandled exceptions are raised on the ThreadPool.
This test *should* work - there might be some weird ci... | import threading
import pytest
import salt.modules.network as networkmod
from tests.support.mock import patch
@pytest.fixture
def configure_loader_modules():
return {networkmod: {}}
@pytest.fixture
def socket_errors():
# Not sure what kind of errors could be returned by getfqdn or
# gethostbyaddr, but ... | Add test for fqdn thread leak
I wasn't positive what other errors could be raised here, but we did
have a user reporting thread leaks, and the existing code *could* have
thread leaks if unhandled exceptions are raised on the ThreadPool.
This test *should* work - there might be some weird circumstances where
other thr... | <commit_before><commit_msg>Add test for fqdn thread leak
I wasn't positive what other errors could be raised here, but we did
have a user reporting thread leaks, and the existing code *could* have
thread leaks if unhandled exceptions are raised on the ThreadPool.
This test *should* work - there might be some weird ci... | |
9925f3a677b7a855a2242176139bde4ab9d62ba0 | labonneboite/scripts/nb_hirings/rome_nb_bonne_boite.py | labonneboite/scripts/nb_hirings/rome_nb_bonne_boite.py | import pandas as pd
if __name__ == '__main__':
df = pd.read_csv('prediction_per_company_per_rome2019-11-08.csv')
df_rome_nb_bonne_boite = df.groupby(['rome'])['is a bonne boite ?'].sum()
df_rome_nb_bonne_boite.to_csv('nb_bonne_boite_per_rome2019-11-089.csv')
| Add script which will compute the number of 'bonnes boites' per rome | Add script which will compute the number of 'bonnes boites' per rome
| Python | agpl-3.0 | StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite,StartupsPoleEmploi/labonneboite | Add script which will compute the number of 'bonnes boites' per rome | import pandas as pd
if __name__ == '__main__':
df = pd.read_csv('prediction_per_company_per_rome2019-11-08.csv')
df_rome_nb_bonne_boite = df.groupby(['rome'])['is a bonne boite ?'].sum()
df_rome_nb_bonne_boite.to_csv('nb_bonne_boite_per_rome2019-11-089.csv')
| <commit_before><commit_msg>Add script which will compute the number of 'bonnes boites' per rome<commit_after> | import pandas as pd
if __name__ == '__main__':
df = pd.read_csv('prediction_per_company_per_rome2019-11-08.csv')
df_rome_nb_bonne_boite = df.groupby(['rome'])['is a bonne boite ?'].sum()
df_rome_nb_bonne_boite.to_csv('nb_bonne_boite_per_rome2019-11-089.csv')
| Add script which will compute the number of 'bonnes boites' per romeimport pandas as pd
if __name__ == '__main__':
df = pd.read_csv('prediction_per_company_per_rome2019-11-08.csv')
df_rome_nb_bonne_boite = df.groupby(['rome'])['is a bonne boite ?'].sum()
df_rome_nb_bonne_boite.to_csv('nb_bonne_boite_per_r... | <commit_before><commit_msg>Add script which will compute the number of 'bonnes boites' per rome<commit_after>import pandas as pd
if __name__ == '__main__':
df = pd.read_csv('prediction_per_company_per_rome2019-11-08.csv')
df_rome_nb_bonne_boite = df.groupby(['rome'])['is a bonne boite ?'].sum()
df_rome_nb... | |
a6c8176e3f4602e846888293093fc64b7b20233b | corehq/motech/repeaters/management/commands/send_cancelled_records.py | corehq/motech/repeaters/management/commands/send_cancelled_records.py | import csv
import datetime
import re
import time
from django.core.management.base import BaseCommand
from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE
from corehq.motech.repeaters.dbaccessors import iter_repeat_records_by_domain
class Command(BaseCommand):
help = """
Send cancelled repeat rec... | Add cmd to force send of cancelled repeat records | Add cmd to force send of cancelled repeat records
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq | Add cmd to force send of cancelled repeat records | import csv
import datetime
import re
import time
from django.core.management.base import BaseCommand
from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE
from corehq.motech.repeaters.dbaccessors import iter_repeat_records_by_domain
class Command(BaseCommand):
help = """
Send cancelled repeat rec... | <commit_before><commit_msg>Add cmd to force send of cancelled repeat records<commit_after> | import csv
import datetime
import re
import time
from django.core.management.base import BaseCommand
from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE
from corehq.motech.repeaters.dbaccessors import iter_repeat_records_by_domain
class Command(BaseCommand):
help = """
Send cancelled repeat rec... | Add cmd to force send of cancelled repeat recordsimport csv
import datetime
import re
import time
from django.core.management.base import BaseCommand
from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE
from corehq.motech.repeaters.dbaccessors import iter_repeat_records_by_domain
class Command(BaseComma... | <commit_before><commit_msg>Add cmd to force send of cancelled repeat records<commit_after>import csv
import datetime
import re
import time
from django.core.management.base import BaseCommand
from corehq.motech.repeaters.const import RECORD_CANCELLED_STATE
from corehq.motech.repeaters.dbaccessors import iter_repeat_re... | |
bf66372b2b5b49ba4a93d8ac4f573ceb7857f5b8 | python/helpers/pydev/pydevd_attach_to_process/linux/lldb_threads_settrace.py | python/helpers/pydev/pydevd_attach_to_process/linux/lldb_threads_settrace.py | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
try:
show_debug_info = 0
... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
import lldb
try:
show_debug_i... | Fix attach in case of multiple threads. | Fix attach in case of multiple threads.
| Python | apache-2.0 | kool79/intellij-community,da1z/intellij-community,retomerz/intellij-community,blademainer/intellij-community,SerCeMan/intellij-community,retomerz/intellij-community,ol-loginov/intellij-community,holmes/intellij-community,kool79/intellij-community,lucafavatella/intellij-community,xfournet/intellij-community,adedayo/inte... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
try:
show_debug_info = 0
... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
import lldb
try:
show_debug_i... | <commit_before># This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
try:
show_debug_in... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
import lldb
try:
show_debug_i... | # This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
try:
show_debug_info = 0
... | <commit_before># This file is meant to be run inside lldb as a command after
# the attach_linux.dylib dll has already been loaded to settrace for all threads.
def __lldb_init_module(debugger, internal_dict):
# Command Initialization code goes here
print('Startup LLDB in Python!')
try:
show_debug_in... |
efb6072e097a816bb46fdd83541c763e222816c9 | clic/dickens/test_concordance.py | clic/dickens/test_concordance.py | import unittest
from concordance_new import Concordancer_New
class TestConcordancerNewChapterIndex(unittest.TestCase):
def test_create_concordance(self):
"""
This is a very naive test to run whilst reviewing the create
concordance code. It's goal is simply to evaluate whether that
... | Add initial tests for the concordance view | Add initial tests for the concordance view
These tests can be run simply using `python test_concordance.py`.
The test suite is currently very limited. It is a tool to refactoring
the current code.
| Python | mit | CentreForResearchInAppliedLinguistics/clic,CentreForResearchInAppliedLinguistics/clic,CentreForCorpusResearch/clic,CentreForCorpusResearch/clic,CentreForResearchInAppliedLinguistics/clic,CentreForCorpusResearch/clic | Add initial tests for the concordance view
These tests can be run simply using `python test_concordance.py`.
The test suite is currently very limited. It is a tool to refactoring
the current code. | import unittest
from concordance_new import Concordancer_New
class TestConcordancerNewChapterIndex(unittest.TestCase):
def test_create_concordance(self):
"""
This is a very naive test to run whilst reviewing the create
concordance code. It's goal is simply to evaluate whether that
... | <commit_before><commit_msg>Add initial tests for the concordance view
These tests can be run simply using `python test_concordance.py`.
The test suite is currently very limited. It is a tool to refactoring
the current code.<commit_after> | import unittest
from concordance_new import Concordancer_New
class TestConcordancerNewChapterIndex(unittest.TestCase):
def test_create_concordance(self):
"""
This is a very naive test to run whilst reviewing the create
concordance code. It's goal is simply to evaluate whether that
... | Add initial tests for the concordance view
These tests can be run simply using `python test_concordance.py`.
The test suite is currently very limited. It is a tool to refactoring
the current code.import unittest
from concordance_new import Concordancer_New
class TestConcordancerNewChapterIndex(unittest.TestCase):
... | <commit_before><commit_msg>Add initial tests for the concordance view
These tests can be run simply using `python test_concordance.py`.
The test suite is currently very limited. It is a tool to refactoring
the current code.<commit_after>import unittest
from concordance_new import Concordancer_New
class TestConcordan... | |
c131e6108a72c57af4d3bdbe67d182d6c0ddb1eb | geotrek/feedback/migrations/0008_auto_20200326_1252.py | geotrek/feedback/migrations/0008_auto_20200326_1252.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-03-26 12:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('feedback', '0007_auto_20200324_1412'),
]
operatio... | Add migration to modify on_delete | Add migration to modify on_delete
| Python | bsd-2-clause | GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin,makinacorpus/Geotrek,GeotrekCE/Geotrek-admin | Add migration to modify on_delete | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-03-26 12:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('feedback', '0007_auto_20200324_1412'),
]
operatio... | <commit_before><commit_msg>Add migration to modify on_delete<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-03-26 12:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('feedback', '0007_auto_20200324_1412'),
]
operatio... | Add migration to modify on_delete# -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-03-26 12:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('feedback', '0007_auto_202... | <commit_before><commit_msg>Add migration to modify on_delete<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.27 on 2020-03-26 12:52
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencie... | |
b42c13de01a49e7fe3fb7caa22089ea1cd87f7bf | ironicclient/tests/functional/osc/v1/test_baremetal_node_power_states.py | ironicclient/tests/functional/osc/v1/test_baremetal_node_power_states.py | # Copyright (c) 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | Add sanity tests for baremetal power state commands | Add sanity tests for baremetal power state commands
Add sanity testcases for commands:
openstack baremetal node reboot,
openstack baremetal node power on,
openstack baremetal node power off.
Change-Id: I24bc2dcd1ef27d918b072ea686d53c0c8aa8b7ab
Partial-Bug: #1642597
| Python | apache-2.0 | openstack/python-ironicclient,openstack/python-ironicclient | Add sanity tests for baremetal power state commands
Add sanity testcases for commands:
openstack baremetal node reboot,
openstack baremetal node power on,
openstack baremetal node power off.
Change-Id: I24bc2dcd1ef27d918b072ea686d53c0c8aa8b7ab
Partial-Bug: #1642597 | # Copyright (c) 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | <commit_before><commit_msg>Add sanity tests for baremetal power state commands
Add sanity testcases for commands:
openstack baremetal node reboot,
openstack baremetal node power on,
openstack baremetal node power off.
Change-Id: I24bc2dcd1ef27d918b072ea686d53c0c8aa8b7ab
Partial-Bug: #1642597<commit_after> | # Copyright (c) 2016 Mirantis, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law... | Add sanity tests for baremetal power state commands
Add sanity testcases for commands:
openstack baremetal node reboot,
openstack baremetal node power on,
openstack baremetal node power off.
Change-Id: I24bc2dcd1ef27d918b072ea686d53c0c8aa8b7ab
Partial-Bug: #1642597# Copyright (c) 2016 Mirantis, Inc.
#
# License... | <commit_before><commit_msg>Add sanity tests for baremetal power state commands
Add sanity testcases for commands:
openstack baremetal node reboot,
openstack baremetal node power on,
openstack baremetal node power off.
Change-Id: I24bc2dcd1ef27d918b072ea686d53c0c8aa8b7ab
Partial-Bug: #1642597<commit_after># Copyrig... | |
5dde9f6aca671440253729c29530e93974921ea0 | moderation_queue/migrations/0007_auto_20150303_1420.py | moderation_queue/migrations/0007_auto_20150303_1420.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('moderation_queue', '0006_auto_20150303_0838'),
]
operations = [
migrations.AlterField(
model_name='queuedimage',... | Add a migration to add the 'Other' field to QueuedImage.why_allowed | Add a migration to add the 'Other' field to QueuedImage.why_allowed
| Python | agpl-3.0 | mysociety/yournextrepresentative,YoQuieroSaber/yournextrepresentative,mysociety/yournextmp-popit,neavouli/yournextrepresentative,datamade/yournextmp-popit,mysociety/yournextrepresentative,openstate/yournextrepresentative,YoQuieroSaber/yournextrepresentative,mysociety/yournextrepresentative,neavouli/yournextrepresentati... | Add a migration to add the 'Other' field to QueuedImage.why_allowed | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('moderation_queue', '0006_auto_20150303_0838'),
]
operations = [
migrations.AlterField(
model_name='queuedimage',... | <commit_before><commit_msg>Add a migration to add the 'Other' field to QueuedImage.why_allowed<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('moderation_queue', '0006_auto_20150303_0838'),
]
operations = [
migrations.AlterField(
model_name='queuedimage',... | Add a migration to add the 'Other' field to QueuedImage.why_allowed# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('moderation_queue', '0006_auto_20150303_0838'),
]
operations = [
... | <commit_before><commit_msg>Add a migration to add the 'Other' field to QueuedImage.why_allowed<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('moderation_queue', '0006_auto_201... | |
f627f04ebe0186b19d58619cab8b7098f5ca2e4c | plugins/openstack/nova/nova-server-state-metrics.py | plugins/openstack/nova/nova-server-state-metrics.py | #!/usr/bin/env python
from argparse import ArgumentParser
import socket
import time
from novaclient.v3 import Client
DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname())
def output_metric(name, value):
print '{}\t{}\t{}'.format(name, value, int(time.time()))
def main():
parser = ArgumentParser()
... | Add plugin for Nova server state metrics | Add plugin for Nova server state metrics
| Python | mit | giorgiosironi/sensu-community-plugins,Squarespace/sensu-community-plugins,zerOnepal/sensu-community-plugins,lfdesousa/sensu-community-plugins,maoe/sensu-community-plugins,aryeguy/sensu-community-plugins,royalj/sensu-community-plugins,lenfree/sensu-community-plugins,new23d/sensu-community-plugins,tuenti/sensu-community-... | Add plugin for Nova server state metrics | #!/usr/bin/env python
from argparse import ArgumentParser
import socket
import time
from novaclient.v3 import Client
DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname())
def output_metric(name, value):
print '{}\t{}\t{}'.format(name, value, int(time.time()))
def main():
parser = ArgumentParser()
... | <commit_before><commit_msg>Add plugin for Nova server state metrics<commit_after> | #!/usr/bin/env python
from argparse import ArgumentParser
import socket
import time
from novaclient.v3 import Client
DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname())
def output_metric(name, value):
print '{}\t{}\t{}'.format(name, value, int(time.time()))
def main():
parser = ArgumentParser()
... | Add plugin for Nova server state metrics#!/usr/bin/env python
from argparse import ArgumentParser
import socket
import time
from novaclient.v3 import Client
DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname())
def output_metric(name, value):
print '{}\t{}\t{}'.format(name, value, int(time.time()))
def... | <commit_before><commit_msg>Add plugin for Nova server state metrics<commit_after>#!/usr/bin/env python
from argparse import ArgumentParser
import socket
import time
from novaclient.v3 import Client
DEFAULT_SCHEME = '{}.nova.states'.format(socket.gethostname())
def output_metric(name, value):
print '{}\t{}\t{}'.f... | |
9aeb9d35cd49ccd7ab1ede87d70666e34b80320c | readthedocs/rtd_tests/tests/test_core_management.py | readthedocs/rtd_tests/tests/test_core_management.py | from StringIO import StringIO
from django.test import TestCase
from mock import patch
from core.management.commands import run_docker
from projects.models import Project
from builds.models import Version
class TestRunDocker(TestCase):
'''Test run_docker command with good input and output'''
fixtures = ['te... | Add tests for run docker mgmt command | Add tests for run docker mgmt command
| Python | mit | Tazer/readthedocs.org,rtfd/readthedocs.org,soulshake/readthedocs.org,davidfischer/readthedocs.org,takluyver/readthedocs.org,sid-kap/readthedocs.org,sunnyzwh/readthedocs.org,pombredanne/readthedocs.org,laplaceliu/readthedocs.org,takluyver/readthedocs.org,espdev/readthedocs.org,sils1297/readthedocs.org,wijerasa/readthedo... | Add tests for run docker mgmt command | from StringIO import StringIO
from django.test import TestCase
from mock import patch
from core.management.commands import run_docker
from projects.models import Project
from builds.models import Version
class TestRunDocker(TestCase):
'''Test run_docker command with good input and output'''
fixtures = ['te... | <commit_before><commit_msg>Add tests for run docker mgmt command<commit_after> | from StringIO import StringIO
from django.test import TestCase
from mock import patch
from core.management.commands import run_docker
from projects.models import Project
from builds.models import Version
class TestRunDocker(TestCase):
'''Test run_docker command with good input and output'''
fixtures = ['te... | Add tests for run docker mgmt commandfrom StringIO import StringIO
from django.test import TestCase
from mock import patch
from core.management.commands import run_docker
from projects.models import Project
from builds.models import Version
class TestRunDocker(TestCase):
'''Test run_docker command with good inp... | <commit_before><commit_msg>Add tests for run docker mgmt command<commit_after>from StringIO import StringIO
from django.test import TestCase
from mock import patch
from core.management.commands import run_docker
from projects.models import Project
from builds.models import Version
class TestRunDocker(TestCase):
... | |
cbaf4e86c4409735a8f011f5a8f801a34278c21c | src/ggrc/migrations/versions/20170112013716_421b2179c02e_update_fulltext_index.py | src/ggrc/migrations/versions/20170112013716_421b2179c02e_update_fulltext_index.py | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Update fulltext index.
Create Date: 2017-01-12 01:37:16.801973
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
import sqlalchemy as sa
... | Increase text index property size | Increase text index property size
The index property size should support strings of the same length as
custom attribute definition titles.
| Python | apache-2.0 | VinnieJohns/ggrc-core,selahssea/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,AleksNeStu/ggrc-core,VinnieJohns/ggrc-core,selahssea/ggrc-core,plamut/ggrc-core,plamut/ggrc-core,plamut/ggrc-core | Increase text index property size
The index property size should support strings of the same length as
custom attribute definition titles. | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Update fulltext index.
Create Date: 2017-01-12 01:37:16.801973
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
import sqlalchemy as sa
... | <commit_before><commit_msg>Increase text index property size
The index property size should support strings of the same length as
custom attribute definition titles.<commit_after> | # Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Update fulltext index.
Create Date: 2017-01-12 01:37:16.801973
"""
# disable Invalid constant name pylint warning for mandatory Alembic variables.
# pylint: disable=invalid-name
import sqlalchemy as sa
... | Increase text index property size
The index property size should support strings of the same length as
custom attribute definition titles.# Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Update fulltext index.
Create Date: 2017-01-12 01:37:16.801973
"... | <commit_before><commit_msg>Increase text index property size
The index property size should support strings of the same length as
custom attribute definition titles.<commit_after># Copyright (C) 2017 Google Inc.
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
"""Update fulltext index.
... | |
241ac6d844febf829f6442897ebf547a291e5db4 | summarization/summarization.py | summarization/summarization.py | import indicoio
import csv
indicoio.config.api_key = 'YOUR_API_KEY'
def clean_article(article):
return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace')
def clean_articles(article_list):
# data processing: clean up new lines and convert strings into utf-8 so the indico API can read the d... | Add Summarization API code for blog post | Add Summarization API code for blog post | Python | mit | IndicoDataSolutions/SuperCell | Add Summarization API code for blog post | import indicoio
import csv
indicoio.config.api_key = 'YOUR_API_KEY'
def clean_article(article):
return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace')
def clean_articles(article_list):
# data processing: clean up new lines and convert strings into utf-8 so the indico API can read the d... | <commit_before><commit_msg>Add Summarization API code for blog post<commit_after> | import indicoio
import csv
indicoio.config.api_key = 'YOUR_API_KEY'
def clean_article(article):
return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace')
def clean_articles(article_list):
# data processing: clean up new lines and convert strings into utf-8 so the indico API can read the d... | Add Summarization API code for blog postimport indicoio
import csv
indicoio.config.api_key = 'YOUR_API_KEY'
def clean_article(article):
return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace')
def clean_articles(article_list):
# data processing: clean up new lines and convert strings int... | <commit_before><commit_msg>Add Summarization API code for blog post<commit_after>import indicoio
import csv
indicoio.config.api_key = 'YOUR_API_KEY'
def clean_article(article):
return article.replace("\n", " ").decode('cp1252').encode('utf-8', 'replace')
def clean_articles(article_list):
# data processing: c... | |
bb43a2e63f7f7c337b01ef855d426a84b73eeee5 | telemeta/management/commands/telemeta-export-items-from-user-playlists.py | telemeta/management/commands/telemeta-export-items-from-user-playlists.py | from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from django.utils import translation
from telemeta.models import Playlist, MediaCollection, ... | Add a command prototype to list all items from a playlist | Add a command prototype to list all items from a playlist
| Python | agpl-3.0 | Parisson/Telemeta,Parisson/Telemeta,Parisson/Telemeta,Parisson/Telemeta | Add a command prototype to list all items from a playlist | from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from django.utils import translation
from telemeta.models import Playlist, MediaCollection, ... | <commit_before><commit_msg>Add a command prototype to list all items from a playlist<commit_after> | from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from django.utils import translation
from telemeta.models import Playlist, MediaCollection, ... | Add a command prototype to list all items from a playlistfrom optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.template.defaultfilters import slugify
from django.utils import translation... | <commit_before><commit_msg>Add a command prototype to list all items from a playlist<commit_after>from optparse import make_option
from django.conf import settings
from django.core.management.base import BaseCommand, CommandError
from django.contrib.auth.models import User
from django.template.defaultfilters import slu... | |
a62dc18745f952b3fcb05ddf4768758e25883698 | accelerator/migrations/0058_grant_staff_clearance_for_existing_staff_members.py | accelerator/migrations/0058_grant_staff_clearance_for_existing_staff_members.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-12 19:38
from __future__ import unicode_literals
from django.db import migrations
STAFF = "Staff" # don't import from models in migrations.
def grant_staff_clearances_for_role_grantees(apps, program_role):
Clearance = apps.get_model('accelerator', ... | Add datamigration to create staff clearances | [AC-6516] Add datamigration to create staff clearances
| Python | mit | masschallenge/django-accelerator,masschallenge/django-accelerator | [AC-6516] Add datamigration to create staff clearances | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-12 19:38
from __future__ import unicode_literals
from django.db import migrations
STAFF = "Staff" # don't import from models in migrations.
def grant_staff_clearances_for_role_grantees(apps, program_role):
Clearance = apps.get_model('accelerator', ... | <commit_before><commit_msg>[AC-6516] Add datamigration to create staff clearances<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-12 19:38
from __future__ import unicode_literals
from django.db import migrations
STAFF = "Staff" # don't import from models in migrations.
def grant_staff_clearances_for_role_grantees(apps, program_role):
Clearance = apps.get_model('accelerator', ... | [AC-6516] Add datamigration to create staff clearances# -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-12 19:38
from __future__ import unicode_literals
from django.db import migrations
STAFF = "Staff" # don't import from models in migrations.
def grant_staff_clearances_for_role_grantees(apps, program... | <commit_before><commit_msg>[AC-6516] Add datamigration to create staff clearances<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.10.8 on 2019-06-12 19:38
from __future__ import unicode_literals
from django.db import migrations
STAFF = "Staff" # don't import from models in migrations.
def grant_staff_c... | |
2d18583309a189e263bda13e19f7a05ba832c14d | backend/scripts/templates/templates2file.py | backend/scripts/templates/templates2file.py | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
import json
import os
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-P", "--port", dest="port", type="int",
help="rethinkdb port", default=30815)
(options, args) = parser.parse_args(... | Add file to write templates to json | Add file to write templates to json
| Python | mit | materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org,materials-commons/materialscommons.org | Add file to write templates to json | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
import json
import os
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-P", "--port", dest="port", type="int",
help="rethinkdb port", default=30815)
(options, args) = parser.parse_args(... | <commit_before><commit_msg>Add file to write templates to json<commit_after> | #!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
import json
import os
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-P", "--port", dest="port", type="int",
help="rethinkdb port", default=30815)
(options, args) = parser.parse_args(... | Add file to write templates to json#!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
import json
import os
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-P", "--port", dest="port", type="int",
help="rethinkdb port", default=30815)
(... | <commit_before><commit_msg>Add file to write templates to json<commit_after>#!/usr/bin/env python
import rethinkdb as r
from optparse import OptionParser
import json
import os
if __name__ == "__main__":
parser = OptionParser()
parser.add_option("-P", "--port", dest="port", type="int",
he... | |
6df873a26ff71b07e68dcb2e9fa9c4b1725a70ce | src/nodeconductor_assembly_waldur/experts/migrations/0003_expertbid.py | src/nodeconductor_assembly_waldur/experts/migrations/0003_expertbid.py | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-07 15:09
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import nodeconductor.core.fields
class Migration(migrations.Migration):
... | Add migration for expert bid | Add migration for expert bid [WAL-976]
| Python | mit | opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur,opennode/waldur-mastermind,opennode/waldur-mastermind,opennode/nodeconductor-assembly-waldur | Add migration for expert bid [WAL-976] | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-07 15:09
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import nodeconductor.core.fields
class Migration(migrations.Migration):
... | <commit_before><commit_msg>Add migration for expert bid [WAL-976]<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-07 15:09
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import nodeconductor.core.fields
class Migration(migrations.Migration):
... | Add migration for expert bid [WAL-976]# -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-07 15:09
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import nodeconductor.core.fields
c... | <commit_before><commit_msg>Add migration for expert bid [WAL-976]<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.11.1 on 2017-07-07 15:09
from __future__ import unicode_literals
from decimal import Decimal
import django.core.validators
from django.db import migrations, models
import django.db.models.dele... | |
8e983472134817c1312e3713ca45c7359300dedf | academics/management/commands/set_student_current.py | academics/management/commands/set_student_current.py | #!/usr/bin/python
import logging
from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from academics.models import Student, Enrollment, AcademicYear
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "Import reset stu... | Set students current flag based on enrolled and attending | Set students current flag based on enrolled and attending
| Python | mit | rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps,rectory-school/rectory-apps | Set students current flag based on enrolled and attending | #!/usr/bin/python
import logging
from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from academics.models import Student, Enrollment, AcademicYear
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "Import reset stu... | <commit_before><commit_msg>Set students current flag based on enrolled and attending<commit_after> | #!/usr/bin/python
import logging
from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from academics.models import Student, Enrollment, AcademicYear
logger = logging.getLogger(__name__)
class Command(BaseCommand):
help = "Import reset stu... | Set students current flag based on enrolled and attending#!/usr/bin/python
import logging
from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from academics.models import Student, Enrollment, AcademicYear
logger = logging.getLogger(__name__)
... | <commit_before><commit_msg>Set students current flag based on enrolled and attending<commit_after>#!/usr/bin/python
import logging
from datetime import date
from django.core.management.base import BaseCommand, CommandError
from django.db import transaction
from academics.models import Student, Enrollment, AcademicYe... | |
b0d50f52f45d8f1c7de261c7fe8d15e621d0e641 | scripts/theanets-untie.py | scripts/theanets-untie.py | #!/usr/bin/env python
import climate
import cPickle as pickle
import gzip
import numpy as np
logging = climate.get_logger('theanets-untie')
@climate.annotate(
source='load a saved network from FILE',
target='save untied network weights to FILE',
)
def main(source, target):
opener = gzip.open if source.en... | Add a script to "untie" tied model weights. | Add a script to "untie" tied model weights.
Might need some more work in updating "layers" parameter.
Could help address issue #39.
| Python | mit | lmjohns3/theanets,devdoer/theanets,chrinide/theanets | Add a script to "untie" tied model weights.
Might need some more work in updating "layers" parameter.
Could help address issue #39. | #!/usr/bin/env python
import climate
import cPickle as pickle
import gzip
import numpy as np
logging = climate.get_logger('theanets-untie')
@climate.annotate(
source='load a saved network from FILE',
target='save untied network weights to FILE',
)
def main(source, target):
opener = gzip.open if source.en... | <commit_before><commit_msg>Add a script to "untie" tied model weights.
Might need some more work in updating "layers" parameter.
Could help address issue #39.<commit_after> | #!/usr/bin/env python
import climate
import cPickle as pickle
import gzip
import numpy as np
logging = climate.get_logger('theanets-untie')
@climate.annotate(
source='load a saved network from FILE',
target='save untied network weights to FILE',
)
def main(source, target):
opener = gzip.open if source.en... | Add a script to "untie" tied model weights.
Might need some more work in updating "layers" parameter.
Could help address issue #39.#!/usr/bin/env python
import climate
import cPickle as pickle
import gzip
import numpy as np
logging = climate.get_logger('theanets-untie')
@climate.annotate(
source='load a saved ... | <commit_before><commit_msg>Add a script to "untie" tied model weights.
Might need some more work in updating "layers" parameter.
Could help address issue #39.<commit_after>#!/usr/bin/env python
import climate
import cPickle as pickle
import gzip
import numpy as np
logging = climate.get_logger('theanets-untie')
@cl... | |
339fdd927f9da0f7e15726d087c9916301aef935 | softMarginSVMwithKernels/howItWorksSoftMarginSVM.py | softMarginSVMwithKernels/howItWorksSoftMarginSVM.py | # -*- coding: utf-8 -*-
"""Soft Margin SVM classification with kernels for machine learning.
Soft margin SVM is basically an SVM (see folder **supportVectorMachine**) which
has some 'slack' and allows features to be 'wrongly' classified to avoid
overfitting the classifier. This also includes kernels. Kernels use the i... | Add soft margin SVM and added kernels and class | Add soft margin SVM and added kernels and class
| Python | mit | a-holm/MachinelearningAlgorithms,a-holm/MachinelearningAlgorithms | Add soft margin SVM and added kernels and class | # -*- coding: utf-8 -*-
"""Soft Margin SVM classification with kernels for machine learning.
Soft margin SVM is basically an SVM (see folder **supportVectorMachine**) which
has some 'slack' and allows features to be 'wrongly' classified to avoid
overfitting the classifier. This also includes kernels. Kernels use the i... | <commit_before><commit_msg>Add soft margin SVM and added kernels and class<commit_after> | # -*- coding: utf-8 -*-
"""Soft Margin SVM classification with kernels for machine learning.
Soft margin SVM is basically an SVM (see folder **supportVectorMachine**) which
has some 'slack' and allows features to be 'wrongly' classified to avoid
overfitting the classifier. This also includes kernels. Kernels use the i... | Add soft margin SVM and added kernels and class# -*- coding: utf-8 -*-
"""Soft Margin SVM classification with kernels for machine learning.
Soft margin SVM is basically an SVM (see folder **supportVectorMachine**) which
has some 'slack' and allows features to be 'wrongly' classified to avoid
overfitting the classifier... | <commit_before><commit_msg>Add soft margin SVM and added kernels and class<commit_after># -*- coding: utf-8 -*-
"""Soft Margin SVM classification with kernels for machine learning.
Soft margin SVM is basically an SVM (see folder **supportVectorMachine**) which
has some 'slack' and allows features to be 'wrongly' class... | |
8601790648a17dd1794be4f88d61e4af01349a80 | tests/test_pipeline_chipseq.py | tests/test_pipeline_chipseq.py | """
.. Copyright 2017 EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... | Test for the chipseq pipeline code | Test for the chipseq pipeline code
| Python | apache-2.0 | Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq,Multiscale-Genomics/mg-process-fastq | Test for the chipseq pipeline code | """
.. Copyright 2017 EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... | <commit_before><commit_msg>Test for the chipseq pipeline code<commit_after> | """
.. Copyright 2017 EMBL-European Bioinformatics Institute
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applic... | Test for the chipseq pipeline code"""
.. Copyright 2017 EMBL-European Bioinformatics Institute
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... | <commit_before><commit_msg>Test for the chipseq pipeline code<commit_after>"""
.. Copyright 2017 EMBL-European Bioinformatics Institute
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
... | |
4155d6ca5db149d8b213cc4078580fc2e85d7f4d | vinotes/apps/api/migrations/0002_auto_20150325_1104.py | vinotes/apps/api/migrations/0002_auto_20150325_1104.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='wine',
name='description',
... | Migrate database for model changes. | Migrate database for model changes.
| Python | unlicense | rcutmore/vinotes-api,rcutmore/vinotes-api | Migrate database for model changes. | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='wine',
name='description',
... | <commit_before><commit_msg>Migrate database for model changes.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='wine',
name='description',
... | Migrate database for model changes.# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='wine... | <commit_before><commit_msg>Migrate database for model changes.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
class Migration(migrations.Migration):
dependencies = [
('api', '0001_initial'),
]
operations = [
migratio... | |
7ab37e931a836faa78a78f5d8358d845f72cdf49 | point/gemini_cmd.py | point/gemini_cmd.py | #!/usr/bin/env python3
"""
A simple script for sending raw serial commands to Gemini.
"""
import time
import serial
import readline
def main():
ser = serial.Serial('/dev/ttyACM0', baudrate=9600)
while True:
cmd = input('> ')
if len(cmd) == 0:
continue
# losmandy native... | Add low level Gemini serial command script | Add low level Gemini serial command script
| Python | mit | bgottula/point | Add low level Gemini serial command script | #!/usr/bin/env python3
"""
A simple script for sending raw serial commands to Gemini.
"""
import time
import serial
import readline
def main():
ser = serial.Serial('/dev/ttyACM0', baudrate=9600)
while True:
cmd = input('> ')
if len(cmd) == 0:
continue
# losmandy native... | <commit_before><commit_msg>Add low level Gemini serial command script<commit_after> | #!/usr/bin/env python3
"""
A simple script for sending raw serial commands to Gemini.
"""
import time
import serial
import readline
def main():
ser = serial.Serial('/dev/ttyACM0', baudrate=9600)
while True:
cmd = input('> ')
if len(cmd) == 0:
continue
# losmandy native... | Add low level Gemini serial command script#!/usr/bin/env python3
"""
A simple script for sending raw serial commands to Gemini.
"""
import time
import serial
import readline
def main():
ser = serial.Serial('/dev/ttyACM0', baudrate=9600)
while True:
cmd = input('> ')
if len(cmd) == 0:
... | <commit_before><commit_msg>Add low level Gemini serial command script<commit_after>#!/usr/bin/env python3
"""
A simple script for sending raw serial commands to Gemini.
"""
import time
import serial
import readline
def main():
ser = serial.Serial('/dev/ttyACM0', baudrate=9600)
while True:
cmd = inp... | |
55fa30c236095006e6f9c970ef668598c4348a96 | src/satosa/micro_service/attribute_modifications.py | src/satosa/micro_service/attribute_modifications.py | import os
import yaml
from satosa.internal_data import DataConverter
from satosa.micro_service.service_base import ResponseMicroService
class AddStaticAttributes(ResponseMicroService):
"""
Add static attributes to the responses.
The path to the file describing the mapping (as YAML) of static attributes... | Add microservice plugin for adding static attributes to responses. | Add microservice plugin for adding static attributes to responses.
| Python | apache-2.0 | irtnog/SATOSA,irtnog/SATOSA,SUNET/SATOSA,its-dirg/SATOSA,SUNET/SATOSA | Add microservice plugin for adding static attributes to responses. | import os
import yaml
from satosa.internal_data import DataConverter
from satosa.micro_service.service_base import ResponseMicroService
class AddStaticAttributes(ResponseMicroService):
"""
Add static attributes to the responses.
The path to the file describing the mapping (as YAML) of static attributes... | <commit_before><commit_msg>Add microservice plugin for adding static attributes to responses.<commit_after> | import os
import yaml
from satosa.internal_data import DataConverter
from satosa.micro_service.service_base import ResponseMicroService
class AddStaticAttributes(ResponseMicroService):
"""
Add static attributes to the responses.
The path to the file describing the mapping (as YAML) of static attributes... | Add microservice plugin for adding static attributes to responses.import os
import yaml
from satosa.internal_data import DataConverter
from satosa.micro_service.service_base import ResponseMicroService
class AddStaticAttributes(ResponseMicroService):
"""
Add static attributes to the responses.
The path... | <commit_before><commit_msg>Add microservice plugin for adding static attributes to responses.<commit_after>import os
import yaml
from satosa.internal_data import DataConverter
from satosa.micro_service.service_base import ResponseMicroService
class AddStaticAttributes(ResponseMicroService):
"""
Add static a... | |
94f5f630c315bc6951c98cd2a9f4908ce05d59a4 | fedmsg/tests/test_encoding.py | fedmsg/tests/test_encoding.py | import unittest
import fedmsg.encoding
from nose.tools import eq_
class TestEncoding(unittest.TestCase):
def test_float_precision(self):
""" Ensure that float precision is limited to 3 decimal places. """
msg = dict(some_number=1234.123456)
json_str = fedmsg.encoding.dumps(msg)
pr... | Test float precision in json encoding. | Test float precision in json encoding.
| Python | lgpl-2.1 | cicku/fedmsg,mathstuf/fedmsg,fedora-infra/fedmsg,maxamillion/fedmsg,fedora-infra/fedmsg,chaiku/fedmsg,vivekanand1101/fedmsg,pombredanne/fedmsg,chaiku/fedmsg,pombredanne/fedmsg,vivekanand1101/fedmsg,maxamillion/fedmsg,mathstuf/fedmsg,fedora-infra/fedmsg,cicku/fedmsg,mathstuf/fedmsg,chaiku/fedmsg,cicku/fedmsg,pombredanne... | Test float precision in json encoding. | import unittest
import fedmsg.encoding
from nose.tools import eq_
class TestEncoding(unittest.TestCase):
def test_float_precision(self):
""" Ensure that float precision is limited to 3 decimal places. """
msg = dict(some_number=1234.123456)
json_str = fedmsg.encoding.dumps(msg)
pr... | <commit_before><commit_msg>Test float precision in json encoding.<commit_after> | import unittest
import fedmsg.encoding
from nose.tools import eq_
class TestEncoding(unittest.TestCase):
def test_float_precision(self):
""" Ensure that float precision is limited to 3 decimal places. """
msg = dict(some_number=1234.123456)
json_str = fedmsg.encoding.dumps(msg)
pr... | Test float precision in json encoding.import unittest
import fedmsg.encoding
from nose.tools import eq_
class TestEncoding(unittest.TestCase):
def test_float_precision(self):
""" Ensure that float precision is limited to 3 decimal places. """
msg = dict(some_number=1234.123456)
json_str =... | <commit_before><commit_msg>Test float precision in json encoding.<commit_after>import unittest
import fedmsg.encoding
from nose.tools import eq_
class TestEncoding(unittest.TestCase):
def test_float_precision(self):
""" Ensure that float precision is limited to 3 decimal places. """
msg = dict(so... | |
dfb4c5422c79fcd413d0d9a028cb5548e2678454 | generate_test_certificates.py | generate_test_certificates.py | import trustme
# Create a CA
ca = trustme.CA()
# Issue a cert signed by this CA
server_cert = ca.issue_cert(u"www.good.com")
# Save the PEM-encoded data to a file
ca.cert_pem.write_to_path("GoodRootCA.pem")
server_cert.private_key_and_cert_chain_pem.write_to_path("www.good.com.pem")
| Add script for generating test certificates | Add script for generating test certificates
| Python | mit | datatheorem/TrustKit,datatheorem/TrustKit,datatheorem/TrustKit,datatheorem/TrustKit | Add script for generating test certificates | import trustme
# Create a CA
ca = trustme.CA()
# Issue a cert signed by this CA
server_cert = ca.issue_cert(u"www.good.com")
# Save the PEM-encoded data to a file
ca.cert_pem.write_to_path("GoodRootCA.pem")
server_cert.private_key_and_cert_chain_pem.write_to_path("www.good.com.pem")
| <commit_before><commit_msg>Add script for generating test certificates<commit_after> | import trustme
# Create a CA
ca = trustme.CA()
# Issue a cert signed by this CA
server_cert = ca.issue_cert(u"www.good.com")
# Save the PEM-encoded data to a file
ca.cert_pem.write_to_path("GoodRootCA.pem")
server_cert.private_key_and_cert_chain_pem.write_to_path("www.good.com.pem")
| Add script for generating test certificatesimport trustme
# Create a CA
ca = trustme.CA()
# Issue a cert signed by this CA
server_cert = ca.issue_cert(u"www.good.com")
# Save the PEM-encoded data to a file
ca.cert_pem.write_to_path("GoodRootCA.pem")
server_cert.private_key_and_cert_chain_pem.write_to_path("www.good.... | <commit_before><commit_msg>Add script for generating test certificates<commit_after>import trustme
# Create a CA
ca = trustme.CA()
# Issue a cert signed by this CA
server_cert = ca.issue_cert(u"www.good.com")
# Save the PEM-encoded data to a file
ca.cert_pem.write_to_path("GoodRootCA.pem")
server_cert.private_key_an... | |
00cdcceb131814b24546c36810682ed78ba866c6 | pyfwk/struc/dbcol.py | pyfwk/struc/dbcol.py | #!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
# ----------------------------DATABASE-COLUMN-----------------------------#
class DBCol:
name = None
datatype = None
def __init__(self, name, datatype):
self.name = name
self.datatype =... | Create database column class (DBCol) | Create database column class (DBCol)
| Python | mit | rlinguri/pyfwk | Create database column class (DBCol) | #!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
# ----------------------------DATABASE-COLUMN-----------------------------#
class DBCol:
name = None
datatype = None
def __init__(self, name, datatype):
self.name = name
self.datatype =... | <commit_before><commit_msg>Create database column class (DBCol)<commit_after> | #!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
# ----------------------------DATABASE-COLUMN-----------------------------#
class DBCol:
name = None
datatype = None
def __init__(self, name, datatype):
self.name = name
self.datatype =... | Create database column class (DBCol)#!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
# ----------------------------DATABASE-COLUMN-----------------------------#
class DBCol:
name = None
datatype = None
def __init__(self, name, datatype):
self... | <commit_before><commit_msg>Create database column class (DBCol)<commit_after>#!/usr/bin/env python
"""
dbcol.py: DBCol is a struct describing an sqlite database table column
"""
# ----------------------------DATABASE-COLUMN-----------------------------#
class DBCol:
name = None
datatype = None
def __i... | |
51466e360320267afab41704caecebac0dff1dc2 | src/example/bench_wsh.py | src/example/bench_wsh.py | # Copyright 2011, Google Inc.
# 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 source code must retain the above copyright
# notice, this list of conditions and the f... | Add a handler for performing client load testing. | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044
git-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4
| Python | bsd-3-clause | XiaonuoGantan/pywebsocket,XiaonuoGantan/pywebsocket | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044
git-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4 | # Copyright 2011, Google Inc.
# 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 source code must retain the above copyright
# notice, this list of conditions and the f... | <commit_before><commit_msg>Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044
git-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4<commit_after> | # Copyright 2011, Google Inc.
# 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 source code must retain the above copyright
# notice, this list of conditions and the f... | Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044
git-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4# Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
#... | <commit_before><commit_msg>Add a handler for performing client load testing.
Review URL: http://codereview.appspot.com/3844044
git-svn-id: a751b5b3dcfba0ee4592a85c40d2fdd063ca0d53@379 4ff78f4a-9131-11de-b045-6380ec9940d4<commit_after># Copyright 2011, Google Inc.
# All rights reserved.
#
# Redistribution and use in s... | |
f531eb7d1734d6d715893356a50d11eee6bc009a | corehq/apps/users/tests/forms.py | corehq/apps/users/tests/forms.py | from collections import namedtuple
from django.contrib.auth import get_user_model
from django.test import TestCase
from corehq.apps.users.forms import SetUserPasswordForm
Project = namedtuple('Project', ['name', 'strong_mobile_passwords'])
class TestSetUserPasswordForm(TestCase):
def setUp(self):
super(T... | Test mobile set password form | Test mobile set password form
| Python | bsd-3-clause | dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,dimagi/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq,qedsoftware/commcare-hq | Test mobile set password form | from collections import namedtuple
from django.contrib.auth import get_user_model
from django.test import TestCase
from corehq.apps.users.forms import SetUserPasswordForm
Project = namedtuple('Project', ['name', 'strong_mobile_passwords'])
class TestSetUserPasswordForm(TestCase):
def setUp(self):
super(T... | <commit_before><commit_msg>Test mobile set password form<commit_after> | from collections import namedtuple
from django.contrib.auth import get_user_model
from django.test import TestCase
from corehq.apps.users.forms import SetUserPasswordForm
Project = namedtuple('Project', ['name', 'strong_mobile_passwords'])
class TestSetUserPasswordForm(TestCase):
def setUp(self):
super(T... | Test mobile set password formfrom collections import namedtuple
from django.contrib.auth import get_user_model
from django.test import TestCase
from corehq.apps.users.forms import SetUserPasswordForm
Project = namedtuple('Project', ['name', 'strong_mobile_passwords'])
class TestSetUserPasswordForm(TestCase):
def... | <commit_before><commit_msg>Test mobile set password form<commit_after>from collections import namedtuple
from django.contrib.auth import get_user_model
from django.test import TestCase
from corehq.apps.users.forms import SetUserPasswordForm
Project = namedtuple('Project', ['name', 'strong_mobile_passwords'])
class T... | |
86c2441be14dbc3303b0bc65356372728a62fd4a | test/performance.py | test/performance.py | from contextlib import contextmanager
import json
import os
import re
import sys
from django.conf import settings
from django.db import connection, reset_queries
count = {}
@contextmanager
def count_queries(k):
q = 0
debug = settings.DEBUG
try:
settings.DEBUG = True
reset_queries()
... | Add infrastructure for counting database queries | Add infrastructure for counting database queries
| Python | agpl-3.0 | terceiro/squad,terceiro/squad,terceiro/squad,terceiro/squad | Add infrastructure for counting database queries | from contextlib import contextmanager
import json
import os
import re
import sys
from django.conf import settings
from django.db import connection, reset_queries
count = {}
@contextmanager
def count_queries(k):
q = 0
debug = settings.DEBUG
try:
settings.DEBUG = True
reset_queries()
... | <commit_before><commit_msg>Add infrastructure for counting database queries<commit_after> | from contextlib import contextmanager
import json
import os
import re
import sys
from django.conf import settings
from django.db import connection, reset_queries
count = {}
@contextmanager
def count_queries(k):
q = 0
debug = settings.DEBUG
try:
settings.DEBUG = True
reset_queries()
... | Add infrastructure for counting database queriesfrom contextlib import contextmanager
import json
import os
import re
import sys
from django.conf import settings
from django.db import connection, reset_queries
count = {}
@contextmanager
def count_queries(k):
q = 0
debug = settings.DEBUG
try:
set... | <commit_before><commit_msg>Add infrastructure for counting database queries<commit_after>from contextlib import contextmanager
import json
import os
import re
import sys
from django.conf import settings
from django.db import connection, reset_queries
count = {}
@contextmanager
def count_queries(k):
q = 0
de... | |
b5568053325bd78c277d4bc0adff59cd12e10f48 | build-plugin.py | build-plugin.py | import os
UnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'
UATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')
FullPluginFile = os.path.abspath('UnrealCV.uplugin')
os.system('%s BuildPlugin -plugin=%s' % (UATScript, FullPluginFile))
| Add a script to build plugin. | Add a script to build plugin.
| Python | mit | qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,qiuwch/unrealcv,qiuwch/unrealcv | Add a script to build plugin. | import os
UnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'
UATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')
FullPluginFile = os.path.abspath('UnrealCV.uplugin')
os.system('%s BuildPlugin -plugin=%s' % (UATScript, FullPluginFile))
| <commit_before><commit_msg>Add a script to build plugin.<commit_after> | import os
UnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'
UATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')
FullPluginFile = os.path.abspath('UnrealCV.uplugin')
os.system('%s BuildPlugin -plugin=%s' % (UATScript, FullPluginFile))
| Add a script to build plugin.import os
UnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'
UATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')
FullPluginFile = os.path.abspath('UnrealCV.uplugin')
os.system('%s BuildPlugin -plugin=%s' % (UATScript, FullPluginFile))
| <commit_before><commit_msg>Add a script to build plugin.<commit_after>import os
UnrealEnginePath='/home/qiuwch/workspace/UnrealEngine'
UATScript = os.path.join(UnrealEnginePath, 'Engine/Build/BatchFiles/RunUAT.sh')
FullPluginFile = os.path.abspath('UnrealCV.uplugin')
os.system('%s BuildPlugin -plugin=%s' % (UATScript, ... | |
21d931e35d9e0b32415a408f28e45894f0c3e800 | django_backend_test/noras_menu/tasks.py | django_backend_test/noras_menu/tasks.py | # -*- encoding: utf-8 -*-
#app_mail/tasks.py
import requests
import simplejson as json
from django_backend_test.celery import app
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import EmailMultiAlternatives
from .models import Subscribers, MenuItems
... | Add task files for celery async process | Add task files for celery async process
| Python | mit | semorale/backend-test,semorale/backend-test,semorale/backend-test | Add task files for celery async process | # -*- encoding: utf-8 -*-
#app_mail/tasks.py
import requests
import simplejson as json
from django_backend_test.celery import app
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import EmailMultiAlternatives
from .models import Subscribers, MenuItems
... | <commit_before><commit_msg>Add task files for celery async process<commit_after> | # -*- encoding: utf-8 -*-
#app_mail/tasks.py
import requests
import simplejson as json
from django_backend_test.celery import app
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import EmailMultiAlternatives
from .models import Subscribers, MenuItems
... | Add task files for celery async process# -*- encoding: utf-8 -*-
#app_mail/tasks.py
import requests
import simplejson as json
from django_backend_test.celery import app
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.core.mail import EmailMultiAlternatives
from... | <commit_before><commit_msg>Add task files for celery async process<commit_after># -*- encoding: utf-8 -*-
#app_mail/tasks.py
import requests
import simplejson as json
from django_backend_test.celery import app
from django.template.loader import render_to_string
from django.utils.html import strip_tags
from django.cor... | |
849a29b22d656c8079b4ccaf922848fb057c80c5 | forms/migrations/0023_assign_sheets_to_transnational.py | forms/migrations/0023_assign_sheets_to_transnational.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def assign_transnational_region_to_sheets(apps, schema_editor):
from forms.models import sheet_models
CountryRegion = apps.get_model("forms", "CountryRegion"... | Add migration to assign appropriate sheets to Transnational CountryRegion | Add migration to assign appropriate sheets to Transnational CountryRegion
| Python | apache-2.0 | Code4SA/gmmp,Code4SA/gmmp,Code4SA/gmmp | Add migration to assign appropriate sheets to Transnational CountryRegion | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def assign_transnational_region_to_sheets(apps, schema_editor):
from forms.models import sheet_models
CountryRegion = apps.get_model("forms", "CountryRegion"... | <commit_before><commit_msg>Add migration to assign appropriate sheets to Transnational CountryRegion<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def assign_transnational_region_to_sheets(apps, schema_editor):
from forms.models import sheet_models
CountryRegion = apps.get_model("forms", "CountryRegion"... | Add migration to assign appropriate sheets to Transnational CountryRegion# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def assign_transnational_region_to_sheets(apps, schema_editor):
from forms.models import ... | <commit_before><commit_msg>Add migration to assign appropriate sheets to Transnational CountryRegion<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.core.exceptions import ObjectDoesNotExist
from django.db import migrations
def assign_transnational_region_to_sheets(apps, sche... | |
eeb9b9877f1aa5bc1f22ac4883fe58a57ee0474a | scripts/test_hots.py | scripts/test_hots.py | import numpy as np
events = [
(1162704874, -5547),
(1179727586, -5548),
(1209562198, -5547),
(1224960594, -5548),
]
t, x = zip(*events)
t = np.array(t)
x = np.array(x)
t = t - t[0] # redefine zero time
alpha = 1/t[-1]
t = alpha*t # scale time values
A = np.ones((4, 4))
A[:, -2] = np.array(t)
fo... | Add script to test HOTS | Add script to test HOTS
Add Python script to test Higher-Order Encoder Time Stamping with
sampled data.
| Python | bsd-2-clause | oliverlee/phobos,oliverlee/phobos,oliverlee/phobos,oliverlee/phobos | Add script to test HOTS
Add Python script to test Higher-Order Encoder Time Stamping with
sampled data. | import numpy as np
events = [
(1162704874, -5547),
(1179727586, -5548),
(1209562198, -5547),
(1224960594, -5548),
]
t, x = zip(*events)
t = np.array(t)
x = np.array(x)
t = t - t[0] # redefine zero time
alpha = 1/t[-1]
t = alpha*t # scale time values
A = np.ones((4, 4))
A[:, -2] = np.array(t)
fo... | <commit_before><commit_msg>Add script to test HOTS
Add Python script to test Higher-Order Encoder Time Stamping with
sampled data.<commit_after> | import numpy as np
events = [
(1162704874, -5547),
(1179727586, -5548),
(1209562198, -5547),
(1224960594, -5548),
]
t, x = zip(*events)
t = np.array(t)
x = np.array(x)
t = t - t[0] # redefine zero time
alpha = 1/t[-1]
t = alpha*t # scale time values
A = np.ones((4, 4))
A[:, -2] = np.array(t)
fo... | Add script to test HOTS
Add Python script to test Higher-Order Encoder Time Stamping with
sampled data.import numpy as np
events = [
(1162704874, -5547),
(1179727586, -5548),
(1209562198, -5547),
(1224960594, -5548),
]
t, x = zip(*events)
t = np.array(t)
x = np.array(x)
t = t - t[0] # redefine ... | <commit_before><commit_msg>Add script to test HOTS
Add Python script to test Higher-Order Encoder Time Stamping with
sampled data.<commit_after>import numpy as np
events = [
(1162704874, -5547),
(1179727586, -5548),
(1209562198, -5547),
(1224960594, -5548),
]
t, x = zip(*events)
t = np.array(t)
... | |
ee169acf82eff08daa40c461263712f2af2a1131 | scripts/simulate.py | scripts/simulate.py | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script runs stand-alone simulation on an RMG job. This is effectively the
same script as sensitivity.py
"""
import os.path
import argparse
from rmgpy.tools.sensitivity import runSensitivity
#####################################################################... | Add a standalone simulation script (really a duplicate of sensitivity.py) | Add a standalone simulation script (really a duplicate of sensitivity.py)
| Python | mit | chatelak/RMG-Py,pierrelb/RMG-Py,chatelak/RMG-Py,nyee/RMG-Py,pierrelb/RMG-Py,nickvandewiele/RMG-Py,nyee/RMG-Py,nickvandewiele/RMG-Py | Add a standalone simulation script (really a duplicate of sensitivity.py) | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script runs stand-alone simulation on an RMG job. This is effectively the
same script as sensitivity.py
"""
import os.path
import argparse
from rmgpy.tools.sensitivity import runSensitivity
#####################################################################... | <commit_before><commit_msg>Add a standalone simulation script (really a duplicate of sensitivity.py)<commit_after> | #!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script runs stand-alone simulation on an RMG job. This is effectively the
same script as sensitivity.py
"""
import os.path
import argparse
from rmgpy.tools.sensitivity import runSensitivity
#####################################################################... | Add a standalone simulation script (really a duplicate of sensitivity.py)#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script runs stand-alone simulation on an RMG job. This is effectively the
same script as sensitivity.py
"""
import os.path
import argparse
from rmgpy.tools.sensitivity import runSensitivi... | <commit_before><commit_msg>Add a standalone simulation script (really a duplicate of sensitivity.py)<commit_after>#!/usr/bin/env python
# -*- coding: utf-8 -*-
"""
This script runs stand-alone simulation on an RMG job. This is effectively the
same script as sensitivity.py
"""
import os.path
import argparse
from rm... | |
eeb0187b9d474b9b5d1710e8f45f8116894eb15c | temp-sensor02/main.py | temp-sensor02/main.py | from machine import Pin
from ds18x20 import DS18X20
import onewire
import time
import machine
import ujson
import urequests
def posttocloud(temperature):
keystext = open("sparkfun_keys.json").read()
keys = ujson.loads(keystext)
url = keys['inputUrl'] + "?private_key=" + keys['privateKey'] + "&temp=" + str(temper... | Read Temperature from DS18B20. Post the data to data.sparkfun.com | Read Temperature from DS18B20. Post the data to data.sparkfun.com
| Python | mit | fuzzyhandle/esp8266hangout,fuzzyhandle/esp8266hangout,fuzzyhandle/esp8266hangout | Read Temperature from DS18B20. Post the data to data.sparkfun.com | from machine import Pin
from ds18x20 import DS18X20
import onewire
import time
import machine
import ujson
import urequests
def posttocloud(temperature):
keystext = open("sparkfun_keys.json").read()
keys = ujson.loads(keystext)
url = keys['inputUrl'] + "?private_key=" + keys['privateKey'] + "&temp=" + str(temper... | <commit_before><commit_msg>Read Temperature from DS18B20. Post the data to data.sparkfun.com<commit_after> | from machine import Pin
from ds18x20 import DS18X20
import onewire
import time
import machine
import ujson
import urequests
def posttocloud(temperature):
keystext = open("sparkfun_keys.json").read()
keys = ujson.loads(keystext)
url = keys['inputUrl'] + "?private_key=" + keys['privateKey'] + "&temp=" + str(temper... | Read Temperature from DS18B20. Post the data to data.sparkfun.comfrom machine import Pin
from ds18x20 import DS18X20
import onewire
import time
import machine
import ujson
import urequests
def posttocloud(temperature):
keystext = open("sparkfun_keys.json").read()
keys = ujson.loads(keystext)
url = keys['inputUrl... | <commit_before><commit_msg>Read Temperature from DS18B20. Post the data to data.sparkfun.com<commit_after>from machine import Pin
from ds18x20 import DS18X20
import onewire
import time
import machine
import ujson
import urequests
def posttocloud(temperature):
keystext = open("sparkfun_keys.json").read()
keys = ujs... | |
632f71651864517cc977f79dcdac7f3b0f516b49 | scripts/post_data.py | scripts/post_data.py | #!/usr/bin/env python3
import requests
domain = 'http://dakis.gimbutas.lt/api/'
exp_data = {
"description": "First successful post through API",
"algorithm": "TestTasks",
"neighbours": "Nearest",
"stopping_criteria": "x_dist",
"stopping_accuracy": "0.01",
"subregion": "simplex",
"inner_pr... | Add example script to post experiment and task data | Add example script to post experiment and task data
| Python | agpl-3.0 | niekas/dakis,niekas/dakis,niekas/dakis | Add example script to post experiment and task data | #!/usr/bin/env python3
import requests
domain = 'http://dakis.gimbutas.lt/api/'
exp_data = {
"description": "First successful post through API",
"algorithm": "TestTasks",
"neighbours": "Nearest",
"stopping_criteria": "x_dist",
"stopping_accuracy": "0.01",
"subregion": "simplex",
"inner_pr... | <commit_before><commit_msg>Add example script to post experiment and task data<commit_after> | #!/usr/bin/env python3
import requests
domain = 'http://dakis.gimbutas.lt/api/'
exp_data = {
"description": "First successful post through API",
"algorithm": "TestTasks",
"neighbours": "Nearest",
"stopping_criteria": "x_dist",
"stopping_accuracy": "0.01",
"subregion": "simplex",
"inner_pr... | Add example script to post experiment and task data#!/usr/bin/env python3
import requests
domain = 'http://dakis.gimbutas.lt/api/'
exp_data = {
"description": "First successful post through API",
"algorithm": "TestTasks",
"neighbours": "Nearest",
"stopping_criteria": "x_dist",
"stopping_accuracy"... | <commit_before><commit_msg>Add example script to post experiment and task data<commit_after>#!/usr/bin/env python3
import requests
domain = 'http://dakis.gimbutas.lt/api/'
exp_data = {
"description": "First successful post through API",
"algorithm": "TestTasks",
"neighbours": "Nearest",
"stopping_cri... | |
e04bf5dd12a1f5e28258541dcf9d2eb8c5567ad0 | tests/lead_price_tests.py | tests/lead_price_tests.py | import unittest
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_exceptions
'''
requires config.json in the same directory for api authentication
{
"sabre_client_id": -----,
"sabre_client_secret": -----
}
'''
class TestBasicLead... | Add tests for lead price | Add tests for lead price
| Python | mit | Jamil/sabre_dev_studio | Add tests for lead price | import unittest
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_exceptions
'''
requires config.json in the same directory for api authentication
{
"sabre_client_id": -----,
"sabre_client_secret": -----
}
'''
class TestBasicLead... | <commit_before><commit_msg>Add tests for lead price<commit_after> | import unittest
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_exceptions
'''
requires config.json in the same directory for api authentication
{
"sabre_client_id": -----,
"sabre_client_secret": -----
}
'''
class TestBasicLead... | Add tests for lead priceimport unittest
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_exceptions
'''
requires config.json in the same directory for api authentication
{
"sabre_client_id": -----,
"sabre_client_secret": -----
}
... | <commit_before><commit_msg>Add tests for lead price<commit_after>import unittest
import datetime
import json
import sys
sys.path.append('..')
import sabre_dev_studio
import sabre_dev_studio.sabre_exceptions as sabre_exceptions
'''
requires config.json in the same directory for api authentication
{
"sabre_client_id"... | |
b7c22cddecb743e9597c92160e3aa0100e149e19 | tests/model/test_hades.py | tests/model/test_hades.py | from datetime import datetime, timedelta
from pycroft.model import session
from pycroft.model.hades import radgroup_property_mappings, radcheck
from tests import FactoryDataTestBase
from tests.factories import PropertyGroupFactory, MembershipFactory, UserWithHostFactory, \
SwitchFactory, PatchPortFactory
class H... | Introduce hades test fixtures and first tests. | Introduce hades test fixtures and first tests.
| Python | apache-2.0 | agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,agdsn/pycroft,agdsn/pycroft,agdsn/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft,lukasjuhrich/pycroft | Introduce hades test fixtures and first tests. | from datetime import datetime, timedelta
from pycroft.model import session
from pycroft.model.hades import radgroup_property_mappings, radcheck
from tests import FactoryDataTestBase
from tests.factories import PropertyGroupFactory, MembershipFactory, UserWithHostFactory, \
SwitchFactory, PatchPortFactory
class H... | <commit_before><commit_msg>Introduce hades test fixtures and first tests.<commit_after> | from datetime import datetime, timedelta
from pycroft.model import session
from pycroft.model.hades import radgroup_property_mappings, radcheck
from tests import FactoryDataTestBase
from tests.factories import PropertyGroupFactory, MembershipFactory, UserWithHostFactory, \
SwitchFactory, PatchPortFactory
class H... | Introduce hades test fixtures and first tests.from datetime import datetime, timedelta
from pycroft.model import session
from pycroft.model.hades import radgroup_property_mappings, radcheck
from tests import FactoryDataTestBase
from tests.factories import PropertyGroupFactory, MembershipFactory, UserWithHostFactory, \... | <commit_before><commit_msg>Introduce hades test fixtures and first tests.<commit_after>from datetime import datetime, timedelta
from pycroft.model import session
from pycroft.model.hades import radgroup_property_mappings, radcheck
from tests import FactoryDataTestBase
from tests.factories import PropertyGroupFactory, ... | |
d9b4b0d913304b19365854b0ffceab179237d8f8 | numba/tests/test_floatsyms.py | numba/tests/test_floatsyms.py | from __future__ import print_function
import numba.unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
class TestFloatSymbols(unittest.TestCase):
"""
Test ftol symbols on windows
"""
def _test_template(self, realty, intty):
def cast(x):
... | Add tests for float->int symbols (esp for 32-bit windows and linux) | Add tests for float->int symbols (esp for 32-bit windows and linux)
| Python | bsd-2-clause | numba/numba,stonebig/numba,stefanseefeld/numba,sklam/numba,seibert/numba,pitrou/numba,GaZ3ll3/numba,IntelLabs/numba,pombredanne/numba,stonebig/numba,gdementen/numba,pitrou/numba,pombredanne/numba,pitrou/numba,sklam/numba,ssarangi/numba,numba/numba,cpcloud/numba,stuartarchibald/numba,pombredanne/numba,seibert/numba,jrie... | Add tests for float->int symbols (esp for 32-bit windows and linux) | from __future__ import print_function
import numba.unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
class TestFloatSymbols(unittest.TestCase):
"""
Test ftol symbols on windows
"""
def _test_template(self, realty, intty):
def cast(x):
... | <commit_before><commit_msg>Add tests for float->int symbols (esp for 32-bit windows and linux)<commit_after> | from __future__ import print_function
import numba.unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
class TestFloatSymbols(unittest.TestCase):
"""
Test ftol symbols on windows
"""
def _test_template(self, realty, intty):
def cast(x):
... | Add tests for float->int symbols (esp for 32-bit windows and linux)from __future__ import print_function
import numba.unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
class TestFloatSymbols(unittest.TestCase):
"""
Test ftol symbols on windows
"""
def _t... | <commit_before><commit_msg>Add tests for float->int symbols (esp for 32-bit windows and linux)<commit_after>from __future__ import print_function
import numba.unittest_support as unittest
from numba.compiler import compile_isolated
from numba import types
class TestFloatSymbols(unittest.TestCase):
"""
Test ft... | |
4f3854eaf8d6e4b0ad9a77e871a946916ab3fec6 | listings/syndication/migrations/0002_auto__del_unique_feedtype_content_type.py | listings/syndication/migrations/0002_auto__del_unique_feedtype_content_type.py | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'FeedType', fields ['content_type']
db.delete_unique('syndication_feedtype',... | Migrate listings.syndication, FeedType.content_type should not be unique. | Migrate listings.syndication, FeedType.content_type should not be unique.
| Python | mit | wtrevino/django-listings,wtrevino/django-listings | Migrate listings.syndication, FeedType.content_type should not be unique. | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'FeedType', fields ['content_type']
db.delete_unique('syndication_feedtype',... | <commit_before><commit_msg>Migrate listings.syndication, FeedType.content_type should not be unique.<commit_after> | # -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'FeedType', fields ['content_type']
db.delete_unique('syndication_feedtype',... | Migrate listings.syndication, FeedType.content_type should not be unique.# -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# Removing unique constraint on 'FeedType',... | <commit_before><commit_msg>Migrate listings.syndication, FeedType.content_type should not be unique.<commit_after># -*- coding: utf-8 -*-
import datetime
from south.db import db
from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
def forwards(self, orm):
# ... | |
c5fba0cc8acb482a0bc1c49ae5187ebc1232dba3 | tests/test_directions.py | tests/test_directions.py | import unittest
from shapely.geometry import LineString, Point
from directions.base import _parse_points
class DirectionsTest(unittest.TestCase):
def setUp(self):
self.p = [(1,2), (3,4), (5,6), (7,8)]
self.line = LineString(self.p)
def test_origin_dest(self):
result = _parse_points(s... | Add tests for the different input variations. | Add tests for the different input variations.
| Python | bsd-3-clause | asfaltboy/directions.py,jwass/directions.py,samtux/directions.py | Add tests for the different input variations. | import unittest
from shapely.geometry import LineString, Point
from directions.base import _parse_points
class DirectionsTest(unittest.TestCase):
def setUp(self):
self.p = [(1,2), (3,4), (5,6), (7,8)]
self.line = LineString(self.p)
def test_origin_dest(self):
result = _parse_points(s... | <commit_before><commit_msg>Add tests for the different input variations.<commit_after> | import unittest
from shapely.geometry import LineString, Point
from directions.base import _parse_points
class DirectionsTest(unittest.TestCase):
def setUp(self):
self.p = [(1,2), (3,4), (5,6), (7,8)]
self.line = LineString(self.p)
def test_origin_dest(self):
result = _parse_points(s... | Add tests for the different input variations.import unittest
from shapely.geometry import LineString, Point
from directions.base import _parse_points
class DirectionsTest(unittest.TestCase):
def setUp(self):
self.p = [(1,2), (3,4), (5,6), (7,8)]
self.line = LineString(self.p)
def test_origin... | <commit_before><commit_msg>Add tests for the different input variations.<commit_after>import unittest
from shapely.geometry import LineString, Point
from directions.base import _parse_points
class DirectionsTest(unittest.TestCase):
def setUp(self):
self.p = [(1,2), (3,4), (5,6), (7,8)]
self.line ... | |
635682c9d206cd9ae6ea184f9361937b0a272b90 | wqflask/utility/monads.py | wqflask/utility/monads.py | """Monadic utilities
This module is a collection of monadic utilities for use in
GeneNetwork. It includes:
* MonadicDict - monadic version of the built-in dictionary
* MonadicDictCursor - monadic version of MySQLdb.cursors.DictCursor
that returns a MonadicDict instead of the built-in dictionary
"""
from collection... | Add monadic utilities MonadicDict and MonadicDictCursor. | Add monadic utilities MonadicDict and MonadicDictCursor.
* wqflask/utility/monads.py: New file.
| Python | agpl-3.0 | genenetwork/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2,genenetwork/genenetwork2 | Add monadic utilities MonadicDict and MonadicDictCursor.
* wqflask/utility/monads.py: New file. | """Monadic utilities
This module is a collection of monadic utilities for use in
GeneNetwork. It includes:
* MonadicDict - monadic version of the built-in dictionary
* MonadicDictCursor - monadic version of MySQLdb.cursors.DictCursor
that returns a MonadicDict instead of the built-in dictionary
"""
from collection... | <commit_before><commit_msg>Add monadic utilities MonadicDict and MonadicDictCursor.
* wqflask/utility/monads.py: New file.<commit_after> | """Monadic utilities
This module is a collection of monadic utilities for use in
GeneNetwork. It includes:
* MonadicDict - monadic version of the built-in dictionary
* MonadicDictCursor - monadic version of MySQLdb.cursors.DictCursor
that returns a MonadicDict instead of the built-in dictionary
"""
from collection... | Add monadic utilities MonadicDict and MonadicDictCursor.
* wqflask/utility/monads.py: New file."""Monadic utilities
This module is a collection of monadic utilities for use in
GeneNetwork. It includes:
* MonadicDict - monadic version of the built-in dictionary
* MonadicDictCursor - monadic version of MySQLdb.cursors... | <commit_before><commit_msg>Add monadic utilities MonadicDict and MonadicDictCursor.
* wqflask/utility/monads.py: New file.<commit_after>"""Monadic utilities
This module is a collection of monadic utilities for use in
GeneNetwork. It includes:
* MonadicDict - monadic version of the built-in dictionary
* MonadicDictCu... | |
40154d7de207df9689ac220cc8966735cb3ed5af | tests/test_asyncio.py | tests/test_asyncio.py | import asyncio
async def routine0(s,n):
print('CRT:',s,':',n)
async def routine(id, n):
print('TEST[%s] %d'%(id,n))
if not n:
return
n -= 1
await routine(id, n)
await routine0(id, n)
loop = asyncio.get_event_loop()
tasks = [
asyncio.ensure_future(routine('a',5)),
asyncio.ensure_future(routine('b'... | Test asyncio in python 3.6 | Test asyncio in python 3.6
| Python | apache-2.0 | theia-log/theia,theia-log/theia | Test asyncio in python 3.6 | import asyncio
async def routine0(s,n):
print('CRT:',s,':',n)
async def routine(id, n):
print('TEST[%s] %d'%(id,n))
if not n:
return
n -= 1
await routine(id, n)
await routine0(id, n)
loop = asyncio.get_event_loop()
tasks = [
asyncio.ensure_future(routine('a',5)),
asyncio.ensure_future(routine('b'... | <commit_before><commit_msg>Test asyncio in python 3.6<commit_after> | import asyncio
async def routine0(s,n):
print('CRT:',s,':',n)
async def routine(id, n):
print('TEST[%s] %d'%(id,n))
if not n:
return
n -= 1
await routine(id, n)
await routine0(id, n)
loop = asyncio.get_event_loop()
tasks = [
asyncio.ensure_future(routine('a',5)),
asyncio.ensure_future(routine('b'... | Test asyncio in python 3.6import asyncio
async def routine0(s,n):
print('CRT:',s,':',n)
async def routine(id, n):
print('TEST[%s] %d'%(id,n))
if not n:
return
n -= 1
await routine(id, n)
await routine0(id, n)
loop = asyncio.get_event_loop()
tasks = [
asyncio.ensure_future(routine('a',5)),
asyncio... | <commit_before><commit_msg>Test asyncio in python 3.6<commit_after>import asyncio
async def routine0(s,n):
print('CRT:',s,':',n)
async def routine(id, n):
print('TEST[%s] %d'%(id,n))
if not n:
return
n -= 1
await routine(id, n)
await routine0(id, n)
loop = asyncio.get_event_loop()
tasks = [
asyncio... | |
7963e426e2d1f58105d8712c0379114d93d32b07 | examples/plot_feature_extraction_classification.py | examples/plot_feature_extraction_classification.py | """
UMAP as a Feature Extraction Technique for Classification
---------------------------------------------------------
The following script shows how UMAP can be used as a feature extraction
technique to improve the accuracy on a classification task. It also shows
how UMAP can be integrated in standard scikit-learn p... | Add example with sklearn pipeline | Add example with sklearn pipeline
| Python | bsd-3-clause | lmcinnes/umap,lmcinnes/umap | Add example with sklearn pipeline | """
UMAP as a Feature Extraction Technique for Classification
---------------------------------------------------------
The following script shows how UMAP can be used as a feature extraction
technique to improve the accuracy on a classification task. It also shows
how UMAP can be integrated in standard scikit-learn p... | <commit_before><commit_msg>Add example with sklearn pipeline<commit_after> | """
UMAP as a Feature Extraction Technique for Classification
---------------------------------------------------------
The following script shows how UMAP can be used as a feature extraction
technique to improve the accuracy on a classification task. It also shows
how UMAP can be integrated in standard scikit-learn p... | Add example with sklearn pipeline"""
UMAP as a Feature Extraction Technique for Classification
---------------------------------------------------------
The following script shows how UMAP can be used as a feature extraction
technique to improve the accuracy on a classification task. It also shows
how UMAP can be inte... | <commit_before><commit_msg>Add example with sklearn pipeline<commit_after>"""
UMAP as a Feature Extraction Technique for Classification
---------------------------------------------------------
The following script shows how UMAP can be used as a feature extraction
technique to improve the accuracy on a classification... | |
bcaa60ce73134e80e11e7df709e7ba7dbc07d349 | tests/test_systemd.py | tests/test_systemd.py | #!/usr/bin/env python3
import unittest
from unittest import mock
from unittest.mock import MagicMock, patch
from portinus import systemd
class testSystemd(unittest.TestCase):
def setUp(self):
systemd.subprocess.check_output = MagicMock(return_value=True)
self.unit = systemd.Unit('foo')
def ... | Add tests for systemd module | Add tests for systemd module
| Python | mit | justin8/portinus,justin8/portinus | Add tests for systemd module | #!/usr/bin/env python3
import unittest
from unittest import mock
from unittest.mock import MagicMock, patch
from portinus import systemd
class testSystemd(unittest.TestCase):
def setUp(self):
systemd.subprocess.check_output = MagicMock(return_value=True)
self.unit = systemd.Unit('foo')
def ... | <commit_before><commit_msg>Add tests for systemd module<commit_after> | #!/usr/bin/env python3
import unittest
from unittest import mock
from unittest.mock import MagicMock, patch
from portinus import systemd
class testSystemd(unittest.TestCase):
def setUp(self):
systemd.subprocess.check_output = MagicMock(return_value=True)
self.unit = systemd.Unit('foo')
def ... | Add tests for systemd module#!/usr/bin/env python3
import unittest
from unittest import mock
from unittest.mock import MagicMock, patch
from portinus import systemd
class testSystemd(unittest.TestCase):
def setUp(self):
systemd.subprocess.check_output = MagicMock(return_value=True)
self.unit = sy... | <commit_before><commit_msg>Add tests for systemd module<commit_after>#!/usr/bin/env python3
import unittest
from unittest import mock
from unittest.mock import MagicMock, patch
from portinus import systemd
class testSystemd(unittest.TestCase):
def setUp(self):
systemd.subprocess.check_output = MagicMock(... | |
0c3107739671398de1a206cfbb7673c25c543e60 | driver27/migrations/0009_populate_driver_in_seats.py | driver27/migrations/0009_populate_driver_in_seats.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def populate_driver_in_seats(apps, schema_editor):
Seat = apps.get_model("driver27", "Seat")
for seat in Seat.objects.all():
driver = seat.contender.driver
seat.driver = driver
sea... | Update driver value in Seat model. | Update driver value in Seat model.
| Python | mit | SRJ9/django-driver27,SRJ9/django-driver27,SRJ9/django-driver27 | Update driver value in Seat model. | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def populate_driver_in_seats(apps, schema_editor):
Seat = apps.get_model("driver27", "Seat")
for seat in Seat.objects.all():
driver = seat.contender.driver
seat.driver = driver
sea... | <commit_before><commit_msg>Update driver value in Seat model.<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def populate_driver_in_seats(apps, schema_editor):
Seat = apps.get_model("driver27", "Seat")
for seat in Seat.objects.all():
driver = seat.contender.driver
seat.driver = driver
sea... | Update driver value in Seat model.# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def populate_driver_in_seats(apps, schema_editor):
Seat = apps.get_model("driver27", "Seat")
for seat in Seat.objects.all():
driver = seat.contender.driver
... | <commit_before><commit_msg>Update driver value in Seat model.<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
def populate_driver_in_seats(apps, schema_editor):
Seat = apps.get_model("driver27", "Seat")
for seat in Seat.objects.all():
... | |
8fe57fbbc5764d3e13c3513afcdb2c49d04b117e | src/yunohost/data_migrations/0003_php5_to_php7_pools.py | src/yunohost/data_migrations/0003_php5_to_php7_pools.py | import os
import glob
from shutil import copy2
from moulinette.utils.log import getActionLogger
from yunohost.tools import Migration
from yunohost.service import _run_service_command
logger = getActionLogger('yunohost.migration')
PHP5_POOLS = "/etc/php5/fpm/pool.d"
PHP7_POOLS = "/etc/php/7.0/fpm/pool.d"
PHP5_SOCKE... | Add a migration for php5-fpm pools to php7 | Add a migration for php5-fpm pools to php7
| Python | agpl-3.0 | YunoHost/yunohost,YunoHost/yunohost,YunoHost/yunohost,YunoHost/moulinette-yunohost,YunoHost/moulinette-yunohost,YunoHost/moulinette-yunohost,YunoHost/yunohost,YunoHost/moulinette-yunohost,YunoHost/moulinette-yunohost | Add a migration for php5-fpm pools to php7 | import os
import glob
from shutil import copy2
from moulinette.utils.log import getActionLogger
from yunohost.tools import Migration
from yunohost.service import _run_service_command
logger = getActionLogger('yunohost.migration')
PHP5_POOLS = "/etc/php5/fpm/pool.d"
PHP7_POOLS = "/etc/php/7.0/fpm/pool.d"
PHP5_SOCKE... | <commit_before><commit_msg>Add a migration for php5-fpm pools to php7<commit_after> | import os
import glob
from shutil import copy2
from moulinette.utils.log import getActionLogger
from yunohost.tools import Migration
from yunohost.service import _run_service_command
logger = getActionLogger('yunohost.migration')
PHP5_POOLS = "/etc/php5/fpm/pool.d"
PHP7_POOLS = "/etc/php/7.0/fpm/pool.d"
PHP5_SOCKE... | Add a migration for php5-fpm pools to php7import os
import glob
from shutil import copy2
from moulinette.utils.log import getActionLogger
from yunohost.tools import Migration
from yunohost.service import _run_service_command
logger = getActionLogger('yunohost.migration')
PHP5_POOLS = "/etc/php5/fpm/pool.d"
PHP7_POO... | <commit_before><commit_msg>Add a migration for php5-fpm pools to php7<commit_after>import os
import glob
from shutil import copy2
from moulinette.utils.log import getActionLogger
from yunohost.tools import Migration
from yunohost.service import _run_service_command
logger = getActionLogger('yunohost.migration')
PHP... | |
bf34c1dbb37865e62e97e3463645c7df16a4ca08 | markov_chain.py | markov_chain.py | from random import choice
class MarkovChain(object):
""" An interface for signle-word states Markov Chains """
def __init__(self, text=None):
self._states_map = {}
if text is not None:
self.add_text(text)
def add_text(self, text, separator=" "):
""" Adds text ... | Add an interface for Markov Chains | Add an interface for Markov Chains
| Python | mit | iluxonchik/lyricist | Add an interface for Markov Chains | from random import choice
class MarkovChain(object):
""" An interface for signle-word states Markov Chains """
def __init__(self, text=None):
self._states_map = {}
if text is not None:
self.add_text(text)
def add_text(self, text, separator=" "):
""" Adds text ... | <commit_before><commit_msg>Add an interface for Markov Chains<commit_after> | from random import choice
class MarkovChain(object):
""" An interface for signle-word states Markov Chains """
def __init__(self, text=None):
self._states_map = {}
if text is not None:
self.add_text(text)
def add_text(self, text, separator=" "):
""" Adds text ... | Add an interface for Markov Chainsfrom random import choice
class MarkovChain(object):
""" An interface for signle-word states Markov Chains """
def __init__(self, text=None):
self._states_map = {}
if text is not None:
self.add_text(text)
def add_text(self, text, sepa... | <commit_before><commit_msg>Add an interface for Markov Chains<commit_after>from random import choice
class MarkovChain(object):
""" An interface for signle-word states Markov Chains """
def __init__(self, text=None):
self._states_map = {}
if text is not None:
self.add_text... | |
e29de047d770de70f3745ae410b62d0ddad4b0b4 | lib/oeqa/runtime/misc/appFW.py | lib/oeqa/runtime/misc/appFW.py | from oeqa.oetest import oeRuntimeTest
class AppFwTest(oeRuntimeTest):
""" App Framework testing """
def test_sqlite_integration(self):
""" test sqlite is integrated in image """
(status,output) = self.target.run("rpm -qa | grep sqlite")
self.assertEqual(status, 0, output)
| Add one test case for IOTOS-358 | Add one test case for IOTOS-358
To check SQlite is integrated in image
Signed-off-by: Wu Dawei <b8fdb5b9f0b6b29b63287bce074c688ca08d8ead@intel.com>
| Python | mit | ostroproject/meta-iotqa,ostroproject/meta-iotqa,wanghongjuan/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,ostroproject/meta-iotqa,daweiwu/meta-iotqa-1,ostroproject/meta-iotqa,wanghongjuan/meta-iotqa-1,wanghongjuan/meta-iotqa-1,daweiwu/meta-iotqa-1,daweiwu/meta-iotqa-1,wanghongjuan/meta-iotqa-1,wanghongjuan... | Add one test case for IOTOS-358
To check SQlite is integrated in image
Signed-off-by: Wu Dawei <b8fdb5b9f0b6b29b63287bce074c688ca08d8ead@intel.com> | from oeqa.oetest import oeRuntimeTest
class AppFwTest(oeRuntimeTest):
""" App Framework testing """
def test_sqlite_integration(self):
""" test sqlite is integrated in image """
(status,output) = self.target.run("rpm -qa | grep sqlite")
self.assertEqual(status, 0, output)
| <commit_before><commit_msg>Add one test case for IOTOS-358
To check SQlite is integrated in image
Signed-off-by: Wu Dawei <b8fdb5b9f0b6b29b63287bce074c688ca08d8ead@intel.com><commit_after> | from oeqa.oetest import oeRuntimeTest
class AppFwTest(oeRuntimeTest):
""" App Framework testing """
def test_sqlite_integration(self):
""" test sqlite is integrated in image """
(status,output) = self.target.run("rpm -qa | grep sqlite")
self.assertEqual(status, 0, output)
| Add one test case for IOTOS-358
To check SQlite is integrated in image
Signed-off-by: Wu Dawei <b8fdb5b9f0b6b29b63287bce074c688ca08d8ead@intel.com>from oeqa.oetest import oeRuntimeTest
class AppFwTest(oeRuntimeTest):
""" App Framework testing """
def test_sqlite_integration(self):
""" test sqlite ... | <commit_before><commit_msg>Add one test case for IOTOS-358
To check SQlite is integrated in image
Signed-off-by: Wu Dawei <b8fdb5b9f0b6b29b63287bce074c688ca08d8ead@intel.com><commit_after>from oeqa.oetest import oeRuntimeTest
class AppFwTest(oeRuntimeTest):
""" App Framework testing """
def test_sqlite_int... | |
0782e8786272fcd6e3e1a41d31bea253865c468b | pastas/timer.py | pastas/timer.py | try:
from tqdm.auto import tqdm
except ModuleNotFoundError:
raise ModuleNotFoundError("SolveTimer requires 'tqdm' to be installed.")
class SolveTimer(tqdm):
"""Progress indicator for model optimization.
Usage
-----
Print timer and number of iterations in console while running
`ml.solve()... | Add SolveTimer - print number of iterations and elapsed time to console while running ml.solve() - see docstring for usage | Add SolveTimer
- print number of iterations and elapsed time to console while running ml.solve()
- see docstring for usage
| Python | mit | pastas/pastas | Add SolveTimer
- print number of iterations and elapsed time to console while running ml.solve()
- see docstring for usage | try:
from tqdm.auto import tqdm
except ModuleNotFoundError:
raise ModuleNotFoundError("SolveTimer requires 'tqdm' to be installed.")
class SolveTimer(tqdm):
"""Progress indicator for model optimization.
Usage
-----
Print timer and number of iterations in console while running
`ml.solve()... | <commit_before><commit_msg>Add SolveTimer
- print number of iterations and elapsed time to console while running ml.solve()
- see docstring for usage<commit_after> | try:
from tqdm.auto import tqdm
except ModuleNotFoundError:
raise ModuleNotFoundError("SolveTimer requires 'tqdm' to be installed.")
class SolveTimer(tqdm):
"""Progress indicator for model optimization.
Usage
-----
Print timer and number of iterations in console while running
`ml.solve()... | Add SolveTimer
- print number of iterations and elapsed time to console while running ml.solve()
- see docstring for usagetry:
from tqdm.auto import tqdm
except ModuleNotFoundError:
raise ModuleNotFoundError("SolveTimer requires 'tqdm' to be installed.")
class SolveTimer(tqdm):
"""Progress indicator for m... | <commit_before><commit_msg>Add SolveTimer
- print number of iterations and elapsed time to console while running ml.solve()
- see docstring for usage<commit_after>try:
from tqdm.auto import tqdm
except ModuleNotFoundError:
raise ModuleNotFoundError("SolveTimer requires 'tqdm' to be installed.")
class SolveTim... | |
6ece957e5317a9f54499714f9a7cb9bca221d4e5 | bin/debug/intake_single_user.py | bin/debug/intake_single_user.py | import json
import logging
import argparse
import numpy as np
import uuid
import emission.pipeline.intake_stage as epi
import emission.core.wrapper.user as ecwu
if __name__ == '__main__':
np.random.seed(61297777)
parser = argparse.ArgumentParser(prog="intake_single_user")
group = parser.add_mutually_excl... | Add a simple script that runs the pipeline for the single specified user | Add a simple script that runs the pipeline for the single specified user
User can be specified by either email or UUID.
Calls the pipeline functions.
| Python | bsd-3-clause | sunil07t/e-mission-server,sunil07t/e-mission-server,shankari/e-mission-server,shankari/e-mission-server,sunil07t/e-mission-server,sunil07t/e-mission-server,e-mission/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server,shankari/e-mission-server,e-mission/e-mission-server | Add a simple script that runs the pipeline for the single specified user
User can be specified by either email or UUID.
Calls the pipeline functions. | import json
import logging
import argparse
import numpy as np
import uuid
import emission.pipeline.intake_stage as epi
import emission.core.wrapper.user as ecwu
if __name__ == '__main__':
np.random.seed(61297777)
parser = argparse.ArgumentParser(prog="intake_single_user")
group = parser.add_mutually_excl... | <commit_before><commit_msg>Add a simple script that runs the pipeline for the single specified user
User can be specified by either email or UUID.
Calls the pipeline functions.<commit_after> | import json
import logging
import argparse
import numpy as np
import uuid
import emission.pipeline.intake_stage as epi
import emission.core.wrapper.user as ecwu
if __name__ == '__main__':
np.random.seed(61297777)
parser = argparse.ArgumentParser(prog="intake_single_user")
group = parser.add_mutually_excl... | Add a simple script that runs the pipeline for the single specified user
User can be specified by either email or UUID.
Calls the pipeline functions.import json
import logging
import argparse
import numpy as np
import uuid
import emission.pipeline.intake_stage as epi
import emission.core.wrapper.user as ecwu
if __na... | <commit_before><commit_msg>Add a simple script that runs the pipeline for the single specified user
User can be specified by either email or UUID.
Calls the pipeline functions.<commit_after>import json
import logging
import argparse
import numpy as np
import uuid
import emission.pipeline.intake_stage as epi
import em... | |
4c5f750801cef0424fd93432b688fb74b079f4c5 | temba/msgs/migrations/0037_backfill_recipient_counts.py | temba/msgs/migrations/0037_backfill_recipient_counts.py | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('msgs', '0036_auto_20151103_1014'),
]
def backfill_recipient_counts(apps, schema):
Broadcast = apps.get_model('msgs', 'Broadc... | Add migration to backfill recipient counts | Add migration to backfill recipient counts
| Python | agpl-3.0 | tsotetsi/textily-web,reyrodrigues/EU-SMS,pulilab/rapidpro,reyrodrigues/EU-SMS,pulilab/rapidpro,pulilab/rapidpro,pulilab/rapidpro,tsotetsi/textily-web,reyrodrigues/EU-SMS,tsotetsi/textily-web,ewheeler/rapidpro,ewheeler/rapidpro,tsotetsi/textily-web,tsotetsi/textily-web,ewheeler/rapidpro,pulilab/rapidpro,ewheeler/rapidpr... | Add migration to backfill recipient counts | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('msgs', '0036_auto_20151103_1014'),
]
def backfill_recipient_counts(apps, schema):
Broadcast = apps.get_model('msgs', 'Broadc... | <commit_before><commit_msg>Add migration to backfill recipient counts<commit_after> | # -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('msgs', '0036_auto_20151103_1014'),
]
def backfill_recipient_counts(apps, schema):
Broadcast = apps.get_model('msgs', 'Broadc... | Add migration to backfill recipient counts# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('msgs', '0036_auto_20151103_1014'),
]
def backfill_recipient_counts(apps, schema):
... | <commit_before><commit_msg>Add migration to backfill recipient counts<commit_after># -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('msgs', '0036_auto_20151103_1014'),
]
def backfill... | |
b44f13bfa1ac8b3c1bd24e528fc7874a06df0121 | dev_tools/src/d1_dev/update-requirements-txt.py | dev_tools/src/d1_dev/update-requirements-txt.py | #!/usr/bin/env python
import shutil
import d1_dev.util
import os
import pip._internal.utils.misc
import re
REQUIREMENTS_FILENAME = 'requirements.txt'
# Modules in my dev environment that are not required by the stack
MODULE_FILTER_REGEX_LIST = {
'beautifulsoup',
'black',
'bs4',
'dataone.*',
'e... | Add script that creates a filtered list of required packages | Add script that creates a filtered list of required packages
| Python | apache-2.0 | DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python,DataONEorg/d1_python | Add script that creates a filtered list of required packages | #!/usr/bin/env python
import shutil
import d1_dev.util
import os
import pip._internal.utils.misc
import re
REQUIREMENTS_FILENAME = 'requirements.txt'
# Modules in my dev environment that are not required by the stack
MODULE_FILTER_REGEX_LIST = {
'beautifulsoup',
'black',
'bs4',
'dataone.*',
'e... | <commit_before><commit_msg>Add script that creates a filtered list of required packages<commit_after> | #!/usr/bin/env python
import shutil
import d1_dev.util
import os
import pip._internal.utils.misc
import re
REQUIREMENTS_FILENAME = 'requirements.txt'
# Modules in my dev environment that are not required by the stack
MODULE_FILTER_REGEX_LIST = {
'beautifulsoup',
'black',
'bs4',
'dataone.*',
'e... | Add script that creates a filtered list of required packages#!/usr/bin/env python
import shutil
import d1_dev.util
import os
import pip._internal.utils.misc
import re
REQUIREMENTS_FILENAME = 'requirements.txt'
# Modules in my dev environment that are not required by the stack
MODULE_FILTER_REGEX_LIST = {
'bea... | <commit_before><commit_msg>Add script that creates a filtered list of required packages<commit_after>#!/usr/bin/env python
import shutil
import d1_dev.util
import os
import pip._internal.utils.misc
import re
REQUIREMENTS_FILENAME = 'requirements.txt'
# Modules in my dev environment that are not required by the sta... | |
6f2529d1891b5c256394b9c8aa991b25a029b5f1 | migrations/004_load_seed_file.py | migrations/004_load_seed_file.py | """
Load initial user and bucket data from seed files.
"""
import logging
import os
import subprocess
import sys
log = logging.getLogger(__name__)
def up(db):
names = db.collection_names()
if "users" in names:
log.info("users collection already created")
return
if "buckets" in names:
... | Add a migration to load users and buckets | Add a migration to load users and buckets
| Python | mit | alphagov/backdrop,alphagov/backdrop,alphagov/backdrop | Add a migration to load users and buckets | """
Load initial user and bucket data from seed files.
"""
import logging
import os
import subprocess
import sys
log = logging.getLogger(__name__)
def up(db):
names = db.collection_names()
if "users" in names:
log.info("users collection already created")
return
if "buckets" in names:
... | <commit_before><commit_msg>Add a migration to load users and buckets<commit_after> | """
Load initial user and bucket data from seed files.
"""
import logging
import os
import subprocess
import sys
log = logging.getLogger(__name__)
def up(db):
names = db.collection_names()
if "users" in names:
log.info("users collection already created")
return
if "buckets" in names:
... | Add a migration to load users and buckets"""
Load initial user and bucket data from seed files.
"""
import logging
import os
import subprocess
import sys
log = logging.getLogger(__name__)
def up(db):
names = db.collection_names()
if "users" in names:
log.info("users collection already created")
... | <commit_before><commit_msg>Add a migration to load users and buckets<commit_after>"""
Load initial user and bucket data from seed files.
"""
import logging
import os
import subprocess
import sys
log = logging.getLogger(__name__)
def up(db):
names = db.collection_names()
if "users" in names:
log.info... | |
99282d42a3948b9ed45b02df657c344667ec0cf2 | src/ggrc/migrations/versions/20150521125008_324d461206_migrate_directive_sections_to_.py | src/ggrc/migrations/versions/20150521125008_324d461206_migrate_directive_sections_to_.py | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate directive_sections to relationships
Revision ID: 324d461206
Revises:... | Add a migration for directive_sections -> relationships | Add a migration for directive_sections -> relationships
| Python | apache-2.0 | AleksNeStu/ggrc-core,jmakov/ggrc-core,hyperNURb/ggrc-core,josthkko/ggrc-core,hasanalom/ggrc-core,jmakov/ggrc-core,hasanalom/ggrc-core,edofic/ggrc-core,kr41/ggrc-core,kr41/ggrc-core,plamut/ggrc-core,j0gurt/ggrc-core,plamut/ggrc-core,prasannav7/ggrc-core,hyperNURb/ggrc-core,NejcZupec/ggrc-core,VinnieJohns/ggrc-core,selah... | Add a migration for directive_sections -> relationships | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate directive_sections to relationships
Revision ID: 324d461206
Revises:... | <commit_before><commit_msg>Add a migration for directive_sections -> relationships<commit_after> | # Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate directive_sections to relationships
Revision ID: 324d461206
Revises:... | Add a migration for directive_sections -> relationships# Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@reciprocitylabs.com
"""Migrate directive_sect... | <commit_before><commit_msg>Add a migration for directive_sections -> relationships<commit_after># Copyright (C) 2015 Google Inc., authors, and contributors <see AUTHORS file>
# Licensed under http://www.apache.org/licenses/LICENSE-2.0 <see LICENSE file>
# Created By: anze@reciprocitylabs.com
# Maintained By: anze@recip... | |
5b9d9f531e3544f6d3dfe0a2e48dcaaebf132921 | test/services/appmanager/test_http.py | test/services/appmanager/test_http.py | import time
import requests
from weavelib.messaging import Receiver
from weavelib.rpc import RPCServer, ServerAPI
from weavelib.services import BaseService
from weaveserver.core.services import ServiceManager
from weaveserver.services.appmanager import ApplicationService
AUTH = {
"auth1": {
"type": "SYS... | Test case for RPC HTTP handler. | Test case for RPC HTTP handler.
| Python | mit | supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer,supersaiyanmode/HomePiServer | Test case for RPC HTTP handler. | import time
import requests
from weavelib.messaging import Receiver
from weavelib.rpc import RPCServer, ServerAPI
from weavelib.services import BaseService
from weaveserver.core.services import ServiceManager
from weaveserver.services.appmanager import ApplicationService
AUTH = {
"auth1": {
"type": "SYS... | <commit_before><commit_msg>Test case for RPC HTTP handler.<commit_after> | import time
import requests
from weavelib.messaging import Receiver
from weavelib.rpc import RPCServer, ServerAPI
from weavelib.services import BaseService
from weaveserver.core.services import ServiceManager
from weaveserver.services.appmanager import ApplicationService
AUTH = {
"auth1": {
"type": "SYS... | Test case for RPC HTTP handler.import time
import requests
from weavelib.messaging import Receiver
from weavelib.rpc import RPCServer, ServerAPI
from weavelib.services import BaseService
from weaveserver.core.services import ServiceManager
from weaveserver.services.appmanager import ApplicationService
AUTH = {
... | <commit_before><commit_msg>Test case for RPC HTTP handler.<commit_after>import time
import requests
from weavelib.messaging import Receiver
from weavelib.rpc import RPCServer, ServerAPI
from weavelib.services import BaseService
from weaveserver.core.services import ServiceManager
from weaveserver.services.appmanager ... | |
8ba5b29200520d853791943341d41798ff80a248 | src/repository/migrations/0003_auto_20170524_1503.py | src/repository/migrations/0003_auto_20170524_1503.py | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-24 15:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0002_auto_20170522_2021'),
]
operations = [
migrations.AlterModelOpti... | Change meta option for Github | Change meta option for Github
| Python | bsd-3-clause | lozadaOmr/ansible-admin,lozadaOmr/ansible-admin,lozadaOmr/ansible-admin | Change meta option for Github | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-24 15:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0002_auto_20170522_2021'),
]
operations = [
migrations.AlterModelOpti... | <commit_before><commit_msg>Change meta option for Github<commit_after> | # -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-24 15:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0002_auto_20170522_2021'),
]
operations = [
migrations.AlterModelOpti... | Change meta option for Github# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-24 15:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0002_auto_20170522_2021'),
]
operations = [
... | <commit_before><commit_msg>Change meta option for Github<commit_after># -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2017-05-24 15:03
from __future__ import unicode_literals
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('repository', '0002_auto_201705... | |
21a0948eb1d25e9126e2940cbc7d0496181d6a93 | setup.py | setup.py | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | Add Django version trove classifiers. | Add Django version trove classifiers.
| Python | bsd-3-clause | grzes/djangae,asendecka/djangae,grzes/djangae,kirberich/djangae,asendecka/djangae,kirberich/djangae,armirusco/djangae,grzes/djangae,armirusco/djangae,potatolondon/djangae,chargrizzle/djangae,potatolondon/djangae,armirusco/djangae,kirberich/djangae,asendecka/djangae,chargrizzle/djangae,chargrizzle/djangae | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | <commit_before>import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Pota... | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Potato London Ltd.'... | <commit_before>import os
from setuptools import setup, find_packages
NAME = 'djangae'
PACKAGES = find_packages()
DESCRIPTION = 'Django integration with Google App Engine'
URL = "https://github.com/potatolondon/djangae"
LONG_DESCRIPTION = open(os.path.join(os.path.dirname(__file__), 'README.md')).read()
AUTHOR = 'Pota... |
c45ccd0f258fcbb152ffa9597ceb1bacd472f73b | web/impact/impact/tests/test_impact_email_backend.py | web/impact/impact/tests/test_impact_email_backend.py | from mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.impact_email_backend.ImpactEmailBackend._add_logging_headers")
@patch("django.core... | Add test for email backend coverage | [AC-7570] Add test for email backend coverage
| Python | mit | masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api,masschallenge/impact-api | [AC-7570] Add test for email backend coverage | from mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.impact_email_backend.ImpactEmailBackend._add_logging_headers")
@patch("django.core... | <commit_before><commit_msg>[AC-7570] Add test for email backend coverage<commit_after> | from mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.impact_email_backend.ImpactEmailBackend._add_logging_headers")
@patch("django.core... | [AC-7570] Add test for email backend coveragefrom mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.impact_email_backend.ImpactEmailBackend._... | <commit_before><commit_msg>[AC-7570] Add test for email backend coverage<commit_after>from mock import patch
from django.core import mail
from django.test import TestCase
from django.urls import reverse
from impact.minimal_email_handler import MinimalEmailHandler
class TestEmailBackend(TestCase):
@patch("impact.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.