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
using System; | |
using System.IO; | |
using java.util; | |
using java.io; | |
using edu.stanford.nlp.pipeline; | |
using Console = System.Console; | |
namespace NLPTest | |
{ | |
class Program |
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
// test.c - simple lua for playing about with | |
#include "module.h" | |
#include "lauxlib.h" | |
#include "platform.h" | |
// test.identity() - takes a single value, returns it | |
static int test_identity(lua_State *L) { | |
return 1; | |
} |
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
#ifndef __USER_MODULES_H__ | |
#define __USER_MODULES_H__ | |
#define LUA_USE_BUILTIN_STRING // for string.xxx() | |
#define LUA_USE_BUILTIN_TABLE // for table.xxx() | |
#define LUA_USE_BUILTIN_COROUTINE // for coroutine.xxx() | |
#define LUA_USE_BUILTIN_MATH // for math.xxx(), partially work | |
// #define LUA_USE_BUILTIN_IO // for io.xxx(), partially work | |
// #define LUA_USE_BUILTIN_OS // for os.xxx(), not work |
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
--wifi.setmode(wifi.STATION) | |
--wifi.sta.config("MyAccessPoint","mypassword") | |
hits = 0 | |
server = net.createServer(net.TCP) | |
server:listen(80, function(conn) | |
conn:on("receive", function(conn, payload) | |
print(payload) | |
hits = hits + 1 |
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
<html> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/zepto/1.1.6/zepto.min.js"> | |
</script> | |
<script> | |
function toggleLED() { | |
$.post("/", {}, function(response){ | |
location.reload(); | |
}); | |
} |
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
--wifi.setmode(wifi.STATION) | |
--wifi.sta.config("MyAccessPoint","mypassword") | |
led = 4 | |
ledStatus = gpio.HIGH | |
gpio.mode(led, gpio.OUTPUT) | |
file.open("led.html") | |
htmlTemplate = file.read() | |
file.close() |
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/app/include/lwip/app/ping.h b/app/include/lwip/app/ping.h | |
index 21e26e9..161b7ab 100644 | |
--- a/app/include/lwip/app/ping.h | |
+++ b/app/include/lwip/app/ping.h | |
@@ -75,6 +75,7 @@ struct ping_resp{ | |
uint32 bytes; | |
uint32 total_bytes; | |
uint32 total_time; | |
+ uint8 ttl; | |
sint8 ping_err; |
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
-- init.lua | |
-- | |
-- Simple lua script to get started. Will blink the esp8266's | |
-- onboard LED while not connected to a wifi access point, and | |
-- keep it lit up after a connection is established | |
seconds = 1000 | |
ledBlinkTimer = 1 | |
ledBlinkTimeout = seconds / 10 |
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
void drawProjectedLine(point3D_type from, point3D_type to) { | |
from.z += CAM_F; | |
to.z += CAM_F; | |
int x1_2D = CAM_X + (int)(((double)from.x / (double)from.z) * CAM_F); | |
int y1_2D = CAM_Y + (int)(((double)from.y / (double)from.z) * CAM_F); | |
int x2_2D = CAM_X + (int)(((double)to.x / (double)to.z) * CAM_F); | |
int y2_2D = CAM_Y + (int)(((double)to.y / (double)to.z) * CAM_F); |
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
#!/bin/bash | |
numberFiles=`ls ./srt/*.srt | wc -w | tr -d '[[:space:]]'` | |
seq -s ' ' $numberFiles | |
printf "\n" | |
find ./srt/* | while read s | |
do | |
grep -io harvard "${s}" | wc -w | tr -d '[[:space:]]' | |
printf " " |