Exemple #1
0
<b>place_id</b> from the JSON.
A place ID is a textual identifier that uniquely identifies a place as
within Google Maps.
</p>
<p>
<b>API End Points</b>
</p>
<p>
To complete this assignment, you should use this API endpoint that has a static subset
of the Google Data:
<pre>
<a href="<?php 
echo deHttps($api_url);
?>
" target="_blank"><?php 
echo deHttps($api_url);
?>
</a>
</pre>
This API uses the same parameters (sensor and address) as the Google API.  
This API also has no rate limit so you can test as often as you like.
If you visit the URL with no parameters, you get a list of all of the 
address values which can be used with this API.
</p>
<p>
To call the API, you need to provide a <b>sensor=false</b> parameter and
the address that you are requesting as the <b>address=</b> parameter that is 
properly URL encoded using the <b>urllib.urlencode()</b> fuction as shown in 
<a href="http://www.pythonlearn.com/code/geojson.py" 
target="_blank">http://www.pythonlearn.com/code/geojson.py</a>
</p>
Exemple #2
0
" target="_blank"><?php 
echo deHttps($sample_url);
?>
</a> 
(There are <?php 
echo $sample_count;
?>
 values with a sum=<?php 
echo $sample_sum;
?>
) </li>
<li> Actual data: <a href="<?php 
echo deHttps($actual_url);
?>
" target="_blank"><?php 
echo deHttps($actual_url);
?>
</a> 
(There are <?php 
echo $actual_count;
?>
 values and the sum ends with <?php 
echo $actual_sum % 1000;
?>
)<br/> </li>
</ul>
These links open in a new window.
Make sure to save the file into the same folder as you will be writing your Python program.
<b>Note:</b> Each student will have a distinct data file for the assignment - so only use your
own data file for analysis.
</p>
Exemple #3
0
after a while to make sure that you retrieve and process the data
in a Python program rather than simply counting down pressing links, and 
and doing the assignment without writing a Python program :).
The names are in the same order in the HTML even though they 
shift around on the screen visually.
Your Python program can look at the page as long as it likes.
</h2>
</center>
</div>
<ul>
<?php 
                        // $curr_url = getCurrentFileUrl(__FILE__);
                        $curr_url = curPageUrl();
                        $new = getShuffledNames($code);
                        for ($i = 0; $i < count($new) && $i < 100; $i++) {
                            $new_url = deHttps(str_replace("index.php", "known_by_" . $new[$i] . ".html", $curr_url));
                            echo '<li style="margin-top: ' . rand(1, $i + 25) . 'px;"><a href="' . $new_url . '">' . $new[$i] . "</a></li>\n";
                        }
                        ?>
</ul>
<script>
// http://stackoverflow.com/questions/20423322/simple-setting-off-display-none-block-with-javascript
function showHide(id) {
    var el = document.getElementById(id);
    if( el && el.style.display == 'none')    
        el.style.display = 'block';
    else 
        el.style.display = 'none';
}
setTimeout('showHide("overlay");', 2500);