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 | |
ini_set("memory_limit","500M"); //less should be enough, but I came to this number checking | |
$options = array('http'=>array('header'=>"Accept-Encoding: gzip\r\n")); | |
$context = stream_context_create($options); | |
$results = file_get_contents('compress.zlib://https://api.mercadolibre.com/sites/MLA/categories/all', 0, $context); | |
$results = json_decode($results); | |
//print_r($results); |
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
<reportDefinition> | |
<selector> | |
<fields>CampaignId</fields> | |
<fields>CampaignName</fields> | |
<fields>Criteria</fields> | |
<fields>CriteriaType</fields> | |
<fields>ExternalCustomerId</fields> | |
<fields>Id</fields> | |
<fields>IsNegative</fields> | |
<fields>Status</fields> |
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 groovyx.gpars.GParsPool | |
def set = (1..10) | |
def cnt = 0 | |
def r = new java.util.Random() | |
def baseThreads = Thread.activeCount() | |
GParsPool.withPool(3) { | |
println "Only 3 \"Starting thread\" call should exists until one \"Closing\"" | |
set.eachParallel{ aa -> | |
synchronized(this.class) { |
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
id | name | age | |
---|---|---|---|
0 | aaron | 34 | |
1 | tina | 36 | |
2 | noah | © |
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
0 | aaron | 34 | |
---|---|---|---|
1 | tina | 36 | |
2 | noah | © |
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
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
import time | |
import pickle | |
# Setup the browser. Could be headless, just testing. | |
options = webdriver.ChromeOptions() | |
options.add_argument('--ignore-certificate-errors') | |
options.add_argument("--test-type") | |
options.binary_location = "/usr/bin/chromium" |
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 // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |
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 // do not copy this line | |
/** | |
* add_new_topic_hooks will add a new webhook topic hook. | |
* @param array $topic_hooks Esxisting topic hooks. | |
*/ | |
function add_new_topic_hooks( $topic_hooks ) { | |
// Array that has the topic as resource.event with arrays of actions that call that topic. |