PyYaml - overwrite yaml file and save it
Visiting the UK as unmarried couple
Flux received by a negative charge
why `nmap 192.168.1.97` returns less services than `nmap 127.0.0.1`?
Could the E-bike drivetrain wear down till needing replacement after 400 km?
Create all possible words using a set or letters
Can I use my Chinese passport to enter China after I acquired another citizenship?
When quoting, must I also copy hyphens used to divide words that continue on the next line?
Drawing a topological "handle" with Tikz
What (else) happened July 1st 1858 in London?
Should I stop contributing to retirement accounts?
Extending the spectral theorem for bounded self adjoint operators to bounded normal operators
Engineer refusing to file/disclose patents
Do the concepts of IP address and network interface not belong to the same layer?
A social experiment. What is the worst that can happen?
How does the reference system of the Majjhima Nikaya work?
Customize circled numbers
Global amount of publications over time
Can someone explain how this makes sense electrically?
Why we can't differentiate a polynomial equation as many times as we wish?
How do I repair my stair bannister?
Can we have a perfect cadence in a minor key?
Folder comparison
What is the grammatical term for “‑ed” words like these?
We have a love-hate relationship
PyYaml - overwrite yaml file and save it
$begingroup$
what I am trying is to load a yaml file and update its values by argparse and save the resulted yaml in another path.
the output of yaml.save_load is:
import os
import argparse
import yaml
import functools
parser = argparse.ArgumentParser()
parser.add_argument(
"--config",
nargs="?",
type=str,
default="p.yml",
help="Configuration file to use",
)
parser.add_argument('--learning_rate', type=float, help='learning rate amount')
args = parser.parse_args()
def dumps(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
ret = func(self, *args, **kwargs)
with open(self.filename, "w") as f:
yaml.safe_dump(self, f)
return ret
return wrapper
class Config(dict):
def __init__(self, filename):
self.filename = filename
if os.path.isfile(filename):
print(filename)
with open(filename) as f:
# use super here to avoid unnecessary write
super(Config, self).update(yaml.safe_load(f) or )
__setitem__ = dumps(dict.__setitem__)
__delitem__ = dumps(dict.__delitem__)
update = dumps(dict.update)
cfg = Config(args.config)
print(cfg)
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
print(cfg)
the original yaml file has the following configurations:
> data:
dataset: pascal
train_split: train
val_split: val
img_rows: 'same'
img_cols: 'same'
path: SkyScapes/
sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/
training:
train_iters: 300000
batch_size: 1
val_interval: 1000
n_workers: 16
print_interval: 50
optimizer:
name: 'sgd'
lr: 1.0e-10
weight_decay: 0.0005
momentum: 0.99
loss:
name: 'cross_entropy'
size_average: False
lr_schedule:
resume: fcn8s_pascal_best_model.pkl
and I am going to update lr parameter. However, I am facing with the following error:
> 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'resume': 'fcn8s_pascal_best_model.pkl', 'train_iters': 300000, 'lr_schedule': None, 'optimizer': 'name': 'sgd', 'weight_decay': 0.0005, 'lr': 1e-10, 'momentum': 0.99, 'print_interval': 50, 'n_workers': 16, 'batch_size': 1, 'loss': 'name': 'cross_entropy', 'size_average': False, 'val_interval': 1000
Traceback (most recent call last):
File "test.py", line 70, in <module>
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
File "test.py", line 48, in wrapper
yaml.safe_dump(self, f)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 306, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 278, in dump_all
dumper.represent(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 58, in represent_data
node = self.yaml_representers[None](self, data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 231, in represent_undefined
raise RepresenterError("cannot represent an object", data)
yaml.representer.RepresenterError: ('cannot represent an object', 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'optimizer': 'lr': 2.0)
python yaml
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
what I am trying is to load a yaml file and update its values by argparse and save the resulted yaml in another path.
the output of yaml.save_load is:
import os
import argparse
import yaml
import functools
parser = argparse.ArgumentParser()
parser.add_argument(
"--config",
nargs="?",
type=str,
default="p.yml",
help="Configuration file to use",
)
parser.add_argument('--learning_rate', type=float, help='learning rate amount')
args = parser.parse_args()
def dumps(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
ret = func(self, *args, **kwargs)
with open(self.filename, "w") as f:
yaml.safe_dump(self, f)
return ret
return wrapper
class Config(dict):
def __init__(self, filename):
self.filename = filename
if os.path.isfile(filename):
print(filename)
with open(filename) as f:
# use super here to avoid unnecessary write
super(Config, self).update(yaml.safe_load(f) or )
__setitem__ = dumps(dict.__setitem__)
__delitem__ = dumps(dict.__delitem__)
update = dumps(dict.update)
cfg = Config(args.config)
print(cfg)
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
print(cfg)
the original yaml file has the following configurations:
> data:
dataset: pascal
train_split: train
val_split: val
img_rows: 'same'
img_cols: 'same'
path: SkyScapes/
sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/
training:
train_iters: 300000
batch_size: 1
val_interval: 1000
n_workers: 16
print_interval: 50
optimizer:
name: 'sgd'
lr: 1.0e-10
weight_decay: 0.0005
momentum: 0.99
loss:
name: 'cross_entropy'
size_average: False
lr_schedule:
resume: fcn8s_pascal_best_model.pkl
and I am going to update lr parameter. However, I am facing with the following error:
> 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'resume': 'fcn8s_pascal_best_model.pkl', 'train_iters': 300000, 'lr_schedule': None, 'optimizer': 'name': 'sgd', 'weight_decay': 0.0005, 'lr': 1e-10, 'momentum': 0.99, 'print_interval': 50, 'n_workers': 16, 'batch_size': 1, 'loss': 'name': 'cross_entropy', 'size_average': False, 'val_interval': 1000
Traceback (most recent call last):
File "test.py", line 70, in <module>
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
File "test.py", line 48, in wrapper
yaml.safe_dump(self, f)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 306, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 278, in dump_all
dumper.represent(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 58, in represent_data
node = self.yaml_representers[None](self, data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 231, in represent_undefined
raise RepresenterError("cannot represent an object", data)
yaml.representer.RepresenterError: ('cannot represent an object', 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'optimizer': 'lr': 2.0)
python yaml
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
add a comment |
$begingroup$
what I am trying is to load a yaml file and update its values by argparse and save the resulted yaml in another path.
the output of yaml.save_load is:
import os
import argparse
import yaml
import functools
parser = argparse.ArgumentParser()
parser.add_argument(
"--config",
nargs="?",
type=str,
default="p.yml",
help="Configuration file to use",
)
parser.add_argument('--learning_rate', type=float, help='learning rate amount')
args = parser.parse_args()
def dumps(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
ret = func(self, *args, **kwargs)
with open(self.filename, "w") as f:
yaml.safe_dump(self, f)
return ret
return wrapper
class Config(dict):
def __init__(self, filename):
self.filename = filename
if os.path.isfile(filename):
print(filename)
with open(filename) as f:
# use super here to avoid unnecessary write
super(Config, self).update(yaml.safe_load(f) or )
__setitem__ = dumps(dict.__setitem__)
__delitem__ = dumps(dict.__delitem__)
update = dumps(dict.update)
cfg = Config(args.config)
print(cfg)
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
print(cfg)
the original yaml file has the following configurations:
> data:
dataset: pascal
train_split: train
val_split: val
img_rows: 'same'
img_cols: 'same'
path: SkyScapes/
sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/
training:
train_iters: 300000
batch_size: 1
val_interval: 1000
n_workers: 16
print_interval: 50
optimizer:
name: 'sgd'
lr: 1.0e-10
weight_decay: 0.0005
momentum: 0.99
loss:
name: 'cross_entropy'
size_average: False
lr_schedule:
resume: fcn8s_pascal_best_model.pkl
and I am going to update lr parameter. However, I am facing with the following error:
> 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'resume': 'fcn8s_pascal_best_model.pkl', 'train_iters': 300000, 'lr_schedule': None, 'optimizer': 'name': 'sgd', 'weight_decay': 0.0005, 'lr': 1e-10, 'momentum': 0.99, 'print_interval': 50, 'n_workers': 16, 'batch_size': 1, 'loss': 'name': 'cross_entropy', 'size_average': False, 'val_interval': 1000
Traceback (most recent call last):
File "test.py", line 70, in <module>
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
File "test.py", line 48, in wrapper
yaml.safe_dump(self, f)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 306, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 278, in dump_all
dumper.represent(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 58, in represent_data
node = self.yaml_representers[None](self, data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 231, in represent_undefined
raise RepresenterError("cannot represent an object", data)
yaml.representer.RepresenterError: ('cannot represent an object', 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'optimizer': 'lr': 2.0)
python yaml
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
$endgroup$
what I am trying is to load a yaml file and update its values by argparse and save the resulted yaml in another path.
the output of yaml.save_load is:
import os
import argparse
import yaml
import functools
parser = argparse.ArgumentParser()
parser.add_argument(
"--config",
nargs="?",
type=str,
default="p.yml",
help="Configuration file to use",
)
parser.add_argument('--learning_rate', type=float, help='learning rate amount')
args = parser.parse_args()
def dumps(func):
@functools.wraps(func)
def wrapper(self, *args, **kwargs):
ret = func(self, *args, **kwargs)
with open(self.filename, "w") as f:
yaml.safe_dump(self, f)
return ret
return wrapper
class Config(dict):
def __init__(self, filename):
self.filename = filename
if os.path.isfile(filename):
print(filename)
with open(filename) as f:
# use super here to avoid unnecessary write
super(Config, self).update(yaml.safe_load(f) or )
__setitem__ = dumps(dict.__setitem__)
__delitem__ = dumps(dict.__delitem__)
update = dumps(dict.update)
cfg = Config(args.config)
print(cfg)
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
print(cfg)
the original yaml file has the following configurations:
> data:
dataset: pascal
train_split: train
val_split: val
img_rows: 'same'
img_cols: 'same'
path: SkyScapes/
sbd_path: /private/home/meetshah/datasets/VOC/benchmark_RELEASE/
training:
train_iters: 300000
batch_size: 1
val_interval: 1000
n_workers: 16
print_interval: 50
optimizer:
name: 'sgd'
lr: 1.0e-10
weight_decay: 0.0005
momentum: 0.99
loss:
name: 'cross_entropy'
size_average: False
lr_schedule:
resume: fcn8s_pascal_best_model.pkl
and I am going to update lr parameter. However, I am facing with the following error:
> 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'resume': 'fcn8s_pascal_best_model.pkl', 'train_iters': 300000, 'lr_schedule': None, 'optimizer': 'name': 'sgd', 'weight_decay': 0.0005, 'lr': 1e-10, 'momentum': 0.99, 'print_interval': 50, 'n_workers': 16, 'batch_size': 1, 'loss': 'name': 'cross_entropy', 'size_average': False, 'val_interval': 1000
Traceback (most recent call last):
File "test.py", line 70, in <module>
cfg.update('training': 'optimizer': 'lr': args.learning_rate)
File "test.py", line 48, in wrapper
yaml.safe_dump(self, f)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 306, in safe_dump
return dump_all([data], stream, Dumper=SafeDumper, **kwds)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/__init__.py", line 278, in dump_all
dumper.represent(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 27, in represent
node = self.represent_data(data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 58, in represent_data
node = self.yaml_representers[None](self, data)
File "/home/majid/.virtualenvs/pytorch-py3/lib/python3.5/site-packages/yaml/representer.py", line 231, in represent_undefined
raise RepresenterError("cannot represent an object", data)
yaml.representer.RepresenterError: ('cannot represent an object', 'data': 'dataset': 'pascal', 'img_cols': 'same', 'img_rows': 'same', 'sbd_path': '/private/home/meetshah/datasets/VOC/benchmark_RELEASE/', 'train_split': 'train', 'val_split': 'val', 'path': 'SkyScapes/', 'training': 'optimizer': 'lr': 2.0)
python yaml
python yaml
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 mins ago
Majid AzimiMajid Azimi
1011
1011
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
Majid Azimi is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function ()
return StackExchange.using("mathjaxEditing", function ()
StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["\$", "\$"]]);
);
);
, "mathjax-editing");
StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "196"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Majid Azimi is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216129%2fpyyaml-overwrite-yaml-file-and-save-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Majid Azimi is a new contributor. Be nice, and check out our Code of Conduct.
Majid Azimi is a new contributor. Be nice, and check out our Code of Conduct.
Majid Azimi is a new contributor. Be nice, and check out our Code of Conduct.
Majid Azimi is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Code Review Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
Use MathJax to format equations. MathJax reference.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodereview.stackexchange.com%2fquestions%2f216129%2fpyyaml-overwrite-yaml-file-and-save-it%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown