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
| loans = CSV.parse(File.read("irregular_addr.tsv"), | |
| col_sep: "\t", | |
| headers: true, | |
| ).map(&:to_h); |
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
| _sourceCategory="production/aws/cloudwatch" and _collector="AWS/Logs" and "encompass_to_sfmc_transformer" and "38a86545-2aab-4d93-a24e-48ef7a7bbb9c" |
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
| avm_r = ::Mercury::AvmResult.last(2500).map{ |r| r.slice('id', 'address_line_text', 'city_name', 'property_postal_code', 'property_state', 'result') } | |
| results = avm_r.map do |r| | |
| r.except('result') + { | |
| 'fsd' => r.dig('result','fsd'), | |
| 'valuation' => r.dig('result','valuation'), | |
| 'total_monthly_income_amount' => rand(1000..25000) # for CRAPE if you need | |
| } | |
| end | |
| CSV.open("mercury_avm_results.tsv", "w", write_headers: true, headers: results.first.keys, col_sep: "\t") do |csv| |
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
| blrs = Crape::New::BatchLoanRun.all | |
| wanted_values = blrs.map do |r| | |
| avm_result = r.loan_run.avm_result | |
| { | |
| loan_number: r.loan_number, | |
| endpoint: avm_result.dig('endpoint'), | |
| fsd: avm_result.dig('avmResult', 'forecastStdDev'), | |
| marketValue: avm_result.dig('avmResult', 'marketValue'), | |
| lowValue: avm_result.dig('avmResult', 'lowValue'), | |
| highValue: avm_result.dig('avmResult', 'highValue'), |
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
| # To read a bunch of inputs | |
| loans = File.read("lqa_AM.txt"); | |
| larray = loans.split("\r\n"); | |
| # To read a single input | |
| larray = [File.read("breaking_uldd.xml").squish] | |
| # desired output format /// | |
| [{:OriginalXML=> | |
| "<MESSAGE xmlns=\"http://www.mismo.org/residential/2009/schemas\" MISMOReferenceModelIdentifier=\"3.0.0.263.12\"><ABOUT_VERSIONS><ABOUT_VERSION><AboutVersionIdentifier>FRE 4.0.0</AboutVersionIdentifier><CreatedDa ... "}] |
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
| was having the same problem on Ubuntu 12.10 64bit using Virtualbox 4.2.22. Here are the steps I took to solve my problem: | |
| Open Virtualbox Manager | |
| Select the machine you cannot get internet on in the left pane | |
| Click the Settings button in the top menu | |
| Click Network in the left pane in the settings window | |
| Switched to Bridged Adapter in the Attached to drop-down menu | |
| Select the name of the network adapter you are currently using on your host machine. I am using wireless so I chose eth0 which is my wireless network adapter. You can check which adapter you are currently using by opening the terminal (CTRL+ALT+T by default) and running ifconfig. It will probably be the eth adapter that shows an inet addr and shows data transfer next to RX bytes. | |
| Under Advanced, make sure the machine is using the Desktop Adapter Type | |
| Under Advanced, make sure Promiscuous Mode is set to Allow VMs |
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
| CSV.open("data.csv", "w", headers: array_of_hashes.first.keys) do |csv| | |
| array_of_hashes.each do |h| | |
| csv << h.values | |
| end | |
| end |
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
| sudo update-alternatives --config java |
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
| ALTER DATABASE pegasus_development SET TIMEZONE='America/Los_Angeles'; |
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
| #!/bin/bash | |
| # IN CMIT/CRAPE | |
| TAG_LABEL=`date "+%Y%m%d.%H%M"` | |
| git checkout master | |
| git pull | |
| git tag -a $TAG_LABEL -m "latest" | |
| git push origin $TAG_LABEL | |
| git checkout master |