d3js: Dynamic Scatter plot based on Select input using JSON.
Need to figure out how to dynamically change axis labels from percent to number based on select input.
def yes_or_no(question): | |
reply = str(raw_input(question+' (y/n): ')).lower().strip() | |
if reply[0] == 'y': | |
return True | |
if reply[0] == 'n': | |
return False | |
else: | |
return yes_or_no("Uhhhh... please enter ") |
d3js: Dynamic Scatter plot based on Select input using JSON.
Need to figure out how to dynamically change axis labels from percent to number based on select input.
# This is a really old post, in the comments (and stackoverflow too) you'll find better solutions. | |
def find(key, dictionary): | |
for k, v in dictionary.iteritems(): | |
if k == key: | |
yield v | |
elif isinstance(v, dict): | |
for result in find(key, v): | |
yield result | |
elif isinstance(v, list): |
Got nested columns in your grid-based Jekyll site?
Wondered why you didn't have a way to calculate the modulo inside your posts loop to open and close your 'rows' containing those nested columns?
Add this filter to your _plugins
directory, and use it like so:
{{ x | mod:y }}