This file contains hidden or 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 python | |
import hashlib | |
import json | |
import logging | |
import logging.handlers | |
import os | |
import shutil | |
import sys | |
import tempfile | |
import urllib |
This file contains hidden or 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 python3 | |
# install dependencies: | |
# pip install base45 cbor2 (cwt - not used here) | |
import sys | |
import zlib | |
from base45 import b45decode | |
from cbor2 import loads |
This file contains hidden or 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 org.apache.spark.countSerDe | |
import org.apache.spark.sql.catalyst.util._ | |
import org.apache.spark.sql.types._ | |
import org.apache.spark.sql.Row | |
import org.apache.spark.sql.catalyst.InternalRow | |
import org.apache.spark.sql.catalyst.expressions.GenericInternalRow | |
import org.apache.spark.sql.expressions.MutableAggregationBuffer | |
import org.apache.spark.sql.expressions.UserDefinedAggregateFunction |
This file contains hidden or 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
// zig run benchmark.zig -lc -O ReleaseFast | |
const std = @import("std"); | |
usingnamespace @import("hashmap.zig"); | |
pub fn main() !void { | |
const allocator = std.heap.c_allocator; | |
var map = try HashMap( |
This file contains hidden or 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 | |
# In-place apply the CVE-2020-15227 nette/application patch | |
# This is a universal patcher for all affected versions. | |
# Run with `php patch-CVE-2020-15227.php` | |
# Inspiration: @spazef0rze | |
This file contains hidden or 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
@Grab(group='com.google.guava', module='guava', version='19.0') | |
@Grab(group='commons-codec', module='commons-codec', version='1.13') | |
@Grab(group='bouncycastle', module='bcprov-jdk15', version='140') | |
import groovy.transform.CompileStatic | |
import java.security.MessageDigest | |
import java.nio.charset.StandardCharsets | |
import com.google.common.hash.Hashing | |
import org.apache.commons.codec.digest.DigestUtils | |
import org.bouncycastle.crypto.digests.SHA256Digest |
mkdir /tmp/sqltables
spark2-shell
val dbname = "some_db"
val targetdir = "/tmp/sqltables"
spark.sql(s"show tables in `${dbname}`").collect.foreach(r => {
This file contains hidden or 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 python3 | |
"""Summary | |
Attributes: | |
format_logger (str): Description | |
logger (TYPE): Description | |
""" | |
import os | |
import sys |
Create binary text file with json files inside. Ideally about 500MB - 1GB size.
CREATE TABLE if not exists json_files
(
`filename` STRING,
`modified_dt` DOUBLE,
`content_size` INT,
`content` STRING
)