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
/* | |
* Licensed to the Apache Software Foundation (ASF) under one | |
* or more contributor license agreements. See the NOTICE file | |
* distributed with this work for additional information | |
* regarding copyright ownership. The ASF licenses this file | |
* to you under the Apache License, Version 2.0 (the | |
* "License"); you may not use this file except in compliance | |
* with the License. You may obtain a copy of the License at | |
* | |
* http://www.apache.org/licenses/LICENSE-2.0 |
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
public class FastInverseSquareRootTest { | |
private static FastInverseSquareRootTest conductTestHalfPrecision() { | |
float result = 0F; | |
long startTime, endTime, midTime; | |
startTime = System.nanoTime(); | |
for (float x = 1F; x < 4_000_000F; x += 0.25F) { | |
result += 1F / (float) Math.sqrt(x); | |
} | |
midTime = System.nanoTime(); |
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
{ | |
"title": "CTRL <=> CMD except Terminal and Emacs", | |
"rules": [ | |
{ | |
"description": "Swap ctrl and command except Terminal and Emacs", | |
"manipulators": [ | |
{ | |
"type": "basic", | |
"from": { | |
"key_code": "left_control", |
-- set mapred.max.split.size=128000000;
set hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.tez.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.mapjoin.smalltable.filesize=30000000;
-- set hive.optimize.s3.query=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.optimize.sort.dynamic.partition=false;
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
import numpy as np | |
from numpy import array | |
from scipy.sparse import coo_matrix | |
row = np.array([82, 8, 56, 86, 48, 20, 22, 98, 65, 98]) | |
col = np.array([80, 13, 51, 74, 16, 40, 64, 57, 40, 30]) | |
data = np.array([0.6805822, 0.23116356, 0.8527678, 0.3512172, 0.03575957, 0.2307719, 0.6499588, 0.66925836, 0.8698123, 0.041548133]) | |
coo = coo_matrix((data, (row, col)), shape=(100, 100)) |
-- set mapred.max.split.size=128000000;
set hive.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.tez.input.format=org.apache.hadoop.hive.ql.io.CombineHiveInputFormat;
set hive.mapjoin.smalltable.filesize=30000000;
-- set hive.optimize.s3.query=true;
set hive.exec.dynamic.partition.mode=nonstrict;
set hive.optimize.sort.dynamic.partition=false;
SET sampleRate=0.1; -- in range (0.0-1.0]
select
field1, field2, field3, ..., fieldN, state
from (
select
field1, field2, field3, ..., fieldN, state,
count(*) over (partition by state) as state_cnt,
rank() over (partition by state order by rand()) as state_rank
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
digraph Tree { | |
node [shape=box, style="filled, rounded", color="black", fontname=helvetica]; | |
edge [fontname=helvetica]; | |
0 [label=<pclass = 1.0>, fillcolor="#00000000"]; | |
1 [label=<sex = 0.0>, fillcolor="#00000000"]; | |
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"]; | |
2 [label=<age ≤ 43.0>, fillcolor="#00000000"]; | |
1 -> 2; | |
3 [label=<cabin = 0.0>, fillcolor="#00000000"]; | |
2 -> 3; |
select
recent1[3] as url,
regexp_extract(
recent1[3],
'^https?://[^/]+(/[^/]+){0,2}'
) as extracted
from
pre_hivemall_ac