This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
student = {"name": "John", "age": 25, "courses": ["This", "That", "The Other", "And Another"]} | |
# Give me the list of all courses available in this Dictionary. | |
for key, value in student.items(): | |
if key == "courses": | |
for course in value: | |
print (course) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 as aws | |
import logging | |
import time | |
import os | |
import paramiko | |
from botocore.exceptions import ClientError | |
def main(): | |
ec2 = aws.client('ec2') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for reservation in response_2["Reservations"]: | |
for instance in reservation["Instances"]: | |
# This sample print will output entire Dictionary object | |
print(instance) | |
# This will print will output the value of the Dictionary key 'InstanceId' | |
print(instance["InstanceId"]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require './simple_html_dom.php'; | |
/* Bleu Libellue */ | |
$html = file_get_html('https://www.bleulibellule.com/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//namespace simplehtmldom_1_5; | |
/** | |
* Website: http://sourceforge.net/projects/simplehtmldom/ | |
* Acknowledge: Jose Solorzano (https://sourceforge.net/projects/php-html/) | |
* Contributions by: | |
* Yousuke Kumakura (Attribute filters) | |
* Vadim Voituk (Negative indexes supports of "find" method) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env php | |
<?php | |
require './simple_html_dom.php'; | |
$html = file_get_html('https://www.bleulibellule.com/'); | |
/* Links */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setTimeout(function() { | |
$("html, body").animate({ | |
scrollTop: 848 | |
}, 1000) | |
}, 4000) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"objects": [ | |
{ | |
"kpis": [ | |
{ | |
"2016": { | |
"plants": [ | |
{ | |
"warren": { | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@ip-10-0-238-38:/home/ubuntu# x84 | |
Traceback (most recent call last): | |
File "/usr/local/bin/x84", line 5, in <module> | |
from pkg_resources import load_entry_point | |
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 2749, in <module> | |
working_set = WorkingSet._build_master() | |
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 444, in _build_master | |
ws.require(__requires__) | |
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 725, in require | |
needed = self.resolve(parse_requirements(requirements)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if ($self->req->upload('photos')) { | |
push @photos, | |
process_photo($self->req->upload('photos'), $new_content->id); | |
$MODEL->resultset('Content')->search({id => $new_content->id}) | |
->update({photos => "@photos"}) | |
if scalar @photos >= 1; | |
} |
NewerOlder