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.orc.CompressionKind | |
import org.apache.orc.OrcProto | |
import org.apache.orc.OrcProto.* | |
import org.apache.orc.OrcUtils | |
import org.apache.orc.impl.BufferChunk | |
import org.apache.orc.impl.InStream | |
import org.apache.orc.impl.InStream.StreamOptions | |
import org.apache.orc.impl.OrcCodecPool | |
import java.io.FileInputStream | |
import java.io.InputStream |
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
/** | |
* Returns an expression that can be used to deserialize a Spark SQL representation to an object | |
* of java bean `T` with a compatible schema. The Spark SQL representation is located at ordinal | |
* 0 of a row, i.e., `GetColumnByOrdinal(0, _)`. Nested classes will have their fields accessed | |
* using `UnresolvedExtractValue`. | |
*/ | |
def deserializerForDataType(beanClass: Class[_], dt: KDataTypeWrapper): Expression = { | |
val typeToken = TypeToken.of(beanClass) | |
val walkedTypePath = new WalkedTypePath().recordRoot(beanClass.getCanonicalName) | |
val (dataType, nullable) = inferDataType(typeToken) |
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
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>.bespoke-marp-note,.bespoke-marp-osc,.bespoke-progress-parent{display:none;-webkit-transition:none;transition:none}@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear;-webkit-tap-highlight-color:tr |
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
<!DOCTYPE html><html lang="en-US"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,height=device-height,initial-scale=1.0"><meta name="apple-mobile-web-app-capable" content="yes"><meta http-equiv="X-UA-Compatible" content="ie=edge"><meta property="og:type" content="website"><meta name="twitter:card" content="summary"><style>.bespoke-marp-note,.bespoke-marp-osc,.bespoke-progress-parent{display:none;-webkit-transition:none;transition:none}@media screen{body[data-bespoke-view=""] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=next] .bespoke-marp-parent>.bespoke-marp-osc>button,body[data-bespoke-view=presenter] .bespoke-marp-presenter-container .bespoke-marp-presenter-info-container button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background-color:transparent;border:0;color:inherit;cursor:pointer;font-size:inherit;opacity:.8;outline:none;padding:0;-webkit-transition:opacity .2s linear;transition:opacity .2s linear;-webkit-tap-highlight-color:tr |
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
use core::fmt; | |
use std::fmt::{Error, Formatter}; | |
use std::option::Iter; | |
use crate::DeltaType::{CHANGE, DELETE, INSERT}; | |
fn main() { | |
for x in create_patch("abc", "def") { | |
println!("{}", x.to_string()) | |
} |
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 org.ort.school.app.service | |
import com.winterbe.expekt.should | |
import io.kotlintest.shouldThrow | |
import io.kotlintest.specs.ShouldSpec | |
import io.mockk.every | |
import io.mockk.mockk | |
import org.ort.school.app.repo.UserRepo | |
import org.pac4j.core.credentials.UsernamePasswordCredentials | |
import org.pac4j.core.exception.CredentialsException |
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 | |
from time import sleep | |
import skein | |
from skein.model import ApplicationState | |
mem_sz_gb = os.environ["LMD_PO_MEM_SIZE_GB"] | |
cores_number = os.environ["LMD_PO_NUM_CORES"] | |
spec = skein.ApplicationSpec( |
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
@JvmField | |
val ENCODERS = mapOf<KClass<out Any>, Encoder<out Any>>( | |
Boolean::class to Encoders.BOOLEAN(), | |
Byte::class to Encoders.BYTE(), | |
Short::class to Encoders.SHORT(), | |
Int::class to Encoders.INT(), | |
Long::class to Encoders.LONG(), | |
Float::class to Encoders.FLOAT(), | |
Double::class to Encoders.DOUBLE(), | |
String::class to Encoders.STRING(), |
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 some; | |
import java.util.*; | |
import java.util.stream.Stream; | |
import static java.lang.Integer.parseInt; | |
import static java.util.Collections.singletonList; | |
import static java.util.Locale.ENGLISH; | |
public class Solver { |
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 | |
mkdir -p ~/ins | |
cd ~/ins | |
wget http://node-arm.herokuapp.com/node_latest_armhf.deb | |
sudo dpkg -i node_latest_armhf.deb | |
sudo npm install -g peerflix |