Skip to content

Instantly share code, notes, and snippets.

View kindofblue's full-sized avatar

Pingkai Liu kindofblue

  • AT&T Labs Research
  • New York, NY
View GitHub Profile
@kindofblue
kindofblue / explain_so
Created December 27, 2023 21:50 — forked from jzhuge/explain_so
Writing to iceberg table with sort order after coalesce
== Parsed Logical Plan ==
OverwriteByExpression RelationV2[id#61L] prodhive.jzhuge.wso_244_so_1633558130, true, Map(matchByName -> true), true
+- Repartition 4, false
+- Sort [id#3L ASC NULLS FIRST], true
+- Project [id#0L AS id#3L]
+- Range (0, 100000, step=1, splits=Some(6))
== Analyzed Logical Plan ==
OverwriteByExpression RelationV2[id#61L] prodhive.jzhuge.wso_244_so_1633558130, true, Map(matchByName -> true), true
+- Repartition 4, false
@kindofblue
kindofblue / merge-schemas.scala
Created December 18, 2023 19:12 — forked from eduardorost/merge-schemas.scala
Merge Schema with structs
import org.apache.spark.SparkConf
import org.apache.spark.sql.SparkSession
import org.apache.spark.sql.types._
import org.slf4j.{Logger, LoggerFactory}
object Main {
val logger: Logger = LoggerFactory.getLogger(this.getClass)
private lazy val sparkConf: SparkConf = new SparkConf()
.setMaster("local[*]")
@kindofblue
kindofblue / idea.vmoptions
Created May 25, 2022 18:03 — forked from 0xqd/idea.vmoptions
Better performance vmoptions for 2020.1 intellij
-Xms1024m
-Xmx3072m
-Xss64m
-Dfile.encoding=UTF-8
-Djava.net.preferIPv4Stack=true
-Dsun.io.useCanonCaches=false
-XX:+AggressiveOpts
-XX:+AlwaysPreTouch
-XX:+CMSClassUnloadingEnabled
-XX:+CMSIncrementalMode

Keybase proof

I hereby claim:

  • I am kindofblue on github.
  • I am netghost (https://keybase.io/netghost) on keybase.
  • I have a public key whose fingerprint is 348D 9510 D2CD 68FF 7E7B 1FF8 9C71 8C2B 8A75 F35B

To claim this, I am signing this object:

1. use \G at the end of query to show multiple lines.
2. mysql -h<host> -P<port> -u<user> -p<password> -e "sql statement"
3. when create user, '%' does not match 'localhost'.
#!/bin/sh
script_path=`readlink -f $0`
svc_bin_dir=`dirname $script_path`
svc_home_dir=`dirname $svc_bin_dir`
svc_data_dir=$svc_home_dir/data
## This is an example of executing code when your zenpack gets installed (or removed)
## This __init__.py file should be located at ZenPacks.namespace.Name/ZenPacks/namespace/Name/__init__.py
## This code should be carefully added to your zenpack so as not to accidently overwrite key methods (
'''
Here begins the non default code
'''
# Import all the things.
https://blog.wapnet.nl/2014/02/zenoss-performance-issues-with-too-many-events/