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
class A | |
{ | |
public: | |
A(); | |
~A(); | |
virtual void Afoo(); | |
} | |
class A1 : public A | |
{ |
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
lua_source = """ | |
function main(splash) | |
local host = "proxy.crawlera.com" | |
local port = 8010 | |
local user = "<API_KEY>" | |
local password = '' | |
local session_header = "X-Crawlera-Session" | |
local session_id = "create" | |
splash:on_request(function (request) |
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
BOT_NAME = 'BusinessContacts' | |
SPIDER_MODULES = ['BusinessContacts.spiders'] | |
NEWSPIDER_MODULE = 'BusinessContacts.spiders' | |
# Crawl responsibly by identifying yourself (and your website) on the user-agent | |
#USER_AGENT = 'BusinessContacts (+http://www.yourdomain.com)' | |
# Obey robots.txt rules |
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
function get_session_id(session_table) | |
if #session_table <= 100 then | |
-- Crawlera C10 package supports only 100 sessions | |
return session_table[math.random(1,100)] | |
else | |
return session_table[0] | |
end | |
end | |
function add_session_id(session_table, session_id) |
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 tensorflow as tf | |
from tensorflow.python import debug as tf_debug | |
a = tf.constant([1.0, 4.0], shape=[2,1]) | |
b = tf.constant([2.0, 3.0], shape=[1,2]) | |
c = tf.add(tf.matmul(a,b), tf.constant([5.0, 6.0])) | |
d = tf.Print(c, [c, 2.0], message="Value of C is:") | |
sess = tf_debug.LocalCLIDebugWrapperSession(sess) | |
with tf.Session() as sess: | |
sess.run(d) |
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
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java | |
index 4af6eec83..23dd02bd3 100644 | |
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java | |
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieRequestProcessor.java | |
@@ -37,10 +37,7 @@ import io.netty.util.concurrent.Future; | |
import io.netty.util.concurrent.GenericFutureListener; | |
import java.util.Optional; | |
-import java.util.concurrent.ExecutorService; | |
-import java.util.concurrent.RejectedExecutionException; |
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 org.apache.bookkeeper.client.*; | |
import org.apache.bookkeeper.client.LedgerEntry; | |
import org.apache.bookkeeper.client.api.LedgerEntries; | |
import java.io.IOException; | |
import java.nio.charset.StandardCharsets; | |
import java.util.Enumeration; | |
import java.util.concurrent.CountDownLatch; | |
import java.util.concurrent.TimeUnit; |
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 os | |
import time | |
import requests | |
from datetime import datetime | |
import subprocess | |
TTP_TIME_FORMAT = '%Y-%m-%dT%H:%M' | |
NOTIF_MESSAGE="New slot opened at {start}" |