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
# Join multiple lines without new line | |
value: > | |
part 1 | |
part 2 | |
# Join with newline | |
value2: | | |
line 1 | |
line 2 |
We can't make this file beautiful and searchable because it's too large.
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
M4id,Date,Value | |
H1,2015-01-07 12:00:00,605.0 | |
H1,2015-01-07 13:00:00,586.0 | |
H1,2015-01-07 14:00:00,586.0 | |
H1,2015-01-07 15:00:00,559.0 | |
H1,2015-01-07 16:00:00,511.0 | |
H1,2015-01-07 17:00:00,443.0 | |
H1,2015-01-07 18:00:00,422.0 | |
H1,2015-01-07 19:00:00,395.0 | |
H1,2015-01-07 20:00:00,382.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
import pandas as pd | |
from autogluon.timeseries import TimeSeriesPredictor, TimeSeriesDataFrame | |
# Load the data into a TimeSeriesDataFrame | |
df = pd.read_csv( | |
"m4_hourly.csv", | |
parse_dates=["Date"], | |
) | |
ts_dataframe = TimeSeriesDataFrame.from_data_frame( |
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
post '/import' do | |
contents = request.body.read | |
# Remove wrappers from the client FormData wrapper | |
yaml = contents.gsub(/^------WebKitFormBoundary.*\n|^Content-Disposition.*\n|^Content-Type.*\n/, '') | |
puts "YAML: #{yaml}" | |
end | |
# See also: https://gist.github.com/rjattrill/dd2d2597d4993433bcc6de7792a3a903 for a React/JavaScript sender. |
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 * as React from 'react' | |
function PickYamlFile() { | |
onInputChange = async (evt) => { | |
const file = evt.currentTarget.files[0] | |
const url = myHost() + '/import' | |
// Important to wrap the YAML with FormData encoding as YAML may contain % or other difficult characters. | |
const data = new FormData() |
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
<s:Button id="sendBtn" label="Send" click="sendBtn_clickHandler(event)" | |
enabled="{!model.documentSending && model.documentCreated}"/> |
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
require 'sequel' | |
DB = Sequel.connect(:adapter=>'odbc',:driver=>'SQL Server Native Client 10.0',:server=>'localhost',:port=>1433, :uid=>'myuser',:pwd=>'mypass',:db_type=>'mssql') | |
DB.fetch("SELECT * FROM artist") do |row| | |
puts row | |
end |
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
// To get Parsley context for the current module - you just inject on the type Context (of course). | |
import org.spicefactory.parsley.core.context.Context; | |
[Inject] | |
public var context:Context; |
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
public function checkFunc() : void { | |
Alert.show("inside function"); | |
} | |
public var myfunc:String = "checkFunc"; | |
public var newFunc:Function = this[myfunc]; | |
newFunc(); // This will invoke checkFunc |
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
-where => { | |
employee_code => {-in => [qw(CA CT CX)]} | |
}, |
NewerOlder