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
(ns twineworks.util.graph) | |
(defn ^:private toposort-visit [n g state] | |
(let [{:keys [unmarked processing processed]} state] | |
(when (contains? processing n) | |
(throw (ex-info "cannot toposort a cyclic graph" {:cause :cyclic-graph | |
:cycle-node n | |
:state state | |
:graph g}))) |
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.jcodings.Encoding; | |
import org.jruby.Ruby; | |
import org.jruby.common.NullWarnings; | |
import org.jruby.lexer.ByteListLexerSource; | |
import org.jruby.lexer.LexerSource; | |
import org.jruby.lexer.LexingCommon; | |
import org.jruby.lexer.yacc.RubyLexer; | |
import org.jruby.parser.ParserConfiguration; | |
import org.jruby.parser.ParserSupport; | |
import org.jruby.parser.RubyParserResult; |
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
BEGIN { | |
# file starts with DDL statements that go into header.sql | |
table = "header"; | |
sql = 1 | |
} | |
{ | |
# -- step 1 -- | |
# determine whether current line contains a DDL sql statement or |
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
/* | |
* 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 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
while (($key, $value) = each(%transformFiles)) { | |
open my $dataFile, $key or die "Can't open '$key': $!"; | |
open my $transformFile, '>', $value or die "Can't open '$value': $!"; | |
my $line=<$dataFile>; | |
chomp($line); | |
$line =~ s/\r*//g; | |
print $transformFile $line, "\t", "Adjusted M1", "\n"; |
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
DROP TABLE IF EXISTS saas_response_final; | |
CREATE TABLE saas_response_final AS | |
SELECT ge.accountId | |
, ge.addressLine2 | |
, ge.city | |
, ge.state | |
, ge.zip | |
, ge.description | |
, srje.status | |
, COALESCE(srje.letterGrade, '---') |
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
{ | |
"results": [ | |
{ | |
"gender": "male", | |
"name": { | |
"title": "mr", | |
"first": "brad", | |
"last": "gibson" | |
}, | |
"location": { |
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
{ | |
"results": [ | |
{ | |
"gender": "female", | |
"name": { | |
"title": "Ms", | |
"first": "Friedhilde", | |
"last": "Meißner" | |
}, | |
"location": { |
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
DROP TABLE IF EXISTS location; | |
CREATE TABLE location ( | |
location_id INTEGER GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY, | |
country TEXT, | |
state TEXT, | |
city TEXT | |
); | |
CREATE INDEX location_lookup ON location |
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
Creation_Time,Sensor_Time,Arrival_Time,x,y,z | |
1560991054000,1560991,1398347034631,0.079008654,0.12210429,9.419987 | |
1561001064000,1561001,1398347034642,0.088585466,0.12330139,9.416395 | |
1561011043000,1561011,1398347034651,0.092176765,0.10534488,9.417592 | |
... | |
OlderNewer