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
package main | |
import ( | |
"encoding/json" | |
"io" | |
"log" | |
"log/slog" | |
"net/http" | |
"os" | |
"time" |
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
func urlencode(s string) (result string){ | |
for _, c := range(s) { | |
if c <= 0x7f { // single byte | |
result += fmt.Sprintf("%%%X", c) | |
} else if c > 0x1fffff {// quaternary byte | |
result += fmt.Sprintf("%%%X%%%X%%%X%%%X", | |
0xf0 + ((c & 0x1c0000) >> 18), | |
0x80 + ((c & 0x3f000) >> 12), | |
0x80 + ((c & 0xfc0) >> 6), | |
0x80 + (c & 0x3f), |
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 kotlinx.serialization.ExperimentalSerializationApi | |
import kotlinx.serialization.KSerializer | |
import kotlinx.serialization.Serializable | |
import kotlinx.serialization.Serializer | |
import kotlinx.serialization.decodeFromString | |
import kotlinx.serialization.encodeToString | |
import kotlinx.serialization.encoding.Decoder | |
import kotlinx.serialization.encoding.Encoder | |
import kotlinx.serialization.json.Json | |
import kotlinx.serialization.json.JsonDecoder |
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.poi.ss.usermodel.WorkbookFactory | |
import org.apache.poi.xssf.usermodel.XSSFWorkbook | |
import java.io.FileInputStream | |
import java.io.FileOutputStream | |
fun main(args: Array<String>) { | |
val path = "test.xlsx" | |
write(path) | |
read(path) |
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
package main | |
import ( | |
"archive/zip" | |
"io" | |
"log" | |
"os" | |
"path/filepath" | |
) |
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
require 'opencv' | |
require 'em-websocket' | |
require 'base64' | |
class WebCam | |
def initialize(n = 0) | |
@cap = OpenCV::CvCapture.open(n) | |
end | |
def get_with_base64 |
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
package main | |
import ( | |
"fmt" | |
"log" | |
"io/ioutil" | |
"encoding/json" | |
"github.com/mrjones/oauth" | |
) |
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
casper = require('casper').create() | |
casper.start "https://facebook.com", -> | |
query = | |
email: 'youremail' | |
pass: 'yourpass' | |
@fill "#login_form", query, true | |
casper.thenOpen 'https://facebook.com/username' |
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 java.nio.ByteBuffer | |
import java.nio.charset.StandardCharsets | |
import com.amazonaws.auth.{AWSStaticCredentialsProvider, BasicAWSCredentials} | |
import com.amazonaws.client.builder.AwsClientBuilder | |
import com.amazonaws.services.kinesis.model.{GetRecordsRequest, PutRecordRequest} | |
import com.amazonaws.services.kinesis.{AmazonKinesis, AmazonKinesisClientBuilder} | |
import scala.collection.JavaConverters._ | |
import scala.util.Random |
NewerOlder